@office-open/core 0.9.3 → 0.9.5

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,9 +1,9 @@
1
1
  import "./smartart-DCY-Vdv7.mjs";
2
- import "./chart-DNpai28f.mjs";
3
- import { o as parse, s as stringify } from "./descriptor-57JUzfpG.mjs";
2
+ import "./chart-DwE8FCFk.mjs";
3
+ import { o as parse, s as stringify$1 } from "./descriptor-DcQm32dg.mjs";
4
4
  import "./patch-ilNZTQmG.mjs";
5
5
  import "./theme-CiNzdl-9.mjs";
6
- import { element, escapeXml, findChild, js2xml, textOf, xml2js } from "@office-open/xml";
6
+ import { attr, attrNum, element, escapeXml, findChild, js2xml, stringify, textOf, xml2js } from "@office-open/xml";
7
7
  import { AsyncZipDeflate, Zip, ZipPassThrough, strFromU8, strFromU8 as strFromU8$1, strToU8, unzipSync, unzipSync as unzipSync$1, zip, zipSync } from "fflate";
8
8
  import { sha1 } from "@noble/hashes/legacy.js";
9
9
  import { bytesToHex } from "@noble/hashes/utils.js";
@@ -4956,7 +4956,7 @@ const createTransformation = (options) => ({
4956
4956
  rotation: options.rotation ? options.rotation * 6e4 : void 0
4957
4957
  });
4958
4958
  //#endregion
4959
- //#region src/drawingml/table-style/table-style.ts
4959
+ //#region src/drawingml/table-style.ts
4960
4960
  /**
4961
4961
  * Table Style system for DrawingML.
4962
4962
  *
@@ -4994,14 +4994,22 @@ function createThemeableLine(opts) {
4994
4994
  if (opts.width !== void 0) attrs.w = String(opts.width);
4995
4995
  return element("a:ln", attrs, children.length > 0 ? children : void 0);
4996
4996
  }
4997
+ /** Each cell-border side: Options key → a:tcBdr child element name. */
4998
+ const BORDER_SIDES = [
4999
+ ["left", "a:left"],
5000
+ ["right", "a:right"],
5001
+ ["top", "a:top"],
5002
+ ["bottom", "a:bottom"],
5003
+ ["insideH", "a:insideH"],
5004
+ ["insideV", "a:insideV"]
5005
+ ];
5006
+ /** CT_TableCellBorderStyle: each side wraps an EG_ThemeableLineStyle choice. */
4997
5007
  function buildCellBorders(opts) {
4998
5008
  const children = [];
4999
- if (opts.left) children.push(createThemeableLine(opts.left));
5000
- if (opts.right) children.push(createThemeableLine(opts.right));
5001
- if (opts.top) children.push(createThemeableLine(opts.top));
5002
- if (opts.bottom) children.push(createThemeableLine(opts.bottom));
5003
- if (opts.insideH) children.push(createThemeableLine(opts.insideH));
5004
- if (opts.insideV) children.push(createThemeableLine(opts.insideV));
5009
+ for (const [key, name] of BORDER_SIDES) {
5010
+ const line = opts[key];
5011
+ if (line) children.push(element(name, void 0, [createThemeableLine(line)]));
5012
+ }
5005
5013
  return element("a:tcBdr", void 0, children);
5006
5014
  }
5007
5015
  function buildTextStyle(opts) {
@@ -5082,6 +5090,128 @@ function createTableStyleList(opts) {
5082
5090
  def: opts.defaultStyleId
5083
5091
  }, children.length > 0 ? children : void 0);
5084
5092
  }
5093
+ /**
5094
+ * Serialize a single parsed element. `stringify` treats its argument as a
5095
+ * document root and serializes the `elements` array, so wrap the child to
5096
+ * serialize the child itself (round-trips raw color/fill child elements).
5097
+ */
5098
+ function serializeChild(child) {
5099
+ return stringify({ elements: [child] });
5100
+ }
5101
+ /** Reverse of REGION_ELEMENTS: XML element name → region key. */
5102
+ const ELEMENT_TO_REGION = Object.fromEntries(Object.entries(REGION_ELEMENTS).map(([region, name]) => [name, region]));
5103
+ /** Parse a:tblStyleLst → TableStyleListOptions (reverse of createTableStyleList). */
5104
+ function parseTableStyleList(el) {
5105
+ const defaultStyleId = attr(el, "def") ?? "";
5106
+ const styles = [];
5107
+ for (const child of el.elements ?? []) {
5108
+ if (child.name !== "a:tblStyle") continue;
5109
+ const style = parseTableStyle(child);
5110
+ if (style) styles.push(style);
5111
+ }
5112
+ return {
5113
+ defaultStyleId,
5114
+ ...styles.length > 0 ? { styles } : {}
5115
+ };
5116
+ }
5117
+ function parseTableStyle(el) {
5118
+ const styleId = attr(el, "styleId");
5119
+ const styleName = attr(el, "styleName");
5120
+ if (styleId === void 0 || styleName === void 0) return void 0;
5121
+ const regions = {};
5122
+ for (const child of el.elements ?? []) {
5123
+ if (!child.name) continue;
5124
+ const region = ELEMENT_TO_REGION[child.name];
5125
+ if (!region) continue;
5126
+ const part = parsePartStyle(child);
5127
+ if (part) regions[region] = part;
5128
+ }
5129
+ return {
5130
+ styleId,
5131
+ styleName,
5132
+ ...Object.keys(regions).length > 0 ? { regions } : {}
5133
+ };
5134
+ }
5135
+ function parsePartStyle(el) {
5136
+ const part = {};
5137
+ const txStyle = findChild(el, "a:tcTxStyle");
5138
+ if (txStyle) {
5139
+ const text = parseTableTextStyle(txStyle);
5140
+ if (text) part.text = text;
5141
+ }
5142
+ const cellStyle = findChild(el, "a:tcStyle");
5143
+ if (cellStyle) {
5144
+ const cell = parseTableCellStyle(cellStyle);
5145
+ if (cell) part.cell = cell;
5146
+ }
5147
+ return Object.keys(part).length > 0 ? part : void 0;
5148
+ }
5149
+ function parseTableTextStyle(el) {
5150
+ const opts = {};
5151
+ const b = attr(el, "b");
5152
+ if (b === "on" || b === "off") opts.bold = b;
5153
+ const i = attr(el, "i");
5154
+ if (i === "on" || i === "off") opts.italic = i;
5155
+ const fontRefEl = findChild(el, "a:fontRef");
5156
+ if (fontRefEl) opts.fontRef = parseStyleMatrixRef(fontRefEl);
5157
+ for (const child of el.elements ?? []) {
5158
+ if (child.name === "a:fontRef") continue;
5159
+ opts.color = serializeChild(child);
5160
+ break;
5161
+ }
5162
+ return Object.keys(opts).length > 0 ? opts : void 0;
5163
+ }
5164
+ function parseTableCellStyle(el) {
5165
+ const opts = {};
5166
+ const tcBdr = findChild(el, "a:tcBdr");
5167
+ if (tcBdr) {
5168
+ const borders = parseCellBorders(tcBdr);
5169
+ if (borders) opts.borders = borders;
5170
+ }
5171
+ const fillRefEl = findChild(el, "a:fillRef");
5172
+ if (fillRefEl) opts.fillRef = parseStyleMatrixRef(fillRefEl);
5173
+ else for (const child of el.elements ?? []) {
5174
+ if (child.name === "a:tcBdr") continue;
5175
+ opts.fill = serializeChild(child);
5176
+ break;
5177
+ }
5178
+ return Object.keys(opts).length > 0 ? opts : void 0;
5179
+ }
5180
+ function parseCellBorders(el) {
5181
+ const borders = {};
5182
+ for (const [key, name] of BORDER_SIDES) {
5183
+ const borderEl = findChild(el, name);
5184
+ if (!borderEl) continue;
5185
+ const lineEl = borderEl.elements?.find((c) => c.type === "element");
5186
+ if (!lineEl) continue;
5187
+ const line = parseThemeableLine(lineEl);
5188
+ if (line) borders[key] = line;
5189
+ }
5190
+ return Object.keys(borders).length > 0 ? borders : void 0;
5191
+ }
5192
+ function parseThemeableLine(el) {
5193
+ const opts = {};
5194
+ if (el.name === "a:lnRef") {
5195
+ const idx = attrNum(el, "idx");
5196
+ if (idx !== void 0) opts.lineRefIdx = idx;
5197
+ } else {
5198
+ const w = attrNum(el, "w");
5199
+ if (w !== void 0) opts.width = w;
5200
+ }
5201
+ for (const child of el.elements ?? []) {
5202
+ opts.color = serializeChild(child);
5203
+ break;
5204
+ }
5205
+ return Object.keys(opts).length > 0 ? opts : void 0;
5206
+ }
5207
+ function parseStyleMatrixRef(el) {
5208
+ const opts = { idx: attrNum(el, "idx") ?? 0 };
5209
+ for (const child of el.elements ?? []) {
5210
+ opts.color = serializeChild(child);
5211
+ break;
5212
+ }
5213
+ return opts;
5214
+ }
5085
5215
  //#endregion
5086
5216
  //#region src/drawingml/locking/locking.ts
5087
5217
  /**
@@ -5654,24 +5784,33 @@ function getColorDescriptor(color) {
5654
5784
  if (SCHEME_COLOR_VALUES.has(colorValue)) return schemeColorDesc;
5655
5785
  return rgbColorDesc;
5656
5786
  }
5787
+ /**
5788
+ * Parse an EG_ColorChoice from an element's direct children. Handles all six
5789
+ * color element kinds (srgbClr/schemeClr/hslClr/sysClr/prstClr/scrgbClr) —
5790
+ * used both by {@link solidFillDesc} (under a:solidFill) and by fill
5791
+ * descriptors reading direct colors under a:gs / a:fgClr / a:bgClr.
5792
+ */
5793
+ function parseColorChoice(el, ctx) {
5794
+ if (!el.elements) return {};
5795
+ for (const child of el.elements) switch (child.name) {
5796
+ case "a:srgbClr": return rgbColorDesc.parse(child, ctx);
5797
+ case "a:schemeClr": return schemeColorDesc.parse(child, ctx);
5798
+ case "a:hslClr": return hslColorDesc.parse(child, ctx);
5799
+ case "a:sysClr": return systemColorDesc.parse(child, ctx);
5800
+ case "a:prstClr": return presetColorDesc.parse(child, ctx);
5801
+ case "a:scrgbClr": return scRgbColorDesc.parse(child, ctx);
5802
+ }
5803
+ return {};
5804
+ }
5657
5805
  const solidFillDesc = {
5658
5806
  kind: "custom",
5659
5807
  stringify(color, ctx) {
5660
- const inner = stringify(getColorDescriptor(color), color, ctx);
5808
+ const inner = stringify$1(getColorDescriptor(color), color, ctx);
5661
5809
  if (!inner) return void 0;
5662
5810
  return `<a:solidFill>${inner}</a:solidFill>`;
5663
5811
  },
5664
5812
  parse(el, _ctx) {
5665
- if (!el.elements) return {};
5666
- for (const child of el.elements) switch (child.name) {
5667
- case "a:srgbClr": return rgbColorDesc.parse(child, _ctx);
5668
- case "a:schemeClr": return schemeColorDesc.parse(child, _ctx);
5669
- case "a:hslClr": return hslColorDesc.parse(child, _ctx);
5670
- case "a:sysClr": return systemColorDesc.parse(child, _ctx);
5671
- case "a:prstClr": return presetColorDesc.parse(child, _ctx);
5672
- case "a:scrgbClr": return scRgbColorDesc.parse(child, _ctx);
5673
- }
5674
- return {};
5813
+ return parseColorChoice(el, _ctx);
5675
5814
  }
5676
5815
  };
5677
5816
  //#endregion
@@ -5716,7 +5855,7 @@ const gradientFillDesc = {
5716
5855
  stringify(opts, ctx) {
5717
5856
  const parts = [];
5718
5857
  const stopsXml = opts.stops.map((stop) => {
5719
- const colorXml = stringify(getColorDescriptor(stop.color), stop.color, ctx);
5858
+ const colorXml = stringify$1(getColorDescriptor(stop.color), stop.color, ctx);
5720
5859
  if (!colorXml) return `<a:gs pos="${stop.position}"/>`;
5721
5860
  return `<a:gs pos="${stop.position}">${colorXml}</a:gs>`;
5722
5861
  }).join("");
@@ -5766,11 +5905,11 @@ const patternFillDesc = {
5766
5905
  const parts = [];
5767
5906
  const prst = xsdPattern.to(opts.pattern);
5768
5907
  if (opts.foregroundColor) {
5769
- const colorXml = stringify(getColorDescriptor(opts.foregroundColor), opts.foregroundColor, ctx);
5908
+ const colorXml = stringify$1(getColorDescriptor(opts.foregroundColor), opts.foregroundColor, ctx);
5770
5909
  if (colorXml) parts.push(`<a:fgClr>${colorXml}</a:fgClr>`);
5771
5910
  }
5772
5911
  if (opts.backgroundColor) {
5773
- const colorXml = stringify(getColorDescriptor(opts.backgroundColor), opts.backgroundColor, ctx);
5912
+ const colorXml = stringify$1(getColorDescriptor(opts.backgroundColor), opts.backgroundColor, ctx);
5774
5913
  if (colorXml) parts.push(`<a:bgClr>${colorXml}</a:bgClr>`);
5775
5914
  }
5776
5915
  const inner = parts.join("");
@@ -5790,12 +5929,12 @@ const patternFillDesc = {
5790
5929
  const fillDesc = {
5791
5930
  kind: "custom",
5792
5931
  stringify(opts, ctx) {
5793
- if (typeof opts === "string") return stringify(solidFillDesc, { value: opts.replace("#", "") }, ctx);
5932
+ if (typeof opts === "string") return stringify$1(solidFillDesc, { value: opts.replace("#", "") }, ctx);
5794
5933
  switch (opts.type) {
5795
5934
  case "none": return "<a:noFill/>";
5796
- case "solid": return stringify(solidFillDesc, typeof opts.color === "string" ? { value: opts.color.replace("#", "") } : opts.color, ctx);
5935
+ case "solid": return stringify$1(solidFillDesc, typeof opts.color === "string" ? { value: opts.color.replace("#", "") } : opts.color, ctx);
5797
5936
  case "gradient": {
5798
- if ("options" in opts) return stringify(gradientFillDesc, opts.options, ctx);
5937
+ if ("options" in opts) return stringify$1(gradientFillDesc, opts.options, ctx);
5799
5938
  const gradOpts = { stops: opts.stops.map((stop) => ({
5800
5939
  position: stop.position * 1e3,
5801
5940
  color: typeof stop.color === "string" ? { value: stop.color.replace("#", "") } : stop.color
@@ -5805,10 +5944,10 @@ const fillDesc = {
5805
5944
  scaled: opts.scaled ?? true
5806
5945
  };
5807
5946
  if (opts.path) gradOpts.shade = { path: opts.path };
5808
- return stringify(gradientFillDesc, gradOpts, ctx);
5947
+ return stringify$1(gradientFillDesc, gradOpts, ctx);
5809
5948
  }
5810
5949
  case "blip": return;
5811
- case "pattern": return stringify(patternFillDesc, {
5950
+ case "pattern": return stringify$1(patternFillDesc, {
5812
5951
  pattern: opts.pattern,
5813
5952
  ...opts.foregroundColor && { foregroundColor: typeof opts.foregroundColor === "string" ? { value: opts.foregroundColor.replace("#", "") } : opts.foregroundColor },
5814
5953
  ...opts.backgroundColor && { backgroundColor: typeof opts.backgroundColor === "string" ? { value: opts.backgroundColor.replace("#", "") } : opts.backgroundColor }
@@ -5839,10 +5978,8 @@ const fillDesc = {
5839
5978
  }
5840
5979
  };
5841
5980
  function readDirectColor(el, ctx) {
5842
- for (const child of el.elements ?? []) switch (child.name) {
5843
- case "a:srgbClr": return rgbColorDesc.parse(child, ctx);
5844
- case "a:schemeClr": return schemeColorDesc.parse(child, ctx);
5845
- }
5981
+ const color = parseColorChoice(el, ctx);
5982
+ if (Object.keys(color).length > 0) return color;
5846
5983
  const solidFill = findChild(el, "a:solidFill");
5847
5984
  if (solidFill) return parse(solidFillDesc, solidFill, ctx);
5848
5985
  return { value: "" };
@@ -5883,10 +6020,10 @@ const outlineDesc = {
5883
6020
  const attrStr = attrParts.length ? " " + attrParts.join(" ") : "";
5884
6021
  if (opts.type === "noFill") parts.push("<a:noFill/>");
5885
6022
  else if (opts.type === "solidFill" && opts.color) {
5886
- const fillXml = stringify(solidFillDesc, opts.color, ctx);
6023
+ const fillXml = stringify$1(solidFillDesc, opts.color, ctx);
5887
6024
  if (fillXml) parts.push(fillXml);
5888
6025
  } else if (opts.type === "gradFill" && opts.gradientFill) {
5889
- const gradXml = stringify(gradientFillDesc, opts.gradientFill, ctx);
6026
+ const gradXml = stringify$1(gradientFillDesc, opts.gradientFill, ctx);
5890
6027
  if (gradXml) parts.push(gradXml);
5891
6028
  }
5892
6029
  if (opts.customDash) parts.push(stringifyCustomDash(opts.customDash));
@@ -5949,7 +6086,7 @@ const outlineDesc = {
5949
6086
  */
5950
6087
  function stringifyEffectColor(color, ctx) {
5951
6088
  if (!color) return void 0;
5952
- return stringify(getColorDesc(color), color, ctx);
6089
+ return stringify$1(getColorDesc(color), color, ctx);
5953
6090
  }
5954
6091
  function getColorDesc(color) {
5955
6092
  if ("hue" in color && "saturation" in color && "luminance" in color) {}
@@ -6224,7 +6361,7 @@ const presetGeometryDesc = {
6224
6361
  stringify(opts, ctx) {
6225
6362
  const prst = opts.preset ?? "rect";
6226
6363
  let avXml = "";
6227
- if (opts.adjustmentValues) avXml = stringify(adjustmentValuesDesc, opts.adjustmentValues, ctx) ?? "<a:avLst/>";
6364
+ if (opts.adjustmentValues) avXml = stringify$1(adjustmentValuesDesc, opts.adjustmentValues, ctx) ?? "<a:avLst/>";
6228
6365
  else avXml = "<a:avLst/>";
6229
6366
  return `<a:prstGeom prst="${escapeXml(prst)}">${avXml}</a:prstGeom>`;
6230
6367
  },
@@ -6234,7 +6371,7 @@ const presetGeometryDesc = {
6234
6371
  const avLst = findChild(el, "a:avLst");
6235
6372
  if (avLst) {
6236
6373
  const guides = parse(adjustmentValuesDesc, avLst, ctx);
6237
- if (Array.isArray(guides) && guides.length > 0) result.adjustmentValues = guides;
6374
+ if (guides.length > 0) result.adjustmentValues = guides;
6238
6375
  }
6239
6376
  return result;
6240
6377
  }
@@ -6653,19 +6790,19 @@ const shape3DDesc = {
6653
6790
  stringify(opts, ctx) {
6654
6791
  const parts = [];
6655
6792
  if (opts.bevelT) {
6656
- const bevelXml = stringify(bevelDesc, opts.bevelT, ctx);
6793
+ const bevelXml = stringify$1(bevelDesc, opts.bevelT, ctx);
6657
6794
  if (bevelXml) parts.push(bevelXml.replace("<a:bevel", "<a:bevelT"));
6658
6795
  }
6659
6796
  if (opts.bevelB) {
6660
- const bevelXml = stringify(bevelDesc, opts.bevelB, ctx);
6797
+ const bevelXml = stringify$1(bevelDesc, opts.bevelB, ctx);
6661
6798
  if (bevelXml) parts.push(bevelXml.replace("<a:bevel", "<a:bevelB"));
6662
6799
  }
6663
6800
  if (opts.extrusionColor) {
6664
- const colorXml = stringify(solidFillDesc, opts.extrusionColor, ctx);
6801
+ const colorXml = stringify$1(solidFillDesc, opts.extrusionColor, ctx);
6665
6802
  if (colorXml) parts.push(`<a:extrusionClr>${colorXml}</a:extrusionClr>`);
6666
6803
  }
6667
6804
  if (opts.contourColor) {
6668
- const colorXml = stringify(solidFillDesc, opts.contourColor, ctx);
6805
+ const colorXml = stringify$1(solidFillDesc, opts.contourColor, ctx);
6669
6806
  if (colorXml) parts.push(`<a:contourClr>${colorXml}</a:contourClr>`);
6670
6807
  }
6671
6808
  const attrParts = [];
@@ -6752,9 +6889,9 @@ const scene3DDesc = {
6752
6889
  kind: "custom",
6753
6890
  stringify(opts, ctx) {
6754
6891
  const parts = [];
6755
- const cameraXml = stringify(cameraDesc, opts.camera, ctx);
6892
+ const cameraXml = stringify$1(cameraDesc, opts.camera, ctx);
6756
6893
  if (cameraXml) parts.push(cameraXml);
6757
- const lightRigXml = stringify(lightRigDesc, opts.lightRig, ctx);
6894
+ const lightRigXml = stringify$1(lightRigDesc, opts.lightRig, ctx);
6758
6895
  if (lightRigXml) parts.push(lightRigXml);
6759
6896
  if (opts.backdrop) parts.push(stringifyBackdrop(opts.backdrop));
6760
6897
  const content = parts.join("");
@@ -6914,8 +7051,8 @@ function stringifyBlipEffects(opts, ctx) {
6914
7051
  parts.push(`<a:tint${attrStr}/>`);
6915
7052
  }
6916
7053
  if (opts.duotone) {
6917
- const c1 = stringify(solidFillDesc, opts.duotone.color1, ctx);
6918
- const c2 = stringify(solidFillDesc, opts.duotone.color2, ctx);
7054
+ const c1 = stringify$1(solidFillDesc, opts.duotone.color1, ctx);
7055
+ const c2 = stringify$1(solidFillDesc, opts.duotone.color2, ctx);
6919
7056
  parts.push(`<a:duotone>${c1 ?? ""}${c2 ?? ""}</a:duotone>`);
6920
7057
  }
6921
7058
  if (opts.biLevel) parts.push(`<a:biLevel thresh="${opts.biLevel.threshold}%"/>`);
@@ -6923,7 +7060,7 @@ function stringifyBlipEffects(opts, ctx) {
6923
7060
  if (opts.alphaFloor) parts.push("<a:alphaFloor/>");
6924
7061
  if (opts.alphaInverse !== void 0) if (typeof opts.alphaInverse === "boolean") parts.push("<a:alphaInv/>");
6925
7062
  else {
6926
- const colorXml = stringify(solidFillDesc, opts.alphaInverse, ctx);
7063
+ const colorXml = stringify$1(solidFillDesc, opts.alphaInverse, ctx);
6927
7064
  parts.push(`<a:alphaInv>${colorXml ?? ""}</a:alphaInv>`);
6928
7065
  }
6929
7066
  if (opts.alphaModFix) {
@@ -6933,15 +7070,15 @@ function stringifyBlipEffects(opts, ctx) {
6933
7070
  if (opts.alphaRepl) parts.push(`<a:alphaRepl a="${opts.alphaRepl.amount}%"/>`);
6934
7071
  if (opts.alphaBiLevel) parts.push(`<a:alphaBiLevel thresh="${opts.alphaBiLevel.threshold}%"/>`);
6935
7072
  if (opts.colorChange) {
6936
- const fromXml = stringify(solidFillDesc, opts.colorChange.from, ctx);
6937
- const toXml = stringify(solidFillDesc, opts.colorChange.to, ctx);
7073
+ const fromXml = stringify$1(solidFillDesc, opts.colorChange.from, ctx);
7074
+ const toXml = stringify$1(solidFillDesc, opts.colorChange.to, ctx);
6938
7075
  const attrParts = [];
6939
7076
  if (opts.colorChange.useAlpha === false) attrParts.push("useA=\"0\"");
6940
7077
  const attrStr = attrParts.length ? " " + attrParts.join(" ") : "";
6941
7078
  parts.push(`<a:clrChange${attrStr}><a:clrFrom>${fromXml ?? ""}</a:clrFrom><a:clrTo>${toXml ?? ""}</a:clrTo></a:clrChange>`);
6942
7079
  }
6943
7080
  if (opts.colorRepl) {
6944
- const colorXml = stringify(solidFillDesc, opts.colorRepl.color, ctx);
7081
+ const colorXml = stringify$1(solidFillDesc, opts.colorRepl.color, ctx);
6945
7082
  parts.push(`<a:clrRepl>${colorXml ?? ""}</a:clrRepl>`);
6946
7083
  }
6947
7084
  if (opts.blur) {
@@ -7074,18 +7211,18 @@ const blipFillDesc = {
7074
7211
  const attrStr = attrParts.length ? " " + attrParts.join(" ") : "";
7075
7212
  const parts = [];
7076
7213
  if (opts.referenceId) {
7077
- const blipXml = stringify(blipDesc, {
7214
+ const blipXml = stringify$1(blipDesc, {
7078
7215
  referenceId: opts.referenceId,
7079
7216
  blipEffects: opts.blipEffects
7080
7217
  }, ctx);
7081
7218
  if (blipXml) parts.push(blipXml);
7082
7219
  }
7083
7220
  if (opts.srcRect) {
7084
- const srcRectXml = stringify(sourceRectangleDesc, opts.srcRect, ctx);
7221
+ const srcRectXml = stringify$1(sourceRectangleDesc, opts.srcRect, ctx);
7085
7222
  if (srcRectXml) parts.push(srcRectXml);
7086
7223
  }
7087
7224
  if (opts.tile) {
7088
- const tileXml = stringify(tileDesc, opts.tile, ctx);
7225
+ const tileXml = stringify$1(tileDesc, opts.tile, ctx);
7089
7226
  if (tileXml) parts.push(tileXml);
7090
7227
  } else parts.push("<a:stretch><a:fillRect/></a:stretch>");
7091
7228
  const content = parts.join("");
@@ -7474,4 +7611,4 @@ function replaceHyperlinkPlaceholders(xml, hyperlinks, offset) {
7474
7611
  return replacePlaceholders(xml, map);
7475
7612
  }
7476
7613
  //#endregion
7477
- export { systemColorDesc as $, xsdBlendMode as $n, TargetModeType as $r, convertUniversalMeasureToTwip as $t, bevelDesc as A, LineCap as An, PresetColor as Ar, createChPref as At, shapeLockingDesc as B, createGroupFill as Bn, strFromU8$1 as Br, createTransformation as Bt, diagramStyleDesc as C, RectAlignment as Cn, createSolidFill as Cr, AnimOneValue as Ct, sourceRectangleDesc as D, BlendMode as Dn, createSchemeColor as Dr, createAnimLvl as Dt, blipFillDesc as E, createGlowEffect as En, SchemeColor as Er, createAdjLst as Et, customGeometryDesc as F, LineEndLength as Fn, parseArchive as Fr, createGroupLocking as Ft, patternFillDesc as G, createPatternFill as Gn, OoxmlMimeType as Gr, convertInchesToTwip as Gt, outlineDesc as H, buildFill as Hn, unzipSync$1 as Hr, convertEmuToPixels as Ht, presetGeometryDesc as I, LineEndType as In, ZIP_DEFLATE_LEVEL as Ir, createPictureLocking as It, presetColorDesc as J, createGradientFill as Jn, buildCorePropertiesXmlString as Jr, convertPointsToEmu as Jt, getColorDescriptor as K, PathShadeType as Kn, convertOutput as Kr, convertMillimetersToTwip as Kt, graphicFrameLockingDesc as L, LineEndWidth as Ln, ZIP_STORED_LEVEL as Lr, createShapeLocking as Lt, shape3DDesc as M, PenAlignment as Mn, createHslColor as Mr, createOrgChart as Mt, groupTransform2DDesc as N, PresetDash as Nn, createColorTransforms as Nr, createPresLayoutVars as Nt, stretchDesc as O, createFillOverlayEffect as On, createScRgbColor as Or, createAnimOne as Ot, transform2DDesc as P, createOutline as Pn, ParsedArchive as Pr, createGraphicFrameLocking as Pt, solidFillDesc as Q, invertMap as Qn, Relationships as Qr, convertUniversalMeasureToEmu as Qt, groupLockingDesc as R, createLineEnd as Rn, createPacker as Rr, createTableStyle as Rt, diagramRelIdsDesc as S, createPresetShadowEffect as Sn, createColorElement as Sr, AnimLevelValue as St, blipDesc as T, createInnerShadowEffect as Tn, createSystemColor as Tr, createAdj as Tt, fillDesc as U, extractBlipFillMedia as Un, zipAndConvert as Ur, convertEmuToPoints as Ut, effectListDesc as V, createNoFill as Vn, toUint8Array$1 as Vr, convertEmuToInches as Vt, gradientFillDesc as W, PresetPattern as Wn, zipSyncAndConvert as Wr, convertInchesToEmu as Wt, scRgbColorDesc as X, TileAlignment as Xn, createDefault as Xr, convertToEmu as Xt, rgbColorDesc as Y, createGradientStop as Yn, parseCorePropsElement as Yr, convertPositionToEmu as Yt, schemeColorDesc as Z, createTileInfo as Zn, createOverride as Zr, convertToTwip as Zt, derivePasswordHash as _, calculateEffectExtent as _n, createBlipEffects as _r, createColorsDefHdrLst as _t, getMediaRefs as a, createBlip as an, xsdPathFillMode as ar, FontCollectionIndex as at, compileMapping as b, createReflectionEffect as bn, uniqueNumericIdCreator as br, createStyleDefHdr as bt, hasPlaceholders as c, stringifyPresetGeometry as cn, xsdPresetShadow as cr, createDiagramStyle as ct, replaceHyperlinkPlaceholders as d, createShape3D as dn, xsdTextAlign as dr, createLinClrLst as dt, APP_PROPS_XML as ei, parseUniversalMeasure as en, xsdCompoundLine as er, createDiagramExtLst as et, replaceImagePlaceholders as f, BevelPresetType as fn, xsdTextAnchor as fr, createStyleLbl as ft, replaceVideoPlaceholders as g, createEffectDag as gn, createSourceRectangle as gr, createColorsDefHdr as gt, replaceSmartArtPlaceholders as h, createScene3D as hn, xsdVerticalMergeRev as hr, createTxLinClrLst as ht, formatId as i, createBlipFill as in, xsdMaterialType as ir, ColorMethod as it, scene3DDesc as j, LineJoin as jn, createPresetColor as jr, createHierBranch as jt, tileDesc as k, CompoundLine as kn, createRgbColor as kr, createChMax as kt, replaceAllPlaceholders as l, stringifyAdjustmentValues as ln, xsdRectAlignment as lr, createEffectClrLst as lt, replaceNumberingPlaceholders as m, createBottomBevel as mn, xsdUnderlineStyle as mr, createTxFillClrLst as mt, collectPlaceholderKeys as n, createTransform2D as nn, xsdLineCap as nr, createDiagramTxPr as nt, getReferencedMedia as o, createExtentionList as on, xsdPattern as or, HueDirection as ot, replaceMediaPlaceholders as p, createBevel as pn, xsdTextCaps as pr, createTxEffectClrLst as pt, hslColorDesc as q, TileFlipMode as qn, buildCorePropertiesXml as qr, convertPixelsToEmu as qt, findAndReplaceImagePlaceholders as r, stringifyStretch as rn, xsdLineEndSize as rr, createDiagramRelIds as rt, getVideoRefs as s, createCustomGeometry as sn, xsdPenAlignment as sr, StyleMatrixIndex as st, addSmartArtRelationships as t, createGroupTransform2D as tn, xsdEffectContainer as tr, createDiagramSp3d as tt, replaceChartPlaceholders as u, PresetMaterialType as un, xsdStrikeStyle as ur, createFillClrLst as ut, hashPasswordAgile as v, createEffectList as vn, hashedId as vr, createLayoutDefHdr as vt, presLayoutVarsDesc as w, createOuterShadowEffect as wn, SystemColor as wr, HierBranchStyle as wt, diagramExtLstDesc as x, PresetShadowVal as xn, uniqueUuid as xr, createStyleDefHdrLst as xt, randomBytes as y, createSoftEdgeEffect as yn, uniqueId as yr, createLayoutDefHdrLst as yt, pictureLockingDesc as z, createCustomDash as zn, createZipStream as zr, createTableStyleList as zt };
7614
+ export { solidFillDesc as $, createTileInfo as $n, createOverride as $r, convertToTwip as $t, bevelDesc as A, createFillOverlayEffect as An, createScRgbColor as Ar, createChMax as At, shapeLockingDesc as B, createLineEnd as Bn, createPacker as Br, createTableStyleList as Bt, diagramStyleDesc as C, PresetShadowVal as Cn, uniqueUuid as Cr, AnimLevelValue as Ct, sourceRectangleDesc as D, createInnerShadowEffect as Dn, createSystemColor as Dr, createAdjLst as Dt, blipFillDesc as E, createOuterShadowEffect as En, SystemColor as Er, createAdj as Et, customGeometryDesc as F, PresetDash as Fn, createColorTransforms as Fr, createGraphicFrameLocking as Ft, patternFillDesc as G, extractBlipFillMedia as Gn, zipAndConvert as Gr, convertEmuToPoints as Gt, outlineDesc as H, createGroupFill as Hn, strFromU8$1 as Hr, createTransformation as Ht, presetGeometryDesc as I, createOutline as In, ParsedArchive as Ir, createGroupLocking as It, parseColorChoice as J, PathShadeType as Jn, convertOutput as Jr, convertMillimetersToTwip as Jt, getColorDescriptor as K, PresetPattern as Kn, zipSyncAndConvert as Kr, convertInchesToEmu as Kt, graphicFrameLockingDesc as L, LineEndLength as Ln, parseArchive as Lr, createPictureLocking as Lt, shape3DDesc as M, LineCap as Mn, PresetColor as Mr, createHierBranch as Mt, groupTransform2DDesc as N, LineJoin as Nn, createPresetColor as Nr, createOrgChart as Nt, stretchDesc as O, createGlowEffect as On, SchemeColor as Or, createAnimLvl as Ot, transform2DDesc as P, PenAlignment as Pn, createHslColor as Pr, createPresLayoutVars as Pt, schemeColorDesc as Q, TileAlignment as Qn, createDefault as Qr, convertToEmu as Qt, groupLockingDesc as R, LineEndType as Rn, ZIP_DEFLATE_LEVEL as Rr, createShapeLocking as Rt, diagramRelIdsDesc as S, createReflectionEffect as Sn, uniqueNumericIdCreator as Sr, createStyleDefHdrLst as St, blipDesc as T, RectAlignment as Tn, createSolidFill as Tr, HierBranchStyle as Tt, fillDesc as U, createNoFill as Un, toUint8Array$1 as Ur, convertEmuToInches as Ut, effectListDesc as V, createCustomDash as Vn, createZipStream as Vr, parseTableStyleList as Vt, gradientFillDesc as W, buildFill as Wn, unzipSync$1 as Wr, convertEmuToPixels as Wt, rgbColorDesc as X, createGradientFill as Xn, buildCorePropertiesXmlString as Xr, convertPointsToEmu as Xt, presetColorDesc as Y, TileFlipMode as Yn, buildCorePropertiesXml as Yr, convertPixelsToEmu as Yt, scRgbColorDesc as Z, createGradientStop as Zn, parseCorePropsElement as Zr, convertPositionToEmu as Zt, derivePasswordHash as _, createScene3D as _n, xsdVerticalMergeRev as _r, createColorsDefHdr as _t, getMediaRefs as a, stringifyStretch as an, xsdLineEndSize as ar, ColorMethod as at, compileMapping as b, createEffectList as bn, hashedId as br, createLayoutDefHdrLst as bt, hasPlaceholders as c, createExtentionList as cn, xsdPattern as cr, StyleMatrixIndex as ct, replaceHyperlinkPlaceholders as d, stringifyAdjustmentValues as dn, xsdRectAlignment as dr, createFillClrLst as dt, Relationships as ei, convertUniversalMeasureToEmu as en, invertMap as er, systemColorDesc as et, replaceImagePlaceholders as f, PresetMaterialType as fn, xsdStrikeStyle as fr, createLinClrLst as ft, replaceVideoPlaceholders as g, createBottomBevel as gn, xsdUnderlineStyle as gr, createTxLinClrLst as gt, replaceSmartArtPlaceholders as h, createBevel as hn, xsdTextCaps as hr, createTxFillClrLst as ht, formatId as i, createTransform2D as in, xsdLineCap as ir, createDiagramRelIds as it, scene3DDesc as j, CompoundLine as jn, createRgbColor as jr, createChPref as jt, tileDesc as k, BlendMode as kn, createSchemeColor as kr, createAnimOne as kt, replaceAllPlaceholders as l, createCustomGeometry as ln, xsdPenAlignment as lr, createDiagramStyle as lt, replaceNumberingPlaceholders as m, BevelPresetType as mn, xsdTextAnchor as mr, createTxEffectClrLst as mt, collectPlaceholderKeys as n, APP_PROPS_XML as ni, parseUniversalMeasure as nn, xsdCompoundLine as nr, createDiagramSp3d as nt, getReferencedMedia as o, createBlipFill as on, xsdMaterialType as or, FontCollectionIndex as ot, replaceMediaPlaceholders as p, createShape3D as pn, xsdTextAlign as pr, createStyleLbl as pt, hslColorDesc as q, createPatternFill as qn, OoxmlMimeType as qr, convertInchesToTwip as qt, findAndReplaceImagePlaceholders as r, createGroupTransform2D as rn, xsdEffectContainer as rr, createDiagramTxPr as rt, getVideoRefs as s, createBlip as sn, xsdPathFillMode as sr, HueDirection as st, addSmartArtRelationships as t, TargetModeType as ti, convertUniversalMeasureToTwip as tn, xsdBlendMode as tr, createDiagramExtLst as tt, replaceChartPlaceholders as u, stringifyPresetGeometry as un, xsdPresetShadow as ur, createEffectClrLst as ut, hashPasswordAgile as v, createEffectDag as vn, createSourceRectangle as vr, createColorsDefHdrLst as vt, presLayoutVarsDesc as w, createPresetShadowEffect as wn, createColorElement as wr, AnimOneValue as wt, diagramExtLstDesc as x, createSoftEdgeEffect as xn, uniqueId as xr, createStyleDefHdr as xt, randomBytes as y, calculateEffectExtent as yn, createBlipEffects as yr, createLayoutDefHdr as yt, pictureLockingDesc as z, LineEndWidth as zn, ZIP_STORED_LEVEL as zr, createTableStyle as zt };
@@ -1,2 +1,2 @@
1
- import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "../index-BKotL3AP.mjs";
1
+ import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "../index-4hjRdzMU.mjs";
2
2
  export { type ColorSchemeOptions, DEFAULT_COLORS, type FontSchemeOptions, type ThemeOptions, buildThemeXml, createThemeXml, themeDesc };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-open/core",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "Shared OOXML infrastructure — XML components, validators, converters, charts, and SmartArt",
5
5
  "keywords": [
6
6
  "core",
@@ -66,7 +66,7 @@
66
66
  "dependencies": {
67
67
  "@noble/hashes": "2.2.0",
68
68
  "fflate": "0.8.3",
69
- "@office-open/xml": "0.9.3"
69
+ "@office-open/xml": "0.9.5"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "basis build --stub",