@ones-editor/editor 2.1.8-beta.1 → 2.1.8-beta.3

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.
@@ -4,5 +4,8 @@
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
7
+ "devDependencies": {
8
+ "@types/lodash.pick": "^4.4.9"
9
+ },
7
10
  "types": "src/index.d.ts"
8
11
  }
@@ -8,3 +8,4 @@ export declare enum HistoryClass {
8
8
  export declare const OpColor = "--op-color";
9
9
  export declare const OpSelectedColor = "--op-selected-color";
10
10
  export declare const HISTORY_TOOLTIP_IDENTIFIER = "data-history-editor-tooltip";
11
+ export declare const HISTORY_MASK_IDENTIFIER = "history-mask-identifier";
@@ -4,4 +4,18 @@ export default class OnesEditorHistoryRender implements OnesEditorBlockRenderer
4
4
  renderText(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
5
5
  renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
6
6
  updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
7
+ renderChildContainer(editor: OnesEditor, path: BlockPath, containerId: string): {
8
+ classes: string[];
9
+ attributes: {
10
+ "data-history-editor-tooltip": string;
11
+ };
12
+ styles: {
13
+ "--op-color": string;
14
+ "--op-selected-color": string;
15
+ };
16
+ } | {
17
+ classes?: undefined;
18
+ attributes?: undefined;
19
+ styles?: undefined;
20
+ };
7
21
  }
@@ -2,9 +2,13 @@ import { OnesEditor } from '../../../../@ones-editor/core';
2
2
  import { OnesEditorTooltipCallbacks, EditorTooltipTippyInstance } from '../../../../@ones-editor/ui';
3
3
  import './index.scss';
4
4
  export declare class OnesEditorHistoryTooltip implements OnesEditorTooltipCallbacks {
5
+ private editor;
5
6
  static register(editor: OnesEditor): void;
6
- private createContent;
7
+ private gap;
8
+ private constructor();
9
+ private applyGapToRect;
10
+ private getPseudoMaskRect;
7
11
  private getReferenceClientRect;
8
- private getPropsFromDifferentBlock;
12
+ private createContent;
9
13
  onBeforeShow: (instance: EditorTooltipTippyInstance) => void;
10
14
  }
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  version: {
3
3
  latest: string;
4
+ update: string;
4
5
  insert: string;
5
6
  delete: string;
6
7
  goBack: string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  version: {
3
3
  latest: string;
4
+ update: string;
4
5
  insert: string;
5
6
  delete: string;
6
7
  goBack: string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  version: {
3
3
  latest: string;
4
+ update: string;
4
5
  insert: string;
5
6
  delete: string;
6
7
  goBack: string;
@@ -1,6 +1,7 @@
1
1
  import type { OnesEditor, DocVersion, OnesEditorDocHistoryData, OnesEditorDoc, OnesEditorBlockRenderer } from '../../../@ones-editor/core';
2
2
  export interface VersionDialogOptions {
3
3
  container: HTMLElement;
4
+ showPublishedVersions?: boolean;
4
5
  initSelectedVersion?: VersionNum;
5
6
  useCreatedBy?: boolean;
6
7
  enableEdit?: boolean;
@@ -26,3 +27,6 @@ export interface OnesEditorVersionsProvider {
26
27
  export type HistoryUser = OnesEditorDocHistoryData['user'];
27
28
  export type UserColorTypes = 'flag' | 'selection';
28
29
  export type UserColors = Record<UserColorTypes, string>;
30
+ export type HistoryDocMeta = {
31
+ 'createBy'?: HistoryUser;
32
+ };
@@ -1,2 +1,4 @@
1
1
  import { HistoryUser } from '../types';
2
- export declare function getOpDescription(user: HistoryUser, type: 'insert' | 'delete'): string;
2
+ type OpType = 'insert' | 'delete' | 'update';
3
+ export declare function getOpDescription(user: HistoryUser, type: OpType): string;
4
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { OnesEditorRemoteUsers } from '../../../../@ones-editor/core';
2
2
  import { HistoryUser, UserColors } from '../types';
3
3
  export * from './block-text';
4
+ export declare function removeOpacityFromHexColor(hexColor: string): string;
4
5
  export declare function getUserColors(users: OnesEditorRemoteUsers, user: HistoryUser): UserColors;