@ones-editor/editor 1.1.17-beta.9 → 1.1.18

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 (53) hide show
  1. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
  2. package/@ones-editor/code-block/src/code-block/languages.d.ts +1 -1
  3. package/@ones-editor/code-block/src/locale/en-us.d.ts +0 -1
  4. package/@ones-editor/code-block/src/locale/ja-jp.d.ts +0 -1
  5. package/@ones-editor/code-block/src/locale/zh-cn.d.ts +0 -1
  6. package/@ones-editor/comments/src/comment-quick-reply/index.d.ts +0 -1
  7. package/@ones-editor/comments/src/comments-render/index.d.ts +0 -1
  8. package/@ones-editor/context-menu/src/menu/index.d.ts +0 -1
  9. package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +1 -2
  10. package/@ones-editor/core/src/core/composition/editor-input.d.ts +0 -1
  11. package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +0 -1
  12. package/@ones-editor/core/src/core/editor/actions/update-block-text.d.ts +3 -3
  13. package/@ones-editor/core/src/core/editor/actions/update-box-data.d.ts +2 -2
  14. package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +0 -1
  15. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +1 -3
  16. package/@ones-editor/core/src/core/types.d.ts +1 -5
  17. package/@ones-editor/core/src/utils/dom.d.ts +0 -4
  18. package/@ones-editor/core/src/utils/file.d.ts +1 -2
  19. package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +0 -2
  20. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +0 -1
  21. package/@ones-editor/templates/src/index.d.ts +2 -2
  22. package/@ones-editor/templates/src/templates/select-template.d.ts +0 -4
  23. package/@ones-editor/templates/src/templates/types.d.ts +0 -1
  24. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  25. package/@ones-editor/ui/src/index.d.ts +2 -2
  26. package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +1 -2
  27. package/@ones-editor/ui/src/quick-menu/types.d.ts +1 -1
  28. package/@ones-editor/ui-base/src/command-bar/manual-menu.d.ts +1 -1
  29. package/@ones-editor/ui-base/src/command-bar/types.d.ts +0 -1
  30. package/@ones-editor/ui-base/src/icons/index.d.ts +1 -2
  31. package/@ones-editor/ui-base/src/input/create-input.d.ts +2 -3
  32. package/@ones-editor/ui-base/src/popup/popup.d.ts +0 -1
  33. package/@ones-editor/versions/src/types.d.ts +1 -3
  34. package/@ones-editor/versions/src/version-dialog/size-limit-textarea.d.ts +1 -2
  35. package/@ones-editor/versions/src/version-dialog/version-list.d.ts +0 -1
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.js +198 -209
  38. package/dist/types.d.ts +0 -4
  39. package/package.json +1 -1
  40. package/@ones-editor/status/package.json +0 -7
  41. package/@ones-editor/status/src/dom/input.d.ts +0 -1
  42. package/@ones-editor/status/src/dom/overflow-tooltip-tag.d.ts +0 -10
  43. package/@ones-editor/status/src/dom/status-palette.d.ts +0 -6
  44. package/@ones-editor/status/src/index.d.ts +0 -4
  45. package/@ones-editor/status/src/locale/en-us.d.ts +0 -25
  46. package/@ones-editor/status/src/locale/index.d.ts +0 -1
  47. package/@ones-editor/status/src/locale/ja-jp.d.ts +0 -25
  48. package/@ones-editor/status/src/locale/zh-cn.d.ts +0 -25
  49. package/@ones-editor/status/src/status-box-command.d.ts +0 -7
  50. package/@ones-editor/status/src/status-box-data.d.ts +0 -5
  51. package/@ones-editor/status/src/status-box-editor.d.ts +0 -21
  52. package/@ones-editor/status/src/status-box.d.ts +0 -4
  53. package/@ones-editor/status/src/types.d.ts +0 -8
@@ -1,5 +1,5 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
2
2
  import type { GetAllQuickMenuItemsOptions } from '../../../../../../@ones-editor/ui';
3
3
  import type { BlockMenuItem } from '../types';
4
- export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options: GetAllQuickMenuItemsOptions): BlockMenuItem[];
4
+ export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options?: GetAllQuickMenuItemsOptions): BlockMenuItem[];
5
5
  export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
@@ -67,7 +67,7 @@ import 'prismjs/components/prism-vhdl';
67
67
  import 'prismjs/components/prism-visual-basic';
68
68
  import 'prismjs/components/prism-wasm';
69
69
  import 'prismjs/components/prism-yaml';
70
- declare const SUPPORTED_LANGUAGES: () => {
70
+ declare const SUPPORTED_LANGUAGES: {
71
71
  abap: {
72
72
  name: string;
73
73
  aliases: string[];
@@ -7,7 +7,6 @@ declare const _default: {
7
7
  caption: string;
8
8
  search: string;
9
9
  copySuccess: string;
10
- plainText: string;
11
10
  };
12
11
  };
13
12
  export default _default;
@@ -7,7 +7,6 @@ declare const _default: {
7
7
  caption: string;
8
8
  search: string;
9
9
  copySuccess: string;
10
- plainText: string;
11
10
  };
12
11
  };
13
12
  export default _default;
@@ -7,7 +7,6 @@ declare const _default: {
7
7
  caption: string;
8
8
  search: string;
9
9
  copySuccess: string;
10
- plainText: string;
11
10
  };
12
11
  };
13
12
  export default _default;
@@ -21,5 +21,4 @@ export declare class CommentQuickReply {
21
21
  cancel: () => void;
22
22
  hide: () => void;
23
23
  show: () => void;
24
- destroy(): void;
25
24
  }
@@ -1,7 +1,6 @@
1
1
  import { BlockElement, BlockPath, DocBlock, DocBlockTextAttributes, OnesEditor, OnesEditorBlockRenderer, OnesEditorBlockRenderResult } from '../../../../@ones-editor/core';
2
2
  export declare class OnesEditorCommentsRender implements OnesEditorBlockRenderer {
3
3
  renderText(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
4
- renderBox(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
5
4
  renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
6
5
  updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
7
6
  }
@@ -12,7 +12,6 @@ declare class OnesEditorContextMenu implements OnesEditorCustom {
12
12
  private isInEditor;
13
13
  private handleContextMenuShown;
14
14
  private handleContextMenuClick;
15
- private handleContextMenuClose;
16
15
  private handleImageEmbedAction;
17
16
  }
18
17
  export default OnesEditorContextMenu;
@@ -2,9 +2,8 @@ import { OnesEditor, BlockElement, BlockPosition, ContainerElement, ComplexBlock
2
2
  export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement, options?: GetChildContainerOptions): ContainerElement[];
3
3
  export declare function complexBlockGetSelectedContainers(editor: OnesEditor, block: BlockElement, start: BlockPosition, end: BlockPosition): ContainerElement[];
4
4
  export declare function isFirstChildBlockInComplexBlock(editor: OnesEditor, childBlock: BlockElement): boolean;
5
- export declare function complexBlockGetFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
5
+ export declare function complexBlockGeFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
6
6
  export declare function complexBlockGetLastSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
7
- export declare function complexBlockGetDeepFirstChild(editor: OnesEditor, container: ContainerElement): BlockElement | null;
8
7
  export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEditor, childContainer: ContainerElement, options?: GetChildContainerOptions): BlockElement | null;
9
8
  export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
10
9
  export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
@@ -27,7 +27,6 @@ export declare class EditorInput implements OnesEditorInput {
27
27
  callbacks: EditorInputCallbacks;
28
28
  inputElement: HTMLInputElement;
29
29
  constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
30
- private isInCommandbar;
31
30
  destroy(): void;
32
31
  getInput(): HTMLInputElement;
33
32
  focus(): void;
@@ -5,7 +5,6 @@ export declare const TEXT_STYLE_BACKGROUND_COLOR_PREFIX = "style-bg-color-";
5
5
  export declare function addAttribute(text: DocBlockText, key: string, value: DocTextAttributeType): DocBlockText;
6
6
  export declare function removeAttribute(text: DocBlockText, key: string, value: unknown, options?: {
7
7
  ignoreValue: boolean;
8
- handleBox?: boolean;
9
8
  }): DocBlockText;
10
9
  export declare function rangeAddAttribute(offset: number, length: number, text: DocBlockText, key: string, value: DocTextAttributeType): DocBlockText;
11
10
  export declare function rangeRemoveAttribute(offset: number, length: number, text: DocBlockText, key: string, value: unknown, options?: {
@@ -1,4 +1,4 @@
1
- import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
1
+ import { OnesEditor, BlockElement } from '../../types';
2
2
  import { DocBlockText, DocBlockTextActions } from '../../doc';
3
- export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions, options?: InsertTextOptions): DocBlockText;
4
- export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText, options?: InsertTextOptions): void;
3
+ export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions): DocBlockText;
4
+ export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText): void;
@@ -1,3 +1,3 @@
1
- import { InsertTextOptions, OnesEditor } from '../../types';
1
+ import { OnesEditor } from '../../types';
2
2
  import { DocBox } from '../../doc';
3
- export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox, options?: InsertTextOptions): void;
3
+ export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox): void;
@@ -34,7 +34,6 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
34
34
  onCustomMessage(msg: unknown): void;
35
35
  onStatusChanged(status: OnesEditorDocStatus): void;
36
36
  onError(error: Error): void;
37
- onAuthRecover(): void;
38
37
  uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
39
38
  addResources(resourceIds: string[]): Promise<string[]>;
40
39
  buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
@@ -1,4 +1,3 @@
1
- /// <reference types="lodash" />
2
1
  import { EditorInputCallbacks } from '../composition/editor-input';
3
2
  import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
4
3
  import { DocObject } from '../doc';
@@ -19,8 +18,7 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
19
18
  onPaste(event: ClipboardEvent): void;
20
19
  onPasteText: (text: string, options?: PasteOptions) => Promise<void>;
21
20
  onFocus(): void;
22
- onBlur: import("lodash").DebouncedFunc<() => void>;
23
- removeActiveForBlur: import("lodash").DebouncedFunc<() => void>;
21
+ onBlur(): void;
24
22
  addHandler(handler: OnesEditorInputHandler): void;
25
23
  removeHandler(handler: OnesEditorInputHandler): void;
26
24
  handleBeforeInsertText(containerId: string, blockIndex: number, offset: number, text: string): boolean;
@@ -144,7 +144,6 @@ export interface CommandItem {
144
144
  ellipsisTooltip?: string;
145
145
  disableTooltip?: boolean;
146
146
  disableReason?: string;
147
- hideGroupItem?: boolean;
148
147
  setCloseable?: (closeable: Closeable) => void;
149
148
  beforePopup?: (parent: unknown) => void;
150
149
  }
@@ -399,7 +398,6 @@ export interface OnesEditorOptionalOptions {
399
398
  colors?: string[];
400
399
  scrollContainer?: HTMLElement;
401
400
  enableComments?: boolean;
402
- enableContextMenu?: boolean;
403
401
  settingsProvider?: OnesEditorSettingsProvider;
404
402
  }
405
403
  export interface OnesEditorOptions {
@@ -408,7 +406,6 @@ export interface OnesEditorOptions {
408
406
  [index: string]: unknown;
409
407
  };
410
408
  enableComments?: boolean;
411
- enableContextMenu?: boolean;
412
409
  scrollContainer?: HTMLElement;
413
410
  }
414
411
  export interface OnesEditorComponents {
@@ -450,7 +447,6 @@ export type OnesEditorCustomCreator = (editor: OnesEditor) => OnesEditorCustom;
450
447
  export interface CloneBlockResultInfo {
451
448
  containerIdMap: Map<string, string>;
452
449
  blockIdMap: Map<string, string>;
453
- boxIdMap: Map<string, string>;
454
450
  }
455
451
  export interface OnesEditorDomEvents extends OnesEditorCustom {
456
452
  addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
@@ -552,7 +548,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
552
548
  deleteChildContainers: (containerIds: string[]) => void;
553
549
  updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
554
550
  updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
555
- updateBoxData: (boxData: DocBox, options?: InsertTextOptions) => void;
551
+ updateBoxData: (boxData: DocBox) => void;
556
552
  updateCompositionText: (text: string, end: boolean) => void;
557
553
  getColor: (index: number, type?: string) => string;
558
554
  }
@@ -33,8 +33,4 @@ export declare function findTarget(event: Event, cssSelector: string): Element |
33
33
  export declare function findEventTargetBlock(event: Event): Element | null;
34
34
  export declare function isElementVisible(element: Element | null): boolean;
35
35
  export declare function getElementScale(element: Element): number;
36
- export declare function bindKeyDownEvent(input: HTMLInputElement | HTMLTextAreaElement, callback: (event: KeyboardEvent, composing: boolean) => void): () => void;
37
- export declare function getElementFromPoint(x: number, y: number, options?: {
38
- noFilter: boolean;
39
- }): Element;
40
36
  export {};
@@ -1,10 +1,9 @@
1
1
  interface SelectFileOptions {
2
2
  multiple?: boolean;
3
- container?: HTMLElement;
4
3
  }
5
4
  export declare function selectFile<T extends SelectFileOptions = SelectFileOptions>(accept: string, options?: T): Promise<T extends {
6
5
  multiple: true;
7
- } ? (File[] | null) : (File | null)>;
6
+ } ? File[] : File>;
8
7
  export declare function isDraggingFiles(v: unknown): v is File[];
9
8
  export declare function getFileExt(file: string): string;
10
9
  export declare function requestDownload(downloadUrl: string, fileName?: string): void;
@@ -1,4 +1,3 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
2
1
  export interface EnforceWithDocumentTitleHandlerOptions {
3
2
  hideTitle?: boolean;
4
3
  headingLevel?: number;
@@ -6,5 +5,4 @@ export interface EnforceWithDocumentTitleHandlerOptions {
6
5
  contentPlaceholder?: string | Element;
7
6
  readonlyTitlePlaceholder?: string;
8
7
  addPlaceholderToAllCurrentEmptyBlock?: boolean;
9
- applyContentPlaceholder?: (editor: OnesEditor) => boolean;
10
8
  }
@@ -27,7 +27,6 @@ export declare class AuthConnection {
27
27
  }>;
28
28
  logout(): Promise<void>;
29
29
  init(auth: AuthMessage): Promise<void>;
30
- reConnect(token: string): Promise<void>;
31
30
  handleAuthError(): Promise<void>;
32
31
  reAuth: () => Promise<void>;
33
32
  private emitPermissionError;
@@ -1,4 +1,4 @@
1
1
  import './locale';
2
- import { autoShowHideTemplates, hideTemplates, showTemplates } from './templates/select-template';
2
+ import { autoShowHideTemplates } from './templates/select-template';
3
3
  export * from './templates/types';
4
- export { autoShowHideTemplates, hideTemplates, showTemplates };
4
+ export { autoShowHideTemplates };
@@ -1,11 +1,7 @@
1
- /// <reference types="lodash" />
2
1
  import { OnesEditor } from '../../../../@ones-editor/core';
3
2
  import './select-templates.scss';
4
3
  interface ShowTemplatesOptions {
5
4
  reset?: boolean;
6
5
  }
7
- declare function showTemplatesCore(editor: OnesEditor, options?: ShowTemplatesOptions): void;
8
- export declare const showTemplates: import("lodash").DebouncedFunc<typeof showTemplatesCore>;
9
- export declare function hideTemplates(editor: OnesEditor): void;
10
6
  export declare function autoShowHideTemplates(editor: OnesEditor, options?: ShowTemplatesOptions): void;
11
7
  export {};
@@ -11,5 +11,4 @@ export interface TemplateOptions {
11
11
  onChooseTemplate?: (editor: OnesEditor) => void;
12
12
  onApplyTemplate?: (editor: OnesEditor, template: DocTemplate) => Promise<void>;
13
13
  onTemplateChooserStatusChanged?: (editor: OnesEditor, cardContainer: HTMLElement | null, status: 'visible' | 'hide') => void;
14
- onBeforeTemplateShow?: (editor: OnesEditor) => boolean;
15
14
  }