@ones-editor/editor 2.1.8-beta.1 → 2.1.8-beta.2
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.
- package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
- package/@ones-editor/core/src/core/doc/doc.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -0
- package/@ones-editor/sharedb-doc/src/versions/sharedb-server.d.ts +1 -1
- package/@ones-editor/sharedb-doc/src/versions/simple-client.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/history-render/index.d.ts +14 -0
- package/@ones-editor/versions/src/types.d.ts +4 -0
- package/@ones-editor/versions/src/utils/block-text.d.ts +3 -1
- package/@ones-editor/versions/src/utils/index.d.ts +1 -0
- package/dist/index.js +479 -212
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -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
|
-
|
|
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;
|