@silurus/ooxml 0.82.1 → 0.83.0

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 (42) hide show
  1. package/README.md +72 -3
  2. package/dist/assets/{render-worker-Cy-QsDge.js → render-worker-Bu31cf1J.js} +4 -4
  3. package/dist/assets/render-worker-DuztdEcX.js +11 -0
  4. package/dist/{canvas-viewer-mechanics-CS_qbr6T.js → canvas-viewer-mechanics-h07vpVOQ.js} +42 -2
  5. package/dist/{comment-ui-runtime-C1RV_3iu.js → comment-ui-runtime-BelHJt73.js} +2 -2
  6. package/dist/{comment-ui-runtime-DgCZpPR0.js → comment-ui-runtime-DD5a3x3k.js} +2 -2
  7. package/dist/{comments-Cf9W7r3M.js → comments-AAaNnQTi.js} +7 -2
  8. package/dist/{document-pull-client-B1WOjA0z.js → document-pull-client-BAhqoTmm.js} +4508 -3952
  9. package/dist/docx-Dg73PGgC.js +2707 -0
  10. package/dist/docx.mjs +6 -6
  11. package/dist/docx_parser_bg.wasm +0 -0
  12. package/dist/dom-interaction-boundary-CepOlXt6.js +217 -0
  13. package/dist/index.mjs +4 -4
  14. package/dist/line-distribute-D7A_wnJg.js +1003 -0
  15. package/dist/{line-metrics-B3syvDn2.js → line-metrics-Bpn7OeZD.js} +616 -616
  16. package/dist/node.mjs +308 -308
  17. package/dist/pptx-BcUCETmQ.js +2990 -0
  18. package/dist/pptx.mjs +5 -5
  19. package/dist/pptx_parser_bg.wasm +0 -0
  20. package/dist/{render-BC8p7vZQ.js → render-CL-7V3E8.js} +1 -1
  21. package/dist/{render-worker-host-DhnkTyjj.js → render-worker-host-DDZo0feh.js} +1 -1
  22. package/dist/{render-worker-host-BNnXCtAu.js → render-worker-host-FJ19-fUI.js} +1 -1
  23. package/dist/{resource-measurement-CsW4_eYt.js → resource-measurement-DuiFWzam.js} +3 -3
  24. package/dist/{session-Da7LEQUB.js → session-BjydZEDF.js} +107 -94
  25. package/dist/{slide-pull-client-Bg9DusLX.js → slide-pull-client-CwvvncPA.js} +1158 -935
  26. package/dist/types/docx.d.ts +98 -8
  27. package/dist/types/index.d.ts +184 -13
  28. package/dist/types/node.d.ts +2 -2
  29. package/dist/types/pptx.d.ts +94 -5
  30. package/dist/types/xlsx.d.ts +2 -2
  31. package/dist/{worksheet-pull-client-CYtwXP5D.js → worksheet-pull-client-DyFsDF4A.js} +32 -32
  32. package/dist/{xlsx-DMWeXT-c.js → xlsx-BibrHQ52.js} +476 -476
  33. package/dist/xlsx.mjs +5 -5
  34. package/dist/xlsx_parser_bg.wasm +0 -0
  35. package/package.json +3 -1
  36. package/dist/assets/render-worker-aHayzR7v.js +0 -11
  37. package/dist/docx-HoZXZUPA.js +0 -2162
  38. package/dist/dom-interaction-boundary-C8F6HO5x.js +0 -119
  39. package/dist/line-distribute-iXsUCIH-.js +0 -1003
  40. package/dist/pptx-DEUP4Yq5.js +0 -2432
  41. /package/dist/{comment-occurrence-C34fWs_F.js → comment-occurrence-X54si2ob.js} +0 -0
  42. /package/dist/{highlight-rect-MaCt0om0.js → highlight-rect-Hes0z_Mj.js} +0 -0
@@ -1275,7 +1275,7 @@ interface ChartRegionMapRenderer {
1275
1275
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1276
1276
  }
1277
1277
  //#endregion
1278
- //#region dist/.types-work/hyperlink-CZoV-4B8.d.ts
1278
+ //#region dist/.types-work/hyperlink-Bk5fiM_m.d.ts
1279
1279
  type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
1280
1280
  type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
1281
1281
  declare class OoxmlError extends Error {
@@ -1348,6 +1348,14 @@ interface OoxmlResourceLimits {
1348
1348
  maxTotalInflatedBytes?: OoxmlResourceLimit;
1349
1349
  maxArchiveEntries?: OoxmlResourceLimit;
1350
1350
  }
1351
+ interface ProgressiveLayoutProgress {
1352
+ committedUnits: number;
1353
+ }
1354
+ interface ProgressiveLayoutPartial {
1355
+ availableUnits: number;
1356
+ totalUnits?: number;
1357
+ exact: boolean;
1358
+ }
1351
1359
  interface LoadOptions$3 {
1352
1360
  useGoogleFonts?: boolean;
1353
1361
  password?: string;
@@ -1442,7 +1450,7 @@ interface FindHighlightColors {
1442
1450
  active?: string;
1443
1451
  }
1444
1452
  //#endregion
1445
- //#region dist/.types-work/types-HfeSaZtq.d.ts
1453
+ //#region dist/.types-work/types-B2UaFocY.d.ts
1446
1454
  interface DocxDocumentModel {
1447
1455
  section: SectionProps;
1448
1456
  body: BodyElement[];
@@ -2185,9 +2193,10 @@ interface RenderPageOptions {
2185
2193
  defaultTextColor?: string;
2186
2194
  onTextRun?: (run: DocxTextRunInfo) => void;
2187
2195
  currentDate?: Date | number;
2196
+ showTrackedChanges?: boolean;
2188
2197
  }
2189
2198
  //#endregion
2190
- //#region dist/.types-work/docx-CDchTe6F.d.ts
2199
+ //#region dist/.types-work/docx-CBra4_iJ.d.ts
2191
2200
  interface CommentAnchorRange {
2192
2201
  readonly commentId: string;
2193
2202
  readonly source: Readonly<DocxStorySource>;
@@ -2294,6 +2303,7 @@ declare function readDocxTextSelectionContext(root: HTMLElement, selection: Sele
2294
2303
  interface DocxElementContextOptions {
2295
2304
  readonly maxTextCharacters?: number;
2296
2305
  readonly currentDate?: Date | number;
2306
+ readonly showTrackedChanges?: boolean;
2297
2307
  }
2298
2308
  interface RevisionAnchorRange {
2299
2309
  readonly revisionIndex: number;
@@ -2310,8 +2320,15 @@ declare function resolveRevisionAnchorRuns(anchor: Readonly<RevisionAnchorRange>
2310
2320
  interface LoadOptions$2 extends LoadOptions$3 {
2311
2321
  math?: MathRenderer;
2312
2322
  mode?: 'main' | 'worker';
2323
+ sliceLayout?: boolean;
2324
+ onLayoutProgress?: (progress: Readonly<ProgressiveLayoutProgress>) => void;
2325
+ progressiveLayout?: boolean;
2326
+ onLayoutComplete?: (error?: unknown) => void;
2327
+ onLayoutPartial?: (progress: Readonly<ProgressiveLayoutPartial>) => void;
2328
+ showTrackedChanges?: boolean;
2329
+ currentDate?: Date | number;
2313
2330
  }
2314
- type CollectPageRunsOptions = Pick<RenderPageOptions, 'width' | 'currentDate'>;
2331
+ type CollectPageRunsOptions = Pick<RenderPageOptions, 'width' | 'currentDate' | 'showTrackedChanges'>;
2315
2332
  interface DocxPageCommentThreadsOptions extends CollectPageRunsOptions, ResolveDocxCommentThreadsOptions {}
2316
2333
  type RenderPageToBitmapOptions = Omit<RenderPageOptions, 'onTextRun'> & {
2317
2334
  onTextRun?: (run: DocxTextRunInfo) => void;
@@ -2322,10 +2339,19 @@ declare class DocxDocument {
2322
2339
  private _source;
2323
2340
  private _meta;
2324
2341
  private _review;
2342
+ private readonly _layoutLifecycle;
2343
+ private readonly _layoutObservers;
2344
+ private _layoutCompletion;
2345
+ private _layoutAbort;
2325
2346
  private _bookmarkPages;
2326
2347
  private _commentAnchorRanges;
2327
2348
  private _revisionAnchorRanges;
2328
- private _reviewTextRunSourceIndex;
2349
+ private _reviewProjectionIndex;
2350
+ private _parseRequestId;
2351
+ private _progressive;
2352
+ private _parseWatchdog;
2353
+ private _parseWatchdogMs;
2354
+ private _layoutViewGeneration;
2329
2355
  private _mode;
2330
2356
  private _threeD;
2331
2357
  private _regionMap;
@@ -2340,6 +2366,18 @@ declare class DocxDocument {
2340
2366
  private constructor();
2341
2367
  static load(source: string | ArrayBuffer, opts?: LoadOptions$2): Promise<DocxDocument>;
2342
2368
  private _parse;
2369
+ private _onWorkerLayoutPush;
2370
+ private _applyLayoutPartial;
2371
+ private _onAuthoritativeMeta;
2372
+ private _invalidateLayoutDerivedCaches;
2373
+ private _replaceMainLayoutPublication;
2374
+ private _isLayoutViewActive;
2375
+ private _rearmParseWatchdog;
2376
+ private _clearParseWatchdog;
2377
+ private _onParseWentSilent;
2378
+ private _failWorkerProgressive;
2379
+ private _parseViewFields;
2380
+ private _parseProgressively;
2343
2381
  destroy(): void;
2344
2382
  getImage(imagePath: string, mimeType: string): Promise<Blob>;
2345
2383
  getFontBytes(partPath: string): Promise<Uint8Array>;
@@ -2347,6 +2385,8 @@ declare class DocxDocument {
2347
2385
  getResourceMetrics(): Promise<OoxmlResourceMetrics>;
2348
2386
  toMarkdown(): Promise<string>;
2349
2387
  get pageCount(): number;
2388
+ get layoutComplete(): boolean;
2389
+ waitUntilLayoutComplete(): Promise<void>;
2350
2390
  get mode(): 'main' | 'worker';
2351
2391
  get document(): DocxDocumentModel;
2352
2392
  get comments(): readonly Readonly<DocComment>[];
@@ -2357,12 +2397,17 @@ declare class DocxDocument {
2357
2397
  get footnotes(): DocNote[];
2358
2398
  get endnotes(): DocNote[];
2359
2399
  private _getLayout;
2400
+ setLayoutView(view?: Readonly<{
2401
+ showTrackedChanges?: boolean;
2402
+ currentDate?: Date | number;
2403
+ }>): Promise<void>;
2360
2404
  private _getBookmarkPages;
2361
2405
  getBookmarkPage(bookmarkName: string): number | undefined;
2362
2406
  pageSize(pageIndex: number): {
2363
2407
  widthPt: number;
2364
2408
  heightPt: number;
2365
2409
  };
2410
+ private _withActiveView;
2366
2411
  renderPage(target: HTMLCanvasElement | OffscreenCanvas, pageIndex: number, opts?: RenderPageOptions): Promise<void>;
2367
2412
  renderPageToBitmap(pageIndex: number, opts?: RenderPageToBitmapOptions): Promise<ImageBitmap>;
2368
2413
  collectPageRuns(pageIndex: number, opts?: CollectPageRunsOptions): Promise<DocxTextRunInfo[]>;
@@ -2379,7 +2424,7 @@ interface DocxViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>, LoadOp
2379
2424
  onSelectionContextChange?: (context: DocxSelectionContext | null) => void;
2380
2425
  onContextMenu?: (event: ViewerContextMenuEvent<DocxSelectionContext>) => void;
2381
2426
  findHighlightColors?: FindHighlightColors;
2382
- onPageChange?: (index: number, total: number) => void;
2427
+ onPageChange?: (index: number, total: number, layoutComplete: boolean) => void;
2383
2428
  zoomMin?: number;
2384
2429
  zoomMax?: number;
2385
2430
  onScaleChange?: (scale: number) => void;
@@ -2401,6 +2446,7 @@ declare class DocxViewer implements ZoomableViewer {
2401
2446
  private _highlightLayer;
2402
2447
  private _elementLayer;
2403
2448
  private _find;
2449
+ private _findRequestGeneration;
2404
2450
  private _measureCtx;
2405
2451
  private _opts;
2406
2452
  private readonly _mode;
@@ -2411,6 +2457,13 @@ declare class DocxViewer implements ZoomableViewer {
2411
2457
  private _selectionContextKey;
2412
2458
  private _elementContext;
2413
2459
  private _elementHitGeneration;
2460
+ private _layoutViewGeneration;
2461
+ private _navigationGeneration;
2462
+ private _layoutUnsubscribe;
2463
+ private _internalHyperlinkGeneration;
2464
+ private readonly _layoutWaiters;
2465
+ private _layoutFailed;
2466
+ private readonly _loadingLayer;
2414
2467
  private _elementClickListener;
2415
2468
  private _contextMenuListener;
2416
2469
  static fromDocument(canvas: HTMLCanvasElement, document: DocxDocument, opts?: Omit<DocxViewerOptions, keyof LoadOptions$2>): Omit<DocxViewer, 'load'>;
@@ -2418,6 +2471,8 @@ declare class DocxViewer implements ZoomableViewer {
2418
2471
  load(source: string | ArrayBuffer): Promise<void>;
2419
2472
  get pageCount(): number;
2420
2473
  get currentPage(): number;
2474
+ get layoutComplete(): boolean;
2475
+ waitUntilLayoutComplete(): Promise<void>;
2421
2476
  get canvasElement(): HTMLCanvasElement;
2422
2477
  goToPage(index: number): Promise<void>;
2423
2478
  nextPage(): Promise<void>;
@@ -2453,12 +2508,21 @@ declare class DocxViewer implements ZoomableViewer {
2453
2508
  private _render;
2454
2509
  private _reportRenderError;
2455
2510
  private _renderPage;
2511
+ private _bindLayoutDocument;
2512
+ private _unbindLayoutDocument;
2513
+ private _onLayoutPublication;
2514
+ private _waitForPage;
2515
+ private _wakeLayoutWaiters;
2516
+ private _cancelPendingNavigation;
2517
+ private _setLoading;
2518
+ setShowTrackedChanges(value: boolean): Promise<void>;
2456
2519
  private _buildHighlightLayer;
2457
2520
  private _canvasCssPx;
2458
2521
  private _measureForFont;
2459
2522
  private _collectPageRuns;
2460
2523
  private _buildTextLayer;
2461
2524
  private _hyperlinkHandler;
2525
+ private _navigateInternalHyperlink;
2462
2526
  }
2463
2527
  interface DocxCommentsOptions extends ViewerCommentsOptions {
2464
2528
  readonly cards?: boolean;
@@ -2474,6 +2538,8 @@ interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>,
2474
2538
  paddingLeft?: number;
2475
2539
  paddingRight?: number;
2476
2540
  overscan?: number;
2541
+ progressiveLayout?: boolean;
2542
+ sliceLayout?: boolean;
2477
2543
  enableTextSelection?: boolean;
2478
2544
  comments?: boolean | DocxCommentsOptions;
2479
2545
  enableElementSelection?: boolean;
@@ -2486,7 +2552,7 @@ interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>,
2486
2552
  refitOnResize?: boolean;
2487
2553
  background?: string;
2488
2554
  pageShadow?: string | false;
2489
- onVisiblePageChange?: (topIndex: number, total: number) => void;
2555
+ onVisiblePageChange?: (topIndex: number, total: number, layoutComplete: boolean) => void;
2490
2556
  onScaleChange?: (scale: number) => void;
2491
2557
  onHyperlinkClick?: (target: HyperlinkTarget) => void;
2492
2558
  enableHyperlinks?: boolean;
@@ -2497,6 +2563,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
2497
2563
  private get _doc();
2498
2564
  private readonly _borrowed;
2499
2565
  private readonly _opts;
2566
+ private readonly _errorRouter;
2500
2567
  private readonly _container;
2501
2568
  private readonly _wrapper;
2502
2569
  private readonly _scrollHost;
@@ -2511,6 +2578,11 @@ declare class DocxScrollViewer implements ZoomableViewer {
2511
2578
  private _scrollGeometry;
2512
2579
  private _lastRange;
2513
2580
  private _lastTopIndex;
2581
+ private _lastReportedTotal;
2582
+ private _lastReportedLayoutComplete;
2583
+ private _layoutUnsubscribe;
2584
+ private _presentedPageCount;
2585
+ private _pendingLayoutPublication;
2514
2586
  private _scrollListener;
2515
2587
  private _selectionChangeListener;
2516
2588
  private _selectionContextKey;
@@ -2526,8 +2598,10 @@ declare class DocxScrollViewer implements ZoomableViewer {
2526
2598
  private readonly _commentIndexedPages;
2527
2599
  private _commentScanFrontier;
2528
2600
  private _commentNavigationGeneration;
2601
+ private _internalHyperlinkGeneration;
2529
2602
  private _commentAnchorRangesForMargin;
2530
2603
  private _commentAnchorIds;
2604
+ private _reviewOriginPx;
2531
2605
  private _commentGeometryScheduled;
2532
2606
  private _commentGeometryFrame;
2533
2607
  private readonly _pendingCommentGeometry;
@@ -2545,10 +2619,22 @@ declare class DocxScrollViewer implements ZoomableViewer {
2545
2619
  private readonly _pageShadow;
2546
2620
  private readonly _find;
2547
2621
  private _findActive;
2622
+ private _findRequestGeneration;
2623
+ private _showTrackedChanges;
2624
+ private _layoutViewGeneration;
2548
2625
  static fromDocument(container: HTMLElement, document: DocxDocument, opts?: Omit<DocxScrollViewerOptions, keyof LoadOptions$2>): Omit<DocxScrollViewer, 'load'>;
2549
2626
  constructor(container: HTMLElement, opts?: DocxScrollViewerOptions);
2550
2627
  load(source: string | ArrayBuffer): Promise<void>;
2551
2628
  get pageCount(): number;
2629
+ get layoutComplete(): boolean;
2630
+ waitUntilLayoutComplete(): Promise<void>;
2631
+ private _bindLayoutDocument;
2632
+ private _unbindLayoutDocument;
2633
+ private _onLayoutPublication;
2634
+ private _refreshCommentSurface;
2635
+ private _applyLayoutPublication;
2636
+ private _revealPendingLayoutAtPresentedTail;
2637
+ private _revealPendingLayoutThroughPage;
2552
2638
  private _pageWidthPx;
2553
2639
  private _pageHeightPx;
2554
2640
  private _fitWidthPx;
@@ -2574,6 +2660,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
2574
2660
  private _syncSpacerWidth;
2575
2661
  private _onScroll;
2576
2662
  private _mountVisible;
2663
+ private _emitVisiblePageChange;
2577
2664
  private _applyPageShadow;
2578
2665
  private _acquireSlot;
2579
2666
  private _recycleSlot;
@@ -2581,6 +2668,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
2581
2668
  private _dpr;
2582
2669
  private _renderSlot;
2583
2670
  private _hyperlinkHandler;
2671
+ private _navigateInternalHyperlink;
2584
2672
  private _measureForFont;
2585
2673
  private _canvasCssPx;
2586
2674
  private _reportRenderError;
@@ -2594,9 +2682,11 @@ declare class DocxScrollViewer implements ZoomableViewer {
2594
2682
  private _fit;
2595
2683
  private _previewVisible;
2596
2684
  private _previewSlot;
2685
+ private _clearTextLayerPreview;
2597
2686
  private _scheduleSettle;
2598
2687
  private _settleRender;
2599
- private _settleSlot;
2688
+ private _refreshSlotAtomically;
2689
+ setShowTrackedChanges(value: boolean): Promise<void>;
2600
2690
  scrollToPage(index: number, opts?: {
2601
2691
  behavior?: 'auto' | 'smooth';
2602
2692
  }): void;
@@ -2909,7 +2999,7 @@ interface PictureElement {
2909
2999
  sp3d?: Sp3d;
2910
3000
  }
2911
3001
  //#endregion
2912
- //#region dist/.types-work/pptx-CZHOWYdz.d.ts
3002
+ //#region dist/.types-work/pptx-Btl3_eEe.d.ts
2913
3003
  interface PptxTextRunInfo {
2914
3004
  elementIndex?: number;
2915
3005
  origin?: SlideElementOrigin;
@@ -3034,6 +3124,10 @@ interface PptxElementBounds {
3034
3124
  type PptxSelectionContext = PptxTextSelectionContext | PptxCommentSelectionContext | PptxElementContext;
3035
3125
  type LoadOptions$1 = LoadOptions$3 & {
3036
3126
  mode?: 'main' | 'worker';
3127
+ progressiveLayout?: boolean;
3128
+ onLayoutProgress?: (progress: Readonly<ProgressiveLayoutProgress>) => void;
3129
+ onLayoutPartial?: (progress: Readonly<ProgressiveLayoutPartial>) => void;
3130
+ onLayoutComplete?: (error?: unknown) => void;
3037
3131
  };
3038
3132
  interface RenderSlideToBitmapOptions {
3039
3133
  width?: number;
@@ -3056,13 +3150,27 @@ declare class PptxPresentation {
3056
3150
  private readonly _worker;
3057
3151
  private readonly _bridge;
3058
3152
  private _mode;
3153
+ private _bootstrap;
3059
3154
  private _preflight;
3155
+ private _availableSlideCount;
3156
+ private readonly _layoutLifecycle;
3157
+ private readonly _layoutObservers;
3158
+ private _layoutCompletion;
3159
+ private _parseRequestId;
3160
+ private _progressive;
3161
+ private _progressiveWatchdog;
3162
+ private _progressiveWatchdogMs;
3163
+ private readonly _layoutWaiters;
3060
3164
  private _slides;
3061
3165
  private _slidePullClient;
3062
3166
  private _resourceFailure;
3063
3167
  private _slidePartIndex;
3064
3168
  private readonly _rawParts;
3065
3169
  private _googleFontFaces;
3170
+ private _embeddedFontFaces;
3171
+ private _embeddedFontAliases;
3172
+ private _embeddedFontAuthoredFamilies;
3173
+ private _destroyed;
3066
3174
  private readonly _fetchImage;
3067
3175
  private readonly _fetchMedia;
3068
3176
  private _math;
@@ -3074,7 +3182,22 @@ declare class PptxPresentation {
3074
3182
  private _rethrowWithResourceFailure;
3075
3183
  static load(source: string | ArrayBuffer, opts?: LoadOptions$1): Promise<PptxPresentation>;
3076
3184
  private _parse;
3185
+ private _parseMainProgressively;
3186
+ private _parseWorkerProgressively;
3187
+ private _createSlidePullClient;
3188
+ private _onWorkerLayoutPush;
3189
+ private _applyProgressivePrefix;
3190
+ private _finishProgressiveLayout;
3191
+ private _failProgressiveLayout;
3192
+ private _wakeLayoutWaiters;
3193
+ private _rearmProgressiveWatchdog;
3194
+ private _clearProgressiveWatchdog;
3195
+ private _waitForSlide;
3196
+ private _assertSlideIndex;
3077
3197
  get slideCount(): number;
3198
+ get availableSlideCount(): number;
3199
+ get layoutComplete(): boolean;
3200
+ waitUntilLayoutComplete(): Promise<void>;
3078
3201
  get slideWidth(): number;
3079
3202
  get slideHeight(): number;
3080
3203
  get mode(): 'main' | 'worker';
@@ -3093,6 +3216,7 @@ declare class PptxPresentation {
3093
3216
  getMedia(mediaPath: string): Promise<Blob>;
3094
3217
  private _findMimeTypeForPath;
3095
3218
  getImage(imagePath: string, mimeType: string): Promise<Blob>;
3219
+ private getFontBytes;
3096
3220
  getResourceMetrics(): Promise<OoxmlResourceMetrics>;
3097
3221
  toMarkdown(): Promise<string>;
3098
3222
  presentSlide(canvas: HTMLCanvasElement, slideIndex: number, opts?: PresentSlideOptions): Promise<PresentationHandle>;
@@ -3100,7 +3224,7 @@ declare class PptxPresentation {
3100
3224
  }
3101
3225
  type HiddenSlideMode = 'show' | 'skip' | 'dim';
3102
3226
  interface PptxViewerOptions extends Pick<RenderOptions, 'width' | 'dpr'>, LoadOptions$1 {
3103
- onSlideChange?: (index: number, total: number) => void;
3227
+ onSlideChange?: (index: number, total: number, layoutComplete: boolean) => void;
3104
3228
  onError?: (err: Error) => void;
3105
3229
  zoomMin?: number;
3106
3230
  zoomMax?: number;
@@ -3126,6 +3250,7 @@ declare class PptxViewer implements ZoomableViewer {
3126
3250
  private highlightLayer;
3127
3251
  private elementLayer;
3128
3252
  private _find;
3253
+ private _findGeneration;
3129
3254
  private _measureCtx;
3130
3255
  private readonly presentationOwner;
3131
3256
  private get engine();
@@ -3133,6 +3258,7 @@ declare class PptxViewer implements ZoomableViewer {
3133
3258
  private readonly hostWindow;
3134
3259
  private readonly opts;
3135
3260
  private currentSlide;
3261
+ private _renderedSlide;
3136
3262
  private _hiddenMode;
3137
3263
  private handle;
3138
3264
  private readonly _mode;
@@ -3146,10 +3272,21 @@ declare class PptxViewer implements ZoomableViewer {
3146
3272
  private elementContext;
3147
3273
  private elementHitGeneration;
3148
3274
  private readonly elementHitTolerance;
3275
+ private readonly _loadingLayer;
3276
+ private _layoutUnsubscribe;
3277
+ private readonly _layoutWaiters;
3278
+ private _layoutFailed;
3279
+ private _navigationGeneration;
3280
+ private _renderProgressGeneration;
3281
+ private _lastReportedSlide;
3282
+ private _lastReportedTotal;
3283
+ private _lastReportedAvailable;
3284
+ private _lastReportedLayoutComplete;
3149
3285
  static fromPresentation(canvas: HTMLCanvasElement, presentation: PptxPresentation, opts?: Omit<PptxViewerOptions, keyof LoadOptions$1>): Omit<PptxViewer, 'load'>;
3150
3286
  constructor(canvas: HTMLCanvasElement, opts?: PptxViewerOptions);
3151
3287
  load(source: string | ArrayBuffer): Promise<void>;
3152
3288
  goToSlide(index: number): Promise<void>;
3289
+ private _goToSlide;
3153
3290
  nextSlide(): Promise<void>;
3154
3291
  prevSlide(): Promise<void>;
3155
3292
  private _step;
@@ -3160,6 +3297,9 @@ declare class PptxViewer implements ZoomableViewer {
3160
3297
  get visibleSlideCount(): number;
3161
3298
  get slideIndex(): number;
3162
3299
  get slideCount(): number;
3300
+ get availableSlideCount(): number;
3301
+ get layoutComplete(): boolean;
3302
+ waitUntilLayoutComplete(): Promise<void>;
3163
3303
  getNotes(slideIndex: number): string | null;
3164
3304
  get canvasElement(): HTMLCanvasElement;
3165
3305
  private _naturalWidthPx;
@@ -3174,6 +3314,14 @@ declare class PptxViewer implements ZoomableViewer {
3174
3314
  fitPage(): Promise<void>;
3175
3315
  private _fit;
3176
3316
  private renderCurrentSlide;
3317
+ private _bindLayoutPresentation;
3318
+ private _unbindLayoutPresentation;
3319
+ private _beginNavigation;
3320
+ private _onLayoutPublication;
3321
+ private _waitForSlide;
3322
+ private _wakeLayoutWaiters;
3323
+ private _emitSlideChange;
3324
+ private _setLoading;
3177
3325
  private _buildHighlightLayer;
3178
3326
  private _measureForFont;
3179
3327
  private _collectSlideRuns;
@@ -3181,6 +3329,7 @@ declare class PptxViewer implements ZoomableViewer {
3181
3329
  findNext(): Promise<FindMatch<PptxMatchLocation> | null>;
3182
3330
  findPrev(): Promise<FindMatch<PptxMatchLocation> | null>;
3183
3331
  clearFind(): void;
3332
+ private _invalidateFind;
3184
3333
  private _activateMatch;
3185
3334
  private _redrawHighlights;
3186
3335
  private _buildTextLayer;
@@ -3228,7 +3377,7 @@ interface PptxScrollViewerOptions extends Pick<RenderSlideOptions, 'width' | 'dp
3228
3377
  refitOnResize?: boolean;
3229
3378
  background?: string;
3230
3379
  pageShadow?: string | false;
3231
- onVisibleSlideChange?: (topIndex: number, total: number) => void;
3380
+ onVisibleSlideChange?: (topIndex: number, total: number, layoutComplete: boolean) => void;
3232
3381
  onScaleChange?: (scale: number) => void;
3233
3382
  onError?: (err: Error) => void;
3234
3383
  onHyperlinkClick?: (target: HyperlinkTarget) => void;
@@ -3239,6 +3388,7 @@ declare class PptxScrollViewer implements ZoomableViewer {
3239
3388
  private get _pres();
3240
3389
  private readonly _borrowed;
3241
3390
  private readonly _opts;
3391
+ private readonly _errorRouter;
3242
3392
  private readonly _container;
3243
3393
  private readonly _wrapper;
3244
3394
  private readonly _scrollHost;
@@ -3252,6 +3402,9 @@ declare class PptxScrollViewer implements ZoomableViewer {
3252
3402
  private _uniformSlideHeight;
3253
3403
  private _lastRange;
3254
3404
  private _lastTopIndex;
3405
+ private _lastReportedTotal;
3406
+ private _lastReportedLayoutComplete;
3407
+ private _layoutUnsubscribe;
3255
3408
  private _scrollListener;
3256
3409
  private _selectionChangeListener;
3257
3410
  private _selectionContextKey;
@@ -3267,6 +3420,10 @@ declare class PptxScrollViewer implements ZoomableViewer {
3267
3420
  private _commentGeometryFrame;
3268
3421
  private readonly _pendingCommentGeometry;
3269
3422
  private _hasComments;
3423
+ private _reviewOriginPx;
3424
+ private _commentScanFrontier;
3425
+ private readonly _layoutWaiters;
3426
+ private _layoutFailed;
3270
3427
  private _elementHitGeneration;
3271
3428
  private readonly _elementHitTolerance;
3272
3429
  private _destroyed;
@@ -3280,12 +3437,16 @@ declare class PptxScrollViewer implements ZoomableViewer {
3280
3437
  private _lastFitWidth;
3281
3438
  private readonly _pageShadow;
3282
3439
  private readonly _find;
3440
+ private _findGeneration;
3283
3441
  private _findActive;
3284
3442
  private _findMeasureCtx;
3285
3443
  static fromPresentation(container: HTMLElement, presentation: PptxPresentation, opts?: Omit<PptxScrollViewerOptions, keyof LoadOptions$1>): Omit<PptxScrollViewer, 'load'>;
3286
3444
  constructor(container: HTMLElement, opts?: PptxScrollViewerOptions);
3287
3445
  load(source: string | ArrayBuffer): Promise<void>;
3288
3446
  get slideCount(): number;
3447
+ get availableSlideCount(): number;
3448
+ get layoutComplete(): boolean;
3449
+ waitUntilLayoutComplete(): Promise<void>;
3289
3450
  private _slideWidthPx;
3290
3451
  private _slideHeightPx;
3291
3452
  private _fitWidthPx;
@@ -3296,7 +3457,8 @@ declare class PptxScrollViewer implements ZoomableViewer {
3296
3457
  private _commentsOptions;
3297
3458
  private _commentSide;
3298
3459
  private _syncCommentMarginGeometry;
3299
- private _presentationHasComments;
3460
+ private _scanAvailableComments;
3461
+ private _refreshDiscoveredComments;
3300
3462
  private _baseScale;
3301
3463
  relayout(): void;
3302
3464
  private _relayout;
@@ -3322,6 +3484,14 @@ declare class PptxScrollViewer implements ZoomableViewer {
3322
3484
  private _positionSlot;
3323
3485
  private _dpr;
3324
3486
  private _renderSlot;
3487
+ private _trackSlotLoading;
3488
+ private _bindLayoutPresentation;
3489
+ private _unbindLayoutPresentation;
3490
+ private _onLayoutPublication;
3491
+ private _wakeLayoutWaiters;
3492
+ private _beginCommentNavigation;
3493
+ private _waitForSlideMetadata;
3494
+ private _emitVisibleSlideChange;
3325
3495
  private _renderInteractiveSlot;
3326
3496
  private _syncMediaPlayback;
3327
3497
  private _reportRenderError;
@@ -3351,6 +3521,7 @@ declare class PptxScrollViewer implements ZoomableViewer {
3351
3521
  findNext(): Promise<FindMatch<PptxMatchLocation> | null>;
3352
3522
  findPrev(): Promise<FindMatch<PptxMatchLocation> | null>;
3353
3523
  clearFind(): void;
3524
+ private _invalidateFind;
3354
3525
  private _activateMatch;
3355
3526
  private _collectSlideRuns;
3356
3527
  private _redrawHighlights;
@@ -4143,7 +4314,7 @@ interface XlsxRenderViewportOptions {
4143
4314
  } | null;
4144
4315
  }
4145
4316
  //#endregion
4146
- //#region dist/.types-work/xlsx-_-beyOtw.d.ts
4317
+ //#region dist/.types-work/xlsx-BjLUPERo.d.ts
4147
4318
  type ResolvedList = {
4148
4319
  kind: 'values';
4149
4320
  values: string[];
@@ -1231,7 +1231,7 @@ interface ChartLegendEntryOverride {
1231
1231
  fontBold?: boolean | null;
1232
1232
  }
1233
1233
  //#endregion
1234
- //#region dist/.types-work/hyperlink-CZoV-4B8.d.ts
1234
+ //#region dist/.types-work/hyperlink-Bk5fiM_m.d.ts
1235
1235
  type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
1236
1236
  type OoxmlFormat = 'docx' | 'xlsx' | 'pptx';
1237
1237
  interface OoxmlResourceUsageSnapshot {
@@ -1317,7 +1317,7 @@ type HyperlinkTarget = {
1317
1317
  slideIndex?: number;
1318
1318
  };
1319
1319
  //#endregion
1320
- //#region dist/.types-work/types-HfeSaZtq.d.ts
1320
+ //#region dist/.types-work/types-B2UaFocY.d.ts
1321
1321
  interface DocxDocumentModel {
1322
1322
  section: SectionProps;
1323
1323
  body: BodyElement[];