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,54 +1,54 @@
1
1
  // text/unicode-script-detection.ts
2
- function detectFontScript(codePoint) {
3
- if (codePoint >= 11904 && codePoint <= 40959 || // CJK radicals, unified ideographs
4
- codePoint >= 44032 && codePoint <= 55215 || // Hangul syllables
5
- codePoint >= 63744 && codePoint <= 64255 || // CJK compatibility ideographs
6
- codePoint >= 65072 && codePoint <= 65103 || // CJK compatibility forms
7
- codePoint >= 131072 && codePoint <= 195103 || // CJK extension B-F
8
- codePoint >= 12288 && codePoint <= 12351 || // CJK symbols & punctuation
9
- codePoint >= 12352 && codePoint <= 12447 || // Hiragana
10
- codePoint >= 12448 && codePoint <= 12543 || // Katakana
11
- codePoint >= 12784 && codePoint <= 12799 || // Katakana extensions
12
- codePoint >= 65280 && codePoint <= 65519) {
2
+ function detectFontScript(codePoint2) {
3
+ if (codePoint2 >= 11904 && codePoint2 <= 40959 || // CJK radicals, unified ideographs
4
+ codePoint2 >= 44032 && codePoint2 <= 55215 || // Hangul syllables
5
+ codePoint2 >= 63744 && codePoint2 <= 64255 || // CJK compatibility ideographs
6
+ codePoint2 >= 65072 && codePoint2 <= 65103 || // CJK compatibility forms
7
+ codePoint2 >= 131072 && codePoint2 <= 195103 || // CJK extension B-F
8
+ codePoint2 >= 12288 && codePoint2 <= 12351 || // CJK symbols & punctuation
9
+ codePoint2 >= 12352 && codePoint2 <= 12447 || // Hiragana
10
+ codePoint2 >= 12448 && codePoint2 <= 12543 || // Katakana
11
+ codePoint2 >= 12784 && codePoint2 <= 12799 || // Katakana extensions
12
+ codePoint2 >= 65280 && codePoint2 <= 65519) {
13
13
  return "eastAsia";
14
14
  }
15
- if (codePoint >= 1424 && codePoint <= 1535 || // Hebrew
16
- codePoint >= 1536 && codePoint <= 1791 || // Arabic
17
- codePoint >= 1792 && codePoint <= 1871 || // Syriac
18
- codePoint >= 1872 && codePoint <= 1919 || // Arabic Supplement
19
- codePoint >= 1920 && codePoint <= 1983 || // Thaana
20
- codePoint >= 1984 && codePoint <= 2047 || // NKo
21
- codePoint >= 2048 && codePoint <= 2111 || // Samaritan
22
- codePoint >= 2304 && codePoint <= 2431 || // Devanagari
23
- codePoint >= 2432 && codePoint <= 2559 || // Bengali
24
- codePoint >= 2560 && codePoint <= 2687 || // Gurmukhi
25
- codePoint >= 2688 && codePoint <= 2815 || // Gujarati
26
- codePoint >= 2816 && codePoint <= 2943 || // Oriya
27
- codePoint >= 2944 && codePoint <= 3071 || // Tamil
28
- codePoint >= 3072 && codePoint <= 3199 || // Telugu
29
- codePoint >= 3200 && codePoint <= 3327 || // Kannada
30
- codePoint >= 3328 && codePoint <= 3455 || // Malayalam
31
- codePoint >= 3456 && codePoint <= 3583 || // Sinhala
32
- codePoint >= 3584 && codePoint <= 3711 || // Thai
33
- codePoint >= 3712 && codePoint <= 3839 || // Lao
34
- codePoint >= 3840 && codePoint <= 4095 || // Tibetan
35
- codePoint >= 4096 && codePoint <= 4255 || // Myanmar
36
- codePoint >= 4256 && codePoint <= 4351 || // Georgian
37
- codePoint >= 6016 && codePoint <= 6143 || // Khmer
38
- codePoint >= 64336 && codePoint <= 65023 || // Arabic Presentation Forms-A
39
- codePoint >= 65136 && codePoint <= 65279) {
15
+ if (codePoint2 >= 1424 && codePoint2 <= 1535 || // Hebrew
16
+ codePoint2 >= 1536 && codePoint2 <= 1791 || // Arabic
17
+ codePoint2 >= 1792 && codePoint2 <= 1871 || // Syriac
18
+ codePoint2 >= 1872 && codePoint2 <= 1919 || // Arabic Supplement
19
+ codePoint2 >= 1920 && codePoint2 <= 1983 || // Thaana
20
+ codePoint2 >= 1984 && codePoint2 <= 2047 || // NKo
21
+ codePoint2 >= 2048 && codePoint2 <= 2111 || // Samaritan
22
+ codePoint2 >= 2304 && codePoint2 <= 2431 || // Devanagari
23
+ codePoint2 >= 2432 && codePoint2 <= 2559 || // Bengali
24
+ codePoint2 >= 2560 && codePoint2 <= 2687 || // Gurmukhi
25
+ codePoint2 >= 2688 && codePoint2 <= 2815 || // Gujarati
26
+ codePoint2 >= 2816 && codePoint2 <= 2943 || // Oriya
27
+ codePoint2 >= 2944 && codePoint2 <= 3071 || // Tamil
28
+ codePoint2 >= 3072 && codePoint2 <= 3199 || // Telugu
29
+ codePoint2 >= 3200 && codePoint2 <= 3327 || // Kannada
30
+ codePoint2 >= 3328 && codePoint2 <= 3455 || // Malayalam
31
+ codePoint2 >= 3456 && codePoint2 <= 3583 || // Sinhala
32
+ codePoint2 >= 3584 && codePoint2 <= 3711 || // Thai
33
+ codePoint2 >= 3712 && codePoint2 <= 3839 || // Lao
34
+ codePoint2 >= 3840 && codePoint2 <= 4095 || // Tibetan
35
+ codePoint2 >= 4096 && codePoint2 <= 4255 || // Myanmar
36
+ codePoint2 >= 4256 && codePoint2 <= 4351 || // Georgian
37
+ codePoint2 >= 6016 && codePoint2 <= 6143 || // Khmer
38
+ codePoint2 >= 64336 && codePoint2 <= 65023 || // Arabic Presentation Forms-A
39
+ codePoint2 >= 65136 && codePoint2 <= 65279) {
40
40
  return "complexScript";
41
41
  }
42
- if (codePoint >= 8592 && codePoint <= 8703 || // Arrows
43
- codePoint >= 8704 && codePoint <= 8959 || // Mathematical operators
44
- codePoint >= 8960 && codePoint <= 9215 || // Misc technical
45
- codePoint >= 9472 && codePoint <= 9599 || // Box drawing
46
- codePoint >= 9600 && codePoint <= 9631 || // Block elements
47
- codePoint >= 9632 && codePoint <= 9727 || // Geometric shapes
48
- codePoint >= 9728 && codePoint <= 9983 || // Misc symbols
49
- codePoint >= 9984 && codePoint <= 10175 || // Dingbats
50
- codePoint >= 57344 && codePoint <= 63743 || // Private Use Area
51
- codePoint >= 126976 && codePoint <= 129535) {
42
+ if (codePoint2 >= 8592 && codePoint2 <= 8703 || // Arrows
43
+ codePoint2 >= 8704 && codePoint2 <= 8959 || // Mathematical operators
44
+ codePoint2 >= 8960 && codePoint2 <= 9215 || // Misc technical
45
+ codePoint2 >= 9472 && codePoint2 <= 9599 || // Box drawing
46
+ codePoint2 >= 9600 && codePoint2 <= 9631 || // Block elements
47
+ codePoint2 >= 9632 && codePoint2 <= 9727 || // Geometric shapes
48
+ codePoint2 >= 9728 && codePoint2 <= 9983 || // Misc symbols
49
+ codePoint2 >= 9984 && codePoint2 <= 10175 || // Dingbats
50
+ codePoint2 >= 57344 && codePoint2 <= 63743 || // Private Use Area
51
+ codePoint2 >= 126976 && codePoint2 <= 129535) {
52
52
  return "symbol";
53
53
  }
54
54
  return "latin";
@@ -62,14 +62,14 @@ function segmentByScript(text) {
62
62
  let currentStart = 0;
63
63
  let currentText = "";
64
64
  for (let i = 0; i < text.length; i++) {
65
- const codePoint = text.codePointAt(i);
66
- if (codePoint === void 0) {
65
+ const codePoint2 = text.codePointAt(i);
66
+ if (codePoint2 === void 0) {
67
67
  continue;
68
68
  }
69
- const charLength = codePoint > 65535 ? 2 : 1;
69
+ const charLength = codePoint2 > 65535 ? 2 : 1;
70
70
  const char = text.substring(i, i + charLength);
71
- const isNeutral = codePoint <= 127 && !/[a-zA-Z0-9]/u.test(char);
72
- const script = isNeutral ? currentScript ?? "latin" : detectFontScript(codePoint);
71
+ const isNeutral = codePoint2 <= 127 && !/[a-zA-Z0-9]/u.test(char);
72
+ const script = isNeutral ? currentScript ?? "latin" : detectFontScript(codePoint2);
73
73
  if (script !== currentScript && currentScript !== null) {
74
74
  runs.push({
75
75
  text: currentText,
@@ -277,16 +277,16 @@ function decimalSeparatorForLanguage(language) {
277
277
  }
278
278
  }
279
279
  function decimalAnchorIndex(text, separator) {
280
- const first = text.search(/[0-9]/u);
281
- if (first < 0) {
280
+ const first2 = text.search(/[0-9]/u);
281
+ if (first2 < 0) {
282
282
  return text.length;
283
283
  }
284
- let end = first;
284
+ let end = first2;
285
285
  while (end < text.length && /[0-9.,]/u.test(text.charAt(end))) {
286
286
  end++;
287
287
  }
288
- const sep = text.slice(first, end).indexOf(separator);
289
- return sep >= 0 ? first + sep : end;
288
+ const sep = text.slice(first2, end).indexOf(separator);
289
+ return sep >= 0 ? first2 + sep : end;
290
290
  }
291
291
 
292
292
  // text/wrap-styled-runs.ts
@@ -1090,13 +1090,113 @@ function distributeRunsText(oldTexts, newText) {
1090
1090
  return result;
1091
1091
  }
1092
1092
  function realignOrCollapseRuns(runs, text) {
1093
- const first = runs[0];
1094
- if (!first) return [];
1093
+ const first2 = runs[0];
1094
+ if (!first2) return [];
1095
1095
  const distributed = distributeRunsText(
1096
1096
  runs.map((run) => run.text),
1097
1097
  text
1098
1098
  );
1099
- return distributed ? runs.map((run, index) => ({ ...run, text: distributed[index] ?? "" })) : [{ ...first, text }];
1099
+ return distributed ? runs.map((run, index) => ({ ...run, text: distributed[index] ?? "" })) : [{ ...first2, text }];
1100
+ }
1101
+
1102
+ // text/east-asian.ts
1103
+ function isEastAsianChar(ch) {
1104
+ const cp = ch.codePointAt(0) ?? 0;
1105
+ 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;
1106
+ }
1107
+ var EAST_ASIAN_LETTER = /^[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;
1108
+ var LETTER = /^\p{L}/u;
1109
+ var DIGIT = /^\p{Nd}/u;
1110
+ function isEastAsianLetter(grapheme) {
1111
+ return EAST_ASIAN_LETTER.test(grapheme);
1112
+ }
1113
+ function westernKind(grapheme) {
1114
+ if (!grapheme || isEastAsianChar(grapheme)) return void 0;
1115
+ if (DIGIT.test(grapheme)) return "digit";
1116
+ return LETTER.test(grapheme) ? "alpha" : void 0;
1117
+ }
1118
+ function eastAsianAutoSpace(before, after) {
1119
+ if (isEastAsianLetter(before)) return westernKind(after);
1120
+ if (isEastAsianLetter(after)) return westernKind(before);
1121
+ return void 0;
1122
+ }
1123
+ var AUTO_SPACE_EM = 0.25;
1124
+
1125
+ // text/kinsoku.ts
1126
+ var JAPANESE = {
1127
+ 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",
1128
+ noEnd: "$([\\{\xA3\xA5\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF04\uFF08\uFF3B\uFF5B\uFF62\uFFE1\uFFE5"
1129
+ };
1130
+ 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";
1131
+ var DEFAULTS = {
1132
+ ja: JAPANESE,
1133
+ "zh-Hans": {
1134
+ 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",
1135
+ noEnd: "$([{\xA3\xA5\xB7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFE5D\uFF04\uFF08\uFF0E\uFF3B\uFF5B\uFFE1\uFFE5"
1136
+ },
1137
+ "zh-Hant": {
1138
+ 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",
1139
+ 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"
1140
+ },
1141
+ ko: { noStart: "", noEnd: "" }
1142
+ };
1143
+ function kinsokuLanguage(tag2) {
1144
+ if (!tag2) return void 0;
1145
+ const lower = tag2.toLowerCase();
1146
+ const [primary] = lower.split(/[-_]/);
1147
+ if (primary === "ja") return "ja";
1148
+ if (primary === "ko") return "ko";
1149
+ if (primary !== "zh") return void 0;
1150
+ return /-(hant|tw|hk|mo)(-|$)/.test(lower) ? "zh-Hant" : "zh-Hans";
1151
+ }
1152
+ function kinsokuSets(language, settings = {}) {
1153
+ const base = DEFAULTS[language];
1154
+ const custom = (override) => override && kinsokuLanguage(override.language) === language ? override.chars : void 0;
1155
+ const strictExtra = settings.strict && language === "ja" ? JAPANESE_STRICT_EXTRA : "";
1156
+ return {
1157
+ noStart: custom(settings.noLineBreaksBefore) ?? base.noStart + strictExtra,
1158
+ noEnd: custom(settings.noLineBreaksAfter) ?? base.noEnd
1159
+ };
1160
+ }
1161
+ var first = (text) => String.fromCodePoint(text.codePointAt(0) ?? 0);
1162
+ function prohibitedAtLineStart(grapheme, sets) {
1163
+ return grapheme.length > 0 && sets.noStart.includes(first(grapheme));
1164
+ }
1165
+ function prohibitedAtLineEnd(grapheme, sets) {
1166
+ return grapheme.length > 0 && sets.noEnd.includes(first(grapheme));
1167
+ }
1168
+ var HANGING = {
1169
+ ja: ",.\u2019\u201D\u3001\u3002\u300D\u300F\u3011\uFF09\uFF0C\uFF0E\uFF3D\uFF5D\uFF61\uFF64",
1170
+ "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",
1171
+ "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",
1172
+ ko: ""
1173
+ };
1174
+ function hangsAtLineEnd(grapheme, language) {
1175
+ return grapheme.length > 0 && HANGING[language].includes(first(grapheme));
1176
+ }
1177
+
1178
+ // text/complex-breaks.ts
1179
+ function isComplexBreakChar(ch) {
1180
+ const cp = ch.codePointAt(0) ?? 0;
1181
+ return cp >= 3584 && cp <= 3839 || // Thai, Lao
1182
+ cp >= 4096 && cp <= 4255 || // Myanmar
1183
+ cp >= 6016 && cp <= 6143 || // Khmer
1184
+ cp >= 6624 && cp <= 6655 || // Khmer Symbols
1185
+ cp >= 43488 && cp <= 43519 || // Myanmar Extended-B
1186
+ cp >= 43616 && cp <= 43647;
1187
+ }
1188
+ function isLeadingVowel(cp) {
1189
+ return cp >= 3648 && cp <= 3652 || cp >= 3776 && cp <= 3780;
1190
+ }
1191
+ function isStacker(cp) {
1192
+ return cp === 6098 || cp === 4153;
1193
+ }
1194
+ function complexBreakAllowed(before, after) {
1195
+ if (!before || !after) return false;
1196
+ if (!isComplexBreakChar(before) || !isComplexBreakChar(after)) return false;
1197
+ const last = before.codePointAt(before.length - 1) ?? 0;
1198
+ const lead = before.codePointAt(0) ?? 0;
1199
+ return !(before.length === 1 && isLeadingVowel(lead)) && !isStacker(last);
1100
1200
  }
1101
1201
 
1102
1202
  // text/font-substitution-map.ts
@@ -1547,6 +1647,65 @@ function segmentByFont(text, fonts) {
1547
1647
  return result;
1548
1648
  }
1549
1649
 
1650
+ // text/truetype/embedding.ts
1651
+ var RESTRICTED = 2;
1652
+ var PREVIEW_PRINT = 4;
1653
+ var EDITABLE = 8;
1654
+ var NO_SUBSETTING = 256;
1655
+ var BITMAP_ONLY = 512;
1656
+ function embeddingPermission(fsType) {
1657
+ const licence = fsType & EDITABLE ? "editable" : fsType & PREVIEW_PRINT ? "preview-print" : fsType & RESTRICTED ? "restricted" : "installable";
1658
+ return {
1659
+ licence,
1660
+ noSubsetting: (fsType & NO_SUBSETTING) !== 0,
1661
+ bitmapOnly: (fsType & BITMAP_ONLY) !== 0
1662
+ };
1663
+ }
1664
+ function mayDisplayEmbeddedFont(permission) {
1665
+ return permission.licence !== "restricted";
1666
+ }
1667
+ function mayEmbedFontInEditableDocument(permission) {
1668
+ return (permission.licence === "installable" || permission.licence === "editable") && !permission.bitmapOnly;
1669
+ }
1670
+ function mayEmbedFontSubset(permission) {
1671
+ return mayDisplayEmbeddedFont(permission) && !permission.noSubsetting && !permission.bitmapOnly;
1672
+ }
1673
+ var SFNT_VERSIONS = /* @__PURE__ */ new Set([65536, 1330926671, 1953658213]);
1674
+ var TTC_TAG = 1953784678;
1675
+ var OS2_TAG = 1330851634;
1676
+ function readSfntFsType(data, header) {
1677
+ const byte = (offset) => header && offset < header.length ? header[offset] : data[offset];
1678
+ const u162 = (offset) => {
1679
+ const hi = byte(offset);
1680
+ const lo = byte(offset + 1);
1681
+ return hi === void 0 || lo === void 0 ? void 0 : hi << 8 | lo;
1682
+ };
1683
+ const u322 = (offset) => {
1684
+ const hi = u162(offset);
1685
+ const lo = u162(offset + 2);
1686
+ return hi === void 0 || lo === void 0 ? void 0 : hi * 65536 + lo;
1687
+ };
1688
+ let base = 0;
1689
+ if (u322(0) === TTC_TAG) {
1690
+ const first2 = u322(12);
1691
+ if (first2 === void 0) return void 0;
1692
+ base = first2;
1693
+ }
1694
+ const version = u322(base);
1695
+ if (version === void 0 || !SFNT_VERSIONS.has(version)) return void 0;
1696
+ const numTables = u162(base + 4) ?? 0;
1697
+ for (let i = 0; i < numTables; i++) {
1698
+ const record = base + 12 + i * 16;
1699
+ const tag2 = u322(record);
1700
+ if (tag2 === void 0) return void 0;
1701
+ if (tag2 === OS2_TAG) {
1702
+ const offset = u322(record + 8);
1703
+ return offset === void 0 ? void 0 : u162(offset + 8);
1704
+ }
1705
+ }
1706
+ return void 0;
1707
+ }
1708
+
1550
1709
  // text/truetype/parse.ts
1551
1710
  var u16 = (v, o) => o + 2 <= v.byteLength ? v.getUint16(o) : 0;
1552
1711
  var i16 = (v, o) => o + 2 <= v.byteLength ? v.getInt16(o) : 0;
@@ -3927,9 +4086,9 @@ function impliedStyle(typeface) {
3927
4086
  return cached;
3928
4087
  }
3929
4088
  function primaryFamily(familyOrList) {
3930
- const first = familyOrList.split(",")[0]?.trim() ?? "";
3931
- const quoted = /^(["'])(.*)\1$/u.exec(first);
3932
- return quoted ? (quoted[2] ?? "").replace(/\\(.)/gu, "$1") : first;
4089
+ const first2 = familyOrList.split(",")[0]?.trim() ?? "";
4090
+ const quoted = /^(["'])(.*)\1$/u.exec(first2);
4091
+ return quoted ? (quoted[2] ?? "").replace(/\\(.)/gu, "$1") : first2;
3933
4092
  }
3934
4093
  function resolveFontWeight(fontFamily, bold) {
3935
4094
  const implied = fontFamily ? impliedStyle(primaryFamily(fontFamily))?.weight : void 0;
@@ -4086,4 +4245,238 @@ function collectWebfontFaces(runs, candidates, options) {
4086
4245
  return { faces, unavailable };
4087
4246
  }
4088
4247
 
4089
- export { FONT_SUBSTITUTION_MAP, GOOGLE_FONTS_CATALOGUE_DATE, GOOGLE_FONTS_CSS2_BASE, GOOGLE_FONTS_FAMILIES, GOOGLE_WEBFONT_AXIS, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildGoogleFontsFragment, buildGoogleFontsHref, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, collectRunFamilies, collectWebfontFaces, decimalAnchorIndex, decimalSeparatorForLanguage, designTextWidthEm, detectFontScript, distributeRunsText, findGoogleFontsFamily, findLookAlikeGoogleFontsFamily, findMetricCompatibleGoogleFontsFamily, fontStyleShorthand, fontWeightAttribute, fontWeightShorthand, formatDatePicture, formatLocaleNumber, getGoogleFontsVariants, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, matchGoogleWebfontFragments, mergeTextThreeWay, metricFontFamily, namedFontVerticalMetrics, normalizeGoogleFontsBaseUrl, officeFontVerticalMetrics, ooxmlDateTimeFieldPicture, parseFontWeightName, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, realignOrCollapseRuns, resolveFontForScript, resolveFontItalic, resolveFontWeight, resolveGoogleFontsCss2Base, resolveGoogleFontsFace, resolveScriptFontSet, segmentByFont, segmentByScript, selectGoogleWebfontFamilies, servedGoogleFontsFamily, stripFontStyleSuffix, subsetTrueType, toTsv, wrapStyledRuns };
4248
+ // text/html-tokens.ts
4249
+ var ENTITIES = {
4250
+ amp: "&",
4251
+ lt: "<",
4252
+ gt: ">",
4253
+ quot: '"',
4254
+ apos: "'",
4255
+ nbsp: "\xA0",
4256
+ ensp: "\u2002",
4257
+ emsp: "\u2003",
4258
+ thinsp: "\u2009",
4259
+ ndash: "\u2013",
4260
+ mdash: "\u2014",
4261
+ lsquo: "\u2018",
4262
+ rsquo: "\u2019",
4263
+ ldquo: "\u201C",
4264
+ rdquo: "\u201D",
4265
+ bull: "\u2022",
4266
+ hellip: "\u2026",
4267
+ copy: "\xA9",
4268
+ reg: "\xAE",
4269
+ trade: "\u2122",
4270
+ euro: "\u20AC"
4271
+ };
4272
+ function codePoint(value) {
4273
+ if (!Number.isFinite(value) || value <= 0 || value > 1114111) return "\uFFFD";
4274
+ if (value >= 55296 && value <= 57343) return "\uFFFD";
4275
+ return String.fromCodePoint(value);
4276
+ }
4277
+ function decodeHtmlEntities(text) {
4278
+ return text.replace(/&(#x[0-9a-f]{1,8}|#\d{1,10}|[a-z]{1,10});/gi, (whole, name2) => {
4279
+ if (name2[1] === "x" || name2[1] === "X") return codePoint(parseInt(name2.slice(2), 16));
4280
+ if (name2.startsWith("#")) return codePoint(Number(name2.slice(1)));
4281
+ return ENTITIES[name2.toLowerCase()] ?? whole;
4282
+ });
4283
+ }
4284
+ function parseHtmlAttributes(text) {
4285
+ const attrs = /* @__PURE__ */ new Map();
4286
+ for (const m of text.matchAll(
4287
+ /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
4288
+ ))
4289
+ attrs.set((m[1] ?? "").toLowerCase(), decodeHtmlEntities(m[2] ?? m[3] ?? m[4] ?? ""));
4290
+ return attrs;
4291
+ }
4292
+ function parseCssDeclarations(text) {
4293
+ const out = /* @__PURE__ */ new Map();
4294
+ for (const decl of text.split(";")) {
4295
+ const colon = decl.indexOf(":");
4296
+ if (colon < 0) continue;
4297
+ out.set(
4298
+ decl.slice(0, colon).trim().toLowerCase(),
4299
+ decl.slice(colon + 1).replace(/!important/gi, "").trim()
4300
+ );
4301
+ }
4302
+ return out;
4303
+ }
4304
+ var NAMED_COLORS = {
4305
+ black: "000000",
4306
+ white: "FFFFFF",
4307
+ red: "FF0000",
4308
+ green: "008000",
4309
+ lime: "00FF00",
4310
+ blue: "0000FF",
4311
+ yellow: "FFFF00",
4312
+ orange: "FFA500",
4313
+ purple: "800080",
4314
+ gray: "808080",
4315
+ grey: "808080",
4316
+ silver: "C0C0C0",
4317
+ navy: "000080",
4318
+ maroon: "800000",
4319
+ teal: "008080",
4320
+ olive: "808000",
4321
+ aqua: "00FFFF",
4322
+ cyan: "00FFFF",
4323
+ fuchsia: "FF00FF",
4324
+ magenta: "FF00FF",
4325
+ darkblue: "00008B",
4326
+ darkred: "8B0000",
4327
+ darkgreen: "006400",
4328
+ darkcyan: "008B8B",
4329
+ darkmagenta: "8B008B",
4330
+ darkgray: "A9A9A9",
4331
+ darkgrey: "A9A9A9",
4332
+ lightgray: "D3D3D3",
4333
+ lightgrey: "D3D3D3",
4334
+ darkyellow: "808000"
4335
+ };
4336
+ function parseCssColorHex(text) {
4337
+ const value = text.trim().toLowerCase();
4338
+ const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(value)?.[1];
4339
+ if (hex) return (hex.length === 3 ? [...hex].map((ch) => ch + ch).join("") : hex).toUpperCase();
4340
+ const rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?/.exec(value);
4341
+ if (rgb) {
4342
+ if (rgb[4] !== void 0 && Number(rgb[4]) === 0) return void 0;
4343
+ return rgb.slice(1, 4).map((n) => Math.min(255, Number(n)).toString(16).padStart(2, "0")).join("").toUpperCase();
4344
+ }
4345
+ return NAMED_COLORS[value];
4346
+ }
4347
+ var MAX_TAG_LENGTH = 8192;
4348
+ var RAW_TEXT = /* @__PURE__ */ new Set([
4349
+ "script",
4350
+ "style",
4351
+ "textarea",
4352
+ "title",
4353
+ "xmp",
4354
+ "noscript",
4355
+ "template",
4356
+ "head",
4357
+ "xml",
4358
+ "svg",
4359
+ "math",
4360
+ "iframe",
4361
+ "object",
4362
+ "canvas",
4363
+ "select"
4364
+ ]);
4365
+ function htmlClipboardFragment(html) {
4366
+ const start = html.indexOf("<!--StartFragment-->");
4367
+ const end = html.indexOf("<!--EndFragment-->", start < 0 ? 0 : start);
4368
+ if (start >= 0 && end > start) return html.slice(start + "<!--StartFragment-->".length, end);
4369
+ const first2 = html.indexOf("<");
4370
+ return first2 > 0 && /^Version:\d/.test(html) ? html.slice(first2) : html;
4371
+ }
4372
+ function tagEnd(html, from) {
4373
+ let quote = "";
4374
+ const limit = Math.min(html.length, from + MAX_TAG_LENGTH);
4375
+ for (let i = from; i < limit; i++) {
4376
+ const ch = html[i];
4377
+ if (quote) {
4378
+ if (ch === quote) quote = "";
4379
+ } else if (ch === '"' || ch === "'") quote = ch;
4380
+ else if (ch === ">") return i;
4381
+ else if (ch === "<") return -1;
4382
+ }
4383
+ return -1;
4384
+ }
4385
+ function tokenizeHtml(html, maxTokens = Number.POSITIVE_INFINITY) {
4386
+ const tokens = [];
4387
+ let text = "";
4388
+ const flush = () => {
4389
+ if (text) tokens.push({ kind: "text", text: decodeHtmlEntities(text) });
4390
+ text = "";
4391
+ };
4392
+ let i = 0;
4393
+ while (i < html.length) {
4394
+ if (tokens.length >= maxTokens) {
4395
+ text += textWithoutTags(html.slice(i));
4396
+ break;
4397
+ }
4398
+ const lt = html.indexOf("<", i);
4399
+ if (lt < 0) {
4400
+ text += html.slice(i);
4401
+ break;
4402
+ }
4403
+ text += html.slice(i, lt);
4404
+ i = lt;
4405
+ if (html.startsWith("<!--", i)) {
4406
+ const close = html.indexOf("-->", i + 4);
4407
+ i = close < 0 ? html.length : close + 3;
4408
+ continue;
4409
+ }
4410
+ if (html.startsWith("<![", i)) {
4411
+ const close = html.indexOf("]>", i + 3);
4412
+ const body = html.slice(i + 3, close < 0 ? html.length : close).toLowerCase();
4413
+ flush();
4414
+ if (/^\s*if\b/.test(body))
4415
+ tokens.push({
4416
+ kind: "conditional",
4417
+ open: true,
4418
+ supportLists: body.includes("supportlists")
4419
+ });
4420
+ else if (/^\s*endif\b/.test(body))
4421
+ tokens.push({ kind: "conditional", open: false, supportLists: false });
4422
+ i = close < 0 ? html.length : close + 2;
4423
+ continue;
4424
+ }
4425
+ const next = html[i + 1] ?? "";
4426
+ if (next === "!" || next === "?") {
4427
+ const close = html.indexOf(">", i + 2);
4428
+ i = close < 0 ? html.length : close + 1;
4429
+ continue;
4430
+ }
4431
+ const closing = next === "/";
4432
+ const nameMatch = /^[a-zA-Z][\w:-]{0,63}/.exec(html.slice(i + (closing ? 2 : 1), i + 70));
4433
+ const end = nameMatch ? tagEnd(html, i + 1) : -1;
4434
+ if (!nameMatch || end < 0) {
4435
+ text += "<";
4436
+ i += 1;
4437
+ continue;
4438
+ }
4439
+ const name2 = nameMatch[0].toLowerCase();
4440
+ flush();
4441
+ if (closing) {
4442
+ tokens.push({ kind: "close", name: name2 });
4443
+ i = end + 1;
4444
+ continue;
4445
+ }
4446
+ const inner = html.slice(i + 1 + nameMatch[0].length, end);
4447
+ const selfClosing = inner.trimEnd().endsWith("/");
4448
+ i = end + 1;
4449
+ if (RAW_TEXT.has(name2)) {
4450
+ tokens.push({ kind: "text", text: "" });
4451
+ if (selfClosing) continue;
4452
+ const closer = new RegExp(`</${name2}`, "gi");
4453
+ closer.lastIndex = i;
4454
+ const found = closer.exec(html);
4455
+ const after = found ? html.indexOf(">", found.index) : -1;
4456
+ i = after < 0 ? html.length : after + 1;
4457
+ continue;
4458
+ }
4459
+ tokens.push({ kind: "open", name: name2, attrs: parseHtmlAttributes(inner), selfClosing });
4460
+ }
4461
+ flush();
4462
+ return tokens;
4463
+ }
4464
+ function textWithoutTags(html) {
4465
+ let out = "";
4466
+ let at = 0;
4467
+ for (let lt = html.indexOf("<"); lt >= 0; lt = html.indexOf("<", at)) {
4468
+ const gt = html.indexOf(">", lt + 1);
4469
+ if (gt < 0) break;
4470
+ const inner = html.indexOf("<", lt + 1);
4471
+ if (inner >= 0 && inner < gt) {
4472
+ out += html.slice(at, inner);
4473
+ at = inner;
4474
+ continue;
4475
+ }
4476
+ out += html.slice(at, lt);
4477
+ at = gt + 1;
4478
+ }
4479
+ return out + html.slice(at);
4480
+ }
4481
+
4482
+ export { AUTO_SPACE_EM, FONT_SUBSTITUTION_MAP, GOOGLE_FONTS_CATALOGUE_DATE, GOOGLE_FONTS_CSS2_BASE, GOOGLE_FONTS_FAMILIES, GOOGLE_WEBFONT_AXIS, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildGoogleFontsFragment, buildGoogleFontsHref, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, collectRunFamilies, collectWebfontFaces, complexBreakAllowed, decimalAnchorIndex, decimalSeparatorForLanguage, decodeHtmlEntities, designTextWidthEm, detectFontScript, distributeRunsText, eastAsianAutoSpace, embeddingPermission, findGoogleFontsFamily, findLookAlikeGoogleFontsFamily, findMetricCompatibleGoogleFontsFamily, fontStyleShorthand, fontWeightAttribute, fontWeightShorthand, formatDatePicture, formatLocaleNumber, getGoogleFontsVariants, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, hangsAtLineEnd, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, htmlClipboardFragment, isComplexBreakChar, isEastAsianChar, isEastAsianLetter, kinsokuLanguage, kinsokuSets, matchGoogleWebfontFragments, mayDisplayEmbeddedFont, mayEmbedFontInEditableDocument, mayEmbedFontSubset, mergeTextThreeWay, metricFontFamily, namedFontVerticalMetrics, normalizeGoogleFontsBaseUrl, officeFontVerticalMetrics, ooxmlDateTimeFieldPicture, parseCssColorHex, parseCssDeclarations, parseFontWeightName, parseHtmlAttributes, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, prohibitedAtLineEnd, prohibitedAtLineStart, readSfntFsType, realignOrCollapseRuns, resolveFontForScript, resolveFontItalic, resolveFontWeight, resolveGoogleFontsCss2Base, resolveGoogleFontsFace, resolveScriptFontSet, segmentByFont, segmentByScript, selectGoogleWebfontFamilies, servedGoogleFontsFamily, stripFontStyleSuffix, subsetTrueType, toTsv, tokenizeHtml, wrapStyledRuns };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * East Asian line-start and line-end prohibition (kinsoku shori): characters that may not begin
3
+ * a line (closing brackets, commas, full stops, iteration marks) and characters that may not end
4
+ * one (opening brackets, currency signs that lead a number).
5
+ *
6
+ * The default sets are Word 16's, measured from its output (a fixed-pitch line one character too
7
+ * short, each candidate placed where it would start or end the second line), one set per East
8
+ * Asian language. They are the sets ECMA-376 refers to in `w:kinsoku` (17.3.1.16); a document
9
+ * replaces one language's set with `w:noLineBreaksBefore` / `w:noLineBreaksAfter` (17.15.1.58-59),
10
+ * and `w:strictFirstAndLastChars` selects the strict Japanese set. Measured behaviour, on a Word 16
11
+ * install with no East Asian editing language enabled (`LanguageSettings.LanguagePreferredForEditing`
12
+ * false for Japanese, both Chinese and Korean; one with them enabled may differ):
13
+ *
14
+ * - The set follows the East Asian language of the character's run (`w:lang/@w:eastAsia`).
15
+ * A run with no East Asian language gets no prohibition at all, whatever the theme's
16
+ * `w:themeFontLang/@w:eastAsia` says.
17
+ * - Korean has an empty default set: Word breaks Korean text before `。` or `」`, after ideographs
18
+ * and after Hangul alike.
19
+ * - A custom set replaces that language's default set; other languages keep theirs.
20
+ * - Combining marks and zero-width controls never start a line anyway (they belong to the
21
+ * preceding grapheme), so they are not listed.
22
+ */
23
+ /** A language whose kinsoku set differs (Word's four East Asian line-breaking languages). */
24
+ export type KinsokuLanguage = 'ja' | 'zh-Hans' | 'zh-Hant' | 'ko';
25
+ /** Characters that may not start a line (`noStart`) and may not end one (`noEnd`). */
26
+ export interface KinsokuSets {
27
+ noStart: string;
28
+ noEnd: string;
29
+ }
30
+ /** The kinsoku language of a BCP 47 tag (`ja-JP`, `zh-CN`, `zh-TW`, `ko-KR`); undefined otherwise. */
31
+ export declare function kinsokuLanguage(tag: string | undefined): KinsokuLanguage | undefined;
32
+ /** A document's replacement set for one language (`w:noLineBreaksBefore` or `...After`). */
33
+ export interface KinsokuOverride {
34
+ /** The `w:lang` tag the set applies to. */
35
+ language: string;
36
+ chars: string;
37
+ }
38
+ /** Document-wide kinsoku settings. */
39
+ export interface KinsokuSettings {
40
+ /** `w:strictFirstAndLastChars`: the strict Japanese line-start set. */
41
+ strict?: boolean;
42
+ /** `w:noLineBreaksBefore`: characters that may not start a line. */
43
+ noLineBreaksBefore?: KinsokuOverride;
44
+ /** `w:noLineBreaksAfter`: characters that may not end a line. */
45
+ noLineBreaksAfter?: KinsokuOverride;
46
+ }
47
+ /** The sets that apply to text in `language` under a document's settings. */
48
+ export declare function kinsokuSets(language: KinsokuLanguage, settings?: KinsokuSettings): KinsokuSets;
49
+ /** Whether `grapheme` (its base character) may not start a line. */
50
+ export declare function prohibitedAtLineStart(grapheme: string, sets: KinsokuSets): boolean;
51
+ /** Whether `grapheme` (its base character) may not end a line. */
52
+ export declare function prohibitedAtLineEnd(grapheme: string, sets: KinsokuSets): boolean;
53
+ /** Whether `grapheme` may hang at a line end under `w:overflowPunct`, in `language` text. */
54
+ export declare function hangsAtLineEnd(grapheme: string, language: KinsokuLanguage): boolean;
55
+ //# sourceMappingURL=kinsoku.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kinsoku.d.ts","sourceRoot":"","sources":["../../text/kinsoku.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,6FAA6F;AAC7F,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AAElE,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACd;AA4BD,sGAAsG;AACtG,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAQpF;AAED,4FAA4F;AAC5F,MAAM,WAAW,eAAe;IAC/B,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,sCAAsC;AACtC,MAAM,WAAW,eAAe;IAC/B,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,eAAe,CAAC;IACrC,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,eAAe,CAAC;CACpC;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAC1B,QAAQ,EAAE,eAAe,EACzB,QAAQ,GAAE,eAAoB,GAC5B,WAAW,CASb;AAID,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAElF;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAEhF;AAkBD,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAEnF"}