@json-to-office/core-docx 3.0.0 → 3.1.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.
package/dist/index.js CHANGED
@@ -12488,6 +12488,7 @@ function tableDesignFact(props, path4, theme, themeName, authored) {
12488
12488
  alignment: alignments.size === 1 ? [...alignments][0] : alignments.size === 0 ? "left" : "mixed",
12489
12489
  hasCellDefaults: asRecord(authoredColumn.cellDefaults) !== void 0,
12490
12490
  hasHeader: asRecord(authoredColumn.header) !== void 0,
12491
+ generated: false,
12491
12492
  cellsWithOwnAlignment: cells.flatMap((cell, cellIndex) => {
12492
12493
  const alignment2 = asRecord(cell)?.horizontalAlignment;
12493
12494
  return typeof alignment2 === "string" && DOCX_ALIGNMENTS.has(alignment2) && alignment2 !== "right" ? [cellIndex] : [];
@@ -12837,7 +12838,19 @@ function prepareDocxQualityDocument(document, options = {}) {
12837
12838
  context.themeName,
12838
12839
  authoredPropsAt(path4)
12839
12840
  );
12840
- if (design) addFact(design);
12841
+ if (design)
12842
+ addFact({
12843
+ ...design,
12844
+ columns: design.columns.map((column) => {
12845
+ const authored = authoredPath(column.path);
12846
+ const table2 = /^(.*)\/props\/columns\/\d+$/.exec(authored)?.[1];
12847
+ return {
12848
+ ...column,
12849
+ path: authored,
12850
+ generated: table2 === void 0 || asRecord(nodeAtPointer(themed.document, table2))?.name !== "table"
12851
+ };
12852
+ })
12853
+ });
12841
12854
  }
12842
12855
  if (node.name === "chart" || node.name === "highcharts") {
12843
12856
  const fact = chartFact(node, props, path4, paletteTokens);
@@ -13929,6 +13942,7 @@ var docxTableDesignRule = {
13929
13942
  }
13930
13943
  };
13931
13944
  function alignColumnRight(column) {
13945
+ if (column.generated) return [];
13932
13946
  const operations = [
13933
13947
  column.hasCellDefaults ? {
13934
13948
  op: "add",