@ones-editor/editor 0.0.3-beta.49 → 0.0.3-beta.50

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 (74) hide show
  1. package/@ones-editor/block-menu/src/block-menu-button/drag-drop/find-preview-element.d.ts +1 -1
  2. package/@ones-editor/code-block/src/code-block/caption/caption-input-handler.d.ts +2 -2
  3. package/@ones-editor/code-block/src/code-block/code-caret.d.ts +7 -0
  4. package/@ones-editor/code-block/src/code-block/code-copy.d.ts +4 -0
  5. package/@ones-editor/code-block/src/code-block/create-empty-code.d.ts +2 -2
  6. package/@ones-editor/code-block/src/code-block/index.d.ts +3 -1
  7. package/@ones-editor/code-block/src/code-block/settings/index.d.ts +3 -0
  8. package/@ones-editor/comments/src/comments-helper/utils.d.ts +0 -1
  9. package/@ones-editor/comments/src/comments-list/arrange-items.d.ts +1 -1
  10. package/@ones-editor/comments/src/comments-list/group-list.d.ts +1 -0
  11. package/@ones-editor/core/src/core/blocks/block-anchor/create-block-anchor.d.ts +1 -0
  12. package/@ones-editor/core/src/core/blocks/text-blocks/index.d.ts +1 -0
  13. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-markdown.d.ts +3 -0
  14. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +3 -0
  15. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-text.d.ts +3 -0
  16. package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +2 -2
  17. package/@ones-editor/core/src/core/composition/editor-input.d.ts +3 -0
  18. package/@ones-editor/core/src/core/converter/block-to-html.d.ts +2 -2
  19. package/@ones-editor/core/src/core/converter/block-to-markdown.d.ts +2 -2
  20. package/@ones-editor/core/src/core/converter/block-to-text.d.ts +2 -2
  21. package/@ones-editor/core/src/core/editor/actions/focus-to-end.d.ts +0 -1
  22. package/@ones-editor/core/src/core/index.d.ts +1 -0
  23. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +3 -0
  24. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -2
  25. package/@ones-editor/core/src/core/selection/actions/select-all.d.ts +3 -1
  26. package/@ones-editor/core/src/core/selection/actions/select-block.d.ts +2 -0
  27. package/@ones-editor/core/src/core/selection/actions/word-offset.d.ts +1 -1
  28. package/@ones-editor/core/src/core/selection/editor-selection.d.ts +1 -0
  29. package/@ones-editor/core/src/core/types.d.ts +9 -4
  30. package/@ones-editor/core/src/utils/dom-scroll.d.ts +3 -1
  31. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +1 -0
  32. package/@ones-editor/image-embed/package.json +2 -1
  33. package/@ones-editor/image-embed/src/drag-drop/drag-handler.d.ts +4 -0
  34. package/@ones-editor/list-block/src/converter/convert-list-to.d.ts +2 -0
  35. package/@ones-editor/list-block/src/converter/convert-to-list.d.ts +14 -0
  36. package/@ones-editor/list-block/src/converter/index.d.ts +2 -14
  37. package/@ones-editor/list-block/src/level/change-multi-levels.d.ts +2 -0
  38. package/@ones-editor/list-block/src/level/decrease-level.d.ts +1 -0
  39. package/@ones-editor/list-block/src/types.d.ts +2 -1
  40. package/@ones-editor/markdown-to-doc/src/markdown-to-doc.d.ts +1 -0
  41. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/latex.d.ts +4 -0
  42. package/@ones-editor/media-embed/src/core/media-embed.d.ts +3 -1
  43. package/@ones-editor/mention/src/mention.d.ts +1 -0
  44. package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
  45. package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -2
  46. package/@ones-editor/scroll-container/src/dom-utils.d.ts +9 -0
  47. package/@ones-editor/scroll-container/src/index.d.ts +2 -0
  48. package/@ones-editor/scroll-container/src/observer/container-resize-observer.d.ts +2 -1
  49. package/@ones-editor/scroll-container/src/observer/locating-resize-observer.d.ts +2 -1
  50. package/@ones-editor/scroll-container/src/scroll-listener.d.ts +2 -0
  51. package/@ones-editor/scroll-container/src/types.d.ts +1 -0
  52. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  53. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  54. package/@ones-editor/table-block/src/table-block/table-scroll-events.d.ts +1 -0
  55. package/@ones-editor/table-block/src/types.d.ts +2 -0
  56. package/@ones-editor/text-commands/src/locale/en-us.d.ts +1 -0
  57. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +1 -0
  58. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  59. package/@ones-editor/ui/src/locale/en-us.d.ts +2 -0
  60. package/@ones-editor/ui/src/locale/zh-cn.d.ts +2 -0
  61. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +1 -0
  62. package/@ones-editor/ui/src/toolbar/box-only.d.ts +2 -0
  63. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +2 -1
  64. package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +2 -1
  65. package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
  66. package/@ones-editor/ui-base/src/item-shortcuts/index.d.ts +1 -0
  67. package/@ones-editor/ui-base/src/list/drop-down-filterable-list.d.ts +2 -2
  68. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  69. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  70. package/@ones-editor/webpage-embed/src/ui/dialog.d.ts +2 -2
  71. package/@ones-editor/webpage-embed/src/webpage-embed/webpage-items.d.ts +2 -0
  72. package/dist/index.d.ts +2 -2
  73. package/dist/index.js +160 -135
  74. package/package.json +3 -1
@@ -32,7 +32,9 @@ declare const _default: {
32
32
  alignLeft: string;
33
33
  alignRight: string;
34
34
  alignCenter: string;
35
+ alignGroup: string;
35
36
  heading: string;
37
+ headingGroup: string;
36
38
  text: string;
37
39
  };
38
40
  commandDesc: {
@@ -32,7 +32,9 @@ declare const _default: {
32
32
  alignLeft: string;
33
33
  alignRight: string;
34
34
  alignCenter: string;
35
+ alignGroup: string;
35
36
  heading: string;
37
+ headingGroup: string;
36
38
  text: string;
37
39
  };
38
40
  commandDesc: {
@@ -8,6 +8,7 @@ export declare function getInlineBoxItems(): {
8
8
  icon: string;
9
9
  order: number;
10
10
  group: string;
11
+ subText: string;
11
12
  }[];
12
13
  handleInsertEmptyBlock: typeof handleInsertEmptyBlock;
13
14
  };
@@ -0,0 +1,2 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ export declare function isSelectBoxOnly(editor: OnesEditor): boolean;
@@ -1,6 +1,7 @@
1
1
  import { BlockElement, CommandItem, OnesEditor, OnesEditorHoveringBlockFilter } from '../../../../@ones-editor/core';
2
2
  import { AbstractCommandBar } from '../../../../@ones-editor/ui-base';
3
3
  import { OnesEditorToolbarBase } from './types';
4
+ export type ShowToolbarReason = 'click' | 'selectionChange';
4
5
  export default class OnesEditorToolbar implements OnesEditorHoveringBlockFilter, OnesEditorToolbarBase {
5
6
  private editor;
6
7
  private toolbar;
@@ -24,7 +25,7 @@ export default class OnesEditorToolbar implements OnesEditorHoveringBlockFilter,
24
25
  handleDocumentMouseUp: () => void;
25
26
  private handleHoveringBlockChildChange;
26
27
  handleSelectionChange: import("lodash").DebouncedFunc<(editor: OnesEditor) => void>;
27
- update(): void;
28
+ update(reason: ShowToolbarReason): void;
28
29
  private showTextToolbar;
29
30
  private showObjectToolbar;
30
31
  static register(editor: OnesEditor): OnesEditorToolbar;
@@ -1,3 +1,4 @@
1
1
  import OnesEditorAutoSuggest from './auto-suggest';
2
2
  import type { AutoSuggestAnchor, AutoSuggestOptions } from './auto-suggest';
3
- export { OnesEditorAutoSuggest, AutoSuggestAnchor, AutoSuggestOptions };
3
+ import { shouldFocusToEditor } from './should-focus-to-editor';
4
+ export { OnesEditorAutoSuggest, AutoSuggestAnchor, AutoSuggestOptions, shouldFocusToEditor };
@@ -11,4 +11,5 @@ export declare function createInput(parent: HTMLElement, options: {
11
11
  getField: () => HTMLInputElement;
12
12
  getInputValue: () => string;
13
13
  setFieldError: (error: string) => void;
14
+ focus: () => void;
14
15
  };
@@ -1,3 +1,4 @@
1
1
  import type { CommandItem } from '../../../../@ones-editor/core';
2
+ export declare function getShortcutById(id: string): string;
2
3
  export declare function getItemShortcut(item: CommandItem): string;
3
4
  export declare function getItemMarkdown(item: CommandItem): string;
@@ -1,8 +1,8 @@
1
1
  import { CommandItem } from '../../../../@ones-editor/core';
2
- import { Instance } from 'tippy.js';
2
+ import { Popup } from '../popup';
3
3
  import FilterableList, { FilterableListOptions } from './filterable-list';
4
4
  export default class DropdownFilterableList extends FilterableList {
5
- tippyInstance: Instance;
5
+ popup: Popup;
6
6
  onShow: ((list: DropdownFilterableList) => void) | null;
7
7
  onHide: ((list: DropdownFilterableList) => void) | null;
8
8
  custom: unknown | null;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  colorPalette: {
3
3
  colorDesc: string;
4
+ name: string;
4
5
  backgroundDesc: string;
5
6
  reset: string;
6
7
  };
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  colorDesc: string;
4
4
  backgroundDesc: string;
5
5
  reset: string;
6
+ name: string;
6
7
  };
7
8
  search: {
8
9
  emptyTips: string;
@@ -9,8 +9,8 @@ export declare class Dialog extends ManualCloseDialog {
9
9
  private _options;
10
10
  constructor(content: HTMLElement, options: ChildOptions);
11
11
  private getReferenceClientRect;
12
- private onOk;
13
- private onClose;
12
+ handleOk: () => Promise<void>;
13
+ handleClose: () => void;
14
14
  show(): void;
15
15
  destroy(): void;
16
16
  }
@@ -4,6 +4,7 @@ export declare const getCommandItems: () => ({
4
4
  id: string;
5
5
  icon: string;
6
6
  group: string;
7
+ subText: string;
7
8
  order?: undefined;
8
9
  } | {
9
10
  id: string;
@@ -11,5 +12,6 @@ export declare const getCommandItems: () => ({
11
12
  icon: string;
12
13
  group: string;
13
14
  order: number;
15
+ subText: string;
14
16
  })[];
15
17
  export declare function handleInsertEmptyEmbed(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<import("@ones-editor/core").BlockElement | null>;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { OnesEditor, DocObject, OnesEditorDoc } from '../@ones-editor/core';
2
2
  import { VersionDialogOptions } from '../@ones-editor/versions';
3
- import { CreateLocalEditorOptions, CreateOnesEditorOptions } from './types';
4
3
  import * as tippy from 'tippy.js';
4
+ import { CreateLocalEditorOptions, CreateOnesEditorOptions } from './types';
5
5
  import './lang';
6
6
  export * from '../@ones-editor/core';
7
7
  export * from '../@ones-editor/sharedb-doc';
@@ -9,7 +9,7 @@ export * from '../@ones-editor/table-block';
9
9
  export * from '../@ones-editor/code-block';
10
10
  export * from '../@ones-editor/input-handlers';
11
11
  export * from '../@ones-editor/ui';
12
- export { Popup, ManualMenu, OnesEditorAutoSuggest } from '../@ones-editor/ui-base';
12
+ export { Popup, ManualToolbar, ManualMenu, OnesEditorAutoSuggest } from '../@ones-editor/ui-base';
13
13
  export * from '../@ones-editor/drawio-embed';
14
14
  export * from '../@ones-editor/block-resizer';
15
15
  export { editorAddComment } from '../@ones-editor/comments';