refactor(editor): add middlewares in shared adapter (#9395)

This commit is contained in:
Saul-Mirone
2024-12-27 12:32:43 +00:00
parent 76d9712f21
commit cbfe38b189
20 changed files with 85 additions and 80 deletions

View File

@@ -1,2 +0,0 @@
export const REFERENCE_NODE = ' ';
export const DEFAULT_DOC_NAME = 'Untitled';

View File

@@ -1,4 +1,3 @@
export { DEFAULT_DOC_NAME, REFERENCE_NODE } from './consts.js';
export { AffineLink, toggleLinkPopup } from './link-node/index.js';
export * from './reference-node/reference-config.js';
export { AffineReference } from './reference-node/reference-node.js';

View File

@@ -1,4 +1,5 @@
import type { ReferenceInfo } from '@blocksuite/affine-model';
import { REFERENCE_NODE } from '@blocksuite/affine-shared/consts';
import {
type LinkEventType,
type TelemetryEvent,
@@ -22,7 +23,6 @@ import { live } from 'lit/directives/live.js';
import type { EditorIconButton } from '../../../../../toolbar/index.js';
import type { AffineInlineEditor } from '../../affine-inline-specs.js';
import { REFERENCE_NODE } from '../consts.js';
export class ReferenceAliasPopup extends SignalWatcher(
WithDisposable(ShadowlessElement)

View File

@@ -1,4 +1,8 @@
import type { ReferenceInfo } from '@blocksuite/affine-model';
import {
DEFAULT_DOC_NAME,
REFERENCE_NODE,
} from '@blocksuite/affine-shared/consts';
import { DocDisplayMetaProvider } from '@blocksuite/affine-shared/services';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import {
@@ -32,7 +36,6 @@ import { HoverController } from '../../../../../hover/index.js';
import { Peekable } from '../../../../../peek/index.js';
import { RefNodeSlotsProvider } from '../../../../extension/index.js';
import { affineTextStyles } from '../affine-text.js';
import { DEFAULT_DOC_NAME, REFERENCE_NODE } from '../consts.js';
import type { ReferenceNodeConfigProvider } from './reference-config.js';
import { toggleReferencePopup } from './reference-popup.js';

View File

@@ -1,4 +1,6 @@
import { type AffineInlineEditor, REFERENCE_NODE } from './inline/index.js';
import { REFERENCE_NODE } from '@blocksuite/affine-shared/consts';
import { type AffineInlineEditor } from './inline/index.js';
export function insertLinkedNode({
inlineEditor,