ht-emr 0.7.60 → 0.7.62

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.
@@ -76,6 +76,17 @@ export declare class Draw {
76
76
  private pendingRenderFrameId;
77
77
  /** 合并渲染帧使用的最新参数 */
78
78
  private pendingRenderOption;
79
+ /** 连续录入停止后再生成的历史快照 */
80
+ private pendingHistoryTimerId;
81
+ private pendingHistoryCurIndex;
82
+ /** 连续录入期间合并的内容变更通知 */
83
+ private pendingContentChangeTimerId;
84
+ /** 排版测量复用的 Canvas 上下文 */
85
+ private layoutContext;
86
+ /** 文档特性缓存,用于决定可否走增量布局 */
87
+ private hasSubTemplateElement;
88
+ private hasAreaElement;
89
+ private hasComplexIncrementalLayout;
79
90
  /** 页面像素比(用于高清屏适配) */
80
91
  private pagePixelRatio;
81
92
  /** 编辑器模式 */
@@ -581,6 +592,12 @@ export declare class Draw {
581
592
  flushPendingRender(): void;
582
593
  private _takePendingRenderOption;
583
594
  private _cancelPendingRender;
595
+ private _scheduleHistory;
596
+ flushPendingHistory(): void;
597
+ cancelPendingHistory(): void;
598
+ hasPendingHistory(): boolean;
599
+ private _emitContentChange;
600
+ private _scheduleContentChange;
584
601
  /**
585
602
  * 获取Canvas页面元素
586
603
  * @param pageNo - 页码,-1表示当前页
@@ -830,6 +847,8 @@ export declare class Draw {
830
847
  getValue(options?: IGetValueOption): IEditorResult;
831
848
  setValue(payload: Partial<IEditorData>, options?: ISetValueOption): void;
832
849
  setEditorData(payload: Partial<Omit<IEditorData, 'graffiti'>>): void;
850
+ private _refreshDocumentFeatureFlags;
851
+ private _markDocumentFeatureFlags;
833
852
  private _wrapContainer;
834
853
  private _formatContainer;
835
854
  private _createPageContainer;
@@ -855,6 +874,7 @@ export declare class Draw {
855
874
  private _disconnectLazyRender;
856
875
  private _lazyRender;
857
876
  private _immediateRender;
877
+ private _computeIncrementalMainRowList;
858
878
  /**
859
879
  * 渲染编辑器
860
880
  *
@@ -877,7 +897,7 @@ export declare class Draw {
877
897
  private getInlineBackgroundControlType;
878
898
  private getIsHideInlineBackgroundControlCursor;
879
899
  setCursor(curIndex: number | undefined): number | undefined;
880
- submitHistory(curIndex: number | undefined): void;
900
+ submitHistory(curIndex: number | undefined, isLightweight?: boolean): void;
881
901
  destroy(): void;
882
902
  clearSideEffect(): void;
883
903
  updateTableTool(): void;
@@ -9,6 +9,7 @@ export declare class MacroParticle {
9
9
  private options;
10
10
  private draw;
11
11
  private activeInlineEditor;
12
+ private pendingInlineCursorFrameId;
12
13
  constructor(draw: Draw);
13
14
  /**
14
15
  * 渲染宏元素
@@ -59,6 +60,7 @@ export declare class MacroParticle {
59
60
  private _getCursorOffset;
60
61
  private _focusInputAgent;
61
62
  private _renderActiveEditor;
63
+ private _cancelPendingInlineCursorSync;
62
64
  private _syncInlineCursor;
63
65
  private _renderTextSelection;
64
66
  private _getMacroLineHeight;
@@ -148,6 +148,7 @@ export declare class CanvasEvent {
148
148
  * @param evt - 键盘事件对象
149
149
  */
150
150
  keydown(evt: KeyboardEvent): void;
151
+ private _canDeferKeydownLayout;
151
152
  /**
152
153
  * 处理双击事件
153
154
  * @param evt - 鼠标事件对象
@@ -1,5 +1,6 @@
1
1
  import { Draw } from '../draw/Draw';
2
2
  export declare class HistoryManager {
3
+ private draw;
3
4
  private undoStack;
4
5
  private redoStack;
5
6
  private maxRecordCount;
@@ -94,7 +94,7 @@ export declare class Position {
94
94
  *
95
95
  * 清空原有位置信息,遍历每页行计算所有元素的位置坐标
96
96
  */
97
- computePositionList(): void;
97
+ computePositionList(startPageNo?: number): void;
98
98
  /**
99
99
  * 计算单行位置
100
100
  * @param payload - 计算参数,包含行信息和内部宽度
@@ -5,6 +5,9 @@ import { IRow } from './Row';
5
5
  import { ITd } from './table/Td';
6
6
  export interface IDrawOption {
7
7
  curIndex?: number;
8
+ layoutStartIndex?: number;
9
+ isInputHistory?: boolean;
10
+ isDeferredRender?: boolean;
8
11
  isSetCursor?: boolean;
9
12
  isSubmitHistory?: boolean;
10
13
  isCompute?: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ht-emr",
3
3
  "author": "swj",
4
4
  "license": "MIT",
5
- "version": "0.7.60",
5
+ "version": "0.7.62",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",