@windoc/core 0.3.22 → 0.3.24

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/dist/index.d.mts CHANGED
@@ -728,6 +728,7 @@ interface IDrawOption {
728
728
  isInit?: boolean;
729
729
  isSourceHistory?: boolean;
730
730
  isFirstRender?: boolean;
731
+ dirtyStartIndex?: number;
731
732
  }
732
733
  interface IForceUpdateOption {
733
734
  isSubmitHistory?: boolean;
@@ -785,6 +786,11 @@ interface IComputeRowListPayload {
785
786
  mainOuterHeight?: number;
786
787
  surroundElementList?: IElement[];
787
788
  initialListState?: IListStateSeed;
789
+ hasListElement?: boolean;
790
+ fromIndex?: number;
791
+ initialY?: number;
792
+ initialPageNo?: number;
793
+ initialRowIndex?: number;
788
794
  }
789
795
 
790
796
  interface ICurrentPosition {
@@ -1287,6 +1293,7 @@ interface IEditorOption {
1287
1293
  historyMaxRecordCount?: number;
1288
1294
  printPixelRatio?: number;
1289
1295
  maskMargin?: IMargin;
1296
+ scrollPaddingLines?: number;
1290
1297
  letterClass?: string[];
1291
1298
  contextMenuDisableKeys?: string[];
1292
1299
  shortcutDisableKeys?: string[];
@@ -1469,7 +1476,6 @@ type IDrawCursorOption = ICursorOption & {
1469
1476
  hitLineStartIndex?: number;
1470
1477
  };
1471
1478
  interface IMoveCursorToVisibleOption {
1472
- direction: MoveDirection;
1473
1479
  cursorPosition: IElementPosition;
1474
1480
  }
1475
1481
  declare class Cursor {
@@ -1524,6 +1530,9 @@ declare class GlobalEvent {
1524
1530
  private _handleDprChange;
1525
1531
  }
1526
1532
 
1533
+ interface IHistoryEntry {
1534
+ restore: Function;
1535
+ }
1527
1536
  declare class HistoryManager {
1528
1537
  private undoStack;
1529
1538
  private redoStack;
@@ -1532,8 +1541,8 @@ declare class HistoryManager {
1532
1541
  constructor(draw: Draw);
1533
1542
  undo(): void;
1534
1543
  redo(): void;
1535
- execute(fn: Function): void;
1536
- replaceLatest(fn: Function): void;
1544
+ execute(entry: IHistoryEntry | Function): void;
1545
+ replaceLatest(entry: IHistoryEntry | Function): void;
1537
1546
  isInputGroupable(): boolean;
1538
1547
  recordInputTime(): void;
1539
1548
  resetInputTime(): void;
@@ -1541,7 +1550,8 @@ declare class HistoryManager {
1541
1550
  isCanRedo(): boolean;
1542
1551
  isStackEmpty(): boolean;
1543
1552
  recovery(): void;
1544
- popUndo(): Function | undefined;
1553
+ popUndo(): IHistoryEntry | undefined;
1554
+ private _normalizeEntry;
1545
1555
  }
1546
1556
 
1547
1557
  interface IRangeStyle {
@@ -2342,6 +2352,7 @@ declare class Area {
2342
2352
  private areaInfoMap;
2343
2353
  constructor(draw: Draw);
2344
2354
  getAreaInfo(): Map<string, IAreaInfo>;
2355
+ clear(): void;
2345
2356
  getActiveAreaId(): string | null;
2346
2357
  getActiveAreaInfo(): IAreaInfo | null;
2347
2358
  isReadonly(): boolean;
@@ -2393,6 +2404,7 @@ declare class Draw {
2393
2404
  private pageContainer;
2394
2405
  private pageList;
2395
2406
  private ctxList;
2407
+ private measureCtx;
2396
2408
  private pageNo;
2397
2409
  private renderCount;
2398
2410
  private pagePixelRatio;
@@ -2457,6 +2469,9 @@ declare class Draw {
2457
2469
  private WORD_LIKE_REG;
2458
2470
  private rowList;
2459
2471
  private pageRowList;
2472
+ private pageRenderVersionList;
2473
+ private elementFontCache;
2474
+ private elementRowMarginCache;
2460
2475
  private painterStyle;
2461
2476
  private painterOptions;
2462
2477
  private visiblePageNoList;
@@ -2608,6 +2623,7 @@ declare class Draw {
2608
2623
  private _formatContainer;
2609
2624
  private _createPageContainer;
2610
2625
  private _createPage;
2626
+ private _createMeasureContext;
2611
2627
  private _initPageContext;
2612
2628
  getElementFont(el: IElement, scale?: number): string;
2613
2629
  getElementSize(el: IElement): number;
@@ -2625,8 +2641,10 @@ declare class Draw {
2625
2641
  private _drawColumnGuide;
2626
2642
  private _drawPage;
2627
2643
  private _disconnectLazyRender;
2628
- private _lazyRender;
2629
2644
  private _immediateRender;
2645
+ private _collectMainRenderMeta;
2646
+ private _getIncrementalRestartState;
2647
+ renderVisiblePages(pageNoList?: number[]): void;
2630
2648
  render(payload?: IDrawOption): void;
2631
2649
  setCursor(curIndex: number | undefined): number | undefined;
2632
2650
  submitHistory(curIndex: number | undefined, isInput?: boolean): void;
package/dist/index.d.ts CHANGED
@@ -728,6 +728,7 @@ interface IDrawOption {
728
728
  isInit?: boolean;
729
729
  isSourceHistory?: boolean;
730
730
  isFirstRender?: boolean;
731
+ dirtyStartIndex?: number;
731
732
  }
732
733
  interface IForceUpdateOption {
733
734
  isSubmitHistory?: boolean;
@@ -785,6 +786,11 @@ interface IComputeRowListPayload {
785
786
  mainOuterHeight?: number;
786
787
  surroundElementList?: IElement[];
787
788
  initialListState?: IListStateSeed;
789
+ hasListElement?: boolean;
790
+ fromIndex?: number;
791
+ initialY?: number;
792
+ initialPageNo?: number;
793
+ initialRowIndex?: number;
788
794
  }
789
795
 
790
796
  interface ICurrentPosition {
@@ -1287,6 +1293,7 @@ interface IEditorOption {
1287
1293
  historyMaxRecordCount?: number;
1288
1294
  printPixelRatio?: number;
1289
1295
  maskMargin?: IMargin;
1296
+ scrollPaddingLines?: number;
1290
1297
  letterClass?: string[];
1291
1298
  contextMenuDisableKeys?: string[];
1292
1299
  shortcutDisableKeys?: string[];
@@ -1469,7 +1476,6 @@ type IDrawCursorOption = ICursorOption & {
1469
1476
  hitLineStartIndex?: number;
1470
1477
  };
1471
1478
  interface IMoveCursorToVisibleOption {
1472
- direction: MoveDirection;
1473
1479
  cursorPosition: IElementPosition;
1474
1480
  }
1475
1481
  declare class Cursor {
@@ -1524,6 +1530,9 @@ declare class GlobalEvent {
1524
1530
  private _handleDprChange;
1525
1531
  }
1526
1532
 
1533
+ interface IHistoryEntry {
1534
+ restore: Function;
1535
+ }
1527
1536
  declare class HistoryManager {
1528
1537
  private undoStack;
1529
1538
  private redoStack;
@@ -1532,8 +1541,8 @@ declare class HistoryManager {
1532
1541
  constructor(draw: Draw);
1533
1542
  undo(): void;
1534
1543
  redo(): void;
1535
- execute(fn: Function): void;
1536
- replaceLatest(fn: Function): void;
1544
+ execute(entry: IHistoryEntry | Function): void;
1545
+ replaceLatest(entry: IHistoryEntry | Function): void;
1537
1546
  isInputGroupable(): boolean;
1538
1547
  recordInputTime(): void;
1539
1548
  resetInputTime(): void;
@@ -1541,7 +1550,8 @@ declare class HistoryManager {
1541
1550
  isCanRedo(): boolean;
1542
1551
  isStackEmpty(): boolean;
1543
1552
  recovery(): void;
1544
- popUndo(): Function | undefined;
1553
+ popUndo(): IHistoryEntry | undefined;
1554
+ private _normalizeEntry;
1545
1555
  }
1546
1556
 
1547
1557
  interface IRangeStyle {
@@ -2342,6 +2352,7 @@ declare class Area {
2342
2352
  private areaInfoMap;
2343
2353
  constructor(draw: Draw);
2344
2354
  getAreaInfo(): Map<string, IAreaInfo>;
2355
+ clear(): void;
2345
2356
  getActiveAreaId(): string | null;
2346
2357
  getActiveAreaInfo(): IAreaInfo | null;
2347
2358
  isReadonly(): boolean;
@@ -2393,6 +2404,7 @@ declare class Draw {
2393
2404
  private pageContainer;
2394
2405
  private pageList;
2395
2406
  private ctxList;
2407
+ private measureCtx;
2396
2408
  private pageNo;
2397
2409
  private renderCount;
2398
2410
  private pagePixelRatio;
@@ -2457,6 +2469,9 @@ declare class Draw {
2457
2469
  private WORD_LIKE_REG;
2458
2470
  private rowList;
2459
2471
  private pageRowList;
2472
+ private pageRenderVersionList;
2473
+ private elementFontCache;
2474
+ private elementRowMarginCache;
2460
2475
  private painterStyle;
2461
2476
  private painterOptions;
2462
2477
  private visiblePageNoList;
@@ -2608,6 +2623,7 @@ declare class Draw {
2608
2623
  private _formatContainer;
2609
2624
  private _createPageContainer;
2610
2625
  private _createPage;
2626
+ private _createMeasureContext;
2611
2627
  private _initPageContext;
2612
2628
  getElementFont(el: IElement, scale?: number): string;
2613
2629
  getElementSize(el: IElement): number;
@@ -2625,8 +2641,10 @@ declare class Draw {
2625
2641
  private _drawColumnGuide;
2626
2642
  private _drawPage;
2627
2643
  private _disconnectLazyRender;
2628
- private _lazyRender;
2629
2644
  private _immediateRender;
2645
+ private _collectMainRenderMeta;
2646
+ private _getIncrementalRestartState;
2647
+ renderVisiblePages(pageNoList?: number[]): void;
2630
2648
  render(payload?: IDrawOption): void;
2631
2649
  setCursor(curIndex: number | undefined): number | undefined;
2632
2650
  submitHistory(curIndex: number | undefined, isInput?: boolean): void;