Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

refactor(editor): remove blocks package (#10708)

Saul-Mirone12bc142809ec
diff --git a/blocksuite/affine/all/package.json b/blocksuite/affine/all/package.json
index 12f4f25171..f3fd9c10ff 100644
--- a/blocksuite/affine/all/package.json
+++ b/blocksuite/affine/all/package.json
@@ -13,8 +13,41 @@
"author": "toeverything",
"license": "MIT",
"dependencies": {
+ "@blocksuite/affine-block-attachment": "workspace:*",
+ "@blocksuite/affine-block-bookmark": "workspace:*",
+ "@blocksuite/affine-block-callout": "workspace:*",
+ "@blocksuite/affine-block-code": "workspace:*",
+ "@blocksuite/affine-block-data-view": "workspace:*",
+ "@blocksuite/affine-block-database": "workspace:*",
+ "@blocksuite/affine-block-divider": "workspace:*",
+ "@blocksuite/affine-block-edgeless-text": "workspace:*",
+ "@blocksuite/affine-block-embed": "workspace:*",
+ "@blocksuite/affine-block-frame": "workspace:*",
+ "@blocksuite/affine-block-image": "workspace:*",
+ "@blocksuite/affine-block-latex": "workspace:*",
+ "@blocksuite/affine-block-list": "workspace:*",
+ "@blocksuite/affine-block-note": "workspace:*",
+ "@blocksuite/affine-block-paragraph": "workspace:*",
+ "@blocksuite/affine-block-root": "workspace:*",
+ "@blocksuite/affine-block-surface": "workspace:*",
+ "@blocksuite/affine-block-surface-ref": "workspace:*",
+ "@blocksuite/affine-block-table": "workspace:*",
+ "@blocksuite/affine-components": "workspace:*",
+ "@blocksuite/affine-fragment-doc-title": "workspace:*",
+ "@blocksuite/affine-fragment-frame-panel": "workspace:*",
+ "@blocksuite/affine-fragment-outline": "workspace:*",
+ "@blocksuite/affine-model": "workspace:*",
+ "@blocksuite/affine-rich-text": "workspace:*",
+ "@blocksuite/affine-shared": "workspace:*",
+ "@blocksuite/affine-widget-drag-handle": "workspace:*",
+ "@blocksuite/affine-widget-edgeless-auto-connect": "workspace:*",
+ "@blocksuite/affine-widget-frame-title": "workspace:*",
+ "@blocksuite/affine-widget-remote-selection": "workspace:*",
+ "@blocksuite/affine-widget-scroll-anchoring": "workspace:*",
+ "@blocksuite/affine-widget-slash-menu": "workspace:*",
+ "@blocksuite/affine-widget-toolbar": "workspace:*",
"@blocksuite/block-std": "workspace:*",
- "@blocksuite/blocks": "workspace:*",
+ "@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
@@ -38,65 +71,81 @@
"./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": "./src/blocks/index.ts",
- "./blocks/schemas": "./src/blocks/schemas.ts",
- "./sync": "./src/sync/index.ts"
- },
- "typesVersions": {
- "*": {
- "effects": [
- "dist/effects.d.ts"
- ],
- "block-std": [
- "dist/block-std/index.d.ts"
- ],
- "block-std/gfx": [
- "dist/block-std/gfx.d.ts"
- ],
- "global": [
- "dist/global/index.d.ts"
- ],
- "global/utils": [
- "dist/global/utils.d.ts"
- ],
- "global/env": [
- "dist/global/env.d.ts"
- ],
- "global/exceptions": [
- "dist/global/exceptions.d.ts"
- ],
- "global/di": [
- "dist/global/di.d.ts"
- ],
- "global/types": [
- "dist/global/types.d.ts"
- ],
- "global/gfx": [
- "dist/global/gfx.d.ts"
- ],
- "store": [
- "dist/store/index.d.ts"
- ],
- "inline": [
- "dist/inline/index.d.ts"
- ],
- "inline/consts": [
- "dist/inline/consts.d.ts"
- ],
- "inline/types": [
- "dist/inline/types.d.ts"
- ],
- "blocks": [
- "dist/blocks/index.d.ts"
- ],
- "blocks/schemas": [
- "dist/blocks/schemas.d.ts"
- ],
- "sync": [
- "dist/sync/index.d.ts"
- ]
- }
+ "./blocks/attachment": "./src/blocks/attachment.ts",
+ "./blocks/bookmark": "./src/blocks/bookmark.ts",
+ "./blocks/callout": "./src/blocks/callout.ts",
+ "./blocks/code": "./src/blocks/code.ts",
+ "./blocks/data-view": "./src/blocks/data-view.ts",
+ "./blocks/database": "./src/blocks/database.ts",
+ "./blocks/divider": "./src/blocks/divider.ts",
+ "./blocks/edgeless-text": "./src/blocks/edgeless-text.ts",
+ "./blocks/embed": "./src/blocks/embed.ts",
+ "./blocks/frame": "./src/blocks/frame.ts",
+ "./blocks/image": "./src/blocks/image.ts",
+ "./blocks/latex": "./src/blocks/latex.ts",
+ "./blocks/list": "./src/blocks/list.ts",
+ "./blocks/note": "./src/blocks/note.ts",
+ "./blocks/paragraph": "./src/blocks/paragraph.ts",
+ "./blocks/root": "./src/blocks/root.ts",
+ "./blocks/surface": "./src/blocks/surface.ts",
+ "./blocks/surface-ref": "./src/blocks/surface-ref.ts",
+ "./blocks/table": "./src/blocks/table.ts",
+ "./data-view": "./src/data-view/index.ts",
+ "./data-view/effects": "./src/data-view/effects.ts",
+ "./widgets/drag-handle": "./src/widgets/drag-handle.ts",
+ "./widgets/edgeless-auto-connect": "./src/widgets/edgeless-auto-connect.ts",
+ "./widgets/frame-title": "./src/widgets/frame-title.ts",
+ "./widgets/remote-selection": "./src/widgets/remote-selection.ts",
+ "./widgets/scroll-anchoring": "./src/widgets/scroll-anchoring.ts",
+ "./widgets/slash-menu": "./src/widgets/slash-menu.ts",
+ "./widgets/toolbar": "./src/widgets/toolbar.ts",
+ "./fragments/doc-title": "./src/fragments/doc-title.ts",
+ "./fragments/frame-panel": "./src/fragments/frame-panel.ts",
+ "./fragments/outline": "./src/fragments/outline.ts",
+ "./components/block-selection": "./src/components/block-selection.ts",
+ "./components/block-zero-width": "./src/components/block-zero-width.ts",
+ "./components/caption": "./src/components/caption.ts",
+ "./components/card-style-dropdown-menu": "./src/components/card-style-dropdown-menu.ts",
+ "./components/color-picker": "./src/components/color-picker.ts",
+ "./components/context-menu": "./src/components/context-menu.ts",
+ "./components/date-picker": "./src/components/date-picker.ts",
+ "./components/drop-indicator": "./src/components/drop-indicator.ts",
+ "./components/embed-card-modal": "./src/components/embed-card-modal.ts",
+ "./components/filterable-list": "./src/components/filterable-list.ts",
+ "./components/highlight-dropdown-menu": "./src/components/highlight-dropdown-menu.ts",
+ "./components/hover": "./src/components/hover.ts",
+ "./components/icon-button": "./src/components/icon-button.ts",
+ "./components/icons": "./src/components/icons.ts",
+ "./components/link-preview": "./src/components/link-preview.ts",
+ "./components/linked-doc-title": "./src/components/linked-doc-title.ts",
+ "./components/notification": "./src/components/notification.ts",
+ "./components/peek": "./src/components/peek.ts",
+ "./components/portal": "./src/components/portal.ts",
+ "./components/smooth-corner": "./src/components/smooth-corner.ts",
+ "./components/toast": "./src/components/toast.ts",
+ "./components/toggle-button": "./src/components/toggle-button.ts",
+ "./components/toggle-switch": "./src/components/toggle-switch.ts",
+ "./components/toolbar": "./src/components/toolbar.ts",
+ "./components/view-dropdown-menu": "./src/components/view-dropdown-menu.ts",
+ "./rich-text": "./src/rich-text/index.ts",
+ "./rich-text/effects": "./src/rich-text/effects.ts",
+ "./shared/adapters": "./src/shared/adapters.ts",
+ "./shared/commands": "./src/shared/commands.ts",
+ "./shared/consts": "./src/shared/consts.ts",
+ "./shared/selection": "./src/shared/selection.ts",
+ "./shared/services": "./src/shared/services.ts",
+ "./shared/styles": "./src/shared/styles.ts",
+ "./shared/theme": "./src/shared/theme.ts",
+ "./shared/types": "./src/shared/types.ts",
+ "./shared/utils": "./src/shared/utils.ts",
+ "./schemas": "./src/schemas.ts",
+ "./model": "./src/model/index.ts",
+ "./sync": "./src/sync/index.ts",
+ "./adapters": "./src/adapters/index.ts",
+ "./extensions": "./src/extensions/index.ts"
},
"files": [
"src",
@@ -104,5 +153,9 @@
"!src/__tests__",
"!dist/__tests__"
],
- "version": "0.20.0"
+ "version": "0.20.0",
+ "devDependencies": {
+ "@vanilla-extract/vite-plugin": "^5.0.0",
+ "vitest": "3.0.8"
+ }
}
diff --git a/blocksuite/blocks/src/__tests__/adapters/html.unit.spec.ts b/blocksuite/affine/all/src/__tests__/adapters/html.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/adapters/html.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/adapters/html.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/adapters/markdown.unit.spec.ts b/blocksuite/affine/all/src/__tests__/adapters/markdown.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/adapters/markdown.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/adapters/markdown.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/adapters/notion-html.unit.spec.ts b/blocksuite/affine/all/src/__tests__/adapters/notion-html.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/adapters/notion-html.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/adapters/notion-html.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/adapters/notion-text.unit.spec.ts b/blocksuite/affine/all/src/__tests__/adapters/notion-text.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/adapters/notion-text.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/adapters/notion-text.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/adapters/plain-text.unit.spec.ts b/blocksuite/affine/all/src/__tests__/adapters/plain-text.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/adapters/plain-text.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/adapters/plain-text.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/database/database.unit.spec.ts b/blocksuite/affine/all/src/__tests__/database/database.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/database/database.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/database/database.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/database/typesystem.unit.spec.ts b/blocksuite/affine/all/src/__tests__/database/typesystem.unit.spec.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/database/typesystem.unit.spec.ts
rename to blocksuite/affine/all/src/__tests__/database/typesystem.unit.spec.ts
diff --git a/blocksuite/blocks/src/__tests__/utils/create-job.ts b/blocksuite/affine/all/src/__tests__/utils/create-job.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/utils/create-job.ts
rename to blocksuite/affine/all/src/__tests__/utils/create-job.ts
diff --git a/blocksuite/blocks/src/__tests__/utils/get-provider.ts b/blocksuite/affine/all/src/__tests__/utils/get-provider.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/utils/get-provider.ts
rename to blocksuite/affine/all/src/__tests__/utils/get-provider.ts
diff --git a/blocksuite/blocks/src/__tests__/utils/nanoid-replacement.ts b/blocksuite/affine/all/src/__tests__/utils/nanoid-replacement.ts
similarity index 100%
rename from blocksuite/blocks/src/__tests__/utils/nanoid-replacement.ts
rename to blocksuite/affine/all/src/__tests__/utils/nanoid-replacement.ts
diff --git a/blocksuite/blocks/src/adapters/extension.ts b/blocksuite/affine/all/src/adapters/extension.ts
similarity index 100%
rename from blocksuite/blocks/src/adapters/extension.ts
rename to blocksuite/affine/all/src/adapters/extension.ts
diff --git a/blocksuite/blocks/src/adapters/html/block-matcher.ts b/blocksuite/affine/all/src/adapters/html/block-matcher.ts
similarity index 100%
rename from blocksuite/blocks/src/adapters/html/block-matcher.ts
rename to blocksuite/affine/all/src/adapters/html/block-matcher.ts
diff --git a/blocksuite/blocks/src/adapters/index.ts b/blocksuite/affine/all/src/adapters/index.ts
similarity index 100%
rename from blocksuite/blocks/src/adapters/index.ts
rename to blocksuite/affine/all/src/adapters/index.ts
diff --git a/blocksuite/blocks/src/adapters/markdown/block-matcher.ts b/blocksuite/affine/all/src/adapters/markdown/block-matcher.ts
similarity index 100%
rename from blocksuite/blocks/src/adapters/markdown/block-matcher.ts
rename to blocksuite/affine/all/src/adapters/markdown/block-matcher.ts
diff --git a/blocksuite/blocks/src/adapters/notion-html/block-matcher.ts b/blocksuite/affine/all/src/adapters/notion-html/block-matcher.ts
similarity index 100%
rename from blocksuite/blocks/src/adapters/notion-html/block-matcher.ts
rename to blocksuite/affine/all/src/adapters/notion-html/block-matcher.ts
diff --git a/blocksuite/blocks/src/adapters/plain-text/block-matcher.ts b/blocksuite/affine/all/src/adapters/plain-text/block-matcher.ts
similarity index 100%
rename from blocksuite/blocks/src/adapters/plain-text/block-matcher.ts
rename to blocksuite/affine/all/src/adapters/plain-text/block-matcher.ts
diff --git a/blocksuite/affine/all/src/blocks/attachment.ts b/blocksuite/affine/all/src/blocks/attachment.ts
new file mode 100644
index 0000000000..8dd9c0a70b
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/attachment.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-attachment';
diff --git a/blocksuite/affine/all/src/blocks/bookmark.ts b/blocksuite/affine/all/src/blocks/bookmark.ts
new file mode 100644
index 0000000000..bc964dbec6
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/bookmark.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-bookmark';
diff --git a/blocksuite/affine/all/src/blocks/callout.ts b/blocksuite/affine/all/src/blocks/callout.ts
new file mode 100644
index 0000000000..4c281ccbd0
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/callout.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-callout';
diff --git a/blocksuite/affine/all/src/blocks/code.ts b/blocksuite/affine/all/src/blocks/code.ts
new file mode 100644
index 0000000000..46225052d1
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/code.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-code';
diff --git a/blocksuite/affine/all/src/blocks/data-view.ts b/blocksuite/affine/all/src/blocks/data-view.ts
new file mode 100644
index 0000000000..6fd7610199
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/data-view.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-data-view';
diff --git a/blocksuite/affine/all/src/blocks/database.ts b/blocksuite/affine/all/src/blocks/database.ts
new file mode 100644
index 0000000000..ef755b90eb
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/database.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-database';
diff --git a/blocksuite/affine/all/src/blocks/divider.ts b/blocksuite/affine/all/src/blocks/divider.ts
new file mode 100644
index 0000000000..52ad3edef7
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/divider.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-divider';
diff --git a/blocksuite/affine/all/src/blocks/edgeless-text.ts b/blocksuite/affine/all/src/blocks/edgeless-text.ts
new file mode 100644
index 0000000000..3830edfdb9
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/edgeless-text.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-edgeless-text';
diff --git a/blocksuite/affine/all/src/blocks/embed.ts b/blocksuite/affine/all/src/blocks/embed.ts
new file mode 100644
index 0000000000..e2c2a6ab4e
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/embed.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-embed';
diff --git a/blocksuite/affine/all/src/blocks/frame.ts b/blocksuite/affine/all/src/blocks/frame.ts
new file mode 100644
index 0000000000..784f193353
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/frame.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-frame';
diff --git a/blocksuite/affine/all/src/blocks/image.ts b/blocksuite/affine/all/src/blocks/image.ts
new file mode 100644
index 0000000000..6811a74a18
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/image.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-image';
diff --git a/blocksuite/affine/all/src/blocks/index.ts b/blocksuite/affine/all/src/blocks/index.ts
index 741b265f86..51c41d4eee 100644
--- a/blocksuite/affine/all/src/blocks/index.ts
+++ b/blocksuite/affine/all/src/blocks/index.ts
@@ -1 +1,37 @@
-export * from '@blocksuite/blocks';
+export * from '../adapters/index.js';
+export * from '../extensions/index.js';
+export * from '@blocksuite/affine-block-attachment';
+export * from '@blocksuite/affine-block-bookmark';
+export * from '@blocksuite/affine-block-code';
+export * from '@blocksuite/affine-block-data-view';
+export * from '@blocksuite/affine-block-database';
+export * from '@blocksuite/affine-block-divider';
+export * from '@blocksuite/affine-block-edgeless-text';
+export * from '@blocksuite/affine-block-embed';
+export * from '@blocksuite/affine-block-frame';
+export * from '@blocksuite/affine-block-image';
+export * from '@blocksuite/affine-block-latex';
+export * from '@blocksuite/affine-block-list';
+export * from '@blocksuite/affine-block-note';
+export * from '@blocksuite/affine-block-paragraph';
+export * from '@blocksuite/affine-block-root';
+export * from '@blocksuite/affine-block-surface';
+export * from '@blocksuite/affine-block-surface-ref';
+export * from '@blocksuite/affine-block-table';
+export {
+ DocTitle,
+ getDocTitleByEditorHost,
+} from '@blocksuite/affine-fragment-doc-title';
+export * from '@blocksuite/affine-fragment-frame-panel';
+export * from '@blocksuite/affine-fragment-outline';
+export * from '@blocksuite/affine-model';
+export * from '@blocksuite/affine-rich-text';
+export * from '@blocksuite/affine-shared/adapters';
+export * from '@blocksuite/affine-shared/commands';
+export {
+ ViewportTurboRendererExtension,
+ ViewportTurboRendererIdentifier,
+} from '@blocksuite/affine-shared/viewport-renderer';
+export type { DragBlockPayload } from '@blocksuite/affine-widget-drag-handle';
+export * from '@blocksuite/affine-widget-slash-menu';
+export { toolbarWidget } from '@blocksuite/affine-widget-toolbar';
diff --git a/blocksuite/affine/all/src/blocks/latex.ts b/blocksuite/affine/all/src/blocks/latex.ts
new file mode 100644
index 0000000000..67d31882ab
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/latex.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-latex';
diff --git a/blocksuite/affine/all/src/blocks/list.ts b/blocksuite/affine/all/src/blocks/list.ts
new file mode 100644
index 0000000000..8e4a7de69a
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/list.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-list';
diff --git a/blocksuite/affine/all/src/blocks/note.ts b/blocksuite/affine/all/src/blocks/note.ts
new file mode 100644
index 0000000000..e93e41159a
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/note.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-note';
diff --git a/blocksuite/affine/all/src/blocks/paragraph.ts b/blocksuite/affine/all/src/blocks/paragraph.ts
new file mode 100644
index 0000000000..169b4c3e5f
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/paragraph.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-paragraph';
diff --git a/blocksuite/affine/all/src/blocks/root.ts b/blocksuite/affine/all/src/blocks/root.ts
new file mode 100644
index 0000000000..409d27ed45
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/root.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-root';
diff --git a/blocksuite/affine/all/src/blocks/schemas.ts b/blocksuite/affine/all/src/blocks/schemas.ts
deleted file mode 100644
index 6412423790..0000000000
--- a/blocksuite/affine/all/src/blocks/schemas.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from '@blocksuite/blocks/schemas';
diff --git a/blocksuite/affine/all/src/blocks/surface-ref.ts b/blocksuite/affine/all/src/blocks/surface-ref.ts
new file mode 100644
index 0000000000..9fcc7147b4
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/surface-ref.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-surface-ref';
diff --git a/blocksuite/affine/all/src/blocks/surface.ts b/blocksuite/affine/all/src/blocks/surface.ts
new file mode 100644
index 0000000000..a13c8619af
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/surface.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-surface';
diff --git a/blocksuite/affine/all/src/blocks/table.ts b/blocksuite/affine/all/src/blocks/table.ts
new file mode 100644
index 0000000000..da648e7f1d
--- /dev/null
+++ b/blocksuite/affine/all/src/blocks/table.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-block-table';
diff --git a/blocksuite/affine/all/src/components/block-selection.ts b/blocksuite/affine/all/src/components/block-selection.ts
new file mode 100644
index 0000000000..6f1f30da28
--- /dev/null
+++ b/blocksuite/affine/all/src/components/block-selection.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/block-selection';
diff --git a/blocksuite/affine/all/src/components/block-zero-width.ts b/blocksuite/affine/all/src/components/block-zero-width.ts
new file mode 100644
index 0000000000..0176cdb2b6
--- /dev/null
+++ b/blocksuite/affine/all/src/components/block-zero-width.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/block-zero-width';
diff --git a/blocksuite/affine/all/src/components/caption.ts b/blocksuite/affine/all/src/components/caption.ts
new file mode 100644
index 0000000000..454a043513
--- /dev/null
+++ b/blocksuite/affine/all/src/components/caption.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/caption';
diff --git a/blocksuite/affine/all/src/components/card-style-dropdown-menu.ts b/blocksuite/affine/all/src/components/card-style-dropdown-menu.ts
new file mode 100644
index 0000000000..74492d0c80
--- /dev/null
+++ b/blocksuite/affine/all/src/components/card-style-dropdown-menu.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/card-style-dropdown-menu';
diff --git a/blocksuite/affine/all/src/components/color-picker.ts b/blocksuite/affine/all/src/components/color-picker.ts
new file mode 100644
index 0000000000..56dfe75263
--- /dev/null
+++ b/blocksuite/affine/all/src/components/color-picker.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/color-picker';
diff --git a/blocksuite/affine/all/src/components/context-menu.ts b/blocksuite/affine/all/src/components/context-menu.ts
new file mode 100644
index 0000000000..2072f43cb9
--- /dev/null
+++ b/blocksuite/affine/all/src/components/context-menu.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/context-menu';
diff --git a/blocksuite/affine/all/src/components/date-picker.ts b/blocksuite/affine/all/src/components/date-picker.ts
new file mode 100644
index 0000000000..2259df8d51
--- /dev/null
+++ b/blocksuite/affine/all/src/components/date-picker.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/date-picker';
diff --git a/blocksuite/affine/all/src/components/drop-indicator.ts b/blocksuite/affine/all/src/components/drop-indicator.ts
new file mode 100644
index 0000000000..cbab3ce043
--- /dev/null
+++ b/blocksuite/affine/all/src/components/drop-indicator.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/drop-indicator';
diff --git a/blocksuite/affine/all/src/components/embed-card-modal.ts b/blocksuite/affine/all/src/components/embed-card-modal.ts
new file mode 100644
index 0000000000..52cd10c44e
--- /dev/null
+++ b/blocksuite/affine/all/src/components/embed-card-modal.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/embed-card-modal';
diff --git a/blocksuite/affine/all/src/components/filterable-list.ts b/blocksuite/affine/all/src/components/filterable-list.ts
new file mode 100644
index 0000000000..dd28e8b05c
--- /dev/null
+++ b/blocksuite/affine/all/src/components/filterable-list.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/filterable-list';
diff --git a/blocksuite/affine/all/src/components/highlight-dropdown-menu.ts b/blocksuite/affine/all/src/components/highlight-dropdown-menu.ts
new file mode 100644
index 0000000000..fdbb9bb845
--- /dev/null
+++ b/blocksuite/affine/all/src/components/highlight-dropdown-menu.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/highlight-dropdown-menu';
diff --git a/blocksuite/affine/all/src/components/hover.ts b/blocksuite/affine/all/src/components/hover.ts
new file mode 100644
index 0000000000..3ba22fc0ea
--- /dev/null
+++ b/blocksuite/affine/all/src/components/hover.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/hover';
diff --git a/blocksuite/affine/all/src/components/icon-button.ts b/blocksuite/affine/all/src/components/icon-button.ts
new file mode 100644
index 0000000000..396a3bc8ca
--- /dev/null
+++ b/blocksuite/affine/all/src/components/icon-button.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/icon-button';
diff --git a/blocksuite/affine/all/src/components/icons.ts b/blocksuite/affine/all/src/components/icons.ts
new file mode 100644
index 0000000000..f8696ca4d5
--- /dev/null
+++ b/blocksuite/affine/all/src/components/icons.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/icons';
diff --git a/blocksuite/affine/all/src/components/link-preview.ts b/blocksuite/affine/all/src/components/link-preview.ts
new file mode 100644
index 0000000000..f059fe0747
--- /dev/null
+++ b/blocksuite/affine/all/src/components/link-preview.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/link-preview';
diff --git a/blocksuite/affine/all/src/components/linked-doc-title.ts b/blocksuite/affine/all/src/components/linked-doc-title.ts
new file mode 100644
index 0000000000..d7bf24b23a
--- /dev/null
+++ b/blocksuite/affine/all/src/components/linked-doc-title.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/linked-doc-title';
diff --git a/blocksuite/affine/all/src/components/notification.ts b/blocksuite/affine/all/src/components/notification.ts
new file mode 100644
index 0000000000..d14e335d5f
--- /dev/null
+++ b/blocksuite/affine/all/src/components/notification.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/notification';
diff --git a/blocksuite/affine/all/src/components/peek.ts b/blocksuite/affine/all/src/components/peek.ts
new file mode 100644
index 0000000000..5889015892
--- /dev/null
+++ b/blocksuite/affine/all/src/components/peek.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/peek';
diff --git a/blocksuite/affine/all/src/components/portal.ts b/blocksuite/affine/all/src/components/portal.ts
new file mode 100644
index 0000000000..a56596b7bf
--- /dev/null
+++ b/blocksuite/affine/all/src/components/portal.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/portal';
diff --git a/blocksuite/affine/all/src/components/smooth-corner.ts b/blocksuite/affine/all/src/components/smooth-corner.ts
new file mode 100644
index 0000000000..8d01174ec4
--- /dev/null
+++ b/blocksuite/affine/all/src/components/smooth-corner.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/smooth-corner';
diff --git a/blocksuite/affine/all/src/components/toast.ts b/blocksuite/affine/all/src/components/toast.ts
new file mode 100644
index 0000000000..ec81a19d7a
--- /dev/null
+++ b/blocksuite/affine/all/src/components/toast.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/toast';
diff --git a/blocksuite/affine/all/src/components/toggle-button.ts b/blocksuite/affine/all/src/components/toggle-button.ts
new file mode 100644
index 0000000000..001034d820
--- /dev/null
+++ b/blocksuite/affine/all/src/components/toggle-button.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/toggle-button';
diff --git a/blocksuite/affine/all/src/components/toggle-switch.ts b/blocksuite/affine/all/src/components/toggle-switch.ts
new file mode 100644
index 0000000000..083697dbc2
--- /dev/null
+++ b/blocksuite/affine/all/src/components/toggle-switch.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/toggle-switch';
diff --git a/blocksuite/affine/all/src/components/toolbar.ts b/blocksuite/affine/all/src/components/toolbar.ts
new file mode 100644
index 0000000000..d2e686866a
--- /dev/null
+++ b/blocksuite/affine/all/src/components/toolbar.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/toolbar';
diff --git a/blocksuite/affine/all/src/components/view-dropdown-menu.ts b/blocksuite/affine/all/src/components/view-dropdown-menu.ts
new file mode 100644
index 0000000000..60ae3d6bf3
--- /dev/null
+++ b/blocksuite/affine/all/src/components/view-dropdown-menu.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-components/view-dropdown-menu';
diff --git a/blocksuite/affine/all/src/data-view/effects.ts b/blocksuite/affine/all/src/data-view/effects.ts
new file mode 100644
index 0000000000..b29ebef058
--- /dev/null
+++ b/blocksuite/affine/all/src/data-view/effects.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/data-view/effects';
diff --git a/blocksuite/affine/all/src/data-view/index.ts b/blocksuite/affine/all/src/data-view/index.ts
new file mode 100644
index 0000000000..112e65c147
--- /dev/null
+++ b/blocksuite/affine/all/src/data-view/index.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/data-view';
diff --git a/blocksuite/affine/all/src/effects.ts b/blocksuite/affine/all/src/effects.ts
index 7b0f858dc0..d2696d7596 100644
--- a/blocksuite/affine/all/src/effects.ts
+++ b/blocksuite/affine/all/src/effects.ts
@@ -1,5 +1,167 @@
-import { effects as blocksEffects } from '@blocksuite/blocks/effects';
+import { effects as blockAttachmentEffects } from '@blocksuite/affine-block-attachment/effects';
+import { effects as blockBookmarkEffects } from '@blocksuite/affine-block-bookmark/effects';
+import { effects as blockCalloutEffects } from '@blocksuite/affine-block-callout/effects';
+import { effects as blockCodeEffects } from '@blocksuite/affine-block-code/effects';
+import { effects as blockDataViewEffects } from '@blocksuite/affine-block-data-view/effects';
+import { effects as blockDatabaseEffects } from '@blocksuite/affine-block-database/effects';
+import { effects as blockDividerEffects } from '@blocksuite/affine-block-divider/effects';
+import { effects as blockEdgelessTextEffects } from '@blocksuite/affine-block-edgeless-text/effects';
+import { effects as blockEmbedEffects } from '@blocksuite/affine-block-embed/effects';
+import { effects as blockFrameEffects } from '@blocksuite/affine-block-frame/effects';
+import { effects as blockImageEffects } from '@blocksuite/affine-block-image/effects';
+import { effects as blockLatexEffects } from '@blocksuite/affine-block-latex/effects';
+import { effects as blockListEffects } from '@blocksuite/affine-block-list/effects';
+import { effects as blockNoteEffects } from '@blocksuite/affine-block-note/effects';
+import { effects as blockParagraphEffects } from '@blocksuite/affine-block-paragraph/effects';
+import { effects as blockRootEffects } from '@blocksuite/affine-block-root/effects';
+import { effects as blockSurfaceEffects } from '@blocksuite/affine-block-surface/effects';
+import { effects as blockSurfaceRefEffects } from '@blocksuite/affine-block-surface-ref/effects';
+import { effects as blockTableEffects } from '@blocksuite/affine-block-table/effects';
+import { BlockSelection } from '@blocksuite/affine-components/block-selection';
+import { BlockZeroWidth } from '@blocksuite/affine-components/block-zero-width';
+import { effects as componentCaptionEffects } from '@blocksuite/affine-components/caption';
+import { effects as componentCardStyleDropdownMenuEffects } from '@blocksuite/affine-components/card-style-dropdown-menu';
+import { effects as componentColorPickerEffects } from '@blocksuite/affine-components/color-picker';
+import { effects as componentContextMenuEffects } from '@blocksuite/affine-components/context-menu';
+import { effects as componentDatePickerEffects } from '@blocksuite/affine-components/date-picker';
+import { effects as componentDropIndicatorEffects } from '@blocksuite/affine-components/drop-indicator';
+import { effects as componentEmbedCardModalEffects } from '@blocksuite/affine-components/embed-card-modal';
+import { FilterableListComponent } from '@blocksuite/affine-components/filterable-list';
+import { effects as componentHighlightDropdownMenuEffects } from '@blocksuite/affine-components/highlight-dropdown-menu';
+import { IconButton } from '@blocksuite/affine-components/icon-button';
+import { effects as componentLinkPreviewEffects } from '@blocksuite/affine-components/link-preview';
+import { effects as componentLinkedDocTitleEffects } from '@blocksuite/affine-components/linked-doc-title';
+import { effects as componentPortalEffects } from '@blocksuite/affine-components/portal';
+import { SmoothCorner } from '@blocksuite/affine-components/smooth-corner';
+import { effects as componentToggleButtonEffects } from '@blocksuite/affine-components/toggle-button';
+import { ToggleSwitch } from '@blocksuite/affine-components/toggle-switch';
+import { effects as componentToolbarEffects } from '@blocksuite/affine-components/toolbar';
+import { effects as componentViewDropdownMenuEffects } from '@blocksuite/affine-components/view-dropdown-menu';
+import { effects as fragmentDocTitleEffects } from '@blocksuite/affine-fragment-doc-title/effects';
+import { effects as fragmentFramePanelEffects } from '@blocksuite/affine-fragment-frame-panel/effects';
+import { effects as fragmentOutlineEffects } from '@blocksuite/affine-fragment-outline/effects';
+import { effects as richTextEffects } from '@blocksuite/affine-rich-text/effects';
+import { effects as widgetDragHandleEffects } from '@blocksuite/affine-widget-drag-handle/effects';
+import { effects as widgetEdgelessAutoConnectEffects } from '@blocksuite/affine-widget-edgeless-auto-connect/effects';
+import { effects as widgetFrameTitleEffects } from '@blocksuite/affine-widget-frame-title/effects';
+import { effects as widgetRemoteSelectionEffects } from '@blocksuite/affine-widget-remote-selection/effects';
+import { effects as widgetScrollAnchoringEffects } from '@blocksuite/affine-widget-scroll-anchoring/effects';
+import { effects as widgetSlashMenuEffects } from '@blocksuite/affine-widget-slash-menu/effects';
+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
+ | typeof blockAttachmentEffects
+ | typeof blockBookmarkEffects
+ | typeof blockFrameEffects
+ | typeof blockListEffects
+ | typeof blockParagraphEffects
+ | typeof blockEmbedEffects
+ | typeof blockSurfaceEffects
+ | typeof blockImageEffects
+ | typeof blockDatabaseEffects
+ | typeof blockSurfaceRefEffects
+ | typeof blockLatexEffects
+ | typeof blockEdgelessTextEffects
+ | typeof blockDividerEffects
+ | typeof blockDataViewEffects
+ | typeof blockCodeEffects
+ | typeof blockTableEffects
+ | typeof blockRootEffects
+ | typeof blockCalloutEffects
+ | typeof componentCaptionEffects
+ | typeof componentContextMenuEffects
+ | typeof componentDatePickerEffects
+ | typeof componentDropIndicatorEffects
+ | typeof componentEmbedCardModalEffects
+ | typeof componentHighlightDropdownMenuEffects
+ | typeof componentLinkPreviewEffects
+ | typeof componentLinkedDocTitleEffects
+ | typeof componentPortalEffects
+ | typeof componentToolbarEffects
+ | typeof componentToggleButtonEffects
+ | typeof componentColorPickerEffects
+ | typeof componentViewDropdownMenuEffects
+ | typeof widgetScrollAnchoringEffects
+ | typeof widgetFrameTitleEffects
+ | typeof widgetRemoteSelectionEffects
+ | typeof widgetDragHandleEffects
+ | typeof widgetEdgelessAutoConnectEffects
+ | typeof widgetToolbarEffects
+ | typeof widgetSlashMenuEffects
+ | typeof fragmentDocTitleEffects
+ | typeof fragmentFramePanelEffects
+ | typeof fragmentOutlineEffects;
export function effects() {
- blocksEffects();
+ registerSpecs();
+
+ stdEffects();
+ inlineEffects();
+
+ dataViewEffects();
+ richTextEffects();
+
+ blockNoteEffects();
+ blockAttachmentEffects();
+ blockBookmarkEffects();
+ blockFrameEffects();
+ blockListEffects();
+ blockParagraphEffects();
+ blockEmbedEffects();
+ blockSurfaceEffects();
+ blockImageEffects();
+ blockDatabaseEffects();
+ blockSurfaceRefEffects();
+ blockLatexEffects();
+ blockEdgelessTextEffects();
+ blockDividerEffects();
+ blockDataViewEffects();
+ blockCodeEffects();
+ blockTableEffects();
+ blockRootEffects();
+ blockCalloutEffects();
+
+ componentCaptionEffects();
+ componentContextMenuEffects();
+ componentDatePickerEffects();
+ componentPortalEffects();
+ componentToolbarEffects();
+ componentDropIndicatorEffects();
+ componentToggleButtonEffects();
+ componentColorPickerEffects();
+ componentEmbedCardModalEffects();
+ componentLinkPreviewEffects();
+ componentLinkedDocTitleEffects();
+ componentCardStyleDropdownMenuEffects();
+ componentHighlightDropdownMenuEffects();
+ componentViewDropdownMenuEffects();
+
+ widgetScrollAnchoringEffects();
+ widgetFrameTitleEffects();
+ widgetRemoteSelectionEffects();
+ widgetDragHandleEffects();
+ widgetEdgelessAutoConnectEffects();
+ widgetSlashMenuEffects();
+ widgetToolbarEffects();
+
+ fragmentDocTitleEffects();
+ fragmentFramePanelEffects();
+ fragmentOutlineEffects();
+
+ customElements.define('icon-button', IconButton);
+ customElements.define('smooth-corner', SmoothCorner);
+ customElements.define('toggle-switch', ToggleSwitch);
+ customElements.define('affine-filterable-list', FilterableListComponent);
+ customElements.define('block-zero-width', BlockZeroWidth);
+ customElements.define('affine-block-selection', BlockSelection);
}
diff --git a/blocksuite/blocks/src/extensions/common.ts b/blocksuite/affine/all/src/extensions/common.ts
similarity index 100%
rename from blocksuite/blocks/src/extensions/common.ts
rename to blocksuite/affine/all/src/extensions/common.ts
diff --git a/blocksuite/blocks/src/extensions/editor-specs.ts b/blocksuite/affine/all/src/extensions/editor-specs.ts
similarity index 100%
rename from blocksuite/blocks/src/extensions/editor-specs.ts
rename to blocksuite/affine/all/src/extensions/editor-specs.ts
diff --git a/blocksuite/blocks/src/extensions/index.ts b/blocksuite/affine/all/src/extensions/index.ts
similarity index 100%
rename from blocksuite/blocks/src/extensions/index.ts
rename to blocksuite/affine/all/src/extensions/index.ts
diff --git a/blocksuite/blocks/src/extensions/preview-specs.ts b/blocksuite/affine/all/src/extensions/preview-specs.ts
similarity index 100%
rename from blocksuite/blocks/src/extensions/preview-specs.ts
rename to blocksuite/affine/all/src/extensions/preview-specs.ts
diff --git a/blocksuite/blocks/src/extensions/register.ts b/blocksuite/affine/all/src/extensions/register.ts
similarity index 100%
rename from blocksuite/blocks/src/extensions/register.ts
rename to blocksuite/affine/all/src/extensions/register.ts
diff --git a/blocksuite/blocks/src/extensions/store.ts b/blocksuite/affine/all/src/extensions/store.ts
similarity index 100%
rename from blocksuite/blocks/src/extensions/store.ts
rename to blocksuite/affine/all/src/extensions/store.ts
diff --git a/blocksuite/affine/all/src/fragments/doc-title.ts b/blocksuite/affine/all/src/fragments/doc-title.ts
new file mode 100644
index 0000000000..2426095072
--- /dev/null
+++ b/blocksuite/affine/all/src/fragments/doc-title.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-fragment-doc-title';
diff --git a/blocksuite/affine/all/src/fragments/frame-panel.ts b/blocksuite/affine/all/src/fragments/frame-panel.ts
new file mode 100644
index 0000000000..1f1fb52c93
--- /dev/null
+++ b/blocksuite/affine/all/src/fragments/frame-panel.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-fragment-frame-panel';
diff --git a/blocksuite/affine/all/src/fragments/outline.ts b/blocksuite/affine/all/src/fragments/outline.ts
new file mode 100644
index 0000000000..695fdd5ecb
--- /dev/null
+++ b/blocksuite/affine/all/src/fragments/outline.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-fragment-outline';
diff --git a/blocksuite/affine/all/src/inline/effects.ts b/blocksuite/affine/all/src/inline/effects.ts
new file mode 100644
index 0000000000..216bdcc26c
--- /dev/null
+++ b/blocksuite/affine/all/src/inline/effects.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/inline/effects';
diff --git a/blocksuite/affine/all/src/model/index.ts b/blocksuite/affine/all/src/model/index.ts
new file mode 100644
index 0000000000..d853fae6f3
--- /dev/null
+++ b/blocksuite/affine/all/src/model/index.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-model';
diff --git a/blocksuite/affine/all/src/rich-text/effects.ts b/blocksuite/affine/all/src/rich-text/effects.ts
new file mode 100644
index 0000000000..a0d98574aa
--- /dev/null
+++ b/blocksuite/affine/all/src/rich-text/effects.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-rich-text/effects';
diff --git a/blocksuite/affine/all/src/rich-text/index.ts b/blocksuite/affine/all/src/rich-text/index.ts
new file mode 100644
index 0000000000..e4cfc09f5d
--- /dev/null
+++ b/blocksuite/affine/all/src/rich-text/index.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-rich-text';
diff --git a/blocksuite/blocks/src/schemas.ts b/blocksuite/affine/all/src/schemas.ts
similarity index 100%
rename from blocksuite/blocks/src/schemas.ts
rename to blocksuite/affine/all/src/schemas.ts
diff --git a/blocksuite/affine/all/src/shared/adapters.ts b/blocksuite/affine/all/src/shared/adapters.ts
new file mode 100644
index 0000000000..47e42e0e26
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/adapters.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/adapters';
diff --git a/blocksuite/affine/all/src/shared/commands.ts b/blocksuite/affine/all/src/shared/commands.ts
new file mode 100644
index 0000000000..9e27afd23f
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/commands.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/commands';
diff --git a/blocksuite/affine/all/src/shared/consts.ts b/blocksuite/affine/all/src/shared/consts.ts
new file mode 100644
index 0000000000..67201234c0
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/consts.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/consts';
diff --git a/blocksuite/affine/all/src/shared/selection.ts b/blocksuite/affine/all/src/shared/selection.ts
new file mode 100644
index 0000000000..3a9636edff
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/selection.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/selection';
diff --git a/blocksuite/affine/all/src/shared/services.ts b/blocksuite/affine/all/src/shared/services.ts
new file mode 100644
index 0000000000..c1f17a1690
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/services.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/services';
diff --git a/blocksuite/affine/all/src/shared/styles.ts b/blocksuite/affine/all/src/shared/styles.ts
new file mode 100644
index 0000000000..b5078ffcf4
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/styles.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/styles';
diff --git a/blocksuite/affine/all/src/shared/theme.ts b/blocksuite/affine/all/src/shared/theme.ts
new file mode 100644
index 0000000000..d168fd8553
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/theme.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/theme';
diff --git a/blocksuite/affine/all/src/shared/types.ts b/blocksuite/affine/all/src/shared/types.ts
new file mode 100644
index 0000000000..2d611c1042
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/types.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/types';
diff --git a/blocksuite/affine/all/src/shared/utils.ts b/blocksuite/affine/all/src/shared/utils.ts
new file mode 100644
index 0000000000..39a12eb144
--- /dev/null
+++ b/blocksuite/affine/all/src/shared/utils.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-shared/utils';
diff --git a/blocksuite/affine/all/src/store/test.ts b/blocksuite/affine/all/src/store/test.ts
index e74a4b8464..c8cd2daa21 100644
--- a/blocksuite/affine/all/src/store/test.ts
+++ b/blocksuite/affine/all/src/store/test.ts
@@ -1,6 +1 @@
-export {
- createAutoIncrementIdGenerator,
- TestDoc,
- TestMeta,
- TestWorkspace,
-} from '@blocksuite/store/test';
+export * from '@blocksuite/store/test';
diff --git a/blocksuite/affine/all/src/widgets/drag-handle.ts b/blocksuite/affine/all/src/widgets/drag-handle.ts
new file mode 100644
index 0000000000..3a0a5fdbd6
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/drag-handle.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-drag-handle';
diff --git a/blocksuite/affine/all/src/widgets/edgeless-auto-connect.ts b/blocksuite/affine/all/src/widgets/edgeless-auto-connect.ts
new file mode 100644
index 0000000000..5db8f28636
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/edgeless-auto-connect.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-edgeless-auto-connect';
diff --git a/blocksuite/affine/all/src/widgets/frame-title.ts b/blocksuite/affine/all/src/widgets/frame-title.ts
new file mode 100644
index 0000000000..39bd009dfe
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/frame-title.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-frame-title';
diff --git a/blocksuite/affine/all/src/widgets/remote-selection.ts b/blocksuite/affine/all/src/widgets/remote-selection.ts
new file mode 100644
index 0000000000..865d4c4130
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/remote-selection.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-remote-selection';
diff --git a/blocksuite/affine/all/src/widgets/scroll-anchoring.ts b/blocksuite/affine/all/src/widgets/scroll-anchoring.ts
new file mode 100644
index 0000000000..25ef1818b3
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/scroll-anchoring.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-scroll-anchoring';
diff --git a/blocksuite/affine/all/src/widgets/slash-menu.ts b/blocksuite/affine/all/src/widgets/slash-menu.ts
new file mode 100644
index 0000000000..b36d5d9283
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/slash-menu.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-slash-menu';
diff --git a/blocksuite/affine/all/src/widgets/toolbar.ts b/blocksuite/affine/all/src/widgets/toolbar.ts
new file mode 100644
index 0000000000..2ec4ae155a
--- /dev/null
+++ b/blocksuite/affine/all/src/widgets/toolbar.ts
@@ -0,0 +1 @@
+export * from '@blocksuite/affine-widget-toolbar';
diff --git a/blocksuite/affine/all/tsconfig.json b/blocksuite/affine/all/tsconfig.json
index c4942ed329..e17dc06db0 100644
--- a/blocksuite/affine/all/tsconfig.json
+++ b/blocksuite/affine/all/tsconfig.json
@@ -7,8 +7,41 @@
},
"include": ["./src"],
"references": [
+ { "path": "../blocks/block-attachment" },
+ { "path": "../blocks/block-bookmark" },
+ { "path": "../blocks/block-callout" },
+ { "path": "../blocks/block-code" },
+ { "path": "../blocks/block-data-view" },
+ { "path": "../blocks/block-database" },
+ { "path": "../blocks/block-divider" },
+ { "path": "../blocks/block-edgeless-text" },
+ { "path": "../blocks/block-embed" },
+ { "path": "../blocks/block-frame" },
+ { "path": "../blocks/block-image" },
+ { "path": "../blocks/block-latex" },
+ { "path": "../blocks/block-list" },
+ { "path": "../blocks/block-note" },
+ { "path": "../blocks/block-paragraph" },
+ { "path": "../blocks/block-root" },
+ { "path": "../blocks/block-surface" },
+ { "path": "../blocks/block-surface-ref" },
+ { "path": "../blocks/block-table" },
+ { "path": "../components" },
+ { "path": "../fragments/fragment-doc-title" },
+ { "path": "../fragments/fragment-frame-panel" },
+ { "path": "../fragments/fragment-outline" },
+ { "path": "../model" },
+ { "path": "../rich-text" },
+ { "path": "../shared" },
+ { "path": "../widgets/widget-drag-handle" },
+ { "path": "../widgets/widget-edgeless-auto-connect" },
+ { "path": "../widgets/widget-frame-title" },
+ { "path": "../widgets/widget-remote-selection" },
+ { "path": "../widgets/widget-scroll-anchoring" },
+ { "path": "../widgets/widget-slash-menu" },
+ { "path": "../widgets/widget-toolbar" },
{ "path": "../../framework/block-std" },
- { "path": "../../blocks" },
+ { "path": "../data-view" },
{ "path": "../../framework/global" },
{ "path": "../../framework/inline" },
{ "path": "../../framework/store" },
diff --git a/blocksuite/blocks/vitest.config.ts b/blocksuite/affine/all/vitest.config.ts
similarity index 83%
rename from blocksuite/blocks/vitest.config.ts
rename to blocksuite/affine/all/vitest.config.ts
index 17d08476b6..c2625c985b 100644
--- a/blocksuite/blocks/vitest.config.ts
+++ b/blocksuite/affine/all/vitest.config.ts
@@ -7,13 +7,13 @@ export default defineConfig({
},
plugins: [vanillaExtractPlugin()],
test: {
- globalSetup: '../../scripts/vitest-global.js',
+ globalSetup: '../../../scripts/vitest-global.js',
include: ['src/__tests__/**/*.unit.spec.ts'],
testTimeout: 1000,
coverage: {
provider: 'istanbul', // or 'c8'
reporter: ['lcov'],
- reportsDirectory: '../../.coverage/blocks',
+ reportsDirectory: '../../../.coverage/blocksuite-affine',
},
/**
* Custom handler for console.log in tests.
@@ -22,7 +22,7 @@ export default defineConfig({
*/
onConsoleLog(log, type) {
if (
- log.includes('https://lit.dev/msg/dev-mode') ||
+ log.includes('lit.dev/msg/dev-mode') ||
log.includes(
`KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`
)
diff --git a/blocksuite/blocks/README.md b/blocksuite/blocks/README.md
deleted file mode 100644
index cf80a0cb39..0000000000
--- a/blocksuite/blocks/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# `@blocksuite/blocks`
-
-Default BlockSuite editable blocks. Used in [AFFiNE](https://affine.pro/).
-
-## Documentation
-
-Checkout [blocksuite.io](https://blocksuite.io/) for comprehensive documentation.
diff --git a/blocksuite/blocks/package.json b/blocksuite/blocks/package.json
deleted file mode 100644
index d115ada62b..0000000000
--- a/blocksuite/blocks/package.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "name": "@blocksuite/blocks",
- "description": "Default BlockSuite editable blocks.",
- "type": "module",
- "scripts": {
- "build": "tsc",
- "test:unit": "nx vite:test --run",
- "test:unit:coverage": "nx vite:test --run --coverage",
- "test:e2e": "playwright test",
- "test": "yarn test:unit && yarn test:e2e"
- },
- "sideEffects": false,
- "keywords": [],
- "author": "toeverything",
- "license": "MIT",
- "dependencies": {
- "@blocksuite/affine-block-attachment": "workspace:*",
- "@blocksuite/affine-block-bookmark": "workspace:*",
- "@blocksuite/affine-block-callout": "workspace:*",
- "@blocksuite/affine-block-code": "workspace:*",
- "@blocksuite/affine-block-data-view": "workspace:*",
- "@blocksuite/affine-block-database": "workspace:*",
- "@blocksuite/affine-block-divider": "workspace:*",
- "@blocksuite/affine-block-edgeless-text": "workspace:*",
- "@blocksuite/affine-block-embed": "workspace:*",
- "@blocksuite/affine-block-frame": "workspace:*",
- "@blocksuite/affine-block-image": "workspace:*",
- "@blocksuite/affine-block-latex": "workspace:*",
- "@blocksuite/affine-block-list": "workspace:*",
- "@blocksuite/affine-block-note": "workspace:*",
- "@blocksuite/affine-block-paragraph": "workspace:*",
- "@blocksuite/affine-block-root": "workspace:*",
- "@blocksuite/affine-block-surface": "workspace:*",
- "@blocksuite/affine-block-surface-ref": "workspace:*",
- "@blocksuite/affine-block-table": "workspace:*",
- "@blocksuite/affine-components": "workspace:*",
- "@blocksuite/affine-fragment-doc-title": "workspace:*",
- "@blocksuite/affine-fragment-frame-panel": "workspace:*",
- "@blocksuite/affine-fragment-outline": "workspace:*",
- "@blocksuite/affine-model": "workspace:*",
- "@blocksuite/affine-rich-text": "workspace:*",
- "@blocksuite/affine-shared": "workspace:*",
- "@blocksuite/affine-widget-drag-handle": "workspace:*",
- "@blocksuite/affine-widget-edgeless-auto-connect": "workspace:*",
- "@blocksuite/affine-widget-frame-title": "workspace:*",
- "@blocksuite/affine-widget-remote-selection": "workspace:*",
- "@blocksuite/affine-widget-scroll-anchoring": "workspace:*",
- "@blocksuite/affine-widget-slash-menu": "workspace:*",
- "@blocksuite/affine-widget-toolbar": "workspace:*",
- "@blocksuite/block-std": "workspace:*",
- "@blocksuite/data-view": "workspace:*",
- "@blocksuite/global": "workspace:*",
- "@blocksuite/icons": "^2.2.1",
- "@blocksuite/inline": "workspace:*",
- "@blocksuite/store": "workspace:*"
- },
- "exports": {
- ".": "./src/index.ts",
- "./schemas": "./src/schemas.ts",
- "./effects": "./src/effects.ts"
- },
- "files": [
- "src",
- "dist",
- "!src/__tests__",
- "!dist/__tests__"
- ],
- "devDependencies": {
- "@vanilla-extract/vite-plugin": "^5.0.0",
- "vitest": "3.0.8"
- },
- "version": "0.20.0"
-}
diff --git a/blocksuite/blocks/src/effects.ts b/blocksuite/blocks/src/effects.ts
deleted file mode 100644
index d2696d7596..0000000000
--- a/blocksuite/blocks/src/effects.ts
+++ /dev/null
@@ -1,167 +0,0 @@
-import { effects as blockAttachmentEffects } from '@blocksuite/affine-block-attachment/effects';
-import { effects as blockBookmarkEffects } from '@blocksuite/affine-block-bookmark/effects';
-import { effects as blockCalloutEffects } from '@blocksuite/affine-block-callout/effects';
-import { effects as blockCodeEffects } from '@blocksuite/affine-block-code/effects';
-import { effects as blockDataViewEffects } from '@blocksuite/affine-block-data-view/effects';
-import { effects as blockDatabaseEffects } from '@blocksuite/affine-block-database/effects';
-import { effects as blockDividerEffects } from '@blocksuite/affine-block-divider/effects';
-import { effects as blockEdgelessTextEffects } from '@blocksuite/affine-block-edgeless-text/effects';
-import { effects as blockEmbedEffects } from '@blocksuite/affine-block-embed/effects';
-import { effects as blockFrameEffects } from '@blocksuite/affine-block-frame/effects';
-import { effects as blockImageEffects } from '@blocksuite/affine-block-image/effects';
-import { effects as blockLatexEffects } from '@blocksuite/affine-block-latex/effects';
-import { effects as blockListEffects } from '@blocksuite/affine-block-list/effects';
-import { effects as blockNoteEffects } from '@blocksuite/affine-block-note/effects';
-import { effects as blockParagraphEffects } from '@blocksuite/affine-block-paragraph/effects';
-import { effects as blockRootEffects } from '@blocksuite/affine-block-root/effects';
-import { effects as blockSurfaceEffects } from '@blocksuite/affine-block-surface/effects';
-import { effects as blockSurfaceRefEffects } from '@blocksuite/affine-block-surface-ref/effects';
-import { effects as blockTableEffects } from '@blocksuite/affine-block-table/effects';
-import { BlockSelection } from '@blocksuite/affine-components/block-selection';
-import { BlockZeroWidth } from '@blocksuite/affine-components/block-zero-width';
-import { effects as componentCaptionEffects } from '@blocksuite/affine-components/caption';
-import { effects as componentCardStyleDropdownMenuEffects } from '@blocksuite/affine-components/card-style-dropdown-menu';
-import { effects as componentColorPickerEffects } from '@blocksuite/affine-components/color-picker';
-import { effects as componentContextMenuEffects } from '@blocksuite/affine-components/context-menu';
-import { effects as componentDatePickerEffects } from '@blocksuite/affine-components/date-picker';
-import { effects as componentDropIndicatorEffects } from '@blocksuite/affine-components/drop-indicator';
-import { effects as componentEmbedCardModalEffects } from '@blocksuite/affine-components/embed-card-modal';
-import { FilterableListComponent } from '@blocksuite/affine-components/filterable-list';
-import { effects as componentHighlightDropdownMenuEffects } from '@blocksuite/affine-components/highlight-dropdown-menu';
-import { IconButton } from '@blocksuite/affine-components/icon-button';
-import { effects as componentLinkPreviewEffects } from '@blocksuite/affine-components/link-preview';
-import { effects as componentLinkedDocTitleEffects } from '@blocksuite/affine-components/linked-doc-title';
-import { effects as componentPortalEffects } from '@blocksuite/affine-components/portal';
-import { SmoothCorner } from '@blocksuite/affine-components/smooth-corner';
-import { effects as componentToggleButtonEffects } from '@blocksuite/affine-components/toggle-button';
-import { ToggleSwitch } from '@blocksuite/affine-components/toggle-switch';
-import { effects as componentToolbarEffects } from '@blocksuite/affine-components/toolbar';
-import { effects as componentViewDropdownMenuEffects } from '@blocksuite/affine-components/view-dropdown-menu';
-import { effects as fragmentDocTitleEffects } from '@blocksuite/affine-fragment-doc-title/effects';
-import { effects as fragmentFramePanelEffects } from '@blocksuite/affine-fragment-frame-panel/effects';
-import { effects as fragmentOutlineEffects } from '@blocksuite/affine-fragment-outline/effects';
-import { effects as richTextEffects } from '@blocksuite/affine-rich-text/effects';
-import { effects as widgetDragHandleEffects } from '@blocksuite/affine-widget-drag-handle/effects';
-import { effects as widgetEdgelessAutoConnectEffects } from '@blocksuite/affine-widget-edgeless-auto-connect/effects';
-import { effects as widgetFrameTitleEffects } from '@blocksuite/affine-widget-frame-title/effects';
-import { effects as widgetRemoteSelectionEffects } from '@blocksuite/affine-widget-remote-selection/effects';
-import { effects as widgetScrollAnchoringEffects } from '@blocksuite/affine-widget-scroll-anchoring/effects';
-import { effects as widgetSlashMenuEffects } from '@blocksuite/affine-widget-slash-menu/effects';
-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
- | typeof blockAttachmentEffects
- | typeof blockBookmarkEffects
- | typeof blockFrameEffects
- | typeof blockListEffects
- | typeof blockParagraphEffects
- | typeof blockEmbedEffects
- | typeof blockSurfaceEffects
- | typeof blockImageEffects
- | typeof blockDatabaseEffects
- | typeof blockSurfaceRefEffects
- | typeof blockLatexEffects
- | typeof blockEdgelessTextEffects
- | typeof blockDividerEffects
- | typeof blockDataViewEffects
- | typeof blockCodeEffects
- | typeof blockTableEffects
- | typeof blockRootEffects
- | typeof blockCalloutEffects
- | typeof componentCaptionEffects
- | typeof componentContextMenuEffects
- | typeof componentDatePickerEffects
- | typeof componentDropIndicatorEffects
- | typeof componentEmbedCardModalEffects
- | typeof componentHighlightDropdownMenuEffects
- | typeof componentLinkPreviewEffects
- | typeof componentLinkedDocTitleEffects
- | typeof componentPortalEffects
- | typeof componentToolbarEffects
- | typeof componentToggleButtonEffects
- | typeof componentColorPickerEffects
- | typeof componentViewDropdownMenuEffects
- | typeof widgetScrollAnchoringEffects
- | typeof widgetFrameTitleEffects
- | typeof widgetRemoteSelectionEffects
- | typeof widgetDragHandleEffects
- | typeof widgetEdgelessAutoConnectEffects
- | typeof widgetToolbarEffects
- | typeof widgetSlashMenuEffects
- | typeof fragmentDocTitleEffects
- | typeof fragmentFramePanelEffects
- | typeof fragmentOutlineEffects;
-
-export function effects() {
- registerSpecs();
-
- stdEffects();
- inlineEffects();
-
- dataViewEffects();
- richTextEffects();
-
- blockNoteEffects();
- blockAttachmentEffects();
- blockBookmarkEffects();
- blockFrameEffects();
- blockListEffects();
- blockParagraphEffects();
- blockEmbedEffects();
- blockSurfaceEffects();
- blockImageEffects();
- blockDatabaseEffects();
- blockSurfaceRefEffects();
- blockLatexEffects();
- blockEdgelessTextEffects();
- blockDividerEffects();
- blockDataViewEffects();
- blockCodeEffects();
- blockTableEffects();
- blockRootEffects();
- blockCalloutEffects();
-
- componentCaptionEffects();
- componentContextMenuEffects();
- componentDatePickerEffects();
- componentPortalEffects();
- componentToolbarEffects();
- componentDropIndicatorEffects();
- componentToggleButtonEffects();
- componentColorPickerEffects();
- componentEmbedCardModalEffects();
- componentLinkPreviewEffects();
- componentLinkedDocTitleEffects();
- componentCardStyleDropdownMenuEffects();
- componentHighlightDropdownMenuEffects();
- componentViewDropdownMenuEffects();
-
- widgetScrollAnchoringEffects();
- widgetFrameTitleEffects();
- widgetRemoteSelectionEffects();
- widgetDragHandleEffects();
- widgetEdgelessAutoConnectEffects();
- widgetSlashMenuEffects();
- widgetToolbarEffects();
-
- fragmentDocTitleEffects();
- fragmentFramePanelEffects();
- fragmentOutlineEffects();
-
- customElements.define('icon-button', IconButton);
- customElements.define('smooth-corner', SmoothCorner);
- customElements.define('toggle-switch', ToggleSwitch);
- customElements.define('affine-filterable-list', FilterableListComponent);
- customElements.define('block-zero-width', BlockZeroWidth);
- customElements.define('affine-block-selection', BlockSelection);
-}
diff --git a/blocksuite/blocks/src/index.ts b/blocksuite/blocks/src/index.ts
deleted file mode 100644
index cf3859afdb..0000000000
--- a/blocksuite/blocks/src/index.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-export * from './adapters/index.js';
-export * from './extensions/index.js';
-export * from './schemas.js';
-export * from '@blocksuite/affine-block-attachment';
-export * from '@blocksuite/affine-block-bookmark';
-export * from '@blocksuite/affine-block-code';
-export * from '@blocksuite/affine-block-data-view';
-export * from '@blocksuite/affine-block-database';
-export * from '@blocksuite/affine-block-divider';
-export * from '@blocksuite/affine-block-edgeless-text';
-export * from '@blocksuite/affine-block-embed';
-export * from '@blocksuite/affine-block-frame';
-export * from '@blocksuite/affine-block-image';
-export * from '@blocksuite/affine-block-latex';
-export * from '@blocksuite/affine-block-list';
-export * from '@blocksuite/affine-block-note';
-export * from '@blocksuite/affine-block-paragraph';
-export * from '@blocksuite/affine-block-root';
-export * from '@blocksuite/affine-block-surface';
-export * from '@blocksuite/affine-block-surface-ref';
-export * from '@blocksuite/affine-block-table';
-export {
- menu,
- type MenuOptions,
- onMenuOpen,
-} from '@blocksuite/affine-components/context-menu';
-export { toggleEmbedCardEditModal } from '@blocksuite/affine-components/embed-card-modal';
-export {
- HoverController,
- whenHover,
-} from '@blocksuite/affine-components/hover';
-export {
- ArrowDownSmallIcon,
- CloseIcon,
- DocIcon,
- DualLinkIcon16,
- LinkedDocIcon,
- TagsIcon,
-} from '@blocksuite/affine-components/icons';
-export * from '@blocksuite/affine-components/icons';
-export {
- notifyLinkedDocClearedAliases,
- notifyLinkedDocSwitchedToCard,
- notifyLinkedDocSwitchedToEmbed,
-} from '@blocksuite/affine-components/notification';
-export * from '@blocksuite/affine-components/peek';
-export {
- createLitPortal,
- createSimplePortal,
-} from '@blocksuite/affine-components/portal';
-export { toast } from '@blocksuite/affine-components/toast';
-export {
- type AdvancedMenuItem,
- type FatMenuItems,
- groupsToActions,
- MenuContext,
- type MenuItem,
- type MenuItemGroup,
- renderActions,
- renderGroups,
- renderToolbarSeparator,
- ToolbarMoreMenuConfigExtension,
- Tooltip,
-} from '@blocksuite/affine-components/toolbar';
-export {
- DocTitle,
- getDocTitleByEditorHost,
-} from '@blocksuite/affine-fragment-doc-title';
-export * from '@blocksuite/affine-fragment-frame-panel';
-export * from '@blocksuite/affine-fragment-outline';
-export * from '@blocksuite/affine-model';
-export * from '@blocksuite/affine-rich-text';
-export * from '@blocksuite/affine-shared/adapters';
-export * from '@blocksuite/affine-shared/commands';
-export { HighlightSelection } from '@blocksuite/affine-shared/selection';
-export * from '@blocksuite/affine-shared/services';
-export { scrollbarStyle } from '@blocksuite/affine-shared/styles';
-export {
- ColorVariables,
- FontFamilyVariables,
- SizeVariables,
- StyleVariables,
- unsafeCSSVar,
- unsafeCSSVarV2,
-} from '@blocksuite/affine-shared/theme';
-export { type AffineTextAttributes } from '@blocksuite/affine-shared/types';
-export {
- createButtonPopper,
- createDefaultDoc,
- createSignalFromObservable,
- findNoteBlockModel,
- getFigmaSquircleSvgPath,
- getLastNoteBlock,
- getPageRootByElement,
- isInsideEdgelessEditor,
- isInsidePageEditor,
- matchModels,
- MOUSE_BUTTON,
- on,
- once,
- openFileOrFiles,
- printToPdf,
- referenceToNode,
- requestConnectedFrame,
- type Signal,
- SpecBuilder,
- SpecProvider,
- stopPropagation,
-} from '@blocksuite/affine-shared/utils';
-export {
- ViewportTurboRendererExtension,
- ViewportTurboRendererIdentifier,
-} from '@blocksuite/affine-shared/viewport-renderer';
-export type { DragBlockPayload } from '@blocksuite/affine-widget-drag-handle';
-export { toolbarWidget } from '@blocksuite/affine-widget-toolbar';
-
-// TODO(@L-Sun): Narrow the export scope
-export * from '@blocksuite/affine-widget-slash-menu';
-
-const env: Record<string, unknown> =
- typeof globalThis !== 'undefined'
- ? globalThis
- : typeof window !== 'undefined'
- ? window
- : typeof global !== 'undefined'
- ? global
- : {};
-const importIdentifier = '__ $BLOCKSUITE_BLOCKS$ __';
-
-if (env[importIdentifier] === true) {
- // https://github.com/yjs/yjs/issues/438
- console.error(
- '@blocksuite/blocks was already imported. This breaks constructor checks and will lead to issues!'
- );
-}
-
-env[importIdentifier] = true;
diff --git a/blocksuite/blocks/tsconfig.json b/blocksuite/blocks/tsconfig.json
deleted file mode 100644
index 70602a19eb..0000000000
--- a/blocksuite/blocks/tsconfig.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "extends": "../tsconfig.json",
- "compilerOptions": {
- "rootDir": "./src",
- "outDir": "./dist",
- "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
- },
- "include": ["./src"],
- "references": [
- { "path": "../affine/blocks/block-attachment" },
- { "path": "../affine/blocks/block-bookmark" },
- { "path": "../affine/blocks/block-callout" },
- { "path": "../affine/blocks/block-code" },
- { "path": "../affine/blocks/block-data-view" },
- { "path": "../affine/blocks/block-database" },
- { "path": "../affine/blocks/block-divider" },
- { "path": "../affine/blocks/block-edgeless-text" },
- { "path": "../affine/blocks/block-embed" },
- { "path": "../affine/blocks/block-frame" },
- { "path": "../affine/blocks/block-image" },
- { "path": "../affine/blocks/block-latex" },
- { "path": "../affine/blocks/block-list" },
- { "path": "../affine/blocks/block-note" },
- { "path": "../affine/blocks/block-paragraph" },
- { "path": "../affine/blocks/block-root" },
- { "path": "../affine/blocks/block-surface" },
- { "path": "../affine/blocks/block-surface-ref" },
- { "path": "../affine/blocks/block-table" },
- { "path": "../affine/components" },
- { "path": "../affine/fragments/fragment-doc-title" },
- { "path": "../affine/fragments/fragment-frame-panel" },
- { "path": "../affine/fragments/fragment-outline" },
- { "path": "../affine/model" },
- { "path": "../affine/rich-text" },
- { "path": "../affine/shared" },
- { "path": "../affine/widgets/widget-drag-handle" },
- { "path": "../affine/widgets/widget-edgeless-auto-connect" },
- { "path": "../affine/widgets/widget-frame-title" },
- { "path": "../affine/widgets/widget-remote-selection" },
- { "path": "../affine/widgets/widget-scroll-anchoring" },
- { "path": "../affine/widgets/widget-slash-menu" },
- { "path": "../affine/widgets/widget-toolbar" },
- { "path": "../framework/block-std" },
- { "path": "../affine/data-view" },
- { "path": "../framework/global" },
- { "path": "../framework/inline" },
- { "path": "../framework/store" }
- ]
-}
diff --git a/blocksuite/integration-test/package.json b/blocksuite/integration-test/package.json
index f2a5ae56e1..faef526d45 100644
--- a/blocksuite/integration-test/package.json
+++ b/blocksuite/integration-test/package.json
@@ -13,12 +13,8 @@
"author": "toeverything",
"license": "MIT",
"dependencies": {
- "@blocksuite/block-std": "workspace:*",
- "@blocksuite/blocks": "workspace:*",
- "@blocksuite/global": "workspace:*",
+ "@blocksuite/affine": "workspace:*",
"@blocksuite/icons": "^2.2.2",
- "@blocksuite/inline": "workspace:*",
- "@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.3",
"@lottiefiles/dotlottie-wc": "^0.4.0",
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/color-picker.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/color-picker.spec.ts
index ed9c71f50a..88b60e1578 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/color-picker.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/color-picker.spec.ts
@@ -3,8 +3,8 @@ import '@toeverything/theme/style.css';
import {
ColorScheme,
type EdgelessRootBlockComponent,
- ThemeProvider,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import { ThemeProvider } from '@blocksuite/affine/shared/services';
import { beforeEach, describe, expect, test } from 'vitest';
import { getDocRootBlock } from '../utils/edgeless.js';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/frame.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/frame.spec.ts
index a313738c63..27b27228ef 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/frame.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/frame.spec.ts
@@ -3,7 +3,7 @@ import type {
EdgelessRootBlockComponent,
FrameBlockComponent,
FrameBlockModel,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
import { assertType } from '@blocksuite/global/utils';
import { Text } from '@blocksuite/store';
import { beforeEach, describe, expect, test } from 'vitest';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/group.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/group.spec.ts
index f3bc9638a1..3f3c23814f 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/group.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/group.spec.ts
@@ -1,10 +1,10 @@
-import type { MindmapElementModel } from '@blocksuite/affine-model';
import {
type EdgelessRootBlockComponent,
type GroupElementModel,
LayoutType,
NoteDisplayMode,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import type { MindmapElementModel } from '@blocksuite/affine-model';
import { beforeEach, describe, expect, test } from 'vitest';
import * as Y from 'yjs';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/last-props.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/last-props.spec.ts
index 7c357158b6..eb14f3ba67 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/last-props.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/last-props.spec.ts
@@ -1,4 +1,3 @@
-import type { BlockStdScope } from '@blocksuite/block-std';
import {
type BrushElementModel,
type ConnectorElementModel,
@@ -6,7 +5,6 @@ import {
DefaultTheme,
type EdgelessRootBlockComponent,
type EdgelessTextBlockModel,
- EditPropsStore,
FontFamily,
type FrameBlockModel,
getSurfaceBlock,
@@ -18,7 +16,9 @@ import {
type ShapeElementModel,
ShapeType,
type TextElementModel,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import { EditPropsStore } from '@blocksuite/affine/shared/services';
+import type { BlockStdScope } from '@blocksuite/block-std';
import { beforeEach, describe, expect, test } from 'vitest';
import { getDocRootBlock } from '../utils/edgeless.js';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/layer.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/layer.spec.ts
index d1f0f0c5b3..c6b0464424 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/layer.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/layer.spec.ts
@@ -1,11 +1,11 @@
-import type { BlockComponent } from '@blocksuite/block-std';
-import { generateKeyBetween } from '@blocksuite/block-std/gfx';
import type {
EdgelessRootBlockComponent,
GroupElementModel,
NoteBlockModel,
SurfaceElementModel,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import type { BlockComponent } from '@blocksuite/block-std';
+import { generateKeyBetween } from '@blocksuite/block-std/gfx';
import type { BlockModel, Store } from '@blocksuite/store';
import { beforeEach, describe, expect, test } from 'vitest';
import * as Y from 'yjs';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/mindmap.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/mindmap.spec.ts
index 0465b27e93..22c622e566 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/mindmap.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/mindmap.spec.ts
@@ -1,6 +1,6 @@
+import { LayoutType, type MindMapView } from '@blocksuite/affine/blocks';
import type { MindmapElementModel } from '@blocksuite/affine-model';
import type { GfxController } from '@blocksuite/block-std/gfx';
-import { LayoutType, type MindMapView } from '@blocksuite/blocks';
import { Bound } from '@blocksuite/global/gfx';
import { beforeEach, describe, expect, test } from 'vitest';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/surface-model.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/surface-model.spec.ts
index c29018168e..3840cc0572 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/surface-model.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/surface-model.spec.ts
@@ -3,8 +3,8 @@ import type {
GroupElementModel,
ShapeElementModel,
SurfaceBlockModel,
-} from '@blocksuite/blocks';
-import { DefaultTheme } from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import { DefaultTheme } from '@blocksuite/affine/blocks';
import { beforeEach, describe, expect, test, vi } from 'vitest';
import { wait } from '../utils/common.js';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/surface-ref.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/surface-ref.spec.ts
index 0de75804d7..0a1e45f883 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/surface-ref.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/surface-ref.spec.ts
@@ -3,7 +3,7 @@ import {
EdgelessRootService,
type FrameBlockComponent,
type SurfaceRefBlockComponent,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
import type { DocSnapshot } from '@blocksuite/store';
import { beforeEach, describe, expect, test } from 'vitest';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/template.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/template.spec.ts
index f18fa65648..50f5b0a431 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/template.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/template.spec.ts
@@ -2,7 +2,7 @@ import {
EdgelessTemplatePanel,
type Template,
type TemplateManager,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
import { beforeEach, expect, test } from 'vitest';
import { setupEditor } from '../utils/setup.js';
diff --git a/blocksuite/integration-test/src/__tests__/edgeless/tools.spec.ts b/blocksuite/integration-test/src/__tests__/edgeless/tools.spec.ts
index f7322b1cb0..c489778300 100644
--- a/blocksuite/integration-test/src/__tests__/edgeless/tools.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/edgeless/tools.spec.ts
@@ -1,7 +1,7 @@
import type {
EdgelessRootBlockComponent,
SurfaceBlockComponent,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
import { beforeEach, describe, expect, test } from 'vitest';
import { click, drag, wait } from '../utils/common.js';
diff --git a/blocksuite/integration-test/src/__tests__/main/snapshot.spec.ts b/blocksuite/integration-test/src/__tests__/main/snapshot.spec.ts
index 1c24dc8c76..6723dfe589 100644
--- a/blocksuite/integration-test/src/__tests__/main/snapshot.spec.ts
+++ b/blocksuite/integration-test/src/__tests__/main/snapshot.spec.ts
@@ -1,8 +1,8 @@
import {
- AffineSchemas,
type SurfaceBlockModel,
ZipTransformer,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import { AffineSchemas } from '@blocksuite/affine/schemas';
import type { PointLocation } from '@blocksuite/global/gfx';
import { Schema } from '@blocksuite/store';
import { beforeEach, expect, test } from 'vitest';
diff --git a/blocksuite/integration-test/src/__tests__/utils/edgeless.ts b/blocksuite/integration-test/src/__tests__/utils/edgeless.ts
index 40c444e237..8a881ae406 100644
--- a/blocksuite/integration-test/src/__tests__/utils/edgeless.ts
+++ b/blocksuite/integration-test/src/__tests__/utils/edgeless.ts
@@ -2,7 +2,7 @@ import type {
EdgelessRootBlockComponent,
PageRootBlockComponent,
SurfaceBlockComponent,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
import type { Store } from '@blocksuite/store';
import type { TestAffineEditorContainer } from '../../index.js';
diff --git a/blocksuite/integration-test/src/__tests__/utils/misc.ts b/blocksuite/integration-test/src/__tests__/utils/misc.ts
index 11c7fed403..93bf41ad99 100644
--- a/blocksuite/integration-test/src/__tests__/utils/misc.ts
+++ b/blocksuite/integration-test/src/__tests__/utils/misc.ts
@@ -1,4 +1,5 @@
-import { AffineSchemas, replaceIdMiddleware } from '@blocksuite/blocks';
+import { replaceIdMiddleware } from '@blocksuite/affine/blocks';
+import { AffineSchemas } from '@blocksuite/affine/schemas';
import {
type DocSnapshot,
Schema,
diff --git a/blocksuite/integration-test/src/__tests__/utils/setup.ts b/blocksuite/integration-test/src/__tests__/utils/setup.ts
index 648419357b..70255bf741 100644
--- a/blocksuite/integration-test/src/__tests__/utils/setup.ts
+++ b/blocksuite/integration-test/src/__tests__/utils/setup.ts
@@ -1,7 +1,7 @@
import '@toeverything/theme/style.css';
import '@toeverything/theme/fonts.css';
-import { effects as blocksEffects } from '@blocksuite/blocks/effects';
+import { effects as blocksEffects } from '@blocksuite/affine/effects';
import type { ExtensionType, Store, Transformer } from '@blocksuite/store';
import { effects } from '../../effects.js';
@@ -9,16 +9,18 @@ import { effects } from '../../effects.js';
blocksEffects();
effects();
-import type { ViewportTurboRendererExtension } from '@blocksuite/affine-shared/viewport-renderer';
import {
- CommunityCanvasTextFonts,
type DocMode,
EdgelessEditorBlockSpecs,
- FontConfigExtension,
PageEditorBlockSpecs,
StoreExtensions,
-} from '@blocksuite/blocks';
-import { AffineSchemas } from '@blocksuite/blocks/schemas';
+} from '@blocksuite/affine/blocks';
+import { AffineSchemas } from '@blocksuite/affine/schemas';
+import {
+ CommunityCanvasTextFonts,
+ FontConfigExtension,
+} from '@blocksuite/affine/shared/services';
+import type { ViewportTurboRendererExtension } from '@blocksuite/affine-shared/viewport-renderer';
import { Schema, Text } from '@blocksuite/store';
import {
createAutoIncrementIdGenerator,
diff --git a/blocksuite/integration-test/src/editors/editor-container.ts b/blocksuite/integration-test/src/editors/editor-container.ts
index 547d9bc807..68e9bfd672 100644
--- a/blocksuite/integration-test/src/editors/editor-container.ts
+++ b/blocksuite/integration-test/src/editors/editor-container.ts
@@ -1,11 +1,12 @@
-import { BlockStdScope, ShadowlessElement } from '@blocksuite/block-std';
-import { type DocMode, ThemeProvider } from '@blocksuite/blocks';
-import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
+import { BlockStdScope, ShadowlessElement } from '@blocksuite/affine/block-std';
+import type { DocMode } from '@blocksuite/affine/blocks';
+import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { ThemeProvider } from '@blocksuite/affine/shared/services';
import {
type BlockModel,
type ExtensionType,
type Store,
-} from '@blocksuite/store';
+} from '@blocksuite/affine/store';
import { computed, signal } from '@preact/signals-core';
import { css, html } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/blocksuite/integration-test/src/effects.ts b/blocksuite/integration-test/src/effects.ts
index 340f9e4c03..4b742b1a54 100644
--- a/blocksuite/integration-test/src/effects.ts
+++ b/blocksuite/integration-test/src/effects.ts
@@ -1,4 +1,4 @@
-import '@blocksuite/blocks/effects';
+import '@blocksuite/affine/effects';
import { TestAffineEditorContainer } from './editors/index.js';
diff --git a/blocksuite/integration-test/tsconfig.json b/blocksuite/integration-test/tsconfig.json
index 52f698246a..1f0933d634 100644
--- a/blocksuite/integration-test/tsconfig.json
+++ b/blocksuite/integration-test/tsconfig.json
@@ -6,11 +6,5 @@
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
},
"include": ["./src", "./src/**/*.json"],
- "references": [
- { "path": "../framework/block-std" },
- { "path": "../blocks" },
- { "path": "../framework/global" },
- { "path": "../framework/inline" },
- { "path": "../framework/store" }
- ]
+ "references": [{ "path": "../affine/all" }]
}
diff --git a/blocksuite/integration-test/vitest.config.ts b/blocksuite/integration-test/vitest.config.ts
index 07aeaa76cb..70cf1ce8c3 100644
--- a/blocksuite/integration-test/vitest.config.ts
+++ b/blocksuite/integration-test/vitest.config.ts
@@ -1,6 +1,3 @@
-import path from 'node:path';
-import { fileURLToPath } from 'node:url';
-
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import { defineConfig } from 'vitest/config';
@@ -41,26 +38,6 @@ export default defineConfig(_configEnv =>
testTransformMode: {
web: ['src/__tests__/**/*.spec.ts'],
},
- alias: {
- '@blocksuite/blocks': path.resolve(
- fileURLToPath(new URL('../blocks/src', import.meta.url))
- ),
- '@blocksuite/blocks/*': path.resolve(
- fileURLToPath(new URL('../blocks/src/*', import.meta.url))
- ),
- '@blocksuite/global/*': path.resolve(
- fileURLToPath(new URL('../framework/global/src/*', import.meta.url))
- ),
- '@blocksuite/store': path.resolve(
- fileURLToPath(new URL('../framework/store/src', import.meta.url))
- ),
- '@blocksuite/inline': path.resolve(
- fileURLToPath(new URL('../framework/inline/src', import.meta.url))
- ),
- '@blocksuite/inline/*': path.resolve(
- fileURLToPath(new URL('../framework/inline/src/*', import.meta.url))
- ),
- },
},
})
);
diff --git a/blocksuite/playground/apps/_common/components/adapters-panel.ts b/blocksuite/playground/apps/_common/components/adapters-panel.ts
index d3d9fe687b..18928cff55 100644
--- a/blocksuite/playground/apps/_common/components/adapters-panel.ts
+++ b/blocksuite/playground/apps/_common/components/adapters-panel.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-restricted-imports */
import '@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js';
-import { ShadowlessElement } from '@blocksuite/block-std';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
import {
defaultImageProxyMiddleware,
docLinkBaseURLMiddlewareBuilder,
@@ -13,10 +13,10 @@ import {
type PlainTextAdapter,
PlainTextAdapterFactoryIdentifier,
titleMiddleware,
-} from '@blocksuite/blocks';
-import { WithDisposable } from '@blocksuite/global/lit';
+} from '@blocksuite/affine/blocks';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
+import type { DocSnapshot } from '@blocksuite/affine/store';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { DocSnapshot } from '@blocksuite/store';
import { effect } from '@preact/signals-core';
import type SlTabPanel from '@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js';
import { css, html, type PropertyValues } from 'lit';
diff --git a/blocksuite/playground/apps/_common/components/attachment-viewer-panel.ts b/blocksuite/playground/apps/_common/components/attachment-viewer-panel.ts
index baaa4806d4..a52183ed13 100644
--- a/blocksuite/playground/apps/_common/components/attachment-viewer-panel.ts
+++ b/blocksuite/playground/apps/_common/components/attachment-viewer-panel.ts
@@ -1,8 +1,7 @@
-/* oxlint-disable @typescript-eslint/no-non-null-assertion */
+import { getAttachmentFileIcon } from '@blocksuite/affine/components/icons';
+import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
import type { AttachmentBlockModel } from '@blocksuite/affine-model';
import { humanFileSize } from '@blocksuite/affine-shared/utils';
-import { getAttachmentFileIcon } from '@blocksuite/blocks';
-import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
import {
ArrowDownBigIcon,
ArrowUpBigIcon,
diff --git a/blocksuite/playground/apps/_common/components/custom-frame-panel.ts b/blocksuite/playground/apps/_common/components/custom-frame-panel.ts
index 6c2f511f1d..eb74d024cd 100644
--- a/blocksuite/playground/apps/_common/components/custom-frame-panel.ts
+++ b/blocksuite/playground/apps/_common/components/custom-frame-panel.ts
@@ -1,5 +1,5 @@
-import { ShadowlessElement } from '@blocksuite/block-std';
-import { WithDisposable } from '@blocksuite/global/lit';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
import { effect } from '@preact/signals-core';
import { css, html, nothing } from 'lit';
diff --git a/blocksuite/playground/apps/_common/components/custom-outline-panel.ts b/blocksuite/playground/apps/_common/components/custom-outline-panel.ts
index abb64795e4..40611d42c6 100644
--- a/blocksuite/playground/apps/_common/components/custom-outline-panel.ts
+++ b/blocksuite/playground/apps/_common/components/custom-outline-panel.ts
@@ -1,5 +1,5 @@
-import { ShadowlessElement } from '@blocksuite/block-std';
-import { WithDisposable } from '@blocksuite/global/lit';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
import { css, html, nothing } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
diff --git a/blocksuite/playground/apps/_common/components/custom-outline-viewer.ts b/blocksuite/playground/apps/_common/components/custom-outline-viewer.ts
index 92459401b4..0b966de25c 100644
--- a/blocksuite/playground/apps/_common/components/custom-outline-viewer.ts
+++ b/blocksuite/playground/apps/_common/components/custom-outline-viewer.ts
@@ -1,4 +1,4 @@
-import { WithDisposable } from '@blocksuite/global/lit';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
diff --git a/blocksuite/playground/apps/_common/components/docs-panel.ts b/blocksuite/playground/apps/_common/components/docs-panel.ts
index 33e34b119a..594f0147ac 100644
--- a/blocksuite/playground/apps/_common/components/docs-panel.ts
+++ b/blocksuite/playground/apps/_common/components/docs-panel.ts
@@ -1,12 +1,10 @@
-import { ShadowlessElement } from '@blocksuite/block-std';
-import {
- CloseIcon,
- createDefaultDoc,
- GenerateDocUrlProvider,
-} from '@blocksuite/blocks';
-import { WithDisposable } from '@blocksuite/global/lit';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { GenerateDocUrlProvider } from '@blocksuite/affine/shared/services';
+import { createDefaultDoc } from '@blocksuite/affine/shared/utils';
+import type { Doc, Workspace } from '@blocksuite/affine/store';
+import { CloseIcon } from '@blocksuite/icons/lit';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { Doc, Workspace } from '@blocksuite/store';
import { css, html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
@@ -153,7 +151,7 @@ export class DocsPanel extends WithDisposable(ShadowlessElement) {
${doc.meta?.title || 'Untitled'}
${docs.length > 1
? html`<div @click="${deleteDoc}" class="delete-doc-icon">
- ${CloseIcon}
+ ${CloseIcon()}
</div>`
: nothing}
</div>`;
diff --git a/blocksuite/playground/apps/_common/components/left-side-panel.ts b/blocksuite/playground/apps/_common/components/left-side-panel.ts
index 570048922b..7175f8a4e8 100644
--- a/blocksuite/playground/apps/_common/components/left-side-panel.ts
+++ b/blocksuite/playground/apps/_common/components/left-side-panel.ts
@@ -1,4 +1,4 @@
-import { ShadowlessElement } from '@blocksuite/block-std';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { css, html } from 'lit';
import { customElement } from 'lit/decorators.js';
diff --git a/blocksuite/playground/apps/_common/components/starter-debug-menu.ts b/blocksuite/playground/apps/_common/components/starter-debug-menu.ts
index 89ea1ddea2..6d1e414a4a 100644
--- a/blocksuite/playground/apps/_common/components/starter-debug-menu.ts
+++ b/blocksuite/playground/apps/_common/components/starter-debug-menu.ts
@@ -16,40 +16,44 @@ import '@shoelace-style/shoelace/dist/themes/light.css';
import '@shoelace-style/shoelace/dist/themes/dark.css';
import './left-side-panel.js';
-import { NotionHtmlAdapter } from '@blocksuite/affine-shared/adapters';
-import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
-import { ShadowlessElement } from '@blocksuite/block-std';
-import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
+import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
import {
ColorScheme,
- ColorVariables,
createAssetsArchive,
defaultImageProxyMiddleware,
docLinkBaseURLMiddleware,
type DocMode,
- DocModeProvider,
download,
ExportManager,
- FontFamilyVariables,
HtmlAdapterFactoryIdentifier,
HtmlTransformer,
MarkdownAdapterFactoryIdentifier,
MarkdownTransformer,
NotionHtmlTransformer,
- openFileOrFiles,
PlainTextAdapterFactoryIdentifier,
- printToPdf,
- SizeVariables,
- StyleVariables,
titleMiddleware,
- toast,
ZipTransformer,
-} from '@blocksuite/blocks';
-import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
-import type { SerializedXYWH } from '@blocksuite/global/gfx';
-import type { DeltaInsert } from '@blocksuite/inline/types';
+} from '@blocksuite/affine/blocks';
+import { toast } from '@blocksuite/affine/components/toast';
+import {
+ BlockSuiteError,
+ ErrorCode,
+} from '@blocksuite/affine/global/exceptions';
+import type { SerializedXYWH } from '@blocksuite/affine/global/gfx';
+import type { DeltaInsert } from '@blocksuite/affine/inline/types';
+import { DocModeProvider } from '@blocksuite/affine/shared/services';
+import {
+ ColorVariables,
+ FontFamilyVariables,
+ SizeVariables,
+ StyleVariables,
+} from '@blocksuite/affine/shared/theme';
+import { openFileOrFiles, printToPdf } from '@blocksuite/affine/shared/utils';
+import { Text, type Workspace } from '@blocksuite/affine/store';
+import { NotionHtmlAdapter } from '@blocksuite/affine-shared/adapters';
+import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import { Text, type Workspace } from '@blocksuite/store';
import type { SlDropdown } from '@shoelace-style/shoelace';
import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js';
import { css, html } from 'lit';
diff --git a/blocksuite/playground/apps/_common/helper.ts b/blocksuite/playground/apps/_common/helper.ts
index 5112342a87..48eace58fc 100644
--- a/blocksuite/playground/apps/_common/helper.ts
+++ b/blocksuite/playground/apps/_common/helper.ts
@@ -1,5 +1,5 @@
-import { SpecProvider } from '@blocksuite/blocks';
-import { TestWorkspace } from '@blocksuite/store/test';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
+import { TestWorkspace } from '@blocksuite/affine/store/test';
export function createEmptyDoc() {
const collection = new TestWorkspace();
diff --git a/blocksuite/playground/apps/_common/history.ts b/blocksuite/playground/apps/_common/history.ts
index b8c8d37464..3972da6c51 100644
--- a/blocksuite/playground/apps/_common/history.ts
+++ b/blocksuite/playground/apps/_common/history.ts
@@ -1,6 +1,6 @@
-import type { DocModeProvider } from '@blocksuite/blocks';
+import type { DocModeProvider } from '@blocksuite/affine/shared/services';
+import type { Doc, Store, Workspace } from '@blocksuite/affine/store';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { Doc, Store, Workspace } from '@blocksuite/store';
export function getDocFromUrlParams(collection: Workspace, url: URL) {
let doc: Store | null = null;
diff --git a/blocksuite/playground/apps/_common/mock-services.ts b/blocksuite/playground/apps/_common/mock-services.ts
index 860911ae61..99ecf2d042 100644
--- a/blocksuite/playground/apps/_common/mock-services.ts
+++ b/blocksuite/playground/apps/_common/mock-services.ts
@@ -1,19 +1,21 @@
-import type { EditorSetting } from '@blocksuite/affine-shared/services';
import {
ColorScheme,
type DocMode,
+ type ReferenceParams,
+} from '@blocksuite/affine/blocks';
+import { toast } from '@blocksuite/affine/components/toast';
+import { Slot } from '@blocksuite/affine/global/slot';
+import {
type DocModeProvider,
+ type EditorSetting,
GeneralSettingSchema,
type GenerateDocUrlService,
type NotificationService,
type ParseDocUrlService,
- type ReferenceParams,
type ThemeExtension,
- toast,
-} from '@blocksuite/blocks';
-import { Slot } from '@blocksuite/global/slot';
+} from '@blocksuite/affine/shared/services';
+import { type Workspace } from '@blocksuite/affine/store';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import { type Workspace } from '@blocksuite/store';
import { Signal, signal } from '@preact/signals-core';
function getModeFromStorage() {
diff --git a/blocksuite/playground/apps/_common/setup.ts b/blocksuite/playground/apps/_common/setup.ts
index 5c2823a10e..64848fed78 100644
--- a/blocksuite/playground/apps/_common/setup.ts
+++ b/blocksuite/playground/apps/_common/setup.ts
@@ -2,8 +2,8 @@ import type {
Template,
TemplateCategory,
TemplateManager,
-} from '@blocksuite/blocks';
-import { EdgelessTemplatePanel } from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import { EdgelessTemplatePanel } from '@blocksuite/affine/blocks';
export function setupEdgelessTemplate() {
const playgroundTemplates = [
diff --git a/blocksuite/playground/apps/comment/comment-input.ts b/blocksuite/playground/apps/comment/comment-input.ts
index 23336add7e..17eea4c1eb 100644
--- a/blocksuite/playground/apps/comment/comment-input.ts
+++ b/blocksuite/playground/apps/comment/comment-input.ts
@@ -1,6 +1,6 @@
-import { ShadowlessElement, TextSelection } from '@blocksuite/block-std';
-import type { RichText } from '@blocksuite/blocks';
-import { WithDisposable } from '@blocksuite/global/lit';
+import { ShadowlessElement, TextSelection } from '@blocksuite/affine/block-std';
+import type { RichText } from '@blocksuite/affine/blocks';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
import { css, html, nothing } from 'lit';
import { property, query } from 'lit/decorators.js';
import * as Y from 'yjs';
diff --git a/blocksuite/playground/apps/comment/comment-manager.ts b/blocksuite/playground/apps/comment/comment-manager.ts
index 1e97dbdbc4..67c6e3ed3b 100644
--- a/blocksuite/playground/apps/comment/comment-manager.ts
+++ b/blocksuite/playground/apps/comment/comment-manager.ts
@@ -1,5 +1,5 @@
+import type { EditorHost, TextSelection } from '@blocksuite/affine/block-std';
import { getSelectedBlocksCommand } from '@blocksuite/affine-shared/commands';
-import type { EditorHost, TextSelection } from '@blocksuite/block-std';
import * as Y from 'yjs';
export interface CommentMeta {
diff --git a/blocksuite/playground/apps/comment/comment-panel.ts b/blocksuite/playground/apps/comment/comment-panel.ts
index 3acb2be607..9dfb356f93 100644
--- a/blocksuite/playground/apps/comment/comment-panel.ts
+++ b/blocksuite/playground/apps/comment/comment-panel.ts
@@ -1,5 +1,5 @@
-import { ShadowlessElement, TextSelection } from '@blocksuite/block-std';
-import { WithDisposable } from '@blocksuite/global/lit';
+import { ShadowlessElement, TextSelection } from '@blocksuite/affine/block-std';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
import { css, html } from 'lit';
import { property, query } from 'lit/decorators.js';
diff --git a/blocksuite/playground/apps/env.d.ts b/blocksuite/playground/apps/env.d.ts
index ef6e72bdc7..5008cf7bbf 100644
--- a/blocksuite/playground/apps/env.d.ts
+++ b/blocksuite/playground/apps/env.d.ts
@@ -1,6 +1,6 @@
-import type { EditorHost } from '@blocksuite/block-std';
+import type { EditorHost } from '@blocksuite/affine/block-std';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { BlockSchema, Blocks, Workspace, Transformer } from '@blocksuite/store';
+import type { BlockSchema, Blocks, Workspace, Transformer } from '@blocksuite/affine/store';
import type { z } from 'zod';
import type * as Y from 'yjs';
diff --git a/blocksuite/playground/apps/starter/data/affine-snapshot.ts b/blocksuite/playground/apps/starter/data/affine-snapshot.ts
index eab8faead3..8aa9f87f86 100644
--- a/blocksuite/playground/apps/starter/data/affine-snapshot.ts
+++ b/blocksuite/playground/apps/starter/data/affine-snapshot.ts
@@ -1,6 +1,6 @@
-import { AffineSchemas, ZipTransformer } from '@blocksuite/blocks';
-import { Schema, Text, type Workspace } from '@blocksuite/store';
-
+import { ZipTransformer } from '@blocksuite/affine/blocks';
+import { AffineSchemas } from '@blocksuite/affine/schemas';
+import { Schema, Text, type Workspace } from '@blocksuite/affine/store';
export async function affineSnapshot(collection: Workspace, id: string) {
const doc = collection.createDoc({ id });
doc.load();
diff --git a/blocksuite/playground/apps/starter/data/database.ts b/blocksuite/playground/apps/starter/data/database.ts
index 1b87410938..bf0f33af6d 100644
--- a/blocksuite/playground/apps/starter/data/database.ts
+++ b/blocksuite/playground/apps/starter/data/database.ts
@@ -4,11 +4,11 @@ import {
type DatabaseBlockModel,
type ListType,
type ParagraphType,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import { groupTraitKey } from '@blocksuite/data-view';
import { propertyPresets } from '@blocksuite/data-view/property-presets';
import { viewPresets } from '@blocksuite/data-view/view-presets';
-import { Text, type Workspace } from '@blocksuite/store';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/embed.ts b/blocksuite/playground/apps/starter/data/embed.ts
index 38d72527da..42673144e8 100644
--- a/blocksuite/playground/apps/starter/data/embed.ts
+++ b/blocksuite/playground/apps/starter/data/embed.ts
@@ -1,4 +1,4 @@
-import { Text, type Workspace } from '@blocksuite/store';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/empty.ts b/blocksuite/playground/apps/starter/data/empty.ts
index fa9a591283..46a74a9a07 100644
--- a/blocksuite/playground/apps/starter/data/empty.ts
+++ b/blocksuite/playground/apps/starter/data/empty.ts
@@ -1,4 +1,4 @@
-import { Text, type Workspace } from '@blocksuite/store';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/heavy-whiteboard.ts b/blocksuite/playground/apps/starter/data/heavy-whiteboard.ts
index 511017c778..a9c32211c7 100644
--- a/blocksuite/playground/apps/starter/data/heavy-whiteboard.ts
+++ b/blocksuite/playground/apps/starter/data/heavy-whiteboard.ts
@@ -1,12 +1,12 @@
-import { DEFAULT_ROUGHNESS } from '@blocksuite/affine-model';
-import type { SerializedXYWH } from '@blocksuite/global/gfx';
+import type { SerializedXYWH } from '@blocksuite/affine/global/gfx';
import {
Boxed,
nanoid,
native2Y,
Text,
type Workspace,
-} from '@blocksuite/store';
+} from '@blocksuite/affine/store';
+import { DEFAULT_ROUGHNESS } from '@blocksuite/affine-model';
import type * as Y from 'yjs';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/heavy.ts b/blocksuite/playground/apps/starter/data/heavy.ts
index 3830beb9f3..7f31f9abc0 100644
--- a/blocksuite/playground/apps/starter/data/heavy.ts
+++ b/blocksuite/playground/apps/starter/data/heavy.ts
@@ -1,4 +1,4 @@
-import { Text, type Workspace } from '@blocksuite/store';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/linked.ts b/blocksuite/playground/apps/starter/data/linked.ts
index bc479ba5ef..d9b0698b3e 100644
--- a/blocksuite/playground/apps/starter/data/linked.ts
+++ b/blocksuite/playground/apps/starter/data/linked.ts
@@ -1,4 +1,4 @@
-import { Text, type Workspace } from '@blocksuite/store';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/multiple-editor.ts b/blocksuite/playground/apps/starter/data/multiple-editor.ts
index f195f369cf..0d62598648 100644
--- a/blocksuite/playground/apps/starter/data/multiple-editor.ts
+++ b/blocksuite/playground/apps/starter/data/multiple-editor.ts
@@ -1,4 +1,4 @@
-import { Text, type Workspace } from '@blocksuite/store';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import { createTestEditor } from '../utils/extensions.js';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/pending-structs.ts b/blocksuite/playground/apps/starter/data/pending-structs.ts
index 2e485fd9c9..5641bea60b 100644
--- a/blocksuite/playground/apps/starter/data/pending-structs.ts
+++ b/blocksuite/playground/apps/starter/data/pending-structs.ts
@@ -1,4 +1,4 @@
-import { Text, type Workspace } from '@blocksuite/store';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import * as Y from 'yjs';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/preset.ts b/blocksuite/playground/apps/starter/data/preset.ts
index 68c8e741b3..1dea554b93 100644
--- a/blocksuite/playground/apps/starter/data/preset.ts
+++ b/blocksuite/playground/apps/starter/data/preset.ts
@@ -1,5 +1,5 @@
-import { MarkdownTransformer } from '@blocksuite/blocks';
-import { Text, type Workspace } from '@blocksuite/store';
+import { MarkdownTransformer } from '@blocksuite/affine/blocks';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/data/synced.ts b/blocksuite/playground/apps/starter/data/synced.ts
index d532cc9f79..c68ebb6ce6 100644
--- a/blocksuite/playground/apps/starter/data/synced.ts
+++ b/blocksuite/playground/apps/starter/data/synced.ts
@@ -1,5 +1,5 @@
-import { MarkdownTransformer } from '@blocksuite/blocks';
-import { Text, type Workspace } from '@blocksuite/store';
+import { MarkdownTransformer } from '@blocksuite/affine/blocks';
+import { Text, type Workspace } from '@blocksuite/affine/store';
import type { InitFn } from './utils';
diff --git a/blocksuite/playground/apps/starter/data/utils.ts b/blocksuite/playground/apps/starter/data/utils.ts
index 49a3860b74..27fcafabb6 100644
--- a/blocksuite/playground/apps/starter/data/utils.ts
+++ b/blocksuite/playground/apps/starter/data/utils.ts
@@ -1,4 +1,4 @@
-import type { Workspace } from '@blocksuite/store';
+import type { Workspace } from '@blocksuite/affine/store';
export interface InitFn {
(collection: Workspace, docId: string): Promise<void> | void;
diff --git a/blocksuite/playground/apps/starter/data/version-mismatch.ts b/blocksuite/playground/apps/starter/data/version-mismatch.ts
index c86fc30f96..f60ff8925e 100644
--- a/blocksuite/playground/apps/starter/data/version-mismatch.ts
+++ b/blocksuite/playground/apps/starter/data/version-mismatch.ts
@@ -1,4 +1,4 @@
-import type { Workspace } from '@blocksuite/store';
+import type { Workspace } from '@blocksuite/affine/store';
import * as Y from 'yjs';
import type { InitFn } from './utils.js';
diff --git a/blocksuite/playground/apps/starter/main.ts b/blocksuite/playground/apps/starter/main.ts
index 3791d86974..e45833063e 100644
--- a/blocksuite/playground/apps/starter/main.ts
+++ b/blocksuite/playground/apps/starter/main.ts
@@ -1,13 +1,13 @@
import '../../style.css';
-import * as blockStd from '@blocksuite/block-std';
-import * as blocks from '@blocksuite/blocks';
-import { effects as blocksEffects } from '@blocksuite/blocks/effects';
-import * as globalUtils from '@blocksuite/global/utils';
+import * as blockStd from '@blocksuite/affine/block-std';
+import * as blocks from '@blocksuite/affine/blocks';
+import { effects as blocksEffects } from '@blocksuite/affine/effects';
+import * as globalUtils from '@blocksuite/affine/global/utils';
+import * as services from '@blocksuite/affine/shared/services';
+import * as store from '@blocksuite/affine/store';
import * as editor from '@blocksuite/integration-test';
import { effects as presetsEffects } from '@blocksuite/integration-test/effects';
-// eslint-disable-next-line @typescript-eslint/no-restricted-imports
-import * as store from '@blocksuite/store';
import { setupEdgelessTemplate } from '../_common/setup.js';
import { effects as commentEffects } from '../comment/effects.js';
@@ -38,6 +38,7 @@ async function main() {
store,
blocks,
global: { utils: globalUtils },
+ services,
editor,
blockStd: blockStd,
}),
diff --git a/blocksuite/playground/apps/starter/utils/app.ts b/blocksuite/playground/apps/starter/utils/app.ts
index c36aaf620b..43b119b9c0 100644
--- a/blocksuite/playground/apps/starter/utils/app.ts
+++ b/blocksuite/playground/apps/starter/utils/app.ts
@@ -1,4 +1,4 @@
-import type { Store, Workspace } from '@blocksuite/store';
+import type { Store, Workspace } from '@blocksuite/affine/store';
import { AttachmentViewerPanel } from '../../_common/components/attachment-viewer-panel';
import { CustomFramePanel } from '../../_common/components/custom-frame-panel';
diff --git a/blocksuite/playground/apps/starter/utils/collection.ts b/blocksuite/playground/apps/starter/utils/collection.ts
index ca38057bd6..ec49b0482c 100644
--- a/blocksuite/playground/apps/starter/utils/collection.ts
+++ b/blocksuite/playground/apps/starter/utils/collection.ts
@@ -1,17 +1,18 @@
-import { AffineSchemas, SpecProvider } from '@blocksuite/blocks';
-import { nanoid, Schema, Transformer } from '@blocksuite/store';
+import { AffineSchemas } from '@blocksuite/affine/schemas';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
+import { nanoid, Schema, Transformer } from '@blocksuite/affine/store';
import {
createAutoIncrementIdGenerator,
type DocCollectionOptions,
TestWorkspace,
-} from '@blocksuite/store/test';
+} from '@blocksuite/affine/store/test';
import {
type BlobSource,
BroadcastChannelAwarenessSource,
BroadcastChannelDocSource,
IndexedDBBlobSource,
MemoryBlobSource,
-} from '@blocksuite/sync';
+} from '@blocksuite/affine/sync';
import * as Y from 'yjs';
import { MockServerBlobSource } from '../../_common/sync/blob/mock-server.js';
diff --git a/blocksuite/playground/apps/starter/utils/extensions.ts b/blocksuite/playground/apps/starter/utils/extensions.ts
index 047214953d..1211ac9cbd 100644
--- a/blocksuite/playground/apps/starter/utils/extensions.ts
+++ b/blocksuite/playground/apps/starter/utils/extensions.ts
@@ -1,16 +1,18 @@
+import {
+ EdgelessEditorBlockSpecs,
+ PageEditorBlockSpecs,
+ RefNodeSlotsProvider,
+} from '@blocksuite/affine/blocks';
import {
CommunityCanvasTextFonts,
DocModeProvider,
- EdgelessEditorBlockSpecs,
EditorSettingExtension,
FeatureFlagService,
FontConfigExtension,
- PageEditorBlockSpecs,
ParseDocUrlExtension,
- RefNodeSlotsProvider,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/shared/services';
+import type { ExtensionType, Store, Workspace } from '@blocksuite/affine/store';
import { type TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { ExtensionType, Store, Workspace } from '@blocksuite/store';
import {
mockDocModeService,
diff --git a/blocksuite/playground/apps/starter/utils/setup-playground.ts b/blocksuite/playground/apps/starter/utils/setup-playground.ts
index 463e186a3e..23fe6225b6 100644
--- a/blocksuite/playground/apps/starter/utils/setup-playground.ts
+++ b/blocksuite/playground/apps/starter/utils/setup-playground.ts
@@ -1,6 +1,6 @@
-import { DocModeProvider } from '@blocksuite/blocks';
+import { DocModeProvider } from '@blocksuite/affine/shared/services';
+import type { Workspace } from '@blocksuite/affine/store';
import { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { Workspace } from '@blocksuite/store';
import {
getDocFromUrlParams,
diff --git a/blocksuite/playground/apps/starter/utils/test.ts b/blocksuite/playground/apps/starter/utils/test.ts
index 454448e89e..464da5dfd1 100644
--- a/blocksuite/playground/apps/starter/utils/test.ts
+++ b/blocksuite/playground/apps/starter/utils/test.ts
@@ -1,4 +1,4 @@
-import type { Store, Workspace } from '@blocksuite/store';
+import type { Store, Workspace } from '@blocksuite/affine/store';
import { createTestApp } from './app';
diff --git a/blocksuite/playground/examples/inline/test-page.ts b/blocksuite/playground/examples/inline/test-page.ts
index f1cefc121a..ad9f9944dd 100644
--- a/blocksuite/playground/examples/inline/test-page.ts
+++ b/blocksuite/playground/examples/inline/test-page.ts
@@ -1,14 +1,14 @@
import '@shoelace-style/shoelace';
-import { ShadowlessElement } from '@blocksuite/block-std';
+import { ShadowlessElement } from '@blocksuite/affine/block-std';
import {
type AttributeRenderer,
type BaseTextAttributes,
baseTextAttributes,
InlineEditor,
ZERO_WIDTH_NON_JOINER,
-} from '@blocksuite/inline';
-import { effects } from '@blocksuite/inline/effects';
+} from '@blocksuite/affine/inline';
+import { effects } from '@blocksuite/affine/inline/effects';
import { effect } from '@preact/signals-core';
import { css, html, nothing } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
diff --git a/blocksuite/playground/package.json b/blocksuite/playground/package.json
index 9ae0a25468..db686f8518 100644
--- a/blocksuite/playground/package.json
+++ b/blocksuite/playground/package.json
@@ -9,18 +9,13 @@
"preview": "vite preview"
},
"dependencies": {
+ "@blocksuite/affine": "workspace:*",
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
- "@blocksuite/block-std": "workspace:*",
- "@blocksuite/blocks": "workspace:*",
"@blocksuite/data-view": "workspace:*",
- "@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.1",
- "@blocksuite/inline": "workspace:*",
"@blocksuite/integration-test": "workspace:*",
- "@blocksuite/store": "workspace:*",
- "@blocksuite/sync": "workspace:*",
"@preact/signals-core": "^1.8.0",
"@shoelace-style/shoelace": "2.20.0",
"@toeverything/pdf-viewer": "^0.1.1",
diff --git a/blocksuite/playground/tsconfig.json b/blocksuite/playground/tsconfig.json
index 061a6e0515..1a12f583ae 100644
--- a/blocksuite/playground/tsconfig.json
+++ b/blocksuite/playground/tsconfig.json
@@ -8,16 +8,11 @@
},
"include": ["./apps", "./examples"],
"references": [
+ { "path": "../affine/all" },
{ "path": "../affine/components" },
{ "path": "../affine/model" },
{ "path": "../affine/shared" },
- { "path": "../framework/block-std" },
- { "path": "../blocks" },
{ "path": "../affine/data-view" },
- { "path": "../framework/global" },
- { "path": "../framework/inline" },
- { "path": "../integration-test" },
- { "path": "../framework/store" },
- { "path": "../framework/sync" }
+ { "path": "../integration-test" }
]
}
diff --git a/blocksuite/tests-legacy/e2e/database/actions.ts b/blocksuite/tests-legacy/e2e/database/actions.ts
index 5b2bdb680f..2a11c52bb3 100644
--- a/blocksuite/tests-legacy/e2e/database/actions.ts
+++ b/blocksuite/tests-legacy/e2e/database/actions.ts
@@ -1,5 +1,8 @@
-import type { RichTextCell, RichTextCellEditing } from '@blocksuite/blocks';
-import { ZERO_WIDTH_SPACE } from '@blocksuite/inline';
+import type {
+ RichTextCell,
+ RichTextCellEditing,
+} from '@blocksuite/affine/blocks';
+import { ZERO_WIDTH_SPACE } from '@blocksuite/affine/inline';
import { expect, type Locator, type Page } from '@playwright/test';
import {
diff --git a/blocksuite/tests-legacy/e2e/edgeless/auto-complete.spec.ts b/blocksuite/tests-legacy/e2e/edgeless/auto-complete.spec.ts
index 4c8b2ce422..e6af09215c 100644
--- a/blocksuite/tests-legacy/e2e/edgeless/auto-complete.spec.ts
+++ b/blocksuite/tests-legacy/e2e/edgeless/auto-complete.spec.ts
@@ -110,7 +110,7 @@ test.describe('auto-complete', () => {
await enterPlaygroundRoom(page);
await page.evaluate(() => {
window.doc
- .get(window.$blocksuite.blocks.FeatureFlagService)
+ .get(window.$blocksuite.services.FeatureFlagService)
.setFlag('enable_edgeless_text', false);
});
await initEmptyEdgelessState(page);
diff --git a/blocksuite/tests-legacy/e2e/edgeless/edgeless-text.spec.ts b/blocksuite/tests-legacy/e2e/edgeless/edgeless-text.spec.ts
index eec891d523..905c1ffe9d 100644
--- a/blocksuite/tests-legacy/e2e/edgeless/edgeless-text.spec.ts
+++ b/blocksuite/tests-legacy/e2e/edgeless/edgeless-text.spec.ts
@@ -1,5 +1,5 @@
-import type { EdgelessTextBlockComponent } from '@blocksuite/blocks';
-import { Bound } from '@blocksuite/global/gfx';
+import type { EdgelessTextBlockComponent } from '@blocksuite/affine/blocks';
+import { Bound } from '@blocksuite/affine/global/gfx';
import { expect, type Page } from '@playwright/test';
import {
diff --git a/blocksuite/tests-legacy/e2e/edgeless/shape.spec.ts b/blocksuite/tests-legacy/e2e/edgeless/shape.spec.ts
index c27502833d..54aa0a207b 100644
--- a/blocksuite/tests-legacy/e2e/edgeless/shape.spec.ts
+++ b/blocksuite/tests-legacy/e2e/edgeless/shape.spec.ts
@@ -647,7 +647,7 @@ test.describe('shape hit test', () => {
await enterPlaygroundRoom(page);
await page.evaluate(() => {
window.doc
- .get(window.$blocksuite.blocks.FeatureFlagService)
+ .get(window.$blocksuite.services.FeatureFlagService)
.setFlag('enable_edgeless_text', false);
});
await initEmptyEdgelessState(page);
diff --git a/blocksuite/tests-legacy/e2e/edgeless/text.spec.ts b/blocksuite/tests-legacy/e2e/edgeless/text.spec.ts
index b1d0959b17..83aa2549e9 100644
--- a/blocksuite/tests-legacy/e2e/edgeless/text.spec.ts
+++ b/blocksuite/tests-legacy/e2e/edgeless/text.spec.ts
@@ -41,7 +41,7 @@ test.describe('edgeless canvas text', () => {
await enterPlaygroundRoom(page);
await page.evaluate(() => {
window.doc
- .get(window.$blocksuite.blocks.FeatureFlagService)
+ .get(window.$blocksuite.services.FeatureFlagService)
.setFlag('enable_edgeless_text', false);
});
await initEmptyEdgelessState(page);
diff --git a/blocksuite/tests-legacy/e2e/embed-synced-doc.spec.ts b/blocksuite/tests-legacy/e2e/embed-synced-doc.spec.ts
index 8f0bbd6ac3..4c021bd363 100644
--- a/blocksuite/tests-legacy/e2e/embed-synced-doc.spec.ts
+++ b/blocksuite/tests-legacy/e2e/embed-synced-doc.spec.ts
@@ -1,4 +1,4 @@
-import type { DatabaseBlockModel } from '@blocksuite/blocks';
+import type { DatabaseBlockModel } from '@blocksuite/affine/blocks';
import { expect, type Page } from '@playwright/test';
import { switchEditorMode } from './utils/actions/edgeless.js';
diff --git a/blocksuite/tests-legacy/e2e/utils/actions/misc.ts b/blocksuite/tests-legacy/e2e/utils/actions/misc.ts
index d0217e297c..1da3c9b2f9 100644
--- a/blocksuite/tests-legacy/e2e/utils/actions/misc.ts
+++ b/blocksuite/tests-legacy/e2e/utils/actions/misc.ts
@@ -4,11 +4,11 @@ import type {
DatabaseBlockModel,
ListType,
RichText,
-} from '@blocksuite/blocks';
-import type { InlineRange, InlineRootElement } from '@blocksuite/inline';
+} from '@blocksuite/affine/blocks';
+import type { InlineRange, InlineRootElement } from '@blocksuite/affine/inline';
+import type { BlockModel } from '@blocksuite/affine/store';
+import { uuidv4 } from '@blocksuite/affine/store';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { BlockModel } from '@blocksuite/store';
-import { uuidv4 } from '@blocksuite/store';
import type { ConsoleMessage, Locator, Page } from '@playwright/test';
import { expect } from '@playwright/test';
import lz from 'lz-string';
@@ -1249,7 +1249,7 @@ export async function mockParseDocUrlService(
) {
await page.evaluate(mapping => {
const parseDocUrlService = window.host.std.get(
- window.$blocksuite.blocks.ParseDocUrlProvider
+ window.$blocksuite.services.ParseDocUrlProvider
);
parseDocUrlService.parseDocUrl = (url: string) => {
const docId = mapping[url];
diff --git a/blocksuite/tests-legacy/e2e/utils/asserts.ts b/blocksuite/tests-legacy/e2e/utils/asserts.ts
index e88bd5a350..4b22607ca9 100644
--- a/blocksuite/tests-legacy/e2e/utils/asserts.ts
+++ b/blocksuite/tests-legacy/e2e/utils/asserts.ts
@@ -4,16 +4,16 @@ import type {
BlockComponent,
EditorHost,
TextSelection,
-} from '@blocksuite/block-std';
+} from '@blocksuite/affine/block-std';
import type {
AffineInlineEditor,
EdgelessNoteBackground,
NoteBlockModel,
RichText,
RootBlockModel,
-} from '@blocksuite/blocks';
-import type { InlineRootElement } from '@blocksuite/inline';
-import type { BlockModel } from '@blocksuite/store';
+} from '@blocksuite/affine/blocks';
+import type { InlineRootElement } from '@blocksuite/affine/inline';
+import type { BlockModel } from '@blocksuite/affine/store';
import { expect, type Locator, type Page } from '@playwright/test';
import {
diff --git a/blocksuite/tests-legacy/e2e/utils/declare-test-window.ts b/blocksuite/tests-legacy/e2e/utils/declare-test-window.ts
index 32f0f3c53d..b4d6a4e460 100644
--- a/blocksuite/tests-legacy/e2e/utils/declare-test-window.ts
+++ b/blocksuite/tests-legacy/e2e/utils/declare-test-window.ts
@@ -1,7 +1,7 @@
-import type { EditorHost } from '@blocksuite/block-std';
-import type * as Effects from '@blocksuite/blocks/effects';
+import type { EditorHost } from '@blocksuite/affine/block-std';
+import type * as Effects from '@blocksuite/affine/effects';
+import type { Store, Transformer, Workspace } from '@blocksuite/affine/store';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
-import type { Store, Transformer, Workspace } from '@blocksuite/store';
declare const _GLOBAL_: typeof Effects;
@@ -11,13 +11,14 @@ declare global {
* the following instance are initialized in `packages/playground/apps/starter/main.ts`
*/
$blocksuite: {
- store: typeof import('@blocksuite/store');
- blocks: typeof import('@blocksuite/blocks');
+ store: typeof import('@blocksuite/affine/store');
+ blocks: typeof import('@blocksuite/affine/blocks');
global: {
- utils: typeof import('@blocksuite/global/utils');
+ utils: typeof import('@blocksuite/affine/global/utils');
};
+ services: typeof import('@blocksuite/affine/shared/services');
editor: typeof import('@blocksuite/integration-test');
- blockStd: typeof import('@blocksuite/block-std');
+ blockStd: typeof import('@blocksuite/affine/block-std');
};
collection: Workspace;
doc: Store;
diff --git a/blocksuite/tests-legacy/e2e/utils/mindmap.ts b/blocksuite/tests-legacy/e2e/utils/mindmap.ts
index 2da1c44f0f..48857582cf 100644
--- a/blocksuite/tests-legacy/e2e/utils/mindmap.ts
+++ b/blocksuite/tests-legacy/e2e/utils/mindmap.ts
@@ -2,7 +2,7 @@ import type {
MindmapElementModel,
MindmapNode,
ShapeElementModel,
-} from '@blocksuite/blocks';
+} from '@blocksuite/affine/blocks';
import type { Page } from '@playwright/test';
import { clickView } from './actions/click.js';
diff --git a/blocksuite/tests-legacy/package.json b/blocksuite/tests-legacy/package.json
index 258aca26e9..823b4fc6e6 100644
--- a/blocksuite/tests-legacy/package.json
+++ b/blocksuite/tests-legacy/package.json
@@ -7,12 +7,8 @@
"test": "yarn playwright test"
},
"dependencies": {
- "@blocksuite/block-std": "workspace:*",
- "@blocksuite/blocks": "workspace:*",
- "@blocksuite/global": "workspace:*",
- "@blocksuite/inline": "workspace:*",
+ "@blocksuite/affine": "workspace:*",
"@blocksuite/integration-test": "workspace:*",
- "@blocksuite/store": "workspace:*",
"@playwright/test": "=1.51.0",
"@toeverything/theme": "^1.1.12"
},
diff --git a/blocksuite/tests-legacy/tsconfig.json b/blocksuite/tests-legacy/tsconfig.json
index d75000b864..a464d9421c 100644
--- a/blocksuite/tests-legacy/tsconfig.json
+++ b/blocksuite/tests-legacy/tsconfig.json
@@ -6,12 +6,5 @@
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
},
"include": ["./e2e"],
- "references": [
- { "path": "../framework/block-std" },
- { "path": "../blocks" },
- { "path": "../framework/global" },
- { "path": "../framework/inline" },
- { "path": "../integration-test" },
- { "path": "../framework/store" }
- ]
+ "references": [{ "path": "../affine/all" }, { "path": "../integration-test" }]
}
diff --git a/packages/frontend/apps/ios/src/bs-menu-config.tsx b/packages/frontend/apps/ios/src/bs-menu-config.tsx
index 521fe8ea7f..67d57a85ea 100644
--- a/packages/frontend/apps/ios/src/bs-menu-config.tsx
+++ b/packages/frontend/apps/ios/src/bs-menu-config.tsx
@@ -1,5 +1,5 @@
import { NavigationGestureService } from '@affine/core/mobile/modules/navigation-gesture';
-import { onMenuOpen } from '@blocksuite/affine/blocks';
+import { onMenuOpen } from '@blocksuite/affine/components/context-menu';
import { useService } from '@toeverything/infra';
import { type PropsWithChildren, useCallback, useEffect, useRef } from 'react';
diff --git a/packages/frontend/core/src/blocksuite/ai/_common/chat-actions-handle.ts b/packages/frontend/core/src/blocksuite/ai/_common/chat-actions-handle.ts
index 618bb1a566..6e3655f31b 100644
--- a/packages/frontend/core/src/blocksuite/ai/_common/chat-actions-handle.ts
+++ b/packages/frontend/core/src/blocksuite/ai/_common/chat-actions-handle.ts
@@ -8,22 +8,24 @@ import {
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
import type { DocMode, ImageSelection } from '@blocksuite/affine/blocks';
import {
- DocModeProvider,
EdgelessCRUDIdentifier,
- EditPropsStore,
getSelectedBlocksCommand,
- matchModels,
NoteDisplayMode,
- NotificationProvider,
ParagraphBlockModel,
RefNodeSlotsProvider,
- TelemetryProvider,
} from '@blocksuite/affine/blocks';
import {
Bound,
getCommonBoundWithRotation,
type SerializedXYWH,
} from '@blocksuite/affine/global/gfx';
+import {
+ DocModeProvider,
+ EditPropsStore,
+ NotificationProvider,
+ TelemetryProvider,
+} from '@blocksuite/affine/shared/services';
+import { matchModels } from '@blocksuite/affine/shared/utils';
import type { Store } from '@blocksuite/affine/store';
import {
BlockIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/_common/config.ts b/packages/frontend/core/src/blocksuite/ai/_common/config.ts
index ef974b704b..2c4a91ca8a 100644
--- a/packages/frontend/core/src/blocksuite/ai/_common/config.ts
+++ b/packages/frontend/core/src/blocksuite/ai/_common/config.ts
@@ -4,9 +4,9 @@ import {
getSelectedModelsCommand,
ImageBlockModel,
ListBlockModel,
- matchModels,
ParagraphBlockModel,
} from '@blocksuite/affine/blocks';
+import { matchModels } from '@blocksuite/affine/shared/utils';
import {
CommentIcon,
DoneIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/actions/doc-handler.ts b/packages/frontend/core/src/blocksuite/ai/actions/doc-handler.ts
index 1c3f39d801..f6e47fefb7 100644
--- a/packages/frontend/core/src/blocksuite/ai/actions/doc-handler.ts
+++ b/packages/frontend/core/src/blocksuite/ai/actions/doc-handler.ts
@@ -1,8 +1,6 @@
import { type EditorHost, TextSelection } from '@blocksuite/affine/block-std';
-import {
- AIStarIconWithAnimation,
- createLitPortal,
-} from '@blocksuite/affine/blocks';
+import { AIStarIconWithAnimation } from '@blocksuite/affine/components/icons';
+import { createLitPortal } from '@blocksuite/affine/components/portal';
import { flip, offset } from '@floating-ui/dom';
import { html, type TemplateResult } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/actions/edgeless-handler.ts b/packages/frontend/core/src/blocksuite/ai/actions/edgeless-handler.ts
index 9339daf701..2db1a71151 100644
--- a/packages/frontend/core/src/blocksuite/ai/actions/edgeless-handler.ts
+++ b/packages/frontend/core/src/blocksuite/ai/actions/edgeless-handler.ts
@@ -8,12 +8,12 @@ import {
EdgelessTextBlockModel,
EmbedSyncedDocModel,
ImageBlockModel,
- matchModels,
NoteBlockModel,
ShapeElementModel,
splitElements,
TextElementModel,
} from '@blocksuite/affine/blocks';
+import { matchModels } from '@blocksuite/affine/shared/utils';
import { Slice } from '@blocksuite/affine/store';
import type { TemplateResult } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/actions/edgeless-response.ts b/packages/frontend/core/src/blocksuite/ai/actions/edgeless-response.ts
index a7193288ce..a75459f697 100644
--- a/packages/frontend/core/src/blocksuite/ai/actions/edgeless-response.ts
+++ b/packages/frontend/core/src/blocksuite/ai/actions/edgeless-response.ts
@@ -14,12 +14,12 @@ import {
fitContent,
getSurfaceBlock,
ImageBlockModel,
- LightLoadingIcon,
MindmapUtils,
NoteDisplayMode,
- TelemetryProvider,
} from '@blocksuite/affine/blocks';
+import { LightLoadingIcon } from '@blocksuite/affine/components/icons';
import { Bound } from '@blocksuite/affine/global/gfx';
+import { TelemetryProvider } from '@blocksuite/affine/shared/services';
import {
ChatWithAiIcon,
DeleteIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/actions/page-response.ts b/packages/frontend/core/src/blocksuite/ai/actions/page-response.ts
index fcdf30bec8..ea0f8a5168 100644
--- a/packages/frontend/core/src/blocksuite/ai/actions/page-response.ts
+++ b/packages/frontend/core/src/blocksuite/ai/actions/page-response.ts
@@ -12,10 +12,10 @@ import {
fitContent,
getSurfaceBlock,
SurfaceBlockModel,
- TelemetryProvider,
uploadBlobForImage,
} from '@blocksuite/affine/blocks';
import { Bound, getCommonBound } from '@blocksuite/affine/global/gfx';
+import { TelemetryProvider } from '@blocksuite/affine/shared/services';
import { type BlockProps, Text } from '@blocksuite/affine/store';
import * as Y from 'yjs';
diff --git a/packages/frontend/core/src/blocksuite/ai/ai-panel.ts b/packages/frontend/core/src/blocksuite/ai/ai-panel.ts
index eea92fdc44..f02149830b 100644
--- a/packages/frontend/core/src/blocksuite/ai/ai-panel.ts
+++ b/packages/frontend/core/src/blocksuite/ai/ai-panel.ts
@@ -3,12 +3,14 @@ import type { EditorHost } from '@blocksuite/affine/block-std';
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
import {
ImageBlockModel,
- isInsideEdgelessEditor,
- matchModels,
NoteBlockModel,
NoteDisplayMode,
} from '@blocksuite/affine/blocks';
import { Bound } from '@blocksuite/affine/global/gfx';
+import {
+ isInsideEdgelessEditor,
+ matchModels,
+} from '@blocksuite/affine/shared/utils';
import {
ChatWithAiIcon,
DeleteIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/blocks/ai-chat-block/ai-chat-block.ts b/packages/frontend/core/src/blocksuite/ai/blocks/ai-chat-block/ai-chat-block.ts
index 3536ff77ea..2d6b293d21 100644
--- a/packages/frontend/core/src/blocksuite/ai/blocks/ai-chat-block/ai-chat-block.ts
+++ b/packages/frontend/core/src/blocksuite/ai/blocks/ai-chat-block/ai-chat-block.ts
@@ -1,5 +1,5 @@
import { BlockComponent } from '@blocksuite/affine/block-std';
-import { Peekable } from '@blocksuite/affine/blocks';
+import { Peekable } from '@blocksuite/affine/components/peek';
import { computed } from '@preact/signals-core';
import { html } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/actions/chat-text.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/actions/chat-text.ts
index aab230305b..c46f7b8c03 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/actions/chat-text.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/actions/chat-text.ts
@@ -2,8 +2,8 @@ import './action-wrapper';
import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/affine/block-std';
-import type { SpecBuilder } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
import { html, nothing } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-chips.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-chips.ts
index 2a897aef02..00f71c3f68 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-chips.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-chips.ts
@@ -2,7 +2,7 @@ import {
type EditorHost,
ShadowlessElement,
} from '@blocksuite/affine/block-std';
-import { createLitPortal } from '@blocksuite/affine/blocks';
+import { createLitPortal } from '@blocksuite/affine/components/portal';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { PlusIcon } from '@blocksuite/icons/lit';
import { flip, offset } from '@floating-ui/dom';
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-input.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-input.ts
index 25a57b56fc..a3458dd78d 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-input.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-input.ts
@@ -1,7 +1,8 @@
import { stopPropagation } from '@affine/core/utils';
import type { EditorHost } from '@blocksuite/affine/block-std';
-import { openFileOrFiles, unsafeCSSVarV2 } from '@blocksuite/affine/blocks';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
+import { openFileOrFiles } from '@blocksuite/affine/shared/utils';
import {
BroomIcon,
CloseIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-messages.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-messages.ts
index 2a348bcb01..fa66a4f4da 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-messages.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/chat-panel-messages.ts
@@ -1,12 +1,14 @@
import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/affine/block-std';
+import { WithDisposable } from '@blocksuite/affine/global/lit';
import {
DocModeProvider,
FeatureFlagService,
+} from '@blocksuite/affine/shared/services';
+import {
isInsidePageEditor,
type SpecBuilder,
-} from '@blocksuite/affine/blocks';
-import { WithDisposable } from '@blocksuite/affine/global/lit';
+} from '@blocksuite/affine/shared/utils';
import type { BaseSelection } from '@blocksuite/affine/store';
import {
AiIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/components/add-popover.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/components/add-popover.ts
index a0e75684ef..be76aa4d63 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/components/add-popover.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/components/add-popover.ts
@@ -1,9 +1,7 @@
import { ShadowlessElement } from '@blocksuite/affine/block-std';
-import {
- type LinkedMenuGroup,
- scrollbarStyle,
-} from '@blocksuite/affine/blocks';
+import { type LinkedMenuGroup } from '@blocksuite/affine/blocks';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { scrollbarStyle } from '@blocksuite/affine/shared/styles';
import { SearchIcon } from '@blocksuite/icons/lit';
import type { DocMeta } from '@blocksuite/store';
import { css, html } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/components/file-chip.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/components/file-chip.ts
index b23324e7fe..4424f66fbf 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/components/file-chip.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/components/file-chip.ts
@@ -1,5 +1,5 @@
import { ShadowlessElement } from '@blocksuite/affine/block-std';
-import { getAttachmentFileIcon } from '@blocksuite/affine/blocks';
+import { getAttachmentFileIcon } from '@blocksuite/affine/components/icons';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
import { html } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts
index c6e83df8c4..a4289b2ae2 100644
--- a/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts
+++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/index.ts
@@ -3,11 +3,9 @@ import './chat-panel-messages';
import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/affine/block-std';
-import {
- NotificationProvider,
- type SpecBuilder,
-} from '@blocksuite/affine/blocks';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { NotificationProvider } from '@blocksuite/affine/shared/services';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
import type { Store } from '@blocksuite/affine/store';
import { HelpIcon, InformationIcon } from '@blocksuite/icons/lit';
import { type Signal, signal } from '@preact/signals-core';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item-list.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item-list.ts
index 0e8ab70f52..d8bb166b4a 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item-list.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item-list.ts
@@ -3,7 +3,7 @@ import {
PropTypes,
requiredProperties,
} from '@blocksuite/affine/block-std';
-import { createLitPortal } from '@blocksuite/affine/blocks';
+import { createLitPortal } from '@blocksuite/affine/components/portal';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { flip, offset } from '@floating-ui/dom';
import { baseTheme } from '@toeverything/theme';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item.ts
index 061880f19e..d856cec88b 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-item.ts
@@ -3,7 +3,7 @@ import {
PropTypes,
requiredProperties,
} from '@blocksuite/affine/block-std';
-import { ArrowRightIcon, EnterIcon } from '@blocksuite/affine/blocks';
+import { ArrowRightIcon, EnterIcon } from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { css, html, LitElement, nothing } from 'lit';
import { property, query } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-sub-item-list.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-sub-item-list.ts
index 0bb44b33ad..9b86a61e92 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-sub-item-list.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ai-item/ai-sub-item-list.ts
@@ -3,8 +3,9 @@ import {
PropTypes,
requiredProperties,
} from '@blocksuite/affine/block-std';
-import { EnterIcon, stopPropagation } from '@blocksuite/affine/blocks';
+import { EnterIcon } from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { stopPropagation } from '@blocksuite/affine/shared/utils';
import { baseTheme } from '@toeverything/theme';
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-scrollable-text-renderer.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-scrollable-text-renderer.ts
index 688f91415f..0054568605 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ai-scrollable-text-renderer.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ai-scrollable-text-renderer.ts
@@ -2,8 +2,8 @@ import {
type EditorHost,
ShadowlessElement,
} from '@blocksuite/affine/block-std';
-import { scrollbarStyle } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { scrollbarStyle } from '@blocksuite/affine/shared/styles';
import type { PropertyValues } from 'lit';
import { css, html } from 'lit';
import { property, query } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-button.ts b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-button.ts
index 00e217d9d8..d67aefd499 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-button.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-button.ts
@@ -1,7 +1,8 @@
import './ask-ai-panel';
import { type EditorHost } from '@blocksuite/affine/block-std';
-import { createLitPortal, HoverController } from '@blocksuite/affine/blocks';
+import { HoverController } from '@blocksuite/affine/components/hover';
+import { createLitPortal } from '@blocksuite/affine/components/portal';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { flip, offset } from '@floating-ui/dom';
import { css, html, LitElement, nothing } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-icon.ts b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-icon.ts
index 90f20d76fa..12b0851aaf 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-icon.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-icon.ts
@@ -1,4 +1,4 @@
-import { AIStarIcon } from '@blocksuite/affine/blocks';
+import { AIStarIcon } from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-panel.ts b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-panel.ts
index d46d178f5b..a77b403f58 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-panel.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-panel.ts
@@ -1,6 +1,7 @@
import { type EditorHost } from '@blocksuite/affine/block-std';
-import { DocModeProvider, scrollbarStyle } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { DocModeProvider } from '@blocksuite/affine/shared/services';
+import { scrollbarStyle } from '@blocksuite/affine/shared/styles';
import { cssVar } from '@toeverything/theme';
import { css, html, LitElement, unsafeCSS } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-toolbar.ts b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-toolbar.ts
index 41a9021eb4..93dfad832f 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/ask-ai-toolbar.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/ask-ai-toolbar.ts
@@ -3,7 +3,7 @@ import {
type EditorHost,
TextSelection,
} from '@blocksuite/affine/block-std';
-import { createLitPortal } from '@blocksuite/affine/blocks';
+import { createLitPortal } from '@blocksuite/affine/components/portal';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { flip, offset } from '@floating-ui/dom';
import { css, html, LitElement } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/chat-action-list.ts b/packages/frontend/core/src/blocksuite/ai/components/chat-action-list.ts
index 7c19d938f0..d266060d61 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/chat-action-list.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/chat-action-list.ts
@@ -3,10 +3,8 @@ import type {
EditorHost,
TextSelection,
} from '@blocksuite/affine/block-std';
-import {
- type ImageSelection,
- NotificationProvider,
-} from '@blocksuite/affine/blocks';
+import { type ImageSelection } from '@blocksuite/affine/blocks';
+import { NotificationProvider } from '@blocksuite/affine/shared/services';
import { css, html, LitElement, nothing } from 'lit';
import { property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/copy-more.ts b/packages/frontend/core/src/blocksuite/ai/components/copy-more.ts
index 33dddc7211..4ed203d305 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/copy-more.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/copy-more.ts
@@ -3,14 +3,12 @@ import type {
EditorHost,
TextSelection,
} from '@blocksuite/affine/block-std';
-import {
- createButtonPopper,
- NotificationProvider,
- Tooltip,
- unsafeCSSVarV2,
-} from '@blocksuite/affine/blocks';
+import { Tooltip } from '@blocksuite/affine/components/toolbar';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { noop } from '@blocksuite/affine/global/utils';
+import { NotificationProvider } from '@blocksuite/affine/shared/services';
+import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
+import { createButtonPopper } from '@blocksuite/affine/shared/utils';
import { CopyIcon, MoreHorizontalIcon, ResetIcon } from '@blocksuite/icons/lit';
import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
import { property, query, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/components/image-preview-grid.ts b/packages/frontend/core/src/blocksuite/ai/components/image-preview-grid.ts
index 830e6a41bb..3622620fd0 100644
--- a/packages/frontend/core/src/blocksuite/ai/components/image-preview-grid.ts
+++ b/packages/frontend/core/src/blocksuite/ai/components/image-preview-grid.ts
@@ -1,4 +1,4 @@
-import { scrollbarStyle } from '@blocksuite/affine/blocks';
+import { scrollbarStyle } from '@blocksuite/affine/shared/styles';
import { CloseIcon } from '@blocksuite/icons/lit';
import { css, html, LitElement } from 'lit';
import { property, query, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/effects.ts b/packages/frontend/core/src/blocksuite/ai/effects.ts
index 28e73e62bf..d742bf040d 100644
--- a/packages/frontend/core/src/blocksuite/ai/effects.ts
+++ b/packages/frontend/core/src/blocksuite/ai/effects.ts
@@ -1,4 +1,4 @@
-import { SpecProvider } from '@blocksuite/affine/blocks';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
import { AIChatBlockComponent } from './blocks/ai-chat-block/ai-chat-block';
import { EdgelessAIChatBlockComponent } from './blocks/ai-chat-block/ai-chat-edgeless-block';
diff --git a/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts b/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts
index abd0729d3a..3d25ebe2bf 100644
--- a/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts
+++ b/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts
@@ -1,10 +1,10 @@
import {
- AIStarIconWithAnimation,
MindmapElementModel,
ShapeElementModel,
splitElements,
TextElementModel,
} from '@blocksuite/affine/blocks';
+import { AIStarIconWithAnimation } from '@blocksuite/affine/components/icons';
import {
CommentIcon,
ExplainIcon,
diff --git a/packages/frontend/core/src/blocksuite/ai/entries/format-bar/setup-format-bar.ts b/packages/frontend/core/src/blocksuite/ai/entries/format-bar/setup-format-bar.ts
index 36b7aa1347..153700ccda 100644
--- a/packages/frontend/core/src/blocksuite/ai/entries/format-bar/setup-format-bar.ts
+++ b/packages/frontend/core/src/blocksuite/ai/entries/format-bar/setup-format-bar.ts
@@ -3,7 +3,7 @@ import '../../components/ask-ai-button';
import {
ActionPlacement,
type ToolbarModuleConfig,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
import { html } from 'lit';
import { pageAIGroups } from '../../_common/config';
diff --git a/packages/frontend/core/src/blocksuite/ai/extensions/ai-edgeless-root.ts b/packages/frontend/core/src/blocksuite/ai/extensions/ai-edgeless-root.ts
index 7d0a8c84a9..a9c18288b7 100644
--- a/packages/frontend/core/src/blocksuite/ai/extensions/ai-edgeless-root.ts
+++ b/packages/frontend/core/src/blocksuite/ai/extensions/ai-edgeless-root.ts
@@ -5,8 +5,8 @@ import {
import {
EdgelessElementToolbarWidget,
EdgelessRootBlockSpec,
- ToolbarModuleExtension,
} from '@blocksuite/affine/blocks';
+import { ToolbarModuleExtension } from '@blocksuite/affine/shared/services';
import type { ExtensionType } from '@blocksuite/affine/store';
import type { FrameworkProvider } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/ai/extensions/ai-page-root.ts b/packages/frontend/core/src/blocksuite/ai/extensions/ai-page-root.ts
index 1cfa6cfcf5..accfdbd5de 100644
--- a/packages/frontend/core/src/blocksuite/ai/extensions/ai-page-root.ts
+++ b/packages/frontend/core/src/blocksuite/ai/extensions/ai-page-root.ts
@@ -2,10 +2,8 @@ import {
BlockFlavourIdentifier,
LifeCycleWatcher,
} from '@blocksuite/affine/block-std';
-import {
- PageRootBlockSpec,
- ToolbarModuleExtension,
-} from '@blocksuite/affine/blocks';
+import { PageRootBlockSpec } from '@blocksuite/affine/blocks';
+import { ToolbarModuleExtension } from '@blocksuite/affine/shared/services';
import type { ExtensionType } from '@blocksuite/affine/store';
import type { FrameworkProvider } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/ai/extensions/ai-slash-menu.ts b/packages/frontend/core/src/blocksuite/ai/extensions/ai-slash-menu.ts
index 13b904fbc0..21f9030a26 100644
--- a/packages/frontend/core/src/blocksuite/ai/extensions/ai-slash-menu.ts
+++ b/packages/frontend/core/src/blocksuite/ai/extensions/ai-slash-menu.ts
@@ -1,12 +1,12 @@
import {
- AIStarIcon,
- DocModeProvider,
type SlashMenuActionItem,
SlashMenuConfigExtension,
type SlashMenuContext,
type SlashMenuItem,
type SlashMenuSubMenu,
} from '@blocksuite/affine/blocks';
+import { AIStarIcon } from '@blocksuite/affine/components/icons';
+import { DocModeProvider } from '@blocksuite/affine/shared/services';
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
import { html } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/extensions/enable-ai.ts b/packages/frontend/core/src/blocksuite/ai/extensions/enable-ai.ts
index 6e4b0c79c4..61f608a0ed 100644
--- a/packages/frontend/core/src/blocksuite/ai/extensions/enable-ai.ts
+++ b/packages/frontend/core/src/blocksuite/ai/extensions/enable-ai.ts
@@ -4,8 +4,8 @@ import {
ImageBlockSpec,
PageRootBlockSpec,
ParagraphBlockSpec,
- type SpecBuilder,
} from '@blocksuite/affine/blocks';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
import type { FrameworkProvider } from '@toeverything/infra';
import { AIChatBlockSpec } from '../blocks';
diff --git a/packages/frontend/core/src/blocksuite/ai/messages/error.ts b/packages/frontend/core/src/blocksuite/ai/messages/error.ts
index ee5c59812d..aa8ff572f5 100644
--- a/packages/frontend/core/src/blocksuite/ai/messages/error.ts
+++ b/packages/frontend/core/src/blocksuite/ai/messages/error.ts
@@ -1,6 +1,7 @@
import { type EditorHost } from '@blocksuite/affine/block-std';
-import { scrollbarStyle, unsafeCSSVarV2 } from '@blocksuite/affine/blocks';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { scrollbarStyle } from '@blocksuite/affine/shared/styles';
+import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
import { InformationIcon, ToggleDownIcon } from '@blocksuite/icons/lit';
import { signal } from '@preact/signals-core';
import { baseTheme } from '@toeverything/theme';
diff --git a/packages/frontend/core/src/blocksuite/ai/messages/slides-renderer.ts b/packages/frontend/core/src/blocksuite/ai/messages/slides-renderer.ts
index 3dbc030eeb..a84ca231b3 100644
--- a/packages/frontend/core/src/blocksuite/ai/messages/slides-renderer.ts
+++ b/packages/frontend/core/src/blocksuite/ai/messages/slides-renderer.ts
@@ -1,7 +1,7 @@
import { WorkspaceImpl } from '@affine/core/modules/workspace/impls/workspace';
import { BlockStdScope, type EditorHost } from '@blocksuite/affine/block-std';
-import { SpecProvider } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
import type { Store } from '@blocksuite/affine/store';
import { css, html, LitElement, nothing } from 'lit';
import { property, query } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/mini-mindmap/spec.ts b/packages/frontend/core/src/blocksuite/ai/mini-mindmap/spec.ts
index ded05d1bca..f4b1b1bbcf 100644
--- a/packages/frontend/core/src/blocksuite/ai/mini-mindmap/spec.ts
+++ b/packages/frontend/core/src/blocksuite/ai/mini-mindmap/spec.ts
@@ -3,12 +3,14 @@ import {
FlavourExtension,
} from '@blocksuite/affine/block-std';
import {
- DocModeService,
MindMapView,
RootBlockSchema,
SurfaceBlockSchema,
- ThemeService,
} from '@blocksuite/affine/blocks';
+import {
+ DocModeService,
+ ThemeService,
+} from '@blocksuite/affine/shared/services';
import type { BlockSchema, ExtensionType } from '@blocksuite/affine/store';
import { literal } from 'lit/static-html.js';
import type { z } from 'zod';
diff --git a/packages/frontend/core/src/blocksuite/ai/mini-mindmap/surface-block.ts b/packages/frontend/core/src/blocksuite/ai/mini-mindmap/surface-block.ts
index 2b23313d36..c652b9c82a 100644
--- a/packages/frontend/core/src/blocksuite/ai/mini-mindmap/surface-block.ts
+++ b/packages/frontend/core/src/blocksuite/ai/mini-mindmap/surface-block.ts
@@ -10,9 +10,9 @@ import {
CanvasRenderer,
elementRenderers,
fitContent,
- ThemeProvider,
} from '@blocksuite/affine/blocks';
import type { Bound } from '@blocksuite/affine/global/gfx';
+import { ThemeProvider } from '@blocksuite/affine/shared/services';
import { html } from 'lit';
import { query } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-input.ts b/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-input.ts
index f304b1ad88..29812faff5 100644
--- a/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-input.ts
+++ b/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-input.ts
@@ -1,6 +1,7 @@
import type { EditorHost } from '@blocksuite/affine/block-std';
-import { openFileOrFiles, unsafeCSSVarV2 } from '@blocksuite/affine/blocks';
import { SignalWatcher } from '@blocksuite/affine/global/lit';
+import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
+import { openFileOrFiles } from '@blocksuite/affine/shared/utils';
import { BroomIcon, ImageIcon, PublishIcon } from '@blocksuite/icons/lit';
import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-peek-view.ts b/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-peek-view.ts
index 0d826d23b7..6bd4af2d5a 100644
--- a/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-peek-view.ts
+++ b/packages/frontend/core/src/blocksuite/ai/peek-view/chat-block-peek-view.ts
@@ -2,13 +2,15 @@ import type { EditorHost } from '@blocksuite/affine/block-std';
import {
CanvasElementType,
ConnectorMode,
- DocModeProvider,
EdgelessCRUDIdentifier,
getSurfaceBlock,
+} from '@blocksuite/affine/blocks';
+import {
+ DocModeProvider,
NotificationProvider,
- type SpecBuilder,
TelemetryProvider,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
import { InformationIcon } from '@blocksuite/icons/lit';
import { html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/utils/edgeless.ts b/packages/frontend/core/src/blocksuite/ai/utils/edgeless.ts
index 35df517acc..52067bad48 100644
--- a/packages/frontend/core/src/blocksuite/ai/utils/edgeless.ts
+++ b/packages/frontend/core/src/blocksuite/ai/utils/edgeless.ts
@@ -1,13 +1,13 @@
import type { BlockComponent, EditorHost } from '@blocksuite/affine/block-std';
import type { GfxModel } from '@blocksuite/affine/block-std/gfx';
import {
- matchModels,
MindmapElementModel,
NoteBlockModel,
RootBlockModel,
type ShapeElementModel,
SurfaceBlockModel,
} from '@blocksuite/affine/blocks';
+import { matchModels } from '@blocksuite/affine/shared/utils';
import {
AFFINE_EDGELESS_COPILOT_WIDGET,
diff --git a/packages/frontend/core/src/blocksuite/ai/utils/editor-actions.ts b/packages/frontend/core/src/blocksuite/ai/utils/editor-actions.ts
index 160c178903..b6d6999d56 100644
--- a/packages/frontend/core/src/blocksuite/ai/utils/editor-actions.ts
+++ b/packages/frontend/core/src/blocksuite/ai/utils/editor-actions.ts
@@ -8,8 +8,8 @@ import {
import {
defaultImageProxyMiddleware,
deleteTextCommand,
- isInsideEdgelessEditor,
} from '@blocksuite/affine/blocks';
+import { isInsideEdgelessEditor } from '@blocksuite/affine/shared/utils';
import { type BlockModel, Slice } from '@blocksuite/affine/store';
import {
diff --git a/packages/frontend/core/src/blocksuite/ai/utils/extract.ts b/packages/frontend/core/src/blocksuite/ai/utils/extract.ts
index 60eb8edbd7..303717230b 100644
--- a/packages/frontend/core/src/blocksuite/ai/utils/extract.ts
+++ b/packages/frontend/core/src/blocksuite/ai/utils/extract.ts
@@ -1,19 +1,21 @@
import type { EditorHost } from '@blocksuite/affine/block-std';
import {
DatabaseBlockModel,
- DocModeProvider,
embedSyncedDocMiddleware,
getImageSelectionsCommand,
getSelectedBlocksCommand,
ImageBlockModel,
- isInsideEdgelessEditor,
MarkdownAdapter,
- matchModels,
type NoteBlockModel,
NoteDisplayMode,
titleMiddleware,
} from '@blocksuite/affine/blocks';
import type { ServiceProvider } from '@blocksuite/affine/global/di';
+import { DocModeProvider } from '@blocksuite/affine/shared/services';
+import {
+ isInsideEdgelessEditor,
+ matchModels,
+} from '@blocksuite/affine/shared/utils';
import type { BlockModel, Store } from '@blocksuite/affine/store';
import { Slice, toDraftModel } from '@blocksuite/affine/store';
diff --git a/packages/frontend/core/src/blocksuite/ai/utils/selection-utils.ts b/packages/frontend/core/src/blocksuite/ai/utils/selection-utils.ts
index d373d01a3e..f255db52e2 100644
--- a/packages/frontend/core/src/blocksuite/ai/utils/selection-utils.ts
+++ b/packages/frontend/core/src/blocksuite/ai/utils/selection-utils.ts
@@ -14,10 +14,10 @@ import {
getTextSelectionCommand,
ImageBlockModel,
isCanvasElement,
- matchModels,
splitElements,
type SurfaceBlockComponent,
} from '@blocksuite/affine/blocks';
+import { matchModels } from '@blocksuite/affine/shared/utils';
import {
type BlockModel,
type DraftModel,
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/ai-panel.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/ai-panel.ts
index c064902294..c47efed170 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/ai-panel.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/ai-panel.ts
@@ -6,14 +6,18 @@ import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
import {
AFFINE_VIEWPORT_OVERLAY_WIDGET,
type AffineViewportOverlayWidget,
+} from '@blocksuite/affine/blocks';
+import {
DocModeProvider,
- getPageRootByElement,
NotificationProvider,
- stopPropagation,
ThemeProvider,
ToolbarFlag,
ToolbarRegistryIdentifier,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
+import {
+ getPageRootByElement,
+ stopPropagation,
+} from '@blocksuite/affine/shared/utils';
import type { BaseSelection } from '@blocksuite/affine/store';
import {
autoPlacement,
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/finish-tip.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/finish-tip.ts
index 88e1ab8931..a923d46236 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/finish-tip.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/finish-tip.ts
@@ -2,10 +2,10 @@ import type { EditorHost } from '@blocksuite/affine/block-std';
import {
AIDoneIcon,
CopyIcon,
- NotificationProvider,
WarningIcon,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { NotificationProvider } from '@blocksuite/affine/shared/services';
import { baseTheme } from '@toeverything/theme';
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
import { property, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/generating-placeholder.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/generating-placeholder.ts
index e31287a7bd..f6775c41c0 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/generating-placeholder.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/generating-placeholder.ts
@@ -1,10 +1,10 @@
+import { ColorScheme } from '@blocksuite/affine/blocks';
import {
- ColorScheme,
DarkLoadingIcon,
LightLoadingIcon,
- unsafeCSSVar,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { unsafeCSSVar } from '@blocksuite/affine/shared/theme';
import { baseTheme } from '@toeverything/theme';
import {
css,
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/generating.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/generating.ts
index e4701fe54e..fb037f05b0 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/generating.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/generating.ts
@@ -1,5 +1,8 @@
import type { ColorScheme } from '@blocksuite/affine/blocks';
-import { AIStarIconWithAnimation, AIStopIcon } from '@blocksuite/affine/blocks';
+import {
+ AIStarIconWithAnimation,
+ AIStopIcon,
+} from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { baseTheme } from '@toeverything/theme';
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts
index 88088d5aae..cebc131784 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/components/state/input.ts
@@ -1,9 +1,7 @@
-import {
- AIStarIcon,
- stopPropagation,
- unsafeCSSVarV2,
-} from '@blocksuite/affine/blocks';
+import { AIStarIcon } from '@blocksuite/affine/components/icons';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
+import { stopPropagation } from '@blocksuite/affine/shared/utils';
import { PublishIcon, SendIcon } from '@blocksuite/icons/lit';
import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/utils.ts b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/utils.ts
index d26160950c..e94f1176b3 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/utils.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/ai-panel/utils.ts
@@ -1,5 +1,5 @@
import type { EditorHost } from '@blocksuite/affine/block-std';
-import { isInsidePageEditor } from '@blocksuite/affine/blocks';
+import { isInsidePageEditor } from '@blocksuite/affine/shared/utils';
import type { AIItemGroupConfig } from '../../components/ai-item/types';
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/index.ts b/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/index.ts
index b2103220c5..85acf82947 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/index.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/index.ts
@@ -1,6 +1,7 @@
import type { EditorHost } from '@blocksuite/affine/block-std';
-import { on, scrollbarStyle, stopPropagation } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/lit';
+import { scrollbarStyle } from '@blocksuite/affine/shared/styles';
+import { on, stopPropagation } from '@blocksuite/affine/shared/utils';
import { css, html, LitElement, nothing } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/toolbar-entry.ts b/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/toolbar-entry.ts
index 519b87d38e..8a358e4c5c 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/toolbar-entry.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot-panel/toolbar-entry.ts
@@ -3,7 +3,8 @@ import {
GfxControllerIdentifier,
isGfxGroupCompatibleModel,
} from '@blocksuite/affine/block-std/gfx';
-import { AIStarIcon, sortEdgelessElements } from '@blocksuite/affine/blocks';
+import { sortEdgelessElements } from '@blocksuite/affine/blocks';
+import { AIStarIcon } from '@blocksuite/affine/components/icons';
import { WithDisposable } from '@blocksuite/affine/global/lit';
import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot/index.ts b/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot/index.ts
index 240b2703bd..b590599827 100644
--- a/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot/index.ts
+++ b/packages/frontend/core/src/blocksuite/ai/widgets/edgeless-copilot/index.ts
@@ -4,15 +4,15 @@ import {
} from '@blocksuite/affine/block-std';
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
import type { RootBlockModel } from '@blocksuite/affine/blocks';
-import {
- EdgelessLegacySlotIdentifier,
- MOUSE_BUTTON,
- requestConnectedFrame,
-} from '@blocksuite/affine/blocks';
+import { EdgelessLegacySlotIdentifier } from '@blocksuite/affine/blocks';
import {
Bound,
getCommonBoundWithRotation,
} from '@blocksuite/affine/global/gfx';
+import {
+ MOUSE_BUTTON,
+ requestConnectedFrame,
+} from '@blocksuite/affine/shared/utils';
import {
autoUpdate,
computePosition,
diff --git a/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor-container.tsx b/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor-container.tsx
index ed29ed1c64..13892bd081 100644
--- a/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor-container.tsx
+++ b/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor-container.tsx
@@ -9,9 +9,9 @@ import {
type DocMode,
type DocTitle,
focusBlockEnd,
- getLastNoteBlock,
type RootBlockModel,
} from '@blocksuite/affine/blocks';
+import { getLastNoteBlock } from '@blocksuite/affine/shared/utils';
import { type Store } from '@blocksuite/affine/store';
import { useLiveData, useService } from '@toeverything/infra';
import clsx from 'clsx';
diff --git a/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor.tsx b/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor.tsx
index 08089bb429..0eccf50828 100644
--- a/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor.tsx
+++ b/packages/frontend/core/src/blocksuite/block-suite-editor/blocksuite-editor.tsx
@@ -9,9 +9,9 @@ import {
customImageProxyMiddleware,
type DocMode,
ImageProxyService,
- LinkPreviewerService,
} from '@blocksuite/affine/blocks';
import { DisposableGroup } from '@blocksuite/affine/global/slot';
+import { LinkPreviewerService } from '@blocksuite/affine/shared/services';
import type { Store } from '@blocksuite/affine/store';
import { Slot } from '@radix-ui/react-slot';
import { useLiveData, useService } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/editors/edgeless-editor.ts b/packages/frontend/core/src/blocksuite/editors/edgeless-editor.ts
index 5b9b5b50e9..fd81011911 100644
--- a/packages/frontend/core/src/blocksuite/editors/edgeless-editor.ts
+++ b/packages/frontend/core/src/blocksuite/editors/edgeless-editor.ts
@@ -1,9 +1,7 @@
import { BlockStdScope, ShadowlessElement } from '@blocksuite/affine/block-std';
-import {
- EdgelessEditorBlockSpecs,
- ThemeProvider,
-} from '@blocksuite/affine/blocks';
+import { EdgelessEditorBlockSpecs } from '@blocksuite/affine/blocks';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
+import { ThemeProvider } from '@blocksuite/affine/shared/services';
import type { Store } from '@blocksuite/affine/store';
import { css, html, nothing, type TemplateResult } from 'lit';
import { property, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/editors/page-editor.ts b/packages/frontend/core/src/blocksuite/editors/page-editor.ts
index d20cf21090..d0bbe79ea9 100644
--- a/packages/frontend/core/src/blocksuite/editors/page-editor.ts
+++ b/packages/frontend/core/src/blocksuite/editors/page-editor.ts
@@ -3,9 +3,10 @@ import {
EditorHost,
ShadowlessElement,
} from '@blocksuite/affine/block-std';
-import { PageEditorBlockSpecs, ThemeProvider } from '@blocksuite/affine/blocks';
+import { PageEditorBlockSpecs } from '@blocksuite/affine/blocks';
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
import { noop } from '@blocksuite/affine/global/utils';
+import { ThemeProvider } from '@blocksuite/affine/shared/services';
import type { Store } from '@blocksuite/affine/store';
import { css, html, nothing } from 'lit';
import { property, state } from 'lit/decorators.js';
diff --git a/packages/frontend/core/src/blocksuite/extensions/display-meta.ts b/packages/frontend/core/src/blocksuite/extensions/display-meta.ts
index 6fe888bd5a..d967201910 100644
--- a/packages/frontend/core/src/blocksuite/extensions/display-meta.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/display-meta.ts
@@ -1,16 +1,16 @@
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
import { LifeCycleWatcher, StdIdentifier } from '@blocksuite/affine/block-std';
+import type { Container } from '@blocksuite/affine/global/di';
import type {
DocDisplayMetaExtension,
DocDisplayMetaParams,
- Signal,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
+import { DocDisplayMetaProvider } from '@blocksuite/affine/shared/services';
import {
createSignalFromObservable,
- DocDisplayMetaProvider,
referenceToNode,
-} from '@blocksuite/affine/blocks';
-import type { Container } from '@blocksuite/affine/global/di';
+ type Signal,
+} from '@blocksuite/affine/shared/utils';
import { LinkedPageIcon, PageIcon } from '@blocksuite/icons/lit';
import { type FrameworkProvider } from '@toeverything/infra';
import type { TemplateResult } from 'lit';
diff --git a/packages/frontend/core/src/blocksuite/extensions/doc-mode-service.ts b/packages/frontend/core/src/blocksuite/extensions/doc-mode-service.ts
index 0fbafaaa18..8389f66a6f 100644
--- a/packages/frontend/core/src/blocksuite/extensions/doc-mode-service.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/doc-mode-service.ts
@@ -1,7 +1,10 @@
import type { DocService, DocsService } from '@affine/core/modules/doc';
import type { EditorService } from '@affine/core/modules/editor';
-import type { DocMode, DocModeProvider } from '@blocksuite/affine/blocks';
-import { DocModeExtension } from '@blocksuite/affine/blocks';
+import type { DocMode } from '@blocksuite/affine/blocks';
+import {
+ DocModeExtension,
+ type DocModeProvider,
+} from '@blocksuite/affine/shared/services';
import type { ExtensionType } from '@blocksuite/affine/store';
export function patchDocModeService(
diff --git a/packages/frontend/core/src/blocksuite/extensions/doc-url.ts b/packages/frontend/core/src/blocksuite/extensions/doc-url.ts
index 994a7fc673..67ff4921d0 100644
--- a/packages/frontend/core/src/blocksuite/extensions/doc-url.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/doc-url.ts
@@ -2,11 +2,11 @@ import { generateUrl } from '@affine/core/components/hooks/affine/use-share-url'
import { WorkspaceServerService } from '@affine/core/modules/cloud';
import { resolveLinkToDoc } from '@affine/core/modules/navigation/utils';
import { WorkspaceService } from '@affine/core/modules/workspace';
+import { type ReferenceParams } from '@blocksuite/affine/blocks';
import {
GenerateDocUrlExtension,
ParseDocUrlExtension,
- type ReferenceParams,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
import type { FrameworkProvider } from '@toeverything/infra';
function patchParseDocUrlExtension(framework: FrameworkProvider) {
diff --git a/packages/frontend/core/src/blocksuite/extensions/editor-config/database.ts b/packages/frontend/core/src/blocksuite/extensions/editor-config/database.ts
index d12a13f128..46df234344 100644
--- a/packages/frontend/core/src/blocksuite/extensions/editor-config/database.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/editor-config/database.ts
@@ -8,11 +8,11 @@ import { EditorService } from '@affine/core/modules/editor';
import { copyLinkToBlockStdScopeClipboard } from '@affine/core/utils/clipboard';
import { I18n } from '@affine/i18n';
import { track } from '@affine/track';
-import type {
- DatabaseBlockModel,
- MenuOptions,
-} from '@blocksuite/affine/blocks';
-import { menu } from '@blocksuite/affine/blocks';
+import type { DatabaseBlockModel } from '@blocksuite/affine/blocks';
+import {
+ menu,
+ type MenuOptions,
+} from '@blocksuite/affine/components/context-menu';
import { LinkIcon } from '@blocksuite/icons/lit';
import type { FrameworkProvider } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/extensions/editor-config/index.ts b/packages/frontend/core/src/blocksuite/extensions/editor-config/index.ts
index 7f8563ac30..6c9c3a25c0 100644
--- a/packages/frontend/core/src/blocksuite/extensions/editor-config/index.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/editor-config/index.ts
@@ -2,10 +2,10 @@ import { WorkspaceServerService } from '@affine/core/modules/cloud';
import { EditorSettingService } from '@affine/core/modules/editor-setting';
import {
DatabaseConfigExtension,
- EditorSettingExtension,
RootBlockConfigExtension,
- ToolbarMoreMenuConfigExtension,
} from '@blocksuite/affine/blocks';
+import { ToolbarMoreMenuConfigExtension } from '@blocksuite/affine/components/toolbar';
+import { EditorSettingExtension } from '@blocksuite/affine/shared/services';
import type { ExtensionType } from '@blocksuite/affine/store';
import type { FrameworkProvider } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/copy-as-image.ts b/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/copy-as-image.ts
index aff3adbd21..ad7e70d1e4 100644
--- a/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/copy-as-image.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/copy-as-image.ts
@@ -11,7 +11,7 @@ import {
GfxPrimitiveElementModel,
isGfxGroupCompatibleModel,
} from '@blocksuite/affine/block-std/gfx';
-import type { MenuContext } from '@blocksuite/affine/blocks';
+import type { MenuContext } from '@blocksuite/affine/components/toolbar';
import { Bound, getCommonBound } from '@blocksuite/affine/global/gfx';
import { CopyAsImgaeIcon } from '@blocksuite/icons/lit';
import type { FrameworkProvider } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/index.ts b/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/index.ts
index 111230b6e7..d223c74429 100644
--- a/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/index.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/editor-config/toolbar/index.ts
@@ -18,7 +18,6 @@ import {
GfxPrimitiveElementModel,
} from '@blocksuite/affine/block-std/gfx';
import {
- ActionPlacement,
AffineReference,
BookmarkBlockComponent,
BookmarkBlockModel,
@@ -30,27 +29,33 @@ import {
EmbedSyncedDocBlockComponent,
EmbedSyncedDocModel,
EmbedYoutubeBlockComponent,
- GenerateDocUrlProvider,
getDocContentWithMaxLength,
getSelectedModelsCommand,
ImageSelection,
- isPeekable,
- matchModels,
- type MenuContext,
- type MenuItemGroup,
+ toggleReferencePopup,
+} from '@blocksuite/affine/blocks';
+import { toggleEmbedCardEditModal } from '@blocksuite/affine/components/embed-card-modal';
+import {
notifyLinkedDocClearedAliases,
notifyLinkedDocSwitchedToCard,
+} from '@blocksuite/affine/components/notification';
+import { isPeekable, peek } from '@blocksuite/affine/components/peek';
+import { toast } from '@blocksuite/affine/components/toast';
+import type {
+ MenuContext,
+ MenuItemGroup,
+} from '@blocksuite/affine/components/toolbar';
+import {
+ ActionPlacement,
+ GenerateDocUrlProvider,
type OpenDocMode,
- peek,
- toast,
- toggleEmbedCardEditModal,
- toggleReferencePopup,
type ToolbarAction,
type ToolbarActionGroup,
type ToolbarContext,
type ToolbarModuleConfig,
ToolbarModuleExtension,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
+import { matchModels } from '@blocksuite/affine/shared/utils';
import type { ExtensionType } from '@blocksuite/affine/store';
import {
ArrowDownSmallIcon,
diff --git a/packages/frontend/core/src/blocksuite/extensions/electron-clipboard.ts b/packages/frontend/core/src/blocksuite/extensions/electron-clipboard.ts
index bebd8c4d63..43938178f7 100644
--- a/packages/frontend/core/src/blocksuite/extensions/electron-clipboard.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/electron-clipboard.ts
@@ -1,5 +1,5 @@
import { DesktopApiService } from '@affine/core/modules/desktop-api';
-import { NativeClipboardExtension } from '@blocksuite/affine/blocks';
+import { NativeClipboardExtension } from '@blocksuite/affine/shared/services';
import type { FrameworkProvider } from '@toeverything/infra';
export function patchForClipboardInElectron(framework: FrameworkProvider) {
diff --git a/packages/frontend/core/src/blocksuite/extensions/entry/enable-affine.ts b/packages/frontend/core/src/blocksuite/extensions/entry/enable-affine.ts
index d4b8bfca58..9a1a525df9 100644
--- a/packages/frontend/core/src/blocksuite/extensions/entry/enable-affine.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/entry/enable-affine.ts
@@ -1,4 +1,4 @@
-import type { SpecBuilder } from '@blocksuite/affine/blocks';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
import { type FrameworkProvider } from '@toeverything/infra';
import { buildDocDisplayMetaExtension } from '../display-meta';
diff --git a/packages/frontend/core/src/blocksuite/extensions/entry/enable-editor.ts b/packages/frontend/core/src/blocksuite/extensions/entry/enable-editor.ts
index 9d5e6afe8a..5d53fdfa19 100644
--- a/packages/frontend/core/src/blocksuite/extensions/entry/enable-editor.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/entry/enable-editor.ts
@@ -1,7 +1,9 @@
import { enableAIExtension } from '@affine/core/blocksuite/ai';
import { enableAffineExtension } from '@affine/core/blocksuite/extensions';
-import type { SpecBuilder } from '@blocksuite/affine/blocks';
-import { SpecProvider } from '@blocksuite/affine/blocks';
+import {
+ type SpecBuilder,
+ SpecProvider,
+} from '@blocksuite/affine/shared/utils';
import { type FrameworkProvider } from '@toeverything/infra';
export function enableEditorExtension(
diff --git a/packages/frontend/core/src/blocksuite/extensions/entry/enable-mobile.ts b/packages/frontend/core/src/blocksuite/extensions/entry/enable-mobile.ts
index 4b6df32a2e..b40f5fccb0 100644
--- a/packages/frontend/core/src/blocksuite/extensions/entry/enable-mobile.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/entry/enable-mobile.ts
@@ -8,25 +8,27 @@ import {
import type {
CodeBlockConfig,
ReferenceNodeConfig,
- SpecBuilder,
} from '@blocksuite/affine/blocks';
import {
codeToolbarWidget,
- DocModeProvider,
- FeatureFlagService,
imageToolbarWidget,
ParagraphBlockService,
ReferenceNodeConfigIdentifier,
SlashMenuExtension,
surfaceRefToolbarWidget,
toolbarWidget,
- VirtualKeyboardProvider as BSVirtualKeyboardProvider,
} from '@blocksuite/affine/blocks';
import type {
Container,
ServiceIdentifier,
} from '@blocksuite/affine/global/di';
import { DisposableGroup } from '@blocksuite/affine/global/slot';
+import {
+ DocModeProvider,
+ FeatureFlagService,
+ VirtualKeyboardProvider as BSVirtualKeyboardProvider,
+} from '@blocksuite/affine/shared/services';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
import type { ExtensionType } from '@blocksuite/affine/store';
import { batch, signal } from '@preact/signals-core';
import type { FrameworkProvider } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/blocksuite/extensions/entry/enable-preview.ts b/packages/frontend/core/src/blocksuite/extensions/entry/enable-preview.ts
index 2a71aabb55..f6e2625edb 100644
--- a/packages/frontend/core/src/blocksuite/extensions/entry/enable-preview.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/entry/enable-preview.ts
@@ -5,15 +5,17 @@ import {
LifeCycleWatcher,
StdIdentifier,
} from '@blocksuite/affine/block-std';
+import type { Container } from '@blocksuite/affine/global/di';
+import { ColorScheme } from '@blocksuite/affine/model';
+import {
+ type ThemeExtension,
+ ThemeExtensionIdentifier,
+} from '@blocksuite/affine/shared/services';
import {
- ColorScheme,
createSignalFromObservable,
type Signal,
SpecProvider,
- type ThemeExtension,
- ThemeExtensionIdentifier,
-} from '@blocksuite/affine/blocks';
-import type { Container } from '@blocksuite/affine/global/di';
+} from '@blocksuite/affine/shared/utils';
import type { ExtensionType } from '@blocksuite/affine/store';
import type { FrameworkProvider } from '@toeverything/infra';
import type { Observable } from 'rxjs';
diff --git a/packages/frontend/core/src/blocksuite/extensions/font-config.ts b/packages/frontend/core/src/blocksuite/extensions/font-config.ts
index 89bb2b2e73..517da14856 100644
--- a/packages/frontend/core/src/blocksuite/extensions/font-config.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/font-config.ts
@@ -1,7 +1,7 @@
import {
AffineCanvasTextFonts,
FontConfigExtension,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
export function getFontConfigExtension() {
return FontConfigExtension(
diff --git a/packages/frontend/core/src/blocksuite/extensions/footnote-config.ts b/packages/frontend/core/src/blocksuite/extensions/footnote-config.ts
index 22ba8302c0..0e61213837 100644
--- a/packages/frontend/core/src/blocksuite/extensions/footnote-config.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/footnote-config.ts
@@ -1,7 +1,5 @@
-import {
- FootNoteNodeConfigExtension,
- type SpecBuilder,
-} from '@blocksuite/affine/blocks';
+import { FootNoteNodeConfigExtension } from '@blocksuite/affine/blocks';
+import type { SpecBuilder } from '@blocksuite/affine/shared/utils';
// Disable hover effect for footnote node
const disableHoverEffectConfig = {
diff --git a/packages/frontend/core/src/blocksuite/extensions/notification-service.tsx b/packages/frontend/core/src/blocksuite/extensions/notification-service.tsx
index a2cc2dd8c4..bd6b9c2899 100644
--- a/packages/frontend/core/src/blocksuite/extensions/notification-service.tsx
+++ b/packages/frontend/core/src/blocksuite/extensions/notification-service.tsx
@@ -6,7 +6,7 @@ import {
toReactNode,
type useConfirmModal,
} from '@affine/component';
-import { NotificationExtension } from '@blocksuite/affine/blocks';
+import { NotificationExtension } from '@blocksuite/affine/shared/services';
export function patchNotificationService({
closeConfirmModal,
diff --git a/packages/frontend/core/src/blocksuite/extensions/open-doc.ts b/packages/frontend/core/src/blocksuite/extensions/open-doc.ts
index 4b5444deb6..5eb4798397 100644
--- a/packages/frontend/core/src/blocksuite/extensions/open-doc.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/open-doc.ts
@@ -1,9 +1,9 @@
import { I18n } from '@affine/i18n';
-import type {
- OpenDocConfig,
- OpenDocConfigItem,
-} from '@blocksuite/affine/blocks';
-import { OpenDocExtension } from '@blocksuite/affine/blocks';
+import {
+ type OpenDocConfig,
+ type OpenDocConfigItem,
+ OpenDocExtension,
+} from '@blocksuite/affine/shared/services';
import {
CenterPeekIcon,
ExpandFullIcon,
diff --git a/packages/frontend/core/src/blocksuite/extensions/peek-view-service.ts b/packages/frontend/core/src/blocksuite/extensions/peek-view-service.ts
index 8d1e2ec8ce..70feac5ed9 100644
--- a/packages/frontend/core/src/blocksuite/extensions/peek-view-service.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/peek-view-service.ts
@@ -3,8 +3,8 @@ import { DebugLogger } from '@affine/debug';
import type {
PeekOptions,
PeekViewService as BSPeekViewService,
-} from '@blocksuite/affine/blocks';
-import { PeekViewExtension } from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/components/peek';
+import { PeekViewExtension } from '@blocksuite/affine/components/peek';
import type { TemplateResult } from 'lit';
const logger = new DebugLogger('affine::patch-peek-view-service');
diff --git a/packages/frontend/core/src/blocksuite/extensions/quick-search-service.ts b/packages/frontend/core/src/blocksuite/extensions/quick-search-service.ts
index 8159ce2abd..3378006a8c 100644
--- a/packages/frontend/core/src/blocksuite/extensions/quick-search-service.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/quick-search-service.ts
@@ -10,18 +10,17 @@ import {
import { ExternalLinksQuickSearchSession } from '@affine/core/modules/quicksearch/impls/external-links';
import { JournalsQuickSearchSession } from '@affine/core/modules/quicksearch/impls/journals';
import { track } from '@affine/track';
-import type {
- QuickSearchResult,
- SlashMenuConfig,
- SlashMenuItem,
-} from '@blocksuite/affine/blocks';
+import type { SlashMenuConfig, SlashMenuItem } from '@blocksuite/affine/blocks';
import {
BookmarkSlashMenuConfigIdentifier,
insertLinkByQuickSearchCommand,
LinkedDocSlashMenuConfigIdentifier,
- QuickSearchExtension,
} from '@blocksuite/affine/blocks';
import type { ServiceIdentifier } from '@blocksuite/affine/global/di';
+import {
+ QuickSearchExtension,
+ type QuickSearchResult,
+} from '@blocksuite/affine/shared/services';
import { type ExtensionType, Text } from '@blocksuite/affine/store';
import type { FrameworkProvider } from '@toeverything/infra';
import { pick } from 'lodash-es';
diff --git a/packages/frontend/core/src/blocksuite/extensions/side-bar-service.ts b/packages/frontend/core/src/blocksuite/extensions/side-bar-service.ts
index c72de0768b..94731d68b6 100644
--- a/packages/frontend/core/src/blocksuite/extensions/side-bar-service.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/side-bar-service.ts
@@ -1,5 +1,5 @@
import { WorkbenchService } from '@affine/core/modules/workbench';
-import { SidebarExtension } from '@blocksuite/affine/blocks';
+import { SidebarExtension } from '@blocksuite/affine/shared/services';
import type { FrameworkProvider } from '@toeverything/infra';
export function patchSideBarService(framework: FrameworkProvider) {
diff --git a/packages/frontend/core/src/blocksuite/extensions/telemetry.ts b/packages/frontend/core/src/blocksuite/extensions/telemetry.ts
index ccda0a539b..5bebf8bc77 100644
--- a/packages/frontend/core/src/blocksuite/extensions/telemetry.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/telemetry.ts
@@ -2,7 +2,7 @@ import { mixpanel } from '@affine/track';
import {
type TelemetryEventMap,
TelemetryProvider,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
import type { ExtensionType } from '@blocksuite/affine/store';
export function getTelemetryExtension(): ExtensionType {
diff --git a/packages/frontend/core/src/blocksuite/extensions/theme.ts b/packages/frontend/core/src/blocksuite/extensions/theme.ts
index cf75c90dd8..15234f3905 100644
--- a/packages/frontend/core/src/blocksuite/extensions/theme.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/theme.ts
@@ -1,13 +1,16 @@
import { DocService, DocsService } from '@affine/core/modules/doc';
import { AppThemeService } from '@affine/core/modules/theme';
import { LifeCycleWatcher, StdIdentifier } from '@blocksuite/affine/block-std';
-import type { Signal, ThemeExtension } from '@blocksuite/affine/blocks';
+import { ColorScheme } from '@blocksuite/affine/blocks';
+import type { Container } from '@blocksuite/affine/global/di';
import {
- ColorScheme,
- createSignalFromObservable,
+ type ThemeExtension,
ThemeExtensionIdentifier,
-} from '@blocksuite/affine/blocks';
-import type { Container } from '@blocksuite/affine/global/di';
+} from '@blocksuite/affine/shared/services';
+import {
+ createSignalFromObservable,
+ type Signal,
+} from '@blocksuite/affine/shared/utils';
import { type FrameworkProvider } from '@toeverything/infra';
import type { Observable } from 'rxjs';
import { combineLatest, map } from 'rxjs';
diff --git a/packages/frontend/core/src/blocksuite/extensions/user-list.ts b/packages/frontend/core/src/blocksuite/extensions/user-list.ts
index af468eb361..9dc20f137d 100644
--- a/packages/frontend/core/src/blocksuite/extensions/user-list.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/user-list.ts
@@ -1,5 +1,5 @@
import type { MemberSearchService } from '@affine/core/modules/permissions';
-import { UserListServiceExtension } from '@blocksuite/affine/blocks';
+import { UserListServiceExtension } from '@blocksuite/affine/shared/services';
export function patchUserListExtensions(memberSearch: MemberSearchService) {
return UserListServiceExtension({
diff --git a/packages/frontend/core/src/blocksuite/extensions/user.ts b/packages/frontend/core/src/blocksuite/extensions/user.ts
index 9beef1388f..a68c76051c 100644
--- a/packages/frontend/core/src/blocksuite/extensions/user.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/user.ts
@@ -2,7 +2,7 @@ import type {
AuthService,
PublicUserService,
} from '@affine/core/modules/cloud';
-import { UserServiceExtension } from '@blocksuite/affine/blocks';
+import { UserServiceExtension } from '@blocksuite/affine/shared/services';
export function patchUserExtensions(
publicUserService: PublicUserService,
diff --git a/packages/frontend/core/src/components/hooks/affine/use-export-page.ts b/packages/frontend/core/src/components/hooks/affine/use-export-page.ts
index d6bd646d2a..9b42bbc6d6 100644
--- a/packages/frontend/core/src/components/hooks/affine/use-export-page.ts
+++ b/packages/frontend/core/src/components/hooks/affine/use-export-page.ts
@@ -18,10 +18,10 @@ import {
HtmlTransformer,
MarkdownAdapterFactoryIdentifier,
MarkdownTransformer,
- printToPdf,
titleMiddleware,
ZipTransformer,
} from '@blocksuite/affine/blocks';
+import { printToPdf } from '@blocksuite/affine/shared/utils';
import { type Store, Transformer } from '@blocksuite/affine/store';
import { useLiveData, useService } from '@toeverything/infra';
import { useSetAtom } from 'jotai';
diff --git a/packages/frontend/core/src/components/hooks/affine/use-reference-link-helper.ts b/packages/frontend/core/src/components/hooks/affine/use-reference-link-helper.ts
index e3c34f4a9a..000643bf84 100644
--- a/packages/frontend/core/src/components/hooks/affine/use-reference-link-helper.ts
+++ b/packages/frontend/core/src/components/hooks/affine/use-reference-link-helper.ts
@@ -1,5 +1,5 @@
-import type { AffineTextAttributes } from '@blocksuite/affine/blocks';
import type { DeltaInsert } from '@blocksuite/affine/inline';
+import type { AffineTextAttributes } from '@blocksuite/affine/shared/types';
import { Text, type Workspace } from '@blocksuite/affine/store';
import { useCallback } from 'react';
diff --git a/packages/frontend/core/src/desktop/dialogs/import/index.tsx b/packages/frontend/core/src/desktop/dialogs/import/index.tsx
index ec6fa73b95..fbdc23ddf5 100644
--- a/packages/frontend/core/src/desktop/dialogs/import/index.tsx
+++ b/packages/frontend/core/src/desktop/dialogs/import/index.tsx
@@ -16,9 +16,9 @@ import {
HtmlTransformer,
MarkdownTransformer,
NotionHtmlTransformer,
- openFileOrFiles,
ZipTransformer,
} from '@blocksuite/affine/blocks';
+import { openFileOrFiles } from '@blocksuite/affine/shared/utils';
import type { Workspace } from '@blocksuite/affine/store';
import {
ExportToHtmlIcon,
diff --git a/packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor/edgeless/snapshot.tsx b/packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor/edgeless/snapshot.tsx
index f5646c915b..3021a7e8bb 100644
--- a/packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor/edgeless/snapshot.tsx
+++ b/packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor/edgeless/snapshot.tsx
@@ -10,9 +10,9 @@ import {
import {
EdgelessCRUDIdentifier,
type EdgelessRootPreviewBlockComponent,
- SpecProvider,
} from '@blocksuite/affine/blocks';
import { Bound } from '@blocksuite/affine/global/gfx';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
import type { Block, Store } from '@blocksuite/affine/store';
import { useFramework } from '@toeverything/infra';
import { isEqual } from 'lodash-es';
diff --git a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/blob-management.tsx b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/blob-management.tsx
index 4f0f63a18b..295bf65d35 100644
--- a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/blob-management.tsx
+++ b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/blob-management.tsx
@@ -11,7 +11,7 @@ import { BlobManagementService } from '@affine/core/modules/blob-management/serv
import { useI18n } from '@affine/i18n';
import type { ListedBlobRecord } from '@affine/nbstore';
import track from '@affine/track';
-import { getAttachmentFileIcon } from '@blocksuite/affine/blocks';
+import { getAttachmentFileIcon } from '@blocksuite/affine/components/icons';
import { DeleteIcon } from '@blocksuite/icons/rc';
import { useLiveData, useService } from '@toeverything/infra';
import bytes from 'bytes';
diff --git a/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/chat.tsx b/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/chat.tsx
index b4674c8468..3941b08f7c 100644
--- a/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/chat.tsx
+++ b/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/chat.tsx
@@ -6,12 +6,12 @@ import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
import { DocSearchMenuService } from '@affine/core/modules/doc-search-menu/services';
import { WorkbenchService } from '@affine/core/modules/workbench';
import { WorkspaceService } from '@affine/core/modules/workspace';
+import { RefNodeSlotsProvider } from '@blocksuite/affine/blocks';
+import { DocModeProvider } from '@blocksuite/affine/shared/services';
import {
createSignalFromObservable,
- DocModeProvider,
- RefNodeSlotsProvider,
SpecProvider,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/utils';
import { useFramework } from '@toeverything/infra';
import { forwardRef, useEffect, useRef } from 'react';
diff --git a/packages/frontend/core/src/mobile/components/search-input/index.tsx b/packages/frontend/core/src/mobile/components/search-input/index.tsx
index 6eb6fe8bbe..f1172b0bf8 100644
--- a/packages/frontend/core/src/mobile/components/search-input/index.tsx
+++ b/packages/frontend/core/src/mobile/components/search-input/index.tsx
@@ -1,5 +1,5 @@
import { useAutoFocus } from '@affine/component';
-import { getFigmaSquircleSvgPath } from '@blocksuite/affine/blocks';
+import { getFigmaSquircleSvgPath } from '@blocksuite/affine/shared/utils';
import { SearchIcon } from '@blocksuite/icons/rc';
import clsx from 'clsx';
import { debounce } from 'lodash-es';
diff --git a/packages/frontend/core/src/mobile/pages/workspace/detail/mobile-detail-page.tsx b/packages/frontend/core/src/mobile/pages/workspace/detail/mobile-detail-page.tsx
index adf2afef6d..f6293be401 100644
--- a/packages/frontend/core/src/mobile/pages/workspace/detail/mobile-detail-page.tsx
+++ b/packages/frontend/core/src/mobile/pages/workspace/detail/mobile-detail-page.tsx
@@ -25,10 +25,10 @@ import { i18nTime } from '@affine/i18n';
import {
customImageProxyMiddleware,
ImageProxyService,
- LinkPreviewerService,
RefNodeSlotsProvider,
} from '@blocksuite/affine/blocks';
import { DisposableGroup } from '@blocksuite/affine/global/slot';
+import { LinkPreviewerService } from '@blocksuite/affine/shared/services';
import {
FrameworkScope,
useLiveData,
diff --git a/packages/frontend/core/src/modules/ai-button/services/network-search.ts b/packages/frontend/core/src/modules/ai-button/services/network-search.ts
index 9fa2f2ebcc..2b40bb0dba 100644
--- a/packages/frontend/core/src/modules/ai-button/services/network-search.ts
+++ b/packages/frontend/core/src/modules/ai-button/services/network-search.ts
@@ -1,7 +1,7 @@
import {
createSignalFromObservable,
type Signal,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/utils';
import { LiveData, Service } from '@toeverything/infra';
import type { FeatureFlagService } from '../../feature-flag';
diff --git a/packages/frontend/core/src/modules/dnd/services/index.ts b/packages/frontend/core/src/modules/dnd/services/index.ts
index 5c935def37..1610d7cf4d 100644
--- a/packages/frontend/core/src/modules/dnd/services/index.ts
+++ b/packages/frontend/core/src/modules/dnd/services/index.ts
@@ -7,11 +7,11 @@ import {
} from '@affine/component';
import type { AffineDNDData } from '@affine/core/types/dnd';
import { BlockStdScope } from '@blocksuite/affine/block-std';
+import { type DragBlockPayload } from '@blocksuite/affine/blocks';
import {
DNDAPIExtension,
DndApiExtensionIdentifier,
- type DragBlockPayload,
-} from '@blocksuite/affine/blocks';
+} from '@blocksuite/affine/shared/services';
import { type SliceSnapshot } from '@blocksuite/affine/store';
import { Service } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/modules/doc-search-menu/services/index.ts b/packages/frontend/core/src/modules/doc-search-menu/services/index.ts
index 14321f2368..e202a424f5 100644
--- a/packages/frontend/core/src/modules/doc-search-menu/services/index.ts
+++ b/packages/frontend/core/src/modules/doc-search-menu/services/index.ts
@@ -4,7 +4,7 @@ import type {
LinkedMenuGroup,
LinkedMenuItem,
} from '@blocksuite/affine/blocks';
-import { createSignalFromObservable } from '@blocksuite/affine/blocks';
+import { createSignalFromObservable } from '@blocksuite/affine/shared/utils';
import type { DocMeta } from '@blocksuite/affine/store';
import { computed } from '@preact/signals-core';
import { Service } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/modules/doc/services/docs.ts b/packages/frontend/core/src/modules/doc/services/docs.ts
index b8d4d1add3..2dd34a0e54 100644
--- a/packages/frontend/core/src/modules/doc/services/docs.ts
+++ b/packages/frontend/core/src/modules/doc/services/docs.ts
@@ -1,11 +1,8 @@
import { DebugLogger } from '@affine/debug';
import { Unreachable } from '@affine/env/constant';
-import {
- type AffineTextAttributes,
- type DocMode,
- replaceIdMiddleware,
-} from '@blocksuite/affine/blocks';
+import { type DocMode, replaceIdMiddleware } from '@blocksuite/affine/blocks';
import type { DeltaInsert } from '@blocksuite/affine/inline';
+import type { AffineTextAttributes } from '@blocksuite/affine/shared/types';
import { Slice, Text, Transformer } from '@blocksuite/affine/store';
import { LiveData, ObjectPool, Service } from '@toeverything/infra';
import { omitBy } from 'lodash-es';
diff --git a/packages/frontend/core/src/modules/docs-search/worker/in-worker.ts b/packages/frontend/core/src/modules/docs-search/worker/in-worker.ts
index 01a8d74876..d9525eb0d7 100644
--- a/packages/frontend/core/src/modules/docs-search/worker/in-worker.ts
+++ b/packages/frontend/core/src/modules/docs-search/worker/in-worker.ts
@@ -1,5 +1,4 @@
import type {
- AffineTextAttributes,
AttachmentBlockModel,
BookmarkBlockModel,
EmbedBlockModel,
@@ -14,6 +13,7 @@ import {
TableModelFlavour,
} from '@blocksuite/affine/blocks';
import { Container } from '@blocksuite/affine/global/di';
+import type { AffineTextAttributes } from '@blocksuite/affine/shared/types';
import {
createYProxy,
type DraftModel,
diff --git a/packages/frontend/core/src/modules/editor-setting/entities/editor-setting.ts b/packages/frontend/core/src/modules/editor-setting/entities/editor-setting.ts
index c22831996b..ee17dffe08 100644
--- a/packages/frontend/core/src/modules/editor-setting/entities/editor-setting.ts
+++ b/packages/frontend/core/src/modules/editor-setting/entities/editor-setting.ts
@@ -1,8 +1,8 @@
+import type { DeepPartial } from '@blocksuite/affine/global/utils';
import {
createSignalFromObservable,
type Signal,
-} from '@blocksuite/affine/blocks';
-import type { DeepPartial } from '@blocksuite/affine/global/utils';
+} from '@blocksuite/affine/shared/utils';
import { Entity, LiveData } from '@toeverything/infra';
import { isObject, merge } from 'lodash-es';
import type { Observable } from 'rxjs';
diff --git a/packages/frontend/core/src/modules/editor-setting/schema.ts b/packages/frontend/core/src/modules/editor-setting/schema.ts
index bcfc106cc7..b95135194f 100644
--- a/packages/frontend/core/src/modules/editor-setting/schema.ts
+++ b/packages/frontend/core/src/modules/editor-setting/schema.ts
@@ -1,4 +1,4 @@
-import { GeneralSettingSchema } from '@blocksuite/affine/blocks';
+import { GeneralSettingSchema } from '@blocksuite/affine/shared/services';
import { z } from 'zod';
export const BSEditorSettingSchema = GeneralSettingSchema;
diff --git a/packages/frontend/core/src/modules/editor/entities/editor.ts b/packages/frontend/core/src/modules/editor/entities/editor.ts
index 700a72372a..fbb17a8939 100644
--- a/packages/frontend/core/src/modules/editor/entities/editor.ts
+++ b/packages/frontend/core/src/modules/editor/entities/editor.ts
@@ -1,13 +1,13 @@
import type { AffineEditorContainer } from '@affine/core/blocksuite/block-suite-editor';
import type { DefaultOpenProperty } from '@affine/core/components/doc-properties';
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
-import {
- type DocMode,
- type DocTitle,
- FeatureFlagService as BSFeatureFlagService,
- HighlightSelection,
- type ReferenceParams,
+import type {
+ DocMode,
+ DocTitle,
+ ReferenceParams,
} from '@blocksuite/affine/blocks';
+import { HighlightSelection } from '@blocksuite/affine/shared/selection';
+import { FeatureFlagService as BSFeatureFlagService } from '@blocksuite/affine/shared/services';
import type { InlineEditor } from '@blocksuite/inline';
import { effect } from '@preact/signals-core';
import { Entity, LiveData } from '@toeverything/infra';
diff --git a/packages/frontend/core/src/modules/feature-flag/types.ts b/packages/frontend/core/src/modules/feature-flag/types.ts
index 783847a739..96545ac528 100644
--- a/packages/frontend/core/src/modules/feature-flag/types.ts
+++ b/packages/frontend/core/src/modules/feature-flag/types.ts
@@ -1,4 +1,4 @@
-import type { BlockSuiteFlags } from '@blocksuite/affine/blocks';
+import type { BlockSuiteFlags } from '@blocksuite/affine/shared/services';
type FeedbackType = 'discord' | 'email' | 'github';
diff --git a/packages/frontend/core/src/modules/peek-view/view/ai-chat-block-peek-view/index.tsx b/packages/frontend/core/src/modules/peek-view/view/ai-chat-block-peek-view/index.tsx
index 3ea325aa80..6fec071b1f 100644
--- a/packages/frontend/core/src/modules/peek-view/view/ai-chat-block-peek-view/index.tsx
+++ b/packages/frontend/core/src/modules/peek-view/view/ai-chat-block-peek-view/index.tsx
@@ -4,7 +4,7 @@ import type { AIChatBlockModel } from '@affine/core/blocksuite/ai/blocks/ai-chat
import { enableFootnoteConfigExtension } from '@affine/core/blocksuite/extensions';
import { AINetworkSearchService } from '@affine/core/modules/ai-button/services/network-search';
import type { EditorHost } from '@blocksuite/affine/block-std';
-import { SpecProvider } from '@blocksuite/affine/blocks';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
import { useFramework } from '@toeverything/infra';
import { useMemo } from 'react';
diff --git a/packages/frontend/core/src/modules/workspace/global-schema.ts b/packages/frontend/core/src/modules/workspace/global-schema.ts
index 66a663224e..24a332a1fc 100644
--- a/packages/frontend/core/src/modules/workspace/global-schema.ts
+++ b/packages/frontend/core/src/modules/workspace/global-schema.ts
@@ -1,5 +1,5 @@
import { AIChatBlockSchema } from '@affine/core/blocksuite/ai/blocks/ai-chat-block/model';
-import { AffineSchemas } from '@blocksuite/affine/blocks/schemas';
+import { AffineSchemas } from '@blocksuite/affine/schemas';
import { Schema } from '@blocksuite/affine/store';
let _schema: Schema | null = null;
diff --git a/packages/frontend/core/src/modules/workspace/impls/doc.ts b/packages/frontend/core/src/modules/workspace/impls/doc.ts
index fd4b2ee4ec..3059cd55cb 100644
--- a/packages/frontend/core/src/modules/workspace/impls/doc.ts
+++ b/packages/frontend/core/src/modules/workspace/impls/doc.ts
@@ -1,5 +1,5 @@
-import { SpecProvider } from '@blocksuite/affine/blocks';
import { Slot } from '@blocksuite/affine/global/slot';
+import { SpecProvider } from '@blocksuite/affine/shared/utils';
import {
AwarenessStore,
type Doc,
diff --git a/scripts/download-blocksuite-fonts.mjs b/scripts/download-blocksuite-fonts.mjs
index d14031caf1..8dd71e34a9 100644
--- a/scripts/download-blocksuite-fonts.mjs
+++ b/scripts/download-blocksuite-fonts.mjs
@@ -2,7 +2,7 @@ import { writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
-import { AffineCanvasTextFonts } from '@blocksuite/blocks';
+import { AffineCanvasTextFonts } from '@blocksuite/affine/blocks';
const fontPath = join(
fileURLToPath(import.meta.url),
diff --git a/tools/utils/src/workspace.gen.ts b/tools/utils/src/workspace.gen.ts
index ce1c8e4d1f..2540e83b37 100644
--- a/tools/utils/src/workspace.gen.ts
+++ b/tools/utils/src/workspace.gen.ts
@@ -5,8 +5,41 @@ export const PackageList = [
location: 'blocksuite/affine/all',
name: '@blocksuite/affine',
workspaceDependencies: [
+ 'blocksuite/affine/blocks/block-attachment',
+ 'blocksuite/affine/blocks/block-bookmark',
+ 'blocksuite/affine/blocks/block-callout',
+ 'blocksuite/affine/blocks/block-code',
+ 'blocksuite/affine/blocks/block-data-view',
+ 'blocksuite/affine/blocks/block-database',
+ 'blocksuite/affine/blocks/block-divider',
+ 'blocksuite/affine/blocks/block-edgeless-text',
+ 'blocksuite/affine/blocks/block-embed',
+ 'blocksuite/affine/blocks/block-frame',
+ 'blocksuite/affine/blocks/block-image',
+ 'blocksuite/affine/blocks/block-latex',
+ 'blocksuite/affine/blocks/block-list',
+ 'blocksuite/affine/blocks/block-note',
+ 'blocksuite/affine/blocks/block-paragraph',
+ 'blocksuite/affine/blocks/block-root',
+ 'blocksuite/affine/blocks/block-surface',
+ 'blocksuite/affine/blocks/block-surface-ref',
+ 'blocksuite/affine/blocks/block-table',
+ 'blocksuite/affine/components',
+ 'blocksuite/affine/fragments/fragment-doc-title',
+ 'blocksuite/affine/fragments/fragment-frame-panel',
+ 'blocksuite/affine/fragments/fragment-outline',
+ 'blocksuite/affine/model',
+ 'blocksuite/affine/rich-text',
+ 'blocksuite/affine/shared',
+ 'blocksuite/affine/widgets/widget-drag-handle',
+ 'blocksuite/affine/widgets/widget-edgeless-auto-connect',
+ 'blocksuite/affine/widgets/widget-frame-title',
+ 'blocksuite/affine/widgets/widget-remote-selection',
+ 'blocksuite/affine/widgets/widget-scroll-anchoring',
+ 'blocksuite/affine/widgets/widget-slash-menu',
+ 'blocksuite/affine/widgets/widget-toolbar',
'blocksuite/framework/block-std',
- 'blocksuite/blocks',
+ 'blocksuite/affine/data-view',
'blocksuite/framework/global',
'blocksuite/framework/inline',
'blocksuite/framework/store',
@@ -520,50 +553,6 @@ export const PackageList = [
'blocksuite/framework/global',
],
},
- {
- location: 'blocksuite/blocks',
- name: '@blocksuite/blocks',
- workspaceDependencies: [
- 'blocksuite/affine/blocks/block-attachment',
- 'blocksuite/affine/blocks/block-bookmark',
- 'blocksuite/affine/blocks/block-callout',
- 'blocksuite/affine/blocks/block-code',
- 'blocksuite/affine/blocks/block-data-view',
- 'blocksuite/affine/blocks/block-database',
- 'blocksuite/affine/blocks/block-divider',
- 'blocksuite/affine/blocks/block-edgeless-text',
- 'blocksuite/affine/blocks/block-embed',
- 'blocksuite/affine/blocks/block-frame',
- 'blocksuite/affine/blocks/block-image',
- 'blocksuite/affine/blocks/block-latex',
- 'blocksuite/affine/blocks/block-list',
- 'blocksuite/affine/blocks/block-note',
- 'blocksuite/affine/blocks/block-paragraph',
- 'blocksuite/affine/blocks/block-root',
- 'blocksuite/affine/blocks/block-surface',
- 'blocksuite/affine/blocks/block-surface-ref',
- 'blocksuite/affine/blocks/block-table',
- 'blocksuite/affine/components',
- 'blocksuite/affine/fragments/fragment-doc-title',
- 'blocksuite/affine/fragments/fragment-frame-panel',
- 'blocksuite/affine/fragments/fragment-outline',
- 'blocksuite/affine/model',
- 'blocksuite/affine/rich-text',
- 'blocksuite/affine/shared',
- 'blocksuite/affine/widgets/widget-drag-handle',
- 'blocksuite/affine/widgets/widget-edgeless-auto-connect',
- 'blocksuite/affine/widgets/widget-frame-title',
- 'blocksuite/affine/widgets/widget-remote-selection',
- 'blocksuite/affine/widgets/widget-scroll-anchoring',
- 'blocksuite/affine/widgets/widget-slash-menu',
- 'blocksuite/affine/widgets/widget-toolbar',
- 'blocksuite/framework/block-std',
- 'blocksuite/affine/data-view',
- 'blocksuite/framework/global',
- 'blocksuite/framework/inline',
- 'blocksuite/framework/store',
- ],
- },
{
location: 'blocksuite/framework/block-std',
name: '@blocksuite/block-std',
@@ -600,41 +589,26 @@ export const PackageList = [
{
location: 'blocksuite/integration-test',
name: '@blocksuite/integration-test',
- workspaceDependencies: [
- 'blocksuite/framework/block-std',
- 'blocksuite/blocks',
- 'blocksuite/framework/global',
- 'blocksuite/framework/inline',
- 'blocksuite/framework/store',
- ],
+ workspaceDependencies: ['blocksuite/affine/all'],
},
{
location: 'blocksuite/playground',
name: '@blocksuite/playground',
workspaceDependencies: [
+ 'blocksuite/affine/all',
'blocksuite/affine/components',
'blocksuite/affine/model',
'blocksuite/affine/shared',
- 'blocksuite/framework/block-std',
- 'blocksuite/blocks',
'blocksuite/affine/data-view',
- 'blocksuite/framework/global',
- 'blocksuite/framework/inline',
'blocksuite/integration-test',
- 'blocksuite/framework/store',
- 'blocksuite/framework/sync',
],
},
{
location: 'blocksuite/tests-legacy',
name: '@blocksuite/legacy-e2e',
workspaceDependencies: [
- 'blocksuite/framework/block-std',
- 'blocksuite/blocks',
- 'blocksuite/framework/global',
- 'blocksuite/framework/inline',
+ 'blocksuite/affine/all',
'blocksuite/integration-test',
- 'blocksuite/framework/store',
],
},
{
@@ -959,7 +933,6 @@ export type PackageName =
| '@blocksuite/affine-widget-scroll-anchoring'
| '@blocksuite/affine-widget-slash-menu'
| '@blocksuite/affine-widget-toolbar'
- | '@blocksuite/blocks'
| '@blocksuite/block-std'
| '@blocksuite/global'
| '@blocksuite/inline'
diff --git a/tsconfig.json b/tsconfig.json
index 99ad903658..f6c0825d75 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -85,7 +85,6 @@
{ "path": "./blocksuite/affine/widgets/widget-scroll-anchoring" },
{ "path": "./blocksuite/affine/widgets/widget-slash-menu" },
{ "path": "./blocksuite/affine/widgets/widget-toolbar" },
- { "path": "./blocksuite/blocks" },
{ "path": "./blocksuite/framework/block-std" },
{ "path": "./blocksuite/framework/global" },
{ "path": "./blocksuite/framework/inline" },
diff --git a/yarn.lock b/yarn.lock
index 897507975d..5bbd1e8b32 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3082,48 +3082,6 @@ __metadata:
"@blocksuite/affine@workspace:*, @blocksuite/affine@workspace:blocksuite/affine/all":
version: 0.0.0-use.local
resolution: "@blocksuite/affine@workspace:blocksuite/affine/all"
- dependencies:
- "@blocksuite/block-std": "workspace:*"
- "@blocksuite/blocks": "workspace:*"
- "@blocksuite/global": "workspace:*"
- "@blocksuite/inline": "workspace:*"
- "@blocksuite/store": "workspace:*"
- "@blocksuite/sync": "workspace:*"
- languageName: unknown
- linkType: soft
-
-"@blocksuite/block-std@workspace:*, @blocksuite/block-std@workspace:blocksuite/framework/block-std":
- version: 0.0.0-use.local
- resolution: "@blocksuite/block-std@workspace:blocksuite/framework/block-std"
- dependencies:
- "@atlaskit/pragmatic-drag-and-drop": "npm:^1.4.0"
- "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "npm:^2.1.0"
- "@atlaskit/pragmatic-drag-and-drop-hitbox": "npm:^1.0.3"
- "@blocksuite/global": "workspace:*"
- "@blocksuite/inline": "workspace:*"
- "@blocksuite/store": "workspace:*"
- "@lit/context": "npm:^1.1.2"
- "@preact/signals-core": "npm:^1.8.0"
- "@types/hast": "npm:^3.0.4"
- "@types/lodash-es": "npm:^4.17.12"
- dompurify: "npm:^3.2.4"
- fractional-indexing: "npm:^3.2.0"
- lib0: "npm:^0.2.97"
- lit: "npm:^3.2.0"
- lodash-es: "npm:^4.17.21"
- lz-string: "npm:^1.5.0"
- rehype-parse: "npm:^9.0.0"
- unified: "npm:^11.0.5"
- vitest: "npm:3.0.8"
- w3c-keyname: "npm:^2.2.8"
- yjs: "npm:^13.6.21"
- zod: "npm:^3.23.8"
- languageName: unknown
- linkType: soft
-
-"@blocksuite/blocks@workspace:*, @blocksuite/blocks@workspace:blocksuite/blocks":
- version: 0.0.0-use.local
- resolution: "@blocksuite/blocks@workspace:blocksuite/blocks"
dependencies:
"@blocksuite/affine-block-attachment": "workspace:*"
"@blocksuite/affine-block-bookmark": "workspace:*"
@@ -3161,14 +3119,43 @@ __metadata:
"@blocksuite/block-std": "workspace:*"
"@blocksuite/data-view": "workspace:*"
"@blocksuite/global": "workspace:*"
- "@blocksuite/icons": "npm:^2.2.1"
"@blocksuite/inline": "workspace:*"
"@blocksuite/store": "workspace:*"
+ "@blocksuite/sync": "workspace:*"
"@vanilla-extract/vite-plugin": "npm:^5.0.0"
vitest: "npm:3.0.8"
languageName: unknown
linkType: soft
+"@blocksuite/block-std@workspace:*, @blocksuite/block-std@workspace:blocksuite/framework/block-std":
+ version: 0.0.0-use.local
+ resolution: "@blocksuite/block-std@workspace:blocksuite/framework/block-std"
+ dependencies:
+ "@atlaskit/pragmatic-drag-and-drop": "npm:^1.4.0"
+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "npm:^2.1.0"
+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "npm:^1.0.3"
+ "@blocksuite/global": "workspace:*"
+ "@blocksuite/inline": "workspace:*"
+ "@blocksuite/store": "workspace:*"
+ "@lit/context": "npm:^1.1.2"
+ "@preact/signals-core": "npm:^1.8.0"
+ "@types/hast": "npm:^3.0.4"
+ "@types/lodash-es": "npm:^4.17.12"
+ dompurify: "npm:^3.2.4"
+ fractional-indexing: "npm:^3.2.0"
+ lib0: "npm:^0.2.97"
+ lit: "npm:^3.2.0"
+ lodash-es: "npm:^4.17.21"
+ lz-string: "npm:^1.5.0"
+ rehype-parse: "npm:^9.0.0"
+ unified: "npm:^11.0.5"
+ vitest: "npm:3.0.8"
+ w3c-keyname: "npm:^2.2.8"
+ yjs: "npm:^13.6.21"
+ zod: "npm:^3.23.8"
+ languageName: unknown
+ linkType: soft
+
"@blocksuite/data-view@workspace:*, @blocksuite/data-view@workspace:blocksuite/affine/data-view":
version: 0.0.0-use.local
resolution: "@blocksuite/data-view@workspace:blocksuite/affine/data-view"
@@ -3239,12 +3226,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@blocksuite/integration-test@workspace:blocksuite/integration-test"
dependencies:
- "@blocksuite/block-std": "workspace:*"
- "@blocksuite/blocks": "workspace:*"
- "@blocksuite/global": "workspace:*"
+ "@blocksuite/affine": "workspace:*"
"@blocksuite/icons": "npm:^2.2.2"
- "@blocksuite/inline": "workspace:*"
- "@blocksuite/store": "workspace:*"
"@floating-ui/dom": "npm:^1.6.13"
"@lit/context": "npm:^1.1.3"
"@lottiefiles/dotlottie-wc": "npm:^0.4.0"
@@ -3266,12 +3249,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@blocksuite/legacy-e2e@workspace:blocksuite/tests-legacy"
dependencies:
- "@blocksuite/block-std": "workspace:*"
- "@blocksuite/blocks": "workspace:*"
- "@blocksuite/global": "workspace:*"
- "@blocksuite/inline": "workspace:*"
+ "@blocksuite/affine": "workspace:*"
"@blocksuite/integration-test": "workspace:*"
- "@blocksuite/store": "workspace:*"
"@playwright/test": "npm:=1.51.0"
"@toeverything/theme": "npm:^1.1.12"
languageName: unknown
@@ -3281,18 +3260,13 @@ __metadata:
version: 0.0.0-use.local
resolution: "@blocksuite/playground@workspace:blocksuite/playground"
dependencies:
+ "@blocksuite/affine": "workspace:*"
"@blocksuite/affine-components": "workspace:*"
"@blocksuite/affine-model": "workspace:*"
"@blocksuite/affine-shared": "workspace:*"
- "@blocksuite/block-std": "workspace:*"
- "@blocksuite/blocks": "workspace:*"
"@blocksuite/data-view": "workspace:*"
- "@blocksuite/global": "workspace:*"
"@blocksuite/icons": "npm:^2.2.1"
- "@blocksuite/inline": "workspace:*"
"@blocksuite/integration-test": "workspace:*"
- "@blocksuite/store": "workspace:*"
- "@blocksuite/sync": "workspace:*"
"@preact/signals-core": "npm:^1.8.0"
"@shoelace-style/shoelace": "npm:2.20.0"
"@toeverything/pdf-viewer": "npm:^0.1.1"