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

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.
@@ -1,13 +1,13 @@
1
+ import { BlockElement } from '../../../../@ones-editor/core';
1
2
  import type { BlockOptions, CommandItem, OnesEditor, InsertEmptyBlockOptions } from '../../../../@ones-editor/core';
3
+ import type { QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
2
4
  export declare function addQuickMenuItemFields(item: CommandItem, options: BlockOptions): void;
3
5
  export declare function getHeadingMenuOptions(start?: number): BlockOptions;
4
- export declare function getCompleteHeadingMenuOptions(): {
5
- name: string;
6
- insertBlockCommandItems: CommandItem[];
7
- handleInsertEmptyBlock: (editor: OnesEditor, options: InsertEmptyBlockOptions) => Promise<null>;
8
- };
9
- export declare function getBasicMenuItems(): {
10
- name: string;
11
- insertBlockCommandItems: CommandItem[];
12
- handleInsertEmptyBlock: (editor: OnesEditor, options: InsertEmptyBlockOptions) => Promise<null>;
13
- };
6
+ export declare function getCompleteHeadingMenuOptions(): CommandItem[];
7
+ export declare class BasicCommandProvider implements QuickMenuCommandProvider {
8
+ getCommands(): CommandItem[];
9
+ updateBlock(editor: OnesEditor, containerId: string, block: BlockElement, item: CommandItem): null;
10
+ handleUpdateBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<null>;
11
+ handleInsertEmptyBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<null>;
12
+ executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween): Promise<BlockElement | null>;
13
+ }
@@ -6,5 +6,6 @@ export default class ParagraphProvider implements OnesEditorCommandProvider {
6
6
  isChecked(blockData: DocBlock, id: string): boolean;
7
7
  getAvailableCommands(editor: OnesEditor, block: BlockElement): BlockCommandItem[];
8
8
  convertLink(editor: OnesEditor, range: SelectionRange, block: BlockElement): void;
9
+ convertToList(editor: OnesEditor, block: BlockElement, listType: 'unordered' | 'ordered' | 'unchecked'): void;
9
10
  executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: BlockCommandItem): boolean;
10
11
  }
@@ -12,3 +12,4 @@ export * from './color-button';
12
12
  export * from './input/create-input';
13
13
  export * from './auto-suggest';
14
14
  export * from './item-shortcuts';
15
+ export * as tippy from 'tippy.js';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { OnesEditor, DocObject, OnesEditorDoc } from '../@ones-editor/core';
2
2
  import { VersionDialogOptions } from '../@ones-editor/versions';
3
- import * as tippy from 'tippy.js';
4
3
  import { CreateLocalEditorOptions, CreateOnesEditorOptions } from './types';
5
4
  import './lang';
6
5
  export * from '../@ones-editor/core';
@@ -9,7 +8,7 @@ export * from '../@ones-editor/table-block';
9
8
  export * from '../@ones-editor/code-block';
10
9
  export * from '../@ones-editor/input-handlers';
11
10
  export * from '../@ones-editor/ui';
12
- export { Popup, ManualToolbar, ManualMenu, OnesEditorAutoSuggest } from '../@ones-editor/ui-base';
11
+ export { Popup, ManualMenu, ManualToolbar, OnesEditorAutoSuggest, tippy } from '../@ones-editor/ui-base';
13
12
  export * from '../@ones-editor/drawio-embed';
14
13
  export * from '../@ones-editor/block-resizer';
15
14
  export { editorAddComment } from '../@ones-editor/comments';
@@ -17,7 +16,7 @@ export { editorShowFindDialog } from '../@ones-editor/find-dialog';
17
16
  export * from '../@ones-editor/toc';
18
17
  export * from '../@ones-editor/embed-block-helper';
19
18
  export * from './types';
20
- export { tippy, };
19
+ export { resetListStart, getListAllNextBrothers } from '../@ones-editor/list-block';
21
20
  export declare function createOnesEditor(root: HTMLElement, options: CreateOnesEditorOptions): Promise<OnesEditor>;
22
21
  export declare function createLocalEditor(root: HTMLElement, docData: DocObject | OnesEditorDoc, options: CreateLocalEditorOptions): Promise<OnesEditor>;
23
22
  export declare function showDocVersions(editor: OnesEditor, options: VersionDialogOptions): {