@ones-editor/editor 1.1.0-beta.1 → 1.1.0-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/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 -1
- package/@ones-editor/status/src/dom/create-status-tag.d.ts +7 -0
- package/@ones-editor/status/src/dom/overflow-tooltip-tag.d.ts +17 -0
- package/@ones-editor/status/src/locale/en-us.d.ts +0 -1
- package/@ones-editor/status/src/locale/ja-jp.d.ts +0 -1
- package/@ones-editor/status/src/locale/zh-cn.d.ts +0 -1
- package/@ones-editor/status/src/status-box-editor.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +82 -82
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../types';
|
|
1
|
+
import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
|
|
2
2
|
import { DocBlockText, DocBlockTextActions } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions): DocBlockText;
|
|
4
|
-
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText): void;
|
|
3
|
+
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions, options?: InsertTextOptions): DocBlockText;
|
|
4
|
+
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText, options?: InsertTextOptions): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { OnesEditor } from '../../types';
|
|
1
|
+
import { InsertTextOptions, OnesEditor } from '../../types';
|
|
2
2
|
import { DocBox } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox): void;
|
|
3
|
+
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox, options?: InsertTextOptions): void;
|
|
@@ -537,7 +537,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
537
537
|
deleteChildContainers: (containerIds: string[]) => void;
|
|
538
538
|
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
|
|
539
539
|
updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
|
|
540
|
-
updateBoxData: (boxData: DocBox) => void;
|
|
540
|
+
updateBoxData: (boxData: DocBox, options?: InsertTextOptions) => void;
|
|
541
541
|
updateCompositionText: (text: string, end: boolean) => void;
|
|
542
542
|
getColor: (index: number, type?: string) => string;
|
|
543
543
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxContentElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { OverflowTooltipTag } from './overflow-tooltip-tag';
|
|
3
|
+
import { StatusBoxData } from '../types';
|
|
4
|
+
export declare class CreateStatusTag {
|
|
5
|
+
static tagRef: Map<string, OverflowTooltipTag>;
|
|
6
|
+
static create(editor: OnesEditor, classes: string[], data: StatusBoxData, boxContent: BoxContentElement): OverflowTooltipTag | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class OverflowTooltipTag {
|
|
3
|
+
private editor;
|
|
4
|
+
root: HTMLElement;
|
|
5
|
+
private ro?;
|
|
6
|
+
private mo?;
|
|
7
|
+
constructor(editor: OnesEditor, title: string, classes: string[], parent: HTMLElement);
|
|
8
|
+
private replaceTitleSpace;
|
|
9
|
+
private check;
|
|
10
|
+
private observeResize;
|
|
11
|
+
private handleContentChange;
|
|
12
|
+
private observeRemoval;
|
|
13
|
+
private unbindResizeObserver;
|
|
14
|
+
private unbindMutationObserver;
|
|
15
|
+
rebind(root: HTMLElement): void;
|
|
16
|
+
changeTag(title: string, classes: string[]): void;
|
|
17
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare class StatusBoxEditor {
|
|
|
14
14
|
handClose: () => void;
|
|
15
15
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
16
16
|
createPopupContent(title: string, color: StatusColor, subtle: boolean): HTMLDivElement;
|
|
17
|
-
|
|
17
|
+
onColorChange: (e: Event) => void;
|
|
18
18
|
changeTitle: (e: Event) => void;
|
|
19
19
|
destroy(): void;
|
|
20
20
|
}
|