@ones-editor/editor 2.1.10 → 2.2.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 (189) hide show
  1. package/@ones-editor/block-menu/src/block-menu-button/menu-button/index.d.ts +1 -1
  2. package/@ones-editor/block-padding/src/index.d.ts +1 -1
  3. package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +3 -4
  4. package/@ones-editor/callout-block/src/index.d.ts +1 -0
  5. package/@ones-editor/comments/src/comments-helper/old-version-comment.d.ts +16 -0
  6. package/@ones-editor/comments/src/index.d.ts +5 -1
  7. package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +4 -3
  8. package/@ones-editor/core/src/core/blocks/common/block-properties.d.ts +9 -9
  9. package/@ones-editor/core/src/core/blocks/common/execute-block-command.d.ts +2 -2
  10. package/@ones-editor/core/src/core/blocks/complex-blocks/child-blocks.d.ts +2 -1
  11. package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +2 -1
  12. package/@ones-editor/core/src/core/blocks/text-blocks/base/child.d.ts +2 -7
  13. package/@ones-editor/core/src/core/command-providers/abstract-providers.d.ts +25 -0
  14. package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +16 -0
  15. package/@ones-editor/core/src/core/command-providers/commands/index.d.ts +2 -0
  16. package/@ones-editor/core/src/core/command-providers/commands/inject-source.d.ts +3 -0
  17. package/@ones-editor/core/src/core/command-providers/commands/merge-commands.d.ts +4 -0
  18. package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +2 -5
  19. package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +5 -14
  20. package/@ones-editor/core/src/core/command-providers/index.d.ts +3 -1
  21. package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -1
  22. package/@ones-editor/core/src/core/containers/root-container.d.ts +3 -2
  23. package/@ones-editor/core/src/core/doc/doc.d.ts +3 -0
  24. package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +2 -0
  25. package/@ones-editor/core/src/core/editor/actions/clear-selected-contents.d.ts +2 -2
  26. package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +1 -0
  27. package/@ones-editor/core/src/core/editor/index.d.ts +1 -1
  28. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -1
  29. package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
  30. package/@ones-editor/core/src/core/selection/select-handler.d.ts +3 -3
  31. package/@ones-editor/core/src/core/types.d.ts +47 -28
  32. package/@ones-editor/core/src/helper/hovering-block.d.ts +2 -2
  33. package/@ones-editor/core/src/utils/animate-scroll.d.ts +2 -0
  34. package/@ones-editor/core/src/utils/dom.d.ts +4 -1
  35. package/@ones-editor/core/src/utils/drag-drop.d.ts +8 -3
  36. package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +6 -5
  37. package/@ones-editor/file/src/locale/en-us.d.ts +1 -0
  38. package/@ones-editor/file/src/locale/ja-jp.d.ts +1 -0
  39. package/@ones-editor/file/src/locale/zh-cn.d.ts +1 -0
  40. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -19
  41. package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +12 -1
  42. package/@ones-editor/image-embed/src/splitter-resizer/index.d.ts +3 -3
  43. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
  44. package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
  45. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
  46. package/@ones-editor/layout-block/src/command-filter.d.ts +6 -0
  47. package/@ones-editor/layout-block/src/index.d.ts +1 -0
  48. package/@ones-editor/list-block/src/index.d.ts +2 -1
  49. package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +12 -1
  50. package/@ones-editor/media-embed/src/utils/dom.d.ts +2 -0
  51. package/@ones-editor/mention/src/locale/en-us.d.ts +3 -0
  52. package/@ones-editor/mention/src/locale/ja-jp.d.ts +3 -0
  53. package/@ones-editor/mention/src/locale/zh-cn.d.ts +3 -0
  54. package/@ones-editor/mention/src/mention.d.ts +24 -1
  55. package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +15 -0
  56. package/@ones-editor/mobile-helper/src/embed-mask.d.ts +10 -0
  57. package/@ones-editor/mobile-helper/src/fixed-toolbar/active-observer.d.ts +11 -0
  58. package/@ones-editor/mobile-helper/src/fixed-toolbar/fixed-providers.d.ts +6 -0
  59. package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +18 -0
  60. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/align-dropdown.d.ts +9 -0
  61. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/group.d.ts +7 -0
  62. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +13 -0
  63. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert.d.ts +8 -0
  64. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/paragraph.d.ts +9 -0
  65. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/tab-provider.d.ts +10 -0
  66. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/text-dropdown.d.ts +9 -0
  67. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/turn-into.d.ts +8 -0
  68. package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +15 -0
  69. package/@ones-editor/mobile-helper/src/index.d.ts +14 -2
  70. package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +9 -0
  71. package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +9 -0
  72. package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +9 -0
  73. package/@ones-editor/mobile-helper/src/selection-gripper/index.d.ts +19 -0
  74. package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +3 -0
  75. package/@ones-editor/scroll-container/src/utils.d.ts +1 -1
  76. package/@ones-editor/sharedb-doc/src/index.d.ts +3 -0
  77. package/@ones-editor/table-block/src/commands/index.d.ts +2 -0
  78. package/@ones-editor/table-block/src/commands/mobile-command-provider.d.ts +12 -0
  79. package/@ones-editor/table-block/src/commands/table-block-commands.d.ts +4 -3
  80. package/@ones-editor/table-block/src/index.d.ts +2 -1
  81. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  82. package/@ones-editor/table-block/src/locale/ja-jp.d.ts +5 -0
  83. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  84. package/@ones-editor/table-block/src/table-block/cell-menu/table-cell-dom.d.ts +6 -0
  85. package/@ones-editor/table-block/src/table-block/table-resize/resize-drag-drop.d.ts +4 -4
  86. package/@ones-editor/text-commands/src/index.d.ts +1 -3
  87. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  88. package/@ones-editor/ui/src/block-menu/block-command-providers.d.ts +8 -0
  89. package/@ones-editor/{block-menu → ui}/src/block-menu/index.d.ts +3 -1
  90. package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +10 -0
  91. package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +9 -0
  92. package/@ones-editor/ui/src/index.d.ts +32 -8
  93. package/@ones-editor/ui/src/link-popup/mobile-link-popup.d.ts +22 -0
  94. package/@ones-editor/ui/src/link-popup/types.d.ts +34 -0
  95. package/@ones-editor/ui/src/link-popup/web-link-popup.d.ts +19 -0
  96. package/@ones-editor/ui/src/locale/en-us.d.ts +14 -0
  97. package/@ones-editor/ui/src/locale/ja-jp.d.ts +14 -0
  98. package/@ones-editor/ui/src/locale/zh-cn.d.ts +14 -0
  99. package/@ones-editor/ui/src/providers/align-dropdown.d.ts +10 -0
  100. package/@ones-editor/ui/src/providers/align.d.ts +11 -0
  101. package/@ones-editor/ui/src/providers/block-hook-provider.d.ts +16 -0
  102. package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +20 -0
  103. package/@ones-editor/ui/src/providers/color-provider.d.ts +18 -0
  104. package/@ones-editor/ui/src/providers/edit-link-provider.d.ts +6 -0
  105. package/@ones-editor/ui/src/providers/heading.d.ts +13 -0
  106. package/@ones-editor/ui/src/providers/inline-code-provider.d.ts +10 -0
  107. package/@ones-editor/ui/src/providers/inline-style-provider.d.ts +10 -0
  108. package/@ones-editor/ui/src/providers/insert-above.d.ts +9 -0
  109. package/@ones-editor/ui/src/providers/insert-after.d.ts +9 -0
  110. package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +12 -0
  111. package/@ones-editor/ui/src/providers/insert-group.d.ts +7 -0
  112. package/@ones-editor/ui/src/providers/insert-menu.d.ts +16 -0
  113. package/@ones-editor/ui/src/providers/link.d.ts +12 -0
  114. package/@ones-editor/ui/src/providers/list.d.ts +13 -0
  115. package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +13 -0
  116. package/@ones-editor/ui/src/providers/paragraph.d.ts +9 -0
  117. package/@ones-editor/ui/src/providers/proxy-provider.d.ts +9 -0
  118. package/@ones-editor/ui/src/providers/quoted.d.ts +10 -0
  119. package/@ones-editor/ui/src/providers/script-with-dropdown.d.ts +9 -0
  120. package/@ones-editor/ui/src/providers/selection-provider.d.ts +9 -0
  121. package/@ones-editor/ui/src/providers/text-command-provider.d.ts +16 -0
  122. package/@ones-editor/ui/src/providers/text-fixed-provider.d.ts +16 -0
  123. package/@ones-editor/ui/src/providers/text-script-provider.d.ts +10 -0
  124. package/@ones-editor/ui/src/providers/text-styles.d.ts +9 -0
  125. package/@ones-editor/ui/src/providers/turn-into.d.ts +9 -0
  126. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +2 -0
  127. package/@ones-editor/ui/src/{quick-menu → providers/utils}/basic-commands.d.ts +1 -2
  128. package/@ones-editor/ui/src/providers/utils/clipboard.d.ts +6 -0
  129. package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
  130. package/@ones-editor/ui/src/providers/utils/inject-block-options.d.ts +8 -0
  131. package/@ones-editor/ui/src/providers/utils/text-styles.d.ts +6 -0
  132. package/@ones-editor/ui/src/quick-menu/index.d.ts +7 -19
  133. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +8 -0
  134. package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -5
  135. package/@ones-editor/ui/src/readonly-toolbar/add-comment-to-old-doc.d.ts +22 -0
  136. package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +29 -0
  137. package/@ones-editor/ui/src/readonly-toolbar/types.d.ts +12 -0
  138. package/@ones-editor/ui/src/toolbar/link-commands.d.ts +11 -0
  139. package/@ones-editor/ui/src/toolbar/text-commands.d.ts +2 -2
  140. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +2 -1
  141. package/@ones-editor/ui/src/utils/hide-toolbar.d.ts +2 -0
  142. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +4 -1
  143. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +3 -1
  144. package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +1 -0
  145. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +4 -2
  146. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +2 -1
  147. package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +1 -0
  148. package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +1 -0
  149. package/@ones-editor/ui-base/src/command-bar/types.d.ts +7 -2
  150. package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
  151. package/@ones-editor/ui-base/src/icons/index.d.ts +5 -1
  152. package/@ones-editor/ui-base/src/index.d.ts +3 -0
  153. package/@ones-editor/ui-base/src/input/create-input.d.ts +24 -3
  154. package/@ones-editor/ui-base/src/mobile-command-bar/init-menu-item.d.ts +3 -0
  155. package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +21 -0
  156. package/@ones-editor/ui-base/src/mobile-command-bar/scroll-into-view.d.ts +3 -0
  157. package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -1
  158. package/@ones-editor/{ui → ui-base}/src/text-button/index.d.ts +1 -1
  159. package/dist/auto-new-line.d.ts +7 -0
  160. package/dist/comments/local-doc-comments-provider.d.ts +2 -1
  161. package/dist/index.d.ts +7 -3
  162. package/dist/index.js +27673 -23865
  163. package/dist/lang/en-us.d.ts +1 -1
  164. package/dist/lang/ja-jp.d.ts +1 -1
  165. package/dist/lang/zh-cn.d.ts +1 -1
  166. package/dist/types.d.ts +5 -2
  167. package/package.json +1 -1
  168. package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +0 -3
  169. package/@ones-editor/block-menu/src/block-menu/items/index.d.ts +0 -5
  170. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +0 -5
  171. package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +0 -30
  172. package/@ones-editor/block-menu/src/block-menu/items/types.d.ts +0 -5
  173. package/@ones-editor/text-commands/src/locale/en-us.d.ts +0 -13
  174. package/@ones-editor/text-commands/src/locale/ja-jp.d.ts +0 -13
  175. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +0 -13
  176. package/@ones-editor/text-commands/src/text-command-provider.d.ts +0 -24
  177. package/@ones-editor/text-commands/src/text-commands.d.ts +0 -4
  178. package/@ones-editor/text-commands/src/text-styles.d.ts +0 -4
  179. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +0 -16
  180. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +0 -8
  181. package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +0 -4
  182. package/@ones-editor/ui/src/quick-menu/order.d.ts +0 -1
  183. package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +0 -9
  184. package/@ones-editor/ui/src/toolbar/commands/align.d.ts +0 -10
  185. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +0 -11
  186. package/@ones-editor/ui/src/toolbar/commands/turn-into.d.ts +0 -10
  187. package/@ones-editor/ui/src/toolbar/merge-commands.d.ts +0 -2
  188. /package/@ones-editor/{text-commands → mobile-helper}/src/locale/index.d.ts +0 -0
  189. /package/@ones-editor/{block-menu → ui}/src/block-menu/standard-block-actions/hook.d.ts +0 -0
@@ -4,7 +4,7 @@ declare const _default: {
4
4
  title: string;
5
5
  readonlyTitle: string;
6
6
  content: string;
7
- contentInTable: string;
7
+ contentInContainer: string;
8
8
  contentInCallout: string;
9
9
  };
10
10
  local: {
@@ -4,7 +4,7 @@ declare const _default: {
4
4
  title: string;
5
5
  readonlyTitle: string;
6
6
  content: string;
7
- contentInTable: string;
7
+ contentInContainer: string;
8
8
  contentInCallout: string;
9
9
  };
10
10
  local: {
@@ -4,7 +4,7 @@ declare const _default: {
4
4
  title: string;
5
5
  readonlyTitle: string;
6
6
  content: string;
7
- contentInTable: string;
7
+ contentInContainer: string;
8
8
  contentInCallout: string;
9
9
  };
10
10
  local: {
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel, Block, ShortcutRecords, OnesEditorBlockRenderer, BuildResourceUrlOptions, UploadResourceOptions, UploadResourceResult } from '../@ones-editor/core';
1
+ import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel, Block, ShortcutRecords, OnesEditorBlockRenderer, BuildResourceUrlOptions, UploadResourceOptions, UploadResourceResult, MobileClient } from '../@ones-editor/core';
2
2
  import { DrawIoOptions } from '../@ones-editor/drawio-embed';
3
3
  import { FlowCharEmbedOptions, MermaidEmbedOptions, PlantumlEmbedOptions } from '../@ones-editor/graph-embed';
4
4
  import { ImageOptions } from '../@ones-editor/image-embed';
@@ -8,7 +8,7 @@ import { WebpageOptions } from '../@ones-editor/webpage-embed';
8
8
  import { OnesEditorCommentOptions } from '../@ones-editor/comments';
9
9
  import { FileOptions } from '../@ones-editor/file';
10
10
  import { ListOptions } from '../@ones-editor/list-block';
11
- import { QuickMenuOptions } from '../@ones-editor/ui/src/quick-menu';
11
+ import { QuickMenuOptions } from '../@ones-editor/ui';
12
12
  import { TemplateOptions } from '../@ones-editor/templates';
13
13
  import { FindDialogOptions, PopoverOptions } from '../@ones-editor/ui-base';
14
14
  import { CodeBlockExternalOptions } from '../@ones-editor/code-block';
@@ -42,6 +42,7 @@ export type EditorComponentOptions = {
42
42
  mathjax?: MathjaxOptions;
43
43
  link?: LinkOptions;
44
44
  columns?: EditorConfigLayoutOptions;
45
+ mobile?: MobileClient;
45
46
  };
46
47
  export type EditorEvents = {
47
48
  onClickLink?: (editor: OnesEditor, event: MouseEvent, link: Element) => void;
@@ -84,6 +85,7 @@ export interface CreateOnesEditorOptions {
84
85
  componentsOptions?: EditorComponentOptions;
85
86
  buildResourceUrl?: (resourceId: string, options?: BuildResourceUrlOptions) => string;
86
87
  uploadResource?: (file: File, options?: UploadResourceOptions) => Promise<UploadResourceResult>;
88
+ autoNewLine?: boolean;
87
89
  }
88
90
  export interface CreateLocalEditorOptions {
89
91
  id?: string;
@@ -103,4 +105,5 @@ export interface CreateLocalEditorOptions {
103
105
  events?: EditorEvents;
104
106
  componentsOptions?: EditorComponentOptions;
105
107
  hideTitle?: boolean;
108
+ autoNewLine?: boolean;
106
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.10",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,3 +0,0 @@
1
- import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
2
- import { BlockMenuItem } from './types';
3
- export declare function getBlockCommandItems(editor: OnesEditor, block: BlockElement, excludes?: Set<string>): BlockMenuItem[];
@@ -1,5 +0,0 @@
1
- import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
2
- import { TextStyleItemOptions } from './text-styles/text-style-item';
3
- import { BlockMenuItem } from './types';
4
- export declare function getBlockMenuItems(editor: OnesEditor, block: BlockElement, options: TextStyleItemOptions): BlockMenuItem[];
5
- export declare function handleBlockMenuItemClick(editor: OnesEditor, block: BlockElement, item: BlockMenuItem): void;
@@ -1,5 +0,0 @@
1
- import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
2
- import type { GetAllQuickMenuItemsOptions } from '../../../../../../@ones-editor/ui';
3
- import type { BlockMenuItem } from '../types';
4
- export declare function getAllInsertBlockItems(editor: OnesEditor, block: BlockElement, source: 'insert-block' | 'insert-block-before', options: GetAllQuickMenuItemsOptions): BlockMenuItem[];
5
- export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
@@ -1,30 +0,0 @@
1
- import { BlockElement, OnesEditor, DocBlock } from '../../../../../../@ones-editor/core';
2
- import { BlockMenuItem } from '../types';
3
- export interface ParagraphBlockAttribute extends DocBlock {
4
- 'heading'?: number;
5
- quoted?: boolean;
6
- align?: 'left' | 'center' | 'right';
7
- checkbox?: 'checked' | 'unchecked';
8
- ordered?: boolean;
9
- }
10
- export type TextStyleItemOptions = {
11
- fromEmbed?: boolean;
12
- onAfterStyleItemClick?: () => void;
13
- };
14
- export default class TextStyleItem implements BlockMenuItem {
15
- private editor;
16
- private block;
17
- private options;
18
- source: string;
19
- id: string;
20
- name: string;
21
- element: HTMLElement;
22
- private textStylesTooltips;
23
- constructor(editor: OnesEditor, block: BlockElement, options: TextStyleItemOptions);
24
- createItemElement(editor: OnesEditor, block: BlockElement): HTMLDivElement;
25
- private createHeadingItemElement;
26
- private createListItemElement;
27
- createItem(id: string, icon: string, parent: HTMLElement, active?: boolean): void;
28
- handleClick: (editor: OnesEditor, event: Event) => void;
29
- private calcTextStyleItemTooltipsEnum;
30
- }
@@ -1,5 +0,0 @@
1
- import { CommandItem } from '../../../../../@ones-editor/core';
2
- export interface BlockMenuItem extends CommandItem {
3
- source: string;
4
- blockMenuItemCustomData?: unknown;
5
- }
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- commands: {
3
- bold: string;
4
- italic: string;
5
- underline: string;
6
- strikethrough: string;
7
- code: string;
8
- subscript: string;
9
- superscript: string;
10
- more: string;
11
- };
12
- };
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- commands: {
3
- bold: string;
4
- italic: string;
5
- underline: string;
6
- strikethrough: string;
7
- code: string;
8
- subscript: string;
9
- superscript: string;
10
- more: string;
11
- };
12
- };
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- commands: {
3
- bold: string;
4
- italic: string;
5
- underline: string;
6
- strikethrough: string;
7
- code: string;
8
- subscript: string;
9
- superscript: string;
10
- more: string;
11
- };
12
- };
13
- export default _default;
@@ -1,24 +0,0 @@
1
- import { BlockCommandItem, BlockElement, CommandParams, CommandResult, DocBlockTextAttributes, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../@ones-editor/core';
2
- export default class TextCommandProvider implements OnesEditorCommandProvider {
3
- private editor;
4
- id: string;
5
- private emptyTextBlockAttributes;
6
- private colorItem;
7
- constructor(editor: OnesEditor);
8
- destroy(): void;
9
- private updateButtonColor;
10
- getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): BlockCommandItem[];
11
- executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams, result: CommandResult): boolean;
12
- private executeCommandOnEmptyText;
13
- private getCommandsOnEmptyText;
14
- private setCommandsStates;
15
- getEmptyBlockTextAttributes(editor: OnesEditor, blockId: string): DocBlockTextAttributes | undefined;
16
- private handleChangeColor;
17
- private getEmptyTextBlockColor;
18
- private setEmptyTextBlockColor;
19
- private static toTextCommand;
20
- private static fromTextCommandId;
21
- private static fromTextCommand;
22
- private static toTextCommands;
23
- private static fromTextCommands;
24
- }
@@ -1,4 +0,0 @@
1
- import { BlockCommandItem, BlockElement, CommandParams, CommandResult, OnesEditor, SelectionRange } from '../../../@ones-editor/core';
2
- export declare function getStandardEmptyStyleCommands(editor: OnesEditor, block: BlockElement): BlockCommandItem[];
3
- export declare function getAvailableStyleCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): BlockCommandItem[];
4
- export declare function executeStyleCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: string, params: CommandParams, result: CommandResult): boolean;
@@ -1,4 +0,0 @@
1
- import { BlockElement, DocBlockText, OnesEditor, SelectionRange, TextStyles } from '../../../@ones-editor/core';
2
- export declare function getIntersectionStyles(text: DocBlockText): Map<any, any>;
3
- export declare function getTextStyles(editor: OnesEditor, block: BlockElement, range: SelectionRange): TextStyles;
4
- export declare function applyTextStyle(editor: OnesEditor, block: BlockElement, range: SelectionRange, style: string, value?: boolean | string | number): DocBlockText;
@@ -1,16 +0,0 @@
1
- import { BlockElement } from '../../../../@ones-editor/core';
2
- import type { BlockOptions, CommandItem, OnesEditor, InsertEmptyBlockOptions } from '../../../../@ones-editor/core';
3
- import type { AddMenuCommand, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
4
- export declare function addQuickMenuItemFields(item: CommandItem, options: BlockOptions, blockType: string): void;
5
- export declare function getPlainTextMenuOptions(): BlockOptions;
6
- export declare function getHeadingMenuOptions(start?: number): BlockOptions;
7
- export declare function getCompleteHeadingMenuOptions(): CommandItem[];
8
- export declare class BasicCommandProvider implements QuickMenuCommandProvider {
9
- private withPlainText?;
10
- constructor(withPlainText?: boolean | undefined);
11
- getCommands(): CommandItem[];
12
- updateBlock(editor: OnesEditor, containerId: string, block: BlockElement, item: CommandItem): null;
13
- handleUpdateBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<null>;
14
- handleInsertEmptyBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<null>;
15
- executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand): Promise<BlockElement | null>;
16
- }
@@ -1,8 +0,0 @@
1
- import { InsertEmptyBlockOptions, OnesEditor, BlockElement, CommandItem } from '../../../../@ones-editor/core';
2
- import { AddMenuCommand, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
3
- export declare class InlineBoxCommandProvider implements QuickMenuCommandProvider {
4
- getCommands(): CommandItem[];
5
- handleUpdateBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<void | BlockElement | null>;
6
- handleInsertEmptyBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<BlockElement | null>;
7
- executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand): Promise<BlockElement | null>;
8
- }
@@ -1,4 +0,0 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
2
- import { AutoSuggestAnchor } from '../../../../@ones-editor/ui-base';
3
- import { QuickMenuItem } from './types';
4
- export declare function insertEmptyBlock(editor: OnesEditor, quickItem: QuickMenuItem, anchor: AutoSuggestAnchor): void;
@@ -1 +0,0 @@
1
- export declare const GroupOrder: Record<string, number>;
@@ -1,9 +0,0 @@
1
- import { BlockElement, CommandItemMenuType, OnesEditor } from '../../../../@ones-editor/core';
2
- import { QuickMenuCommandParams, QuickMenuItem } from './types';
3
- export interface GetAllQuickMenuItemsOptions {
4
- withPlainText: boolean;
5
- from: QuickMenuCommandParams['from'];
6
- type: CommandItemMenuType;
7
- ignoreFilter?: boolean;
8
- }
9
- export declare function getAllQuickMenuItems(editor: OnesEditor, block: BlockElement | undefined, options: GetAllQuickMenuItemsOptions): QuickMenuItem[];
@@ -1,10 +0,0 @@
1
- import { BlockCommandItem, BlockElement, DocBlock, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- export default class AlignProvider implements OnesEditorCommandProvider {
3
- private editor;
4
- id: string;
5
- constructor(editor: OnesEditor);
6
- applyAlignStyle(editor: OnesEditor, block: BlockElement, align: string): void;
7
- isChecked(blockData: DocBlock, id: string): boolean;
8
- getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): BlockCommandItem[];
9
- executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: BlockCommandItem): boolean;
10
- }
@@ -1,11 +0,0 @@
1
- import { BlockCommandItem, BlockElement, DocBlock, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- export default class ParagraphProvider implements OnesEditorCommandProvider {
3
- private editor;
4
- id: string;
5
- constructor(editor: OnesEditor);
6
- isChecked(blockData: DocBlock, id: string): boolean;
7
- getAvailableCommands(editor: OnesEditor, block: BlockElement): BlockCommandItem[];
8
- convertLink(editor: OnesEditor, range: SelectionRange, block: BlockElement): void;
9
- convertToList(editor: OnesEditor, block: BlockElement, listType: 'unordered' | 'ordered' | 'unchecked'): void;
10
- executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: BlockCommandItem): boolean;
11
- }
@@ -1,10 +0,0 @@
1
- import { BlockCommandItem, BlockElement, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- export default class BlockTurnIntoCommandProvider implements OnesEditorCommandProvider {
3
- private editor;
4
- id: string;
5
- constructor(editor: OnesEditor);
6
- getHeadingIndex(): number;
7
- getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): BlockCommandItem[];
8
- applyHeadingStyle(editor: OnesEditor, block: BlockElement, heading: number | null): void;
9
- executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: BlockCommandItem): boolean;
10
- }
@@ -1,2 +0,0 @@
1
- import { CommandItem } from '../../../../@ones-editor/core';
2
- export declare function mergeCommands(blockCommands: CommandItem[]): CommandItem[];