@ones-editor/editor 2.1.7-beta.9 → 2.1.8-beta.1

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 (205) hide show
  1. package/@ones-editor/{ui → block-menu}/src/block-menu/index.d.ts +1 -3
  2. package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +3 -0
  3. package/@ones-editor/block-menu/src/block-menu/items/index.d.ts +5 -0
  4. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +5 -0
  5. package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +30 -0
  6. package/@ones-editor/block-menu/src/block-menu/items/types.d.ts +5 -0
  7. package/@ones-editor/block-menu/src/block-menu-button/menu-button/index.d.ts +1 -1
  8. package/@ones-editor/block-padding/src/index.d.ts +1 -1
  9. package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +4 -3
  10. package/@ones-editor/callout-block/src/index.d.ts +0 -1
  11. package/@ones-editor/comments/src/index.d.ts +1 -5
  12. package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +3 -4
  13. package/@ones-editor/core/src/core/blocks/common/block-properties.d.ts +9 -9
  14. package/@ones-editor/core/src/core/blocks/common/execute-block-command.d.ts +2 -2
  15. package/@ones-editor/core/src/core/blocks/complex-blocks/child-blocks.d.ts +1 -2
  16. package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +1 -2
  17. package/@ones-editor/core/src/core/blocks/text-blocks/base/child.d.ts +7 -2
  18. package/@ones-editor/core/src/core/command-providers/commands/index.d.ts +0 -2
  19. package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +5 -2
  20. package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +14 -5
  21. package/@ones-editor/core/src/core/command-providers/index.d.ts +1 -3
  22. package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -1
  23. package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -2
  24. package/@ones-editor/core/src/core/doc/doc.d.ts +0 -3
  25. package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +0 -2
  26. package/@ones-editor/core/src/core/editor/actions/clear-selected-contents.d.ts +2 -2
  27. package/@ones-editor/core/src/core/selection/actions/index.d.ts +1 -2
  28. package/@ones-editor/core/src/core/selection/index.d.ts +0 -1
  29. package/@ones-editor/core/src/core/selection/select-handler.d.ts +3 -3
  30. package/@ones-editor/core/src/core/types.d.ts +28 -40
  31. package/@ones-editor/core/src/helper/hovering-block.d.ts +2 -2
  32. package/@ones-editor/core/src/utils/dom.d.ts +0 -3
  33. package/@ones-editor/core/src/utils/drag-drop.d.ts +3 -8
  34. package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +5 -6
  35. package/@ones-editor/file/src/locale/en-us.d.ts +0 -1
  36. package/@ones-editor/file/src/locale/ja-jp.d.ts +0 -1
  37. package/@ones-editor/file/src/locale/zh-cn.d.ts +0 -1
  38. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +19 -5
  39. package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +1 -12
  40. package/@ones-editor/image-embed/src/splitter-resizer/index.d.ts +3 -3
  41. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +0 -1
  42. package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +0 -1
  43. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +0 -1
  44. package/@ones-editor/layout-block/src/index.d.ts +0 -1
  45. package/@ones-editor/list-block/src/index.d.ts +1 -2
  46. package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +1 -12
  47. package/@ones-editor/mention/src/locale/en-us.d.ts +0 -3
  48. package/@ones-editor/mention/src/locale/ja-jp.d.ts +0 -3
  49. package/@ones-editor/mention/src/locale/zh-cn.d.ts +0 -3
  50. package/@ones-editor/mention/src/mention.d.ts +0 -15
  51. package/@ones-editor/mobile-helper/src/index.d.ts +1 -10
  52. package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +1 -4
  53. package/@ones-editor/sharedb-doc/src/index.d.ts +1 -8
  54. package/@ones-editor/table-block/src/commands/index.d.ts +0 -2
  55. package/@ones-editor/table-block/src/commands/table-block-commands.d.ts +3 -4
  56. package/@ones-editor/table-block/src/index.d.ts +2 -6
  57. package/@ones-editor/table-block/src/locale/en-us.d.ts +0 -5
  58. package/@ones-editor/table-block/src/locale/ja-jp.d.ts +0 -5
  59. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +0 -5
  60. package/@ones-editor/table-block/src/table-block/cell-menu/table-cell-dom.d.ts +0 -6
  61. package/@ones-editor/table-block/src/table-block/table-resize/resize-drag-drop.d.ts +4 -4
  62. package/@ones-editor/text-commands/src/index.d.ts +2 -1
  63. package/@ones-editor/text-commands/src/text-command-provider.d.ts +24 -0
  64. package/@ones-editor/text-commands/src/text-commands.d.ts +4 -0
  65. package/@ones-editor/{ui/src/providers/utils → text-commands/src}/text-styles.d.ts +1 -3
  66. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  67. package/@ones-editor/ui/src/index.d.ts +9 -33
  68. package/@ones-editor/ui/src/locale/en-us.d.ts +0 -5
  69. package/@ones-editor/ui/src/locale/ja-jp.d.ts +0 -5
  70. package/@ones-editor/ui/src/locale/zh-cn.d.ts +0 -5
  71. package/@ones-editor/ui/src/{providers/utils → quick-menu}/basic-commands.d.ts +2 -1
  72. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +16 -0
  73. package/@ones-editor/ui/src/quick-menu/index.d.ts +19 -7
  74. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -0
  75. package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +4 -0
  76. package/@ones-editor/ui/src/quick-menu/order.d.ts +1 -0
  77. package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +9 -0
  78. package/@ones-editor/ui/src/quick-menu/types.d.ts +5 -2
  79. package/@ones-editor/{ui-base → ui}/src/text-button/index.d.ts +1 -1
  80. package/@ones-editor/ui/src/toolbar/commands/align.d.ts +10 -0
  81. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +11 -0
  82. package/@ones-editor/ui/src/toolbar/commands/turn-into.d.ts +10 -0
  83. package/@ones-editor/ui/src/toolbar/merge-commands.d.ts +2 -0
  84. package/@ones-editor/ui/src/toolbar/text-commands.d.ts +2 -2
  85. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +0 -3
  86. package/@ones-editor/ui/src/tooltips/index.d.ts +21 -9
  87. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +1 -2
  88. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +1 -1
  89. package/@ones-editor/ui-base/src/color-button/color-button.d.ts +0 -1
  90. package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +2 -9
  91. package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +1 -1
  92. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +2 -3
  93. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +1 -3
  94. package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +0 -1
  95. package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -4
  96. package/@ones-editor/ui-base/src/icons/index.d.ts +1 -5
  97. package/@ones-editor/ui-base/src/index.d.ts +0 -2
  98. package/@ones-editor/ui-base/src/input/create-input.d.ts +3 -23
  99. package/@ones-editor/ui-base/src/locale/en-us.d.ts +0 -1
  100. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +0 -1
  101. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +0 -1
  102. package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -1
  103. package/@ones-editor/versions/src/constant/index.d.ts +1 -0
  104. package/@ones-editor/versions/src/history-render/index.d.ts +1 -1
  105. package/@ones-editor/versions/src/history-tooltip/index.d.ts +10 -0
  106. package/@ones-editor/versions/src/version-dialog/index.d.ts +1 -0
  107. package/dist/comments/local-doc-comments-provider.d.ts +1 -2
  108. package/dist/index.d.ts +4 -65
  109. package/dist/index.js +26170 -30610
  110. package/dist/types.d.ts +1 -11
  111. package/package.json +1 -1
  112. package/@ones-editor/comments/src/comments-helper/old-version-comment.d.ts +0 -16
  113. package/@ones-editor/core/src/core/command-providers/abstract-providers.d.ts +0 -25
  114. package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +0 -14
  115. package/@ones-editor/core/src/core/command-providers/commands/inject-source.d.ts +0 -3
  116. package/@ones-editor/core/src/core/command-providers/commands/merge-commands.d.ts +0 -4
  117. package/@ones-editor/layout-block/src/command-filter.d.ts +0 -6
  118. package/@ones-editor/main-toolbar/package.json +0 -7
  119. package/@ones-editor/main-toolbar/src/index.d.ts +0 -18
  120. package/@ones-editor/main-toolbar/src/items/comment.d.ts +0 -8
  121. package/@ones-editor/main-toolbar/src/items/find.d.ts +0 -8
  122. package/@ones-editor/main-toolbar/src/items/font-style.d.ts +0 -40
  123. package/@ones-editor/main-toolbar/src/items/image.d.ts +0 -8
  124. package/@ones-editor/main-toolbar/src/items/index.d.ts +0 -16
  125. package/@ones-editor/main-toolbar/src/items/insert.d.ts +0 -12
  126. package/@ones-editor/main-toolbar/src/items/link.d.ts +0 -11
  127. package/@ones-editor/main-toolbar/src/items/list.d.ts +0 -29
  128. package/@ones-editor/main-toolbar/src/items/paragraph.d.ts +0 -14
  129. package/@ones-editor/main-toolbar/src/items/quote.d.ts +0 -11
  130. package/@ones-editor/main-toolbar/src/items/separator.d.ts +0 -7
  131. package/@ones-editor/main-toolbar/src/items/text-align.d.ts +0 -21
  132. package/@ones-editor/main-toolbar/src/items/text-color.d.ts +0 -48
  133. package/@ones-editor/main-toolbar/src/items/undo.d.ts +0 -18
  134. package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +0 -9
  135. package/@ones-editor/main-toolbar/src/locale/index.d.ts +0 -1
  136. package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +0 -9
  137. package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +0 -9
  138. package/@ones-editor/main-toolbar/src/types.d.ts +0 -5
  139. package/@ones-editor/media-embed/src/utils/dom.d.ts +0 -2
  140. package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +0 -14
  141. package/@ones-editor/mobile-helper/src/fixed-toolbar/active-observer.d.ts +0 -11
  142. package/@ones-editor/mobile-helper/src/fixed-toolbar/fixed-providers.d.ts +0 -6
  143. package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +0 -21
  144. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/align-dropdown.d.ts +0 -9
  145. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/group.d.ts +0 -7
  146. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +0 -15
  147. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert.d.ts +0 -8
  148. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/paragraph.d.ts +0 -9
  149. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/tab-provider.d.ts +0 -10
  150. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/text-dropdown.d.ts +0 -9
  151. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/turn-into.d.ts +0 -8
  152. package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +0 -11
  153. package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +0 -9
  154. package/@ones-editor/mobile-helper/src/locale/index.d.ts +0 -1
  155. package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +0 -9
  156. package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +0 -9
  157. package/@ones-editor/mobile-helper/src/selection-gripper/index.d.ts +0 -19
  158. package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +0 -3
  159. package/@ones-editor/sharedb-doc/src/doc/sharedb-client-base.d.ts +0 -24
  160. package/@ones-editor/sharedb-doc/src/doc/sharedb-local-doc.d.ts +0 -17
  161. package/@ones-editor/table-block/src/commands/table-command-provider.d.ts +0 -12
  162. package/@ones-editor/ui/src/block-menu/block-command-providers.d.ts +0 -8
  163. package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +0 -10
  164. package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +0 -9
  165. package/@ones-editor/ui/src/providers/align-dropdown.d.ts +0 -10
  166. package/@ones-editor/ui/src/providers/align.d.ts +0 -11
  167. package/@ones-editor/ui/src/providers/block-hook-provider.d.ts +0 -16
  168. package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +0 -19
  169. package/@ones-editor/ui/src/providers/color-provider.d.ts +0 -18
  170. package/@ones-editor/ui/src/providers/edit-link-provider.d.ts +0 -6
  171. package/@ones-editor/ui/src/providers/heading.d.ts +0 -13
  172. package/@ones-editor/ui/src/providers/inline-code-provider.d.ts +0 -10
  173. package/@ones-editor/ui/src/providers/inline-style-provider.d.ts +0 -10
  174. package/@ones-editor/ui/src/providers/insert-above.d.ts +0 -9
  175. package/@ones-editor/ui/src/providers/insert-after.d.ts +0 -9
  176. package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +0 -12
  177. package/@ones-editor/ui/src/providers/insert-group.d.ts +0 -7
  178. package/@ones-editor/ui/src/providers/insert-menu.d.ts +0 -16
  179. package/@ones-editor/ui/src/providers/link.d.ts +0 -12
  180. package/@ones-editor/ui/src/providers/list.d.ts +0 -13
  181. package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +0 -10
  182. package/@ones-editor/ui/src/providers/paragraph.d.ts +0 -9
  183. package/@ones-editor/ui/src/providers/proxy-provider.d.ts +0 -9
  184. package/@ones-editor/ui/src/providers/quoted.d.ts +0 -10
  185. package/@ones-editor/ui/src/providers/script-with-dropdown.d.ts +0 -9
  186. package/@ones-editor/ui/src/providers/text-command-provider.d.ts +0 -16
  187. package/@ones-editor/ui/src/providers/text-fixed-provider.d.ts +0 -16
  188. package/@ones-editor/ui/src/providers/text-script-provider.d.ts +0 -10
  189. package/@ones-editor/ui/src/providers/text-styles.d.ts +0 -9
  190. package/@ones-editor/ui/src/providers/turn-into.d.ts +0 -9
  191. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +0 -2
  192. package/@ones-editor/ui/src/providers/utils/clipboard.d.ts +0 -6
  193. package/@ones-editor/ui/src/providers/utils/index.d.ts +0 -2
  194. package/@ones-editor/ui/src/providers/utils/inject-block-options.d.ts +0 -8
  195. package/@ones-editor/ui/src/providers/utils/text-commands.d.ts +0 -3
  196. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +0 -8
  197. package/@ones-editor/ui/src/readonly-toolbar/add-comment-to-old-doc.d.ts +0 -23
  198. package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +0 -29
  199. package/@ones-editor/ui/src/readonly-toolbar/types.d.ts +0 -12
  200. package/@ones-editor/ui/src/toolbar/link-commands.d.ts +0 -11
  201. package/@ones-editor/ui/src/utils/hide-toolbar.d.ts +0 -2
  202. package/@ones-editor/ui-base/src/mobile-command-bar/init-menu-item.d.ts +0 -3
  203. package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +0 -23
  204. package/dist/auto-new-line.d.ts +0 -7
  205. /package/@ones-editor/{ui → block-menu}/src/block-menu/standard-block-actions/hook.d.ts +0 -0
package/dist/types.d.ts CHANGED
@@ -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';
11
+ import { QuickMenuOptions } from '../@ones-editor/ui/src/quick-menu';
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';
@@ -56,15 +56,10 @@ export interface CreateOnesEditorOptions {
56
56
  disableLogout?: boolean;
57
57
  enableComments?: boolean;
58
58
  enableContextMenu?: boolean;
59
- floatingToolbar?: boolean;
60
- blockMenuButton?: boolean;
61
- headingButton?: boolean;
62
- compact?: boolean;
63
59
  scrollContainer?: HTMLElement;
64
60
  lang?: i18n.LANGS;
65
61
  logLevel?: LogLevel;
66
62
  hideTitle?: boolean;
67
- autoNewLine?: boolean;
68
63
  placeholder?: {
69
64
  applyContentPlaceholder?: (editor: OnesEditor) => boolean;
70
65
  };
@@ -95,10 +90,6 @@ export interface CreateLocalEditorOptions {
95
90
  lang?: i18n.LANGS;
96
91
  logLevel?: LogLevel;
97
92
  scrollContainer?: HTMLElement;
98
- floatingToolbar?: boolean;
99
- blockMenuButton?: boolean;
100
- headingButton?: boolean;
101
- compact?: boolean;
102
93
  components?: {
103
94
  blocks?: Block[];
104
95
  embeds?: Embed[];
@@ -112,5 +103,4 @@ export interface CreateLocalEditorOptions {
112
103
  events?: EditorEvents;
113
104
  componentsOptions?: EditorComponentOptions;
114
105
  hideTitle?: boolean;
115
- autoNewLine?: boolean;
116
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.7-beta.9",
3
+ "version": "2.1.8-beta.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,16 +0,0 @@
1
- import { DocObject, OnesEditor, OnesEditorComment, OnesEditorDocRange, SelectionRange } from '../../../../@ones-editor/core';
2
- export interface AddCommentToOldVersionBody {
3
- avatarUrl: string;
4
- containerId: string;
5
- rangeType: 'simple' | 'complex';
6
- range: OnesEditorDocRange;
7
- selectedContainers: string[];
8
- commentId?: string;
9
- commentGroupId?: string;
10
- comment: DocObject;
11
- abstract?: string;
12
- }
13
- export declare function addCommentToOldVersion(editor: OnesEditor, version: number, range: SelectionRange, comment: OnesEditorComment, commentDoc: DocObject): Promise<void>;
14
- export declare function replyCommentToOldVersion(editor: OnesEditor, version: number, comment: OnesEditorComment, commentDoc: DocObject): Promise<unknown>;
15
- export declare function updateCommentToOldDoc(editor: OnesEditor, version: number, commentId: string, commentDoc: DocObject): Promise<unknown>;
16
- export declare function deleteCommentFromOldDoc(editor: OnesEditor, version: number, commentId: string): Promise<unknown>;
@@ -1,25 +0,0 @@
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 {};
@@ -1,14 +0,0 @@
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,3 +0,0 @@
1
- import { CommandItemWithSource } from '../../types';
2
- export declare const injectSource: (commands: CommandItemWithSource[], source?: string[]) => void;
3
- export declare const getSourceList: (source: string) => string[];
@@ -1,4 +0,0 @@
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,6 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,18 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
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
- }
@@ -1,40 +0,0 @@
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 {};
@@ -1,8 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
1
- import { TextColorItem } from '../../../../@ones-editor/ui-base';
2
- import { OnesEditor } from '../../../../@ones-editor/core';
3
- import { FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, InlineCodeItem, SubscriptItem, SuperscriptItem } from './font-style';
4
- import { InsertImageItem } from './image';
5
- import { InsertLinkItem } from './link';
6
- import { OrderedListItem, UnorderedListItem, CheckListItem } from './list';
7
- import { ParagraphItem } from './paragraph';
8
- import { QuoteItem } from './quote';
9
- import { SeparatorItem } from './separator';
10
- import { AlignLeftItem, AlignCenterItem, AlignRightItem } from './text-align';
11
- import { RedoItem, UndoItem } from './undo';
12
- import { InsertItem } from './insert';
13
- import { FindReplaceItem } from './find';
14
- import { CommentItem } from './comment';
15
- export declare function getToolbarDefaultItems(editor: OnesEditor): (TextColorItem | FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertImageItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | CommentItem)[];
16
- export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, TextColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, };
@@ -1,12 +0,0 @@
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
- }
@@ -1,11 +0,0 @@
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
- }
@@ -1,29 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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
- }
@@ -1,11 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,21 +0,0 @@
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
- }
@@ -1,48 +0,0 @@
1
- import { CommandItemChildrenPlacement, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
2
- import { TextColorItem as ColorItem } from '../../../../@ones-editor/ui-base';
3
- import { ColorStyleProvider } from '../../../../@ones-editor/ui';
4
- import { ToolbarItem } from '../types';
5
- export declare class TextColorItem extends ColorItem 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
- clickToClose?: boolean | undefined;
44
- } | null;
45
- handleChangeColor(type: 'color' | 'backgroundColor' | 'clearColor', value: number): void;
46
- handleMousedown: (event: MouseEvent) => void;
47
- updateState(editor: OnesEditor): void;
48
- }
@@ -1,18 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- toolbar: {
3
- undo: string;
4
- redo: string;
5
- insert: string;
6
- findReplace: string;
7
- };
8
- };
9
- export default _default;
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- toolbar: {
3
- undo: string;
4
- redo: string;
5
- insert: string;
6
- findReplace: string;
7
- };
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- toolbar: {
3
- undo: string;
4
- redo: string;
5
- insert: string;
6
- findReplace: string;
7
- };
8
- };
9
- export default _default;
@@ -1,5 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { BlockElement } from '../../../../@ones-editor/core';
2
- export declare const isVideoBlock: (block: BlockElement) => boolean;
@@ -1,14 +0,0 @@
1
- import { type CommandItem, type OnesEditor } from '../../../@ones-editor/core';
2
- export declare class CursorToolbarHandler {
3
- private editor;
4
- private toolbar;
5
- constructor(editor: OnesEditor);
6
- handleButtonClick: (toolbar: any, item: CommandItem) => void;
7
- private handleSelectionChange;
8
- getCommands: () => CommandItem[];
9
- showToolbar: () => void;
10
- close: () => void;
11
- destroy(): void;
12
- }
13
- export declare const createCursorToolbar: (editor: OnesEditor) => CursorToolbarHandler;
14
- export declare const hideCursorToolbar: (editor: OnesEditor) => void;
@@ -1,11 +0,0 @@
1
- export type Options = {
2
- onFocused: () => void;
3
- onBlurred: () => void;
4
- };
5
- export declare class ActiveElementObserver {
6
- private options;
7
- constructor(options: Options);
8
- handleFocusIn: () => void;
9
- handleFocusOut: () => void;
10
- destroy(): void;
11
- }
@@ -1,6 +0,0 @@
1
- import { AbstractProvider, OnesEditor, OnesEditorCommandProviders } from '../../../../@ones-editor/core';
2
- export declare class FixedProviders extends AbstractProvider implements OnesEditorCommandProviders {
3
- protected editor: OnesEditor;
4
- id: string;
5
- constructor(editor: OnesEditor);
6
- }
@@ -1,21 +0,0 @@
1
- /// <reference types="lodash" />
2
- import { OnesEditor } from '../../../../@ones-editor/core';
3
- import './mobile.scss';
4
- export declare class MobileCommandHandler {
5
- private editor;
6
- private commandBar;
7
- private observer;
8
- constructor(editor: OnesEditor);
9
- destroy(): void;
10
- private showKeyboard;
11
- private initViewportHeight;
12
- private get isKeyboardShow();
13
- private get virtualViewportHeight();
14
- private get clientHeight();
15
- private get virtualViewportOffsetTop();
16
- private get window();
17
- private setDebugInfo;
18
- toggle: import("lodash").DebouncedFunc<() => void>;
19
- handleFocusIn: () => void;
20
- handleFocusOut: () => void;
21
- }
@@ -1,9 +0,0 @@
1
- import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class AlignDropdownProvider extends ProxyProvider implements OnesEditorCommandProvider {
4
- private editor;
5
- id: string;
6
- constructor(editor: OnesEditor);
7
- getInsertCommands: () => never[];
8
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
9
- }
@@ -1,7 +0,0 @@
1
- import { OnesEditor, OnesEditorCommandProvider } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class GroupProvider extends ProxyProvider implements OnesEditorCommandProvider {
4
- private editor;
5
- id: string;
6
- constructor(editor: OnesEditor);
7
- }
@@ -1,15 +0,0 @@
1
- import { BlockElement, CommandItem, CommandParams, ContainerElement, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class InsertMenuProvider extends ProxyProvider {
4
- private editor;
5
- id: string;
6
- get whiteList(): string[];
7
- providers: OnesEditorCommandProvider[];
8
- constructor(editor: OnesEditor);
9
- getNextBlock(container: ContainerElement, block: BlockElement): number;
10
- getInsertCommands: () => CommandItem[];
11
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
12
- executeInsertCommand: () => boolean;
13
- getNextBlockIndex: (container: ContainerElement, block: BlockElement) => number;
14
- executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams) => boolean;
15
- }
@@ -1,8 +0,0 @@
1
- import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class InsertProvider extends ProxyProvider implements OnesEditorCommandProvider {
4
- private editor;
5
- id: string;
6
- constructor(editor: OnesEditor);
7
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
8
- }
@@ -1,9 +0,0 @@
1
- import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class ParagraphProvider extends ProxyProvider implements OnesEditorCommandProvider {
4
- private editor;
5
- id: string;
6
- groupIndex: number;
7
- constructor(editor: OnesEditor);
8
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
9
- }
@@ -1,10 +0,0 @@
1
- import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- export default class TabProvider implements OnesEditorCommandProvider {
3
- private editor;
4
- id: string;
5
- constructor(editor: OnesEditor);
6
- isDisabled: (block: BlockElement) => boolean;
7
- getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
8
- getInsertCommands: () => never[];
9
- executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
10
- }
@@ -1,9 +0,0 @@
1
- import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class TextDropdownProvider extends ProxyProvider implements OnesEditorCommandProvider {
4
- private editor;
5
- id: string;
6
- constructor(editor: OnesEditor);
7
- getInsertCommands: () => never[];
8
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
9
- }
@@ -1,8 +0,0 @@
1
- import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
- import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
- export default class TurnIntoCommandProvider extends ProxyProvider implements OnesEditorCommandProvider {
4
- private editor;
5
- id: string;
6
- constructor(editor: OnesEditor);
7
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
8
- }