@ones-editor/editor 0.0.7-beta.52 → 0.0.7-beta.54
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/comments-list/list-base.d.ts +0 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +0 -2
- package/@ones-editor/core/src/core/containers/root-container.d.ts +1 -2
- package/@ones-editor/core/src/core/editor/actions/replace-container.d.ts +2 -2
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +0 -1
- package/@ones-editor/core/src/core/selection/range-from-point.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +0 -1
- package/@ones-editor/core/src/i18n/i18n.d.ts +2 -3
- package/@ones-editor/core/src/utils/abbreviation.d.ts +1 -1
- package/@ones-editor/core/src/utils/dom.d.ts +0 -4
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +0 -16
- package/@ones-editor/media-embed/src/locale/en-us.d.ts +0 -1
- package/@ones-editor/media-embed/src/locale/ja-jp.d.ts +0 -1
- package/@ones-editor/media-embed/src/locale/zh-cn.d.ts +0 -1
- package/@ones-editor/table-block/src/table-block/paste/paste-table-in-table.d.ts +2 -2
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +1 -2
- package/@ones-editor/ui/src/tooltips/index.d.ts +0 -2
- package/@ones-editor/ui-base/src/icons/index.d.ts +5 -15
- package/@ones-editor/ui-base/src/index.d.ts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +851 -1674
- package/package.json +1 -2
- package/@ones-editor/graph-embed/assets/index.d.ts +0 -2
|
@@ -15,7 +15,6 @@ export default abstract class ListBase<TData, TItem extends ItemBase, ListOption
|
|
|
15
15
|
deleteItem(commentId: string): boolean;
|
|
16
16
|
findItemIndex(commentId: string): number;
|
|
17
17
|
findItem(commentId: string): TItem | null;
|
|
18
|
-
findItemAsGroupId(commentId: string): TItem | null;
|
|
19
18
|
destroy(): void;
|
|
20
19
|
protected abstract createItem(data: TData, reason: 'init' | 'insert'): TItem;
|
|
21
20
|
protected abstract findInsertPos(data: TData): number;
|
|
@@ -19,7 +19,6 @@ export interface EditorInputCallbacks {
|
|
|
19
19
|
defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
20
20
|
destroy: () => void;
|
|
21
21
|
pasteDoc: (doc: DocObject) => Promise<void>;
|
|
22
|
-
forEach: (callback: (handler: OnesEditorInputHandler) => void) => void;
|
|
23
22
|
}
|
|
24
23
|
export declare class EditorInput implements OnesEditorInput {
|
|
25
24
|
editor: OnesEditor;
|
|
@@ -48,5 +47,4 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
48
47
|
removeHandler(handler: OnesEditorInputHandler): void;
|
|
49
48
|
defaultInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): void;
|
|
50
49
|
defaultHandleKeydown(editor: OnesEditor, event: KeyboardEvent): boolean;
|
|
51
|
-
forEach(callback: (handler: OnesEditorInputHandler) => void): void;
|
|
52
50
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import ResizeObserver from 'resize-observer-polyfill';
|
|
2
1
|
import { OnesEditor, ContainerElement, BlockElement } from '../types';
|
|
3
2
|
export declare class RootContainer {
|
|
4
3
|
private editor;
|
|
@@ -8,7 +7,7 @@ export declare class RootContainer {
|
|
|
8
7
|
private bindEvents;
|
|
9
8
|
private unbindEvents;
|
|
10
9
|
destroy(): void;
|
|
11
|
-
handleContextMenu: (event:
|
|
10
|
+
handleContextMenu: (event: Event) => void;
|
|
12
11
|
handleResize: () => void;
|
|
13
12
|
handleClick: (event: MouseEvent) => void;
|
|
14
13
|
handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocObject } from '../../doc';
|
|
2
|
-
import {
|
|
3
|
-
export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject
|
|
2
|
+
import { ContainerElement, OnesEditor } from '../../types';
|
|
3
|
+
export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SelectionRange, OnesEditor } from '../types';
|
|
2
2
|
import EditorSimpleSelectionRange from './range/simple-range';
|
|
3
|
-
export declare function getBlockRangeFromPoint(editor: OnesEditor,
|
|
3
|
+
export declare function getBlockRangeFromPoint(editor: OnesEditor, x: number, y: number): SelectionRange | null;
|
|
4
4
|
export declare function getBlockNearestRangeFromPoint(editor: OnesEditor, x: number, y: number): EditorSimpleSelectionRange | null;
|
|
@@ -579,7 +579,6 @@ export interface OnesEditorInput {
|
|
|
579
579
|
handlePasteText: (text: string, options?: PasteOptions) => void;
|
|
580
580
|
addHandler: (handler: OnesEditorInputHandler) => void;
|
|
581
581
|
removeHandler: (handler: OnesEditorInputHandler) => void;
|
|
582
|
-
forEach: (cb: (handler: OnesEditorInputHandler) => void) => void;
|
|
583
582
|
defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
|
|
584
583
|
defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
585
584
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type LANGS = keyof typeof langs;
|
|
2
1
|
declare const langs: {
|
|
3
2
|
'en-US': {
|
|
4
3
|
name: string;
|
|
@@ -58,8 +57,8 @@ declare const langs: {
|
|
|
58
57
|
};
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
|
-
export declare function setLang(lang?:
|
|
60
|
+
export declare function setLang(lang?: string | null | undefined): void;
|
|
62
61
|
export declare function mergeLang(l: any): void;
|
|
63
62
|
export declare function t(key: string, args?: Record<string, string>): string;
|
|
64
|
-
export
|
|
63
|
+
export type LANGS = keyof typeof langs;
|
|
65
64
|
export {};
|
|
@@ -12,7 +12,7 @@ export declare function hashCode(str: string): number;
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function abbreviation(name: string, maxLength?: number): string;
|
|
14
14
|
declare enum EColor {
|
|
15
|
-
blue = "#
|
|
15
|
+
blue = "#338FE5",
|
|
16
16
|
cyan = "#34AFDE",
|
|
17
17
|
teal = "#2CB2AE",
|
|
18
18
|
green = "#24B47E",
|
|
@@ -11,10 +11,6 @@ export declare function createExpandedRange(startNode: Node, startOffset: number
|
|
|
11
11
|
export declare function getFirstClientRect(elem: Element): DOMRect;
|
|
12
12
|
export declare function getLastClientRect(elem: Element): DOMRect;
|
|
13
13
|
export declare function getDistanceSquare(rect: DOMRect, x: number, y: number): number;
|
|
14
|
-
export declare function getOffsetFromPoint(x: number, y: number): {
|
|
15
|
-
textNode: any;
|
|
16
|
-
offset: number;
|
|
17
|
-
};
|
|
18
14
|
export declare function textNodeOffsetFromPoint(node: Text, x: number, y: number): number;
|
|
19
15
|
export declare function compareElement(elem1: Element, elem2: Element): number;
|
|
20
16
|
export declare function getHorizontalPadding(elem: Element): number;
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
import { AbstractCommandBar, Popup } from '../../../../@ones-editor/ui-base';
|
|
3
1
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
4
2
|
export type OnEditChange = (tex: string, end: boolean) => void;
|
|
5
|
-
export default class MathjaxEditor {
|
|
6
|
-
editMathjaxPopup: Popup | null;
|
|
7
|
-
onChange: OnEditChange | null;
|
|
8
|
-
tex: string;
|
|
9
|
-
private observer;
|
|
10
|
-
editMathjax(elem: HTMLElement, tex: string, onChange: OnEditChange): void;
|
|
11
|
-
handleClose: (commandBar: AbstractCommandBar) => void;
|
|
12
|
-
handleKeyup: (event: KeyboardEvent) => void;
|
|
13
|
-
handleChange: import("lodash").DebouncedFunc<(text: string) => void>;
|
|
14
|
-
createPopupContent(tex: string): HTMLTextAreaElement;
|
|
15
|
-
textareaWatcher(textarea: HTMLTextAreaElement): void;
|
|
16
|
-
getTextarea(): HTMLTextAreaElement;
|
|
17
|
-
destroy(): void;
|
|
18
|
-
}
|
|
19
3
|
export declare function editMathjax(editor: OnesEditor, elem: HTMLElement, tex: string, onChange: OnEditChange): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockElement, DocObject, OnesEditor
|
|
2
|
-
export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement
|
|
1
|
+
import { BlockElement, DocObject, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
+
export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement): void;
|