mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
refactor(editor): extract mix-text adapter to shared (#9559)
This commit is contained in:
@@ -35,6 +35,7 @@ export {
|
||||
MarkdownDeltaConverter,
|
||||
} from './markdown';
|
||||
export * from './middlewares';
|
||||
export * from './mix-text';
|
||||
export {
|
||||
BlockNotionHtmlAdapterExtension,
|
||||
type BlockNotionHtmlAdapterMatcher,
|
||||
|
||||
+3
-4
@@ -1,8 +1,4 @@
|
||||
import { DefaultTheme, NoteDisplayMode } from '@blocksuite/affine-model';
|
||||
import {
|
||||
AdapterFactoryIdentifier,
|
||||
MarkdownAdapter,
|
||||
} from '@blocksuite/affine-shared/adapters';
|
||||
import type { ServiceProvider } from '@blocksuite/global/di';
|
||||
import type { DeltaInsert } from '@blocksuite/inline';
|
||||
import {
|
||||
@@ -26,6 +22,9 @@ import {
|
||||
type ToDocSnapshotPayload,
|
||||
} from '@blocksuite/store';
|
||||
|
||||
import { MarkdownAdapter } from './markdown/markdown';
|
||||
import { AdapterFactoryIdentifier } from './types/adapter';
|
||||
|
||||
export type MixText = string;
|
||||
|
||||
type MixTextToSliceSnapshotPayload = {
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
HtmlAdapterFactoryExtension,
|
||||
ImageAdapterFactoryExtension,
|
||||
MarkdownAdapterFactoryExtension,
|
||||
MixTextAdapterFactoryExtension,
|
||||
NotionHtmlAdapterFactoryExtension,
|
||||
NotionTextAdapterFactoryExtension,
|
||||
PlainTextAdapterFactoryExtension,
|
||||
@@ -13,7 +14,6 @@ import { htmlInlineToDeltaMatchers } from './html/delta-converter/html-inline.js
|
||||
import { inlineDeltaToHtmlAdapterMatchers } from './html/delta-converter/inline-delta.js';
|
||||
import { inlineDeltaToMarkdownAdapterMatchers } from './markdown/delta-converter/inline-delta.js';
|
||||
import { markdownInlineToDeltaMatchers } from './markdown/delta-converter/markdown-inline.js';
|
||||
import { MixTextAdapterFactoryExtension } from './mix-text.js';
|
||||
import { notionHtmlInlineToDeltaMatchers } from './notion-html/delta-converter/html-inline.js';
|
||||
import { inlineDeltaToPlainTextAdapterMatchers } from './plain-text/delta-converter/inline-delta.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from './extension.js';
|
||||
export * from './markdown/index.js';
|
||||
export * from './mix-text.js';
|
||||
export * from './notion-html/index.js';
|
||||
|
||||
@@ -107,6 +107,9 @@ export {
|
||||
MarkdownAdapter,
|
||||
MarkdownAdapterFactoryExtension,
|
||||
MarkdownAdapterFactoryIdentifier,
|
||||
MixTextAdapter,
|
||||
MixTextAdapterFactoryExtension,
|
||||
MixTextAdapterFactoryIdentifier,
|
||||
NotionTextAdapter,
|
||||
NotionTextAdapterFactoryExtension,
|
||||
NotionTextAdapterFactoryIdentifier,
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
copyMiddleware,
|
||||
HtmlAdapter,
|
||||
ImageAdapter,
|
||||
MixTextAdapter,
|
||||
NotionTextAdapter,
|
||||
pasteMiddleware,
|
||||
} from '@blocksuite/affine-shared/adapters';
|
||||
@@ -10,7 +11,6 @@ import type { BlockComponent, UIEventHandler } from '@blocksuite/block-std';
|
||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
||||
import type { Blocks, BlockSnapshot } from '@blocksuite/store';
|
||||
|
||||
import { MixTextAdapter } from '../../_common/adapters/index.js';
|
||||
import {
|
||||
defaultImageProxyMiddleware,
|
||||
replaceIdMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user