ooxml-core 1.50.2 → 1.51.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 (361) hide show
  1. package/README.md +11 -0
  2. package/dist/{PptxHandler-PVQW47CY.mjs → PptxHandler-6GRVJRHP.mjs} +2 -2
  3. package/dist/PptxHandler-E6QYPF7X.mjs +8 -0
  4. package/dist/PptxHandler-UNQVCIGM.cjs +17 -0
  5. package/dist/PresentationBuilder-DVDJSV5R.mjs +8 -0
  6. package/dist/PresentationBuilder-F5UWRF6H.cjs +25 -0
  7. package/dist/{PresentationBuilder-ZOOVSBPR.mjs → PresentationBuilder-T6YKWPF7.mjs} +2 -2
  8. package/dist/automation/index.cjs +5806 -4494
  9. package/dist/automation/index.mjs +5806 -4494
  10. package/dist/chunk-25IJEN7R.cjs +36 -0
  11. package/dist/chunk-25JN3ZQM.mjs +58 -0
  12. package/dist/{chunk-7XYVFUB3.cjs → chunk-2IO523MM.cjs} +1 -0
  13. package/dist/{chunk-53KMIHYN.mjs → chunk-4LUZHBTT.mjs} +83 -31
  14. package/dist/chunk-554UZLPS.mjs +237 -0
  15. package/dist/{chunk-VLKUMQGT.mjs → chunk-63RAF3TS.mjs} +1 -1
  16. package/dist/{chunk-7UM5IFPR.mjs → chunk-6IUYKP77.mjs} +1 -1
  17. package/dist/{chunk-VK2G4BGX.mjs → chunk-BIMV5FVL.mjs} +481 -193
  18. package/dist/{chunk-CODMW5KF.cjs → chunk-CVUMILG3.cjs} +1 -0
  19. package/dist/{chunk-NBMXEVHL.mjs → chunk-FX6WL42B.mjs} +1 -0
  20. package/dist/chunk-GI4Y6BBX.mjs +21 -0
  21. package/dist/{chunk-MX2GFMZS.mjs → chunk-GZL4ERW3.mjs} +1 -1
  22. package/dist/chunk-HWL2AGLD.cjs +98 -0
  23. package/dist/chunk-HZAB3YDO.cjs +234 -0
  24. package/dist/chunk-IDATIFCG.mjs +226 -0
  25. package/dist/chunk-LO55N7VL.cjs +247 -0
  26. package/dist/{chunk-FFLU4LUQ.cjs → chunk-LUBPW5NP.cjs} +1629 -1609
  27. package/dist/chunk-MUNEIE2J.cjs +62 -0
  28. package/dist/{chunk-ZCKEKP7N.mjs → chunk-RYUADJV6.mjs} +4 -4
  29. package/dist/chunk-TOBK5FC4.mjs +88 -0
  30. package/dist/chunk-UV4LMGVZ.mjs +31 -0
  31. package/dist/{chunk-O3YGBYGZ.mjs → chunk-VRVHM6TJ.mjs} +1 -0
  32. package/dist/chunk-W7LVJC32.cjs +25 -0
  33. package/dist/chunk-WAZ7T2BL.cjs +169 -0
  34. package/dist/{chunk-3OKY56UM.mjs → chunk-YX33WEKS.mjs} +411 -391
  35. package/dist/docx/auto-number-fields.d.ts +22 -0
  36. package/dist/docx/auto-number-fields.d.ts.map +1 -0
  37. package/dist/docx/block-parser.d.ts.map +1 -1
  38. package/dist/docx/character-styles.d.ts.map +1 -1
  39. package/dist/docx/clipboard/css.d.ts +21 -0
  40. package/dist/docx/clipboard/css.d.ts.map +1 -0
  41. package/dist/docx/clipboard/html-tokens.d.ts +38 -0
  42. package/dist/docx/clipboard/html-tokens.d.ts.map +1 -0
  43. package/dist/docx/clipboard/index.d.ts +6 -0
  44. package/dist/docx/clipboard/index.d.ts.map +1 -0
  45. package/dist/docx/clipboard/word-fields.d.ts +13 -0
  46. package/dist/docx/clipboard/word-fields.d.ts.map +1 -0
  47. package/dist/docx/clipboard/word-fragment.d.ts +14 -0
  48. package/dist/docx/clipboard/word-fragment.d.ts.map +1 -0
  49. package/dist/docx/clipboard/word-html.d.ts +22 -0
  50. package/dist/docx/clipboard/word-html.d.ts.map +1 -0
  51. package/dist/docx/clipboard/word-list-scan.d.ts +25 -0
  52. package/dist/docx/clipboard/word-list-scan.d.ts.map +1 -0
  53. package/dist/docx/clipboard/word-lists.d.ts +13 -0
  54. package/dist/docx/clipboard/word-lists.d.ts.map +1 -0
  55. package/dist/docx/clipboard/word-runs.d.ts +18 -0
  56. package/dist/docx/clipboard/word-runs.d.ts.map +1 -0
  57. package/dist/docx/clipboard/word-styles.d.ts +35 -0
  58. package/dist/docx/clipboard/word-styles.d.ts.map +1 -0
  59. package/dist/docx/compare/build.d.ts +48 -0
  60. package/dist/docx/compare/build.d.ts.map +1 -0
  61. package/dist/docx/compare/compare.d.ts +18 -0
  62. package/dist/docx/compare/compare.d.ts.map +1 -0
  63. package/dist/docx/compare/context.d.ts +42 -0
  64. package/dist/docx/compare/context.d.ts.map +1 -0
  65. package/dist/docx/compare/diff.d.ts +20 -0
  66. package/dist/docx/compare/diff.d.ts.map +1 -0
  67. package/dist/docx/compare/index.d.ts +4 -0
  68. package/dist/docx/compare/index.d.ts.map +1 -0
  69. package/dist/docx/compare/slide.d.ts +9 -0
  70. package/dist/docx/compare/slide.d.ts.map +1 -0
  71. package/dist/docx/compare/spans.d.ts +13 -0
  72. package/dist/docx/compare/spans.d.ts.map +1 -0
  73. package/dist/docx/compare/story.d.ts +7 -0
  74. package/dist/docx/compare/story.d.ts.map +1 -0
  75. package/dist/docx/compare/table.d.ts +23 -0
  76. package/dist/docx/compare/table.d.ts.map +1 -0
  77. package/dist/docx/compare/tokens.d.ts +50 -0
  78. package/dist/docx/compare/tokens.d.ts.map +1 -0
  79. package/dist/docx/compare/types.d.ts +51 -0
  80. package/dist/docx/compare/types.d.ts.map +1 -0
  81. package/dist/docx/compatibility.d.ts +46 -0
  82. package/dist/docx/compatibility.d.ts.map +1 -0
  83. package/dist/docx/computed-fields.d.ts +39 -0
  84. package/dist/docx/computed-fields.d.ts.map +1 -0
  85. package/dist/docx/doc-property-field.d.ts +17 -0
  86. package/dist/docx/doc-property-field.d.ts.map +1 -0
  87. package/dist/docx/document-parts.d.ts +2 -0
  88. package/dist/docx/document-parts.d.ts.map +1 -1
  89. package/dist/docx/drawing-wrap.d.ts +21 -0
  90. package/dist/docx/drawing-wrap.d.ts.map +1 -0
  91. package/dist/docx/drawing.d.ts.map +1 -1
  92. package/dist/docx/embedded.cjs +3965 -2313
  93. package/dist/docx/embedded.mjs +3965 -2313
  94. package/dist/docx/field-format.d.ts +45 -0
  95. package/dist/docx/field-format.d.ts.map +1 -0
  96. package/dist/docx/field-result-spans.d.ts +62 -0
  97. package/dist/docx/field-result-spans.d.ts.map +1 -0
  98. package/dist/docx/field-runs.d.ts.map +1 -1
  99. package/dist/docx/field-stories.d.ts +9 -0
  100. package/dist/docx/field-stories.d.ts.map +1 -0
  101. package/dist/docx/find-stories.d.ts +27 -0
  102. package/dist/docx/find-stories.d.ts.map +1 -0
  103. package/dist/docx/highlight.d.ts +19 -0
  104. package/dist/docx/highlight.d.ts.map +1 -1
  105. package/dist/docx/hyperlink.d.ts +7 -0
  106. package/dist/docx/hyperlink.d.ts.map +1 -1
  107. package/dist/docx/index.cjs +7359 -3476
  108. package/dist/docx/index.d.ts +13 -1
  109. package/dist/docx/index.d.ts.map +1 -1
  110. package/dist/docx/index.mjs +7327 -3476
  111. package/dist/docx/inline-model.d.ts +21 -0
  112. package/dist/docx/inline-model.d.ts.map +1 -1
  113. package/dist/docx/inline-slots.d.ts.map +1 -1
  114. package/dist/docx/inspect-document.d.ts +21 -0
  115. package/dist/docx/inspect-document.d.ts.map +1 -0
  116. package/dist/docx/kinsoku-settings.d.ts +9 -0
  117. package/dist/docx/kinsoku-settings.d.ts.map +1 -0
  118. package/dist/docx/layout/adapt-table-floating.d.ts +11 -0
  119. package/dist/docx/layout/adapt-table-floating.d.ts.map +1 -0
  120. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  121. package/dist/docx/layout/adapter.d.ts.map +1 -1
  122. package/dist/docx/layout/computed-field-runs.d.ts +8 -0
  123. package/dist/docx/layout/computed-field-runs.d.ts.map +1 -0
  124. package/dist/docx/layout/floats.d.ts +3 -1
  125. package/dist/docx/layout/floats.d.ts.map +1 -1
  126. package/dist/docx/layout/flow-floating-table.d.ts +13 -0
  127. package/dist/docx/layout/flow-floating-table.d.ts.map +1 -0
  128. package/dist/docx/layout/flow-table.d.ts +1 -1
  129. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  130. package/dist/docx/layout/index.cjs +2280 -941
  131. package/dist/docx/layout/index.mjs +2276 -942
  132. package/dist/docx/layout/input.d.ts +50 -0
  133. package/dist/docx/layout/input.d.ts.map +1 -1
  134. package/dist/docx/layout/layout.d.ts.map +1 -1
  135. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  136. package/dist/docx/layout/page-flow.d.ts.map +1 -1
  137. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  138. package/dist/docx/layout/paragraph-tokens.d.ts +6 -0
  139. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  140. package/dist/docx/layout/result.d.ts +12 -0
  141. package/dist/docx/layout/result.d.ts.map +1 -1
  142. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  143. package/dist/docx/layout/table-autofit-distribute.d.ts +18 -0
  144. package/dist/docx/layout/table-autofit-distribute.d.ts.map +1 -0
  145. package/dist/docx/layout/table-autofit-measure.d.ts +15 -0
  146. package/dist/docx/layout/table-autofit-measure.d.ts.map +1 -0
  147. package/dist/docx/layout/table-autofit.d.ts +10 -0
  148. package/dist/docx/layout/table-autofit.d.ts.map +1 -0
  149. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  150. package/dist/docx/layout/text-breaks.d.ts +38 -13
  151. package/dist/docx/layout/text-breaks.d.ts.map +1 -1
  152. package/dist/docx/layout/wrap.d.ts +1 -1
  153. package/dist/docx/layout/wrap.d.ts.map +1 -1
  154. package/dist/docx/list-number-fields.d.ts +25 -0
  155. package/dist/docx/list-number-fields.d.ts.map +1 -0
  156. package/dist/docx/load/index.cjs +4355 -2703
  157. package/dist/docx/load/index.mjs +4355 -2703
  158. package/dist/docx/model-paragraph.d.ts +12 -1
  159. package/dist/docx/model-paragraph.d.ts.map +1 -1
  160. package/dist/docx/model.d.ts +26 -1
  161. package/dist/docx/model.d.ts.map +1 -1
  162. package/dist/docx/note-convert.d.ts +45 -0
  163. package/dist/docx/note-convert.d.ts.map +1 -0
  164. package/dist/docx/numbering-counters.d.ts +17 -0
  165. package/dist/docx/numbering-counters.d.ts.map +1 -0
  166. package/dist/docx/numbering-format.d.ts +11 -2
  167. package/dist/docx/numbering-format.d.ts.map +1 -1
  168. package/dist/docx/outline-numbering.d.ts +6 -0
  169. package/dist/docx/outline-numbering.d.ts.map +1 -0
  170. package/dist/docx/package-information-save.d.ts +9 -0
  171. package/dist/docx/package-information-save.d.ts.map +1 -0
  172. package/dist/docx/package-information.d.ts +43 -0
  173. package/dist/docx/package-information.d.ts.map +1 -0
  174. package/dist/docx/package-properties.d.ts +5 -0
  175. package/dist/docx/package-properties.d.ts.map +1 -0
  176. package/dist/docx/paragraph-styles.d.ts +2 -0
  177. package/dist/docx/paragraph-styles.d.ts.map +1 -1
  178. package/dist/docx/parse-revisions.d.ts +2 -0
  179. package/dist/docx/parse-revisions.d.ts.map +1 -1
  180. package/dist/docx/parse-table-floating.d.ts +5 -0
  181. package/dist/docx/parse-table-floating.d.ts.map +1 -0
  182. package/dist/docx/parse-table.d.ts.map +1 -1
  183. package/dist/docx/parse.d.ts.map +1 -1
  184. package/dist/docx/part-relationships.d.ts.map +1 -1
  185. package/dist/docx/personal-information.d.ts +18 -0
  186. package/dist/docx/personal-information.d.ts.map +1 -0
  187. package/dist/docx/picture-crop-edit.d.ts +18 -0
  188. package/dist/docx/picture-crop-edit.d.ts.map +1 -0
  189. package/dist/docx/picture-watermark.d.ts +29 -0
  190. package/dist/docx/picture-watermark.d.ts.map +1 -0
  191. package/dist/docx/relationship-allocator.d.ts.map +1 -1
  192. package/dist/docx/remove-document-information.d.ts +8 -0
  193. package/dist/docx/remove-document-information.d.ts.map +1 -0
  194. package/dist/docx/revision-commands.d.ts +6 -1
  195. package/dist/docx/revision-commands.d.ts.map +1 -1
  196. package/dist/docx/revision-ids.d.ts.map +1 -1
  197. package/dist/docx/run-language.d.ts +9 -0
  198. package/dist/docx/run-language.d.ts.map +1 -0
  199. package/dist/docx/run-properties-snapshot.d.ts +9 -0
  200. package/dist/docx/run-properties-snapshot.d.ts.map +1 -0
  201. package/dist/docx/run-style-model.d.ts +4 -0
  202. package/dist/docx/run-style-model.d.ts.map +1 -1
  203. package/dist/docx/save-modified.d.ts +2 -1
  204. package/dist/docx/save-modified.d.ts.map +1 -1
  205. package/dist/docx/save.d.ts.map +1 -1
  206. package/dist/docx/style-ref-fields.d.ts +1 -8
  207. package/dist/docx/style-ref-fields.d.ts.map +1 -1
  208. package/dist/docx/symbol-field.d.ts +21 -0
  209. package/dist/docx/symbol-field.d.ts.map +1 -0
  210. package/dist/docx/table-cell-write.d.ts.map +1 -1
  211. package/dist/docx/table-defaults.d.ts +2 -0
  212. package/dist/docx/table-defaults.d.ts.map +1 -1
  213. package/dist/docx/table-margins.d.ts +18 -0
  214. package/dist/docx/table-margins.d.ts.map +1 -0
  215. package/dist/docx/table-model.d.ts +23 -0
  216. package/dist/docx/table-model.d.ts.map +1 -1
  217. package/dist/docx/table-structure-check.d.ts.map +1 -1
  218. package/dist/docx/table-styles.d.ts.map +1 -1
  219. package/dist/docx/ui/index.cjs +787 -435
  220. package/dist/docx/ui/index.d.ts +1 -0
  221. package/dist/docx/ui/index.d.ts.map +1 -1
  222. package/dist/docx/ui/index.mjs +784 -436
  223. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  224. package/dist/docx/ui/paragraph-attributes.d.ts +6 -0
  225. package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
  226. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  227. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  228. package/dist/docx/ui/ribbon-legacy-labels.d.ts +1 -1
  229. package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -1
  230. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  231. package/dist/docx/ui/schema-marks.d.ts +2 -19
  232. package/dist/docx/ui/schema-marks.d.ts.map +1 -1
  233. package/dist/docx/ui/track-run-formatting.d.ts.map +1 -1
  234. package/dist/docx/ui/yjs-document-attributes.d.ts +5 -0
  235. package/dist/docx/ui/yjs-document-attributes.d.ts.map +1 -1
  236. package/dist/docx/write-drawing-wrap.d.ts +22 -0
  237. package/dist/docx/write-drawing-wrap.d.ts.map +1 -0
  238. package/dist/docx/write-drawing.d.ts.map +1 -1
  239. package/dist/docx/write-revisions.d.ts +3 -1
  240. package/dist/docx/write-revisions.d.ts.map +1 -1
  241. package/dist/docx/write-shape.d.ts.map +1 -1
  242. package/dist/docx/write-table-properties.d.ts.map +1 -1
  243. package/dist/docx/write.d.ts.map +1 -1
  244. package/dist/drawingml/html-text-paste.d.ts +28 -0
  245. package/dist/drawingml/html-text-paste.d.ts.map +1 -0
  246. package/dist/drawingml/html-text-style.d.ts +18 -0
  247. package/dist/drawingml/html-text-style.d.ts.map +1 -0
  248. package/dist/drawingml/index.cjs +762 -0
  249. package/dist/drawingml/index.d.ts +1 -0
  250. package/dist/drawingml/index.d.ts.map +1 -1
  251. package/dist/drawingml/index.mjs +760 -1
  252. package/dist/index.cjs +1147 -251
  253. package/dist/index.mjs +1147 -251
  254. package/dist/pptx/automation/index.cjs +561 -180
  255. package/dist/pptx/automation/index.d.ts +4 -4
  256. package/dist/pptx/automation/index.mjs +6 -5
  257. package/dist/pptx/chunks/{index-BCy58n13.d.ts → index-8ZfPndYR.d.ts} +2 -2
  258. package/dist/pptx/chunks/{index-BCy58n13.d.ts.map → index-8ZfPndYR.d.ts.map} +1 -1
  259. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts → index-DVhD9Kd5.d.ts} +4 -4
  260. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts.map → index-DVhD9Kd5.d.ts.map} +1 -1
  261. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts → index-DsUnUj-V.d.ts} +5 -5
  262. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts.map → index-DsUnUj-V.d.ts.map} +1 -1
  263. package/dist/pptx/chunks/{index-AZN38e6S.d.ts → index-xB7MDLI7.d.ts} +4 -4
  264. package/dist/pptx/chunks/{index-AZN38e6S.d.ts.map → index-xB7MDLI7.d.ts.map} +1 -1
  265. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts → presentation-BvnVkFPJ.d.ts} +26 -2
  266. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts.map → presentation-BvnVkFPJ.d.ts.map} +1 -1
  267. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts → text-operations-D7TCPhlv.d.ts} +2 -2
  268. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts.map → text-operations-D7TCPhlv.d.ts.map} +1 -1
  269. package/dist/pptx/cli/index.cjs +504 -124
  270. package/dist/pptx/cli/index.d.ts +1 -1
  271. package/dist/pptx/cli/index.mjs +4 -4
  272. package/dist/pptx/converter/index.d.ts +1 -1
  273. package/dist/pptx/converter/index.mjs +2 -2
  274. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  275. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  276. package/dist/pptx/editor/render/find-replace.cjs +16 -15
  277. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  278. package/dist/pptx/editor/render/find-replace.mjs +3 -2
  279. package/dist/pptx/editor/render/font-family-update.d.ts +2 -2
  280. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +2 -2
  281. package/dist/pptx/editor/render/segments-text-edit.cjs +159 -0
  282. package/dist/pptx/editor/render/segments-text-edit.d.ts +26 -0
  283. package/dist/pptx/editor/render/segments-text-edit.d.ts.map +1 -0
  284. package/dist/pptx/editor/render/segments-text-edit.mjs +156 -0
  285. package/dist/pptx/editor/render/slide-operations.cjs +12 -9
  286. package/dist/pptx/editor/render/slide-operations.mjs +6 -3
  287. package/dist/pptx/editor/render/table-cell-edit.cjs +5 -5
  288. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  289. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  290. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  291. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  292. package/dist/pptx/editor/render/table-cell-rich-text.cjs +41 -0
  293. package/dist/pptx/editor/render/table-cell-rich-text.d.ts +50 -0
  294. package/dist/pptx/editor/render/table-cell-rich-text.d.ts.map +1 -0
  295. package/dist/pptx/editor/render/table-cell-rich-text.mjs +8 -0
  296. package/dist/pptx/editor/render/table-cell-source.cjs +23 -0
  297. package/dist/pptx/editor/render/table-cell-source.d.ts +31 -0
  298. package/dist/pptx/editor/render/table-cell-source.d.ts.map +1 -0
  299. package/dist/pptx/editor/render/table-cell-source.mjs +6 -0
  300. package/dist/pptx/editor/render/table-cells-text-style.cjs +116 -0
  301. package/dist/pptx/editor/render/table-cells-text-style.d.ts +37 -0
  302. package/dist/pptx/editor/render/table-cells-text-style.d.ts.map +1 -0
  303. package/dist/pptx/editor/render/table-cells-text-style.mjs +113 -0
  304. package/dist/pptx/editor/render/table-data-grid-ops.cjs +40 -94
  305. package/dist/pptx/editor/render/table-data-grid-ops.mjs +3 -88
  306. package/dist/pptx/editor/render/table-grid-fill.cjs +30 -0
  307. package/dist/pptx/editor/render/table-grid-fill.d.ts +34 -0
  308. package/dist/pptx/editor/render/table-grid-fill.d.ts.map +1 -0
  309. package/dist/pptx/editor/render/table-grid-fill.mjs +28 -0
  310. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  311. package/dist/pptx/editor/render/table-layout.d.ts +2 -2
  312. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  313. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  314. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  315. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  316. package/dist/pptx/editor/render/text-content-style.d.ts +2 -2
  317. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  318. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  319. package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -2
  320. package/dist/pptx/index.cjs +519 -201
  321. package/dist/pptx/index.d.ts +7 -7
  322. package/dist/pptx/index.mjs +5 -5
  323. package/dist/pptx/node/index.d.ts +1 -1
  324. package/dist/pptx/smartart-layouts/index.d.ts +2 -2
  325. package/dist/teams/index.cjs +35 -25
  326. package/dist/teams/index.mjs +35 -25
  327. package/dist/text/complex-breaks.d.ts +24 -0
  328. package/dist/text/complex-breaks.d.ts.map +1 -0
  329. package/dist/text/east-asian.d.ts +32 -0
  330. package/dist/text/east-asian.d.ts.map +1 -0
  331. package/dist/text/html-tokens.d.ts +45 -0
  332. package/dist/text/html-tokens.d.ts.map +1 -0
  333. package/dist/text/index.cjs +477 -62
  334. package/dist/text/index.d.ts +5 -0
  335. package/dist/text/index.d.ts.map +1 -1
  336. package/dist/text/index.mjs +456 -63
  337. package/dist/text/kinsoku.d.ts +55 -0
  338. package/dist/text/kinsoku.d.ts.map +1 -0
  339. package/dist/text/truetype/embedding.d.ts +42 -0
  340. package/dist/text/truetype/embedding.d.ts.map +1 -0
  341. package/dist/text/windows-1252.d.ts +10 -0
  342. package/dist/text/windows-1252.d.ts.map +1 -0
  343. package/dist/xlsx/collab/index.cjs +10 -6
  344. package/dist/xlsx/collab/index.mjs +10 -6
  345. package/dist/xlsx/edit/clipboard-html-parse.d.ts +1 -0
  346. package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
  347. package/dist/xlsx/formula/functions/text-convert.d.ts.map +1 -1
  348. package/dist/xlsx/index.cjs +96 -51
  349. package/dist/xlsx/index.mjs +96 -51
  350. package/dist/xlsx/load/index.cjs +10 -6
  351. package/dist/xlsx/load/index.mjs +10 -6
  352. package/dist/xlsx/ui/index.cjs +97 -52
  353. package/dist/xlsx/ui/index.mjs +97 -52
  354. package/package.json +1 -1
  355. package/dist/PptxHandler-72NTA5ZY.cjs +0 -14
  356. package/dist/PptxHandler-O4IJ3TKZ.mjs +0 -5
  357. package/dist/PresentationBuilder-ORM22QGC.mjs +0 -5
  358. package/dist/PresentationBuilder-T2ETYT3L.cjs +0 -22
  359. package/dist/chunk-X4RL5AZ7.cjs +0 -120
  360. package/dist/{chunk-PRGXRAAU.mjs → chunk-4Y76EAKK.mjs} +131 -131
  361. package/dist/{chunk-EN3KSEW5.cjs → chunk-MMULWQOM.cjs} +131 -131
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk7XYVFUB3_cjs = require('../../../chunk-7XYVFUB3.cjs');
3
+ var chunk2IO523MM_cjs = require('../../../chunk-2IO523MM.cjs');
4
4
 
5
5
  // pptx/editor/render/table-cell-merge.ts
6
6
  function computeMergeCellRight(td, rowIndex, columnIndex) {
@@ -25,7 +25,7 @@ function computeMergeCellRight(td, rowIndex, columnIndex) {
25
25
  return { ...c, gridSpan: currentSpan + nextSpan };
26
26
  }
27
27
  if (ci >= nextColumnIndex && ci < nextColumnIndex + nextSpan) {
28
- return { ...chunk7XYVFUB3_cjs.withCellText(c, ""), hMerge: true };
28
+ return { ...chunk2IO523MM_cjs.withCellText(c, ""), hMerge: true };
29
29
  }
30
30
  return c;
31
31
  });
@@ -65,7 +65,7 @@ function computeMergeCellDown(td, rowIndex, columnIndex) {
65
65
  return {
66
66
  ...r,
67
67
  cells: r.cells.map(
68
- (c, ci) => ci === columnIndex ? { ...chunk7XYVFUB3_cjs.withCellText(c, ""), vMerge: true } : c
68
+ (c, ci) => ci === columnIndex ? { ...chunk2IO523MM_cjs.withCellText(c, ""), vMerge: true } : c
69
69
  )
70
70
  };
71
71
  }
@@ -1,4 +1,4 @@
1
- import { withCellText } from '../../../chunk-NBMXEVHL.mjs';
1
+ import { withCellText } from '../../../chunk-FX6WL42B.mjs';
2
2
 
3
3
  // pptx/editor/render/table-cell-merge.ts
4
4
  function computeMergeCellRight(td, rowIndex, columnIndex) {
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var chunkHZAB3YDO_cjs = require('../../../chunk-HZAB3YDO.cjs');
4
+ require('../../../chunk-MUNEIE2J.cjs');
5
+ require('../../../chunk-W7LVJC32.cjs');
6
+ require('../../../chunk-LO55N7VL.cjs');
7
+ require('../../../chunk-25IJEN7R.cjs');
8
+ require('../../../chunk-MMULWQOM.cjs');
9
+ require('../../../chunk-XZPZHXV4.cjs');
10
+ require('../../../chunk-5W2QL4SB.cjs');
11
+
12
+
13
+
14
+ Object.defineProperty(exports, "cellRunSegmentStyle", {
15
+ enumerable: true,
16
+ get: function () { return chunkHZAB3YDO_cjs.cellRunSegmentStyle; }
17
+ });
18
+ Object.defineProperty(exports, "cellRunsFromSegments", {
19
+ enumerable: true,
20
+ get: function () { return chunkHZAB3YDO_cjs.cellRunsFromSegments; }
21
+ });
22
+ Object.defineProperty(exports, "sameCellSegments", {
23
+ enumerable: true,
24
+ get: function () { return chunkHZAB3YDO_cjs.sameCellSegments; }
25
+ });
26
+ Object.defineProperty(exports, "setCellSegments", {
27
+ enumerable: true,
28
+ get: function () { return chunkHZAB3YDO_cjs.setCellSegments; }
29
+ });
30
+ Object.defineProperty(exports, "setTableElementCellSegments", {
31
+ enumerable: true,
32
+ get: function () { return chunkHZAB3YDO_cjs.setTableElementCellSegments; }
33
+ });
34
+ Object.defineProperty(exports, "tableCellSegments", {
35
+ enumerable: true,
36
+ get: function () { return chunkHZAB3YDO_cjs.tableCellSegments; }
37
+ });
38
+ Object.defineProperty(exports, "withCellSegments", {
39
+ enumerable: true,
40
+ get: function () { return chunkHZAB3YDO_cjs.withCellSegments; }
41
+ });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * table-cell-rich-text.ts: a table cell's text as rich segments, the same
3
+ * `TextSegment` model shape text uses, so cell editing keeps (and can change)
4
+ * per-run formatting instead of flattening the cell to one string.
5
+ *
6
+ * A loaded cell carries its runs as `textRuns` (sizes in points); an edited
7
+ * cell gets `textSegments` (sizes in px, as in shape text), which the save
8
+ * writes as `a:p`/`a:r` through the shape text writer while `text` still
9
+ * spells them (`tableCellSegmentsForSave`). {@link withCellSegments} keeps
10
+ * `text`, `textSegments`, `textRuns` and `paragraphs` in step so the renderer
11
+ * (which paints `textRuns`) and the save agree.
12
+ *
13
+ * @module render/table-cell-rich-text
14
+ */
15
+ import { PptxTableCell, PptxTableCellTextRun, TablePptxElement, TextSegment, TextStyle, XmlObject } from "ooxml-core/pptx";
16
+ /** The run-level formatting of a cell run, as a shape text style. */
17
+ export declare function cellRunSegmentStyle(run: PptxTableCellTextRun): TextStyle;
18
+ /**
19
+ * A cell's text as segments: its own `textSegments` when they still spell its
20
+ * text, else its loaded runs, else its flat text in the cell's run style.
21
+ * Each paragraph's first segment carries that paragraph's layout. Given the
22
+ * cell's source markup (`tableCellSourceXml`), each segment also carries the
23
+ * run it was read from (`TextSegment.tableRun`) and each paragraph its `a:p`,
24
+ * so saving the edit keeps the markup this model does not type.
25
+ */
26
+ export declare function tableCellSegments(cell: PptxTableCell, cellXml?: XmlObject): TextSegment[];
27
+ /** The cell runs a renderer paints for these segments. */
28
+ export declare function cellRunsFromSegments(segments: readonly TextSegment[]): PptxTableCellTextRun[];
29
+ /**
30
+ * Give a cell new rich content. `text` is derived from the segments exactly as
31
+ * the save checks it, so the segments are what gets written; `textRuns` paint
32
+ * them; `paragraphs` keep one layout entry per paragraph, taken from each
33
+ * paragraph's first segment (falling back to the cell's existing entry).
34
+ */
35
+ export declare function withCellSegments(cell: PptxTableCell, segments: TextSegment[]): PptxTableCell;
36
+ /** Whether two segment lists spell and style the same content. */
37
+ export declare function sameCellSegments(a: readonly TextSegment[], b: readonly TextSegment[]): boolean;
38
+ /**
39
+ * Return a new table element with one cell's rich content replaced, or the
40
+ * element itself when the cell does not exist or nothing changed (so leaving
41
+ * a cell unedited writes nothing).
42
+ */
43
+ export declare function setCellSegments(element: TablePptxElement, rowIndex: number, colIndex: number, segments: TextSegment[]): TablePptxElement;
44
+ /**
45
+ * {@link setCellSegments} on an element, keeping `rawXml` in step with the
46
+ * flat text so every reader of the markup sees the edit (the save rewrites
47
+ * the cell's `a:txBody` from the segments).
48
+ */
49
+ export declare function setTableElementCellSegments(element: TablePptxElement, rowIndex: number, colIndex: number, segments: TextSegment[]): TablePptxElement;
50
+ //# sourceMappingURL=table-cell-rich-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-cell-rich-text.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-cell-rich-text.ts"],"mappings":";;;;;;;;;;;;;;;;wBA6CgB,oBAAoB,KAAK,uBAAuB;;;;;;;;;wBAoEhD,kBAAkB,MAAM,eAAe,UAAU,YAAY;;wBA8E7D,qBAAqB,mBAAmB,gBAAgB;;;;;;;wBAoBxD,iBAAiB,MAAM,eAAe,UAAU,gBAAgB;;wBAmChE,iBAAiB,YAAY,eAAe,YAAY;;;;;;wBAcxD,gBACf,SAAS,kBACT,kBACA,kBACA,UAAU,gBACR;;;;;;wBAgCa,4BACf,SAAS,kBACT,kBACA,kBACA,UAAU,gBACR"}
@@ -0,0 +1,8 @@
1
+ export { cellRunSegmentStyle, cellRunsFromSegments, sameCellSegments, setCellSegments, setTableElementCellSegments, tableCellSegments, withCellSegments } from '../../../chunk-IDATIFCG.mjs';
2
+ import '../../../chunk-25JN3ZQM.mjs';
3
+ import '../../../chunk-GI4Y6BBX.mjs';
4
+ import '../../../chunk-554UZLPS.mjs';
5
+ import '../../../chunk-UV4LMGVZ.mjs';
6
+ import '../../../chunk-4Y76EAKK.mjs';
7
+ import '../../../chunk-GXHKNSZX.mjs';
8
+ import '../../../chunk-CA7KCNL3.mjs';
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var chunkMUNEIE2J_cjs = require('../../../chunk-MUNEIE2J.cjs');
4
+ require('../../../chunk-LO55N7VL.cjs');
5
+ require('../../../chunk-25IJEN7R.cjs');
6
+ require('../../../chunk-MMULWQOM.cjs');
7
+ require('../../../chunk-XZPZHXV4.cjs');
8
+ require('../../../chunk-5W2QL4SB.cjs');
9
+
10
+
11
+
12
+ Object.defineProperty(exports, "pairTableCellSource", {
13
+ enumerable: true,
14
+ get: function () { return chunkMUNEIE2J_cjs.pairTableCellSource; }
15
+ });
16
+ Object.defineProperty(exports, "tableCellSourceXml", {
17
+ enumerable: true,
18
+ get: function () { return chunkMUNEIE2J_cjs.tableCellSourceXml; }
19
+ });
20
+ Object.defineProperty(exports, "withRunStyle", {
21
+ enumerable: true,
22
+ get: function () { return chunkMUNEIE2J_cjs.withRunStyle; }
23
+ });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * table-cell-source.ts: pair a loaded table cell's runs with the markup they
3
+ * were read from, so an edit can keep each run's own `a:rPr` (hyperlinks,
4
+ * theme colours and their transforms, fields, language, effects).
5
+ *
6
+ * The cell's `textRuns` come from `extractTableCellTextRuns`, which walks
7
+ * every `a:p` and its `a:r` / `a:br` / `a:fld` children in authored order;
8
+ * this walks the same children the same way and checks each pairing by tag
9
+ * and text, so a cell whose markup no longer matches its runs gets no source
10
+ * at all rather than a wrong one.
11
+ *
12
+ * @module render/table-cell-source
13
+ */
14
+ import { PptxTableCellTextRun, TableCellRunSource, TablePptxElement, TextStyle, XmlObject } from "ooxml-core/pptx";
15
+ /** One cell's source markup, aligned with its runs. */
16
+ export interface TableCellSource {
17
+ /** The source `a:p` of each paragraph, in order. */
18
+ paragraphs: XmlObject[];
19
+ /** For each entry of `textRuns`, its source run (`undefined` for a paragraph break). */
20
+ runs: Array<Omit<TableCellRunSource, 'style'> | undefined>;
21
+ }
22
+ /** The `a:tc` of grid position `(row, col)` in an element's markup. */
23
+ export declare function tableCellSourceXml(element: TablePptxElement, row: number, col: number): XmlObject | undefined;
24
+ /**
25
+ * Align `runs` with the `a:txBody` of `cellXml`, or `undefined` when they do
26
+ * not describe the same content.
27
+ */
28
+ export declare function pairTableCellSource(runs: readonly PptxTableCellTextRun[], cellXml: XmlObject | undefined): TableCellSource | undefined;
29
+ /** A run source with the style the run was read as. */
30
+ export declare function withRunStyle(source: Omit<TableCellRunSource, 'style'> | undefined, style: TextStyle): TableCellRunSource | undefined;
31
+ //# sourceMappingURL=table-cell-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-cell-source.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-cell-source.ts"],"mappings":";;;;;;;;;;;;;;;iBA4BiB;;EAEhB,YAAY;;EAEZ,MAAM,MAAM,KAAK;;;wBAIF,mBACf,SAAS,kBACT,aACA,cACE;;;;;wBAWa,oBACf,eAAe,wBACf,SAAS,wBACP;;wBA2Ca,aACf,QAAQ,KAAK,0CACb,OAAO,YACL"}
@@ -0,0 +1,6 @@
1
+ export { pairTableCellSource, tableCellSourceXml, withRunStyle } from '../../../chunk-25JN3ZQM.mjs';
2
+ import '../../../chunk-554UZLPS.mjs';
3
+ import '../../../chunk-UV4LMGVZ.mjs';
4
+ import '../../../chunk-4Y76EAKK.mjs';
5
+ import '../../../chunk-GXHKNSZX.mjs';
6
+ import '../../../chunk-CA7KCNL3.mjs';
@@ -0,0 +1,116 @@
1
+ 'use strict';
2
+
3
+ var chunkANZ4Q6I3_cjs = require('../../../chunk-ANZ4Q6I3.cjs');
4
+ require('../../../chunk-QOO36KG4.cjs');
5
+ var chunkHZAB3YDO_cjs = require('../../../chunk-HZAB3YDO.cjs');
6
+ require('../../../chunk-MUNEIE2J.cjs');
7
+ require('../../../chunk-W7LVJC32.cjs');
8
+ require('../../../chunk-LO55N7VL.cjs');
9
+ var chunk2IO523MM_cjs = require('../../../chunk-2IO523MM.cjs');
10
+ require('../../../chunk-25IJEN7R.cjs');
11
+ require('../../../chunk-MMULWQOM.cjs');
12
+ require('../../../chunk-XZPZHXV4.cjs');
13
+ require('../../../chunk-5W2QL4SB.cjs');
14
+ var pptx = require('ooxml-core/pptx');
15
+
16
+ var RUN_KEYS = [
17
+ "bold",
18
+ "italic",
19
+ "underline",
20
+ "strikethrough",
21
+ "color",
22
+ "fontFamily",
23
+ "fontSize"
24
+ ];
25
+ function targetCells(element, cells) {
26
+ if (cells && cells.length > 0) {
27
+ return [...cells];
28
+ }
29
+ const all = [];
30
+ element.tableData?.rows.forEach(
31
+ (row, rowIndex) => row.cells.forEach((cell, colIndex) => {
32
+ if (!cell.hMerge && !cell.vMerge) {
33
+ all.push({ row: rowIndex, col: colIndex });
34
+ }
35
+ })
36
+ );
37
+ return all;
38
+ }
39
+ function runPatch(update) {
40
+ const patch = {};
41
+ for (const key of RUN_KEYS) {
42
+ if (key in update) {
43
+ patch[key] = update[key];
44
+ }
45
+ }
46
+ return patch;
47
+ }
48
+ function segmentPatch(update) {
49
+ const patch = runPatch(update);
50
+ if (typeof update.fontSize === "number") {
51
+ patch.fontSize = update.fontSize * (96 / 72);
52
+ }
53
+ return patch;
54
+ }
55
+ function cellStylePatch(update) {
56
+ const { strikethrough: _strikethrough, ...patch } = update;
57
+ return "color" in update && !("colorRef" in update) ? { ...patch, colorRef: void 0, colorXml: void 0 } : patch;
58
+ }
59
+ function withCellTextStyle(cell, update) {
60
+ const styled = chunk2IO523MM_cjs.withCellStyle(cell, cellStylePatch(update));
61
+ if (styled.textSegments?.length) {
62
+ const patch = segmentPatch(update);
63
+ const segments = chunkHZAB3YDO_cjs.tableCellSegments(styled).map((segment) => {
64
+ if (segment.isParagraphBreak) {
65
+ return segment;
66
+ }
67
+ const next = chunkANZ4Q6I3_cjs.updateTextSegmentStyle(segment, patch);
68
+ if (update.align && next.paragraphProperties) {
69
+ next.paragraphProperties = { ...next.paragraphProperties, align: update.align };
70
+ }
71
+ return next;
72
+ });
73
+ return chunkHZAB3YDO_cjs.withCellSegments(styled, segments);
74
+ }
75
+ if (styled.textRuns?.length) {
76
+ const patch = runPatch(update);
77
+ styled.textRuns = styled.textRuns.map(
78
+ (run) => run.isParagraphBreak || run.isLineBreak ? run : { ...run, ...patch }
79
+ );
80
+ }
81
+ return styled;
82
+ }
83
+ function applyTableCellsTextStyle(element, cells, update) {
84
+ const tableData = element.tableData;
85
+ if (!tableData) {
86
+ return element;
87
+ }
88
+ const targets = targetCells(element, cells);
89
+ const keys = new Set(targets.map(({ row, col }) => `${row}:${col}`));
90
+ const rows = tableData.rows.map((row, rowIndex) => ({
91
+ ...row,
92
+ cells: row.cells.map(
93
+ (cell, colIndex) => keys.has(`${rowIndex}:${colIndex}`) ? withCellTextStyle(cell, update) : cell
94
+ )
95
+ }));
96
+ const next = { ...element, tableData: { ...tableData, rows } };
97
+ let rawXml = element.rawXml;
98
+ for (const { row, col } of targets) {
99
+ if (!rawXml) {
100
+ break;
101
+ }
102
+ rawXml = pptx.updateCellTextStyleInRawXml(
103
+ { ...element, rawXml },
104
+ row,
105
+ col,
106
+ update
107
+ ) ?? rawXml;
108
+ }
109
+ if (rawXml) {
110
+ next.rawXml = rawXml;
111
+ }
112
+ return next;
113
+ }
114
+
115
+ exports.applyTableCellsTextStyle = applyTableCellsTextStyle;
116
+ exports.withCellTextStyle = withCellTextStyle;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * table-cells-text-style.ts: character formatting applied to a set of table
3
+ * cells (a cell range, or the whole table), as PowerPoint does when Bold,
4
+ * a colour or a size is picked with cells or the table frame selected: every
5
+ * run in every selected cell takes it, and an empty cell keeps it for the
6
+ * text typed into it later.
7
+ *
8
+ * Three representations change together: the cell style (the empty-cell and
9
+ * single-run fallback), the runs a renderer paints (`textRuns`, and
10
+ * `textSegments` for a cell edited this session), and the cell's markup in
11
+ * `rawXml`, where every `a:rPr` (or the `a:endParaRPr` of an empty
12
+ * paragraph) is updated in place so the rest of each run survives verbatim.
13
+ *
14
+ * @module render/table-cells-text-style
15
+ */
16
+ import { PptxTableCell, PptxTableCellStyle, TablePptxElement } from "ooxml-core/pptx";
17
+ /** A cell position in grid coordinates. */
18
+ export interface TableCellRef {
19
+ row: number;
20
+ col: number;
21
+ }
22
+ /**
23
+ * Character (and alignment) formatting for table cells, in cell units: sizes
24
+ * in points, as on `PptxTableCellStyle`.
25
+ */
26
+ export type TableCellTextStyleUpdate = Partial<Pick<PptxTableCellStyle, 'bold' | 'italic' | 'underline' | 'color' | 'fontFamily' | 'fontSize' | 'align'>> & {
27
+ strikethrough?: boolean;
28
+ };
29
+ /** One cell with the formatting applied to its style and every run. */
30
+ export declare function withCellTextStyle(cell: PptxTableCell, update: TableCellTextStyleUpdate): PptxTableCell;
31
+ /**
32
+ * Apply character formatting to every run of the given cells (every cell of
33
+ * the table when `cells` is empty or omitted), keeping `rawXml` in step.
34
+ * Returns the element itself when it has no table data.
35
+ */
36
+ export declare function applyTableCellsTextStyle(element: TablePptxElement, cells: readonly TableCellRef[] | undefined, update: TableCellTextStyleUpdate): TablePptxElement;
37
+ //# sourceMappingURL=table-cells-text-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-cells-text-style.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-cells-text-style.ts"],"mappings":";;;;;;;;;;;;;;;;;iBA6BiB;EAChB;EACA;;;;;;YAOW,2BAA2B,QACtC,KACC;EAGI;;;wBAuDU,kBACf,MAAM,eACN,QAAQ,2BACN;;;;;;wBA8Ba,yBACf,SAAS,kBACT,gBAAgB,4BAChB,QAAQ,2BACN"}
@@ -0,0 +1,113 @@
1
+ import { updateTextSegmentStyle } from '../../../chunk-EGTRL3QJ.mjs';
2
+ import '../../../chunk-R2KZXD6U.mjs';
3
+ import { tableCellSegments, withCellSegments } from '../../../chunk-IDATIFCG.mjs';
4
+ import '../../../chunk-25JN3ZQM.mjs';
5
+ import '../../../chunk-GI4Y6BBX.mjs';
6
+ import '../../../chunk-554UZLPS.mjs';
7
+ import { withCellStyle } from '../../../chunk-FX6WL42B.mjs';
8
+ import '../../../chunk-UV4LMGVZ.mjs';
9
+ import '../../../chunk-4Y76EAKK.mjs';
10
+ import '../../../chunk-GXHKNSZX.mjs';
11
+ import '../../../chunk-CA7KCNL3.mjs';
12
+ import { updateCellTextStyleInRawXml } from 'ooxml-core/pptx';
13
+
14
+ var RUN_KEYS = [
15
+ "bold",
16
+ "italic",
17
+ "underline",
18
+ "strikethrough",
19
+ "color",
20
+ "fontFamily",
21
+ "fontSize"
22
+ ];
23
+ function targetCells(element, cells) {
24
+ if (cells && cells.length > 0) {
25
+ return [...cells];
26
+ }
27
+ const all = [];
28
+ element.tableData?.rows.forEach(
29
+ (row, rowIndex) => row.cells.forEach((cell, colIndex) => {
30
+ if (!cell.hMerge && !cell.vMerge) {
31
+ all.push({ row: rowIndex, col: colIndex });
32
+ }
33
+ })
34
+ );
35
+ return all;
36
+ }
37
+ function runPatch(update) {
38
+ const patch = {};
39
+ for (const key of RUN_KEYS) {
40
+ if (key in update) {
41
+ patch[key] = update[key];
42
+ }
43
+ }
44
+ return patch;
45
+ }
46
+ function segmentPatch(update) {
47
+ const patch = runPatch(update);
48
+ if (typeof update.fontSize === "number") {
49
+ patch.fontSize = update.fontSize * (96 / 72);
50
+ }
51
+ return patch;
52
+ }
53
+ function cellStylePatch(update) {
54
+ const { strikethrough: _strikethrough, ...patch } = update;
55
+ return "color" in update && !("colorRef" in update) ? { ...patch, colorRef: void 0, colorXml: void 0 } : patch;
56
+ }
57
+ function withCellTextStyle(cell, update) {
58
+ const styled = withCellStyle(cell, cellStylePatch(update));
59
+ if (styled.textSegments?.length) {
60
+ const patch = segmentPatch(update);
61
+ const segments = tableCellSegments(styled).map((segment) => {
62
+ if (segment.isParagraphBreak) {
63
+ return segment;
64
+ }
65
+ const next = updateTextSegmentStyle(segment, patch);
66
+ if (update.align && next.paragraphProperties) {
67
+ next.paragraphProperties = { ...next.paragraphProperties, align: update.align };
68
+ }
69
+ return next;
70
+ });
71
+ return withCellSegments(styled, segments);
72
+ }
73
+ if (styled.textRuns?.length) {
74
+ const patch = runPatch(update);
75
+ styled.textRuns = styled.textRuns.map(
76
+ (run) => run.isParagraphBreak || run.isLineBreak ? run : { ...run, ...patch }
77
+ );
78
+ }
79
+ return styled;
80
+ }
81
+ function applyTableCellsTextStyle(element, cells, update) {
82
+ const tableData = element.tableData;
83
+ if (!tableData) {
84
+ return element;
85
+ }
86
+ const targets = targetCells(element, cells);
87
+ const keys = new Set(targets.map(({ row, col }) => `${row}:${col}`));
88
+ const rows = tableData.rows.map((row, rowIndex) => ({
89
+ ...row,
90
+ cells: row.cells.map(
91
+ (cell, colIndex) => keys.has(`${rowIndex}:${colIndex}`) ? withCellTextStyle(cell, update) : cell
92
+ )
93
+ }));
94
+ const next = { ...element, tableData: { ...tableData, rows } };
95
+ let rawXml = element.rawXml;
96
+ for (const { row, col } of targets) {
97
+ if (!rawXml) {
98
+ break;
99
+ }
100
+ rawXml = updateCellTextStyleInRawXml(
101
+ { ...element, rawXml },
102
+ row,
103
+ col,
104
+ update
105
+ ) ?? rawXml;
106
+ }
107
+ if (rawXml) {
108
+ next.rawXml = rawXml;
109
+ }
110
+ return next;
111
+ }
112
+
113
+ export { applyTableCellsTextStyle, withCellTextStyle };
@@ -1,98 +1,44 @@
1
1
  'use strict';
2
2
 
3
- var chunkCODMW5KF_cjs = require('../../../chunk-CODMW5KF.cjs');
4
- var chunk7XYVFUB3_cjs = require('../../../chunk-7XYVFUB3.cjs');
5
- var pptx = require('ooxml-core/pptx');
3
+ var chunkHWL2AGLD_cjs = require('../../../chunk-HWL2AGLD.cjs');
4
+ require('../../../chunk-CVUMILG3.cjs');
5
+ require('../../../chunk-2IO523MM.cjs');
6
6
 
7
- function withTableData(element, transform, edit) {
8
- const tableData = element.tableData;
9
- if (!tableData) {
10
- return element;
11
- }
12
- const next = transform(tableData);
13
- if (next === tableData) {
14
- return element;
15
- }
16
- const updated = { ...element, tableData: next };
17
- if (element.rawXml) {
18
- const rawXml = pptx.rebuildTableStructureInRawXml(element, next, edit);
19
- if (rawXml) {
20
- updated.rawXml = rawXml;
21
- }
22
- }
23
- return updated;
24
- }
25
- function setTableElementCellText(element, rowIndex, colIndex, text) {
26
- const updated = chunk7XYVFUB3_cjs.setCellText(element, rowIndex, colIndex, text);
27
- if (updated === element || !element.rawXml) {
28
- return updated;
29
- }
30
- const rawXml = pptx.updateCellTextInRawXml(element, rowIndex, colIndex, text);
31
- return rawXml ? { ...updated, rawXml } : updated;
32
- }
33
- function insertTableElementRow(element, rowIdx, position) {
34
- return withTableData(element, (data) => chunkCODMW5KF_cjs.insertTableRow(data, rowIdx, position), {
35
- axis: "row",
36
- action: "insert",
37
- index: position === "above" ? rowIdx : rowIdx + 1
38
- });
39
- }
40
- function removeTableElementRow(element, rowIdx) {
41
- return withTableData(element, (data) => chunkCODMW5KF_cjs.deleteTableRow(data, rowIdx), {
42
- axis: "row",
43
- action: "delete",
44
- index: rowIdx
45
- });
46
- }
47
- function insertTableElementColumn(element, colIdx, position) {
48
- return withTableData(element, (data) => chunkCODMW5KF_cjs.insertTableColumn(data, colIdx, position), {
49
- axis: "column",
50
- action: "insert",
51
- index: position === "left" ? colIdx : colIdx + 1
52
- });
53
- }
54
- function removeTableElementColumn(element, colIdx) {
55
- return withTableData(element, (data) => chunkCODMW5KF_cjs.deleteTableColumn(data, colIdx), {
56
- axis: "column",
57
- action: "delete",
58
- index: colIdx
59
- });
60
- }
61
- function appendTableElementRow(element) {
62
- const rowCount = element.tableData?.rows.length ?? 0;
63
- if (rowCount === 0) {
64
- return element;
65
- }
66
- return insertTableElementRow(element, rowCount - 1, "below");
67
- }
68
- function removeLastTableElementRow(element) {
69
- const rowCount = element.tableData?.rows.length ?? 0;
70
- if (rowCount === 0) {
71
- return element;
72
- }
73
- return removeTableElementRow(element, rowCount - 1);
74
- }
75
- function appendTableElementColumn(element) {
76
- const colCount = element.tableData?.columnWidths.length ?? 0;
77
- if (colCount === 0) {
78
- return element;
79
- }
80
- return insertTableElementColumn(element, colCount - 1, "right");
81
- }
82
- function removeLastTableElementColumn(element) {
83
- const colCount = element.tableData?.columnWidths.length ?? 0;
84
- if (colCount === 0) {
85
- return element;
86
- }
87
- return removeTableElementColumn(element, colCount - 1);
88
- }
89
7
 
90
- exports.appendTableElementColumn = appendTableElementColumn;
91
- exports.appendTableElementRow = appendTableElementRow;
92
- exports.insertTableElementColumn = insertTableElementColumn;
93
- exports.insertTableElementRow = insertTableElementRow;
94
- exports.removeLastTableElementColumn = removeLastTableElementColumn;
95
- exports.removeLastTableElementRow = removeLastTableElementRow;
96
- exports.removeTableElementColumn = removeTableElementColumn;
97
- exports.removeTableElementRow = removeTableElementRow;
98
- exports.setTableElementCellText = setTableElementCellText;
8
+
9
+ Object.defineProperty(exports, "appendTableElementColumn", {
10
+ enumerable: true,
11
+ get: function () { return chunkHWL2AGLD_cjs.appendTableElementColumn; }
12
+ });
13
+ Object.defineProperty(exports, "appendTableElementRow", {
14
+ enumerable: true,
15
+ get: function () { return chunkHWL2AGLD_cjs.appendTableElementRow; }
16
+ });
17
+ Object.defineProperty(exports, "insertTableElementColumn", {
18
+ enumerable: true,
19
+ get: function () { return chunkHWL2AGLD_cjs.insertTableElementColumn; }
20
+ });
21
+ Object.defineProperty(exports, "insertTableElementRow", {
22
+ enumerable: true,
23
+ get: function () { return chunkHWL2AGLD_cjs.insertTableElementRow; }
24
+ });
25
+ Object.defineProperty(exports, "removeLastTableElementColumn", {
26
+ enumerable: true,
27
+ get: function () { return chunkHWL2AGLD_cjs.removeLastTableElementColumn; }
28
+ });
29
+ Object.defineProperty(exports, "removeLastTableElementRow", {
30
+ enumerable: true,
31
+ get: function () { return chunkHWL2AGLD_cjs.removeLastTableElementRow; }
32
+ });
33
+ Object.defineProperty(exports, "removeTableElementColumn", {
34
+ enumerable: true,
35
+ get: function () { return chunkHWL2AGLD_cjs.removeTableElementColumn; }
36
+ });
37
+ Object.defineProperty(exports, "removeTableElementRow", {
38
+ enumerable: true,
39
+ get: function () { return chunkHWL2AGLD_cjs.removeTableElementRow; }
40
+ });
41
+ Object.defineProperty(exports, "setTableElementCellText", {
42
+ enumerable: true,
43
+ get: function () { return chunkHWL2AGLD_cjs.setTableElementCellText; }
44
+ });