refactor(editor): remove global types in model (#10082)

Closes: [BS-2249](https://linear.app/affine-design/issue/BS-2249/remove-global-types-in-model)

```ts
// before
matchFlavours(model, ['affine:page']);
// after
matchFlavours(model, [PageBlockModel]);
```
This commit is contained in:
Saul-Mirone
2025-02-11 08:18:57 +00:00
parent 64bb6c5a71
commit 652865c7cf
97 changed files with 492 additions and 323 deletions
+20 -1
View File
@@ -1,4 +1,13 @@
import type { EmbedCardStyle } from '@blocksuite/affine-model';
import {
type EmbedCardStyle,
EmbedFigmaModel,
EmbedGithubModel,
EmbedHtmlModel,
EmbedLinkedDocModel,
EmbedLoomModel,
EmbedSyncedDocModel,
EmbedYoutubeModel,
} from '@blocksuite/affine-model';
export const BLOCK_CHILDREN_CONTAINER_PADDING_LEFT = 24;
export const EDGELESS_BLOCK_CHILD_PADDING = 24;
@@ -48,6 +57,16 @@ export const EMBED_BLOCK_FLAVOUR_LIST = [
'affine:embed-loom',
] as const;
export const EMBED_BLOCK_MODEL_LIST = [
EmbedGithubModel,
EmbedYoutubeModel,
EmbedFigmaModel,
EmbedLinkedDocModel,
EmbedSyncedDocModel,
EmbedHtmlModel,
EmbedLoomModel,
] as const;
export const DEFAULT_IMAGE_PROXY_ENDPOINT =
'https://affine-worker.toeverything.workers.dev/api/worker/image-proxy';