@silurus/ooxml 0.76.2 → 0.77.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.
@@ -1,4 +1,4 @@
1
- //#region dist/.types-work/hyperlink-BnJnsq2_.d.ts
1
+ //#region dist/.types-work/hyperlink-BqgLAFOG.d.ts
2
2
  type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
3
3
  interface MathRun {
4
4
  kind: 'run';
@@ -219,7 +219,7 @@ interface Stroke {
219
219
  fillType: 'none';
220
220
  }>;
221
221
  dashStyle?: string;
222
- lineCap?: CanvasLineCap;
222
+ lineCap?: 'butt' | 'round' | 'square';
223
223
  headEnd?: ArrowEnd;
224
224
  tailEnd?: ArrowEnd;
225
225
  cmpd?: string;
@@ -693,11 +693,16 @@ interface Slide {
693
693
  partName?: string;
694
694
  background: Fill | null;
695
695
  elements: SlideElement[];
696
+ elementSources?: SlideElementSource[];
696
697
  notes?: string;
697
698
  comments?: PptxComment[];
698
699
  hidden?: boolean;
699
700
  parseError?: string;
700
701
  }
702
+ type SlideElementOrigin = 'master' | 'layout' | 'slide';
703
+ interface SlideElementSource {
704
+ origin: SlideElementOrigin;
705
+ }
701
706
  interface PptxComment {
702
707
  author?: string;
703
708
  date?: string;
@@ -879,11 +884,17 @@ interface OoxmlNodeSessionOptions {
879
884
  onResourceMetrics?: (metrics: OoxmlResourceMetrics) => void;
880
885
  signal?: AbortSignal;
881
886
  }
887
+ interface NodeTextMetricsLike {
888
+ readonly width: number;
889
+ }
890
+ interface NodeCanvasContext2D {
891
+ measureText(text: string): NodeTextMetricsLike;
892
+ }
882
893
  interface NodeCanvasLike {
883
894
  width: number;
884
895
  height: number;
885
- getContext(kind: '2d'): CanvasRenderingContext2D;
886
- toBuffer?(format?: string): Buffer | Promise<Buffer>;
896
+ getContext(kind: '2d'): NodeCanvasContext2D;
897
+ toBuffer?(format?: string): Uint8Array | Promise<Uint8Array>;
887
898
  }
888
899
  interface NodeImageLike {
889
900
  width: number;
@@ -891,7 +902,7 @@ interface NodeImageLike {
891
902
  }
892
903
  interface NodeCanvasFactory {
893
904
  createCanvas(width: number, height: number): NodeCanvasLike;
894
- loadImage(buffer: ArrayBuffer | Uint8Array | Buffer): Promise<NodeImageLike>;
905
+ loadImage(buffer: ArrayBuffer | Uint8Array): Promise<NodeImageLike>;
895
906
  }
896
907
  declare function installOffscreenCanvasShim(factory: NodeCanvasFactory): () => void;
897
908
  declare function installImageBitmapShim(factory: NodeCanvasFactory): () => void;
@@ -919,8 +930,8 @@ interface PptxPresentationSession extends AsyncIterable<Slide> {
919
930
  slides(): AsyncGenerator<Slide, void, void>;
920
931
  close(): Promise<void>;
921
932
  }
922
- declare function openPptxPresentation(buffer: ArrayBuffer | Uint8Array | Buffer, options?: OpenPptxPresentationOptions): Promise<PptxPresentationSession>;
923
- declare function materializePptxPresentation(buffer: ArrayBuffer | Uint8Array | Buffer, options?: OpenPptxPresentationOptions): Promise<Presentation>;
933
+ declare function openPptxPresentation(buffer: ArrayBuffer | Uint8Array, options?: OpenPptxPresentationOptions): Promise<PptxPresentationSession>;
934
+ declare function materializePptxPresentation(buffer: ArrayBuffer | Uint8Array, options?: OpenPptxPresentationOptions): Promise<Presentation>;
924
935
  interface DocxDocumentModel {
925
936
  section: SectionProps;
926
937
  body: BodyElement[];
@@ -1276,7 +1287,7 @@ interface ShapeRun {
1276
1287
  stroke: string | null;
1277
1288
  strokeWidth?: number;
1278
1289
  strokeDash?: string | null;
1279
- strokeCap?: CanvasLineCap | null;
1290
+ strokeCap?: 'butt' | 'round' | 'square' | null;
1280
1291
  headEnd?: LineEnd | null;
1281
1292
  tailEnd?: LineEnd | null;
1282
1293
  rotation?: number;
@@ -1572,6 +1583,11 @@ interface CellBorders {
1572
1583
  insideV: BorderSpec | null;
1573
1584
  }
1574
1585
  interface DocxTextRunInfo {
1586
+ source?: Readonly<{
1587
+ story: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textbox';
1588
+ storyInstance: string;
1589
+ path: readonly number[];
1590
+ }>;
1575
1591
  paragraphId?: string;
1576
1592
  text: string;
1577
1593
  x: number;
@@ -1593,7 +1609,6 @@ interface DocxPageRenderOptions {
1593
1609
  width?: number;
1594
1610
  dpr?: number;
1595
1611
  defaultTextColor?: string;
1596
- showTrackChanges?: boolean;
1597
1612
  onTextRun?: (run: DocxTextRunInfo) => void;
1598
1613
  }
1599
1614
  interface DocxRenderedPage {
@@ -1613,8 +1628,8 @@ interface DocxDocumentSession extends AsyncIterable<DocxRenderedPage> {
1613
1628
  pages(options?: DocxPageRenderOptions): AsyncGenerator<DocxRenderedPage, void, void>;
1614
1629
  close(): Promise<void>;
1615
1630
  }
1616
- declare function openDocxDocument(buffer: ArrayBuffer | Uint8Array | Buffer, options: OpenDocxDocumentOptions): Promise<DocxDocumentSession>;
1617
- declare function materializeDocxDocument(buffer: ArrayBuffer | Uint8Array | Buffer, options?: OoxmlNodeSessionOptions): Promise<DocxDocumentModel>;
1631
+ declare function openDocxDocument(buffer: ArrayBuffer | Uint8Array, options: OpenDocxDocumentOptions): Promise<DocxDocumentSession>;
1632
+ declare function materializeDocxDocument(buffer: ArrayBuffer | Uint8Array, options?: OoxmlNodeSessionOptions): Promise<DocxDocumentModel>;
1618
1633
  interface Workbook {
1619
1634
  sheets: SheetMeta[];
1620
1635
  date1904?: boolean;
@@ -1655,7 +1670,7 @@ interface Worksheet {
1655
1670
  rightToLeft?: boolean;
1656
1671
  outlinePr?: OutlinePr;
1657
1672
  tabColor?: string | null;
1658
- autoFilter?: CellRange | null;
1673
+ autoFilter?: WorksheetCellRange | null;
1659
1674
  hyperlinks?: Hyperlink[];
1660
1675
  commentRefs?: string[];
1661
1676
  comments?: XlsxComment[];
@@ -1686,7 +1701,7 @@ interface PivotTableMetadata {
1686
1701
  status: PivotMetadataStatus;
1687
1702
  extensionUris?: string[];
1688
1703
  }
1689
- interface PivotLocation extends CellRange {
1704
+ interface PivotLocation extends WorksheetCellRange {
1690
1705
  firstHeaderRow: number;
1691
1706
  firstDataRow: number;
1692
1707
  firstDataCol: number;
@@ -1829,7 +1844,7 @@ interface SlicerElementStyle {
1829
1844
  borderColor?: string;
1830
1845
  }
1831
1846
  interface TableInfo {
1832
- range: CellRange;
1847
+ range: WorksheetCellRange;
1833
1848
  styleName: string;
1834
1849
  headerRowCount: number;
1835
1850
  totalsRowCount: number;
@@ -2038,7 +2053,7 @@ interface ImageAnchor {
2038
2053
  alpha?: number;
2039
2054
  duotone?: Duotone;
2040
2055
  }
2041
- interface CellRange {
2056
+ interface WorksheetCellRange {
2042
2057
  top: number;
2043
2058
  left: number;
2044
2059
  bottom: number;
@@ -2052,7 +2067,7 @@ interface Hyperlink {
2052
2067
  display?: string | null;
2053
2068
  }
2054
2069
  interface ConditionalFormat {
2055
- sqref: CellRange[];
2070
+ sqref: WorksheetCellRange[];
2056
2071
  rules: CfRule[];
2057
2072
  }
2058
2073
  type CfRule = {
@@ -2298,9 +2313,9 @@ interface XlsxWorkbookSession {
2298
2313
  worksheetRows(sheetIndex: number): AsyncGenerator<XlsxWorksheetRowChunk, void, void>;
2299
2314
  close(): Promise<void>;
2300
2315
  }
2301
- declare function openXlsxWorkbook(buffer: ArrayBuffer | Uint8Array | Buffer, options?: OpenXlsxWorkbookOptions): Promise<XlsxWorkbookSession>;
2302
- declare function materializeXlsxWorkbookIndex(buffer: ArrayBuffer | Uint8Array | Buffer, options?: OpenXlsxWorkbookOptions): Promise<ParsedWorkbook>;
2303
- declare function materializeXlsxWorksheet(buffer: ArrayBuffer | Uint8Array | Buffer, sheetIndex: number, options?: OpenXlsxWorkbookOptions): Promise<Worksheet>;
2304
- declare function materializeXlsxWorkbook(buffer: ArrayBuffer | Uint8Array | Buffer, options?: OpenXlsxWorkbookOptions): Promise<MaterializedXlsxWorkbook>;
2316
+ declare function openXlsxWorkbook(buffer: ArrayBuffer | Uint8Array, options?: OpenXlsxWorkbookOptions): Promise<XlsxWorkbookSession>;
2317
+ declare function materializeXlsxWorkbookIndex(buffer: ArrayBuffer | Uint8Array, options?: OpenXlsxWorkbookOptions): Promise<ParsedWorkbook>;
2318
+ declare function materializeXlsxWorksheet(buffer: ArrayBuffer | Uint8Array, sheetIndex: number, options?: OpenXlsxWorkbookOptions): Promise<Worksheet>;
2319
+ declare function materializeXlsxWorkbook(buffer: ArrayBuffer | Uint8Array, options?: OpenXlsxWorkbookOptions): Promise<MaterializedXlsxWorkbook>;
2305
2320
  //#endregion
2306
2321
  export { type DeepReadonly, type DocxDocumentSession, type DocxPageRenderOptions, type DocxRenderedPage, type MaterializedXlsxWorkbook, type NodeCanvasFactory, type NodeCanvasLike, type NodeImageLike, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, type OoxmlNodeSessionOptions, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OpenDocxDocumentOptions, type OpenPptxPresentationOptions, type OpenXlsxWorkbookOptions, type PptxPresentationSession, type PptxSessionRenderOptions, type ReadonlyParsedWorkbook, type XlsxWorkbookSession, type XlsxWorksheetRowChunk, installImageBitmapShim, installOffscreenCanvasShim, isOoxmlDecodedImageLimitError, materializeDocxDocument, materializePptxPresentation, materializeXlsxWorkbook, materializeXlsxWorkbookIndex, materializeXlsxWorksheet, openDocxDocument, openPptxPresentation, openXlsxWorkbook, renderSlideNode };
@@ -10,7 +10,7 @@ interface MathRenderer {
10
10
  mathMLToSvg(mathml: string): Promise<MathSvg>;
11
11
  }
12
12
  //#endregion
13
- //#region dist/.types-work/hyperlink-BnJnsq2_.d.ts
13
+ //#region dist/.types-work/hyperlink-BqgLAFOG.d.ts
14
14
  type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
15
15
  interface MathRun {
16
16
  kind: 'run';
@@ -231,7 +231,7 @@ interface Stroke {
231
231
  fillType: 'none';
232
232
  }>;
233
233
  dashStyle?: string;
234
- lineCap?: CanvasLineCap;
234
+ lineCap?: 'butt' | 'round' | 'square';
235
235
  headEnd?: ArrowEnd;
236
236
  tailEnd?: ArrowEnd;
237
237
  cmpd?: string;
@@ -602,9 +602,14 @@ interface LegendManualLayout {
602
602
  w: number;
603
603
  h: number;
604
604
  }
605
+ interface ChartRect {
606
+ x: number;
607
+ y: number;
608
+ w: number;
609
+ h: number;
610
+ }
605
611
  type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
606
612
  type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
607
- type OoxmlErrorSource = 'container' | 'zip-part' | 'parser' | 'serializer' | 'layout' | 'renderer' | 'worker';
608
613
  declare class OoxmlError extends Error {
609
614
  readonly code: OoxmlErrorCode;
610
615
  constructor(code: OoxmlErrorCode, message: string);
@@ -705,7 +710,15 @@ type HyperlinkTarget = {
705
710
  };
706
711
  declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
707
712
  //#endregion
708
- //#region dist/.types-work/find-highlight-DkZhNxUb.d.ts
713
+ //#region dist/.types-work/find-highlight-DcNlrW8O.d.ts
714
+ interface TextSelectionContextOptions {
715
+ readonly maxTextCharacters?: number;
716
+ readonly maxRunLocators?: number;
717
+ }
718
+ interface ViewerContextMenuEvent<TContext> {
719
+ readonly originalEvent: MouseEvent;
720
+ getContext(): Promise<TContext | null>;
721
+ }
709
722
  interface AutoResizeOptions {
710
723
  pauseWhenHidden?: boolean;
711
724
  }
@@ -736,7 +749,7 @@ interface FindHighlightColors {
736
749
  active?: string;
737
750
  }
738
751
  //#endregion
739
- //#region dist/.types-work/pptx-CDgwsXLm.d.ts
752
+ //#region dist/.types-work/pptx-DcrJjm1-.d.ts
740
753
  interface BlipBullet {
741
754
  type: 'blip';
742
755
  imagePath: string;
@@ -773,11 +786,16 @@ interface Slide {
773
786
  partName?: string;
774
787
  background: Fill | null;
775
788
  elements: SlideElement[];
789
+ elementSources?: SlideElementSource[];
776
790
  notes?: string;
777
791
  comments?: PptxComment[];
778
792
  hidden?: boolean;
779
793
  parseError?: string;
780
794
  }
795
+ type SlideElementOrigin = 'master' | 'layout' | 'slide';
796
+ interface SlideElementSource {
797
+ origin: SlideElementOrigin;
798
+ }
781
799
  interface DimOptions {
782
800
  color: string;
783
801
  opacity: number;
@@ -957,6 +975,8 @@ interface PictureElement {
957
975
  sp3d?: Sp3d;
958
976
  }
959
977
  interface PptxTextRunInfo {
978
+ elementIndex?: number;
979
+ origin?: SlideElementOrigin;
960
980
  shapeId?: string;
961
981
  text: string;
962
982
  inShapeX: number;
@@ -987,6 +1007,68 @@ interface PresentationHandle {
987
1007
  pause(mediaPath?: string): void;
988
1008
  destroy(): void;
989
1009
  }
1010
+ interface PptxSelectionRunLocator {
1011
+ readonly slideIndex: number;
1012
+ readonly runIndex: number;
1013
+ readonly shapeId?: string;
1014
+ readonly elementIndex?: number;
1015
+ readonly origin?: SlideElementOrigin;
1016
+ }
1017
+ interface PptxTextSelectionContext {
1018
+ readonly format: 'pptx';
1019
+ readonly kind: 'text';
1020
+ readonly text: string;
1021
+ readonly slideIndexes: readonly number[];
1022
+ readonly shapeIds: readonly string[];
1023
+ readonly runs: readonly PptxSelectionRunLocator[];
1024
+ readonly truncated: boolean;
1025
+ readonly truncationReasons: readonly ('text' | 'runs')[];
1026
+ readonly textCharacters: number;
1027
+ readonly maxTextCharacters: number;
1028
+ readonly maxRunLocators: number;
1029
+ }
1030
+ declare function readPptxTextSelectionContext(root: HTMLElement, selection: Selection | null, options?: TextSelectionContextOptions): PptxTextSelectionContext | null;
1031
+ type PptxSelectionContextOptions = TextSelectionContextOptions;
1032
+ interface PptxSlidePoint {
1033
+ readonly x: number;
1034
+ readonly y: number;
1035
+ }
1036
+ interface PptxElementContextOptions {
1037
+ readonly tolerance?: number;
1038
+ readonly maxTextCharacters?: number;
1039
+ }
1040
+ interface PptxElementContext {
1041
+ readonly format: 'pptx';
1042
+ readonly kind: 'element';
1043
+ readonly slideIndex: number;
1044
+ readonly elementIndex: number;
1045
+ readonly origin: SlideElementOrigin | 'unknown';
1046
+ readonly elementType: SlideElement['type'];
1047
+ readonly point: PptxSlidePoint;
1048
+ readonly bounds: Readonly<{
1049
+ x: number;
1050
+ y: number;
1051
+ width: number;
1052
+ height: number;
1053
+ rotation: number;
1054
+ flipH: boolean;
1055
+ flipV: boolean;
1056
+ }>;
1057
+ readonly shapeId?: string;
1058
+ readonly name?: string;
1059
+ readonly geometry?: string;
1060
+ readonly text?: string;
1061
+ readonly mimeType?: string;
1062
+ readonly mediaKind?: 'audio' | 'video';
1063
+ readonly rowCount?: number;
1064
+ readonly columnCount?: number;
1065
+ readonly seriesCount?: number;
1066
+ readonly truncated: boolean;
1067
+ readonly truncationReasons: readonly ('text')[];
1068
+ readonly textCharacters: number;
1069
+ readonly maxTextCharacters: number;
1070
+ }
1071
+ type PptxSelectionContext = PptxTextSelectionContext | PptxElementContext;
990
1072
  type LoadOptions = LoadOptions$1 & {
991
1073
  mode?: 'main' | 'worker';
992
1074
  };
@@ -1002,6 +1084,8 @@ interface RenderSlideOptions {
1002
1084
  onTextRun?: TextRunCallback;
1003
1085
  skipMediaControls?: boolean;
1004
1086
  dim?: DimOptions;
1087
+ }
1088
+ interface PresentSlideOptions extends Omit<RenderSlideOptions, 'skipMediaControls'> {
1005
1089
  onError?: (error: Error) => void;
1006
1090
  }
1007
1091
  declare class PptxPresentation {
@@ -1037,16 +1121,17 @@ declare class PptxPresentation {
1037
1121
  renderSlide(canvas: HTMLCanvasElement | OffscreenCanvas, slideIndex: number, opts?: RenderSlideOptions): Promise<void>;
1038
1122
  renderSlideToBitmap(slideIndex: number, opts?: RenderSlideToBitmapOptions): Promise<ImageBitmap>;
1039
1123
  collectSlideRuns(slideIndex: number, width?: number): Promise<PptxTextRunInfo[]>;
1124
+ getElementContextAt(slideIndex: number, point: PptxSlidePoint, options?: PptxElementContextOptions): Promise<PptxElementContext | null>;
1040
1125
  getMedia(mediaPath: string): Promise<Blob>;
1041
1126
  private _findMimeTypeForPath;
1042
1127
  getImage(imagePath: string, mimeType: string): Promise<Blob>;
1043
1128
  getResourceMetrics(): Promise<OoxmlResourceMetrics>;
1044
1129
  toMarkdown(): Promise<string>;
1045
- presentSlide(canvas: HTMLCanvasElement, slideIndex: number, opts?: RenderSlideOptions): Promise<PresentationHandle>;
1130
+ presentSlide(canvas: HTMLCanvasElement, slideIndex: number, opts?: PresentSlideOptions): Promise<PresentationHandle>;
1046
1131
  destroy(): void;
1047
1132
  }
1048
1133
  type HiddenSlideMode = 'show' | 'skip' | 'dim';
1049
- interface PptxViewerOptions extends RenderOptions, LoadOptions {
1134
+ interface PptxViewerOptions extends Pick<RenderOptions, 'width' | 'dpr'>, LoadOptions {
1050
1135
  onSlideChange?: (index: number, total: number) => void;
1051
1136
  onError?: (err: Error) => void;
1052
1137
  zoomMin?: number;
@@ -1054,6 +1139,10 @@ interface PptxViewerOptions extends RenderOptions, LoadOptions {
1054
1139
  onScaleChange?: (scale: number) => void;
1055
1140
  enableMediaPlayback?: boolean;
1056
1141
  enableTextSelection?: boolean;
1142
+ enableElementSelection?: boolean;
1143
+ elementHitTolerance?: number;
1144
+ onSelectionContextChange?: (context: PptxSelectionContext | null) => void;
1145
+ onContextMenu?: (event: ViewerContextMenuEvent<PptxSelectionContext>) => void;
1057
1146
  findHighlightColors?: FindHighlightColors;
1058
1147
  hiddenSlideMode?: HiddenSlideMode;
1059
1148
  hiddenSlideDim?: Partial<DimOptions>;
@@ -1067,6 +1156,7 @@ declare class PptxViewer implements ZoomableViewer {
1067
1156
  private _scale;
1068
1157
  private textLayer;
1069
1158
  private highlightLayer;
1159
+ private elementLayer;
1070
1160
  private _find;
1071
1161
  private _measureCtx;
1072
1162
  private readonly presentationOwner;
@@ -1081,6 +1171,13 @@ declare class PptxViewer implements ZoomableViewer {
1081
1171
  private readonly renderDispatcher;
1082
1172
  private readonly errorRouter;
1083
1173
  private destroyed;
1174
+ private selectionChangeListener;
1175
+ private selectionContextKey;
1176
+ private elementClickListener;
1177
+ private contextMenuListener;
1178
+ private elementContext;
1179
+ private elementHitGeneration;
1180
+ private readonly elementHitTolerance;
1084
1181
  static fromPresentation(canvas: HTMLCanvasElement, presentation: PptxPresentation, opts?: Omit<PptxViewerOptions, keyof LoadOptions>): Omit<PptxViewer, 'load'>;
1085
1182
  constructor(canvas: HTMLCanvasElement, opts?: PptxViewerOptions);
1086
1183
  load(source: string | ArrayBuffer): Promise<void>;
@@ -1124,9 +1221,17 @@ declare class PptxViewer implements ZoomableViewer {
1124
1221
  private _resolveInternalSlideIndex;
1125
1222
  private _reportRenderError;
1126
1223
  getResourceMetrics(): Promise<OoxmlResourceMetrics>;
1224
+ getSelectionContext(options?: PptxSelectionContextOptions): PptxSelectionContext | null;
1225
+ private _emitSelectionContextChange;
1226
+ private _setElementContext;
1227
+ private _invalidateElementSelection;
1228
+ private _redrawElementOutline;
1229
+ private _onElementClick;
1230
+ private _onContextMenu;
1231
+ private _resolveContextAt;
1127
1232
  destroy(): void;
1128
1233
  }
1129
- interface PptxScrollViewerOptions extends Omit<RenderSlideOptions, 'onTextRun'>, LoadOptions {
1234
+ interface PptxScrollViewerOptions extends Pick<RenderSlideOptions, 'width' | 'dpr'>, LoadOptions {
1130
1235
  width?: number;
1131
1236
  gap?: number;
1132
1237
  paddingTop?: number;
@@ -1135,6 +1240,10 @@ interface PptxScrollViewerOptions extends Omit<RenderSlideOptions, 'onTextRun'>,
1135
1240
  paddingRight?: number;
1136
1241
  overscan?: number;
1137
1242
  enableTextSelection?: boolean;
1243
+ enableElementSelection?: boolean;
1244
+ elementHitTolerance?: number;
1245
+ onSelectionContextChange?: (context: PptxSelectionContext | null) => void;
1246
+ onContextMenu?: (event: ViewerContextMenuEvent<PptxSelectionContext>) => void;
1138
1247
  findHighlightColors?: FindHighlightColors;
1139
1248
  enableMediaPlayback?: boolean;
1140
1249
  mediaOverscan?: number;
@@ -1169,6 +1278,13 @@ declare class PptxScrollViewer implements ZoomableViewer {
1169
1278
  private _lastRange;
1170
1279
  private _lastTopIndex;
1171
1280
  private _scrollListener;
1281
+ private _selectionChangeListener;
1282
+ private _selectionContextKey;
1283
+ private _elementClickListener;
1284
+ private _contextMenuListener;
1285
+ private _elementContext;
1286
+ private _elementHitGeneration;
1287
+ private readonly _elementHitTolerance;
1172
1288
  private _destroyed;
1173
1289
  private readonly _slideInFlight;
1174
1290
  private _renderEpoch;
@@ -1191,6 +1307,7 @@ declare class PptxScrollViewer implements ZoomableViewer {
1191
1307
  private _fitWidthPx;
1192
1308
  private _baseScale;
1193
1309
  relayout(): void;
1310
+ private _relayout;
1194
1311
  private _recomputeHeights;
1195
1312
  private _gap;
1196
1313
  private _overscan;
@@ -1247,9 +1364,18 @@ declare class PptxScrollViewer implements ZoomableViewer {
1247
1364
  private _onResize;
1248
1365
  get topVisibleSlide(): number;
1249
1366
  getResourceMetrics(): Promise<OoxmlResourceMetrics>;
1367
+ getSelectionContext(options?: PptxSelectionContextOptions): PptxSelectionContext | null;
1368
+ private _emitSelectionContextChange;
1369
+ private _setElementContext;
1370
+ private _invalidateElementSelection;
1371
+ private _redrawElementOutlines;
1372
+ private _redrawElementOutlineForSlot;
1373
+ private _onElementClick;
1374
+ private _onContextMenu;
1375
+ private _resolveContextAt;
1250
1376
  destroy(): void;
1251
1377
  }
1252
- declare function buildPptxTextLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], cssWidth: number, cssHeight: number, onHyperlinkClick?: (target: HyperlinkTarget) => void): void;
1378
+ declare function buildPptxTextLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], cssWidth: number, cssHeight: number, onHyperlinkClick?: (target: HyperlinkTarget) => void, slideIndex?: number): void;
1253
1379
  interface PptxHighlightMatch {
1254
1380
  slices: MatchRunSlice[];
1255
1381
  active: boolean;
@@ -1257,4 +1383,4 @@ interface PptxHighlightMatch {
1257
1383
  type PptxHighlightColors = FindHighlightColors;
1258
1384
  declare function buildPptxHighlightLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], matches: PptxHighlightMatch[], cssWidth: number, cssHeight: number, measureForFont: (font: string) => (s: string) => number, colors?: PptxHighlightColors): void;
1259
1385
  //#endregion
1260
- export { type AutoResizeOptions, type Bevel3d, type BlipBullet, type Bullet, type Camera3d, type ChartElement, type ChartModel, type ChartSeries, type DimOptions, type Fill, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type Glow, type GradientFill, type GradientStop, type HiddenSlideMode, type HyperlinkTarget, type ImageFill, type LightRig, type LineBreak, type LoadOptions, type MediaElement, type NoFill, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorSource, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type Paragraph, type PathCmd, type PictureElement, type PptxComment, type PptxHighlightColors, type PptxHighlightMatch, type PptxMatchLocation, PptxPresentation, PptxScrollViewer, type PptxScrollViewerOptions, type PptxTextRunInfo, PptxViewer, type PptxViewerOptions, type Presentation, type PresentationHandle, type Reflection, type RenderOptions, type RenderSlideOptions, type RenderSlideToBitmapOptions, type Rot3d, type Scene3d, type Shadow, type ShapeElement, type Slide, type SlideElement, type SoftEdge, type SolidFill, type Sp3d, type SpaceLine, type Stroke, type TabStop, type TableCell, type TableElement, type TableRow, type TextBody, type TextRect, type TextRun, type TextRunCallback, type TextRunData, type TileInfo, autoResize, buildPptxHighlightLayer, buildPptxTextLayer, isOoxmlDecodedImageLimitError, openExternalHyperlink, renderSlide };
1386
+ export { type ArrowEnd, type AutoResizeOptions, type Bevel3d, type BlipBullet, type Bullet, type Camera3d, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartElement, type ChartErrBars, type ChartLabelBox, type ChartManualLayout, type ChartModel, type ChartRect, type ChartSeries, type ChartSeriesDataLabels, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexSunburst, type ChartexSunburstRow, type DimOptions, type Duotone, type EquationRun, type Fill, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type Glow, type GradientFill, type GradientStop, type HiddenSlideMode, type HyperlinkTarget, type ImageFill, type LegendManualLayout, type LightRig, type LineBreak, type LoadOptions, type MatchRunSlice, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MediaElement, type NoFill, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type Paragraph, type PathCmd, type PatternFill, type PictureElement, type PptxComment, type PptxElementContext, type PptxElementContextOptions, type PptxHighlightColors, type PptxHighlightMatch, type PptxMatchLocation, PptxPresentation, PptxScrollViewer, type PptxScrollViewerOptions, type PptxSelectionContext, type PptxSelectionContextOptions, type PptxSelectionRunLocator, type PptxSlidePoint, type PptxTextRunInfo, type PptxTextSelectionContext, PptxViewer, type PptxViewerOptions, type PresentSlideOptions, type Presentation, type PresentationHandle, type Reflection, type RenderOptions, type RenderSlideOptions, type RenderSlideToBitmapOptions, type Rot3d, type Scene3d, type SecondaryValueAxis, type Shadow, type ShapeElement, type Slide, type SlideElement, type SlideElementOrigin, type SlideElementSource, type SlideRenderOptions, type SoftEdge, type SolidFill, type Sp3d, type SpaceLine, type Stroke, type TabStop, type TableCell, type TableElement, type TableRow, type TextBody, type TextOutline, type TextRect, type TextRun, type TextRunCallback, type TextRunData, type TextSelectionContextOptions, type TileInfo, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildPptxHighlightLayer, buildPptxTextLayer, isOoxmlDecodedImageLimitError, openExternalHyperlink, readPptxTextSelectionContext, renderSlide };