mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
refactor(editor): remove blocks package (#10708)
This commit is contained in:
@@ -4,11 +4,11 @@ import type {
|
||||
DatabaseBlockModel,
|
||||
ListType,
|
||||
RichText,
|
||||
} from '@blocksuite/blocks';
|
||||
import type { InlineRange, InlineRootElement } from '@blocksuite/inline';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { InlineRange, InlineRootElement } from '@blocksuite/affine/inline';
|
||||
import type { BlockModel } from '@blocksuite/affine/store';
|
||||
import { uuidv4 } from '@blocksuite/affine/store';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
import { uuidv4 } from '@blocksuite/store';
|
||||
import type { ConsoleMessage, Locator, Page } from '@playwright/test';
|
||||
import { expect } from '@playwright/test';
|
||||
import lz from 'lz-string';
|
||||
@@ -1249,7 +1249,7 @@ export async function mockParseDocUrlService(
|
||||
) {
|
||||
await page.evaluate(mapping => {
|
||||
const parseDocUrlService = window.host.std.get(
|
||||
window.$blocksuite.blocks.ParseDocUrlProvider
|
||||
window.$blocksuite.services.ParseDocUrlProvider
|
||||
);
|
||||
parseDocUrlService.parseDocUrl = (url: string) => {
|
||||
const docId = mapping[url];
|
||||
|
||||
@@ -4,16 +4,16 @@ import type {
|
||||
BlockComponent,
|
||||
EditorHost,
|
||||
TextSelection,
|
||||
} from '@blocksuite/block-std';
|
||||
} from '@blocksuite/affine/block-std';
|
||||
import type {
|
||||
AffineInlineEditor,
|
||||
EdgelessNoteBackground,
|
||||
NoteBlockModel,
|
||||
RichText,
|
||||
RootBlockModel,
|
||||
} from '@blocksuite/blocks';
|
||||
import type { InlineRootElement } from '@blocksuite/inline';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { InlineRootElement } from '@blocksuite/affine/inline';
|
||||
import type { BlockModel } from '@blocksuite/affine/store';
|
||||
import { expect, type Locator, type Page } from '@playwright/test';
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
import type * as Effects from '@blocksuite/blocks/effects';
|
||||
import type { EditorHost } from '@blocksuite/affine/block-std';
|
||||
import type * as Effects from '@blocksuite/affine/effects';
|
||||
import type { Store, Transformer, Workspace } from '@blocksuite/affine/store';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import type { Store, Transformer, Workspace } from '@blocksuite/store';
|
||||
|
||||
declare const _GLOBAL_: typeof Effects;
|
||||
|
||||
@@ -11,13 +11,14 @@ declare global {
|
||||
* the following instance are initialized in `packages/playground/apps/starter/main.ts`
|
||||
*/
|
||||
$blocksuite: {
|
||||
store: typeof import('@blocksuite/store');
|
||||
blocks: typeof import('@blocksuite/blocks');
|
||||
store: typeof import('@blocksuite/affine/store');
|
||||
blocks: typeof import('@blocksuite/affine/blocks');
|
||||
global: {
|
||||
utils: typeof import('@blocksuite/global/utils');
|
||||
utils: typeof import('@blocksuite/affine/global/utils');
|
||||
};
|
||||
services: typeof import('@blocksuite/affine/shared/services');
|
||||
editor: typeof import('@blocksuite/integration-test');
|
||||
blockStd: typeof import('@blocksuite/block-std');
|
||||
blockStd: typeof import('@blocksuite/affine/block-std');
|
||||
};
|
||||
collection: Workspace;
|
||||
doc: Store;
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
MindmapElementModel,
|
||||
MindmapNode,
|
||||
ShapeElementModel,
|
||||
} from '@blocksuite/blocks';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { Page } from '@playwright/test';
|
||||
|
||||
import { clickView } from './actions/click.js';
|
||||
|
||||
Reference in New Issue
Block a user