ooxml-core 1.32.0 → 1.33.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 (318) hide show
  1. package/dist/{PptxHandler-TESZUH66.cjs → PptxHandler-MGKMIK22.cjs} +3 -3
  2. package/dist/PptxHandler-Q7CFNKOU.mjs +7 -0
  3. package/dist/PptxHandler-TEC7SWBU.mjs +4 -0
  4. package/dist/{PresentationBuilder-3CH5TR4W.mjs → PresentationBuilder-PJMQRZI6.mjs} +2 -2
  5. package/dist/{PresentationBuilder-S6HXHKEJ.mjs → PresentationBuilder-SADKXDWC.mjs} +4 -4
  6. package/dist/{PresentationBuilder-5NFBUP7Y.cjs → PresentationBuilder-VP2637RH.cjs} +5 -5
  7. package/dist/automation/index.cjs +4398 -2262
  8. package/dist/automation/index.mjs +4398 -2262
  9. package/dist/chart/funnel-geometry.d.ts +1 -1
  10. package/dist/chart/funnel-geometry.d.ts.map +1 -1
  11. package/dist/chart/index.cjs +5743 -3820
  12. package/dist/chart/index.mjs +5736 -3821
  13. package/dist/chart/region-map/alias.d.ts +12 -0
  14. package/dist/chart/region-map/alias.d.ts.map +1 -0
  15. package/dist/chart/region-map/cache.d.ts +20 -0
  16. package/dist/chart/region-map/cache.d.ts.map +1 -0
  17. package/dist/chart/region-map/colors.d.ts +4 -0
  18. package/dist/chart/region-map/colors.d.ts.map +1 -0
  19. package/dist/chart/region-map/data.d.ts +45 -0
  20. package/dist/chart/region-map/data.d.ts.map +1 -0
  21. package/dist/chart/region-map/geographic-projection.d.ts +4 -0
  22. package/dist/chart/region-map/geographic-projection.d.ts.map +1 -0
  23. package/dist/chart/region-map/geometry.d.ts +10 -0
  24. package/dist/chart/region-map/geometry.d.ts.map +1 -0
  25. package/dist/chart/region-map/index.cjs +892 -0
  26. package/dist/chart/region-map/index.d.ts +12 -0
  27. package/dist/chart/region-map/index.d.ts.map +1 -0
  28. package/dist/chart/region-map/index.mjs +870 -0
  29. package/dist/chart/region-map/projection.d.ts +19 -0
  30. package/dist/chart/region-map/projection.d.ts.map +1 -0
  31. package/dist/chart/region-map/types.d.ts +39 -0
  32. package/dist/chart/region-map/types.d.ts.map +1 -0
  33. package/dist/chart/region-map/value-color-positions.d.ts +4 -0
  34. package/dist/chart/region-map/value-color-positions.d.ts.map +1 -0
  35. package/dist/chart/region-map/value-colors.d.ts +4 -0
  36. package/dist/chart/region-map/value-colors.d.ts.map +1 -0
  37. package/dist/chart/region-map/world-regions.d.ts +22 -0
  38. package/dist/chart/region-map/world-regions.d.ts.map +1 -0
  39. package/dist/chart/render/chart-3d-camera.d.ts +26 -0
  40. package/dist/chart/render/chart-3d-camera.d.ts.map +1 -0
  41. package/dist/chart/render/chart-3d-layout.d.ts +27 -0
  42. package/dist/chart/render/chart-3d-layout.d.ts.map +1 -0
  43. package/dist/chart/render/chart-3d-marks.d.ts +10 -0
  44. package/dist/chart/render/chart-3d-marks.d.ts.map +1 -0
  45. package/dist/chart/render/chart-3d-mesh.d.ts +32 -0
  46. package/dist/chart/render/chart-3d-mesh.d.ts.map +1 -0
  47. package/dist/chart/render/chart-3d-pie.d.ts +16 -0
  48. package/dist/chart/render/chart-3d-pie.d.ts.map +1 -0
  49. package/dist/chart/render/chart-3d-projection.d.ts +37 -0
  50. package/dist/chart/render/chart-3d-projection.d.ts.map +1 -0
  51. package/dist/chart/render/chart-3d-scene.d.ts +9 -0
  52. package/dist/chart/render/chart-3d-scene.d.ts.map +1 -0
  53. package/dist/chart/render/chart-3d-shading.d.ts +10 -0
  54. package/dist/chart/render/chart-3d-shading.d.ts.map +1 -0
  55. package/dist/chart/render/chart-3d-surface.d.ts +5 -0
  56. package/dist/chart/render/chart-3d-surface.d.ts.map +1 -0
  57. package/dist/chart/render/chart-3d-svg.d.ts +7 -0
  58. package/dist/chart/render/chart-3d-svg.d.ts.map +1 -0
  59. package/dist/chart/render/chart-3d-walls.d.ts +13 -0
  60. package/dist/chart/render/chart-3d-walls.d.ts.map +1 -0
  61. package/dist/chart/render/chart-svg-funnel.d.ts.map +1 -1
  62. package/dist/chart/render/chart-svg-region-map.d.ts +4 -0
  63. package/dist/chart/render/chart-svg-region-map.d.ts.map +1 -0
  64. package/dist/chart/render/chart-svg-text-metrics.d.ts +2 -0
  65. package/dist/chart/render/chart-svg-text-metrics.d.ts.map +1 -1
  66. package/dist/chart/render/chart-svg.d.ts.map +1 -1
  67. package/dist/chart/render/chart-view.d.ts +5 -1
  68. package/dist/chart/render/chart-view.d.ts.map +1 -1
  69. package/dist/chart/render/index.d.ts +5 -0
  70. package/dist/chart/render/index.d.ts.map +1 -1
  71. package/dist/chart/render/render-space.d.ts.map +1 -1
  72. package/dist/chart/render/summary-ex-formatting.d.ts +5 -0
  73. package/dist/chart/render/summary-ex-formatting.d.ts.map +1 -0
  74. package/dist/chart/render/summary-ex-series.d.ts.map +1 -1
  75. package/dist/chart/render/summary-from-chartex.d.ts.map +1 -1
  76. package/dist/chart/render/summary-from-space.d.ts.map +1 -1
  77. package/dist/chart/render/summary.d.ts +5 -1
  78. package/dist/chart/render/summary.d.ts.map +1 -1
  79. package/dist/{chunk-Q6NM64J2.cjs → chunk-2LTIDUXH.cjs} +4791 -950
  80. package/dist/chunk-2N7RZQLC.mjs +8 -0
  81. package/dist/{chunk-NAWLWKOJ.mjs → chunk-3LMHYL4W.mjs} +2 -2
  82. package/dist/{chunk-O7SVHLD7.mjs → chunk-6LJW76BZ.mjs} +4756 -951
  83. package/dist/{chunk-X6VNUBES.cjs → chunk-BDZR4DZ6.cjs} +2058 -1748
  84. package/dist/{chunk-IOTGRLJH.mjs → chunk-BQGLWC6N.mjs} +867 -557
  85. package/dist/{chunk-N6424WKA.mjs → chunk-EBBWRRSB.mjs} +1 -1
  86. package/dist/{chunk-UYMSFJQZ.mjs → chunk-JQVOUS6B.mjs} +5 -5
  87. package/dist/{chunk-3H5UAJB3.mjs → chunk-QRXMYOVN.mjs} +870 -525
  88. package/dist/{chunk-54S5A5PZ.mjs → chunk-VDUNZTJC.mjs} +36 -1
  89. package/dist/{chunk-4R65YYAD.mjs → chunk-Y2RH4QWG.mjs} +4228 -1070
  90. package/dist/diagram/drawing-resolve.d.ts.map +1 -1
  91. package/dist/diagram/drawing-view.d.ts +6 -0
  92. package/dist/diagram/drawing-view.d.ts.map +1 -1
  93. package/dist/diagram/engine/engine-to-result.d.ts.map +1 -1
  94. package/dist/diagram/index.cjs +786 -145
  95. package/dist/diagram/index.d.ts +1 -0
  96. package/dist/diagram/index.d.ts.map +1 -1
  97. package/dist/diagram/index.mjs +783 -147
  98. package/dist/diagram/layout/smartart-layout-types.d.ts +7 -0
  99. package/dist/diagram/layout/smartart-layout-types.d.ts.map +1 -1
  100. package/dist/diagram/layout-preview.d.ts +4 -0
  101. package/dist/diagram/layout-preview.d.ts.map +1 -1
  102. package/dist/diagram/layout-role-style.d.ts +4 -0
  103. package/dist/diagram/layout-role-style.d.ts.map +1 -0
  104. package/dist/diagram/load.d.ts.map +1 -1
  105. package/dist/diagram/picture-layout.d.ts +23 -0
  106. package/dist/diagram/picture-layout.d.ts.map +1 -0
  107. package/dist/diagram/types.d.ts +6 -0
  108. package/dist/diagram/types.d.ts.map +1 -1
  109. package/dist/diagram/write/cache.d.ts +1 -0
  110. package/dist/diagram/write/cache.d.ts.map +1 -1
  111. package/dist/digest/crc32.d.ts +2 -0
  112. package/dist/digest/crc32.d.ts.map +1 -0
  113. package/dist/digest/index.cjs +11 -0
  114. package/dist/digest/index.d.ts +1 -0
  115. package/dist/digest/index.d.ts.map +1 -1
  116. package/dist/digest/index.mjs +11 -1
  117. package/dist/docx/diagram-cache.d.ts.map +1 -1
  118. package/dist/docx/diagram-save.d.ts.map +1 -1
  119. package/dist/docx/drawing.d.ts.map +1 -1
  120. package/dist/docx/embedded.cjs +882 -212
  121. package/dist/docx/embedded.mjs +882 -212
  122. package/dist/docx/index.cjs +3082 -866
  123. package/dist/docx/index.mjs +3082 -866
  124. package/dist/docx/inline-model.d.ts +4 -0
  125. package/dist/docx/inline-model.d.ts.map +1 -1
  126. package/dist/docx/layout/adapt-floats.d.ts.map +1 -1
  127. package/dist/docx/layout/adapter.d.ts.map +1 -1
  128. package/dist/docx/layout/floats.d.ts.map +1 -1
  129. package/dist/docx/layout/index.cjs +2200 -438
  130. package/dist/docx/layout/index.mjs +2200 -438
  131. package/dist/docx/layout/input.d.ts +3 -0
  132. package/dist/docx/layout/input.d.ts.map +1 -1
  133. package/dist/docx/layout/result.d.ts +3 -0
  134. package/dist/docx/layout/result.d.ts.map +1 -1
  135. package/dist/docx/load/index.cjs +1311 -641
  136. package/dist/docx/load/index.mjs +1311 -641
  137. package/dist/docx/parse.d.ts.map +1 -1
  138. package/dist/docx/ui/index.cjs +2832 -842
  139. package/dist/docx/ui/index.mjs +2832 -842
  140. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  141. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  142. package/dist/docx/write-drawing.d.ts.map +1 -1
  143. package/dist/drawingml/index.cjs +707 -111
  144. package/dist/drawingml/index.d.ts +7 -0
  145. package/dist/drawingml/index.d.ts.map +1 -1
  146. package/dist/drawingml/index.mjs +697 -113
  147. package/dist/drawingml/picture-artistic.d.ts +14 -0
  148. package/dist/drawingml/picture-artistic.d.ts.map +1 -0
  149. package/dist/drawingml/picture-effects.d.ts +4 -1
  150. package/dist/drawingml/picture-effects.d.ts.map +1 -1
  151. package/dist/drawingml/picture-fill.d.ts.map +1 -1
  152. package/dist/drawingml/picture-hsl-pixels.d.ts +4 -0
  153. package/dist/drawingml/picture-hsl-pixels.d.ts.map +1 -0
  154. package/dist/drawingml/picture-layout.d.ts +25 -0
  155. package/dist/drawingml/picture-layout.d.ts.map +1 -0
  156. package/dist/drawingml/picture-standard-effects.d.ts +15 -0
  157. package/dist/drawingml/picture-standard-effects.d.ts.map +1 -0
  158. package/dist/drawingml/picture-transfer.d.ts +11 -0
  159. package/dist/drawingml/picture-transfer.d.ts.map +1 -0
  160. package/dist/drawingml/raster-image.d.ts +29 -0
  161. package/dist/drawingml/raster-image.d.ts.map +1 -0
  162. package/dist/drawingml/types.d.ts +1 -0
  163. package/dist/drawingml/types.d.ts.map +1 -1
  164. package/dist/drawingml/write-pattern-picture.d.ts.map +1 -1
  165. package/dist/geometry/index.cjs +38 -0
  166. package/dist/geometry/index.d.ts +1 -0
  167. package/dist/geometry/index.d.ts.map +1 -1
  168. package/dist/geometry/index.mjs +36 -1
  169. package/dist/geometry/picture-tile.d.ts +29 -0
  170. package/dist/geometry/picture-tile.d.ts.map +1 -0
  171. package/dist/index.cjs +15164 -12669
  172. package/dist/index.mjs +15164 -12669
  173. package/dist/pptx/automation/index.cjs +7431 -2967
  174. package/dist/pptx/automation/index.d.ts +5 -5
  175. package/dist/pptx/automation/index.mjs +7 -7
  176. package/dist/pptx/chunks/{elements-mSCZ84Tc.d.ts → elements-f3UbFph-.d.ts} +7 -2
  177. package/dist/pptx/chunks/elements-f3UbFph-.d.ts.map +1 -0
  178. package/dist/pptx/chunks/{index-DnWlmYCy.d.ts → index-BnH2QjYm.d.ts} +4 -4
  179. package/dist/pptx/chunks/{index-DnWlmYCy.d.ts.map → index-BnH2QjYm.d.ts.map} +1 -1
  180. package/dist/pptx/chunks/{index-D-FdgqrP.d.ts → index-Bp-1pGo1.d.ts} +4 -4
  181. package/dist/pptx/chunks/{index-D-FdgqrP.d.ts.map → index-Bp-1pGo1.d.ts.map} +1 -1
  182. package/dist/pptx/chunks/{index-DKybuHPT.d.ts → index-BuMPQDQb.d.ts} +27 -16
  183. package/dist/pptx/chunks/index-BuMPQDQb.d.ts.map +1 -0
  184. package/dist/pptx/chunks/{smart-art-DLumQo90.d.ts → smart-art-CmOrPLLQ.d.ts} +86 -2
  185. package/dist/pptx/chunks/smart-art-CmOrPLLQ.d.ts.map +1 -0
  186. package/dist/pptx/chunks/{text-operations-hyPODwIQ.d.ts → text-operations-D5sgspO6.d.ts} +2 -2
  187. package/dist/pptx/chunks/{text-operations-hyPODwIQ.d.ts.map → text-operations-D5sgspO6.d.ts.map} +1 -1
  188. package/dist/pptx/cli/index.cjs +7196 -2732
  189. package/dist/pptx/cli/index.d.ts +1 -1
  190. package/dist/pptx/cli/index.mjs +6 -6
  191. package/dist/pptx/converter/index.cjs +3895 -503
  192. package/dist/pptx/converter/index.d.ts +1 -1
  193. package/dist/pptx/converter/index.mjs +3 -3
  194. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  195. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  196. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  197. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  198. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  199. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  200. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  201. package/dist/pptx/index.cjs +6828 -2969
  202. package/dist/pptx/index.d.ts +7 -7
  203. package/dist/pptx/index.mjs +7 -7
  204. package/dist/pptx/node/index.d.ts +1 -1
  205. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  206. package/dist/pptx/smartart-layouts/index.mjs +2 -2
  207. package/dist/teams/index.cjs +1964 -726
  208. package/dist/teams/index.mjs +1964 -726
  209. package/dist/visio/cell-formula.d.ts +5 -1
  210. package/dist/visio/cell-formula.d.ts.map +1 -1
  211. package/dist/visio/collab/index.cjs +3 -1
  212. package/dist/visio/collab/index.mjs +3 -1
  213. package/dist/visio/container-relationships.d.ts +19 -0
  214. package/dist/visio/container-relationships.d.ts.map +1 -0
  215. package/dist/visio/edit-container-fit.d.ts +19 -0
  216. package/dist/visio/edit-container-fit.d.ts.map +1 -0
  217. package/dist/visio/edit-container-members.d.ts +21 -0
  218. package/dist/visio/edit-container-members.d.ts.map +1 -0
  219. package/dist/visio/edit-delete.d.ts.map +1 -1
  220. package/dist/visio/edit-diagram-parts-commands.d.ts +23 -1
  221. package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -1
  222. package/dist/visio/edit-diagram-parts.d.ts +3 -2
  223. package/dist/visio/edit-diagram-parts.d.ts.map +1 -1
  224. package/dist/visio/edit-geometry.d.ts +4 -1
  225. package/dist/visio/edit-geometry.d.ts.map +1 -1
  226. package/dist/visio/edit-recalculate-index.d.ts +13 -0
  227. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  228. package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
  229. package/dist/visio/edit-recalculate.d.ts.map +1 -1
  230. package/dist/visio/edit.d.ts.map +1 -1
  231. package/dist/visio/formula-analyze.d.ts +2 -0
  232. package/dist/visio/formula-analyze.d.ts.map +1 -1
  233. package/dist/visio/formula-evaluate.d.ts.map +1 -1
  234. package/dist/visio/formula-master.d.ts +1 -0
  235. package/dist/visio/formula-master.d.ts.map +1 -1
  236. package/dist/visio/index.cjs +2771 -1312
  237. package/dist/visio/index.d.ts +1 -1
  238. package/dist/visio/index.d.ts.map +1 -1
  239. package/dist/visio/index.mjs +2771 -1312
  240. package/dist/visio/media.d.ts +4 -23
  241. package/dist/visio/media.d.ts.map +1 -1
  242. package/dist/visio/package-common.d.ts +1 -1
  243. package/dist/visio/package-common.d.ts.map +1 -1
  244. package/dist/visio/shape-structure.d.ts +6 -3
  245. package/dist/visio/shape-structure.d.ts.map +1 -1
  246. package/dist/visio/ui/diagram-parts.d.ts +12 -1
  247. package/dist/visio/ui/diagram-parts.d.ts.map +1 -1
  248. package/dist/visio/ui/index.cjs +2679 -1201
  249. package/dist/visio/ui/index.mjs +2679 -1202
  250. package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
  251. package/dist/xlsx/edit/chart-ex.d.ts +1 -0
  252. package/dist/xlsx/edit/chart-ex.d.ts.map +1 -1
  253. package/dist/xlsx/edit/filter.d.ts +5 -1
  254. package/dist/xlsx/edit/filter.d.ts.map +1 -1
  255. package/dist/xlsx/edit/index.d.ts +1 -0
  256. package/dist/xlsx/edit/index.d.ts.map +1 -1
  257. package/dist/xlsx/edit/session-calc.d.ts +5 -0
  258. package/dist/xlsx/edit/session-calc.d.ts.map +1 -1
  259. package/dist/xlsx/edit/session.d.ts.map +1 -1
  260. package/dist/xlsx/edit/text-columns.d.ts +21 -0
  261. package/dist/xlsx/edit/text-columns.d.ts.map +1 -0
  262. package/dist/xlsx/edit/types.d.ts +5 -1
  263. package/dist/xlsx/edit/types.d.ts.map +1 -1
  264. package/dist/xlsx/embedded-chart-ex-space.d.ts +18 -0
  265. package/dist/xlsx/embedded-chart-ex-space.d.ts.map +1 -0
  266. package/dist/xlsx/filter-criteria.d.ts +22 -0
  267. package/dist/xlsx/filter-criteria.d.ts.map +1 -0
  268. package/dist/xlsx/filter-dynamic.d.ts +8 -0
  269. package/dist/xlsx/filter-dynamic.d.ts.map +1 -0
  270. package/dist/xlsx/filter-menu.d.ts +49 -0
  271. package/dist/xlsx/filter-menu.d.ts.map +1 -0
  272. package/dist/xlsx/filter-rows.d.ts +4 -4
  273. package/dist/xlsx/filter-rows.d.ts.map +1 -1
  274. package/dist/xlsx/index.cjs +5861 -2939
  275. package/dist/xlsx/index.d.ts +4 -0
  276. package/dist/xlsx/index.d.ts.map +1 -1
  277. package/dist/xlsx/index.mjs +5844 -2939
  278. package/dist/xlsx/load/index.cjs +1871 -585
  279. package/dist/xlsx/load/index.mjs +1871 -585
  280. package/dist/xlsx/model-filter.d.ts +54 -0
  281. package/dist/xlsx/model-filter.d.ts.map +1 -0
  282. package/dist/xlsx/model.d.ts +42 -3
  283. package/dist/xlsx/model.d.ts.map +1 -1
  284. package/dist/xlsx/read/chart.d.ts.map +1 -1
  285. package/dist/xlsx/read/drawing.d.ts.map +1 -1
  286. package/dist/xlsx/read/filter-columns.d.ts +5 -0
  287. package/dist/xlsx/read/filter-columns.d.ts.map +1 -0
  288. package/dist/xlsx/read/shared-strings.d.ts +5 -3
  289. package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
  290. package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
  291. package/dist/xlsx/read/sheet-props.d.ts +2 -2
  292. package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
  293. package/dist/xlsx/ui/commands/i18n/filters.d.ts +3 -0
  294. package/dist/xlsx/ui/commands/i18n/filters.d.ts.map +1 -0
  295. package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
  296. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  297. package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -1
  298. package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -1
  299. package/dist/xlsx/ui/dialogs/grid-chart.d.ts.map +1 -1
  300. package/dist/xlsx/ui/index.cjs +7177 -4234
  301. package/dist/xlsx/ui/index.mjs +7177 -4234
  302. package/dist/xlsx/write/drawing.d.ts.map +1 -1
  303. package/dist/xlsx/write/filter-columns.d.ts +39 -0
  304. package/dist/xlsx/write/filter-columns.d.ts.map +1 -0
  305. package/dist/xlsx/write/shared-strings.d.ts +4 -4
  306. package/dist/xlsx/write/shared-strings.d.ts.map +1 -1
  307. package/dist/xlsx/write/sheet-props.d.ts +2 -1
  308. package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
  309. package/dist/xlsx/write/smart-art-cache.d.ts.map +1 -1
  310. package/dist/xlsx/write/smart-art.d.ts.map +1 -1
  311. package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
  312. package/package.json +6 -1
  313. package/dist/PptxHandler-QY5VL3CY.mjs +0 -7
  314. package/dist/PptxHandler-SJ5ZUIUX.mjs +0 -4
  315. package/dist/chunk-3GXV5MPC.mjs +0 -41
  316. package/dist/pptx/chunks/elements-mSCZ84Tc.d.ts.map +0 -1
  317. package/dist/pptx/chunks/index-DKybuHPT.d.ts.map +0 -1
  318. package/dist/pptx/chunks/smart-art-DLumQo90.d.ts.map +0 -1
@@ -542,37 +542,271 @@ function withDrawingColorBrightness(color, percent) {
542
542
  return result;
543
543
  }
544
544
 
545
- // drawingml/picture-crop.ts
546
- var SIDES = { l: "cropLeft", t: "cropTop", r: "cropRight", b: "cropBottom" };
547
- function parsePictureCrop(blipFill) {
548
- const rect = first(blipFill, "srcRect", NS.a);
549
- if (!rect) return void 0;
550
- const result = {};
551
- for (const [attr, key] of Object.entries(SIDES)) {
552
- const raw = rect.getAttribute(attr);
553
- if (raw === null || !raw.trim()) continue;
554
- const percent = raw.endsWith("%");
555
- const value = Number(percent ? raw.slice(0, -1) : raw) / (percent ? 100 : 1e5);
556
- if (Number.isFinite(value)) result[key] = value;
545
+ // drawingml/picture-artistic.ts
546
+ var ARTISTIC_PRIMARY_ATTRIBUTE = {
547
+ artisticBlur: "radius",
548
+ artisticCement: "crackSpacing",
549
+ artisticChalkSketch: "pressure",
550
+ artisticCrisscrossEtching: "pressure",
551
+ artisticCutout: "numberOfShades",
552
+ artisticFilmGrain: "grainSize",
553
+ artisticGlass: "scaling",
554
+ artisticGlowDiffused: "intensity",
555
+ artisticGlowEdges: "smoothness",
556
+ artisticLightScreen: "gridSize",
557
+ artisticLineDrawing: "pencilSize",
558
+ artisticMarker: "size",
559
+ // Spelled "Mosiaic" in the schema; Microsoft's typo is part of the format.
560
+ artisticMosiaicBubbles: "pressure",
561
+ artisticPaintBrush: "brushSize",
562
+ artisticPaintStrokes: "intensity",
563
+ artisticPastelsSmooth: "scaling",
564
+ artisticPencilGrayscale: "pencilSize",
565
+ artisticPencilSketch: "pressure",
566
+ artisticPhotocopy: "detail",
567
+ artisticPlasticWrap: "smoothness",
568
+ artisticTexturizer: "scaling",
569
+ artisticWatercolorSponge: "brushSize"
570
+ };
571
+ function parseArtisticPictureExtension(node) {
572
+ if (node.namespaceURI !== NS.a || node.localName !== "extLst") return void 0;
573
+ const found = [];
574
+ const unhandled = [];
575
+ const pending = [node];
576
+ while (pending.length) {
577
+ const item = pending.pop();
578
+ if (item !== node && !(item.namespaceURI === NS.a && item.localName === "ext") && !(item.namespaceURI === "http://schemas.microsoft.com/office/drawing/2010/main" && (["imgProps", "imgLayer", "imgEffect", "useLocalDpi"].includes(item.localName) || ARTISTIC_PRIMARY_ATTRIBUTE[item.localName])))
579
+ unhandled.push(item.localName);
580
+ if (item.namespaceURI === "http://schemas.microsoft.com/office/drawing/2010/main" && item.localName.startsWith("artistic"))
581
+ found.push(item);
582
+ pending.push(...elements(item));
557
583
  }
558
- return result;
584
+ if (found.length !== 1) return void 0;
585
+ const effect = found[0];
586
+ const key = ARTISTIC_PRIMARY_ATTRIBUTE[effect.localName];
587
+ if (!key) return void 0;
588
+ const raw = key ? effect.getAttribute(key) : null;
589
+ const n = raw === null ? 0 : Number(raw);
590
+ if (!Number.isFinite(n)) return void 0;
591
+ return {
592
+ kind: "artistic",
593
+ name: effect.localName,
594
+ radius: effect.localName === "artisticBlur" ? n : n / 1e3,
595
+ baked: true,
596
+ ...unhandled.length ? { unhandled } : {}
597
+ };
559
598
  }
560
- function applyPictureCrop(blipFill, crop) {
561
- let rect = first(blipFill, "srcRect", NS.a);
562
- if (!rect && crop && Object.values(crop).some((value) => value !== void 0)) {
563
- rect = blipFill.ownerDocument.createElementNS(NS.a, "a:srcRect");
564
- const blip = first(blipFill, "blip", NS.a);
565
- blipFill.insertBefore(rect, blip?.nextSibling ?? blipFill.firstChild);
599
+
600
+ // drawingml/write-color.ts
601
+ var ELEMENTS = {
602
+ srgb: "srgbClr",
603
+ scheme: "schemeClr",
604
+ system: "sysClr",
605
+ preset: "prstClr",
606
+ scrgb: "scrgbClr",
607
+ hsl: "hslClr"
608
+ };
609
+ function drawingColorXml(color) {
610
+ const local = ELEMENTS[color.kind];
611
+ const doc = parseXml(`<a:${local} xmlns:a="${NS.a}"/>`);
612
+ const root = doc.documentElement;
613
+ if (color.kind === "scrgb" || color.kind === "hsl") {
614
+ const keys = color.kind === "scrgb" ? ["r", "g", "b"] : ["hue", "sat", "lum"];
615
+ const values = color.value.split(",");
616
+ keys.forEach((key, i) => root.setAttribute(key, values[i] ?? "0"));
617
+ } else root.setAttribute("val", color.value);
618
+ if (color.fallback !== void 0 && color.kind === "system")
619
+ root.setAttribute("lastClr", color.fallback);
620
+ for (const transform of color.transforms) {
621
+ if (!/^[A-Za-z_][\w.-]*$/.test(transform.name))
622
+ throw new Error(`Invalid DrawingML transform ${transform.name}`);
623
+ const node = doc.createElementNS(NS.a, `a:${transform.name}`);
624
+ if (transform.value !== "") node.setAttribute("val", transform.value);
625
+ root.appendChild(node);
566
626
  }
567
- if (!rect) return;
568
- for (const [attr, key] of Object.entries(SIDES)) {
569
- const value = crop?.[key];
570
- if (value === void 0) rect.removeAttribute(attr);
571
- else {
572
- if (!Number.isFinite(value)) throw new RangeError("Picture crop must be finite");
573
- rect.setAttribute(attr, String(Math.round(value * 1e5)));
627
+ return buildXml(doc);
628
+ }
629
+
630
+ // drawingml/patch-color.ts
631
+ function patchDrawingColorIn(container, color) {
632
+ const old = elements(container).find((node) => parseDrawingColor(node));
633
+ const before = parseDrawingColorIn(container);
634
+ if (!old || !before || before.kind !== color.kind) {
635
+ const next = container.ownerDocument.importNode(
636
+ parseXml(drawingColorXml(color)).documentElement,
637
+ true
638
+ );
639
+ if (old) container.replaceChild(next, old);
640
+ else container.insertBefore(next, container.firstChild);
641
+ return;
642
+ }
643
+ if (before.value !== color.value) {
644
+ if (color.kind === "scrgb" || color.kind === "hsl") {
645
+ const keys = color.kind === "scrgb" ? ["r", "g", "b"] : ["hue", "sat", "lum"];
646
+ const values = color.value.split(",");
647
+ keys.forEach((key, index) => old.setAttribute(key, values[index] ?? "0"));
648
+ } else old.setAttribute("val", color.value);
649
+ }
650
+ if (before.fallback !== color.fallback && color.kind === "system") {
651
+ if (color.fallback === void 0) old.removeAttribute("lastClr");
652
+ else old.setAttribute("lastClr", color.fallback);
653
+ }
654
+ const originals = elements(old);
655
+ color.transforms.forEach((transform, index) => {
656
+ const source2 = originals[index];
657
+ if (source2?.localName === transform.name) {
658
+ if (before.transforms[index]?.value !== transform.value) {
659
+ if (transform.value === "") source2.removeAttribute("val");
660
+ else source2.setAttribute("val", transform.value);
661
+ }
662
+ return;
574
663
  }
664
+ if (!/^[A-Za-z_][\w.-]*$/u.test(transform.name))
665
+ throw new Error("Invalid DrawingML colour transform");
666
+ const next = old.ownerDocument.createElementNS(NS.a, `a:${transform.name}`);
667
+ if (transform.value !== "") next.setAttribute("val", transform.value);
668
+ if (source2) old.replaceChild(next, source2);
669
+ else old.appendChild(next);
670
+ });
671
+ for (const extra of originals.slice(color.transforms.length)) old.removeChild(extra);
672
+ }
673
+
674
+ // drawingml/picture-standard-effects.ts
675
+ var attrs = {
676
+ biLevel: { threshold: "thresh" },
677
+ alphaRepl: { amount: "a" },
678
+ alphaBiLevel: { threshold: "thresh" },
679
+ hsl: { hue: "hue", saturation: "sat", luminance: "lum" },
680
+ tint: { hue: "hue", amount: "amt" },
681
+ blur: { radiusEmu: "rad" }
682
+ };
683
+ function parseStandardPictureEffect(node) {
684
+ const name = node.localName;
685
+ if (![
686
+ "biLevel",
687
+ "alphaInv",
688
+ "alphaCeiling",
689
+ "alphaFloor",
690
+ "alphaRepl",
691
+ "alphaBiLevel",
692
+ "alphaMod",
693
+ "duotone",
694
+ "clrRepl",
695
+ "clrChange",
696
+ "hsl",
697
+ "tint",
698
+ "blur"
699
+ ].includes(name))
700
+ return void 0;
701
+ const values = {};
702
+ for (const [key, attribute] of Object.entries(attrs[name] ?? {})) {
703
+ const raw = node.getAttribute(attribute);
704
+ if (raw === null) continue;
705
+ const percent = raw.endsWith("%");
706
+ const n = Number(percent ? raw.slice(0, -1) : raw) / (key === "hue" ? 6e4 : key === "radiusEmu" ? 1 : percent ? 100 : 1e5);
707
+ if (!Number.isFinite(n) || key === "hue" && (n < 0 || n >= 360) || key === "threshold" && (n < 0 || n > 1) || key === "radiusEmu" && (!Number.isSafeInteger(n) || n < 0) || ["saturation", "luminance", "amount"].includes(key) && name !== "alphaMod" && (n < (name === "alphaRepl" ? 0 : -1) || n > 1))
708
+ return void 0;
709
+ values[key] = n;
575
710
  }
711
+ if (["biLevel", "alphaBiLevel"].includes(name) && values.threshold === void 0)
712
+ return void 0;
713
+ if (name === "alphaRepl" && values.amount === void 0) return void 0;
714
+ if (name === "alphaMod") {
715
+ const cont = first(node, "cont", NS.a);
716
+ const nested = cont ? elements(cont) : [];
717
+ if (nested.length !== 1 || nested[0]?.localName !== "alphaModFix") return void 0;
718
+ const raw = nested[0].getAttribute("amt") ?? "100000";
719
+ const n = Number(raw.endsWith("%") ? raw.slice(0, -1) : raw) / (raw.endsWith("%") ? 100 : 1e5);
720
+ if (!Number.isFinite(n) || n < 0) return void 0;
721
+ values.amount = n;
722
+ }
723
+ let colors = [];
724
+ if (name === "duotone") {
725
+ const candidates = elements(node).filter(
726
+ (item) => item.namespaceURI === NS.a && /Clr$/.test(item.localName)
727
+ );
728
+ colors = candidates.map((item) => parseDrawingColor(item)).filter((item) => Boolean(item));
729
+ if (colors.length !== 2) return void 0;
730
+ }
731
+ if (name === "clrRepl") {
732
+ const color = parseDrawingColorIn(node);
733
+ if (!color) return void 0;
734
+ colors = [color];
735
+ }
736
+ if (name === "clrChange") {
737
+ const from = parseDrawingColorIn(first(node, "clrFrom", NS.a)), to = parseDrawingColorIn(first(node, "clrTo", NS.a));
738
+ if (!from || !to) return void 0;
739
+ colors = [from, to];
740
+ }
741
+ if (name === "alphaInv") {
742
+ const color = parseDrawingColorIn(node);
743
+ if (color) colors = [color];
744
+ }
745
+ return {
746
+ kind: "standard",
747
+ name,
748
+ ...Object.keys(values).length ? { values } : {},
749
+ ...colors.length ? { colors } : {},
750
+ ...name === "clrChange" && node.hasAttribute("useA") ? { useAlpha: !["0", "false"].includes(node.getAttribute("useA") ?? "") } : {},
751
+ ...name === "blur" && node.hasAttribute("grow") ? { grow: !["0", "false"].includes(node.getAttribute("grow") ?? "") } : {}
752
+ };
753
+ }
754
+ function applyStandardPictureEffect(node, effect) {
755
+ const doc = node.ownerDocument, before = parseStandardPictureEffect(node);
756
+ for (const [key, value] of Object.entries(effect.values ?? {})) {
757
+ if (!Number.isFinite(value) || key === "hue" && (value < 0 || value >= 360) || key === "threshold" && (value < 0 || value > 1) || key === "radiusEmu" && (!Number.isSafeInteger(value) || value < 0) || key === "amount" && effect.name === "alphaMod" && value < 0 || ["saturation", "luminance", "amount"].includes(key) && effect.name !== "alphaMod" && (value < (effect.name === "alphaRepl" ? 0 : -1) || value > 1))
758
+ throw new RangeError("Invalid picture effect values");
759
+ }
760
+ const count = effect.colors?.length ?? 0;
761
+ if (["duotone", "clrChange"].includes(effect.name) && count !== 2 || effect.name === "clrRepl" && count !== 1 || effect.name === "alphaInv" && count > 1)
762
+ throw new RangeError("Invalid picture effect colours");
763
+ for (const [key, attribute] of Object.entries(attrs[effect.name] ?? {})) {
764
+ const value = effect.values?.[key];
765
+ if (value === before?.values?.[key]) continue;
766
+ if (value === void 0) node.removeAttribute(attribute);
767
+ else
768
+ node.setAttribute(
769
+ attribute,
770
+ String(Math.round(value * (key === "hue" ? 6e4 : key === "radiusEmu" ? 1 : 1e5)))
771
+ );
772
+ }
773
+ if (effect.name === "alphaMod" && effect.values?.amount !== before?.values?.amount) {
774
+ const cont = first(node, "cont", NS.a) ?? doc.createElementNS(NS.a, "a:cont");
775
+ const fix = first(cont, "alphaModFix", NS.a) ?? doc.createElementNS(NS.a, "a:alphaModFix");
776
+ fix.setAttribute("amt", String(Math.round((effect.values?.amount ?? 1) * 1e5)));
777
+ if (!fix.parentNode) cont.appendChild(fix);
778
+ if (!cont.parentNode) node.appendChild(cont);
779
+ }
780
+ if (effect.useAlpha !== before?.useAlpha) {
781
+ if (effect.useAlpha === void 0) node.removeAttribute("useA");
782
+ else node.setAttribute("useA", effect.useAlpha ? "1" : "0");
783
+ }
784
+ if (effect.grow !== before?.grow) {
785
+ if (effect.grow === void 0) node.removeAttribute("grow");
786
+ else node.setAttribute("grow", effect.grow ? "1" : "0");
787
+ }
788
+ if (JSON.stringify(effect.colors) !== JSON.stringify(before?.colors)) {
789
+ if (effect.name === "duotone") {
790
+ const old = elements(node).filter(
791
+ (item) => item.namespaceURI === NS.a && /Clr$/.test(item.localName)
792
+ );
793
+ for (let i = 0; i < (effect.colors?.length ?? 0); i++) {
794
+ const holder = doc.createElementNS(NS.a, "a:holder");
795
+ if (old[i]) holder.appendChild(doc.importNode(old[i], true));
796
+ patchDrawingColorIn(holder, effect.colors[i]);
797
+ const next = elements(holder)[0];
798
+ if (old[i]) node.replaceChild(next, old[i]);
799
+ else node.insertBefore(next, first(node, "extLst", NS.a) ?? null);
800
+ }
801
+ } else if (effect.name === "clrChange") {
802
+ for (const [i, name] of ["clrFrom", "clrTo"].entries()) {
803
+ const holder = first(node, name, NS.a) ?? doc.createElementNS(NS.a, `a:${name}`);
804
+ if (effect.colors?.[i]) patchDrawingColorIn(holder, effect.colors[i]);
805
+ if (!holder.parentNode) node.insertBefore(holder, first(node, "extLst", NS.a) ?? null);
806
+ }
807
+ } else if (effect.colors?.[0]) patchDrawingColorIn(node, effect.colors[0]);
808
+ }
809
+ if (!parseStandardPictureEffect(node)) throw new RangeError("Invalid picture effect values");
576
810
  }
577
811
 
578
812
  // drawingml/picture-effects.ts
@@ -612,14 +846,19 @@ function readPictureEffect(name, attribute) {
612
846
  function parsePictureEffects(blip) {
613
847
  if (!blip) return [];
614
848
  return elements(blip).map((node) => ({
615
- ...(node.namespaceURI === NS.a ? readPictureEffect(node.localName, (name) => node.getAttribute(name)) : void 0) ?? { kind: "unsupported", name: node.localName },
849
+ ...(node.namespaceURI === NS.a ? readPictureEffect(node.localName, (name) => node.getAttribute(name)) ?? parseStandardPictureEffect(node) ?? parseArtisticPictureExtension(node) : void 0) ?? { kind: "unsupported", name: node.localName },
616
850
  sourceXml: buildXml(node)
617
851
  }));
618
852
  }
619
853
  function applyPictureEffects(blip, effects) {
620
854
  if (JSON.stringify(parsePictureEffects(blip)) === JSON.stringify(effects)) return;
621
855
  const nodes = effects.map((effect) => {
622
- const name = effect.kind === "grayscale" ? "grayscl" : effect.kind === "luminance" ? "lum" : effect.kind === "unsupported" ? effect.name : effect.kind;
856
+ const name = effect.kind === "grayscale" ? "grayscl" : effect.kind === "luminance" ? "lum" : effect.kind === "unsupported" ? effect.name : effect.kind === "artistic" ? "extLst" : effect.kind === "standard" ? effect.name : effect.kind;
857
+ if (effect.kind === "artistic") {
858
+ const before = effect.sourceXml ? parseArtisticPictureExtension(parseXml(effect.sourceXml).documentElement) : void 0;
859
+ if (!effect.baked || !before || before.name !== effect.name || before.radius !== effect.radius)
860
+ throw new Error("Artistic authoring requires a host-generated baked picture cache");
861
+ }
623
862
  const source2 = effect.sourceXml ? parseXml(effect.sourceXml).documentElement : void 0;
624
863
  if (effect.kind === "unsupported" && !source2)
625
864
  throw new Error("An unsupported picture effect needs source XML");
@@ -646,6 +885,7 @@ function applyPictureEffects(blip, effects) {
646
885
  if (effect.amount < 0) throw new RangeError("Picture alpha must be nonnegative");
647
886
  set("amt", effect.amount);
648
887
  }
888
+ if (effect.kind === "standard") applyStandardPictureEffect(node, effect);
649
889
  return node;
650
890
  });
651
891
  for (const node of elements(blip)) blip.removeChild(node);
@@ -696,8 +936,174 @@ function patchPictureEffects(source2, patch) {
696
936
  ...effect?.kind === "alphaModFix" ? effect : { kind: "alphaModFix" },
697
937
  amount: patch.alpha
698
938
  }));
939
+ if (patch.standard) {
940
+ const target = patch.standard;
941
+ const matches = result.flatMap(
942
+ (effect, index2) => effect.kind === "standard" && effect.name === target.name || effect.kind === "unsupported" && effect.name === target.name ? [index2] : []
943
+ );
944
+ if (matches.length > 1 || matches.some((index2) => result[index2]?.kind === "unsupported"))
945
+ throw new Error(`Ambiguous or unreadable picture effect: ${target.name}`);
946
+ const index = matches[0], before = index === void 0 ? void 0 : result[index];
947
+ const next = {
948
+ ...before?.kind === "standard" ? before : {},
949
+ ...target,
950
+ kind: "standard"
951
+ };
952
+ const doc = parseXml(next.sourceXml ?? `<a:${next.name} xmlns:a="${NS.a}"/>`);
953
+ applyStandardPictureEffect(doc.documentElement, next);
954
+ if (index === void 0) {
955
+ const ext = result.findIndex(
956
+ (effect) => effect.kind === "artistic" || effect.kind === "unsupported" && effect.name === "extLst"
957
+ );
958
+ result.splice(ext < 0 ? result.length : ext, 0, next);
959
+ } else result[index] = next;
960
+ }
961
+ return result;
962
+ }
963
+
964
+ // drawingml/picture-layout.ts
965
+ function parsePictureLayout(fill) {
966
+ const out = {};
967
+ const rot = fill.getAttribute("rotWithShape");
968
+ if (rot !== null) out.rotWithShape = rot !== "0" && rot !== "false";
969
+ const dpi = Number(fill.getAttribute("dpi"));
970
+ if (fill.hasAttribute("dpi") && Number.isFinite(dpi) && dpi > 0) out.dpi = dpi;
971
+ const tile = first(fill, "tile", NS.a);
972
+ if (tile) {
973
+ const value = {};
974
+ for (const [key, attr] of [
975
+ ["scaleX", "sx"],
976
+ ["scaleY", "sy"]
977
+ ]) {
978
+ const n = picturePercentage(tile.getAttribute(attr));
979
+ if (n !== void 0) value[key] = n;
980
+ }
981
+ for (const [key, attr] of [
982
+ ["offsetXEmu", "tx"],
983
+ ["offsetYEmu", "ty"]
984
+ ]) {
985
+ const raw = tile.getAttribute(attr);
986
+ const n = raw === null ? NaN : Number(raw);
987
+ if (Number.isSafeInteger(n)) value[key] = n;
988
+ }
989
+ const alignment = tile.getAttribute("algn");
990
+ if (alignment) value.alignment = alignment;
991
+ const flip = tile.getAttribute("flip");
992
+ if (flip && ["none", "x", "y", "xy"].includes(flip))
993
+ value.flip = flip;
994
+ out.tile = value;
995
+ }
996
+ const rect = first(first(fill, "stretch", NS.a), "fillRect", NS.a);
997
+ if (rect)
998
+ out.fillRect = {
999
+ l: picturePercentage(rect.getAttribute("l")) ?? 0,
1000
+ t: picturePercentage(rect.getAttribute("t")) ?? 0,
1001
+ r: picturePercentage(rect.getAttribute("r")) ?? 0,
1002
+ b: picturePercentage(rect.getAttribute("b")) ?? 0
1003
+ };
1004
+ return out;
1005
+ }
1006
+ function applyPictureLayout(fill, layout) {
1007
+ const before = parsePictureLayout(fill);
1008
+ const attr = (node, name, value, old) => {
1009
+ if (value === old) return;
1010
+ if (value === void 0) node.removeAttribute(name);
1011
+ else node.setAttribute(name, String(value));
1012
+ };
1013
+ if (layout.rotWithShape !== before.rotWithShape)
1014
+ attr(
1015
+ fill,
1016
+ "rotWithShape",
1017
+ layout.rotWithShape === void 0 ? void 0 : layout.rotWithShape ? "1" : "0",
1018
+ void 0
1019
+ );
1020
+ if (layout.dpi !== before.dpi) {
1021
+ if (layout.dpi !== void 0 && (!Number.isSafeInteger(layout.dpi) || layout.dpi <= 0))
1022
+ throw new RangeError("Invalid picture DPI");
1023
+ attr(fill, "dpi", layout.dpi, void 0);
1024
+ }
1025
+ const make = (parent, name) => {
1026
+ const old = first(parent, name, NS.a);
1027
+ if (old) return old;
1028
+ const node = fill.ownerDocument.createElementNS(NS.a, `a:${name}`);
1029
+ parent.insertBefore(node, first(parent, "extLst", NS.a) ?? null);
1030
+ return node;
1031
+ };
1032
+ if (layout.tile) {
1033
+ const stretch = first(fill, "stretch", NS.a);
1034
+ if (stretch) fill.removeChild(stretch);
1035
+ const tile = make(fill, "tile");
1036
+ for (const [key, name] of [
1037
+ ["scaleX", "sx"],
1038
+ ["scaleY", "sy"],
1039
+ ["offsetXEmu", "tx"],
1040
+ ["offsetYEmu", "ty"]
1041
+ ]) {
1042
+ const n = layout.tile[key];
1043
+ if (n !== void 0 && (!Number.isFinite(n) || (name === "sx" || name === "sy" ? n <= 0 : !Number.isSafeInteger(n))))
1044
+ throw new RangeError("Invalid picture tile");
1045
+ if (n !== before.tile?.[key])
1046
+ attr(
1047
+ tile,
1048
+ name,
1049
+ n === void 0 ? void 0 : Math.round(n * (name === "sx" || name === "sy" ? 1e5 : 1)),
1050
+ void 0
1051
+ );
1052
+ }
1053
+ if (layout.tile.alignment !== before.tile?.alignment) {
1054
+ if (layout.tile.alignment && !["tl", "t", "tr", "l", "ctr", "r", "bl", "b", "br"].includes(layout.tile.alignment))
1055
+ throw new RangeError("Invalid picture tile alignment");
1056
+ attr(tile, "algn", layout.tile.alignment, void 0);
1057
+ }
1058
+ if (layout.tile.flip !== void 0 && !["none", "x", "y", "xy"].includes(layout.tile.flip))
1059
+ throw new RangeError("Invalid picture tile flip");
1060
+ if (layout.tile.flip !== before.tile?.flip) attr(tile, "flip", layout.tile.flip, void 0);
1061
+ } else if (before.tile || layout.fillRect) {
1062
+ const tile = first(fill, "tile", NS.a);
1063
+ if (tile) fill.removeChild(tile);
1064
+ const rect = make(make(fill, "stretch"), "fillRect");
1065
+ for (const key of ["l", "t", "r", "b"]) {
1066
+ const n = layout.fillRect?.[key];
1067
+ if (n !== void 0 && !Number.isFinite(n))
1068
+ throw new RangeError("Invalid picture fill rectangle");
1069
+ if (n !== before.fillRect?.[key])
1070
+ attr(rect, key, n === void 0 ? void 0 : Math.round(n * 1e5), void 0);
1071
+ }
1072
+ }
1073
+ }
1074
+
1075
+ // drawingml/picture-crop.ts
1076
+ var SIDES = { l: "cropLeft", t: "cropTop", r: "cropRight", b: "cropBottom" };
1077
+ function parsePictureCrop(blipFill) {
1078
+ const rect = first(blipFill, "srcRect", NS.a);
1079
+ if (!rect) return void 0;
1080
+ const result = {};
1081
+ for (const [attr, key] of Object.entries(SIDES)) {
1082
+ const raw = rect.getAttribute(attr);
1083
+ if (raw === null || !raw.trim()) continue;
1084
+ const percent = raw.endsWith("%");
1085
+ const value = Number(percent ? raw.slice(0, -1) : raw) / (percent ? 100 : 1e5);
1086
+ if (Number.isFinite(value)) result[key] = value;
1087
+ }
699
1088
  return result;
700
1089
  }
1090
+ function applyPictureCrop(blipFill, crop) {
1091
+ let rect = first(blipFill, "srcRect", NS.a);
1092
+ if (!rect && crop && Object.values(crop).some((value) => value !== void 0)) {
1093
+ rect = blipFill.ownerDocument.createElementNS(NS.a, "a:srcRect");
1094
+ const blip = first(blipFill, "blip", NS.a);
1095
+ blipFill.insertBefore(rect, blip?.nextSibling ?? blipFill.firstChild);
1096
+ }
1097
+ if (!rect) return;
1098
+ for (const [attr, key] of Object.entries(SIDES)) {
1099
+ const value = crop?.[key];
1100
+ if (value === void 0) rect.removeAttribute(attr);
1101
+ else {
1102
+ if (!Number.isFinite(value)) throw new RangeError("Picture crop must be finite");
1103
+ rect.setAttribute(attr, String(Math.round(value * 1e5)));
1104
+ }
1105
+ }
1106
+ }
701
1107
 
702
1108
  // drawingml/picture-fill.ts
703
1109
  function parseDrawingPictureFill(fill) {
@@ -706,13 +1112,32 @@ function parseDrawingPictureFill(fill) {
706
1112
  const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
707
1113
  const crop = parsePictureCrop(fill);
708
1114
  const effects = parsePictureEffects(blip);
709
- const tile = first(fill, "tile", NS.a);
710
- const rect = first(first(fill, "stretch", NS.a), "fillRect", NS.a);
711
- const unsupported = [
712
- ...tile ? ["tile"] : [],
713
- ...rect && ["l", "t", "r", "b"].some((key) => Number(rect.getAttribute(key) ?? 0) !== 0) ? ["fillRect"] : [],
714
- ...fill.getAttribute("rotWithShape") === "0" || fill.getAttribute("rotWithShape") === "false" ? ["rotWithShape"] : []
715
- ];
1115
+ const layout = parsePictureLayout(fill);
1116
+ const unsupported2 = [];
1117
+ const tile = first(fill, "tile", NS.a), stretch = first(fill, "stretch", NS.a);
1118
+ if (tile && stretch) unsupported2.push("tile/stretch-choice");
1119
+ if (tile) {
1120
+ for (const [attr, key] of [
1121
+ ["sx", "scaleX"],
1122
+ ["sy", "scaleY"],
1123
+ ["tx", "offsetXEmu"],
1124
+ ["ty", "offsetYEmu"]
1125
+ ])
1126
+ if (tile.hasAttribute(attr) && (layout.tile?.[key] === void 0 || (attr === "sx" || attr === "sy") && layout.tile[key] <= 0))
1127
+ unsupported2.push(`tile:${attr}`);
1128
+ if (tile.hasAttribute("algn") && !["tl", "t", "tr", "l", "ctr", "r", "bl", "b", "br"].includes(tile.getAttribute("algn") ?? ""))
1129
+ unsupported2.push("tile:algn");
1130
+ if (tile.hasAttribute("flip") && !layout.tile?.flip) unsupported2.push("tile:flip");
1131
+ }
1132
+ const rect = first(stretch, "fillRect", NS.a);
1133
+ if (rect)
1134
+ for (const key of ["l", "t", "r", "b"]) {
1135
+ const raw = rect.getAttribute(key);
1136
+ if (raw !== null && !/^[-+]?(?:\d+\.?\d*|\.\d+)%?$/.test(raw))
1137
+ unsupported2.push(`fillRect:${key}`);
1138
+ }
1139
+ if (fill.hasAttribute("rotWithShape") && !["0", "1", "true", "false"].includes(fill.getAttribute("rotWithShape") ?? ""))
1140
+ unsupported2.push("rotWithShape");
716
1141
  return {
717
1142
  kind: "picture",
718
1143
  sourceXml: buildXml(fill),
@@ -720,7 +1145,8 @@ function parseDrawingPictureFill(fill) {
720
1145
  ...linkRelId ? { linkRelId } : {},
721
1146
  ...crop ? { crop } : {},
722
1147
  ...effects.length ? { effects } : {},
723
- ...unsupported.length ? { unsupportedPicture: unsupported } : {}
1148
+ ...Object.keys(layout).length ? { layout } : {},
1149
+ ...unsupported2.length ? { unsupportedPicture: unsupported2 } : {}
724
1150
  };
725
1151
  }
726
1152
 
@@ -1253,80 +1679,6 @@ function parseDrawingGeometry(spPr) {
1253
1679
  // units/constants.ts
1254
1680
  var EMU_PER_PIXEL = 9525;
1255
1681
 
1256
- // drawingml/write-color.ts
1257
- var ELEMENTS = {
1258
- srgb: "srgbClr",
1259
- scheme: "schemeClr",
1260
- system: "sysClr",
1261
- preset: "prstClr",
1262
- scrgb: "scrgbClr",
1263
- hsl: "hslClr"
1264
- };
1265
- function drawingColorXml(color) {
1266
- const local = ELEMENTS[color.kind];
1267
- const doc = parseXml(`<a:${local} xmlns:a="${NS.a}"/>`);
1268
- const root = doc.documentElement;
1269
- if (color.kind === "scrgb" || color.kind === "hsl") {
1270
- const keys = color.kind === "scrgb" ? ["r", "g", "b"] : ["hue", "sat", "lum"];
1271
- const values = color.value.split(",");
1272
- keys.forEach((key, i) => root.setAttribute(key, values[i] ?? "0"));
1273
- } else root.setAttribute("val", color.value);
1274
- if (color.fallback !== void 0 && color.kind === "system")
1275
- root.setAttribute("lastClr", color.fallback);
1276
- for (const transform of color.transforms) {
1277
- if (!/^[A-Za-z_][\w.-]*$/.test(transform.name))
1278
- throw new Error(`Invalid DrawingML transform ${transform.name}`);
1279
- const node = doc.createElementNS(NS.a, `a:${transform.name}`);
1280
- if (transform.value !== "") node.setAttribute("val", transform.value);
1281
- root.appendChild(node);
1282
- }
1283
- return buildXml(doc);
1284
- }
1285
-
1286
- // drawingml/patch-color.ts
1287
- function patchDrawingColorIn(container, color) {
1288
- const old = elements(container).find((node) => parseDrawingColor(node));
1289
- const before = parseDrawingColorIn(container);
1290
- if (!old || !before || before.kind !== color.kind) {
1291
- const next = container.ownerDocument.importNode(
1292
- parseXml(drawingColorXml(color)).documentElement,
1293
- true
1294
- );
1295
- if (old) container.replaceChild(next, old);
1296
- else container.insertBefore(next, container.firstChild);
1297
- return;
1298
- }
1299
- if (before.value !== color.value) {
1300
- if (color.kind === "scrgb" || color.kind === "hsl") {
1301
- const keys = color.kind === "scrgb" ? ["r", "g", "b"] : ["hue", "sat", "lum"];
1302
- const values = color.value.split(",");
1303
- keys.forEach((key, index) => old.setAttribute(key, values[index] ?? "0"));
1304
- } else old.setAttribute("val", color.value);
1305
- }
1306
- if (before.fallback !== color.fallback && color.kind === "system") {
1307
- if (color.fallback === void 0) old.removeAttribute("lastClr");
1308
- else old.setAttribute("lastClr", color.fallback);
1309
- }
1310
- const originals = elements(old);
1311
- color.transforms.forEach((transform, index) => {
1312
- const source2 = originals[index];
1313
- if (source2?.localName === transform.name) {
1314
- if (before.transforms[index]?.value !== transform.value) {
1315
- if (transform.value === "") source2.removeAttribute("val");
1316
- else source2.setAttribute("val", transform.value);
1317
- }
1318
- return;
1319
- }
1320
- if (!/^[A-Za-z_][\w.-]*$/u.test(transform.name))
1321
- throw new Error("Invalid DrawingML colour transform");
1322
- const next = old.ownerDocument.createElementNS(NS.a, `a:${transform.name}`);
1323
- if (transform.value !== "") next.setAttribute("val", transform.value);
1324
- if (source2) old.replaceChild(next, source2);
1325
- else old.appendChild(next);
1326
- });
1327
- for (const extra of originals.slice(color.transforms.length)) old.removeChild(extra);
1328
- }
1329
-
1330
1682
  // drawingml/write-pattern-picture.ts
1331
1683
  function drawingPatternPictureXml(fill) {
1332
1684
  const name = fill.kind === "pattern" ? "pattFill" : "blipFill";
@@ -1388,7 +1740,8 @@ function drawingPatternPictureXml(fill) {
1388
1740
  applyPictureCrop(root, fill.crop);
1389
1741
  if (fill.effects !== void 0 && JSON.stringify(before?.kind === "picture" ? before.effects ?? [] : []) !== JSON.stringify(fill.effects ?? []))
1390
1742
  applyPictureEffects(blip, fill.effects ?? []);
1391
- if (!fill.sourceXml) {
1743
+ if (fill.layout !== void 0) applyPictureLayout(root, fill.layout);
1744
+ if (!fill.sourceXml && !fill.layout?.tile && !first(root, "stretch", NS.a)) {
1392
1745
  const stretch = doc.createElementNS(NS.a, "a:stretch");
1393
1746
  stretch.appendChild(doc.createElementNS(NS.a, "a:fillRect"));
1394
1747
  root.appendChild(stretch);
@@ -3981,18 +4334,257 @@ function imageContentType(partName) {
3981
4334
  return extension && known[extension] || "application/octet-stream";
3982
4335
  }
3983
4336
 
4337
+ // drawingml/picture-transfer.ts
4338
+ function clamp(value, minimum, maximum) {
4339
+ return Math.min(maximum, Math.max(minimum, value));
4340
+ }
4341
+ function buildImageBiLevelTable(threshold) {
4342
+ const cutoff = clamp(threshold, 0, 100);
4343
+ return Array.from({ length: 101 }, (_, index) => index >= cutoff ? "1" : "0").join(" ");
4344
+ }
4345
+ function buildImageLuminanceTransfer(amount) {
4346
+ const normalized = clamp(amount / 100, -1, 1);
4347
+ return normalized >= 0 ? { slope: 1 - normalized, intercept: normalized } : { slope: 1 + normalized, intercept: 0 };
4348
+ }
4349
+
4350
+ // digest/crc32.ts
4351
+ var crcTable = Uint32Array.from({ length: 256 }, (_, value) => {
4352
+ for (let i = 0; i < 8; i++) value = value & 1 ? 3988292384 ^ value >>> 1 : value >>> 1;
4353
+ return value >>> 0;
4354
+ });
4355
+ function crc32(bytes, crc = 4294967295) {
4356
+ for (const byte of bytes) crc = (crcTable[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
4357
+ return crc >>> 0;
4358
+ }
4359
+
4360
+ // drawingml/raster-image.ts
4361
+ var RASTER_IMAGE_LIMITS = Object.freeze({
4362
+ maxImageBytes: 8 * 1024 * 1024,
4363
+ maxPixels: 16e6,
4364
+ maxDimension: 16384
4365
+ });
4366
+ var RasterImageError = class extends Error {
4367
+ constructor(code, message) {
4368
+ super(message);
4369
+ this.code = code;
4370
+ this.name = "RasterImageError";
4371
+ }
4372
+ code;
4373
+ };
4374
+ var invalid = (message) => {
4375
+ throw new RasterImageError("invalid-image", message);
4376
+ };
4377
+ var unsupported = (message) => {
4378
+ throw new RasterImageError("unsupported-image", message);
4379
+ };
4380
+ function dimensions(width, height, limits) {
4381
+ if (!width || !height) invalid("Raster image has zero dimensions.");
4382
+ if (width > limits.maxDimension || height > limits.maxDimension || width * height > limits.maxPixels)
4383
+ throw new RasterImageError(
4384
+ "image-limit",
4385
+ "Raster image dimensions exceed the configured limit."
4386
+ );
4387
+ }
4388
+ var ascii = (bytes, start, length) => String.fromCharCode(...bytes.subarray(start, start + length));
4389
+ function png(bytes, limits) {
4390
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
4391
+ if (bytes.length < 33 || view.getUint32(8) !== 13 || ascii(bytes, 12, 4) !== "IHDR")
4392
+ return invalid("PNG is missing a complete IHDR header.");
4393
+ const width = view.getUint32(16), height = view.getUint32(20);
4394
+ dimensions(width, height, limits);
4395
+ const depth = bytes[24], color = bytes[25];
4396
+ const depths = {
4397
+ 0: [1, 2, 4, 8, 16],
4398
+ 2: [8, 16],
4399
+ 3: [1, 2, 4, 8],
4400
+ 4: [8, 16],
4401
+ 6: [8, 16]
4402
+ };
4403
+ if (!depths[color]?.includes(depth) || bytes[26] !== 0 || bytes[27] !== 0 || bytes[28] > 1)
4404
+ invalid("PNG header uses invalid color, compression, filter, or interlace values.");
4405
+ let data = false;
4406
+ for (let at = 8; at < bytes.length; ) {
4407
+ if (at + 12 > bytes.length) invalid("Truncated PNG chunk.");
4408
+ const length = view.getUint32(at), type = ascii(bytes, at + 4, 4), end = at + length + 12;
4409
+ if (end > bytes.length) invalid("Truncated PNG chunk payload.");
4410
+ if ((crc32(bytes.subarray(at + 4, end - 4)) ^ 4294967295) >>> 0 !== view.getUint32(end - 4))
4411
+ invalid("PNG chunk checksum mismatch.");
4412
+ if (type === "acTL") unsupported("Animated PNG is not supported.");
4413
+ if (type === "IHDR" && at !== 8) invalid("PNG contains multiple image headers.");
4414
+ if (type === "IDAT" && length) data = true;
4415
+ if (type === "IEND") {
4416
+ if (length || end !== bytes.length || !data) invalid("PNG has an invalid image terminator.");
4417
+ return [width, height];
4418
+ }
4419
+ at = end;
4420
+ }
4421
+ return invalid("PNG has no image terminator.");
4422
+ }
4423
+ function gif(bytes, limits) {
4424
+ if (bytes.length < 13) return invalid("GIF is missing a complete screen descriptor.");
4425
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
4426
+ const width = view.getUint16(6, true), height = view.getUint16(8, true);
4427
+ dimensions(width, height, limits);
4428
+ let at = 13 + (bytes[10] & 128 ? 3 * 2 ** ((bytes[10] & 7) + 1) : 0);
4429
+ let frames = 0, pixels = 0;
4430
+ const blocks = () => {
4431
+ for (; ; ) {
4432
+ if (at >= bytes.length) invalid("GIF has truncated data blocks.");
4433
+ const size = bytes[at++];
4434
+ if (!size) return;
4435
+ at += size;
4436
+ if (at > bytes.length) invalid("GIF has a truncated data block.");
4437
+ }
4438
+ };
4439
+ while (at < bytes.length) {
4440
+ const marker = bytes[at++];
4441
+ if (marker === 59) {
4442
+ if (!frames || at !== bytes.length) invalid("GIF has an invalid image terminator.");
4443
+ return [width, height];
4444
+ }
4445
+ if (marker === 33) {
4446
+ if (at >= bytes.length) invalid("GIF has a truncated extension.");
4447
+ at++;
4448
+ blocks();
4449
+ continue;
4450
+ }
4451
+ if (marker !== 44 || at + 9 > bytes.length) invalid("GIF has an invalid image descriptor.");
4452
+ const left = view.getUint16(at, true), top = view.getUint16(at + 2, true);
4453
+ const frameWidth = view.getUint16(at + 4, true), frameHeight = view.getUint16(at + 6, true);
4454
+ dimensions(frameWidth, frameHeight, limits);
4455
+ if (left + frameWidth > width || top + frameHeight > height)
4456
+ invalid("GIF frame exceeds its screen.");
4457
+ pixels += width * height;
4458
+ if (pixels > limits.maxPixels)
4459
+ throw new RasterImageError("image-limit", "GIF animation exceeds the pixel limit.");
4460
+ const packed = bytes[at + 8];
4461
+ at += 9 + (packed & 128 ? 3 * 2 ** ((packed & 7) + 1) : 0);
4462
+ if (at >= bytes.length || bytes[at] < 2 || bytes[at] > 8)
4463
+ invalid("GIF has an invalid LZW header.");
4464
+ at++;
4465
+ blocks();
4466
+ frames++;
4467
+ }
4468
+ return invalid("GIF has no image terminator.");
4469
+ }
4470
+ function jpeg(bytes, limits) {
4471
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
4472
+ let at = 2, width = 0, height = 0, scan = false;
4473
+ while (at < bytes.length) {
4474
+ if (bytes[at++] !== 255) invalid("JPEG has an invalid segment marker.");
4475
+ while (bytes[at] === 255) at++;
4476
+ const marker = bytes[at++];
4477
+ if (marker === 217) {
4478
+ if (!width || !scan || at !== bytes.length) invalid("JPEG has an invalid image terminator.");
4479
+ return [width, height];
4480
+ }
4481
+ if (marker === void 0 || marker === 0 || marker === 216 || marker === 1 || marker >= 208 && marker <= 215)
4482
+ invalid("JPEG has an unexpected standalone marker.");
4483
+ if (at + 2 > bytes.length) invalid("JPEG has a truncated segment header.");
4484
+ const length = view.getUint16(at), end = at + length;
4485
+ if (length < 2 || end > bytes.length) invalid("JPEG has a truncated segment.");
4486
+ if (marker >= 192 && marker <= 207 && ![196, 200, 204].includes(marker)) {
4487
+ if (![192, 193, 194].includes(marker))
4488
+ unsupported("This JPEG frame coding is unsupported.");
4489
+ if (width || length < 11 || bytes[at + 2] !== 8 || length !== 8 + 3 * bytes[at + 7])
4490
+ invalid("JPEG has an invalid frame header.");
4491
+ height = view.getUint16(at + 3);
4492
+ width = view.getUint16(at + 5);
4493
+ dimensions(width, height, limits);
4494
+ }
4495
+ if (marker === 220) unsupported("JPEG deferred dimensions are unsupported.");
4496
+ at = end;
4497
+ if (marker === 218) {
4498
+ if (!width || length < 8 || length !== 6 + 2 * bytes[end - length + 2])
4499
+ invalid("JPEG has an invalid scan header.");
4500
+ scan = true;
4501
+ while (at < bytes.length) {
4502
+ if (bytes[at] !== 255) {
4503
+ at++;
4504
+ continue;
4505
+ }
4506
+ const next = bytes[at + 1];
4507
+ if (next === 0 || next !== void 0 && next >= 208 && next <= 215) {
4508
+ at += 2;
4509
+ continue;
4510
+ }
4511
+ break;
4512
+ }
4513
+ }
4514
+ }
4515
+ return invalid("JPEG has no image terminator.");
4516
+ }
4517
+ function inspectRasterImage(bytes, options = {}) {
4518
+ if (!options || typeof options !== "object" || Array.isArray(options))
4519
+ throw new RasterImageError("invalid-limit", "Image limits must be an options object.");
4520
+ const limits = { ...RASTER_IMAGE_LIMITS, ...options };
4521
+ for (const key of Object.keys(RASTER_IMAGE_LIMITS)) {
4522
+ const value = limits[key];
4523
+ if (!Number.isSafeInteger(value) || value <= 0 || value > RASTER_IMAGE_LIMITS[key])
4524
+ throw new RasterImageError("invalid-limit", `Invalid raster image limit: ${key}.`);
4525
+ }
4526
+ if (!(bytes instanceof Uint8Array)) invalid("Raster image bytes must be a Uint8Array.");
4527
+ if (bytes.byteLength > limits.maxImageBytes)
4528
+ throw new RasterImageError("image-limit", "Raster image bytes exceed the configured limit.");
4529
+ return inspectRasterImageStructure(bytes, limits);
4530
+ }
4531
+ function inspectRasterImageStructure(bytes, limits) {
4532
+ let mimeType, size;
4533
+ if ([137, 80, 78, 71, 13, 10, 26, 10].every((value, index) => bytes[index] === value)) {
4534
+ mimeType = "image/png";
4535
+ size = png(bytes, limits);
4536
+ } else if (["GIF87a", "GIF89a"].includes(ascii(bytes, 0, 6))) {
4537
+ mimeType = "image/gif";
4538
+ size = gif(bytes, limits);
4539
+ } else if (bytes[0] === 255 && bytes[1] === 216) {
4540
+ mimeType = "image/jpeg";
4541
+ size = jpeg(bytes, limits);
4542
+ } else return unsupported("Foreign data is not a supported PNG, JPEG, or GIF raster image.");
4543
+ return { mimeType, pixelWidth: size[0], pixelHeight: size[1] };
4544
+ }
4545
+
4546
+ // drawingml/picture-hsl-pixels.ts
4547
+ function applyPictureHslPixels(data, effect) {
4548
+ if (effect.name !== "hsl" && effect.name !== "tint") throw new Error("Not an HSL picture stage");
4549
+ const v = effect.values ?? {};
4550
+ for (let i = 0; i < data.length; i += 4) {
4551
+ const { h, s, l } = rgbToHsl(data[i], data[i + 1], data[i + 2]);
4552
+ let hue = h, saturation = s, lightness = l;
4553
+ if (effect.name === "hsl") {
4554
+ hue = h + (v.hue ?? 0);
4555
+ saturation = s * Math.max(0, v.luminance ?? 0);
4556
+ lightness = l * Math.max(0, v.saturation ?? 0);
4557
+ } else {
4558
+ const distance = ((v.hue ?? 0) - h + 540) % 360 - 180;
4559
+ hue = h + distance * (v.amount ?? 0);
4560
+ }
4561
+ const result = hslToRgb(hue, saturation, lightness);
4562
+ data[i] = result.r;
4563
+ data[i + 1] = result.g;
4564
+ data[i + 2] = result.b;
4565
+ }
4566
+ }
4567
+
4568
+ exports.ARTISTIC_PRIMARY_ATTRIBUTE = ARTISTIC_PRIMARY_ATTRIBUTE;
3984
4569
  exports.BODY_PROPERTIES_ORDER = BODY_PROPERTIES_ORDER;
3985
4570
  exports.DEFAULT_THEME_COLOR_MAP = DEFAULT_THEME_COLOR_MAP;
3986
4571
  exports.DOM_3D_READER = DOM_3D_READER;
3987
4572
  exports.OFFICE_GRADIENT_PRESETS = OFFICE_GRADIENT_PRESETS;
3988
4573
  exports.PARAGRAPH_PROPERTIES_ORDER = PARAGRAPH_PROPERTIES_ORDER;
4574
+ exports.RASTER_IMAGE_LIMITS = RASTER_IMAGE_LIMITS;
3989
4575
  exports.RECT_GRADIENT_DIRECTIONS = RECT_GRADIENT_DIRECTIONS;
3990
4576
  exports.RUN_PROPERTIES_ORDER = RUN_PROPERTIES_ORDER;
4577
+ exports.RasterImageError = RasterImageError;
3991
4578
  exports.THEME_COLOR_SLOTS = THEME_COLOR_SLOTS;
3992
4579
  exports.applyPictureCrop = applyPictureCrop;
3993
4580
  exports.applyPictureEffects = applyPictureEffects;
4581
+ exports.applyPictureHslPixels = applyPictureHslPixels;
4582
+ exports.applyPictureLayout = applyPictureLayout;
4583
+ exports.applyStandardPictureEffect = applyStandardPictureEffect;
3994
4584
  exports.attributeReader = attributeReader;
3995
4585
  exports.booleanAttribute = booleanAttribute;
4586
+ exports.buildImageBiLevelTable = buildImageBiLevelTable;
4587
+ exports.buildImageLuminanceTransfer = buildImageLuminanceTransfer;
3996
4588
  exports.buildRectPathGradientImage = buildRectPathGradientImage;
3997
4589
  exports.buildRectPathGradientSvg = buildRectPathGradientSvg;
3998
4590
  exports.descendants = descendants;
@@ -4013,11 +4605,13 @@ exports.drawingThemeFormatSchemeXml = drawingThemeFormatSchemeXml;
4013
4605
  exports.drawingThemeXml = drawingThemeXml;
4014
4606
  exports.fillElementOf = fillElementOf;
4015
4607
  exports.imageContentType = imageContentType;
4608
+ exports.inspectRasterImage = inspectRasterImage;
4016
4609
  exports.integerAttribute = integerAttribute;
4017
4610
  exports.isThemeColorSlot = isThemeColorSlot;
4018
4611
  exports.officeGradientPresetFill = officeGradientPresetFill;
4019
4612
  exports.officeGradientPresetId = officeGradientPresetId;
4020
4613
  exports.orderedColorTransforms = orderedColorTransforms;
4614
+ exports.parseArtisticPictureExtension = parseArtisticPictureExtension;
4021
4615
  exports.parseCustomGeometry = parseCustomGeometry;
4022
4616
  exports.parseDrawingBodyProperties = parseDrawingBodyProperties;
4023
4617
  exports.parseDrawingColor = parseDrawingColor;
@@ -4044,6 +4638,8 @@ exports.parseDrawingTextSpacing = parseDrawingTextSpacing;
4044
4638
  exports.parseFrame = parseFrame;
4045
4639
  exports.parsePictureCrop = parsePictureCrop;
4046
4640
  exports.parsePictureEffects = parsePictureEffects;
4641
+ exports.parsePictureLayout = parsePictureLayout;
4642
+ exports.parseStandardPictureEffect = parseStandardPictureEffect;
4047
4643
  exports.parseTheme = parseTheme;
4048
4644
  exports.parseThemeColorMap = parseThemeColorMap;
4049
4645
  exports.parseThemeColorScheme = parseThemeColorScheme;