@ones-editor/editor 2.9.8 → 3.0.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/cke-html/package.json +7 -0
- package/@ones-editor/cke-html/src/html/cke-html.d.ts +4 -0
- package/@ones-editor/cke-html/src/html/combine-html.d.ts +2 -0
- package/@ones-editor/cke-html/src/html/comment.d.ts +6 -0
- package/@ones-editor/cke-html/src/html/converter.d.ts +7 -0
- package/@ones-editor/cke-html/src/html/data-helper/link-data.d.ts +0 -0
- package/@ones-editor/cke-html/src/html/image.d.ts +4 -0
- package/@ones-editor/cke-html/src/html/link.d.ts +2 -0
- package/@ones-editor/cke-html/src/html/markdown.d.ts +2 -0
- package/@ones-editor/cke-html/src/html/mention.d.ts +4 -0
- package/@ones-editor/cke-html/src/index.d.ts +2 -0
- package/@ones-editor/context-menu/src/helper/command-items.d.ts +3 -1
- package/@ones-editor/context-menu/src/menu/index.d.ts +1 -0
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +2 -0
- package/@ones-editor/core/src/core/doc/doc.d.ts +4 -1
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -0
- package/@ones-editor/core/src/core/input-handler/remove-unknown-components.d.ts +3 -0
- 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 +1 -0
- package/@ones-editor/core/src/core/types.d.ts +4 -0
- package/@ones-editor/core/src/local-doc/index.d.ts +1 -0
- package/@ones-editor/core/src/users/remote-users.d.ts +1 -1
- package/@ones-editor/file/src/file-embed/card/index.d.ts +6 -2
- package/@ones-editor/file/src/index.d.ts +2 -1
- package/@ones-editor/file/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/file/src/locale/ja-jp.d.ts +2 -0
- package/@ones-editor/file/src/locale/zh-cn.d.ts +2 -0
- package/@ones-editor/file/src/locale/zh-hant-hk.d.ts +2 -0
- package/@ones-editor/file/src/types.d.ts +1 -0
- package/@ones-editor/find-dialog/src/highlights/highlight-dom.d.ts +2 -0
- package/@ones-editor/graph-embed/src/helper/graph-dom/code-editor.d.ts +1 -0
- package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/super-script.d.ts +1 -0
- package/@ones-editor/list-block/src/index.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/index.d.ts +8 -1
- package/@ones-editor/main-toolbar/src/items/file.d.ts +10 -0
- package/@ones-editor/main-toolbar/src/items/index.d.ts +5 -2
- package/@ones-editor/main-toolbar/src/items/insert.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/items/mention.d.ts +8 -0
- package/@ones-editor/main-toolbar/src/items/paragraph.d.ts +2 -1
- package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/locale/zh-hant-hk.d.ts +3 -0
- package/@ones-editor/server-tools/src/index.d.ts +4 -1
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/providers/list.d.ts +1 -1
- package/@ones-editor/ui/src/quick-menu/index.d.ts +3 -3
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +2 -1
- package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +7 -3
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +17 -8
- package/@ones-editor/ui-base/src/icons/index.d.ts +4 -1
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +3 -1
- package/@ones-editor/versions/src/version-dialog/index.d.ts +2 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3000 -1797
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DocObject, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare function ckeHtml2Doc(html: string): DocObject;
|
|
3
|
+
export declare function injectDocToCkeHtmlFragment(htmlFragment: string, doc: DocObject, text?: string): string;
|
|
4
|
+
export declare function editorToCKEHtml(editor: OnesEditor): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DocObject, DocComment } from '../../../../@ones-editor/core';
|
|
2
|
+
import type { CkeHtmlConverter } from './converter';
|
|
3
|
+
export declare const CkeCommentConverter: CkeHtmlConverter;
|
|
4
|
+
export declare function processCkeCommentsLink(doc: DocObject): void;
|
|
5
|
+
export declare function convertAnnotateToComment(annotate: any): DocComment;
|
|
6
|
+
export declare function convertAnnotatesToComments(annotates: any[]): Record<string, DocComment>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface CkeHtmlConverter {
|
|
2
|
+
filter: (node: Node) => boolean;
|
|
3
|
+
replacement: (content: any, node: HTMLElement) => string;
|
|
4
|
+
}
|
|
5
|
+
export declare function registerCKEHtmlConvert(name: string, converter: CkeHtmlConverter): void;
|
|
6
|
+
export declare function getTurndownRootElement(node: Node): Node;
|
|
7
|
+
export declare function patchForEmptyBlock(key: string, node: Node, className: string): void;
|
|
File without changes
|
|
@@ -5,6 +5,7 @@ export default class ContextMenuCommandItems {
|
|
|
5
5
|
private clipboardPermission;
|
|
6
6
|
private isSecureContext;
|
|
7
7
|
private externalActionHandleMap;
|
|
8
|
+
private target;
|
|
8
9
|
constructor(editor: OnesEditor);
|
|
9
10
|
get hasClipboardReadPermission(): boolean;
|
|
10
11
|
get hasClipboardWritePermission(): boolean;
|
|
@@ -18,10 +19,11 @@ export default class ContextMenuCommandItems {
|
|
|
18
19
|
destroy(): void;
|
|
19
20
|
handleActionByExternal: (item: CommandItem) => unknown;
|
|
20
21
|
getPasteCommandItem: () => Promise<CommandItem>;
|
|
21
|
-
getCommandItems: () => Promise<CommandItem[]>;
|
|
22
|
+
getCommandItems: (target?: HTMLElement | null) => Promise<CommandItem[]>;
|
|
22
23
|
private getExternalContextMenuOptions;
|
|
23
24
|
private secureEnvTips;
|
|
24
25
|
private isFocusImageBlock;
|
|
26
|
+
private getFocusImageBlock;
|
|
25
27
|
private isFocusImageTypeEmbed;
|
|
26
28
|
private isEmptyImageTypeEmbed;
|
|
27
29
|
}
|
|
@@ -28,6 +28,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
28
28
|
composingTimer: NodeJS.Timeout | undefined;
|
|
29
29
|
callbacks: EditorInputCallbacks;
|
|
30
30
|
inputElement: HTMLTextAreaElement;
|
|
31
|
+
private focused;
|
|
31
32
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
32
33
|
private isInCommandBar;
|
|
33
34
|
destroy(): void;
|
|
@@ -35,6 +36,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
35
36
|
focus(options?: FocusOptions): void;
|
|
36
37
|
isInDisableScrollMask(target: Node): boolean;
|
|
37
38
|
handleBlur: () => void;
|
|
39
|
+
handleWindowBlur: () => void;
|
|
38
40
|
handleWindowFocus: () => void;
|
|
39
41
|
handleDocumentClick: (event: MouseEvent | TouchEvent) => void;
|
|
40
42
|
handleDocumentSelectionChange: () => void;
|
|
@@ -139,8 +139,10 @@ export interface OnesEditorDocCallbacks {
|
|
|
139
139
|
onStatusChanged?: (status: OnesEditorDocStatus) => void;
|
|
140
140
|
onError?: (error: Error) => void;
|
|
141
141
|
}
|
|
142
|
+
export type OnesEditorResourceType = 'image' | 'media' | 'file' | 'graph' | 'paste' | 'unknown';
|
|
142
143
|
export interface UploadResourceOptions {
|
|
143
144
|
onProgress?: (progress: number) => void;
|
|
145
|
+
resourceType?: OnesEditorResourceType;
|
|
144
146
|
}
|
|
145
147
|
export interface UploadResourceResult {
|
|
146
148
|
resourceId: string;
|
|
@@ -175,7 +177,7 @@ export interface OnesEditorRemoteUsers extends TypedEmitter<RemoteUsersEvents> {
|
|
|
175
177
|
findUser: (userId: string) => OnesEditorUser | null;
|
|
176
178
|
removeUser: (clientId: string) => void;
|
|
177
179
|
updateUsers: (users: OnesEditorUser[]) => void;
|
|
178
|
-
getSimpleCursors: (blockId: string) => Map<number, OnesEditorClientSelection[]>;
|
|
180
|
+
getSimpleCursors: (blockId: string, excludeUserId?: string) => Map<number, OnesEditorClientSelection[]>;
|
|
179
181
|
getCursors: (blockId: string) => OnesEditorClientSelection[];
|
|
180
182
|
onUpdateBlockText: (blockData: DocBlock, actions: DocBlockTextActions, local: boolean) => void;
|
|
181
183
|
getFixedUserColor: (userId: string, type: 'flag' | 'selection') => string;
|
|
@@ -254,6 +256,7 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
|
|
|
254
256
|
endBatchUpdate: () => number;
|
|
255
257
|
triggerReAuth?: (auto?: boolean) => void;
|
|
256
258
|
rawData?: () => DocObject;
|
|
259
|
+
applyingOps?: () => boolean;
|
|
257
260
|
}
|
|
258
261
|
export interface OnesEditorDocHistoryData {
|
|
259
262
|
user: {
|
|
@@ -8,6 +8,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
8
8
|
constructor(editor: OnesEditor, externalDoc: OnesEditorDoc, localEvents: EditorDocLocalActionCallbacks);
|
|
9
9
|
beginBatchUpdate(): number;
|
|
10
10
|
endBatchUpdate(): number;
|
|
11
|
+
applyingOps(): boolean;
|
|
11
12
|
registerLocalEvents(events: EditorDocLocalActionCallbacks): void;
|
|
12
13
|
toJSON(): DocObject;
|
|
13
14
|
getVersionHelper(): import("../doc").OnesEditorDocVersionHelper | undefined;
|
|
@@ -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 } from './select-all';
|
|
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, editorSelectContainer, isContainerSelectedAllChildBlocks, };
|
|
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, };
|
|
@@ -2,3 +2,4 @@ import { ContainerElement, OnesEditor, SimpleSelectionRange } from '../../types'
|
|
|
2
2
|
export declare function isContainerSelectedAllChildBlocks(container: ContainerElement, range: SimpleSelectionRange): boolean;
|
|
3
3
|
export declare function editorSelectAll(editor: OnesEditor): boolean;
|
|
4
4
|
export declare function editorSelectContainer(editor: OnesEditor, container: ContainerElement): void;
|
|
5
|
+
export declare function editorSelectAllBlocks(editor: OnesEditor): void;
|
|
@@ -448,6 +448,7 @@ export interface OnesEditorEvents {
|
|
|
448
448
|
'beforeExecCommand': (editor: OnesEditor, command: CommandItem, option: {
|
|
449
449
|
source: string;
|
|
450
450
|
}) => void;
|
|
451
|
+
'textColorChanged': (editor: OnesEditor, sender: unknown) => void;
|
|
451
452
|
}
|
|
452
453
|
export interface OnesEditorSettingsProvider {
|
|
453
454
|
getItem: (key: string) => string | null;
|
|
@@ -464,6 +465,7 @@ export interface OnesEditorOptionalOptions {
|
|
|
464
465
|
enableResolveComments?: boolean;
|
|
465
466
|
enableContextMenu?: boolean;
|
|
466
467
|
settingsProvider?: OnesEditorSettingsProvider;
|
|
468
|
+
dateTimeFormatter?: (v: Date, source?: string) => string;
|
|
467
469
|
}
|
|
468
470
|
export interface OnesEditorOptions {
|
|
469
471
|
colors: string[];
|
|
@@ -474,6 +476,7 @@ export interface OnesEditorOptions {
|
|
|
474
476
|
enableResolveComments?: boolean;
|
|
475
477
|
enableContextMenu?: boolean;
|
|
476
478
|
scrollContainer?: HTMLElement;
|
|
479
|
+
dateTimeFormatter?: (v: Date, source?: string) => string;
|
|
477
480
|
}
|
|
478
481
|
export interface OnesEditorComponents {
|
|
479
482
|
blocks?: Block[];
|
|
@@ -551,6 +554,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
551
554
|
readonly settingsProvider: OnesEditorSettingsProvider;
|
|
552
555
|
version: string;
|
|
553
556
|
readonly: boolean;
|
|
557
|
+
destroyed: boolean;
|
|
554
558
|
addCustom: <T extends OnesEditorCustom>(name: string, creator: OnesEditorCustomCreator<T>) => T;
|
|
555
559
|
getCustom: <T extends OnesEditorCustom>(name: string) => T;
|
|
556
560
|
replaceCustom: <T extends OnesEditorCustom>(name: string, newCustom: T) => T;
|
|
@@ -11,6 +11,7 @@ export declare class LocalDoc extends EventCallbacks<OnesEditorDocCallbacks> imp
|
|
|
11
11
|
endBatchUpdate(): number;
|
|
12
12
|
toJSON(): DocObject;
|
|
13
13
|
rawData(): DocObject;
|
|
14
|
+
applyingOps(): boolean;
|
|
14
15
|
getContainerBlocks(containerId: string): DocBlock[];
|
|
15
16
|
findContainerBlocks(containerId: string): DocBlock[];
|
|
16
17
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
|
@@ -12,7 +12,7 @@ declare class RemoteUsers extends TypedEmitter<RemoteUsersEvents> implements One
|
|
|
12
12
|
findUser(userId: string): OnesEditorUser | null;
|
|
13
13
|
removeUser(clientId: string): void;
|
|
14
14
|
updateUsers(users: OnesEditorUser[]): void;
|
|
15
|
-
getSimpleCursors(blockId: string): Map<number, OnesEditorClientSelection[]>;
|
|
15
|
+
getSimpleCursors(blockId: string, excludeUserId?: string): Map<number, OnesEditorClientSelection[]>;
|
|
16
16
|
getCursors(blockId: string): OnesEditorClientSelection[];
|
|
17
17
|
onUpdateBlockText(blockData: DocBlock, actions: DocBlockTextActions, local: boolean): void;
|
|
18
18
|
getFixedUserColor(userId: string, type: 'flag' | 'selection'): string;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { OnesEditor, BlockContentElement } from '../../../../../@ones-editor/core';
|
|
2
2
|
import { FileEmbedData } from '../../types';
|
|
3
|
-
export declare function renderFileCard(editor: OnesEditor, content: BlockContentElement, data: FileEmbedData):
|
|
3
|
+
export declare function renderFileCard(editor: OnesEditor, content: BlockContentElement, data: FileEmbedData): {
|
|
4
4
|
card: HTMLDivElement;
|
|
5
5
|
downloadButton: HTMLElement | undefined;
|
|
6
6
|
copilotButton: HTMLButtonElement | undefined;
|
|
7
|
-
|
|
7
|
+
cancel: HTMLButtonElement;
|
|
8
|
+
retryUpload: HTMLButtonElement;
|
|
9
|
+
};
|
|
10
|
+
export declare function updateFileCardProgress(editor: OnesEditor, blockId: string, progressValue: number): void;
|
|
11
|
+
export declare function setFileCardUploadError(editor: OnesEditor, blockId: string): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import FileBox from './file-box';
|
|
2
2
|
import FileEmbed from './file-embed';
|
|
3
3
|
import './locale';
|
|
4
|
+
import { updateFileCardProgress, setFileCardUploadError } from './file-embed/card';
|
|
4
5
|
export * from './types';
|
|
5
|
-
export { FileBox, FileEmbed };
|
|
6
|
+
export { FileBox, FileEmbed, updateFileCardProgress, setFileCardUploadError };
|
|
@@ -25,4 +25,5 @@ export interface FileOptions {
|
|
|
25
25
|
renderFileCardIcon?: (editor: OnesEditor, blockData: FileEmbedData) => Promise<false | HTMLImageElement>;
|
|
26
26
|
onGetFileDownloadUrl?: (editor: OnesEditor, data: FileBoxData | FileEmbedData) => Promise<string | undefined>;
|
|
27
27
|
newCardUI?: boolean;
|
|
28
|
+
retryUpload?: (editor: OnesEditor, block: BlockElement) => void;
|
|
28
29
|
}
|
|
@@ -11,8 +11,10 @@ export declare function getHighlightInfo(editor: OnesEditor): {
|
|
|
11
11
|
type: 'text' | 'box';
|
|
12
12
|
}[];
|
|
13
13
|
export declare function getHighlightByIndex(editor: OnesEditor, index: number): HTMLElement | null;
|
|
14
|
+
export declare function updateHighlight(editor: OnesEditor, block: BlockElement, elem: HTMLElement): void;
|
|
14
15
|
export declare function createFindHighlight(editor: OnesEditor, block: BlockElement, start: number, end: number): void;
|
|
15
16
|
export declare function createReplaceResultHighligh(editor: OnesEditor, block: BlockElement, start: number, end: number): void;
|
|
16
17
|
export declare function setCurrentHighlight(editor: OnesEditor, elem: HTMLElement): void;
|
|
17
18
|
export declare function getCurrentHighligh(editor: OnesEditor): HTMLElement | null;
|
|
19
|
+
export declare function removeBlockHighlight(elem: HTMLElement): void;
|
|
18
20
|
export declare function isReadonlyHighlight(elem: HTMLElement): boolean;
|
|
@@ -2,3 +2,4 @@ import { BlockElement } from '../../../../../@ones-editor/core';
|
|
|
2
2
|
export type OnChange = (codeValue: string) => void;
|
|
3
3
|
export declare const createCodeEditor: (parent: HTMLElement, codeValue: string, onChange: OnChange, onActiveChange: (focused: boolean) => void) => void;
|
|
4
4
|
export declare const getCodeEditor: (block: BlockElement) => HTMLTextAreaElement;
|
|
5
|
+
export declare function focusToCodeEditor(block: BlockElement): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function superScript(ts: any): void;
|
|
@@ -8,8 +8,10 @@ import './lang';
|
|
|
8
8
|
import './style.scss';
|
|
9
9
|
import { ListPasteHandler } from './local-events/paste-handler';
|
|
10
10
|
import { handleTab, handleShiftTab } from './keyboard/tab';
|
|
11
|
+
export { FixStartByBlock, FixStartByList } from './start/fix-start-by-list';
|
|
11
12
|
export { autoBreakListBlock } from './keyboard/enter';
|
|
12
13
|
export { type ListOptions, type DocListBlock } from './types';
|
|
14
|
+
export { getListType } from './list-data';
|
|
13
15
|
declare const ListBlock: TextKindBlock;
|
|
14
16
|
export * from './utils';
|
|
15
17
|
export * from './keyboard/to-text-block';
|
|
@@ -5,10 +5,17 @@ import './locale';
|
|
|
5
5
|
import './style.scss';
|
|
6
6
|
export * from './types';
|
|
7
7
|
export * from './items';
|
|
8
|
+
export interface MainToolbarOptions {
|
|
9
|
+
enableFullScreen?: boolean;
|
|
10
|
+
onFullScreenClick?: (editor: OnesEditor, item: CommandItem) => void;
|
|
11
|
+
}
|
|
8
12
|
export declare class MainToolbar implements OnesEditorCustom {
|
|
9
13
|
private editor;
|
|
14
|
+
private options;
|
|
10
15
|
toolbar: FixedToolbar;
|
|
11
|
-
|
|
16
|
+
toolbarFullScreen?: FixedToolbar;
|
|
17
|
+
root: HTMLElement;
|
|
18
|
+
constructor(editor: OnesEditor, parent: HTMLElement, options?: MainToolbarOptions);
|
|
12
19
|
destroy(): void;
|
|
13
20
|
setItems(items: ToolbarItem[]): void;
|
|
14
21
|
getItems(): ToolbarItem[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ToolbarItem } from '../types';
|
|
3
|
+
import { FilePreviewType } from '../../../../@ones-editor/file';
|
|
4
|
+
export declare function createFileCard(editor: OnesEditor, containerId: string, blockIndex: number, file: File, previewType?: FilePreviewType): Promise<BlockElement>;
|
|
5
|
+
export declare class InsertFileItem implements ToolbarItem {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
onClick(editor: OnesEditor, item: ToolbarItem): Promise<void>;
|
|
10
|
+
}
|
|
@@ -13,5 +13,8 @@ import { FindReplaceItem } from './find';
|
|
|
13
13
|
import { CommentItem } from './comment';
|
|
14
14
|
import { ColorItem } from './text-color';
|
|
15
15
|
import { MoreItem } from './more-item';
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
import { InsertFileItem, createFileCard } from './file';
|
|
17
|
+
import { InsertMentionItem } from './mention';
|
|
18
|
+
export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | ColorItem)[];
|
|
19
|
+
export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertFileItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, InsertMentionItem, };
|
|
20
|
+
export { createFileCard, };
|
|
@@ -2,12 +2,15 @@ import { CommandItem, CommandItemChildrenPlacement, OnesEditor } from '../../../
|
|
|
2
2
|
import { AbstractCommandBar } from '../../../../@ones-editor/ui-base';
|
|
3
3
|
import { ToolbarItem } from '../types';
|
|
4
4
|
export declare class InsertItem implements ToolbarItem {
|
|
5
|
+
private editor;
|
|
5
6
|
name: string;
|
|
6
7
|
id: string;
|
|
7
8
|
dropdown: boolean;
|
|
8
9
|
manualShowChildren: boolean;
|
|
9
10
|
childrenPlacement: CommandItemChildrenPlacement;
|
|
10
11
|
children: CommandItem[];
|
|
12
|
+
allChildren: CommandItem[];
|
|
11
13
|
constructor(editor: OnesEditor);
|
|
14
|
+
beforePopup(subBar: unknown): void;
|
|
12
15
|
onClick(editor: OnesEditor, item: ToolbarItem, commandBar: AbstractCommandBar): void;
|
|
13
16
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ToolbarItem } from '../types';
|
|
3
|
+
export declare class InsertMentionItem implements ToolbarItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
8
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AbstractCommandBar } from '../../../../@ones-editor/ui-base';
|
|
1
2
|
import { CommandItemChildrenPlacement, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
3
|
import { ToolbarItem } from '../types';
|
|
3
4
|
export declare class ParagraphItem implements ToolbarItem {
|
|
@@ -10,5 +11,5 @@ export declare class ParagraphItem implements ToolbarItem {
|
|
|
10
11
|
childrenPlacement: CommandItemChildrenPlacement;
|
|
11
12
|
constructor();
|
|
12
13
|
updateState(editor: OnesEditor): void;
|
|
13
|
-
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
14
|
+
onClick(editor: OnesEditor, item: ToolbarItem, bar: AbstractCommandBar): void;
|
|
14
15
|
}
|
|
@@ -16,9 +16,11 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
16
16
|
disableLogout: boolean;
|
|
17
17
|
destroyed: boolean;
|
|
18
18
|
editStatus: EditStatus;
|
|
19
|
+
_applyingOps: boolean;
|
|
19
20
|
constructor(options: ShareDBDocOptions, client: ShareDBClient, doc: Doc, disableLogout?: boolean);
|
|
20
21
|
beginBatchUpdate(): number;
|
|
21
22
|
endBatchUpdate(): number;
|
|
23
|
+
applyingOps(): boolean;
|
|
22
24
|
static load(options: ShareDBDocOptions): Promise<ShareDBDoc>;
|
|
23
25
|
private handleNothingPending;
|
|
24
26
|
private handleCreate;
|