@ones-editor/editor 1.1.0-beta.1 → 1.1.0-beta.3
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 +2 -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 +2 -3
- package/@ones-editor/status/src/locale/zh-cn.d.ts +2 -3
- package/@ones-editor/status/src/status-box-editor.d.ts +2 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +87 -87
- 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;
|
|
@@ -438,6 +438,7 @@ export type OnesEditorCustomCreator = (editor: OnesEditor) => OnesEditorCustom;
|
|
|
438
438
|
export interface CloneBlockResultInfo {
|
|
439
439
|
containerIdMap: Map<string, string>;
|
|
440
440
|
blockIdMap: Map<string, string>;
|
|
441
|
+
boxIdMap: Map<string, string>;
|
|
441
442
|
}
|
|
442
443
|
export interface OnesEditorDomEvents extends OnesEditorCustom {
|
|
443
444
|
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
|
|
@@ -537,7 +538,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
537
538
|
deleteChildContainers: (containerIds: string[]) => void;
|
|
538
539
|
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
|
|
539
540
|
updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
|
|
540
|
-
updateBoxData: (boxData: DocBox) => void;
|
|
541
|
+
updateBoxData: (boxData: DocBox, options?: InsertTextOptions) => void;
|
|
541
542
|
updateCompositionText: (text: string, end: boolean) => void;
|
|
542
543
|
getColor: (index: number, type?: string) => string;
|
|
543
544
|
}
|
|
@@ -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
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
status: {
|
|
3
|
-
defaultTitle: string;
|
|
4
3
|
empty: string;
|
|
5
4
|
command: {
|
|
6
5
|
name: string;
|
|
@@ -11,7 +10,7 @@ declare const _default: {
|
|
|
11
10
|
green: string;
|
|
12
11
|
blue: string;
|
|
13
12
|
purple: string;
|
|
14
|
-
|
|
13
|
+
grey: string;
|
|
15
14
|
};
|
|
16
15
|
colorDefaultTitle: {
|
|
17
16
|
red: string;
|
|
@@ -19,7 +18,7 @@ declare const _default: {
|
|
|
19
18
|
green: string;
|
|
20
19
|
blue: string;
|
|
21
20
|
purple: string;
|
|
22
|
-
|
|
21
|
+
grey: string;
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
status: {
|
|
3
|
-
defaultTitle: string;
|
|
4
3
|
empty: string;
|
|
5
4
|
command: {
|
|
6
5
|
name: string;
|
|
@@ -11,7 +10,7 @@ declare const _default: {
|
|
|
11
10
|
green: string;
|
|
12
11
|
blue: string;
|
|
13
12
|
purple: string;
|
|
14
|
-
|
|
13
|
+
grey: string;
|
|
15
14
|
};
|
|
16
15
|
colorDefaultTitle: {
|
|
17
16
|
red: string;
|
|
@@ -19,7 +18,7 @@ declare const _default: {
|
|
|
19
18
|
green: string;
|
|
20
19
|
blue: string;
|
|
21
20
|
purple: string;
|
|
22
|
-
|
|
21
|
+
grey: string;
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
};
|
|
@@ -7,6 +7,7 @@ export declare class StatusBoxEditor {
|
|
|
7
7
|
linkPopup: Popup | null;
|
|
8
8
|
boxElement?: BoxElement;
|
|
9
9
|
statusPalette: StatusPalette;
|
|
10
|
+
isEditing: boolean;
|
|
10
11
|
constructor(editor: OnesEditor);
|
|
11
12
|
editorStatus: (boxElement: BoxElement) => void;
|
|
12
13
|
focus(): void;
|
|
@@ -14,7 +15,7 @@ export declare class StatusBoxEditor {
|
|
|
14
15
|
handClose: () => void;
|
|
15
16
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
16
17
|
createPopupContent(title: string, color: StatusColor, subtle: boolean): HTMLDivElement;
|
|
17
|
-
|
|
18
|
+
onColorChange: (e: Event) => void;
|
|
18
19
|
changeTitle: (e: Event) => void;
|
|
19
20
|
destroy(): void;
|
|
20
21
|
}
|