@hailin-zheng/editor-core 2.2.43 → 2.2.44
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/editor.css +679 -679
- package/index.d.ts +32 -32
- package/index.js +24553 -24460
- package/med_editor/doc-editor.d.ts +553 -547
- package/med_editor/doc-rule.d.ts +174 -174
- package/med_editor/editor-core.d.ts +18 -18
- package/med_editor/framework/code-interpreter/ast-parser.d.ts +4 -4
- package/med_editor/framework/code-interpreter/document-eval-func.d.ts +18 -18
- package/med_editor/framework/code-interpreter/dynamic-execute.d.ts +42 -42
- package/med_editor/framework/doc-layout/arrange-manager.d.ts +96 -0
- package/med_editor/framework/doc-layout/document-arrange.d.ts +95 -95
- package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +110 -110
- package/med_editor/framework/document-change.d.ts +346 -346
- package/med_editor/framework/document-combine.d.ts +24 -24
- package/med_editor/framework/document-comment.d.ts +38 -38
- package/med_editor/framework/document-context.d.ts +162 -162
- package/med_editor/framework/document-event.d.ts +261 -261
- package/med_editor/framework/document-input-cursor.d.ts +32 -32
- package/med_editor/framework/document-paginator.d.ts +46 -46
- package/med_editor/framework/document-svg.d.ts +36 -36
- package/med_editor/framework/document-template.d.ts +13 -13
- package/med_editor/framework/document-textline-mode.d.ts +6 -6
- package/med_editor/framework/element-define.d.ts +439 -440
- package/med_editor/framework/element-event-define.d.ts +101 -102
- package/med_editor/framework/element-props.d.ts +344 -344
- package/med_editor/framework/element-reader.d.ts +20 -20
- package/med_editor/framework/element-serialize.d.ts +39 -39
- package/med_editor/framework/element-type-handler.d.ts +8 -8
- package/med_editor/framework/history/element-trace-manage.d.ts +107 -107
- package/med_editor/framework/history/element-trace-tracking.d.ts +89 -89
- package/med_editor/framework/impl/checkbox/checkbox-impl.d.ts +19 -19
- package/med_editor/framework/impl/comments/comment-content-impl.d.ts +39 -39
- package/med_editor/framework/impl/comments/comment-element-impl.d.ts +24 -24
- package/med_editor/framework/impl/comments/comments-container-impl.d.ts +19 -19
- package/med_editor/framework/impl/comments/validate-msg-impl.d.ts +19 -19
- package/med_editor/framework/impl/data-element/data-container-impl.d.ts +25 -25
- package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +16 -16
- package/med_editor/framework/impl/data-element/data-element-barcode.d.ts +32 -32
- package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +122 -122
- package/med_editor/framework/impl/data-element/data-element-check-impl.d.ts +26 -26
- package/med_editor/framework/impl/data-element/data-element-date-impl.d.ts +23 -23
- package/med_editor/framework/impl/data-element/data-element-group-impl.d.ts +28 -28
- package/med_editor/framework/impl/data-element/data-element-image-impl.d.ts +23 -23
- package/med_editor/framework/impl/data-element/data-element-list-impl.d.ts +21 -21
- package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +22 -22
- package/med_editor/framework/impl/data-element/qrcode.d.ts +93 -93
- package/med_editor/framework/impl/decorate/fill-null-space-imple.d.ts +16 -16
- package/med_editor/framework/impl/document/doc-body-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +22 -22
- package/med_editor/framework/impl/document/doc-container-impl.d.ts +7 -7
- package/med_editor/framework/impl/document/doc-footer-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-header-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-impl.d.ts +85 -85
- package/med_editor/framework/impl/index.d.ts +41 -41
- package/med_editor/framework/impl/media-formula/menstrual-history.d.ts +31 -31
- package/med_editor/framework/impl/media-formula/permanent-teeth.d.ts +34 -34
- package/med_editor/framework/impl/paragraph/p-impl.d.ts +38 -38
- package/med_editor/framework/impl/picture/RectEle.d.ts +44 -44
- package/med_editor/framework/impl/picture/image-impl.d.ts +24 -24
- package/med_editor/framework/impl/radio/radio-impl.d.ts +17 -17
- package/med_editor/framework/impl/shape/line-impl.d.ts +31 -31
- package/med_editor/framework/impl/svg/svg-impl.d.ts +20 -20
- package/med_editor/framework/impl/symbol/br-symbol-impl.d.ts +18 -18
- package/med_editor/framework/impl/symbol/p-symbol-impl.d.ts +16 -16
- package/med_editor/framework/impl/symbol/page-br-symbol-impl.d.ts +20 -20
- package/med_editor/framework/impl/symbol/tab-symbol-impl.d.ts +15 -15
- package/med_editor/framework/impl/table/table-cell-impl.d.ts +34 -34
- package/med_editor/framework/impl/table/table-impl.d.ts +49 -49
- package/med_editor/framework/impl/table/table-row-impl.d.ts +27 -27
- package/med_editor/framework/impl/table/table-split-cell-patch.d.ts +20 -20
- package/med_editor/framework/impl/table/table-split-cell.d.ts +93 -93
- package/med_editor/framework/impl/table/table-util.d.ts +180 -180
- package/med_editor/framework/impl/text/text-impl.d.ts +34 -34
- package/med_editor/framework/impl/text/track-run-impl.d.ts +27 -27
- package/med_editor/framework/infrastructure/event-subject.d.ts +57 -57
- package/med_editor/framework/infrastructure/notify.d.ts +13 -13
- package/med_editor/framework/print/document-print-offscreen.d.ts +59 -59
- package/med_editor/framework/print/document-print.d.ts +19 -19
- package/med_editor/framework/render-context.d.ts +111 -111
- package/med_editor/framework/render-define.d.ts +169 -169
- package/med_editor/framework/search/search-panel.d.ts +31 -31
- package/med_editor/framework/selection/document-selection.d.ts +92 -92
- package/med_editor/framework/selection/range-util.d.ts +36 -36
- package/med_editor/framework/selection/selection-overlays.d.ts +36 -36
- package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -29
- package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
- package/med_editor/framework/util/common-util.d.ts +78 -78
- package/med_editor/framework/util/document-segmenter.d.ts +2 -2
- package/med_editor/framework/util/element-util.d.ts +419 -417
- package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +44 -44
- package/med_editor/framework/vnode/editor-list-vnode.d.ts +18 -18
- package/package.json +18 -18
- package/index-cjs.d.ts +0 -32
- package/index-cjs.js +0 -29731
- package/index-cjs.js.map +0 -1
- package/index.js.map +0 -1
@@ -1,36 +1,36 @@
|
|
1
|
-
import { SelectionState } from "./document-selection";
|
2
|
-
import { Element, SelectionContentRange } from "../element-define";
|
3
|
-
import { SelectionEffectObject } from "../element-props";
|
4
|
-
/**
|
5
|
-
* 用于处理选区拖蓝
|
6
|
-
*/
|
7
|
-
export declare class SelectionOverlays implements SelectionEffectObject {
|
8
|
-
private selectionState;
|
9
|
-
private selectionRange;
|
10
|
-
selectionEleSets: Map<Element, SelectionContentRange>;
|
11
|
-
commRangeSets: Map<Element, SelectionContentRange>;
|
12
|
-
otherRangeSets: Map<Element, SelectionContentRange[]>;
|
13
|
-
constructor(selectionState: SelectionState);
|
14
|
-
getSelectionTreeData(): void;
|
15
|
-
private convertSelectRangeToSet;
|
16
|
-
static addToSets(range: SelectionContentRange, set: Map<Element, SelectionContentRange>): void;
|
17
|
-
addToOtherRangeSets(range: SelectionContentRange): void;
|
18
|
-
clearOtherRangeSets(): void;
|
19
|
-
/**
|
20
|
-
* 添加到批注集合
|
21
|
-
* @param range
|
22
|
-
* @param set
|
23
|
-
* @param rangeColor 用以显示批注区间的颜色
|
24
|
-
*/
|
25
|
-
static addToCommentSets(range: SelectionContentRange, set: Map<Element, SelectionContentRange>, rangeColor: string): void;
|
26
|
-
/**
|
27
|
-
* 修正开始选区内容
|
28
|
-
* 1.如果当前选区开始于表格内容,结束选区位于表格外,则需要开始选区内容重定位到单元格第一个元素
|
29
|
-
*/
|
30
|
-
private fixStartSelectionElement;
|
31
|
-
/**
|
32
|
-
* 修正开始选区内容
|
33
|
-
* 1.如果当前选区开始于表格内容,结束选区位于表格外,则需要开始选区内容重定位到单元格第一个元素
|
34
|
-
*/
|
35
|
-
private fixEndSelectionElement;
|
36
|
-
}
|
1
|
+
import { SelectionState } from "./document-selection";
|
2
|
+
import { Element, SelectionContentRange } from "../element-define";
|
3
|
+
import { SelectionEffectObject } from "../element-props";
|
4
|
+
/**
|
5
|
+
* 用于处理选区拖蓝
|
6
|
+
*/
|
7
|
+
export declare class SelectionOverlays implements SelectionEffectObject {
|
8
|
+
private selectionState;
|
9
|
+
private selectionRange;
|
10
|
+
selectionEleSets: Map<Element, SelectionContentRange>;
|
11
|
+
commRangeSets: Map<Element, SelectionContentRange>;
|
12
|
+
otherRangeSets: Map<Element, SelectionContentRange[]>;
|
13
|
+
constructor(selectionState: SelectionState);
|
14
|
+
getSelectionTreeData(): void;
|
15
|
+
private convertSelectRangeToSet;
|
16
|
+
static addToSets(range: SelectionContentRange, set: Map<Element, SelectionContentRange>): void;
|
17
|
+
addToOtherRangeSets(range: SelectionContentRange): void;
|
18
|
+
clearOtherRangeSets(): void;
|
19
|
+
/**
|
20
|
+
* 添加到批注集合
|
21
|
+
* @param range
|
22
|
+
* @param set
|
23
|
+
* @param rangeColor 用以显示批注区间的颜色
|
24
|
+
*/
|
25
|
+
static addToCommentSets(range: SelectionContentRange, set: Map<Element, SelectionContentRange>, rangeColor: string): void;
|
26
|
+
/**
|
27
|
+
* 修正开始选区内容
|
28
|
+
* 1.如果当前选区开始于表格内容,结束选区位于表格外,则需要开始选区内容重定位到单元格第一个元素
|
29
|
+
*/
|
30
|
+
private fixStartSelectionElement;
|
31
|
+
/**
|
32
|
+
* 修正开始选区内容
|
33
|
+
* 1.如果当前选区开始于表格内容,结束选区位于表格外,则需要开始选区内容重定位到单元格第一个元素
|
34
|
+
*/
|
35
|
+
private fixEndSelectionElement;
|
36
|
+
}
|
@@ -1,29 +1,29 @@
|
|
1
|
-
import { TextGroupElement } from "../impl";
|
2
|
-
/**
|
3
|
-
* 处理文档输入联想
|
4
|
-
*/
|
5
|
-
export declare class DocInputSuggestions {
|
6
|
-
currentInputTextGroup: TextGroupElement | undefined;
|
7
|
-
currentMatchedText: string;
|
8
|
-
currentInputOffset: number;
|
9
|
-
suggestionsList: Array<ISuggestionData>;
|
10
|
-
prepareSuggestions: Array<ISuggestionData>;
|
11
|
-
selectedIndex: number;
|
12
|
-
clear(): void;
|
13
|
-
destroy(): void;
|
14
|
-
}
|
15
|
-
/**
|
16
|
-
* 联想词数据
|
17
|
-
*/
|
18
|
-
export interface ISuggestionData {
|
19
|
-
label: string;
|
20
|
-
value?: string;
|
21
|
-
desc?: string;
|
22
|
-
action?: (data: ISuggestionData) => void;
|
23
|
-
}
|
24
|
-
export interface ISuggestionProvider {
|
25
|
-
filterSuggestions: Array<ISuggestionData>;
|
26
|
-
inputTextGroup: TextGroupElement;
|
27
|
-
inputOffset: number;
|
28
|
-
findText: string;
|
29
|
-
}
|
1
|
+
import { TextGroupElement } from "../impl";
|
2
|
+
/**
|
3
|
+
* 处理文档输入联想
|
4
|
+
*/
|
5
|
+
export declare class DocInputSuggestions {
|
6
|
+
currentInputTextGroup: TextGroupElement | undefined;
|
7
|
+
currentMatchedText: string;
|
8
|
+
currentInputOffset: number;
|
9
|
+
suggestionsList: Array<ISuggestionData>;
|
10
|
+
prepareSuggestions: Array<ISuggestionData>;
|
11
|
+
selectedIndex: number;
|
12
|
+
clear(): void;
|
13
|
+
destroy(): void;
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* 联想词数据
|
17
|
+
*/
|
18
|
+
export interface ISuggestionData {
|
19
|
+
label: string;
|
20
|
+
value?: string;
|
21
|
+
desc?: string;
|
22
|
+
action?: (data: ISuggestionData) => void;
|
23
|
+
}
|
24
|
+
export interface ISuggestionProvider {
|
25
|
+
filterSuggestions: Array<ISuggestionData>;
|
26
|
+
inputTextGroup: TextGroupElement;
|
27
|
+
inputOffset: number;
|
28
|
+
findText: string;
|
29
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
interface Viewport {
|
2
|
-
x: number;
|
3
|
-
y: number;
|
4
|
-
width: number;
|
5
|
-
height: number;
|
6
|
-
scale: number;
|
7
|
-
}
|
8
|
-
/**
|
9
|
-
* 调整页面提示框位置,使其在视窗内的位置合理
|
10
|
-
*/
|
11
|
-
export declare function adjustViewportElements(tipContainer: any, viewPort: Viewport): void;
|
12
|
-
export {};
|
1
|
+
interface Viewport {
|
2
|
+
x: number;
|
3
|
+
y: number;
|
4
|
+
width: number;
|
5
|
+
height: number;
|
6
|
+
scale: number;
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* 调整页面提示框位置,使其在视窗内的位置合理
|
10
|
+
*/
|
11
|
+
export declare function adjustViewportElements(tipContainer: any, viewPort: Viewport): void;
|
12
|
+
export {};
|
@@ -1,78 +1,78 @@
|
|
1
|
-
import { Rect } from "../element-define";
|
2
|
-
import { BorderType } from "../render-define";
|
3
|
-
interface Position {
|
4
|
-
x: number;
|
5
|
-
y: number;
|
6
|
-
}
|
7
|
-
export declare class CommonUtil {
|
8
|
-
/**
|
9
|
-
* 判断坐标是否在矩形框内
|
10
|
-
* @param rect
|
11
|
-
* @param position
|
12
|
-
* @returns
|
13
|
-
*/
|
14
|
-
static isInsideRectByPosition(rect: Omit<Rect, 'maxWidth' | 'maxHeight'>, position: Position): boolean;
|
15
|
-
static isInsideRectByRect(rect: Rect, position: Rect): boolean;
|
16
|
-
/**
|
17
|
-
* 判断坐标是否在矩形的边框上
|
18
|
-
* @param rect
|
19
|
-
* @param borderWidth
|
20
|
-
* @param position
|
21
|
-
*/
|
22
|
-
static isInRectBorder(rect: Rect, borderWidth: number, position: Position): {
|
23
|
-
borderType: BorderType;
|
24
|
-
};
|
25
|
-
/**
|
26
|
-
* 判断坐标是否在图片的缩放操作点上
|
27
|
-
*/
|
28
|
-
static isInPictureResizePoint(rect: Rect, pos: Position, r: number): {
|
29
|
-
borderType: BorderType;
|
30
|
-
} | null;
|
31
|
-
/**
|
32
|
-
* 整形符合连线要求
|
33
|
-
* @param points
|
34
|
-
* @param width
|
35
|
-
* @param strokeColor
|
36
|
-
*/
|
37
|
-
static resharpPoints(points: Array<Position>): Array<Position>;
|
38
|
-
static getOffsetX(node: HTMLElement): number;
|
39
|
-
static randomColor(): string;
|
40
|
-
static randomRgbColor(opacity?: number): string;
|
41
|
-
/**
|
42
|
-
* 判断一个数值是否在另一个数值的增益区间中
|
43
|
-
* @param val
|
44
|
-
* @param offset
|
45
|
-
* @param compareValue
|
46
|
-
* @returns
|
47
|
-
*/
|
48
|
-
static ApproxmateValueInRange(val: number, offset: number, compareValue: number): boolean;
|
49
|
-
static getEmptyValue<T>(val: T, emptyVal: T): T;
|
50
|
-
/**
|
51
|
-
* 移除并集
|
52
|
-
* @param array
|
53
|
-
* @param deleteItems
|
54
|
-
* @returns
|
55
|
-
*/
|
56
|
-
static removeUnionSet<T>(array: Array<T>, deleteItems: Array<T>): Array<T>;
|
57
|
-
static nullToString(val: any): string;
|
58
|
-
static formatDate(date: Date, format: string): string;
|
59
|
-
static formatNow(format: string): string;
|
60
|
-
static parseText(text: string, data: object): string;
|
61
|
-
static getNowDiffSeconds(date: Date | string): number;
|
62
|
-
static isDate(str: string): boolean;
|
63
|
-
static cloneValue(val: any): any;
|
64
|
-
static cloneDeep<T extends object>(source: T, visited?: WeakMap<object, any>): T;
|
65
|
-
static isConstructor(f: any): boolean;
|
66
|
-
static toArray<T>(item: Array<T> | T): Array<T>;
|
67
|
-
static removeChild(ele: HTMLElement): void;
|
68
|
-
static findParent(curr: HTMLElement | null, predicate: (parent: HTMLElement) => boolean): HTMLElement | null;
|
69
|
-
static isIntersect(rect1: Rect, rect2: Rect): boolean;
|
70
|
-
static debounce<F extends AnyFunction>(fn: F, wait: number): (...args: Parameters<F>) => void;
|
71
|
-
static btoa(str: string): string;
|
72
|
-
static isEqual(a: any, b: any): boolean;
|
73
|
-
static getValue(val: any, defaultValue: any): any;
|
74
|
-
static getKeyCombination(event: KeyboardEvent): string;
|
75
|
-
static resizePosition(elm: HTMLElement, position: Rect, scale: number): void;
|
76
|
-
}
|
77
|
-
declare type AnyFunction = (...args: any[]) => any;
|
78
|
-
export {};
|
1
|
+
import { Rect } from "../element-define";
|
2
|
+
import { BorderType } from "../render-define";
|
3
|
+
interface Position {
|
4
|
+
x: number;
|
5
|
+
y: number;
|
6
|
+
}
|
7
|
+
export declare class CommonUtil {
|
8
|
+
/**
|
9
|
+
* 判断坐标是否在矩形框内
|
10
|
+
* @param rect
|
11
|
+
* @param position
|
12
|
+
* @returns
|
13
|
+
*/
|
14
|
+
static isInsideRectByPosition(rect: Omit<Rect, 'maxWidth' | 'maxHeight'>, position: Position): boolean;
|
15
|
+
static isInsideRectByRect(rect: Rect, position: Rect): boolean;
|
16
|
+
/**
|
17
|
+
* 判断坐标是否在矩形的边框上
|
18
|
+
* @param rect
|
19
|
+
* @param borderWidth
|
20
|
+
* @param position
|
21
|
+
*/
|
22
|
+
static isInRectBorder(rect: Rect, borderWidth: number, position: Position): {
|
23
|
+
borderType: BorderType;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* 判断坐标是否在图片的缩放操作点上
|
27
|
+
*/
|
28
|
+
static isInPictureResizePoint(rect: Rect, pos: Position, r: number): {
|
29
|
+
borderType: BorderType;
|
30
|
+
} | null;
|
31
|
+
/**
|
32
|
+
* 整形符合连线要求
|
33
|
+
* @param points
|
34
|
+
* @param width
|
35
|
+
* @param strokeColor
|
36
|
+
*/
|
37
|
+
static resharpPoints(points: Array<Position>): Array<Position>;
|
38
|
+
static getOffsetX(node: HTMLElement): number;
|
39
|
+
static randomColor(): string;
|
40
|
+
static randomRgbColor(opacity?: number): string;
|
41
|
+
/**
|
42
|
+
* 判断一个数值是否在另一个数值的增益区间中
|
43
|
+
* @param val
|
44
|
+
* @param offset
|
45
|
+
* @param compareValue
|
46
|
+
* @returns
|
47
|
+
*/
|
48
|
+
static ApproxmateValueInRange(val: number, offset: number, compareValue: number): boolean;
|
49
|
+
static getEmptyValue<T>(val: T, emptyVal: T): T;
|
50
|
+
/**
|
51
|
+
* 移除并集
|
52
|
+
* @param array
|
53
|
+
* @param deleteItems
|
54
|
+
* @returns
|
55
|
+
*/
|
56
|
+
static removeUnionSet<T>(array: Array<T>, deleteItems: Array<T>): Array<T>;
|
57
|
+
static nullToString(val: any): string;
|
58
|
+
static formatDate(date: Date, format: string): string;
|
59
|
+
static formatNow(format: string): string;
|
60
|
+
static parseText(text: string, data: object): string;
|
61
|
+
static getNowDiffSeconds(date: Date | string): number;
|
62
|
+
static isDate(str: string): boolean;
|
63
|
+
static cloneValue(val: any): any;
|
64
|
+
static cloneDeep<T extends object>(source: T, visited?: WeakMap<object, any>): T;
|
65
|
+
static isConstructor(f: any): boolean;
|
66
|
+
static toArray<T>(item: Array<T> | T): Array<T>;
|
67
|
+
static removeChild(ele: HTMLElement): void;
|
68
|
+
static findParent(curr: HTMLElement | null, predicate: (parent: HTMLElement) => boolean): HTMLElement | null;
|
69
|
+
static isIntersect(rect1: Rect, rect2: Rect): boolean;
|
70
|
+
static debounce<F extends AnyFunction>(fn: F, wait: number): (...args: Parameters<F>) => void;
|
71
|
+
static btoa(str: string): string;
|
72
|
+
static isEqual(a: any, b: any): boolean;
|
73
|
+
static getValue(val: any, defaultValue: any): any;
|
74
|
+
static getKeyCombination(event: KeyboardEvent): string;
|
75
|
+
static resizePosition(elm: HTMLElement, position: Rect, scale: number): void;
|
76
|
+
}
|
77
|
+
declare type AnyFunction = (...args: any[]) => any;
|
78
|
+
export {};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { SelectionState } from "../selection/document-selection";
|
2
|
-
export declare function getFocusTextSegment(selection: SelectionState): boolean;
|
1
|
+
import { SelectionState } from "../selection/document-selection";
|
2
|
+
export declare function getFocusTextSegment(selection: SelectionState): boolean;
|