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,56 +1,56 @@
1
1
  'use strict';
2
2
 
3
3
  // text/unicode-script-detection.ts
4
- function detectFontScript(codePoint) {
5
- if (codePoint >= 11904 && codePoint <= 40959 || // CJK radicals, unified ideographs
6
- codePoint >= 44032 && codePoint <= 55215 || // Hangul syllables
7
- codePoint >= 63744 && codePoint <= 64255 || // CJK compatibility ideographs
8
- codePoint >= 65072 && codePoint <= 65103 || // CJK compatibility forms
9
- codePoint >= 131072 && codePoint <= 195103 || // CJK extension B-F
10
- codePoint >= 12288 && codePoint <= 12351 || // CJK symbols & punctuation
11
- codePoint >= 12352 && codePoint <= 12447 || // Hiragana
12
- codePoint >= 12448 && codePoint <= 12543 || // Katakana
13
- codePoint >= 12784 && codePoint <= 12799 || // Katakana extensions
14
- codePoint >= 65280 && codePoint <= 65519) {
4
+ function detectFontScript(codePoint2) {
5
+ if (codePoint2 >= 11904 && codePoint2 <= 40959 || // CJK radicals, unified ideographs
6
+ codePoint2 >= 44032 && codePoint2 <= 55215 || // Hangul syllables
7
+ codePoint2 >= 63744 && codePoint2 <= 64255 || // CJK compatibility ideographs
8
+ codePoint2 >= 65072 && codePoint2 <= 65103 || // CJK compatibility forms
9
+ codePoint2 >= 131072 && codePoint2 <= 195103 || // CJK extension B-F
10
+ codePoint2 >= 12288 && codePoint2 <= 12351 || // CJK symbols & punctuation
11
+ codePoint2 >= 12352 && codePoint2 <= 12447 || // Hiragana
12
+ codePoint2 >= 12448 && codePoint2 <= 12543 || // Katakana
13
+ codePoint2 >= 12784 && codePoint2 <= 12799 || // Katakana extensions
14
+ codePoint2 >= 65280 && codePoint2 <= 65519) {
15
15
  return "eastAsia";
16
16
  }
17
- if (codePoint >= 1424 && codePoint <= 1535 || // Hebrew
18
- codePoint >= 1536 && codePoint <= 1791 || // Arabic
19
- codePoint >= 1792 && codePoint <= 1871 || // Syriac
20
- codePoint >= 1872 && codePoint <= 1919 || // Arabic Supplement
21
- codePoint >= 1920 && codePoint <= 1983 || // Thaana
22
- codePoint >= 1984 && codePoint <= 2047 || // NKo
23
- codePoint >= 2048 && codePoint <= 2111 || // Samaritan
24
- codePoint >= 2304 && codePoint <= 2431 || // Devanagari
25
- codePoint >= 2432 && codePoint <= 2559 || // Bengali
26
- codePoint >= 2560 && codePoint <= 2687 || // Gurmukhi
27
- codePoint >= 2688 && codePoint <= 2815 || // Gujarati
28
- codePoint >= 2816 && codePoint <= 2943 || // Oriya
29
- codePoint >= 2944 && codePoint <= 3071 || // Tamil
30
- codePoint >= 3072 && codePoint <= 3199 || // Telugu
31
- codePoint >= 3200 && codePoint <= 3327 || // Kannada
32
- codePoint >= 3328 && codePoint <= 3455 || // Malayalam
33
- codePoint >= 3456 && codePoint <= 3583 || // Sinhala
34
- codePoint >= 3584 && codePoint <= 3711 || // Thai
35
- codePoint >= 3712 && codePoint <= 3839 || // Lao
36
- codePoint >= 3840 && codePoint <= 4095 || // Tibetan
37
- codePoint >= 4096 && codePoint <= 4255 || // Myanmar
38
- codePoint >= 4256 && codePoint <= 4351 || // Georgian
39
- codePoint >= 6016 && codePoint <= 6143 || // Khmer
40
- codePoint >= 64336 && codePoint <= 65023 || // Arabic Presentation Forms-A
41
- codePoint >= 65136 && codePoint <= 65279) {
17
+ if (codePoint2 >= 1424 && codePoint2 <= 1535 || // Hebrew
18
+ codePoint2 >= 1536 && codePoint2 <= 1791 || // Arabic
19
+ codePoint2 >= 1792 && codePoint2 <= 1871 || // Syriac
20
+ codePoint2 >= 1872 && codePoint2 <= 1919 || // Arabic Supplement
21
+ codePoint2 >= 1920 && codePoint2 <= 1983 || // Thaana
22
+ codePoint2 >= 1984 && codePoint2 <= 2047 || // NKo
23
+ codePoint2 >= 2048 && codePoint2 <= 2111 || // Samaritan
24
+ codePoint2 >= 2304 && codePoint2 <= 2431 || // Devanagari
25
+ codePoint2 >= 2432 && codePoint2 <= 2559 || // Bengali
26
+ codePoint2 >= 2560 && codePoint2 <= 2687 || // Gurmukhi
27
+ codePoint2 >= 2688 && codePoint2 <= 2815 || // Gujarati
28
+ codePoint2 >= 2816 && codePoint2 <= 2943 || // Oriya
29
+ codePoint2 >= 2944 && codePoint2 <= 3071 || // Tamil
30
+ codePoint2 >= 3072 && codePoint2 <= 3199 || // Telugu
31
+ codePoint2 >= 3200 && codePoint2 <= 3327 || // Kannada
32
+ codePoint2 >= 3328 && codePoint2 <= 3455 || // Malayalam
33
+ codePoint2 >= 3456 && codePoint2 <= 3583 || // Sinhala
34
+ codePoint2 >= 3584 && codePoint2 <= 3711 || // Thai
35
+ codePoint2 >= 3712 && codePoint2 <= 3839 || // Lao
36
+ codePoint2 >= 3840 && codePoint2 <= 4095 || // Tibetan
37
+ codePoint2 >= 4096 && codePoint2 <= 4255 || // Myanmar
38
+ codePoint2 >= 4256 && codePoint2 <= 4351 || // Georgian
39
+ codePoint2 >= 6016 && codePoint2 <= 6143 || // Khmer
40
+ codePoint2 >= 64336 && codePoint2 <= 65023 || // Arabic Presentation Forms-A
41
+ codePoint2 >= 65136 && codePoint2 <= 65279) {
42
42
  return "complexScript";
43
43
  }
44
- if (codePoint >= 8592 && codePoint <= 8703 || // Arrows
45
- codePoint >= 8704 && codePoint <= 8959 || // Mathematical operators
46
- codePoint >= 8960 && codePoint <= 9215 || // Misc technical
47
- codePoint >= 9472 && codePoint <= 9599 || // Box drawing
48
- codePoint >= 9600 && codePoint <= 9631 || // Block elements
49
- codePoint >= 9632 && codePoint <= 9727 || // Geometric shapes
50
- codePoint >= 9728 && codePoint <= 9983 || // Misc symbols
51
- codePoint >= 9984 && codePoint <= 10175 || // Dingbats
52
- codePoint >= 57344 && codePoint <= 63743 || // Private Use Area
53
- codePoint >= 126976 && codePoint <= 129535) {
44
+ if (codePoint2 >= 8592 && codePoint2 <= 8703 || // Arrows
45
+ codePoint2 >= 8704 && codePoint2 <= 8959 || // Mathematical operators
46
+ codePoint2 >= 8960 && codePoint2 <= 9215 || // Misc technical
47
+ codePoint2 >= 9472 && codePoint2 <= 9599 || // Box drawing
48
+ codePoint2 >= 9600 && codePoint2 <= 9631 || // Block elements
49
+ codePoint2 >= 9632 && codePoint2 <= 9727 || // Geometric shapes
50
+ codePoint2 >= 9728 && codePoint2 <= 9983 || // Misc symbols
51
+ codePoint2 >= 9984 && codePoint2 <= 10175 || // Dingbats
52
+ codePoint2 >= 57344 && codePoint2 <= 63743 || // Private Use Area
53
+ codePoint2 >= 126976 && codePoint2 <= 129535) {
54
54
  return "symbol";
55
55
  }
56
56
  return "latin";
@@ -64,14 +64,14 @@ function segmentByScript(text) {
64
64
  let currentStart = 0;
65
65
  let currentText = "";
66
66
  for (let i = 0; i < text.length; i++) {
67
- const codePoint = text.codePointAt(i);
68
- if (codePoint === void 0) {
67
+ const codePoint2 = text.codePointAt(i);
68
+ if (codePoint2 === void 0) {
69
69
  continue;
70
70
  }
71
- const charLength = codePoint > 65535 ? 2 : 1;
71
+ const charLength = codePoint2 > 65535 ? 2 : 1;
72
72
  const char = text.substring(i, i + charLength);
73
- const isNeutral = codePoint <= 127 && !/[a-zA-Z0-9]/u.test(char);
74
- const script = isNeutral ? currentScript ?? "latin" : detectFontScript(codePoint);
73
+ const isNeutral = codePoint2 <= 127 && !/[a-zA-Z0-9]/u.test(char);
74
+ const script = isNeutral ? currentScript ?? "latin" : detectFontScript(codePoint2);
75
75
  if (script !== currentScript && currentScript !== null) {
76
76
  runs.push({
77
77
  text: currentText,
@@ -279,16 +279,16 @@ function decimalSeparatorForLanguage(language) {
279
279
  }
280
280
  }
281
281
  function decimalAnchorIndex(text, separator) {
282
- const first = text.search(/[0-9]/u);
283
- if (first < 0) {
282
+ const first2 = text.search(/[0-9]/u);
283
+ if (first2 < 0) {
284
284
  return text.length;
285
285
  }
286
- let end = first;
286
+ let end = first2;
287
287
  while (end < text.length && /[0-9.,]/u.test(text.charAt(end))) {
288
288
  end++;
289
289
  }
290
- const sep = text.slice(first, end).indexOf(separator);
291
- return sep >= 0 ? first + sep : end;
290
+ const sep = text.slice(first2, end).indexOf(separator);
291
+ return sep >= 0 ? first2 + sep : end;
292
292
  }
293
293
 
294
294
  // text/wrap-styled-runs.ts
@@ -1092,13 +1092,113 @@ function distributeRunsText(oldTexts, newText) {
1092
1092
  return result;
1093
1093
  }
1094
1094
  function realignOrCollapseRuns(runs, text) {
1095
- const first = runs[0];
1096
- if (!first) return [];
1095
+ const first2 = runs[0];
1096
+ if (!first2) return [];
1097
1097
  const distributed = distributeRunsText(
1098
1098
  runs.map((run) => run.text),
1099
1099
  text
1100
1100
  );
1101
- return distributed ? runs.map((run, index) => ({ ...run, text: distributed[index] ?? "" })) : [{ ...first, text }];
1101
+ return distributed ? runs.map((run, index) => ({ ...run, text: distributed[index] ?? "" })) : [{ ...first2, text }];
1102
+ }
1103
+
1104
+ // text/east-asian.ts
1105
+ function isEastAsianChar(ch) {
1106
+ const cp = ch.codePointAt(0) ?? 0;
1107
+ return cp >= 4352 && cp <= 4607 || cp >= 11904 && cp <= 40959 || cp >= 43360 && cp <= 43391 || cp >= 44032 && cp <= 55295 || cp >= 63744 && cp <= 64255 || cp >= 65072 && cp <= 65103 || cp >= 65280 && cp <= 65519 || cp >= 131072 && cp <= 262143;
1108
+ }
1109
+ var EAST_ASIAN_LETTER = /^[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;
1110
+ var LETTER = /^\p{L}/u;
1111
+ var DIGIT = /^\p{Nd}/u;
1112
+ function isEastAsianLetter(grapheme) {
1113
+ return EAST_ASIAN_LETTER.test(grapheme);
1114
+ }
1115
+ function westernKind(grapheme) {
1116
+ if (!grapheme || isEastAsianChar(grapheme)) return void 0;
1117
+ if (DIGIT.test(grapheme)) return "digit";
1118
+ return LETTER.test(grapheme) ? "alpha" : void 0;
1119
+ }
1120
+ function eastAsianAutoSpace(before, after) {
1121
+ if (isEastAsianLetter(before)) return westernKind(after);
1122
+ if (isEastAsianLetter(after)) return westernKind(before);
1123
+ return void 0;
1124
+ }
1125
+ var AUTO_SPACE_EM = 0.25;
1126
+
1127
+ // text/kinsoku.ts
1128
+ var JAPANESE = {
1129
+ noStart: "!%),.:;?]}\xA2\xB0\u2019\u201D\u2030\u2032\u2033\u2103\u3001\u3002\u3005\u3009\u300B\u300D\u300F\u3011\u3015\u309B\u309C\u309D\u309E\u30FB\u30FD\u30FE\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF61\uFF63\uFF64\uFF65\uFF9E\uFF9F\uFFE0",
1130
+ noEnd: "$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFF62\uFFE1\uFFE5"
1131
+ };
1132
+ var JAPANESE_STRICT_EXTRA = "\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FC\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70";
1133
+ var DEFAULTS = {
1134
+ ja: JAPANESE,
1135
+ "zh-Hans": {
1136
+ noStart: "!%),.:;>?]}\xA2\xA8\xB0\xB7\u2015\u2016\u2019\u201D\u2026\u2030\u2032\u2033\u203A\u2103\u3001\u3002\u3003\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u301E\uFE36\uFE3A\uFE3E\uFE40\uFE44\uFE5A\uFE5C\uFE5E\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF40\uFF5C\uFF5D\uFF5E\uFFE0",
1137
+ noEnd: "$([{\xA3\xA5\xB7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFE5D\uFF04\uFF08\uFF0E\uFF3B\uFF5B\uFFE1\uFFE5"
1138
+ },
1139
+ "zh-Hant": {
1140
+ noStart: "!),.:;?]}\xA2\xB7\u2019\u201D\u2022\u2025\u2026\u2027\u2032\u3001\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u301E\uFE30\uFE31\uFE33\uFE34\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE4F\uFE50\uFE51\uFE52\uFE54\uFE55\uFE56\uFE57\uFE5A\uFE5C\uFE5E\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5C\uFF5D\uFF64",
1141
+ noEnd: "([{\xA3\xA5\u2018\u201C\u2035\u3008\u300A\u300C\u300E\u3010\u3014\u301D\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE59\uFE5B\uFE5D\uFF08\uFF5B"
1142
+ },
1143
+ ko: { noStart: "", noEnd: "" }
1144
+ };
1145
+ function kinsokuLanguage(tag2) {
1146
+ if (!tag2) return void 0;
1147
+ const lower = tag2.toLowerCase();
1148
+ const [primary] = lower.split(/[-_]/);
1149
+ if (primary === "ja") return "ja";
1150
+ if (primary === "ko") return "ko";
1151
+ if (primary !== "zh") return void 0;
1152
+ return /-(hant|tw|hk|mo)(-|$)/.test(lower) ? "zh-Hant" : "zh-Hans";
1153
+ }
1154
+ function kinsokuSets(language, settings = {}) {
1155
+ const base = DEFAULTS[language];
1156
+ const custom = (override) => override && kinsokuLanguage(override.language) === language ? override.chars : void 0;
1157
+ const strictExtra = settings.strict && language === "ja" ? JAPANESE_STRICT_EXTRA : "";
1158
+ return {
1159
+ noStart: custom(settings.noLineBreaksBefore) ?? base.noStart + strictExtra,
1160
+ noEnd: custom(settings.noLineBreaksAfter) ?? base.noEnd
1161
+ };
1162
+ }
1163
+ var first = (text) => String.fromCodePoint(text.codePointAt(0) ?? 0);
1164
+ function prohibitedAtLineStart(grapheme, sets) {
1165
+ return grapheme.length > 0 && sets.noStart.includes(first(grapheme));
1166
+ }
1167
+ function prohibitedAtLineEnd(grapheme, sets) {
1168
+ return grapheme.length > 0 && sets.noEnd.includes(first(grapheme));
1169
+ }
1170
+ var HANGING = {
1171
+ ja: ",.\u2019\u201D\u3001\u3002\u300D\u300F\u3011\uFF09\uFF0C\uFF0E\uFF3D\uFF5D\uFF61\uFF64",
1172
+ "zh-Hans": "!%),.:;>?]}\xA2\xB0\u2019\u201D\u2030\u2032\u2033\u2103\u3001\u3002\u3003\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u301E\uFE5A\uFE5C\uFE5E\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFFE0",
1173
+ "zh-Hant": "!),.:;?]}\u2019\u201D\u2032\u3001\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u301E\uFE5A\uFE5C\uFE5E\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",
1174
+ ko: ""
1175
+ };
1176
+ function hangsAtLineEnd(grapheme, language) {
1177
+ return grapheme.length > 0 && HANGING[language].includes(first(grapheme));
1178
+ }
1179
+
1180
+ // text/complex-breaks.ts
1181
+ function isComplexBreakChar(ch) {
1182
+ const cp = ch.codePointAt(0) ?? 0;
1183
+ return cp >= 3584 && cp <= 3839 || // Thai, Lao
1184
+ cp >= 4096 && cp <= 4255 || // Myanmar
1185
+ cp >= 6016 && cp <= 6143 || // Khmer
1186
+ cp >= 6624 && cp <= 6655 || // Khmer Symbols
1187
+ cp >= 43488 && cp <= 43519 || // Myanmar Extended-B
1188
+ cp >= 43616 && cp <= 43647;
1189
+ }
1190
+ function isLeadingVowel(cp) {
1191
+ return cp >= 3648 && cp <= 3652 || cp >= 3776 && cp <= 3780;
1192
+ }
1193
+ function isStacker(cp) {
1194
+ return cp === 6098 || cp === 4153;
1195
+ }
1196
+ function complexBreakAllowed(before, after) {
1197
+ if (!before || !after) return false;
1198
+ if (!isComplexBreakChar(before) || !isComplexBreakChar(after)) return false;
1199
+ const last = before.codePointAt(before.length - 1) ?? 0;
1200
+ const lead = before.codePointAt(0) ?? 0;
1201
+ return !(before.length === 1 && isLeadingVowel(lead)) && !isStacker(last);
1102
1202
  }
1103
1203
 
1104
1204
  // text/font-substitution-map.ts
@@ -1549,6 +1649,65 @@ function segmentByFont(text, fonts) {
1549
1649
  return result;
1550
1650
  }
1551
1651
 
1652
+ // text/truetype/embedding.ts
1653
+ var RESTRICTED = 2;
1654
+ var PREVIEW_PRINT = 4;
1655
+ var EDITABLE = 8;
1656
+ var NO_SUBSETTING = 256;
1657
+ var BITMAP_ONLY = 512;
1658
+ function embeddingPermission(fsType) {
1659
+ const licence = fsType & EDITABLE ? "editable" : fsType & PREVIEW_PRINT ? "preview-print" : fsType & RESTRICTED ? "restricted" : "installable";
1660
+ return {
1661
+ licence,
1662
+ noSubsetting: (fsType & NO_SUBSETTING) !== 0,
1663
+ bitmapOnly: (fsType & BITMAP_ONLY) !== 0
1664
+ };
1665
+ }
1666
+ function mayDisplayEmbeddedFont(permission) {
1667
+ return permission.licence !== "restricted";
1668
+ }
1669
+ function mayEmbedFontInEditableDocument(permission) {
1670
+ return (permission.licence === "installable" || permission.licence === "editable") && !permission.bitmapOnly;
1671
+ }
1672
+ function mayEmbedFontSubset(permission) {
1673
+ return mayDisplayEmbeddedFont(permission) && !permission.noSubsetting && !permission.bitmapOnly;
1674
+ }
1675
+ var SFNT_VERSIONS = /* @__PURE__ */ new Set([65536, 1330926671, 1953658213]);
1676
+ var TTC_TAG = 1953784678;
1677
+ var OS2_TAG = 1330851634;
1678
+ function readSfntFsType(data, header) {
1679
+ const byte = (offset) => header && offset < header.length ? header[offset] : data[offset];
1680
+ const u162 = (offset) => {
1681
+ const hi = byte(offset);
1682
+ const lo = byte(offset + 1);
1683
+ return hi === void 0 || lo === void 0 ? void 0 : hi << 8 | lo;
1684
+ };
1685
+ const u322 = (offset) => {
1686
+ const hi = u162(offset);
1687
+ const lo = u162(offset + 2);
1688
+ return hi === void 0 || lo === void 0 ? void 0 : hi * 65536 + lo;
1689
+ };
1690
+ let base = 0;
1691
+ if (u322(0) === TTC_TAG) {
1692
+ const first2 = u322(12);
1693
+ if (first2 === void 0) return void 0;
1694
+ base = first2;
1695
+ }
1696
+ const version = u322(base);
1697
+ if (version === void 0 || !SFNT_VERSIONS.has(version)) return void 0;
1698
+ const numTables = u162(base + 4) ?? 0;
1699
+ for (let i = 0; i < numTables; i++) {
1700
+ const record = base + 12 + i * 16;
1701
+ const tag2 = u322(record);
1702
+ if (tag2 === void 0) return void 0;
1703
+ if (tag2 === OS2_TAG) {
1704
+ const offset = u322(record + 8);
1705
+ return offset === void 0 ? void 0 : u162(offset + 8);
1706
+ }
1707
+ }
1708
+ return void 0;
1709
+ }
1710
+
1552
1711
  // text/truetype/parse.ts
1553
1712
  var u16 = (v, o) => o + 2 <= v.byteLength ? v.getUint16(o) : 0;
1554
1713
  var i16 = (v, o) => o + 2 <= v.byteLength ? v.getInt16(o) : 0;
@@ -3929,9 +4088,9 @@ function impliedStyle(typeface) {
3929
4088
  return cached;
3930
4089
  }
3931
4090
  function primaryFamily(familyOrList) {
3932
- const first = familyOrList.split(",")[0]?.trim() ?? "";
3933
- const quoted = /^(["'])(.*)\1$/u.exec(first);
3934
- return quoted ? (quoted[2] ?? "").replace(/\\(.)/gu, "$1") : first;
4091
+ const first2 = familyOrList.split(",")[0]?.trim() ?? "";
4092
+ const quoted = /^(["'])(.*)\1$/u.exec(first2);
4093
+ return quoted ? (quoted[2] ?? "").replace(/\\(.)/gu, "$1") : first2;
3935
4094
  }
3936
4095
  function resolveFontWeight(fontFamily, bold) {
3937
4096
  const implied = fontFamily ? impliedStyle(primaryFamily(fontFamily))?.weight : void 0;
@@ -4088,6 +4247,241 @@ function collectWebfontFaces(runs, candidates, options) {
4088
4247
  return { faces, unavailable };
4089
4248
  }
4090
4249
 
4250
+ // text/html-tokens.ts
4251
+ var ENTITIES = {
4252
+ amp: "&",
4253
+ lt: "<",
4254
+ gt: ">",
4255
+ quot: '"',
4256
+ apos: "'",
4257
+ nbsp: "\xA0",
4258
+ ensp: "\u2002",
4259
+ emsp: "\u2003",
4260
+ thinsp: "\u2009",
4261
+ ndash: "\u2013",
4262
+ mdash: "\u2014",
4263
+ lsquo: "\u2018",
4264
+ rsquo: "\u2019",
4265
+ ldquo: "\u201C",
4266
+ rdquo: "\u201D",
4267
+ bull: "\u2022",
4268
+ hellip: "\u2026",
4269
+ copy: "\xA9",
4270
+ reg: "\xAE",
4271
+ trade: "\u2122",
4272
+ euro: "\u20AC"
4273
+ };
4274
+ function codePoint(value) {
4275
+ if (!Number.isFinite(value) || value <= 0 || value > 1114111) return "\uFFFD";
4276
+ if (value >= 55296 && value <= 57343) return "\uFFFD";
4277
+ return String.fromCodePoint(value);
4278
+ }
4279
+ function decodeHtmlEntities(text) {
4280
+ return text.replace(/&(#x[0-9a-f]{1,8}|#\d{1,10}|[a-z]{1,10});/gi, (whole, name2) => {
4281
+ if (name2[1] === "x" || name2[1] === "X") return codePoint(parseInt(name2.slice(2), 16));
4282
+ if (name2.startsWith("#")) return codePoint(Number(name2.slice(1)));
4283
+ return ENTITIES[name2.toLowerCase()] ?? whole;
4284
+ });
4285
+ }
4286
+ function parseHtmlAttributes(text) {
4287
+ const attrs = /* @__PURE__ */ new Map();
4288
+ for (const m of text.matchAll(
4289
+ /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
4290
+ ))
4291
+ attrs.set((m[1] ?? "").toLowerCase(), decodeHtmlEntities(m[2] ?? m[3] ?? m[4] ?? ""));
4292
+ return attrs;
4293
+ }
4294
+ function parseCssDeclarations(text) {
4295
+ const out = /* @__PURE__ */ new Map();
4296
+ for (const decl of text.split(";")) {
4297
+ const colon = decl.indexOf(":");
4298
+ if (colon < 0) continue;
4299
+ out.set(
4300
+ decl.slice(0, colon).trim().toLowerCase(),
4301
+ decl.slice(colon + 1).replace(/!important/gi, "").trim()
4302
+ );
4303
+ }
4304
+ return out;
4305
+ }
4306
+ var NAMED_COLORS = {
4307
+ black: "000000",
4308
+ white: "FFFFFF",
4309
+ red: "FF0000",
4310
+ green: "008000",
4311
+ lime: "00FF00",
4312
+ blue: "0000FF",
4313
+ yellow: "FFFF00",
4314
+ orange: "FFA500",
4315
+ purple: "800080",
4316
+ gray: "808080",
4317
+ grey: "808080",
4318
+ silver: "C0C0C0",
4319
+ navy: "000080",
4320
+ maroon: "800000",
4321
+ teal: "008080",
4322
+ olive: "808000",
4323
+ aqua: "00FFFF",
4324
+ cyan: "00FFFF",
4325
+ fuchsia: "FF00FF",
4326
+ magenta: "FF00FF",
4327
+ darkblue: "00008B",
4328
+ darkred: "8B0000",
4329
+ darkgreen: "006400",
4330
+ darkcyan: "008B8B",
4331
+ darkmagenta: "8B008B",
4332
+ darkgray: "A9A9A9",
4333
+ darkgrey: "A9A9A9",
4334
+ lightgray: "D3D3D3",
4335
+ lightgrey: "D3D3D3",
4336
+ darkyellow: "808000"
4337
+ };
4338
+ function parseCssColorHex(text) {
4339
+ const value = text.trim().toLowerCase();
4340
+ const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(value)?.[1];
4341
+ if (hex) return (hex.length === 3 ? [...hex].map((ch) => ch + ch).join("") : hex).toUpperCase();
4342
+ const rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?/.exec(value);
4343
+ if (rgb) {
4344
+ if (rgb[4] !== void 0 && Number(rgb[4]) === 0) return void 0;
4345
+ return rgb.slice(1, 4).map((n) => Math.min(255, Number(n)).toString(16).padStart(2, "0")).join("").toUpperCase();
4346
+ }
4347
+ return NAMED_COLORS[value];
4348
+ }
4349
+ var MAX_TAG_LENGTH = 8192;
4350
+ var RAW_TEXT = /* @__PURE__ */ new Set([
4351
+ "script",
4352
+ "style",
4353
+ "textarea",
4354
+ "title",
4355
+ "xmp",
4356
+ "noscript",
4357
+ "template",
4358
+ "head",
4359
+ "xml",
4360
+ "svg",
4361
+ "math",
4362
+ "iframe",
4363
+ "object",
4364
+ "canvas",
4365
+ "select"
4366
+ ]);
4367
+ function htmlClipboardFragment(html) {
4368
+ const start = html.indexOf("<!--StartFragment-->");
4369
+ const end = html.indexOf("<!--EndFragment-->", start < 0 ? 0 : start);
4370
+ if (start >= 0 && end > start) return html.slice(start + "<!--StartFragment-->".length, end);
4371
+ const first2 = html.indexOf("<");
4372
+ return first2 > 0 && /^Version:\d/.test(html) ? html.slice(first2) : html;
4373
+ }
4374
+ function tagEnd(html, from) {
4375
+ let quote = "";
4376
+ const limit = Math.min(html.length, from + MAX_TAG_LENGTH);
4377
+ for (let i = from; i < limit; i++) {
4378
+ const ch = html[i];
4379
+ if (quote) {
4380
+ if (ch === quote) quote = "";
4381
+ } else if (ch === '"' || ch === "'") quote = ch;
4382
+ else if (ch === ">") return i;
4383
+ else if (ch === "<") return -1;
4384
+ }
4385
+ return -1;
4386
+ }
4387
+ function tokenizeHtml(html, maxTokens = Number.POSITIVE_INFINITY) {
4388
+ const tokens = [];
4389
+ let text = "";
4390
+ const flush = () => {
4391
+ if (text) tokens.push({ kind: "text", text: decodeHtmlEntities(text) });
4392
+ text = "";
4393
+ };
4394
+ let i = 0;
4395
+ while (i < html.length) {
4396
+ if (tokens.length >= maxTokens) {
4397
+ text += textWithoutTags(html.slice(i));
4398
+ break;
4399
+ }
4400
+ const lt = html.indexOf("<", i);
4401
+ if (lt < 0) {
4402
+ text += html.slice(i);
4403
+ break;
4404
+ }
4405
+ text += html.slice(i, lt);
4406
+ i = lt;
4407
+ if (html.startsWith("<!--", i)) {
4408
+ const close = html.indexOf("-->", i + 4);
4409
+ i = close < 0 ? html.length : close + 3;
4410
+ continue;
4411
+ }
4412
+ if (html.startsWith("<![", i)) {
4413
+ const close = html.indexOf("]>", i + 3);
4414
+ const body = html.slice(i + 3, close < 0 ? html.length : close).toLowerCase();
4415
+ flush();
4416
+ if (/^\s*if\b/.test(body))
4417
+ tokens.push({
4418
+ kind: "conditional",
4419
+ open: true,
4420
+ supportLists: body.includes("supportlists")
4421
+ });
4422
+ else if (/^\s*endif\b/.test(body))
4423
+ tokens.push({ kind: "conditional", open: false, supportLists: false });
4424
+ i = close < 0 ? html.length : close + 2;
4425
+ continue;
4426
+ }
4427
+ const next = html[i + 1] ?? "";
4428
+ if (next === "!" || next === "?") {
4429
+ const close = html.indexOf(">", i + 2);
4430
+ i = close < 0 ? html.length : close + 1;
4431
+ continue;
4432
+ }
4433
+ const closing = next === "/";
4434
+ const nameMatch = /^[a-zA-Z][\w:-]{0,63}/.exec(html.slice(i + (closing ? 2 : 1), i + 70));
4435
+ const end = nameMatch ? tagEnd(html, i + 1) : -1;
4436
+ if (!nameMatch || end < 0) {
4437
+ text += "<";
4438
+ i += 1;
4439
+ continue;
4440
+ }
4441
+ const name2 = nameMatch[0].toLowerCase();
4442
+ flush();
4443
+ if (closing) {
4444
+ tokens.push({ kind: "close", name: name2 });
4445
+ i = end + 1;
4446
+ continue;
4447
+ }
4448
+ const inner = html.slice(i + 1 + nameMatch[0].length, end);
4449
+ const selfClosing = inner.trimEnd().endsWith("/");
4450
+ i = end + 1;
4451
+ if (RAW_TEXT.has(name2)) {
4452
+ tokens.push({ kind: "text", text: "" });
4453
+ if (selfClosing) continue;
4454
+ const closer = new RegExp(`</${name2}`, "gi");
4455
+ closer.lastIndex = i;
4456
+ const found = closer.exec(html);
4457
+ const after = found ? html.indexOf(">", found.index) : -1;
4458
+ i = after < 0 ? html.length : after + 1;
4459
+ continue;
4460
+ }
4461
+ tokens.push({ kind: "open", name: name2, attrs: parseHtmlAttributes(inner), selfClosing });
4462
+ }
4463
+ flush();
4464
+ return tokens;
4465
+ }
4466
+ function textWithoutTags(html) {
4467
+ let out = "";
4468
+ let at = 0;
4469
+ for (let lt = html.indexOf("<"); lt >= 0; lt = html.indexOf("<", at)) {
4470
+ const gt = html.indexOf(">", lt + 1);
4471
+ if (gt < 0) break;
4472
+ const inner = html.indexOf("<", lt + 1);
4473
+ if (inner >= 0 && inner < gt) {
4474
+ out += html.slice(at, inner);
4475
+ at = inner;
4476
+ continue;
4477
+ }
4478
+ out += html.slice(at, lt);
4479
+ at = gt + 1;
4480
+ }
4481
+ return out + html.slice(at);
4482
+ }
4483
+
4484
+ exports.AUTO_SPACE_EM = AUTO_SPACE_EM;
4091
4485
  exports.FONT_SUBSTITUTION_MAP = FONT_SUBSTITUTION_MAP;
4092
4486
  exports.GOOGLE_FONTS_CATALOGUE_DATE = GOOGLE_FONTS_CATALOGUE_DATE;
4093
4487
  exports.GOOGLE_FONTS_CSS2_BASE = GOOGLE_FONTS_CSS2_BASE;
@@ -4109,11 +4503,15 @@ exports.changeTextCaseRanges = changeTextCaseRanges;
4109
4503
  exports.classifyPanose = classifyPanose;
4110
4504
  exports.collectRunFamilies = collectRunFamilies;
4111
4505
  exports.collectWebfontFaces = collectWebfontFaces;
4506
+ exports.complexBreakAllowed = complexBreakAllowed;
4112
4507
  exports.decimalAnchorIndex = decimalAnchorIndex;
4113
4508
  exports.decimalSeparatorForLanguage = decimalSeparatorForLanguage;
4509
+ exports.decodeHtmlEntities = decodeHtmlEntities;
4114
4510
  exports.designTextWidthEm = designTextWidthEm;
4115
4511
  exports.detectFontScript = detectFontScript;
4116
4512
  exports.distributeRunsText = distributeRunsText;
4513
+ exports.eastAsianAutoSpace = eastAsianAutoSpace;
4514
+ exports.embeddingPermission = embeddingPermission;
4117
4515
  exports.findGoogleFontsFamily = findGoogleFontsFamily;
4118
4516
  exports.findLookAlikeGoogleFontsFamily = findLookAlikeGoogleFontsFamily;
4119
4517
  exports.findMetricCompatibleGoogleFontsFamily = findMetricCompatibleGoogleFontsFamily;
@@ -4128,22 +4526,38 @@ exports.getLeaderStyles = getLeaderStyles;
4128
4526
  exports.getPanoseWeight = getPanoseWeight;
4129
4527
  exports.getSubstituteFontFamily = getSubstituteFontFamily;
4130
4528
  exports.getSubstituteFonts = getSubstituteFonts;
4529
+ exports.hangsAtLineEnd = hangsAtLineEnd;
4131
4530
  exports.hasDesignAdvances = hasDesignAdvances;
4132
4531
  exports.hasDirectSubstitution = hasDirectSubstitution;
4133
4532
  exports.hasDistinctScriptFonts = hasDistinctScriptFonts;
4533
+ exports.htmlClipboardFragment = htmlClipboardFragment;
4534
+ exports.isComplexBreakChar = isComplexBreakChar;
4535
+ exports.isEastAsianChar = isEastAsianChar;
4536
+ exports.isEastAsianLetter = isEastAsianLetter;
4537
+ exports.kinsokuLanguage = kinsokuLanguage;
4538
+ exports.kinsokuSets = kinsokuSets;
4134
4539
  exports.matchGoogleWebfontFragments = matchGoogleWebfontFragments;
4540
+ exports.mayDisplayEmbeddedFont = mayDisplayEmbeddedFont;
4541
+ exports.mayEmbedFontInEditableDocument = mayEmbedFontInEditableDocument;
4542
+ exports.mayEmbedFontSubset = mayEmbedFontSubset;
4135
4543
  exports.mergeTextThreeWay = mergeTextThreeWay;
4136
4544
  exports.metricFontFamily = metricFontFamily;
4137
4545
  exports.namedFontVerticalMetrics = namedFontVerticalMetrics;
4138
4546
  exports.normalizeGoogleFontsBaseUrl = normalizeGoogleFontsBaseUrl;
4139
4547
  exports.officeFontVerticalMetrics = officeFontVerticalMetrics;
4140
4548
  exports.ooxmlDateTimeFieldPicture = ooxmlDateTimeFieldPicture;
4549
+ exports.parseCssColorHex = parseCssColorHex;
4550
+ exports.parseCssDeclarations = parseCssDeclarations;
4141
4551
  exports.parseFontWeightName = parseFontWeightName;
4552
+ exports.parseHtmlAttributes = parseHtmlAttributes;
4142
4553
  exports.parseLocaleNumber = parseLocaleNumber;
4143
4554
  exports.parsePanoseBytes = parsePanoseBytes;
4144
4555
  exports.parsePanoseString = parsePanoseString;
4145
4556
  exports.parseTrueType = parseTrueType;
4146
4557
  exports.parseTsv = parseTsv;
4558
+ exports.prohibitedAtLineEnd = prohibitedAtLineEnd;
4559
+ exports.prohibitedAtLineStart = prohibitedAtLineStart;
4560
+ exports.readSfntFsType = readSfntFsType;
4147
4561
  exports.realignOrCollapseRuns = realignOrCollapseRuns;
4148
4562
  exports.resolveFontForScript = resolveFontForScript;
4149
4563
  exports.resolveFontItalic = resolveFontItalic;
@@ -4158,4 +4572,5 @@ exports.servedGoogleFontsFamily = servedGoogleFontsFamily;
4158
4572
  exports.stripFontStyleSuffix = stripFontStyleSuffix;
4159
4573
  exports.subsetTrueType = subsetTrueType;
4160
4574
  exports.toTsv = toTsv;
4575
+ exports.tokenizeHtml = tokenizeHtml;
4161
4576
  exports.wrapStyledRuns = wrapStyledRuns;
@@ -11,10 +11,15 @@ export * from './font-metrics/vertical-metrics.js';
11
11
  export { parseTsv, toTsv } from './tsv.js';
12
12
  export * from './locale-number.js';
13
13
  export * from './realign-runs.js';
14
+ export * from './east-asian.js';
15
+ export * from './kinsoku.js';
16
+ export * from './complex-breaks.js';
14
17
  export * from './font-substitution.js';
15
18
  export * from './metric-font-family.js';
16
19
  export * from './script-fonts.js';
20
+ export * from './truetype/embedding.js';
17
21
  export { parseTrueType, type TrueTypeFont } from './truetype/parse.js';
18
22
  export { subsetTrueType, type TrueTypeSubset } from './truetype/subset.js';
19
23
  export * from './webfonts/index.js';
24
+ export { decodeHtmlEntities, htmlClipboardFragment, parseCssColorHex, parseCssDeclarations, parseHtmlAttributes, tokenizeHtml, type HtmlToken, } from './html-tokens.js';
20
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../text/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACd,MAAM,4BAA4B,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../text/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACd,MAAM,4BAA4B,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,cAAc,YAAY,CAAC;AAC3B,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,KAAK,SAAS,GACd,MAAM,eAAe,CAAC"}