@ones-editor/editor 2.1.2-beta.12 → 2.1.2-beta.13

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 (31) hide show
  1. package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
  2. package/@ones-editor/core/src/core/doc/doc.d.ts +1 -1
  3. package/@ones-editor/core/src/core/types.d.ts +6 -0
  4. package/@ones-editor/core/src/core/undo-manager/actions/action.d.ts +5 -1
  5. package/@ones-editor/core/src/core/undo-manager/actions/block-action.d.ts +1 -0
  6. package/@ones-editor/core/src/core/undo-manager/actions/update-block-data-action.d.ts +1 -0
  7. package/@ones-editor/image-embed/src/image-object.d.ts +1 -0
  8. package/@ones-editor/sharedb-doc/src/versions/sharedb-server.d.ts +1 -1
  9. package/@ones-editor/sharedb-doc/src/versions/simple-client.d.ts +1 -1
  10. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  11. package/@ones-editor/ui/src/index.d.ts +2 -1
  12. package/@ones-editor/ui/src/tooltips/index.d.ts +21 -9
  13. package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +13 -7
  14. package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +7 -1
  15. package/@ones-editor/ui-base/src/color-palette/index.d.ts +3 -3
  16. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  17. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +1 -0
  18. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  19. package/@ones-editor/versions/package.json +3 -0
  20. package/@ones-editor/versions/src/constant/index.d.ts +2 -0
  21. package/@ones-editor/versions/src/history-doc/history-doc.d.ts +2 -2
  22. package/@ones-editor/versions/src/history-render/index.d.ts +15 -1
  23. package/@ones-editor/versions/src/history-tooltip/index.d.ts +14 -0
  24. package/@ones-editor/versions/src/locale/en-us.d.ts +1 -0
  25. package/@ones-editor/versions/src/locale/ja-jp.d.ts +1 -0
  26. package/@ones-editor/versions/src/locale/zh-cn.d.ts +1 -0
  27. package/@ones-editor/versions/src/types.d.ts +4 -0
  28. package/@ones-editor/versions/src/utils/block-text.d.ts +3 -1
  29. package/dist/index.js +3101 -2143
  30. package/dist/types.d.ts +1 -1
  31. package/package.json +2 -1
@@ -9,4 +9,5 @@ export declare class EditorBlockRenderers implements OnesEditorBlockRenderers {
9
9
  renderText(path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
10
10
  renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
11
11
  updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
12
+ renderChildContainer(editor: OnesEditor, path: BlockPath, containerId: string): OnesEditorBlockRenderResult;
12
13
  }
@@ -268,7 +268,7 @@ export interface OnesEditorHistoryDataParseHandler {
268
268
  onUpdateComment: (commentId: string, local: boolean) => void;
269
269
  }
270
270
  export interface OnesEditorDocVersionHelper {
271
- getVersions: () => Promise<DocVersion[]>;
271
+ getVersions: (showPublished?: boolean) => Promise<DocVersion[]>;
272
272
  getVersion: (ver: number) => Promise<DocObject>;
273
273
  getLatestVersion: () => Promise<DocObject>;
274
274
  getHistoryData: (version: number, from?: number) => Promise<{
@@ -142,6 +142,8 @@ export interface CommandItem {
142
142
  group?: string;
143
143
  groupOrder?: number;
144
144
  dropdown?: boolean;
145
+ dropSplit?: boolean;
146
+ splitTooltip?: string;
145
147
  manualShowChildren?: boolean;
146
148
  childrenPlacement?: CommandItemChildrenPlacement;
147
149
  childrenOffset?: [number, number];
@@ -352,6 +354,8 @@ export interface OnesEditorUndoAction {
352
354
  redo: (editor: OnesEditor) => boolean;
353
355
  combinable: (other: OnesEditorUndoAction) => boolean;
354
356
  combine: (other: OnesEditorUndoAction) => void;
357
+ getTimeStamp: () => number;
358
+ getBatchActionId?: () => string | undefined;
355
359
  }
356
360
  export interface OnesEditorUndoManager {
357
361
  reset: () => void;
@@ -398,12 +402,14 @@ export interface OnesEditorBlockRenderer {
398
402
  renderBox?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
399
403
  renderText?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
400
404
  renderBlock?: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
405
+ renderChildContainer?: (editor: OnesEditor, path: BlockPath, containerId: string) => OnesEditorBlockRenderResult;
401
406
  updateBlock?: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
402
407
  }
403
408
  export interface OnesEditorBlockRenderers {
404
409
  renderBox: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
405
410
  renderText: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
406
411
  renderBlock: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
412
+ renderChildContainer: (editor: OnesEditor, path: BlockPath, containerId: string) => OnesEditorBlockRenderResult;
407
413
  updateBlock: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
408
414
  registerRender: (decorator: OnesEditorBlockRenderer) => void;
409
415
  }
@@ -4,11 +4,15 @@ export default class Action implements OnesEditorUndoAction {
4
4
  protected containerId: string;
5
5
  beforeRange: OnesEditorDocRange;
6
6
  afterRange: OnesEditorDocRange;
7
- constructor(editor: OnesEditor, containerId: string, afterRange: OnesEditorDocRange);
7
+ batchActionId?: string;
8
+ ts: number;
9
+ constructor(editor: OnesEditor, containerId: string, afterRange: OnesEditorDocRange, batchActionId?: string);
10
+ getTimeStamp(): number;
8
11
  undo(editor: OnesEditor): boolean;
9
12
  redo(editor: OnesEditor): boolean;
10
13
  combinable(other: OnesEditorUndoAction): boolean;
11
14
  combine(other: OnesEditorUndoAction): void;
15
+ getBatchActionId(): string | undefined;
12
16
  setAfterRange(range: OnesEditorDocRange): void;
13
17
  hasDocContainerId(editor: OnesEditor, id: string): boolean;
14
18
  findDocBlockById(editor: OnesEditor, id: string): DocBlock | undefined;
@@ -7,4 +7,5 @@ export default class BlockAction extends Action {
7
7
  constructor(editor: OnesEditor, containerId: string, blockIndex: number, data: DocBlock, afterRange: OnesEditorDocRange);
8
8
  deleteBlock(editor: OnesEditor, newRange: OnesEditorDocRange): boolean;
9
9
  insertBlock(editor: OnesEditor, newRange: OnesEditorDocRange): boolean;
10
+ getBatchActionId(): string | undefined;
10
11
  }
@@ -9,4 +9,5 @@ export default class UpdateBlockDataAction extends Action {
9
9
  undo(editor: OnesEditor): boolean;
10
10
  redo(editor: OnesEditor): boolean;
11
11
  private static toAttributes;
12
+ getBatchActionId(): string | undefined;
12
13
  }
@@ -42,4 +42,5 @@ export declare class ImageObject implements ImageObjectBase {
42
42
  private setData;
43
43
  static create(editor: OnesEditor, blockData: DocEmbedBlock): ImageObject;
44
44
  static getImageObject(editor: OnesEditor, block: BlockElement | string): ImageObject;
45
+ static findImageObject(editor: OnesEditor, block: BlockElement | string): ImageObject | null;
45
46
  }
@@ -10,7 +10,7 @@ export default class ShareDBServer extends EventCallbacks<ShareDBDocCallbacks> i
10
10
  buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
11
11
  getRemoteUsers(): RemoteUsers;
12
12
  getVersionHelper(): OnesEditorDocVersionHelper;
13
- getVersions(): Promise<DocVersion[]>;
13
+ getVersions(showPublished?: boolean): Promise<DocVersion[]>;
14
14
  getVersion(ver: number): Promise<DocObject>;
15
15
  getLatestVersion(): Promise<DocObject>;
16
16
  getHistoryData(version: number, from?: number | undefined): Promise<{
@@ -11,7 +11,7 @@ export default class ShareDBSimpleClient {
11
11
  getBaseURL(): string;
12
12
  getBase64BaseURL(): string;
13
13
  request<T = unknown>(url: string, opt?: any): Promise<AxiosResponse<any, T>>;
14
- getVersions(): Promise<DocVersion[]>;
14
+ getVersions(showPublished: boolean): Promise<DocVersion[]>;
15
15
  getVersion(ver: number): Promise<EditorDoc>;
16
16
  getLatestVersion(): Promise<EditorDoc>;
17
17
  getVersionOps(version: number, from?: number): Promise<{