@ones-editor/editor 0.0.7-beta.4 → 0.0.7-beta.40

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.
Files changed (45) hide show
  1. package/@ones-editor/code-block/src/code-block/languages.d.ts +8 -8
  2. package/@ones-editor/comments/src/comments/comments.d.ts +2 -0
  3. package/@ones-editor/comments/src/comments-list/comments-list.d.ts +2 -0
  4. package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
  5. package/@ones-editor/comments/src/comments-list/group-list.d.ts +5 -0
  6. package/@ones-editor/comments/src/comments-list/handler.d.ts +1 -1
  7. package/@ones-editor/comments/src/comments-list/list-base.d.ts +1 -0
  8. package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +1 -0
  9. package/@ones-editor/core/package.json +2 -1
  10. package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
  11. package/@ones-editor/core/src/core/block-renderers/standard-block-render.d.ts +1 -0
  12. package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +2 -1
  13. package/@ones-editor/core/src/core/composition/editor-input.d.ts +5 -0
  14. package/@ones-editor/core/src/core/composition/index.d.ts +1 -0
  15. package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -3
  16. package/@ones-editor/core/src/core/doc/doc.d.ts +2 -1
  17. package/@ones-editor/core/src/core/doc/index.d.ts +1 -0
  18. package/@ones-editor/core/src/core/editor/actions/replace-container.d.ts +2 -2
  19. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +1 -0
  20. package/@ones-editor/core/src/core/selection/range-from-point.d.ts +1 -1
  21. package/@ones-editor/core/src/core/types.d.ts +6 -0
  22. package/@ones-editor/core/src/i18n/i18n.d.ts +3 -2
  23. package/@ones-editor/core/src/utils/abbreviation.d.ts +1 -1
  24. package/@ones-editor/core/src/utils/dom.d.ts +4 -0
  25. package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
  26. package/@ones-editor/graph-embed/assets/index.d.ts +2 -0
  27. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +1 -1
  28. package/@ones-editor/graph-embed/types/index.d.ts +2 -2
  29. package/@ones-editor/image-embed/src/utils.d.ts +1 -0
  30. package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +1 -0
  31. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +16 -0
  32. package/@ones-editor/paste-special/src/paste-special-button.d.ts +1 -0
  33. package/@ones-editor/table-block/src/table-block/paste/paste-table-in-table.d.ts +2 -2
  34. package/@ones-editor/to-docx/src/doc2other/image.d.ts +1 -0
  35. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  36. package/@ones-editor/ui/src/index.d.ts +3 -1
  37. package/@ones-editor/ui/src/tooltips/index.d.ts +2 -0
  38. package/@ones-editor/ui-base/src/icons/index.d.ts +15 -5
  39. package/@ones-editor/ui-base/src/index.d.ts +2 -1
  40. package/@ones-editor/ui-base/src/list/filterable-list.d.ts +1 -0
  41. package/@ones-editor/versions/src/history-render/index.d.ts +1 -0
  42. package/dist/index.d.ts +2 -1
  43. package/dist/index.js +73528 -650
  44. package/dist/types.d.ts +3 -1
  45. package/package.json +4 -1
@@ -68,10 +68,6 @@ import 'prismjs/components/prism-visual-basic';
68
68
  import 'prismjs/components/prism-wasm';
69
69
  import 'prismjs/components/prism-yaml';
70
70
  declare const SUPPORTED_LANGUAGES: {
71
- plain: {
72
- name: string;
73
- aliases: string[];
74
- };
75
71
  abap: {
76
72
  name: string;
77
73
  aliases: string[];
@@ -172,6 +168,10 @@ declare const SUPPORTED_LANGUAGES: {
172
168
  name: string;
173
169
  aliases: string[];
174
170
  };
171
+ markup: {
172
+ name: string;
173
+ aliases: string[];
174
+ };
175
175
  java: {
176
176
  name: string;
177
177
  aliases: string[];
@@ -220,10 +220,6 @@ declare const SUPPORTED_LANGUAGES: {
220
220
  name: string;
221
221
  aliases: string[];
222
222
  };
223
- markup: {
224
- name: string;
225
- aliases: string[];
226
- };
227
223
  matlab: {
228
224
  name: string;
229
225
  aliases: string[];
@@ -256,6 +252,10 @@ declare const SUPPORTED_LANGUAGES: {
256
252
  name: string;
257
253
  aliases: string[];
258
254
  };
255
+ plain: {
256
+ name: string;
257
+ aliases: string[];
258
+ };
259
259
  powershell: {
260
260
  name: string;
261
261
  aliases: string[];
@@ -12,6 +12,8 @@ export default class OnesEditorComments {
12
12
  destroy(): void;
13
13
  private showComment;
14
14
  showCommentList: (groupId?: string) => void;
15
+ setFirstEditingCommentActive(): void;
16
+ isEditing(): boolean;
15
17
  mount(containers: CommentRoot): void;
16
18
  private handleCommentListClose;
17
19
  private handleOnSelectComment;
@@ -18,6 +18,8 @@ export default class CommentsList extends TypedEmitter<CommentsListEvents> imple
18
18
  onDeleteComment(commentId: string, local: boolean): void;
19
19
  onUpdateComment(commentId: string, local: boolean): void;
20
20
  createList(): CommentGroupList;
21
+ isEditing(): boolean;
22
+ setFirstEditingCommentActive(): void;
21
23
  handleSelectionOnComment: () => void;
22
24
  updateCommentCount: () => void;
23
25
  handleActiveItemChanged: (index: number, direction?: 'prev' | 'next') => void;
@@ -35,6 +35,7 @@ export declare class CommentGroupItem extends TypedEmitter<CommentGroupItemEvent
35
35
  deleteMainComment(commentId: OnesEditorComment['id']): void;
36
36
  handleReadonlyChanged: (editor: OnesEditor) => void;
37
37
  edit(): void;
38
+ getCommentEditor: () => import("../comment-editor").CommentEditor;
38
39
  destroy(): void;
39
40
  private handleResize;
40
41
  }
@@ -21,6 +21,10 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
21
21
  insertItem(data: CommentWithChildren, options?: {
22
22
  active: boolean;
23
23
  }): CommentGroupItem | null;
24
+ private findFirstEditingComment;
25
+ isEditing(): boolean;
26
+ closeEditing: (groupId: string) => void;
27
+ setFirstEditingCommentActive: () => void;
24
28
  setActiveItem(index: number, direction?: 'prev' | 'next'): void;
25
29
  get activeIndex(): number;
26
30
  get activeItem(): CommentGroupItem | null;
@@ -29,6 +33,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
29
33
  handleDeleteComment(commentId: string): void;
30
34
  handleUpdateComment(comment: OnesEditorComment): void;
31
35
  handleContainerClick: (event: MouseEvent) => void;
36
+ handleDocumentClick: (event: MouseEvent) => void;
32
37
  handleSelectionChanged: () => void;
33
38
  handleEditorResize: () => void;
34
39
  handleDocChanged: () => void;
@@ -14,7 +14,7 @@ export declare class CommentGroupItemHandlers {
14
14
  private handleCommentItemReply;
15
15
  private handleCommentItemMore;
16
16
  private handleCommentItemOk;
17
- private handleCommentItemCancel;
17
+ handleCommentItemCancel: (groupItem: CommentGroupItem, commentId: string | null) => void;
18
18
  handleCommentItemEdit: (commentItem: CommentItem) => void;
19
19
  handleCommentItemDelete: (commentItem: CommentItem) => void;
20
20
  execute: (element: HTMLElement, groupItem: CommentGroupItem, commentId: string | null, itemIndex: number) => void;
@@ -15,6 +15,7 @@ export default abstract class ListBase<TData, TItem extends ItemBase, ListOption
15
15
  deleteItem(commentId: string): boolean;
16
16
  findItemIndex(commentId: string): number;
17
17
  findItem(commentId: string): TItem | null;
18
+ findItemAsGroupId(commentId: string): TItem | null;
18
19
  destroy(): void;
19
20
  protected abstract createItem(data: TData, reason: 'init' | 'insert'): TItem;
20
21
  protected abstract findInsertPos(data: TData): number;
@@ -23,6 +23,7 @@ export declare class MobileCommentsList extends TypedEmitter<MobileCommentsListE
23
23
  private hidePullInfo;
24
24
  private handleReachBottom;
25
25
  private handleReachTop;
26
+ isEditing(): boolean;
26
27
  show: (groupId?: string) => void;
27
28
  hide: () => void;
28
29
  destroy(): void;
@@ -11,7 +11,8 @@
11
11
  "@types/lodash.intersection": "^4.4.0",
12
12
  "@types/lodash.isequal": "^4.5.5",
13
13
  "@types/lodash.merge": "^4.6.7",
14
- "@types/string-template": "^1.0.0"
14
+ "@types/string-template": "^1.0.0",
15
+ "@types/lodash-es": "4.17.7"
15
16
  },
16
17
  "types": "src/index.d.ts"
17
18
  }
@@ -5,6 +5,7 @@ export declare class EditorBlockRenderers implements OnesEditorBlockRenderers {
5
5
  private renders;
6
6
  constructor(editor: OnesEditor);
7
7
  registerRender(render: OnesEditorBlockRenderer): void;
8
+ renderBox(path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
8
9
  renderText(path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
9
10
  renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
10
11
  updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
@@ -7,4 +7,5 @@ export declare class StandardBlockRenderer implements OnesEditorBlockRenderer {
7
7
  renderText(editor: OnesEditor, path: BlockPath, attributes: AttributeMap): OnesEditorBlockRenderResult;
8
8
  renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
9
9
  updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
10
+ generateCSSCustomProperties(attributes: AttributeMap): OnesEditorBlockRenderResult;
10
11
  }
@@ -1,3 +1,4 @@
1
+ import AttributeMap from 'quill-delta/dist/AttributeMap';
1
2
  import { DocBlock, DocBox } from '../../doc';
2
3
  import { BlockBackgroundElement, BlockContentElement, BlockElement, BlockPath, BlockToolsElement, BoxContentElement, BoxElement, ContainerElement, InsertionContentElement, InsertionElement, OnesEditor } from '../../types';
3
4
  export declare function isBlock(node: Node): node is BlockElement;
@@ -23,7 +24,7 @@ export declare function getBoxId(box: BoxElement): string;
23
24
  export declare function getParentBox(node: Node): BoxElement | null;
24
25
  export declare function createBoxContentElement(boxElement: BoxElement): BoxContentElement;
25
26
  export declare function getBoxContent(box: BoxElement): BoxContentElement;
26
- export declare function createInsertionElement(type: string, id: string): InsertionElement;
27
+ export declare function createInsertionElement(type: string, id: string, attributes?: AttributeMap): InsertionElement;
27
28
  export declare function findInsertionById(editor: OnesEditor, id: string): InsertionElement | null;
28
29
  export declare function createInsertionContentElement(insertionElement: InsertionElement): InsertionContentElement;
29
30
  export declare function getInsertionContent(insertion: InsertionElement): InsertionContentElement;
@@ -1,3 +1,4 @@
1
+ /// <reference types="lodash" />
1
2
  import { OnesEditorInput, OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
2
3
  import { DocObject } from '../doc';
3
4
  export interface EditorInputCallbacks {
@@ -19,12 +20,15 @@ export interface EditorInputCallbacks {
19
20
  defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
20
21
  destroy: () => void;
21
22
  pasteDoc: (doc: DocObject) => Promise<void>;
23
+ forEach: (callback: (handler: OnesEditorInputHandler) => void) => void;
22
24
  }
23
25
  export declare class EditorInput implements OnesEditorInput {
24
26
  editor: OnesEditor;
25
27
  composing: boolean;
28
+ composeJustEnd: boolean;
26
29
  callbacks: EditorInputCallbacks;
27
30
  inputElement: HTMLInputElement;
31
+ clearComposeJustEnd: import("lodash").DebouncedFunc<() => void>;
28
32
  constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
29
33
  destroy(): void;
30
34
  getInput(): HTMLInputElement;
@@ -47,4 +51,5 @@ export declare class EditorInput implements OnesEditorInput {
47
51
  removeHandler(handler: OnesEditorInputHandler): void;
48
52
  defaultInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): void;
49
53
  defaultHandleKeydown(editor: OnesEditor, event: KeyboardEvent): boolean;
54
+ forEach(callback: (handler: OnesEditorInputHandler) => void): void;
50
55
  }
@@ -1 +1,2 @@
1
1
  export { editorCopyBlock, addMetaToDoc, injectDocToHtmlFragment } from './clipboard/copy';
2
+ export { copyResourcesFromDoc } from './clipboard/resources/copy-resources';
@@ -1,15 +1,14 @@
1
+ import ResizeObserver from 'resize-observer-polyfill';
1
2
  import { OnesEditor, ContainerElement, BlockElement } from '../types';
2
3
  export declare class RootContainer {
3
4
  private editor;
4
5
  rootContainer: ContainerElement;
5
6
  resizeObserver: ResizeObserver;
6
- private isMouseDown;
7
- private bindEvent;
8
7
  constructor(editor: OnesEditor, rootContainer: ContainerElement);
9
8
  private bindEvents;
10
9
  private unbindEvents;
11
10
  destroy(): void;
12
- handleContextMenu: (event: Event) => void;
11
+ handleContextMenu: (event: MouseEvent) => void;
13
12
  handleResize: () => void;
14
13
  handleClick: (event: MouseEvent) => void;
15
14
  handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
@@ -46,7 +46,8 @@ export interface DocBox {
46
46
  export interface DocInsertion {
47
47
  id: string;
48
48
  type: string;
49
- [index: string]: string | boolean | number;
49
+ [index: string]: string | boolean | number | AttributeMap | undefined;
50
+ attributes?: AttributeMap;
50
51
  }
51
52
  export interface DocComment {
52
53
  id: string;
@@ -6,3 +6,4 @@ export * from './container';
6
6
  export * from './block';
7
7
  export * from './to-plain-text';
8
8
  export * from './range';
9
+ export * from './box';
@@ -1,3 +1,3 @@
1
1
  import { DocObject } from '../../doc';
2
- import { ContainerElement, OnesEditor } from '../../types';
3
- export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject): void;
2
+ import { CloneBlockResultInfo, ContainerElement, OnesEditor } from '../../types';
3
+ export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject, cloneDocResult: CloneBlockResultInfo): void;
@@ -28,4 +28,5 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
28
28
  pasteDoc(doc: DocObject): Promise<void>;
29
29
  private pasteDocs;
30
30
  destroy(): void;
31
+ forEach(cb: (handler: OnesEditorInputHandler) => void): void;
31
32
  }
@@ -1,4 +1,4 @@
1
1
  import { SelectionRange, OnesEditor } from '../types';
2
2
  import EditorSimpleSelectionRange from './range/simple-range';
3
- export declare function getBlockRangeFromPoint(editor: OnesEditor, x: number, y: number): SelectionRange | null;
3
+ export declare function getBlockRangeFromPoint(editor: OnesEditor, pointX: number, pointY: number): SelectionRange | null;
4
4
  export declare function getBlockNearestRangeFromPoint(editor: OnesEditor, x: number, y: number): EditorSimpleSelectionRange | null;
@@ -1,4 +1,5 @@
1
1
  import { TypedEmitter } from 'tiny-typed-emitter';
2
+ import { DebouncedFunc } from 'lodash';
2
3
  import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
3
4
  export type ContainerElement = HTMLDivElement & {
4
5
  __neverUse: 'ContainerElement';
@@ -334,11 +335,13 @@ export interface OnesEditorBlockRenderResult {
334
335
  attributes?: Record<string, string>;
335
336
  }
336
337
  export interface OnesEditorBlockRenderer {
338
+ renderBox?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
337
339
  renderText?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
338
340
  renderBlock?: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
339
341
  updateBlock?: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
340
342
  }
341
343
  export interface OnesEditorBlockRenderers {
344
+ renderBox: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
342
345
  renderText: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
343
346
  renderBlock: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
344
347
  updateBlock: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
@@ -565,6 +568,7 @@ export type PasteOptions = {
565
568
  };
566
569
  export interface OnesEditorInput {
567
570
  readonly inputElement: HTMLInputElement;
571
+ composeJustEnd: boolean;
568
572
  destroy: () => void;
569
573
  focus: () => void;
570
574
  handleDocumentSelectionChange: () => void;
@@ -577,8 +581,10 @@ export interface OnesEditorInput {
577
581
  handlePasteText: (text: string, options?: PasteOptions) => void;
578
582
  addHandler: (handler: OnesEditorInputHandler) => void;
579
583
  removeHandler: (handler: OnesEditorInputHandler) => void;
584
+ forEach: (cb: (handler: OnesEditorInputHandler) => void) => void;
580
585
  defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
581
586
  defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
587
+ clearComposeJustEnd: DebouncedFunc<() => void>;
582
588
  }
583
589
  export interface OnesEditorSelectionHandler {
584
590
  isSelecting: () => boolean;
@@ -1,3 +1,4 @@
1
+ export type LANGS = keyof typeof langs;
1
2
  declare const langs: {
2
3
  'en-US': {
3
4
  name: string;
@@ -57,8 +58,8 @@ declare const langs: {
57
58
  };
58
59
  };
59
60
  };
60
- export declare function setLang(lang?: string | null | undefined): void;
61
+ export declare function setLang(lang?: LANGS | null | undefined): void;
61
62
  export declare function mergeLang(l: any): void;
62
63
  export declare function t(key: string, args?: Record<string, string>): string;
63
- export type LANGS = keyof typeof langs;
64
+ export declare function getCurrentLang(): "en-US" | "zh-CN" | "ja-JP";
64
65
  export {};
@@ -12,7 +12,7 @@ export declare function hashCode(str: string): number;
12
12
  */
13
13
  export declare function abbreviation(name: string, maxLength?: number): string;
14
14
  declare enum EColor {
15
- blue = "#338FE5",
15
+ blue = "#0064FF",
16
16
  cyan = "#34AFDE",
17
17
  teal = "#2CB2AE",
18
18
  green = "#24B47E",
@@ -11,6 +11,10 @@ export declare function createExpandedRange(startNode: Node, startOffset: number
11
11
  export declare function getFirstClientRect(elem: Element): DOMRect;
12
12
  export declare function getLastClientRect(elem: Element): DOMRect;
13
13
  export declare function getDistanceSquare(rect: DOMRect, x: number, y: number): number;
14
+ export declare function getOffsetFromPoint(x: number, y: number): {
15
+ textNode: any;
16
+ offset: number;
17
+ };
14
18
  export declare function textNodeOffsetFromPoint(node: Text, x: number, y: number): number;
15
19
  export declare function compareElement(elem1: Element, elem2: Element): number;
16
20
  export declare function getHorizontalPadding(elem: Element): number;
@@ -12,5 +12,6 @@ export default class DropIndicator {
12
12
  show(block: BlockElement, insertPos: DropInsertPos): void;
13
13
  hide(): void;
14
14
  private getIndicatorRect;
15
+ getViewRect(block: BlockElement): DOMRect;
15
16
  }
16
17
  export {};
@@ -0,0 +1,2 @@
1
+ import GraphIcon from './graph-icon.svg?raw';
2
+ export { GraphIcon, };
@@ -19,7 +19,7 @@ export default abstract class GraphBase {
19
19
  createEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
20
20
  updateEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
21
21
  protected updateImage(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, err: Error | null): Promise<void>;
22
- protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError'): void;
22
+ protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError', error?: Error): void;
23
23
  protected emptyContent(): void;
24
24
  protected updateSpecialClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
25
25
  editGraph(content: BlockContentElement): void;
@@ -5,12 +5,12 @@ export type MermaidEmbedOptions = {
5
5
  };
6
6
  export type FlowCharEmbedOptions = {
7
7
  cdn?: {
8
- flowchart: string[];
8
+ flowchart?: string[];
9
9
  };
10
10
  };
11
11
  export type PlantumlEmbedOptions = {
12
12
  cdn?: {
13
- plantuml: string;
13
+ plantuml?: string;
14
14
  };
15
15
  };
16
16
  export type LANG = Record<string, string | Record<string, string>>;
@@ -8,3 +8,4 @@ export declare function getImageSizeFromFile(file: File): Promise<{
8
8
  width: number;
9
9
  height: number;
10
10
  }>;
11
+ export declare function isValidSize(size: number | undefined | 'auto'): size is number;
@@ -10,6 +10,7 @@ declare class EnforceWithDocumentTitleHandler implements OnesEditorInputHandler
10
10
  handleRemoteChanged(editor: OnesEditor): void;
11
11
  handleUpdateCompositionText(editor: OnesEditor): void;
12
12
  handleSelectionChange: (editor: OnesEditor) => void;
13
+ private reload;
13
14
  private applyPlaceholder;
14
15
  private isDocumentTitleBlock;
15
16
  }
@@ -1,3 +1,19 @@
1
+ /// <reference types="lodash" />
2
+ import { AbstractCommandBar, Popup } from '../../../../@ones-editor/ui-base';
1
3
  import { OnesEditor } from '../../../../@ones-editor/core';
2
4
  export type OnEditChange = (tex: string, end: boolean) => void;
5
+ export default class MathjaxEditor {
6
+ editMathjaxPopup: Popup | null;
7
+ onChange: OnEditChange | null;
8
+ tex: string;
9
+ private observer;
10
+ editMathjax(elem: HTMLElement, tex: string, onChange: OnEditChange): void;
11
+ handleClose: (commandBar: AbstractCommandBar) => void;
12
+ handleKeyup: (event: KeyboardEvent) => void;
13
+ handleChange: import("lodash").DebouncedFunc<(text: string) => void>;
14
+ createPopupContent(tex: string): HTMLTextAreaElement;
15
+ textareaWatcher(textarea: HTMLTextAreaElement): void;
16
+ getTextarea(): HTMLTextAreaElement;
17
+ destroy(): void;
18
+ }
3
19
  export declare function editMathjax(editor: OnesEditor, elem: HTMLElement, tex: string, onChange: OnEditChange): void;
@@ -11,6 +11,7 @@ export default class PasteSpecialButton {
11
11
  private checkedId;
12
12
  constructor(editor: OnesEditor, onPasteSpecial: OnPasteSpecial);
13
13
  show(docs: OnesEditorDocs): void;
14
+ private cleaningDoc;
14
15
  handlePasteSpecial: (bar: AbstractCommandBar, item: CommandItem) => void;
15
16
  handleClose: () => void;
16
17
  handleSelectionChange: () => void;
@@ -1,2 +1,2 @@
1
- import { BlockElement, DocObject, OnesEditor } from '../../../../../@ones-editor/core';
2
- export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement): void;
1
+ import { BlockElement, DocObject, OnesEditor, CloneBlockResultInfo } from '../../../../../@ones-editor/core';
2
+ export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement, cloneDocResult: CloneBlockResultInfo): void;
@@ -14,3 +14,4 @@ export declare function reCalculateImageDims(dims: (ImageDimWithBuffer | undefin
14
14
  height: number;
15
15
  buffer: ArrayBuffer;
16
16
  }[];
17
+ export declare function calcImagesSize(dims: (ImageDimWithBuffer | undefined)[], maxWidth: number, data?: unknown): void;