@ones-editor/editor 1.1.16-beta.3 → 1.1.17-beta.1
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/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
- package/@ones-editor/code-block/src/code-block/header/index.d.ts +1 -0
- package/@ones-editor/comments/src/comment-quick-reply/index.d.ts +1 -0
- package/@ones-editor/context-menu/src/menu/index.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +2 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -0
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -0
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +3 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -1
- package/@ones-editor/core/src/utils/dom.d.ts +3 -0
- package/@ones-editor/find-dialog/src/find-dialog.d.ts +1 -0
- package/@ones-editor/heading-collapse/src/heading-collapse-button/heading-block-collapse-button-render.d.ts +1 -4
- package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +0 -2
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +1 -2
- package/@ones-editor/ui/src/quick-menu/types.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/manual-menu.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +0 -1
- package/@ones-editor/ui-base/src/popup/popup.d.ts +0 -2
- package/@ones-editor/versions/src/types.d.ts +1 -1
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +199 -199
- package/dist/types.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
|
|
2
2
|
import type { GetAllQuickMenuItemsOptions } from '../../../../../../@ones-editor/ui';
|
|
3
3
|
import type { BlockMenuItem } from '../types';
|
|
4
|
-
export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options
|
|
4
|
+
export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options?: GetAllQuickMenuItemsOptions): BlockMenuItem[];
|
|
5
5
|
export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
2
|
import { DocCodeBlockData } from '../code-block-data';
|
|
3
3
|
export declare function createCodeBlockHeader(editor: OnesEditor, block: BlockElement, codeData: DocCodeBlockData): void;
|
|
4
|
+
export declare function getCodeBlockHeader(block: BlockElement): HTMLElement;
|
|
@@ -12,6 +12,7 @@ declare class OnesEditorContextMenu implements OnesEditorCustom {
|
|
|
12
12
|
private isInEditor;
|
|
13
13
|
private handleContextMenuShown;
|
|
14
14
|
private handleContextMenuClick;
|
|
15
|
+
private handleContextMenuClose;
|
|
15
16
|
private handleImageEmbedAction;
|
|
16
17
|
}
|
|
17
18
|
export default OnesEditorContextMenu;
|
|
@@ -2,8 +2,9 @@ import { OnesEditor, BlockElement, BlockPosition, ContainerElement, ComplexBlock
|
|
|
2
2
|
export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement, options?: GetChildContainerOptions): ContainerElement[];
|
|
3
3
|
export declare function complexBlockGetSelectedContainers(editor: OnesEditor, block: BlockElement, start: BlockPosition, end: BlockPosition): ContainerElement[];
|
|
4
4
|
export declare function isFirstChildBlockInComplexBlock(editor: OnesEditor, childBlock: BlockElement): boolean;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function complexBlockGetFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
6
6
|
export declare function complexBlockGetLastSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
7
|
+
export declare function complexBlockGetDeepFirstChild(editor: OnesEditor, container: ContainerElement): BlockElement | null;
|
|
7
8
|
export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEditor, childContainer: ContainerElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
8
9
|
export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
9
10
|
export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
@@ -27,6 +27,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
27
27
|
callbacks: EditorInputCallbacks;
|
|
28
28
|
inputElement: HTMLInputElement;
|
|
29
29
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
30
|
+
private isInCommandbar;
|
|
30
31
|
destroy(): void;
|
|
31
32
|
getInput(): HTMLInputElement;
|
|
32
33
|
focus(): void;
|
|
@@ -34,6 +34,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
34
34
|
onCustomMessage(msg: unknown): void;
|
|
35
35
|
onStatusChanged(status: OnesEditorDocStatus): void;
|
|
36
36
|
onError(error: Error): void;
|
|
37
|
+
onAuthRecover(): void;
|
|
37
38
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
38
39
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
39
40
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { EditorInputCallbacks } from '../composition/editor-input';
|
|
2
3
|
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
|
|
3
4
|
import { DocObject } from '../doc';
|
|
@@ -18,7 +19,8 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
|
|
|
18
19
|
onPaste(event: ClipboardEvent): void;
|
|
19
20
|
onPasteText: (text: string, options?: PasteOptions) => Promise<void>;
|
|
20
21
|
onFocus(): void;
|
|
21
|
-
onBlur()
|
|
22
|
+
onBlur: import("lodash").DebouncedFunc<() => void>;
|
|
23
|
+
removeActiveForBlur: import("lodash").DebouncedFunc<() => void>;
|
|
22
24
|
addHandler(handler: OnesEditorInputHandler): void;
|
|
23
25
|
removeHandler(handler: OnesEditorInputHandler): void;
|
|
24
26
|
handleBeforeInsertText(containerId: string, blockIndex: number, offset: number, text: string): boolean;
|
|
@@ -144,7 +144,6 @@ export interface CommandItem {
|
|
|
144
144
|
ellipsisTooltip?: string;
|
|
145
145
|
disableTooltip?: boolean;
|
|
146
146
|
disableReason?: string;
|
|
147
|
-
hideGroupItem?: boolean;
|
|
148
147
|
setCloseable?: (closeable: Closeable) => void;
|
|
149
148
|
beforePopup?: (parent: unknown) => void;
|
|
150
149
|
}
|
|
@@ -399,6 +398,7 @@ export interface OnesEditorOptionalOptions {
|
|
|
399
398
|
colors?: string[];
|
|
400
399
|
scrollContainer?: HTMLElement;
|
|
401
400
|
enableComments?: boolean;
|
|
401
|
+
enableContextMenu?: boolean;
|
|
402
402
|
settingsProvider?: OnesEditorSettingsProvider;
|
|
403
403
|
}
|
|
404
404
|
export interface OnesEditorOptions {
|
|
@@ -407,6 +407,7 @@ export interface OnesEditorOptions {
|
|
|
407
407
|
[index: string]: unknown;
|
|
408
408
|
};
|
|
409
409
|
enableComments?: boolean;
|
|
410
|
+
enableContextMenu?: boolean;
|
|
410
411
|
scrollContainer?: HTMLElement;
|
|
411
412
|
}
|
|
412
413
|
export interface OnesEditorComponents {
|
|
@@ -33,4 +33,7 @@ export declare function findTarget(event: Event, cssSelector: string): Element |
|
|
|
33
33
|
export declare function findEventTargetBlock(event: Event): Element | null;
|
|
34
34
|
export declare function isElementVisible(element: Element | null): boolean;
|
|
35
35
|
export declare function getElementScale(element: Element): number;
|
|
36
|
+
export declare function getElementFromPoint(x: number, y: number, options?: {
|
|
37
|
+
noFilter: boolean;
|
|
38
|
+
}): Element;
|
|
36
39
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockElement,
|
|
1
|
+
import { BlockElement, OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare class HeadingBlockCollapseButton implements OnesEditorCustom {
|
|
3
3
|
private editor;
|
|
4
4
|
constructor(editor: OnesEditor);
|
|
@@ -7,8 +7,5 @@ export declare class HeadingBlockCollapseButton implements OnesEditorCustom {
|
|
|
7
7
|
handleHoverBlock: (hoveringBlock: BlockElement | null, oldHoveringBlock: BlockElement | null) => void;
|
|
8
8
|
handleClick: (editor: OnesEditor, event: MouseEvent) => void;
|
|
9
9
|
showCollapseButtons(): void;
|
|
10
|
-
handleBeforeExecCommand: (editor: OnesEditor, command: CommandItem, option: {
|
|
11
|
-
source: string;
|
|
12
|
-
}) => void;
|
|
13
10
|
destroy(): void;
|
|
14
11
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
1
|
export interface EnforceWithDocumentTitleHandlerOptions {
|
|
3
2
|
hideTitle?: boolean;
|
|
4
3
|
headingLevel?: number;
|
|
@@ -6,5 +5,4 @@ export interface EnforceWithDocumentTitleHandlerOptions {
|
|
|
6
5
|
contentPlaceholder?: string | Element;
|
|
7
6
|
readonlyTitlePlaceholder?: string;
|
|
8
7
|
addPlaceholderToAllCurrentEmptyBlock?: boolean;
|
|
9
|
-
applyContentPlaceholder?: (editor: OnesEditor) => boolean;
|
|
10
8
|
}
|