feat: migrate to blocksuite/affine (#8332)

Use `@blocksuite/affine` package for all blocksuite features in affine.

```ts
@blocksuite/store -> @blocksuite/affine/store
@blocksuite/global -> @blocksuite/affine/global
@blocksuite/block-std -> @blocksuite/affine/block-std
@blocksuite/blocks -> @blocksuite/affine/blocks
@blocksuite/presets -> @blocksuite/affine/presets
```
This commit is contained in:
Saul-Mirone 2024-09-20 10:55:47 +00:00
parent 39f60145fe
commit 35e232c61c
No known key found for this signature in database
GPG Key ID: 0D941B4A9125B742
221 changed files with 504 additions and 486 deletions

View File

@ -3,8 +3,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"devDependencies": { "devDependencies": {
"@blocksuite/global": "0.17.14", "@blocksuite/affine": "0.17.14",
"@blocksuite/store": "0.17.14",
"vitest": "2.1.1" "vitest": "2.1.1"
}, },
"exports": { "exports": {
@ -17,8 +16,7 @@
"./blocksuite": "./src/blocksuite/index.ts" "./blocksuite": "./src/blocksuite/index.ts"
}, },
"peerDependencies": { "peerDependencies": {
"@affine/templates": "workspace:*", "@affine/templates": "workspace:*"
"@blocksuite/global": "0.11.0-nightly-202401020419-752a5b8"
}, },
"dependencies": { "dependencies": {
"zod": "^3.22.4" "zod": "^3.22.4"

View File

@ -1,5 +1,5 @@
// This file should has not side effect // This file should has not side effect
import type { DocCollection } from '@blocksuite/store'; import type { DocCollection } from '@blocksuite/affine/store';
declare global { declare global {
// eslint-disable-next-line no-var // eslint-disable-next-line no-var

View File

@ -1,4 +1,4 @@
import type { DocCollection } from '@blocksuite/store'; import type { DocCollection } from '@blocksuite/affine/store';
import { z } from 'zod'; import { z } from 'zod';
export const literalValueSchema: z.ZodType<LiteralValue, z.ZodTypeDef> = export const literalValueSchema: z.ZodType<LiteralValue, z.ZodTypeDef> =

View File

@ -14,10 +14,7 @@
"@affine/debug": "workspace:*", "@affine/debug": "workspace:*",
"@affine/env": "workspace:*", "@affine/env": "workspace:*",
"@affine/templates": "workspace:*", "@affine/templates": "workspace:*",
"@blocksuite/blocks": "0.17.14", "@blocksuite/affine": "0.17.14",
"@blocksuite/global": "0.17.14",
"@blocksuite/presets": "0.17.14",
"@blocksuite/store": "0.17.14",
"@datastructures-js/binary-search-tree": "^5.3.2", "@datastructures-js/binary-search-tree": "^5.3.2",
"foxact": "^0.2.33", "foxact": "^0.2.33",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
@ -34,7 +31,6 @@
"devDependencies": { "devDependencies": {
"@affine-test/fixtures": "workspace:*", "@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*", "@affine/templates": "workspace:*",
"@blocksuite/presets": "0.17.14",
"@testing-library/react": "^16.0.0", "@testing-library/react": "^16.0.0",
"fake-indexeddb": "^6.0.0", "fake-indexeddb": "^6.0.0",
"react": "^18.2.0", "react": "^18.2.0",
@ -43,7 +39,6 @@
}, },
"peerDependencies": { "peerDependencies": {
"@affine/templates": "*", "@affine/templates": "*",
"@blocksuite/presets": "*",
"electron": "*", "electron": "*",
"react": "*", "react": "*",
"yjs": "^13" "yjs": "^13"
@ -52,9 +47,6 @@
"@affine/templates": { "@affine/templates": {
"optional": true "optional": true
}, },
"@blocksuite/presets": {
"optional": true
},
"electron": { "electron": {
"optional": true "optional": true
}, },

View File

@ -1,4 +1,4 @@
import type { Schema } from '@blocksuite/store'; import type { Schema } from '@blocksuite/affine/store';
import type { Array as YArray } from 'yjs'; import type { Array as YArray } from 'yjs';
import { import {
applyUpdate, applyUpdate,

View File

@ -1,4 +1,4 @@
import type { DocCollection } from '@blocksuite/store'; import type { DocCollection } from '@blocksuite/affine/store';
import type { Array as YArray, Doc as YDoc, Map as YMap } from 'yjs'; import type { Array as YArray, Doc as YDoc, Map as YMap } from 'yjs';
/** /**

View File

@ -1,11 +1,11 @@
import type { SurfaceBlockProps } from '@blocksuite/block-std/gfx'; import type { SurfaceBlockProps } from '@blocksuite/affine/block-std/gfx';
import { import {
NoteDisplayMode, NoteDisplayMode,
type NoteProps, type NoteProps,
type ParagraphProps, type ParagraphProps,
type RootBlockProps, type RootBlockProps,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { type Doc, Text } from '@blocksuite/store'; import { type Doc, Text } from '@blocksuite/affine/store';
export interface DocProps { export interface DocProps {
page?: Partial<RootBlockProps>; page?: Partial<RootBlockProps>;

View File

@ -1,4 +1,4 @@
import type { DocMode, RootBlockModel } from '@blocksuite/blocks'; import type { DocMode, RootBlockModel } from '@blocksuite/affine/blocks';
import { Entity } from '../../../framework'; import { Entity } from '../../../framework';
import type { WorkspaceService } from '../../workspace'; import type { WorkspaceService } from '../../workspace';

View File

@ -1,4 +1,4 @@
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import { map } from 'rxjs'; import { map } from 'rxjs';
import { Entity } from '../../../framework'; import { Entity } from '../../../framework';

View File

@ -1,5 +1,5 @@
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import type { DocMeta } from '@blocksuite/store'; import type { DocMeta } from '@blocksuite/affine/store';
import { Entity } from '../../../framework'; import { Entity } from '../../../framework';
import { LiveData } from '../../../livedata'; import { LiveData } from '../../../livedata';

View File

@ -1,4 +1,4 @@
import type { Doc as BlockSuiteDoc } from '@blocksuite/store'; import type { Doc as BlockSuiteDoc } from '@blocksuite/affine/store';
import { Scope } from '../../../framework'; import { Scope } from '../../../framework';
import type { DocRecord } from '../entities/record'; import type { DocRecord } from '../entities/record';

View File

@ -1,5 +1,5 @@
import { Unreachable } from '@affine/env/constant'; import { Unreachable } from '@affine/env/constant';
import { type DocMode } from '@blocksuite/blocks'; import { type DocMode } from '@blocksuite/affine/blocks';
import { Service } from '../../../framework'; import { Service } from '../../../framework';
import { type DocProps, initDocFromProps } from '../../../initialization'; import { type DocProps, initDocFromProps } from '../../../initialization';

View File

@ -1,5 +1,5 @@
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import type { DocMeta } from '@blocksuite/store'; import type { DocMeta } from '@blocksuite/affine/store';
import { isEqual } from 'lodash-es'; import { isEqual } from 'lodash-es';
import { distinctUntilChanged, Observable } from 'rxjs'; import { distinctUntilChanged, Observable } from 'rxjs';

View File

@ -1,4 +1,4 @@
import type { BlockSuiteFlags } from '@blocksuite/global/types'; import type { BlockSuiteFlags } from '@blocksuite/affine/global/types';
type FeedbackType = 'discord' | 'email' | 'github'; type FeedbackType = 'discord' | 'email' | 'github';

View File

@ -1,4 +1,4 @@
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import { Entity } from '../../../framework'; import { Entity } from '../../../framework';
import { LiveData } from '../../../livedata'; import { LiveData } from '../../../livedata';

View File

@ -1,4 +1,4 @@
import { DocCollection } from '@blocksuite/store'; import { DocCollection } from '@blocksuite/affine/store';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import type { Awareness } from 'y-protocols/awareness.js'; import type { Awareness } from 'y-protocols/awareness.js';

View File

@ -1,6 +1,6 @@
import { AffineSchemas } from '@blocksuite/blocks/schemas'; import { AffineSchemas } from '@blocksuite/affine/blocks/schemas';
import { AIChatBlockSchema } from '@blocksuite/presets'; import { AIChatBlockSchema } from '@blocksuite/affine/presets';
import { Schema } from '@blocksuite/store'; import { Schema } from '@blocksuite/affine/store';
let _schema: Schema | null = null; let _schema: Schema | null = null;
export function getAFFiNEWorkspaceSchema() { export function getAFFiNEWorkspaceSchema() {

View File

@ -1,5 +1,5 @@
import type { WorkspaceFlavour } from '@affine/env/workspace'; import type { WorkspaceFlavour } from '@affine/env/workspace';
import type { DocCollection } from '@blocksuite/store'; import type { DocCollection } from '@blocksuite/affine/store';
import { createIdentifier } from '../../../framework'; import { createIdentifier } from '../../../framework';
import type { LiveData } from '../../../livedata'; import type { LiveData } from '../../../livedata';

View File

@ -2,7 +2,7 @@ import { Scope } from '../../../framework';
import type { WorkspaceOpenOptions } from '../open-options'; import type { WorkspaceOpenOptions } from '../open-options';
import type { WorkspaceEngineProvider } from '../providers/flavour'; import type { WorkspaceEngineProvider } from '../providers/flavour';
export type { DocCollection } from '@blocksuite/store'; export type { DocCollection } from '@blocksuite/affine/store';
export class WorkspaceScope extends Scope<{ export class WorkspaceScope extends Scope<{
openOptions: WorkspaceOpenOptions; openOptions: WorkspaceOpenOptions;

View File

@ -1,5 +1,5 @@
import type { WorkspaceFlavour } from '@affine/env/workspace'; import type { WorkspaceFlavour } from '@affine/env/workspace';
import type { DocCollection } from '@blocksuite/store'; import type { DocCollection } from '@blocksuite/affine/store';
import { Service } from '../../../framework'; import { Service } from '../../../framework';
import type { BlobStorage, DocStorage } from '../../../sync'; import type { BlobStorage, DocStorage } from '../../../sync';

View File

@ -1,5 +1,5 @@
import { WorkspaceFlavour } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace';
import { assertEquals } from '@blocksuite/global/utils'; import { assertEquals } from '@blocksuite/affine/global/utils';
import { applyUpdate, encodeStateAsUpdate } from 'yjs'; import { applyUpdate, encodeStateAsUpdate } from 'yjs';
import { Service } from '../../../framework'; import { Service } from '../../../framework';

View File

@ -1,5 +1,5 @@
import { WorkspaceFlavour } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace';
import { DocCollection, nanoid } from '@blocksuite/store'; import { DocCollection, nanoid } from '@blocksuite/affine/store';
import { map } from 'rxjs'; import { map } from 'rxjs';
import { applyUpdate, encodeStateAsUpdate } from 'yjs'; import { applyUpdate, encodeStateAsUpdate } from 'yjs';

View File

@ -1,5 +1,5 @@
import { DebugLogger } from '@affine/debug'; import { DebugLogger } from '@affine/debug';
import { Slot } from '@blocksuite/global/utils'; import { Slot } from '@blocksuite/affine/global/utils';
import { difference } from 'lodash-es'; import { difference } from 'lodash-es';
import { LiveData } from '../../livedata'; import { LiveData } from '../../livedata';

View File

@ -28,7 +28,7 @@
"@affine/core": "workspace:*", "@affine/core": "workspace:*",
"@affine/i18n": "workspace:*", "@affine/i18n": "workspace:*",
"@affine/native": "workspace:*", "@affine/native": "workspace:*",
"@blocksuite/global": "0.17.14", "@blocksuite/affine": "0.17.14",
"@electron-forge/cli": "^7.3.0", "@electron-forge/cli": "^7.3.0",
"@electron-forge/core": "^7.3.0", "@electron-forge/core": "^7.3.0",
"@electron-forge/core-utils": "^7.3.0", "@electron-forge/core-utils": "^7.3.0",

View File

@ -1,4 +1,4 @@
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import { AsyncCall } from 'async-call-rpc'; import { AsyncCall } from 'async-call-rpc';
import type { HelperToMain, MainToHelper } from '../shared/type'; import type { HelperToMain, MainToHelper } from '../shared/type';

View File

@ -13,7 +13,7 @@
"@affine/component": "workspace:*", "@affine/component": "workspace:*",
"@affine/core": "workspace:*", "@affine/core": "workspace:*",
"@affine/i18n": "workspace:*", "@affine/i18n": "workspace:*",
"@blocksuite/blocks": "0.17.14", "@blocksuite/affine": "0.17.14",
"@blocksuite/icons": "^2.1.67", "@blocksuite/icons": "^2.1.67",
"@sentry/react": "^8.0.0", "@sentry/react": "^8.0.0",
"react": "^18.2.0", "react": "^18.2.0",

View File

@ -13,11 +13,8 @@
"build:storybook": "storybook build" "build:storybook": "storybook build"
}, },
"peerDependencies": { "peerDependencies": {
"@blocksuite/blocks": "*", "@blocksuite/affine": "*",
"@blocksuite/global": "*", "@blocksuite/icons": "2.1.67"
"@blocksuite/icons": "2.1.67",
"@blocksuite/presets": "*",
"@blocksuite/store": "*"
}, },
"dependencies": { "dependencies": {
"@affine/cli": "workspace:*", "@affine/cli": "workspace:*",
@ -63,7 +60,7 @@
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
"devDependencies": { "devDependencies": {
"@blocksuite/global": "0.17.14", "@blocksuite/affine": "0.17.14",
"@blocksuite/icons": "2.1.67", "@blocksuite/icons": "2.1.67",
"@chromatic-com/storybook": "^2.0.0", "@chromatic-com/storybook": "^2.0.0",
"@storybook/addon-essentials": "^8.2.9", "@storybook/addon-essentials": "^8.2.9",

View File

@ -1,4 +1,4 @@
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import { assignInlineVars } from '@vanilla-extract/dynamic'; import { assignInlineVars } from '@vanilla-extract/dynamic';
import clsx from 'clsx'; import clsx from 'clsx';
import { import {

View File

@ -16,13 +16,8 @@
"@affine/i18n": "workspace:*", "@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*", "@affine/templates": "workspace:*",
"@affine/track": "workspace:*", "@affine/track": "workspace:*",
"@blocksuite/block-std": "0.17.14", "@blocksuite/affine": "0.17.14",
"@blocksuite/blocks": "0.17.14",
"@blocksuite/global": "0.17.14",
"@blocksuite/icons": "2.1.67", "@blocksuite/icons": "2.1.67",
"@blocksuite/inline": "0.17.14",
"@blocksuite/presets": "0.17.14",
"@blocksuite/store": "0.17.14",
"@dnd-kit/core": "^6.1.0", "@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0", "@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0", "@dnd-kit/sortable": "^8.0.0",

View File

@ -3,13 +3,13 @@ import type {
BlockSelection, BlockSelection,
EditorHost, EditorHost,
TextSelection, TextSelection,
} from '@blocksuite/block-std'; } from '@blocksuite/affine/block-std';
import type { import type {
DocMode, DocMode,
EdgelessRootService, EdgelessRootService,
ImageSelection, ImageSelection,
RootService, RootService,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
BlocksUtils, BlocksUtils,
DocModeProvider, DocModeProvider,
@ -18,14 +18,14 @@ import {
NotificationProvider, NotificationProvider,
RefNodeSlotsProvider, RefNodeSlotsProvider,
TelemetryProvider, TelemetryProvider,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
Bound, Bound,
getElementsBound, getElementsBound,
type SerializedXYWH, type SerializedXYWH,
} from '@blocksuite/global/utils'; } from '@blocksuite/affine/global/utils';
import { type ChatMessage } from '@blocksuite/presets'; import { type ChatMessage } from '@blocksuite/affine/presets';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import type { TemplateResult } from 'lit'; import type { TemplateResult } from 'lit';
import { AIProvider, type AIUserInfo } from '../provider'; import { AIProvider, type AIUserInfo } from '../provider';

View File

@ -1,13 +1,13 @@
import './ask-ai-panel'; import './ask-ai-panel';
import { type EditorHost } from '@blocksuite/block-std'; import { type EditorHost } from '@blocksuite/affine/block-std';
import { import {
type AIItemGroupConfig, type AIItemGroupConfig,
AIStarIcon, AIStarIcon,
EdgelessRootService, EdgelessRootService,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { createLitPortal, HoverController } from '@blocksuite/blocks'; import { createLitPortal, HoverController } from '@blocksuite/affine/blocks';
import { assertExists, WithDisposable } from '@blocksuite/global/utils'; import { assertExists, WithDisposable } from '@blocksuite/affine/global/utils';
import { flip, offset } from '@floating-ui/dom'; import { flip, offset } from '@floating-ui/dom';
import { css, html, LitElement, nothing } from 'lit'; import { css, html, LitElement, nothing } from 'lit';
import { property, query } from 'lit/decorators.js'; import { property, query } from 'lit/decorators.js';

View File

@ -1,10 +1,10 @@
import { type EditorHost } from '@blocksuite/block-std'; import { type EditorHost } from '@blocksuite/affine/block-std';
import { import {
type AIItemGroupConfig, type AIItemGroupConfig,
EdgelessRootService, EdgelessRootService,
scrollbarStyle, scrollbarStyle,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement } from 'lit'; import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -2,8 +2,11 @@ import type {
BlockSelection, BlockSelection,
EditorHost, EditorHost,
TextSelection, TextSelection,
} from '@blocksuite/block-std'; } from '@blocksuite/affine/block-std';
import { type ImageSelection, NotificationProvider } from '@blocksuite/blocks'; import {
type ImageSelection,
NotificationProvider,
} from '@blocksuite/affine/blocks';
import { css, html, LitElement, nothing } from 'lit'; import { css, html, LitElement, nothing } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js'; import { classMap } from 'lit/directives/class-map.js';

View File

@ -2,13 +2,13 @@ import type {
BlockSelection, BlockSelection,
EditorHost, EditorHost,
TextSelection, TextSelection,
} from '@blocksuite/block-std'; } from '@blocksuite/affine/block-std';
import { import {
createButtonPopper, createButtonPopper,
NotificationProvider, NotificationProvider,
Tooltip, Tooltip,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { noop, WithDisposable } from '@blocksuite/global/utils'; import { noop, WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement, nothing, type PropertyValues } from 'lit'; import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
import { property, query, state } from 'lit/decorators.js'; import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js'; import { repeat } from 'lit/directives/repeat.js';

View File

@ -1,4 +1,8 @@
import type { Chain, EditorHost, InitCommandCtx } from '@blocksuite/block-std'; import type {
Chain,
EditorHost,
InitCommandCtx,
} from '@blocksuite/affine/block-std';
import { import {
type AIItemGroupConfig, type AIItemGroupConfig,
type AISubItemConfig, type AISubItemConfig,
@ -6,7 +10,7 @@ import {
EDGELESS_ELEMENT_TOOLBAR_WIDGET, EDGELESS_ELEMENT_TOOLBAR_WIDGET,
type EdgelessElementToolbarWidget, type EdgelessElementToolbarWidget,
matchFlavours, matchFlavours,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import type { TemplateResult } from 'lit'; import type { TemplateResult } from 'lit';
import { actionToHandler } from '../actions/doc-handler'; import { actionToHandler } from '../actions/doc-handler';

View File

@ -1,10 +1,10 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { import type {
AffineAIPanelWidget, AffineAIPanelWidget,
AffineAIPanelWidgetConfig, AffineAIPanelWidgetConfig,
AIError, AIError,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import type { TemplateResult } from 'lit'; import type { TemplateResult } from 'lit';
import { import {

View File

@ -1,10 +1,10 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { import type {
AffineAIPanelWidget, AffineAIPanelWidget,
AIError, AIError,
EdgelessCopilotWidget, EdgelessCopilotWidget,
MindmapElementModel, MindmapElementModel,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
BlocksUtils, BlocksUtils,
EdgelessTextBlockModel, EdgelessTextBlockModel,
@ -13,10 +13,10 @@ import {
NoteBlockModel, NoteBlockModel,
ShapeElementModel, ShapeElementModel,
TextElementModel, TextElementModel,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import { AIChatBlockModel } from '@blocksuite/presets'; import { AIChatBlockModel } from '@blocksuite/affine/presets';
import { Slice } from '@blocksuite/store'; import { Slice } from '@blocksuite/affine/store';
import type { TemplateResult } from 'lit'; import type { TemplateResult } from 'lit';
import { getAIPanel } from '../ai-panel'; import { getAIPanel } from '../ai-panel';

View File

@ -1,4 +1,4 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { import type {
AffineAIPanelWidget, AffineAIPanelWidget,
AIItemConfig, AIItemConfig,
@ -8,7 +8,7 @@ import type {
MindmapElementModel, MindmapElementModel,
ShapeElementModel, ShapeElementModel,
SurfaceBlockModel, SurfaceBlockModel,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
DeleteIcon, DeleteIcon,
EDGELESS_ELEMENT_TOOLBAR_WIDGET, EDGELESS_ELEMENT_TOOLBAR_WIDGET,
@ -23,8 +23,8 @@ import {
NoteDisplayMode, NoteDisplayMode,
ResetIcon, ResetIcon,
TelemetryProvider, TelemetryProvider,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists, Bound } from '@blocksuite/global/utils'; import { assertExists, Bound } from '@blocksuite/affine/global/utils';
import { html, type TemplateResult } from 'lit'; import { html, type TemplateResult } from 'lit';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,6 +1,6 @@
import type { getCopilotHistoriesQuery, RequestOptions } from '@affine/graphql'; import type { getCopilotHistoriesQuery, RequestOptions } from '@affine/graphql';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { BlockModel } from '@blocksuite/store'; import type { BlockModel } from '@blocksuite/affine/store';
export const translateLangs = [ export const translateLangs = [
'English', 'English',

View File

@ -1,4 +1,4 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { import {
AFFINE_AI_PANEL_WIDGET, AFFINE_AI_PANEL_WIDGET,
AffineAIPanelWidget, AffineAIPanelWidget,
@ -8,8 +8,8 @@ import {
isInsideEdgelessEditor, isInsideEdgelessEditor,
matchFlavours, matchFlavours,
NoteDisplayMode, NoteDisplayMode,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists, Bound } from '@blocksuite/global/utils'; import { assertExists, Bound } from '@blocksuite/affine/global/utils';
import type { TemplateResult } from 'lit'; import type { TemplateResult } from 'lit';
import { import {

View File

@ -2,7 +2,7 @@ import {
BlockServiceWatcher, BlockServiceWatcher,
type ExtensionType, type ExtensionType,
WidgetViewMapIdentifier, WidgetViewMapIdentifier,
} from '@blocksuite/block-std'; } from '@blocksuite/affine/block-std';
import { import {
AFFINE_AI_PANEL_WIDGET, AFFINE_AI_PANEL_WIDGET,
AFFINE_EDGELESS_COPILOT_WIDGET, AFFINE_EDGELESS_COPILOT_WIDGET,
@ -21,8 +21,8 @@ import {
pageRootWidgetViewMap, pageRootWidgetViewMap,
ParagraphBlockService, ParagraphBlockService,
ParagraphBlockSpec, ParagraphBlockSpec,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertInstanceOf } from '@blocksuite/global/utils'; import { assertInstanceOf } from '@blocksuite/affine/global/utils';
import { literal, unsafeStatic } from 'lit/static-html.js'; import { literal, unsafeStatic } from 'lit/static-html.js';
import { buildAIPanelConfig } from './ai-panel'; import { buildAIPanelConfig } from './ai-panel';

View File

@ -1,5 +1,5 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement, nothing, type TemplateResult } from 'lit'; import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
import { property, state } from 'lit/decorators.js'; import { property, state } from 'lit/decorators.js';

View File

@ -1,8 +1,8 @@
import './action-wrapper'; import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html, nothing } from 'lit'; import { html, nothing } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';

View File

@ -1,8 +1,8 @@
import './action-wrapper'; import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html, nothing } from 'lit'; import { html, nothing } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,8 +1,8 @@
import './action-wrapper'; import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html, nothing } from 'lit'; import { html, nothing } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,8 +1,8 @@
import './action-wrapper'; import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html } from 'lit'; import { html } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,9 +1,9 @@
import './action-wrapper'; import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { MiniMindmapPreview } from '@blocksuite/blocks'; import { MiniMindmapPreview } from '@blocksuite/affine/blocks';
import { noop, WithDisposable } from '@blocksuite/global/utils'; import { noop, WithDisposable } from '@blocksuite/affine/global/utils';
import { html } from 'lit'; import { html } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,9 +1,9 @@
import './action-wrapper'; import './action-wrapper';
import '../../messages/slides-renderer'; import '../../messages/slides-renderer';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html, nothing } from 'lit'; import { html, nothing } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,7 +1,7 @@
import './action-wrapper'; import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement } from 'lit'; import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,4 +1,4 @@
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement } from 'lit'; import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';

View File

@ -1,12 +1,12 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { import {
type ImageBlockModel, type ImageBlockModel,
isInsideEdgelessEditor, isInsideEdgelessEditor,
type NoteBlockModel, type NoteBlockModel,
NoteDisplayMode, NoteDisplayMode,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import type { BlockModel } from '@blocksuite/store'; import type { BlockModel } from '@blocksuite/affine/store';
import { import {
css, css,
html, html,

View File

@ -1,4 +1,4 @@
import type { AIError } from '@blocksuite/blocks'; import type { AIError } from '@blocksuite/affine/blocks';
export type ChatMessage = { export type ChatMessage = {
id: string; id: string;

View File

@ -1,6 +1,6 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/blocks'; import { type AIError, openFileOrFiles } from '@blocksuite/affine/blocks';
import { assertExists, WithDisposable } from '@blocksuite/global/utils'; import { assertExists, WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement, nothing } from 'lit'; import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js'; import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js'; import { repeat } from 'lit/directives/repeat.js';

View File

@ -13,16 +13,16 @@ import './chat-cards';
import '../_common/components/chat-action-list'; import '../_common/components/chat-action-list';
import '../_common/components/copy-more'; import '../_common/components/copy-more';
import type { BaseSelection, EditorHost } from '@blocksuite/block-std'; import type { BaseSelection, EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { import {
type AIError, type AIError,
DocModeProvider, DocModeProvider,
isInsidePageEditor, isInsidePageEditor,
PaymentRequiredError, PaymentRequiredError,
UnauthorizedError, UnauthorizedError,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, nothing, type PropertyValues } from 'lit'; import { css, html, nothing, type PropertyValues } from 'lit';
import { property, query, state } from 'lit/decorators.js'; import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js'; import { repeat } from 'lit/directives/repeat.js';

View File

@ -1,11 +1,11 @@
import './chat-panel-input'; import './chat-panel-input';
import './chat-panel-messages'; import './chat-panel-messages';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/block-std'; import { ShadowlessElement } from '@blocksuite/affine/block-std';
import { NotificationProvider } from '@blocksuite/blocks'; import { NotificationProvider } from '@blocksuite/affine/blocks';
import { debounce, WithDisposable } from '@blocksuite/global/utils'; import { debounce, WithDisposable } from '@blocksuite/affine/global/utils';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { css, html, type PropertyValues } from 'lit'; import { css, html, type PropertyValues } from 'lit';
import { property, state } from 'lit/decorators.js'; import { property, state } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js'; import { createRef, type Ref, ref } from 'lit/directives/ref.js';

View File

@ -1,6 +1,6 @@
import '../../_common/components/ask-ai-button'; import '../../_common/components/ask-ai-button';
import type { AffineCodeToolbarWidget } from '@blocksuite/blocks'; import type { AffineCodeToolbarWidget } from '@blocksuite/affine/blocks';
import { html } from 'lit'; import { html } from 'lit';
const AICodeItemGroups = buildAICodeItemGroups(); const AICodeItemGroups = buildAICodeItemGroups();

View File

@ -5,7 +5,7 @@ import {
MindmapElementModel, MindmapElementModel,
ShapeElementModel, ShapeElementModel,
TextElementModel, TextElementModel,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
AIExpandMindMapIcon, AIExpandMindMapIcon,

View File

@ -4,9 +4,9 @@ import type {
EdgelessCopilotWidget, EdgelessCopilotWidget,
EdgelessElementToolbarWidget, EdgelessElementToolbarWidget,
EdgelessRootBlockComponent, EdgelessRootBlockComponent,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { EdgelessCopilotToolbarEntry } from '@blocksuite/blocks'; import { EdgelessCopilotToolbarEntry } from '@blocksuite/affine/blocks';
import { noop } from '@blocksuite/global/utils'; import { noop } from '@blocksuite/affine/global/utils';
import { html } from 'lit'; import { html } from 'lit';
import { edgelessActionGroups } from './actions-config'; import { edgelessActionGroups } from './actions-config';

View File

@ -3,7 +3,7 @@ import '../../_common/components/ask-ai-button';
import { import {
type AffineFormatBarWidget, type AffineFormatBarWidget,
toolbarDefaultConfig, toolbarDefaultConfig,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { html, type TemplateResult } from 'lit'; import { html, type TemplateResult } from 'lit';
import { AIItemGroups } from '../../_common/config'; import { AIItemGroups } from '../../_common/config';

View File

@ -1,6 +1,6 @@
import '../../_common/components/ask-ai-button'; import '../../_common/components/ask-ai-button';
import type { AffineImageToolbarWidget } from '@blocksuite/blocks'; import type { AffineImageToolbarWidget } from '@blocksuite/affine/blocks';
import { html } from 'lit'; import { html } from 'lit';
import type { AskAIButtonOptions } from '../../_common/components/ask-ai-button'; import type { AskAIButtonOptions } from '../../_common/components/ask-ai-button';

View File

@ -6,14 +6,14 @@ import {
type AffineSlashSubMenu, type AffineSlashSubMenu,
type AIItemConfig, type AIItemConfig,
DocModeProvider, DocModeProvider,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
AFFINE_AI_PANEL_WIDGET, AFFINE_AI_PANEL_WIDGET,
AffineSlashMenuWidget, AffineSlashMenuWidget,
AIStarIcon, AIStarIcon,
MoreHorizontalIcon, MoreHorizontalIcon,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import { html } from 'lit'; import { html } from 'lit';
import { AIItemGroups } from '../../_common/config'; import { AIItemGroups } from '../../_common/config';

View File

@ -1,4 +1,4 @@
import type { AffineAIPanelWidget } from '@blocksuite/blocks'; import type { AffineAIPanelWidget } from '@blocksuite/affine/blocks';
import { handleInlineAskAIAction } from '../../actions/doc-handler'; import { handleInlineAskAIAction } from '../../actions/doc-handler';
import { AIProvider } from '../../provider'; import { AIProvider } from '../../provider';

View File

@ -1,10 +1,10 @@
import { type EditorHost } from '@blocksuite/block-std'; import { type EditorHost } from '@blocksuite/affine/block-std';
import { import {
type AIError, type AIError,
PaymentRequiredError, PaymentRequiredError,
UnauthorizedError, UnauthorizedError,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html, LitElement, nothing, type TemplateResult } from 'lit'; import { html, LitElement, nothing, type TemplateResult } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js'; import { styleMap } from 'lit/directives/style-map.js';

View File

@ -1,10 +1,13 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { import type {
AffineAIPanelWidgetConfig, AffineAIPanelWidgetConfig,
MindmapStyle, MindmapStyle,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { markdownToMindmap, MiniMindmapPreview } from '@blocksuite/blocks'; import {
import { noop } from '@blocksuite/global/utils'; markdownToMindmap,
MiniMindmapPreview,
} from '@blocksuite/affine/blocks';
import { noop } from '@blocksuite/affine/global/utils';
import { html, nothing } from 'lit'; import { html, nothing } from 'lit';
import { getAIPanel } from '../ai-panel'; import { getAIPanel } from '../ai-panel';

View File

@ -1,12 +1,12 @@
import { BlockStdScope, type EditorHost } from '@blocksuite/block-std'; import { BlockStdScope, type EditorHost } from '@blocksuite/affine/block-std';
import { import {
type AffineAIPanelWidgetConfig, type AffineAIPanelWidgetConfig,
EdgelessEditorBlockSpecs, EdgelessEditorBlockSpecs,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { AffineSchemas } from '@blocksuite/blocks/schemas'; import { AffineSchemas } from '@blocksuite/affine/blocks/schemas';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { DocCollection, Schema } from '@blocksuite/store'; import { DocCollection, Schema } from '@blocksuite/affine/store';
import { css, html, LitElement, nothing } from 'lit'; import { css, html, LitElement, nothing } from 'lit';
import { property, query } from 'lit/decorators.js'; import { property, query } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js'; import { createRef, type Ref, ref } from 'lit/directives/ref.js';

View File

@ -1,16 +1,16 @@
import { BlockStdScope, type EditorHost } from '@blocksuite/block-std'; import { BlockStdScope, type EditorHost } from '@blocksuite/affine/block-std';
import { import {
type AffineAIPanelState, type AffineAIPanelState,
type AffineAIPanelWidgetConfig, type AffineAIPanelWidgetConfig,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
CodeBlockComponent, CodeBlockComponent,
DividerBlockComponent, DividerBlockComponent,
ListBlockComponent, ListBlockComponent,
ParagraphBlockComponent, ParagraphBlockComponent,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/global/utils'; import { WithDisposable } from '@blocksuite/affine/global/utils';
import { BlockViewType, type Doc, type Query } from '@blocksuite/store'; import { BlockViewType, type Doc, type Query } from '@blocksuite/affine/store';
import { css, html, LitElement, type PropertyValues } from 'lit'; import { css, html, LitElement, type PropertyValues } from 'lit';
import { property, query } from 'lit/decorators.js'; import { property, query } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js'; import { classMap } from 'lit/directives/class-map.js';

View File

@ -1,5 +1,5 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { AffineAIPanelWidgetConfig } from '@blocksuite/blocks'; import type { AffineAIPanelWidgetConfig } from '@blocksuite/affine/blocks';
import { css, html, LitElement, nothing } from 'lit'; import { css, html, LitElement, nothing } from 'lit';
import { property } from 'lit/decorators.js'; import { property } from 'lit/decorators.js';

View File

@ -1,6 +1,6 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/blocks'; import { type AIError, openFileOrFiles } from '@blocksuite/affine/blocks';
import { type ChatMessage } from '@blocksuite/presets'; import { type ChatMessage } from '@blocksuite/affine/presets';
import { css, html, LitElement, nothing } from 'lit'; import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js'; import { property, query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js'; import { classMap } from 'lit/directives/class-map.js';

View File

@ -3,7 +3,7 @@ import './date-time';
import '../_common/components/chat-action-list'; import '../_common/components/chat-action-list';
import '../_common/components/copy-more'; import '../_common/components/copy-more';
import { type EditorHost } from '@blocksuite/block-std'; import { type EditorHost } from '@blocksuite/affine/block-std';
import { import {
type AIError, type AIError,
CanvasElementType, CanvasElementType,
@ -11,13 +11,13 @@ import {
DocModeProvider, DocModeProvider,
type EdgelessRootService, type EdgelessRootService,
TelemetryProvider, TelemetryProvider,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { NotificationProvider } from '@blocksuite/blocks'; import { NotificationProvider } from '@blocksuite/affine/blocks';
import { import {
type AIChatBlockModel, type AIChatBlockModel,
type ChatMessage, type ChatMessage,
ChatMessagesSchema, ChatMessagesSchema,
} from '@blocksuite/presets'; } from '@blocksuite/affine/presets';
import { html, LitElement, nothing } from 'lit'; import { html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js'; import { property, query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js'; import { classMap } from 'lit/directives/class-map.js';

View File

@ -1,5 +1,5 @@
import type { AIError } from '@blocksuite/blocks'; import type { AIError } from '@blocksuite/affine/blocks';
import { type ChatMessage } from '@blocksuite/presets'; import { type ChatMessage } from '@blocksuite/affine/presets';
export type ChatStatus = export type ChatStatus =
| 'success' | 'success'

View File

@ -1,10 +1,10 @@
import type { EdgelessRootService } from '@blocksuite/blocks'; import type { EdgelessRootService } from '@blocksuite/affine/blocks';
import { Bound } from '@blocksuite/global/utils'; import { Bound } from '@blocksuite/affine/global/utils';
import { import {
type AIChatBlockModel, type AIChatBlockModel,
CHAT_BLOCK_HEIGHT, CHAT_BLOCK_HEIGHT,
CHAT_BLOCK_WIDTH, CHAT_BLOCK_WIDTH,
} from '@blocksuite/presets'; } from '@blocksuite/affine/presets';
/** /**
* Calculates the bounding box for a child block * Calculates the bounding box for a child block

View File

@ -1,6 +1,9 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { PaymentRequiredError, UnauthorizedError } from '@blocksuite/blocks'; import {
import { Slot } from '@blocksuite/store'; PaymentRequiredError,
UnauthorizedError,
} from '@blocksuite/affine/blocks';
import { Slot } from '@blocksuite/affine/store';
export interface AIUserInfo { export interface AIUserInfo {
id: string; id: string;

View File

@ -1,6 +1,6 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { EdgelessRootService } from '@blocksuite/blocks'; import type { EdgelessRootService } from '@blocksuite/affine/blocks';
import type { BlockSnapshot } from '@blocksuite/store'; import type { BlockSnapshot } from '@blocksuite/affine/store';
import { markdownToSnapshot } from '../utils/markdown-utils'; import { markdownToSnapshot } from '../utils/markdown-utils';
import { getSurfaceElementFromEditor } from '../utils/selection-utils'; import { getSurfaceElementFromEditor } from '../utils/selection-utils';

View File

@ -1,5 +1,5 @@
import { Bound } from '@blocksuite/global/utils'; import { Bound } from '@blocksuite/affine/global/utils';
import { nanoid } from '@blocksuite/store'; import { nanoid } from '@blocksuite/affine/store';
import { AIProvider } from '../provider'; import { AIProvider } from '../provider';

View File

@ -2,8 +2,8 @@ import {
type ConnectorElementModel, type ConnectorElementModel,
type EdgelessRootService, type EdgelessRootService,
SurfaceBlockComponent, SurfaceBlockComponent,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
export const getConnectorFromId = ( export const getConnectorFromId = (
id: string, id: string,

View File

@ -1,5 +1,8 @@
import { BlockViewIdentifier, type ExtensionType } from '@blocksuite/block-std'; import {
import { PageEditorBlockSpecs } from '@blocksuite/blocks'; BlockViewIdentifier,
type ExtensionType,
} from '@blocksuite/affine/block-std';
import { PageEditorBlockSpecs } from '@blocksuite/affine/blocks';
import { literal } from 'lit/static-html.js'; import { literal } from 'lit/static-html.js';
export const CustomPageEditorBlockSpecs: ExtensionType[] = [ export const CustomPageEditorBlockSpecs: ExtensionType[] = [

View File

@ -1,4 +1,4 @@
import type { BlockComponent, EditorHost } from '@blocksuite/block-std'; import type { BlockComponent, EditorHost } from '@blocksuite/affine/block-std';
import { import {
AFFINE_EDGELESS_COPILOT_WIDGET, AFFINE_EDGELESS_COPILOT_WIDGET,
type EdgelessCopilotWidget, type EdgelessCopilotWidget,
@ -6,7 +6,7 @@ import {
matchFlavours, matchFlavours,
MindmapElementModel, MindmapElementModel,
type ShapeElementModel, type ShapeElementModel,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
export function mindMapToMarkdown(mindmap: MindmapElementModel) { export function mindMapToMarkdown(mindmap: MindmapElementModel) {
let markdownStr = ''; let markdownStr = '';

View File

@ -2,10 +2,10 @@ import type {
BlockComponent, BlockComponent,
EditorHost, EditorHost,
TextSelection, TextSelection,
} from '@blocksuite/block-std'; } from '@blocksuite/affine/block-std';
import type { AffineAIPanelWidget } from '@blocksuite/blocks'; import type { AffineAIPanelWidget } from '@blocksuite/affine/blocks';
import { isInsideEdgelessEditor } from '@blocksuite/blocks'; import { isInsideEdgelessEditor } from '@blocksuite/affine/blocks';
import { type BlockModel, Slice } from '@blocksuite/store'; import { type BlockModel, Slice } from '@blocksuite/affine/store';
import { import {
insertFromMarkdown, insertFromMarkdown,

View File

@ -1,5 +1,5 @@
import { fetchImage } from '@blocksuite/blocks'; import { fetchImage } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
export async function fetchImageToFile( export async function fetchImageToFile(
url: string, url: string,

View File

@ -2,7 +2,7 @@ import type {
EditorHost, EditorHost,
TextRangePoint, TextRangePoint,
TextSelection, TextSelection,
} from '@blocksuite/block-std'; } from '@blocksuite/affine/block-std';
import { import {
defaultImageProxyMiddleware, defaultImageProxyMiddleware,
embedSyncedDocMiddleware, embedSyncedDocMiddleware,
@ -11,8 +11,8 @@ import {
pasteMiddleware, pasteMiddleware,
PlainTextAdapter, PlainTextAdapter,
titleMiddleware, titleMiddleware,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import type { import type {
BlockModel, BlockModel,
BlockSnapshot, BlockSnapshot,
@ -20,8 +20,8 @@ import type {
DraftModel, DraftModel,
Slice, Slice,
SliceSnapshot, SliceSnapshot,
} from '@blocksuite/store'; } from '@blocksuite/affine/store';
import { DocCollection, Job } from '@blocksuite/store'; import { DocCollection, Job } from '@blocksuite/affine/store';
const updateSnapshotText = ( const updateSnapshotText = (
point: TextRangePoint, point: TextRangePoint,

View File

@ -1,18 +1,18 @@
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { import {
type CopilotSelectionController, type CopilotSelectionController,
type FrameBlockModel, type FrameBlockModel,
ImageBlockModel, ImageBlockModel,
type SurfaceBlockComponent, type SurfaceBlockComponent,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { BlocksUtils, EdgelessRootService } from '@blocksuite/blocks'; import { BlocksUtils, EdgelessRootService } from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import { import {
type BlockModel, type BlockModel,
type DraftModel, type DraftModel,
Slice, Slice,
toDraftModel, toDraftModel,
} from '@blocksuite/store'; } from '@blocksuite/affine/store';
import { getEdgelessCopilotWidget, getService } from './edgeless'; import { getEdgelessCopilotWidget, getService } from './edgeless';
import { getContentFromSlice } from './markdown-utils'; import { getContentFromSlice } from './markdown-utils';

View File

@ -1,6 +1,6 @@
import type { useI18n } from '@affine/i18n'; import type { useI18n } from '@affine/i18n';
import { track } from '@affine/track'; import { track } from '@affine/track';
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import { ImportIcon, PlusIcon } from '@blocksuite/icons/rc'; import { ImportIcon, PlusIcon } from '@blocksuite/icons/rc';
import type { usePageHelper } from '../components/blocksuite/block-suite-page-list/utils'; import type { usePageHelper } from '../components/blocksuite/block-suite-page-list/utils';

View File

@ -1,7 +1,7 @@
import type { useI18n } from '@affine/i18n'; import type { useI18n } from '@affine/i18n';
import { track } from '@affine/track'; import { track } from '@affine/track';
import type { DocCollection } from '@blocksuite/affine/store';
import { ArrowRightBigIcon } from '@blocksuite/icons/rc'; import { ArrowRightBigIcon } from '@blocksuite/icons/rc';
import type { DocCollection } from '@blocksuite/store';
import type { createStore } from 'jotai'; import type { createStore } from 'jotai';
import { import {

View File

@ -4,8 +4,8 @@ import { DebugLogger } from '@affine/debug';
import type { ListHistoryQuery } from '@affine/graphql'; import type { ListHistoryQuery } from '@affine/graphql';
import { listHistoryQuery, recoverDocMutation } from '@affine/graphql'; import { listHistoryQuery, recoverDocMutation } from '@affine/graphql';
import { i18nTime } from '@affine/i18n'; import { i18nTime } from '@affine/i18n';
import { assertEquals } from '@blocksuite/global/utils'; import { assertEquals } from '@blocksuite/affine/global/utils';
import { DocCollection } from '@blocksuite/store'; import { DocCollection } from '@blocksuite/affine/store';
import { getAFFiNEWorkspaceSchema } from '@toeverything/infra'; import { getAFFiNEWorkspaceSchema } from '@toeverything/infra';
import { useEffect, useMemo } from 'react'; import { useEffect, useMemo } from 'react';
import useSWRImmutable from 'swr/immutable'; import useSWRImmutable from 'swr/immutable';

View File

@ -9,9 +9,12 @@ import { WorkspacePermissionService } from '@affine/core/modules/permissions';
import { WorkspaceQuotaService } from '@affine/core/modules/quota'; import { WorkspaceQuotaService } from '@affine/core/modules/quota';
import { i18nTime, Trans, useI18n } from '@affine/i18n'; import { i18nTime, Trans, useI18n } from '@affine/i18n';
import { track } from '@affine/track'; import { track } from '@affine/track';
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import type {
Doc as BlockSuiteDoc,
DocCollection,
} from '@blocksuite/affine/store';
import { CloseIcon, ToggleCollapseIcon } from '@blocksuite/icons/rc'; import { CloseIcon, ToggleCollapseIcon } from '@blocksuite/icons/rc';
import type { Doc as BlockSuiteDoc, DocCollection } from '@blocksuite/store';
import * as Collapsible from '@radix-ui/react-collapsible'; import * as Collapsible from '@radix-ui/react-collapsible';
import type { DialogContentProps } from '@radix-ui/react-dialog'; import type { DialogContentProps } from '@radix-ui/react-dialog';
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra'; import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';

View File

@ -10,7 +10,7 @@ import type {
} from '@affine/core/modules/properties/services/schema'; } from '@affine/core/modules/properties/services/schema';
import { i18nTime, useI18n } from '@affine/i18n'; import { i18nTime, useI18n } from '@affine/i18n';
import { track } from '@affine/track'; import { track } from '@affine/track';
import { assertExists } from '@blocksuite/global/utils'; import { assertExists } from '@blocksuite/affine/global/utils';
import { import {
ArrowDownSmallIcon, ArrowDownSmallIcon,
DeleteIcon, DeleteIcon,

View File

@ -7,8 +7,8 @@ import {
import { WorkbenchLink } from '@affine/core/modules/workbench'; import { WorkbenchLink } from '@affine/core/modules/workbench';
import { useI18n } from '@affine/i18n'; import { useI18n } from '@affine/i18n';
import { track } from '@affine/track'; import { track } from '@affine/track';
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import type { DocCollection } from '@blocksuite/store'; import type { DocCollection } from '@blocksuite/affine/store';
import { useLiveData, useService } from '@toeverything/infra'; import { useLiveData, useService } from '@toeverything/infra';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { import {

View File

@ -19,8 +19,8 @@ import {
PointStyle, PointStyle,
StrokeStyle, StrokeStyle,
TextAlign, TextAlign,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra'; import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';

View File

@ -1,6 +1,6 @@
import { AffineSchemas } from '@blocksuite/blocks'; import { AffineSchemas } from '@blocksuite/affine/blocks';
import type { Doc, DocSnapshot } from '@blocksuite/store'; import type { Doc, DocSnapshot } from '@blocksuite/affine/store';
import { DocCollection, Job, Schema } from '@blocksuite/store'; import { DocCollection, Job, Schema } from '@blocksuite/affine/store';
const getCollection = (() => { const getCollection = (() => {
let collection: DocCollection | null = null; let collection: DocCollection | null = null;

View File

@ -7,8 +7,8 @@ import {
import { SettingRow } from '@affine/component/setting-components'; import { SettingRow } from '@affine/component/setting-components';
import { EditorSettingService } from '@affine/core/modules/editor-settting'; import { EditorSettingService } from '@affine/core/modules/editor-settting';
import { useI18n } from '@affine/i18n'; import { useI18n } from '@affine/i18n';
import { LayoutType, MindmapStyle } from '@blocksuite/blocks'; import { LayoutType, MindmapStyle } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra'; import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';

View File

@ -15,8 +15,8 @@ import {
NoteShadow, NoteShadow,
NoteShadowMap, NoteShadowMap,
StrokeStyle, StrokeStyle,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra'; import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';

View File

@ -2,8 +2,8 @@ import { MenuItem, MenuTrigger, Slider } from '@affine/component';
import { SettingRow } from '@affine/component/setting-components'; import { SettingRow } from '@affine/component/setting-components';
import { EditorSettingService } from '@affine/core/modules/editor-settting'; import { EditorSettingService } from '@affine/core/modules/editor-settting';
import { useI18n } from '@affine/i18n'; import { useI18n } from '@affine/i18n';
import { LineColor, LineColorMap } from '@blocksuite/blocks'; import { LineColor, LineColorMap } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra'; import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';

View File

@ -8,12 +8,12 @@ import {
import { SettingRow } from '@affine/component/setting-components'; import { SettingRow } from '@affine/component/setting-components';
import { EditorSettingService } from '@affine/core/modules/editor-settting'; import { EditorSettingService } from '@affine/core/modules/editor-settting';
import { useI18n } from '@affine/i18n'; import { useI18n } from '@affine/i18n';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import type { import type {
EdgelessRootService, EdgelessRootService,
ShapeElementModel, ShapeElementModel,
ShapeName, ShapeName,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import { import {
createEnumMap, createEnumMap,
FontFamily, FontFamily,
@ -28,8 +28,8 @@ import {
ShapeType, ShapeType,
StrokeStyle, StrokeStyle,
TextAlign, TextAlign,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra'; import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo, useState } from 'react'; import { useCallback, useMemo, useState } from 'react';

View File

@ -1,13 +1,13 @@
import { Skeleton } from '@affine/component'; import { Skeleton } from '@affine/component';
import type { EditorSettingSchema } from '@affine/core/modules/editor-settting'; import type { EditorSettingSchema } from '@affine/core/modules/editor-settting';
import { EditorSettingService } from '@affine/core/modules/editor-settting'; import { EditorSettingService } from '@affine/core/modules/editor-settting';
import type { EditorHost } from '@blocksuite/block-std'; import type { EditorHost } from '@blocksuite/affine/block-std';
import { BlockStdScope } from '@blocksuite/block-std'; import { BlockStdScope } from '@blocksuite/affine/block-std';
import type { GfxPrimitiveElementModel } from '@blocksuite/block-std/gfx'; import type { GfxPrimitiveElementModel } from '@blocksuite/affine/block-std/gfx';
import type { EdgelessRootService } from '@blocksuite/blocks'; import type { EdgelessRootService } from '@blocksuite/affine/blocks';
import { SpecProvider } from '@blocksuite/blocks'; import { SpecProvider } from '@blocksuite/affine/blocks';
import { Bound } from '@blocksuite/global/utils'; import { Bound } from '@blocksuite/affine/global/utils';
import type { Block, Doc } from '@blocksuite/store'; import type { Block, Doc } from '@blocksuite/affine/store';
import { useFramework } from '@toeverything/infra'; import { useFramework } from '@toeverything/infra';
import { isEqual } from 'lodash-es'; import { isEqual } from 'lodash-es';
import { useCallback, useEffect, useRef } from 'react'; import { useCallback, useEffect, useRef } from 'react';

View File

@ -15,8 +15,8 @@ import {
LineColor, LineColor,
LineColorMap, LineColorMap,
TextAlign, TextAlign,
} from '@blocksuite/blocks'; } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra'; import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';

View File

@ -1,6 +1,6 @@
import type { SurfaceBlockModel } from '@blocksuite/block-std/gfx'; import type { SurfaceBlockModel } from '@blocksuite/affine/block-std/gfx';
import type { FrameBlockModel } from '@blocksuite/blocks'; import type { FrameBlockModel } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
export function getSurfaceBlock(doc: Doc) { export function getSurfaceBlock(doc: Doc) {
const blocks = doc.getBlocksByFlavour('affine:surface'); const blocks = doc.getBlocksByFlavour('affine:surface');

View File

@ -24,7 +24,7 @@ import {
SystemFontFamilyService, SystemFontFamilyService,
} from '@affine/core/modules/system-font-family'; } from '@affine/core/modules/system-font-family';
import { useI18n } from '@affine/i18n'; import { useI18n } from '@affine/i18n';
import type { DocMode } from '@blocksuite/blocks'; import type { DocMode } from '@blocksuite/affine/blocks';
import { DoneIcon, SearchIcon } from '@blocksuite/icons/rc'; import { DoneIcon, SearchIcon } from '@blocksuite/icons/rc';
import { import {
FeatureFlagService, FeatureFlagService,

View File

@ -1,4 +1,4 @@
import { FontWeight } from '@blocksuite/blocks'; import { FontWeight } from '@blocksuite/affine/blocks';
import { useTheme } from 'next-themes'; import { useTheme } from 'next-themes';
function getColorFromMap( function getColorFromMap(

View File

@ -1,6 +1,6 @@
import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud'; import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud';
import { track } from '@affine/track'; import { track } from '@affine/track';
import type { Doc } from '@blocksuite/store'; import type { Doc } from '@blocksuite/affine/store';
import { type Workspace } from '@toeverything/infra'; import { type Workspace } from '@toeverything/infra';
import { useCallback } from 'react'; import { useCallback } from 'react';

View File

@ -4,8 +4,8 @@ import { Menu } from '@affine/component/ui/menu';
import { ShareInfoService } from '@affine/core/modules/share-doc'; import { ShareInfoService } from '@affine/core/modules/share-doc';
import { WorkspaceFlavour } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace';
import { useI18n } from '@affine/i18n'; import { useI18n } from '@affine/i18n';
import type { Doc } from '@blocksuite/affine/store';
import { LockIcon, PublishIcon } from '@blocksuite/icons/rc'; import { LockIcon, PublishIcon } from '@blocksuite/icons/rc';
import type { Doc } from '@blocksuite/store';
import { import {
useLiveData, useLiveData,
useService, useService,

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