@hailin-zheng/editor-core 2.2.28 → 2.2.29

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.
Files changed (94) hide show
  1. package/editor.css +638 -638
  2. package/index-cjs.d.ts +32 -32
  3. package/index-cjs.js +23949 -23923
  4. package/index-cjs.js.map +1 -1
  5. package/index.d.ts +32 -32
  6. package/index.js +23949 -23923
  7. package/index.js.map +1 -1
  8. package/med_editor/doc-editor.d.ts +541 -543
  9. package/med_editor/doc-rule.d.ts +174 -174
  10. package/med_editor/editor-core.d.ts +18 -18
  11. package/med_editor/framework/code-interpreter/ast-parser.d.ts +4 -4
  12. package/med_editor/framework/code-interpreter/document-eval-func.d.ts +18 -18
  13. package/med_editor/framework/code-interpreter/dynamic-execute.d.ts +26 -26
  14. package/med_editor/framework/doc-layout/document-arrange.d.ts +95 -88
  15. package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +110 -110
  16. package/med_editor/framework/document-change.d.ts +341 -341
  17. package/med_editor/framework/document-combine.d.ts +24 -24
  18. package/med_editor/framework/document-comment.d.ts +38 -38
  19. package/med_editor/framework/document-context.d.ts +154 -154
  20. package/med_editor/framework/document-event.d.ts +256 -256
  21. package/med_editor/framework/document-input-cursor.d.ts +32 -32
  22. package/med_editor/framework/document-paginator.d.ts +46 -46
  23. package/med_editor/framework/document-svg.d.ts +36 -36
  24. package/med_editor/framework/document-template.d.ts +13 -13
  25. package/med_editor/framework/document-textline-mode.d.ts +6 -6
  26. package/med_editor/framework/element-define.d.ts +438 -438
  27. package/med_editor/framework/element-event-define.d.ts +102 -102
  28. package/med_editor/framework/element-props.d.ts +344 -344
  29. package/med_editor/framework/element-reader.d.ts +20 -20
  30. package/med_editor/framework/element-serialize.d.ts +36 -36
  31. package/med_editor/framework/element-type-handler.d.ts +8 -8
  32. package/med_editor/framework/history/element-trace-manage.d.ts +107 -107
  33. package/med_editor/framework/history/element-trace-tracking.d.ts +89 -89
  34. package/med_editor/framework/impl/checkbox/checkbox-impl.d.ts +19 -19
  35. package/med_editor/framework/impl/comments/comment-content-impl.d.ts +39 -39
  36. package/med_editor/framework/impl/comments/comment-element-impl.d.ts +24 -24
  37. package/med_editor/framework/impl/comments/comments-container-impl.d.ts +19 -19
  38. package/med_editor/framework/impl/comments/validate-msg-impl.d.ts +19 -19
  39. package/med_editor/framework/impl/data-element/data-container-impl.d.ts +25 -25
  40. package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +16 -16
  41. package/med_editor/framework/impl/data-element/data-element-barcode.d.ts +32 -32
  42. package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +120 -120
  43. package/med_editor/framework/impl/data-element/data-element-check-impl.d.ts +26 -26
  44. package/med_editor/framework/impl/data-element/data-element-date-impl.d.ts +23 -23
  45. package/med_editor/framework/impl/data-element/data-element-group-impl.d.ts +28 -28
  46. package/med_editor/framework/impl/data-element/data-element-image-impl.d.ts +23 -23
  47. package/med_editor/framework/impl/data-element/data-element-list-impl.d.ts +21 -21
  48. package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +22 -22
  49. package/med_editor/framework/impl/data-element/qrcode.d.ts +93 -93
  50. package/med_editor/framework/impl/decorate/fill-null-space-imple.d.ts +16 -16
  51. package/med_editor/framework/impl/document/doc-body-impl.d.ts +19 -19
  52. package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +22 -22
  53. package/med_editor/framework/impl/document/doc-container-impl.d.ts +7 -7
  54. package/med_editor/framework/impl/document/doc-footer-impl.d.ts +19 -19
  55. package/med_editor/framework/impl/document/doc-header-impl.d.ts +19 -19
  56. package/med_editor/framework/impl/document/doc-impl.d.ts +84 -81
  57. package/med_editor/framework/impl/index.d.ts +40 -40
  58. package/med_editor/framework/impl/media-formula/menstrual-history.d.ts +31 -31
  59. package/med_editor/framework/impl/media-formula/permanent-teeth.d.ts +34 -34
  60. package/med_editor/framework/impl/paragraph/p-impl.d.ts +38 -38
  61. package/med_editor/framework/impl/picture/RectEle.d.ts +44 -44
  62. package/med_editor/framework/impl/picture/image-impl.d.ts +24 -24
  63. package/med_editor/framework/impl/radio/radio-impl.d.ts +17 -17
  64. package/med_editor/framework/impl/shape/line-impl.d.ts +31 -0
  65. package/med_editor/framework/impl/svg/svg-impl.d.ts +20 -20
  66. package/med_editor/framework/impl/symbol/br-symbol-impl.d.ts +18 -18
  67. package/med_editor/framework/impl/symbol/p-symbol-impl.d.ts +16 -16
  68. package/med_editor/framework/impl/symbol/page-br-symbol-impl.d.ts +20 -20
  69. package/med_editor/framework/impl/symbol/tab-symbol-impl.d.ts +15 -15
  70. package/med_editor/framework/impl/table/table-cell-impl.d.ts +34 -34
  71. package/med_editor/framework/impl/table/table-impl.d.ts +49 -49
  72. package/med_editor/framework/impl/table/table-row-impl.d.ts +27 -27
  73. package/med_editor/framework/impl/table/table-split-cell-patch.d.ts +20 -20
  74. package/med_editor/framework/impl/table/table-split-cell.d.ts +93 -93
  75. package/med_editor/framework/impl/table/table-util.d.ts +180 -180
  76. package/med_editor/framework/impl/text/text-impl.d.ts +34 -34
  77. package/med_editor/framework/impl/text/track-run-impl.d.ts +27 -27
  78. package/med_editor/framework/infrastructure/event-subject.d.ts +57 -57
  79. package/med_editor/framework/infrastructure/notify.d.ts +13 -13
  80. package/med_editor/framework/print/document-print-offscreen.d.ts +58 -58
  81. package/med_editor/framework/print/document-print.d.ts +18 -18
  82. package/med_editor/framework/render-context.d.ts +111 -111
  83. package/med_editor/framework/render-define.d.ts +140 -140
  84. package/med_editor/framework/search/search-panel.d.ts +31 -31
  85. package/med_editor/framework/selection/document-selection.d.ts +92 -92
  86. package/med_editor/framework/selection/range-util.d.ts +36 -36
  87. package/med_editor/framework/selection/selection-overlays.d.ts +36 -36
  88. package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -29
  89. package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
  90. package/med_editor/framework/util/common-util.d.ts +77 -77
  91. package/med_editor/framework/util/document-segmenter.d.ts +2 -2
  92. package/med_editor/framework/util/element-util.d.ts +417 -417
  93. package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +43 -43
  94. package/package.json +18 -18
@@ -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,77 +1,77 @@
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
- }
76
- declare type AnyFunction = (...args: any[]) => any;
77
- 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
+ }
76
+ declare type AnyFunction = (...args: any[]) => any;
77
+ 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;