mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-25 04:56:02 +08:00
refactor(editor): orgnize exports (#10709)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import '@toeverything/theme/style.css';
|
||||
|
||||
import {
|
||||
ColorScheme,
|
||||
type EdgelessRootBlockComponent,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { EdgelessRootBlockComponent } from '@blocksuite/affine/blocks/root';
|
||||
import { ColorScheme } from '@blocksuite/affine/model';
|
||||
import { ThemeProvider } from '@blocksuite/affine/shared/services';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { FrameBlockComponent } from '@blocksuite/affine/blocks/frame';
|
||||
import type {
|
||||
AffineFrameTitleWidget,
|
||||
EdgelessRootBlockComponent,
|
||||
FrameBlockComponent,
|
||||
FrameBlockModel,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/blocks/root';
|
||||
import type { FrameBlockModel } from '@blocksuite/affine/model';
|
||||
import { assertType } from '@blocksuite/global/utils';
|
||||
import { Text } from '@blocksuite/store';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { EdgelessRootBlockComponent } from '@blocksuite/affine/blocks/root';
|
||||
import {
|
||||
type EdgelessRootBlockComponent,
|
||||
type GroupElementModel,
|
||||
LayoutType,
|
||||
NoteDisplayMode,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/model';
|
||||
import type { MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { EdgelessRootBlockComponent } from '@blocksuite/affine/blocks/root';
|
||||
import { getSurfaceBlock } from '@blocksuite/affine/blocks/surface';
|
||||
import {
|
||||
type BrushElementModel,
|
||||
type ConnectorElementModel,
|
||||
DEFAULT_NOTE_SHADOW,
|
||||
DefaultTheme,
|
||||
type EdgelessRootBlockComponent,
|
||||
type EdgelessTextBlockModel,
|
||||
FontFamily,
|
||||
type FrameBlockModel,
|
||||
getSurfaceBlock,
|
||||
LayoutType,
|
||||
type MindmapElementModel,
|
||||
MindmapStyle,
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
type ShapeElementModel,
|
||||
ShapeType,
|
||||
type TextElementModel,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/model';
|
||||
import { EditPropsStore } from '@blocksuite/affine/shared/services';
|
||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { EdgelessRootBlockComponent } from '@blocksuite/affine/blocks/root';
|
||||
import type { SurfaceElementModel } from '@blocksuite/affine/blocks/surface';
|
||||
import type {
|
||||
EdgelessRootBlockComponent,
|
||||
GroupElementModel,
|
||||
NoteBlockModel,
|
||||
SurfaceElementModel,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/model';
|
||||
import type { BlockComponent } from '@blocksuite/block-std';
|
||||
import { generateKeyBetween } from '@blocksuite/block-std/gfx';
|
||||
import type { BlockModel, Store } from '@blocksuite/store';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LayoutType, type MindMapView } from '@blocksuite/affine/blocks';
|
||||
import type { MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import type { MindMapView } from '@blocksuite/affine/blocks/surface';
|
||||
import { LayoutType, type MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import type { GfxController } from '@blocksuite/block-std/gfx';
|
||||
import { Bound } from '@blocksuite/global/gfx';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { SurfaceBlockModel } from '@blocksuite/affine/blocks/surface';
|
||||
import type {
|
||||
BrushElementModel,
|
||||
GroupElementModel,
|
||||
ShapeElementModel,
|
||||
SurfaceBlockModel,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { DefaultTheme } from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/model';
|
||||
import { DefaultTheme } from '@blocksuite/affine/model';
|
||||
import { beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { wait } from '../utils/common.js';
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import {
|
||||
type EdgelessRootBlockComponent,
|
||||
EdgelessRootService,
|
||||
type FrameBlockComponent,
|
||||
type SurfaceRefBlockComponent,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/blocks/root';
|
||||
import type { DocSnapshot } from '@blocksuite/store';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -276,6 +274,9 @@ describe('basic', () => {
|
||||
});
|
||||
});
|
||||
|
||||
import type { FrameBlockComponent } from '@blocksuite/affine/blocks/frame';
|
||||
import type { SurfaceRefBlockComponent } from '@blocksuite/affine/blocks/surface-ref';
|
||||
|
||||
import snapshot from '../snapshots/edgeless/surface-ref.spec.ts/surface-ref.json' assert { type: 'json' };
|
||||
|
||||
describe('clipboard', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
EdgelessTemplatePanel,
|
||||
type Template,
|
||||
type TemplateManager,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/blocks/root';
|
||||
import { beforeEach, expect, test } from 'vitest';
|
||||
|
||||
import { setupEditor } from '../utils/setup.js';
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import type {
|
||||
EdgelessRootBlockComponent,
|
||||
SurfaceBlockComponent,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { EdgelessRootBlockComponent } from '@blocksuite/affine/blocks/root';
|
||||
import type { SurfaceBlockComponent } from '@blocksuite/affine/blocks/surface';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { click, drag, wait } from '../utils/common.js';
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import {
|
||||
type SurfaceBlockModel,
|
||||
ZipTransformer,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { ZipTransformer } from '@blocksuite/affine/blocks/root';
|
||||
import type { SurfaceBlockModel } from '@blocksuite/affine/blocks/surface';
|
||||
import { AffineSchemas } from '@blocksuite/affine/schemas';
|
||||
import type { PointLocation } from '@blocksuite/global/gfx';
|
||||
import { Schema } from '@blocksuite/store';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type {
|
||||
EdgelessRootBlockComponent,
|
||||
PageRootBlockComponent,
|
||||
SurfaceBlockComponent,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/blocks/root';
|
||||
import type { SurfaceBlockComponent } from '@blocksuite/affine/blocks/surface';
|
||||
import type { Store } from '@blocksuite/store';
|
||||
|
||||
import type { TestAffineEditorContainer } from '../../index.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { replaceIdMiddleware } from '@blocksuite/affine/blocks';
|
||||
import { AffineSchemas } from '@blocksuite/affine/schemas';
|
||||
import { replaceIdMiddleware } from '@blocksuite/affine/shared/adapters';
|
||||
import {
|
||||
type DocSnapshot,
|
||||
Schema,
|
||||
|
||||
@@ -10,11 +10,11 @@ blocksEffects();
|
||||
effects();
|
||||
|
||||
import {
|
||||
type DocMode,
|
||||
EdgelessEditorBlockSpecs,
|
||||
PageEditorBlockSpecs,
|
||||
StoreExtensions,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/extensions';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import { AffineSchemas } from '@blocksuite/affine/schemas';
|
||||
import {
|
||||
CommunityCanvasTextFonts,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BlockStdScope, ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import { ThemeProvider } from '@blocksuite/affine/shared/services';
|
||||
import {
|
||||
type BlockModel,
|
||||
|
||||
Reference in New Issue
Block a user