refactor(editor): merge inline to std (#11025)

This commit is contained in:
Saul-Mirone
2025-03-20 05:46:56 +00:00
parent 5aa36efab0
commit 92d76ba571
176 changed files with 142 additions and 534 deletions
+2 -5
View File
@@ -48,7 +48,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@blocksuite/sync": "workspace:*",
"rxjs": "^7.8.1"
@@ -58,6 +57,8 @@
"./effects": "./src/effects.ts",
"./block-std": "./src/block-std/index.ts",
"./block-std/gfx": "./src/block-std/gfx.ts",
"./block-std/inline": "./src/block-std/inline.ts",
"./block-std/effects": "./src/block-std/effects.ts",
"./global": "./src/global/index.ts",
"./global/utils": "./src/global/utils.ts",
"./global/env": "./src/global/env.ts",
@@ -69,10 +70,6 @@
"./global/lit": "./src/global/lit.ts",
"./store": "./src/store/index.ts",
"./store/test": "./src/store/test.ts",
"./inline": "./src/inline/index.ts",
"./inline/consts": "./src/inline/consts.ts",
"./inline/effects": "./src/inline/effects.ts",
"./inline/types": "./src/inline/types.ts",
"./blocks/attachment": "./src/blocks/attachment.ts",
"./blocks/bookmark": "./src/blocks/bookmark.ts",
"./blocks/callout": "./src/blocks/callout.ts",
@@ -0,0 +1 @@
export * from '@blocksuite/block-std/effects';
@@ -0,0 +1 @@
export * from '@blocksuite/block-std/inline';
-3
View File
@@ -55,13 +55,11 @@ import { effects as widgetSlashMenuEffects } from '@blocksuite/affine-widget-sla
import { effects as widgetToolbarEffects } from '@blocksuite/affine-widget-toolbar/effects';
import { effects as stdEffects } from '@blocksuite/block-std/effects';
import { effects as dataViewEffects } from '@blocksuite/data-view/effects';
import { effects as inlineEffects } from '@blocksuite/inline/effects';
import { registerSpecs } from './extensions/register.js';
export declare const _GLOBAL_:
| typeof stdEffects
| typeof inlineEffects
| typeof dataViewEffects
| typeof richTextEffects
| typeof blockNoteEffects
@@ -111,7 +109,6 @@ export function effects() {
registerSpecs();
stdEffects();
inlineEffects();
dataViewEffects();
richTextEffects();
@@ -1 +0,0 @@
export * from '@blocksuite/inline/consts';
@@ -1 +0,0 @@
export * from '@blocksuite/inline/effects';
@@ -1 +0,0 @@
export * from '@blocksuite/inline';
@@ -1 +0,0 @@
export * from '@blocksuite/inline/types';
-1
View File
@@ -45,7 +45,6 @@
{ "path": "../../framework/block-std" },
{ "path": "../data-view" },
{ "path": "../../framework/global" },
{ "path": "../../framework/inline" },
{ "path": "../../framework/store" },
{ "path": "../../framework/sync" }
]
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
@@ -15,7 +15,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -18,7 +18,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@emoji-mart/data": "^1.2.1",
"@floating-ui/dom": "^1.6.10",
@@ -14,7 +14,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -18,7 +18,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -8,19 +8,16 @@ import {
} from '@blocksuite/affine-shared/services';
import { getViewportElement } from '@blocksuite/affine-shared/utils';
import type { BlockComponent } from '@blocksuite/block-std';
import { BlockSelection, TextSelection } from '@blocksuite/block-std';
import {
BlockSelection,
getInlineRangeProvider,
TextSelection,
} from '@blocksuite/block-std';
import { IS_MAC, IS_MOBILE } from '@blocksuite/global/env';
import { noop } from '@blocksuite/global/utils';
import {
INLINE_ROOT_ATTR,
type InlineRangeProvider,
type InlineRootElement,
type VLine,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import { IS_MAC, IS_MOBILE } from '@blocksuite/global/env';
import { noop } from '@blocksuite/global/utils';
import { Slice } from '@blocksuite/store';
import { computed, effect, type Signal, signal } from '@preact/signals-core';
import { html, nothing, type TemplateResult } from 'lit';
@@ -1,7 +1,7 @@
import { affineTextStyles } from '@blocksuite/affine-rich-text';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { ShadowlessElement } from '@blocksuite/block-std';
import { ZERO_WIDTH_SPACE } from '@blocksuite/inline';
import { ZERO_WIDTH_SPACE } from '@blocksuite/block-std/inline';
import type { DeltaInsert } from '@blocksuite/store';
import { html } from 'lit';
import { property } from 'lit/decorators.js';
@@ -14,7 +14,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -19,10 +19,8 @@ import {
type TelemetryEventMap,
TelemetryProvider,
} from '@blocksuite/affine-shared/services';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
} from '@blocksuite/block-std';
import { type BlockComponent } from '@blocksuite/block-std';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import {
createRecordDetail,
createUniComponentFromWebComponent,
@@ -15,7 +15,6 @@
{ "path": "../../../framework/block-std" },
{ "path": "../../data-view" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -20,7 +20,6 @@
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -16,10 +16,8 @@ import {
TelemetryProvider,
} from '@blocksuite/affine-shared/services';
import { getDropResult } from '@blocksuite/affine-widget-drag-handle';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
} from '@blocksuite/block-std';
import { type BlockComponent } from '@blocksuite/block-std';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import {
createRecordDetail,
createUniComponentFromWebComponent,
@@ -17,7 +17,6 @@
{ "path": "../../../framework/block-std" },
{ "path": "../../data-view" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -15,7 +15,6 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -12,7 +12,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -18,7 +18,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -14,7 +14,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -18,7 +18,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -14,7 +14,6 @@
{ "path": "../../widgets/widget-frame-title" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -17,7 +17,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,12 +15,11 @@ import {
import { DocModeProvider } from '@blocksuite/affine-shared/services';
import { getViewportElement } from '@blocksuite/affine-shared/utils';
import type { BlockComponent } from '@blocksuite/block-std';
import { BlockSelection, TextSelection } from '@blocksuite/block-std';
import {
BlockSelection,
getInlineRangeProvider,
TextSelection,
} from '@blocksuite/block-std';
import type { InlineRangeProvider } from '@blocksuite/inline';
type InlineRangeProvider,
} from '@blocksuite/block-std/inline';
import type { BaseSelection } from '@blocksuite/store';
import { effect } from '@preact/signals-core';
import { html, nothing, type TemplateResult } from 'lit';
@@ -13,7 +13,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -21,7 +21,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
@@ -17,7 +17,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -17,7 +17,6 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -16,8 +16,11 @@ import {
getViewportElement,
} from '@blocksuite/affine-shared/utils';
import type { BlockComponent } from '@blocksuite/block-std';
import { getInlineRangeProvider, TextSelection } from '@blocksuite/block-std';
import type { InlineRangeProvider } from '@blocksuite/inline';
import { TextSelection } from '@blocksuite/block-std';
import {
getInlineRangeProvider,
type InlineRangeProvider,
} from '@blocksuite/block-std/inline';
import { computed, effect, signal } from '@preact/signals-core';
import { html, nothing, type TemplateResult } from 'lit';
import { query, state } from 'lit/decorators.js';
@@ -14,7 +14,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -42,7 +42,6 @@
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -7,12 +7,9 @@ import type { ConnectorElementModel } from '@blocksuite/affine-model';
import type { RichText } from '@blocksuite/affine-rich-text';
import { ThemeProvider } from '@blocksuite/affine-shared/services';
import { almostEqual } from '@blocksuite/affine-shared/utils';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
ShadowlessElement,
} from '@blocksuite/block-std';
import { type BlockComponent, ShadowlessElement } from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { Bound, Vec } from '@blocksuite/global/gfx';
import { WithDisposable } from '@blocksuite/global/lit';
import { css, html, nothing } from 'lit';
@@ -5,12 +5,9 @@ import {
} from '@blocksuite/affine-block-surface';
import type { GroupElementModel } from '@blocksuite/affine-model';
import type { RichText } from '@blocksuite/affine-rich-text';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
ShadowlessElement,
} from '@blocksuite/block-std';
import { type BlockComponent, ShadowlessElement } from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { Bound } from '@blocksuite/global/gfx';
import { WithDisposable } from '@blocksuite/global/lit';
import { html, nothing } from 'lit';
@@ -7,12 +7,9 @@ import { MindmapElementModel, TextResizing } from '@blocksuite/affine-model';
import type { RichText } from '@blocksuite/affine-rich-text';
import { ThemeProvider } from '@blocksuite/affine-shared/services';
import { getSelectedRect } from '@blocksuite/affine-shared/utils';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
ShadowlessElement,
} from '@blocksuite/block-std';
import { type BlockComponent, ShadowlessElement } from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { Bound, toRadian, Vec } from '@blocksuite/global/gfx';
import { WithDisposable } from '@blocksuite/global/lit';
import { html, nothing } from 'lit';
@@ -19,7 +19,7 @@ import {
type Signal,
} from '@blocksuite/affine-shared/utils';
import type { BlockStdScope, EditorHost } from '@blocksuite/block-std';
import type { InlineRange } from '@blocksuite/inline';
import type { InlineRange } from '@blocksuite/block-std/inline';
import type { TemplateResult } from 'lit';
import { showImportModal } from './import-doc/index.js';
@@ -8,12 +8,12 @@ import { getViewportElement } from '@blocksuite/affine-shared/utils';
import type { BlockComponent } from '@blocksuite/block-std';
import { BLOCK_ID_ATTR, WidgetComponent } from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
import { IS_MOBILE } from '@blocksuite/global/env';
import {
INLINE_ROOT_ATTR,
type InlineEditor,
type InlineRootElement,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import { IS_MOBILE } from '@blocksuite/global/env';
import { signal } from '@preact/signals-core';
import { html, nothing } from 'lit';
import { choose } from 'lit/directives/choose.js';
@@ -38,7 +38,6 @@
{ "path": "../../../framework/block-std" },
{ "path": "../../data-view" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -14,9 +14,9 @@ import { SpecProvider } from '@blocksuite/affine-shared/utils';
import {
BlockStdScope,
type EditorHost,
RANGE_QUERY_EXCLUDE_ATTR,
ShadowlessElement,
} from '@blocksuite/block-std';
import { RANGE_QUERY_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { deserializeXYWH } from '@blocksuite/global/gfx';
import { WithDisposable } from '@blocksuite/global/lit';
import { type BlockModel, type Query } from '@blocksuite/store';
@@ -15,7 +15,6 @@
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -16,7 +16,6 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
@@ -5,11 +5,11 @@ import {
type LocalConnectorElementModel,
type PointStyle,
} from '@blocksuite/affine-model';
import { deltaInsertsToChunks } from '@blocksuite/block-std/inline';
import {
getBezierParameters,
type PointLocation,
} from '@blocksuite/global/gfx';
import { deltaInsertsToChunks } from '@blocksuite/inline';
import { isConnectorWithLabel } from '../../../managers/connector-manager.js';
import type { RoughCanvas } from '../../../utils/rough/canvas.js';
@@ -4,9 +4,9 @@ import type {
ShapeType,
} from '@blocksuite/affine-model';
import { DefaultTheme, TextAlign } from '@blocksuite/affine-model';
import { deltaInsertsToChunks } from '@blocksuite/block-std/inline';
import type { IBound } from '@blocksuite/global/gfx';
import { Bound } from '@blocksuite/global/gfx';
import { deltaInsertsToChunks } from '@blocksuite/inline';
import type { RoughCanvas } from '../../../utils/rough/canvas.js';
import type { CanvasRenderer } from '../../canvas-renderer.js';
@@ -5,8 +5,8 @@ import type {
TextVerticalAlign,
} from '@blocksuite/affine-model';
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
import { deltaInsertsToChunks } from '@blocksuite/block-std/inline';
import type { Bound, SerializedXYWH } from '@blocksuite/global/gfx';
import { deltaInsertsToChunks } from '@blocksuite/inline';
import type { CanvasRenderer } from '../../canvas-renderer.js';
import {
@@ -1,5 +1,5 @@
import { DefaultTheme, type TextElementModel } from '@blocksuite/affine-model';
import { deltaInsertsToChunks } from '@blocksuite/inline';
import { deltaInsertsToChunks } from '@blocksuite/block-std/inline';
import type { CanvasRenderer } from '../../canvas-renderer.js';
import {
@@ -4,12 +4,12 @@ import type {
FontWeight,
TextElementModel,
} from '@blocksuite/affine-model';
import { deltaInsertsToChunks } from '@blocksuite/block-std/inline';
import type { Bound } from '@blocksuite/global/gfx';
import {
getPointsFromBoundWithRotation,
rotatePoints,
} from '@blocksuite/global/gfx';
import { deltaInsertsToChunks } from '@blocksuite/inline';
import type * as Y from 'yjs';
import {
@@ -1,11 +1,12 @@
import type { Color } from '@blocksuite/affine-model';
import { ThemeProvider } from '@blocksuite/affine-shared/services';
import type { EditorHost, SurfaceSelection } from '@blocksuite/block-std';
import { BlockComponent, RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std';
import { BlockComponent } from '@blocksuite/block-std';
import {
GfxControllerIdentifier,
type Viewport,
} from '@blocksuite/block-std/gfx';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { Bound } from '@blocksuite/global/gfx';
import { css, html } from 'lit';
import { query } from 'lit/decorators.js';
@@ -13,7 +13,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -3,10 +3,8 @@ import type { TableBlockModel } from '@blocksuite/affine-model';
import { NOTE_SELECTOR } from '@blocksuite/affine-shared/consts';
import { DocModeProvider } from '@blocksuite/affine-shared/services';
import { VirtualPaddingController } from '@blocksuite/affine-shared/utils';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
} from '@blocksuite/block-std';
import type { BlockComponent } from '@blocksuite/block-std';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { IS_MOBILE } from '@blocksuite/global/env';
import { signal } from '@preact/signals-core';
import { html, nothing } from 'lit';
@@ -15,7 +15,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -11,7 +11,6 @@
{ "path": "../shared" },
{ "path": "../../framework/block-std" },
{ "path": "../../framework/global" },
{ "path": "../../framework/inline" },
{ "path": "../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
@@ -15,7 +15,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
-1
View File
@@ -19,7 +19,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
@@ -9,11 +9,11 @@ import { ThemeProvider } from '@blocksuite/affine-shared/services';
import { getSelectedRect } from '@blocksuite/affine-shared/utils';
import {
type BlockStdScope,
RANGE_SYNC_EXCLUDE_ATTR,
ShadowlessElement,
stdContext,
} from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std/inline';
import { Bound, toRadian, Vec } from '@blocksuite/global/gfx';
import { WithDisposable } from '@blocksuite/global/lit';
import { consume } from '@lit/context';
-1
View File
@@ -15,7 +15,6 @@
{ "path": "../../shared" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/inline" },
{ "path": "../../../framework/store" }
]
}
-1
View File
@@ -12,7 +12,6 @@
"dependencies": {
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@toeverything/theme": "^1.1.12",
"@types/lodash-es": "^4.17.12",
-1
View File
@@ -9,7 +9,6 @@
"references": [
{ "path": "../../framework/block-std" },
{ "path": "../../framework/global" },
{ "path": "../../framework/inline" },
{ "path": "../../framework/store" }
]
}
-1
View File
@@ -16,7 +16,6 @@
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.6",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
+1 -1
View File
@@ -9,7 +9,7 @@ import {
type EditorHost,
TextSelection,
} from '@blocksuite/block-std';
import type { InlineEditor, InlineRange } from '@blocksuite/inline';
import type { InlineEditor, InlineRange } from '@blocksuite/block-std/inline';
import { BlockModel } from '@blocksuite/store';
import type { AffineInlineEditor } from './inline/index.js';
@@ -1,13 +1,13 @@
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { type BlockStdScope, StdIdentifier } from '@blocksuite/block-std';
import {
type AttributeRenderer,
getDefaultAttributeRenderer,
} from '@blocksuite/block-std/inline';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import {
type AttributeRenderer,
getDefaultAttributeRenderer,
} from '@blocksuite/inline';
import {
baseTextAttributes,
type DeltaInsert,
@@ -2,7 +2,7 @@ import type {
AttributeRenderer,
InlineEditor,
InlineRange,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import type { BaseTextAttributes, DeltaInsert } from '@blocksuite/store';
import type * as Y from 'yjs';
import type { ZodTypeAny } from 'zod';
@@ -1,7 +1,10 @@
import { getSelectedBlocksCommand } from '@blocksuite/affine-shared/commands';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import type { BlockSelection, Command } from '@blocksuite/block-std';
import { INLINE_ROOT_ATTR, type InlineRootElement } from '@blocksuite/inline';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
} from '@blocksuite/block-std/inline';
import { FORMAT_BLOCK_SUPPORT_FLAVOURS } from './consts.js';
@@ -4,7 +4,10 @@ import {
type BlockComponent,
type Command,
} from '@blocksuite/block-std';
import { INLINE_ROOT_ATTR, type InlineRootElement } from '@blocksuite/inline';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
} from '@blocksuite/block-std/inline';
import { FORMAT_NATIVE_SUPPORT_FLAVOURS } from './consts.js';
@@ -1,7 +1,10 @@
import { getSelectedBlocksCommand } from '@blocksuite/affine-shared/commands';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import type { Command, TextSelection } from '@blocksuite/block-std';
import { INLINE_ROOT_ATTR, type InlineRootElement } from '@blocksuite/inline';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
} from '@blocksuite/block-std/inline';
import { FORMAT_TEXT_SUPPORT_FLAVOURS } from './consts.js';
import { clearMarksOnDiscontinuousInput } from './utils.js';
@@ -4,7 +4,10 @@ import {
} from '@blocksuite/affine-shared/commands';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import type { Command } from '@blocksuite/block-std';
import { INLINE_ROOT_ATTR, type InlineRootElement } from '@blocksuite/inline';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
} from '@blocksuite/block-std/inline';
import { toggleLinkPopup } from '../inline/index.js';
import { formatBlockCommand } from './format-block.js';
@@ -16,7 +16,7 @@ import {
type InlineEditor,
type InlineRange,
type InlineRootElement,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import type { BlockModel } from '@blocksuite/store';
import { effect } from '@preact/signals-core';
+1 -1
View File
@@ -4,7 +4,7 @@ import type {
BeforeinputHookCtx,
CompositionEndHookCtx,
HookContext,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
const EDGE_IGNORED_ATTRIBUTES = ['code', 'link'] as const;
const GLOBAL_IGNORED_ATTRIBUTES = [] as const;
@@ -2,7 +2,10 @@ import { FootNoteSchema, ReferenceInfoSchema } from '@blocksuite/affine-model';
import { ToolbarModuleExtension } from '@blocksuite/affine-shared/services';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { BlockFlavourIdentifier, StdIdentifier } from '@blocksuite/block-std';
import type { InlineEditor, InlineRootElement } from '@blocksuite/inline';
import type {
InlineEditor,
InlineRootElement,
} from '@blocksuite/block-std/inline';
import { html } from 'lit';
import { z } from 'zod';
@@ -1,6 +1,6 @@
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { ShadowlessElement } from '@blocksuite/block-std';
import { ZERO_WIDTH_SPACE } from '@blocksuite/inline';
import { ZERO_WIDTH_SPACE } from '@blocksuite/block-std/inline';
import type { DeltaInsert } from '@blocksuite/store';
import { html } from 'lit';
import { property } from 'lit/decorators.js';
@@ -8,13 +8,13 @@ import {
ShadowlessElement,
TextSelection,
} from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/lit';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
ZERO_WIDTH_NON_JOINER,
ZERO_WIDTH_SPACE,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import { WithDisposable } from '@blocksuite/global/lit';
import type { DeltaInsert } from '@blocksuite/store';
import { shift } from '@floating-ui/dom';
import { baseTheme } from '@toeverything/theme';
@@ -1,6 +1,6 @@
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { ShadowlessElement } from '@blocksuite/block-std';
import { ZERO_WIDTH_SPACE } from '@blocksuite/inline';
import { ZERO_WIDTH_SPACE } from '@blocksuite/block-std/inline';
import type { DeltaInsert } from '@blocksuite/store';
import { html } from 'lit';
import { property } from 'lit/decorators.js';
@@ -6,12 +6,12 @@ import {
type BlockStdScope,
ShadowlessElement,
} from '@blocksuite/block-std';
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
import {
type InlineEditor,
ZERO_WIDTH_NON_JOINER,
ZERO_WIDTH_SPACE,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
import type { DeltaInsert } from '@blocksuite/store';
import { signal } from '@preact/signals-core';
import katex from 'katex';
@@ -7,12 +7,12 @@ import {
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import type { BlockComponent, BlockStdScope } from '@blocksuite/block-std';
import { BLOCK_ID_ATTR, ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/lit';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
ZERO_WIDTH_SPACE,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import { WithDisposable } from '@blocksuite/global/lit';
import type { DeltaInsert } from '@blocksuite/store';
import { css, html } from 'lit';
import { property } from 'lit/decorators.js';
@@ -5,9 +5,9 @@ import {
stopPropagation,
} from '@blocksuite/affine-shared/utils';
import { type BlockStdScope, TextSelection } from '@blocksuite/block-std';
import type { InlineRange } from '@blocksuite/block-std/inline';
import { WithDisposable } from '@blocksuite/global/lit';
import { DoneIcon } from '@blocksuite/icons/lit';
import type { InlineRange } from '@blocksuite/inline/types';
import { computePosition, inline, offset, shift } from '@floating-ui/dom';
import { html, LitElement } from 'lit';
import { property, query } from 'lit/decorators.js';
@@ -1,5 +1,5 @@
import type { BlockStdScope } from '@blocksuite/block-std';
import type { InlineRange } from '@blocksuite/inline';
import type { InlineRange } from '@blocksuite/block-std/inline';
import type { AffineInlineEditor } from '../../../affine-inline-specs';
import { LinkPopup } from './link-popup';
@@ -16,14 +16,14 @@ import {
} from '@blocksuite/affine-shared/utils';
import type { BlockComponent, BlockStdScope } from '@blocksuite/block-std';
import { BLOCK_ID_ATTR, ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/lit';
import { LinkedPageIcon } from '@blocksuite/icons/lit';
import {
INLINE_ROOT_ATTR,
type InlineRootElement,
ZERO_WIDTH_NON_JOINER,
ZERO_WIDTH_SPACE,
} from '@blocksuite/inline';
} from '@blocksuite/block-std/inline';
import { WithDisposable } from '@blocksuite/global/lit';
import { LinkedPageIcon } from '@blocksuite/icons/lit';
import type { DeltaInsert, DocMeta, Store } from '@blocksuite/store';
import { css, html, nothing } from 'lit';
import { property, state } from 'lit/decorators.js';
@@ -10,9 +10,9 @@ import { FONT_XS, PANEL_BASE } from '@blocksuite/affine-shared/styles';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { stopPropagation } from '@blocksuite/affine-shared/utils';
import { type BlockStdScope, ShadowlessElement } from '@blocksuite/block-std';
import type { InlineRange } from '@blocksuite/block-std/inline';
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
import { DoneIcon, ResetIcon } from '@blocksuite/icons/lit';
import type { InlineRange } from '@blocksuite/inline';
import { computePosition, inline, offset, shift } from '@floating-ui/dom';
import { signal } from '@preact/signals-core';
import { css, html } from 'lit';
@@ -1,6 +1,6 @@
import type { ReferenceInfo } from '@blocksuite/affine-model';
import type { BlockStdScope } from '@blocksuite/block-std';
import type { InlineRange } from '@blocksuite/inline';
import type { InlineRange } from '@blocksuite/block-std/inline';
import type { AffineInlineEditor } from '../../../affine-inline-specs';
import { ReferencePopup } from './reference-popup';
@@ -6,7 +6,7 @@ import {
TextSelection,
type UIEventHandler,
} from '@blocksuite/block-std';
import type { InlineEditor } from '@blocksuite/inline';
import type { InlineEditor } from '@blocksuite/block-std/inline';
import { getInlineEditorByModel } from '../dom.js';
import { insertLinkedNode } from '../linked-node.js';
@@ -1,5 +1,5 @@
import type { BlockStdScope } from '@blocksuite/block-std';
import type { InlineEditor } from '@blocksuite/inline';
import type { InlineEditor } from '@blocksuite/block-std/inline';
import type { BlockModel } from '@blocksuite/store';
import { focusTextModel } from '../dom.js';

Some files were not shown because too many files have changed in this diff Show More