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
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Font embedding permissions: the OpenType `OS/2` table's `fsType` field, which the EOT header
3
+ * also carries (offset 32). Format-neutral and DOM-free; every writer that embeds a font file
4
+ * (a presentation's font parts, a PDF's subset fonts) decides through this one decoder.
5
+ *
6
+ * `fsType` bits 0-3 are the usage permission. A value of 0 there is "installable"; bit 1 is
7
+ * "restricted licence", bit 2 "preview & print", bit 3 "editable". A font should set at most one
8
+ * of them; when an older font sets several, the least restrictive one applies. Bit 8 forbids
9
+ * subsetting and bit 9 allows only bitmaps to be embedded. The other bits are reserved.
10
+ */
11
+ /** The usage permission a font's vendor grants for an embedded copy. */
12
+ export type EmbeddingLicence = 'installable' | 'editable' | 'preview-print' | 'restricted';
13
+ export interface EmbeddingPermission {
14
+ readonly licence: EmbeddingLicence;
15
+ /** Bit 8: the font may only be embedded whole. */
16
+ readonly noSubsetting: boolean;
17
+ /** Bit 9: only the bitmaps may be embedded, never the outlines. */
18
+ readonly bitmapOnly: boolean;
19
+ }
20
+ /** Decode an `fsType` value. */
21
+ export declare function embeddingPermission(fsType: number): EmbeddingPermission;
22
+ /** Whether an embedded copy may be used to display a document (every licence but restricted). */
23
+ export declare function mayDisplayEmbeddedFont(permission: EmbeddingPermission): boolean;
24
+ /**
25
+ * Whether the whole font file (its outlines) may be newly embedded into an editable document:
26
+ * installable and editable faces only, and not when the vendor allows bitmaps alone.
27
+ */
28
+ export declare function mayEmbedFontInEditableDocument(permission: EmbeddingPermission): boolean;
29
+ /**
30
+ * Whether a subset of the outlines may be embedded into a read-only document such as a PDF:
31
+ * any licence but restricted, when subsetting and outlines are allowed.
32
+ */
33
+ export declare function mayEmbedFontSubset(permission: EmbeddingPermission): boolean;
34
+ /**
35
+ * Read `fsType` from an uncompressed sfnt (TrueType, OpenType, or the first font of a collection)
36
+ * without parsing anything else. `header` replaces the leading bytes of `data` when given, so a
37
+ * caller whose file is obfuscated only at its start (an OOXML font part) can pass the clear
38
+ * header instead of copying the whole file. `undefined` when the bytes are not an sfnt (WOFF and
39
+ * WOFF2 compress their tables) or have no `OS/2` table.
40
+ */
41
+ export declare function readSfntFsType(data: Uint8Array, header?: Uint8Array): number | undefined;
42
+ //# sourceMappingURL=embedding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../../text/truetype/embedding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,UAAU,GAAG,eAAe,GAAG,YAAY,CAAC;AAE3F,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,kDAAkD;IAClD,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC7B;AAQD,gCAAgC;AAChC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAcvE;AAED,iGAAiG;AACjG,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAE/E;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAKvF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAE3E;AAMD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAgCxF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Windows-1252 (the Western "ANSI" code page Office uses for single-byte character codes): codes
3
+ * 128-159 hold characters Latin-1 does not; every other code below 256 is its own code point.
4
+ */
5
+ export declare const WINDOWS_1252_HIGH: Readonly<Record<number, number>>;
6
+ /** The code point of a Windows-1252 byte (0-255). */
7
+ export declare const windows1252CodePoint: (byte: number) => number;
8
+ /** The byte (128-159) Windows-1252 codes a character Latin-1 does not hold with, if it is one. */
9
+ export declare const windows1252HighByte: (codePoint: number) => number | undefined;
10
+ //# sourceMappingURL=windows-1252.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows-1252.d.ts","sourceRoot":"","sources":["../../text/windows-1252.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4B9D,CAAC;AAIF,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,SAAU,MAAM,KAAG,MAAyC,CAAC;AAE9F,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,cAAe,MAAM,KAAG,MAAM,GAAG,SAC1C,CAAC"}
@@ -47914,9 +47914,8 @@ var DISTRIBUTION_FUNCTIONS = [
47914
47914
  )
47915
47915
  ];
47916
47916
 
47917
- // xlsx/formula/functions/text-convert.ts
47918
- var C37 = "Text";
47919
- var CP1252 = {
47917
+ // text/windows-1252.ts
47918
+ var WINDOWS_1252_HIGH = {
47920
47919
  128: 8364,
47921
47920
  130: 8218,
47922
47921
  131: 402,
@@ -47945,7 +47944,12 @@ var CP1252 = {
47945
47944
  158: 382,
47946
47945
  159: 376
47947
47946
  };
47948
- var CP1252_REVERSE = new Map(Object.entries(CP1252).map(([k, v]) => [v, Number(k)]));
47947
+ var REVERSE = new Map(Object.entries(WINDOWS_1252_HIGH).map(([code, char]) => [char, +code]));
47948
+ var windows1252CodePoint = (byte) => WINDOWS_1252_HIGH[byte] ?? byte;
47949
+ var windows1252HighByte = (codePoint) => REVERSE.get(codePoint);
47950
+
47951
+ // xlsx/formula/functions/text-convert.ts
47952
+ var C37 = "Text";
47949
47953
  function fixed(value2, decimals, commas) {
47950
47954
  const d = Math.trunc(decimals);
47951
47955
  const rounded = roundTo(value2, d, "half");
@@ -48033,13 +48037,13 @@ var TEXT_CONVERT = [
48033
48037
  spec("CHAR", C37, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
48034
48038
  const n = int3(args[0]);
48035
48039
  if (n < 1 || n > 255) fail(ERR.VALUE);
48036
- return String.fromCharCode(CP1252[n] ?? n);
48040
+ return String.fromCharCode(windows1252CodePoint(n));
48037
48041
  }),
48038
48042
  spec("CODE", C37, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
48039
48043
  const text = str(args[0]);
48040
48044
  if (text === "") fail(ERR.VALUE);
48041
48045
  const code = text.charCodeAt(0);
48042
- return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
48046
+ return windows1252HighByte(code) ?? (code <= 255 ? code : 63);
48043
48047
  }),
48044
48048
  spec("UNICHAR", C37, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
48045
48049
  const n = int3(args[0]);
@@ -47888,9 +47888,8 @@ var DISTRIBUTION_FUNCTIONS = [
47888
47888
  )
47889
47889
  ];
47890
47890
 
47891
- // xlsx/formula/functions/text-convert.ts
47892
- var C37 = "Text";
47893
- var CP1252 = {
47891
+ // text/windows-1252.ts
47892
+ var WINDOWS_1252_HIGH = {
47894
47893
  128: 8364,
47895
47894
  130: 8218,
47896
47895
  131: 402,
@@ -47919,7 +47918,12 @@ var CP1252 = {
47919
47918
  158: 382,
47920
47919
  159: 376
47921
47920
  };
47922
- var CP1252_REVERSE = new Map(Object.entries(CP1252).map(([k, v]) => [v, Number(k)]));
47921
+ var REVERSE = new Map(Object.entries(WINDOWS_1252_HIGH).map(([code, char]) => [char, +code]));
47922
+ var windows1252CodePoint = (byte) => WINDOWS_1252_HIGH[byte] ?? byte;
47923
+ var windows1252HighByte = (codePoint) => REVERSE.get(codePoint);
47924
+
47925
+ // xlsx/formula/functions/text-convert.ts
47926
+ var C37 = "Text";
47923
47927
  function fixed(value2, decimals, commas) {
47924
47928
  const d = Math.trunc(decimals);
47925
47929
  const rounded = roundTo(value2, d, "half");
@@ -48007,13 +48011,13 @@ var TEXT_CONVERT = [
48007
48011
  spec("CHAR", C37, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
48008
48012
  const n = int3(args[0]);
48009
48013
  if (n < 1 || n > 255) fail(ERR.VALUE);
48010
- return String.fromCharCode(CP1252[n] ?? n);
48014
+ return String.fromCharCode(windows1252CodePoint(n));
48011
48015
  }),
48012
48016
  spec("CODE", C37, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
48013
48017
  const text = str(args[0]);
48014
48018
  if (text === "") fail(ERR.VALUE);
48015
48019
  const code = text.charCodeAt(0);
48016
- return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
48020
+ return windows1252HighByte(code) ?? (code <= 255 ? code : 63);
48017
48021
  }),
48018
48022
  spec("UNICHAR", C37, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
48019
48023
  const n = int3(args[0]);
@@ -2,6 +2,7 @@ import type { CellStyle, Color } from '../model.js';
2
2
  import type { ClipboardCells } from './types.js';
3
3
  /** A CSS colour (`#rgb`, `#rrggbb`, `rgb()`, a basic name) as a model colour. */
4
4
  export declare function parseCssColor(text: string): Color | undefined;
5
+ /** Cell text keeps `&nbsp;` as an ordinary space, as Excel's own paste does. */
5
6
  export declare function decodeEntities(text: string): string;
6
7
  /**
7
8
  * Parses the first `<table>` of clipboard HTML (as Excel, Sheets or a browser write it) into
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard-html-parse.d.ts","sourceRoot":"","sources":["../../../xlsx/edit/clipboard-html-parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,SAAS,EAET,KAAK,EAIL,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAC;AAwB7D,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAkB7D;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOnD;AA2ID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAmExF;AAED,6EAA6E;AAC7E,eAAO,MAAM,cAAc,UAAY,CAAC;AACxC,eAAO,MAAM,cAAc,QAAS,CAAC;AACrC,eAAO,MAAM,eAAe,UAAY,CAAC"}
1
+ {"version":3,"file":"clipboard-html-parse.d.ts","sourceRoot":"","sources":["../../../xlsx/edit/clipboard-html-parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,SAAS,EAET,KAAK,EAIL,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAC;AAS7D,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAG7D;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AA2HD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAmExF;AAED,6EAA6E;AAC7E,eAAO,MAAM,cAAc,UAAY,CAAC;AACxC,eAAO,MAAM,cAAc,QAAS,CAAC;AACrC,eAAO,MAAM,eAAe,UAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"text-convert.d.ts","sourceRoot":"","sources":["../../../../xlsx/formula/functions/text-convert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAkD5C,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAAE,YAAY,EAmGtC,CAAC"}
1
+ {"version":3,"file":"text-convert.d.ts","sourceRoot":"","sources":["../../../../xlsx/formula/functions/text-convert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAkB5C,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAAE,YAAY,EAmGtC,CAAC"}
@@ -15438,9 +15438,8 @@ var DISTRIBUTION_FUNCTIONS = [
15438
15438
  )
15439
15439
  ];
15440
15440
 
15441
- // xlsx/formula/functions/text-convert.ts
15442
- var C36 = "Text";
15443
- var CP1252 = {
15441
+ // text/windows-1252.ts
15442
+ var WINDOWS_1252_HIGH = {
15444
15443
  128: 8364,
15445
15444
  130: 8218,
15446
15445
  131: 402,
@@ -15469,7 +15468,12 @@ var CP1252 = {
15469
15468
  158: 382,
15470
15469
  159: 376
15471
15470
  };
15472
- var CP1252_REVERSE = new Map(Object.entries(CP1252).map(([k, v]) => [v, Number(k)]));
15471
+ var REVERSE = new Map(Object.entries(WINDOWS_1252_HIGH).map(([code, char]) => [char, +code]));
15472
+ var windows1252CodePoint = (byte) => WINDOWS_1252_HIGH[byte] ?? byte;
15473
+ var windows1252HighByte = (codePoint2) => REVERSE.get(codePoint2);
15474
+
15475
+ // xlsx/formula/functions/text-convert.ts
15476
+ var C36 = "Text";
15473
15477
  function fixed(value2, decimals, commas) {
15474
15478
  const d = Math.trunc(decimals);
15475
15479
  const rounded = roundTo(value2, d, "half");
@@ -15557,13 +15561,13 @@ var TEXT_CONVERT = [
15557
15561
  spec("CHAR", C36, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
15558
15562
  const n2 = int(args[0]);
15559
15563
  if (n2 < 1 || n2 > 255) fail(ERR.VALUE);
15560
- return String.fromCharCode(CP1252[n2] ?? n2);
15564
+ return String.fromCharCode(windows1252CodePoint(n2));
15561
15565
  }),
15562
15566
  spec("CODE", C36, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
15563
15567
  const text3 = str(args[0]);
15564
15568
  if (text3 === "") fail(ERR.VALUE);
15565
15569
  const code = text3.charCodeAt(0);
15566
- return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
15570
+ return windows1252HighByte(code) ?? (code <= 255 ? code : 63);
15567
15571
  }),
15568
15572
  spec("UNICHAR", C36, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
15569
15573
  const n2 = int(args[0]);
@@ -61511,7 +61515,62 @@ function toHtml(cells, theme2) {
61511
61515
  return `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><meta charset="utf-8"></head><body><table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse">${rows2.join("")}</table></body></html>`;
61512
61516
  }
61513
61517
 
61514
- // xlsx/edit/clipboard-html-parse.ts
61518
+ // text/html-tokens.ts
61519
+ var ENTITIES2 = {
61520
+ amp: "&",
61521
+ lt: "<",
61522
+ gt: ">",
61523
+ quot: '"',
61524
+ apos: "'",
61525
+ nbsp: "\xA0",
61526
+ ensp: "\u2002",
61527
+ emsp: "\u2003",
61528
+ thinsp: "\u2009",
61529
+ ndash: "\u2013",
61530
+ mdash: "\u2014",
61531
+ lsquo: "\u2018",
61532
+ rsquo: "\u2019",
61533
+ ldquo: "\u201C",
61534
+ rdquo: "\u201D",
61535
+ bull: "\u2022",
61536
+ hellip: "\u2026",
61537
+ copy: "\xA9",
61538
+ reg: "\xAE",
61539
+ trade: "\u2122",
61540
+ euro: "\u20AC"
61541
+ };
61542
+ function codePoint(value2) {
61543
+ if (!Number.isFinite(value2) || value2 <= 0 || value2 > 1114111) return "\uFFFD";
61544
+ if (value2 >= 55296 && value2 <= 57343) return "\uFFFD";
61545
+ return String.fromCodePoint(value2);
61546
+ }
61547
+ function decodeHtmlEntities(text3) {
61548
+ return text3.replace(/&(#x[0-9a-f]{1,8}|#\d{1,10}|[a-z]{1,10});/gi, (whole, name) => {
61549
+ if (name[1] === "x" || name[1] === "X") return codePoint(parseInt(name.slice(2), 16));
61550
+ if (name.startsWith("#")) return codePoint(Number(name.slice(1)));
61551
+ return ENTITIES2[name.toLowerCase()] ?? whole;
61552
+ });
61553
+ }
61554
+ function parseHtmlAttributes(text3) {
61555
+ const attrs3 = /* @__PURE__ */ new Map();
61556
+ for (const m of text3.matchAll(
61557
+ /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
61558
+ ))
61559
+ attrs3.set((m[1] ?? "").toLowerCase(), decodeHtmlEntities(m[2] ?? m[3] ?? m[4] ?? ""));
61560
+ return attrs3;
61561
+ }
61562
+ function parseCssDeclarations(text3) {
61563
+ const out = /* @__PURE__ */ new Map();
61564
+ for (const decl of text3.split(";")) {
61565
+ const colon = decl.indexOf(":");
61566
+ if (colon < 0) continue;
61567
+ out.set(
61568
+ decl.slice(0, colon).trim().toLowerCase(),
61569
+ decl.slice(colon + 1).replace(/!important/gi, "").trim()
61570
+ );
61571
+ }
61572
+ return out;
61573
+ }
61515
61574
  var NAMED_COLORS2 = {
61516
61575
  black: "000000",
61517
61576
  white: "FFFFFF",
@@ -61530,56 +61589,42 @@ var NAMED_COLORS2 = {
61530
61589
  teal: "008080",
61531
61590
  olive: "808000",
61532
61591
  aqua: "00FFFF",
61533
- fuchsia: "FF00FF"
61592
+ cyan: "00FFFF",
61593
+ fuchsia: "FF00FF",
61594
+ magenta: "FF00FF",
61595
+ darkblue: "00008B",
61596
+ darkred: "8B0000",
61597
+ darkgreen: "006400",
61598
+ darkcyan: "008B8B",
61599
+ darkmagenta: "8B008B",
61600
+ darkgray: "A9A9A9",
61601
+ darkgrey: "A9A9A9",
61602
+ lightgray: "D3D3D3",
61603
+ lightgrey: "D3D3D3",
61604
+ darkyellow: "808000"
61534
61605
  };
61535
- function parseCssColor(text3) {
61606
+ function parseCssColorHex(text3) {
61536
61607
  const value2 = text3.trim().toLowerCase();
61537
61608
  const hex2 = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(value2)?.[1];
61538
- if (hex2)
61539
- return {
61540
- rgb: (hex2.length === 3 ? [...hex2].map((ch) => ch + ch).join("") : hex2).toUpperCase()
61541
- };
61542
- const rgb2 = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(value2);
61543
- if (rgb2)
61544
- return {
61545
- rgb: rgb2.slice(1, 4).map((n2) => Math.min(255, Number(n2)).toString(16).padStart(2, "0")).join("").toUpperCase()
61546
- };
61547
- const named2 = NAMED_COLORS2[value2];
61548
- return named2 ? { rgb: named2 } : void 0;
61549
- }
61550
- var ENTITIES2 = {
61551
- amp: "&",
61552
- lt: "<",
61553
- gt: ">",
61554
- quot: '"',
61555
- apos: "'",
61556
- nbsp: " "
61557
- };
61558
- function decodeEntities2(text3) {
61559
- return text3.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (whole, name) => {
61560
- if (name.startsWith("#x") || name.startsWith("#X"))
61561
- return String.fromCodePoint(parseInt(name.slice(2), 16));
61562
- if (name.startsWith("#")) return String.fromCodePoint(Number(name.slice(1)));
61563
- return ENTITIES2[name.toLowerCase()] ?? whole;
61564
- });
61609
+ if (hex2) return (hex2.length === 3 ? [...hex2].map((ch) => ch + ch).join("") : hex2).toUpperCase();
61610
+ const rgb2 = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?/.exec(value2);
61611
+ if (rgb2) {
61612
+ if (rgb2[4] !== void 0 && Number(rgb2[4]) === 0) return void 0;
61613
+ return rgb2.slice(1, 4).map((n2) => Math.min(255, Number(n2)).toString(16).padStart(2, "0")).join("").toUpperCase();
61614
+ }
61615
+ return NAMED_COLORS2[value2];
61565
61616
  }
61566
- function parseAttributes2(text3) {
61567
- const attrs3 = /* @__PURE__ */ new Map();
61568
- for (const m of text3.matchAll(
61569
- /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
61570
- ))
61571
- attrs3.set((m[1] ?? "").toLowerCase(), decodeEntities2(m[2] ?? m[3] ?? m[4] ?? ""));
61572
- return attrs3;
61617
+
61618
+ // xlsx/edit/clipboard-html-parse.ts
61619
+ function parseCssColor(text3) {
61620
+ const rgb2 = parseCssColorHex(text3);
61621
+ return rgb2 ? { rgb: rgb2 } : void 0;
61573
61622
  }
61574
- function parseCss(text3) {
61575
- const out = /* @__PURE__ */ new Map();
61576
- for (const decl of text3.split(";")) {
61577
- const colon = decl.indexOf(":");
61578
- if (colon < 0) continue;
61579
- out.set(decl.slice(0, colon).trim().toLowerCase(), decl.slice(colon + 1).trim());
61580
- }
61581
- return out;
61623
+ function decodeEntities2(text3) {
61624
+ return decodeHtmlEntities(text3.replace(/&nbsp;/gi, " "));
61582
61625
  }
61626
+ var parseAttributes2 = parseHtmlAttributes;
61627
+ var parseCss = parseCssDeclarations;
61583
61628
  function decodeNumberFormat(text3) {
61584
61629
  return text3.replace(/^["']|["']$/g, "").replace(/\\([0-9A-Fa-f]{4})/g, (_m, hex2) => String.fromCharCode(parseInt(hex2, 16))).replace(/\\(.)/g, "$1");
61585
61630
  }
@@ -15413,9 +15413,8 @@ var DISTRIBUTION_FUNCTIONS = [
15413
15413
  )
15414
15414
  ];
15415
15415
 
15416
- // xlsx/formula/functions/text-convert.ts
15417
- var C36 = "Text";
15418
- var CP1252 = {
15416
+ // text/windows-1252.ts
15417
+ var WINDOWS_1252_HIGH = {
15419
15418
  128: 8364,
15420
15419
  130: 8218,
15421
15420
  131: 402,
@@ -15444,7 +15443,12 @@ var CP1252 = {
15444
15443
  158: 382,
15445
15444
  159: 376
15446
15445
  };
15447
- var CP1252_REVERSE = new Map(Object.entries(CP1252).map(([k, v]) => [v, Number(k)]));
15446
+ var REVERSE = new Map(Object.entries(WINDOWS_1252_HIGH).map(([code, char]) => [char, +code]));
15447
+ var windows1252CodePoint = (byte) => WINDOWS_1252_HIGH[byte] ?? byte;
15448
+ var windows1252HighByte = (codePoint2) => REVERSE.get(codePoint2);
15449
+
15450
+ // xlsx/formula/functions/text-convert.ts
15451
+ var C36 = "Text";
15448
15452
  function fixed(value2, decimals, commas) {
15449
15453
  const d = Math.trunc(decimals);
15450
15454
  const rounded = roundTo(value2, d, "half");
@@ -15532,13 +15536,13 @@ var TEXT_CONVERT = [
15532
15536
  spec("CHAR", C36, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
15533
15537
  const n2 = int(args[0]);
15534
15538
  if (n2 < 1 || n2 > 255) fail(ERR.VALUE);
15535
- return String.fromCharCode(CP1252[n2] ?? n2);
15539
+ return String.fromCharCode(windows1252CodePoint(n2));
15536
15540
  }),
15537
15541
  spec("CODE", C36, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
15538
15542
  const text3 = str(args[0]);
15539
15543
  if (text3 === "") fail(ERR.VALUE);
15540
15544
  const code = text3.charCodeAt(0);
15541
- return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
15545
+ return windows1252HighByte(code) ?? (code <= 255 ? code : 63);
15542
15546
  }),
15543
15547
  spec("UNICHAR", C36, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
15544
15548
  const n2 = int(args[0]);
@@ -61486,7 +61490,62 @@ function toHtml(cells, theme2) {
61486
61490
  return `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><meta charset="utf-8"></head><body><table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse">${rows2.join("")}</table></body></html>`;
61487
61491
  }
61488
61492
 
61489
- // xlsx/edit/clipboard-html-parse.ts
61493
+ // text/html-tokens.ts
61494
+ var ENTITIES2 = {
61495
+ amp: "&",
61496
+ lt: "<",
61497
+ gt: ">",
61498
+ quot: '"',
61499
+ apos: "'",
61500
+ nbsp: "\xA0",
61501
+ ensp: "\u2002",
61502
+ emsp: "\u2003",
61503
+ thinsp: "\u2009",
61504
+ ndash: "\u2013",
61505
+ mdash: "\u2014",
61506
+ lsquo: "\u2018",
61507
+ rsquo: "\u2019",
61508
+ ldquo: "\u201C",
61509
+ rdquo: "\u201D",
61510
+ bull: "\u2022",
61511
+ hellip: "\u2026",
61512
+ copy: "\xA9",
61513
+ reg: "\xAE",
61514
+ trade: "\u2122",
61515
+ euro: "\u20AC"
61516
+ };
61517
+ function codePoint(value2) {
61518
+ if (!Number.isFinite(value2) || value2 <= 0 || value2 > 1114111) return "\uFFFD";
61519
+ if (value2 >= 55296 && value2 <= 57343) return "\uFFFD";
61520
+ return String.fromCodePoint(value2);
61521
+ }
61522
+ function decodeHtmlEntities(text3) {
61523
+ return text3.replace(/&(#x[0-9a-f]{1,8}|#\d{1,10}|[a-z]{1,10});/gi, (whole, name) => {
61524
+ if (name[1] === "x" || name[1] === "X") return codePoint(parseInt(name.slice(2), 16));
61525
+ if (name.startsWith("#")) return codePoint(Number(name.slice(1)));
61526
+ return ENTITIES2[name.toLowerCase()] ?? whole;
61527
+ });
61528
+ }
61529
+ function parseHtmlAttributes(text3) {
61530
+ const attrs3 = /* @__PURE__ */ new Map();
61531
+ for (const m of text3.matchAll(
61532
+ /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
61533
+ ))
61534
+ attrs3.set((m[1] ?? "").toLowerCase(), decodeHtmlEntities(m[2] ?? m[3] ?? m[4] ?? ""));
61535
+ return attrs3;
61536
+ }
61537
+ function parseCssDeclarations(text3) {
61538
+ const out = /* @__PURE__ */ new Map();
61539
+ for (const decl of text3.split(";")) {
61540
+ const colon = decl.indexOf(":");
61541
+ if (colon < 0) continue;
61542
+ out.set(
61543
+ decl.slice(0, colon).trim().toLowerCase(),
61544
+ decl.slice(colon + 1).replace(/!important/gi, "").trim()
61545
+ );
61546
+ }
61547
+ return out;
61548
+ }
61490
61549
  var NAMED_COLORS2 = {
61491
61550
  black: "000000",
61492
61551
  white: "FFFFFF",
@@ -61505,56 +61564,42 @@ var NAMED_COLORS2 = {
61505
61564
  teal: "008080",
61506
61565
  olive: "808000",
61507
61566
  aqua: "00FFFF",
61508
- fuchsia: "FF00FF"
61567
+ cyan: "00FFFF",
61568
+ fuchsia: "FF00FF",
61569
+ magenta: "FF00FF",
61570
+ darkblue: "00008B",
61571
+ darkred: "8B0000",
61572
+ darkgreen: "006400",
61573
+ darkcyan: "008B8B",
61574
+ darkmagenta: "8B008B",
61575
+ darkgray: "A9A9A9",
61576
+ darkgrey: "A9A9A9",
61577
+ lightgray: "D3D3D3",
61578
+ lightgrey: "D3D3D3",
61579
+ darkyellow: "808000"
61509
61580
  };
61510
- function parseCssColor(text3) {
61581
+ function parseCssColorHex(text3) {
61511
61582
  const value2 = text3.trim().toLowerCase();
61512
61583
  const hex2 = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(value2)?.[1];
61513
- if (hex2)
61514
- return {
61515
- rgb: (hex2.length === 3 ? [...hex2].map((ch) => ch + ch).join("") : hex2).toUpperCase()
61516
- };
61517
- const rgb2 = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(value2);
61518
- if (rgb2)
61519
- return {
61520
- rgb: rgb2.slice(1, 4).map((n2) => Math.min(255, Number(n2)).toString(16).padStart(2, "0")).join("").toUpperCase()
61521
- };
61522
- const named2 = NAMED_COLORS2[value2];
61523
- return named2 ? { rgb: named2 } : void 0;
61524
- }
61525
- var ENTITIES2 = {
61526
- amp: "&",
61527
- lt: "<",
61528
- gt: ">",
61529
- quot: '"',
61530
- apos: "'",
61531
- nbsp: " "
61532
- };
61533
- function decodeEntities2(text3) {
61534
- return text3.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (whole, name) => {
61535
- if (name.startsWith("#x") || name.startsWith("#X"))
61536
- return String.fromCodePoint(parseInt(name.slice(2), 16));
61537
- if (name.startsWith("#")) return String.fromCodePoint(Number(name.slice(1)));
61538
- return ENTITIES2[name.toLowerCase()] ?? whole;
61539
- });
61584
+ if (hex2) return (hex2.length === 3 ? [...hex2].map((ch) => ch + ch).join("") : hex2).toUpperCase();
61585
+ const rgb2 = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?/.exec(value2);
61586
+ if (rgb2) {
61587
+ if (rgb2[4] !== void 0 && Number(rgb2[4]) === 0) return void 0;
61588
+ return rgb2.slice(1, 4).map((n2) => Math.min(255, Number(n2)).toString(16).padStart(2, "0")).join("").toUpperCase();
61589
+ }
61590
+ return NAMED_COLORS2[value2];
61540
61591
  }
61541
- function parseAttributes2(text3) {
61542
- const attrs3 = /* @__PURE__ */ new Map();
61543
- for (const m of text3.matchAll(
61544
- /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
61545
- ))
61546
- attrs3.set((m[1] ?? "").toLowerCase(), decodeEntities2(m[2] ?? m[3] ?? m[4] ?? ""));
61547
- return attrs3;
61592
+
61593
+ // xlsx/edit/clipboard-html-parse.ts
61594
+ function parseCssColor(text3) {
61595
+ const rgb2 = parseCssColorHex(text3);
61596
+ return rgb2 ? { rgb: rgb2 } : void 0;
61548
61597
  }
61549
- function parseCss(text3) {
61550
- const out = /* @__PURE__ */ new Map();
61551
- for (const decl of text3.split(";")) {
61552
- const colon = decl.indexOf(":");
61553
- if (colon < 0) continue;
61554
- out.set(decl.slice(0, colon).trim().toLowerCase(), decl.slice(colon + 1).trim());
61555
- }
61556
- return out;
61598
+ function decodeEntities2(text3) {
61599
+ return decodeHtmlEntities(text3.replace(/&nbsp;/gi, " "));
61557
61600
  }
61601
+ var parseAttributes2 = parseHtmlAttributes;
61602
+ var parseCss = parseCssDeclarations;
61558
61603
  function decodeNumberFormat(text3) {
61559
61604
  return text3.replace(/^["']|["']$/g, "").replace(/\\([0-9A-Fa-f]{4})/g, (_m, hex2) => String.fromCharCode(parseInt(hex2, 16))).replace(/\\(.)/g, "$1");
61560
61605
  }
@@ -49422,9 +49422,8 @@ var DISTRIBUTION_FUNCTIONS = [
49422
49422
  )
49423
49423
  ];
49424
49424
 
49425
- // xlsx/formula/functions/text-convert.ts
49426
- var C37 = "Text";
49427
- var CP1252 = {
49425
+ // text/windows-1252.ts
49426
+ var WINDOWS_1252_HIGH = {
49428
49427
  128: 8364,
49429
49428
  130: 8218,
49430
49429
  131: 402,
@@ -49453,7 +49452,12 @@ var CP1252 = {
49453
49452
  158: 382,
49454
49453
  159: 376
49455
49454
  };
49456
- var CP1252_REVERSE = new Map(Object.entries(CP1252).map(([k, v]) => [v, Number(k)]));
49455
+ var REVERSE = new Map(Object.entries(WINDOWS_1252_HIGH).map(([code, char]) => [char, +code]));
49456
+ var windows1252CodePoint = (byte) => WINDOWS_1252_HIGH[byte] ?? byte;
49457
+ var windows1252HighByte = (codePoint) => REVERSE.get(codePoint);
49458
+
49459
+ // xlsx/formula/functions/text-convert.ts
49460
+ var C37 = "Text";
49457
49461
  function fixed(value2, decimals, commas) {
49458
49462
  const d = Math.trunc(decimals);
49459
49463
  const rounded = roundTo(value2, d, "half");
@@ -49541,13 +49545,13 @@ var TEXT_CONVERT = [
49541
49545
  spec("CHAR", C37, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
49542
49546
  const n = int3(args[0]);
49543
49547
  if (n < 1 || n > 255) fail(ERR.VALUE);
49544
- return String.fromCharCode(CP1252[n] ?? n);
49548
+ return String.fromCharCode(windows1252CodePoint(n));
49545
49549
  }),
49546
49550
  spec("CODE", C37, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
49547
49551
  const text = str(args[0]);
49548
49552
  if (text === "") fail(ERR.VALUE);
49549
49553
  const code = text.charCodeAt(0);
49550
- return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
49554
+ return windows1252HighByte(code) ?? (code <= 255 ? code : 63);
49551
49555
  }),
49552
49556
  spec("UNICHAR", C37, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
49553
49557
  const n = int3(args[0]);
@@ -49397,9 +49397,8 @@ var DISTRIBUTION_FUNCTIONS = [
49397
49397
  )
49398
49398
  ];
49399
49399
 
49400
- // xlsx/formula/functions/text-convert.ts
49401
- var C37 = "Text";
49402
- var CP1252 = {
49400
+ // text/windows-1252.ts
49401
+ var WINDOWS_1252_HIGH = {
49403
49402
  128: 8364,
49404
49403
  130: 8218,
49405
49404
  131: 402,
@@ -49428,7 +49427,12 @@ var CP1252 = {
49428
49427
  158: 382,
49429
49428
  159: 376
49430
49429
  };
49431
- var CP1252_REVERSE = new Map(Object.entries(CP1252).map(([k, v]) => [v, Number(k)]));
49430
+ var REVERSE = new Map(Object.entries(WINDOWS_1252_HIGH).map(([code, char]) => [char, +code]));
49431
+ var windows1252CodePoint = (byte) => WINDOWS_1252_HIGH[byte] ?? byte;
49432
+ var windows1252HighByte = (codePoint) => REVERSE.get(codePoint);
49433
+
49434
+ // xlsx/formula/functions/text-convert.ts
49435
+ var C37 = "Text";
49432
49436
  function fixed(value2, decimals, commas) {
49433
49437
  const d = Math.trunc(decimals);
49434
49438
  const rounded = roundTo(value2, d, "half");
@@ -49516,13 +49520,13 @@ var TEXT_CONVERT = [
49516
49520
  spec("CHAR", C37, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
49517
49521
  const n = int3(args[0]);
49518
49522
  if (n < 1 || n > 255) fail(ERR.VALUE);
49519
- return String.fromCharCode(CP1252[n] ?? n);
49523
+ return String.fromCharCode(windows1252CodePoint(n));
49520
49524
  }),
49521
49525
  spec("CODE", C37, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
49522
49526
  const text = str(args[0]);
49523
49527
  if (text === "") fail(ERR.VALUE);
49524
49528
  const code = text.charCodeAt(0);
49525
- return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
49529
+ return windows1252HighByte(code) ?? (code <= 255 ? code : 63);
49526
49530
  }),
49527
49531
  spec("UNICHAR", C37, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
49528
49532
  const n = int3(args[0]);