mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(editor): remove blocks package (#10708)
This commit is contained in:
@@ -3,8 +3,8 @@ import '@toeverything/theme/style.css';
|
||||
import {
|
||||
ColorScheme,
|
||||
type EdgelessRootBlockComponent,
|
||||
ThemeProvider,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { ThemeProvider } from '@blocksuite/affine/shared/services';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { getDocRootBlock } from '../utils/edgeless.js';
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
EdgelessRootBlockComponent,
|
||||
FrameBlockComponent,
|
||||
FrameBlockModel,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { assertType } from '@blocksuite/global/utils';
|
||||
import { Text } from '@blocksuite/store';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import {
|
||||
type EdgelessRootBlockComponent,
|
||||
type GroupElementModel,
|
||||
LayoutType,
|
||||
NoteDisplayMode,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||
import {
|
||||
type BrushElementModel,
|
||||
type ConnectorElementModel,
|
||||
@@ -6,7 +5,6 @@ import {
|
||||
DefaultTheme,
|
||||
type EdgelessRootBlockComponent,
|
||||
type EdgelessTextBlockModel,
|
||||
EditPropsStore,
|
||||
FontFamily,
|
||||
type FrameBlockModel,
|
||||
getSurfaceBlock,
|
||||
@@ -18,7 +16,9 @@ import {
|
||||
type ShapeElementModel,
|
||||
ShapeType,
|
||||
type TextElementModel,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { EditPropsStore } from '@blocksuite/affine/shared/services';
|
||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { getDocRootBlock } from '../utils/edgeless.js';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { BlockComponent } from '@blocksuite/block-std';
|
||||
import { generateKeyBetween } from '@blocksuite/block-std/gfx';
|
||||
import type {
|
||||
EdgelessRootBlockComponent,
|
||||
GroupElementModel,
|
||||
NoteBlockModel,
|
||||
SurfaceElementModel,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { BlockComponent } from '@blocksuite/block-std';
|
||||
import { generateKeyBetween } from '@blocksuite/block-std/gfx';
|
||||
import type { BlockModel, Store } from '@blocksuite/store';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LayoutType, type MindMapView } from '@blocksuite/affine/blocks';
|
||||
import type { MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import type { GfxController } from '@blocksuite/block-std/gfx';
|
||||
import { LayoutType, type MindMapView } from '@blocksuite/blocks';
|
||||
import { Bound } from '@blocksuite/global/gfx';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import type {
|
||||
GroupElementModel,
|
||||
ShapeElementModel,
|
||||
SurfaceBlockModel,
|
||||
} from '@blocksuite/blocks';
|
||||
import { DefaultTheme } from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { DefaultTheme } from '@blocksuite/affine/blocks';
|
||||
import { beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { wait } from '../utils/common.js';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
EdgelessRootService,
|
||||
type FrameBlockComponent,
|
||||
type SurfaceRefBlockComponent,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { DocSnapshot } from '@blocksuite/store';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
EdgelessTemplatePanel,
|
||||
type Template,
|
||||
type TemplateManager,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { beforeEach, expect, test } from 'vitest';
|
||||
|
||||
import { setupEditor } from '../utils/setup.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type {
|
||||
EdgelessRootBlockComponent,
|
||||
SurfaceBlockComponent,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { click, drag, wait } from '../utils/common.js';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
AffineSchemas,
|
||||
type SurfaceBlockModel,
|
||||
ZipTransformer,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { AffineSchemas } from '@blocksuite/affine/schemas';
|
||||
import type { PointLocation } from '@blocksuite/global/gfx';
|
||||
import { Schema } from '@blocksuite/store';
|
||||
import { beforeEach, expect, test } from 'vitest';
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
EdgelessRootBlockComponent,
|
||||
PageRootBlockComponent,
|
||||
SurfaceBlockComponent,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { Store } from '@blocksuite/store';
|
||||
|
||||
import type { TestAffineEditorContainer } from '../../index.js';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { AffineSchemas, replaceIdMiddleware } from '@blocksuite/blocks';
|
||||
import { replaceIdMiddleware } from '@blocksuite/affine/blocks';
|
||||
import { AffineSchemas } from '@blocksuite/affine/schemas';
|
||||
import {
|
||||
type DocSnapshot,
|
||||
Schema,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import '@toeverything/theme/style.css';
|
||||
import '@toeverything/theme/fonts.css';
|
||||
|
||||
import { effects as blocksEffects } from '@blocksuite/blocks/effects';
|
||||
import { effects as blocksEffects } from '@blocksuite/affine/effects';
|
||||
import type { ExtensionType, Store, Transformer } from '@blocksuite/store';
|
||||
|
||||
import { effects } from '../../effects.js';
|
||||
@@ -9,16 +9,18 @@ import { effects } from '../../effects.js';
|
||||
blocksEffects();
|
||||
effects();
|
||||
|
||||
import type { ViewportTurboRendererExtension } from '@blocksuite/affine-shared/viewport-renderer';
|
||||
import {
|
||||
CommunityCanvasTextFonts,
|
||||
type DocMode,
|
||||
EdgelessEditorBlockSpecs,
|
||||
FontConfigExtension,
|
||||
PageEditorBlockSpecs,
|
||||
StoreExtensions,
|
||||
} from '@blocksuite/blocks';
|
||||
import { AffineSchemas } from '@blocksuite/blocks/schemas';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { AffineSchemas } from '@blocksuite/affine/schemas';
|
||||
import {
|
||||
CommunityCanvasTextFonts,
|
||||
FontConfigExtension,
|
||||
} from '@blocksuite/affine/shared/services';
|
||||
import type { ViewportTurboRendererExtension } from '@blocksuite/affine-shared/viewport-renderer';
|
||||
import { Schema, Text } from '@blocksuite/store';
|
||||
import {
|
||||
createAutoIncrementIdGenerator,
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { BlockStdScope, ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { type DocMode, ThemeProvider } from '@blocksuite/blocks';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { BlockStdScope, ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import { ThemeProvider } from '@blocksuite/affine/shared/services';
|
||||
import {
|
||||
type BlockModel,
|
||||
type ExtensionType,
|
||||
type Store,
|
||||
} from '@blocksuite/store';
|
||||
} from '@blocksuite/affine/store';
|
||||
import { computed, signal } from '@preact/signals-core';
|
||||
import { css, html } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import '@blocksuite/blocks/effects';
|
||||
import '@blocksuite/affine/effects';
|
||||
|
||||
import { TestAffineEditorContainer } from './editors/index.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user