ooxml-core 1.12.0 → 1.12.2

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 (59) hide show
  1. package/README.md +1 -1
  2. package/dist/{PptxHandler-NROFYT2N.mjs → PptxHandler-FIN6XDTI.mjs} +2 -2
  3. package/dist/{PptxHandler-E44KDHMQ.mjs → PptxHandler-RWTOUCLC.mjs} +1 -1
  4. package/dist/{PptxHandler-DNZHAHUY.cjs → PptxHandler-UU4ZCT6H.cjs} +2 -2
  5. package/dist/{chunk-HCXUI5UC.mjs → chunk-6DELVMYB.mjs} +122 -7
  6. package/dist/{chunk-U2DF3EGK.mjs → chunk-B2JBBAEQ.mjs} +1 -1
  7. package/dist/{chunk-7DSZI7S6.mjs → chunk-G5PQKHCG.mjs} +1 -1
  8. package/dist/{chunk-EC2W2MDY.mjs → chunk-H2FRDUNV.mjs} +1 -1
  9. package/dist/{chunk-2UVH6RHI.cjs → chunk-IT3U6QD6.cjs} +22 -3
  10. package/dist/{chunk-YB5SRNFS.mjs → chunk-O6NIA4NG.mjs} +22 -3
  11. package/dist/{chunk-W5ARCUJB.mjs → chunk-TVE6UIJF.mjs} +3 -3
  12. package/dist/{chunk-DC4JDONB.mjs → chunk-V57HCOUM.mjs} +3 -0
  13. package/dist/{chunk-2V76L5AE.cjs → chunk-WVXCHFRU.cjs} +3 -0
  14. package/dist/docx/ui/index.cjs +15 -3
  15. package/dist/docx/ui/index.mjs +15 -3
  16. package/dist/docx/ui/review-commands.d.ts.map +1 -1
  17. package/dist/i18n/index.cjs +6 -0
  18. package/dist/i18n/index.mjs +6 -1
  19. package/dist/i18n/translator.d.ts +6 -0
  20. package/dist/i18n/translator.d.ts.map +1 -1
  21. package/dist/index.cjs +7 -1
  22. package/dist/index.mjs +7 -1
  23. package/dist/pptx/automation/index.cjs +22 -3
  24. package/dist/pptx/automation/index.d.ts +4 -4
  25. package/dist/pptx/automation/index.mjs +5 -5
  26. package/dist/pptx/chunks/{elements-DD3UGOMd.d.ts → elements-DmbzOhFu.d.ts} +8 -1
  27. package/dist/pptx/chunks/{elements-DD3UGOMd.d.ts.map → elements-DmbzOhFu.d.ts.map} +1 -1
  28. package/dist/pptx/chunks/{index-DdX02BSm.d.ts → index-BmvOxbsh.d.ts} +3 -3
  29. package/dist/pptx/chunks/{index-DdX02BSm.d.ts.map → index-BmvOxbsh.d.ts.map} +1 -1
  30. package/dist/pptx/chunks/{index-BZrFyNtU.d.ts → index-Cija6Dih.d.ts} +42 -5
  31. package/dist/pptx/chunks/index-Cija6Dih.d.ts.map +1 -0
  32. package/dist/pptx/chunks/{text-operations-CyMTMfID.d.ts → text-operations-sXxhsKDd.d.ts} +2 -2
  33. package/dist/pptx/chunks/{text-operations-CyMTMfID.d.ts.map → text-operations-sXxhsKDd.d.ts.map} +1 -1
  34. package/dist/pptx/cli/index.cjs +22 -3
  35. package/dist/pptx/cli/index.d.ts +1 -1
  36. package/dist/pptx/cli/index.mjs +4 -4
  37. package/dist/pptx/converter/index.d.ts +1 -1
  38. package/dist/pptx/converter/index.mjs +2 -2
  39. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  40. package/dist/pptx/editor/render/slide-operations.cjs +1 -1
  41. package/dist/pptx/editor/render/slide-operations.mjs +1 -1
  42. package/dist/pptx/editor/render/table-style-editor-descriptor.cjs +3 -3
  43. package/dist/pptx/editor/render/table-style-editor-descriptor.d.ts.map +1 -1
  44. package/dist/pptx/editor/render/table-style-editor-descriptor.mjs +1 -1
  45. package/dist/pptx/editor/render/table-style-editor-edit.cjs +39 -13
  46. package/dist/pptx/editor/render/table-style-editor-edit.d.ts +11 -2
  47. package/dist/pptx/editor/render/table-style-editor-edit.d.ts.map +1 -1
  48. package/dist/pptx/editor/render/table-style-editor-edit.mjs +36 -10
  49. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  50. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  51. package/dist/pptx/index.cjs +130 -5
  52. package/dist/pptx/index.d.ts +5 -5
  53. package/dist/pptx/index.mjs +5 -5
  54. package/dist/pptx/ui/index.cjs +49 -6
  55. package/dist/pptx/ui/index.d.ts +25 -5
  56. package/dist/pptx/ui/index.d.ts.map +1 -1
  57. package/dist/pptx/ui/index.mjs +48 -7
  58. package/package.json +1 -1
  59. package/dist/pptx/chunks/index-BZrFyNtU.d.ts.map +0 -1
@@ -1,14 +1,36 @@
1
1
  'use strict';
2
2
 
3
- var chunk2V76L5AE_cjs = require('../../../chunk-2V76L5AE.cjs');
3
+ var chunkWVXCHFRU_cjs = require('../../../chunk-WVXCHFRU.cjs');
4
4
  var chunkMGOBGX4A_cjs = require('../../../chunk-MGOBGX4A.cjs');
5
+ var pptx = require('ooxml-core/pptx');
5
6
 
6
- // pptx/editor/render/table-style-editor-edit.ts
7
- function patchBorderSide(borders, side, patch) {
8
- const current = borders?.[side] ?? {};
9
- return { ...borders, [side]: { ...current, ...patch } };
7
+ function patchBorderSide(borders, side, patch, formatScheme) {
8
+ const { lnRef, ...current } = borders?.[side] ?? {};
9
+ if (!lnRef) {
10
+ return { ...borders, [side]: { ...current, ...patch } };
11
+ }
12
+ const concrete = Object.keys(current).length > 0;
13
+ const colourOnly = patch.fill !== void 0 && Object.keys(patch).every((key) => key === "fill" || key === "color");
14
+ if (colourOnly && !formatScheme && !concrete) {
15
+ return { ...borders, [side]: { lnRef: { ...lnRef, color: patch.fill } } };
16
+ }
17
+ const resolved = formatScheme ? pptx.resolveTableStyleLineRef(lnRef, formatScheme, void 0) : void 0;
18
+ const fromTheme = {};
19
+ if (resolved?.width !== void 0) {
20
+ fromTheme.width = resolved.width;
21
+ }
22
+ if (resolved?.dash !== void 0) {
23
+ fromTheme.dash = resolved.dash;
24
+ }
25
+ if (resolved?.noFill) {
26
+ fromTheme.noFill = true;
27
+ }
28
+ const colour = pptx.resolveTableStyleLineRefColor(lnRef, formatScheme);
29
+ const base = colour && current.fill === void 0 && current.color === void 0 && !resolved?.noFill ? { ...fromTheme, ...current, ...colour } : { ...fromTheme, ...current };
30
+ return { ...borders, [side]: { ...base, ...patch } };
10
31
  }
11
- function applyTableStyleFieldEdit(entry, part, edit) {
32
+ function applyTableStyleFieldEdit(entry, part, edit, context = {}) {
33
+ const { formatScheme } = context;
12
34
  if (part === "background") {
13
35
  return applyBackgroundEdit(entry, edit);
14
36
  }
@@ -19,7 +41,7 @@ function applyTableStyleFieldEdit(entry, part, edit) {
19
41
  const cell3DKey = `${part}Cell3D`;
20
42
  switch (edit.kind) {
21
43
  case "fillColor":
22
- keyed[fillKey] = chunk2V76L5AE_cjs.colorToFill(edit.hex, edit.ref);
44
+ keyed[fillKey] = chunkWVXCHFRU_cjs.colorToFill(edit.hex, edit.ref);
23
45
  break;
24
46
  case "fillNone": {
25
47
  const current = keyed[fillKey];
@@ -45,7 +67,7 @@ function applyTableStyleFieldEdit(entry, part, edit) {
45
67
  };
46
68
  break;
47
69
  case "textColor": {
48
- const fill = chunk2V76L5AE_cjs.colorToFill(edit.hex, edit.ref);
70
+ const fill = chunkWVXCHFRU_cjs.colorToFill(edit.hex, edit.ref);
49
71
  keyed[textKey] = {
50
72
  ...keyed[textKey],
51
73
  fontSchemeColor: fill.schemeColor,
@@ -59,28 +81,32 @@ function applyTableStyleFieldEdit(entry, part, edit) {
59
81
  keyed[bordersKey] = patchBorderSide(
60
82
  keyed[bordersKey],
61
83
  edit.side,
62
- { fill: chunk2V76L5AE_cjs.colorToFill(edit.hex, edit.ref), color: edit.ref ? void 0 : edit.hex }
84
+ { fill: chunkWVXCHFRU_cjs.colorToFill(edit.hex, edit.ref), color: edit.ref ? void 0 : edit.hex },
85
+ formatScheme
63
86
  );
64
87
  break;
65
88
  case "borderWidth":
66
89
  keyed[bordersKey] = patchBorderSide(
67
90
  keyed[bordersKey],
68
91
  edit.side,
69
- { width: edit.width }
92
+ { width: edit.width },
93
+ formatScheme
70
94
  );
71
95
  break;
72
96
  case "borderDash":
73
97
  keyed[bordersKey] = patchBorderSide(
74
98
  keyed[bordersKey],
75
99
  edit.side,
76
- { dash: edit.dash }
100
+ { dash: edit.dash },
101
+ formatScheme
77
102
  );
78
103
  break;
79
104
  case "borderNone":
80
105
  keyed[bordersKey] = patchBorderSide(
81
106
  keyed[bordersKey],
82
107
  edit.side,
83
- { noFill: edit.noFill }
108
+ { noFill: edit.noFill },
109
+ formatScheme
84
110
  );
85
111
  break;
86
112
  case "cell3DBevelWidth":
@@ -121,7 +147,7 @@ function applyBackgroundEdit(entry, edit) {
121
147
  const current = entry.tableBackground;
122
148
  let nextBackground = current;
123
149
  if (edit.kind === "fillColor") {
124
- nextBackground = { ...current, fill: chunk2V76L5AE_cjs.colorToFill(edit.hex, edit.ref), fillRef: void 0 };
150
+ nextBackground = { ...current, fill: chunkWVXCHFRU_cjs.colorToFill(edit.hex, edit.ref), fillRef: void 0 };
125
151
  } else if (edit.kind === "fillNone") {
126
152
  nextBackground = {
127
153
  ...current,
@@ -1,5 +1,5 @@
1
1
  import { TableStyleBorderSide, TableStyleEditorPartId } from "./table-style-editor-parts.js";
2
- import { ParsedTableStyleBorders, ParsedTableStyleEntry, ParsedTableStyleFill, ParsedTableStyleText, PptxTableCell3D, PptxThemeColorRef } from "ooxml-core/pptx";
2
+ import { ParsedTableStyleBorders, ParsedTableStyleEntry, ParsedTableStyleFill, ParsedTableStyleText, PptxTableCell3D, PptxThemeColorRef, PptxThemeFormatScheme } from "ooxml-core/pptx";
3
3
  //#region pptx/editor/render/table-style-editor-edit.d.ts
4
4
  export type TableStyleEditorFieldEdit = {
5
5
  readonly kind: 'fillColor';
@@ -63,6 +63,15 @@ export interface TableStyleEditorEditResult {
63
63
  /** The SDK-shaped patch, for a caller that runs edits through `set_table_style_section` instead. */
64
64
  readonly payload: TableStyleSectionEditPayload;
65
65
  }
66
+ /** What the edit path knows about the theme, for sides that reference it. */
67
+ export interface TableStyleEditContext {
68
+ /**
69
+ * The theme's `a:fmtScheme`. With it, editing one facet of a theme line
70
+ * reference (`a:lnRef`) starts from the referenced line, so the facets the
71
+ * edit does not touch (width, dash) keep the theme's values.
72
+ */
73
+ readonly formatScheme?: PptxThemeFormatScheme;
74
+ }
66
75
  /**
67
76
  * Apply one field edit to `entry`'s `part`, returning the new entry plus the
68
77
  * SDK-shaped payload. `part === 'background'` only honours `fillColor` /
@@ -70,6 +79,6 @@ export interface TableStyleEditorEditResult {
70
79
  * kind on the background part is a no-op (returns `entry` unchanged, payload
71
80
  * with no facets set) so a caller does not need to pre-filter by part.
72
81
  */
73
- export declare function applyTableStyleFieldEdit(entry: ParsedTableStyleEntry, part: TableStyleEditorPartId, edit: TableStyleEditorFieldEdit): TableStyleEditorEditResult;
82
+ export declare function applyTableStyleFieldEdit(entry: ParsedTableStyleEntry, part: TableStyleEditorPartId, edit: TableStyleEditorFieldEdit, context?: TableStyleEditContext): TableStyleEditorEditResult;
74
83
  //#endregion
75
84
  //# sourceMappingURL=table-style-editor-edit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-style-editor-edit.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-style-editor-edit.ts"],"mappings":";;;YA2BY;WAEA;WACA;WACA,KAAK;;WAEH;WAA2B;;WAC3B;WAA2B;;WAC3B;WAA6B;;WAC7B;WAAgC;;WAElC;WACA;WACA,KAAK;;WAGL;WACA,MAAM;WACN;WACA,KAAK;;WAEH;WAA8B,MAAM;WAA+B;;WACnE;WAA6B,MAAM;WAA+B;;WAClE;WAA6B,MAAM;WAA+B;;WAClE;WAAmC;;WACnC;WAAoC;;WACpC;WAAoC;;;iBAGjC;WACP;WACA;WACA,OAAO;WACP,OAAO;WACP,UAAU;WACV,SAAS;;iBAGF;;WAEP,OAAO;;WAEP,SAAS;;;;;;;;;wBA6BH,yBACf,OAAO,uBACP,MAAM,wBACN,MAAM,4BACJ"}
1
+ {"version":3,"file":"table-style-editor-edit.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-style-editor-edit.ts"],"mappings":";;;YA6BY;WAEA;WACA;WACA,KAAK;;WAEH;WAA2B;;WAC3B;WAA2B;;WAC3B;WAA6B;;WAC7B;WAAgC;;WAElC;WACA;WACA,KAAK;;WAGL;WACA,MAAM;WACN;WACA,KAAK;;WAEH;WAA8B,MAAM;WAA+B;;WACnE;WAA6B,MAAM;WAA+B;;WAClE;WAA6B,MAAM;WAA+B;;WAClE;WAAmC;;WACnC;WAAoC;;WACpC;WAAoC;;;iBAGjC;WACP;WACA;WACA,OAAO;WACP,OAAO;WACP,UAAU;WACV,SAAS;;iBAGF;;WAEP,OAAO;;WAEP,SAAS;;;iBAcF;;;;;;WAMP,eAAe;;;;;;;;;wBAwDT,yBACf,OAAO,uBACP,MAAM,wBACN,MAAM,2BACN,UAAS,wBACP"}
@@ -1,12 +1,34 @@
1
- import { colorToFill } from '../../../chunk-DC4JDONB.mjs';
1
+ import { colorToFill } from '../../../chunk-V57HCOUM.mjs';
2
2
  import { isTableStylePartName } from '../../../chunk-WA6RZWZD.mjs';
3
+ import { resolveTableStyleLineRef, resolveTableStyleLineRefColor } from 'ooxml-core/pptx';
3
4
 
4
- // pptx/editor/render/table-style-editor-edit.ts
5
- function patchBorderSide(borders, side, patch) {
6
- const current = borders?.[side] ?? {};
7
- return { ...borders, [side]: { ...current, ...patch } };
5
+ function patchBorderSide(borders, side, patch, formatScheme) {
6
+ const { lnRef, ...current } = borders?.[side] ?? {};
7
+ if (!lnRef) {
8
+ return { ...borders, [side]: { ...current, ...patch } };
9
+ }
10
+ const concrete = Object.keys(current).length > 0;
11
+ const colourOnly = patch.fill !== void 0 && Object.keys(patch).every((key) => key === "fill" || key === "color");
12
+ if (colourOnly && !formatScheme && !concrete) {
13
+ return { ...borders, [side]: { lnRef: { ...lnRef, color: patch.fill } } };
14
+ }
15
+ const resolved = formatScheme ? resolveTableStyleLineRef(lnRef, formatScheme, void 0) : void 0;
16
+ const fromTheme = {};
17
+ if (resolved?.width !== void 0) {
18
+ fromTheme.width = resolved.width;
19
+ }
20
+ if (resolved?.dash !== void 0) {
21
+ fromTheme.dash = resolved.dash;
22
+ }
23
+ if (resolved?.noFill) {
24
+ fromTheme.noFill = true;
25
+ }
26
+ const colour = resolveTableStyleLineRefColor(lnRef, formatScheme);
27
+ const base = colour && current.fill === void 0 && current.color === void 0 && !resolved?.noFill ? { ...fromTheme, ...current, ...colour } : { ...fromTheme, ...current };
28
+ return { ...borders, [side]: { ...base, ...patch } };
8
29
  }
9
- function applyTableStyleFieldEdit(entry, part, edit) {
30
+ function applyTableStyleFieldEdit(entry, part, edit, context = {}) {
31
+ const { formatScheme } = context;
10
32
  if (part === "background") {
11
33
  return applyBackgroundEdit(entry, edit);
12
34
  }
@@ -57,28 +79,32 @@ function applyTableStyleFieldEdit(entry, part, edit) {
57
79
  keyed[bordersKey] = patchBorderSide(
58
80
  keyed[bordersKey],
59
81
  edit.side,
60
- { fill: colorToFill(edit.hex, edit.ref), color: edit.ref ? void 0 : edit.hex }
82
+ { fill: colorToFill(edit.hex, edit.ref), color: edit.ref ? void 0 : edit.hex },
83
+ formatScheme
61
84
  );
62
85
  break;
63
86
  case "borderWidth":
64
87
  keyed[bordersKey] = patchBorderSide(
65
88
  keyed[bordersKey],
66
89
  edit.side,
67
- { width: edit.width }
90
+ { width: edit.width },
91
+ formatScheme
68
92
  );
69
93
  break;
70
94
  case "borderDash":
71
95
  keyed[bordersKey] = patchBorderSide(
72
96
  keyed[bordersKey],
73
97
  edit.side,
74
- { dash: edit.dash }
98
+ { dash: edit.dash },
99
+ formatScheme
75
100
  );
76
101
  break;
77
102
  case "borderNone":
78
103
  keyed[bordersKey] = patchBorderSide(
79
104
  keyed[bordersKey],
80
105
  edit.side,
81
- { noFill: edit.noFill }
106
+ { noFill: edit.noFill },
107
+ formatScheme
82
108
  );
83
109
  break;
84
110
  case "cell3DBevelWidth":
@@ -1,5 +1,5 @@
1
1
  import { i as TextStyle } from "../../chunks/text-D49FKllA.js";
2
- import { _ as PptxElementWithText, m as PptxElement } from "../../chunks/elements-DD3UGOMd.js";
2
+ import { _ as PptxElementWithText, m as PptxElement } from "../../chunks/elements-DmbzOhFu.js";
3
3
  //#region pptx/editor/render/text-runs-style-patch.d.ts
4
4
  /** Immutable whole-text edit, using the pre-edit body style for run inheritance. */
5
5
  export declare function textRunsStylePatch(element: PptxElement, updates: Partial<TextStyle>): Pick<Partial<PptxElementWithText>, 'textStyle' | 'textSegments'>;
@@ -1,5 +1,5 @@
1
1
  import { i as TextStyle, r as TextSegment } from "../../chunks/text-D49FKllA.js";
2
- import { m as PptxElement } from "../../chunks/elements-DD3UGOMd.js";
2
+ import { m as PptxElement } from "../../chunks/elements-DmbzOhFu.js";
3
3
  import { TextDecorationFlag } from "./text-content-style.js";
4
4
  //#region pptx/editor/render/text-style-scope.d.ts
5
5
  /**
@@ -76722,14 +76722,23 @@ function parseSolidFillStyle(solidFill3) {
76722
76722
  ...alpha !== void 0 ? { alpha } : {}
76723
76723
  };
76724
76724
  }
76725
+ function parseLineRef(lnRef) {
76726
+ const idx = parseInt(String(lnRef?.["@_idx"] ?? ""), 10);
76727
+ if (!lnRef || !Number.isFinite(idx)) {
76728
+ return void 0;
76729
+ }
76730
+ const hex3 = String(lnRef["a:srgbClr"]?.["@_val"] ?? "").trim();
76731
+ const color2 = parseSolidFillStyle(lnRef) ?? (hex3 ? { schemeColor: "", color: hex3.startsWith("#") ? hex3 : `#${hex3}` } : void 0);
76732
+ return { lnRef: color2 ? { idx, color: color2 } : { idx } };
76733
+ }
76725
76734
  function parseBorderSide(side) {
76726
76735
  if (!side) {
76727
76736
  return void 0;
76728
76737
  }
76729
- const ln = side["a:ln"];
76730
- if (!ln) {
76731
- return void 0;
76738
+ if (side["a:ln"] === void 0) {
76739
+ return parseLineRef(side["a:lnRef"]);
76732
76740
  }
76741
+ const ln = typeof side["a:ln"] === "object" ? side["a:ln"] : {};
76733
76742
  const border = {};
76734
76743
  let has = false;
76735
76744
  if (ln["a:noFill"] !== void 0) {
@@ -142109,8 +142118,8 @@ function buildFallbackTransition(transitionNode) {
142109
142118
  }
142110
142119
  fallback[key2] = value;
142111
142120
  }
142112
- const hasChild = Object.keys(fallback).some((key2) => !key2.startsWith("@_"));
142113
- if (!hasChild) {
142121
+ const hasChild2 = Object.keys(fallback).some((key2) => !key2.startsWith("@_"));
142122
+ if (!hasChild2) {
142114
142123
  fallback["p:fade"] = {};
142115
142124
  }
142116
142125
  return fallback;
@@ -144004,6 +144013,16 @@ var init_PptxHandlerRuntimeSaveHandoutMaster = __esm({
144004
144013
  // pptx/core/core/runtime/table-style-border-write.ts
144005
144014
  function mergeBorderSideXml(border, existingSide) {
144006
144015
  const existing = existingSide && typeof existingSide === "object" && !Array.isArray(existingSide) ? existingSide : {};
144016
+ const concrete = border.width !== void 0 || border.dash !== void 0 || border.fill !== void 0 || border.color !== void 0 || border.noFill !== void 0;
144017
+ if (border.lnRef && !concrete) {
144018
+ delete existing["a:ln"];
144019
+ const ref = { "@_idx": String(border.lnRef.idx) };
144020
+ if (border.lnRef.color) {
144021
+ Object.assign(ref, colorChoiceXml(border.lnRef.color));
144022
+ }
144023
+ existing["a:lnRef"] = ref;
144024
+ return existing;
144025
+ }
144007
144026
  delete existing["a:lnRef"];
144008
144027
  const ln = ensureChild2(existing, "a:ln");
144009
144028
  if (border.width !== void 0) {
@@ -157587,6 +157606,108 @@ var init_table_style_editor = __esm({
157587
157606
  }
157588
157607
  });
157589
157608
 
157609
+ // pptx/core/core/runtime/table-style-line-ref.ts
157610
+ function hasChild(rawNode, key2) {
157611
+ return !!rawNode && typeof rawNode === "object" && Object.prototype.hasOwnProperty.call(rawNode, key2) && rawNode[key2] !== void 0;
157612
+ }
157613
+ function linePlaceholderColor(rawNode) {
157614
+ if (!rawNode || typeof rawNode !== "object") {
157615
+ return void 0;
157616
+ }
157617
+ const solidFill3 = rawNode["a:solidFill"];
157618
+ const schemeClr = solidFill3?.["a:schemeClr"];
157619
+ return schemeClr?.["@_val"] === "phClr" ? schemeClr : void 0;
157620
+ }
157621
+ function resolveTableStyleLineRef(lnRef, formatScheme, colorMap) {
157622
+ if (lnRef.idx === 0) {
157623
+ return { noFill: true };
157624
+ }
157625
+ const line2 = formatScheme?.lineStyles[lnRef.idx - 1];
157626
+ if (!line2) {
157627
+ return void 0;
157628
+ }
157629
+ if (hasChild(line2.rawNode, "a:noFill")) {
157630
+ return { noFill: true };
157631
+ }
157632
+ const border = {};
157633
+ if (line2.width !== void 0) {
157634
+ border.width = line2.width;
157635
+ }
157636
+ if (line2.dash && line2.dash !== "solid") {
157637
+ border.dash = line2.dash;
157638
+ }
157639
+ const placeholder = linePlaceholderColor(line2.rawNode);
157640
+ const base = placeholder ? refColor(lnRef, colorMap) : void 0;
157641
+ if (base && placeholder) {
157642
+ border.color = applyDrawingColorTransforms(base, placeholder);
157643
+ } else if (line2.color) {
157644
+ border.color = line2.color;
157645
+ }
157646
+ return border;
157647
+ }
157648
+ function foldPercent(a, b) {
157649
+ if (a === void 0 || b === void 0) {
157650
+ return a ?? b;
157651
+ }
157652
+ return Math.round(a * b / 1e5);
157653
+ }
157654
+ function refBorderColor(ref) {
157655
+ if (ref?.schemeColor) {
157656
+ return { fill: ref };
157657
+ }
157658
+ return ref?.color ? { color: ref.color } : void 0;
157659
+ }
157660
+ function resolveTableStyleLineRefColor(lnRef, formatScheme) {
157661
+ const ref = lnRef.color;
157662
+ const line2 = lnRef.idx > 0 ? formatScheme?.lineStyles[lnRef.idx - 1] : void 0;
157663
+ const solidFill3 = line2?.rawNode?.["a:solidFill"];
157664
+ const own = parseSolidFillStyle(solidFill3);
157665
+ if (!own) {
157666
+ const hex3 = String(solidFill3?.["a:srgbClr"]?.["@_val"] ?? "");
157667
+ return hex3 ? { color: hex3.startsWith("#") ? hex3 : `#${hex3}` } : refBorderColor(ref);
157668
+ }
157669
+ if (own.schemeColor !== "phClr") {
157670
+ return { fill: own };
157671
+ }
157672
+ if (!ref?.schemeColor) {
157673
+ return refBorderColor(ref);
157674
+ }
157675
+ const fill = { schemeColor: ref.schemeColor };
157676
+ const tint = foldPercent(ref.tint, own.tint);
157677
+ const shade = foldPercent(ref.shade, own.shade);
157678
+ const alpha = own.alpha ?? ref.alpha;
157679
+ if (tint !== void 0) {
157680
+ fill.tint = tint;
157681
+ }
157682
+ if (shade !== void 0) {
157683
+ fill.shade = shade;
157684
+ }
157685
+ if (alpha !== void 0) {
157686
+ fill.alpha = alpha;
157687
+ }
157688
+ return { fill };
157689
+ }
157690
+ function refColor(lnRef, colorMap) {
157691
+ const color2 = lnRef.color;
157692
+ const base = color2?.schemeColor ? colorMap?.[color2.schemeColor] : color2?.color;
157693
+ if (!base || !color2) {
157694
+ return base;
157695
+ }
157696
+ const transforms = {};
157697
+ for (const key2 of ["tint", "shade", "alpha"]) {
157698
+ if (color2[key2] !== void 0) {
157699
+ transforms[`a:${key2}`] = { "@_val": String(color2[key2]) };
157700
+ }
157701
+ }
157702
+ return Object.keys(transforms).length > 0 ? applyDrawingColorTransforms(base, transforms) : base;
157703
+ }
157704
+ var init_table_style_line_ref = __esm({
157705
+ "pptx/core/core/runtime/table-style-line-ref.ts"() {
157706
+ init_color();
157707
+ init_table_style_border_parse();
157708
+ }
157709
+ });
157710
+
157590
157711
  // pptx/core/core/index.ts
157591
157712
  var init_core2 = __esm({
157592
157713
  "pptx/core/core/index.ts"() {
@@ -157600,6 +157721,7 @@ var init_core2 = __esm({
157600
157721
  init_auto_number_sequence();
157601
157722
  init_table_style_editor();
157602
157723
  init_table_style_entry_parse();
157724
+ init_table_style_line_ref();
157603
157725
  }
157604
157726
  });
157605
157727
 
@@ -179673,7 +179795,10 @@ exports.resolveReferenceUriToPart = resolveReferenceUriToPart;
179673
179795
  exports.resolveSmartArtEffectIntensity = resolveSmartArtEffectIntensity;
179674
179796
  exports.resolveSmartArtNodeCoherent3DOff = resolveSmartArtNodeCoherent3DOff;
179675
179797
  exports.resolveSmartArtNodeStyleRoles = resolveSmartArtNodeStyleRoles;
179798
+ exports.resolveTableBackgroundFillRef = resolveTableBackgroundFillRef;
179676
179799
  exports.resolveTableCellStyle = resolveTableCellStyle;
179800
+ exports.resolveTableStyleLineRef = resolveTableStyleLineRef;
179801
+ exports.resolveTableStyleLineRefColor = resolveTableStyleLineRefColor;
179677
179802
  exports.resolveThemeColorRef = resolveThemeColorRef;
179678
179803
  exports.resolveVisibilitySetTiming = resolveVisibilitySetTiming;
179679
179804
  exports.rgb = rgb;