pptx-react-viewer 4.7.0 → 4.8.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 (132) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/dist/{AiChatPanel-3YILWCBX.js → AiChatPanel-4LMJIJUU.js} +28 -28
  3. package/dist/AiChatPanel-4LMJIJUU.js.br +0 -0
  4. package/dist/AiChatPanel-4LMJIJUU.js.gz +0 -0
  5. package/dist/{AiChatPanel-X2MVL5UP.mjs → AiChatPanel-XWYLYN26.mjs} +4 -4
  6. package/dist/AiChatPanel-XWYLYN26.mjs.br +0 -0
  7. package/dist/AiChatPanel-XWYLYN26.mjs.gz +0 -0
  8. package/dist/{Model3DScene-QFWI5CEE.mjs → Model3DScene-N6IZ7Q57.mjs} +1 -1
  9. package/dist/Model3DScene-N6IZ7Q57.mjs.br +0 -0
  10. package/dist/Model3DScene-N6IZ7Q57.mjs.gz +0 -0
  11. package/dist/{Model3DScene-G7P6ZAIO.js → Model3DScene-YAPQ5BCI.js} +2 -2
  12. package/dist/{Model3DScene-G7P6ZAIO.js.br → Model3DScene-YAPQ5BCI.js.br} +0 -0
  13. package/dist/Model3DScene-YAPQ5BCI.js.gz +0 -0
  14. package/dist/{chunk-UBYFLXAU.mjs → chunk-KHEJXP4I.mjs} +8 -8
  15. package/dist/chunk-KHEJXP4I.mjs.br +0 -0
  16. package/dist/chunk-KHEJXP4I.mjs.gz +0 -0
  17. package/dist/{chunk-UIAU3NR2.js → chunk-LTBTG2QB.js} +64 -96
  18. package/dist/chunk-LTBTG2QB.js.br +0 -0
  19. package/dist/chunk-LTBTG2QB.js.gz +0 -0
  20. package/dist/{chunk-QLDHUKH2.mjs → chunk-NPZOVIHG.mjs} +32146 -11875
  21. package/dist/chunk-NPZOVIHG.mjs.br +0 -0
  22. package/dist/chunk-NPZOVIHG.mjs.gz +0 -0
  23. package/dist/{chunk-VF4RA27Q.js → chunk-NV2H57Q4.js} +1156 -1156
  24. package/dist/chunk-NV2H57Q4.js.br +0 -0
  25. package/dist/chunk-NV2H57Q4.js.gz +0 -0
  26. package/dist/{chunk-E5OIDWHO.mjs → chunk-Q4XJSJYI.mjs} +1 -1
  27. package/dist/chunk-Q4XJSJYI.mjs.br +0 -0
  28. package/dist/chunk-Q4XJSJYI.mjs.gz +0 -0
  29. package/dist/{chunk-SR7ETIBF.js → chunk-Q7NWWIPQ.js} +819 -818
  30. package/dist/chunk-Q7NWWIPQ.js.br +0 -0
  31. package/dist/chunk-Q7NWWIPQ.js.gz +0 -0
  32. package/dist/{chunk-FYAOOACZ.js → chunk-SAYZSUNQ.js} +263 -249
  33. package/dist/chunk-SAYZSUNQ.js.br +0 -0
  34. package/dist/chunk-SAYZSUNQ.js.gz +0 -0
  35. package/dist/{chunk-OECUSL2B.mjs → chunk-SOMUGI3Y.mjs} +8 -7
  36. package/dist/chunk-SOMUGI3Y.mjs.br +0 -0
  37. package/dist/chunk-SOMUGI3Y.mjs.gz +0 -0
  38. package/dist/{chunk-5J6NW3YS.mjs → chunk-SSXGPYBF.mjs} +56 -42
  39. package/dist/chunk-SSXGPYBF.mjs.br +0 -0
  40. package/dist/chunk-SSXGPYBF.mjs.gz +0 -0
  41. package/dist/{chunk-2BM4GBFZ.js → chunk-UTP22QYH.js} +5 -5
  42. package/dist/chunk-UTP22QYH.js.br +0 -0
  43. package/dist/chunk-UTP22QYH.js.gz +0 -0
  44. package/dist/{chunk-AQIXKTAT.js → chunk-YF2BQIW3.js} +32149 -11877
  45. package/dist/chunk-YF2BQIW3.js.br +0 -0
  46. package/dist/chunk-YF2BQIW3.js.gz +0 -0
  47. package/dist/{chunk-WIEBQGQI.mjs → chunk-YPDPSXPK.mjs} +64 -96
  48. package/dist/chunk-YPDPSXPK.mjs.br +0 -0
  49. package/dist/chunk-YPDPSXPK.mjs.gz +0 -0
  50. package/dist/i18n/de.cjs +64 -96
  51. package/dist/i18n/de.cjs.br +0 -0
  52. package/dist/i18n/de.cjs.gz +0 -0
  53. package/dist/i18n/de.mjs +64 -96
  54. package/dist/i18n/de.mjs.br +0 -0
  55. package/dist/i18n/de.mjs.gz +0 -0
  56. package/dist/i18n/es.cjs +64 -96
  57. package/dist/i18n/es.cjs.br +0 -0
  58. package/dist/i18n/es.cjs.gz +0 -0
  59. package/dist/i18n/es.mjs +64 -96
  60. package/dist/i18n/es.mjs.br +0 -0
  61. package/dist/i18n/es.mjs.gz +0 -0
  62. package/dist/i18n/fr.cjs +64 -96
  63. package/dist/i18n/fr.cjs.br +0 -0
  64. package/dist/i18n/fr.cjs.gz +0 -0
  65. package/dist/i18n/fr.mjs +64 -96
  66. package/dist/i18n/fr.mjs.br +0 -0
  67. package/dist/i18n/fr.mjs.gz +0 -0
  68. package/dist/i18n/zh-CN.cjs +63 -95
  69. package/dist/i18n/zh-CN.cjs.br +0 -0
  70. package/dist/i18n/zh-CN.cjs.gz +0 -0
  71. package/dist/i18n/zh-CN.mjs +63 -95
  72. package/dist/i18n/zh-CN.mjs.br +0 -0
  73. package/dist/i18n/zh-CN.mjs.gz +0 -0
  74. package/dist/i18n.js +4 -4
  75. package/dist/i18n.js.br +0 -0
  76. package/dist/i18n.js.gz +0 -0
  77. package/dist/i18n.mjs +1 -1
  78. package/dist/i18n.mjs.br +0 -0
  79. package/dist/i18n.mjs.gz +0 -0
  80. package/dist/index.d.ts +99 -3
  81. package/dist/index.js +63 -63
  82. package/dist/index.js.br +0 -0
  83. package/dist/index.js.gz +0 -0
  84. package/dist/index.mjs +6 -6
  85. package/dist/index.mjs.br +0 -0
  86. package/dist/index.mjs.gz +0 -0
  87. package/dist/internals.d.ts +99 -3
  88. package/dist/internals.js +105 -105
  89. package/dist/internals.js.br +0 -0
  90. package/dist/internals.js.gz +0 -0
  91. package/dist/internals.mjs +4 -4
  92. package/dist/internals.mjs.br +0 -0
  93. package/dist/internals.mjs.gz +0 -0
  94. package/dist/viewer/index.d.ts +82 -3
  95. package/dist/viewer/index.js +27 -27
  96. package/dist/viewer/index.js.br +0 -0
  97. package/dist/viewer/index.js.gz +0 -0
  98. package/dist/viewer/index.mjs +6 -6
  99. package/dist/viewer/index.mjs.br +2 -3
  100. package/dist/viewer/index.mjs.gz +0 -0
  101. package/package.json +1 -1
  102. package/dist/AiChatPanel-3YILWCBX.js.br +0 -0
  103. package/dist/AiChatPanel-3YILWCBX.js.gz +0 -0
  104. package/dist/AiChatPanel-X2MVL5UP.mjs.br +0 -0
  105. package/dist/AiChatPanel-X2MVL5UP.mjs.gz +0 -0
  106. package/dist/Model3DScene-G7P6ZAIO.js.gz +0 -0
  107. package/dist/Model3DScene-QFWI5CEE.mjs.br +0 -0
  108. package/dist/Model3DScene-QFWI5CEE.mjs.gz +0 -0
  109. package/dist/chunk-2BM4GBFZ.js.br +0 -0
  110. package/dist/chunk-2BM4GBFZ.js.gz +0 -0
  111. package/dist/chunk-5J6NW3YS.mjs.br +0 -0
  112. package/dist/chunk-5J6NW3YS.mjs.gz +0 -0
  113. package/dist/chunk-AQIXKTAT.js.br +0 -0
  114. package/dist/chunk-AQIXKTAT.js.gz +0 -0
  115. package/dist/chunk-E5OIDWHO.mjs.br +0 -0
  116. package/dist/chunk-E5OIDWHO.mjs.gz +0 -0
  117. package/dist/chunk-FYAOOACZ.js.br +0 -0
  118. package/dist/chunk-FYAOOACZ.js.gz +0 -0
  119. package/dist/chunk-OECUSL2B.mjs.br +0 -0
  120. package/dist/chunk-OECUSL2B.mjs.gz +0 -0
  121. package/dist/chunk-QLDHUKH2.mjs.br +0 -0
  122. package/dist/chunk-QLDHUKH2.mjs.gz +0 -0
  123. package/dist/chunk-SR7ETIBF.js.br +0 -0
  124. package/dist/chunk-SR7ETIBF.js.gz +0 -0
  125. package/dist/chunk-UBYFLXAU.mjs.br +0 -0
  126. package/dist/chunk-UBYFLXAU.mjs.gz +0 -0
  127. package/dist/chunk-UIAU3NR2.js.br +0 -0
  128. package/dist/chunk-UIAU3NR2.js.gz +0 -0
  129. package/dist/chunk-VF4RA27Q.js.br +0 -0
  130. package/dist/chunk-VF4RA27Q.js.gz +0 -0
  131. package/dist/chunk-WIEBQGQI.mjs.br +0 -0
  132. package/dist/chunk-WIEBQGQI.mjs.gz +0 -0
@@ -1295,6 +1295,27 @@ interface ShapeStyle {
1295
1295
  * `authored-shape-style.ts`'s `effectIsPurelyStyleMatrix`.
1296
1296
  */
1297
1297
  inheritedEffectStyle?: ShapeStyle;
1298
+ /**
1299
+ * Set by a style-matrix pick (the Shape Styles gallery): the shape's own
1300
+ * `spPr` fill, outline and effects were replaced by `<p:style>`, so the
1301
+ * writer clears whatever the retained `spPr` still authored before it
1302
+ * writes the (now reference-owned) style. Never parsed; editor state only.
1303
+ */
1304
+ styleMatrixReset?: boolean;
1305
+ }
1306
+ /**
1307
+ * The result of resolving a `<p:style>` block against the loaded theme.
1308
+ *
1309
+ * `shapeStyle` is exactly what the load pipeline would have produced for a
1310
+ * shape whose `spPr` authors nothing and whose `<p:style>` is `styleXml`:
1311
+ * the flat fill/outline/effect values a renderer needs, the reference indices
1312
+ * and colours the writer re-emits, and the inheritance baselines that tell the
1313
+ * writer to leave `spPr` empty while the flat values still agree with them.
1314
+ */
1315
+ interface ResolvedStyleMatrix {
1316
+ shapeStyle: ShapeStyle;
1317
+ /** The text colour `<a:fontRef>` names, resolved to hex. */
1318
+ fontColor?: string;
1298
1319
  }
1299
1320
  //#endregion
1300
1321
  //#region src/core/types/text.d.ts
@@ -2269,6 +2290,22 @@ interface TextSegment {
2269
2290
  * Used by the renderer to apply font family, colour, etc. to the `<rt>` element.
2270
2291
  */
2271
2292
  rubyStyle?: TextStyle;
2293
+ /**
2294
+ * The parsed `a:rubyPr` node, kept verbatim so its attributes (`hps`,
2295
+ * `hpsRaise`, `hpsBaseText`, `lid`, ...) round-trip exactly; only an
2296
+ * edited {@link rubyAlignment} is written over it on save.
2297
+ */
2298
+ rubyPropertiesXml?: XmlObject;
2299
+ /**
2300
+ * What each of a ruby run's two base-side `a:rPr`s authored on its own:
2301
+ * `outer` is the containing `a:r`'s, `base` the `a:rubyBase` run's. The
2302
+ * flat {@link style} merges both for rendering; these let the writer give
2303
+ * each `a:rPr` back only its own properties (plus any later edit).
2304
+ */
2305
+ rubyRunAuthoredStyles?: {
2306
+ outer?: TextStyle;
2307
+ base?: TextStyle;
2308
+ };
2272
2309
  }
2273
2310
  //#endregion
2274
2311
  //#region src/core/types/element-base.d.ts
@@ -4180,6 +4217,14 @@ interface PptxChartData {
4180
4217
  style?: PptxChartStyle;
4181
4218
  /** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
4182
4219
  grouping?: 'clustered' | 'stacked' | 'percentStacked';
4220
+ /**
4221
+ * The source `c:grouping` was `standard`, which {@link grouping} folds into
4222
+ * `'clustered'` (a 2D bar chart draws the two the same). A 3D chart draws
4223
+ * `standard` differently: each series on its own depth row. The writer
4224
+ * emits `standard` again while `grouping` is still `'clustered'`, so the
4225
+ * chart round-trips unchanged.
4226
+ */
4227
+ groupingStandard?: boolean;
4183
4228
  /**
4184
4229
  * Whether the first (or only) series varies its point colours
4185
4230
  * (`c:varyColors/@val`). Pie/doughnut default this on; single-series
@@ -5577,6 +5622,14 @@ interface PptxSmartArtNode {
5577
5622
  * quick-style variation) applied to every other node.
5578
5623
  */
5579
5624
  coherent3DOff?: boolean;
5625
+ /**
5626
+ * The layout variables PowerPoint recorded for each presentation node
5627
+ * this point drives (`dgm:prSet/@presName` -> `dgm:presLayoutVars`
5628
+ * variable -> `@val`), e.g. `{ hierRoot1: { hierBranch: 'l' } }` for an
5629
+ * org-chart manager set to "Left Hanging". Read-only: the presentation
5630
+ * points themselves round-trip verbatim.
5631
+ */
5632
+ presLayoutVarsByName?: Record<string, Record<string, string>>;
5580
5633
  /**
5581
5634
  * Per-run text + run-properties for the node's first paragraph, captured at
5582
5635
  * parse time. When the joined run text still equals {@link text} (the node
@@ -5646,6 +5699,16 @@ interface PptxSmartArtQuickStyleLabel {
5646
5699
  name: string;
5647
5700
  /** Theme-resolved `dgm:style` refs for this label's role, when available. */
5648
5701
  resolvedStyle?: PptxSmartArtResolvedStyleRef;
5702
+ /**
5703
+ * The label's own `dgm:scene3d` (per-shape camera + light rig). PowerPoint
5704
+ * copies it onto a shape's cached `a:scene3d` unless it is the default
5705
+ * front camera with a `threePt` light (see `applySmartArtQuickStyle3d`).
5706
+ */
5707
+ scene3d?: Pptx3DScene;
5708
+ /** The label's own `dgm:sp3d` (bevel / extrusion / contour / material); absent when empty. */
5709
+ shape3d?: Pptx3DShape;
5710
+ /** The label's `dgm:txPr/a:sp3d` label-text extrusion (Bird's Eye Scene). */
5711
+ text3d?: Text3DStyle;
5649
5712
  }
5650
5713
  /** CT_CTStyleLabel metadata from a color-transform definition. */
5651
5714
  interface PptxSmartArtColorStyleLabel {
@@ -5713,9 +5776,10 @@ interface PptxSmartArtQuickStyle extends PptxSmartArtDefinitionMetadata {
5713
5776
  * for the "Scene" quick styles (Brick, Flat, Metallic, Sunset, Bird's Eye
5714
5777
  * Scene). One camera renders the whole diagram; per-shape `a:scene3d` is
5715
5778
  * absent for those styles (see `PptxSmartArtDrawingShape.scene3d`). Each
5716
- * `dgm:styleLbl` also carries its own per-label `dgm:scene3d`/`dgm:sp3d`,
5717
- * but PowerPoint bakes those fully resolved onto each cached shape's own
5718
- * `dsp:spPr/a:sp3d`, so only the diagram-level scene is exposed here.
5779
+ * `dgm:styleLbl` also carries its own per-label `dgm:scene3d`/`dgm:sp3d`
5780
+ * ({@link PptxSmartArtQuickStyleLabel.scene3d} / `shape3d` / `text3d`),
5781
+ * which PowerPoint bakes onto each cached shape; they are re-applied when a
5782
+ * structural edit regenerates the shapes.
5719
5783
  */
5720
5784
  scene3d?: Pptx3DScene;
5721
5785
  }
@@ -5846,6 +5910,11 @@ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
5846
5910
  fillNone?: boolean;
5847
5911
  /** Solid fill colour (hex). */
5848
5912
  fillColor?: string;
5913
+ /**
5914
+ * Opacity (0..1) of the solid fill, from the colour's `a:alpha` (Basic Venn
5915
+ * paints its circles at 50% so overlaps blend). Absent when opaque.
5916
+ */
5917
+ fillOpacity?: number;
5849
5918
  /**
5850
5919
  * Gradient fill stops when the cached shape uses `a:gradFill`. Positions are
5851
5920
  * 0..100 (percent). Renderers emit an SVG/CSS gradient instead of a flat box.
@@ -11264,6 +11333,8 @@ interface IPptxHandlerRuntime {
11264
11333
  updateThemeColorScheme(colorScheme: PptxThemeColorScheme): Promise<void>;
11265
11334
  updateThemeFontScheme(fontScheme: PptxThemeFontScheme): Promise<void>;
11266
11335
  updateThemeName(name: string): Promise<void>;
11336
+ /** Resolve a `<p:style>` node against the loaded theme (see PptxHandlerRuntimeStyleMatrixResolve). */
11337
+ resolveStyleMatrixReferences(styleXml: XmlObject): ResolvedStyleMatrix;
11267
11338
  applyTheme(colorScheme: PptxThemeColorScheme, fontScheme: PptxThemeFontScheme, themeName?: string): Promise<void>;
11268
11339
  load(data: ArrayBuffer, options?: PptxHandlerLoadOptions): Promise<PptxData>;
11269
11340
  getChartDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxChartData | undefined>;
@@ -11559,6 +11630,14 @@ declare class PptxHandlerCore {
11559
11630
  * @param name - New display name for the theme.
11560
11631
  */
11561
11632
  updateThemeName(name: string): Promise<void>;
11633
+ /**
11634
+ * Resolve a `<p:style>` block (`a:lnRef` / `a:fillRef` / `a:effectRef` /
11635
+ * `a:fontRef`) against the loaded theme, exactly as the load path would for
11636
+ * a shape whose `spPr` authors nothing. Apply the returned `shapeStyle` to a
11637
+ * shape and it renders like PowerPoint's Shape Styles entry and saves as a
11638
+ * bare `<p:style>` with an empty `spPr`, which is what PowerPoint writes.
11639
+ */
11640
+ resolveStyleMatrixReferences(styleXml: XmlObject): ResolvedStyleMatrix;
11562
11641
  /**
11563
11642
  * Apply a complete theme in one call (colour scheme + font scheme + optional name).
11564
11643
  *
@@ -12451,6 +12530,15 @@ interface PictureBulletMarker {
12451
12530
  imageRelId?: string;
12452
12531
  }
12453
12532
  //#endregion
12533
+ //#region src/render/text-east-asian-breaks.d.ts
12534
+ /** Which of the two behaviours a paragraph asks for. */
12535
+ interface EastAsianBreakOptions {
12536
+ /** `a:pPr/@hangingPunct="1"`. */
12537
+ hangingPunctuation: boolean;
12538
+ /** `a:pPr/@eaLnBrk="0"`: break between any two East Asian characters. */
12539
+ breakAnywhere: boolean;
12540
+ }
12541
+ //#endregion
12454
12542
  //#region src/render/text-run-meta.d.ts
12455
12543
  /** A run's resolved hyperlink target. */
12456
12544
  interface RunHyperlink {
@@ -12624,6 +12712,8 @@ interface ParagraphRun {
12624
12712
  * `paragraph-run-build.ts`).
12625
12713
  */
12626
12714
  underlineWordPieces?: ScriptFontPiece[];
12715
+ /** The advance-carrying space after a hanging `、`/`。` (`text-east-asian-breaks`). */
12716
+ hangingSpace?: true;
12627
12717
  /**
12628
12718
  * `a:reflection` mirrored-sibling wrapper style for this run (the text-run
12629
12719
  * counterpart of a shape/picture's `ComputedEffectStyle.reflection`), or
@@ -12707,6 +12797,12 @@ interface RenderParagraph {
12707
12797
  * break rules, rendered differently in the other four bindings.
12708
12798
  */
12709
12799
  paragraphStyle?: RunStyle;
12800
+ /**
12801
+ * `@hangingPunct` / `@eaLnBrk="0"` as resolved for this paragraph. The runs
12802
+ * above already carry their pieces; React, which rebuilds each segment's
12803
+ * pieces inside one span, re-applies `splitEastAsianBreaks` from this.
12804
+ */
12805
+ eastAsianBreaks?: EastAsianBreakOptions;
12710
12806
  }
12711
12807
  //#endregion
12712
12808
  //#region src/render/inline-list-types.d.ts