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

View File

@ -1,5 +1,5 @@
// This file should has not side effect
import type { DocCollection } from '@blocksuite/store';
import type { DocCollection } from '@blocksuite/affine/store';
declare global {
// 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';
export const literalValueSchema: z.ZodType<LiteralValue, z.ZodTypeDef> =

View File

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

View File

@ -1,11 +1,11 @@
import type { SurfaceBlockProps } from '@blocksuite/block-std/gfx';
import type { SurfaceBlockProps } from '@blocksuite/affine/block-std/gfx';
import {
NoteDisplayMode,
type NoteProps,
type ParagraphProps,
type RootBlockProps,
} from '@blocksuite/blocks';
import { type Doc, Text } from '@blocksuite/store';
} from '@blocksuite/affine/blocks';
import { type Doc, Text } from '@blocksuite/affine/store';
export interface DocProps {
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 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 { Entity } from '../../../framework';

View File

@ -1,5 +1,5 @@
import type { DocMode } from '@blocksuite/blocks';
import type { DocMeta } from '@blocksuite/store';
import type { DocMode } from '@blocksuite/affine/blocks';
import type { DocMeta } from '@blocksuite/affine/store';
import { Entity } from '../../../framework';
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 type { DocRecord } from '../entities/record';

View File

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

View File

@ -1,5 +1,5 @@
import type { DocMode } from '@blocksuite/blocks';
import type { DocMeta } from '@blocksuite/store';
import type { DocMode } from '@blocksuite/affine/blocks';
import type { DocMeta } from '@blocksuite/affine/store';
import { isEqual } from 'lodash-es';
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';

View File

@ -1,4 +1,4 @@
import type { DocMode } from '@blocksuite/blocks';
import type { DocMode } from '@blocksuite/affine/blocks';
import { Entity } from '../../../framework';
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 { Observable } from 'rxjs';
import type { Awareness } from 'y-protocols/awareness.js';

View File

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

View File

@ -1,5 +1,5 @@
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 type { LiveData } from '../../../livedata';

View File

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

View File

@ -1,5 +1,5 @@
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 type { BlobStorage, DocStorage } from '../../../sync';

View File

@ -1,5 +1,5 @@
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 { Service } from '../../../framework';

View File

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

View File

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

View File

@ -28,7 +28,7 @@
"@affine/core": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/native": "workspace:*",
"@blocksuite/global": "0.17.14",
"@blocksuite/affine": "0.17.14",
"@electron-forge/cli": "^7.3.0",
"@electron-forge/core": "^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 type { HelperToMain, MainToHelper } from '../shared/type';

View File

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

View File

@ -13,11 +13,8 @@
"build:storybook": "storybook build"
},
"peerDependencies": {
"@blocksuite/blocks": "*",
"@blocksuite/global": "*",
"@blocksuite/icons": "2.1.67",
"@blocksuite/presets": "*",
"@blocksuite/store": "*"
"@blocksuite/affine": "*",
"@blocksuite/icons": "2.1.67"
},
"dependencies": {
"@affine/cli": "workspace:*",
@ -63,7 +60,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@blocksuite/global": "0.17.14",
"@blocksuite/affine": "0.17.14",
"@blocksuite/icons": "2.1.67",
"@chromatic-com/storybook": "^2.0.0",
"@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 clsx from 'clsx';
import {

View File

@ -16,13 +16,8 @@
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/track": "workspace:*",
"@blocksuite/block-std": "0.17.14",
"@blocksuite/blocks": "0.17.14",
"@blocksuite/global": "0.17.14",
"@blocksuite/affine": "0.17.14",
"@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/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",

View File

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

View File

@ -1,13 +1,13 @@
import './ask-ai-panel';
import { type EditorHost } from '@blocksuite/block-std';
import { type EditorHost } from '@blocksuite/affine/block-std';
import {
type AIItemGroupConfig,
AIStarIcon,
EdgelessRootService,
} from '@blocksuite/blocks';
import { createLitPortal, HoverController } from '@blocksuite/blocks';
import { assertExists, WithDisposable } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { createLitPortal, HoverController } from '@blocksuite/affine/blocks';
import { assertExists, WithDisposable } from '@blocksuite/affine/global/utils';
import { flip, offset } from '@floating-ui/dom';
import { css, html, LitElement, nothing } from 'lit';
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 {
type AIItemGroupConfig,
EdgelessRootService,
scrollbarStyle,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';

View File

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

View File

@ -2,13 +2,13 @@ import type {
BlockSelection,
EditorHost,
TextSelection,
} from '@blocksuite/block-std';
} from '@blocksuite/affine/block-std';
import {
createButtonPopper,
NotificationProvider,
Tooltip,
} from '@blocksuite/blocks';
import { noop, WithDisposable } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { noop, WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
import { property, query, state } from 'lit/decorators.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 {
type AIItemGroupConfig,
type AISubItemConfig,
@ -6,7 +10,7 @@ import {
EDGELESS_ELEMENT_TOOLBAR_WIDGET,
type EdgelessElementToolbarWidget,
matchFlavours,
} from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
import type { TemplateResult } from 'lit';
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 {
AffineAIPanelWidget,
AffineAIPanelWidgetConfig,
AIError,
} from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/affine/global/utils';
import type { TemplateResult } from 'lit';
import {

View File

@ -1,10 +1,10 @@
import type { EditorHost } from '@blocksuite/block-std';
import type { EditorHost } from '@blocksuite/affine/block-std';
import type {
AffineAIPanelWidget,
AIError,
EdgelessCopilotWidget,
MindmapElementModel,
} from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
import {
BlocksUtils,
EdgelessTextBlockModel,
@ -13,10 +13,10 @@ import {
NoteBlockModel,
ShapeElementModel,
TextElementModel,
} from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
import { AIChatBlockModel } from '@blocksuite/presets';
import { Slice } from '@blocksuite/store';
} from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/affine/global/utils';
import { AIChatBlockModel } from '@blocksuite/affine/presets';
import { Slice } from '@blocksuite/affine/store';
import type { TemplateResult } from 'lit';
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 {
AffineAIPanelWidget,
AIItemConfig,
@ -8,7 +8,7 @@ import type {
MindmapElementModel,
ShapeElementModel,
SurfaceBlockModel,
} from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
import {
DeleteIcon,
EDGELESS_ELEMENT_TOOLBAR_WIDGET,
@ -23,8 +23,8 @@ import {
NoteDisplayMode,
ResetIcon,
TelemetryProvider,
} from '@blocksuite/blocks';
import { assertExists, Bound } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { assertExists, Bound } from '@blocksuite/affine/global/utils';
import { html, type TemplateResult } from 'lit';
import { styleMap } from 'lit/directives/style-map.js';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import type { EditorHost } from '@blocksuite/affine/block-std';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement } from 'lit';
import { property } from 'lit/decorators.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 { 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 {
type ImageBlockModel,
isInsideEdgelessEditor,
type NoteBlockModel,
NoteDisplayMode,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import type { BlockModel } from '@blocksuite/store';
} from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import type { BlockModel } from '@blocksuite/affine/store';
import {
css,
html,

View File

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

View File

@ -1,6 +1,6 @@
import type { EditorHost } from '@blocksuite/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/blocks';
import { assertExists, WithDisposable } from '@blocksuite/global/utils';
import type { EditorHost } from '@blocksuite/affine/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/affine/blocks';
import { assertExists, WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.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/copy-more';
import type { BaseSelection, EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import type { BaseSelection, EditorHost } from '@blocksuite/affine/block-std';
import { ShadowlessElement } from '@blocksuite/affine/block-std';
import {
type AIError,
DocModeProvider,
isInsidePageEditor,
PaymentRequiredError,
UnauthorizedError,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import { css, html, nothing, type PropertyValues } from 'lit';
import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,14 +6,14 @@ import {
type AffineSlashSubMenu,
type AIItemConfig,
DocModeProvider,
} from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
import {
AFFINE_AI_PANEL_WIDGET,
AffineSlashMenuWidget,
AIStarIcon,
MoreHorizontalIcon,
} from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { assertExists } from '@blocksuite/affine/global/utils';
import { html } from 'lit';
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 { 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 {
type AIError,
PaymentRequiredError,
UnauthorizedError,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import { html, LitElement, nothing, type TemplateResult } from 'lit';
import { property } from 'lit/decorators.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 {
AffineAIPanelWidgetConfig,
MindmapStyle,
} from '@blocksuite/blocks';
import { markdownToMindmap, MiniMindmapPreview } from '@blocksuite/blocks';
import { noop } from '@blocksuite/global/utils';
} from '@blocksuite/affine/blocks';
import {
markdownToMindmap,
MiniMindmapPreview,
} from '@blocksuite/affine/blocks';
import { noop } from '@blocksuite/affine/global/utils';
import { html, nothing } from 'lit';
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 {
type AffineAIPanelWidgetConfig,
EdgelessEditorBlockSpecs,
} from '@blocksuite/blocks';
import { AffineSchemas } from '@blocksuite/blocks/schemas';
import { WithDisposable } from '@blocksuite/global/utils';
import type { Doc } from '@blocksuite/store';
import { DocCollection, Schema } from '@blocksuite/store';
} from '@blocksuite/affine/blocks';
import { AffineSchemas } from '@blocksuite/affine/blocks/schemas';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import type { Doc } from '@blocksuite/affine/store';
import { DocCollection, Schema } from '@blocksuite/affine/store';
import { css, html, LitElement, nothing } from 'lit';
import { property, query } from 'lit/decorators.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 {
type AffineAIPanelState,
type AffineAIPanelWidgetConfig,
} from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
import {
CodeBlockComponent,
DividerBlockComponent,
ListBlockComponent,
ParagraphBlockComponent,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import { BlockViewType, type Doc, type Query } from '@blocksuite/store';
} from '@blocksuite/affine/blocks';
import { WithDisposable } from '@blocksuite/affine/global/utils';
import { BlockViewType, type Doc, type Query } from '@blocksuite/affine/store';
import { css, html, LitElement, type PropertyValues } from 'lit';
import { property, query } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';

View File

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

View File

@ -1,6 +1,6 @@
import type { EditorHost } from '@blocksuite/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/blocks';
import { type ChatMessage } from '@blocksuite/presets';
import type { EditorHost } from '@blocksuite/affine/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/affine/blocks';
import { type ChatMessage } from '@blocksuite/affine/presets';
import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.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/copy-more';
import { type EditorHost } from '@blocksuite/block-std';
import { type EditorHost } from '@blocksuite/affine/block-std';
import {
type AIError,
CanvasElementType,
@ -11,13 +11,13 @@ import {
DocModeProvider,
type EdgelessRootService,
TelemetryProvider,
} from '@blocksuite/blocks';
import { NotificationProvider } from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
import { NotificationProvider } from '@blocksuite/affine/blocks';
import {
type AIChatBlockModel,
type ChatMessage,
ChatMessagesSchema,
} from '@blocksuite/presets';
} from '@blocksuite/affine/presets';
import { html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,8 @@
import { BlockViewIdentifier, type ExtensionType } from '@blocksuite/block-std';
import { PageEditorBlockSpecs } from '@blocksuite/blocks';
import {
BlockViewIdentifier,
type ExtensionType,
} from '@blocksuite/affine/block-std';
import { PageEditorBlockSpecs } from '@blocksuite/affine/blocks';
import { literal } from 'lit/static-html.js';
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 {
AFFINE_EDGELESS_COPILOT_WIDGET,
type EdgelessCopilotWidget,
@ -6,7 +6,7 @@ import {
matchFlavours,
MindmapElementModel,
type ShapeElementModel,
} from '@blocksuite/blocks';
} from '@blocksuite/affine/blocks';
export function mindMapToMarkdown(mindmap: MindmapElementModel) {
let markdownStr = '';

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
import type { useI18n } from '@affine/i18n';
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 type { usePageHelper } from '../components/blocksuite/block-suite-page-list/utils';

View File

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

View File

@ -4,8 +4,8 @@ import { DebugLogger } from '@affine/debug';
import type { ListHistoryQuery } from '@affine/graphql';
import { listHistoryQuery, recoverDocMutation } from '@affine/graphql';
import { i18nTime } from '@affine/i18n';
import { assertEquals } from '@blocksuite/global/utils';
import { DocCollection } from '@blocksuite/store';
import { assertEquals } from '@blocksuite/affine/global/utils';
import { DocCollection } from '@blocksuite/affine/store';
import { getAFFiNEWorkspaceSchema } from '@toeverything/infra';
import { useEffect, useMemo } from 'react';
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 { i18nTime, Trans, useI18n } from '@affine/i18n';
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 type { Doc as BlockSuiteDoc, DocCollection } from '@blocksuite/store';
import * as Collapsible from '@radix-ui/react-collapsible';
import type { DialogContentProps } from '@radix-ui/react-dialog';
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,8 +15,8 @@ import {
NoteShadow,
NoteShadowMap,
StrokeStyle,
} from '@blocksuite/blocks';
import type { Doc } from '@blocksuite/store';
} from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra';
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 { EditorSettingService } from '@affine/core/modules/editor-settting';
import { useI18n } from '@affine/i18n';
import { LineColor, LineColorMap } from '@blocksuite/blocks';
import type { Doc } from '@blocksuite/store';
import { LineColor, LineColorMap } from '@blocksuite/affine/blocks';
import type { Doc } from '@blocksuite/affine/store';
import { useFramework, useLiveData } from '@toeverything/infra';
import { useCallback, useMemo } from 'react';

View File

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

View File

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@ import {
SystemFontFamilyService,
} from '@affine/core/modules/system-font-family';
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 {
FeatureFlagService,

View File

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

View File

@ -1,6 +1,6 @@
import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud';
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 { 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 { WorkspaceFlavour } from '@affine/env/workspace';
import { useI18n } from '@affine/i18n';
import type { Doc } from '@blocksuite/affine/store';
import { LockIcon, PublishIcon } from '@blocksuite/icons/rc';
import type { Doc } from '@blocksuite/store';
import {
useLiveData,
useService,

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