@officedk/pptxdk 0.0.0-stage → 0.2.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 (206) hide show
  1. package/LICENSE +21 -0
  2. package/dist/build-zrZuX4fK.d.ts +3 -0
  3. package/dist/build.d.ts +35 -0
  4. package/dist/build.js +128 -0
  5. package/dist/capabilities/dist/all.js +34 -0
  6. package/dist/capabilities/dist/box/box-codegen.js +84 -0
  7. package/dist/capabilities/dist/box/box-declaration.js +32 -0
  8. package/dist/capabilities/dist/box/box-elements.js +17 -0
  9. package/dist/capabilities/dist/box/box.js +142 -0
  10. package/dist/capabilities/dist/chart/chart-codegen.js +79 -0
  11. package/dist/capabilities/dist/chart/chart-declaration.js +7 -0
  12. package/dist/capabilities/dist/chart/chart-elements.js +12 -0
  13. package/dist/capabilities/dist/chart/chart-import.js +2403 -0
  14. package/dist/capabilities/dist/chart/chart-labels.js +86 -0
  15. package/dist/capabilities/dist/chart/chart-model.js +9 -0
  16. package/dist/capabilities/dist/chart/chart-schemas.js +1088 -0
  17. package/dist/capabilities/dist/chart/chart-xml.js +788 -0
  18. package/dist/capabilities/dist/chart/chart.js +1119 -0
  19. package/dist/capabilities/dist/chart/preview/axes-and-grid.js +311 -0
  20. package/dist/capabilities/dist/chart/preview/bar-column.js +143 -0
  21. package/dist/capabilities/dist/chart/preview/data-labels.js +334 -0
  22. package/dist/capabilities/dist/chart/preview/error-bars.js +213 -0
  23. package/dist/capabilities/dist/chart/preview/index.js +192 -0
  24. package/dist/capabilities/dist/chart/preview/layout.js +592 -0
  25. package/dist/capabilities/dist/chart/preview/legend.js +273 -0
  26. package/dist/capabilities/dist/chart/preview/line-area.js +404 -0
  27. package/dist/capabilities/dist/chart/preview/markers.js +100 -0
  28. package/dist/capabilities/dist/chart/preview/number-format.js +247 -0
  29. package/dist/capabilities/dist/chart/preview/pie-doughnut.js +159 -0
  30. package/dist/capabilities/dist/chart/preview/scales.js +365 -0
  31. package/dist/capabilities/dist/chart/preview/scatter.js +131 -0
  32. package/dist/capabilities/dist/chart/preview/style.js +60 -0
  33. package/dist/capabilities/dist/chart/preview/text-render.js +116 -0
  34. package/dist/capabilities/dist/chart/preview/trendlines.js +537 -0
  35. package/dist/capabilities/dist/chart/preview/types.js +5 -0
  36. package/dist/capabilities/dist/document.js +168 -0
  37. package/dist/capabilities/dist/font/font-embedding.js +119 -0
  38. package/dist/capabilities/dist/font/font-engine.js +834 -0
  39. package/dist/capabilities/dist/font/font-import.js +766 -0
  40. package/dist/capabilities/dist/font/font-subset.js +55 -0
  41. package/dist/capabilities/dist/font/font.js +72 -0
  42. package/dist/capabilities/dist/group/group-codegen.js +74 -0
  43. package/dist/capabilities/dist/group/group-declaration.js +41 -0
  44. package/dist/capabilities/dist/group/group-elements.js +12 -0
  45. package/dist/capabilities/dist/group/group-import.js +649 -0
  46. package/dist/capabilities/dist/group/group-xml.js +8 -0
  47. package/dist/capabilities/dist/group/group.js +260 -0
  48. package/dist/capabilities/dist/image/gif-decoder.js +244 -0
  49. package/dist/capabilities/dist/image/image-codegen.js +164 -0
  50. package/dist/capabilities/dist/image/image-declaration.js +8 -0
  51. package/dist/capabilities/dist/image/image-decode.js +244 -0
  52. package/dist/capabilities/dist/image/image-elements.js +12 -0
  53. package/dist/capabilities/dist/image/image-import.js +984 -0
  54. package/dist/capabilities/dist/image/image-schemas.js +147 -0
  55. package/dist/capabilities/dist/image/image-xml.js +12 -0
  56. package/dist/capabilities/dist/image/image.js +552 -0
  57. package/dist/capabilities/dist/line/line-codegen.js +89 -0
  58. package/dist/capabilities/dist/line/line-declaration.js +72 -0
  59. package/dist/capabilities/dist/line/line-elements.js +12 -0
  60. package/dist/capabilities/dist/line/line-import.js +504 -0
  61. package/dist/capabilities/dist/line/line-xml.js +9 -0
  62. package/dist/capabilities/dist/line/line.js +331 -0
  63. package/dist/capabilities/dist/masters/footer-placeholder.js +683 -0
  64. package/dist/capabilities/dist/masters/masters-codegen.js +69 -0
  65. package/dist/capabilities/dist/masters/masters.js +250 -0
  66. package/dist/capabilities/dist/motion/motion-api.js +757 -0
  67. package/dist/capabilities/dist/motion/motion-codegen.js +406 -0
  68. package/dist/capabilities/dist/motion/motion-elements.js +43 -0
  69. package/dist/capabilities/dist/motion/motion-import.js +1568 -0
  70. package/dist/capabilities/dist/motion/motion-plan.js +2340 -0
  71. package/dist/capabilities/dist/motion/motion-query.js +423 -0
  72. package/dist/capabilities/dist/motion/motion-schemas.js +339 -0
  73. package/dist/capabilities/dist/motion/motion.js +1617 -0
  74. package/dist/capabilities/dist/notes/notes-codegen.js +19 -0
  75. package/dist/capabilities/dist/notes/notes-declaration.js +8 -0
  76. package/dist/capabilities/dist/notes/notes-elements.js +12 -0
  77. package/dist/capabilities/dist/notes/notes-import.js +292 -0
  78. package/dist/capabilities/dist/notes/notes-schemas.js +38 -0
  79. package/dist/capabilities/dist/notes/notes-xml.js +38 -0
  80. package/dist/capabilities/dist/notes/notes.js +194 -0
  81. package/dist/capabilities/dist/placeholder/placeholder-codegen.js +54 -0
  82. package/dist/capabilities/dist/placeholder/placeholder-elements.js +13 -0
  83. package/dist/capabilities/dist/placeholder/placeholder-schemas.js +33 -0
  84. package/dist/capabilities/dist/placeholder/placeholder.js +451 -0
  85. package/dist/capabilities/dist/shape/shape-codegen.js +236 -0
  86. package/dist/capabilities/dist/shape/shape-declaration.js +45 -0
  87. package/dist/capabilities/dist/shape/shape-elements.js +12 -0
  88. package/dist/capabilities/dist/shape/shape-import.js +628 -0
  89. package/dist/capabilities/dist/shape/shape-xml.js +6 -0
  90. package/dist/capabilities/dist/shape/shape.js +320 -0
  91. package/dist/capabilities/dist/shared/geometry.js +1681 -0
  92. package/dist/capabilities/dist/shared/identity.js +205 -0
  93. package/dist/capabilities/dist/shared/morph-api.js +11 -0
  94. package/dist/capabilities/dist/shared/placeholder-import.js +238 -0
  95. package/dist/capabilities/dist/shared/preset-definitions.js +22423 -0
  96. package/dist/capabilities/dist/shared/style-inheritance.js +161 -0
  97. package/dist/capabilities/dist/shared/text-schemas.js +241 -0
  98. package/dist/capabilities/dist/shared/text-service.js +2252 -0
  99. package/dist/capabilities/dist/shared/visual.js +1197 -0
  100. package/dist/capabilities/dist/slide-background/slide-background-codegen.js +44 -0
  101. package/dist/capabilities/dist/slide-background/slide-background-import.js +166 -0
  102. package/dist/capabilities/dist/slide-background/slide-background-xml.js +34 -0
  103. package/dist/capabilities/dist/slide-background/slide-background.js +238 -0
  104. package/dist/capabilities/dist/table/table-codegen.js +125 -0
  105. package/dist/capabilities/dist/table/table-declaration.js +15 -0
  106. package/dist/capabilities/dist/table/table-elements.js +27 -0
  107. package/dist/capabilities/dist/table/table-import.js +606 -0
  108. package/dist/capabilities/dist/table/table-schemas.js +334 -0
  109. package/dist/capabilities/dist/table/table-xml.js +30 -0
  110. package/dist/capabilities/dist/table/table.js +739 -0
  111. package/dist/capabilities/dist/text/text-codegen.js +198 -0
  112. package/dist/capabilities/dist/text/text-declaration.js +27 -0
  113. package/dist/capabilities/dist/text/text-elements.js +54 -0
  114. package/dist/capabilities/dist/text/text-import.js +1224 -0
  115. package/dist/capabilities/dist/text/text-xml.js +9 -0
  116. package/dist/capabilities/dist/text/text.js +320 -0
  117. package/dist/capabilities/dist/transition/transition-api.js +136 -0
  118. package/dist/capabilities/dist/transition/transition-codegen.js +45 -0
  119. package/dist/capabilities/dist/transition/transition-import.js +477 -0
  120. package/dist/capabilities/dist/transition/transition.js +260 -0
  121. package/dist/capability-BbKW9w4O.d.ts +2131 -0
  122. package/dist/cli.js +20 -0
  123. package/dist/codegen/dist/assets.js +79 -0
  124. package/dist/codegen/dist/codegen.js +691 -0
  125. package/dist/codegen/dist/identifiers.js +203 -0
  126. package/dist/codegen/dist/index.js +3 -0
  127. package/dist/codegen/dist/printer.js +143 -0
  128. package/dist/codegen/dist/types.js +77 -0
  129. package/dist/core/dist/author-ids.js +51 -0
  130. package/dist/core/dist/author-schemas.js +330 -0
  131. package/dist/core/dist/block-flex-layout.js +801 -0
  132. package/dist/core/dist/build.js +4 -0
  133. package/dist/core/dist/capability.js +15 -0
  134. package/dist/core/dist/declaration.js +16 -0
  135. package/dist/core/dist/diagnostics.js +353 -0
  136. package/dist/core/dist/document-internals.js +26 -0
  137. package/dist/core/dist/document.js +417 -0
  138. package/dist/core/dist/font-seal.js +204 -0
  139. package/dist/core/dist/geometry-schemas.js +256 -0
  140. package/dist/core/dist/grid-layout.js +449 -0
  141. package/dist/core/dist/host.js +40 -0
  142. package/dist/core/dist/index.js +15 -0
  143. package/dist/core/dist/input-values.js +61 -0
  144. package/dist/core/dist/layout-protocol.js +61 -0
  145. package/dist/core/dist/layout-schemas.js +201 -0
  146. package/dist/core/dist/layout.js +340 -0
  147. package/dist/core/dist/masters.js +194 -0
  148. package/dist/core/dist/morph.js +30 -0
  149. package/dist/core/dist/placeholders.js +275 -0
  150. package/dist/core/dist/query.js +190 -0
  151. package/dist/core/dist/resolution.js +12 -0
  152. package/dist/core/dist/resolve.js +2246 -0
  153. package/dist/core/dist/stage-options.js +300 -0
  154. package/dist/core/dist/theme.js +1023 -0
  155. package/dist/core/dist/transform-geometry.js +72 -0
  156. package/dist/document-41spD7bq.d.ts +1350 -0
  157. package/dist/emit/dist/emit.js +957 -0
  158. package/dist/emit/dist/index.js +5 -0
  159. package/dist/emit/dist/ooxml.js +661 -0
  160. package/dist/emit/dist/shape-tree.js +12 -0
  161. package/dist/import/dist/alternate-content.js +54 -0
  162. package/dist/import/dist/diagnostics.js +157 -0
  163. package/dist/import/dist/fonts.js +309 -0
  164. package/dist/import/dist/import.js +513 -0
  165. package/dist/import/dist/index.js +16 -0
  166. package/dist/import/dist/masters.js +1293 -0
  167. package/dist/import/dist/mechanism.js +10 -0
  168. package/dist/import/dist/namespaces.js +61 -0
  169. package/dist/import/dist/notes-masters.js +300 -0
  170. package/dist/import/dist/opc.js +233 -0
  171. package/dist/import/dist/resources.js +166 -0
  172. package/dist/import/dist/sections.js +139 -0
  173. package/dist/import/dist/themes.js +777 -0
  174. package/dist/import/dist/visual.js +821 -0
  175. package/dist/import/dist/xml-fragments.js +277 -0
  176. package/dist/import/dist/xml-reader.js +267 -0
  177. package/dist/index-1ag7U9Jt.d.ts +63 -0
  178. package/dist/index-BEwhk7c8.d.ts +72 -0
  179. package/dist/index-cK2KtukZ.d.ts +161 -0
  180. package/dist/index-v77CTJev.d.ts +55 -0
  181. package/dist/index.d.ts +8 -0
  182. package/dist/index.js +82 -0
  183. package/dist/node.d.ts +53 -0
  184. package/dist/node.js +225 -0
  185. package/dist/pptxdk/src/cli-commands.js +907 -0
  186. package/dist/pptxdk/src/compose.js +53 -0
  187. package/dist/pptxdk/src/slide.js +9 -0
  188. package/dist/preview/dist/index.js +342 -0
  189. package/dist/preview/dist/options.js +40 -0
  190. package/dist/preview/dist/svg-guard.js +1089 -0
  191. package/dist/preview.d.ts +12 -0
  192. package/dist/preview.js +29 -0
  193. package/dist/react/dist/append.js +66 -0
  194. package/dist/react/dist/document-adapter.js +404 -0
  195. package/dist/react/dist/elements.js +82 -0
  196. package/dist/react/dist/from-vanilla.js +57 -0
  197. package/dist/react/dist/index.js +89 -0
  198. package/dist/react/dist/mount.js +34 -0
  199. package/dist/react/dist/reconciler.js +290 -0
  200. package/dist/react.d.ts +235 -0
  201. package/dist/react.js +31 -0
  202. package/dist/transition-6n8GZxSg.d.ts +9 -0
  203. package/dist/vanilla.d.ts +4 -0
  204. package/dist/vanilla.js +15 -0
  205. package/package.json +79 -3
  206. package/README.md +0 -3
@@ -0,0 +1,821 @@
1
+ import { presetGeometryNameSchema } from "../../core/dist/geometry-schemas.js";
2
+ import { schemeColorNameSchema } from "../../core/dist/theme.js";
3
+ import "../../core/dist/capability.js";
4
+ import { A_NS, R_NS, emuToPx } from "./namespaces.js";
5
+ import { resolvePartPath } from "./opc.js";
6
+ import { extentEmuFragmentSchema, hexRgb6Schema, nonNegativeExtentEmuFragmentSchema, offsetEmuFragmentSchema, ooxmlIntSchema, ooxmlLineWidthEmuSchema, ooxmlNonNegativeIntSchema, ooxmlWritableExtentEmuSchema, transformAttributesFragmentSchema } from "./xml-fragments.js";
7
+ import { z } from "zod";
8
+ // ../import/dist/visual.js
9
+ const arrowTypes = [
10
+ "none",
11
+ "triangle",
12
+ "stealth",
13
+ "arrow",
14
+ "diamond",
15
+ "oval"
16
+ ];
17
+ const arrowTypeSchema = z.enum(arrowTypes);
18
+ const percentValAttrSchema = z.object({ val: ooxmlNonNegativeIntSchema });
19
+ const alphaModFixAttrSchema = z.object({ amt: ooxmlNonNegativeIntSchema });
20
+ const srgbColorAttrSchema = z.object({ val: hexRgb6Schema });
21
+ const schemeColorAttrSchema = z.object({ val: schemeColorNameSchema });
22
+ const sysColorAttrSchema = z.object({
23
+ val: z.string().min(1),
24
+ lastClr: hexRgb6Schema.optional()
25
+ });
26
+ const gradStopAttrSchema = z.object({ pos: ooxmlNonNegativeIntSchema });
27
+ const gradLinAttrSchema = z.object({
28
+ ang: ooxmlIntSchema.optional(),
29
+ scaled: z.enum([
30
+ "0",
31
+ "1",
32
+ "true",
33
+ "false"
34
+ ]).optional()
35
+ });
36
+ const lineAttrSchema = z.object({
37
+ w: ooxmlLineWidthEmuSchema.optional(),
38
+ cap: z.enum([
39
+ "rnd",
40
+ "sq",
41
+ "flat"
42
+ ]).optional(),
43
+ cmpd: z.enum([
44
+ "sng",
45
+ "dbl",
46
+ "thickThin",
47
+ "thinThick",
48
+ "tri"
49
+ ]).optional(),
50
+ algn: z.enum(["ctr", "in"]).optional()
51
+ });
52
+ const dashPresetAttrSchema = z.object({ val: z.string().min(1) });
53
+ const lineEndAttrSchema = z.object({
54
+ type: arrowTypeSchema.optional(),
55
+ w: z.enum([
56
+ "sm",
57
+ "med",
58
+ "lg"
59
+ ]).optional(),
60
+ len: z.enum([
61
+ "sm",
62
+ "med",
63
+ "lg"
64
+ ]).optional()
65
+ });
66
+ const outerShadowAttrSchema = z.object({
67
+ blurRad: ooxmlWritableExtentEmuSchema.optional(),
68
+ dist: ooxmlWritableExtentEmuSchema.optional(),
69
+ dir: ooxmlIntSchema.optional(),
70
+ algn: z.string().optional(),
71
+ rotWithShape: z.enum([
72
+ "0",
73
+ "1",
74
+ "true",
75
+ "false"
76
+ ]).optional()
77
+ });
78
+ const softEdgeAttrSchema = z.object({ rad: ooxmlWritableExtentEmuSchema });
79
+ /** Reads a DrawingML color child (`<a:srgbClr>`, `<a:schemeClr>`, `<a:sysClr>`) with optional alpha and luminance transforms. */
80
+ function readDrawingColor(parentCursor, location, diagnostics) {
81
+ let colorCursor;
82
+ let baseHex;
83
+ let slot;
84
+ for (const child of parentCursor.remainingElementChildren()) {
85
+ if (child.namespaceUri !== "http://schemas.openxmlformats.org/drawingml/2006/main") {
86
+ diagnostics.push({
87
+ code: "unconsumed-xml",
88
+ category: "unsupported",
89
+ disposition: "omitted",
90
+ kind: "element",
91
+ location: {
92
+ ...location,
93
+ xpath: child.xpath
94
+ },
95
+ namespaceUri: child.namespaceUri,
96
+ localName: child.localName
97
+ });
98
+ continue;
99
+ }
100
+ if (child.localName === "srgbClr" && colorCursor === void 0) {
101
+ colorCursor = child;
102
+ const raw = child.attrsObject(["val"]);
103
+ const parsed = srgbColorAttrSchema.safeParse(raw);
104
+ if (!parsed.success) {
105
+ diagnostics.push({
106
+ code: "invalid-xml-value",
107
+ category: "corrupt-input",
108
+ disposition: "omitted",
109
+ location: {
110
+ ...location,
111
+ xpath: child.xpath
112
+ },
113
+ attributeOrElement: "a:srgbClr/@val",
114
+ rawValue: raw["val"] ?? ""
115
+ });
116
+ return;
117
+ }
118
+ baseHex = `#${parsed.data.val.toUpperCase()}`;
119
+ } else if (child.localName === "schemeClr" && colorCursor === void 0) {
120
+ colorCursor = child;
121
+ const raw = child.attrsObject(["val"]);
122
+ const parsed = schemeColorAttrSchema.safeParse(raw);
123
+ if (!parsed.success) {
124
+ diagnostics.push({
125
+ code: "invalid-xml-value",
126
+ category: "corrupt-input",
127
+ disposition: "omitted",
128
+ location: {
129
+ ...location,
130
+ xpath: child.xpath
131
+ },
132
+ attributeOrElement: "a:schemeClr/@val",
133
+ rawValue: raw["val"] ?? ""
134
+ });
135
+ return;
136
+ }
137
+ slot = parsed.data.val;
138
+ } else if (child.localName === "sysClr" && colorCursor === void 0) {
139
+ colorCursor = child;
140
+ const raw = child.attrsObject(["val", "lastClr"]);
141
+ const parsed = sysColorAttrSchema.safeParse(raw);
142
+ if (!parsed.success) {
143
+ diagnostics.push({
144
+ code: "invalid-xml-value",
145
+ category: "corrupt-input",
146
+ disposition: "omitted",
147
+ location: {
148
+ ...location,
149
+ xpath: child.xpath
150
+ },
151
+ attributeOrElement: "a:sysClr",
152
+ rawValue: JSON.stringify(raw)
153
+ });
154
+ return;
155
+ }
156
+ const fallback = parsed.data.val === "windowText" ? "000000" : parsed.data.val === "window" ? "FFFFFF" : void 0;
157
+ const hex = parsed.data.lastClr ?? fallback;
158
+ if (hex === void 0) return void 0;
159
+ baseHex = `#${hex.toUpperCase()}`;
160
+ } else diagnostics.push({
161
+ code: "unsupported-mechanism",
162
+ category: "unsupported",
163
+ disposition: "omitted",
164
+ location: {
165
+ ...location,
166
+ xpath: child.xpath
167
+ },
168
+ namespaceUri: child.namespaceUri,
169
+ localName: child.localName,
170
+ mechanismHint: `color:${child.localName}`
171
+ });
172
+ }
173
+ if (colorCursor === void 0) return void 0;
174
+ let alpha;
175
+ let lumMod;
176
+ let lumOff;
177
+ for (const mod of colorCursor.remainingElementChildren()) if (mod.namespaceUri === "http://schemas.openxmlformats.org/drawingml/2006/main" && mod.localName === "alpha") {
178
+ const parsed = percentValAttrSchema.safeParse(mod.attrsObject(["val"]));
179
+ if (parsed.success) alpha = Math.min(1, Math.max(0, parsed.data.val / 1e5));
180
+ } else if (mod.namespaceUri === "http://schemas.openxmlformats.org/drawingml/2006/main" && mod.localName === "lumMod") {
181
+ const parsed = percentValAttrSchema.safeParse(mod.attrsObject(["val"]));
182
+ if (parsed.success) lumMod = Math.min(1, Math.max(0, parsed.data.val / 1e5));
183
+ } else if (mod.namespaceUri === "http://schemas.openxmlformats.org/drawingml/2006/main" && mod.localName === "lumOff") {
184
+ const parsed = percentValAttrSchema.safeParse(mod.attrsObject(["val"]));
185
+ if (parsed.success) lumOff = Math.min(1, Math.max(0, parsed.data.val / 1e5));
186
+ } else if (mod.namespaceUri === "http://schemas.openxmlformats.org/drawingml/2006/main" && (mod.localName === "hueOff" || mod.localName === "satOff" || mod.localName === "alphaOff") && mod.attr("val") === "0") {} else diagnostics.push({
187
+ code: "unsupported-mechanism",
188
+ category: "unsupported",
189
+ disposition: "omitted",
190
+ location: {
191
+ ...location,
192
+ xpath: mod.xpath
193
+ },
194
+ namespaceUri: mod.namespaceUri,
195
+ localName: mod.localName,
196
+ mechanismHint: `color-transform:${mod.localName}`
197
+ });
198
+ const baseColor = slot !== void 0 ? lumMod !== void 0 ? {
199
+ slot,
200
+ lumMod,
201
+ ...lumOff === void 0 ? {} : { lumOff }
202
+ } : slot : baseHex;
203
+ if (baseColor === void 0) return void 0;
204
+ if (alpha !== void 0 && alpha < 1) return {
205
+ color: baseColor,
206
+ alpha
207
+ };
208
+ return baseColor;
209
+ }
210
+ /** Parses `<a:xfrm>` offset, extent, rotation, and flips into pixels and raw EMU. */
211
+ function readTransformXml(xfrmCursor, location, diagnostics, options) {
212
+ const rawXfrm = xfrmCursor.attrsObject([
213
+ "rot",
214
+ "flipH",
215
+ "flipV"
216
+ ]);
217
+ const parsedXfrm = transformAttributesFragmentSchema.safeParse(rawXfrm);
218
+ const off = xfrmCursor.child(A_NS, "off");
219
+ const ext = xfrmCursor.child(A_NS, "ext");
220
+ if (off === void 0 || ext === void 0) {
221
+ diagnostics.push({
222
+ code: "corrupt-part",
223
+ category: "corrupt-input",
224
+ disposition: "omitted",
225
+ location: {
226
+ ...location,
227
+ xpath: xfrmCursor.xpath
228
+ }
229
+ });
230
+ return;
231
+ }
232
+ const parsedOff = offsetEmuFragmentSchema.safeParse(off.attrsObject(["x", "y"]));
233
+ const parsedExt = (options?.allowSingleZeroExtent === true ? nonNegativeExtentEmuFragmentSchema : extentEmuFragmentSchema).safeParse(ext.attrsObject(["cx", "cy"]));
234
+ if (!parsedOff.success || !parsedExt.success || parsedExt.data.cx === 0 && parsedExt.data.cy === 0) {
235
+ diagnostics.push({
236
+ code: "invalid-xml-value",
237
+ category: "corrupt-input",
238
+ disposition: "omitted",
239
+ location: {
240
+ ...location,
241
+ xpath: xfrmCursor.xpath
242
+ },
243
+ attributeOrElement: "a:xfrm"
244
+ });
245
+ return;
246
+ }
247
+ const rotate = parsedXfrm.success && parsedXfrm.data.rot !== void 0 && parsedXfrm.data.rot !== 0 ? parsedXfrm.data.rot / 6e4 : void 0;
248
+ const flipH = parsedXfrm.success && parsedXfrm.data.flipH === true;
249
+ const flipV = parsedXfrm.success && parsedXfrm.data.flipV === true;
250
+ return {
251
+ x: emuToPx(parsedOff.data.x),
252
+ y: emuToPx(parsedOff.data.y),
253
+ width: emuToPx(parsedExt.data.cx),
254
+ height: emuToPx(parsedExt.data.cy),
255
+ xEmu: parsedOff.data.x,
256
+ yEmu: parsedOff.data.y,
257
+ cxEmu: parsedExt.data.cx,
258
+ cyEmu: parsedExt.data.cy,
259
+ ...rotate === void 0 ? {} : { rotate },
260
+ ...flipH ? { flipH: true } : {},
261
+ ...flipV ? { flipV: true } : {}
262
+ };
263
+ }
264
+ /** Reads DrawingML `<a:gradFill>` into a `LinearGradient` or `RadialGradient`. */
265
+ function readGradientFill(gradFillCursor, location, diagnostics) {
266
+ gradFillCursor.consumeAttr("rotWithShape");
267
+ gradFillCursor.consumeAttr("flip");
268
+ const gsLst = gradFillCursor.child(A_NS, "gsLst");
269
+ const stops = [];
270
+ if (gsLst !== void 0) for (const gs of gsLst.children(A_NS, "gs")) {
271
+ const rawPos = gs.attrsObject(["pos"]);
272
+ const parsedPos = gradStopAttrSchema.safeParse(rawPos);
273
+ const color = readDrawingColor(gs, location, diagnostics);
274
+ if (!parsedPos.success || color === void 0) {
275
+ diagnostics.push({
276
+ code: "invalid-xml-value",
277
+ category: "corrupt-input",
278
+ disposition: "omitted",
279
+ location: {
280
+ ...location,
281
+ xpath: gs.xpath
282
+ },
283
+ attributeOrElement: "a:gs",
284
+ rawValue: JSON.stringify(rawPos)
285
+ });
286
+ continue;
287
+ }
288
+ stops.push({
289
+ position: Math.min(1, Math.max(0, parsedPos.data.pos / 1e5)),
290
+ color
291
+ });
292
+ }
293
+ if (stops.length < 2) {
294
+ diagnostics.push({
295
+ code: "invalid-xml-value",
296
+ category: "corrupt-input",
297
+ disposition: "omitted",
298
+ location: {
299
+ ...location,
300
+ xpath: gradFillCursor.xpath
301
+ },
302
+ attributeOrElement: "a:gradFill/a:gsLst"
303
+ });
304
+ return;
305
+ }
306
+ let result;
307
+ const lin = gradFillCursor.child(A_NS, "lin");
308
+ if (lin !== void 0) {
309
+ const rawLin = lin.attrsObject(["ang", "scaled"]);
310
+ const parsedLin = gradLinAttrSchema.safeParse(rawLin);
311
+ result = {
312
+ type: "linear-gradient",
313
+ angle: (((parsedLin.success ? parsedLin.data.ang ?? 0 : 0) / 6e4 + 90) % 360 + 360) % 360,
314
+ stops
315
+ };
316
+ } else {
317
+ const pathEl = gradFillCursor.child(A_NS, "path");
318
+ if (pathEl !== void 0) {
319
+ pathEl.consumeAttr("path");
320
+ const fillToRect = pathEl.child(A_NS, "fillToRect");
321
+ if (fillToRect !== void 0) {
322
+ fillToRect.consumeAttr("l");
323
+ fillToRect.consumeAttr("t");
324
+ fillToRect.consumeAttr("r");
325
+ fillToRect.consumeAttr("b");
326
+ }
327
+ result = {
328
+ type: "radial-gradient",
329
+ stops
330
+ };
331
+ }
332
+ }
333
+ const tileRect = gradFillCursor.child(A_NS, "tileRect");
334
+ if (tileRect !== void 0) {
335
+ tileRect.consumeAttr("l");
336
+ tileRect.consumeAttr("t");
337
+ tileRect.consumeAttr("r");
338
+ tileRect.consumeAttr("b");
339
+ }
340
+ return result;
341
+ }
342
+ /** Reads DrawingML `<a:blipFill>` embedded image bytes and optional `<a:alphaModFix>` opacity. */
343
+ function readBlipFill(blipFillCursor, pkg, location, diagnostics, validateImageBytes) {
344
+ blipFillCursor.consumeAttr("rotWithShape");
345
+ blipFillCursor.consumeAttr("dpi");
346
+ const srcRect = blipFillCursor.child(A_NS, "srcRect");
347
+ if (srcRect !== void 0) {
348
+ srcRect.consumeAttr("l");
349
+ srcRect.consumeAttr("t");
350
+ srcRect.consumeAttr("r");
351
+ srcRect.consumeAttr("b");
352
+ }
353
+ const stretch = blipFillCursor.child(A_NS, "stretch");
354
+ if (stretch !== void 0) stretch.ignoreEmptyChild(A_NS, "fillRect");
355
+ const blip = blipFillCursor.child(A_NS, "blip");
356
+ if (blip === void 0) {
357
+ diagnostics.push({
358
+ code: "corrupt-part",
359
+ category: "corrupt-input",
360
+ disposition: "omitted",
361
+ location: {
362
+ ...location,
363
+ xpath: blipFillCursor.xpath
364
+ }
365
+ });
366
+ return;
367
+ }
368
+ blip.consumeAttr("cstate");
369
+ const embedId = blip.attr("embed", R_NS);
370
+ const linkId = blip.attr("link", R_NS);
371
+ let opacity;
372
+ const alphaModFix = blip.child(A_NS, "alphaModFix");
373
+ if (alphaModFix !== void 0) {
374
+ const parsedAmt = alphaModFixAttrSchema.safeParse(alphaModFix.attrsObject(["amt"]));
375
+ if (parsedAmt.success) opacity = Math.min(1, Math.max(0, parsedAmt.data.amt / 1e5));
376
+ }
377
+ if (embedId === void 0) {
378
+ diagnostics.push({
379
+ code: "unsupported-mechanism",
380
+ category: "unsupported",
381
+ disposition: "omitted",
382
+ location: {
383
+ ...location,
384
+ xpath: blip.xpath
385
+ },
386
+ namespaceUri: A_NS,
387
+ localName: "blip",
388
+ mechanismHint: linkId !== void 0 ? "linked-image-fill" : "blip-fill"
389
+ });
390
+ return;
391
+ }
392
+ const rels = pkg.readRelationships(location.part);
393
+ diagnostics.push(...rels.diagnostics);
394
+ const rel = rels.entries.find((entry) => entry.Id === embedId);
395
+ if (rel === void 0 || rel.TargetMode === "External") {
396
+ diagnostics.push({
397
+ code: "broken-relationship",
398
+ category: "corrupt-input",
399
+ disposition: "omitted",
400
+ location: {
401
+ ...location,
402
+ xpath: blip.xpath
403
+ },
404
+ relationshipId: embedId
405
+ });
406
+ return;
407
+ }
408
+ const targetPart = resolvePartPath(location.part, rel.Target);
409
+ if (targetPart === void 0 || !pkg.hasPart(targetPart)) {
410
+ diagnostics.push({
411
+ code: "missing-target-part",
412
+ category: "corrupt-input",
413
+ disposition: "omitted",
414
+ location: {
415
+ ...location,
416
+ xpath: blip.xpath
417
+ },
418
+ relationshipId: embedId,
419
+ targetPart: targetPart ?? rel.Target
420
+ });
421
+ return;
422
+ }
423
+ const detachedBytes = pkg.readDetachedBytes(targetPart);
424
+ if (detachedBytes === void 0) return void 0;
425
+ if (validateImageBytes !== void 0) try {
426
+ validateImageBytes(detachedBytes);
427
+ } catch {
428
+ diagnostics.push({
429
+ code: "corrupt-part",
430
+ category: "corrupt-input",
431
+ disposition: "omitted",
432
+ location: { part: targetPart }
433
+ });
434
+ return;
435
+ }
436
+ return {
437
+ image: detachedBytes,
438
+ ...opacity === void 0 ? {} : { opacity }
439
+ };
440
+ }
441
+ /** Reads DrawingML `<a:ln>` stroke width, fill, dash preset, join, and line end arrows. */
442
+ function readLineBorder(lnCursor, location, diagnostics) {
443
+ const rawLn = lnCursor.attrsObject([
444
+ "w",
445
+ "cap",
446
+ "cmpd",
447
+ "algn"
448
+ ]);
449
+ let width;
450
+ if (rawLn["w"] !== void 0) {
451
+ const parsedW = ooxmlLineWidthEmuSchema.safeParse(rawLn["w"]);
452
+ if (parsedW.success) width = emuToPx(parsedW.data);
453
+ else diagnostics.push({
454
+ code: "invalid-xml-value",
455
+ category: "corrupt-input",
456
+ disposition: "recovered",
457
+ location: {
458
+ ...location,
459
+ xpath: `${lnCursor.xpath}/@w`
460
+ },
461
+ attributeOrElement: "a:ln/@w",
462
+ rawValue: rawLn["w"]
463
+ });
464
+ }
465
+ lineAttrSchema.omit({ w: true }).safeParse(rawLn);
466
+ let borderColor;
467
+ let borderStyle;
468
+ let startArrow;
469
+ let endArrow;
470
+ let hasNoFill = false;
471
+ for (const child of lnCursor.remainingElementChildren()) {
472
+ if (child.namespaceUri !== "http://schemas.openxmlformats.org/drawingml/2006/main") {
473
+ diagnostics.push({
474
+ code: "unconsumed-xml",
475
+ category: "unsupported",
476
+ disposition: "omitted",
477
+ kind: "element",
478
+ location: {
479
+ ...location,
480
+ xpath: child.xpath
481
+ },
482
+ namespaceUri: child.namespaceUri,
483
+ localName: child.localName
484
+ });
485
+ continue;
486
+ }
487
+ switch (child.localName) {
488
+ case "noFill":
489
+ hasNoFill = true;
490
+ break;
491
+ case "solidFill":
492
+ borderColor = readDrawingColor(child, location, diagnostics);
493
+ break;
494
+ case "prstDash": {
495
+ const rawDash = child.attrsObject(["val"]);
496
+ const parsedDash = dashPresetAttrSchema.safeParse(rawDash);
497
+ if (parsedDash.success) {
498
+ const val = parsedDash.data.val;
499
+ if (val === "solid") borderStyle = "solid";
500
+ else if (val === "dot" || val === "sysDot") borderStyle = "dotted";
501
+ else if (val === "dash" || val === "lgDash" || val === "dashDot" || val === "lgDashDot" || val === "lgDashDotDot" || val === "sysDash" || val === "sysDashDot" || val === "sysDashDotDot") borderStyle = "dashed";
502
+ else diagnostics.push({
503
+ code: "unsupported-mechanism",
504
+ category: "unsupported",
505
+ disposition: "omitted",
506
+ location: {
507
+ ...location,
508
+ xpath: child.xpath
509
+ },
510
+ namespaceUri: A_NS,
511
+ localName: "prstDash",
512
+ mechanismHint: `dash:${val}`
513
+ });
514
+ }
515
+ break;
516
+ }
517
+ case "headEnd":
518
+ case "tailEnd": {
519
+ const rawEnd = child.attrsObject([
520
+ "type",
521
+ "w",
522
+ "len"
523
+ ]);
524
+ const parsedEnd = lineEndAttrSchema.safeParse(rawEnd);
525
+ if (!parsedEnd.success) {
526
+ diagnostics.push({
527
+ code: "invalid-xml-value",
528
+ category: "corrupt-input",
529
+ disposition: "omitted",
530
+ location: {
531
+ ...location,
532
+ xpath: child.xpath
533
+ },
534
+ attributeOrElement: `a:${child.localName}`,
535
+ rawValue: JSON.stringify(rawEnd)
536
+ });
537
+ break;
538
+ }
539
+ if (parsedEnd.data.type !== void 0) {
540
+ if (child.localName === "headEnd") startArrow = parsedEnd.data.type;
541
+ else endArrow = parsedEnd.data.type;
542
+ }
543
+ break;
544
+ }
545
+ case "round":
546
+ case "miter":
547
+ case "bevel":
548
+ if (child.localName === "miter") child.consumeAttr("lim");
549
+ break;
550
+ default: diagnostics.push({
551
+ code: "unsupported-mechanism",
552
+ category: "unsupported",
553
+ disposition: "omitted",
554
+ location: {
555
+ ...location,
556
+ xpath: child.xpath
557
+ },
558
+ namespaceUri: child.namespaceUri,
559
+ localName: child.localName,
560
+ mechanismHint: `line:${child.localName}`
561
+ });
562
+ }
563
+ }
564
+ if (hasNoFill) return { noFill: true };
565
+ if (borderColor === void 0) return {};
566
+ return {
567
+ borderColor,
568
+ borderWidth: width ?? 1,
569
+ ...borderStyle === void 0 ? {} : { borderStyle },
570
+ ...startArrow === void 0 ? {} : { startArrow },
571
+ ...endArrow === void 0 ? {} : { endArrow }
572
+ };
573
+ }
574
+ /** Reads DrawingML `<a:effectLst>` outer shadow and soft edge while reporting unsupported effects cleanly. */
575
+ function readEffectList(effectLstCursor, location, diagnostics) {
576
+ let boxShadow;
577
+ let softEdge;
578
+ for (const child of effectLstCursor.remainingElementChildren()) {
579
+ if (child.namespaceUri !== "http://schemas.openxmlformats.org/drawingml/2006/main") {
580
+ diagnostics.push({
581
+ code: "unconsumed-xml",
582
+ category: "unsupported",
583
+ disposition: "omitted",
584
+ kind: "element",
585
+ location: {
586
+ ...location,
587
+ xpath: child.xpath
588
+ },
589
+ namespaceUri: child.namespaceUri,
590
+ localName: child.localName
591
+ });
592
+ continue;
593
+ }
594
+ if (child.localName === "outerShdw") {
595
+ const raw = child.attrsObject([
596
+ "blurRad",
597
+ "dist",
598
+ "dir",
599
+ "algn",
600
+ "rotWithShape"
601
+ ]);
602
+ const parsed = outerShadowAttrSchema.safeParse(raw);
603
+ if (!parsed.success) {
604
+ diagnostics.push({
605
+ code: "invalid-xml-value",
606
+ category: "corrupt-input",
607
+ disposition: "omitted",
608
+ location: {
609
+ ...location,
610
+ xpath: child.xpath
611
+ },
612
+ attributeOrElement: "a:outerShdw",
613
+ rawValue: JSON.stringify(raw)
614
+ });
615
+ child.suppressUnconsumed();
616
+ continue;
617
+ }
618
+ const color = readDrawingColor(child, location, diagnostics);
619
+ boxShadow = {
620
+ ...color === void 0 ? {} : { color },
621
+ blur: parsed.data.blurRad === void 0 ? 0 : emuToPx(parsed.data.blurRad),
622
+ distance: parsed.data.dist === void 0 ? 0 : emuToPx(parsed.data.dist),
623
+ angle: parsed.data.dir === void 0 ? 0 : parsed.data.dir / 6e4
624
+ };
625
+ } else if (child.localName === "softEdge") {
626
+ const raw = child.attrsObject(["rad"]);
627
+ const parsed = softEdgeAttrSchema.safeParse(raw);
628
+ if (!parsed.success) {
629
+ diagnostics.push({
630
+ code: "invalid-xml-value",
631
+ category: "corrupt-input",
632
+ disposition: "omitted",
633
+ location: {
634
+ ...location,
635
+ xpath: `${child.xpath}/@rad`
636
+ },
637
+ attributeOrElement: "a:softEdge/@rad",
638
+ rawValue: raw["rad"] ?? ""
639
+ });
640
+ continue;
641
+ }
642
+ if (parsed.data.rad > 0) softEdge = emuToPx(parsed.data.rad);
643
+ } else diagnostics.push({
644
+ code: "unsupported-mechanism",
645
+ category: "unsupported",
646
+ disposition: "omitted",
647
+ location: {
648
+ ...location,
649
+ xpath: child.xpath
650
+ },
651
+ namespaceUri: child.namespaceUri,
652
+ localName: child.localName,
653
+ mechanismHint: `effect:${child.localName}`
654
+ });
655
+ }
656
+ return {
657
+ ...boxShadow === void 0 ? {} : { boxShadow },
658
+ ...softEdge === void 0 ? {} : { softEdge }
659
+ };
660
+ }
661
+ function readBasicPlaceholderAppearance(spPr, pkg, _fallbackUnits, location, diagnostics) {
662
+ let prstGeomName;
663
+ let roundRectAdj;
664
+ let hasNoFill = false;
665
+ let hasEmptyEffectLst = false;
666
+ let backgroundColor;
667
+ let backgroundImage;
668
+ let opacity;
669
+ let border = {};
670
+ let effects = {};
671
+ for (const child of spPr.remainingElementChildren()) {
672
+ if (child.namespaceUri !== "http://schemas.openxmlformats.org/drawingml/2006/main") continue;
673
+ switch (child.localName) {
674
+ case "prstGeom": {
675
+ prstGeomName = child.attr("prst");
676
+ const avLst = child.child(A_NS, "avLst");
677
+ if (avLst !== void 0) for (const gd of avLst.children(A_NS, "gd")) {
678
+ const name = gd.attr("name");
679
+ const fmla = gd.attr("fmla");
680
+ if (name === "adj" && fmla !== void 0 && fmla.startsWith("val ")) {
681
+ const num = Number(fmla.slice(4));
682
+ if (Number.isSafeInteger(num)) roundRectAdj = num;
683
+ }
684
+ }
685
+ break;
686
+ }
687
+ case "noFill":
688
+ hasNoFill = true;
689
+ break;
690
+ case "solidFill":
691
+ backgroundColor = readDrawingColor(child, location, diagnostics);
692
+ break;
693
+ case "gradFill":
694
+ backgroundImage = readGradientFill(child, location, diagnostics);
695
+ break;
696
+ case "blipFill": {
697
+ const blip = readBlipFill(child, pkg, location, diagnostics);
698
+ if (blip !== void 0) {
699
+ backgroundImage = { image: blip.image };
700
+ opacity = blip.opacity;
701
+ }
702
+ break;
703
+ }
704
+ case "ln":
705
+ border = readLineBorder(child, location, diagnostics);
706
+ break;
707
+ case "effectLst":
708
+ hasEmptyEffectLst = child.element.children.length === 0;
709
+ effects = readEffectList(child, location, diagnostics);
710
+ break;
711
+ case "extLst": child.ignoreEmptyChild(A_NS, "ext");
712
+ }
713
+ }
714
+ const parsedPrst = prstGeomName === void 0 ? void 0 : presetGeometryNameSchema.safeParse(prstGeomName);
715
+ const geometry = parsedPrst?.success ? roundRectAdj !== void 0 ? {
716
+ type: "preset",
717
+ name: parsedPrst.data,
718
+ adjust: { adj: roundRectAdj }
719
+ } : parsedPrst.data : void 0;
720
+ const background = backgroundColor ?? backgroundImage ?? (hasNoFill ? "none" : void 0);
721
+ const resolvedBorder = border.borderColor !== void 0 ? {
722
+ color: border.borderColor,
723
+ ...border.borderWidth !== void 0 ? { width: border.borderWidth } : {},
724
+ ...border.borderStyle !== void 0 ? { style: border.borderStyle } : {}
725
+ } : border.noFill === true ? "none" : void 0;
726
+ const resolvedBoxShadow = effects.boxShadow ?? (hasEmptyEffectLst && effects.softEdge === void 0 ? "none" : void 0);
727
+ const style = {
728
+ ...background === void 0 ? {} : { background },
729
+ ...resolvedBorder === void 0 ? {} : { border: resolvedBorder },
730
+ ...opacity === void 0 ? {} : { opacity },
731
+ ...resolvedBoxShadow === void 0 ? {} : { boxShadow: resolvedBoxShadow },
732
+ ...effects.softEdge === void 0 ? {} : { softEdge: effects.softEdge }
733
+ };
734
+ return {
735
+ ...geometry === void 0 ? {} : { geometry },
736
+ style
737
+ };
738
+ }
739
+ /**
740
+ * Shared reader for master and layout placeholder `<p:spPr>` transforms, geometry, fills, borders, and effects.
741
+ */
742
+ function readPlaceholderSpPrVisuals(args, options) {
743
+ const { spPr, pkg, location, diagnostics } = args;
744
+ let x;
745
+ let y;
746
+ let width;
747
+ let height;
748
+ let rotate;
749
+ let flipH;
750
+ let flipV;
751
+ let fallbackUnits = {
752
+ w: 0,
753
+ h: 0
754
+ };
755
+ const xfrm = spPr.child(A_NS, "xfrm");
756
+ if (xfrm !== void 0) {
757
+ const hasExplicitFlipH = xfrm.element.hasAttribute("flipH");
758
+ const hasExplicitFlipV = xfrm.element.hasAttribute("flipV");
759
+ if (xfrm.child("http://schemas.openxmlformats.org/drawingml/2006/main", "off") !== void 0 && xfrm.child("http://schemas.openxmlformats.org/drawingml/2006/main", "ext") !== void 0) {
760
+ const tf = readTransformXml(xfrm, location, diagnostics);
761
+ if (tf !== void 0) {
762
+ x = tf.x;
763
+ y = tf.y;
764
+ width = tf.width;
765
+ height = tf.height;
766
+ rotate = tf.rotate;
767
+ if (hasExplicitFlipH) flipH = Boolean(tf.flipH);
768
+ if (hasExplicitFlipV) flipV = Boolean(tf.flipV);
769
+ fallbackUnits = {
770
+ w: tf.cxEmu,
771
+ h: tf.cyEmu
772
+ };
773
+ }
774
+ } else {
775
+ const rawXfrm = xfrm.attrsObject([
776
+ "rot",
777
+ "flipH",
778
+ "flipV"
779
+ ]);
780
+ const parsedXfrm = transformAttributesFragmentSchema.safeParse(rawXfrm);
781
+ if (parsedXfrm.success) {
782
+ if (parsedXfrm.data.rot !== void 0 && parsedXfrm.data.rot !== 0) rotate = parsedXfrm.data.rot / 6e4;
783
+ if (hasExplicitFlipH && parsedXfrm.data.flipH !== void 0) flipH = parsedXfrm.data.flipH;
784
+ if (hasExplicitFlipV && parsedXfrm.data.flipV !== void 0) flipV = parsedXfrm.data.flipV;
785
+ }
786
+ }
787
+ }
788
+ const appearance = (options?.readAppearance ?? readBasicPlaceholderAppearance)(spPr, pkg, fallbackUnits, location, diagnostics);
789
+ let borderRadius;
790
+ let exportedGeometry;
791
+ const geom = appearance.geometry;
792
+ if (geom === "roundRect") {
793
+ if (width !== void 0 && height !== void 0) borderRadius = 16667 / 1e5 * Math.min(width, height);
794
+ else exportedGeometry = geom;
795
+ } else if (typeof geom === "object" && geom.type === "preset") {
796
+ if (geom.name === "roundRect") {
797
+ if (width !== void 0 && height !== void 0) {
798
+ const adj = geom.adjust?.["adj"] ?? 16667;
799
+ if (adj > 0) borderRadius = adj / 1e5 * Math.min(width, height);
800
+ } else exportedGeometry = geom;
801
+ } else if (geom.name !== "rect") exportedGeometry = geom;
802
+ } else if (geom !== void 0 && geom !== "rect") exportedGeometry = geom;
803
+ const style = {};
804
+ for (const [key, value] of Object.entries(appearance.style)) if (value !== void 0 && (options?.allowedStyleKeys === void 0 || options.allowedStyleKeys.has(key))) style[key] = value;
805
+ if (x !== void 0 && y !== void 0) {
806
+ style["position"] = "absolute";
807
+ style["left"] = x;
808
+ style["top"] = y;
809
+ }
810
+ if (width !== void 0) style["width"] = width;
811
+ if (height !== void 0) style["height"] = height;
812
+ if (borderRadius !== void 0) style["borderRadius"] = borderRadius;
813
+ if (rotate !== void 0) style["rotate"] = rotate;
814
+ if (flipH !== void 0) style["flipH"] = flipH;
815
+ if (flipV !== void 0) style["flipV"] = flipV;
816
+ return {
817
+ ...exportedGeometry === void 0 ? {} : { geometry: exportedGeometry },
818
+ ...Object.keys(style).length === 0 ? {} : { style }
819
+ };
820
+ }
821
+ export { arrowTypeSchema, arrowTypes, readBlipFill, readDrawingColor, readEffectList, readGradientFill, readLineBorder, readPlaceholderSpPrVisuals, readTransformXml };