@cj-tech-master/excelts 1.6.2 → 1.6.3-canary.20251224125850.7da664f

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 (382) hide show
  1. package/README.md +141 -8
  2. package/README_zh.md +142 -10
  3. package/dist/browser/excelts.esm.js +19115 -0
  4. package/dist/browser/excelts.esm.js.map +1 -0
  5. package/dist/browser/excelts.esm.min.js +127 -0
  6. package/dist/browser/excelts.iife.js +13576 -46968
  7. package/dist/browser/excelts.iife.js.map +1 -1
  8. package/dist/browser/excelts.iife.min.js +25 -105
  9. package/dist/cjs/csv/csv-core.js +701 -0
  10. package/dist/cjs/csv/csv-stream.js +646 -0
  11. package/dist/cjs/csv/csv.base.js +154 -0
  12. package/dist/cjs/csv/csv.browser.js +68 -0
  13. package/dist/cjs/csv/csv.js +226 -162
  14. package/dist/cjs/doc/anchor.js +2 -2
  15. package/dist/cjs/doc/cell.js +22 -22
  16. package/dist/cjs/doc/column.js +7 -7
  17. package/dist/cjs/doc/data-validations.js +3 -3
  18. package/dist/cjs/doc/defined-names.js +13 -13
  19. package/dist/cjs/doc/image.js +7 -7
  20. package/dist/cjs/doc/modelcontainer.js +2 -2
  21. package/dist/cjs/doc/note.js +2 -2
  22. package/dist/cjs/doc/pivot-table.js +5 -5
  23. package/dist/cjs/doc/range.js +11 -11
  24. package/dist/cjs/doc/row.js +16 -16
  25. package/dist/cjs/doc/table.js +5 -5
  26. package/dist/cjs/doc/workbook.base.js +211 -0
  27. package/dist/cjs/doc/workbook.browser.js +62 -0
  28. package/dist/cjs/doc/workbook.js +68 -179
  29. package/dist/cjs/doc/worksheet.js +41 -41
  30. package/dist/cjs/index.js +49 -32
  31. package/dist/cjs/stream/xlsx/hyperlink-reader.js +6 -6
  32. package/dist/cjs/stream/xlsx/sheet-comments-writer.js +12 -12
  33. package/dist/cjs/stream/xlsx/sheet-rels-writer.js +4 -4
  34. package/dist/cjs/stream/xlsx/workbook-reader.js +29 -26
  35. package/dist/cjs/stream/xlsx/workbook-writer.js +71 -57
  36. package/dist/cjs/stream/xlsx/worksheet-reader.js +27 -23
  37. package/dist/cjs/stream/xlsx/worksheet-writer.js +72 -66
  38. package/dist/cjs/utils/browser-buffer.js +75 -0
  39. package/dist/cjs/utils/cell-format.js +2 -2
  40. package/dist/cjs/utils/cell-matrix.js +5 -5
  41. package/dist/cjs/utils/encryptor.browser.js +240 -0
  42. package/dist/cjs/utils/parse-sax.js +2 -2
  43. package/dist/cjs/utils/shared-formula.js +5 -5
  44. package/dist/cjs/utils/sheet-utils.js +13 -13
  45. package/dist/cjs/utils/stream-buf.browser.js +355 -0
  46. package/dist/cjs/utils/stream-buf.js +5 -5
  47. package/dist/cjs/utils/unzip/extract.js +11 -11
  48. package/dist/cjs/utils/unzip/index.js +21 -21
  49. package/dist/cjs/utils/unzip/parse-extra-field.js +3 -3
  50. package/dist/cjs/utils/unzip/parse.js +16 -16
  51. package/dist/cjs/utils/unzip/zip-parser.js +3 -3
  52. package/dist/cjs/utils/utils.base.js +161 -0
  53. package/dist/cjs/utils/utils.browser.js +89 -0
  54. package/dist/cjs/utils/utils.js +46 -154
  55. package/dist/cjs/utils/xml-stream.js +3 -3
  56. package/dist/cjs/utils/zip/compress.base.js +85 -0
  57. package/dist/cjs/utils/zip/compress.browser.js +83 -0
  58. package/dist/cjs/utils/zip/compress.js +18 -198
  59. package/dist/cjs/utils/zip/crc32.browser.js +88 -0
  60. package/dist/cjs/utils/zip/index.js +17 -17
  61. package/dist/cjs/utils/zip/zip-builder.js +10 -10
  62. package/dist/cjs/utils/zip-stream.browser.js +135 -0
  63. package/dist/cjs/utils/zip-stream.js +4 -4
  64. package/dist/cjs/xlsx/xform/base-xform.js +4 -4
  65. package/dist/cjs/xlsx/xform/book/defined-name-xform.js +4 -4
  66. package/dist/cjs/xlsx/xform/book/sheet-xform.js +4 -4
  67. package/dist/cjs/xlsx/xform/book/workbook-calc-properties-xform.js +2 -2
  68. package/dist/cjs/xlsx/xform/book/workbook-pivot-cache-xform.js +2 -2
  69. package/dist/cjs/xlsx/xform/book/workbook-properties-xform.js +2 -2
  70. package/dist/cjs/xlsx/xform/book/workbook-view-xform.js +2 -2
  71. package/dist/cjs/xlsx/xform/book/workbook-xform.js +24 -24
  72. package/dist/cjs/xlsx/xform/comment/comment-xform.js +4 -4
  73. package/dist/cjs/xlsx/xform/comment/comments-xform.js +6 -6
  74. package/dist/cjs/xlsx/xform/comment/style/vml-position-xform.js +2 -2
  75. package/dist/cjs/xlsx/xform/comment/style/vml-protection-xform.js +2 -2
  76. package/dist/cjs/xlsx/xform/comment/vml-anchor-xform.js +2 -2
  77. package/dist/cjs/xlsx/xform/comment/vml-client-data-xform.js +10 -10
  78. package/dist/cjs/xlsx/xform/comment/vml-notes-xform.js +6 -6
  79. package/dist/cjs/xlsx/xform/comment/vml-shape-xform.js +6 -6
  80. package/dist/cjs/xlsx/xform/comment/vml-textbox-xform.js +2 -2
  81. package/dist/cjs/xlsx/xform/composite-xform.js +2 -2
  82. package/dist/cjs/xlsx/xform/core/app-heading-pairs-xform.js +2 -2
  83. package/dist/cjs/xlsx/xform/core/app-titles-of-parts-xform.js +2 -2
  84. package/dist/cjs/xlsx/xform/core/app-xform.js +11 -11
  85. package/dist/cjs/xlsx/xform/core/content-types-xform.js +4 -4
  86. package/dist/cjs/xlsx/xform/core/core-xform.js +23 -23
  87. package/dist/cjs/xlsx/xform/core/relationship-xform.js +2 -2
  88. package/dist/cjs/xlsx/xform/core/relationships-xform.js +6 -6
  89. package/dist/cjs/xlsx/xform/drawing/base-cell-anchor-xform.js +2 -2
  90. package/dist/cjs/xlsx/xform/drawing/blip-fill-xform.js +4 -4
  91. package/dist/cjs/xlsx/xform/drawing/blip-xform.js +2 -2
  92. package/dist/cjs/xlsx/xform/drawing/c-nv-pic-pr-xform.js +2 -2
  93. package/dist/cjs/xlsx/xform/drawing/c-nv-pr-xform.js +6 -6
  94. package/dist/cjs/xlsx/xform/drawing/cell-position-xform.js +7 -7
  95. package/dist/cjs/xlsx/xform/drawing/drawing-xform.js +10 -10
  96. package/dist/cjs/xlsx/xform/drawing/ext-lst-xform.js +2 -2
  97. package/dist/cjs/xlsx/xform/drawing/ext-xform.js +2 -2
  98. package/dist/cjs/xlsx/xform/drawing/hlink-click-xform.js +2 -2
  99. package/dist/cjs/xlsx/xform/drawing/nv-pic-pr-xform.js +6 -6
  100. package/dist/cjs/xlsx/xform/drawing/one-cell-anchor-xform.js +10 -10
  101. package/dist/cjs/xlsx/xform/drawing/pic-xform.js +9 -9
  102. package/dist/cjs/xlsx/xform/drawing/two-cell-anchor-xform.js +9 -9
  103. package/dist/cjs/xlsx/xform/list-xform.js +2 -2
  104. package/dist/cjs/xlsx/xform/pivot-table/cache-field-xform.js +5 -5
  105. package/dist/cjs/xlsx/xform/pivot-table/cache-field.js +3 -3
  106. package/dist/cjs/xlsx/xform/pivot-table/pivot-cache-definition-xform.js +10 -10
  107. package/dist/cjs/xlsx/xform/pivot-table/pivot-cache-records-xform.js +9 -9
  108. package/dist/cjs/xlsx/xform/pivot-table/pivot-table-xform.js +10 -11
  109. package/dist/cjs/xlsx/xform/sheet/auto-filter-xform.js +4 -4
  110. package/dist/cjs/xlsx/xform/sheet/cell-xform.js +65 -65
  111. package/dist/cjs/xlsx/xform/sheet/cf/cf-rule-xform.js +27 -27
  112. package/dist/cjs/xlsx/xform/sheet/cf/cfvo-xform.js +3 -3
  113. package/dist/cjs/xlsx/xform/sheet/cf/color-scale-xform.js +6 -6
  114. package/dist/cjs/xlsx/xform/sheet/cf/conditional-formatting-xform.js +6 -6
  115. package/dist/cjs/xlsx/xform/sheet/cf/conditional-formattings-xform.js +4 -4
  116. package/dist/cjs/xlsx/xform/sheet/cf/databar-xform.js +6 -6
  117. package/dist/cjs/xlsx/xform/sheet/cf/ext-lst-ref-xform.js +5 -5
  118. package/dist/cjs/xlsx/xform/sheet/cf/formula-xform.js +2 -2
  119. package/dist/cjs/xlsx/xform/sheet/cf/icon-set-xform.js +11 -11
  120. package/dist/cjs/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js +3 -3
  121. package/dist/cjs/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js +11 -12
  122. package/dist/cjs/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js +4 -4
  123. package/dist/cjs/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js +8 -8
  124. package/dist/cjs/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js +6 -6
  125. package/dist/cjs/xlsx/xform/sheet/cf-ext/databar-ext-xform.js +26 -26
  126. package/dist/cjs/xlsx/xform/sheet/cf-ext/f-ext-xform.js +2 -2
  127. package/dist/cjs/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js +14 -14
  128. package/dist/cjs/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js +2 -2
  129. package/dist/cjs/xlsx/xform/sheet/col-xform.js +6 -6
  130. package/dist/cjs/xlsx/xform/sheet/data-validations-xform.js +18 -18
  131. package/dist/cjs/xlsx/xform/sheet/dimension-xform.js +2 -2
  132. package/dist/cjs/xlsx/xform/sheet/drawing-xform.js +2 -2
  133. package/dist/cjs/xlsx/xform/sheet/ext-lst-xform.js +5 -5
  134. package/dist/cjs/xlsx/xform/sheet/header-footer-xform.js +2 -2
  135. package/dist/cjs/xlsx/xform/sheet/hyperlink-xform.js +2 -2
  136. package/dist/cjs/xlsx/xform/sheet/merge-cell-xform.js +2 -2
  137. package/dist/cjs/xlsx/xform/sheet/merges.js +8 -8
  138. package/dist/cjs/xlsx/xform/sheet/outline-properties-xform.js +2 -2
  139. package/dist/cjs/xlsx/xform/sheet/page-breaks-xform.js +2 -2
  140. package/dist/cjs/xlsx/xform/sheet/page-margins-xform.js +2 -2
  141. package/dist/cjs/xlsx/xform/sheet/page-setup-properties-xform.js +2 -2
  142. package/dist/cjs/xlsx/xform/sheet/page-setup-xform.js +2 -2
  143. package/dist/cjs/xlsx/xform/sheet/picture-xform.js +2 -2
  144. package/dist/cjs/xlsx/xform/sheet/print-options-xform.js +2 -2
  145. package/dist/cjs/xlsx/xform/sheet/row-breaks-xform.js +4 -4
  146. package/dist/cjs/xlsx/xform/sheet/row-xform.js +11 -11
  147. package/dist/cjs/xlsx/xform/sheet/sheet-format-properties-xform.js +2 -2
  148. package/dist/cjs/xlsx/xform/sheet/sheet-properties-xform.js +8 -8
  149. package/dist/cjs/xlsx/xform/sheet/sheet-protection-xform.js +2 -2
  150. package/dist/cjs/xlsx/xform/sheet/sheet-view-xform.js +4 -4
  151. package/dist/cjs/xlsx/xform/sheet/table-part-xform.js +2 -2
  152. package/dist/cjs/xlsx/xform/sheet/worksheet-xform.js +68 -68
  153. package/dist/cjs/xlsx/xform/simple/boolean-xform.js +2 -2
  154. package/dist/cjs/xlsx/xform/simple/date-xform.js +2 -2
  155. package/dist/cjs/xlsx/xform/simple/float-xform.js +2 -2
  156. package/dist/cjs/xlsx/xform/simple/integer-xform.js +2 -2
  157. package/dist/cjs/xlsx/xform/simple/string-xform.js +2 -2
  158. package/dist/cjs/xlsx/xform/static-xform.js +4 -4
  159. package/dist/cjs/xlsx/xform/strings/phonetic-text-xform.js +6 -6
  160. package/dist/cjs/xlsx/xform/strings/rich-text-xform.js +6 -6
  161. package/dist/cjs/xlsx/xform/strings/shared-string-xform.js +8 -8
  162. package/dist/cjs/xlsx/xform/strings/shared-strings-xform.js +6 -6
  163. package/dist/cjs/xlsx/xform/strings/text-xform.js +2 -2
  164. package/dist/cjs/xlsx/xform/style/alignment-xform.js +8 -8
  165. package/dist/cjs/xlsx/xform/style/border-xform.js +8 -8
  166. package/dist/cjs/xlsx/xform/style/color-xform.js +2 -2
  167. package/dist/cjs/xlsx/xform/style/dxf-xform.js +14 -14
  168. package/dist/cjs/xlsx/xform/style/fill-xform.js +9 -9
  169. package/dist/cjs/xlsx/xform/style/font-xform.js +22 -22
  170. package/dist/cjs/xlsx/xform/style/numfmt-xform.js +5 -5
  171. package/dist/cjs/xlsx/xform/style/protection-xform.js +2 -2
  172. package/dist/cjs/xlsx/xform/style/style-xform.js +6 -6
  173. package/dist/cjs/xlsx/xform/style/styles-xform.js +39 -39
  174. package/dist/cjs/xlsx/xform/style/underline-xform.js +2 -2
  175. package/dist/cjs/xlsx/xform/table/auto-filter-xform.js +4 -4
  176. package/dist/cjs/xlsx/xform/table/custom-filter-xform.js +2 -2
  177. package/dist/cjs/xlsx/xform/table/filter-column-xform.js +9 -9
  178. package/dist/cjs/xlsx/xform/table/filter-xform.js +2 -2
  179. package/dist/cjs/xlsx/xform/table/table-column-xform.js +2 -2
  180. package/dist/cjs/xlsx/xform/table/table-style-info-xform.js +2 -2
  181. package/dist/cjs/xlsx/xform/table/table-xform.js +12 -12
  182. package/dist/cjs/xlsx/xlsx.base.js +742 -0
  183. package/dist/cjs/xlsx/xlsx.browser.js +205 -0
  184. package/dist/cjs/xlsx/xlsx.js +91 -833
  185. package/dist/esm/csv/csv-core.js +694 -0
  186. package/dist/esm/csv/csv-stream.js +638 -0
  187. package/dist/esm/csv/csv.base.js +141 -0
  188. package/dist/esm/csv/csv.browser.js +65 -0
  189. package/dist/esm/csv/csv.js +189 -159
  190. package/dist/esm/doc/workbook.base.js +207 -0
  191. package/dist/esm/doc/workbook.browser.js +59 -0
  192. package/dist/esm/doc/workbook.js +64 -175
  193. package/dist/esm/index.browser.js +33 -1
  194. package/dist/esm/index.js +23 -8
  195. package/dist/esm/local.js +0 -1
  196. package/dist/esm/stream/xlsx/hyperlink-reader.js +1 -1
  197. package/dist/esm/stream/xlsx/workbook-reader.js +7 -4
  198. package/dist/esm/stream/xlsx/workbook-writer.js +37 -23
  199. package/dist/esm/stream/xlsx/worksheet-reader.js +12 -8
  200. package/dist/esm/stream/xlsx/worksheet-writer.js +12 -6
  201. package/dist/esm/utils/browser-buffer.js +67 -0
  202. package/dist/esm/utils/encryptor.browser.js +237 -0
  203. package/dist/esm/utils/stream-buf.browser.js +352 -0
  204. package/dist/esm/utils/utils.base.js +142 -0
  205. package/dist/esm/utils/utils.browser.js +68 -0
  206. package/dist/esm/utils/utils.js +15 -123
  207. package/dist/esm/utils/zip/compress.base.js +80 -0
  208. package/dist/esm/utils/zip/compress.browser.js +76 -0
  209. package/dist/esm/utils/zip/compress.js +16 -164
  210. package/dist/esm/utils/zip/crc32.browser.js +82 -0
  211. package/dist/esm/utils/zip-stream.browser.js +132 -0
  212. package/dist/esm/xlsx/xform/pivot-table/pivot-table-xform.js +2 -3
  213. package/dist/esm/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js +2 -3
  214. package/dist/esm/xlsx/xlsx.base.js +739 -0
  215. package/dist/esm/xlsx/xlsx.browser.js +202 -0
  216. package/dist/esm/xlsx/xlsx.js +87 -829
  217. package/dist/types/csv/csv-core.d.ts +207 -0
  218. package/dist/types/csv/csv-stream.d.ts +114 -0
  219. package/dist/types/csv/csv.base.d.ts +61 -0
  220. package/dist/types/csv/csv.browser.d.ts +33 -0
  221. package/dist/types/csv/csv.d.ts +97 -71
  222. package/dist/types/doc/anchor.d.ts +1 -1
  223. package/dist/types/doc/cell.d.ts +7 -7
  224. package/dist/types/doc/column.d.ts +3 -3
  225. package/dist/types/doc/defined-names.d.ts +4 -4
  226. package/dist/types/doc/image.d.ts +2 -2
  227. package/dist/types/doc/modelcontainer.d.ts +1 -1
  228. package/dist/types/doc/pivot-table.d.ts +1 -1
  229. package/dist/types/doc/range.d.ts +1 -1
  230. package/dist/types/doc/row.d.ts +3 -3
  231. package/dist/types/doc/table.d.ts +4 -4
  232. package/dist/types/doc/workbook.base.d.ts +111 -0
  233. package/dist/types/doc/workbook.browser.d.ts +38 -0
  234. package/dist/types/doc/workbook.d.ts +62 -92
  235. package/dist/types/doc/worksheet.d.ts +10 -10
  236. package/dist/types/index.browser.d.ts +19 -5
  237. package/dist/types/index.d.ts +24 -20
  238. package/dist/types/local.d.ts +0 -1
  239. package/dist/types/stream/xlsx/hyperlink-reader.d.ts +11 -11
  240. package/dist/types/stream/xlsx/workbook-reader.d.ts +125 -36
  241. package/dist/types/stream/xlsx/workbook-writer.d.ts +105 -22
  242. package/dist/types/stream/xlsx/worksheet-reader.d.ts +40 -22
  243. package/dist/types/stream/xlsx/worksheet-writer.d.ts +83 -49
  244. package/dist/types/types.d.ts +4 -16
  245. package/dist/types/utils/browser-buffer.d.ts +28 -0
  246. package/dist/types/utils/col-cache.d.ts +1 -1
  247. package/dist/types/utils/encryptor.browser.d.ts +28 -0
  248. package/dist/types/utils/sheet-utils.d.ts +3 -3
  249. package/dist/types/utils/stream-buf.browser.d.ts +41 -0
  250. package/dist/types/utils/unzip/extract.d.ts +6 -6
  251. package/dist/types/utils/unzip/index.d.ts +8 -8
  252. package/dist/types/utils/unzip/parse.d.ts +3 -3
  253. package/dist/types/utils/utils.base.d.ts +29 -0
  254. package/dist/types/utils/utils.browser.d.ts +29 -0
  255. package/dist/types/utils/utils.d.ts +6 -25
  256. package/dist/types/utils/zip/compress.base.d.ts +42 -0
  257. package/dist/types/utils/zip/compress.browser.d.ts +54 -0
  258. package/dist/types/utils/zip/compress.d.ts +13 -45
  259. package/dist/types/utils/zip/crc32.browser.d.ts +52 -0
  260. package/dist/types/utils/zip/index.d.ts +5 -5
  261. package/dist/types/utils/zip/zip-builder.d.ts +1 -1
  262. package/dist/types/utils/zip-stream.browser.d.ts +39 -0
  263. package/dist/types/xlsx/xform/base-xform.d.ts +1 -1
  264. package/dist/types/xlsx/xform/book/defined-name-xform.d.ts +1 -1
  265. package/dist/types/xlsx/xform/book/sheet-xform.d.ts +1 -1
  266. package/dist/types/xlsx/xform/book/workbook-calc-properties-xform.d.ts +1 -1
  267. package/dist/types/xlsx/xform/book/workbook-pivot-cache-xform.d.ts +1 -1
  268. package/dist/types/xlsx/xform/book/workbook-properties-xform.d.ts +1 -1
  269. package/dist/types/xlsx/xform/book/workbook-view-xform.d.ts +1 -1
  270. package/dist/types/xlsx/xform/book/workbook-xform.d.ts +2 -2
  271. package/dist/types/xlsx/xform/comment/comment-xform.d.ts +2 -2
  272. package/dist/types/xlsx/xform/comment/comments-xform.d.ts +2 -2
  273. package/dist/types/xlsx/xform/comment/style/vml-position-xform.d.ts +1 -1
  274. package/dist/types/xlsx/xform/comment/style/vml-protection-xform.d.ts +1 -1
  275. package/dist/types/xlsx/xform/comment/vml-anchor-xform.d.ts +1 -1
  276. package/dist/types/xlsx/xform/comment/vml-client-data-xform.d.ts +1 -1
  277. package/dist/types/xlsx/xform/comment/vml-notes-xform.d.ts +1 -1
  278. package/dist/types/xlsx/xform/comment/vml-shape-xform.d.ts +1 -1
  279. package/dist/types/xlsx/xform/comment/vml-textbox-xform.d.ts +1 -1
  280. package/dist/types/xlsx/xform/composite-xform.d.ts +1 -1
  281. package/dist/types/xlsx/xform/core/app-heading-pairs-xform.d.ts +1 -1
  282. package/dist/types/xlsx/xform/core/app-titles-of-parts-xform.d.ts +1 -1
  283. package/dist/types/xlsx/xform/core/app-xform.d.ts +1 -1
  284. package/dist/types/xlsx/xform/core/content-types-xform.d.ts +1 -1
  285. package/dist/types/xlsx/xform/core/core-xform.d.ts +1 -1
  286. package/dist/types/xlsx/xform/core/relationship-xform.d.ts +1 -1
  287. package/dist/types/xlsx/xform/core/relationships-xform.d.ts +1 -1
  288. package/dist/types/xlsx/xform/drawing/base-cell-anchor-xform.d.ts +1 -1
  289. package/dist/types/xlsx/xform/drawing/blip-fill-xform.d.ts +2 -2
  290. package/dist/types/xlsx/xform/drawing/blip-xform.d.ts +1 -1
  291. package/dist/types/xlsx/xform/drawing/c-nv-pic-pr-xform.d.ts +1 -1
  292. package/dist/types/xlsx/xform/drawing/c-nv-pr-xform.d.ts +1 -1
  293. package/dist/types/xlsx/xform/drawing/cell-position-xform.d.ts +2 -2
  294. package/dist/types/xlsx/xform/drawing/drawing-xform.d.ts +1 -1
  295. package/dist/types/xlsx/xform/drawing/ext-lst-xform.d.ts +1 -1
  296. package/dist/types/xlsx/xform/drawing/ext-xform.d.ts +1 -1
  297. package/dist/types/xlsx/xform/drawing/hlink-click-xform.d.ts +1 -1
  298. package/dist/types/xlsx/xform/drawing/nv-pic-pr-xform.d.ts +1 -1
  299. package/dist/types/xlsx/xform/drawing/one-cell-anchor-xform.d.ts +1 -1
  300. package/dist/types/xlsx/xform/drawing/pic-xform.d.ts +1 -1
  301. package/dist/types/xlsx/xform/drawing/two-cell-anchor-xform.d.ts +1 -1
  302. package/dist/types/xlsx/xform/list-xform.d.ts +1 -1
  303. package/dist/types/xlsx/xform/pivot-table/cache-field-xform.d.ts +1 -1
  304. package/dist/types/xlsx/xform/pivot-table/pivot-cache-definition-xform.d.ts +3 -3
  305. package/dist/types/xlsx/xform/pivot-table/pivot-cache-records-xform.d.ts +2 -2
  306. package/dist/types/xlsx/xform/pivot-table/pivot-table-xform.d.ts +1 -1
  307. package/dist/types/xlsx/xform/sheet/auto-filter-xform.d.ts +1 -1
  308. package/dist/types/xlsx/xform/sheet/cell-xform.d.ts +1 -1
  309. package/dist/types/xlsx/xform/sheet/cf/cf-rule-xform.d.ts +6 -6
  310. package/dist/types/xlsx/xform/sheet/cf/cfvo-xform.d.ts +1 -1
  311. package/dist/types/xlsx/xform/sheet/cf/color-scale-xform.d.ts +3 -3
  312. package/dist/types/xlsx/xform/sheet/cf/conditional-formatting-xform.d.ts +1 -1
  313. package/dist/types/xlsx/xform/sheet/cf/conditional-formattings-xform.d.ts +2 -2
  314. package/dist/types/xlsx/xform/sheet/cf/databar-xform.d.ts +3 -3
  315. package/dist/types/xlsx/xform/sheet/cf/ext-lst-ref-xform.d.ts +1 -1
  316. package/dist/types/xlsx/xform/sheet/cf/formula-xform.d.ts +1 -1
  317. package/dist/types/xlsx/xform/sheet/cf/icon-set-xform.d.ts +2 -2
  318. package/dist/types/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.d.ts +1 -1
  319. package/dist/types/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.d.ts +3 -3
  320. package/dist/types/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.d.ts +2 -2
  321. package/dist/types/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.d.ts +3 -3
  322. package/dist/types/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.d.ts +2 -2
  323. package/dist/types/xlsx/xform/sheet/cf-ext/databar-ext-xform.d.ts +3 -3
  324. package/dist/types/xlsx/xform/sheet/cf-ext/f-ext-xform.d.ts +1 -1
  325. package/dist/types/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.d.ts +3 -3
  326. package/dist/types/xlsx/xform/sheet/cf-ext/sqref-ext-xform.d.ts +1 -1
  327. package/dist/types/xlsx/xform/sheet/col-xform.d.ts +1 -1
  328. package/dist/types/xlsx/xform/sheet/data-validations-xform.d.ts +1 -1
  329. package/dist/types/xlsx/xform/sheet/dimension-xform.d.ts +1 -1
  330. package/dist/types/xlsx/xform/sheet/drawing-xform.d.ts +1 -1
  331. package/dist/types/xlsx/xform/sheet/ext-lst-xform.d.ts +1 -1
  332. package/dist/types/xlsx/xform/sheet/header-footer-xform.d.ts +1 -1
  333. package/dist/types/xlsx/xform/sheet/hyperlink-xform.d.ts +1 -1
  334. package/dist/types/xlsx/xform/sheet/merge-cell-xform.d.ts +1 -1
  335. package/dist/types/xlsx/xform/sheet/outline-properties-xform.d.ts +1 -1
  336. package/dist/types/xlsx/xform/sheet/page-breaks-xform.d.ts +1 -1
  337. package/dist/types/xlsx/xform/sheet/page-margins-xform.d.ts +1 -1
  338. package/dist/types/xlsx/xform/sheet/page-setup-properties-xform.d.ts +1 -1
  339. package/dist/types/xlsx/xform/sheet/page-setup-xform.d.ts +1 -1
  340. package/dist/types/xlsx/xform/sheet/picture-xform.d.ts +1 -1
  341. package/dist/types/xlsx/xform/sheet/print-options-xform.d.ts +1 -1
  342. package/dist/types/xlsx/xform/sheet/row-breaks-xform.d.ts +1 -1
  343. package/dist/types/xlsx/xform/sheet/row-xform.d.ts +1 -1
  344. package/dist/types/xlsx/xform/sheet/sheet-format-properties-xform.d.ts +1 -1
  345. package/dist/types/xlsx/xform/sheet/sheet-properties-xform.d.ts +1 -1
  346. package/dist/types/xlsx/xform/sheet/sheet-protection-xform.d.ts +1 -1
  347. package/dist/types/xlsx/xform/sheet/sheet-view-xform.d.ts +1 -1
  348. package/dist/types/xlsx/xform/sheet/table-part-xform.d.ts +1 -1
  349. package/dist/types/xlsx/xform/sheet/worksheet-xform.d.ts +1 -1
  350. package/dist/types/xlsx/xform/simple/boolean-xform.d.ts +1 -1
  351. package/dist/types/xlsx/xform/simple/date-xform.d.ts +1 -1
  352. package/dist/types/xlsx/xform/simple/float-xform.d.ts +1 -1
  353. package/dist/types/xlsx/xform/simple/integer-xform.d.ts +1 -1
  354. package/dist/types/xlsx/xform/simple/string-xform.d.ts +1 -1
  355. package/dist/types/xlsx/xform/static-xform.d.ts +1 -1
  356. package/dist/types/xlsx/xform/strings/phonetic-text-xform.d.ts +1 -1
  357. package/dist/types/xlsx/xform/strings/rich-text-xform.d.ts +3 -3
  358. package/dist/types/xlsx/xform/strings/shared-string-xform.d.ts +1 -1
  359. package/dist/types/xlsx/xform/strings/shared-strings-xform.d.ts +2 -2
  360. package/dist/types/xlsx/xform/strings/text-xform.d.ts +1 -1
  361. package/dist/types/xlsx/xform/style/alignment-xform.d.ts +1 -1
  362. package/dist/types/xlsx/xform/style/border-xform.d.ts +2 -2
  363. package/dist/types/xlsx/xform/style/color-xform.d.ts +1 -1
  364. package/dist/types/xlsx/xform/style/dxf-xform.d.ts +1 -1
  365. package/dist/types/xlsx/xform/style/fill-xform.d.ts +2 -2
  366. package/dist/types/xlsx/xform/style/font-xform.d.ts +1 -1
  367. package/dist/types/xlsx/xform/style/numfmt-xform.d.ts +1 -1
  368. package/dist/types/xlsx/xform/style/protection-xform.d.ts +1 -1
  369. package/dist/types/xlsx/xform/style/style-xform.d.ts +3 -3
  370. package/dist/types/xlsx/xform/style/styles-xform.d.ts +2 -2
  371. package/dist/types/xlsx/xform/style/underline-xform.d.ts +1 -1
  372. package/dist/types/xlsx/xform/table/auto-filter-xform.d.ts +2 -2
  373. package/dist/types/xlsx/xform/table/custom-filter-xform.d.ts +1 -1
  374. package/dist/types/xlsx/xform/table/filter-column-xform.d.ts +2 -2
  375. package/dist/types/xlsx/xform/table/filter-xform.d.ts +1 -1
  376. package/dist/types/xlsx/xform/table/table-column-xform.d.ts +1 -1
  377. package/dist/types/xlsx/xform/table/table-style-info-xform.d.ts +1 -1
  378. package/dist/types/xlsx/xform/table/table-xform.d.ts +1 -1
  379. package/dist/types/xlsx/xlsx.base.d.ts +134 -0
  380. package/dist/types/xlsx/xlsx.browser.d.ts +31 -0
  381. package/dist/types/xlsx/xlsx.d.ts +20 -80
  382. package/package.json +14 -16
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Base utility functions shared between Node.js and Browser
3
+ * Platform-independent implementations only
4
+ */
5
+ export declare function delay(ms: number): Promise<void>;
6
+ export declare function nop(): void;
7
+ export declare const inherits: <T extends new (...args: any[]) => any, S extends new (...args: any[]) => any>(cls: T, superCtor: S, statics?: any, prototype?: any) => void;
8
+ export declare function dateToExcel(d: Date, date1904?: boolean): number;
9
+ export declare function excelToDate(v: number, date1904?: boolean): Date;
10
+ export declare function toIsoDateString(dt: Date): string;
11
+ interface PathInfo {
12
+ path: string;
13
+ name: string;
14
+ }
15
+ export declare function parsePath(filepath: string): PathInfo;
16
+ export declare function getRelsPath(filepath: string): string;
17
+ export declare function xmlDecode(text: string): string;
18
+ export declare function validInt(value: string | number): number;
19
+ export declare function isDateFmt(fmt: string | null | undefined): boolean;
20
+ export declare function parseBoolean(value: any): boolean;
21
+ export declare function range(start: number, stop: number, step?: number): Generator<number>;
22
+ export declare function toSortedArray(values: Iterable<any>): any[];
23
+ export declare function objectFromProps<T = any>(props: string[], value?: T | null): Record<string, T | null>;
24
+ /**
25
+ * Convert a Buffer, ArrayBuffer, or Uint8Array to a UTF-8 string
26
+ * Works in both Node.js and browser environments
27
+ */
28
+ export declare function bufferToString(chunk: ArrayBuffer | Uint8Array | string): string;
29
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Browser utility functions
3
+ * Re-exports shared utilities and adds browser-specific implementations
4
+ */
5
+ export { delay, nop, inherits, dateToExcel, excelToDate, toIsoDateString, parsePath, getRelsPath, xmlDecode, validInt, isDateFmt, parseBoolean, range, toSortedArray, objectFromProps, bufferToString } from "./utils.base";
6
+ export declare function xmlEncode(text: string): string;
7
+ export declare function fileExists(_path: string): Promise<boolean>;
8
+ import { nop, dateToExcel, excelToDate, parsePath, getRelsPath, xmlDecode, validInt, isDateFmt, toIsoDateString, parseBoolean, range, toSortedArray, objectFromProps } from "./utils.base";
9
+ /** @deprecated Import functions directly instead of using the utils object */
10
+ export declare const utils: {
11
+ nop: typeof nop;
12
+ inherits: <T extends new (...args: any[]) => any, S extends new (...args: any[]) => any>(cls: T, superCtor: S, statics?: any, prototype?: any) => void;
13
+ dateToExcel: typeof dateToExcel;
14
+ excelToDate: typeof excelToDate;
15
+ parsePath: typeof parsePath;
16
+ getRelsPath: typeof getRelsPath;
17
+ xmlEncode: typeof xmlEncode;
18
+ xmlDecode: typeof xmlDecode;
19
+ validInt: typeof validInt;
20
+ isDateFmt: typeof isDateFmt;
21
+ fs: {
22
+ exists: typeof fileExists;
23
+ };
24
+ toIsoDateString: typeof toIsoDateString;
25
+ parseBoolean: typeof parseBoolean;
26
+ range: typeof range;
27
+ toSortedArray: typeof toSortedArray;
28
+ objectFromProps: typeof objectFromProps;
29
+ };
@@ -1,24 +1,11 @@
1
- export declare function delay(ms: number): Promise<void>;
2
- export declare function nop(): void;
3
- export declare const inherits: <T extends new (...args: any[]) => any, S extends new (...args: any[]) => any>(cls: T, superCtor: S, statics?: any, prototype?: any) => void;
4
- interface PathInfo {
5
- path: string;
6
- name: string;
7
- }
8
- export declare function dateToExcel(d: Date, date1904?: boolean): number;
9
- export declare function excelToDate(v: number, date1904?: boolean): Date;
10
- export declare function parsePath(filepath: string): PathInfo;
11
- export declare function getRelsPath(filepath: string): string;
1
+ /**
2
+ * Node.js utility functions
3
+ * Re-exports shared utilities and adds Node.js-specific implementations
4
+ */
5
+ export { delay, nop, inherits, dateToExcel, excelToDate, toIsoDateString, parsePath, getRelsPath, xmlDecode, validInt, isDateFmt, parseBoolean, range, toSortedArray, objectFromProps, bufferToString } from "./utils.base";
12
6
  export declare function xmlEncode(text: string): string;
13
- export declare function xmlDecode(text: string): string;
14
- export declare function validInt(value: string | number): number;
15
- export declare function isDateFmt(fmt: string | null | undefined): boolean;
16
7
  export declare function fileExists(path: string): Promise<boolean>;
17
- export declare function toIsoDateString(dt: Date): string;
18
- export declare function parseBoolean(value: any): boolean;
19
- export declare function range(start: number, stop: number, step?: number): Generator<number>;
20
- export declare function toSortedArray(values: Iterable<any>): any[];
21
- export declare function objectFromProps<T = any>(props: string[], value?: T | null): Record<string, T | null>;
8
+ import { nop, dateToExcel, excelToDate, parsePath, getRelsPath, xmlDecode, validInt, isDateFmt, toIsoDateString, parseBoolean, range, toSortedArray, objectFromProps } from "./utils.base";
22
9
  /** @deprecated Import functions directly instead of using the utils object */
23
10
  export declare const utils: {
24
11
  nop: typeof nop;
@@ -40,9 +27,3 @@ export declare const utils: {
40
27
  toSortedArray: typeof toSortedArray;
41
28
  objectFromProps: typeof objectFromProps;
42
29
  };
43
- /**
44
- * Convert a Buffer or ArrayBuffer to a UTF-8 string
45
- * Works in both Node.js and browser environments
46
- */
47
- export declare function bufferToString(chunk: Buffer | ArrayBuffer | string): string;
48
- export {};
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Base compression utilities using Web Streams API
3
+ * Shared between Node.js and Browser implementations
4
+ *
5
+ * Uses CompressionStream/DecompressionStream API with "deflate-raw" format
6
+ * (raw DEFLATE without zlib header/trailer, required for ZIP files)
7
+ */
8
+ /**
9
+ * Compression options
10
+ */
11
+ export interface CompressOptions {
12
+ /**
13
+ * Compression level (0-9)
14
+ * - 0: No compression (STORE)
15
+ * - 1: Fastest compression
16
+ * - 6: Default compression (good balance)
17
+ * - 9: Best compression (slowest)
18
+ *
19
+ * Note: CompressionStream does not support level configuration,
20
+ * it uses a fixed level (~6)
21
+ */
22
+ level?: number;
23
+ }
24
+ /**
25
+ * Check if CompressionStream is available
26
+ */
27
+ export declare function hasCompressionStream(): boolean;
28
+ /**
29
+ * Compress using CompressionStream API
30
+ * Uses "deflate-raw" format (required for ZIP files)
31
+ *
32
+ * @param data - Data to compress
33
+ * @returns Compressed data
34
+ */
35
+ export declare function compressWithStream(data: Uint8Array): Promise<Uint8Array>;
36
+ /**
37
+ * Decompress using DecompressionStream API
38
+ *
39
+ * @param data - Compressed data (deflate-raw format)
40
+ * @returns Decompressed data
41
+ */
42
+ export declare function decompressWithStream(data: Uint8Array): Promise<Uint8Array>;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Browser compression utilities using Web Streams API
3
+ *
4
+ * Uses CompressionStream API (Chrome 80+, Firefox 113+, Safari 16.4+)
5
+ * with "deflate-raw" format (required for ZIP files)
6
+ */
7
+ import { type CompressOptions, hasCompressionStream } from "./compress.base";
8
+ export { type CompressOptions, hasCompressionStream };
9
+ /**
10
+ * Check if native zlib is available (always false in browser)
11
+ */
12
+ export declare function hasNativeZlib(): boolean;
13
+ /**
14
+ * Compress data using browser's native CompressionStream
15
+ *
16
+ * @param data - Data to compress
17
+ * @param options - Compression options
18
+ * @returns Compressed data
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const data = new TextEncoder().encode("Hello, World!");
23
+ * const compressed = await compress(data, { level: 6 });
24
+ * ```
25
+ */
26
+ export declare function compress(data: Uint8Array, options?: {
27
+ level?: number;
28
+ }): Promise<Uint8Array>;
29
+ /**
30
+ * Compress data synchronously
31
+ * Not available in browser - throws error
32
+ *
33
+ * @param _data - Data to compress
34
+ * @param _options - Compression options
35
+ * @throws Error always - sync compression not available in browser
36
+ */
37
+ export declare function compressSync(_data: Uint8Array, _options?: {
38
+ level?: number;
39
+ }): Uint8Array;
40
+ /**
41
+ * Decompress data using browser's native DecompressionStream
42
+ *
43
+ * @param data - Compressed data (deflate-raw format)
44
+ * @returns Decompressed data
45
+ */
46
+ export declare function decompress(data: Uint8Array): Promise<Uint8Array>;
47
+ /**
48
+ * Decompress data synchronously
49
+ * Not available in browser - throws error
50
+ *
51
+ * @param _data - Compressed data
52
+ * @throws Error always - sync decompression not available in browser
53
+ */
54
+ export declare function decompressSync(_data: Uint8Array): Uint8Array;
@@ -1,49 +1,16 @@
1
1
  /**
2
- * Native compression utilities using platform APIs
2
+ * Node.js compression utilities using native zlib
3
3
  *
4
- * - Node.js: Uses native zlib module (C++ implementation, fastest)
5
- * - Browser: Uses CompressionStream API (Chrome 80+, Firefox 113+, Safari 16.4+)
6
- *
7
- * Both use "deflate-raw" format which is required for ZIP files
8
- * (raw DEFLATE without zlib header/trailer)
9
- */
10
- import type * as zlibType from "zlib";
11
- /**
12
- * Compression options
13
- */
14
- export interface CompressOptions {
15
- /**
16
- * Compression level (0-9)
17
- * - 0: No compression (STORE)
18
- * - 1: Fastest compression
19
- * - 6: Default compression (good balance)
20
- * - 9: Best compression (slowest)
21
- *
22
- * Note: CompressionStream does not support level configuration,
23
- * it uses a fixed level (~6)
24
- */
25
- level?: number;
26
- }
27
- /**
28
- * Ensure zlib is loaded (Node.js only)
29
- * Call this before using sync methods if you need to guarantee availability
4
+ * Uses zlib module (C++ implementation, fastest) with "deflate-raw" format
5
+ * (raw DEFLATE without zlib header/trailer, required for ZIP files)
30
6
  */
31
- export declare function ensureZlib(): Promise<typeof zlibType | null>;
7
+ export { type CompressOptions, hasCompressionStream } from "./compress.base";
32
8
  /**
33
- * Check if native zlib is available (Node.js)
9
+ * Check if native zlib is available (always true in Node.js)
34
10
  */
35
11
  export declare function hasNativeZlib(): boolean;
36
12
  /**
37
- * Check if CompressionStream is available (Browser/Node.js 17+)
38
- */
39
- export declare function hasCompressionStream(): boolean;
40
- /**
41
- * Compress data using the best available native method
42
- *
43
- * Priority:
44
- * 1. Node.js zlib (if available) - fastest, supports compression levels
45
- * 2. CompressionStream (browser/Node.js 17+) - no level support
46
- * 3. Return uncompressed data (fallback)
13
+ * Compress data using Node.js native zlib
47
14
  *
48
15
  * @param data - Data to compress
49
16
  * @param options - Compression options
@@ -55,19 +22,21 @@ export declare function hasCompressionStream(): boolean;
55
22
  * const compressed = await compress(data, { level: 6 });
56
23
  * ```
57
24
  */
58
- export declare function compress(data: Uint8Array, options?: CompressOptions): Promise<Uint8Array>;
25
+ export declare function compress(data: Uint8Array, options?: {
26
+ level?: number;
27
+ }): Promise<Uint8Array>;
59
28
  /**
60
29
  * Compress data synchronously using Node.js zlib
61
- * Only available in Node.js environment
62
30
  *
63
31
  * @param data - Data to compress
64
32
  * @param options - Compression options
65
33
  * @returns Compressed data
66
- * @throws Error if not in Node.js environment
67
34
  */
68
- export declare function compressSync(data: Uint8Array, options?: CompressOptions): Uint8Array;
35
+ export declare function compressSync(data: Uint8Array, options?: {
36
+ level?: number;
37
+ }): Uint8Array;
69
38
  /**
70
- * Decompress data using the best available native method
39
+ * Decompress data using Node.js native zlib
71
40
  *
72
41
  * @param data - Compressed data (deflate-raw format)
73
42
  * @returns Decompressed data
@@ -78,6 +47,5 @@ export declare function decompress(data: Uint8Array): Promise<Uint8Array>;
78
47
  *
79
48
  * @param data - Compressed data (deflate-raw format)
80
49
  * @returns Decompressed data
81
- * @throws Error if not in Node.js environment
82
50
  */
83
51
  export declare function decompressSync(data: Uint8Array): Uint8Array;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * CRC32 calculation utility for ZIP files (Browser version)
3
+ *
4
+ * Uses lookup table optimization - no Node.js dependencies
5
+ *
6
+ * The polynomial used is the standard CRC-32 IEEE 802.3:
7
+ * x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
8
+ * Represented as 0xEDB88320 in reversed (LSB-first) form
9
+ */
10
+ /**
11
+ * Calculate CRC32 checksum for the given data
12
+ *
13
+ * @param data - Input data as Uint8Array
14
+ * @returns CRC32 checksum as unsigned 32-bit integer
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const data = new TextEncoder().encode("Hello, World!");
19
+ * const checksum = crc32(data);
20
+ * console.log(checksum.toString(16)); // "ec4ac3d0"
21
+ * ```
22
+ */
23
+ export declare function crc32(data: Uint8Array): number;
24
+ /**
25
+ * Ensure CRC32 is ready (no-op in browser, for API compatibility)
26
+ */
27
+ export declare function ensureCrc32(): Promise<void>;
28
+ /**
29
+ * Calculate CRC32 incrementally (useful for streaming)
30
+ * Call with initial crc of 0xffffffff, then finalize with crc32Finalize
31
+ *
32
+ * @param crc - Current CRC value (start with 0xffffffff)
33
+ * @param data - Input data chunk
34
+ * @returns Updated CRC value (not finalized)
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * let crc = 0xffffffff;
39
+ * crc = crc32Update(crc, chunk1);
40
+ * crc = crc32Update(crc, chunk2);
41
+ * const checksum = crc32Finalize(crc);
42
+ * ```
43
+ */
44
+ export declare function crc32Update(crc: number, data: Uint8Array): number;
45
+ /**
46
+ * Finalize CRC32 calculation
47
+ * XOR with 0xffffffff and convert to unsigned 32-bit
48
+ *
49
+ * @param crc - CRC value from crc32Update
50
+ * @returns Final CRC32 checksum
51
+ */
52
+ export declare function crc32Finalize(crc: number): number;
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * @example Basic usage
18
18
  * ```ts
19
- * import { createZip } from "./utils/zip/index.js";
19
+ * import { createZip } from "./utils/zip/index";
20
20
  *
21
21
  * const zipData = await createZip([
22
22
  * { name: "hello.txt", data: new TextEncoder().encode("Hello!") },
@@ -29,7 +29,7 @@
29
29
  *
30
30
  * @example Streaming usage
31
31
  * ```ts
32
- * import { ZipBuilder } from "./utils/zip/index.js";
32
+ * import { ZipBuilder } from "./utils/zip/index";
33
33
  *
34
34
  * const builder = new ZipBuilder({ level: 1 });
35
35
  *
@@ -47,6 +47,6 @@
47
47
  * }
48
48
  * ```
49
49
  */
50
- export { crc32, crc32Update, crc32Finalize } from "./crc32.js";
51
- export { compress, compressSync, decompress, decompressSync, hasNativeZlib, hasCompressionStream, type CompressOptions } from "./compress.js";
52
- export { createZip, createZipSync, ZipBuilder, type ZipEntry, type ZipOptions } from "./zip-builder.js";
50
+ export { crc32, crc32Update, crc32Finalize } from "./crc32";
51
+ export { compress, compressSync, decompress, decompressSync, hasNativeZlib, hasCompressionStream, type CompressOptions } from "./compress";
52
+ export { createZip, createZipSync, ZipBuilder, type ZipEntry, type ZipOptions } from "./zip-builder";
@@ -21,7 +21,7 @@
21
21
  * │ End of Central Directory │
22
22
  * └──────────────────────────┘
23
23
  */
24
- import { type CompressOptions } from "./compress.js";
24
+ import { type CompressOptions } from "./compress";
25
25
  /**
26
26
  * ZIP file entry
27
27
  */
@@ -0,0 +1,39 @@
1
+ interface ZipWriterOptions {
2
+ /** Compression method: "DEFLATE" (default) or "STORE" (no compression) */
3
+ compression?: "DEFLATE" | "STORE";
4
+ compressionOptions?: {
5
+ /** Compression level 0-9: 0=none, 1=fast (default), 9=best */
6
+ level?: number;
7
+ };
8
+ }
9
+ interface AppendOptions {
10
+ name: string;
11
+ base64?: boolean;
12
+ }
13
+ type EventCallback = (...args: any[]) => void;
14
+ declare class ZipWriter {
15
+ private stream;
16
+ private zipBuilder;
17
+ private finalized;
18
+ private pendingWrites;
19
+ private events;
20
+ constructor(options?: ZipWriterOptions);
21
+ on(event: string, callback: EventCallback): this;
22
+ once(event: string, callback: EventCallback): this;
23
+ off(event: string, callback: EventCallback): this;
24
+ emit(event: string, ...args: any[]): boolean;
25
+ removeListener(event: string, callback: EventCallback): this;
26
+ append(data: any, options: AppendOptions): void;
27
+ push(chunk: any): boolean;
28
+ finalize(): Promise<void>;
29
+ read(size?: number): any;
30
+ setEncoding(encoding: string): any;
31
+ pause(): any;
32
+ resume(): any;
33
+ isPaused(): boolean;
34
+ pipe(destination: any): any;
35
+ unpipe(destination?: any): void;
36
+ unshift(): void;
37
+ wrap(): void;
38
+ }
39
+ export { ZipWriter };
@@ -1,4 +1,4 @@
1
- import { XmlStream } from "../../utils/xml-stream.js";
1
+ import { XmlStream } from "../../utils/xml-stream";
2
2
  interface ParseEvent {
3
3
  eventType: string;
4
4
  value: any;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface DefinedNameModel {
3
3
  name: string;
4
4
  ranges: string[];
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface SheetModel {
3
3
  id: number;
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface CalcPropertiesModel {
3
3
  fullCalcOnLoad?: boolean;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface PivotCacheModel {
3
3
  cacheId: string;
4
4
  rId: string;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface WorkbookPropertiesModel {
3
3
  date1904?: boolean;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface WorkbookViewModel {
3
3
  x?: number;
4
4
  y?: number;
@@ -1,5 +1,5 @@
1
- import { BaseXform } from "../base-xform.js";
2
- import { StaticXform } from "../static-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
+ import { StaticXform } from "../static-xform";
3
3
  declare class WorkbookXform extends BaseXform {
4
4
  parser: any;
5
5
  constructor();
@@ -1,5 +1,5 @@
1
- import { RichTextXform } from "../strings/rich-text-xform.js";
2
- import { BaseXform } from "../base-xform.js";
1
+ import { RichTextXform } from "../strings/rich-text-xform";
2
+ import { BaseXform } from "../base-xform";
3
3
  interface NoteText {
4
4
  font?: any;
5
5
  text: string;
@@ -1,5 +1,5 @@
1
- import { BaseXform } from "../base-xform.js";
2
- import { CommentXform } from "./comment-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
+ import { CommentXform } from "./comment-xform";
3
3
  interface CommentsModel {
4
4
  comments: any[];
5
5
  }
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../../base-xform.js";
1
+ import { BaseXform } from "../../base-xform";
2
2
  declare class VmlPositionXform extends BaseXform {
3
3
  private _model;
4
4
  model: {
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../../base-xform.js";
1
+ import { BaseXform } from "../../base-xform";
2
2
  declare class VmlProtectionXform extends BaseXform {
3
3
  private _model;
4
4
  private text;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface AnchorModel {
3
3
  left: number;
4
4
  top: number;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface Protection {
3
3
  locked?: string;
4
4
  lockText?: string;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface VmlNotesModel {
3
3
  comments: any[];
4
4
  }
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface ShapeModel {
3
3
  note: {
4
4
  margins?: {
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface Margins {
3
3
  inset?: number[] | string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "./base-xform.js";
1
+ import { BaseXform } from "./base-xform";
2
2
  declare class CompositeXform extends BaseXform {
3
3
  parser?: any;
4
4
  createNewModel(_node?: any): any;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  declare class AppHeadingPairsXform extends BaseXform {
3
3
  render(xmlStream: any, model: any[]): void;
4
4
  parseOpen(node: any): boolean;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  declare class AppTitlesOfPartsXform extends BaseXform {
3
3
  render(xmlStream: any, model: any[]): void;
4
4
  parseOpen(node: any): boolean;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface AppModel {
3
3
  worksheets: any[];
4
4
  company?: string;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  declare class ContentTypesXform extends BaseXform {
3
3
  render(xmlStream: any, model: any): void;
4
4
  parseOpen(): boolean;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface CoreModel {
3
3
  creator?: string;
4
4
  title?: string;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface RelationshipModel {
3
3
  Id?: string;
4
4
  Type?: string;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  declare class RelationshipsXform extends BaseXform {
3
3
  parser: any;
4
4
  private _values?;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  declare abstract class BaseCellAnchorXform extends BaseXform {
3
3
  map: {
4
4
  [key: string]: any;
@@ -1,5 +1,5 @@
1
- import { BaseXform } from "../base-xform.js";
2
- import { BlipXform } from "./blip-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
+ import { BlipXform } from "./blip-xform";
3
3
  declare class BlipFillXform extends BaseXform {
4
4
  map: {
5
5
  [key: string]: BlipXform;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface BlipModel {
3
3
  rId: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  declare class CNvPicPrXform extends BaseXform {
3
3
  get tag(): string;
4
4
  render(xmlStream: any): void;
@@ -1,4 +1,4 @@
1
- import { BaseXform } from "../base-xform.js";
1
+ import { BaseXform } from "../base-xform";
2
2
  interface CNvPrModel {
3
3
  index: number;
4
4
  }