@ones-editor/editor 2.1.7-beta.6 → 2.1.7-beta.8

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 (171) hide show
  1. package/@ones-editor/block-menu/src/block-menu-button/menu-button/index.d.ts +1 -1
  2. package/@ones-editor/block-menu/src/index.d.ts +0 -1
  3. package/@ones-editor/block-padding/src/index.d.ts +1 -1
  4. package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +3 -4
  5. package/@ones-editor/callout-block/src/index.d.ts +1 -0
  6. package/@ones-editor/comments/src/index.d.ts +2 -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/execute-block-command.d.ts +2 -2
  9. package/@ones-editor/core/src/core/command-providers/abstract-providers.d.ts +25 -0
  10. package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +14 -0
  11. package/@ones-editor/core/src/core/command-providers/commands/index.d.ts +2 -0
  12. package/@ones-editor/core/src/core/command-providers/commands/inject-source.d.ts +3 -0
  13. package/@ones-editor/core/src/core/command-providers/commands/merge-commands.d.ts +4 -0
  14. package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +2 -5
  15. package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +5 -14
  16. package/@ones-editor/core/src/core/command-providers/index.d.ts +3 -1
  17. package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -1
  18. package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -2
  19. package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +2 -0
  20. package/@ones-editor/core/src/core/editor/actions/clear-selected-contents.d.ts +2 -2
  21. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -1
  22. package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
  23. package/@ones-editor/core/src/core/selection/select-handler.d.ts +3 -3
  24. package/@ones-editor/core/src/core/types.d.ts +29 -26
  25. package/@ones-editor/core/src/helper/hovering-block.d.ts +2 -2
  26. package/@ones-editor/core/src/utils/dom.d.ts +3 -0
  27. package/@ones-editor/core/src/utils/drag-drop.d.ts +8 -3
  28. package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +6 -5
  29. package/@ones-editor/file/src/locale/en-us.d.ts +1 -0
  30. package/@ones-editor/file/src/locale/ja-jp.d.ts +1 -0
  31. package/@ones-editor/file/src/locale/zh-cn.d.ts +1 -0
  32. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -19
  33. package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +12 -1
  34. package/@ones-editor/image-embed/src/splitter-resizer/index.d.ts +3 -3
  35. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
  36. package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
  37. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
  38. package/@ones-editor/layout-block/src/command-filter.d.ts +6 -0
  39. package/@ones-editor/layout-block/src/index.d.ts +1 -0
  40. package/@ones-editor/list-block/src/index.d.ts +2 -1
  41. package/@ones-editor/main-toolbar/src/items/font-style.d.ts +1 -1
  42. package/@ones-editor/main-toolbar/src/items/link.d.ts +1 -1
  43. package/@ones-editor/main-toolbar/src/items/list.d.ts +4 -4
  44. package/@ones-editor/main-toolbar/src/items/quote.d.ts +1 -1
  45. package/@ones-editor/main-toolbar/src/items/text-color.d.ts +37 -0
  46. package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +12 -1
  47. package/@ones-editor/media-embed/src/utils/dom.d.ts +2 -0
  48. package/@ones-editor/mention/src/locale/en-us.d.ts +3 -0
  49. package/@ones-editor/mention/src/locale/ja-jp.d.ts +3 -0
  50. package/@ones-editor/mention/src/locale/zh-cn.d.ts +3 -0
  51. package/@ones-editor/mention/src/mention.d.ts +15 -0
  52. package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +14 -0
  53. package/@ones-editor/mobile-helper/src/fixed-toolbar/active-observer.d.ts +11 -0
  54. package/@ones-editor/mobile-helper/src/fixed-toolbar/fixed-providers.d.ts +6 -0
  55. package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +21 -0
  56. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/align-dropdown.d.ts +9 -0
  57. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/group.d.ts +7 -0
  58. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +15 -0
  59. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert.d.ts +8 -0
  60. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/paragraph.d.ts +9 -0
  61. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/tab-provider.d.ts +10 -0
  62. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/text-dropdown.d.ts +9 -0
  63. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/turn-into.d.ts +8 -0
  64. package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +11 -0
  65. package/@ones-editor/mobile-helper/src/index.d.ts +10 -1
  66. package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +9 -0
  67. package/@ones-editor/mobile-helper/src/locale/index.d.ts +1 -0
  68. package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +9 -0
  69. package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +9 -0
  70. package/@ones-editor/mobile-helper/src/selection-gripper/index.d.ts +19 -0
  71. package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +3 -0
  72. package/@ones-editor/table-block/src/commands/index.d.ts +2 -0
  73. package/@ones-editor/table-block/src/commands/table-block-commands.d.ts +4 -3
  74. package/@ones-editor/table-block/src/commands/table-command-provider.d.ts +12 -0
  75. package/@ones-editor/table-block/src/index.d.ts +6 -2
  76. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  77. package/@ones-editor/table-block/src/locale/ja-jp.d.ts +5 -0
  78. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  79. package/@ones-editor/table-block/src/table-block/cell-menu/table-cell-dom.d.ts +6 -0
  80. package/@ones-editor/table-block/src/table-block/table-resize/resize-drag-drop.d.ts +4 -4
  81. package/@ones-editor/text-commands/src/index.d.ts +1 -2
  82. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  83. package/@ones-editor/ui/src/block-menu/block-command-providers.d.ts +8 -0
  84. package/@ones-editor/{block-menu → ui}/src/block-menu/index.d.ts +3 -1
  85. package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +10 -0
  86. package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +9 -0
  87. package/@ones-editor/ui/src/index.d.ts +29 -8
  88. package/@ones-editor/ui/src/locale/en-us.d.ts +5 -0
  89. package/@ones-editor/ui/src/locale/ja-jp.d.ts +5 -0
  90. package/@ones-editor/ui/src/locale/zh-cn.d.ts +5 -0
  91. package/@ones-editor/ui/src/providers/align-dropdown.d.ts +10 -0
  92. package/@ones-editor/ui/src/providers/align.d.ts +11 -0
  93. package/@ones-editor/ui/src/providers/block-hook-provider.d.ts +16 -0
  94. package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +19 -0
  95. package/@ones-editor/ui/src/providers/color-provider.d.ts +18 -0
  96. package/@ones-editor/ui/src/providers/edit-link-provider.d.ts +6 -0
  97. package/@ones-editor/ui/src/providers/heading.d.ts +13 -0
  98. package/@ones-editor/ui/src/providers/inline-code-provider.d.ts +10 -0
  99. package/@ones-editor/ui/src/providers/inline-style-provider.d.ts +10 -0
  100. package/@ones-editor/ui/src/providers/insert-above.d.ts +9 -0
  101. package/@ones-editor/ui/src/providers/insert-after.d.ts +9 -0
  102. package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +12 -0
  103. package/@ones-editor/ui/src/providers/insert-group.d.ts +7 -0
  104. package/@ones-editor/ui/src/providers/insert-menu.d.ts +16 -0
  105. package/@ones-editor/ui/src/providers/link.d.ts +12 -0
  106. package/@ones-editor/ui/src/providers/list.d.ts +13 -0
  107. package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +10 -0
  108. package/@ones-editor/ui/src/providers/paragraph.d.ts +9 -0
  109. package/@ones-editor/ui/src/providers/proxy-provider.d.ts +9 -0
  110. package/@ones-editor/ui/src/providers/quoted.d.ts +10 -0
  111. package/@ones-editor/ui/src/providers/script-with-dropdown.d.ts +9 -0
  112. package/@ones-editor/ui/src/providers/text-command-provider.d.ts +16 -0
  113. package/@ones-editor/ui/src/providers/text-fixed-provider.d.ts +16 -0
  114. package/@ones-editor/ui/src/providers/text-script-provider.d.ts +10 -0
  115. package/@ones-editor/ui/src/providers/text-styles.d.ts +9 -0
  116. package/@ones-editor/ui/src/providers/turn-into.d.ts +9 -0
  117. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +2 -0
  118. package/@ones-editor/ui/src/{quick-menu → providers/utils}/basic-commands.d.ts +1 -2
  119. package/@ones-editor/ui/src/providers/utils/clipboard.d.ts +6 -0
  120. package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
  121. package/@ones-editor/ui/src/providers/utils/inject-block-options.d.ts +8 -0
  122. package/@ones-editor/ui/src/providers/utils/text-commands.d.ts +3 -0
  123. package/@ones-editor/{text-commands/src → ui/src/providers/utils}/text-styles.d.ts +3 -1
  124. package/@ones-editor/ui/src/quick-menu/index.d.ts +7 -19
  125. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +8 -0
  126. package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -5
  127. package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +0 -1
  128. package/@ones-editor/ui/src/toolbar/link-commands.d.ts +4 -0
  129. package/@ones-editor/ui/src/toolbar/text-commands.d.ts +2 -2
  130. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
  131. package/@ones-editor/ui/src/utils/hide-toolbar.d.ts +2 -0
  132. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -1
  133. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +1 -1
  134. package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +7 -1
  135. package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +1 -1
  136. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +3 -2
  137. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +3 -1
  138. package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +1 -0
  139. package/@ones-editor/ui-base/src/command-bar/types.d.ts +4 -1
  140. package/@ones-editor/ui-base/src/icons/index.d.ts +5 -1
  141. package/@ones-editor/ui-base/src/index.d.ts +2 -0
  142. package/@ones-editor/ui-base/src/input/create-input.d.ts +23 -3
  143. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  144. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +1 -0
  145. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  146. package/@ones-editor/ui-base/src/mobile-command-bar/init-menu-item.d.ts +3 -0
  147. package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +23 -0
  148. package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -1
  149. package/@ones-editor/{ui → ui-base}/src/text-button/index.d.ts +1 -1
  150. package/dist/auto-new-line.d.ts +7 -0
  151. package/dist/index.d.ts +7 -4
  152. package/dist/index.js +16894 -13833
  153. package/dist/types.d.ts +3 -1
  154. package/package.json +1 -1
  155. package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +0 -3
  156. package/@ones-editor/block-menu/src/block-menu/items/index.d.ts +0 -5
  157. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +0 -5
  158. package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +0 -30
  159. package/@ones-editor/block-menu/src/block-menu/items/types.d.ts +0 -5
  160. package/@ones-editor/text-commands/src/text-command-provider.d.ts +0 -24
  161. package/@ones-editor/text-commands/src/text-commands.d.ts +0 -4
  162. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +0 -16
  163. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +0 -8
  164. package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +0 -4
  165. package/@ones-editor/ui/src/quick-menu/order.d.ts +0 -1
  166. package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +0 -9
  167. package/@ones-editor/ui/src/toolbar/commands/align.d.ts +0 -10
  168. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +0 -11
  169. package/@ones-editor/ui/src/toolbar/commands/turn-into.d.ts +0 -10
  170. package/@ones-editor/ui/src/toolbar/merge-commands.d.ts +0 -2
  171. /package/@ones-editor/{block-menu → ui}/src/block-menu/standard-block-actions/hook.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
2
+ import { BlockMenu } from '../../../../../@ones-editor/ui';
2
3
  import EmptyBlockMenu from '../../empty-block-menu';
3
- import BlockMenu from '../../block-menu';
4
4
  export default class OnesEditorBlockMenuButton {
5
5
  private editor;
6
6
  buttonElement: HTMLButtonElement;
@@ -3,4 +3,3 @@ import OnesEditorBlockHighlighter from './highlight-block';
3
3
  import './locale';
4
4
  import './style.scss';
5
5
  export { OnesEditorBlockMenuButton, OnesEditorBlockHighlighter };
6
- export * from './block-menu/items/insert-block-items';
@@ -7,4 +7,4 @@ declare const BlockPaddingShortcuts: {
7
7
  Backspace: typeof handleBackspace;
8
8
  };
9
9
  export * from './utils';
10
- export { BlockPaddingRender, BlockPaddingShortcuts, };
10
+ export { BlockPaddingRender, BlockPaddingShortcuts, handleShiftTab, handleTab, };
@@ -1,8 +1,7 @@
1
- import { OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
2
- import type { QuickMenuItem, QuickMenuItemFilter } from '../../../../@ones-editor/ui';
3
- export declare class CalloutQuickMenuItemFilter implements QuickMenuItemFilter, OnesEditorCustom {
1
+ import { CommandFilter, CommandItemWithSource, OnesEditor, OnesEditorCustom, SelectionRange } from '../../../../@ones-editor/core';
2
+ export declare class CalloutQuickMenuItemFilter implements CommandFilter, OnesEditorCustom {
4
3
  constructor(editor: OnesEditor);
5
- filter(editor: OnesEditor, items: QuickMenuItem[], from: string): QuickMenuItem[];
4
+ filter(editor: OnesEditor, range: SelectionRange, items: CommandItemWithSource[], source: string[]): CommandItemWithSource[];
6
5
  destroy(): void;
7
6
  static init(editor: OnesEditor): CalloutQuickMenuItemFilter;
8
7
  }
@@ -1,3 +1,4 @@
1
1
  import './index.scss';
2
2
  import './locale';
3
3
  export { CalloutBlock } from './callout-block';
4
+ export { CalloutQuickMenuItemFilter } from './callout-block/callout-quick-menu-item-filter';
@@ -1,10 +1,11 @@
1
1
  import { OnesEditorComments } from './comments';
2
2
  import './style.scss';
3
+ import CommentsCommandProvider from './text-comments/comments-command-provider';
3
4
  import './locale';
4
5
  export * from './types';
5
6
  export { OnesEditorCommentsRender } from './comments-render';
6
7
  export { OnesEditorCommentPlaceholderHandler } from './comment-placeholder-handler';
7
- export { OnesEditorComments };
8
+ export { OnesEditorComments, CommentsCommandProvider };
8
9
  export type { CommentItem } from './comment-item';
9
10
  export type { CommentGroupItem } from './comments-list/group-item';
10
11
  export { removeCommentFromBlock } from './actions/remove-comment-from-block';
@@ -1,12 +1,13 @@
1
- import { BlockCommandItem, BlockCommandItemWithSource, BlockElement, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
1
+ import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
2
2
  import { OnesEditorCommentsProvider } from '../types';
3
3
  import type { OnesEditorComments } from '../comments';
4
4
  export default class CommentsCommandProvider implements OnesEditorCommandProvider {
5
5
  private provider;
6
6
  private editorComments;
7
7
  id: string;
8
+ groupIndex: number;
8
9
  constructor(provider: OnesEditorCommentsProvider, editorComments: OnesEditorComments);
9
- getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): BlockCommandItem[];
10
+ getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
10
11
  hideToolbar(editor: OnesEditor): void;
11
- executeRangeCommand(editor: OnesEditor, range: SelectionRange, command: BlockCommandItemWithSource, params: CommandParams, result: CommandResult): boolean;
12
+ executeRangeCommand(editor: OnesEditor, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult): boolean;
12
13
  }
@@ -1,3 +1,3 @@
1
- import { BlockCommandItemWithSource, BlockElement, CommandItem, OnesEditor } from '../../types';
1
+ import { BlockElement, CommandItem, CommandItemWithSource, OnesEditor } from '../../types';
2
2
  export declare function executeEmbedBlockCommand(editor: OnesEditor, block: BlockElement, commandGroup: string, item: CommandItem): unknown;
3
- export declare function executeBlockCommand(editor: OnesEditor, block: BlockElement, commandGroup: string, item: BlockCommandItemWithSource): unknown;
3
+ export declare function executeBlockCommand(editor: OnesEditor, block: BlockElement, commandGroup: string, item: CommandItemWithSource): unknown;
@@ -0,0 +1,25 @@
1
+ import { OnesEditor, OnesEditorCommandProviders, OnesEditorCommandProvider, SelectionRange, CommandParams, CommandItemWithSource, CommandFilterId, CommandFilter, CommandResult, BlockElement } from '../types';
2
+ type RangeCommandResult = {
3
+ [index: string]: CommandResult;
4
+ };
5
+ export declare abstract class AbstractProvider implements OnesEditorCommandProviders {
6
+ protected editor: OnesEditor;
7
+ abstract id: string;
8
+ commandProviders: OnesEditorCommandProvider[];
9
+ commandFilters: Map<string | number | symbol, CommandFilter>;
10
+ constructor(editor: OnesEditor);
11
+ addFilter(id: CommandFilterId, filter: CommandFilter): void;
12
+ registerCommandProvider: (provider: OnesEditorCommandProvider) => void;
13
+ getCommandProviders: () => OnesEditorCommandProvider[];
14
+ getCommandProvider: (id: string) => OnesEditorCommandProvider;
15
+ filterItems: (range: SelectionRange, items: CommandItemWithSource[]) => CommandItemWithSource[];
16
+ getCommands(range: SelectionRange): CommandItemWithSource[];
17
+ executeBlockCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result: RangeCommandResult) => boolean;
18
+ executeRangeCommand: (range: SelectionRange, command: CommandItemWithSource, params: CommandParams) => {
19
+ [index: string]: CommandResult;
20
+ };
21
+ executeCommand(range: SelectionRange, command: CommandItemWithSource, params: CommandParams): {
22
+ [index: string]: CommandResult;
23
+ };
24
+ }
25
+ export {};
@@ -0,0 +1,14 @@
1
+ import { DocBlockTextAttributes } from '../doc';
2
+ import { CommandParams, OnesEditor, OnesEditorCustom } from '../types';
3
+ export default class BlockAttributesHandler implements OnesEditorCustom {
4
+ private editor;
5
+ private textBlockAttributes;
6
+ private activeBlockAttributes;
7
+ constructor(editor: OnesEditor);
8
+ clear: () => void;
9
+ destroy(): void;
10
+ getEmptyBlockTextAttributes(blockId: string): DocBlockTextAttributes | undefined;
11
+ setActiveBlockAttributes: (attributes: CommandParams) => void;
12
+ setEmptyBlockTextAttributes: (blockId: string, attributes: CommandParams) => void;
13
+ setActiveAttribute: (attribute: string, value: unknown) => void;
14
+ }
@@ -1,2 +1,4 @@
1
1
  export * from './intersection-commands';
2
2
  export * from './range-commands';
3
+ export * from './merge-commands';
4
+ export * from './inject-source';
@@ -0,0 +1,3 @@
1
+ import { CommandItemWithSource } from '../../types';
2
+ export declare const injectSource: (commands: CommandItemWithSource[], source?: string[]) => void;
3
+ export declare const getSourceList: (source: string) => string[];
@@ -0,0 +1,4 @@
1
+ import { CommandItem } from '../../types';
2
+ export declare function mergeCommands(blockCommands: CommandItem[]): CommandItem[];
3
+ export declare const flatCommands: (allCommands: Map<number, CommandItem[]>, sort?: boolean) => CommandItem[];
4
+ export declare const groupEachCommand: (allCommands: CommandItem[]) => CommandItem[];
@@ -1,5 +1,2 @@
1
- import { BlockCommandItemWithSource, CommandParams, CommandResult, SelectionRange } from '../../types';
2
- export declare function getRangeCommands(range: SelectionRange, source: string): BlockCommandItemWithSource[];
3
- export declare function executeRangeCommand(range: SelectionRange, command: BlockCommandItemWithSource, params: CommandParams): {
4
- [index: string]: CommandResult;
5
- };
1
+ import { CommandItemWithSource, BlockElement, OnesEditor, SelectionRange, OnesEditorCommandProvider } from '../../types';
2
+ export declare function getBlockCommands(providers: OnesEditorCommandProvider[], editor: OnesEditor, block: BlockElement, range: SelectionRange, source: string): CommandItemWithSource[];
@@ -1,15 +1,6 @@
1
- import { DocBlockTextAttributes } from '../doc';
2
- import { OnesEditor, OnesEditorCommandProviders, OnesEditorCommandProvider, SelectionRange, CommandParams, BlockCommandItemWithSource } from '../types';
3
- export default class EditorCommandProviders implements OnesEditorCommandProviders {
4
- private editor;
5
- private providers;
6
- constructor(editor: OnesEditor);
7
- registerCommandProvider(provider: OnesEditorCommandProvider): void;
8
- getCommandProviders(): OnesEditorCommandProvider[];
9
- getCommandProvider(id: string): OnesEditorCommandProvider;
10
- getCommands(range: SelectionRange, source: string): BlockCommandItemWithSource[];
11
- executeCommand(range: SelectionRange, command: BlockCommandItemWithSource, params: CommandParams): {
12
- [index: string]: import("../types").CommandResult;
13
- };
14
- getEmptyBlockTextAttributes(editor: OnesEditor, blockId: string): DocBlockTextAttributes | undefined;
1
+ import { CommandItemWithSource, OnesEditorCommandProviders, SelectionRange } from '../types';
2
+ import { AbstractProvider } from './abstract-providers';
3
+ export default class EditorCommandProviders extends AbstractProvider implements OnesEditorCommandProviders {
4
+ id: string;
5
+ getCommands(range: SelectionRange): CommandItemWithSource[];
15
6
  }
@@ -1,3 +1,5 @@
1
1
  import EditorCommandProviders from './editor-command-providers';
2
+ import BlockAttributesHandler from './block-attributes';
3
+ import { AbstractProvider } from './abstract-providers';
2
4
  export * from './commands';
3
- export { EditorCommandProviders };
5
+ export { EditorCommandProviders, BlockAttributesHandler, AbstractProvider };
@@ -34,7 +34,7 @@ export declare class EditorInput implements OnesEditorInput {
34
34
  isInDisableScrollMask(target: Node): boolean;
35
35
  handleWindowBlur: () => void;
36
36
  handleWindowFocus: () => void;
37
- handleDocumentClick: (event: MouseEvent) => void;
37
+ handleDocumentClick: (event: MouseEvent | TouchEvent) => void;
38
38
  handleDocumentSelectionChange: () => void;
39
39
  handleEditorSelectionChanged: () => void;
40
40
  handleReadonlyChanged: () => void;
@@ -15,9 +15,9 @@ export declare class RootContainer {
15
15
  handleClick: (event: MouseEvent) => void;
16
16
  handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
17
17
  handleDblClick: (event: MouseEvent) => void;
18
- handleMouseDown: (event: MouseEvent) => void;
18
+ handleMouseDown: (event: TouchEvent | MouseEvent) => void;
19
19
  handleMouseMove: (event: MouseEvent) => void;
20
- handleMouseUp: (event: MouseEvent) => void;
20
+ handleMouseUp: (event: MouseEvent | TouchEvent) => void;
21
21
  handleCaptureClick: (event: MouseEvent) => void;
22
22
  handleCaptureDbClick: (event: MouseEvent) => void;
23
23
  reload(): void;
@@ -14,6 +14,8 @@ export declare function rangeRemoveAttribute(offset: number, length: number, tex
14
14
  export declare function getAttributesAt(text: DocBlockText, offset: number): DocBlockTextAttributes | undefined;
15
15
  export type DocBlockTextProcessor = (op: DocBlockTextOp) => DocBlockTextOp;
16
16
  export declare function rangeTransformText(offset: number, length: number, text: DocBlockText, processor: DocBlockTextProcessor): DocBlockText;
17
+ export declare function deleteColor(op: DocBlockTextOp, type: 'color' | 'backgroundColor'): void;
18
+ export declare function addColor(op: DocBlockTextOp, type: 'color' | 'backgroundColor', value: number): void;
17
19
  export declare function rangeSetTextColor(offset: number, length: number, docText: DocBlockText, type: 'color' | 'backgroundColor', value: number | null): DocBlockText;
18
20
  export declare function getColorFromAttributes(attributes?: DocBlockTextAttributes): [number | null, number | null];
19
21
  export declare function setColorToAttributes(attributes: DocBlockTextAttributes, type: 'color' | 'backgroundColor', value: number | null): void;
@@ -1,2 +1,2 @@
1
- import { OnesEditor } from '../../types';
2
- export declare function editorClearSelectedContents(editor: OnesEditor): void;
1
+ import { OnesEditor, SelectionRange } from '../../types';
2
+ export declare function editorClearSelectedContents(editor: OnesEditor, selectionRange?: SelectionRange): void;
@@ -23,4 +23,5 @@ import { editorMovePageDown } from './move-page-down';
23
23
  import { editorSelectPageUp } from './select-page-up';
24
24
  import { editorSelectPageDown } from './select-page-down';
25
25
  import { editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks } from './select-all';
26
- export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks, };
26
+ import { editorSelectWord } from './select-word';
27
+ export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorSelectWord, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks, };
@@ -1,3 +1,4 @@
1
1
  export * from './editor-position';
2
2
  export * from './range';
3
3
  export * from './range-from-point';
4
+ export * from './adjust-selection-pos';
@@ -4,16 +4,16 @@ export declare class EditorSelectionHandler implements OnesEditorSelectionHandle
4
4
  editor: OnesEditor;
5
5
  startPos: BlockPosition | null;
6
6
  lastCaretRect: DOMRect;
7
- mouseDownEvent: MouseEvent | null;
7
+ mouseDownEvent: TouchEvent | MouseEvent | null;
8
8
  autoScroll: AutoScroll | null;
9
9
  constructor(editor: OnesEditor);
10
10
  isSelecting(): boolean;
11
11
  stopSelection(): void;
12
- handleMouseDown: (event: MouseEvent, options: {
12
+ handleMouseDown: (event: MouseEvent | TouchEvent, options: {
13
13
  autoScroll: boolean;
14
14
  }) => void;
15
15
  handleMouseMove: (event: MouseEvent) => void;
16
- handleMouseUp: (event: MouseEvent) => void;
16
+ handleMouseUp: (event: MouseEvent | TouchEvent) => void;
17
17
  handleDblClick(event: MouseEvent): void;
18
18
  handleTripleClick(event: MouseEvent): void;
19
19
  }
@@ -126,7 +126,6 @@ export interface Closeable {
126
126
  click: (item: CommandItem, target: HTMLElement) => void;
127
127
  }
128
128
  export type CommandItemChildrenPlacement = 'auto' | 'top' | 'left' | 'right' | 'bottom' | 'auto-start' | 'auto-end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
129
- export type CommandItemMenuType = 'inline' | 'sibling';
130
129
  export interface CommandItem {
131
130
  id: string;
132
131
  name: string;
@@ -137,13 +136,15 @@ export interface CommandItem {
137
136
  type?: CommandItemType;
138
137
  element?: HTMLElement | ((item: CommandItem) => HTMLElement);
139
138
  icon?: string;
140
- childrenType?: 'menu' | 'toolbar';
139
+ childrenType?: 'menu' | 'toolbar' | 'mobile-bottom-menu';
141
140
  children?: CommandItem[];
142
141
  childrenMenuId?: string;
143
142
  data?: unknown;
144
143
  group?: string;
145
144
  groupOrder?: number;
146
145
  dropdown?: boolean;
146
+ dropSplit?: boolean;
147
+ splitTooltip?: string;
147
148
  manualShowChildren?: boolean;
148
149
  childrenPlacement?: CommandItemChildrenPlacement;
149
150
  childrenOffset?: [number, number];
@@ -152,25 +153,17 @@ export interface CommandItem {
152
153
  defaultCheckedChildren?: string[];
153
154
  ellipsisTooltip?: string;
154
155
  disableTooltip?: boolean;
156
+ tooltipPlacement?: CommandItemChildrenPlacement;
155
157
  disableReason?: string;
156
158
  hideGroupItem?: boolean;
157
159
  setCloseable?: (closeable: Closeable) => void;
158
160
  beforePopup?: (parent: unknown) => void;
159
- /**
160
- * defaults to true
161
- */
162
- shouldShown?: (currentBlock: BlockElement | undefined, menuType: CommandItemMenuType) => boolean;
161
+ switchable?: boolean;
163
162
  /**
164
163
  * defaults to true
165
164
  */
166
165
  clickToClose?: boolean;
167
166
  }
168
- export interface BlockCommandItem extends CommandItem {
169
- blockId: string;
170
- blockType: string;
171
- blockKind: BlockKind;
172
- groupIndex: number;
173
- }
174
167
  export type StyleType = boolean | string | number;
175
168
  export type BlockStyles = {
176
169
  [index: string]: StyleType;
@@ -668,11 +661,11 @@ export interface OnesEditorInput {
668
661
  export interface OnesEditorSelectionHandler {
669
662
  isSelecting: () => boolean;
670
663
  stopSelection: () => void;
671
- handleMouseDown: (event: MouseEvent, options: {
664
+ handleMouseDown: (event: MouseEvent | TouchEvent, options: {
672
665
  autoScroll: boolean;
673
666
  }) => void;
674
667
  handleMouseMove: (event: MouseEvent) => void;
675
- handleMouseUp: (event: MouseEvent) => void;
668
+ handleMouseUp: (event: MouseEvent | TouchEvent) => void;
676
669
  handleDblClick: (event: MouseEvent) => void;
677
670
  handleTripleClick: (event: MouseEvent) => void;
678
671
  }
@@ -723,32 +716,42 @@ export interface OnesEditorInsertions {
723
716
  }
724
717
  export type CommandParams = {
725
718
  [index: string]: unknown;
719
+ } & {
720
+ source?: string[];
726
721
  };
727
722
  export type CommandResult = {
728
723
  [index: string]: unknown;
729
724
  };
730
725
  export interface OnesEditorCommandProvider {
731
726
  id: string;
732
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => BlockCommandItem[];
733
- executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams, result: CommandResult) => boolean;
734
- filterCommands?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, commands: BlockCommandItemWithSource[]) => BlockCommandItemWithSource[] | undefined;
735
- beforeExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams) => boolean | undefined;
736
- afterExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams, result: CommandResult) => void;
737
- getEmptyBlockTextAttributes?: (editor: OnesEditor, blockId: string) => DocBlockTextAttributes | undefined;
738
- executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: BlockCommandItemWithSource, params: CommandParams, result: CommandResult) => boolean;
739
- }
740
- export interface BlockCommandItemWithSource extends BlockCommandItem {
727
+ groupIndex?: number;
728
+ getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
729
+ getInsertCommands?: (editor: OnesEditor, containerId: string) => CommandItem[];
730
+ executeInsertCommand?: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItem, params: CommandParams, result?: CommandResult) => boolean;
731
+ executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
732
+ executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult) => boolean;
733
+ filterCommands?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, commands: CommandItemWithSource[]) => CommandItemWithSource[] | undefined;
734
+ beforeExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams) => boolean | undefined;
735
+ afterExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result: CommandResult) => void;
736
+ }
737
+ export interface CommandItemWithSource extends CommandItem {
741
738
  source: string;
742
739
  }
740
+ export interface CommandFilter {
741
+ filter: (editor: OnesEditor, range: SelectionRange, items: CommandItemWithSource[], source: string[]) => CommandItemWithSource[];
742
+ }
743
+ export type CommandFilterId = keyof any;
743
744
  export interface OnesEditorCommandProviders {
745
+ commandFilters?: Map<CommandFilterId, CommandFilter>;
746
+ addFilter?: (id: CommandFilterId, filter: CommandFilter) => void;
747
+ filterItems?: (range: SelectionRange, items: CommandItemWithSource[]) => CommandItemWithSource[];
744
748
  registerCommandProvider: (provider: OnesEditorCommandProvider) => void;
745
749
  getCommandProviders: () => OnesEditorCommandProvider[];
746
750
  getCommandProvider: (id: string) => OnesEditorCommandProvider;
747
- getCommands: (range: SelectionRange, source: string) => BlockCommandItemWithSource[];
748
- executeCommand: (range: SelectionRange, item: BlockCommandItemWithSource, params: CommandParams) => {
751
+ getCommands: (range: SelectionRange) => CommandItemWithSource[];
752
+ executeCommand: (range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => {
749
753
  [index: string]: CommandResult;
750
754
  };
751
- getEmptyBlockTextAttributes: (editor: OnesEditor, blockId: string) => DocBlockTextAttributes | undefined;
752
755
  }
753
756
  export interface EditorDocLocalActionCallbacks {
754
757
  onBeforeUpdateBlockText: (containerId: string, blockId: string, oldText: DocBlockText, newText: DocBlockText, newRange: OnesEditorDocRange) => void;
@@ -15,8 +15,8 @@ export interface OnesEditorHoveringBlockFinder extends OnesEditorCustom {
15
15
  export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHoveringBlockEvents> {
16
16
  private editor;
17
17
  private hoveringBlock;
18
- private hoveringElem;
19
- private hoveringTextChild;
18
+ hoveringElem: EventTarget | null;
19
+ hoveringTextChild: TextBlockContentChild | null;
20
20
  private filters;
21
21
  private finders;
22
22
  constructor(editor: OnesEditor);
@@ -37,4 +37,7 @@ export declare function bindKeyDownEvent(input: HTMLInputElement | HTMLTextAreaE
37
37
  export declare function getElementFromPoint(x: number, y: number, options?: {
38
38
  noFilter: boolean;
39
39
  }): Element;
40
+ export declare function ensureIsMobileEvent(events: MouseEvent | TouchEvent): events is TouchEvent;
41
+ export declare function createMouseEventFromTouchEvent(event: TouchEvent, type: 'mousedown' | 'mousemove' | 'mouseup' | 'click'): MouseEvent;
42
+ export declare function bindTouchEnd(elem: HTMLElement | Document, callback: (e: any) => void): void;
40
43
  export {};
@@ -1,6 +1,6 @@
1
- export type DragStartHandler<T> = (drag: DragDrop<T>, event: MouseEvent, elem: HTMLElement) => void;
2
- export type DraggingHandler<T> = (drag: DragDrop<T>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
3
- export type DragEndHandler<T> = (drag: DragDrop<T>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
1
+ export type DragStartHandler<T> = (drag: DragDrop<T>, event: MouseEvent | TouchEvent, elem: HTMLElement) => void;
2
+ export type DraggingHandler<T> = (drag: DragDrop<T>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
3
+ export type DragEndHandler<T> = (drag: DragDrop<T>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
4
4
  export interface DragDropOptions<T> {
5
5
  elem: HTMLElement;
6
6
  onDragStart: DragStartHandler<T>;
@@ -10,6 +10,7 @@ export interface DragDropOptions<T> {
10
10
  minThreshold?: number;
11
11
  cursor?: string;
12
12
  mouseDownEvent?: MouseEvent;
13
+ mobile?: boolean;
13
14
  }
14
15
  export declare const MIN_DISTANCE_THRESHOLD = 3;
15
16
  export declare class DragDrop<T> {
@@ -37,5 +38,9 @@ export declare class DragDrop<T> {
37
38
  private onDragging;
38
39
  private onDragEnd;
39
40
  destroy(): void;
41
+ static getEventPosition(event: MouseEvent | TouchEvent): {
42
+ x: number;
43
+ y: number;
44
+ };
40
45
  }
41
46
  export declare function registerDragDrop<T>(options: DragDropOptions<T>): DragDrop<T>;
@@ -1,12 +1,13 @@
1
1
  import { BlockCommands, BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
2
- export type PresetCommandId = 'edit' | 'add-comment';
3
- export interface StandardEmbedBlockProperties<T = PresetCommandId> {
2
+ export type CommandId = 'edit' | 'add-comment' | 'separator';
3
+ export interface StandardEmbedBlockProperties<T = CommandId> {
4
4
  presetIds?: T[];
5
- extCommands?: CommandItem[];
5
+ extIds?: T[];
6
+ extCommands?: CommandItem[] | ((editor: OnesEditor, block: BlockElement) => CommandItem[]);
6
7
  handleExecuteCommand?: (editor: OnesEditor, block: BlockElement, item: CommandItem) => boolean;
7
8
  }
8
9
  export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement): boolean;
9
- export declare class StandardEmbedBlockCommands<T = PresetCommandId> implements BlockCommands {
10
+ export declare class StandardEmbedBlockCommands<T = CommandId> implements BlockCommands {
10
11
  protected editor: OnesEditor;
11
12
  protected block: BlockElement;
12
13
  protected properties?: StandardEmbedBlockProperties<T> | undefined;
@@ -18,6 +19,6 @@ export declare class StandardEmbedBlockCommands<T = PresetCommandId> implements
18
19
  }
19
20
  export declare function getStandardEmbedBlockProperties(editor: OnesEditor, block: BlockElement, properties?: StandardEmbedBlockProperties): {
20
21
  blockCommands: {
21
- 'hovering-toolbar': StandardEmbedBlockCommands<PresetCommandId>;
22
+ 'hovering-toolbar': StandardEmbedBlockCommands<CommandId>;
22
23
  };
23
24
  };
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  toLink: string;
7
7
  toCard: string;
8
8
  comment: string;
9
+ preview: string;
9
10
  };
10
11
  };
11
12
  };
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  toLink: string;
7
7
  toCard: string;
8
8
  comment: string;
9
+ preview: string;
9
10
  };
10
11
  };
11
12
  };
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  toLink: string;
7
7
  toCard: string;
8
8
  comment: string;
9
+ preview: string;
9
10
  };
10
11
  };
11
12
  };
@@ -1,25 +1,11 @@
1
1
  import { BlockElement } from '../../../../@ones-editor/core';
2
- import { StandardEmbedBlockCommands } from '../../../../@ones-editor/embed-block-helper';
3
- import type { CommandItem, OnesEditor } from '../../../../@ones-editor/core';
4
- import type { StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
5
- export type PresetCommandId = 'edit' | 'help';
2
+ import type { OnesEditor } from '../../../../@ones-editor/core';
3
+ import { CommandId, type StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
6
4
  export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
7
- export type GraphEmbedBlockProperties = StandardEmbedBlockProperties<PresetCommandId>;
8
- declare class GraphBlockCommands extends StandardEmbedBlockCommands<PresetCommandId> {
9
- editor: OnesEditor;
10
- block: BlockElement;
11
- graphType: GraphType;
12
- properties?: GraphEmbedBlockProperties | undefined;
13
- group: string;
14
- _commands: CommandItem[];
15
- constructor(editor: OnesEditor, block: BlockElement, graphType: GraphType, properties?: GraphEmbedBlockProperties | undefined);
16
- get commands(): CommandItem[];
17
- executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
18
- }
5
+ export type GraphEmbedBlockProperties = StandardEmbedBlockProperties;
19
6
  export declare function getGraphEmbedBlockProperties(editor: OnesEditor, block: BlockElement, type: 'mermaid' | 'flowchart' | 'plantuml', properties?: GraphEmbedBlockProperties): {
7
+ abstract: string;
20
8
  blockCommands: {
21
- 'hovering-toolbar': GraphBlockCommands;
9
+ 'hovering-toolbar': import("@ones-editor/embed-block-helper").StandardEmbedBlockCommands<CommandId>;
22
10
  };
23
- abstract: string;
24
11
  };
25
- export {};
@@ -10,13 +10,24 @@ export default class ImageHoveringToolbarCommands implements BlockCommands {
10
10
  name: string;
11
11
  icon: string;
12
12
  type?: undefined;
13
+ groupOrder?: undefined;
14
+ order?: undefined;
13
15
  } | {
14
16
  id: string;
15
17
  name: string;
16
18
  type: CommandItemType;
17
19
  icon?: undefined;
20
+ groupOrder?: undefined;
21
+ order?: undefined;
22
+ } | {
23
+ id: string;
24
+ name: string;
25
+ icon: string;
26
+ groupOrder: number;
27
+ order: number;
28
+ type?: undefined;
18
29
  })[];
19
- private createIconItem;
30
+ isHoveringImageEmpty: () => boolean;
20
31
  get commands(): CommandItem[];
21
32
  executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
22
33
  }
@@ -11,7 +11,7 @@ export declare class ImageSplitterResizer implements DragDropOptions<ImageSplitt
11
11
  cursor: string;
12
12
  initWidths: number[];
13
13
  constructor(editor: OnesEditor, elem: HTMLElement, data: ImageSplitterResizerData, mouseDownEvent: MouseEvent);
14
- onDragStart(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent, elem: HTMLElement): void;
15
- onDragging(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
16
- onDragEnd(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
14
+ onDragStart(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent | TouchEvent, elem: HTMLElement): void;
15
+ onDragging(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
16
+ onDragEnd(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
17
17
  }
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  mention: string;
7
7
  quote: string;
8
8
  title: string;
9
+ mobileDefault: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  mention: string;
7
7
  quote: string;
8
8
  title: string;
9
+ mobileDefault: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  mention: string;
7
7
  quote: string;
8
8
  title: string;
9
+ mobileDefault: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -0,0 +1,6 @@
1
+ import { CommandFilter, CommandItemWithSource, OnesEditor, OnesEditorCustom, SelectionRange } from '../../../@ones-editor/core';
2
+ export declare class LayoutQuickMenuItemFilter implements CommandFilter, OnesEditorCustom {
3
+ filter(editor: OnesEditor, range: SelectionRange, items: CommandItemWithSource[], source: string[]): CommandItemWithSource[];
4
+ destroy(): void;
5
+ static init(editor: OnesEditor): LayoutQuickMenuItemFilter;
6
+ }
@@ -4,3 +4,4 @@ import { LayoutKindBlock } from './types';
4
4
  export declare const LayoutBlock: LayoutKindBlock;
5
5
  export { isLayoutBlock } from './utils';
6
6
  export * from './caption';
7
+ export { LayoutQuickMenuItemFilter } from './command-filter';
@@ -7,8 +7,9 @@ import { resetListStart } from './start/reset-list-start';
7
7
  import './lang';
8
8
  import './style.scss';
9
9
  import { ListPasteHandler } from './local-events/paste-handler';
10
+ import { handleTab, handleShiftTab } from './keyboard/tab';
10
11
  export { type ListOptions, type DocListBlock } from './types';
11
12
  declare const ListBlock: TextKindBlock;
12
13
  export * from './utils';
13
14
  export * from './keyboard/to-text-block';
14
- export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart, toMindmap, isMindmapRootBlock, ListBlockShortcuts, isViewingAsMindmap, getLastMindmapNode, ListPasteHandler, };
15
+ export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart, toMindmap, isMindmapRootBlock, ListBlockShortcuts, isViewingAsMindmap, getLastMindmapNode, ListPasteHandler, handleTab, handleShiftTab, };