mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
chore: each block maintain its own adapter extension (#9224)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedFigmaBlockHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedFigmaMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedFigmaBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedFigmaBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedFigmaBlockHtmlAdapterExtension,
|
||||
EmbedFigmaMarkdownAdapterExtension,
|
||||
EmbedFigmaBlockPlainTextAdapterExtension,
|
||||
];
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { EmbedFigmaBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { EmbedFigmaBlockService } from './embed-figma-service.js';
|
||||
|
||||
export const EmbedFigmaBlockSpec: ExtensionType[] = [
|
||||
@@ -15,4 +16,5 @@ export const EmbedFigmaBlockSpec: ExtensionType[] = [
|
||||
? literal`affine-embed-edgeless-figma-block`
|
||||
: literal`affine-embed-figma-block`;
|
||||
}),
|
||||
];
|
||||
EmbedFigmaBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedGithubBlockHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedGithubMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedGithubBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedGithubBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedGithubBlockHtmlAdapterExtension,
|
||||
EmbedGithubMarkdownAdapterExtension,
|
||||
EmbedGithubBlockPlainTextAdapterExtension,
|
||||
];
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { EmbedGithubBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { EmbedGithubBlockService } from './embed-github-service.js';
|
||||
|
||||
export const EmbedGithubBlockSpec: ExtensionType[] = [
|
||||
@@ -15,4 +16,5 @@ export const EmbedGithubBlockSpec: ExtensionType[] = [
|
||||
? literal`affine-embed-edgeless-github-block`
|
||||
: literal`affine-embed-github-block`;
|
||||
}),
|
||||
];
|
||||
EmbedGithubBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedLinkedDocHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedLinkedDocMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedLinkedDocBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedLinkedDocBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedLinkedDocHtmlAdapterExtension,
|
||||
EmbedLinkedDocMarkdownAdapterExtension,
|
||||
EmbedLinkedDocBlockPlainTextAdapterExtension,
|
||||
];
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { EmbedLinkedDocBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { commands } from './commands/index.js';
|
||||
|
||||
export const EmbedLinkedDocBlockSpec: ExtensionType[] = [
|
||||
@@ -14,4 +15,5 @@ export const EmbedLinkedDocBlockSpec: ExtensionType[] = [
|
||||
? literal`affine-embed-edgeless-linked-doc-block`
|
||||
: literal`affine-embed-linked-doc-block`;
|
||||
}),
|
||||
];
|
||||
EmbedLinkedDocBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedLoomBlockHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedLoomMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedLoomBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedLoomBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedLoomBlockHtmlAdapterExtension,
|
||||
EmbedLoomMarkdownAdapterExtension,
|
||||
EmbedLoomBlockPlainTextAdapterExtension,
|
||||
];
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { EmbedLoomBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { EmbedLoomBlockService } from './embed-loom-service.js';
|
||||
|
||||
export const EmbedLoomBlockSpec: ExtensionType[] = [
|
||||
@@ -15,4 +16,5 @@ export const EmbedLoomBlockSpec: ExtensionType[] = [
|
||||
? literal`affine-embed-edgeless-loom-block`
|
||||
: literal`affine-embed-loom-block`;
|
||||
}),
|
||||
];
|
||||
EmbedLoomBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedSyncedDocBlockHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedSyncedDocBlockMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedSyncedDocBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedSyncedDocBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedSyncedDocBlockHtmlAdapterExtension,
|
||||
EmbedSyncedDocBlockMarkdownAdapterExtension,
|
||||
EmbedSyncedDocBlockPlainTextAdapterExtension,
|
||||
];
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { EmbedSyncedDocBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { EmbedSyncedDocBlockService } from './embed-synced-doc-service.js';
|
||||
|
||||
export const EmbedSyncedDocBlockSpec: ExtensionType[] = [
|
||||
@@ -15,4 +16,5 @@ export const EmbedSyncedDocBlockSpec: ExtensionType[] = [
|
||||
? literal`affine-embed-edgeless-synced-doc-block`
|
||||
: literal`affine-embed-synced-doc-block`;
|
||||
}),
|
||||
];
|
||||
EmbedSyncedDocBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedYoutubeBlockHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedYoutubeMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedYoutubeBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedYoutubeBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedYoutubeBlockHtmlAdapterExtension,
|
||||
EmbedYoutubeMarkdownAdapterExtension,
|
||||
EmbedYoutubeBlockPlainTextAdapterExtension,
|
||||
];
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { EmbedYoutubeBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { EmbedYoutubeBlockService } from './embed-youtube-service.js';
|
||||
|
||||
export const EmbedYoutubeBlockSpec: ExtensionType[] = [
|
||||
@@ -15,4 +16,5 @@ export const EmbedYoutubeBlockSpec: ExtensionType[] = [
|
||||
? literal`affine-embed-edgeless-youtube-block`
|
||||
: literal`affine-embed-youtube-block`;
|
||||
}),
|
||||
];
|
||||
EmbedYoutubeBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
Reference in New Issue
Block a user