pptx-react-viewer 2.21.1 → 2.22.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 (106) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{AiChatPanel-E4NQEMEI.mjs → AiChatPanel-KDHDYBMP.mjs} +3 -3
  3. package/dist/AiChatPanel-KDHDYBMP.mjs.br +0 -0
  4. package/dist/AiChatPanel-KDHDYBMP.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-VKR2IFFC.js → AiChatPanel-WVRT4OLF.js} +23 -23
  6. package/dist/AiChatPanel-WVRT4OLF.js.br +0 -0
  7. package/dist/AiChatPanel-WVRT4OLF.js.gz +0 -0
  8. package/dist/{Model3DScene-JZKLB5YT.js → Model3DScene-COI2CG35.js} +2 -2
  9. package/dist/Model3DScene-COI2CG35.js.br +0 -0
  10. package/dist/Model3DScene-COI2CG35.js.gz +0 -0
  11. package/dist/{Model3DScene-65J6IE5Q.mjs → Model3DScene-I5SQKIZC.mjs} +1 -1
  12. package/dist/Model3DScene-I5SQKIZC.mjs.br +0 -0
  13. package/dist/Model3DScene-I5SQKIZC.mjs.gz +0 -0
  14. package/dist/{PowerPointViewer-DVFkeluD.d.ts → PowerPointViewer-SkkxAGKa.d.ts} +2 -2
  15. package/dist/PowerPointViewer-SkkxAGKa.d.ts.map +1 -0
  16. package/dist/SurfaceChart3DScene-2N4TPYPU.js +49 -0
  17. package/dist/SurfaceChart3DScene-2N4TPYPU.js.br +0 -0
  18. package/dist/SurfaceChart3DScene-2N4TPYPU.js.gz +0 -0
  19. package/dist/SurfaceChart3DScene-6LTF5QPW.mjs +47 -0
  20. package/dist/SurfaceChart3DScene-6LTF5QPW.mjs.br +0 -0
  21. package/dist/SurfaceChart3DScene-6LTF5QPW.mjs.gz +0 -0
  22. package/dist/{audience-content-store-C4BFFhV5.d.ts → audience-content-store-Bx4Yj2pN.d.ts} +2 -2
  23. package/dist/{audience-content-store-C4BFFhV5.d.ts.map → audience-content-store-Bx4Yj2pN.d.ts.map} +1 -1
  24. package/dist/{chunk-HYUJVSQJ.js → chunk-34UAGEJM.js} +643 -106
  25. package/dist/chunk-34UAGEJM.js.br +0 -0
  26. package/dist/chunk-34UAGEJM.js.gz +0 -0
  27. package/dist/{chunk-VWCUKKR3.mjs → chunk-57TM4MV4.mjs} +642 -107
  28. package/dist/chunk-57TM4MV4.mjs.br +0 -0
  29. package/dist/chunk-57TM4MV4.mjs.gz +0 -0
  30. package/dist/{chunk-WX3HQHR5.mjs → chunk-7BZYDUNM.mjs} +1 -1
  31. package/dist/chunk-7BZYDUNM.mjs.br +0 -0
  32. package/dist/chunk-7BZYDUNM.mjs.gz +0 -0
  33. package/dist/{chunk-DA6DF3EU.js → chunk-K7TFZ5MW.js} +147 -147
  34. package/dist/chunk-K7TFZ5MW.js.br +0 -0
  35. package/dist/chunk-K7TFZ5MW.js.gz +0 -0
  36. package/dist/{chunk-OSPNGQF3.js → chunk-KK6DOUES.js} +1921 -1860
  37. package/dist/chunk-KK6DOUES.js.br +0 -0
  38. package/dist/chunk-KK6DOUES.js.gz +0 -0
  39. package/dist/{chunk-C3JR7RMW.js → chunk-POP5IWYB.js} +3 -3
  40. package/dist/chunk-POP5IWYB.js.br +0 -0
  41. package/dist/chunk-POP5IWYB.js.gz +0 -0
  42. package/dist/{chunk-WRJ76D5S.mjs → chunk-RJFKXPMU.mjs} +1 -1
  43. package/dist/chunk-RJFKXPMU.mjs.br +0 -0
  44. package/dist/chunk-RJFKXPMU.mjs.gz +0 -0
  45. package/dist/{chunk-2SNHVHHB.mjs → chunk-TWU72BY4.mjs} +2 -2
  46. package/dist/chunk-TWU72BY4.mjs.br +0 -0
  47. package/dist/{chunk-2SNHVHHB.mjs.gz → chunk-TWU72BY4.mjs.gz} +0 -0
  48. package/dist/{chunk-CBGTLSY7.mjs → chunk-XIBTR7KJ.mjs} +125 -64
  49. package/dist/chunk-XIBTR7KJ.mjs.br +0 -0
  50. package/dist/chunk-XIBTR7KJ.mjs.gz +0 -0
  51. package/dist/{chunk-GJHO6HPF.js → chunk-YNHWNFE3.js} +385 -385
  52. package/dist/chunk-YNHWNFE3.js.br +0 -0
  53. package/dist/{chunk-GJHO6HPF.js.gz → chunk-YNHWNFE3.js.gz} +0 -0
  54. package/dist/index.d.ts +16 -1
  55. package/dist/index.js +45 -45
  56. package/dist/index.js.br +0 -0
  57. package/dist/index.js.gz +0 -0
  58. package/dist/index.mjs +5 -5
  59. package/dist/index.mjs.br +0 -0
  60. package/dist/index.mjs.gz +0 -0
  61. package/dist/internals.d.ts +6 -1
  62. package/dist/internals.js +78 -78
  63. package/dist/internals.js.br +0 -0
  64. package/dist/internals.js.gz +0 -0
  65. package/dist/internals.mjs +3 -3
  66. package/dist/internals.mjs.br +0 -0
  67. package/dist/internals.mjs.gz +0 -0
  68. package/dist/{types-TCH6icpi.d.ts → types-kLpvSPxq.d.ts} +11 -1
  69. package/dist/{types-TCH6icpi.d.ts.map → types-kLpvSPxq.d.ts.map} +1 -1
  70. package/dist/{useViewerBuildingBlocks-BKb0qs1j.d.ts → useViewerBuildingBlocks-fh7rq4jc.d.ts} +2 -2
  71. package/dist/{useViewerBuildingBlocks-BKb0qs1j.d.ts.map → useViewerBuildingBlocks-fh7rq4jc.d.ts.map} +1 -1
  72. package/dist/viewer/index.d.ts +16 -1
  73. package/dist/viewer/index.js +26 -26
  74. package/dist/viewer/index.js.br +0 -0
  75. package/dist/viewer/index.js.gz +0 -0
  76. package/dist/viewer/index.mjs +5 -5
  77. package/dist/viewer/index.mjs.br +0 -0
  78. package/dist/viewer/index.mjs.gz +0 -0
  79. package/package.json +1 -1
  80. package/dist/AiChatPanel-E4NQEMEI.mjs.br +0 -0
  81. package/dist/AiChatPanel-E4NQEMEI.mjs.gz +0 -0
  82. package/dist/AiChatPanel-VKR2IFFC.js.br +0 -0
  83. package/dist/AiChatPanel-VKR2IFFC.js.gz +0 -0
  84. package/dist/Model3DScene-65J6IE5Q.mjs.br +0 -0
  85. package/dist/Model3DScene-65J6IE5Q.mjs.gz +0 -0
  86. package/dist/Model3DScene-JZKLB5YT.js.br +0 -0
  87. package/dist/Model3DScene-JZKLB5YT.js.gz +0 -0
  88. package/dist/PowerPointViewer-DVFkeluD.d.ts.map +0 -1
  89. package/dist/chunk-2SNHVHHB.mjs.br +0 -0
  90. package/dist/chunk-C3JR7RMW.js.br +0 -0
  91. package/dist/chunk-C3JR7RMW.js.gz +0 -0
  92. package/dist/chunk-CBGTLSY7.mjs.br +0 -0
  93. package/dist/chunk-CBGTLSY7.mjs.gz +0 -0
  94. package/dist/chunk-DA6DF3EU.js.br +0 -0
  95. package/dist/chunk-DA6DF3EU.js.gz +0 -0
  96. package/dist/chunk-GJHO6HPF.js.br +0 -0
  97. package/dist/chunk-HYUJVSQJ.js.br +0 -0
  98. package/dist/chunk-HYUJVSQJ.js.gz +0 -0
  99. package/dist/chunk-OSPNGQF3.js.br +0 -0
  100. package/dist/chunk-OSPNGQF3.js.gz +0 -0
  101. package/dist/chunk-VWCUKKR3.mjs.br +0 -0
  102. package/dist/chunk-VWCUKKR3.mjs.gz +0 -0
  103. package/dist/chunk-WRJ76D5S.mjs.br +0 -0
  104. package/dist/chunk-WRJ76D5S.mjs.gz +0 -0
  105. package/dist/chunk-WX3HQHR5.mjs.br +0 -0
  106. package/dist/chunk-WX3HQHR5.mjs.gz +0 -0
@@ -9010,10 +9010,10 @@ function normalizeSrgbHex(color2) {
9010
9010
  }
9011
9011
  return void 0;
9012
9012
  }
9013
- function resolveThemeColors(overrides10) {
9013
+ function resolveThemeColors(overrides11) {
9014
9014
  const resolved = {};
9015
9015
  for (const [key2, fallback] of Object.entries(DEFAULT_COLORS)) {
9016
- resolved[key2] = normalizeSrgbHex(overrides10?.[key2]) ?? normalizeSrgbHex(fallback) ?? "000000";
9016
+ resolved[key2] = normalizeSrgbHex(overrides11?.[key2]) ?? normalizeSrgbHex(fallback) ?? "000000";
9017
9017
  }
9018
9018
  return resolved;
9019
9019
  }
@@ -19230,13 +19230,13 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19230
19230
  applySlideAndMediaUpdates(init) {
19231
19231
  const typesRoot = this.ensureTypesRoot(init.contentTypesData);
19232
19232
  const defaults = this.ensureArray(typesRoot["Default"]);
19233
- const overrides10 = this.ensureArray(typesRoot["Override"]);
19233
+ const overrides11 = this.ensureArray(typesRoot["Override"]);
19234
19234
  const activeSlidePartNames = new Set(
19235
19235
  init.slidePaths.map(
19236
19236
  (slidePath) => this.normalizePartName(slidePath.startsWith("/") ? slidePath.substring(1) : slidePath)
19237
19237
  )
19238
19238
  );
19239
- const filteredOverrides = overrides10.filter((entry2) => {
19239
+ const filteredOverrides = overrides11.filter((entry2) => {
19240
19240
  if (entry2?.["@_ContentType"] !== init.slideContentType) {
19241
19241
  return true;
19242
19242
  }
@@ -19273,17 +19273,17 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19273
19273
  init.contentTypesData["Types"] = typesRoot;
19274
19274
  return init.contentTypesData;
19275
19275
  }
19276
- applyInkOverrides(overrides10, paths) {
19276
+ applyInkOverrides(overrides11, paths) {
19277
19277
  if (!paths) {
19278
19278
  return;
19279
19279
  }
19280
19280
  const existing = new Set(
19281
- overrides10.filter((entry2) => entry2["@_ContentType"] === "application/inkml+xml").map((entry2) => String(entry2["@_PartName"] ?? ""))
19281
+ overrides11.filter((entry2) => entry2["@_ContentType"] === "application/inkml+xml").map((entry2) => String(entry2["@_PartName"] ?? ""))
19282
19282
  );
19283
19283
  for (const path of paths) {
19284
19284
  const partName = this.normalizePartName(path);
19285
19285
  if (!existing.has(partName)) {
19286
- overrides10.push({
19286
+ overrides11.push({
19287
19287
  "@_PartName": partName,
19288
19288
  "@_ContentType": "application/inkml+xml"
19289
19289
  });
@@ -19293,11 +19293,11 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19293
19293
  applyCommentUpdates(init) {
19294
19294
  const typesRoot = this.ensureTypesRoot(init.contentTypesData);
19295
19295
  const defaults = this.ensureArray(typesRoot["Default"]);
19296
- const overrides10 = this.ensureArray(typesRoot["Override"]);
19296
+ const overrides11 = this.ensureArray(typesRoot["Override"]);
19297
19297
  const activeCommentPartNames = new Set(
19298
19298
  Array.from(init.activeCommentPaths).map((commentPath) => this.normalizePartName(commentPath))
19299
19299
  );
19300
- const filteredOverrides = overrides10.filter((entry2) => {
19300
+ const filteredOverrides = overrides11.filter((entry2) => {
19301
19301
  const entryType = String(entry2?.["@_ContentType"] || "");
19302
19302
  const rawPartName = entry2?.["@_PartName"];
19303
19303
  const entryPartName = typeof rawPartName === "string" ? this.normalizePartName(rawPartName) : void 0;
@@ -19402,9 +19402,9 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19402
19402
  return;
19403
19403
  }
19404
19404
  const typesRoot = this.ensureTypesRoot(init.contentTypesData);
19405
- const overrides10 = this.ensureArray(typesRoot["Override"]);
19405
+ const overrides11 = this.ensureArray(typesRoot["Override"]);
19406
19406
  const existingOverrides = /* @__PURE__ */ new Set();
19407
- for (const entry2 of overrides10) {
19407
+ for (const entry2 of overrides11) {
19408
19408
  const partName = entry2?.["@_PartName"];
19409
19409
  if (typeof partName === "string") {
19410
19410
  existingOverrides.add(this.normalizePartName(partName));
@@ -19418,13 +19418,13 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19418
19418
  if (existingOverrides.has(partName)) {
19419
19419
  continue;
19420
19420
  }
19421
- overrides10.push({
19421
+ overrides11.push({
19422
19422
  "@_PartName": partName,
19423
19423
  "@_ContentType": _PptxContentTypesBuilder.CUSTOM_XML_CONTENT_TYPE
19424
19424
  });
19425
19425
  existingOverrides.add(partName);
19426
19426
  }
19427
- typesRoot["Override"] = overrides10;
19427
+ typesRoot["Override"] = overrides11;
19428
19428
  init.contentTypesData["Types"] = typesRoot;
19429
19429
  }
19430
19430
  /** Content type for the main presentation part keyed by output format. */
@@ -19443,9 +19443,9 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19443
19443
  return;
19444
19444
  }
19445
19445
  const typesRoot = this.ensureTypesRoot(contentTypesData);
19446
- const overrides10 = this.ensureArray(typesRoot["Override"]);
19446
+ const overrides11 = this.ensureArray(typesRoot["Override"]);
19447
19447
  const targetContentType = _PptxContentTypesBuilder.PRESENTATION_CONTENT_TYPES[format];
19448
- for (const entry2 of overrides10) {
19448
+ for (const entry2 of overrides11) {
19449
19449
  const partName = String(entry2?.["@_PartName"] || "");
19450
19450
  const normalised = this.normalizePartName(partName);
19451
19451
  if (normalised === "/ppt/presentation.xml") {
@@ -19455,18 +19455,18 @@ var PptxContentTypesBuilder = class _PptxContentTypesBuilder {
19455
19455
  }
19456
19456
  if (format === "pptm" && hasVba) {
19457
19457
  const vbaPartName = "/ppt/vbaProject.bin";
19458
- const hasVbaOverride = overrides10.some((entry2) => {
19458
+ const hasVbaOverride = overrides11.some((entry2) => {
19459
19459
  const pn = String(entry2?.["@_PartName"] || "");
19460
19460
  return this.normalizePartName(pn) === vbaPartName;
19461
19461
  });
19462
19462
  if (!hasVbaOverride) {
19463
- overrides10.push({
19463
+ overrides11.push({
19464
19464
  "@_PartName": vbaPartName,
19465
19465
  "@_ContentType": _PptxContentTypesBuilder.VBA_PROJECT_CONTENT_TYPE
19466
19466
  });
19467
19467
  }
19468
19468
  }
19469
- typesRoot["Override"] = overrides10;
19469
+ typesRoot["Override"] = overrides11;
19470
19470
  contentTypesData["Types"] = typesRoot;
19471
19471
  }
19472
19472
  };
@@ -21054,12 +21054,12 @@ var PptxSlideNotesPartUpdater = class {
21054
21054
  const data = init.parser.parse(xml);
21055
21055
  const root = data["Types"] ?? {};
21056
21056
  const raw = root["Override"];
21057
- const overrides10 = Array.isArray(raw) ? raw : raw ? [raw] : [];
21058
- overrides10.push({
21057
+ const overrides11 = Array.isArray(raw) ? raw : raw ? [raw] : [];
21058
+ overrides11.push({
21059
21059
  "@_PartName": `/${notesPath}`,
21060
21060
  "@_ContentType": "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"
21061
21061
  });
21062
- root["Override"] = overrides10;
21062
+ root["Override"] = overrides11;
21063
21063
  data["Types"] = root;
21064
21064
  init.zip.file("[Content_Types].xml", init.xmlBuilder.build(data));
21065
21065
  }
@@ -25034,9 +25034,9 @@ function evaluateLayoutRules(base, rules, nodes) {
25034
25034
  }
25035
25035
  return { constraints, nodeConstraints };
25036
25036
  }
25037
- function applyNodeLayoutRules(shapes, overrides10, bounds, global) {
25037
+ function applyNodeLayoutRules(shapes, overrides11, bounds, global) {
25038
25038
  return shapes.map((shape) => {
25039
- const rule = overrides10.get(shape.nodeId);
25039
+ const rule = overrides11.get(shape.nodeId);
25040
25040
  const widthRule = rule?.w ?? global.w;
25041
25041
  const heightRule = rule?.h ?? global.h;
25042
25042
  const width = widthRule !== void 0 ? widthRule * bounds.width : shape.width;
@@ -38988,7 +38988,10 @@ var GRAPHIC_FRAME_LIMITATIONS = {
38988
38988
  "PARTIAL_SMARTART_SUPPORT",
38989
38989
  "SmartArt is parsed and preserved, but some DiagramML behavior is not editable."
38990
38990
  ],
38991
- ole: ["PARTIAL_OLE_SUPPORT", "The OLE payload is preserved but cannot be rendered or edited."],
38991
+ ole: [
38992
+ "PARTIAL_OLE_SUPPORT",
38993
+ "The OLE payload renders as a preview image and can be downloaded or opened in a new tab, but cannot be edited in place."
38994
+ ],
38992
38995
  ink: [
38993
38996
  "PARTIAL_INK_SUPPORT",
38994
38997
  "Ink is rendered from decoded traces; unsupported ink properties remain raw XML."
@@ -39364,8 +39367,8 @@ var PptxDocumentPropertiesUpdater = class {
39364
39367
  coreProps["@_xmlns:dcterms"] = "http://purl.org/dc/terms/";
39365
39368
  }
39366
39369
  }
39367
- applyCorePropertiesOverrides(coreProps, overrides10) {
39368
- if (!overrides10) {
39370
+ applyCorePropertiesOverrides(coreProps, overrides11) {
39371
+ if (!overrides11) {
39369
39372
  return;
39370
39373
  }
39371
39374
  const map = [
@@ -39382,7 +39385,7 @@ var PptxDocumentPropertiesUpdater = class {
39382
39385
  ["contentStatus", "cp:contentStatus"]
39383
39386
  ];
39384
39387
  for (const [sourceKey, xmlKey] of map) {
39385
- const value = overrides10[sourceKey];
39388
+ const value = overrides11[sourceKey];
39386
39389
  if (value === void 0) {
39387
39390
  continue;
39388
39391
  }
@@ -39408,8 +39411,8 @@ var PptxDocumentPropertiesUpdater = class {
39408
39411
  updateSlideTitleProperties(appProps, slides) {
39409
39412
  applySlideTitlesToAppProps(appProps, deriveSlideTitles(slides));
39410
39413
  }
39411
- applyAppPropertiesOverrides(appProps, overrides10) {
39412
- if (!overrides10) {
39414
+ applyAppPropertiesOverrides(appProps, overrides11) {
39415
+ if (!overrides11) {
39413
39416
  return;
39414
39417
  }
39415
39418
  const stringMap = [
@@ -39429,7 +39432,7 @@ var PptxDocumentPropertiesUpdater = class {
39429
39432
  ["paragraphs", "Paragraphs"]
39430
39433
  ];
39431
39434
  for (const [sourceKey, xmlKey] of stringMap) {
39432
- const value = overrides10[sourceKey];
39435
+ const value = overrides11[sourceKey];
39433
39436
  if (value === void 0) {
39434
39437
  continue;
39435
39438
  }
@@ -39441,7 +39444,7 @@ var PptxDocumentPropertiesUpdater = class {
39441
39444
  }
39442
39445
  }
39443
39446
  for (const [sourceKey, xmlKey] of numberMap) {
39444
- const value = overrides10[sourceKey];
39447
+ const value = overrides11[sourceKey];
39445
39448
  if (value === void 0) {
39446
39449
  continue;
39447
39450
  }
@@ -39499,16 +39502,16 @@ var PptxDocumentPropertiesUpdater = class {
39499
39502
  const ctData = this.context.parser.parse(ctXml);
39500
39503
  const types = ctData["Types"];
39501
39504
  if (types) {
39502
- const overrides10 = Array.isArray(types["Override"]) ? types["Override"] : types["Override"] ? [types["Override"]] : [];
39503
- const hasCustomOverride = overrides10.some(
39505
+ const overrides11 = Array.isArray(types["Override"]) ? types["Override"] : types["Override"] ? [types["Override"]] : [];
39506
+ const hasCustomOverride = overrides11.some(
39504
39507
  (o) => String(o?.["@_PartName"] || "") === "/docProps/custom.xml"
39505
39508
  );
39506
39509
  if (!hasCustomOverride) {
39507
- overrides10.push({
39510
+ overrides11.push({
39508
39511
  "@_PartName": "/docProps/custom.xml",
39509
39512
  "@_ContentType": customContentType
39510
39513
  });
39511
- types["Override"] = overrides10.length === 1 ? overrides10[0] : overrides10;
39514
+ types["Override"] = overrides11.length === 1 ? overrides11[0] : overrides11;
39512
39515
  this.context.zip.file("[Content_Types].xml", this.context.builder.build(ctData));
39513
39516
  }
39514
39517
  }
@@ -39562,11 +39565,11 @@ var PptxDocumentPropertiesUpdater = class {
39562
39565
  const ctData = this.context.parser.parse(ctXml);
39563
39566
  const types = ctData["Types"];
39564
39567
  if (types) {
39565
- const overrides10 = Array.isArray(types["Override"]) ? types["Override"] : types["Override"] ? [types["Override"]] : [];
39566
- const filtered = overrides10.filter(
39568
+ const overrides11 = Array.isArray(types["Override"]) ? types["Override"] : types["Override"] ? [types["Override"]] : [];
39569
+ const filtered = overrides11.filter(
39567
39570
  (o) => String(o?.["@_PartName"] || "") !== "/docProps/custom.xml"
39568
39571
  );
39569
- if (filtered.length !== overrides10.length) {
39572
+ if (filtered.length !== overrides11.length) {
39570
39573
  types["Override"] = filtered.length === 1 ? filtered[0] : filtered;
39571
39574
  this.context.zip.file("[Content_Types].xml", this.context.builder.build(ctData));
39572
39575
  }
@@ -39880,15 +39883,15 @@ async function ensureSlideSyncContentType(zip, parser, writer, partPath, content
39880
39883
  const data = parser.parse(xml);
39881
39884
  const root = data["Types"] || {};
39882
39885
  const values = root["Override"];
39883
- const overrides10 = Array.isArray(values) ? values : values ? [values] : [];
39886
+ const overrides11 = Array.isArray(values) ? values : values ? [values] : [];
39884
39887
  const partName = `/${partPath.replace(/^\//u, "")}`;
39885
- const entry2 = overrides10.find((item) => item["@_PartName"] === partName);
39888
+ const entry2 = overrides11.find((item) => item["@_PartName"] === partName);
39886
39889
  if (entry2) {
39887
39890
  entry2["@_ContentType"] = contentType;
39888
39891
  } else {
39889
- overrides10.push({ "@_PartName": partName, "@_ContentType": contentType });
39892
+ overrides11.push({ "@_PartName": partName, "@_ContentType": contentType });
39890
39893
  }
39891
- root["Override"] = overrides10;
39894
+ root["Override"] = overrides11;
39892
39895
  data["Types"] = root;
39893
39896
  zip.file("[Content_Types].xml", writer.build(data));
39894
39897
  }
@@ -48123,9 +48126,9 @@ var nextRelationshipId = (relationships) => {
48123
48126
  }
48124
48127
  return `rId${index}`;
48125
48128
  };
48126
- var updateOverride = (overrides10, contentType, activePaths) => {
48129
+ var updateOverride = (overrides11, contentType, activePaths) => {
48127
48130
  const active = new Set(activePaths.map((path) => `/${path.replace(/^\//, "")}`));
48128
- const retained = overrides10.filter(
48131
+ const retained = overrides11.filter(
48129
48132
  (entry2) => String(entry2["@_ContentType"] || "") !== contentType || active.has(String(entry2["@_PartName"] || ""))
48130
48133
  );
48131
48134
  for (const path of active) {
@@ -48176,14 +48179,14 @@ async function persistModernCommentPackage(init) {
48176
48179
  if (contentTypesXml3) {
48177
48180
  const data = init.parser.parse(contentTypesXml3);
48178
48181
  const root = data["Types"] || {};
48179
- let overrides10 = ensureArray9(root["Override"]);
48180
- overrides10 = updateOverride(overrides10, MODERN_COMMENT_CONTENT_TYPE, activeCommentPaths);
48181
- overrides10 = updateOverride(
48182
- overrides10,
48182
+ let overrides11 = ensureArray9(root["Override"]);
48183
+ overrides11 = updateOverride(overrides11, MODERN_COMMENT_CONTENT_TYPE, activeCommentPaths);
48184
+ overrides11 = updateOverride(
48185
+ overrides11,
48183
48186
  MODERN_AUTHOR_CONTENT_TYPE,
48184
48187
  hasComments ? [authorPath] : []
48185
48188
  );
48186
- root["Override"] = overrides10;
48189
+ root["Override"] = overrides11;
48187
48190
  data["Types"] = root;
48188
48191
  init.zip.file("[Content_Types].xml", init.xmlBuilder.build(data));
48189
48192
  }
@@ -50360,17 +50363,17 @@ async function upsertContentTypes(zip, codec, contentTypes) {
50360
50363
  }
50361
50364
  const data = codec.parse(xml);
50362
50365
  const root = data["Types"];
50363
- const overrides10 = ensureArray13(root["Override"]);
50366
+ const overrides11 = ensureArray13(root["Override"]);
50364
50367
  for (const [path, contentType] of contentTypes) {
50365
50368
  const partName = `/${path}`;
50366
- const existing = overrides10.find((entry2) => entry2["@_PartName"] === partName);
50369
+ const existing = overrides11.find((entry2) => entry2["@_PartName"] === partName);
50367
50370
  if (existing) {
50368
50371
  existing["@_ContentType"] = contentType;
50369
50372
  } else {
50370
- overrides10.push({ "@_PartName": partName, "@_ContentType": contentType });
50373
+ overrides11.push({ "@_PartName": partName, "@_ContentType": contentType });
50371
50374
  }
50372
50375
  }
50373
- root["Override"] = overrides10;
50376
+ root["Override"] = overrides11;
50374
50377
  zip.file("[Content_Types].xml", codec.build(data));
50375
50378
  }
50376
50379
  function relsForSourcePart(source) {
@@ -50522,17 +50525,17 @@ async function upsertTagContentTypes(zip, codec, paths) {
50522
50525
  }
50523
50526
  const data = codec.parse(xml);
50524
50527
  const root = data["Types"];
50525
- const overrides10 = ensureArray14(root["Override"]);
50528
+ const overrides11 = ensureArray14(root["Override"]);
50526
50529
  for (const path of paths) {
50527
50530
  const partName = `/${path}`;
50528
- const existing = overrides10.find((entry2) => entry2["@_PartName"] === partName);
50531
+ const existing = overrides11.find((entry2) => entry2["@_PartName"] === partName);
50529
50532
  if (existing) {
50530
50533
  existing["@_ContentType"] = TAG_CONTENT_TYPE;
50531
50534
  } else {
50532
- overrides10.push({ "@_PartName": partName, "@_ContentType": TAG_CONTENT_TYPE });
50535
+ overrides11.push({ "@_PartName": partName, "@_ContentType": TAG_CONTENT_TYPE });
50533
50536
  }
50534
50537
  }
50535
- root["Override"] = overrides10;
50538
+ root["Override"] = overrides11;
50536
50539
  zip.file("[Content_Types].xml", codec.build(data));
50537
50540
  }
50538
50541
  function sourcePartForRels(relsPath) {
@@ -58239,8 +58242,8 @@ var SCRIPT_CANDIDATES = {
58239
58242
  };
58240
58243
  function aggregateFontScriptOverrides(perPathMap) {
58241
58244
  const aggregate2 = {};
58242
- for (const overrides10 of perPathMap.values()) {
58243
- for (const [script, typeface] of Object.entries(overrides10)) {
58245
+ for (const overrides11 of perPathMap.values()) {
58246
+ for (const [script, typeface] of Object.entries(overrides11)) {
58244
58247
  if (!(script in aggregate2)) {
58245
58248
  aggregate2[script] = typeface;
58246
58249
  }
@@ -63461,12 +63464,12 @@ var PptxHandlerRuntime25 = class extends PptxHandlerRuntime24 {
63461
63464
  if (ctXml) {
63462
63465
  const ctData = this.parser.parse(ctXml);
63463
63466
  const typesRoot = ctData?.Types ?? {};
63464
- const overrides10 = this.ensureArray(typesRoot.Override);
63465
- const filteredOverrides = overrides10.filter((o) => {
63467
+ const overrides11 = this.ensureArray(typesRoot.Override);
63468
+ const filteredOverrides = overrides11.filter((o) => {
63466
63469
  const partName = String(o?.["@_PartName"] || "");
63467
63470
  return !partName.startsWith("/_xmlsignatures/");
63468
63471
  });
63469
- if (filteredOverrides.length !== overrides10.length) {
63472
+ if (filteredOverrides.length !== overrides11.length) {
63470
63473
  typesRoot.Override = filteredOverrides;
63471
63474
  ctData.Types = typesRoot;
63472
63475
  this.zip.file("[Content_Types].xml", this.builder.build(ctData));
@@ -65128,15 +65131,15 @@ var PptxHandlerRuntime32 = class _PptxHandlerRuntime11 extends PptxHandlerRuntim
65128
65131
  }
65129
65132
  const ctData = this.parser.parse(ctXml);
65130
65133
  const typesRoot = ctData["Types"] || {};
65131
- const overrides10 = Array.isArray(typesRoot["Override"]) ? typesRoot["Override"] : typesRoot["Override"] ? [typesRoot["Override"]] : [];
65132
- const have = new Set(overrides10.map((o) => String(o?.["@_PartName"] || "")));
65134
+ const overrides11 = Array.isArray(typesRoot["Override"]) ? typesRoot["Override"] : typesRoot["Override"] ? [typesRoot["Override"]] : [];
65135
+ const have = new Set(overrides11.map((o) => String(o?.["@_PartName"] || "")));
65133
65136
  for (const entry2 of entries) {
65134
65137
  if (!have.has(entry2.partName)) {
65135
- overrides10.push({ "@_PartName": entry2.partName, "@_ContentType": entry2.contentType });
65138
+ overrides11.push({ "@_PartName": entry2.partName, "@_ContentType": entry2.contentType });
65136
65139
  have.add(entry2.partName);
65137
65140
  }
65138
65141
  }
65139
- typesRoot["Override"] = overrides10;
65142
+ typesRoot["Override"] = overrides11;
65140
65143
  ctData["Types"] = typesRoot;
65141
65144
  this.zip.file("[Content_Types].xml", this.builder.build(ctData));
65142
65145
  }
@@ -65204,15 +65207,15 @@ var PptxHandlerRuntime33 = class extends PptxHandlerRuntime32 {
65204
65207
  }
65205
65208
  const data = this.parser.parse(xml);
65206
65209
  const root = data["Types"] ?? {};
65207
- const overrides10 = Array.isArray(root["Override"]) ? root["Override"] : root["Override"] ? [root["Override"]] : [];
65208
- const existing = new Set(overrides10.map((entry2) => String(entry2["@_PartName"] ?? "")));
65210
+ const overrides11 = Array.isArray(root["Override"]) ? root["Override"] : root["Override"] ? [root["Override"]] : [];
65211
+ const existing = new Set(overrides11.map((entry2) => String(entry2["@_PartName"] ?? "")));
65209
65212
  for (const [path, contentType] of pending) {
65210
65213
  const partName = `/${path}`;
65211
65214
  if (!existing.has(partName)) {
65212
- overrides10.push({ "@_PartName": partName, "@_ContentType": contentType });
65215
+ overrides11.push({ "@_PartName": partName, "@_ContentType": contentType });
65213
65216
  }
65214
65217
  }
65215
- root["Override"] = overrides10;
65218
+ root["Override"] = overrides11;
65216
65219
  data["Types"] = root;
65217
65220
  this.zip.file("[Content_Types].xml", this.builder.build(data));
65218
65221
  }
@@ -66173,8 +66176,8 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime16 extends PptxHandlerRuntim
66173
66176
  }
66174
66177
  const ctData = this.parser.parse(ctXml);
66175
66178
  const typesRoot = ctData["Types"] || {};
66176
- const overrides10 = Array.isArray(typesRoot["Override"]) ? typesRoot["Override"] : typesRoot["Override"] ? [typesRoot["Override"]] : [];
66177
- const have = new Set(overrides10.map((o) => String(o?.["@_PartName"] || "")));
66179
+ const overrides11 = Array.isArray(typesRoot["Override"]) ? typesRoot["Override"] : typesRoot["Override"] ? [typesRoot["Override"]] : [];
66180
+ const have = new Set(overrides11.map((o) => String(o?.["@_PartName"] || "")));
66178
66181
  for (const [p, contentType] of [
66179
66182
  ...(paths ?? []).map((path) => [path, CHART_CONTENT_TYPE]),
66180
66183
  ...(extendedPaths ?? []).map(
@@ -66186,11 +66189,11 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime16 extends PptxHandlerRuntim
66186
66189
  ]) {
66187
66190
  const partName = `/${p}`;
66188
66191
  if (!have.has(partName)) {
66189
- overrides10.push({ "@_PartName": partName, "@_ContentType": contentType });
66192
+ overrides11.push({ "@_PartName": partName, "@_ContentType": contentType });
66190
66193
  have.add(partName);
66191
66194
  }
66192
66195
  }
66193
- typesRoot["Override"] = overrides10;
66196
+ typesRoot["Override"] = overrides11;
66194
66197
  ctData["Types"] = typesRoot;
66195
66198
  this.zip.file("[Content_Types].xml", this.builder.build(ctData));
66196
66199
  }
@@ -68795,11 +68798,11 @@ var PptxHandlerRuntime49 = class extends PptxHandlerRuntime48 {
68795
68798
  }
68796
68799
  const data = this.parser.parse(xml);
68797
68800
  const root = data["Types"] ?? {};
68798
- const overrides10 = asArray3(root["Override"]);
68799
- if (!overrides10.some((entry2) => entry2["@_PartName"] === partName)) {
68800
- overrides10.push({ "@_PartName": partName, "@_ContentType": contentType });
68801
+ const overrides11 = asArray3(root["Override"]);
68802
+ if (!overrides11.some((entry2) => entry2["@_PartName"] === partName)) {
68803
+ overrides11.push({ "@_PartName": partName, "@_ContentType": contentType });
68801
68804
  }
68802
- root["Override"] = overrides10;
68805
+ root["Override"] = overrides11;
68803
68806
  data["Types"] = root;
68804
68807
  this.zip.file("[Content_Types].xml", this.builder.build(data));
68805
68808
  }
@@ -68980,12 +68983,12 @@ var PptxHandlerRuntime50 = class extends PptxHandlerRuntime49 {
68980
68983
  }
68981
68984
  const data = this.parser.parse(xml);
68982
68985
  const root = data["Types"] ?? {};
68983
- const overrides10 = asArray4(root["Override"]);
68986
+ const overrides11 = asArray4(root["Override"]);
68984
68987
  const partName = `/${masterPath}`;
68985
- if (!overrides10.some((entry2) => entry2["@_PartName"] === partName)) {
68986
- overrides10.push({ "@_PartName": partName, "@_ContentType": HANDOUT_MASTER_CONTENT_TYPE });
68988
+ if (!overrides11.some((entry2) => entry2["@_PartName"] === partName)) {
68989
+ overrides11.push({ "@_PartName": partName, "@_ContentType": HANDOUT_MASTER_CONTENT_TYPE });
68987
68990
  }
68988
- root["Override"] = overrides10;
68991
+ root["Override"] = overrides11;
68989
68992
  data["Types"] = root;
68990
68993
  this.zip.file("[Content_Types].xml", this.builder.build(data));
68991
68994
  }
@@ -76003,8 +76006,8 @@ var PptxHandlerRuntime81 = class extends PptxHandlerRuntime80 {
76003
76006
  */
76004
76007
  aggregateFontScriptOverrides(perPathMap) {
76005
76008
  const aggregate2 = {};
76006
- for (const overrides10 of perPathMap.values()) {
76007
- for (const [script, typeface] of Object.entries(overrides10)) {
76009
+ for (const overrides11 of perPathMap.values()) {
76010
+ for (const [script, typeface] of Object.entries(overrides11)) {
76008
76011
  if (!(script in aggregate2)) {
76009
76012
  aggregate2[script] = typeface;
76010
76013
  }
@@ -76013,19 +76016,19 @@ var PptxHandlerRuntime81 = class extends PptxHandlerRuntime80 {
76013
76016
  return aggregate2;
76014
76017
  }
76015
76018
  collectFontScriptOverrides(fontNode) {
76016
- const overrides10 = {};
76019
+ const overrides11 = {};
76017
76020
  if (!fontNode) {
76018
- return overrides10;
76021
+ return overrides11;
76019
76022
  }
76020
76023
  const fontEntries = this.ensureArray(fontNode["a:font"]);
76021
76024
  for (const entry2 of fontEntries) {
76022
76025
  const script = String(entry2?.["@_script"] || "").trim();
76023
76026
  const typeface = this.normalizeTypefaceToken(String(entry2?.["@_typeface"] || ""));
76024
76027
  if (script && typeface) {
76025
- overrides10[script] = typeface;
76028
+ overrides11[script] = typeface;
76026
76029
  }
76027
76030
  }
76028
- return overrides10;
76031
+ return overrides11;
76029
76032
  }
76030
76033
  /**
76031
76034
  * Resolve the theme file path referenced by a given master's `.rels`.
@@ -84013,7 +84016,226 @@ function assign8(ids, facets) {
84013
84016
  overrides8[id] = facets;
84014
84017
  }
84015
84018
  }
84016
- assign8(["presentation:complexType:CT_SlideTransition", "presentation:element:transition"], {
84019
+ assign8(
84020
+ [
84021
+ "drawing:complexType:CT_LineProperties",
84022
+ "drawing:element:ln",
84023
+ "drawing:simpleType:ST_LineWidth"
84024
+ ],
84025
+ {
84026
+ parse: "native",
84027
+ preserve: "native",
84028
+ edit: "native",
84029
+ serialize: "native",
84030
+ note: "The `a:ln` outline (width, fill choice, dash, join, cap, compound, alignment, and both line ends) is fully typed on the shared `ShapeStyle`. An `a:extLst` child, or any property still resolved from `a:lnRef`, is left untouched by the writer and so survives a dirty save unmodified.",
84031
+ evidence: [
84032
+ testEvidence(
84033
+ "src/core/core/builders/shape-style-line-helpers.test.ts",
84034
+ [
84035
+ "extracts line width from @_w (12700 EMU = 1pt \u2248 1.33px)",
84036
+ "extracts larger line width (38100 => 4px)"
84037
+ ],
84038
+ ["parse"]
84039
+ ),
84040
+ testEvidence(
84041
+ "src/core/core/runtime/PptxHandlerRuntimeSaveShapeStyleWriter.test.ts",
84042
+ ["should set stroke width in EMU and solid fill"],
84043
+ ["edit", "serialize"]
84044
+ ),
84045
+ testEvidence(
84046
+ "src/core/core/runtime/authored-shape-style.test.ts",
84047
+ [
84048
+ "does not invent an a:ln for an outline that comes from a:lnRef",
84049
+ "keeps an authored a:ln free of the theme width, colour, cap and join",
84050
+ "writes width and colour once the outline is edited"
84051
+ ],
84052
+ ["preserve", "edit", "serialize"]
84053
+ ),
84054
+ testEvidence(
84055
+ "src/core/core/runtime/save-line-fill.test.ts",
84056
+ [
84057
+ "keeps the fill ahead of an authored a:prstDash",
84058
+ "keeps the fill ahead of the join and the line ends"
84059
+ ],
84060
+ ["preserve", "serialize"]
84061
+ )
84062
+ ]
84063
+ }
84064
+ );
84065
+ assign8(["drawing:group:EG_LineFillProperties"], {
84066
+ parse: "native",
84067
+ preserve: "native",
84068
+ edit: "native",
84069
+ serialize: "native",
84070
+ note: "All four choice members of an outline fill (noFill, solidFill, gradFill, pattFill) are typed via `strokeFillMode`, with the gradient/pattern node preserved verbatim for re-emission (issue #87). Exactly one fill child is ever written, in schema order ahead of the dash/join/ends group.",
84071
+ evidence: [
84072
+ testEvidence(
84073
+ "src/core/core/builders/shape-style-line-helpers.test.ts",
84074
+ [
84075
+ "applies solid fill stroke color",
84076
+ "applies gradient fill stroke color via context callback",
84077
+ "applies pattern fill stroke color from foreground",
84078
+ "models a gradient outline and preserves the whole a:gradFill node",
84079
+ "models a pattern outline and preserves the whole a:pattFill node",
84080
+ 'models a noFill outline (no hidden line) as strokeFillMode "none"'
84081
+ ],
84082
+ ["parse"]
84083
+ ),
84084
+ testEvidence(
84085
+ "src/core/core/runtime/save-line-fill.test.ts",
84086
+ [
84087
+ "emits a single a:gradFill for a gradient outline, never a solid dual-fill",
84088
+ "emits a single a:pattFill for a pattern outline",
84089
+ "emits a single a:solidFill for a solid outline and clears any prior gradient",
84090
+ "emits a:noFill for a transparent / zero-width outline and clears fills"
84091
+ ],
84092
+ ["preserve", "edit", "serialize"]
84093
+ )
84094
+ ]
84095
+ });
84096
+ assign8(
84097
+ [
84098
+ "drawing:group:EG_LineDashProperties",
84099
+ "drawing:complexType:CT_PresetLineDashProperties",
84100
+ "drawing:element:prstDash",
84101
+ "drawing:simpleType:ST_PresetLineDashVal"
84102
+ ],
84103
+ {
84104
+ parse: "native",
84105
+ preserve: "native",
84106
+ edit: "native",
84107
+ serialize: "native",
84108
+ note: "All eleven `ST_PresetLineDashVal` values are typed on `strokeDash`; the sibling `custDash` choice (`CT_DashStopList`) has its own coverage entry. Editing back to a preset drops any prior custom dash-stop list.",
84109
+ evidence: [
84110
+ testEvidence(
84111
+ "src/core/core/builders/shape-style-line-helpers.test.ts",
84112
+ [
84113
+ "applies preset dash type 'dash'",
84114
+ "applies preset dash type 'dot'",
84115
+ "applies preset dash type 'lgDash'",
84116
+ "applies preset dash type 'sysDash'",
84117
+ "applies preset dash type 'dashDot'"
84118
+ ],
84119
+ ["parse"]
84120
+ ),
84121
+ testEvidence(
84122
+ "src/core/core/runtime/PptxHandlerRuntimeSaveShapeStyleWriter.test.ts",
84123
+ ["should remove dash styles when dash is 'solid'", "should set preset dash"],
84124
+ ["edit", "serialize"]
84125
+ ),
84126
+ testEvidence(
84127
+ "src/core/utils/drawing-line-dash.test.ts",
84128
+ ["inserts custom dash before line joins and extensions"],
84129
+ ["preserve", "serialize"]
84130
+ )
84131
+ ]
84132
+ }
84133
+ );
84134
+ assign8(
84135
+ [
84136
+ "drawing:group:EG_LineJoinProperties",
84137
+ "drawing:complexType:CT_LineJoinRound",
84138
+ "drawing:complexType:CT_LineJoinBevel",
84139
+ "drawing:complexType:CT_LineJoinMiterProperties",
84140
+ "drawing:element:round",
84141
+ "drawing:element:bevel",
84142
+ "drawing:element:miter",
84143
+ "drawing:simpleType:ST_CompoundLine",
84144
+ "drawing:simpleType:ST_LineCap"
84145
+ ],
84146
+ {
84147
+ parse: "native",
84148
+ preserve: "native",
84149
+ edit: "native",
84150
+ serialize: "native",
84151
+ note: "The join choice (round/bevel/miter, with the miter limit) and the `cap`/`cmpd` attributes are typed on `lineJoin`, `miterLimit`, `lineCap`, and `compoundLine`, covering all `ST_CompoundLine` and `ST_LineCap` enumerators. The miter limit is only emitted when it differs from the 800000 default, and a cap/join the shape authored on top of an `a:lnRef` theme baseline is kept while the reference-derived value is not written back.",
84152
+ evidence: [
84153
+ testEvidence(
84154
+ "src/core/core/builders/shape-style-line-helpers.test.ts",
84155
+ [
84156
+ "applies round line join",
84157
+ "applies bevel line join",
84158
+ "applies miter line join",
84159
+ "parses miter @_lim into miterLimit (E-H6)",
84160
+ "applies cap type 'rnd'",
84161
+ "applies cap type 'sq'",
84162
+ "applies cap type 'flat'",
84163
+ "applies compound line type 'dbl'",
84164
+ "applies compound line type 'thickThin'",
84165
+ "applies compound line type 'tri'"
84166
+ ],
84167
+ ["parse"]
84168
+ ),
84169
+ testEvidence(
84170
+ "src/core/core/runtime/PptxHandlerRuntimeSaveShapeStyleWriter.test.ts",
84171
+ [
84172
+ "should set round join",
84173
+ "should set bevel join",
84174
+ "omits @lim on a miter join at the 800000 default",
84175
+ "emits @lim on a miter join with a non-default limit",
84176
+ "should set line cap",
84177
+ "should set compound line type"
84178
+ ],
84179
+ ["edit", "serialize"]
84180
+ ),
84181
+ testEvidence(
84182
+ "src/core/core/runtime/authored-shape-style.test.ts",
84183
+ ["keeps an outline property the shape authored on top of the reference"],
84184
+ ["preserve"]
84185
+ )
84186
+ ]
84187
+ }
84188
+ );
84189
+ assign8(
84190
+ [
84191
+ "drawing:complexType:CT_LineEndProperties",
84192
+ "drawing:element:headEnd",
84193
+ "drawing:element:tailEnd",
84194
+ "drawing:simpleType:ST_LineEndType",
84195
+ "drawing:simpleType:ST_LineEndWidth",
84196
+ "drawing:simpleType:ST_LineEndLength"
84197
+ ],
84198
+ {
84199
+ parse: "native",
84200
+ preserve: "native",
84201
+ edit: "native",
84202
+ serialize: "native",
84203
+ note: 'Both connector line ends (`headEnd`/`tailEnd`) are typed on `connectorStart/EndArrow(Width|Length)`, covering all six `ST_LineEndType` arrowhead shapes and all three `ST_LineEndWidth`/`ST_LineEndLength` sizes independently per end. Setting an end to "none" removes the element rather than writing an empty one.',
84204
+ evidence: [
84205
+ testEvidence(
84206
+ "src/core/core/builders/shape-style-line-helpers.test.ts",
84207
+ [
84208
+ "applies head end arrow type 'triangle' with size 'lg'",
84209
+ "applies tail end arrow type 'stealth' with size 'sm'",
84210
+ "applies both head and tail arrows"
84211
+ ],
84212
+ ["parse"]
84213
+ ),
84214
+ testEvidence(
84215
+ "src/core/core/runtime/PptxHandlerRuntimeSaveShapeStyleWriter.test.ts",
84216
+ [
84217
+ "should set tail end arrow with width and length",
84218
+ "should remove tailEnd when endArrow is 'none'",
84219
+ "should set head end arrow"
84220
+ ],
84221
+ ["edit", "serialize"]
84222
+ ),
84223
+ testEvidence(
84224
+ "src/core/core/runtime/authored-shape-style.test.ts",
84225
+ ["keeps an authored a:ln free of the theme width, colour, cap and join"],
84226
+ ["preserve"]
84227
+ )
84228
+ ]
84229
+ }
84230
+ );
84231
+ var OPENXML_LINE_STROKE_PROPERTIES_COVERAGE = overrides8;
84232
+ var overrides9 = {};
84233
+ function assign9(ids, facets) {
84234
+ for (const id of ids) {
84235
+ overrides9[id] = facets;
84236
+ }
84237
+ }
84238
+ assign9(["presentation:complexType:CT_SlideTransition", "presentation:element:transition"], {
84017
84239
  parse: "partial",
84018
84240
  preserve: "native",
84019
84241
  edit: "partial",
@@ -84026,7 +84248,7 @@ assign8(["presentation:complexType:CT_SlideTransition", "presentation:element:tr
84026
84248
  ])
84027
84249
  ]
84028
84250
  });
84029
- assign8(
84251
+ assign9(
84030
84252
  [
84031
84253
  "presentation:complexType:CT_TransitionSoundAction",
84032
84254
  "presentation:complexType:CT_TransitionStartSoundAction",
@@ -84048,7 +84270,7 @@ assign8(
84048
84270
  ]
84049
84271
  }
84050
84272
  );
84051
- assign8(
84273
+ assign9(
84052
84274
  [
84053
84275
  "drawing:complexType:CT_Backdrop",
84054
84276
  "drawing:complexType:CT_Camera",
@@ -84082,7 +84304,7 @@ assign8(
84082
84304
  ]
84083
84305
  }
84084
84306
  );
84085
- assign8(["chart:complexType:CT_DTable", "chart:element:dTable"], {
84307
+ assign9(["chart:complexType:CT_DTable", "chart:element:dTable"], {
84086
84308
  parse: "partial",
84087
84309
  preserve: "native",
84088
84310
  edit: "partial",
@@ -84094,7 +84316,7 @@ assign8(["chart:complexType:CT_DTable", "chart:element:dTable"], {
84094
84316
  ])
84095
84317
  ]
84096
84318
  });
84097
- assign8(
84319
+ assign9(
84098
84320
  [
84099
84321
  "chart:element:showHorzBorder",
84100
84322
  "chart:element:showVertBorder",
@@ -84114,7 +84336,7 @@ assign8(
84114
84336
  ]
84115
84337
  }
84116
84338
  );
84117
- assign8(
84339
+ assign9(
84118
84340
  [
84119
84341
  "presentation:complexType:CT_PrintProperties",
84120
84342
  "presentation:simpleType:ST_PrintColorMode",
@@ -84145,14 +84367,14 @@ assign8(
84145
84367
  ]
84146
84368
  }
84147
84369
  );
84148
- var OPENXML_TRANSITIONS_SCENES_AND_CHART_TABLES_COVERAGE = overrides8;
84149
- var overrides9 = {};
84150
- function assign9(ids, facets) {
84370
+ var OPENXML_TRANSITIONS_SCENES_AND_CHART_TABLES_COVERAGE = overrides9;
84371
+ var overrides10 = {};
84372
+ function assign10(ids, facets) {
84151
84373
  for (const id of ids) {
84152
- overrides9[id] = facets;
84374
+ overrides10[id] = facets;
84153
84375
  }
84154
84376
  }
84155
- assign9(
84377
+ assign10(
84156
84378
  [
84157
84379
  "presentation:complexType:CT_CommonViewProperties",
84158
84380
  "presentation:complexType:CT_CommonSlideViewProperties",
@@ -84179,7 +84401,7 @@ assign9(
84179
84401
  ]
84180
84402
  }
84181
84403
  );
84182
- assign9(
84404
+ assign10(
84183
84405
  [
84184
84406
  "drawing:complexType:CT_ColorChangeEffect",
84185
84407
  "drawing:complexType:CT_ColorReplaceEffect",
@@ -84205,7 +84427,7 @@ assign9(
84205
84427
  ]
84206
84428
  }
84207
84429
  );
84208
- assign9(
84430
+ assign10(
84209
84431
  [
84210
84432
  "drawing:complexType:CT_GrayscaleEffect",
84211
84433
  "drawing:complexType:CT_BiLevelEffect",
@@ -84227,7 +84449,7 @@ assign9(
84227
84449
  ]
84228
84450
  }
84229
84451
  );
84230
- assign9(
84452
+ assign10(
84231
84453
  [
84232
84454
  "chart:complexType:CT_Marker",
84233
84455
  "chart:complexType:CT_DPt",
@@ -84247,7 +84469,7 @@ assign9(
84247
84469
  ]
84248
84470
  }
84249
84471
  );
84250
- assign9(
84472
+ assign10(
84251
84473
  [
84252
84474
  "chart:complexType:CT_MarkerSize",
84253
84475
  "chart:complexType:CT_MarkerStyle",
@@ -84271,7 +84493,7 @@ assign9(
84271
84493
  ]
84272
84494
  }
84273
84495
  );
84274
- assign9(
84496
+ assign10(
84275
84497
  [
84276
84498
  "drawing:complexType:CT_AlphaBiLevelEffect",
84277
84499
  "drawing:complexType:CT_AlphaCeilingEffect",
@@ -84305,7 +84527,7 @@ assign9(
84305
84527
  ]
84306
84528
  }
84307
84529
  );
84308
- assign9(
84530
+ assign10(
84309
84531
  [
84310
84532
  "drawing:complexType:CT_AlphaInverseEffect",
84311
84533
  "drawing:complexType:CT_AlphaModulateEffect",
@@ -84327,7 +84549,7 @@ assign9(
84327
84549
  ]
84328
84550
  }
84329
84551
  );
84330
- var OPENXML_VIEW_IMAGE_AND_CHART_POINT_FORMATTING_COVERAGE = overrides9;
84552
+ var OPENXML_VIEW_IMAGE_AND_CHART_POINT_FORMATTING_COVERAGE = overrides10;
84331
84553
  var OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS = [
84332
84554
  "chart:attribute:alignWithMargins",
84333
84555
  "chart:attribute:b",
@@ -88789,6 +89011,7 @@ var COVERAGE_OVERRIDES = {
88789
89011
  ...OPENXML_VIEW_IMAGE_AND_CHART_POINT_FORMATTING_COVERAGE,
88790
89012
  ...OPENXML_FONTS_AUDIO_PIVOTS_AND_ALGORITHMS_COVERAGE,
88791
89013
  ...OPENXML_LINE_LAYOUT_AND_PIVOT_STRUCTURES_COVERAGE,
89014
+ ...OPENXML_LINE_STROKE_PROPERTIES_COVERAGE,
88792
89015
  "chart:complexType:CT_ManualLayout": {
88793
89016
  parse: "native",
88794
89017
  preserve: "native",
@@ -125562,6 +125785,318 @@ async function mountModel3D(container, modelUrl, options) {
125562
125785
  }
125563
125786
  };
125564
125787
  }
125788
+ var GRID_SPACING = 0.5;
125789
+ var MAX_HEIGHT = 1.5;
125790
+ function computeGridExtent(cols, rows) {
125791
+ return {
125792
+ gridWidth: Math.max(cols - 1, 1) * GRID_SPACING,
125793
+ gridDepth: Math.max(rows - 1, 1) * GRID_SPACING
125794
+ };
125795
+ }
125796
+ function buildSurfaceGeometry(three, cols, rows, heightMap, colorMap) {
125797
+ const widthSegs = Math.max(cols - 1, 0);
125798
+ const depthSegs = Math.max(rows - 1, 0);
125799
+ const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
125800
+ const geo = new three.PlaneGeometry(gridWidth, gridDepth, widthSegs, depthSegs);
125801
+ geo.rotateX(-Math.PI / 2);
125802
+ const pos2 = geo.attributes.position;
125803
+ const vertexCount = pos2.count;
125804
+ const colors = new Float32Array(vertexCount * 3);
125805
+ for (let i = 0; i < vertexCount; i++) {
125806
+ const row = Math.floor(i / cols);
125807
+ const col = i % cols;
125808
+ const idx = row * cols + col;
125809
+ const h = idx < heightMap.length ? heightMap[idx] : 0;
125810
+ pos2.setY(i, h * MAX_HEIGHT);
125811
+ const ci = idx * 3;
125812
+ colors[i * 3] = ci < colorMap.length ? colorMap[ci] : 0.5;
125813
+ colors[i * 3 + 1] = ci + 1 < colorMap.length ? colorMap[ci + 1] : 0.5;
125814
+ colors[i * 3 + 2] = ci + 2 < colorMap.length ? colorMap[ci + 2] : 0.5;
125815
+ }
125816
+ geo.setAttribute("color", new three.BufferAttribute(colors, 3));
125817
+ geo.computeVertexNormals();
125818
+ pos2.needsUpdate = true;
125819
+ const wireGeometry = new three.WireframeGeometry(geo);
125820
+ return { geometry: geo, wireGeometry };
125821
+ }
125822
+ function buildSurfaceLabels(cols, rows, categoryLabels, seriesNames, maxCat = 8, maxSer = 6) {
125823
+ const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
125824
+ const labels = [];
125825
+ const catStep = Math.max(1, Math.ceil(categoryLabels.length / maxCat));
125826
+ for (let i = 0; i < categoryLabels.length; i += catStep) {
125827
+ const x = -gridWidth / 2 + i / Math.max(cols - 1, 1) * gridWidth;
125828
+ labels.push({
125829
+ key: `cat-${i}`,
125830
+ text: categoryLabels[i],
125831
+ anchor: [x, -0.15, gridDepth / 2 + 0.25],
125832
+ axis: "category"
125833
+ });
125834
+ }
125835
+ const serStep = Math.max(1, Math.ceil(seriesNames.length / maxSer));
125836
+ for (let i = 0; i < seriesNames.length; i += serStep) {
125837
+ const z = -gridDepth / 2 + i / Math.max(rows - 1, 1) * gridDepth;
125838
+ labels.push({
125839
+ key: `ser-${i}`,
125840
+ text: seriesNames[i],
125841
+ anchor: [gridWidth / 2 + 0.3, -0.15, z],
125842
+ axis: "series"
125843
+ });
125844
+ }
125845
+ labels.push({
125846
+ key: "value-axis",
125847
+ text: "Value",
125848
+ anchor: [-gridWidth / 2 - 0.35, 0.75, -gridDepth / 2],
125849
+ axis: "value"
125850
+ });
125851
+ return labels;
125852
+ }
125853
+ function computeCameraPlacement(cols, rows) {
125854
+ const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
125855
+ const maxExtent = Math.max(gridWidth, gridDepth, MAX_HEIGHT);
125856
+ const dist2 = maxExtent * 1.8;
125857
+ return {
125858
+ position: [dist2 * 0.8, dist2 * 0.7, dist2 * 0.8],
125859
+ target: [0, 0.3, 0]
125860
+ };
125861
+ }
125862
+ var SURFACE_THREE_UNAVAILABLE = {
125863
+ ok: false,
125864
+ resize: () => {
125865
+ },
125866
+ dispose: () => {
125867
+ }
125868
+ };
125869
+ var FOV2 = 45;
125870
+ async function loadThree2() {
125871
+ try {
125872
+ return await import('./three.module-GNNNRIMK.js');
125873
+ } catch {
125874
+ return null;
125875
+ }
125876
+ }
125877
+ async function loadOrbitControlsCtor2() {
125878
+ try {
125879
+ const mod = await import('./OrbitControls-SMYCPLXO.js');
125880
+ return mod.OrbitControls;
125881
+ } catch {
125882
+ return null;
125883
+ }
125884
+ }
125885
+ function createLabelOverlay(doc, labels) {
125886
+ const layer = doc.createElement("div");
125887
+ Object.assign(layer.style, {
125888
+ position: "absolute",
125889
+ inset: "0",
125890
+ pointerEvents: "none",
125891
+ overflow: "hidden"
125892
+ });
125893
+ const nodes = labels.map((label) => {
125894
+ const node = doc.createElement("div");
125895
+ node.textContent = label.text;
125896
+ const color2 = label.axis === "value" ? "#999" : "#666";
125897
+ Object.assign(node.style, {
125898
+ position: "absolute",
125899
+ fontSize: "9px",
125900
+ color: color2,
125901
+ whiteSpace: "nowrap",
125902
+ userSelect: "none",
125903
+ transform: "translate(-50%, -50%)",
125904
+ willChange: "left, top"
125905
+ });
125906
+ if (label.axis === "value") {
125907
+ node.style.writingMode = "vertical-rl";
125908
+ }
125909
+ layer.appendChild(node);
125910
+ return node;
125911
+ });
125912
+ return { layer, nodes };
125913
+ }
125914
+ async function mountSurfaceChart3D(container, options) {
125915
+ const three = await loadThree2();
125916
+ const OrbitCtrlCtor = three ? await loadOrbitControlsCtor2() : null;
125917
+ if (!three || !OrbitCtrlCtor) {
125918
+ return SURFACE_THREE_UNAVAILABLE;
125919
+ }
125920
+ const { cols, rows } = options;
125921
+ let width = Math.max(1, options.width);
125922
+ let height = Math.max(1, options.height);
125923
+ const renderer = new three.WebGLRenderer({ antialias: true, alpha: true });
125924
+ renderer.setPixelRatio(
125925
+ Math.min(
125926
+ typeof window === "undefined" ? 1 : window.devicePixelRatio || 1,
125927
+ options.maxPixelRatio ?? 2
125928
+ )
125929
+ );
125930
+ renderer.setSize(width, height, false);
125931
+ const canvas = renderer.domElement;
125932
+ canvas.style.width = `${width}px`;
125933
+ canvas.style.height = `${height}px`;
125934
+ canvas.style.display = "block";
125935
+ canvas.style.willChange = "transform";
125936
+ container.appendChild(canvas);
125937
+ const scene = new three.Scene();
125938
+ scene.add(new three.AmbientLight(16777215, 0.6));
125939
+ const key2 = new three.DirectionalLight(16777215, 0.8);
125940
+ key2.position.set(5, 8, 5);
125941
+ scene.add(key2);
125942
+ const fill = new three.DirectionalLight(16777215, 0.3);
125943
+ fill.position.set(-3, 4, -2);
125944
+ scene.add(fill);
125945
+ const camera = new three.PerspectiveCamera(FOV2, width / height, 0.1, 1e3);
125946
+ const placement = computeCameraPlacement(cols, rows);
125947
+ camera.position.set(...placement.position);
125948
+ const target = new three.Vector3(...placement.target);
125949
+ camera.lookAt(target);
125950
+ const { gridWidth, gridDepth } = computeGridExtent(cols, rows);
125951
+ const floorSize = Math.max(gridWidth, gridDepth) * 1.2;
125952
+ const gridFloor = new three.GridHelper(floorSize, Math.max(cols, rows), 13421772, 15263976);
125953
+ gridFloor.position.y = -0.02;
125954
+ scene.add(gridFloor);
125955
+ const { geometry, wireGeometry } = buildSurfaceGeometry(
125956
+ three,
125957
+ cols,
125958
+ rows,
125959
+ options.heightMap,
125960
+ options.colorMap
125961
+ );
125962
+ const surfaceMaterial = new three.MeshPhongMaterial({
125963
+ vertexColors: true,
125964
+ side: three.DoubleSide,
125965
+ shininess: 30,
125966
+ transparent: true,
125967
+ opacity: 0.92
125968
+ });
125969
+ const surfaceMesh = new three.Mesh(geometry, surfaceMaterial);
125970
+ scene.add(surfaceMesh);
125971
+ let wireMaterial = null;
125972
+ if (options.wireframe) {
125973
+ wireMaterial = new three.LineBasicMaterial({
125974
+ color: 3355443,
125975
+ transparent: true,
125976
+ opacity: 0.25
125977
+ });
125978
+ scene.add(new three.LineSegments(wireGeometry, wireMaterial));
125979
+ }
125980
+ const controls = new OrbitCtrlCtor(camera, canvas);
125981
+ controls.enablePan = true;
125982
+ controls.enableZoom = true;
125983
+ controls.enableRotate = true;
125984
+ controls.minDistance = 1;
125985
+ controls.maxDistance = 20;
125986
+ controls.maxPolarAngle = Math.PI / 2 + 0.3;
125987
+ controls.target.copy(target);
125988
+ controls.update();
125989
+ const doc = container.ownerDocument ?? document;
125990
+ const labels = buildSurfaceLabels(cols, rows, options.categoryLabels, options.seriesNames);
125991
+ const { layer, nodes } = createLabelOverlay(doc, labels);
125992
+ container.appendChild(layer);
125993
+ const anchors = labels.map((l) => new three.Vector3(...l.anchor));
125994
+ const projected = new three.Vector3();
125995
+ const updateLabels = () => {
125996
+ for (let i = 0; i < nodes.length; i++) {
125997
+ projected.copy(anchors[i]).project(camera);
125998
+ const node = nodes[i];
125999
+ if (projected.z > 1) {
126000
+ node.style.display = "none";
126001
+ continue;
126002
+ }
126003
+ node.style.display = "";
126004
+ node.style.left = `${(projected.x + 1) / 2 * width}px`;
126005
+ node.style.top = `${(-projected.y + 1) / 2 * height}px`;
126006
+ }
126007
+ };
126008
+ let frame2 = 0;
126009
+ let disposed = false;
126010
+ const renderLoop = () => {
126011
+ if (disposed) {
126012
+ return;
126013
+ }
126014
+ frame2 = requestAnimationFrame(renderLoop);
126015
+ controls.update();
126016
+ renderer.render(scene, camera);
126017
+ updateLabels();
126018
+ };
126019
+ frame2 = requestAnimationFrame(renderLoop);
126020
+ return {
126021
+ ok: true,
126022
+ resize(w, h) {
126023
+ width = Math.max(1, w);
126024
+ height = Math.max(1, h);
126025
+ camera.aspect = width / height;
126026
+ camera.updateProjectionMatrix();
126027
+ renderer.setSize(width, height, false);
126028
+ canvas.style.width = `${width}px`;
126029
+ canvas.style.height = `${height}px`;
126030
+ },
126031
+ dispose() {
126032
+ if (disposed) {
126033
+ return;
126034
+ }
126035
+ disposed = true;
126036
+ cancelAnimationFrame(frame2);
126037
+ controls.dispose();
126038
+ geometry.dispose();
126039
+ wireGeometry.dispose();
126040
+ surfaceMaterial.dispose();
126041
+ wireMaterial?.dispose();
126042
+ gridFloor.dispose();
126043
+ scene.clear();
126044
+ renderer.dispose();
126045
+ canvas.remove();
126046
+ layer.remove();
126047
+ }
126048
+ };
126049
+ }
126050
+ function buildSurfaceChart3DData(chartData, categoryLabels, options) {
126051
+ const seriesCount = chartData.series.length;
126052
+ const catCount = categoryLabels.length;
126053
+ if (seriesCount === 0 || catCount === 0) {
126054
+ return null;
126055
+ }
126056
+ const range = computeValueRange2(chartData.series);
126057
+ const heightMap = new Float32Array(seriesCount * catCount);
126058
+ const colorMap = new Float32Array(seriesCount * catCount * 3);
126059
+ for (let row = 0; row < seriesCount; row++) {
126060
+ for (let col = 0; col < catCount; col++) {
126061
+ const idx = row * catCount + col;
126062
+ const val2 = chartData.series[row]?.values[col] ?? 0;
126063
+ const t = range.span > 0 ? (val2 - range.min) / range.span : 0;
126064
+ heightMap[idx] = t;
126065
+ const { r, g, b } = surfaceColor(t);
126066
+ const ci = idx * 3;
126067
+ colorMap[ci] = r / 255;
126068
+ colorMap[ci + 1] = g / 255;
126069
+ colorMap[ci + 2] = b / 255;
126070
+ }
126071
+ }
126072
+ return {
126073
+ cols: catCount,
126074
+ rows: seriesCount,
126075
+ heightMap,
126076
+ colorMap,
126077
+ wireframe: options.wireframe ?? true,
126078
+ categoryLabels,
126079
+ seriesNames: chartData.series.map((s) => s.name),
126080
+ width: options.width,
126081
+ height: options.height
126082
+ };
126083
+ }
126084
+ function buildSurfaceChart3DDataForElement(element, options) {
126085
+ if (element.type !== "chart") {
126086
+ return null;
126087
+ }
126088
+ const chartEl = element;
126089
+ const chartData = chartEl.chartData;
126090
+ if (!chartData || chartData.series.length === 0) {
126091
+ return null;
126092
+ }
126093
+ if (resolveChartKind(chartData.chartType ?? "bar") !== "surface") {
126094
+ return null;
126095
+ }
126096
+ const longestLen = chartData.series.reduce((m, s) => Math.max(m, s.values.length), 0);
126097
+ const categoryLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: longestLen }, (_, i) => String(i + 1));
126098
+ return buildSurfaceChart3DData(chartData, categoryLabels, options);
126099
+ }
125565
126100
  var AVERAGE_ADVANCE_RATIO = 0.5;
125566
126101
  function wrapTextByEstimatedWidth(text2, maxWidth, fontSize, options = {}) {
125567
126102
  if (!text2 || text2.trim().length === 0) {
@@ -135358,6 +135893,7 @@ exports.buildSmartArtA11y = buildSmartArtA11y;
135358
135893
  exports.buildSmartArtPresetData = buildSmartArtPresetData;
135359
135894
  exports.buildStrokeOutline = buildStrokeOutline;
135360
135895
  exports.buildSummaryZoomView = buildSummaryZoomView;
135896
+ exports.buildSurfaceChart3DDataForElement = buildSurfaceChart3DDataForElement;
135361
135897
  exports.buildSvgGradientDef = buildSvgGradientDef;
135362
135898
  exports.buildTableDataGrid = buildTableDataGrid;
135363
135899
  exports.buildTextBlockStyle = buildTextBlockStyle;
@@ -135653,6 +136189,7 @@ exports.motionPathPresetLabelKey = motionPathPresetLabelKey;
135653
136189
  exports.motionPathPresetsByFamily = motionPathPresetsByFamily;
135654
136190
  exports.motionPathToSvgD = motionPathToSvgD;
135655
136191
  exports.mountModel3D = mountModel3D;
136192
+ exports.mountSurfaceChart3D = mountSurfaceChart3D;
135656
136193
  exports.movePresenterPointer = movePresenterPointer;
135657
136194
  exports.moveQuickAccessCommand = moveQuickAccessCommand;
135658
136195
  exports.moveSectionDown = moveSectionDown;