@silurus/ooxml 0.82.1 → 0.83.1

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 +74 -5
  2. package/dist/assets/render-worker-4GSYWsM3.js +11 -0
  3. package/dist/assets/{render-worker-Cy-QsDge.js → render-worker-DwFpY197.js} +4 -4
  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-DSx36ZsB.js} +4519 -3952
  9. package/dist/docx-BF-WKW73.js +2784 -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-CA-Q09yW.js +3010 -0
  18. package/dist/pptx.mjs +5 -5
  19. package/dist/pptx_parser_bg.wasm +0 -0
  20. package/dist/{render-BC8p7vZQ.js → render-DtbFbO5c.js} +1 -1
  21. package/dist/{render-worker-host-BNnXCtAu.js → render-worker-host-D1jcACJV.js} +1 -1
  22. package/dist/{render-worker-host-DhnkTyjj.js → render-worker-host-DCLyw6UR.js} +1 -1
  23. package/dist/{resource-measurement-CsW4_eYt.js → resource-measurement-DuiFWzam.js} +3 -3
  24. package/dist/{session-Da7LEQUB.js → session-CxT-t0BX.js} +107 -94
  25. package/dist/{slide-pull-client-Bg9DusLX.js → slide-pull-client-B9rcJdO4.js} +1190 -937
  26. package/dist/types/docx.d.ts +103 -8
  27. package/dist/types/index.d.ts +195 -13
  28. package/dist/types/node.d.ts +2 -2
  29. package/dist/types/pptx.d.ts +100 -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-CyuBv4wv.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,14 @@ declare class DocxViewer implements ZoomableViewer {
2411
2457
  private _selectionContextKey;
2412
2458
  private _elementContext;
2413
2459
  private _elementHitGeneration;
2460
+ private _layoutViewGeneration;
2461
+ private _layoutViewPublicationGeneration;
2462
+ private _navigationGeneration;
2463
+ private _layoutUnsubscribe;
2464
+ private _internalHyperlinkGeneration;
2465
+ private readonly _layoutWaiters;
2466
+ private _layoutFailed;
2467
+ private readonly _loadingLayer;
2414
2468
  private _elementClickListener;
2415
2469
  private _contextMenuListener;
2416
2470
  static fromDocument(canvas: HTMLCanvasElement, document: DocxDocument, opts?: Omit<DocxViewerOptions, keyof LoadOptions$2>): Omit<DocxViewer, 'load'>;
@@ -2418,6 +2472,8 @@ declare class DocxViewer implements ZoomableViewer {
2418
2472
  load(source: string | ArrayBuffer): Promise<void>;
2419
2473
  get pageCount(): number;
2420
2474
  get currentPage(): number;
2475
+ get layoutComplete(): boolean;
2476
+ waitUntilLayoutComplete(): Promise<void>;
2421
2477
  get canvasElement(): HTMLCanvasElement;
2422
2478
  goToPage(index: number): Promise<void>;
2423
2479
  nextPage(): Promise<void>;
@@ -2453,12 +2509,22 @@ declare class DocxViewer implements ZoomableViewer {
2453
2509
  private _render;
2454
2510
  private _reportRenderError;
2455
2511
  private _renderPage;
2512
+ private _bindLayoutDocument;
2513
+ private _unbindLayoutDocument;
2514
+ private _onLayoutPublication;
2515
+ private _onLayoutViewPublication;
2516
+ private _waitForPage;
2517
+ private _wakeLayoutWaiters;
2518
+ private _cancelPendingNavigation;
2519
+ private _setLoading;
2520
+ setShowTrackedChanges(value: boolean): Promise<void>;
2456
2521
  private _buildHighlightLayer;
2457
2522
  private _canvasCssPx;
2458
2523
  private _measureForFont;
2459
2524
  private _collectPageRuns;
2460
2525
  private _buildTextLayer;
2461
2526
  private _hyperlinkHandler;
2527
+ private _navigateInternalHyperlink;
2462
2528
  }
2463
2529
  interface DocxCommentsOptions extends ViewerCommentsOptions {
2464
2530
  readonly cards?: boolean;
@@ -2474,6 +2540,8 @@ interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>,
2474
2540
  paddingLeft?: number;
2475
2541
  paddingRight?: number;
2476
2542
  overscan?: number;
2543
+ progressiveLayout?: boolean;
2544
+ sliceLayout?: boolean;
2477
2545
  enableTextSelection?: boolean;
2478
2546
  comments?: boolean | DocxCommentsOptions;
2479
2547
  enableElementSelection?: boolean;
@@ -2486,7 +2554,7 @@ interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>,
2486
2554
  refitOnResize?: boolean;
2487
2555
  background?: string;
2488
2556
  pageShadow?: string | false;
2489
- onVisiblePageChange?: (topIndex: number, total: number) => void;
2557
+ onVisiblePageChange?: (topIndex: number, total: number, layoutComplete: boolean) => void;
2490
2558
  onScaleChange?: (scale: number) => void;
2491
2559
  onHyperlinkClick?: (target: HyperlinkTarget) => void;
2492
2560
  enableHyperlinks?: boolean;
@@ -2497,6 +2565,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
2497
2565
  private get _doc();
2498
2566
  private readonly _borrowed;
2499
2567
  private readonly _opts;
2568
+ private readonly _errorRouter;
2500
2569
  private readonly _container;
2501
2570
  private readonly _wrapper;
2502
2571
  private readonly _scrollHost;
@@ -2511,6 +2580,11 @@ declare class DocxScrollViewer implements ZoomableViewer {
2511
2580
  private _scrollGeometry;
2512
2581
  private _lastRange;
2513
2582
  private _lastTopIndex;
2583
+ private _lastReportedTotal;
2584
+ private _lastReportedLayoutComplete;
2585
+ private _layoutUnsubscribe;
2586
+ private _presentedPageCount;
2587
+ private _pendingLayoutPublication;
2514
2588
  private _scrollListener;
2515
2589
  private _selectionChangeListener;
2516
2590
  private _selectionContextKey;
@@ -2526,8 +2600,10 @@ declare class DocxScrollViewer implements ZoomableViewer {
2526
2600
  private readonly _commentIndexedPages;
2527
2601
  private _commentScanFrontier;
2528
2602
  private _commentNavigationGeneration;
2603
+ private _internalHyperlinkGeneration;
2529
2604
  private _commentAnchorRangesForMargin;
2530
2605
  private _commentAnchorIds;
2606
+ private _reviewOriginPx;
2531
2607
  private _commentGeometryScheduled;
2532
2608
  private _commentGeometryFrame;
2533
2609
  private readonly _pendingCommentGeometry;
@@ -2545,10 +2621,25 @@ declare class DocxScrollViewer implements ZoomableViewer {
2545
2621
  private readonly _pageShadow;
2546
2622
  private readonly _find;
2547
2623
  private _findActive;
2624
+ private _findRequestGeneration;
2625
+ private _showTrackedChanges;
2626
+ private _currentDate;
2627
+ private _layoutViewGeneration;
2628
+ private _layoutViewPublicationGeneration;
2548
2629
  static fromDocument(container: HTMLElement, document: DocxDocument, opts?: Omit<DocxScrollViewerOptions, keyof LoadOptions$2>): Omit<DocxScrollViewer, 'load'>;
2549
2630
  constructor(container: HTMLElement, opts?: DocxScrollViewerOptions);
2550
2631
  load(source: string | ArrayBuffer): Promise<void>;
2551
2632
  get pageCount(): number;
2633
+ get layoutComplete(): boolean;
2634
+ waitUntilLayoutComplete(): Promise<void>;
2635
+ private _bindLayoutDocument;
2636
+ private _unbindLayoutDocument;
2637
+ private _onLayoutPublication;
2638
+ private _onLayoutViewPublication;
2639
+ private _refreshCommentSurface;
2640
+ private _applyLayoutPublication;
2641
+ private _revealPendingLayoutAtPresentedTail;
2642
+ private _revealPendingLayoutThroughPage;
2552
2643
  private _pageWidthPx;
2553
2644
  private _pageHeightPx;
2554
2645
  private _fitWidthPx;
@@ -2574,6 +2665,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
2574
2665
  private _syncSpacerWidth;
2575
2666
  private _onScroll;
2576
2667
  private _mountVisible;
2668
+ private _emitVisiblePageChange;
2577
2669
  private _applyPageShadow;
2578
2670
  private _acquireSlot;
2579
2671
  private _recycleSlot;
@@ -2581,6 +2673,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
2581
2673
  private _dpr;
2582
2674
  private _renderSlot;
2583
2675
  private _hyperlinkHandler;
2676
+ private _navigateInternalHyperlink;
2584
2677
  private _measureForFont;
2585
2678
  private _canvasCssPx;
2586
2679
  private _reportRenderError;
@@ -2594,9 +2687,11 @@ declare class DocxScrollViewer implements ZoomableViewer {
2594
2687
  private _fit;
2595
2688
  private _previewVisible;
2596
2689
  private _previewSlot;
2690
+ private _clearTextLayerPreview;
2597
2691
  private _scheduleSettle;
2598
2692
  private _settleRender;
2599
- private _settleSlot;
2693
+ private _refreshSlotAtomically;
2694
+ setShowTrackedChanges(value: boolean): Promise<void>;
2600
2695
  scrollToPage(index: number, opts?: {
2601
2696
  behavior?: 'auto' | 'smooth';
2602
2697
  }): void;
@@ -2909,7 +3004,7 @@ interface PictureElement {
2909
3004
  sp3d?: Sp3d;
2910
3005
  }
2911
3006
  //#endregion
2912
- //#region dist/.types-work/pptx-CZHOWYdz.d.ts
3007
+ //#region dist/.types-work/pptx-BODJIDql.d.ts
2913
3008
  interface PptxTextRunInfo {
2914
3009
  elementIndex?: number;
2915
3010
  origin?: SlideElementOrigin;
@@ -2926,6 +3021,12 @@ interface PptxTextRunInfo {
2926
3021
  shapeW: number;
2927
3022
  shapeH: number;
2928
3023
  rotation: number;
3024
+ shapeFlipH?: boolean;
3025
+ shapeFlipV?: boolean;
3026
+ tableCell?: Readonly<{
3027
+ row: number;
3028
+ column: number;
3029
+ }>;
2929
3030
  textBodyRotation?: number;
2930
3031
  hyperlink?: HyperlinkTarget;
2931
3032
  }
@@ -3034,6 +3135,10 @@ interface PptxElementBounds {
3034
3135
  type PptxSelectionContext = PptxTextSelectionContext | PptxCommentSelectionContext | PptxElementContext;
3035
3136
  type LoadOptions$1 = LoadOptions$3 & {
3036
3137
  mode?: 'main' | 'worker';
3138
+ progressiveLayout?: boolean;
3139
+ onLayoutProgress?: (progress: Readonly<ProgressiveLayoutProgress>) => void;
3140
+ onLayoutPartial?: (progress: Readonly<ProgressiveLayoutPartial>) => void;
3141
+ onLayoutComplete?: (error?: unknown) => void;
3037
3142
  };
3038
3143
  interface RenderSlideToBitmapOptions {
3039
3144
  width?: number;
@@ -3056,13 +3161,27 @@ declare class PptxPresentation {
3056
3161
  private readonly _worker;
3057
3162
  private readonly _bridge;
3058
3163
  private _mode;
3164
+ private _bootstrap;
3059
3165
  private _preflight;
3166
+ private _availableSlideCount;
3167
+ private readonly _layoutLifecycle;
3168
+ private readonly _layoutObservers;
3169
+ private _layoutCompletion;
3170
+ private _parseRequestId;
3171
+ private _progressive;
3172
+ private _progressiveWatchdog;
3173
+ private _progressiveWatchdogMs;
3174
+ private readonly _layoutWaiters;
3060
3175
  private _slides;
3061
3176
  private _slidePullClient;
3062
3177
  private _resourceFailure;
3063
3178
  private _slidePartIndex;
3064
3179
  private readonly _rawParts;
3065
3180
  private _googleFontFaces;
3181
+ private _embeddedFontFaces;
3182
+ private _embeddedFontAliases;
3183
+ private _embeddedFontAuthoredFamilies;
3184
+ private _destroyed;
3066
3185
  private readonly _fetchImage;
3067
3186
  private readonly _fetchMedia;
3068
3187
  private _math;
@@ -3074,7 +3193,22 @@ declare class PptxPresentation {
3074
3193
  private _rethrowWithResourceFailure;
3075
3194
  static load(source: string | ArrayBuffer, opts?: LoadOptions$1): Promise<PptxPresentation>;
3076
3195
  private _parse;
3196
+ private _parseMainProgressively;
3197
+ private _parseWorkerProgressively;
3198
+ private _createSlidePullClient;
3199
+ private _onWorkerLayoutPush;
3200
+ private _applyProgressivePrefix;
3201
+ private _finishProgressiveLayout;
3202
+ private _failProgressiveLayout;
3203
+ private _wakeLayoutWaiters;
3204
+ private _rearmProgressiveWatchdog;
3205
+ private _clearProgressiveWatchdog;
3206
+ private _waitForSlide;
3207
+ private _assertSlideIndex;
3077
3208
  get slideCount(): number;
3209
+ get availableSlideCount(): number;
3210
+ get layoutComplete(): boolean;
3211
+ waitUntilLayoutComplete(): Promise<void>;
3078
3212
  get slideWidth(): number;
3079
3213
  get slideHeight(): number;
3080
3214
  get mode(): 'main' | 'worker';
@@ -3093,6 +3227,7 @@ declare class PptxPresentation {
3093
3227
  getMedia(mediaPath: string): Promise<Blob>;
3094
3228
  private _findMimeTypeForPath;
3095
3229
  getImage(imagePath: string, mimeType: string): Promise<Blob>;
3230
+ private getFontBytes;
3096
3231
  getResourceMetrics(): Promise<OoxmlResourceMetrics>;
3097
3232
  toMarkdown(): Promise<string>;
3098
3233
  presentSlide(canvas: HTMLCanvasElement, slideIndex: number, opts?: PresentSlideOptions): Promise<PresentationHandle>;
@@ -3100,7 +3235,7 @@ declare class PptxPresentation {
3100
3235
  }
3101
3236
  type HiddenSlideMode = 'show' | 'skip' | 'dim';
3102
3237
  interface PptxViewerOptions extends Pick<RenderOptions, 'width' | 'dpr'>, LoadOptions$1 {
3103
- onSlideChange?: (index: number, total: number) => void;
3238
+ onSlideChange?: (index: number, total: number, layoutComplete: boolean) => void;
3104
3239
  onError?: (err: Error) => void;
3105
3240
  zoomMin?: number;
3106
3241
  zoomMax?: number;
@@ -3126,6 +3261,7 @@ declare class PptxViewer implements ZoomableViewer {
3126
3261
  private highlightLayer;
3127
3262
  private elementLayer;
3128
3263
  private _find;
3264
+ private _findGeneration;
3129
3265
  private _measureCtx;
3130
3266
  private readonly presentationOwner;
3131
3267
  private get engine();
@@ -3133,6 +3269,7 @@ declare class PptxViewer implements ZoomableViewer {
3133
3269
  private readonly hostWindow;
3134
3270
  private readonly opts;
3135
3271
  private currentSlide;
3272
+ private _renderedSlide;
3136
3273
  private _hiddenMode;
3137
3274
  private handle;
3138
3275
  private readonly _mode;
@@ -3146,10 +3283,21 @@ declare class PptxViewer implements ZoomableViewer {
3146
3283
  private elementContext;
3147
3284
  private elementHitGeneration;
3148
3285
  private readonly elementHitTolerance;
3286
+ private readonly _loadingLayer;
3287
+ private _layoutUnsubscribe;
3288
+ private readonly _layoutWaiters;
3289
+ private _layoutFailed;
3290
+ private _navigationGeneration;
3291
+ private _renderProgressGeneration;
3292
+ private _lastReportedSlide;
3293
+ private _lastReportedTotal;
3294
+ private _lastReportedAvailable;
3295
+ private _lastReportedLayoutComplete;
3149
3296
  static fromPresentation(canvas: HTMLCanvasElement, presentation: PptxPresentation, opts?: Omit<PptxViewerOptions, keyof LoadOptions$1>): Omit<PptxViewer, 'load'>;
3150
3297
  constructor(canvas: HTMLCanvasElement, opts?: PptxViewerOptions);
3151
3298
  load(source: string | ArrayBuffer): Promise<void>;
3152
3299
  goToSlide(index: number): Promise<void>;
3300
+ private _goToSlide;
3153
3301
  nextSlide(): Promise<void>;
3154
3302
  prevSlide(): Promise<void>;
3155
3303
  private _step;
@@ -3160,6 +3308,9 @@ declare class PptxViewer implements ZoomableViewer {
3160
3308
  get visibleSlideCount(): number;
3161
3309
  get slideIndex(): number;
3162
3310
  get slideCount(): number;
3311
+ get availableSlideCount(): number;
3312
+ get layoutComplete(): boolean;
3313
+ waitUntilLayoutComplete(): Promise<void>;
3163
3314
  getNotes(slideIndex: number): string | null;
3164
3315
  get canvasElement(): HTMLCanvasElement;
3165
3316
  private _naturalWidthPx;
@@ -3174,6 +3325,14 @@ declare class PptxViewer implements ZoomableViewer {
3174
3325
  fitPage(): Promise<void>;
3175
3326
  private _fit;
3176
3327
  private renderCurrentSlide;
3328
+ private _bindLayoutPresentation;
3329
+ private _unbindLayoutPresentation;
3330
+ private _beginNavigation;
3331
+ private _onLayoutPublication;
3332
+ private _waitForSlide;
3333
+ private _wakeLayoutWaiters;
3334
+ private _emitSlideChange;
3335
+ private _setLoading;
3177
3336
  private _buildHighlightLayer;
3178
3337
  private _measureForFont;
3179
3338
  private _collectSlideRuns;
@@ -3181,6 +3340,7 @@ declare class PptxViewer implements ZoomableViewer {
3181
3340
  findNext(): Promise<FindMatch<PptxMatchLocation> | null>;
3182
3341
  findPrev(): Promise<FindMatch<PptxMatchLocation> | null>;
3183
3342
  clearFind(): void;
3343
+ private _invalidateFind;
3184
3344
  private _activateMatch;
3185
3345
  private _redrawHighlights;
3186
3346
  private _buildTextLayer;
@@ -3228,7 +3388,7 @@ interface PptxScrollViewerOptions extends Pick<RenderSlideOptions, 'width' | 'dp
3228
3388
  refitOnResize?: boolean;
3229
3389
  background?: string;
3230
3390
  pageShadow?: string | false;
3231
- onVisibleSlideChange?: (topIndex: number, total: number) => void;
3391
+ onVisibleSlideChange?: (topIndex: number, total: number, layoutComplete: boolean) => void;
3232
3392
  onScaleChange?: (scale: number) => void;
3233
3393
  onError?: (err: Error) => void;
3234
3394
  onHyperlinkClick?: (target: HyperlinkTarget) => void;
@@ -3239,6 +3399,7 @@ declare class PptxScrollViewer implements ZoomableViewer {
3239
3399
  private get _pres();
3240
3400
  private readonly _borrowed;
3241
3401
  private readonly _opts;
3402
+ private readonly _errorRouter;
3242
3403
  private readonly _container;
3243
3404
  private readonly _wrapper;
3244
3405
  private readonly _scrollHost;
@@ -3252,6 +3413,9 @@ declare class PptxScrollViewer implements ZoomableViewer {
3252
3413
  private _uniformSlideHeight;
3253
3414
  private _lastRange;
3254
3415
  private _lastTopIndex;
3416
+ private _lastReportedTotal;
3417
+ private _lastReportedLayoutComplete;
3418
+ private _layoutUnsubscribe;
3255
3419
  private _scrollListener;
3256
3420
  private _selectionChangeListener;
3257
3421
  private _selectionContextKey;
@@ -3267,6 +3431,10 @@ declare class PptxScrollViewer implements ZoomableViewer {
3267
3431
  private _commentGeometryFrame;
3268
3432
  private readonly _pendingCommentGeometry;
3269
3433
  private _hasComments;
3434
+ private _reviewOriginPx;
3435
+ private _commentScanFrontier;
3436
+ private readonly _layoutWaiters;
3437
+ private _layoutFailed;
3270
3438
  private _elementHitGeneration;
3271
3439
  private readonly _elementHitTolerance;
3272
3440
  private _destroyed;
@@ -3280,12 +3448,16 @@ declare class PptxScrollViewer implements ZoomableViewer {
3280
3448
  private _lastFitWidth;
3281
3449
  private readonly _pageShadow;
3282
3450
  private readonly _find;
3451
+ private _findGeneration;
3283
3452
  private _findActive;
3284
3453
  private _findMeasureCtx;
3285
3454
  static fromPresentation(container: HTMLElement, presentation: PptxPresentation, opts?: Omit<PptxScrollViewerOptions, keyof LoadOptions$1>): Omit<PptxScrollViewer, 'load'>;
3286
3455
  constructor(container: HTMLElement, opts?: PptxScrollViewerOptions);
3287
3456
  load(source: string | ArrayBuffer): Promise<void>;
3288
3457
  get slideCount(): number;
3458
+ get availableSlideCount(): number;
3459
+ get layoutComplete(): boolean;
3460
+ waitUntilLayoutComplete(): Promise<void>;
3289
3461
  private _slideWidthPx;
3290
3462
  private _slideHeightPx;
3291
3463
  private _fitWidthPx;
@@ -3296,7 +3468,8 @@ declare class PptxScrollViewer implements ZoomableViewer {
3296
3468
  private _commentsOptions;
3297
3469
  private _commentSide;
3298
3470
  private _syncCommentMarginGeometry;
3299
- private _presentationHasComments;
3471
+ private _scanAvailableComments;
3472
+ private _refreshDiscoveredComments;
3300
3473
  private _baseScale;
3301
3474
  relayout(): void;
3302
3475
  private _relayout;
@@ -3322,6 +3495,14 @@ declare class PptxScrollViewer implements ZoomableViewer {
3322
3495
  private _positionSlot;
3323
3496
  private _dpr;
3324
3497
  private _renderSlot;
3498
+ private _trackSlotLoading;
3499
+ private _bindLayoutPresentation;
3500
+ private _unbindLayoutPresentation;
3501
+ private _onLayoutPublication;
3502
+ private _wakeLayoutWaiters;
3503
+ private _beginCommentNavigation;
3504
+ private _waitForSlideMetadata;
3505
+ private _emitVisibleSlideChange;
3325
3506
  private _renderInteractiveSlot;
3326
3507
  private _syncMediaPlayback;
3327
3508
  private _reportRenderError;
@@ -3351,6 +3532,7 @@ declare class PptxScrollViewer implements ZoomableViewer {
3351
3532
  findNext(): Promise<FindMatch<PptxMatchLocation> | null>;
3352
3533
  findPrev(): Promise<FindMatch<PptxMatchLocation> | null>;
3353
3534
  clearFind(): void;
3535
+ private _invalidateFind;
3354
3536
  private _activateMatch;
3355
3537
  private _collectSlideRuns;
3356
3538
  private _redrawHighlights;
@@ -4143,7 +4325,7 @@ interface XlsxRenderViewportOptions {
4143
4325
  } | null;
4144
4326
  }
4145
4327
  //#endregion
4146
- //#region dist/.types-work/xlsx-_-beyOtw.d.ts
4328
+ //#region dist/.types-work/xlsx-BjLUPERo.d.ts
4147
4329
  type ResolvedList = {
4148
4330
  kind: 'values';
4149
4331
  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[];