@ones-editor/editor 2.2.19-beta.2 → 2.2.19-beta.3

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 (47) hide show
  1. package/@ones-editor/comments/src/types.d.ts +0 -5
  2. package/@ones-editor/core/src/core/types.d.ts +3 -2
  3. package/@ones-editor/core/src/utils/auto-scroll.d.ts +2 -0
  4. package/@ones-editor/core/src/utils/dom.d.ts +0 -1
  5. package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +1 -6
  6. package/@ones-editor/exclusive-block/src/index.d.ts +0 -2
  7. package/@ones-editor/graph-embed/assets/index.d.ts +2 -0
  8. package/@ones-editor/graph-embed/src/config/index.d.ts +1 -9
  9. package/@ones-editor/graph-embed/src/flowchart/flowchart-embed.d.ts +1 -1
  10. package/@ones-editor/graph-embed/src/flowchart/flowchart-helper.d.ts +1 -2
  11. package/@ones-editor/graph-embed/src/flowchart/flowchart.d.ts +3 -11
  12. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +23 -29
  13. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +4 -3
  14. package/@ones-editor/graph-embed/src/index.d.ts +2 -3
  15. package/@ones-editor/graph-embed/src/lang/en-us.d.ts +6 -11
  16. package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +6 -11
  17. package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +6 -11
  18. package/@ones-editor/graph-embed/src/mermaid/mermaid-embed.d.ts +1 -1
  19. package/@ones-editor/graph-embed/src/mermaid/mermaid-helper.d.ts +0 -1
  20. package/@ones-editor/graph-embed/src/mermaid/mermaid.d.ts +4 -12
  21. package/@ones-editor/graph-embed/src/plantuml/plantuml-embed.d.ts +1 -1
  22. package/@ones-editor/graph-embed/src/plantuml/plantuml-helper.d.ts +1 -2
  23. package/@ones-editor/graph-embed/src/plantuml/plantuml.d.ts +3 -11
  24. package/@ones-editor/graph-embed/types/index.d.ts +16 -0
  25. package/@ones-editor/image-embed/src/types.d.ts +1 -0
  26. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  27. package/@ones-editor/ui/src/providers/insert-menu.d.ts +2 -2
  28. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +0 -9
  29. package/@ones-editor/ui/src/providers/utils/index.d.ts +0 -2
  30. package/@ones-editor/ui/src/quick-menu/index.d.ts +1 -2
  31. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +3 -3
  32. package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -2
  33. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +0 -3
  34. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +0 -2
  35. package/dist/index.js +4242 -4982
  36. package/dist/types.d.ts +0 -1
  37. package/package.json +2 -1
  38. package/@ones-editor/graph-embed/src/command.d.ts +0 -9
  39. package/@ones-editor/graph-embed/src/helper/graph-dom/code-editor.d.ts +0 -4
  40. package/@ones-editor/graph-embed/src/helper/graph-dom/draw-dom.d.ts +0 -16
  41. package/@ones-editor/graph-embed/src/helper/graph-dom/layout-dom.d.ts +0 -25
  42. package/@ones-editor/graph-embed/src/helper/graph-dom/view-select.d.ts +0 -22
  43. package/@ones-editor/graph-embed/src/helper/graph-exclusive-handler.d.ts +0 -13
  44. package/@ones-editor/graph-embed/src/helper/graph-quick-commands.d.ts +0 -3
  45. package/@ones-editor/graph-embed/src/helper/utils.d.ts +0 -4
  46. package/@ones-editor/graph-embed/src/types.d.ts +0 -41
  47. package/dist/custom/image-preview-handler.d.ts +0 -11
@@ -1,7 +1,4 @@
1
1
  import { DocObject, LocalDoc, OnesEditor, OnesEditorComment } from '../../../@ones-editor/core';
2
- type EditorEvents = {
3
- onPreviewImage?: (editor: OnesEditor, img: HTMLImageElement) => void;
4
- };
5
2
  export type CommentData = {
6
3
  [p in string]: unknown;
7
4
  };
@@ -21,7 +18,6 @@ export interface OnesEditorCommentOptions {
21
18
  onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
22
19
  onCommentCountChange?: (count: number) => void;
23
20
  onCommentEditorClick?: (editor: OnesEditor, event: MouseEvent) => void;
24
- events?: EditorEvents;
25
21
  componentsOptions?: {
26
22
  [index: string]: unknown;
27
23
  };
@@ -63,4 +59,3 @@ export interface MiniCommentGroup {
63
59
  commentIds: CommentIds;
64
60
  }
65
61
  export type MiniCommentGroups = MiniCommentGroup[];
66
- export {};
@@ -93,6 +93,7 @@ export interface EmbedOptions {
93
93
  }
94
94
  export interface Embed {
95
95
  embedType: string;
96
+ adjustableMinHeight?: number;
96
97
  createEmbedContent: (editor: OnesEditor, content: BlockContentElement, block: DocEmbedBlock, path: BlockPath, container: ContainerElement, blockElement: BlockElement) => void;
97
98
  convertTo?: (editor: OnesEditor, blockData: DocEmbedBlock, doc: DocObject, type: 'text' | 'html' | 'markdown') => string;
98
99
  getBlockProperties?: (editor: OnesEditor, block: BlockElement) => BlockProperties;
@@ -728,7 +729,7 @@ export interface OnesEditorCommandProvider {
728
729
  id: string;
729
730
  groupIndex?: number;
730
731
  getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
731
- getInsertCommands?: (editor: OnesEditor, containerId: string, params?: CommandParams) => CommandItem[];
732
+ getInsertCommands?: (editor: OnesEditor, containerId: string) => CommandItem[];
732
733
  executeInsertCommand?: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
733
734
  executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
734
735
  executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
@@ -750,7 +751,7 @@ export interface OnesEditorCommandProviders {
750
751
  registerCommandProvider: (provider: OnesEditorCommandProvider) => void;
751
752
  getCommandProviders: () => OnesEditorCommandProvider[];
752
753
  getCommandProvider: (id: string) => OnesEditorCommandProvider;
753
- getCommands: (range: SelectionRange, params?: CommandParams) => CommandItemWithSource[];
754
+ getCommands: (range: SelectionRange) => CommandItemWithSource[];
754
755
  executeCommand: (range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => {
755
756
  [index: string]: CommandResult;
756
757
  };
@@ -26,6 +26,8 @@ export declare class AutoScroll {
26
26
  private options;
27
27
  private scrollDomInfo;
28
28
  private scrolling;
29
+ private get edge();
30
+ private get step();
29
31
  constructor(options: AutoScrollOptions);
30
32
  private getScrollDomInfo;
31
33
  private getScrollingDirection;
@@ -40,5 +40,4 @@ export declare function getElementFromPoint(x: number, y: number, options?: {
40
40
  export declare function createMouseEventFromTouchEvent(event: TouchEvent, type: 'mousedown' | 'mousemove' | 'mouseup' | 'click'): MouseEvent;
41
41
  export declare function ensureIsMobileEvent(events: MouseEvent | TouchEvent): events is TouchEvent;
42
42
  export declare function bindDbClick(editor: OnesEditor, elem: HTMLElement, handler: (event: MouseEvent) => void): () => void;
43
- export declare function bindPreventSelect(elem: HTMLElement, callback?: (event: Event) => void): () => void;
44
43
  export {};
@@ -1,9 +1,5 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
2
2
  import { BlockResizer } from '../../../../@ones-editor/block-resizer';
3
- interface EmbedBlockResizerOptions {
4
- maxHeight?: number;
5
- minHeight?: number;
6
- }
7
3
  export declare class EmbedBlockResizer {
8
4
  private editor;
9
5
  private resizing;
@@ -17,6 +13,5 @@ export declare class EmbedBlockResizer {
17
13
  tryEnableResizer(block: BlockElement): void;
18
14
  disableResizer(): void;
19
15
  static get(editor: OnesEditor): EmbedBlockResizer;
20
- static register(editor: OnesEditor, block: BlockElement, options?: EmbedBlockResizerOptions): EmbedBlockResizer;
16
+ static register(editor: OnesEditor, block: BlockElement): EmbedBlockResizer;
21
17
  }
22
- export {};
@@ -2,8 +2,6 @@ import { OnesEditorExclusiveBlock } from './exclusive-block';
2
2
  import BlockExclusiveHook from './exclusive-block-hook';
3
3
  import './exclusive-block-styles.scss';
4
4
  import './locale';
5
- import { ExclusiveBlockMessage } from './types';
6
- export type { ExclusiveBlockMessage };
7
5
  export { isExclusiveBlock } from './exclusive-dom';
8
6
  export { exclusiveBlock, unexclusiveBlock } from './exclusive-block';
9
7
  export { BlockExclusiveHook, OnesEditorExclusiveBlock };
@@ -0,0 +1,2 @@
1
+ import GraphIcon from './graph-icon.svg?raw';
2
+ export { GraphIcon, };
@@ -1,12 +1,4 @@
1
- import { GraphType } from '../types';
2
1
  export declare const MERMAID_SCRIPTS = "https://cdn.jsdelivr.net/npm/mermaid@9.0.1/dist/mermaid.min.js";
3
2
  export declare const FLOWCHART_SCRIPTS: string[];
4
3
  export declare const PLANTUML_PRE = "https://www.plantuml.com/plantuml/svg";
5
- export declare const GRAPH_MIN_HEIGHT = 150;
6
- export declare const GRAPH_MAX_HEIGHT = 1000;
7
- export declare const GRAPH_DEFAULT_HEIGHT = 300;
8
- export declare const DEFAULT_FLEX = 0.5;
9
- export declare const MIN_FLEX = 0.3;
10
- export declare const IMAGE_CLASS_NAME = "graph-embed-image";
11
- export declare const DRAG_RANGE = 10;
12
- export declare const GraphDocumentUrl: Record<GraphType, string>;
4
+ export declare const GRAPH_MIN_HEIGHT = 200;
@@ -1,4 +1,4 @@
1
- import { Embed } from '../../../../@ones-editor/core';
1
+ import type { Embed } from '../../../../@ones-editor/core';
2
2
  import '../lang';
3
3
  declare const FlowChartEmbed: Embed;
4
4
  export default FlowChartEmbed;
@@ -1,6 +1,5 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
1
+ import type { OnesEditor } from '../../../../@ones-editor/core';
2
2
  import '../../types/window.d';
3
- export declare const FLOWCHART_TYPE = "flowchart";
4
3
  export declare function flowchartCodeToSvgStr(editor: OnesEditor, flowDataCode: string): Promise<string>;
5
4
  export declare function flowchartCodeToObjectUrl(editor: OnesEditor, flowChartCode: string): Promise<string>;
6
5
  export declare function flowchartCodeToResourceId(editor: OnesEditor, flowChartCode: string): Promise<string>;
@@ -1,17 +1,9 @@
1
- import { OnesEditor, DocEmbedBlock, BlockElement } from '../../../../@ones-editor/core';
1
+ import type { OnesEditor, DocEmbedBlock } from '../../../../@ones-editor/core';
2
2
  import GraphBase from '../helper/graph-base';
3
- import { StandardGraphData, GraphType } from '../types';
4
3
  export declare class FlowChartInstance extends GraphBase {
5
- static graphType: GraphType;
6
- protected graphType: GraphType;
7
- static get(editor: OnesEditor, id: string): FlowChartInstance;
4
+ constructor(editor: OnesEditor);
5
+ static get(editor: OnesEditor, block: DocEmbedBlock): FlowChartInstance;
8
6
  protected code2ObjectUrl(code: string): Promise<string>;
9
7
  protected code2ResourceId(code: string): Promise<string>;
10
- static createEmptyEmbedData: () => {
11
- flowchartText: string;
12
- src: string;
13
- };
14
- protected createGraphEmbedData: (block: BlockElement, data: Partial<StandardGraphData>) => import("@ones-editor/core").DocEmbedData;
15
- protected getGraphData: (blockData: DocEmbedBlock) => StandardGraphData;
16
8
  destroy(): void;
17
9
  }
@@ -1,35 +1,29 @@
1
- import { OnesEditor, BlockContentElement, DocEmbedBlock, BlockElement, DocEmbedData, BlockProperties } from '../../../../@ones-editor/core';
2
- import { StandardGraphData, GraphType } from '../types';
1
+ import { BlockProperties } from '../../../../@ones-editor/core';
2
+ import type { OnesEditor, BlockContentElement, DocEmbedBlock, BlockElement, Logger } from '../../../../@ones-editor/core';
3
+ import type { GraphType, GraphEmbedBlockProperties } from './graph-block-commands';
3
4
  export default abstract class GraphBase {
5
+ private graphType;
6
+ private codeEmbedDataKey;
4
7
  protected editor: OnesEditor;
5
- protected abstract graphType: GraphType;
6
- static graphType: GraphType;
7
- static createEmptyEmbedData: () => Record<string, string>;
8
+ logger: Logger;
9
+ editing: boolean;
10
+ private graphEmbedContent;
11
+ private _status;
12
+ constructor(editor: OnesEditor, graphType: GraphType, codeEmbedDataKey: string);
8
13
  protected abstract code2ObjectUrl(code: string): Promise<string>;
9
14
  protected abstract code2ResourceId(code: string): Promise<string>;
10
- protected abstract createGraphEmbedData(block: BlockElement, data: Partial<StandardGraphData>): DocEmbedData;
11
- protected abstract getGraphData(blockData: DocEmbedBlock): StandardGraphData;
12
- private layout?;
13
- private viewSelect?;
14
- private drawHandler?;
15
- private get block();
16
- constructor(editor: OnesEditor);
17
- private handleExclusiveBlock;
18
- private handleReadonlyChanged;
19
- destroy(): void;
20
- private updateLayoutData;
21
- private handleInputChange;
22
- private handleFlexChange;
23
- private getRealView;
15
+ protected i18nt(key: string, arg?: Record<string, string>): string;
16
+ protected getContent(embed: HTMLDivElement): BlockContentElement;
17
+ protected getEmbed(content: BlockContentElement): HTMLDivElement;
18
+ protected uploadResource(svg: string): Promise<string | null>;
19
+ createEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
20
+ updateEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
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', error?: Error): void;
23
+ protected emptyContent(): void;
24
+ protected updateSpecialClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
25
+ editGraph(content: BlockContentElement): void;
26
+ getBlockProperties(block: BlockElement, properties?: GraphEmbedBlockProperties): BlockProperties;
24
27
  private hasChanged;
25
- private handleBlockFocus;
26
- private handleClick;
27
- private handleSelectionChanged;
28
- private handleInputFocusChange;
29
- createEmbedContent(blockContent: BlockContentElement, blockData: DocEmbedBlock): void;
30
- private updateHeight;
31
- private updateLayout;
32
- private updateDraw;
33
- updateEmbedContent(content: BlockContentElement, block: DocEmbedBlock): Promise<void>;
34
- getBlockProperties(block: BlockElement): BlockProperties;
28
+ private removeStatusContent;
35
29
  }
@@ -1,8 +1,9 @@
1
1
  import { BlockElement } from '../../../../@ones-editor/core';
2
2
  import type { OnesEditor } from '../../../../@ones-editor/core';
3
- import { CommandId } from '../../../../@ones-editor/embed-block-helper';
4
- import { GraphType, GraphEmbedBlockProperties } from '../types';
5
- export declare function getGraphEmbedBlockProperties(editor: OnesEditor, block: BlockElement, type: GraphType, properties?: GraphEmbedBlockProperties): {
3
+ import { CommandId, type StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
4
+ export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
5
+ export type GraphEmbedBlockProperties = StandardEmbedBlockProperties;
6
+ export declare function getGraphEmbedBlockProperties(editor: OnesEditor, block: BlockElement, type: 'mermaid' | 'flowchart' | 'plantuml', properties?: GraphEmbedBlockProperties): {
6
7
  abstract: string;
7
8
  blockCommands: {
8
9
  'hovering-toolbar': import("@ones-editor/embed-block-helper").StandardEmbedBlockCommands<CommandId>;
@@ -1,7 +1,6 @@
1
1
  import MermaidEmbed from './mermaid/mermaid-embed';
2
2
  import FlowChartEmbed from './flowchart/flowchart-embed';
3
3
  import PlantumlEmbed from './plantuml/plantuml-embed';
4
- import { GraphCommandProvider } from './command';
5
4
  import './common.scss';
6
- export { MermaidEmbed, PlantumlEmbed, FlowChartEmbed, GraphCommandProvider, };
7
- export * from './types';
5
+ export { MermaidEmbed, PlantumlEmbed, FlowChartEmbed, };
6
+ export * from '../types';
@@ -1,18 +1,13 @@
1
1
  declare const _default: {
2
2
  graph: {
3
+ invalid: string;
3
4
  empty: string;
4
- readonlyEmpty: string;
5
- errorTips: string;
5
+ edit: string;
6
+ comment: string;
6
7
  help: string;
7
- plantuml: string;
8
- mermaid: string;
9
- flowchart: string;
10
- command: {
11
- name: string;
12
- bothShow: string;
13
- codeShow: string;
14
- drawShow: string;
15
- };
8
+ errorTips: string;
9
+ errorSubTips: string;
10
+ retry: string;
16
11
  };
17
12
  };
18
13
  export default _default;
@@ -1,18 +1,13 @@
1
1
  declare const _default: {
2
2
  graph: {
3
+ invalid: string;
3
4
  empty: string;
4
- readonlyEmpty: string;
5
- errorTips: string;
5
+ edit: string;
6
+ comment: string;
6
7
  help: string;
7
- plantuml: string;
8
- mermaid: string;
9
- flowchart: string;
10
- command: {
11
- name: string;
12
- bothShow: string;
13
- codeShow: string;
14
- drawShow: string;
15
- };
8
+ errorTips: string;
9
+ errorSubTips: string;
10
+ retry: string;
16
11
  };
17
12
  };
18
13
  export default _default;
@@ -1,18 +1,13 @@
1
1
  declare const _default: {
2
2
  graph: {
3
+ invalid: string;
3
4
  empty: string;
4
- readonlyEmpty: string;
5
- errorTips: string;
5
+ edit: string;
6
+ comment: string;
6
7
  help: string;
7
- plantuml: string;
8
- mermaid: string;
9
- flowchart: string;
10
- command: {
11
- name: string;
12
- bothShow: string;
13
- codeShow: string;
14
- drawShow: string;
15
- };
8
+ errorTips: string;
9
+ errorSubTips: string;
10
+ retry: string;
16
11
  };
17
12
  };
18
13
  export default _default;
@@ -1,4 +1,4 @@
1
- import { Embed } from '../../../../@ones-editor/core';
1
+ import type { Embed } from '../../../../@ones-editor/core';
2
2
  import '../lang';
3
3
  declare const MermaidEmbed: Embed;
4
4
  export default MermaidEmbed;
@@ -1,5 +1,4 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
- export declare const MERMAID_TYPE = "mermaid";
3
2
  export declare function mermaidCodeToSvg(editor: OnesEditor, code: string): Promise<string>;
4
3
  export declare function mermaidCodeToObjectUrl(editor: OnesEditor, code: string): Promise<string>;
5
4
  export declare function mermaidCodeToResourceId(editor: OnesEditor, code: string): Promise<string>;
@@ -1,17 +1,9 @@
1
- import { OnesEditor, DocEmbedBlock, BlockElement } from '../../../../@ones-editor/core';
1
+ import type { OnesEditor, DocEmbedBlock } from '../../../../@ones-editor/core';
2
2
  import GraphBase from '../helper/graph-base';
3
- import { GraphType, StandardGraphData } from '../types';
4
3
  export declare class MermaidInstance extends GraphBase {
5
- static graphType: GraphType;
6
- protected graphType: GraphType;
7
- static get(editor: OnesEditor, id: string): MermaidInstance;
8
- static destroyCustom(editor: OnesEditor, id: string): void;
4
+ constructor(editor: OnesEditor);
5
+ static get(editor: OnesEditor, block: DocEmbedBlock): MermaidInstance;
9
6
  code2ObjectUrl(code: string): Promise<string>;
10
7
  code2ResourceId(code: string): Promise<string>;
11
- static createEmptyEmbedData: () => {
12
- mermaidText: string;
13
- src: string;
14
- };
15
- protected createGraphEmbedData: (block: BlockElement, data: Partial<StandardGraphData>) => import("@ones-editor/core").DocEmbedData;
16
- protected getGraphData: (blockData: DocEmbedBlock) => StandardGraphData;
8
+ destroy(): void;
17
9
  }
@@ -1,4 +1,4 @@
1
- import { Embed } from '../../../../@ones-editor/core';
1
+ import type { Embed } from '../../../../@ones-editor/core';
2
2
  import '../lang';
3
3
  declare const PlantumlEmbed: Embed;
4
4
  export default PlantumlEmbed;
@@ -1,4 +1,3 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
2
- export declare const PLANTUML_TYPE = "plantuml";
1
+ import type { OnesEditor } from '../../../../@ones-editor/core';
3
2
  export declare function plantumlCodeToUrl(editor: OnesEditor, plantumlText: string): string;
4
3
  export declare function plantumlUrlToResourceId(editor: OnesEditor, url: string): Promise<string>;
@@ -1,17 +1,9 @@
1
- import { OnesEditor, DocEmbedBlock, BlockElement } from '../../../../@ones-editor/core';
1
+ import type { OnesEditor, DocEmbedBlock } from '../../../../@ones-editor/core';
2
2
  import GraphBase from '../helper/graph-base';
3
- import { GraphType, StandardGraphData } from '../types';
4
3
  export declare class PlantumlInstance extends GraphBase {
5
- static graphType: GraphType;
6
- protected graphType: GraphType;
7
- static get(editor: OnesEditor, id: string): PlantumlInstance;
4
+ constructor(editor: OnesEditor);
5
+ static get(editor: OnesEditor, block: DocEmbedBlock): PlantumlInstance;
8
6
  protected code2ObjectUrl(code: string): Promise<string>;
9
7
  protected code2ResourceId(code: string): Promise<string>;
10
- static createEmptyEmbedData: () => {
11
- plantumlText: string;
12
- src: string;
13
- };
14
- protected createGraphEmbedData: (block: BlockElement, data: Partial<StandardGraphData>) => import("@ones-editor/core").DocEmbedData;
15
- protected getGraphData: (blockData: DocEmbedBlock) => StandardGraphData;
16
8
  destroy(): void;
17
9
  }
@@ -0,0 +1,16 @@
1
+ export type MermaidEmbedOptions = {
2
+ cdn?: {
3
+ mermaid?: string;
4
+ };
5
+ };
6
+ export type FlowCharEmbedOptions = {
7
+ cdn?: {
8
+ flowchart?: string[];
9
+ };
10
+ };
11
+ export type PlantumlEmbedOptions = {
12
+ cdn?: {
13
+ plantuml?: string;
14
+ };
15
+ };
16
+ export type LANG = Record<string, string | Record<string, string>>;
@@ -6,6 +6,7 @@ export interface ImageOptions {
6
6
  callbacks?: {
7
7
  onError?: (editor: OnesEditor, error: Error) => void;
8
8
  };
9
+ onPreview?: (editor: OnesEditor, event: MouseEvent) => void;
9
10
  }
10
11
  export interface ImageEmbedData extends DocEmbedData {
11
12
  src: string | string[];