mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
refactor(editor): remove blocks package (#10708)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
1
blocksuite/affine/all/src/blocks/attachment.ts
Normal file
1
blocksuite/affine/all/src/blocks/attachment.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-attachment';
|
||||
1
blocksuite/affine/all/src/blocks/bookmark.ts
Normal file
1
blocksuite/affine/all/src/blocks/bookmark.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-bookmark';
|
||||
1
blocksuite/affine/all/src/blocks/callout.ts
Normal file
1
blocksuite/affine/all/src/blocks/callout.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-callout';
|
||||
1
blocksuite/affine/all/src/blocks/code.ts
Normal file
1
blocksuite/affine/all/src/blocks/code.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-code';
|
||||
1
blocksuite/affine/all/src/blocks/data-view.ts
Normal file
1
blocksuite/affine/all/src/blocks/data-view.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-data-view';
|
||||
1
blocksuite/affine/all/src/blocks/database.ts
Normal file
1
blocksuite/affine/all/src/blocks/database.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-database';
|
||||
1
blocksuite/affine/all/src/blocks/divider.ts
Normal file
1
blocksuite/affine/all/src/blocks/divider.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-divider';
|
||||
1
blocksuite/affine/all/src/blocks/edgeless-text.ts
Normal file
1
blocksuite/affine/all/src/blocks/edgeless-text.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-edgeless-text';
|
||||
1
blocksuite/affine/all/src/blocks/embed.ts
Normal file
1
blocksuite/affine/all/src/blocks/embed.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-embed';
|
||||
1
blocksuite/affine/all/src/blocks/frame.ts
Normal file
1
blocksuite/affine/all/src/blocks/frame.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-frame';
|
||||
1
blocksuite/affine/all/src/blocks/image.ts
Normal file
1
blocksuite/affine/all/src/blocks/image.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-image';
|
||||
@@ -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';
|
||||
|
||||
1
blocksuite/affine/all/src/blocks/latex.ts
Normal file
1
blocksuite/affine/all/src/blocks/latex.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-latex';
|
||||
1
blocksuite/affine/all/src/blocks/list.ts
Normal file
1
blocksuite/affine/all/src/blocks/list.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-list';
|
||||
1
blocksuite/affine/all/src/blocks/note.ts
Normal file
1
blocksuite/affine/all/src/blocks/note.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-note';
|
||||
1
blocksuite/affine/all/src/blocks/paragraph.ts
Normal file
1
blocksuite/affine/all/src/blocks/paragraph.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-paragraph';
|
||||
1
blocksuite/affine/all/src/blocks/root.ts
Normal file
1
blocksuite/affine/all/src/blocks/root.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-root';
|
||||
@@ -1 +0,0 @@
|
||||
export * from '@blocksuite/blocks/schemas';
|
||||
1
blocksuite/affine/all/src/blocks/surface-ref.ts
Normal file
1
blocksuite/affine/all/src/blocks/surface-ref.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-surface-ref';
|
||||
1
blocksuite/affine/all/src/blocks/surface.ts
Normal file
1
blocksuite/affine/all/src/blocks/surface.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-surface';
|
||||
1
blocksuite/affine/all/src/blocks/table.ts
Normal file
1
blocksuite/affine/all/src/blocks/table.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-block-table';
|
||||
1
blocksuite/affine/all/src/components/block-selection.ts
Normal file
1
blocksuite/affine/all/src/components/block-selection.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/block-selection';
|
||||
1
blocksuite/affine/all/src/components/block-zero-width.ts
Normal file
1
blocksuite/affine/all/src/components/block-zero-width.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/block-zero-width';
|
||||
1
blocksuite/affine/all/src/components/caption.ts
Normal file
1
blocksuite/affine/all/src/components/caption.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/caption';
|
||||
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/card-style-dropdown-menu';
|
||||
1
blocksuite/affine/all/src/components/color-picker.ts
Normal file
1
blocksuite/affine/all/src/components/color-picker.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/color-picker';
|
||||
1
blocksuite/affine/all/src/components/context-menu.ts
Normal file
1
blocksuite/affine/all/src/components/context-menu.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/context-menu';
|
||||
1
blocksuite/affine/all/src/components/date-picker.ts
Normal file
1
blocksuite/affine/all/src/components/date-picker.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/date-picker';
|
||||
1
blocksuite/affine/all/src/components/drop-indicator.ts
Normal file
1
blocksuite/affine/all/src/components/drop-indicator.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/drop-indicator';
|
||||
1
blocksuite/affine/all/src/components/embed-card-modal.ts
Normal file
1
blocksuite/affine/all/src/components/embed-card-modal.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/embed-card-modal';
|
||||
1
blocksuite/affine/all/src/components/filterable-list.ts
Normal file
1
blocksuite/affine/all/src/components/filterable-list.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/filterable-list';
|
||||
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/highlight-dropdown-menu';
|
||||
1
blocksuite/affine/all/src/components/hover.ts
Normal file
1
blocksuite/affine/all/src/components/hover.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/hover';
|
||||
1
blocksuite/affine/all/src/components/icon-button.ts
Normal file
1
blocksuite/affine/all/src/components/icon-button.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/icon-button';
|
||||
1
blocksuite/affine/all/src/components/icons.ts
Normal file
1
blocksuite/affine/all/src/components/icons.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/icons';
|
||||
1
blocksuite/affine/all/src/components/link-preview.ts
Normal file
1
blocksuite/affine/all/src/components/link-preview.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/link-preview';
|
||||
1
blocksuite/affine/all/src/components/linked-doc-title.ts
Normal file
1
blocksuite/affine/all/src/components/linked-doc-title.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/linked-doc-title';
|
||||
1
blocksuite/affine/all/src/components/notification.ts
Normal file
1
blocksuite/affine/all/src/components/notification.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/notification';
|
||||
1
blocksuite/affine/all/src/components/peek.ts
Normal file
1
blocksuite/affine/all/src/components/peek.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/peek';
|
||||
1
blocksuite/affine/all/src/components/portal.ts
Normal file
1
blocksuite/affine/all/src/components/portal.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/portal';
|
||||
1
blocksuite/affine/all/src/components/smooth-corner.ts
Normal file
1
blocksuite/affine/all/src/components/smooth-corner.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/smooth-corner';
|
||||
1
blocksuite/affine/all/src/components/toast.ts
Normal file
1
blocksuite/affine/all/src/components/toast.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/toast';
|
||||
1
blocksuite/affine/all/src/components/toggle-button.ts
Normal file
1
blocksuite/affine/all/src/components/toggle-button.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/toggle-button';
|
||||
1
blocksuite/affine/all/src/components/toggle-switch.ts
Normal file
1
blocksuite/affine/all/src/components/toggle-switch.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/toggle-switch';
|
||||
1
blocksuite/affine/all/src/components/toolbar.ts
Normal file
1
blocksuite/affine/all/src/components/toolbar.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/toolbar';
|
||||
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-components/view-dropdown-menu';
|
||||
1
blocksuite/affine/all/src/data-view/effects.ts
Normal file
1
blocksuite/affine/all/src/data-view/effects.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/data-view/effects';
|
||||
1
blocksuite/affine/all/src/data-view/index.ts
Normal file
1
blocksuite/affine/all/src/data-view/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/data-view';
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
1
blocksuite/affine/all/src/fragments/doc-title.ts
Normal file
1
blocksuite/affine/all/src/fragments/doc-title.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-fragment-doc-title';
|
||||
1
blocksuite/affine/all/src/fragments/frame-panel.ts
Normal file
1
blocksuite/affine/all/src/fragments/frame-panel.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-fragment-frame-panel';
|
||||
1
blocksuite/affine/all/src/fragments/outline.ts
Normal file
1
blocksuite/affine/all/src/fragments/outline.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-fragment-outline';
|
||||
1
blocksuite/affine/all/src/inline/effects.ts
Normal file
1
blocksuite/affine/all/src/inline/effects.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/inline/effects';
|
||||
1
blocksuite/affine/all/src/model/index.ts
Normal file
1
blocksuite/affine/all/src/model/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-model';
|
||||
1
blocksuite/affine/all/src/rich-text/effects.ts
Normal file
1
blocksuite/affine/all/src/rich-text/effects.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-rich-text/effects';
|
||||
1
blocksuite/affine/all/src/rich-text/index.ts
Normal file
1
blocksuite/affine/all/src/rich-text/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-rich-text';
|
||||
1
blocksuite/affine/all/src/shared/adapters.ts
Normal file
1
blocksuite/affine/all/src/shared/adapters.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/adapters';
|
||||
1
blocksuite/affine/all/src/shared/commands.ts
Normal file
1
blocksuite/affine/all/src/shared/commands.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/commands';
|
||||
1
blocksuite/affine/all/src/shared/consts.ts
Normal file
1
blocksuite/affine/all/src/shared/consts.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/consts';
|
||||
1
blocksuite/affine/all/src/shared/selection.ts
Normal file
1
blocksuite/affine/all/src/shared/selection.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/selection';
|
||||
1
blocksuite/affine/all/src/shared/services.ts
Normal file
1
blocksuite/affine/all/src/shared/services.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/services';
|
||||
1
blocksuite/affine/all/src/shared/styles.ts
Normal file
1
blocksuite/affine/all/src/shared/styles.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/styles';
|
||||
1
blocksuite/affine/all/src/shared/theme.ts
Normal file
1
blocksuite/affine/all/src/shared/theme.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/theme';
|
||||
1
blocksuite/affine/all/src/shared/types.ts
Normal file
1
blocksuite/affine/all/src/shared/types.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/types';
|
||||
1
blocksuite/affine/all/src/shared/utils.ts
Normal file
1
blocksuite/affine/all/src/shared/utils.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-shared/utils';
|
||||
@@ -1,6 +1 @@
|
||||
export {
|
||||
createAutoIncrementIdGenerator,
|
||||
TestDoc,
|
||||
TestMeta,
|
||||
TestWorkspace,
|
||||
} from '@blocksuite/store/test';
|
||||
export * from '@blocksuite/store/test';
|
||||
|
||||
1
blocksuite/affine/all/src/widgets/drag-handle.ts
Normal file
1
blocksuite/affine/all/src/widgets/drag-handle.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-drag-handle';
|
||||
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-edgeless-auto-connect';
|
||||
1
blocksuite/affine/all/src/widgets/frame-title.ts
Normal file
1
blocksuite/affine/all/src/widgets/frame-title.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-frame-title';
|
||||
1
blocksuite/affine/all/src/widgets/remote-selection.ts
Normal file
1
blocksuite/affine/all/src/widgets/remote-selection.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-remote-selection';
|
||||
1
blocksuite/affine/all/src/widgets/scroll-anchoring.ts
Normal file
1
blocksuite/affine/all/src/widgets/scroll-anchoring.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-scroll-anchoring';
|
||||
1
blocksuite/affine/all/src/widgets/slash-menu.ts
Normal file
1
blocksuite/affine/all/src/widgets/slash-menu.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-slash-menu';
|
||||
1
blocksuite/affine/all/src/widgets/toolbar.ts
Normal file
1
blocksuite/affine/all/src/widgets/toolbar.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@blocksuite/affine-widget-toolbar';
|
||||
@@ -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" },
|
||||
|
||||
@@ -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.`
|
||||
)
|
||||
@@ -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.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user