@ones-editor/editor 3.0.19-beta.2 → 3.1.0
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/comments/src/actions/add-comment-to-block.d.ts +1 -1
- package/@ones-editor/comments/src/actions/add-comment-to-text-block.d.ts +1 -1
- package/@ones-editor/comments/src/comments-helper/old-version-comment.d.ts +0 -1
- package/@ones-editor/comments/src/index.d.ts +0 -1
- package/@ones-editor/comments/src/types.d.ts +0 -3
- package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -2
- package/@ones-editor/core/src/core/selection/actions/select-all.d.ts +0 -1
- package/@ones-editor/core/src/core/types.d.ts +0 -2
- package/@ones-editor/drawio-embed/types/index.d.ts +0 -3
- package/@ones-editor/graph-embed/package.json +3 -4
- package/@ones-editor/graph-embed/src/config/index.d.ts +1 -1
- package/@ones-editor/input-handlers/src/markdown-shortcuts/markdown-input-handler.d.ts +0 -3
- package/@ones-editor/input-handlers/src/markdown-shortcuts/match-block-style.d.ts +1 -2
- package/@ones-editor/main-toolbar/src/items/text-color.d.ts +0 -2
- package/@ones-editor/markdown-to-doc/src/markdown-to-doc.d.ts +1 -3
- package/@ones-editor/markdown-to-doc/src/tokens/base.d.ts +0 -3
- package/@ones-editor/sharedb-doc/src/index.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +2 -2
- package/@ones-editor/versions/src/index.d.ts +0 -2
- package/@ones-editor/versions/src/types.d.ts +0 -1
- package/@ones-editor/versions/src/version-dialog/index.d.ts +0 -1
- package/@ones-editor/versions/src/version-dialog/play-history.d.ts +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1088 -1594
- package/package.json +2 -2
- package/@ones-editor/comments/src/permission/check-comment-action.d.ts +0 -3
- package/@ones-editor/input-handlers/src/markdown-shortcuts/types.d.ts +0 -3
- package/@ones-editor/versions/src/history-diff.d.ts +0 -12
- package/dist/history-diff.d.ts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor, OnesEditorComment } from '../../../../@ones-editor/core';
|
|
2
2
|
import { OnesEditorCommentsProvider } from '../types';
|
|
3
3
|
export declare function updateCommentToBlock(editor: OnesEditor, block: BlockElement, comment: OnesEditorComment): void;
|
|
4
|
-
export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement, provider: OnesEditorCommentsProvider): OnesEditorComment
|
|
4
|
+
export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement, provider: OnesEditorCommentsProvider): OnesEditorComment;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { OnesEditor, OnesEditorComment, SelectedBlock, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
2
|
import { OnesEditorCommentsProvider } from '../types';
|
|
3
3
|
export declare function addCommentToSelectedTextBlock(editor: OnesEditor, selectedBlock: SelectedBlock, comment: OnesEditorComment): void;
|
|
4
|
-
export declare function addCommentToTextBlocks(editor: OnesEditor, range: SelectionRange, provider: OnesEditorCommentsProvider): OnesEditorComment
|
|
4
|
+
export declare function addCommentToTextBlocks(editor: OnesEditor, range: SelectionRange, provider: OnesEditorCommentsProvider): OnesEditorComment;
|
|
@@ -9,7 +9,6 @@ export interface AddCommentToOldVersionBody {
|
|
|
9
9
|
commentGroupId?: string;
|
|
10
10
|
comment: DocObject;
|
|
11
11
|
abstract?: string;
|
|
12
|
-
silent?: boolean;
|
|
13
12
|
}
|
|
14
13
|
export declare function addCommentToOldVersion(editor: OnesEditor, version: number, range: SelectionRange, comment: OnesEditorComment, commentDoc: DocObject): Promise<void>;
|
|
15
14
|
export declare function replyCommentToOldVersion(editor: OnesEditor, version: number, comment: OnesEditorComment, commentDoc: DocObject): Promise<unknown>;
|
|
@@ -13,6 +13,5 @@ export { removeCommentFromBlock } from './actions/remove-comment-from-block';
|
|
|
13
13
|
export { addCommentToTextBlocks } from './actions/add-comment-to-text-block';
|
|
14
14
|
export { addCommentToBlock } from './actions/add-comment-to-block';
|
|
15
15
|
export { editorAddComment } from './actions/editor-add-comment';
|
|
16
|
-
export { canRunCommentAction } from './permission/check-comment-action';
|
|
17
16
|
export * from './comments-helper/old-version-comment';
|
|
18
17
|
export * from './resolved-comments';
|
|
@@ -16,8 +16,6 @@ export type CommentRoot = {
|
|
|
16
16
|
};
|
|
17
17
|
export interface OnesEditorCommentOptions {
|
|
18
18
|
controller: OnesEditorCommentController;
|
|
19
|
-
beforeCommentAction?: (action: CommentActionType) => boolean;
|
|
20
|
-
oldVersionSilentResolver?: () => boolean;
|
|
21
19
|
disableReply?: boolean;
|
|
22
20
|
disableEdit?: boolean;
|
|
23
21
|
pullThreshold?: number;
|
|
@@ -71,5 +69,4 @@ export interface MiniCommentGroup {
|
|
|
71
69
|
}
|
|
72
70
|
export type MiniCommentGroups = MiniCommentGroup[];
|
|
73
71
|
export type CommentListType = 'current' | 'resolved';
|
|
74
|
-
export type CommentActionType = 'add' | 'reply' | 'update' | 'delete';
|
|
75
72
|
export {};
|
|
@@ -22,8 +22,8 @@ import { editorMovePageUp } from './move-page-up';
|
|
|
22
22
|
import { editorMovePageDown } from './move-page-down';
|
|
23
23
|
import { editorSelectPageUp } from './select-page-up';
|
|
24
24
|
import { editorSelectPageDown } from './select-page-down';
|
|
25
|
-
import { editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks, editorSelectAllBlocks
|
|
25
|
+
import { editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks, editorSelectAllBlocks } from './select-all';
|
|
26
26
|
import { editorSelectWord } from './select-word';
|
|
27
27
|
import { editorMoveBlockStart } from './move-block-start';
|
|
28
28
|
import { editorMoveBlockEnd } from './move-block-end';
|
|
29
|
-
export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorSelectWord, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorMoveBlockStart, editorMoveBlockEnd, editorSelectAll, editorSelectAllBlocks,
|
|
29
|
+
export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorSelectWord, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorMoveBlockStart, editorMoveBlockEnd, editorSelectAll, editorSelectAllBlocks, editorSelectContainer, isContainerSelectedAllChildBlocks, };
|
|
@@ -3,4 +3,3 @@ export declare function isContainerSelectedAllChildBlocks(container: ContainerEl
|
|
|
3
3
|
export declare function editorSelectAll(editor: OnesEditor): boolean;
|
|
4
4
|
export declare function editorSelectContainer(editor: OnesEditor, container: ContainerElement): void;
|
|
5
5
|
export declare function editorSelectAllBlocks(editor: OnesEditor): void;
|
|
6
|
-
export declare function editorClearAll(editor: OnesEditor): void;
|
|
@@ -132,9 +132,7 @@ export interface CommandItem {
|
|
|
132
132
|
value?: string;
|
|
133
133
|
order?: number;
|
|
134
134
|
type?: CommandItemType;
|
|
135
|
-
className?: string;
|
|
136
135
|
element?: HTMLElement | ((item: CommandItem) => HTMLElement);
|
|
137
|
-
useDefaultClickHandler?: boolean;
|
|
138
136
|
icon?: string;
|
|
139
137
|
childrenType?: 'menu' | 'toolbar' | 'mobile-bottom-menu';
|
|
140
138
|
children?: CommandItem[];
|
|
@@ -24,7 +24,6 @@ export type GraphDataType = XmlData | XmlSvgData | SrcData;
|
|
|
24
24
|
export type LANG = Record<string, string | Record<string, string>>;
|
|
25
25
|
export type OnesEditorLang = 'zh-CN' | 'zh-HK' | 'ja-JP' | 'en-US';
|
|
26
26
|
export interface DrawIoOptions {
|
|
27
|
-
visible?: boolean;
|
|
28
27
|
lang?: OnesEditorLang;
|
|
29
28
|
cdn?: {
|
|
30
29
|
drawioBaseUrl?: string;
|
|
@@ -32,9 +31,7 @@ export interface DrawIoOptions {
|
|
|
32
31
|
drawioJs?: string;
|
|
33
32
|
pako?: string;
|
|
34
33
|
};
|
|
35
|
-
menuItemSuffix?: (editor: OnesEditor) => Element;
|
|
36
34
|
callbacks?: {
|
|
37
|
-
onBeforeInsertDrawio?: (editor: OnesEditor) => boolean | undefined;
|
|
38
35
|
onError?: (editor: OnesEditor, error: Error) => void;
|
|
39
36
|
onCreateDrawIoFrame?: (editor: OnesEditor) => Promise<HTMLIFrameElement>;
|
|
40
37
|
onCloseDrawIoFrame?: (editor: OnesEditor, iframe: HTMLIFrameElement) => boolean;
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
"main": "./src/index.ts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@types/lodash.camelcase": "^4.3.7",
|
|
8
|
-
"@types/mermaid": "^9.1.0",
|
|
9
|
-
"@types/plantuml-encoder": "^1.4.0",
|
|
10
7
|
"@types/lodash-es": "4.17.8",
|
|
11
|
-
"@types/lodash.
|
|
8
|
+
"@types/lodash.camelcase": "^4.3.7",
|
|
9
|
+
"@types/lodash.clonedeep": "^4.5.0",
|
|
10
|
+
"@types/plantuml-encoder": "^1.4.0"
|
|
12
11
|
},
|
|
13
12
|
"types": "src/index.d.ts"
|
|
14
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphType } from '../types';
|
|
2
|
-
export declare const MERMAID_SCRIPTS = "https://cdn.jsdelivr.net/npm/mermaid@
|
|
2
|
+
export declare const MERMAID_SCRIPTS = "https://cdn.jsdelivr.net/npm/mermaid@11.15.0/dist/mermaid.min.js";
|
|
3
3
|
export declare const FLOWCHART_SCRIPTS: string[];
|
|
4
4
|
export declare const PLANTUML_PRE = "https://www.plantuml.com/plantuml/svg";
|
|
5
5
|
export declare const GRAPH_MIN_HEIGHT = 150;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { OnesEditor, OnesEditorInputHandler } from '../../../../@ones-editor/core';
|
|
2
|
-
import { MarkdownInputHandlerOptions } from './types';
|
|
3
2
|
declare class MarkdownInputHandler implements OnesEditorInputHandler {
|
|
4
|
-
private options?;
|
|
5
|
-
constructor(options?: MarkdownInputHandlerOptions | undefined);
|
|
6
3
|
handleAfterInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): boolean;
|
|
7
4
|
handleBeforeKeyDown(editor: OnesEditor, event: KeyboardEvent): boolean;
|
|
8
5
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
|
|
3
|
-
export declare function matchBlockStyle(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, options?: MarkdownInputHandlerOptions): boolean;
|
|
2
|
+
export declare function matchBlockStyle(editor: OnesEditor, containerId: string, blockIndex: number, offset: number): boolean;
|
|
@@ -15,9 +15,7 @@ export declare class ColorItem extends TextColorItem implements ToolbarItem {
|
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
order?: number | undefined;
|
|
17
17
|
type?: import("@ones-editor/core").CommandItemType | undefined;
|
|
18
|
-
className?: string | undefined;
|
|
19
18
|
element?: HTMLElement | ((item: import("@ones-editor/core").CommandItem) => HTMLElement) | undefined;
|
|
20
|
-
useDefaultClickHandler?: boolean | undefined;
|
|
21
19
|
icon?: string | undefined;
|
|
22
20
|
childrenType?: "menu" | "toolbar" | "mobile-bottom-menu" | undefined;
|
|
23
21
|
children?: import("@ones-editor/core").CommandItem[] | undefined;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocObject } from '../../../@ones-editor/core';
|
|
2
2
|
import './types/marked-extended-latex.d';
|
|
3
|
-
import { CustomTagToken } from './custom/tag';
|
|
4
3
|
export { getBlocksWidth } from './tokens/block-tokens/table';
|
|
5
4
|
interface MarkdownToDocOptions {
|
|
6
5
|
font?: string | Element;
|
|
7
6
|
htmlToDoc?: (html: string) => DocObject | null;
|
|
8
|
-
customTagProcess?: (token: CustomTagToken, attributes: DocBlockTextAttributes) => DocBlockText | null | undefined;
|
|
9
7
|
}
|
|
10
8
|
export declare function markdownToDoc(markdown: string, options?: MarkdownToDocOptions): DocObject | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { marked } from 'marked';
|
|
2
2
|
import { DocBlock, DocBlockText, DocBlockTextAttributes, DocObject } from '../../../../@ones-editor/core';
|
|
3
|
-
import { CustomTagToken } from '../custom/tag';
|
|
4
3
|
export type TextAndChildren = {
|
|
5
4
|
text: DocBlockText;
|
|
6
5
|
children: DocBlock[];
|
|
@@ -8,7 +7,6 @@ export type TextAndChildren = {
|
|
|
8
7
|
export type TokensToText = (tokens: marked.Token[], attributes: DocBlockTextAttributes, options: TokenToBlockOptions) => DocBlockText;
|
|
9
8
|
export type TokensToBlocks = (tokens: marked.Token[], options: TokenToBlockOptions) => DocBlock[];
|
|
10
9
|
export type TokensToTextWithChildren = (tokens: marked.Token[], options: TokenToBlockOptions) => TextAndChildren;
|
|
11
|
-
export type CustomTagProcess = (token: CustomTagToken, attributes: DocBlockTextAttributes) => DocBlockText | null | undefined;
|
|
12
10
|
export type HtmlToDoc = (html: string) => DocObject | null;
|
|
13
11
|
export type TokenToBlockOptions = {
|
|
14
12
|
font?: string | Element;
|
|
@@ -18,5 +16,4 @@ export type TokenToBlockOptions = {
|
|
|
18
16
|
tokensToTextWithChildren: TokensToTextWithChildren;
|
|
19
17
|
htmlToDoc?: HtmlToDoc;
|
|
20
18
|
listLevel: number;
|
|
21
|
-
customTagProcess?: CustomTagProcess;
|
|
22
19
|
};
|