@ones-editor/editor 1.1.6-beta.5 → 1.1.6-beta.7
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/child-block-tracker/src/event-tracker.d.ts +3 -2
- package/@ones-editor/child-block-tracker/src/index.d.ts +3 -3
- package/@ones-editor/comments/src/comments-render/index.d.ts +0 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/actions/update-block-text.d.ts +3 -3
- package/@ones-editor/core/src/core/editor/actions/update-box-data.d.ts +2 -2
- package/@ones-editor/core/src/core/types.d.ts +1 -2
- package/@ones-editor/paste-special/src/paste-special-button.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/chart/index.d.ts +2 -2
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +1 -2
- package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -2
- package/dist/index.js +198 -209
- package/package.json +1 -1
- package/@ones-editor/status/package.json +0 -7
- package/@ones-editor/status/src/dom/input.d.ts +0 -1
- package/@ones-editor/status/src/dom/overflow-tooltip-tag.d.ts +0 -10
- package/@ones-editor/status/src/dom/status-palette.d.ts +0 -6
- package/@ones-editor/status/src/index.d.ts +0 -4
- package/@ones-editor/status/src/locale/en-us.d.ts +0 -25
- package/@ones-editor/status/src/locale/index.d.ts +0 -1
- package/@ones-editor/status/src/locale/ja-jp.d.ts +0 -25
- package/@ones-editor/status/src/locale/zh-cn.d.ts +0 -25
- package/@ones-editor/status/src/status-box-command.d.ts +0 -7
- package/@ones-editor/status/src/status-box-data.d.ts +0 -5
- package/@ones-editor/status/src/status-box-editor.d.ts +0 -21
- package/@ones-editor/status/src/status-box.d.ts +0 -4
- package/@ones-editor/status/src/types.d.ts +0 -8
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import { BlockElement, OnesEditor, OnesEditorDocCallbacks } from '../../../@ones-editor/core';
|
|
2
|
+
import { BlockElement, BlockPathComponent, OnesEditor, OnesEditorDocCallbacks } from '../../../@ones-editor/core';
|
|
3
3
|
export type ChildBlockAction = 'text-change' | 'data-change' | 'insert' | 'remove';
|
|
4
4
|
export interface ChildBlockEvents {
|
|
5
|
-
change: (editor: OnesEditor, parentBlock: BlockElement, childBlock: BlockElement, action: ChildBlockAction) => void;
|
|
5
|
+
change: (editor: OnesEditor, target: BlockPathComponent, parentBlock: BlockElement, childBlock: BlockElement, action: ChildBlockAction) => void;
|
|
6
|
+
insert: (editor: OnesEditor, target: BlockPathComponent) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare class ChildBlockEventTracker extends TypedEmitter<ChildBlockEvents> implements OnesEditorDocCallbacks {
|
|
8
9
|
private editor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
1
|
+
import { BlockElement, BlockPathComponent, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
export * from './event-tracker';
|
|
3
|
-
export declare function trackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor,
|
|
4
|
-
export declare function untrackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor,
|
|
3
|
+
export declare function trackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor, target: BlockPathComponent, parentBlock?: BlockElement, childBlock?: BlockElement) => void): void;
|
|
4
|
+
export declare function untrackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor, target: BlockPathComponent, parentBlock?: BlockElement, childBlock?: BlockElement) => void): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BlockElement, BlockPath, DocBlock, DocBlockTextAttributes, OnesEditor, OnesEditorBlockRenderer, OnesEditorBlockRenderResult } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare class OnesEditorCommentsRender implements OnesEditorBlockRenderer {
|
|
3
3
|
renderText(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
4
|
-
renderBox(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
5
4
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
6
5
|
updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
|
|
7
6
|
}
|
|
@@ -30,6 +30,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
30
30
|
destroy(): void;
|
|
31
31
|
getInput(): HTMLInputElement;
|
|
32
32
|
focus(): void;
|
|
33
|
+
handleWindowBlur: () => void;
|
|
33
34
|
handleDocumentClick: (event: MouseEvent) => void;
|
|
34
35
|
handleDocumentSelectionChange: () => void;
|
|
35
36
|
handleEditorSelectionChanged: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement
|
|
1
|
+
import { OnesEditor, BlockElement } from '../../types';
|
|
2
2
|
import { DocBlockText, DocBlockTextActions } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions
|
|
4
|
-
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText
|
|
3
|
+
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions): DocBlockText;
|
|
4
|
+
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnesEditor } from '../../types';
|
|
2
2
|
import { DocBox } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox
|
|
3
|
+
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox): void;
|
|
@@ -440,7 +440,6 @@ export type OnesEditorCustomCreator = (editor: OnesEditor) => OnesEditorCustom;
|
|
|
440
440
|
export interface CloneBlockResultInfo {
|
|
441
441
|
containerIdMap: Map<string, string>;
|
|
442
442
|
blockIdMap: Map<string, string>;
|
|
443
|
-
boxIdMap: Map<string, string>;
|
|
444
443
|
}
|
|
445
444
|
export interface OnesEditorDomEvents extends OnesEditorCustom {
|
|
446
445
|
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
|
|
@@ -541,7 +540,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
541
540
|
deleteChildContainers: (containerIds: string[]) => void;
|
|
542
541
|
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
|
|
543
542
|
updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
|
|
544
|
-
updateBoxData: (boxData: DocBox
|
|
543
|
+
updateBoxData: (boxData: DocBox) => void;
|
|
545
544
|
updateCompositionText: (text: string, end: boolean) => void;
|
|
546
545
|
getColor: (index: number, type?: string) => string;
|
|
547
546
|
}
|
|
@@ -14,6 +14,7 @@ export default class PasteSpecialButton {
|
|
|
14
14
|
private cleaningDoc;
|
|
15
15
|
handlePasteSpecial: (bar: AbstractCommandBar, item: CommandItem) => void;
|
|
16
16
|
handleClose: () => void;
|
|
17
|
+
handleSelectionChange: () => void;
|
|
17
18
|
hide(): void;
|
|
18
19
|
clearCheckedState(): void;
|
|
19
20
|
destroy(): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../../../../@ones-editor/core';
|
|
2
|
-
export declare function handleChartDebounceUpdate(editor: OnesEditor, parentBlock
|
|
1
|
+
import { OnesEditor, BlockElement, BlockPathComponent } from '../../../../../@ones-editor/core';
|
|
2
|
+
export declare function handleChartDebounceUpdate(editor: OnesEditor, target?: BlockPathComponent, parentBlock?: BlockElement): void;
|
|
3
3
|
export declare function handleChartUpdate(editor: OnesEditor, parentBlock: BlockElement): void;
|