@ones-editor/editor 2.3.4 → 2.4.0

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 (149) hide show
  1. package/@ones-editor/callout-block/src/callout-block/callout-block-content.d.ts +3 -2
  2. package/@ones-editor/callout-block/src/callout-block/callout-icon.d.ts +13 -0
  3. package/@ones-editor/callout-block/src/callout-block/helper.d.ts +4 -2
  4. package/@ones-editor/callout-block/src/locale/en-us.d.ts +3 -0
  5. package/@ones-editor/callout-block/src/locale/ja-jp.d.ts +3 -0
  6. package/@ones-editor/callout-block/src/locale/zh-cn.d.ts +3 -0
  7. package/@ones-editor/comments/src/types.d.ts +5 -0
  8. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +2 -2
  9. package/@ones-editor/core/src/core/composition/index.d.ts +1 -0
  10. package/@ones-editor/core/src/core/doc/doc.d.ts +0 -1
  11. package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +0 -1
  12. package/@ones-editor/core/src/core/types.d.ts +12 -3
  13. package/@ones-editor/core/src/utils/dom.d.ts +1 -0
  14. package/@ones-editor/drawio-embed/src/lang/en-us.d.ts +5 -0
  15. package/@ones-editor/drawio-embed/src/lang/ja-jp.d.ts +5 -0
  16. package/@ones-editor/drawio-embed/src/lang/zh-cn.d.ts +5 -0
  17. package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +6 -1
  18. package/@ones-editor/exclusive-block/src/index.d.ts +2 -0
  19. package/@ones-editor/file/src/file-embed/card/index.d.ts +0 -1
  20. package/@ones-editor/file/src/locale/en-us.d.ts +0 -2
  21. package/@ones-editor/file/src/locale/ja-jp.d.ts +0 -2
  22. package/@ones-editor/file/src/locale/zh-cn.d.ts +0 -2
  23. package/@ones-editor/file/src/types.d.ts +1 -4
  24. package/@ones-editor/graph-embed/src/command.d.ts +9 -0
  25. package/@ones-editor/graph-embed/src/config/index.d.ts +9 -1
  26. package/@ones-editor/graph-embed/src/flowchart/flowchart-embed.d.ts +1 -1
  27. package/@ones-editor/graph-embed/src/flowchart/flowchart-helper.d.ts +2 -1
  28. package/@ones-editor/graph-embed/src/flowchart/flowchart.d.ts +11 -3
  29. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +29 -23
  30. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +3 -4
  31. package/@ones-editor/graph-embed/src/helper/graph-dom/code-editor.d.ts +4 -0
  32. package/@ones-editor/graph-embed/src/helper/graph-dom/draw-dom.d.ts +16 -0
  33. package/@ones-editor/graph-embed/src/helper/graph-dom/layout-dom.d.ts +25 -0
  34. package/@ones-editor/graph-embed/src/helper/graph-dom/view-select.d.ts +22 -0
  35. package/@ones-editor/graph-embed/src/helper/graph-exclusive-handler.d.ts +13 -0
  36. package/@ones-editor/graph-embed/src/helper/graph-quick-commands.d.ts +3 -0
  37. package/@ones-editor/graph-embed/src/helper/utils.d.ts +4 -0
  38. package/@ones-editor/graph-embed/src/index.d.ts +3 -2
  39. package/@ones-editor/graph-embed/src/lang/en-us.d.ts +11 -6
  40. package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +11 -6
  41. package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +11 -6
  42. package/@ones-editor/graph-embed/src/mermaid/mermaid-embed.d.ts +1 -1
  43. package/@ones-editor/graph-embed/src/mermaid/mermaid-helper.d.ts +1 -0
  44. package/@ones-editor/graph-embed/src/mermaid/mermaid.d.ts +12 -4
  45. package/@ones-editor/graph-embed/src/plantuml/plantuml-embed.d.ts +1 -1
  46. package/@ones-editor/graph-embed/src/plantuml/plantuml-helper.d.ts +2 -1
  47. package/@ones-editor/graph-embed/src/plantuml/plantuml.d.ts +11 -3
  48. package/@ones-editor/graph-embed/src/types.d.ts +41 -0
  49. package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/figcaption.d.ts +1 -0
  50. package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/font-size.d.ts +1 -0
  51. package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/text-color.d.ts +1 -0
  52. package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/underline.d.ts +1 -0
  53. package/@ones-editor/image-embed/src/types.d.ts +0 -1
  54. package/@ones-editor/main-toolbar/package.json +7 -0
  55. package/@ones-editor/main-toolbar/src/index.d.ts +18 -0
  56. package/@ones-editor/main-toolbar/src/items/comment.d.ts +8 -0
  57. package/@ones-editor/main-toolbar/src/items/find.d.ts +8 -0
  58. package/@ones-editor/main-toolbar/src/items/font-style.d.ts +40 -0
  59. package/@ones-editor/main-toolbar/src/items/image.d.ts +8 -0
  60. package/@ones-editor/main-toolbar/src/items/index.d.ts +17 -0
  61. package/@ones-editor/main-toolbar/src/items/insert.d.ts +12 -0
  62. package/@ones-editor/main-toolbar/src/items/link.d.ts +11 -0
  63. package/@ones-editor/main-toolbar/src/items/list.d.ts +29 -0
  64. package/@ones-editor/main-toolbar/src/items/more-item.d.ts +20 -0
  65. package/@ones-editor/main-toolbar/src/items/paragraph.d.ts +14 -0
  66. package/@ones-editor/main-toolbar/src/items/quote.d.ts +11 -0
  67. package/@ones-editor/main-toolbar/src/items/separator.d.ts +7 -0
  68. package/@ones-editor/main-toolbar/src/items/text-align.d.ts +21 -0
  69. package/@ones-editor/main-toolbar/src/items/text-color.d.ts +49 -0
  70. package/@ones-editor/main-toolbar/src/items/undo.d.ts +18 -0
  71. package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +9 -0
  72. package/@ones-editor/main-toolbar/src/locale/index.d.ts +1 -0
  73. package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +9 -0
  74. package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +9 -0
  75. package/@ones-editor/main-toolbar/src/types.d.ts +5 -0
  76. package/@ones-editor/markdown-to-doc/src/custom/tag.d.ts +8 -0
  77. package/@ones-editor/markdown-to-doc/src/index.d.ts +1 -0
  78. package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/custom-tag.d.ts +4 -0
  79. package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/font-size.d.ts +2 -0
  80. package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/html.d.ts +2 -0
  81. package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/text-color.d.ts +2 -0
  82. package/@ones-editor/media-embed/src/core/media.d.ts +0 -1
  83. package/@ones-editor/media-embed/src/types.d.ts +1 -2
  84. package/@ones-editor/misc/src/index.d.ts +0 -1
  85. package/@ones-editor/misc/src/re-auth/index.d.ts +0 -23
  86. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +41 -31
  87. package/@ones-editor/sharedb-doc/src/doc/auto-renew-token.d.ts +16 -0
  88. package/@ones-editor/sharedb-doc/src/doc/connection-status.d.ts +19 -0
  89. package/@ones-editor/sharedb-doc/src/doc/edit-status.d.ts +13 -0
  90. package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +6 -13
  91. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +4 -4
  92. package/@ones-editor/sharedb-doc/src/types.d.ts +20 -5
  93. package/@ones-editor/toc/src/toc-embed/render-toc.d.ts +1 -1
  94. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  95. package/@ones-editor/ui/src/emoji-popup/emoji-popup.d.ts +21 -0
  96. package/@ones-editor/ui/src/emoji-popup/index.d.ts +8 -0
  97. package/@ones-editor/ui/src/index.d.ts +1 -0
  98. package/@ones-editor/ui/src/locale/en-us.d.ts +1 -0
  99. package/@ones-editor/ui/src/locale/ja-jp.d.ts +1 -0
  100. package/@ones-editor/ui/src/locale/zh-cn.d.ts +1 -0
  101. package/@ones-editor/ui/src/providers/emoji.d.ts +12 -0
  102. package/@ones-editor/ui/src/providers/insert-menu.d.ts +2 -2
  103. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +9 -0
  104. package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
  105. package/@ones-editor/ui/src/quick-menu/index.d.ts +2 -1
  106. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +3 -3
  107. package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -2
  108. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +2 -0
  109. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +3 -0
  110. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +2 -0
  111. package/@ones-editor/ui-base/src/color-button/color-button.d.ts +1 -0
  112. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +2 -1
  113. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +1 -0
  114. package/@ones-editor/ui-base/src/dialog/alert-dialog.d.ts +19 -0
  115. package/@ones-editor/ui-base/src/dialog/confirm-dialog.d.ts +20 -0
  116. package/@ones-editor/ui-base/src/dialog/dialog-button.d.ts +10 -0
  117. package/@ones-editor/ui-base/src/dialog/dialog-check.d.ts +15 -0
  118. package/@ones-editor/ui-base/src/dialog/dialog-input.d.ts +9 -0
  119. package/@ones-editor/ui-base/src/dialog/dialog-radio.d.ts +12 -0
  120. package/@ones-editor/ui-base/src/dialog/index.d.ts +15 -0
  121. package/@ones-editor/ui-base/src/dialog/modal-dialog.d.ts +21 -0
  122. package/@ones-editor/ui-base/src/dialog/popup-dialog.d.ts +31 -0
  123. package/@ones-editor/ui-base/src/dialog/standard-dialog.d.ts +25 -0
  124. package/@ones-editor/ui-base/src/dialog/standard-modal-dialog.d.ts +7 -0
  125. package/@ones-editor/ui-base/src/dialog/standard-popup-dialog.d.ts +17 -0
  126. package/@ones-editor/ui-base/src/dialog/types.d.ts +1 -0
  127. package/@ones-editor/ui-base/src/dropdown/index.d.ts +1 -0
  128. package/@ones-editor/ui-base/src/emoji-item/emoji-item.d.ts +1 -2
  129. package/@ones-editor/ui-base/src/emoji-palette/default-emoji-palette.d.ts +3 -0
  130. package/@ones-editor/ui-base/src/emoji-palette/index.d.ts +10 -13
  131. package/@ones-editor/ui-base/src/emoji-palette/types.d.ts +10 -0
  132. package/@ones-editor/ui-base/src/index.d.ts +2 -0
  133. package/@ones-editor/ui-base/src/locale/en-us.d.ts +5 -0
  134. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +5 -0
  135. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +5 -0
  136. package/@ones-editor/versions/src/types.d.ts +1 -0
  137. package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +2 -0
  138. package/dist/custom/image-preview-handler.d.ts +11 -0
  139. package/dist/error-handler/error-info-bar.d.ts +18 -0
  140. package/dist/error-handler/index.d.ts +37 -0
  141. package/dist/index.d.ts +62 -1
  142. package/dist/index.js +8074 -4417
  143. package/dist/lang/en-us.d.ts +9 -0
  144. package/dist/lang/ja-jp.d.ts +9 -0
  145. package/dist/lang/zh-cn.d.ts +9 -0
  146. package/dist/types.d.ts +32 -6
  147. package/package.json +1 -2
  148. package/@ones-editor/graph-embed/assets/index.d.ts +0 -2
  149. package/@ones-editor/graph-embed/types/index.d.ts +0 -16
@@ -1,4 +1,5 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
+ export declare const MERMAID_TYPE = "mermaid";
2
3
  export declare function mermaidCodeToSvg(editor: OnesEditor, code: string): Promise<string>;
3
4
  export declare function mermaidCodeToObjectUrl(editor: OnesEditor, code: string): Promise<string>;
4
5
  export declare function mermaidCodeToResourceId(editor: OnesEditor, code: string): Promise<string>;
@@ -1,9 +1,17 @@
1
- import type { OnesEditor, DocEmbedBlock } from '../../../../@ones-editor/core';
1
+ import { OnesEditor, DocEmbedBlock, BlockElement } from '../../../../@ones-editor/core';
2
2
  import GraphBase from '../helper/graph-base';
3
+ import { GraphType, StandardGraphData } from '../types';
3
4
  export declare class MermaidInstance extends GraphBase {
4
- constructor(editor: OnesEditor);
5
- static get(editor: OnesEditor, block: DocEmbedBlock): MermaidInstance;
5
+ static graphType: GraphType;
6
+ protected graphType: GraphType;
7
+ static get(editor: OnesEditor, id: string): MermaidInstance;
8
+ static destroyCustom(editor: OnesEditor, id: string): void;
6
9
  code2ObjectUrl(code: string): Promise<string>;
7
10
  code2ResourceId(code: string): Promise<string>;
8
- destroy(): void;
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;
9
17
  }
@@ -1,4 +1,4 @@
1
- import type { Embed } from '../../../../@ones-editor/core';
1
+ import { Embed } from '../../../../@ones-editor/core';
2
2
  import '../lang';
3
3
  declare const PlantumlEmbed: Embed;
4
4
  export default PlantumlEmbed;
@@ -1,3 +1,4 @@
1
- import type { OnesEditor } from '../../../../@ones-editor/core';
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ export declare const PLANTUML_TYPE = "plantuml";
2
3
  export declare function plantumlCodeToUrl(editor: OnesEditor, plantumlText: string): string;
3
4
  export declare function plantumlUrlToResourceId(editor: OnesEditor, url: string): Promise<string>;
@@ -1,9 +1,17 @@
1
- import type { OnesEditor, DocEmbedBlock } from '../../../../@ones-editor/core';
1
+ import { OnesEditor, DocEmbedBlock, BlockElement } from '../../../../@ones-editor/core';
2
2
  import GraphBase from '../helper/graph-base';
3
+ import { GraphType, StandardGraphData } from '../types';
3
4
  export declare class PlantumlInstance extends GraphBase {
4
- constructor(editor: OnesEditor);
5
- static get(editor: OnesEditor, block: DocEmbedBlock): PlantumlInstance;
5
+ static graphType: GraphType;
6
+ protected graphType: GraphType;
7
+ static get(editor: OnesEditor, id: string): PlantumlInstance;
6
8
  protected code2ObjectUrl(code: string): Promise<string>;
7
9
  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;
8
16
  destroy(): void;
9
17
  }
@@ -0,0 +1,41 @@
1
+ import { CommandItem, OnesEditor } from '../../../@ones-editor/core';
2
+ import { StandardEmbedBlockProperties } from '../../../@ones-editor/embed-block-helper';
3
+ export type MermaidEmbedOptions = {
4
+ cdn?: {
5
+ mermaid?: string;
6
+ helpLink?: string;
7
+ };
8
+ };
9
+ export type FlowCharEmbedOptions = {
10
+ cdn?: {
11
+ flowchart?: string[];
12
+ helpLink?: string;
13
+ };
14
+ };
15
+ export type PlantumlEmbedOptions = {
16
+ cdn?: {
17
+ plantuml?: string;
18
+ helpLink?: string;
19
+ };
20
+ };
21
+ export interface GraphCommandItem extends CommandItem {
22
+ execute: (editor: OnesEditor, containerId: string, blockIndex: number) => void;
23
+ }
24
+ export interface StandardGraphData {
25
+ src: string;
26
+ code: string;
27
+ flex?: number;
28
+ height?: number;
29
+ view?: string;
30
+ }
31
+ export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
32
+ export type GraphEmbedBlockProperties = StandardEmbedBlockProperties;
33
+ export interface MermaidData extends Omit<StandardGraphData, 'code'> {
34
+ mermaidText: string;
35
+ }
36
+ export interface PlantumlData extends Omit<StandardGraphData, 'code'> {
37
+ plantumlText: string;
38
+ }
39
+ export interface FlowchartData extends Omit<StandardGraphData, 'code'> {
40
+ flowchartText: string;
41
+ }
@@ -0,0 +1 @@
1
+ export declare function figcaptionToTextBlock(ts: any): void;
@@ -0,0 +1 @@
1
+ export declare function fontSize(ts: any): void;
@@ -0,0 +1 @@
1
+ export declare function textColor(ts: any): void;
@@ -0,0 +1 @@
1
+ export declare function underline(ts: any): void;
@@ -6,7 +6,6 @@ export interface ImageOptions {
6
6
  callbacks?: {
7
7
  onError?: (editor: OnesEditor, error: Error) => void;
8
8
  };
9
- onPreview?: (editor: OnesEditor, event: MouseEvent) => void;
10
9
  }
11
10
  export interface ImageEmbedData extends DocEmbedData {
12
11
  src: string | string[];
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@ones-editor/main-toolbar",
3
+ "version": "1.0.0",
4
+ "main": "./src/index.ts",
5
+ "license": "MIT",
6
+ "types": "src/index.d.ts"
7
+ }
@@ -0,0 +1,18 @@
1
+ import { CommandItem, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
2
+ import { AbstractCommandBar, FixedToolbar } from '../../../@ones-editor/ui-base';
3
+ import { ToolbarItem } from './types';
4
+ import './locale';
5
+ import './style.scss';
6
+ export * from './types';
7
+ export * from './items';
8
+ export declare class MainToolbar implements OnesEditorCustom {
9
+ private editor;
10
+ toolbar: FixedToolbar;
11
+ constructor(editor: OnesEditor, parent: HTMLElement);
12
+ destroy(): void;
13
+ setItems(items: ToolbarItem[]): void;
14
+ getItems(): ToolbarItem[];
15
+ handleClick: (bar: AbstractCommandBar, item: CommandItem) => void;
16
+ handleSelectionChanged: () => void;
17
+ updateState(): void;
18
+ }
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class CommentItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class FindReplaceItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
8
+ }
@@ -0,0 +1,40 @@
1
+ import { CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ declare class FontStyleBaseItem implements ToolbarItem {
4
+ name: string;
5
+ id: string;
6
+ states: CommandItemState[];
7
+ constructor(name: string, id: string);
8
+ getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
9
+ onClick(editor: OnesEditor): void;
10
+ updateState(editor: OnesEditor): void;
11
+ }
12
+ export declare class FontBoldItem extends FontStyleBaseItem {
13
+ icon: string;
14
+ constructor();
15
+ }
16
+ export declare class FontItalicItem extends FontStyleBaseItem {
17
+ icon: string;
18
+ constructor();
19
+ }
20
+ export declare class FontUnderlineItem extends FontStyleBaseItem {
21
+ icon: string;
22
+ constructor();
23
+ }
24
+ export declare class FontStrikethroughItem extends FontStyleBaseItem {
25
+ icon: string;
26
+ constructor();
27
+ }
28
+ export declare class InlineCodeItem extends FontStyleBaseItem {
29
+ icon: string;
30
+ constructor();
31
+ }
32
+ export declare class SuperscriptItem extends FontStyleBaseItem {
33
+ icon: string;
34
+ constructor();
35
+ }
36
+ export declare class SubscriptItem extends FontStyleBaseItem {
37
+ icon: string;
38
+ constructor();
39
+ }
40
+ export {};
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class InsertImageItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
8
+ }
@@ -0,0 +1,17 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, InlineCodeItem, SubscriptItem, SuperscriptItem } from './font-style';
3
+ import { InsertImageItem } from './image';
4
+ import { InsertLinkItem } from './link';
5
+ import { OrderedListItem, UnorderedListItem, CheckListItem } from './list';
6
+ import { ParagraphItem } from './paragraph';
7
+ import { QuoteItem } from './quote';
8
+ import { SeparatorItem } from './separator';
9
+ import { AlignLeftItem, AlignCenterItem, AlignRightItem } from './text-align';
10
+ import { RedoItem, UndoItem } from './undo';
11
+ import { InsertItem } from './insert';
12
+ import { FindReplaceItem } from './find';
13
+ import { CommentItem } from './comment';
14
+ import { ColorItem } from './text-color';
15
+ import { MoreItem } from './more-item';
16
+ export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertImageItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | CommentItem | ColorItem | MoreItem)[];
17
+ export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, };
@@ -0,0 +1,12 @@
1
+ import { CommandItem, CommandItemChildrenPlacement, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class InsertItem implements ToolbarItem {
4
+ name: string;
5
+ id: string;
6
+ dropdown: boolean;
7
+ manualShowChildren: boolean;
8
+ childrenPlacement: CommandItemChildrenPlacement;
9
+ children: CommandItem[];
10
+ constructor(editor: OnesEditor);
11
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class InsertLinkItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ states: CommandItemState[];
8
+ getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
9
+ updateState(editor: OnesEditor): void;
10
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
11
+ }
@@ -0,0 +1,29 @@
1
+ import { CommandItemWithSource, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class OrderedListItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ states: CommandItemState[];
8
+ getCommand(editor: OnesEditor): CommandItemWithSource | undefined;
9
+ updateState(editor: OnesEditor): void;
10
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
11
+ }
12
+ export declare class UnorderedListItem implements ToolbarItem {
13
+ id: string;
14
+ name: string;
15
+ icon: string;
16
+ states: CommandItemState[];
17
+ getCommand(editor: OnesEditor): CommandItemWithSource | undefined;
18
+ updateState(editor: OnesEditor): void;
19
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
20
+ }
21
+ export declare class CheckListItem implements ToolbarItem {
22
+ id: string;
23
+ name: string;
24
+ icon: string;
25
+ states: CommandItemState[];
26
+ getCommand(editor: OnesEditor): CommandItemWithSource | undefined;
27
+ updateState(editor: OnesEditor): void;
28
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
29
+ }
@@ -0,0 +1,20 @@
1
+ import { CommandItem, CommandItemChildrenPlacement, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { FixedToolbar } from '../../../../@ones-editor/ui-base';
3
+ import { ToolbarItem } from '../types';
4
+ export declare class MoreItem implements ToolbarItem {
5
+ name: string;
6
+ id: string;
7
+ manualShowChildren: boolean;
8
+ childrenPlacement: CommandItemChildrenPlacement;
9
+ children: CommandItem[];
10
+ hidden?: boolean | undefined;
11
+ fixedToolbar: FixedToolbar | undefined;
12
+ observer?: ResizeObserver;
13
+ icon: string;
14
+ childrenType: 'menu' | 'toolbar' | 'mobile-bottom-menu';
15
+ childrenMenuId: string;
16
+ constructor(editor: OnesEditor);
17
+ destroy(): void;
18
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
19
+ updateItems(): void;
20
+ }
@@ -0,0 +1,14 @@
1
+ import { CommandItemChildrenPlacement, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class ParagraphItem implements ToolbarItem {
4
+ children: ToolbarItem[];
5
+ id: string;
6
+ name: string;
7
+ states: CommandItemState[];
8
+ dropdown: boolean;
9
+ manualShowChildren: boolean;
10
+ childrenPlacement: CommandItemChildrenPlacement;
11
+ constructor();
12
+ updateState(editor: OnesEditor): void;
13
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
14
+ }
@@ -0,0 +1,11 @@
1
+ import { CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class QuoteItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ states: CommandItemState[];
8
+ getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
9
+ updateState(editor: OnesEditor): void;
10
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
11
+ }
@@ -0,0 +1,7 @@
1
+ import { CommandItemType } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class SeparatorItem implements ToolbarItem {
4
+ id: string;
5
+ type: CommandItemType;
6
+ name: string;
7
+ }
@@ -0,0 +1,21 @@
1
+ import { CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class AlignBaseItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ states: CommandItemState[];
8
+ constructor(id: string, name: string, icon: string);
9
+ getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItem | null;
10
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
11
+ updateState(editor: OnesEditor): void;
12
+ }
13
+ export declare class AlignLeftItem extends AlignBaseItem {
14
+ constructor();
15
+ }
16
+ export declare class AlignCenterItem extends AlignBaseItem {
17
+ constructor();
18
+ }
19
+ export declare class AlignRightItem extends AlignBaseItem {
20
+ constructor();
21
+ }
@@ -0,0 +1,49 @@
1
+ import { CommandItemChildrenPlacement, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { TextColorItem } from '../../../../@ones-editor/ui-base';
3
+ import { ColorStyleProvider } from '../../../../@ones-editor/ui';
4
+ import { ToolbarItem } from '../types';
5
+ export declare class ColorItem extends TextColorItem implements ToolbarItem {
6
+ childrenPlacement: CommandItemChildrenPlacement;
7
+ states?: CommandItemState[] | undefined;
8
+ provider: ColorStyleProvider;
9
+ constructor(editor: OnesEditor);
10
+ getCommand(): {
11
+ id: string;
12
+ name: string;
13
+ desc?: string | undefined;
14
+ states?: CommandItemState[] | undefined;
15
+ value?: string | undefined;
16
+ order?: number | undefined;
17
+ type?: import("@ones-editor/core").CommandItemType | undefined;
18
+ element?: HTMLElement | ((item: import("@ones-editor/core").CommandItem) => HTMLElement) | undefined;
19
+ icon?: string | undefined;
20
+ childrenType?: "menu" | "toolbar" | "mobile-bottom-menu" | undefined;
21
+ children?: import("@ones-editor/core").CommandItem[] | undefined;
22
+ childrenMenuId?: string | undefined;
23
+ data?: unknown;
24
+ group?: string | undefined;
25
+ groupOrder?: number | undefined;
26
+ dropdown?: boolean | undefined;
27
+ dropSplit?: boolean | undefined;
28
+ splitTooltip?: string | undefined;
29
+ manualShowChildren?: boolean | undefined;
30
+ childrenPlacement?: CommandItemChildrenPlacement | undefined;
31
+ childrenOffset?: [number, number] | undefined;
32
+ childArrow?: boolean | undefined;
33
+ subText?: string | undefined;
34
+ defaultCheckedChildren?: string[] | undefined;
35
+ ellipsisTooltip?: string | undefined;
36
+ disableTooltip?: boolean | undefined;
37
+ tooltipPlacement?: CommandItemChildrenPlacement | undefined;
38
+ disableReason?: string | undefined;
39
+ hideGroupItem?: boolean | undefined;
40
+ setCloseable?: ((closeable: import("@ones-editor/core").Closeable) => void) | undefined;
41
+ beforePopup?: ((parent: unknown) => void) | undefined;
42
+ switchable?: boolean | undefined;
43
+ hidden?: boolean | undefined;
44
+ clickToClose?: boolean | undefined;
45
+ } | null;
46
+ handleChangeColor(type: 'color' | 'backgroundColor' | 'clearColor', value: number): void;
47
+ handleMousedown: (event: MouseEvent) => void;
48
+ updateState(editor: OnesEditor): void;
49
+ }
@@ -0,0 +1,18 @@
1
+ import { CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class UndoItem implements ToolbarItem {
4
+ icon: string;
5
+ id: string;
6
+ name: string;
7
+ states: CommandItemState[];
8
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
9
+ updateState(editor: OnesEditor): void;
10
+ }
11
+ export declare class RedoItem implements ToolbarItem {
12
+ icon: string;
13
+ id: string;
14
+ name: string;
15
+ states: CommandItemState[];
16
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
17
+ updateState(editor: OnesEditor): void;
18
+ }
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ toolbar: {
3
+ undo: string;
4
+ redo: string;
5
+ insert: string;
6
+ findReplace: string;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ toolbar: {
3
+ undo: string;
4
+ redo: string;
5
+ insert: string;
6
+ findReplace: string;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ toolbar: {
3
+ undo: string;
4
+ redo: string;
5
+ insert: string;
6
+ findReplace: string;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { CommandItem, OnesEditor } from '../../../@ones-editor/core';
2
+ export interface ToolbarItem extends CommandItem {
3
+ updateState?: (editor: OnesEditor) => void;
4
+ onClick?: (editor: OnesEditor, item: ToolbarItem) => void;
5
+ }
@@ -0,0 +1,8 @@
1
+ import { marked } from 'marked';
2
+ export interface CustomTagToken extends marked.Tokens.Generic {
3
+ type: 'custom';
4
+ content: string;
5
+ }
6
+ export declare const extendedCustomTag: () => {
7
+ extensions: marked.TokenizerExtension[];
8
+ };
@@ -1 +1,2 @@
1
1
  export * from './markdown-to-doc';
2
+ export * from 'marked';
@@ -0,0 +1,4 @@
1
+ import { DocBlockText, DocBlockTextAttributes } from '../../../../../@ones-editor/core';
2
+ import { TokenToBlockOptions } from '../base';
3
+ import { CustomTagToken } from '../../custom/tag';
4
+ export declare function customTagToText(token: CustomTagToken, attributes: DocBlockTextAttributes, options: TokenToBlockOptions): DocBlockText;
@@ -0,0 +1,2 @@
1
+ import { DocBlockTextAttributes } from '../../../../../@ones-editor/core';
2
+ export declare function applyFontSizeTagToText(htm: string, attributes: DocBlockTextAttributes): void;
@@ -0,0 +1,2 @@
1
+ import { DocBlockTextAttributes } from '../../../../../@ones-editor/core';
2
+ export declare function applyHtmlToText(htm: string, attributes: DocBlockTextAttributes): void;
@@ -0,0 +1,2 @@
1
+ import { DocBlockTextAttributes } from '../../../../../@ones-editor/core';
2
+ export declare function applyColorTagToText(htm: string, attributes: DocBlockTextAttributes): void;
@@ -1,7 +1,6 @@
1
1
  import type { OnesEditor, BlockContentElement } from '../../../../@ones-editor/core';
2
2
  import { TypedEmitter } from 'tiny-typed-emitter';
3
3
  import type { MediaOptions, MediaBlockData, MediaAbstract } from '../types';
4
- import './hovering-toolbar/toolbar.scss';
5
4
  export interface MediaEvent {
6
5
  mediaError: (editor: OnesEditor, type: 'upload_error' | 'load_error' | 'empty', blockId: string) => void;
7
6
  }
@@ -1,4 +1,4 @@
1
- import type { OnesEditor, DocEmbedBlock, DocEmbedData, BlockElement } from '../../../@ones-editor/core';
1
+ import type { OnesEditor, DocEmbedBlock, DocEmbedData } from '../../../@ones-editor/core';
2
2
  import { MediaType } from './constant';
3
3
  export type MediaKeys = `${MediaType}`;
4
4
  export interface MediaEmbedOptions {
@@ -11,7 +11,6 @@ export interface MediaEmbedOptions {
11
11
  callbacks?: {
12
12
  onError?: (editor: OnesEditor, error: Error) => void;
13
13
  };
14
- onMediaPreview?: (editor: OnesEditor, block: BlockElement, itemId: string) => void;
15
14
  }
16
15
  export interface MediaEmbedData extends DocEmbedData {
17
16
  fileName?: string;
@@ -1,4 +1,3 @@
1
1
  export * from './image';
2
2
  export * from './title';
3
3
  export * from './image-downloader';
4
- export * from './re-auth';
@@ -1,23 +0,0 @@
1
- import { TypedEmitter } from 'tiny-typed-emitter';
2
- import { OnesEditor, OnesEditorCustom, OnesEditorDocCallbacks } from '../../../../@ones-editor/core';
3
- import ReAuthToolbar from './ui/toolbar';
4
- import './locale';
5
- type EventCallback = (() => void) | undefined;
6
- declare const DOC_RE_AUTH_KEYS = "doc-re-auth-event";
7
- type ReAuthEvent = {
8
- tokenExpired: () => void;
9
- };
10
- declare class DocReAuthCallbacks extends TypedEmitter<ReAuthEvent> implements OnesEditorCustom, OnesEditorDocCallbacks {
11
- private editor;
12
- private authErrorCallback;
13
- private authRecoverCallback;
14
- reAuthToolbar: ReAuthToolbar;
15
- constructor(editor: OnesEditor);
16
- handleReAuth: () => void;
17
- addAuthListen(event: 'authError' | 'authRecover', callback: EventCallback): void;
18
- removeListeners(): void;
19
- destroy: () => void;
20
- onError: (error: Error) => void;
21
- onAuthRecover: () => void;
22
- }
23
- export { ReAuthToolbar, DocReAuthCallbacks, DOC_RE_AUTH_KEYS, };