@ones-editor/editor 0.0.3-beta.45 → 0.0.3-beta.47

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 (63) 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/index.d.ts +1 -3
  3. package/@ones-editor/comments/src/comments-helper/utils.d.ts +1 -0
  4. package/@ones-editor/comments/src/comments-list/arrange-items.d.ts +1 -1
  5. package/@ones-editor/comments/src/comments-list/group-list.d.ts +0 -1
  6. package/@ones-editor/core/src/core/blocks/block-anchor/create-block-anchor.d.ts +0 -1
  7. package/@ones-editor/core/src/core/blocks/text-blocks/index.d.ts +0 -1
  8. package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +2 -2
  9. package/@ones-editor/core/src/core/composition/editor-input.d.ts +0 -1
  10. package/@ones-editor/core/src/core/converter/block-to-html.d.ts +2 -2
  11. package/@ones-editor/core/src/core/converter/block-to-markdown.d.ts +2 -2
  12. package/@ones-editor/core/src/core/converter/block-to-text.d.ts +2 -2
  13. package/@ones-editor/core/src/core/editor/actions/focus-to-end.d.ts +1 -0
  14. package/@ones-editor/core/src/core/index.d.ts +0 -1
  15. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +0 -1
  16. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -2
  17. package/@ones-editor/core/src/core/selection/actions/select-all.d.ts +1 -3
  18. package/@ones-editor/core/src/core/types.d.ts +2 -5
  19. package/@ones-editor/core/src/utils/dom-scroll.d.ts +1 -3
  20. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +0 -1
  21. package/@ones-editor/list-block/src/converter/index.d.ts +14 -2
  22. package/@ones-editor/list-block/src/level/decrease-level.d.ts +0 -1
  23. package/@ones-editor/list-block/src/types.d.ts +1 -2
  24. package/@ones-editor/media-embed/src/core/media-embed.d.ts +1 -3
  25. package/@ones-editor/mention/src/mention.d.ts +0 -1
  26. package/@ones-editor/scroll-container/src/dom-utils.d.ts +0 -9
  27. package/@ones-editor/scroll-container/src/index.d.ts +0 -2
  28. package/@ones-editor/scroll-container/src/observer/container-resize-observer.d.ts +1 -2
  29. package/@ones-editor/scroll-container/src/observer/locating-resize-observer.d.ts +1 -2
  30. package/@ones-editor/scroll-container/src/scroll-listener.d.ts +0 -2
  31. package/@ones-editor/scroll-container/src/types.d.ts +0 -1
  32. package/@ones-editor/table-block/src/locale/en-us.d.ts +0 -5
  33. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +0 -5
  34. package/@ones-editor/table-block/src/table-block/table-scroll-events.d.ts +0 -1
  35. package/@ones-editor/table-block/src/types.d.ts +0 -2
  36. package/@ones-editor/text-commands/src/locale/en-us.d.ts +0 -1
  37. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +0 -1
  38. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  39. package/@ones-editor/ui/src/locale/en-us.d.ts +0 -2
  40. package/@ones-editor/ui/src/locale/zh-cn.d.ts +0 -2
  41. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +0 -1
  42. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -2
  43. package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +1 -2
  44. package/@ones-editor/ui-base/src/input/create-input.d.ts +0 -1
  45. package/@ones-editor/ui-base/src/item-shortcuts/index.d.ts +0 -1
  46. package/@ones-editor/ui-base/src/list/drop-down-filterable-list.d.ts +2 -2
  47. package/@ones-editor/ui-base/src/locale/en-us.d.ts +0 -1
  48. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +0 -1
  49. package/@ones-editor/webpage-embed/src/ui/dialog.d.ts +2 -2
  50. package/@ones-editor/webpage-embed/src/webpage-embed/webpage-items.d.ts +0 -2
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.js +134 -154
  53. package/dist/types.d.ts +2 -1
  54. package/package.json +1 -2
  55. package/@ones-editor/code-block/src/code-block/code-caret.d.ts +0 -7
  56. package/@ones-editor/code-block/src/code-block/code-copy.d.ts +0 -4
  57. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-markdown.d.ts +0 -3
  58. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +0 -3
  59. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-text.d.ts +0 -3
  60. package/@ones-editor/list-block/src/converter/convert-list-to.d.ts +0 -2
  61. package/@ones-editor/list-block/src/converter/convert-to-list.d.ts +0 -14
  62. package/@ones-editor/list-block/src/level/change-multi-levels.d.ts +0 -2
  63. package/@ones-editor/ui/src/toolbar/box-only.d.ts +0 -2
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission } from '../@ones-editor/core';
1
+ import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorCommandProvider } from '../@ones-editor/core';
2
2
  import { DrawIoOptions } from '../@ones-editor/drawio-embed';
3
3
  import { MermaidEmbedOptions } from '../@ones-editor/graph-embed';
4
4
  import { ImageOptions } from '../@ones-editor/image-embed';
@@ -51,6 +51,7 @@ export interface CreateOnesEditorOptions {
51
51
  components?: {
52
52
  embeds?: Embed[];
53
53
  boxes?: Box[];
54
+ commandProviders?: OnesEditorCommandProvider[];
54
55
  };
55
56
  componentsOptions?: EditorComponentOptions;
56
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.3-beta.45",
3
+ "version": "0.0.3-beta.47",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -23,7 +23,6 @@
23
23
  "image-size": "^1.0.0",
24
24
  "js-base64": "*",
25
25
  "kiwi-intl": "^1.2.6-beta.0",
26
- "lodash": "^4.0.8",
27
26
  "lodash.camelcase": "^4.3.0",
28
27
  "lodash.clonedeep": "^4.5.0",
29
28
  "lodash.debounce": "^4.0.8",
@@ -1,7 +0,0 @@
1
- import { OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
2
- export default class OnesEditorCodeCaret implements OnesEditorCustom {
3
- private editor;
4
- constructor(editor: OnesEditor);
5
- destroy(): void;
6
- handleSelectionChange: () => void;
7
- }
@@ -1,4 +0,0 @@
1
- import { DocObject, OnesEditor, OnesEditorInputHandler } from '../../../../@ones-editor/core';
2
- export default class CopyCodeInputHandler implements OnesEditorInputHandler {
3
- handleBeforeCopy(editor: OnesEditor, event: ClipboardEvent, doc: DocObject): boolean | DocObject | undefined;
4
- }
@@ -1,3 +0,0 @@
1
- import { DocBlock, DocObject } from '../../../doc';
2
- import { OnesEditor } from '../../../types';
3
- export declare function textBlockToMarkdown(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
@@ -1,3 +0,0 @@
1
- import { DocBlockText, DocObject } from '../../../doc';
2
- import { OnesEditor } from '../../../types';
3
- export declare function textBlockToHtml(editor: OnesEditor, ops: DocBlockText, doc: DocObject): string;
@@ -1,3 +0,0 @@
1
- import { DocBlockText, DocObject } from '../../../doc';
2
- import { OnesEditor } from '../../../types';
3
- export declare function textBlockToText(editor: OnesEditor, ops: DocBlockText, doc: DocObject): string;
@@ -1,2 +0,0 @@
1
- import { BlockPath, DocBlock, DocObject, OnesEditor } from '../../../../@ones-editor/core';
2
- export declare function convertListTo(editor: OnesEditor, blockData: DocBlock, doc: DocObject, type: 'html' | 'text' | 'markdown', path: BlockPath): string;
@@ -1,14 +0,0 @@
1
- import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
2
- import { DocListBlock, ListBlockType } from '../types';
3
- type ConvertToListData = {
4
- listType?: ListBlockType;
5
- };
6
- export declare function findNearestList(srcBlock: BlockElement, type: ListBlockType): BlockElement | null;
7
- export declare function convertToList(editor: OnesEditor, srcBlock: BlockElement, options: {
8
- offset: number;
9
- data?: ConvertToListData;
10
- }): {
11
- blockData: DocListBlock;
12
- onConverted: (editor: OnesEditor, block: BlockElement) => void;
13
- } | null;
14
- export {};
@@ -1,2 +0,0 @@
1
- import { OnesEditor, SelectedBlock } from '../../../../@ones-editor/core';
2
- export declare function changeMultiBlockLevels(editor: OnesEditor, blocks: SelectedBlock[], type: 'increase' | 'decrease'): boolean;
@@ -1,2 +0,0 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
2
- export declare function isSelectBoxOnly(editor: OnesEditor): boolean;