@ones-editor/editor 1.1.24 → 1.1.25

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.
@@ -206,7 +206,7 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
206
206
  findContainerBlocks: (containerId: string) => DocBlock[] | null;
207
207
  getBlockData: (containerId: string, blockIndex: number) => DocBlock;
208
208
  localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions) => DocBlockText;
209
- localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange) => DocBlock;
209
+ localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange, options?: UpdateBlockOptions) => DocBlock;
210
210
  localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions) => DocBlock;
211
211
  localDeleteBlock: (containerId: string, blockIndex: number, newRange: OnesEditorDocRange) => DocBlock;
212
212
  localInsertChildContainers: (containers: {
@@ -1,4 +1,4 @@
1
- import { DocBlock, DocBlockAttributes, DocEmbedData, OnesEditorDocRange } from '../../doc';
1
+ import { DocBlock, DocBlockAttributes, DocEmbedData, OnesEditorDocRange, UpdateBlockOptions } from '../../doc';
2
2
  import { BlockElement, OnesEditor, SelectionRange } from '../../types';
3
- export declare function editorUpdateBlockData(editor: OnesEditor, block: BlockElement, data: DocBlockAttributes, newRange: OnesEditorDocRange): DocBlock;
3
+ export declare function editorUpdateBlockData(editor: OnesEditor, block: BlockElement, data: DocBlockAttributes, newRange: OnesEditorDocRange, options?: UpdateBlockOptions): DocBlock;
4
4
  export declare function editorUpdateEmbedData(editor: OnesEditor, block: BlockElement, data: DocEmbedData, newRange?: SelectionRange): DocBlock;
@@ -16,7 +16,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
16
16
  getBlockData(containerId: string, blockIndex: number): DocBlock;
17
17
  verifyBlockWritable(containerId: string, blockIndex: number): void;
18
18
  localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions): DocBlockText;
19
- localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange): DocBlock;
19
+ localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange, options?: UpdateBlockOptions): DocBlock;
20
20
  localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): DocBlock;
21
21
  localDeleteBlock(containerId: string, blockIndex: number, newRange: OnesEditorDocRange): DocBlock;
22
22
  localDeleteChildContainers(containerIds: string[]): void;
@@ -1,5 +1,5 @@
1
1
  import { TypedEmitter } from 'tiny-typed-emitter';
2
- import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
2
+ import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange, UpdateBlockOptions } from './doc';
3
3
  export type ContainerElement = HTMLDivElement & {
4
4
  __neverUse: 'ContainerElement';
5
5
  };
@@ -550,7 +550,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
550
550
  insertDocAt: (container: ContainerElement, blockIndex: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => BlockElement[];
551
551
  pasteDoc: (doc: DocObject) => Promise<void>;
552
552
  deleteChildContainers: (containerIds: string[]) => void;
553
- updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
553
+ updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange, options?: UpdateBlockOptions) => DocBlock;
554
554
  updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
555
555
  updateBoxData: (boxData: DocBox, options?: InsertTextOptions) => void;
556
556
  updateCompositionText: (text: string, end: boolean) => void;
@@ -10,6 +10,7 @@ export declare class TableBlockBorderHandler {
10
10
  show(tableBlock: BlockElement): void;
11
11
  update(): void;
12
12
  closeToolbar(): void;
13
+ isInBlock: (block: BlockElement, event: MouseEvent) => boolean;
13
14
  hide(): void;
14
15
  }
15
16
  export declare function handleTableBorderBar(editor: OnesEditor, type: 'create' | 'update'): void;