@ones-editor/editor 0.0.4 → 0.0.5-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/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +0 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -1
- package/@ones-editor/core/src/i18n/i18n.d.ts +2 -3
- package/@ones-editor/list-block/src/index.d.ts +3 -3
- package/@ones-editor/list-block/src/mindmap/mindmap.d.ts +2 -1
- package/@ones-editor/list-block/src/mindmap/utils/index.d.ts +2 -0
- package/@ones-editor/list-block/src/utils/index.d.ts +1 -0
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +0 -16
- package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
- 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 +2 -1
- package/@ones-editor/ui/src/quick-menu/types.d.ts +1 -1
- package/dist/index.js +161 -162
- package/package.json +1 -2
- package/@ones-editor/graph-embed/assets/index.d.ts +0 -2
|
@@ -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;
|
|
@@ -140,6 +140,7 @@ export interface CommandItem {
|
|
|
140
140
|
ellipsisTooltip?: string;
|
|
141
141
|
disableTooltip?: boolean;
|
|
142
142
|
disableReason?: string;
|
|
143
|
+
hideGroupItem?: boolean;
|
|
143
144
|
setCloseable?: (closeable: Closeable) => void;
|
|
144
145
|
beforePopup?: (parent: unknown) => void;
|
|
145
146
|
}
|
|
@@ -603,7 +604,7 @@ export interface OnesEditorInputHandler {
|
|
|
603
604
|
handleAfterKeyDown?: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
604
605
|
handleBeforeCopy?: (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
|
|
605
606
|
handleBeforeCut?: (editor: OnesEditor, event: ClipboardEvent) => DocObject | boolean | undefined;
|
|
606
|
-
handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
607
|
+
handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs, files: File[]) => Promise<boolean>;
|
|
607
608
|
handleAfterPaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
608
609
|
handleBeforePasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
|
|
609
610
|
handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject, cloneDocResult: CloneBlockResultInfo) => Promise<boolean>;
|
|
@@ -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 {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TextKindBlock } from '../../../@ones-editor/core';
|
|
2
2
|
import OnesEditorListMindmap from './mindmap';
|
|
3
3
|
import { toMindmap } from './mindmap/to-mindmap';
|
|
4
|
-
import { Mindmap } from './mindmap/mindmap';
|
|
4
|
+
import { Mindmap, isViewingAsMindmap, getLastMindmapNode, isMindmapRootBlock } from './mindmap/mindmap';
|
|
5
5
|
import ListBlockShortcuts from './keyboard/shortcut';
|
|
6
6
|
import { resetListStart } from './start/reset-list-start';
|
|
7
|
-
import { getListAllNextBrothers } from './utils/list-brother';
|
|
8
7
|
import './lang';
|
|
9
8
|
import './style.scss';
|
|
10
9
|
export { type ListOptions, type DocListBlock } from './types';
|
|
11
10
|
declare const ListBlock: TextKindBlock;
|
|
11
|
+
export * from './utils';
|
|
12
12
|
export * from './keyboard/to-text-block';
|
|
13
|
-
export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart,
|
|
13
|
+
export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart, toMindmap, isMindmapRootBlock, ListBlockShortcuts, isViewingAsMindmap, getLastMindmapNode, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { MindmapTools } from './to-mindmap/types';
|
|
2
|
+
import { isViewingAsMindmap, getLastMindmapNode, isMindmapRootBlock } from './utils';
|
|
2
3
|
declare const Mindmap: MindmapTools;
|
|
3
|
-
export { Mindmap, };
|
|
4
|
+
export { Mindmap, isMindmapRootBlock, isViewingAsMindmap, getLastMindmapNode, };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BlockElement } from '../../../../../@ones-editor/core';
|
|
2
2
|
export declare function requestFullscreen(elem: Element): Promise<unknown>;
|
|
3
3
|
export declare function exitFullscreen(): Promise<unknown>;
|
|
4
|
+
export declare function isMindmapRootBlock(block: BlockElement): boolean;
|
|
4
5
|
export declare function isViewingAsMindmap(block: BlockElement): boolean;
|
|
5
6
|
export declare function addBlockClasses(from: BlockElement, to: BlockElement | null, styles: string[]): void;
|
|
7
|
+
export declare function getLastMindmapNode(mindmapRootNode: BlockElement): BlockElement;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { OnesEditor, OnesEditorDocs, OnesEditorInputHandler } from '../../../@ones-editor/core';
|
|
2
2
|
export default class OnesEditorPasteHandler implements OnesEditorInputHandler {
|
|
3
3
|
constructor(editor: OnesEditor);
|
|
4
|
-
handleBeforePaste(editor: OnesEditor, event: ClipboardEvent | null, docs: OnesEditorDocs): Promise<boolean>;
|
|
4
|
+
handleBeforePaste(editor: OnesEditor, event: ClipboardEvent | null, docs: OnesEditorDocs, files: File[]): Promise<boolean>;
|
|
5
5
|
handleInsertImages(editor: OnesEditor, images: File[]): Promise<void>;
|
|
6
6
|
}
|