@ones-editor/editor 2.1.7-beta.15 → 2.1.7-beta.17

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 (44) hide show
  1. package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +2 -0
  2. package/@ones-editor/core/src/core/containers/root-container.d.ts +0 -3
  3. package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +1 -0
  4. package/@ones-editor/core/src/core/editor/index.d.ts +1 -1
  5. package/@ones-editor/core/src/core/types.d.ts +6 -0
  6. package/@ones-editor/core/src/utils/animate-scroll.d.ts +2 -0
  7. package/@ones-editor/core/src/utils/dom.d.ts +2 -2
  8. package/@ones-editor/mention/src/mention.d.ts +9 -3
  9. package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +1 -1
  10. package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +4 -5
  11. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +2 -4
  12. package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +3 -1
  13. package/@ones-editor/mobile-helper/src/index.d.ts +2 -1
  14. package/@ones-editor/sharedb-doc/src/types.d.ts +3 -3
  15. package/@ones-editor/table-block/src/index.d.ts +2 -5
  16. package/@ones-editor/text-commands/src/index.d.ts +0 -1
  17. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  18. package/@ones-editor/ui/src/locale/en-us.d.ts +9 -0
  19. package/@ones-editor/ui/src/locale/ja-jp.d.ts +9 -0
  20. package/@ones-editor/ui/src/locale/zh-cn.d.ts +9 -0
  21. package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +4 -1
  22. package/@ones-editor/ui/src/providers/selection-provider.d.ts +9 -0
  23. package/@ones-editor/ui/src/providers/utils/text-styles.d.ts +1 -1
  24. package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +1 -1
  25. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -1
  26. package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +1 -1
  27. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +3 -3
  28. package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +1 -0
  29. package/@ones-editor/ui-base/src/command-bar/types.d.ts +2 -1
  30. package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
  31. package/@ones-editor/ui-base/src/index.d.ts +1 -1
  32. package/@ones-editor/ui-base/src/input/create-input.d.ts +2 -2
  33. package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +0 -1
  34. package/@ones-editor/ui-base/src/mobile-command-bar/scroll-into-view.d.ts +1 -1
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.js +537 -607
  37. package/dist/types.d.ts +5 -4
  38. package/package.json +1 -1
  39. package/@ones-editor/text-commands/src/locale/en-us.d.ts +0 -13
  40. package/@ones-editor/text-commands/src/locale/index.d.ts +0 -1
  41. package/@ones-editor/text-commands/src/locale/ja-jp.d.ts +0 -13
  42. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +0 -13
  43. package/@ones-editor/ui/src/providers/utils/text-commands.d.ts +0 -3
  44. /package/@ones-editor/table-block/src/commands/{table-command-provider.d.ts → mobile-command-provider.d.ts} +0 -0
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel, Block, ShortcutRecords, OnesEditorBlockRenderer, BuildResourceUrlOptions, UploadResourceOptions, UploadResourceResult } from '../@ones-editor/core';
1
+ import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel, Block, ShortcutRecords, OnesEditorBlockRenderer, BuildResourceUrlOptions, UploadResourceOptions, UploadResourceResult, MobileClient, OnesEditorDoc } from '../@ones-editor/core';
2
2
  import { DrawIoOptions } from '../@ones-editor/drawio-embed';
3
3
  import { FlowCharEmbedOptions, MermaidEmbedOptions, PlantumlEmbedOptions } from '../@ones-editor/graph-embed';
4
4
  import { ImageOptions } from '../@ones-editor/image-embed';
@@ -42,6 +42,7 @@ export type EditorComponentOptions = {
42
42
  mathjax?: MathjaxOptions;
43
43
  link?: LinkOptions;
44
44
  columns?: EditorConfigLayoutOptions;
45
+ mobile?: MobileClient;
45
46
  };
46
47
  export type EditorEvents = {
47
48
  onClickLink?: (editor: OnesEditor, event: MouseEvent, link: Element) => void;
@@ -64,7 +65,6 @@ export interface CreateOnesEditorOptions {
64
65
  lang?: i18n.LANGS;
65
66
  logLevel?: LogLevel;
66
67
  hideTitle?: boolean;
67
- autoNewLine?: boolean;
68
68
  placeholder?: {
69
69
  applyContentPlaceholder?: (editor: OnesEditor) => boolean;
70
70
  };
@@ -87,8 +87,9 @@ export interface CreateOnesEditorOptions {
87
87
  events?: EditorEvents;
88
88
  shortcuts?: ShortcutRecords[];
89
89
  componentsOptions?: EditorComponentOptions;
90
- buildResourceUrl?: (resourceId: string, options?: BuildResourceUrlOptions) => string;
91
- uploadResource?: (file: File, options?: UploadResourceOptions) => Promise<UploadResourceResult>;
90
+ buildResourceUrl?: (doc: OnesEditorDoc, resourceId: string, options?: BuildResourceUrlOptions) => string;
91
+ uploadResource?: (doc: OnesEditorDoc, file: File, options?: UploadResourceOptions) => Promise<UploadResourceResult>;
92
+ autoNewLine?: boolean;
92
93
  }
93
94
  export interface CreateLocalEditorOptions {
94
95
  id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.7-beta.15",
3
+ "version": "2.1.7-beta.17",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- commands: {
3
- bold: string;
4
- italic: string;
5
- underline: string;
6
- strikethrough: string;
7
- code: string;
8
- subscript: string;
9
- superscript: string;
10
- more: string;
11
- };
12
- };
13
- export default _default;
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- commands: {
3
- bold: string;
4
- italic: string;
5
- underline: string;
6
- strikethrough: string;
7
- code: string;
8
- subscript: string;
9
- superscript: string;
10
- more: string;
11
- };
12
- };
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- commands: {
3
- bold: string;
4
- italic: string;
5
- underline: string;
6
- strikethrough: string;
7
- code: string;
8
- subscript: string;
9
- superscript: string;
10
- more: string;
11
- };
12
- };
13
- export default _default;
@@ -1,3 +0,0 @@
1
- import { CommandItem, BlockElement, CommandParams, CommandResult, OnesEditor, SelectionRange } from '../../../../../@ones-editor/core';
2
- export declare function getAvailableStyleCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): CommandItem[];
3
- export declare function executeStyleCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: string, params: CommandParams, result: CommandResult): boolean;