@ones-editor/editor 2.0.5-beta.26 → 2.0.5-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
- package/@ones-editor/block-menu/src/block-menu-button/drag-preview/element-to-data-url.d.ts +1 -1
- package/@ones-editor/block-menu/src/block-menu-button/index.d.ts +15 -4
- package/@ones-editor/{layout-block → column-block}/package.json +1 -1
- package/@ones-editor/column-block/src/child-containers.d.ts +2 -0
- package/@ones-editor/column-block/src/columns-options.d.ts +2 -0
- package/@ones-editor/column-block/src/columns-properties.d.ts +15 -0
- package/@ones-editor/column-block/src/index.d.ts +4 -0
- package/@ones-editor/column-block/src/types.d.ts +11 -0
- package/@ones-editor/core/src/core/blocks/common/block-wrapper.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/common/insert-empty-block.d.ts +2 -3
- package/@ones-editor/core/src/core/blocks/embed-blocks/embed-block/common.d.ts +0 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/children.d.ts +2 -5
- package/@ones-editor/core/src/core/containers/element.d.ts +0 -1
- package/@ones-editor/core/src/core/doc/container.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/actions/insert-doc/insert-doc.d.ts +1 -1
- package/@ones-editor/core/src/core/editor-doc/handle-block-data-changed.d.ts +1 -2
- package/@ones-editor/core/src/core/selection/editor-selection.d.ts +3 -1
- package/@ones-editor/core/src/core/types.d.ts +10 -58
- package/@ones-editor/core/src/helper/hovering-block.d.ts +1 -3
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +2 -3
- package/@ones-editor/drop-target/src/drop-target.d.ts +1 -8
- package/@ones-editor/drop-target/src/find-drop-target.d.ts +1 -1
- package/@ones-editor/drop-target/src/index.d.ts +1 -3
- package/@ones-editor/find-dialog/src/shortcuts.d.ts +2 -0
- package/@ones-editor/heading-collapse/src/heading-collapse-button/heading-utils.d.ts +1 -2
- package/@ones-editor/heading-collapse/src/index.d.ts +0 -1
- package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +4 -1
- package/@ones-editor/image-embed/src/drag-drop/handle-drop.d.ts +0 -1
- package/@ones-editor/image-embed/src/image-object.d.ts +0 -3
- package/@ones-editor/image-embed/src/index.d.ts +1 -5
- package/@ones-editor/image-embed/src/types.d.ts +0 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +1 -0
- package/@ones-editor/input-handlers/src/enforce-with-document-title/placeholder.d.ts +1 -0
- package/@ones-editor/input-handlers/src/index.d.ts +1 -4
- package/@ones-editor/input-handlers/src/markdown-shortcuts/match-block-convert.d.ts +1 -9
- package/@ones-editor/list-block/src/converter/selection-to-doc.d.ts +2 -0
- package/@ones-editor/paste-special/src/paste-special-handler.d.ts +0 -1
- package/@ones-editor/table-block/src/index.d.ts +0 -1
- package/@ones-editor/table-block/src/table-block/table-creator/index.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/colors.d.ts +1 -7
- package/@ones-editor/to-docx/src/doc2other/core.d.ts +0 -2
- package/@ones-editor/toc/src/build-toc.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +1 -1
- package/@ones-editor/ui/src/quick-menu/index.d.ts +2 -9
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +2 -4
- package/@ones-editor/ui/src/quick-menu/types.d.ts +0 -5
- package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +1 -2
- package/@ones-editor/ui-base/src/color-palette/create-palette.d.ts +0 -8
- package/@ones-editor/ui-base/src/color-palette/index.d.ts +2 -2
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +0 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +1 -19
- package/@ones-editor/ui-base/src/index.d.ts +0 -1
- package/@ones-editor/ui-base/src/input/create-input.d.ts +0 -1
- package/@ones-editor/ui-base/src/locale/en-us.d.ts +0 -20
- package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +0 -20
- package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +0 -20
- package/@ones-editor/versions/src/types.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +212 -303
- package/dist/lang/en-us.d.ts +0 -1
- package/dist/lang/ja-jp.d.ts +0 -1
- package/dist/lang/zh-cn.d.ts +0 -1
- package/dist/types.d.ts +0 -2
- package/package.json +1 -1
- package/@ones-editor/block-menu/src/block-menu-button/menu-button/index.d.ts +0 -23
- package/@ones-editor/callout-block/package.json +0 -11
- package/@ones-editor/callout-block/src/callout-block/callout-block-content.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/callout-block-doc.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/callout-block.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/callout-converter-interceptor.d.ts +0 -8
- package/@ones-editor/callout-block/src/callout-block/callout-drop-target-finder.d.ts +0 -10
- package/@ones-editor/callout-block/src/callout-block/callout-input-handler.d.ts +0 -11
- package/@ones-editor/callout-block/src/callout-block/callout-last-callout-payload.d.ts +0 -9
- package/@ones-editor/callout-block/src/callout-block/callout-options.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/callout-properties.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +0 -8
- package/@ones-editor/callout-block/src/callout-block/command-items/bg-color-item.d.ts +0 -22
- package/@ones-editor/callout-block/src/callout-block/command-items/delete-icon-item.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/command-items/preset-item.d.ts +0 -16
- package/@ones-editor/callout-block/src/callout-block/converter.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/helper.d.ts +0 -4
- package/@ones-editor/callout-block/src/callout-block/index.d.ts +0 -1
- package/@ones-editor/callout-block/src/callout-block/types.d.ts +0 -9
- package/@ones-editor/callout-block/src/index.d.ts +0 -3
- package/@ones-editor/callout-block/src/locale/en-us.d.ts +0 -12
- package/@ones-editor/callout-block/src/locale/index.d.ts +0 -1
- package/@ones-editor/callout-block/src/locale/ja-jp.d.ts +0 -12
- package/@ones-editor/callout-block/src/locale/zh-cn.d.ts +0 -12
- package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +0 -22
- package/@ones-editor/input-handlers/src/markdown-shortcuts/converter-interceptors.d.ts +0 -12
- package/@ones-editor/layout-block/src/block-drop.d.ts +0 -3
- package/@ones-editor/layout-block/src/caption.d.ts +0 -8
- package/@ones-editor/layout-block/src/child-containers.d.ts +0 -3
- package/@ones-editor/layout-block/src/column-resizer/index.d.ts +0 -2
- package/@ones-editor/layout-block/src/constants.d.ts +0 -32
- package/@ones-editor/layout-block/src/index.d.ts +0 -6
- package/@ones-editor/layout-block/src/layout-creator/index.d.ts +0 -27
- package/@ones-editor/layout-block/src/layout-operations.d.ts +0 -11
- package/@ones-editor/layout-block/src/locale/en-us.d.ts +0 -10
- package/@ones-editor/layout-block/src/locale/index.d.ts +0 -1
- package/@ones-editor/layout-block/src/locale/ja-jp.d.ts +0 -10
- package/@ones-editor/layout-block/src/locale/zh-cn.d.ts +0 -10
- package/@ones-editor/layout-block/src/options.d.ts +0 -2
- package/@ones-editor/layout-block/src/percent-bar.d.ts +0 -3
- package/@ones-editor/layout-block/src/selection.d.ts +0 -5
- package/@ones-editor/layout-block/src/toolbar.d.ts +0 -33
- package/@ones-editor/layout-block/src/types.d.ts +0 -17
- package/@ones-editor/layout-block/src/utils.d.ts +0 -6
- package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +0 -22
- package/@ones-editor/to-docx/src/doc2other/layout.d.ts +0 -10
- package/@ones-editor/ui-base/src/emoji-item/emoji-item.d.ts +0 -19
- package/@ones-editor/ui-base/src/emoji-item/index.d.ts +0 -2
- package/@ones-editor/ui-base/src/emoji-palette/emoji-content.d.ts +0 -21
- package/@ones-editor/ui-base/src/emoji-palette/emoji-data.d.ts +0 -60
- package/@ones-editor/ui-base/src/emoji-palette/emoji-navigation.d.ts +0 -16
- package/@ones-editor/ui-base/src/emoji-palette/emoji-search.d.ts +0 -11
- package/@ones-editor/ui-base/src/emoji-palette/index.d.ts +0 -23
- package/@ones-editor/ui-base/src/emoji-palette/types.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
|
|
2
2
|
import type { GetAllQuickMenuItemsOptions } from '../../../../../../@ones-editor/ui';
|
|
3
3
|
import type { BlockMenuItem } from '../types';
|
|
4
|
-
export declare function getAllInsertBlockItems(editor: OnesEditor,
|
|
4
|
+
export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options: GetAllQuickMenuItemsOptions): BlockMenuItem[];
|
|
5
5
|
export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
-
export declare function elementToDataUrl(editor: OnesEditor, element: HTMLElement
|
|
2
|
+
export declare function elementToDataUrl(editor: OnesEditor, element: HTMLElement): Promise<string>;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import EmptyBlockMenu from '../empty-block-menu';
|
|
3
|
+
import BlockMenu from '../block-menu';
|
|
4
|
+
export default class OnesEditorBlockMenuButton {
|
|
4
5
|
private editor;
|
|
5
|
-
|
|
6
|
+
buttonElement: HTMLButtonElement;
|
|
7
|
+
emptyBlockMenu: EmptyBlockMenu;
|
|
8
|
+
blockMenu: BlockMenu;
|
|
9
|
+
private dragHandler;
|
|
6
10
|
constructor(editor: OnesEditor);
|
|
7
11
|
destroy(): void;
|
|
12
|
+
handleHoverBlock: (hoverBlock: BlockElement | null, oldBlock: BlockElement | null, event: MouseEvent) => void;
|
|
13
|
+
handleButtonClick: () => void;
|
|
14
|
+
updatePlaceholder: (block: BlockElement) => void;
|
|
15
|
+
handleChanged: () => void;
|
|
16
|
+
createButton(): HTMLButtonElement;
|
|
17
|
+
setButtonType(type: 'move' | 'insert'): void;
|
|
18
|
+
updateButton(block: BlockElement): void;
|
|
8
19
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BlockCommands, BlockElement, CommandItem, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare class ColumnsBlockCommands implements BlockCommands {
|
|
3
|
+
protected editor: OnesEditor;
|
|
4
|
+
protected block: BlockElement;
|
|
5
|
+
group: string;
|
|
6
|
+
constructor(editor: OnesEditor, block: BlockElement);
|
|
7
|
+
_commands: CommandItem[];
|
|
8
|
+
get commands(): CommandItem[];
|
|
9
|
+
executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function getColumnsBlockProperties(editor: OnesEditor, block: BlockElement): {
|
|
12
|
+
blockCommands: {
|
|
13
|
+
'hovering-toolbar': ColumnsBlockCommands;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DocBlock } from '../../../@ones-editor/core';
|
|
2
|
+
export type ColumnData = {
|
|
3
|
+
type: string;
|
|
4
|
+
columns: 1 | 2 | 3 | 4;
|
|
5
|
+
};
|
|
6
|
+
export declare const COLUMNS: ColumnData[];
|
|
7
|
+
export interface DocColumnsBlock extends DocBlock {
|
|
8
|
+
columnType: string;
|
|
9
|
+
children: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function getColumnData(type: string): ColumnData;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement, BlockPosition, ConvertBlockResult, SelectionRange, BlockStyles
|
|
1
|
+
import { OnesEditor, BlockElement, BlockPosition, ConvertBlockResult, SelectionRange, BlockStyles } from '../../types';
|
|
2
2
|
import { DocBlock, DocBlockAttributes } from '../../doc';
|
|
3
3
|
export declare function getBlockTextLength(editor: OnesEditor, block: BlockElement): number;
|
|
4
4
|
export declare function clearAllSelection(editor: OnesEditor): void;
|
|
5
5
|
export declare function updateBlockSelection(editor: OnesEditor, block: BlockElement, from: BlockPosition, to: BlockPosition): void;
|
|
6
6
|
export declare function getRootBlock(block: BlockElement): BlockElement;
|
|
7
|
-
export declare function getClosestContainerByCondition(_block: BlockElement, condition: (container: ContainerElement) => boolean): BlockElement | undefined;
|
|
8
7
|
export declare function getBlockMinWidth(editor: OnesEditor, block: BlockElement): number | undefined;
|
|
9
8
|
export declare function handleBlockElementUpdated(editor: OnesEditor, block: BlockElement, data: DocBlock): void;
|
|
10
9
|
export declare function convertBlockFrom(editor: OnesEditor, block: BlockElement, type: string, options: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getContainerBlockOverrideOptions(editor: OnesEditor, containerID: string, blockType?: string): ContainerBlockOverrideInsertEmptyBlockInsideOptions | undefined;
|
|
1
|
+
import { OnesEditor } from '../../types';
|
|
3
2
|
export declare function insertEmptyEmbedBlock(editor: OnesEditor, embedType: string, containerId: string, blockIndex: number, data?: Record<string, unknown>): Promise<import("../../types").BlockElement | null>;
|
|
4
|
-
export declare function insertEmptyBlock(editor: OnesEditor, type: string, containerId: string, blockIndex: number, data?: Record<string, unknown
|
|
3
|
+
export declare function insertEmptyBlock(editor: OnesEditor, type: string, containerId: string, blockIndex: number, data?: Record<string, unknown>): Promise<import("../../types").BlockElement | null> | null;
|
|
@@ -27,7 +27,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
27
27
|
callbacks: EditorInputCallbacks;
|
|
28
28
|
inputElement: HTMLInputElement;
|
|
29
29
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
30
|
-
private
|
|
30
|
+
private isInCommandbar;
|
|
31
31
|
destroy(): void;
|
|
32
32
|
getInput(): HTMLInputElement;
|
|
33
33
|
focus(): void;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { BlockElement, ContainerElement
|
|
2
|
-
export declare function getChildBlocks(container: ContainerElement
|
|
3
|
-
condition: (block: BlockElement) => boolean;
|
|
4
|
-
editor: OnesEditor;
|
|
5
|
-
}): BlockElement[];
|
|
1
|
+
import { BlockElement, ContainerElement } from '../types';
|
|
2
|
+
export declare function getChildBlocks(container: ContainerElement): BlockElement[];
|
|
6
3
|
export declare function getFirstChildBlock(container: ContainerElement): BlockElement;
|
|
7
4
|
export declare function getLastChildBlock(container: ContainerElement): BlockElement;
|
|
8
5
|
export declare function getChildBlockCount(container: ContainerElement): number;
|
|
@@ -4,4 +4,3 @@ export declare function getContainerById(editor: OnesEditor, containerId: string
|
|
|
4
4
|
export declare function getExistsContainerById(editor: OnesEditor, containerId: string): ContainerElement | null;
|
|
5
5
|
export declare function getContainerBlocksElement(container: ContainerElement): ContainerBlocksElement;
|
|
6
6
|
export declare function getContainerToolsElement(container: ContainerElement): ContainerToolsElement;
|
|
7
|
-
export declare function isContainerBlocksElement(element: Element): element is ContainerBlocksElement;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DocBlock,
|
|
2
|
-
export declare function createContainer(doc: OnesEditorDoc,
|
|
1
|
+
import { DocBlock, OnesEditorDoc } from './doc';
|
|
2
|
+
export declare function createContainer(doc: OnesEditorDoc, blocks: DocBlock[]): string;
|
|
3
3
|
export declare function createEmptyContainer(doc: OnesEditorDoc, text?: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DocObject } from '../../../doc';
|
|
2
2
|
import { BlockElement, CloneBlockResultInfo, ContainerElement, OnesEditor } from '../../../types';
|
|
3
3
|
export declare function editorInsertDoc(editor: OnesEditor, block: BlockElement, offset: number, insertedDoc: DocObject, cloneDocResult?: CloneBlockResultInfo): void;
|
|
4
|
-
export declare function editorInsertDocAt(editor: OnesEditor, container: ContainerElement, blockIndex: number,
|
|
4
|
+
export declare function editorInsertDocAt(editor: OnesEditor, container: ContainerElement, blockIndex: number, insertedDoc: DocObject, cloneDocResult?: CloneBlockResultInfo): BlockElement[];
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { DocBlockDelta } from '../doc';
|
|
2
1
|
import { OnesEditor } from '../types';
|
|
3
|
-
export declare function onBlockDataChanged(editor: OnesEditor, containerId: string, blockIndex: number
|
|
2
|
+
export declare function onBlockDataChanged(editor: OnesEditor, containerId: string, blockIndex: number): void;
|
|
@@ -17,7 +17,9 @@ export declare class EditorSelection implements OnesEditorSelection {
|
|
|
17
17
|
selectBlock(block: BlockElement, start: number, end?: number, options?: ChangeSelectionOptions): void;
|
|
18
18
|
setSelection(anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions): SelectionRange;
|
|
19
19
|
setRange(range: SelectionRange, options?: ChangeSelectionOptions): SelectionRange;
|
|
20
|
-
updateSelection(
|
|
20
|
+
updateSelection(oldRange: SelectionRange | null, options?: {
|
|
21
|
+
focusBlockChanged: boolean;
|
|
22
|
+
}): void;
|
|
21
23
|
getFocusedPos(): BlockPosition;
|
|
22
24
|
getAnchorPos(): BlockPosition;
|
|
23
25
|
selectionChanging(anchor: BlockPosition, focus: BlockPosition): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import { DocBlock, DocBlockAttributes,
|
|
2
|
+
import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
|
|
3
3
|
export type ContainerElement = HTMLDivElement & {
|
|
4
4
|
__neverUse: 'ContainerElement';
|
|
5
5
|
};
|
|
@@ -118,7 +118,6 @@ export interface Closeable {
|
|
|
118
118
|
click: (item: CommandItem, target: HTMLElement) => void;
|
|
119
119
|
}
|
|
120
120
|
export type CommandItemChildrenPlacement = 'auto' | 'top' | 'left' | 'right' | 'bottom' | 'auto-start' | 'auto-end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
121
|
-
export type CommandItemMenuType = 'inline' | 'sibling';
|
|
122
121
|
export interface CommandItem {
|
|
123
122
|
id: string;
|
|
124
123
|
name: string;
|
|
@@ -148,10 +147,6 @@ export interface CommandItem {
|
|
|
148
147
|
hideGroupItem?: boolean;
|
|
149
148
|
setCloseable?: (closeable: Closeable) => void;
|
|
150
149
|
beforePopup?: (parent: unknown) => void;
|
|
151
|
-
/**
|
|
152
|
-
* defaults to true
|
|
153
|
-
*/
|
|
154
|
-
shouldShown?: (currentBlock: BlockElement | undefined, menuType: CommandItemMenuType) => boolean;
|
|
155
150
|
}
|
|
156
151
|
export interface BlockCommandItem extends CommandItem {
|
|
157
152
|
blockId: string;
|
|
@@ -177,47 +172,10 @@ export interface BlockProperties {
|
|
|
177
172
|
blockCommands?: Record<string, BlockCommands>;
|
|
178
173
|
abstract?: string;
|
|
179
174
|
}
|
|
180
|
-
export interface DropHandler {
|
|
181
|
-
handleDrop: (editor: OnesEditor, dragData: BlockElement | File[], targetContainer: ContainerElement, blockIndex: number) => boolean | undefined;
|
|
182
|
-
}
|
|
183
|
-
export interface CombineToCreateOptions {
|
|
184
|
-
/**
|
|
185
|
-
* @returns sideway: 两侧合并(左右 indicator)
|
|
186
|
-
*
|
|
187
|
-
* body: 中间合并(target block 激活)(暂未实现)
|
|
188
|
-
*/
|
|
189
|
-
combinable: (editor: OnesEditor, source: BlockElement, target: BlockElement) => undefined | 'sideway' | 'body';
|
|
190
|
-
onCombine: (editor: OnesEditor, source: BlockElement, target: BlockElement, position: CombineDropInsertPos['pos'], dragObject: DragObject | null, handlers: DropHandler[]) => BlockElement | undefined;
|
|
191
|
-
}
|
|
192
|
-
export type ContainerBlockOverrideInsertEmptyBlockInsideOptionsDict = Record<string, ContainerBlockOverrideInsertEmptyBlockInsideOptions>;
|
|
193
|
-
export type ContainerBlockOverrideInsertEmptyBlockInsideOptions = {
|
|
194
|
-
item?: CommandItem;
|
|
195
|
-
data?: Record<string, unknown>;
|
|
196
|
-
};
|
|
197
175
|
export interface BlockOptions {
|
|
198
176
|
name: string;
|
|
199
177
|
insertBlockCommandItems?: CommandItem[];
|
|
200
|
-
overrideInertEmptyBlockInsideOptions?: ContainerBlockOverrideInsertEmptyBlockInsideOptionsDict;
|
|
201
178
|
handleInsertEmptyBlock?: (editor: OnesEditor, options: InsertEmptyBlockOptions) => Promise<BlockElement | null>;
|
|
202
|
-
isMenuButtonBaseContainer?: (container: ContainerElement) => boolean;
|
|
203
|
-
combineToCreate?: CombineToCreateOptions;
|
|
204
|
-
/**
|
|
205
|
-
* defaults to true.
|
|
206
|
-
*
|
|
207
|
-
* 'without-margin': include margin for dragging preview computing.
|
|
208
|
-
*/
|
|
209
|
-
draggingPreview?: boolean | 'margin-included';
|
|
210
|
-
innerToc?: boolean;
|
|
211
|
-
blockMenu?: {
|
|
212
|
-
showComment?: boolean;
|
|
213
|
-
showLocker?: boolean;
|
|
214
|
-
};
|
|
215
|
-
findPreviewElement?: (editor: OnesEditor, complexBlock: BlockElement) => HTMLElement;
|
|
216
|
-
headingCollapsable?: boolean;
|
|
217
|
-
/**
|
|
218
|
-
* 拖拽时,是否显示缩略图容器自带的阴影,默认为 false
|
|
219
|
-
*/
|
|
220
|
-
previewNoShadow?: boolean;
|
|
221
179
|
}
|
|
222
180
|
export interface StandardDragObject {
|
|
223
181
|
type: 'block';
|
|
@@ -235,17 +193,10 @@ export interface CustomDragObject {
|
|
|
235
193
|
}
|
|
236
194
|
export type DragObject = StandardDragObject | CustomDragObject;
|
|
237
195
|
export interface CustomDropInsertPos {
|
|
238
|
-
type: 'custom';
|
|
239
196
|
rect: DOMRect;
|
|
240
197
|
data: unknown;
|
|
241
|
-
targetBlock?: BlockElement;
|
|
242
198
|
}
|
|
243
|
-
export type
|
|
244
|
-
type: 'combine';
|
|
245
|
-
pos: 'left' | 'right';
|
|
246
|
-
onCombine: CombineToCreateOptions['onCombine'];
|
|
247
|
-
};
|
|
248
|
-
export type DropInsertPos = 'before' | 'after' | CombineDropInsertPos | CustomDropInsertPos;
|
|
199
|
+
export type DropInsertPos = 'before' | 'after' | CustomDropInsertPos;
|
|
249
200
|
export interface DropOptions {
|
|
250
201
|
isSourceBlock: boolean;
|
|
251
202
|
targetBlock: BlockElement;
|
|
@@ -266,9 +217,9 @@ export interface Block {
|
|
|
266
217
|
handleBlockElementUpdated?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => void;
|
|
267
218
|
handleContainerResized?: (editor: OnesEditor, block: BlockElement) => void;
|
|
268
219
|
handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
|
|
269
|
-
handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock
|
|
220
|
+
handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => boolean;
|
|
270
221
|
handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | DataTransferItemList | null, x: number, y: number) => DropInsertPos | false | undefined;
|
|
271
|
-
handleDrop?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions) => boolean |
|
|
222
|
+
handleDrop?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
|
|
272
223
|
getClientRects?: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => DOMRect[];
|
|
273
224
|
getMinWidth?: (editor: OnesEditor, block: BlockElement) => number | undefined;
|
|
274
225
|
convertFrom?: (editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
@@ -279,7 +230,7 @@ export interface Block {
|
|
|
279
230
|
convertTo?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, type: 'text' | 'html' | 'markdown', path: BlockPath) => string;
|
|
280
231
|
toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject) => Promise<DocObject | undefined>;
|
|
281
232
|
getBlockStyles?: (editor: OnesEditor, block: BlockElement) => BlockStyles;
|
|
282
|
-
blockToDoc?: (srcDoc: DocObject, srcBlockData: DocBlock, childBlockConverter: (srcDoc: DocObject, srcBlockData: DocBlock) => DocObject
|
|
233
|
+
blockToDoc?: (srcDoc: DocObject, srcBlockData: DocBlock, childBlockConverter: (srcDoc: DocObject, srcBlockData: DocBlock) => DocObject) => DocObject;
|
|
283
234
|
getResources?: (editor: OnesEditor, data: DocBlock) => string[] | null;
|
|
284
235
|
replaceResources?: (data: DocBlock, resources: Map<string, string>) => void;
|
|
285
236
|
}
|
|
@@ -307,7 +258,6 @@ export interface ComplexKindBlock extends Block {
|
|
|
307
258
|
getTextToolbarReferenceClient?: (editor: OnesEditor, complexBlock: BlockElement) => DOMRect | undefined;
|
|
308
259
|
isChildContainerVisible?: (editor: OnesEditor, complexBlock: BlockElement, childContainer: ContainerElement) => boolean;
|
|
309
260
|
showChildContainer?: (editor: OnesEditor, complexBlock: BlockElement, childContainer: ContainerElement) => void;
|
|
310
|
-
beforeInsertDoc?: (editor: OnesEditor, container: ContainerElement, insertDoc: DocObject) => DocObject | undefined;
|
|
311
261
|
}
|
|
312
262
|
export interface SelectedBlock {
|
|
313
263
|
block: BlockElement;
|
|
@@ -496,7 +446,7 @@ export declare class OnesEditorCustomDataWrapper<T> {
|
|
|
496
446
|
getEditor(): OnesEditor;
|
|
497
447
|
destroy(): void;
|
|
498
448
|
}
|
|
499
|
-
export type OnesEditorCustomCreator
|
|
449
|
+
export type OnesEditorCustomCreator = (editor: OnesEditor) => OnesEditorCustom;
|
|
500
450
|
export interface CloneBlockResultInfo {
|
|
501
451
|
containerIdMap: Map<string, string>;
|
|
502
452
|
blockIdMap: Map<string, string>;
|
|
@@ -537,7 +487,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
537
487
|
readonly settingsProvider: OnesEditorSettingsProvider;
|
|
538
488
|
version: string;
|
|
539
489
|
readonly: boolean;
|
|
540
|
-
addCustom: <T extends OnesEditorCustom>(name: string, creator: OnesEditorCustomCreator
|
|
490
|
+
addCustom: <T extends OnesEditorCustom>(name: string, creator: OnesEditorCustomCreator) => T;
|
|
541
491
|
getCustom: <T extends OnesEditorCustom>(name: string) => T;
|
|
542
492
|
replaceCustom: <T extends OnesEditorCustom>(name: string, newCustom: T) => T;
|
|
543
493
|
findCustom: <T extends OnesEditorCustom>(name: string) => T | null;
|
|
@@ -618,7 +568,9 @@ export interface OnesEditorSelection {
|
|
|
618
568
|
setSelection: (anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions) => SelectionRange;
|
|
619
569
|
setRange: (range: SelectionRange, options?: ChangeSelectionOptions) => SelectionRange;
|
|
620
570
|
selectBlock: (block: BlockElement, start: number, end?: number, options?: ChangeSelectionOptions) => void;
|
|
621
|
-
updateSelection: (old: SelectionRange | null
|
|
571
|
+
updateSelection: (old: SelectionRange | null, options?: {
|
|
572
|
+
focusBlockChanged: boolean;
|
|
573
|
+
}) => void;
|
|
622
574
|
updateLastCaretRect: () => void;
|
|
623
575
|
getSuggestedCaretX: () => number | undefined;
|
|
624
576
|
getAnchorPos: () => BlockPosition;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import
|
|
2
|
+
import { TextBlockContentChild } from '../core/blocks/text-blocks/base/child';
|
|
3
3
|
import { BlockElement, OnesEditor, OnesEditorCustom } from '../core/types';
|
|
4
4
|
export interface OnesEditorHoveringBlockEvents {
|
|
5
5
|
change: (block: BlockElement | null, old: BlockElement | null, event: MouseEvent) => void;
|
|
6
|
-
targetChange: (block: BlockElement | null, old: BlockElement | null, target: EventTarget | null, oldTarget: EventTarget | null) => void;
|
|
7
6
|
childChange: (block: BlockElement | null, child: TextBlockContentChild | null, old: TextBlockContentChild | null, event: MouseEvent) => void;
|
|
8
7
|
}
|
|
9
8
|
export interface OnesEditorHoveringBlockFilter extends OnesEditorCustom {
|
|
@@ -15,7 +14,6 @@ export interface OnesEditorHoveringBlockFinder extends OnesEditorCustom {
|
|
|
15
14
|
export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHoveringBlockEvents> {
|
|
16
15
|
private editor;
|
|
17
16
|
private hoveringBlock;
|
|
18
|
-
private hoveringElem;
|
|
19
17
|
private hoveringTextChild;
|
|
20
18
|
private filters;
|
|
21
19
|
private finders;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockElement, DropInsertPos, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
export declare const INDICATOR_SIZE = 2;
|
|
3
3
|
interface DropTarget {
|
|
4
4
|
block: BlockElement;
|
|
@@ -9,10 +9,9 @@ export default class DropIndicator {
|
|
|
9
9
|
private indicator;
|
|
10
10
|
target: DropTarget | null;
|
|
11
11
|
constructor(editor: OnesEditor);
|
|
12
|
-
createIndicator(): void;
|
|
13
12
|
show(block: BlockElement, insertPos: DropInsertPos): void;
|
|
14
13
|
hide(): void;
|
|
15
14
|
private getIndicatorRect;
|
|
16
|
-
getViewRect(block: BlockElement
|
|
15
|
+
getViewRect(block: BlockElement): DOMRect;
|
|
17
16
|
}
|
|
18
17
|
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { BlockElement,
|
|
1
|
+
import { BlockElement, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
import DropIndicator from './drop-indicator';
|
|
3
3
|
export interface DropHandler {
|
|
4
4
|
handleDrop: (editor: OnesEditor, dragData: BlockElement | File[], targetContainer: ContainerElement, blockIndex: number) => boolean | undefined;
|
|
5
5
|
}
|
|
6
|
-
export type DropTargetFinderId = keyof any;
|
|
7
|
-
export interface DropTargetFinder {
|
|
8
|
-
finder: (editor: OnesEditor, source: BlockElement | null, x: number, y: number) => BlockElement | null;
|
|
9
|
-
}
|
|
10
6
|
export default class OnesEditorDropTarget {
|
|
11
7
|
private editor;
|
|
12
8
|
indicator: DropIndicator;
|
|
@@ -16,12 +12,9 @@ export default class OnesEditorDropTarget {
|
|
|
16
12
|
dropEffect: 'move' | 'none';
|
|
17
13
|
} | undefined;
|
|
18
14
|
handlers: DropHandler[];
|
|
19
|
-
dropTargetFinders: Map<string | number | symbol, DropTargetFinder>;
|
|
20
|
-
combineToCreate: CombineToCreateOptions[];
|
|
21
15
|
constructor(editor: OnesEditor);
|
|
22
16
|
destroy(): void;
|
|
23
17
|
addHandler(handler: DropHandler): void;
|
|
24
|
-
addFinder(id: DropTargetFinderId, finder: DropTargetFinder): void;
|
|
25
18
|
static register(editor: OnesEditor): OnesEditorDropTarget;
|
|
26
19
|
static get(editor: OnesEditor): OnesEditorDropTarget;
|
|
27
20
|
static find(editor: OnesEditor): OnesEditorDropTarget | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
-
export declare function findTargetBlock(editor: OnesEditor, x
|
|
2
|
+
export declare function findTargetBlock(editor: OnesEditor, x: number, y: number): BlockElement | null;
|
|
3
3
|
export declare function canInsertAsSibling(editor: OnesEditor, block: BlockElement): boolean;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { INDICATOR_SIZE } from './drop-indicator';
|
|
2
1
|
import OnesEditorDropTarget from './drop-target';
|
|
3
2
|
import type { DropHandler } from './drop-target';
|
|
4
3
|
import { patchInsertFile } from './handlers/patch-insert-file';
|
|
5
|
-
export type { DropTargetFinder, DropTargetFinderId } from './drop-target';
|
|
6
4
|
export * from './drag-object';
|
|
7
|
-
export { OnesEditorDropTarget, DropHandler, patchInsertFile
|
|
5
|
+
export { OnesEditorDropTarget, DropHandler, patchInsertFile };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
import './locale';
|
|
3
3
|
export declare function handleFindReplace(editor: OnesEditor): boolean;
|
|
4
|
+
declare function handleReplaceAndFind(editor: OnesEditor): boolean;
|
|
4
5
|
declare const FindReplaceShortcuts: {
|
|
5
6
|
'CtrlOrCmd+F': typeof handleFindReplace;
|
|
7
|
+
'CtrlOrCmd+Shift+H': typeof handleReplaceAndFind;
|
|
6
8
|
};
|
|
7
9
|
export { FindReplaceShortcuts, };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { BlockElement
|
|
1
|
+
import { BlockElement } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare function isTitleBlock(block: BlockElement): boolean;
|
|
3
|
-
export declare function canShowCollapseButtons(editor: OnesEditor, hoverBlock: BlockElement | null): boolean;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BlockElement, DragObject, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
import { ImageDragInsertPos } from './types';
|
|
3
|
-
export declare function getDragInsertPos(editor: OnesEditor, block: BlockElement, images: HTMLElement[], x: number, y?: number):
|
|
3
|
+
export declare function getDragInsertPos(editor: OnesEditor, block: BlockElement, images: HTMLElement[], x: number, y?: number): {
|
|
4
|
+
rect: DOMRect;
|
|
5
|
+
data: number;
|
|
6
|
+
};
|
|
4
7
|
export declare function handleDropOver(editor: OnesEditor, block: BlockElement, dragObject: DragObject | DataTransferItemList | null, x: number, y: number): ImageDragInsertPos | undefined;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { BlockElement, DragObject, DropInsertPos, DropOptions, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
export declare function deleteImageFromBlock(editor: OnesEditor, block: BlockElement, index: number): void;
|
|
3
2
|
export declare function handleDrop(editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions): boolean | undefined;
|
|
@@ -10,9 +10,6 @@ export declare class ImageObject implements ImageObjectBase {
|
|
|
10
10
|
private resizing;
|
|
11
11
|
private parentContainerResizerObserver;
|
|
12
12
|
private autoFix;
|
|
13
|
-
focusTimes: number;
|
|
14
|
-
mouseStartX: number;
|
|
15
|
-
mouseStartY: number;
|
|
16
13
|
constructor(editor: OnesEditor, blockData: DocEmbedBlock);
|
|
17
14
|
destroy(): void;
|
|
18
15
|
setAutoFix(autoFix: boolean): void;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { Embed } from '../../../@ones-editor/core';
|
|
2
|
-
import { toImageEmbedData } from './image-data';
|
|
3
2
|
import { ImageObject } from './image-object';
|
|
4
3
|
import './image-embed-style.scss';
|
|
5
|
-
import { deleteImageFromBlock } from './drag-drop/handle-drop';
|
|
6
4
|
import './locale';
|
|
7
5
|
import { getImageContainersByBlock } from './image-dom/helper';
|
|
8
6
|
import EmptyImageConverterInputHandler from './empty-image-converter';
|
|
9
7
|
import { ImagePasteHandler } from './paste-handler';
|
|
10
|
-
import type { ImageDragObject } from './drag-drop/types';
|
|
11
|
-
import { updateImageBlockSize } from './image-size';
|
|
12
8
|
export * from './shortcuts';
|
|
13
9
|
export * from './types';
|
|
14
|
-
export { ImageObject, ImagePasteHandler, getImageContainersByBlock
|
|
10
|
+
export { ImageObject, ImagePasteHandler, getImageContainersByBlock };
|
|
15
11
|
declare const ImageEmbed: Embed;
|
|
16
12
|
export { ImageEmbed, EmptyImageConverterInputHandler };
|
|
@@ -12,6 +12,7 @@ declare class EnforceWithDocumentTitleHandler implements OnesEditorInputHandler
|
|
|
12
12
|
handleSelectionChange: (editor: OnesEditor) => void;
|
|
13
13
|
private reload;
|
|
14
14
|
private applyPlaceholder;
|
|
15
|
+
private removePlaceholder;
|
|
15
16
|
private isDocumentTitleBlock;
|
|
16
17
|
}
|
|
17
18
|
export default EnforceWithDocumentTitleHandler;
|
|
@@ -3,4 +3,5 @@ import { EnforceWithDocumentTitleHandlerOptions } from './types';
|
|
|
3
3
|
export declare function isEmptyTextBlockWithoutCompositionText(editor: OnesEditor, block: BlockElement): boolean;
|
|
4
4
|
export declare function removePlaceholderFromBlock(editor: OnesEditor, block: BlockElement): void;
|
|
5
5
|
export declare function applyPlaceholderToBlock(editor: OnesEditor, block: BlockElement, placeholder: string | Element): void;
|
|
6
|
+
export declare function removeAllPlaceholders(editor: OnesEditor): void;
|
|
6
7
|
export declare function applyPlaceholder(editor: OnesEditor, options: EnforceWithDocumentTitleHandlerOptions): void;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { MarkdownInputHandler, converterIntercept } from './markdown-shortcuts';
|
|
2
|
-
import { MarkdownConverterInterceptors } from './markdown-shortcuts/converter-interceptors';
|
|
3
|
-
import type { ConverterInterceptor } from './markdown-shortcuts/converter-interceptors';
|
|
4
|
-
import type { BlockConverter } from './markdown-shortcuts/match-block-convert';
|
|
5
2
|
import './i18n';
|
|
6
3
|
export * from './enforce-with-document-title';
|
|
7
|
-
export { MarkdownInputHandler, converterIntercept
|
|
4
|
+
export { MarkdownInputHandler, converterIntercept };
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type BlockConverter = {
|
|
3
|
-
reg: RegExp;
|
|
4
|
-
blockType: string;
|
|
5
|
-
data?: DocBlockAttributes;
|
|
6
|
-
};
|
|
7
|
-
export type BlockConverters = {
|
|
8
|
-
[index: string]: BlockConverter;
|
|
9
|
-
};
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
10
2
|
export declare function converterIntercept(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, type: 'enter' | 'space'): boolean;
|
|
11
3
|
export declare function matchBlockConvert(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, type: 'enter' | 'space'): boolean;
|
|
@@ -6,7 +6,6 @@ export default class PasteSpecialHandler implements OnesEditorInputHandler {
|
|
|
6
6
|
lastUndoAction: OnesEditorUndoAction | null;
|
|
7
7
|
lastPos: BlockPosition | null;
|
|
8
8
|
event: ClipboardEvent | null;
|
|
9
|
-
order: number;
|
|
10
9
|
constructor(editor: OnesEditor);
|
|
11
10
|
destroy(): void;
|
|
12
11
|
handleChanged(editor: OnesEditor, action: OnesEditorUndoAction): void;
|
|
@@ -6,16 +6,10 @@ export declare function styleColorToColor(color: string | undefined): "d83931" |
|
|
|
6
6
|
* @param color
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export declare function styleBackgroundColorToHighlight(color: string | undefined): "
|
|
9
|
+
export declare function styleBackgroundColorToHighlight(color: string | undefined): "yellow" | "magenta" | "green" | "blue" | "lightGray" | "red" | "darkGreen" | "darkMagenta" | "darkGray" | undefined;
|
|
10
10
|
export declare function styleBackgroundColorToHex(color: string | undefined): "fbbab6" | "ffdcb0" | "fff7a0" | "ceefc5" | "d1ddfb" | "d9cbf8" | "eaeaea" | "fe837c" | "ffbd6a" | "ffe662" | "a8f393" | "98b5ff" | "b394f8" | "b1b1b1" | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* 将rgb(rrr,ggg,bbb)格式的颜色转为RRGGBB格式
|
|
13
13
|
* #RRGGBB 转为 RRGGBB
|
|
14
14
|
*/
|
|
15
15
|
export declare function colorToHex(color: any): string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* 判断是否是合法的 Hex 格式颜色值
|
|
18
|
-
* @param color
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
export declare function isValidHexColor(color: string): boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DocBlock, DocObject } from '../../../../@ones-editor/core';
|
|
2
2
|
import { CalcCell } from './table';
|
|
3
|
-
import { CalcCol } from './layout';
|
|
4
3
|
import { BlockObject, CodeObject, ExportState, GetDocByBlockFunc, GetTextsByBoxFunc, MD5Func } from './types';
|
|
5
4
|
/**
|
|
6
5
|
* 生成docx/html blocks的接口
|
|
@@ -21,7 +20,6 @@ export interface BlocksGenerator {
|
|
|
21
20
|
addTableMatrix(colsWidth: number[], matrix: CalcCell[][], data: DocObject): Promise<void>;
|
|
22
21
|
addVirtualBlock(blockId: string, data: DocObject, maxWidth: number): Promise<void>;
|
|
23
22
|
addEmptyParagraph(): void;
|
|
24
|
-
addLayoutMatrix(colsWidth: number[], matrix: CalcCol[], data: DocObject): Promise<void>;
|
|
25
23
|
}
|
|
26
24
|
export declare function convertBlocksOfDoc(parent: string, // 父节点,暂时只有list block需要这个
|
|
27
25
|
blocks: DocBlock[], data: DocObject, // 协作笔记里的block数组
|