@rowsncolumns/spreadsheet-state 28.0.66

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 (1541) hide show
  1. package/LICENSE.md +100 -0
  2. package/Readme.md +65 -0
  3. package/dist/cjs/api/border.d.ts +9 -0
  4. package/dist/cjs/api/border.d.ts.map +1 -0
  5. package/dist/cjs/api/border.js +25 -0
  6. package/dist/cjs/api/conditional-format.d.ts +2 -0
  7. package/dist/cjs/api/conditional-format.d.ts.map +1 -0
  8. package/dist/cjs/api/conditional-format.js +5 -0
  9. package/dist/cjs/api/copy-paste.d.ts +20 -0
  10. package/dist/cjs/api/copy-paste.d.ts.map +1 -0
  11. package/dist/cjs/api/copy-paste.js +384 -0
  12. package/dist/cjs/api/data-validation.d.ts +2 -0
  13. package/dist/cjs/api/data-validation.d.ts.map +1 -0
  14. package/dist/cjs/api/data-validation.js +5 -0
  15. package/dist/cjs/api/datatype.d.ts +89 -0
  16. package/dist/cjs/api/datatype.d.ts.map +1 -0
  17. package/dist/cjs/api/datatype.js +671 -0
  18. package/dist/cjs/api/date.d.ts +27 -0
  19. package/dist/cjs/api/date.d.ts.map +1 -0
  20. package/dist/cjs/api/date.js +222 -0
  21. package/dist/cjs/api/decimals.d.ts +10 -0
  22. package/dist/cjs/api/decimals.d.ts.map +1 -0
  23. package/dist/cjs/api/decimals.js +192 -0
  24. package/dist/cjs/api/dependency.d.ts +64 -0
  25. package/dist/cjs/api/dependency.d.ts.map +1 -0
  26. package/dist/cjs/api/dependency.js +279 -0
  27. package/dist/cjs/api/fill.d.ts +88 -0
  28. package/dist/cjs/api/fill.d.ts.map +1 -0
  29. package/dist/cjs/api/fill.js +959 -0
  30. package/dist/cjs/api/filter-range.d.ts +4 -0
  31. package/dist/cjs/api/filter-range.d.ts.map +1 -0
  32. package/dist/cjs/api/filter-range.js +101 -0
  33. package/dist/cjs/api/filter.d.ts +24 -0
  34. package/dist/cjs/api/filter.d.ts.map +1 -0
  35. package/dist/cjs/api/filter.js +66 -0
  36. package/dist/cjs/api/format-caches.d.ts +43 -0
  37. package/dist/cjs/api/format-caches.d.ts.map +1 -0
  38. package/dist/cjs/api/format-caches.js +107 -0
  39. package/dist/cjs/api/formula.d.ts +69 -0
  40. package/dist/cjs/api/formula.d.ts.map +1 -0
  41. package/dist/cjs/api/formula.js +458 -0
  42. package/dist/cjs/api/immer-utils.d.ts +66 -0
  43. package/dist/cjs/api/immer-utils.d.ts.map +1 -0
  44. package/dist/cjs/api/immer-utils.js +1633 -0
  45. package/dist/cjs/api/intl.d.ts +51 -0
  46. package/dist/cjs/api/intl.d.ts.map +1 -0
  47. package/dist/cjs/api/intl.js +261 -0
  48. package/dist/cjs/api/merges.d.ts +7 -0
  49. package/dist/cjs/api/merges.d.ts.map +1 -0
  50. package/dist/cjs/api/merges.js +134 -0
  51. package/dist/cjs/api/outline.d.ts +33 -0
  52. package/dist/cjs/api/outline.d.ts.map +1 -0
  53. package/dist/cjs/api/outline.js +70 -0
  54. package/dist/cjs/api/parse-html.d.ts +15 -0
  55. package/dist/cjs/api/parse-html.d.ts.map +1 -0
  56. package/dist/cjs/api/parse-html.js +1066 -0
  57. package/dist/cjs/api/patches.d.ts +11 -0
  58. package/dist/cjs/api/patches.d.ts.map +1 -0
  59. package/dist/cjs/api/patches.js +218 -0
  60. package/dist/cjs/api/pivot-range.d.ts +8 -0
  61. package/dist/cjs/api/pivot-range.d.ts.map +1 -0
  62. package/dist/cjs/api/pivot-range.js +130 -0
  63. package/dist/cjs/api/range-rule-helpers.d.ts +65 -0
  64. package/dist/cjs/api/range-rule-helpers.d.ts.map +1 -0
  65. package/dist/cjs/api/range-rule-helpers.js +142 -0
  66. package/dist/cjs/api/range.d.ts +19 -0
  67. package/dist/cjs/api/range.d.ts.map +1 -0
  68. package/dist/cjs/api/range.js +183 -0
  69. package/dist/cjs/api/rename-sheet.d.ts +22 -0
  70. package/dist/cjs/api/rename-sheet.d.ts.map +1 -0
  71. package/dist/cjs/api/rename-sheet.js +54 -0
  72. package/dist/cjs/api/selection.d.ts +36 -0
  73. package/dist/cjs/api/selection.d.ts.map +1 -0
  74. package/dist/cjs/api/selection.js +133 -0
  75. package/dist/cjs/api/sort.d.ts +3 -0
  76. package/dist/cjs/api/sort.d.ts.map +1 -0
  77. package/dist/cjs/api/sort.js +33 -0
  78. package/dist/cjs/api/split-text.d.ts +2 -0
  79. package/dist/cjs/api/split-text.d.ts.map +1 -0
  80. package/dist/cjs/api/split-text.js +25 -0
  81. package/dist/cjs/api/structural-formula-update.d.ts +75 -0
  82. package/dist/cjs/api/structural-formula-update.d.ts.map +1 -0
  83. package/dist/cjs/api/structural-formula-update.js +508 -0
  84. package/dist/cjs/api/table.d.ts +39 -0
  85. package/dist/cjs/api/table.d.ts.map +1 -0
  86. package/dist/cjs/api/table.js +337 -0
  87. package/dist/cjs/api/validation.d.ts +12 -0
  88. package/dist/cjs/api/validation.d.ts.map +1 -0
  89. package/dist/cjs/api/validation.js +306 -0
  90. package/dist/cjs/api/xlsx-source.d.ts +22 -0
  91. package/dist/cjs/api/xlsx-source.d.ts.map +1 -0
  92. package/dist/cjs/api/xlsx-source.js +31 -0
  93. package/dist/cjs/atoms/delete-sheet-atom.d.ts +6 -0
  94. package/dist/cjs/atoms/delete-sheet-atom.d.ts.map +1 -0
  95. package/dist/cjs/atoms/delete-sheet-atom.js +4 -0
  96. package/dist/cjs/atoms/dialog-state.atom.d.ts +23 -0
  97. package/dist/cjs/atoms/dialog-state.atom.d.ts.map +1 -0
  98. package/dist/cjs/atoms/dialog-state.atom.js +72 -0
  99. package/dist/cjs/atoms/editing-data-validation-id.atom.d.ts +7 -0
  100. package/dist/cjs/atoms/editing-data-validation-id.atom.d.ts.map +1 -0
  101. package/dist/cjs/atoms/editing-data-validation-id.atom.js +12 -0
  102. package/dist/cjs/atoms/editing-embed.atom.d.ts +8 -0
  103. package/dist/cjs/atoms/editing-embed.atom.d.ts.map +1 -0
  104. package/dist/cjs/atoms/editing-embed.atom.js +5 -0
  105. package/dist/cjs/atoms/editing-table.atom.d.ts +8 -0
  106. package/dist/cjs/atoms/editing-table.atom.d.ts.map +1 -0
  107. package/dist/cjs/atoms/editing-table.atom.js +6 -0
  108. package/dist/cjs/atoms/error-state.atom.d.ts +10 -0
  109. package/dist/cjs/atoms/error-state.atom.d.ts.map +1 -0
  110. package/dist/cjs/atoms/error-state.atom.js +5 -0
  111. package/dist/cjs/atoms/index.d.ts +5 -0
  112. package/dist/cjs/atoms/index.d.ts.map +1 -0
  113. package/dist/cjs/atoms/index.js +4 -0
  114. package/dist/cjs/atoms/insert-image-state.atom.d.ts +6 -0
  115. package/dist/cjs/atoms/insert-image-state.atom.d.ts.map +1 -0
  116. package/dist/cjs/atoms/insert-image-state.atom.js +9 -0
  117. package/dist/cjs/atoms/named-range.atom.d.ts +8 -0
  118. package/dist/cjs/atoms/named-range.atom.d.ts.map +1 -0
  119. package/dist/cjs/atoms/named-range.atom.js +6 -0
  120. package/dist/cjs/atoms/resize-dimension.atom.d.ts +12 -0
  121. package/dist/cjs/atoms/resize-dimension.atom.d.ts.map +1 -0
  122. package/dist/cjs/atoms/resize-dimension.atom.js +5 -0
  123. package/dist/cjs/atoms/sheet-observer.atom.d.ts +16 -0
  124. package/dist/cjs/atoms/sheet-observer.atom.d.ts.map +1 -0
  125. package/dist/cjs/atoms/sheet-observer.atom.js +19 -0
  126. package/dist/cjs/cellxfs-registry.d.ts +37 -0
  127. package/dist/cjs/cellxfs-registry.d.ts.map +1 -0
  128. package/dist/cjs/cellxfs-registry.js +175 -0
  129. package/dist/cjs/commands.d.ts +691 -0
  130. package/dist/cjs/commands.d.ts.map +1 -0
  131. package/dist/cjs/commands.js +1 -0
  132. package/dist/cjs/components/dialogs/delete-sheet-confirmation.d.ts +7 -0
  133. package/dist/cjs/components/dialogs/delete-sheet-confirmation.d.ts.map +1 -0
  134. package/dist/cjs/components/dialogs/delete-sheet-confirmation.js +31 -0
  135. package/dist/cjs/components/dialogs/error-state.d.ts +3 -0
  136. package/dist/cjs/components/dialogs/error-state.d.ts.map +1 -0
  137. package/dist/cjs/components/dialogs/error-state.js +24 -0
  138. package/dist/cjs/components/editors/cell-format-editor.d.ts +26 -0
  139. package/dist/cjs/components/editors/cell-format-editor.d.ts.map +1 -0
  140. package/dist/cjs/components/editors/cell-format-editor.js +671 -0
  141. package/dist/cjs/components/editors/conditional-format-editor.d.ts +43 -0
  142. package/dist/cjs/components/editors/conditional-format-editor.d.ts.map +1 -0
  143. package/dist/cjs/components/editors/conditional-format-editor.js +176 -0
  144. package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts +27 -0
  145. package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts.map +1 -0
  146. package/dist/cjs/components/editors/conditional-format-rule-editor.js +640 -0
  147. package/dist/cjs/components/editors/data-validation-editor.d.ts +27 -0
  148. package/dist/cjs/components/editors/data-validation-editor.d.ts.map +1 -0
  149. package/dist/cjs/components/editors/data-validation-editor.js +163 -0
  150. package/dist/cjs/components/editors/data-validation-rule-editor.d.ts +17 -0
  151. package/dist/cjs/components/editors/data-validation-rule-editor.d.ts.map +1 -0
  152. package/dist/cjs/components/editors/data-validation-rule-editor.js +217 -0
  153. package/dist/cjs/components/editors/embed-editor.d.ts +19 -0
  154. package/dist/cjs/components/editors/embed-editor.d.ts.map +1 -0
  155. package/dist/cjs/components/editors/embed-editor.js +80 -0
  156. package/dist/cjs/components/editors/insert-image-editor.d.ts +20 -0
  157. package/dist/cjs/components/editors/insert-image-editor.d.ts.map +1 -0
  158. package/dist/cjs/components/editors/insert-image-editor.js +78 -0
  159. package/dist/cjs/components/editors/insert-link-editor.d.ts +20 -0
  160. package/dist/cjs/components/editors/insert-link-editor.d.ts.map +1 -0
  161. package/dist/cjs/components/editors/insert-link-editor.js +64 -0
  162. package/dist/cjs/components/editors/named-range-editor.d.ts +13 -0
  163. package/dist/cjs/components/editors/named-range-editor.d.ts.map +1 -0
  164. package/dist/cjs/components/editors/named-range-editor.js +106 -0
  165. package/dist/cjs/components/editors/resize-dimension-editor.d.ts +9 -0
  166. package/dist/cjs/components/editors/resize-dimension-editor.d.ts.map +1 -0
  167. package/dist/cjs/components/editors/resize-dimension-editor.js +62 -0
  168. package/dist/cjs/components/editors/sheet-filter.d.ts +59 -0
  169. package/dist/cjs/components/editors/sheet-filter.d.ts.map +1 -0
  170. package/dist/cjs/components/editors/sheet-filter.js +119 -0
  171. package/dist/cjs/components/editors/table-editor.d.ts +12 -0
  172. package/dist/cjs/components/editors/table-editor.d.ts.map +1 -0
  173. package/dist/cjs/components/editors/table-editor.js +105 -0
  174. package/dist/cjs/components/index.d.ts +13 -0
  175. package/dist/cjs/components/index.d.ts.map +1 -0
  176. package/dist/cjs/components/index.js +12 -0
  177. package/dist/cjs/generated-names.d.ts +51 -0
  178. package/dist/cjs/generated-names.d.ts.map +1 -0
  179. package/dist/cjs/generated-names.js +5 -0
  180. package/dist/cjs/helpers/iterative-calculation.d.ts +4 -0
  181. package/dist/cjs/helpers/iterative-calculation.d.ts.map +1 -0
  182. package/dist/cjs/helpers/iterative-calculation.js +44 -0
  183. package/dist/cjs/helpers/sheet-title.d.ts +5 -0
  184. package/dist/cjs/helpers/sheet-title.d.ts.map +1 -0
  185. package/dist/cjs/helpers/sheet-title.js +11 -0
  186. package/dist/cjs/helpers.d.ts +45 -0
  187. package/dist/cjs/helpers.d.ts.map +1 -0
  188. package/dist/cjs/helpers.js +154 -0
  189. package/dist/cjs/hooks/use-async-datasource.d.ts +57 -0
  190. package/dist/cjs/hooks/use-async-datasource.d.ts.map +1 -0
  191. package/dist/cjs/hooks/use-async-datasource.js +329 -0
  192. package/dist/cjs/hooks/use-calculation-initialize.d.ts +61 -0
  193. package/dist/cjs/hooks/use-calculation-initialize.d.ts.map +1 -0
  194. package/dist/cjs/hooks/use-calculation-initialize.js +800 -0
  195. package/dist/cjs/hooks/use-calculation-process-array.d.ts +20 -0
  196. package/dist/cjs/hooks/use-calculation-process-array.d.ts.map +1 -0
  197. package/dist/cjs/hooks/use-calculation-process-array.js +331 -0
  198. package/dist/cjs/hooks/use-calculation-queue.d.ts +10 -0
  199. package/dist/cjs/hooks/use-calculation-queue.d.ts.map +1 -0
  200. package/dist/cjs/hooks/use-calculation-queue.js +15 -0
  201. package/dist/cjs/hooks/use-calculation-worker.d.ts +37 -0
  202. package/dist/cjs/hooks/use-calculation-worker.d.ts.map +1 -0
  203. package/dist/cjs/hooks/use-calculation-worker.js +1868 -0
  204. package/dist/cjs/hooks/use-calculation.d.ts +173 -0
  205. package/dist/cjs/hooks/use-calculation.d.ts.map +1 -0
  206. package/dist/cjs/hooks/use-calculation.js +2735 -0
  207. package/dist/cjs/hooks/use-can-edit-cellrange.d.ts +31 -0
  208. package/dist/cjs/hooks/use-can-edit-cellrange.d.ts.map +1 -0
  209. package/dist/cjs/hooks/use-can-edit-cellrange.js +86 -0
  210. package/dist/cjs/hooks/use-cellxfs-registry.d.ts +6 -0
  211. package/dist/cjs/hooks/use-cellxfs-registry.d.ts.map +1 -0
  212. package/dist/cjs/hooks/use-cellxfs-registry.js +22 -0
  213. package/dist/cjs/hooks/use-citations.d.ts +19 -0
  214. package/dist/cjs/hooks/use-citations.d.ts.map +1 -0
  215. package/dist/cjs/hooks/use-citations.js +62 -0
  216. package/dist/cjs/hooks/use-comments.d.ts +14 -0
  217. package/dist/cjs/hooks/use-comments.d.ts.map +1 -0
  218. package/dist/cjs/hooks/use-comments.js +49 -0
  219. package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts +22 -0
  220. package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts.map +1 -0
  221. package/dist/cjs/hooks/use-conditional-formatting-rules.js +95 -0
  222. package/dist/cjs/hooks/use-data-validation-rules.d.ts +54 -0
  223. package/dist/cjs/hooks/use-data-validation-rules.d.ts.map +1 -0
  224. package/dist/cjs/hooks/use-data-validation-rules.js +151 -0
  225. package/dist/cjs/hooks/use-deferred-calculation-flush.d.ts +14 -0
  226. package/dist/cjs/hooks/use-deferred-calculation-flush.d.ts.map +1 -0
  227. package/dist/cjs/hooks/use-deferred-calculation-flush.js +81 -0
  228. package/dist/cjs/hooks/use-idle-scheduler.d.ts +5 -0
  229. package/dist/cjs/hooks/use-idle-scheduler.d.ts.map +1 -0
  230. package/dist/cjs/hooks/use-idle-scheduler.js +46 -0
  231. package/dist/cjs/hooks/use-indent.d.ts +23 -0
  232. package/dist/cjs/hooks/use-indent.d.ts.map +1 -0
  233. package/dist/cjs/hooks/use-indent.js +98 -0
  234. package/dist/cjs/hooks/use-named-range.d.ts +7 -0
  235. package/dist/cjs/hooks/use-named-range.d.ts.map +1 -0
  236. package/dist/cjs/hooks/use-named-range.js +70 -0
  237. package/dist/cjs/hooks/use-on-adjust-row-height.d.ts +11 -0
  238. package/dist/cjs/hooks/use-on-adjust-row-height.d.ts.map +1 -0
  239. package/dist/cjs/hooks/use-on-adjust-row-height.js +66 -0
  240. package/dist/cjs/hooks/use-on-autoresize.d.ts +17 -0
  241. package/dist/cjs/hooks/use-on-autoresize.d.ts.map +1 -0
  242. package/dist/cjs/hooks/use-on-autoresize.js +39 -0
  243. package/dist/cjs/hooks/use-on-banded-ranges.d.ts +15 -0
  244. package/dist/cjs/hooks/use-on-banded-ranges.d.ts.map +1 -0
  245. package/dist/cjs/hooks/use-on-banded-ranges.js +38 -0
  246. package/dist/cjs/hooks/use-on-calculation-begin.d.ts +14 -0
  247. package/dist/cjs/hooks/use-on-calculation-begin.d.ts.map +1 -0
  248. package/dist/cjs/hooks/use-on-calculation-begin.js +36 -0
  249. package/dist/cjs/hooks/use-on-calculation-success.d.ts +22 -0
  250. package/dist/cjs/hooks/use-on-calculation-success.d.ts.map +1 -0
  251. package/dist/cjs/hooks/use-on-calculation-success.js +182 -0
  252. package/dist/cjs/hooks/use-on-change-batch-stream.d.ts +7 -0
  253. package/dist/cjs/hooks/use-on-change-batch-stream.d.ts.map +1 -0
  254. package/dist/cjs/hooks/use-on-change-batch-stream.js +59 -0
  255. package/dist/cjs/hooks/use-on-change-batch.d.ts +54 -0
  256. package/dist/cjs/hooks/use-on-change-batch.d.ts.map +1 -0
  257. package/dist/cjs/hooks/use-on-change-batch.js +124 -0
  258. package/dist/cjs/hooks/use-on-change-calculated-column.d.ts +23 -0
  259. package/dist/cjs/hooks/use-on-change-calculated-column.d.ts.map +1 -0
  260. package/dist/cjs/hooks/use-on-change-calculated-column.js +30 -0
  261. package/dist/cjs/hooks/use-on-change-decimals.d.ts +22 -0
  262. package/dist/cjs/hooks/use-on-change-decimals.d.ts.map +1 -0
  263. package/dist/cjs/hooks/use-on-change-decimals.js +47 -0
  264. package/dist/cjs/hooks/use-on-change-formatting.d.ts +44 -0
  265. package/dist/cjs/hooks/use-on-change-formatting.d.ts.map +1 -0
  266. package/dist/cjs/hooks/use-on-change-formatting.js +165 -0
  267. package/dist/cjs/hooks/use-on-change-sheet-tabcolor.d.ts +11 -0
  268. package/dist/cjs/hooks/use-on-change-sheet-tabcolor.d.ts.map +1 -0
  269. package/dist/cjs/hooks/use-on-change-sheet-tabcolor.js +27 -0
  270. package/dist/cjs/hooks/use-on-change-table-column.d.ts +25 -0
  271. package/dist/cjs/hooks/use-on-change-table-column.d.ts.map +1 -0
  272. package/dist/cjs/hooks/use-on-change-table-column.js +53 -0
  273. package/dist/cjs/hooks/use-on-change-theme.d.ts +11 -0
  274. package/dist/cjs/hooks/use-on-change-theme.d.ts.map +1 -0
  275. package/dist/cjs/hooks/use-on-change-theme.js +20 -0
  276. package/dist/cjs/hooks/use-on-change.d.ts +61 -0
  277. package/dist/cjs/hooks/use-on-change.d.ts.map +1 -0
  278. package/dist/cjs/hooks/use-on-change.js +298 -0
  279. package/dist/cjs/hooks/use-on-clear-formatting.d.ts +17 -0
  280. package/dist/cjs/hooks/use-on-clear-formatting.d.ts.map +1 -0
  281. package/dist/cjs/hooks/use-on-clear-formatting.js +46 -0
  282. package/dist/cjs/hooks/use-on-collapse-column-group.d.ts +11 -0
  283. package/dist/cjs/hooks/use-on-collapse-column-group.d.ts.map +1 -0
  284. package/dist/cjs/hooks/use-on-collapse-column-group.js +47 -0
  285. package/dist/cjs/hooks/use-on-collapse-row-group.d.ts +18 -0
  286. package/dist/cjs/hooks/use-on-collapse-row-group.d.ts.map +1 -0
  287. package/dist/cjs/hooks/use-on-collapse-row-group.js +57 -0
  288. package/dist/cjs/hooks/use-on-copy.d.ts +49 -0
  289. package/dist/cjs/hooks/use-on-copy.d.ts.map +1 -0
  290. package/dist/cjs/hooks/use-on-copy.js +325 -0
  291. package/dist/cjs/hooks/use-on-create-named-range.d.ts +13 -0
  292. package/dist/cjs/hooks/use-on-create-named-range.d.ts.map +1 -0
  293. package/dist/cjs/hooks/use-on-create-named-range.js +33 -0
  294. package/dist/cjs/hooks/use-on-create-sheet.d.ts +23 -0
  295. package/dist/cjs/hooks/use-on-create-sheet.d.ts.map +1 -0
  296. package/dist/cjs/hooks/use-on-create-sheet.js +66 -0
  297. package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts +28 -0
  298. package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -0
  299. package/dist/cjs/hooks/use-on-delete-cells-shift-left.js +66 -0
  300. package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts +28 -0
  301. package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -0
  302. package/dist/cjs/hooks/use-on-delete-cells-shift-up.js +66 -0
  303. package/dist/cjs/hooks/use-on-delete-column.d.ts +38 -0
  304. package/dist/cjs/hooks/use-on-delete-column.d.ts.map +1 -0
  305. package/dist/cjs/hooks/use-on-delete-column.js +87 -0
  306. package/dist/cjs/hooks/use-on-delete-named-range.d.ts +14 -0
  307. package/dist/cjs/hooks/use-on-delete-named-range.d.ts.map +1 -0
  308. package/dist/cjs/hooks/use-on-delete-named-range.js +23 -0
  309. package/dist/cjs/hooks/use-on-delete-row.d.ts +38 -0
  310. package/dist/cjs/hooks/use-on-delete-row.d.ts.map +1 -0
  311. package/dist/cjs/hooks/use-on-delete-row.js +87 -0
  312. package/dist/cjs/hooks/use-on-delete-sheet.d.ts +16 -0
  313. package/dist/cjs/hooks/use-on-delete-sheet.d.ts.map +1 -0
  314. package/dist/cjs/hooks/use-on-delete-sheet.js +37 -0
  315. package/dist/cjs/hooks/use-on-delete-table-row.d.ts +29 -0
  316. package/dist/cjs/hooks/use-on-delete-table-row.d.ts.map +1 -0
  317. package/dist/cjs/hooks/use-on-delete-table-row.js +56 -0
  318. package/dist/cjs/hooks/use-on-delete.d.ts +33 -0
  319. package/dist/cjs/hooks/use-on-delete.d.ts.map +1 -0
  320. package/dist/cjs/hooks/use-on-delete.js +60 -0
  321. package/dist/cjs/hooks/use-on-drag-n-drop.d.ts +55 -0
  322. package/dist/cjs/hooks/use-on-drag-n-drop.d.ts.map +1 -0
  323. package/dist/cjs/hooks/use-on-drag-n-drop.js +191 -0
  324. package/dist/cjs/hooks/use-on-duplicate-sheet.d.ts +29 -0
  325. package/dist/cjs/hooks/use-on-duplicate-sheet.d.ts.map +1 -0
  326. package/dist/cjs/hooks/use-on-duplicate-sheet.js +65 -0
  327. package/dist/cjs/hooks/use-on-embeds.d.ts +19 -0
  328. package/dist/cjs/hooks/use-on-embeds.d.ts.map +1 -0
  329. package/dist/cjs/hooks/use-on-embeds.js +87 -0
  330. package/dist/cjs/hooks/use-on-expand-column-group.d.ts +11 -0
  331. package/dist/cjs/hooks/use-on-expand-column-group.d.ts.map +1 -0
  332. package/dist/cjs/hooks/use-on-expand-column-group.js +45 -0
  333. package/dist/cjs/hooks/use-on-expand-row-group.d.ts +18 -0
  334. package/dist/cjs/hooks/use-on-expand-row-group.d.ts.map +1 -0
  335. package/dist/cjs/hooks/use-on-expand-row-group.js +52 -0
  336. package/dist/cjs/hooks/use-on-fill-range.d.ts +9 -0
  337. package/dist/cjs/hooks/use-on-fill-range.d.ts.map +1 -0
  338. package/dist/cjs/hooks/use-on-fill-range.js +55 -0
  339. package/dist/cjs/hooks/use-on-fill.d.ts +29 -0
  340. package/dist/cjs/hooks/use-on-fill.d.ts.map +1 -0
  341. package/dist/cjs/hooks/use-on-fill.js +78 -0
  342. package/dist/cjs/hooks/use-on-filter-table.d.ts +76 -0
  343. package/dist/cjs/hooks/use-on-filter-table.d.ts.map +1 -0
  344. package/dist/cjs/hooks/use-on-filter-table.js +429 -0
  345. package/dist/cjs/hooks/use-on-find-replace.d.ts +19 -0
  346. package/dist/cjs/hooks/use-on-find-replace.d.ts.map +1 -0
  347. package/dist/cjs/hooks/use-on-find-replace.js +150 -0
  348. package/dist/cjs/hooks/use-on-freeze.d.ts +13 -0
  349. package/dist/cjs/hooks/use-on-freeze.d.ts.map +1 -0
  350. package/dist/cjs/hooks/use-on-freeze.js +56 -0
  351. package/dist/cjs/hooks/use-on-group-columns.d.ts +11 -0
  352. package/dist/cjs/hooks/use-on-group-columns.d.ts.map +1 -0
  353. package/dist/cjs/hooks/use-on-group-columns.js +49 -0
  354. package/dist/cjs/hooks/use-on-group-rows.d.ts +17 -0
  355. package/dist/cjs/hooks/use-on-group-rows.d.ts.map +1 -0
  356. package/dist/cjs/hooks/use-on-group-rows.js +55 -0
  357. package/dist/cjs/hooks/use-on-hide-column.d.ts +23 -0
  358. package/dist/cjs/hooks/use-on-hide-column.d.ts.map +1 -0
  359. package/dist/cjs/hooks/use-on-hide-column.js +55 -0
  360. package/dist/cjs/hooks/use-on-hide-row.d.ts +32 -0
  361. package/dist/cjs/hooks/use-on-hide-row.d.ts.map +1 -0
  362. package/dist/cjs/hooks/use-on-hide-row.js +58 -0
  363. package/dist/cjs/hooks/use-on-hide-show-sheet.d.ts +18 -0
  364. package/dist/cjs/hooks/use-on-hide-show-sheet.d.ts.map +1 -0
  365. package/dist/cjs/hooks/use-on-hide-show-sheet.js +90 -0
  366. package/dist/cjs/hooks/use-on-import-csv-legacy.d.ts +8 -0
  367. package/dist/cjs/hooks/use-on-import-csv-legacy.d.ts.map +1 -0
  368. package/dist/cjs/hooks/use-on-import-csv-legacy.js +165 -0
  369. package/dist/cjs/hooks/use-on-import-csv.d.ts +28 -0
  370. package/dist/cjs/hooks/use-on-import-csv.d.ts.map +1 -0
  371. package/dist/cjs/hooks/use-on-import-csv.js +332 -0
  372. package/dist/cjs/hooks/use-on-import-excel.d.ts +67 -0
  373. package/dist/cjs/hooks/use-on-import-excel.d.ts.map +1 -0
  374. package/dist/cjs/hooks/use-on-import-excel.js +689 -0
  375. package/dist/cjs/hooks/use-on-insert-autosum.d.ts +9 -0
  376. package/dist/cjs/hooks/use-on-insert-autosum.d.ts.map +1 -0
  377. package/dist/cjs/hooks/use-on-insert-autosum.js +105 -0
  378. package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts +28 -0
  379. package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -0
  380. package/dist/cjs/hooks/use-on-insert-cells-shift-down.js +66 -0
  381. package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts +28 -0
  382. package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -0
  383. package/dist/cjs/hooks/use-on-insert-cells-shift-right.js +66 -0
  384. package/dist/cjs/hooks/use-on-insert-checkbox.d.ts +17 -0
  385. package/dist/cjs/hooks/use-on-insert-checkbox.d.ts.map +1 -0
  386. package/dist/cjs/hooks/use-on-insert-checkbox.js +87 -0
  387. package/dist/cjs/hooks/use-on-insert-column.d.ts +40 -0
  388. package/dist/cjs/hooks/use-on-insert-column.d.ts.map +1 -0
  389. package/dist/cjs/hooks/use-on-insert-column.js +93 -0
  390. package/dist/cjs/hooks/use-on-insert-date-time.d.ts +4 -0
  391. package/dist/cjs/hooks/use-on-insert-date-time.d.ts.map +1 -0
  392. package/dist/cjs/hooks/use-on-insert-date-time.js +12 -0
  393. package/dist/cjs/hooks/use-on-insert-date.d.ts +4 -0
  394. package/dist/cjs/hooks/use-on-insert-date.d.ts.map +1 -0
  395. package/dist/cjs/hooks/use-on-insert-date.js +13 -0
  396. package/dist/cjs/hooks/use-on-insert-image.d.ts +24 -0
  397. package/dist/cjs/hooks/use-on-insert-image.d.ts.map +1 -0
  398. package/dist/cjs/hooks/use-on-insert-image.js +145 -0
  399. package/dist/cjs/hooks/use-on-insert-link.d.ts +25 -0
  400. package/dist/cjs/hooks/use-on-insert-link.d.ts.map +1 -0
  401. package/dist/cjs/hooks/use-on-insert-link.js +220 -0
  402. package/dist/cjs/hooks/use-on-insert-note.d.ts +4 -0
  403. package/dist/cjs/hooks/use-on-insert-note.d.ts.map +1 -0
  404. package/dist/cjs/hooks/use-on-insert-note.js +14 -0
  405. package/dist/cjs/hooks/use-on-insert-row.d.ts +38 -0
  406. package/dist/cjs/hooks/use-on-insert-row.d.ts.map +1 -0
  407. package/dist/cjs/hooks/use-on-insert-row.js +106 -0
  408. package/dist/cjs/hooks/use-on-insert-table-row.d.ts +31 -0
  409. package/dist/cjs/hooks/use-on-insert-table-row.d.ts.map +1 -0
  410. package/dist/cjs/hooks/use-on-insert-table-row.js +60 -0
  411. package/dist/cjs/hooks/use-on-insert-time.d.ts +4 -0
  412. package/dist/cjs/hooks/use-on-insert-time.d.ts.map +1 -0
  413. package/dist/cjs/hooks/use-on-insert-time.js +12 -0
  414. package/dist/cjs/hooks/use-on-locale-change.d.ts +35 -0
  415. package/dist/cjs/hooks/use-on-locale-change.d.ts.map +1 -0
  416. package/dist/cjs/hooks/use-on-locale-change.js +314 -0
  417. package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts +28 -0
  418. package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -0
  419. package/dist/cjs/hooks/use-on-merge-unmerge-cells.js +366 -0
  420. package/dist/cjs/hooks/use-on-move-columns.d.ts +28 -0
  421. package/dist/cjs/hooks/use-on-move-columns.d.ts.map +1 -0
  422. package/dist/cjs/hooks/use-on-move-columns.js +378 -0
  423. package/dist/cjs/hooks/use-on-move-rows.d.ts +30 -0
  424. package/dist/cjs/hooks/use-on-move-rows.d.ts.map +1 -0
  425. package/dist/cjs/hooks/use-on-move-rows.js +293 -0
  426. package/dist/cjs/hooks/use-on-move-selection.d.ts +35 -0
  427. package/dist/cjs/hooks/use-on-move-selection.d.ts.map +1 -0
  428. package/dist/cjs/hooks/use-on-move-selection.js +477 -0
  429. package/dist/cjs/hooks/use-on-move-sheet.d.ts +12 -0
  430. package/dist/cjs/hooks/use-on-move-sheet.d.ts.map +1 -0
  431. package/dist/cjs/hooks/use-on-move-sheet.js +68 -0
  432. package/dist/cjs/hooks/use-on-move-table-columns.d.ts +21 -0
  433. package/dist/cjs/hooks/use-on-move-table-columns.d.ts.map +1 -0
  434. package/dist/cjs/hooks/use-on-move-table-columns.js +249 -0
  435. package/dist/cjs/hooks/use-on-paste.d.ts +79 -0
  436. package/dist/cjs/hooks/use-on-paste.d.ts.map +1 -0
  437. package/dist/cjs/hooks/use-on-paste.js +985 -0
  438. package/dist/cjs/hooks/use-on-protect-range.d.ts +20 -0
  439. package/dist/cjs/hooks/use-on-protect-range.d.ts.map +1 -0
  440. package/dist/cjs/hooks/use-on-protect-range.js +67 -0
  441. package/dist/cjs/hooks/use-on-protect-sheet.d.ts +19 -0
  442. package/dist/cjs/hooks/use-on-protect-sheet.d.ts.map +1 -0
  443. package/dist/cjs/hooks/use-on-protect-sheet.js +65 -0
  444. package/dist/cjs/hooks/use-on-remove-duplicates.d.ts +21 -0
  445. package/dist/cjs/hooks/use-on-remove-duplicates.d.ts.map +1 -0
  446. package/dist/cjs/hooks/use-on-remove-duplicates.js +40 -0
  447. package/dist/cjs/hooks/use-on-rename-sheet.d.ts +21 -0
  448. package/dist/cjs/hooks/use-on-rename-sheet.d.ts.map +1 -0
  449. package/dist/cjs/hooks/use-on-rename-sheet.js +80 -0
  450. package/dist/cjs/hooks/use-on-request-calculate-wrapper.d.ts +30 -0
  451. package/dist/cjs/hooks/use-on-request-calculate-wrapper.d.ts.map +1 -0
  452. package/dist/cjs/hooks/use-on-request-calculate-wrapper.js +90 -0
  453. package/dist/cjs/hooks/use-on-request-conditional-format.d.ts +2 -0
  454. package/dist/cjs/hooks/use-on-request-conditional-format.d.ts.map +1 -0
  455. package/dist/cjs/hooks/use-on-request-conditional-format.js +8 -0
  456. package/dist/cjs/hooks/use-on-request-data-validation.d.ts +7 -0
  457. package/dist/cjs/hooks/use-on-request-data-validation.d.ts.map +1 -0
  458. package/dist/cjs/hooks/use-on-request-data-validation.js +23 -0
  459. package/dist/cjs/hooks/use-on-request-define-named-range.d.ts +8 -0
  460. package/dist/cjs/hooks/use-on-request-define-named-range.d.ts.map +1 -0
  461. package/dist/cjs/hooks/use-on-request-define-named-range.js +19 -0
  462. package/dist/cjs/hooks/use-on-request-delete-sheet.d.ts +2 -0
  463. package/dist/cjs/hooks/use-on-request-delete-sheet.d.ts.map +1 -0
  464. package/dist/cjs/hooks/use-on-request-delete-sheet.js +12 -0
  465. package/dist/cjs/hooks/use-on-request-edit-table.d.ts +3 -0
  466. package/dist/cjs/hooks/use-on-request-edit-table.d.ts.map +1 -0
  467. package/dist/cjs/hooks/use-on-request-edit-table.js +11 -0
  468. package/dist/cjs/hooks/use-on-request-format-cells.d.ts +2 -0
  469. package/dist/cjs/hooks/use-on-request-format-cells.d.ts.map +1 -0
  470. package/dist/cjs/hooks/use-on-request-format-cells.js +8 -0
  471. package/dist/cjs/hooks/use-on-request-insert-image.d.ts +3 -0
  472. package/dist/cjs/hooks/use-on-request-insert-image.d.ts.map +1 -0
  473. package/dist/cjs/hooks/use-on-request-insert-image.js +12 -0
  474. package/dist/cjs/hooks/use-on-request-insert-link.d.ts +5 -0
  475. package/dist/cjs/hooks/use-on-request-insert-link.d.ts.map +1 -0
  476. package/dist/cjs/hooks/use-on-request-insert-link.js +9 -0
  477. package/dist/cjs/hooks/use-on-request-resize.d.ts +3 -0
  478. package/dist/cjs/hooks/use-on-request-resize.d.ts.map +1 -0
  479. package/dist/cjs/hooks/use-on-request-resize.js +13 -0
  480. package/dist/cjs/hooks/use-on-request-update-named-range.d.ts +3 -0
  481. package/dist/cjs/hooks/use-on-request-update-named-range.d.ts.map +1 -0
  482. package/dist/cjs/hooks/use-on-request-update-named-range.js +11 -0
  483. package/dist/cjs/hooks/use-on-resize-table.d.ts +33 -0
  484. package/dist/cjs/hooks/use-on-resize-table.d.ts.map +1 -0
  485. package/dist/cjs/hooks/use-on-resize-table.js +218 -0
  486. package/dist/cjs/hooks/use-on-resize.d.ts +19 -0
  487. package/dist/cjs/hooks/use-on-resize.d.ts.map +1 -0
  488. package/dist/cjs/hooks/use-on-resize.js +55 -0
  489. package/dist/cjs/hooks/use-on-set-outline-depth.d.ts +17 -0
  490. package/dist/cjs/hooks/use-on-set-outline-depth.d.ts.map +1 -0
  491. package/dist/cjs/hooks/use-on-set-outline-depth.js +96 -0
  492. package/dist/cjs/hooks/use-on-show-column.d.ts +16 -0
  493. package/dist/cjs/hooks/use-on-show-column.d.ts.map +1 -0
  494. package/dist/cjs/hooks/use-on-show-column.js +96 -0
  495. package/dist/cjs/hooks/use-on-show-row.d.ts +22 -0
  496. package/dist/cjs/hooks/use-on-show-row.d.ts.map +1 -0
  497. package/dist/cjs/hooks/use-on-show-row.js +99 -0
  498. package/dist/cjs/hooks/use-on-sort-column.d.ts +53 -0
  499. package/dist/cjs/hooks/use-on-sort-column.d.ts.map +1 -0
  500. package/dist/cjs/hooks/use-on-sort-column.js +300 -0
  501. package/dist/cjs/hooks/use-on-sort-range.d.ts +42 -0
  502. package/dist/cjs/hooks/use-on-sort-range.d.ts.map +1 -0
  503. package/dist/cjs/hooks/use-on-sort-range.js +252 -0
  504. package/dist/cjs/hooks/use-on-sort-table.d.ts +59 -0
  505. package/dist/cjs/hooks/use-on-sort-table.d.ts.map +1 -0
  506. package/dist/cjs/hooks/use-on-sort-table.js +345 -0
  507. package/dist/cjs/hooks/use-on-table.d.ts +49 -0
  508. package/dist/cjs/hooks/use-on-table.d.ts.map +1 -0
  509. package/dist/cjs/hooks/use-on-table.js +386 -0
  510. package/dist/cjs/hooks/use-on-trace-dependents-precedents.d.ts +14 -0
  511. package/dist/cjs/hooks/use-on-trace-dependents-precedents.d.ts.map +1 -0
  512. package/dist/cjs/hooks/use-on-trace-dependents-precedents.js +146 -0
  513. package/dist/cjs/hooks/use-on-ungroup-columns.d.ts +11 -0
  514. package/dist/cjs/hooks/use-on-ungroup-columns.d.ts.map +1 -0
  515. package/dist/cjs/hooks/use-on-ungroup-columns.js +57 -0
  516. package/dist/cjs/hooks/use-on-ungroup-rows.d.ts +17 -0
  517. package/dist/cjs/hooks/use-on-ungroup-rows.d.ts.map +1 -0
  518. package/dist/cjs/hooks/use-on-ungroup-rows.js +63 -0
  519. package/dist/cjs/hooks/use-on-update-named-range.d.ts +19 -0
  520. package/dist/cjs/hooks/use-on-update-named-range.d.ts.map +1 -0
  521. package/dist/cjs/hooks/use-on-update-named-range.js +133 -0
  522. package/dist/cjs/hooks/use-on-update-note.d.ts +13 -0
  523. package/dist/cjs/hooks/use-on-update-note.d.ts.map +1 -0
  524. package/dist/cjs/hooks/use-on-update-note.js +21 -0
  525. package/dist/cjs/hooks/use-on-update-sheet.d.ts +10 -0
  526. package/dist/cjs/hooks/use-on-update-sheet.d.ts.map +1 -0
  527. package/dist/cjs/hooks/use-on-update-sheet.js +12 -0
  528. package/dist/cjs/hooks/use-paint-format.d.ts +17 -0
  529. package/dist/cjs/hooks/use-paint-format.d.ts.map +1 -0
  530. package/dist/cjs/hooks/use-paint-format.js +118 -0
  531. package/dist/cjs/hooks/use-search.d.ts +81 -0
  532. package/dist/cjs/hooks/use-search.d.ts.map +1 -0
  533. package/dist/cjs/hooks/use-search.js +261 -0
  534. package/dist/cjs/hooks/use-select-next-prev-sheet.d.ts +11 -0
  535. package/dist/cjs/hooks/use-select-next-prev-sheet.d.ts.map +1 -0
  536. package/dist/cjs/hooks/use-select-next-prev-sheet.js +22 -0
  537. package/dist/cjs/hooks/use-sheet-observer.d.ts +20 -0
  538. package/dist/cjs/hooks/use-sheet-observer.d.ts.map +1 -0
  539. package/dist/cjs/hooks/use-sheet-observer.js +127 -0
  540. package/dist/cjs/hooks/use-sheet-properties.d.ts +105 -0
  541. package/dist/cjs/hooks/use-sheet-properties.d.ts.map +1 -0
  542. package/dist/cjs/hooks/use-sheet-properties.js +1019 -0
  543. package/dist/cjs/hooks/use-sheet-state.d.ts +17 -0
  544. package/dist/cjs/hooks/use-sheet-state.d.ts.map +1 -0
  545. package/dist/cjs/hooks/use-sheet-state.js +84 -0
  546. package/dist/cjs/hooks/use-sheetdata-subscriber.d.ts +10 -0
  547. package/dist/cjs/hooks/use-sheetdata-subscriber.d.ts.map +1 -0
  548. package/dist/cjs/hooks/use-sheetdata-subscriber.js +15 -0
  549. package/dist/cjs/hooks/use-slicers.d.ts +19 -0
  550. package/dist/cjs/hooks/use-slicers.d.ts.map +1 -0
  551. package/dist/cjs/hooks/use-slicers.js +84 -0
  552. package/dist/cjs/hooks/use-split-text-to-columns.d.ts +19 -0
  553. package/dist/cjs/hooks/use-split-text-to-columns.d.ts.map +1 -0
  554. package/dist/cjs/hooks/use-split-text-to-columns.js +32 -0
  555. package/dist/cjs/hooks/use-spreadsheet-state.d.ts +627 -0
  556. package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -0
  557. package/dist/cjs/hooks/use-spreadsheet-state.js +2038 -0
  558. package/dist/cjs/hooks/use-ss-registry.d.ts +6 -0
  559. package/dist/cjs/hooks/use-ss-registry.d.ts.map +1 -0
  560. package/dist/cjs/hooks/use-ss-registry.js +17 -0
  561. package/dist/cjs/hooks/use-structured-reference.d.ts +8 -0
  562. package/dist/cjs/hooks/use-structured-reference.d.ts.map +1 -0
  563. package/dist/cjs/hooks/use-structured-reference.js +132 -0
  564. package/dist/cjs/hooks/use-undo-redo-actions.d.ts +40 -0
  565. package/dist/cjs/hooks/use-undo-redo-actions.d.ts.map +1 -0
  566. package/dist/cjs/hooks/use-undo-redo-actions.js +209 -0
  567. package/dist/cjs/hooks/use-undo-redo.d.ts +69 -0
  568. package/dist/cjs/hooks/use-undo-redo.d.ts.map +1 -0
  569. package/dist/cjs/hooks/use-undo-redo.js +124 -0
  570. package/dist/cjs/hooks/utils/frozen-sort.d.ts +9 -0
  571. package/dist/cjs/hooks/utils/frozen-sort.d.ts.map +1 -0
  572. package/dist/cjs/hooks/utils/frozen-sort.js +28 -0
  573. package/dist/cjs/hooks/utils/sort-rows.d.ts +32 -0
  574. package/dist/cjs/hooks/utils/sort-rows.d.ts.map +1 -0
  575. package/dist/cjs/hooks/utils/sort-rows.js +113 -0
  576. package/dist/cjs/index.d.ts +38 -0
  577. package/dist/cjs/index.d.ts.map +1 -0
  578. package/dist/cjs/index.js +39 -0
  579. package/dist/cjs/interface/apply-fill.d.ts +6 -0
  580. package/dist/cjs/interface/apply-fill.d.ts.map +1 -0
  581. package/dist/cjs/interface/apply-fill.js +203 -0
  582. package/dist/cjs/interface/auto-resize.d.ts +4 -0
  583. package/dist/cjs/interface/auto-resize.d.ts.map +1 -0
  584. package/dist/cjs/interface/auto-resize.js +63 -0
  585. package/dist/cjs/interface/calculation-interface.d.ts +67 -0
  586. package/dist/cjs/interface/calculation-interface.d.ts.map +1 -0
  587. package/dist/cjs/interface/calculation-interface.js +409 -0
  588. package/dist/cjs/interface/change-batch-stream.d.ts +25 -0
  589. package/dist/cjs/interface/change-batch-stream.d.ts.map +1 -0
  590. package/dist/cjs/interface/change-batch-stream.js +428 -0
  591. package/dist/cjs/interface/change-batch.d.ts +39 -0
  592. package/dist/cjs/interface/change-batch.d.ts.map +1 -0
  593. package/dist/cjs/interface/change-batch.js +329 -0
  594. package/dist/cjs/interface/change-border.d.ts +5 -0
  595. package/dist/cjs/interface/change-border.d.ts.map +1 -0
  596. package/dist/cjs/interface/change-border.js +141 -0
  597. package/dist/cjs/interface/change-calculated-column.d.ts +5 -0
  598. package/dist/cjs/interface/change-calculated-column.d.ts.map +1 -0
  599. package/dist/cjs/interface/change-calculated-column.js +131 -0
  600. package/dist/cjs/interface/change-decimals.d.ts +7 -0
  601. package/dist/cjs/interface/change-decimals.d.ts.map +1 -0
  602. package/dist/cjs/interface/change-decimals.js +82 -0
  603. package/dist/cjs/interface/change-formatting.d.ts +4 -0
  604. package/dist/cjs/interface/change-formatting.d.ts.map +1 -0
  605. package/dist/cjs/interface/change-formatting.js +240 -0
  606. package/dist/cjs/interface/change-sheet-tabcolor.d.ts +4 -0
  607. package/dist/cjs/interface/change-sheet-tabcolor.d.ts.map +1 -0
  608. package/dist/cjs/interface/change-sheet-tabcolor.js +21 -0
  609. package/dist/cjs/interface/change-table-column.d.ts +49 -0
  610. package/dist/cjs/interface/change-table-column.d.ts.map +1 -0
  611. package/dist/cjs/interface/change-table-column.js +267 -0
  612. package/dist/cjs/interface/change-theme.d.ts +4 -0
  613. package/dist/cjs/interface/change-theme.d.ts.map +1 -0
  614. package/dist/cjs/interface/change-theme.js +23 -0
  615. package/dist/cjs/interface/chart-extensions.d.ts +32 -0
  616. package/dist/cjs/interface/chart-extensions.d.ts.map +1 -0
  617. package/dist/cjs/interface/chart-extensions.js +71 -0
  618. package/dist/cjs/interface/citations.d.ts +33 -0
  619. package/dist/cjs/interface/citations.d.ts.map +1 -0
  620. package/dist/cjs/interface/citations.js +142 -0
  621. package/dist/cjs/interface/clear-formatting.d.ts +5 -0
  622. package/dist/cjs/interface/clear-formatting.d.ts.map +1 -0
  623. package/dist/cjs/interface/clear-formatting.js +72 -0
  624. package/dist/cjs/interface/conditional-formatting-rules.d.ts +7 -0
  625. package/dist/cjs/interface/conditional-formatting-rules.d.ts.map +1 -0
  626. package/dist/cjs/interface/conditional-formatting-rules.js +191 -0
  627. package/dist/cjs/interface/create-table.d.ts +5 -0
  628. package/dist/cjs/interface/create-table.d.ts.map +1 -0
  629. package/dist/cjs/interface/create-table.js +96 -0
  630. package/dist/cjs/interface/data-validation-rules.d.ts +25 -0
  631. package/dist/cjs/interface/data-validation-rules.d.ts.map +1 -0
  632. package/dist/cjs/interface/data-validation-rules.js +366 -0
  633. package/dist/cjs/interface/data-validation-utils.d.ts +12 -0
  634. package/dist/cjs/interface/data-validation-utils.d.ts.map +1 -0
  635. package/dist/cjs/interface/data-validation-utils.js +118 -0
  636. package/dist/cjs/interface/delete-cells-shift-left.d.ts +5 -0
  637. package/dist/cjs/interface/delete-cells-shift-left.d.ts.map +1 -0
  638. package/dist/cjs/interface/delete-cells-shift-left.js +160 -0
  639. package/dist/cjs/interface/delete-cells-shift-up.d.ts +5 -0
  640. package/dist/cjs/interface/delete-cells-shift-up.d.ts.map +1 -0
  641. package/dist/cjs/interface/delete-cells-shift-up.js +152 -0
  642. package/dist/cjs/interface/delete-cells.d.ts +6 -0
  643. package/dist/cjs/interface/delete-cells.d.ts.map +1 -0
  644. package/dist/cjs/interface/delete-cells.js +231 -0
  645. package/dist/cjs/interface/delete-column.d.ts +4 -0
  646. package/dist/cjs/interface/delete-column.d.ts.map +1 -0
  647. package/dist/cjs/interface/delete-column.js +306 -0
  648. package/dist/cjs/interface/delete-row.d.ts +4 -0
  649. package/dist/cjs/interface/delete-row.d.ts.map +1 -0
  650. package/dist/cjs/interface/delete-row.js +227 -0
  651. package/dist/cjs/interface/delete-sheet.d.ts +4 -0
  652. package/dist/cjs/interface/delete-sheet.d.ts.map +1 -0
  653. package/dist/cjs/interface/delete-sheet.js +81 -0
  654. package/dist/cjs/interface/delete-table-column.d.ts +4 -0
  655. package/dist/cjs/interface/delete-table-column.d.ts.map +1 -0
  656. package/dist/cjs/interface/delete-table-column.js +349 -0
  657. package/dist/cjs/interface/delete-table-row.d.ts +4 -0
  658. package/dist/cjs/interface/delete-table-row.d.ts.map +1 -0
  659. package/dist/cjs/interface/delete-table-row.js +313 -0
  660. package/dist/cjs/interface/duplicate-sheet.d.ts +4 -0
  661. package/dist/cjs/interface/duplicate-sheet.d.ts.map +1 -0
  662. package/dist/cjs/interface/duplicate-sheet.js +232 -0
  663. package/dist/cjs/interface/embeds.d.ts +9 -0
  664. package/dist/cjs/interface/embeds.d.ts.map +1 -0
  665. package/dist/cjs/interface/embeds.js +121 -0
  666. package/dist/cjs/interface/freeze.d.ts +5 -0
  667. package/dist/cjs/interface/freeze.d.ts.map +1 -0
  668. package/dist/cjs/interface/freeze.js +160 -0
  669. package/dist/cjs/interface/helpers.d.ts +6 -0
  670. package/dist/cjs/interface/helpers.d.ts.map +1 -0
  671. package/dist/cjs/interface/helpers.js +44 -0
  672. package/dist/cjs/interface/hide-column.d.ts +4 -0
  673. package/dist/cjs/interface/hide-column.d.ts.map +1 -0
  674. package/dist/cjs/interface/hide-column.js +68 -0
  675. package/dist/cjs/interface/hide-row.d.ts +4 -0
  676. package/dist/cjs/interface/hide-row.d.ts.map +1 -0
  677. package/dist/cjs/interface/hide-row.js +65 -0
  678. package/dist/cjs/interface/indent.d.ts +7 -0
  679. package/dist/cjs/interface/indent.d.ts.map +1 -0
  680. package/dist/cjs/interface/indent.js +97 -0
  681. package/dist/cjs/interface/insert-cells-shift-down.d.ts +5 -0
  682. package/dist/cjs/interface/insert-cells-shift-down.d.ts.map +1 -0
  683. package/dist/cjs/interface/insert-cells-shift-down.js +154 -0
  684. package/dist/cjs/interface/insert-cells-shift-right.d.ts +5 -0
  685. package/dist/cjs/interface/insert-cells-shift-right.d.ts.map +1 -0
  686. package/dist/cjs/interface/insert-cells-shift-right.js +150 -0
  687. package/dist/cjs/interface/insert-column.d.ts +7 -0
  688. package/dist/cjs/interface/insert-column.d.ts.map +1 -0
  689. package/dist/cjs/interface/insert-column.js +645 -0
  690. package/dist/cjs/interface/insert-note.d.ts +5 -0
  691. package/dist/cjs/interface/insert-note.d.ts.map +1 -0
  692. package/dist/cjs/interface/insert-note.js +27 -0
  693. package/dist/cjs/interface/insert-row.d.ts +4 -0
  694. package/dist/cjs/interface/insert-row.d.ts.map +1 -0
  695. package/dist/cjs/interface/insert-row.js +188 -0
  696. package/dist/cjs/interface/insert-table-row.d.ts +4 -0
  697. package/dist/cjs/interface/insert-table-row.d.ts.map +1 -0
  698. package/dist/cjs/interface/insert-table-row.js +348 -0
  699. package/dist/cjs/interface/interface-cli.d.ts +3 -0
  700. package/dist/cjs/interface/interface-cli.d.ts.map +1 -0
  701. package/dist/cjs/interface/interface-cli.js +76 -0
  702. package/dist/cjs/interface/named-range-operations.d.ts +19 -0
  703. package/dist/cjs/interface/named-range-operations.d.ts.map +1 -0
  704. package/dist/cjs/interface/named-range-operations.js +96 -0
  705. package/dist/cjs/interface/new-sheet.d.ts +4 -0
  706. package/dist/cjs/interface/new-sheet.d.ts.map +1 -0
  707. package/dist/cjs/interface/new-sheet.js +109 -0
  708. package/dist/cjs/interface/pivot-extensions.d.ts +27 -0
  709. package/dist/cjs/interface/pivot-extensions.d.ts.map +1 -0
  710. package/dist/cjs/interface/pivot-extensions.js +62 -0
  711. package/dist/cjs/interface/remove-duplicates.d.ts +11 -0
  712. package/dist/cjs/interface/remove-duplicates.d.ts.map +1 -0
  713. package/dist/cjs/interface/remove-duplicates.js +132 -0
  714. package/dist/cjs/interface/remove-table.d.ts +4 -0
  715. package/dist/cjs/interface/remove-table.d.ts.map +1 -0
  716. package/dist/cjs/interface/remove-table.js +53 -0
  717. package/dist/cjs/interface/resize-utils.d.ts +18 -0
  718. package/dist/cjs/interface/resize-utils.d.ts.map +1 -0
  719. package/dist/cjs/interface/resize-utils.js +60 -0
  720. package/dist/cjs/interface/resize.d.ts +5 -0
  721. package/dist/cjs/interface/resize.d.ts.map +1 -0
  722. package/dist/cjs/interface/resize.js +56 -0
  723. package/dist/cjs/interface/slicers.d.ts +9 -0
  724. package/dist/cjs/interface/slicers.d.ts.map +1 -0
  725. package/dist/cjs/interface/slicers.js +113 -0
  726. package/dist/cjs/interface/split-text.d.ts +5 -0
  727. package/dist/cjs/interface/split-text.d.ts.map +1 -0
  728. package/dist/cjs/interface/split-text.js +120 -0
  729. package/dist/cjs/interface/spreadsheet-interface.d.ts +642 -0
  730. package/dist/cjs/interface/spreadsheet-interface.d.ts.map +1 -0
  731. package/dist/cjs/interface/spreadsheet-interface.js +2787 -0
  732. package/dist/cjs/interface/table-totalrow.d.ts +20 -0
  733. package/dist/cjs/interface/table-totalrow.d.ts.map +1 -0
  734. package/dist/cjs/interface/table-totalrow.js +170 -0
  735. package/dist/cjs/interface/table-utils.d.ts +21 -0
  736. package/dist/cjs/interface/table-utils.d.ts.map +1 -0
  737. package/dist/cjs/interface/table-utils.js +44 -0
  738. package/dist/cjs/interface/update-sheet.d.ts +16 -0
  739. package/dist/cjs/interface/update-sheet.d.ts.map +1 -0
  740. package/dist/cjs/interface/update-sheet.js +63 -0
  741. package/dist/cjs/interface/update-table.d.ts +4 -0
  742. package/dist/cjs/interface/update-table.d.ts.map +1 -0
  743. package/dist/cjs/interface/update-table.js +109 -0
  744. package/dist/cjs/server-utils.d.ts +8 -0
  745. package/dist/cjs/server-utils.d.ts.map +1 -0
  746. package/dist/cjs/server-utils.js +3 -0
  747. package/dist/cjs/server.browser.d.ts +9 -0
  748. package/dist/cjs/server.browser.d.ts.map +1 -0
  749. package/dist/cjs/server.browser.js +5 -0
  750. package/dist/cjs/server.d.ts +9 -0
  751. package/dist/cjs/server.d.ts.map +1 -0
  752. package/dist/cjs/server.js +5 -0
  753. package/dist/cjs/shared-string-registry.d.ts +35 -0
  754. package/dist/cjs/shared-string-registry.d.ts.map +1 -0
  755. package/dist/cjs/shared-string-registry.js +314 -0
  756. package/dist/cjs/sheet-cell.d.ts +310 -0
  757. package/dist/cjs/sheet-cell.d.ts.map +1 -0
  758. package/dist/cjs/sheet-cell.js +1809 -0
  759. package/dist/cjs/test-setup.d.ts +2 -0
  760. package/dist/cjs/test-setup.d.ts.map +1 -0
  761. package/dist/cjs/test-setup.js +3 -0
  762. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  763. package/dist/cjs/types.d.ts +44 -0
  764. package/dist/cjs/types.d.ts.map +1 -0
  765. package/dist/cjs/types.js +33 -0
  766. package/dist/cjs/validation-schema/table.schema.d.ts +6 -0
  767. package/dist/cjs/validation-schema/table.schema.d.ts.map +1 -0
  768. package/dist/cjs/validation-schema/table.schema.js +4 -0
  769. package/dist/cjs/vitest.config.d.ts +3 -0
  770. package/dist/cjs/vitest.config.d.ts.map +1 -0
  771. package/dist/cjs/vitest.config.js +22 -0
  772. package/dist/esm/api/border.d.ts +9 -0
  773. package/dist/esm/api/border.d.ts.map +1 -0
  774. package/dist/esm/api/border.js +25 -0
  775. package/dist/esm/api/conditional-format.d.ts +2 -0
  776. package/dist/esm/api/conditional-format.d.ts.map +1 -0
  777. package/dist/esm/api/conditional-format.js +5 -0
  778. package/dist/esm/api/copy-paste.d.ts +20 -0
  779. package/dist/esm/api/copy-paste.d.ts.map +1 -0
  780. package/dist/esm/api/copy-paste.js +302 -0
  781. package/dist/esm/api/data-validation.d.ts +2 -0
  782. package/dist/esm/api/data-validation.d.ts.map +1 -0
  783. package/dist/esm/api/data-validation.js +5 -0
  784. package/dist/esm/api/datatype.d.ts +89 -0
  785. package/dist/esm/api/datatype.d.ts.map +1 -0
  786. package/dist/esm/api/datatype.js +639 -0
  787. package/dist/esm/api/date.d.ts +27 -0
  788. package/dist/esm/api/date.d.ts.map +1 -0
  789. package/dist/esm/api/date.js +220 -0
  790. package/dist/esm/api/decimals.d.ts +10 -0
  791. package/dist/esm/api/decimals.d.ts.map +1 -0
  792. package/dist/esm/api/decimals.js +181 -0
  793. package/dist/esm/api/dependency.d.ts +64 -0
  794. package/dist/esm/api/dependency.d.ts.map +1 -0
  795. package/dist/esm/api/dependency.js +251 -0
  796. package/dist/esm/api/fill.d.ts +88 -0
  797. package/dist/esm/api/fill.d.ts.map +1 -0
  798. package/dist/esm/api/fill.js +919 -0
  799. package/dist/esm/api/filter-range.d.ts +4 -0
  800. package/dist/esm/api/filter-range.d.ts.map +1 -0
  801. package/dist/esm/api/filter-range.js +100 -0
  802. package/dist/esm/api/filter.d.ts +24 -0
  803. package/dist/esm/api/filter.d.ts.map +1 -0
  804. package/dist/esm/api/filter.js +62 -0
  805. package/dist/esm/api/format-caches.d.ts +43 -0
  806. package/dist/esm/api/format-caches.d.ts.map +1 -0
  807. package/dist/esm/api/format-caches.js +95 -0
  808. package/dist/esm/api/formula.d.ts +69 -0
  809. package/dist/esm/api/formula.d.ts.map +1 -0
  810. package/dist/esm/api/formula.js +422 -0
  811. package/dist/esm/api/immer-utils.d.ts +66 -0
  812. package/dist/esm/api/immer-utils.d.ts.map +1 -0
  813. package/dist/esm/api/immer-utils.js +1552 -0
  814. package/dist/esm/api/intl.d.ts +51 -0
  815. package/dist/esm/api/intl.d.ts.map +1 -0
  816. package/dist/esm/api/intl.js +257 -0
  817. package/dist/esm/api/merges.d.ts +7 -0
  818. package/dist/esm/api/merges.d.ts.map +1 -0
  819. package/dist/esm/api/merges.js +174 -0
  820. package/dist/esm/api/outline.d.ts +33 -0
  821. package/dist/esm/api/outline.d.ts.map +1 -0
  822. package/dist/esm/api/outline.js +56 -0
  823. package/dist/esm/api/parse-html.d.ts +15 -0
  824. package/dist/esm/api/parse-html.d.ts.map +1 -0
  825. package/dist/esm/api/parse-html.js +865 -0
  826. package/dist/esm/api/patches.d.ts +11 -0
  827. package/dist/esm/api/patches.d.ts.map +1 -0
  828. package/dist/esm/api/patches.js +206 -0
  829. package/dist/esm/api/pivot-range.d.ts +8 -0
  830. package/dist/esm/api/pivot-range.d.ts.map +1 -0
  831. package/dist/esm/api/pivot-range.js +93 -0
  832. package/dist/esm/api/range-rule-helpers.d.ts +65 -0
  833. package/dist/esm/api/range-rule-helpers.d.ts.map +1 -0
  834. package/dist/esm/api/range-rule-helpers.js +138 -0
  835. package/dist/esm/api/range.d.ts +19 -0
  836. package/dist/esm/api/range.d.ts.map +1 -0
  837. package/dist/esm/api/range.js +136 -0
  838. package/dist/esm/api/rename-sheet.d.ts +22 -0
  839. package/dist/esm/api/rename-sheet.d.ts.map +1 -0
  840. package/dist/esm/api/rename-sheet.js +41 -0
  841. package/dist/esm/api/selection.d.ts +36 -0
  842. package/dist/esm/api/selection.d.ts.map +1 -0
  843. package/dist/esm/api/selection.js +138 -0
  844. package/dist/esm/api/sort.d.ts +3 -0
  845. package/dist/esm/api/sort.d.ts.map +1 -0
  846. package/dist/esm/api/sort.js +33 -0
  847. package/dist/esm/api/split-text.d.ts +2 -0
  848. package/dist/esm/api/split-text.d.ts.map +1 -0
  849. package/dist/esm/api/split-text.js +24 -0
  850. package/dist/esm/api/structural-formula-update.d.ts +75 -0
  851. package/dist/esm/api/structural-formula-update.d.ts.map +1 -0
  852. package/dist/esm/api/structural-formula-update.js +431 -0
  853. package/dist/esm/api/table.d.ts +39 -0
  854. package/dist/esm/api/table.d.ts.map +1 -0
  855. package/dist/esm/api/table.js +333 -0
  856. package/dist/esm/api/validation.d.ts +12 -0
  857. package/dist/esm/api/validation.d.ts.map +1 -0
  858. package/dist/esm/api/validation.js +297 -0
  859. package/dist/esm/api/xlsx-source.d.ts +22 -0
  860. package/dist/esm/api/xlsx-source.d.ts.map +1 -0
  861. package/dist/esm/api/xlsx-source.js +30 -0
  862. package/dist/esm/atoms/delete-sheet-atom.d.ts +6 -0
  863. package/dist/esm/atoms/delete-sheet-atom.d.ts.map +1 -0
  864. package/dist/esm/atoms/delete-sheet-atom.js +4 -0
  865. package/dist/esm/atoms/dialog-state.atom.d.ts +23 -0
  866. package/dist/esm/atoms/dialog-state.atom.d.ts.map +1 -0
  867. package/dist/esm/atoms/dialog-state.atom.js +34 -0
  868. package/dist/esm/atoms/editing-data-validation-id.atom.d.ts +7 -0
  869. package/dist/esm/atoms/editing-data-validation-id.atom.d.ts.map +1 -0
  870. package/dist/esm/atoms/editing-data-validation-id.atom.js +6 -0
  871. package/dist/esm/atoms/editing-embed.atom.d.ts +8 -0
  872. package/dist/esm/atoms/editing-embed.atom.d.ts.map +1 -0
  873. package/dist/esm/atoms/editing-embed.atom.js +5 -0
  874. package/dist/esm/atoms/editing-table.atom.d.ts +8 -0
  875. package/dist/esm/atoms/editing-table.atom.d.ts.map +1 -0
  876. package/dist/esm/atoms/editing-table.atom.js +6 -0
  877. package/dist/esm/atoms/error-state.atom.d.ts +10 -0
  878. package/dist/esm/atoms/error-state.atom.d.ts.map +1 -0
  879. package/dist/esm/atoms/error-state.atom.js +5 -0
  880. package/dist/esm/atoms/index.d.ts +5 -0
  881. package/dist/esm/atoms/index.d.ts.map +1 -0
  882. package/dist/esm/atoms/index.js +4 -0
  883. package/dist/esm/atoms/insert-image-state.atom.d.ts +6 -0
  884. package/dist/esm/atoms/insert-image-state.atom.d.ts.map +1 -0
  885. package/dist/esm/atoms/insert-image-state.atom.js +5 -0
  886. package/dist/esm/atoms/named-range.atom.d.ts +8 -0
  887. package/dist/esm/atoms/named-range.atom.d.ts.map +1 -0
  888. package/dist/esm/atoms/named-range.atom.js +6 -0
  889. package/dist/esm/atoms/resize-dimension.atom.d.ts +12 -0
  890. package/dist/esm/atoms/resize-dimension.atom.d.ts.map +1 -0
  891. package/dist/esm/atoms/resize-dimension.atom.js +5 -0
  892. package/dist/esm/atoms/sheet-observer.atom.d.ts +16 -0
  893. package/dist/esm/atoms/sheet-observer.atom.d.ts.map +1 -0
  894. package/dist/esm/atoms/sheet-observer.atom.js +16 -0
  895. package/dist/esm/cellxfs-registry.d.ts +37 -0
  896. package/dist/esm/cellxfs-registry.d.ts.map +1 -0
  897. package/dist/esm/cellxfs-registry.js +147 -0
  898. package/dist/esm/commands.d.ts +691 -0
  899. package/dist/esm/commands.d.ts.map +1 -0
  900. package/dist/esm/commands.js +1 -0
  901. package/dist/esm/components/dialogs/delete-sheet-confirmation.d.ts +7 -0
  902. package/dist/esm/components/dialogs/delete-sheet-confirmation.d.ts.map +1 -0
  903. package/dist/esm/components/dialogs/delete-sheet-confirmation.js +29 -0
  904. package/dist/esm/components/dialogs/error-state.d.ts +3 -0
  905. package/dist/esm/components/dialogs/error-state.d.ts.map +1 -0
  906. package/dist/esm/components/dialogs/error-state.js +22 -0
  907. package/dist/esm/components/editors/cell-format-editor.d.ts +26 -0
  908. package/dist/esm/components/editors/cell-format-editor.d.ts.map +1 -0
  909. package/dist/esm/components/editors/cell-format-editor.js +648 -0
  910. package/dist/esm/components/editors/conditional-format-editor.d.ts +43 -0
  911. package/dist/esm/components/editors/conditional-format-editor.d.ts.map +1 -0
  912. package/dist/esm/components/editors/conditional-format-editor.js +172 -0
  913. package/dist/esm/components/editors/conditional-format-rule-editor.d.ts +27 -0
  914. package/dist/esm/components/editors/conditional-format-rule-editor.d.ts.map +1 -0
  915. package/dist/esm/components/editors/conditional-format-rule-editor.js +608 -0
  916. package/dist/esm/components/editors/data-validation-editor.d.ts +27 -0
  917. package/dist/esm/components/editors/data-validation-editor.d.ts.map +1 -0
  918. package/dist/esm/components/editors/data-validation-editor.js +160 -0
  919. package/dist/esm/components/editors/data-validation-rule-editor.d.ts +17 -0
  920. package/dist/esm/components/editors/data-validation-rule-editor.d.ts.map +1 -0
  921. package/dist/esm/components/editors/data-validation-rule-editor.js +194 -0
  922. package/dist/esm/components/editors/embed-editor.d.ts +19 -0
  923. package/dist/esm/components/editors/embed-editor.d.ts.map +1 -0
  924. package/dist/esm/components/editors/embed-editor.js +75 -0
  925. package/dist/esm/components/editors/insert-image-editor.d.ts +20 -0
  926. package/dist/esm/components/editors/insert-image-editor.d.ts.map +1 -0
  927. package/dist/esm/components/editors/insert-image-editor.js +73 -0
  928. package/dist/esm/components/editors/insert-link-editor.d.ts +20 -0
  929. package/dist/esm/components/editors/insert-link-editor.d.ts.map +1 -0
  930. package/dist/esm/components/editors/insert-link-editor.js +60 -0
  931. package/dist/esm/components/editors/named-range-editor.d.ts +13 -0
  932. package/dist/esm/components/editors/named-range-editor.d.ts.map +1 -0
  933. package/dist/esm/components/editors/named-range-editor.js +103 -0
  934. package/dist/esm/components/editors/resize-dimension-editor.d.ts +9 -0
  935. package/dist/esm/components/editors/resize-dimension-editor.d.ts.map +1 -0
  936. package/dist/esm/components/editors/resize-dimension-editor.js +60 -0
  937. package/dist/esm/components/editors/sheet-filter.d.ts +59 -0
  938. package/dist/esm/components/editors/sheet-filter.d.ts.map +1 -0
  939. package/dist/esm/components/editors/sheet-filter.js +88 -0
  940. package/dist/esm/components/editors/table-editor.d.ts +12 -0
  941. package/dist/esm/components/editors/table-editor.d.ts.map +1 -0
  942. package/dist/esm/components/editors/table-editor.js +106 -0
  943. package/dist/esm/components/index.d.ts +13 -0
  944. package/dist/esm/components/index.d.ts.map +1 -0
  945. package/dist/esm/components/index.js +12 -0
  946. package/dist/esm/generated-names.d.ts +51 -0
  947. package/dist/esm/generated-names.d.ts.map +1 -0
  948. package/dist/esm/generated-names.js +5 -0
  949. package/dist/esm/helpers/iterative-calculation.d.ts +4 -0
  950. package/dist/esm/helpers/iterative-calculation.d.ts.map +1 -0
  951. package/dist/esm/helpers/iterative-calculation.js +44 -0
  952. package/dist/esm/helpers/sheet-title.d.ts +5 -0
  953. package/dist/esm/helpers/sheet-title.d.ts.map +1 -0
  954. package/dist/esm/helpers/sheet-title.js +13 -0
  955. package/dist/esm/helpers.d.ts +45 -0
  956. package/dist/esm/helpers.d.ts.map +1 -0
  957. package/dist/esm/helpers.js +143 -0
  958. package/dist/esm/hooks/use-async-datasource.d.ts +57 -0
  959. package/dist/esm/hooks/use-async-datasource.d.ts.map +1 -0
  960. package/dist/esm/hooks/use-async-datasource.js +276 -0
  961. package/dist/esm/hooks/use-calculation-initialize.d.ts +61 -0
  962. package/dist/esm/hooks/use-calculation-initialize.d.ts.map +1 -0
  963. package/dist/esm/hooks/use-calculation-initialize.js +603 -0
  964. package/dist/esm/hooks/use-calculation-process-array.d.ts +20 -0
  965. package/dist/esm/hooks/use-calculation-process-array.d.ts.map +1 -0
  966. package/dist/esm/hooks/use-calculation-process-array.js +279 -0
  967. package/dist/esm/hooks/use-calculation-queue.d.ts +10 -0
  968. package/dist/esm/hooks/use-calculation-queue.d.ts.map +1 -0
  969. package/dist/esm/hooks/use-calculation-queue.js +13 -0
  970. package/dist/esm/hooks/use-calculation-worker.d.ts +37 -0
  971. package/dist/esm/hooks/use-calculation-worker.d.ts.map +1 -0
  972. package/dist/esm/hooks/use-calculation-worker.js +1688 -0
  973. package/dist/esm/hooks/use-calculation.d.ts +173 -0
  974. package/dist/esm/hooks/use-calculation.d.ts.map +1 -0
  975. package/dist/esm/hooks/use-calculation.js +2069 -0
  976. package/dist/esm/hooks/use-can-edit-cellrange.d.ts +31 -0
  977. package/dist/esm/hooks/use-can-edit-cellrange.d.ts.map +1 -0
  978. package/dist/esm/hooks/use-can-edit-cellrange.js +72 -0
  979. package/dist/esm/hooks/use-cellxfs-registry.d.ts +6 -0
  980. package/dist/esm/hooks/use-cellxfs-registry.d.ts.map +1 -0
  981. package/dist/esm/hooks/use-cellxfs-registry.js +22 -0
  982. package/dist/esm/hooks/use-citations.d.ts +19 -0
  983. package/dist/esm/hooks/use-citations.d.ts.map +1 -0
  984. package/dist/esm/hooks/use-citations.js +61 -0
  985. package/dist/esm/hooks/use-comments.d.ts +14 -0
  986. package/dist/esm/hooks/use-comments.d.ts.map +1 -0
  987. package/dist/esm/hooks/use-comments.js +45 -0
  988. package/dist/esm/hooks/use-conditional-formatting-rules.d.ts +22 -0
  989. package/dist/esm/hooks/use-conditional-formatting-rules.d.ts.map +1 -0
  990. package/dist/esm/hooks/use-conditional-formatting-rules.js +81 -0
  991. package/dist/esm/hooks/use-data-validation-rules.d.ts +54 -0
  992. package/dist/esm/hooks/use-data-validation-rules.d.ts.map +1 -0
  993. package/dist/esm/hooks/use-data-validation-rules.js +135 -0
  994. package/dist/esm/hooks/use-deferred-calculation-flush.d.ts +14 -0
  995. package/dist/esm/hooks/use-deferred-calculation-flush.d.ts.map +1 -0
  996. package/dist/esm/hooks/use-deferred-calculation-flush.js +78 -0
  997. package/dist/esm/hooks/use-idle-scheduler.d.ts +5 -0
  998. package/dist/esm/hooks/use-idle-scheduler.d.ts.map +1 -0
  999. package/dist/esm/hooks/use-idle-scheduler.js +46 -0
  1000. package/dist/esm/hooks/use-indent.d.ts +23 -0
  1001. package/dist/esm/hooks/use-indent.d.ts.map +1 -0
  1002. package/dist/esm/hooks/use-indent.js +97 -0
  1003. package/dist/esm/hooks/use-named-range.d.ts +7 -0
  1004. package/dist/esm/hooks/use-named-range.d.ts.map +1 -0
  1005. package/dist/esm/hooks/use-named-range.js +69 -0
  1006. package/dist/esm/hooks/use-on-adjust-row-height.d.ts +11 -0
  1007. package/dist/esm/hooks/use-on-adjust-row-height.d.ts.map +1 -0
  1008. package/dist/esm/hooks/use-on-adjust-row-height.js +63 -0
  1009. package/dist/esm/hooks/use-on-autoresize.d.ts +17 -0
  1010. package/dist/esm/hooks/use-on-autoresize.d.ts.map +1 -0
  1011. package/dist/esm/hooks/use-on-autoresize.js +38 -0
  1012. package/dist/esm/hooks/use-on-banded-ranges.d.ts +15 -0
  1013. package/dist/esm/hooks/use-on-banded-ranges.d.ts.map +1 -0
  1014. package/dist/esm/hooks/use-on-banded-ranges.js +36 -0
  1015. package/dist/esm/hooks/use-on-calculation-begin.d.ts +14 -0
  1016. package/dist/esm/hooks/use-on-calculation-begin.d.ts.map +1 -0
  1017. package/dist/esm/hooks/use-on-calculation-begin.js +22 -0
  1018. package/dist/esm/hooks/use-on-calculation-success.d.ts +22 -0
  1019. package/dist/esm/hooks/use-on-calculation-success.d.ts.map +1 -0
  1020. package/dist/esm/hooks/use-on-calculation-success.js +167 -0
  1021. package/dist/esm/hooks/use-on-change-batch-stream.d.ts +7 -0
  1022. package/dist/esm/hooks/use-on-change-batch-stream.d.ts.map +1 -0
  1023. package/dist/esm/hooks/use-on-change-batch-stream.js +58 -0
  1024. package/dist/esm/hooks/use-on-change-batch.d.ts +54 -0
  1025. package/dist/esm/hooks/use-on-change-batch.d.ts.map +1 -0
  1026. package/dist/esm/hooks/use-on-change-batch.js +111 -0
  1027. package/dist/esm/hooks/use-on-change-calculated-column.d.ts +23 -0
  1028. package/dist/esm/hooks/use-on-change-calculated-column.d.ts.map +1 -0
  1029. package/dist/esm/hooks/use-on-change-calculated-column.js +29 -0
  1030. package/dist/esm/hooks/use-on-change-decimals.d.ts +22 -0
  1031. package/dist/esm/hooks/use-on-change-decimals.d.ts.map +1 -0
  1032. package/dist/esm/hooks/use-on-change-decimals.js +45 -0
  1033. package/dist/esm/hooks/use-on-change-formatting.d.ts +44 -0
  1034. package/dist/esm/hooks/use-on-change-formatting.d.ts.map +1 -0
  1035. package/dist/esm/hooks/use-on-change-formatting.js +158 -0
  1036. package/dist/esm/hooks/use-on-change-sheet-tabcolor.d.ts +11 -0
  1037. package/dist/esm/hooks/use-on-change-sheet-tabcolor.d.ts.map +1 -0
  1038. package/dist/esm/hooks/use-on-change-sheet-tabcolor.js +26 -0
  1039. package/dist/esm/hooks/use-on-change-table-column.d.ts +25 -0
  1040. package/dist/esm/hooks/use-on-change-table-column.d.ts.map +1 -0
  1041. package/dist/esm/hooks/use-on-change-table-column.js +52 -0
  1042. package/dist/esm/hooks/use-on-change-theme.d.ts +11 -0
  1043. package/dist/esm/hooks/use-on-change-theme.d.ts.map +1 -0
  1044. package/dist/esm/hooks/use-on-change-theme.js +11 -0
  1045. package/dist/esm/hooks/use-on-change.d.ts +61 -0
  1046. package/dist/esm/hooks/use-on-change.d.ts.map +1 -0
  1047. package/dist/esm/hooks/use-on-change.js +281 -0
  1048. package/dist/esm/hooks/use-on-clear-formatting.d.ts +17 -0
  1049. package/dist/esm/hooks/use-on-clear-formatting.d.ts.map +1 -0
  1050. package/dist/esm/hooks/use-on-clear-formatting.js +45 -0
  1051. package/dist/esm/hooks/use-on-collapse-column-group.d.ts +11 -0
  1052. package/dist/esm/hooks/use-on-collapse-column-group.d.ts.map +1 -0
  1053. package/dist/esm/hooks/use-on-collapse-column-group.js +44 -0
  1054. package/dist/esm/hooks/use-on-collapse-row-group.d.ts +18 -0
  1055. package/dist/esm/hooks/use-on-collapse-row-group.d.ts.map +1 -0
  1056. package/dist/esm/hooks/use-on-collapse-row-group.js +54 -0
  1057. package/dist/esm/hooks/use-on-copy.d.ts +49 -0
  1058. package/dist/esm/hooks/use-on-copy.d.ts.map +1 -0
  1059. package/dist/esm/hooks/use-on-copy.js +302 -0
  1060. package/dist/esm/hooks/use-on-create-named-range.d.ts +13 -0
  1061. package/dist/esm/hooks/use-on-create-named-range.d.ts.map +1 -0
  1062. package/dist/esm/hooks/use-on-create-named-range.js +32 -0
  1063. package/dist/esm/hooks/use-on-create-sheet.d.ts +23 -0
  1064. package/dist/esm/hooks/use-on-create-sheet.d.ts.map +1 -0
  1065. package/dist/esm/hooks/use-on-create-sheet.js +64 -0
  1066. package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts +28 -0
  1067. package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -0
  1068. package/dist/esm/hooks/use-on-delete-cells-shift-left.js +65 -0
  1069. package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts +28 -0
  1070. package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -0
  1071. package/dist/esm/hooks/use-on-delete-cells-shift-up.js +65 -0
  1072. package/dist/esm/hooks/use-on-delete-column.d.ts +38 -0
  1073. package/dist/esm/hooks/use-on-delete-column.d.ts.map +1 -0
  1074. package/dist/esm/hooks/use-on-delete-column.js +86 -0
  1075. package/dist/esm/hooks/use-on-delete-named-range.d.ts +14 -0
  1076. package/dist/esm/hooks/use-on-delete-named-range.d.ts.map +1 -0
  1077. package/dist/esm/hooks/use-on-delete-named-range.js +22 -0
  1078. package/dist/esm/hooks/use-on-delete-row.d.ts +38 -0
  1079. package/dist/esm/hooks/use-on-delete-row.d.ts.map +1 -0
  1080. package/dist/esm/hooks/use-on-delete-row.js +86 -0
  1081. package/dist/esm/hooks/use-on-delete-sheet.d.ts +16 -0
  1082. package/dist/esm/hooks/use-on-delete-sheet.d.ts.map +1 -0
  1083. package/dist/esm/hooks/use-on-delete-sheet.js +36 -0
  1084. package/dist/esm/hooks/use-on-delete-table-row.d.ts +29 -0
  1085. package/dist/esm/hooks/use-on-delete-table-row.d.ts.map +1 -0
  1086. package/dist/esm/hooks/use-on-delete-table-row.js +55 -0
  1087. package/dist/esm/hooks/use-on-delete.d.ts +33 -0
  1088. package/dist/esm/hooks/use-on-delete.d.ts.map +1 -0
  1089. package/dist/esm/hooks/use-on-delete.js +58 -0
  1090. package/dist/esm/hooks/use-on-drag-n-drop.d.ts +55 -0
  1091. package/dist/esm/hooks/use-on-drag-n-drop.d.ts.map +1 -0
  1092. package/dist/esm/hooks/use-on-drag-n-drop.js +160 -0
  1093. package/dist/esm/hooks/use-on-duplicate-sheet.d.ts +29 -0
  1094. package/dist/esm/hooks/use-on-duplicate-sheet.d.ts.map +1 -0
  1095. package/dist/esm/hooks/use-on-duplicate-sheet.js +63 -0
  1096. package/dist/esm/hooks/use-on-embeds.d.ts +19 -0
  1097. package/dist/esm/hooks/use-on-embeds.d.ts.map +1 -0
  1098. package/dist/esm/hooks/use-on-embeds.js +86 -0
  1099. package/dist/esm/hooks/use-on-expand-column-group.d.ts +11 -0
  1100. package/dist/esm/hooks/use-on-expand-column-group.d.ts.map +1 -0
  1101. package/dist/esm/hooks/use-on-expand-column-group.js +42 -0
  1102. package/dist/esm/hooks/use-on-expand-row-group.d.ts +18 -0
  1103. package/dist/esm/hooks/use-on-expand-row-group.d.ts.map +1 -0
  1104. package/dist/esm/hooks/use-on-expand-row-group.js +49 -0
  1105. package/dist/esm/hooks/use-on-fill-range.d.ts +9 -0
  1106. package/dist/esm/hooks/use-on-fill-range.d.ts.map +1 -0
  1107. package/dist/esm/hooks/use-on-fill-range.js +79 -0
  1108. package/dist/esm/hooks/use-on-fill.d.ts +29 -0
  1109. package/dist/esm/hooks/use-on-fill.d.ts.map +1 -0
  1110. package/dist/esm/hooks/use-on-fill.js +66 -0
  1111. package/dist/esm/hooks/use-on-filter-table.d.ts +76 -0
  1112. package/dist/esm/hooks/use-on-filter-table.d.ts.map +1 -0
  1113. package/dist/esm/hooks/use-on-filter-table.js +341 -0
  1114. package/dist/esm/hooks/use-on-find-replace.d.ts +19 -0
  1115. package/dist/esm/hooks/use-on-find-replace.d.ts.map +1 -0
  1116. package/dist/esm/hooks/use-on-find-replace.js +115 -0
  1117. package/dist/esm/hooks/use-on-freeze.d.ts +13 -0
  1118. package/dist/esm/hooks/use-on-freeze.d.ts.map +1 -0
  1119. package/dist/esm/hooks/use-on-freeze.js +55 -0
  1120. package/dist/esm/hooks/use-on-group-columns.d.ts +11 -0
  1121. package/dist/esm/hooks/use-on-group-columns.d.ts.map +1 -0
  1122. package/dist/esm/hooks/use-on-group-columns.js +35 -0
  1123. package/dist/esm/hooks/use-on-group-rows.d.ts +17 -0
  1124. package/dist/esm/hooks/use-on-group-rows.d.ts.map +1 -0
  1125. package/dist/esm/hooks/use-on-group-rows.js +41 -0
  1126. package/dist/esm/hooks/use-on-hide-column.d.ts +23 -0
  1127. package/dist/esm/hooks/use-on-hide-column.d.ts.map +1 -0
  1128. package/dist/esm/hooks/use-on-hide-column.js +54 -0
  1129. package/dist/esm/hooks/use-on-hide-row.d.ts +32 -0
  1130. package/dist/esm/hooks/use-on-hide-row.d.ts.map +1 -0
  1131. package/dist/esm/hooks/use-on-hide-row.js +57 -0
  1132. package/dist/esm/hooks/use-on-hide-show-sheet.d.ts +18 -0
  1133. package/dist/esm/hooks/use-on-hide-show-sheet.d.ts.map +1 -0
  1134. package/dist/esm/hooks/use-on-hide-show-sheet.js +88 -0
  1135. package/dist/esm/hooks/use-on-import-csv-legacy.d.ts +8 -0
  1136. package/dist/esm/hooks/use-on-import-csv-legacy.d.ts.map +1 -0
  1137. package/dist/esm/hooks/use-on-import-csv-legacy.js +148 -0
  1138. package/dist/esm/hooks/use-on-import-csv.d.ts +28 -0
  1139. package/dist/esm/hooks/use-on-import-csv.d.ts.map +1 -0
  1140. package/dist/esm/hooks/use-on-import-csv.js +267 -0
  1141. package/dist/esm/hooks/use-on-import-excel.d.ts +67 -0
  1142. package/dist/esm/hooks/use-on-import-excel.d.ts.map +1 -0
  1143. package/dist/esm/hooks/use-on-import-excel.js +595 -0
  1144. package/dist/esm/hooks/use-on-insert-autosum.d.ts +9 -0
  1145. package/dist/esm/hooks/use-on-insert-autosum.d.ts.map +1 -0
  1146. package/dist/esm/hooks/use-on-insert-autosum.js +91 -0
  1147. package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts +28 -0
  1148. package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -0
  1149. package/dist/esm/hooks/use-on-insert-cells-shift-down.js +65 -0
  1150. package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts +28 -0
  1151. package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -0
  1152. package/dist/esm/hooks/use-on-insert-cells-shift-right.js +65 -0
  1153. package/dist/esm/hooks/use-on-insert-checkbox.d.ts +17 -0
  1154. package/dist/esm/hooks/use-on-insert-checkbox.d.ts.map +1 -0
  1155. package/dist/esm/hooks/use-on-insert-checkbox.js +73 -0
  1156. package/dist/esm/hooks/use-on-insert-column.d.ts +40 -0
  1157. package/dist/esm/hooks/use-on-insert-column.d.ts.map +1 -0
  1158. package/dist/esm/hooks/use-on-insert-column.js +91 -0
  1159. package/dist/esm/hooks/use-on-insert-date-time.d.ts +4 -0
  1160. package/dist/esm/hooks/use-on-insert-date-time.d.ts.map +1 -0
  1161. package/dist/esm/hooks/use-on-insert-date-time.js +11 -0
  1162. package/dist/esm/hooks/use-on-insert-date.d.ts +4 -0
  1163. package/dist/esm/hooks/use-on-insert-date.d.ts.map +1 -0
  1164. package/dist/esm/hooks/use-on-insert-date.js +12 -0
  1165. package/dist/esm/hooks/use-on-insert-image.d.ts +24 -0
  1166. package/dist/esm/hooks/use-on-insert-image.d.ts.map +1 -0
  1167. package/dist/esm/hooks/use-on-insert-image.js +131 -0
  1168. package/dist/esm/hooks/use-on-insert-link.d.ts +25 -0
  1169. package/dist/esm/hooks/use-on-insert-link.d.ts.map +1 -0
  1170. package/dist/esm/hooks/use-on-insert-link.js +193 -0
  1171. package/dist/esm/hooks/use-on-insert-note.d.ts +4 -0
  1172. package/dist/esm/hooks/use-on-insert-note.d.ts.map +1 -0
  1173. package/dist/esm/hooks/use-on-insert-note.js +14 -0
  1174. package/dist/esm/hooks/use-on-insert-row.d.ts +38 -0
  1175. package/dist/esm/hooks/use-on-insert-row.d.ts.map +1 -0
  1176. package/dist/esm/hooks/use-on-insert-row.js +104 -0
  1177. package/dist/esm/hooks/use-on-insert-table-row.d.ts +31 -0
  1178. package/dist/esm/hooks/use-on-insert-table-row.d.ts.map +1 -0
  1179. package/dist/esm/hooks/use-on-insert-table-row.js +59 -0
  1180. package/dist/esm/hooks/use-on-insert-time.d.ts +4 -0
  1181. package/dist/esm/hooks/use-on-insert-time.d.ts.map +1 -0
  1182. package/dist/esm/hooks/use-on-insert-time.js +11 -0
  1183. package/dist/esm/hooks/use-on-locale-change.d.ts +35 -0
  1184. package/dist/esm/hooks/use-on-locale-change.d.ts.map +1 -0
  1185. package/dist/esm/hooks/use-on-locale-change.js +314 -0
  1186. package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts +28 -0
  1187. package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -0
  1188. package/dist/esm/hooks/use-on-merge-unmerge-cells.js +310 -0
  1189. package/dist/esm/hooks/use-on-move-columns.d.ts +28 -0
  1190. package/dist/esm/hooks/use-on-move-columns.d.ts.map +1 -0
  1191. package/dist/esm/hooks/use-on-move-columns.js +295 -0
  1192. package/dist/esm/hooks/use-on-move-rows.d.ts +30 -0
  1193. package/dist/esm/hooks/use-on-move-rows.d.ts.map +1 -0
  1194. package/dist/esm/hooks/use-on-move-rows.js +264 -0
  1195. package/dist/esm/hooks/use-on-move-selection.d.ts +35 -0
  1196. package/dist/esm/hooks/use-on-move-selection.d.ts.map +1 -0
  1197. package/dist/esm/hooks/use-on-move-selection.js +383 -0
  1198. package/dist/esm/hooks/use-on-move-sheet.d.ts +12 -0
  1199. package/dist/esm/hooks/use-on-move-sheet.d.ts.map +1 -0
  1200. package/dist/esm/hooks/use-on-move-sheet.js +65 -0
  1201. package/dist/esm/hooks/use-on-move-table-columns.d.ts +21 -0
  1202. package/dist/esm/hooks/use-on-move-table-columns.d.ts.map +1 -0
  1203. package/dist/esm/hooks/use-on-move-table-columns.js +235 -0
  1204. package/dist/esm/hooks/use-on-paste.d.ts +79 -0
  1205. package/dist/esm/hooks/use-on-paste.d.ts.map +1 -0
  1206. package/dist/esm/hooks/use-on-paste.js +868 -0
  1207. package/dist/esm/hooks/use-on-protect-range.d.ts +20 -0
  1208. package/dist/esm/hooks/use-on-protect-range.d.ts.map +1 -0
  1209. package/dist/esm/hooks/use-on-protect-range.js +67 -0
  1210. package/dist/esm/hooks/use-on-protect-sheet.d.ts +19 -0
  1211. package/dist/esm/hooks/use-on-protect-sheet.d.ts.map +1 -0
  1212. package/dist/esm/hooks/use-on-protect-sheet.js +61 -0
  1213. package/dist/esm/hooks/use-on-remove-duplicates.d.ts +21 -0
  1214. package/dist/esm/hooks/use-on-remove-duplicates.d.ts.map +1 -0
  1215. package/dist/esm/hooks/use-on-remove-duplicates.js +39 -0
  1216. package/dist/esm/hooks/use-on-rename-sheet.d.ts +21 -0
  1217. package/dist/esm/hooks/use-on-rename-sheet.d.ts.map +1 -0
  1218. package/dist/esm/hooks/use-on-rename-sheet.js +78 -0
  1219. package/dist/esm/hooks/use-on-request-calculate-wrapper.d.ts +30 -0
  1220. package/dist/esm/hooks/use-on-request-calculate-wrapper.d.ts.map +1 -0
  1221. package/dist/esm/hooks/use-on-request-calculate-wrapper.js +88 -0
  1222. package/dist/esm/hooks/use-on-request-conditional-format.d.ts +2 -0
  1223. package/dist/esm/hooks/use-on-request-conditional-format.d.ts.map +1 -0
  1224. package/dist/esm/hooks/use-on-request-conditional-format.js +8 -0
  1225. package/dist/esm/hooks/use-on-request-data-validation.d.ts +7 -0
  1226. package/dist/esm/hooks/use-on-request-data-validation.d.ts.map +1 -0
  1227. package/dist/esm/hooks/use-on-request-data-validation.js +21 -0
  1228. package/dist/esm/hooks/use-on-request-define-named-range.d.ts +8 -0
  1229. package/dist/esm/hooks/use-on-request-define-named-range.d.ts.map +1 -0
  1230. package/dist/esm/hooks/use-on-request-define-named-range.js +25 -0
  1231. package/dist/esm/hooks/use-on-request-delete-sheet.d.ts +2 -0
  1232. package/dist/esm/hooks/use-on-request-delete-sheet.d.ts.map +1 -0
  1233. package/dist/esm/hooks/use-on-request-delete-sheet.js +11 -0
  1234. package/dist/esm/hooks/use-on-request-edit-table.d.ts +3 -0
  1235. package/dist/esm/hooks/use-on-request-edit-table.d.ts.map +1 -0
  1236. package/dist/esm/hooks/use-on-request-edit-table.js +11 -0
  1237. package/dist/esm/hooks/use-on-request-format-cells.d.ts +2 -0
  1238. package/dist/esm/hooks/use-on-request-format-cells.d.ts.map +1 -0
  1239. package/dist/esm/hooks/use-on-request-format-cells.js +8 -0
  1240. package/dist/esm/hooks/use-on-request-insert-image.d.ts +3 -0
  1241. package/dist/esm/hooks/use-on-request-insert-image.d.ts.map +1 -0
  1242. package/dist/esm/hooks/use-on-request-insert-image.js +12 -0
  1243. package/dist/esm/hooks/use-on-request-insert-link.d.ts +5 -0
  1244. package/dist/esm/hooks/use-on-request-insert-link.d.ts.map +1 -0
  1245. package/dist/esm/hooks/use-on-request-insert-link.js +9 -0
  1246. package/dist/esm/hooks/use-on-request-resize.d.ts +3 -0
  1247. package/dist/esm/hooks/use-on-request-resize.d.ts.map +1 -0
  1248. package/dist/esm/hooks/use-on-request-resize.js +13 -0
  1249. package/dist/esm/hooks/use-on-request-update-named-range.d.ts +3 -0
  1250. package/dist/esm/hooks/use-on-request-update-named-range.d.ts.map +1 -0
  1251. package/dist/esm/hooks/use-on-request-update-named-range.js +11 -0
  1252. package/dist/esm/hooks/use-on-resize-table.d.ts +33 -0
  1253. package/dist/esm/hooks/use-on-resize-table.d.ts.map +1 -0
  1254. package/dist/esm/hooks/use-on-resize-table.js +212 -0
  1255. package/dist/esm/hooks/use-on-resize.d.ts +19 -0
  1256. package/dist/esm/hooks/use-on-resize.d.ts.map +1 -0
  1257. package/dist/esm/hooks/use-on-resize.js +54 -0
  1258. package/dist/esm/hooks/use-on-set-outline-depth.d.ts +17 -0
  1259. package/dist/esm/hooks/use-on-set-outline-depth.d.ts.map +1 -0
  1260. package/dist/esm/hooks/use-on-set-outline-depth.js +93 -0
  1261. package/dist/esm/hooks/use-on-show-column.d.ts +16 -0
  1262. package/dist/esm/hooks/use-on-show-column.d.ts.map +1 -0
  1263. package/dist/esm/hooks/use-on-show-column.js +82 -0
  1264. package/dist/esm/hooks/use-on-show-row.d.ts +22 -0
  1265. package/dist/esm/hooks/use-on-show-row.d.ts.map +1 -0
  1266. package/dist/esm/hooks/use-on-show-row.js +85 -0
  1267. package/dist/esm/hooks/use-on-sort-column.d.ts +53 -0
  1268. package/dist/esm/hooks/use-on-sort-column.d.ts.map +1 -0
  1269. package/dist/esm/hooks/use-on-sort-column.js +268 -0
  1270. package/dist/esm/hooks/use-on-sort-range.d.ts +42 -0
  1271. package/dist/esm/hooks/use-on-sort-range.d.ts.map +1 -0
  1272. package/dist/esm/hooks/use-on-sort-range.js +247 -0
  1273. package/dist/esm/hooks/use-on-sort-table.d.ts +59 -0
  1274. package/dist/esm/hooks/use-on-sort-table.d.ts.map +1 -0
  1275. package/dist/esm/hooks/use-on-sort-table.js +332 -0
  1276. package/dist/esm/hooks/use-on-table.d.ts +49 -0
  1277. package/dist/esm/hooks/use-on-table.d.ts.map +1 -0
  1278. package/dist/esm/hooks/use-on-table.js +384 -0
  1279. package/dist/esm/hooks/use-on-trace-dependents-precedents.d.ts +14 -0
  1280. package/dist/esm/hooks/use-on-trace-dependents-precedents.d.ts.map +1 -0
  1281. package/dist/esm/hooks/use-on-trace-dependents-precedents.js +144 -0
  1282. package/dist/esm/hooks/use-on-ungroup-columns.d.ts +11 -0
  1283. package/dist/esm/hooks/use-on-ungroup-columns.d.ts.map +1 -0
  1284. package/dist/esm/hooks/use-on-ungroup-columns.js +43 -0
  1285. package/dist/esm/hooks/use-on-ungroup-rows.d.ts +17 -0
  1286. package/dist/esm/hooks/use-on-ungroup-rows.d.ts.map +1 -0
  1287. package/dist/esm/hooks/use-on-ungroup-rows.js +49 -0
  1288. package/dist/esm/hooks/use-on-update-named-range.d.ts +19 -0
  1289. package/dist/esm/hooks/use-on-update-named-range.d.ts.map +1 -0
  1290. package/dist/esm/hooks/use-on-update-named-range.js +108 -0
  1291. package/dist/esm/hooks/use-on-update-note.d.ts +13 -0
  1292. package/dist/esm/hooks/use-on-update-note.d.ts.map +1 -0
  1293. package/dist/esm/hooks/use-on-update-note.js +20 -0
  1294. package/dist/esm/hooks/use-on-update-sheet.d.ts +10 -0
  1295. package/dist/esm/hooks/use-on-update-sheet.d.ts.map +1 -0
  1296. package/dist/esm/hooks/use-on-update-sheet.js +11 -0
  1297. package/dist/esm/hooks/use-paint-format.d.ts +17 -0
  1298. package/dist/esm/hooks/use-paint-format.d.ts.map +1 -0
  1299. package/dist/esm/hooks/use-paint-format.js +110 -0
  1300. package/dist/esm/hooks/use-search.d.ts +81 -0
  1301. package/dist/esm/hooks/use-search.d.ts.map +1 -0
  1302. package/dist/esm/hooks/use-search.js +251 -0
  1303. package/dist/esm/hooks/use-select-next-prev-sheet.d.ts +11 -0
  1304. package/dist/esm/hooks/use-select-next-prev-sheet.d.ts.map +1 -0
  1305. package/dist/esm/hooks/use-select-next-prev-sheet.js +21 -0
  1306. package/dist/esm/hooks/use-sheet-observer.d.ts +20 -0
  1307. package/dist/esm/hooks/use-sheet-observer.d.ts.map +1 -0
  1308. package/dist/esm/hooks/use-sheet-observer.js +120 -0
  1309. package/dist/esm/hooks/use-sheet-properties.d.ts +105 -0
  1310. package/dist/esm/hooks/use-sheet-properties.d.ts.map +1 -0
  1311. package/dist/esm/hooks/use-sheet-properties.js +895 -0
  1312. package/dist/esm/hooks/use-sheet-state.d.ts +17 -0
  1313. package/dist/esm/hooks/use-sheet-state.d.ts.map +1 -0
  1314. package/dist/esm/hooks/use-sheet-state.js +102 -0
  1315. package/dist/esm/hooks/use-sheetdata-subscriber.d.ts +10 -0
  1316. package/dist/esm/hooks/use-sheetdata-subscriber.d.ts.map +1 -0
  1317. package/dist/esm/hooks/use-sheetdata-subscriber.js +14 -0
  1318. package/dist/esm/hooks/use-slicers.d.ts +19 -0
  1319. package/dist/esm/hooks/use-slicers.d.ts.map +1 -0
  1320. package/dist/esm/hooks/use-slicers.js +83 -0
  1321. package/dist/esm/hooks/use-split-text-to-columns.d.ts +19 -0
  1322. package/dist/esm/hooks/use-split-text-to-columns.d.ts.map +1 -0
  1323. package/dist/esm/hooks/use-split-text-to-columns.js +30 -0
  1324. package/dist/esm/hooks/use-spreadsheet-state.d.ts +627 -0
  1325. package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -0
  1326. package/dist/esm/hooks/use-spreadsheet-state.js +2010 -0
  1327. package/dist/esm/hooks/use-ss-registry.d.ts +6 -0
  1328. package/dist/esm/hooks/use-ss-registry.d.ts.map +1 -0
  1329. package/dist/esm/hooks/use-ss-registry.js +17 -0
  1330. package/dist/esm/hooks/use-structured-reference.d.ts +8 -0
  1331. package/dist/esm/hooks/use-structured-reference.d.ts.map +1 -0
  1332. package/dist/esm/hooks/use-structured-reference.js +129 -0
  1333. package/dist/esm/hooks/use-undo-redo-actions.d.ts +40 -0
  1334. package/dist/esm/hooks/use-undo-redo-actions.d.ts.map +1 -0
  1335. package/dist/esm/hooks/use-undo-redo-actions.js +166 -0
  1336. package/dist/esm/hooks/use-undo-redo.d.ts +69 -0
  1337. package/dist/esm/hooks/use-undo-redo.d.ts.map +1 -0
  1338. package/dist/esm/hooks/use-undo-redo.js +113 -0
  1339. package/dist/esm/hooks/utils/frozen-sort.d.ts +9 -0
  1340. package/dist/esm/hooks/utils/frozen-sort.d.ts.map +1 -0
  1341. package/dist/esm/hooks/utils/frozen-sort.js +25 -0
  1342. package/dist/esm/hooks/utils/sort-rows.d.ts +32 -0
  1343. package/dist/esm/hooks/utils/sort-rows.d.ts.map +1 -0
  1344. package/dist/esm/hooks/utils/sort-rows.js +102 -0
  1345. package/dist/esm/index.d.ts +38 -0
  1346. package/dist/esm/index.d.ts.map +1 -0
  1347. package/dist/esm/index.js +39 -0
  1348. package/dist/esm/interface/apply-fill.d.ts +6 -0
  1349. package/dist/esm/interface/apply-fill.d.ts.map +1 -0
  1350. package/dist/esm/interface/apply-fill.js +195 -0
  1351. package/dist/esm/interface/auto-resize.d.ts +4 -0
  1352. package/dist/esm/interface/auto-resize.d.ts.map +1 -0
  1353. package/dist/esm/interface/auto-resize.js +50 -0
  1354. package/dist/esm/interface/calculation-interface.d.ts +67 -0
  1355. package/dist/esm/interface/calculation-interface.d.ts.map +1 -0
  1356. package/dist/esm/interface/calculation-interface.js +339 -0
  1357. package/dist/esm/interface/change-batch-stream.d.ts +25 -0
  1358. package/dist/esm/interface/change-batch-stream.d.ts.map +1 -0
  1359. package/dist/esm/interface/change-batch-stream.js +294 -0
  1360. package/dist/esm/interface/change-batch.d.ts +39 -0
  1361. package/dist/esm/interface/change-batch.d.ts.map +1 -0
  1362. package/dist/esm/interface/change-batch.js +282 -0
  1363. package/dist/esm/interface/change-border.d.ts +5 -0
  1364. package/dist/esm/interface/change-border.d.ts.map +1 -0
  1365. package/dist/esm/interface/change-border.js +116 -0
  1366. package/dist/esm/interface/change-calculated-column.d.ts +5 -0
  1367. package/dist/esm/interface/change-calculated-column.d.ts.map +1 -0
  1368. package/dist/esm/interface/change-calculated-column.js +120 -0
  1369. package/dist/esm/interface/change-decimals.d.ts +7 -0
  1370. package/dist/esm/interface/change-decimals.d.ts.map +1 -0
  1371. package/dist/esm/interface/change-decimals.js +58 -0
  1372. package/dist/esm/interface/change-formatting.d.ts +4 -0
  1373. package/dist/esm/interface/change-formatting.d.ts.map +1 -0
  1374. package/dist/esm/interface/change-formatting.js +209 -0
  1375. package/dist/esm/interface/change-sheet-tabcolor.d.ts +4 -0
  1376. package/dist/esm/interface/change-sheet-tabcolor.d.ts.map +1 -0
  1377. package/dist/esm/interface/change-sheet-tabcolor.js +19 -0
  1378. package/dist/esm/interface/change-table-column.d.ts +49 -0
  1379. package/dist/esm/interface/change-table-column.d.ts.map +1 -0
  1380. package/dist/esm/interface/change-table-column.js +247 -0
  1381. package/dist/esm/interface/change-theme.d.ts +4 -0
  1382. package/dist/esm/interface/change-theme.d.ts.map +1 -0
  1383. package/dist/esm/interface/change-theme.js +21 -0
  1384. package/dist/esm/interface/chart-extensions.d.ts +32 -0
  1385. package/dist/esm/interface/chart-extensions.d.ts.map +1 -0
  1386. package/dist/esm/interface/chart-extensions.js +71 -0
  1387. package/dist/esm/interface/citations.d.ts +33 -0
  1388. package/dist/esm/interface/citations.d.ts.map +1 -0
  1389. package/dist/esm/interface/citations.js +123 -0
  1390. package/dist/esm/interface/clear-formatting.d.ts +5 -0
  1391. package/dist/esm/interface/clear-formatting.d.ts.map +1 -0
  1392. package/dist/esm/interface/clear-formatting.js +48 -0
  1393. package/dist/esm/interface/conditional-formatting-rules.d.ts +7 -0
  1394. package/dist/esm/interface/conditional-formatting-rules.d.ts.map +1 -0
  1395. package/dist/esm/interface/conditional-formatting-rules.js +123 -0
  1396. package/dist/esm/interface/create-table.d.ts +5 -0
  1397. package/dist/esm/interface/create-table.d.ts.map +1 -0
  1398. package/dist/esm/interface/create-table.js +105 -0
  1399. package/dist/esm/interface/data-validation-rules.d.ts +25 -0
  1400. package/dist/esm/interface/data-validation-rules.d.ts.map +1 -0
  1401. package/dist/esm/interface/data-validation-rules.js +310 -0
  1402. package/dist/esm/interface/data-validation-utils.d.ts +12 -0
  1403. package/dist/esm/interface/data-validation-utils.d.ts.map +1 -0
  1404. package/dist/esm/interface/data-validation-utils.js +79 -0
  1405. package/dist/esm/interface/delete-cells-shift-left.d.ts +5 -0
  1406. package/dist/esm/interface/delete-cells-shift-left.d.ts.map +1 -0
  1407. package/dist/esm/interface/delete-cells-shift-left.js +146 -0
  1408. package/dist/esm/interface/delete-cells-shift-up.d.ts +5 -0
  1409. package/dist/esm/interface/delete-cells-shift-up.d.ts.map +1 -0
  1410. package/dist/esm/interface/delete-cells-shift-up.js +138 -0
  1411. package/dist/esm/interface/delete-cells.d.ts +6 -0
  1412. package/dist/esm/interface/delete-cells.d.ts.map +1 -0
  1413. package/dist/esm/interface/delete-cells.js +184 -0
  1414. package/dist/esm/interface/delete-column.d.ts +4 -0
  1415. package/dist/esm/interface/delete-column.d.ts.map +1 -0
  1416. package/dist/esm/interface/delete-column.js +254 -0
  1417. package/dist/esm/interface/delete-row.d.ts +4 -0
  1418. package/dist/esm/interface/delete-row.d.ts.map +1 -0
  1419. package/dist/esm/interface/delete-row.js +226 -0
  1420. package/dist/esm/interface/delete-sheet.d.ts +4 -0
  1421. package/dist/esm/interface/delete-sheet.d.ts.map +1 -0
  1422. package/dist/esm/interface/delete-sheet.js +78 -0
  1423. package/dist/esm/interface/delete-table-column.d.ts +4 -0
  1424. package/dist/esm/interface/delete-table-column.d.ts.map +1 -0
  1425. package/dist/esm/interface/delete-table-column.js +274 -0
  1426. package/dist/esm/interface/delete-table-row.d.ts +4 -0
  1427. package/dist/esm/interface/delete-table-row.d.ts.map +1 -0
  1428. package/dist/esm/interface/delete-table-row.js +278 -0
  1429. package/dist/esm/interface/duplicate-sheet.d.ts +4 -0
  1430. package/dist/esm/interface/duplicate-sheet.d.ts.map +1 -0
  1431. package/dist/esm/interface/duplicate-sheet.js +206 -0
  1432. package/dist/esm/interface/embeds.d.ts +9 -0
  1433. package/dist/esm/interface/embeds.d.ts.map +1 -0
  1434. package/dist/esm/interface/embeds.js +115 -0
  1435. package/dist/esm/interface/freeze.d.ts +5 -0
  1436. package/dist/esm/interface/freeze.d.ts.map +1 -0
  1437. package/dist/esm/interface/freeze.js +109 -0
  1438. package/dist/esm/interface/helpers.d.ts +6 -0
  1439. package/dist/esm/interface/helpers.d.ts.map +1 -0
  1440. package/dist/esm/interface/helpers.js +32 -0
  1441. package/dist/esm/interface/hide-column.d.ts +4 -0
  1442. package/dist/esm/interface/hide-column.d.ts.map +1 -0
  1443. package/dist/esm/interface/hide-column.js +59 -0
  1444. package/dist/esm/interface/hide-row.d.ts +4 -0
  1445. package/dist/esm/interface/hide-row.d.ts.map +1 -0
  1446. package/dist/esm/interface/hide-row.js +54 -0
  1447. package/dist/esm/interface/indent.d.ts +7 -0
  1448. package/dist/esm/interface/indent.d.ts.map +1 -0
  1449. package/dist/esm/interface/indent.js +73 -0
  1450. package/dist/esm/interface/insert-cells-shift-down.d.ts +5 -0
  1451. package/dist/esm/interface/insert-cells-shift-down.d.ts.map +1 -0
  1452. package/dist/esm/interface/insert-cells-shift-down.js +143 -0
  1453. package/dist/esm/interface/insert-cells-shift-right.d.ts +5 -0
  1454. package/dist/esm/interface/insert-cells-shift-right.d.ts.map +1 -0
  1455. package/dist/esm/interface/insert-cells-shift-right.js +134 -0
  1456. package/dist/esm/interface/insert-column.d.ts +7 -0
  1457. package/dist/esm/interface/insert-column.d.ts.map +1 -0
  1458. package/dist/esm/interface/insert-column.js +481 -0
  1459. package/dist/esm/interface/insert-note.d.ts +5 -0
  1460. package/dist/esm/interface/insert-note.d.ts.map +1 -0
  1461. package/dist/esm/interface/insert-note.js +23 -0
  1462. package/dist/esm/interface/insert-row.d.ts +4 -0
  1463. package/dist/esm/interface/insert-row.d.ts.map +1 -0
  1464. package/dist/esm/interface/insert-row.js +158 -0
  1465. package/dist/esm/interface/insert-table-row.d.ts +4 -0
  1466. package/dist/esm/interface/insert-table-row.d.ts.map +1 -0
  1467. package/dist/esm/interface/insert-table-row.js +314 -0
  1468. package/dist/esm/interface/interface-cli.d.ts +3 -0
  1469. package/dist/esm/interface/interface-cli.d.ts.map +1 -0
  1470. package/dist/esm/interface/interface-cli.js +62 -0
  1471. package/dist/esm/interface/named-range-operations.d.ts +19 -0
  1472. package/dist/esm/interface/named-range-operations.d.ts.map +1 -0
  1473. package/dist/esm/interface/named-range-operations.js +71 -0
  1474. package/dist/esm/interface/new-sheet.d.ts +4 -0
  1475. package/dist/esm/interface/new-sheet.d.ts.map +1 -0
  1476. package/dist/esm/interface/new-sheet.js +102 -0
  1477. package/dist/esm/interface/pivot-extensions.d.ts +27 -0
  1478. package/dist/esm/interface/pivot-extensions.d.ts.map +1 -0
  1479. package/dist/esm/interface/pivot-extensions.js +60 -0
  1480. package/dist/esm/interface/remove-duplicates.d.ts +11 -0
  1481. package/dist/esm/interface/remove-duplicates.d.ts.map +1 -0
  1482. package/dist/esm/interface/remove-duplicates.js +107 -0
  1483. package/dist/esm/interface/remove-table.d.ts +4 -0
  1484. package/dist/esm/interface/remove-table.d.ts.map +1 -0
  1485. package/dist/esm/interface/remove-table.js +50 -0
  1486. package/dist/esm/interface/resize-utils.d.ts +18 -0
  1487. package/dist/esm/interface/resize-utils.d.ts.map +1 -0
  1488. package/dist/esm/interface/resize-utils.js +34 -0
  1489. package/dist/esm/interface/resize.d.ts +5 -0
  1490. package/dist/esm/interface/resize.d.ts.map +1 -0
  1491. package/dist/esm/interface/resize.js +43 -0
  1492. package/dist/esm/interface/slicers.d.ts +9 -0
  1493. package/dist/esm/interface/slicers.d.ts.map +1 -0
  1494. package/dist/esm/interface/slicers.js +107 -0
  1495. package/dist/esm/interface/split-text.d.ts +5 -0
  1496. package/dist/esm/interface/split-text.d.ts.map +1 -0
  1497. package/dist/esm/interface/split-text.js +94 -0
  1498. package/dist/esm/interface/spreadsheet-interface.d.ts +642 -0
  1499. package/dist/esm/interface/spreadsheet-interface.d.ts.map +1 -0
  1500. package/dist/esm/interface/spreadsheet-interface.js +2442 -0
  1501. package/dist/esm/interface/table-totalrow.d.ts +20 -0
  1502. package/dist/esm/interface/table-totalrow.d.ts.map +1 -0
  1503. package/dist/esm/interface/table-totalrow.js +155 -0
  1504. package/dist/esm/interface/table-utils.d.ts +21 -0
  1505. package/dist/esm/interface/table-utils.d.ts.map +1 -0
  1506. package/dist/esm/interface/table-utils.js +38 -0
  1507. package/dist/esm/interface/update-sheet.d.ts +16 -0
  1508. package/dist/esm/interface/update-sheet.d.ts.map +1 -0
  1509. package/dist/esm/interface/update-sheet.js +64 -0
  1510. package/dist/esm/interface/update-table.d.ts +4 -0
  1511. package/dist/esm/interface/update-table.d.ts.map +1 -0
  1512. package/dist/esm/interface/update-table.js +111 -0
  1513. package/dist/esm/server-utils.d.ts +8 -0
  1514. package/dist/esm/server-utils.d.ts.map +1 -0
  1515. package/dist/esm/server-utils.js +3 -0
  1516. package/dist/esm/server.browser.d.ts +9 -0
  1517. package/dist/esm/server.browser.d.ts.map +1 -0
  1518. package/dist/esm/server.browser.js +5 -0
  1519. package/dist/esm/server.d.ts +9 -0
  1520. package/dist/esm/server.d.ts.map +1 -0
  1521. package/dist/esm/server.js +5 -0
  1522. package/dist/esm/shared-string-registry.d.ts +35 -0
  1523. package/dist/esm/shared-string-registry.d.ts.map +1 -0
  1524. package/dist/esm/shared-string-registry.js +248 -0
  1525. package/dist/esm/sheet-cell.d.ts +310 -0
  1526. package/dist/esm/sheet-cell.d.ts.map +1 -0
  1527. package/dist/esm/sheet-cell.js +1829 -0
  1528. package/dist/esm/test-setup.d.ts +2 -0
  1529. package/dist/esm/test-setup.d.ts.map +1 -0
  1530. package/dist/esm/test-setup.js +3 -0
  1531. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
  1532. package/dist/esm/types.d.ts +44 -0
  1533. package/dist/esm/types.d.ts.map +1 -0
  1534. package/dist/esm/types.js +33 -0
  1535. package/dist/esm/validation-schema/table.schema.d.ts +6 -0
  1536. package/dist/esm/validation-schema/table.schema.d.ts.map +1 -0
  1537. package/dist/esm/validation-schema/table.schema.js +4 -0
  1538. package/dist/esm/vitest.config.d.ts +3 -0
  1539. package/dist/esm/vitest.config.d.ts.map +1 -0
  1540. package/dist/esm/vitest.config.js +22 -0
  1541. package/package.json +89 -0
@@ -0,0 +1,1809 @@
1
+ import { __assign, __read, __spreadArray, __values } from "tslib";
2
+ import { lexify, tokenVocabulary } from "@rowsncolumns/calculator";
3
+ import { FormulaError } from "@rowsncolumns/fast-formula-parser";
4
+ import { getCellEffectiveValue, getCellFormattedValue, getCellUserEnteredFormat, getCellUserEnteredValue, getExtendedValueBool, getExtendedValueError, getExtendedValueFormula, getExtendedValueNumber, getExtendedValueString, getStyleId, balanceFormula, cellToAddress, getCellXfsKey, getCurrentLocale, getDefaultDateFormat, getDefaultTimeFormat, desanitizeSheetName, isAlternateFormula, isDatePattern, isDateTimePattern, isNil, isTextPattern, isValidFormula, looksLikeMarkdown, } from "@rowsncolumns/utils";
5
+ import isEqual from "lodash/isEqual";
6
+ import set from "lodash/set";
7
+ import { isDataValidationFormulaRule } from "./api/data-validation";
8
+ import { checkBooleanRule } from "./api/validation";
9
+ import { createFormattedValue, createNumberValue, detectNumberFormatPattern, detectNumberFormatType, detectValueType, detectValueTypeAndPattern, isMultiline, isNumber, isValidURLorEmail, } from "./api/datatype";
10
+ import { changeDecimals, getDecimalPlaces, pattern_number, pattern_number_thousands, } from "./api/decimals";
11
+ import { formulaToRelativeReference, updateColumnName, updateNamedRangeName, updateSheetName, } from "./api/formula";
12
+ import { getLocaleSeparators } from "./api/intl";
13
+ import { AWAITING_CALCULATION } from "./helpers";
14
+ export var defaultSheetId = 1;
15
+ export var defaultCellCoords = { rowIndex: 1, columnIndex: 1 };
16
+ // Add this helper function to determine if an object is a StyleReference
17
+ export function isStyleReference(obj) {
18
+ return obj && typeof obj === "object" && ("styleId" in obj || "sid" in obj);
19
+ }
20
+ /**
21
+ * Marker persisted as `fv` on cells whose calculation is in flight (set by
22
+ * `setLoading()`). Exported so other modules can detect the loading state
23
+ * from cellData without a stringly-typed comparison.
24
+ */
25
+ export var LOADING_VALUE = "Loading...";
26
+ var excludeKeys = new Set([
27
+ "userEnteredValue",
28
+ "ue",
29
+ "effectiveValue",
30
+ "ev",
31
+ "formattedValue",
32
+ "fv",
33
+ "ss",
34
+ "effectiveFormat",
35
+ "ef",
36
+ "userEnteredFormat",
37
+ "uf",
38
+ "dataValidation",
39
+ "imageUrl",
40
+ "hyperlink",
41
+ "metaType",
42
+ "note",
43
+ "citationId",
44
+ "commentThreadId",
45
+ "expandable",
46
+ "expanded",
47
+ "groupKeys",
48
+ "pivotId",
49
+ "conditionalFormattingResultById",
50
+ "dataValidationResult",
51
+ ]);
52
+ var hasExcelTextPrefix = function (value) {
53
+ return typeof value === "string" && value.startsWith("'") && value.length > 1;
54
+ };
55
+ /**
56
+ * Both halves of a `NumberFormat` can encode "General" two ways: as a
57
+ * missing field, or as the literal sentinel value (`"GENERAL"` for type,
58
+ * `"General"` for pattern). These two predicates normalize both forms so
59
+ * the rules above don't have to repeat `(!x || x === "…")` everywhere.
60
+ */
61
+ var hasGeneralType = function (format) {
62
+ return !format.type || format.type === "GENERAL";
63
+ };
64
+ var hasGeneralPattern = function (format) {
65
+ return !format.pattern || format.pattern === "General";
66
+ };
67
+ /**
68
+ * "General" means the cell has no explicit number format applied. Excel's
69
+ * auto-format-on-input rule triggers only for General cells; any other
70
+ * format is preserved as-is.
71
+ */
72
+ var isGeneralNumberFormat = function (format) { return !format || (hasGeneralType(format) && hasGeneralPattern(format)); };
73
+ var stripExcelTextPrefix = function (value) { return value.slice(1); };
74
+ var getHyperlinkTarget = function (hyperlink) {
75
+ if (typeof hyperlink === "string") {
76
+ return hyperlink;
77
+ }
78
+ if (hyperlink.kind === "external") {
79
+ return hyperlink.url;
80
+ }
81
+ return hyperlink.location;
82
+ };
83
+ var getHyperlinkDisplay = function (hyperlink) {
84
+ if (typeof hyperlink === "string") {
85
+ return undefined;
86
+ }
87
+ return hyperlink.display;
88
+ };
89
+ var SheetCell = /** @class */ (function () {
90
+ function SheetCell(sheetId, coords, cellData, options) {
91
+ if (sheetId === void 0) { sheetId = defaultSheetId; }
92
+ if (coords === void 0) { coords = defaultCellCoords; }
93
+ this.assign(sheetId, coords, cellData, options);
94
+ this.ensureFormatsMutable();
95
+ }
96
+ SheetCell.prototype.setVersion = function (version) {
97
+ this.version = version !== null && version !== void 0 ? version : undefined;
98
+ };
99
+ SheetCell.prototype.setUpdatedAt = function (timestamp) {
100
+ this.updatedAt = timestamp !== null && timestamp !== void 0 ? timestamp : undefined;
101
+ };
102
+ SheetCell.setDefaultSharedStrings = function (sharedStrings) {
103
+ SheetCell.defaultSharedStrings = sharedStrings;
104
+ };
105
+ SheetCell.setDefaultEnableAtFormula = function (enable) {
106
+ SheetCell.defaultEnableAtFormula = enable !== null && enable !== void 0 ? enable : false;
107
+ };
108
+ SheetCell.prototype.setLocale = function (locale) {
109
+ this.locale = locale;
110
+ };
111
+ SheetCell.prototype.setUse1904 = function (use1904) {
112
+ this.use1904 = use1904;
113
+ };
114
+ SheetCell.prototype.assign = function (sheetId, coords, cellData, options) {
115
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
116
+ if (sheetId === void 0) { sheetId = defaultSheetId; }
117
+ if (coords === void 0) { coords = defaultCellCoords; }
118
+ var _r = options !== null && options !== void 0 ? options : {}, getRangeValues = _r.getRangeValues, _s = _r.locale, locale = _s === void 0 ? getCurrentLocale() : _s, use1904 = _r.use1904, lenientGrouping = _r.lenientGrouping, enableAtFormula = _r.enableAtFormula, cellXfsRegistry = _r.cellXfsRegistry, getDataValidationById = _r.getDataValidationById, sharedStringRegistry = _r.sharedStringRegistry;
119
+ this.sheetId = sheetId;
120
+ this.coords = coords;
121
+ this.cellData = cellData;
122
+ this.cellXfsRegistry = cellXfsRegistry;
123
+ this.sharedStringRegistry = sharedStringRegistry;
124
+ this.sharedStrings =
125
+ (_b = (_a = sharedStringRegistry === null || sharedStringRegistry === void 0 ? void 0 : sharedStringRegistry.getSharedStrings()) !== null && _a !== void 0 ? _a : SheetCell.defaultSharedStrings) !== null && _b !== void 0 ? _b : this.sharedStrings;
126
+ this.sharedStringIndex = (_c = cellData === null || cellData === void 0 ? void 0 : cellData.ss) !== null && _c !== void 0 ? _c : undefined;
127
+ this.use1904 = use1904;
128
+ this.lenientGrouping = lenientGrouping;
129
+ this.enableAtFormula =
130
+ (_d = enableAtFormula !== null && enableAtFormula !== void 0 ? enableAtFormula : SheetCell.defaultEnableAtFormula) !== null && _d !== void 0 ? _d : false;
131
+ var userEnteredFormat = cellData
132
+ ? getCellUserEnteredFormat(cellData)
133
+ : undefined;
134
+ // Legacy `ef` is still readable from cellData for backwards-compat at
135
+ // the renderer layer (see `useSheetProperties.getEffectiveFormat`),
136
+ // but `SheetCell` no longer tracks it as in-memory state. `uf` is the
137
+ // single source of truth.
138
+ this.userEnteredFormat = isStyleReference(userEnteredFormat)
139
+ ? cellXfsRegistry === null || cellXfsRegistry === void 0 ? void 0 : cellXfsRegistry.getCellXfsFromStyleId(getStyleId(userEnteredFormat))
140
+ : userEnteredFormat;
141
+ this.originalUserEnteredFormat = userEnteredFormat;
142
+ this.userEnteredValue = cellData
143
+ ? getCellUserEnteredValue(cellData)
144
+ : undefined;
145
+ this.defaultPattern = "General";
146
+ this.effectiveValue = cellData
147
+ ? getCellEffectiveValue(cellData)
148
+ : undefined;
149
+ this.formattedValue = cellData
150
+ ? getCellFormattedValue(cellData)
151
+ : undefined;
152
+ this.textFormatRuns = Array.isArray(cellData === null || cellData === void 0 ? void 0 : cellData.tf)
153
+ ? __spreadArray([], __read(cellData.tf), false)
154
+ : undefined;
155
+ if (this.sharedStringIndex != null) {
156
+ this.hydrateSharedStringValue(this.sharedStringIndex);
157
+ }
158
+ var cellDataValidation = cellData === null || cellData === void 0 ? void 0 : cellData.dataValidation;
159
+ // Backwards compatiblity
160
+ // Object based
161
+ if (cellDataValidation && typeof cellDataValidation === "object") {
162
+ this.dataValidationId = cellDataValidation.id;
163
+ this.dataValidationRule = cellDataValidation;
164
+ }
165
+ else {
166
+ // New
167
+ this.dataValidationId = cellDataValidation !== null && cellDataValidation !== void 0 ? cellDataValidation : undefined;
168
+ this.dataValidationRule = this.dataValidationId
169
+ ? getDataValidationById === null || getDataValidationById === void 0 ? void 0 : getDataValidationById(this.dataValidationId)
170
+ : undefined;
171
+ }
172
+ this.conditionalFormattingResultById =
173
+ cellData === null || cellData === void 0 ? void 0 : cellData.conditionalFormattingResultById;
174
+ this.dataValidationResult = cellData === null || cellData === void 0 ? void 0 : cellData.dataValidationResult;
175
+ this.imageUrl = (_e = cellData === null || cellData === void 0 ? void 0 : cellData.imageUrl) !== null && _e !== void 0 ? _e : undefined;
176
+ this.isLoading = false;
177
+ this.loadingValue = LOADING_VALUE;
178
+ this.hyperlink = (_f = cellData === null || cellData === void 0 ? void 0 : cellData.hyperlink) !== null && _f !== void 0 ? _f : undefined;
179
+ this.metaType = (_g = cellData === null || cellData === void 0 ? void 0 : cellData.metaType) !== null && _g !== void 0 ? _g : undefined;
180
+ this.note = (_h = cellData === null || cellData === void 0 ? void 0 : cellData.note) !== null && _h !== void 0 ? _h : undefined;
181
+ this.commentThreadId = (_j = cellData === null || cellData === void 0 ? void 0 : cellData.commentThreadId) !== null && _j !== void 0 ? _j : undefined;
182
+ this.citationId = (_k = cellData === null || cellData === void 0 ? void 0 : cellData.citationId) !== null && _k !== void 0 ? _k : undefined;
183
+ this.expandable = (_l = cellData === null || cellData === void 0 ? void 0 : cellData.expandable) !== null && _l !== void 0 ? _l : undefined;
184
+ this.expanded = (_m = cellData === null || cellData === void 0 ? void 0 : cellData.expanded) !== null && _m !== void 0 ? _m : undefined;
185
+ this.getRangeValues = getRangeValues;
186
+ this.locale = locale;
187
+ this.pivotId = cellData === null || cellData === void 0 ? void 0 : cellData.pivotId;
188
+ this.groupKeys = cellData === null || cellData === void 0 ? void 0 : cellData.groupKeys;
189
+ this.version = (_o = cellData === null || cellData === void 0 ? void 0 : cellData.version) !== null && _o !== void 0 ? _o : undefined;
190
+ this.updatedAt = (_p = cellData === null || cellData === void 0 ? void 0 : cellData.updatedAt) !== null && _p !== void 0 ? _p : undefined;
191
+ this.arrayFormulaRef = (_q = cellData === null || cellData === void 0 ? void 0 : cellData.af) !== null && _q !== void 0 ? _q : undefined;
192
+ this.sharedFormulaSpec = (cellData === null || cellData === void 0 ? void 0 : cellData.sf)
193
+ ? __assign({ si: cellData.sf.si }, (cellData.sf.ref ? { ref: cellData.sf.ref } : {})) : undefined;
194
+ return this;
195
+ };
196
+ Object.defineProperty(SheetCell.prototype, "key", {
197
+ get: function () {
198
+ return SheetCell.generateCellKey(this.sheetId, this.coords.rowIndex, this.coords.columnIndex);
199
+ },
200
+ enumerable: false,
201
+ configurable: true
202
+ });
203
+ SheetCell.prototype.cloneWithFormatting = function () {
204
+ // Delete cell contents
205
+ this.deleteContents({ preserveTextNumberFormat: true });
206
+ return this;
207
+ };
208
+ SheetCell.prototype.updateNote = function (note) {
209
+ this.note = note;
210
+ };
211
+ SheetCell.prototype.updateCommentThreadId = function (commentThreadId) {
212
+ this.commentThreadId = commentThreadId;
213
+ };
214
+ SheetCell.prototype.clearCommentThreadId = function () {
215
+ this.commentThreadId = undefined;
216
+ };
217
+ SheetCell.prototype.updateCitationId = function (citationId) {
218
+ this.citationId = citationId;
219
+ };
220
+ SheetCell.prototype.clearCitationId = function () {
221
+ this.citationId = undefined;
222
+ };
223
+ SheetCell.generateCellKey = function (sheetId, rowIndex, columnIndex) {
224
+ return "".concat(sheetId, "!").concat(cellToAddress({
225
+ rowIndex: rowIndex,
226
+ columnIndex: columnIndex,
227
+ }));
228
+ };
229
+ /**
230
+ * Clears the cell's content (value, formatted value, links,
231
+ * notes, comments, shared-string refs, etc.).
232
+ *
233
+ * Formatting behavior is intentionally Del-key-compatible by
234
+ * default — Excel's Delete clears value but keeps bold / fill /
235
+ * etc. so users don't lose their styling when they wipe a cell.
236
+ * Pass `clearFormat: true` for callers that want unconditional
237
+ * full-clear semantics (e.g. pivot tear-down regenerating cells,
238
+ * "Clear All" toolbar action).
239
+ *
240
+ * Even without `clearFormat`, the method still strips
241
+ * `userEnteredFormat` when the existing numberFormat is one of
242
+ * the implicit defaults (`NUMBER` with `pattern_number` /
243
+ * `pattern_number_thousands`, or `TEXT`) — those formats are
244
+ * auto-applied based on the value's type and shouldn't outlive
245
+ * the value. Explicit user-applied formats (bold, fill,
246
+ * custom number formats) are preserved.
247
+ */
248
+ SheetCell.prototype.deleteContents = function (options) {
249
+ var _a;
250
+ var _b = options !== null && options !== void 0 ? options : {}, _c = _b.preserveTextNumberFormat, preserveTextNumberFormat = _c === void 0 ? false : _c, _d = _b.clearFormat, clearFormat = _d === void 0 ? false : _d, _e = _b.clearDataValidation, clearDataValidation = _e === void 0 ? false : _e;
251
+ // Stripping the validation stamp is an interactive-delete-only
252
+ // semantic (Del on an already-empty cell, incl. checkboxes). It must
253
+ // be requested explicitly — programmatic clears (changeBatch null
254
+ // writes, move/cut sources, fill previews) keep the validation.
255
+ if (clearDataValidation &&
256
+ !this.userEnteredValue &&
257
+ this.dataValidationRule) {
258
+ // Reset data validation
259
+ this.dataValidationId = undefined;
260
+ this.dataValidationRule = undefined;
261
+ }
262
+ this.cellData = undefined;
263
+ this.userEnteredValue = undefined;
264
+ this.effectiveValue = undefined;
265
+ this.formattedValue = undefined;
266
+ this.imageUrl = undefined;
267
+ this.hyperlink = undefined;
268
+ this.metaType = undefined;
269
+ this.note = undefined;
270
+ this.commentThreadId = undefined;
271
+ this.citationId = undefined;
272
+ this.textFormatRuns = undefined;
273
+ this.expandable = undefined;
274
+ this.expanded = undefined;
275
+ this.groupKeys = undefined;
276
+ this.version = undefined;
277
+ this.updatedAt = undefined;
278
+ this.arrayFormulaRef = undefined;
279
+ this.sharedFormulaSpec = undefined;
280
+ this.clearSharedStringIndex();
281
+ /**
282
+ * Strip userEnteredFormat. `clearFormat=true` is an
283
+ * unconditional wipe — used by pivot tear-down and "Clear All".
284
+ * Without it, only the implicit auto-applied formats go (a
285
+ * NUMBER cell with the default integer/thousands pattern, or
286
+ * a TEXT cell unless preserved). User-applied bold / fill /
287
+ * custom formats stay so the Del key keeps cell styling, matching
288
+ * Excel's behavior.
289
+ */
290
+ if (clearFormat) {
291
+ this.userEnteredFormat = undefined;
292
+ this.originalUserEnteredFormat = undefined;
293
+ }
294
+ else {
295
+ var numberFormat = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.numberFormat;
296
+ if (((numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type) === "NUMBER" &&
297
+ (numberFormat.pattern === pattern_number ||
298
+ (numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern) === pattern_number_thousands)) ||
299
+ ((numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type) === "TEXT" && !preserveTextNumberFormat)) {
300
+ this.userEnteredFormat = undefined;
301
+ this.originalUserEnteredFormat = undefined;
302
+ }
303
+ }
304
+ // If there is no data validation result
305
+ // Preserves data validation result
306
+ if (!this.dataValidationRule) {
307
+ this.dataValidationResult = undefined;
308
+ }
309
+ this.validate();
310
+ };
311
+ SheetCell.prototype.deleteUserEnteredFormat = function () {
312
+ this.userEnteredFormat = undefined;
313
+ this.originalUserEnteredFormat = undefined;
314
+ };
315
+ /**
316
+ * Copy a `userEnteredFormat` from a source format onto this cell.
317
+ * No-op when this cell already has a format, or when the source is
318
+ * empty. Used by table row-expansion to propagate column-consistent
319
+ * formats onto newly added rows (Excel parity).
320
+ */
321
+ SheetCell.prototype.inheritFormat = function (format) {
322
+ if (!format)
323
+ return;
324
+ if (this.userEnteredFormat || this.originalUserEnteredFormat)
325
+ return;
326
+ this.userEnteredFormat = isStyleReference(format) ? undefined : format;
327
+ this.originalUserEnteredFormat = format;
328
+ };
329
+ SheetCell.prototype.changeFormulaSheetName = function (name, oldName) {
330
+ if (this.formula) {
331
+ set(this, "userEnteredValue.fv", updateSheetName(this.formula, name, oldName));
332
+ }
333
+ };
334
+ SheetCell.prototype.changeNamedRangeName = function (name, oldName) {
335
+ if (this.formula) {
336
+ set(this, "userEnteredValue.fv", updateNamedRangeName(this.formula, name, oldName));
337
+ }
338
+ };
339
+ SheetCell.prototype.changeFormulaColumnName = function (name, previousName) {
340
+ if (this.formula) {
341
+ set(this, "userEnteredValue.fv", updateColumnName(this.formula, name, previousName));
342
+ }
343
+ };
344
+ SheetCell.prototype.setLoading = function () {
345
+ // Preserve effectiveValue: Excel-style, the cell keeps showing the
346
+ // last calculated value while a recalc is in flight. getCellData only
347
+ // emits the "Loading..." placeholder when no prior value exists.
348
+ this.isLoading = true;
349
+ };
350
+ SheetCell.prototype.hideLoading = function () {
351
+ this.isLoading = false;
352
+ };
353
+ Object.defineProperty(SheetCell.prototype, "formula", {
354
+ get: function () {
355
+ return getExtendedValueFormula(this.userEnteredValue);
356
+ },
357
+ enumerable: false,
358
+ configurable: true
359
+ });
360
+ Object.defineProperty(SheetCell.prototype, "error", {
361
+ get: function () {
362
+ return getExtendedValueError(this.effectiveValue);
363
+ },
364
+ enumerable: false,
365
+ configurable: true
366
+ });
367
+ Object.defineProperty(SheetCell.prototype, "failsBlockingValidation", {
368
+ /**
369
+ * True when the current value violates the cell's data-validation rule
370
+ * AND the rule blocks entry. Excel's default errorStyle is "stop" — only
371
+ * an explicit warning/information alert downgrades the rule (mirroring
372
+ * the agent-write guard's strictness).
373
+ *
374
+ * Unlike `validate()`, this checks the rule SYNCHRONOUSLY via
375
+ * `checkBooleanRule` even for condition types that `validate()` routes
376
+ * through the calculator (ONE_OF_LIST dropdowns etc.) — a programmatic
377
+ * write path needs the verdict before committing, not one calc tick
378
+ * later. CUSTOM_FORMULA rules (calculator-only), rules that error while
379
+ * evaluating, and ONE_OF_RANGE without a range resolver all fail open,
380
+ * matching the agent-write guard. Used by `changeBatchStream` with
381
+ * `skipInvalidValues` to drop the write silently; interactive editing
382
+ * keeps its dialog flow.
383
+ */
384
+ get: function () {
385
+ var _a, _b;
386
+ var rule = this.dataValidationRule;
387
+ if (!((_a = rule === null || rule === void 0 ? void 0 : rule.condition) === null || _a === void 0 ? void 0 : _a.type)) {
388
+ return false;
389
+ }
390
+ var style = (_b = rule.alert) === null || _b === void 0 ? void 0 : _b.style;
391
+ if (style === "warning" || style === "information") {
392
+ return false;
393
+ }
394
+ if (rule.condition.type === "CUSTOM_FORMULA") {
395
+ return false;
396
+ }
397
+ try {
398
+ // Error values (a formula result like #REF!) aren't a validation
399
+ // concern — fail open, same as validate().
400
+ if (getExtendedValueError(this.effectiveValue)) {
401
+ return false;
402
+ }
403
+ var effectiveValue = this.getEffectiveValue();
404
+ var isBlank = effectiveValue === undefined ||
405
+ effectiveValue === null ||
406
+ (typeof effectiveValue === "string" && effectiveValue === "");
407
+ if (rule.allowBlank && isBlank) {
408
+ return false;
409
+ }
410
+ // Strict `=== false`: a rule the checker can't resolve (e.g.
411
+ // ONE_OF_RANGE without getRangeValues) returns undefined → fail open.
412
+ return (checkBooleanRule(rule, effectiveValue, undefined, this.getRangeValues, { locale: this.locale }) === false);
413
+ }
414
+ catch (_c) {
415
+ return false;
416
+ }
417
+ },
418
+ enumerable: false,
419
+ configurable: true
420
+ });
421
+ SheetCell.getRelativeFormula = function (value, from, to, activeSheetName, exclusionRange, ignoreCircular, rowCount, columnCount, preserveAbsolutes) {
422
+ if (activeSheetName === void 0) { activeSheetName = ""; }
423
+ if (ignoreCircular === void 0) { ignoreCircular = false; }
424
+ if (typeof value !== "string") {
425
+ return undefined;
426
+ }
427
+ return formulaToRelativeReference(value, from, to, activeSheetName, {
428
+ exclusionRange: exclusionRange,
429
+ ignoreCircular: ignoreCircular,
430
+ rowCount: rowCount,
431
+ columnCount: columnCount,
432
+ preserveAbsolutes: preserveAbsolutes,
433
+ });
434
+ };
435
+ SheetCell.prototype.moveFormula = function (from, to, activeSheetName, options) {
436
+ var e_1, _a;
437
+ /**
438
+ * Moving formula does not trigger a recalc
439
+ * The cell dependency is updated using
440
+ * enqueueGraphOperation
441
+ */
442
+ if (this.isFormula()) {
443
+ try {
444
+ var sourceFormula = this.formula;
445
+ var movedFormula = formulaToRelativeReference(sourceFormula, from, to, activeSheetName, options);
446
+ // Filling/moving formulas should also shift explicit refs like
447
+ // ='Sheet1'!A1 when the source and target rows/cols move.
448
+ var referencedSheetNames = lexify(sourceFormula)
449
+ .tokens.map(function (token) {
450
+ if (token.tokenType.name === tokenVocabulary.Sheet.name) {
451
+ return token.image.slice(0, -1);
452
+ }
453
+ if (token.tokenType.name === tokenVocabulary.SheetQuoted.name) {
454
+ var desanitized = desanitizeSheetName(token.image);
455
+ return desanitized ? desanitized.slice(0, -1) : undefined;
456
+ }
457
+ return undefined;
458
+ })
459
+ .filter(function (sheetName) { return Boolean(sheetName); });
460
+ try {
461
+ for (var _b = __values(new Set(referencedSheetNames)), _c = _b.next(); !_c.done; _c = _b.next()) {
462
+ var sheetName = _c.value;
463
+ if (sheetName.toLowerCase() === activeSheetName.toLowerCase()) {
464
+ continue;
465
+ }
466
+ movedFormula = formulaToRelativeReference(movedFormula, from, to, sheetName, options);
467
+ }
468
+ }
469
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
470
+ finally {
471
+ try {
472
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
473
+ }
474
+ finally { if (e_1) throw e_1.error; }
475
+ }
476
+ this.userEnteredValue = { fv: movedFormula };
477
+ }
478
+ catch (err) {
479
+ console.log("Error moving formula", err, this.formula, from, to);
480
+ if (err instanceof FormulaError) {
481
+ this.effectiveValue = {
482
+ ev: {
483
+ type: "Error",
484
+ name: err.error,
485
+ message: err.message,
486
+ },
487
+ };
488
+ }
489
+ }
490
+ }
491
+ };
492
+ SheetCell.prototype.isFormula = function () {
493
+ return !!getExtendedValueFormula(this.userEnteredValue);
494
+ };
495
+ SheetCell.prototype.isStructuredReferenceFormula = function () {
496
+ // This regex matches table references like [Column], [@Column], or TableName[Column]
497
+ return this.formula && /(\w+\[[@]?\w+\]|\[[@]?\w+\])/.test(this.formula);
498
+ };
499
+ SheetCell.prototype.ephemeral = function () {
500
+ var _a;
501
+ // The formula contains absolute reference or is a table
502
+ return this.isStructuredReferenceFormula() || ((_a = this.formula) === null || _a === void 0 ? void 0 : _a.includes("$"));
503
+ };
504
+ SheetCell.prototype.isEmpty = function () {
505
+ return !getExtendedValueString(this.userEnteredValue);
506
+ };
507
+ SheetCell.prototype.isNumberType = function (numType) {
508
+ return [
509
+ "NUMBER",
510
+ "CURRENCY",
511
+ "PERCENT",
512
+ "ACCOUNTING",
513
+ "FRACTION",
514
+ "SCIENTIFIC",
515
+ ].includes(numType);
516
+ };
517
+ SheetCell.prototype.changeDecimals = function (delta) {
518
+ var _a, _b;
519
+ if (delta === void 0) { delta = 1; }
520
+ // Read through getNumberFormat so we pick up `uf.numberFormat` when
521
+ // `effectiveFormat` is empty (which is the common case now that `ef`
522
+ // is no longer persisted on cellData).
523
+ var currentNumberFormat = this.getNumberFormat();
524
+ var effectiveNumberType = currentNumberFormat === null || currentNumberFormat === void 0 ? void 0 : currentNumberFormat.type;
525
+ var isNumber = this.isNumberType(effectiveNumberType);
526
+ var effectiveValue = getExtendedValueNumber(this.effectiveValue);
527
+ var isGeneralNumber = effectiveNumberType === undefined || effectiveNumberType === "GENERAL";
528
+ var effectivePattern = (currentNumberFormat === null || currentNumberFormat === void 0 ? void 0 : currentNumberFormat.pattern) === "General"
529
+ ? undefined
530
+ : currentNumberFormat === null || currentNumberFormat === void 0 ? void 0 : currentNumberFormat.pattern;
531
+ // Blank cells stay editable when they carry an explicit numeric pattern
532
+ // (e.g. whole-column formatting), so later entries inherit the adjusted
533
+ // precision. Blank General cells have nothing to adjust.
534
+ if ((!isNumber && !isGeneralNumber) ||
535
+ (typeof effectiveValue !== "number" && !(isNumber && effectivePattern))) {
536
+ return;
537
+ }
538
+ var finalNumberType = isGeneralNumber ? "NUMBER" : effectiveNumberType;
539
+ var finalPattern = effectivePattern
540
+ ? effectivePattern
541
+ : changeDecimals(pattern_number, Math.min(
542
+ // The guard above ensures effectiveValue is a number whenever
543
+ // effectivePattern is falsy, so the 0 fallback is unreachable —
544
+ // it only narrows the type for getDecimalPlaces.
545
+ getDecimalPlaces((_b = (_a = this.formattedValue) !== null && _a !== void 0 ? _a : effectiveValue) !== null && _b !== void 0 ? _b : 0, this.locale), 3), false);
546
+ var pattern = changeDecimals(finalPattern, delta);
547
+ if (pattern) {
548
+ if (typeof effectiveValue === "number") {
549
+ this.formattedValue = createFormattedValue(effectiveValue, "numberValue", pattern, this.locale);
550
+ }
551
+ if (!this.userEnteredFormat) {
552
+ this.userEnteredFormat = {};
553
+ }
554
+ this.userEnteredFormat.numberFormat = {
555
+ type: finalNumberType,
556
+ pattern: pattern,
557
+ };
558
+ }
559
+ };
560
+ SheetCell.prototype.decreaseDecimals = function () {
561
+ this.changeDecimals(-1);
562
+ };
563
+ SheetCell.prototype.increaseDecimals = function () {
564
+ this.changeDecimals(1);
565
+ };
566
+ SheetCell.prototype.setBorder = function (position, border) {
567
+ this.ensureUserEnteredFormatMutable();
568
+ if (!this.userEnteredFormat) {
569
+ this.userEnteredFormat = {};
570
+ }
571
+ var existing = this.userEnteredFormat.borders;
572
+ var borders = existing && Object.isExtensible(existing)
573
+ ? existing
574
+ : __assign({}, (existing !== null && existing !== void 0 ? existing : {}));
575
+ this.userEnteredFormat.borders = borders;
576
+ if (!border.color) {
577
+ // User is trying to clear the border
578
+ delete borders[position];
579
+ }
580
+ else {
581
+ if (isNil(border)) {
582
+ delete borders[position];
583
+ }
584
+ else {
585
+ borders[position] = border;
586
+ }
587
+ }
588
+ };
589
+ SheetCell.prototype.setUserEnteredBorder = function (position, border) {
590
+ this.ensureUserEnteredFormatMutable();
591
+ if (!this.userEnteredFormat) {
592
+ this.userEnteredFormat = {};
593
+ }
594
+ var existing = this.userEnteredFormat.borders;
595
+ var borders = existing && Object.isExtensible(existing)
596
+ ? existing
597
+ : __assign({}, (existing !== null && existing !== void 0 ? existing : {}));
598
+ this.userEnteredFormat.borders = borders;
599
+ if (!border.color) {
600
+ // User is trying to clear the border
601
+ delete borders[position];
602
+ }
603
+ else {
604
+ if (isNil(border)) {
605
+ delete borders[position];
606
+ }
607
+ else {
608
+ borders[position] = border;
609
+ }
610
+ }
611
+ };
612
+ SheetCell.prototype.setAllBorders = function (border) {
613
+ // User is trying to clear the border
614
+ if (!border.color) {
615
+ this.clearAllBorders();
616
+ }
617
+ else {
618
+ set(this, "userEnteredFormat.borders", {
619
+ top: border,
620
+ bottom: border,
621
+ left: border,
622
+ right: border,
623
+ });
624
+ }
625
+ };
626
+ SheetCell.prototype.clearAllBorders = function () {
627
+ if (this.userEnteredFormat) {
628
+ this.userEnteredFormat.borders = undefined;
629
+ }
630
+ };
631
+ SheetCell.prototype.setImage = function (imageUrl) {
632
+ this.imageUrl = imageUrl;
633
+ this.userEnteredValue = undefined;
634
+ this.hyperlink = undefined;
635
+ this.formattedValue = "";
636
+ };
637
+ SheetCell.prototype.isMultiline = function () {
638
+ return isMultiline(this.getUserEnteredValue());
639
+ };
640
+ /**
641
+ * Over write formatted value
642
+ * @param value
643
+ */
644
+ SheetCell.prototype.setFormattedValue = function (value) {
645
+ this.formattedValue = value;
646
+ };
647
+ SheetCell.prototype.setUserEnteredValue = function (value, textFormatRuns, options) {
648
+ var _a, _b, _c;
649
+ if (value === "" || isNil(value)) {
650
+ this.clearUserEnteredValue();
651
+ return this;
652
+ }
653
+ // Ensure new entries can replace the previously formatted value (e.g. hyperlinks)
654
+ this.formattedValue = undefined;
655
+ // SDK / programmatic-write path: trust the caller's explicit JS type
656
+ // (matches stock openpyxl / Excel-Java behavior — a Python string
657
+ // stays a string, a Python datetime is pre-converted by the SDK and
658
+ // arrives as a numberValue with the appropriate numberFormat already
659
+ // staged by a separate ``SetCellStyle`` command). Skips the markdown,
660
+ // ``@``-prefix, leading-``+``, and ``detectValueTypeAndPattern``
661
+ // coercions that the cell-editor UX relies on.
662
+ if (options === null || options === void 0 ? void 0 : options.disableTypeInference) {
663
+ // eslint-disable-next-line no-console
664
+ var inferredType = typeof value === "boolean"
665
+ ? "boolValue"
666
+ : typeof value === "number"
667
+ ? "numberValue"
668
+ : "stringValue";
669
+ // For numeric values, set ``numberFormatType="NUMBER"`` so the cell
670
+ // doesn't get auto-interned as a shared string. ``setNumberValue``
671
+ // stores ``userEnteredValue.sv`` with the string representation of
672
+ // the number; without a non-falsy ``numberFormat.type``,
673
+ // ``shouldUseSharedStrings`` treats the cell as a string and the
674
+ // shared-string registry promotes it to ``ss``. That in turn makes
675
+ // a subsequent ``SetCellStyle`` with a ``numberFormat`` (e.g.
676
+ // ``"$#,##0.00"``) early-return inside ``setNumberFormat``
677
+ // (the ``!isNil(sharedStringIndex) && numberFormatType !== "TEXT"``
678
+ // guard), so the user's currency / percent / date pattern never
679
+ // lands on the cell. Stamping ``NUMBER`` here mirrors what
680
+ // ``detectValueTypeAndPattern`` does for a plain integer / float
681
+ // — only the auto-detected ``pattern`` is left undefined, so the
682
+ // SDK-supplied ``SetCellStyle`` is authoritative.
683
+ var inferredFormatType = typeof value === "number" ? "NUMBER" : undefined;
684
+ this.setUserEnteredValueByType(inferredType, value, textFormatRuns, inferredFormatType, typeof value === "number" ? value : undefined, undefined, undefined);
685
+ if (!this.isFormula()) {
686
+ this.validate();
687
+ }
688
+ this.setVersion(((_a = this.version) !== null && _a !== void 0 ? _a : 0) + 1);
689
+ this.setUpdatedAt(Date.now());
690
+ return this;
691
+ }
692
+ var originalValue = value;
693
+ var normalizedValue = value;
694
+ var forceStringFromPrefix = false;
695
+ if (hasExcelTextPrefix(normalizedValue)) {
696
+ normalizedValue = stripExcelTextPrefix(normalizedValue);
697
+ forceStringFromPrefix = true;
698
+ }
699
+ if (typeof normalizedValue === "string" &&
700
+ normalizedValue.startsWith("+") &&
701
+ !isAlternateFormula(normalizedValue)) {
702
+ var plusTrimmed = normalizedValue.slice(1).trim();
703
+ if (isNumber(plusTrimmed, this.locale, this.lenientGrouping)) {
704
+ normalizedValue = plusTrimmed;
705
+ }
706
+ }
707
+ var forceMarkdownText = typeof normalizedValue === "string" && looksLikeMarkdown(normalizedValue);
708
+ var startsWithAt = typeof normalizedValue === "string" && normalizedValue.startsWith("@");
709
+ var forceStringFromAtPrefix = startsWithAt && !this.enableAtFormula;
710
+ var dataValuePattern = forceMarkdownText
711
+ ? ["stringValue"]
712
+ : forceStringFromAtPrefix
713
+ ? ["stringValue"]
714
+ : this.enableAtFormula && startsWithAt
715
+ ? ["formulaValue"]
716
+ : detectValueTypeAndPattern(normalizedValue, this.locale, this.lenientGrouping, this.use1904);
717
+ var _d = __read(dataValuePattern, 4), valueType = _d[0], numberValue = _d[2], newPattern = _d[3];
718
+ // User forced this cell to be a text
719
+ var forceStringValue = this.isText((_b = this.userEnteredFormat) === null || _b === void 0 ? void 0 : _b.numberFormat);
720
+ var finalValueType = forceStringValue ||
721
+ forceStringFromPrefix ||
722
+ forceMarkdownText ||
723
+ forceStringFromAtPrefix
724
+ ? "stringValue"
725
+ : valueType;
726
+ var numberFormatType = dataValuePattern[1];
727
+ this.setUserEnteredValueByType(finalValueType, normalizedValue, textFormatRuns, numberFormatType, numberValue, newPattern, forceStringFromPrefix ? originalValue : undefined);
728
+ // Validate
729
+ // Formula cells preserve their prior effectiveValue across an edit
730
+ // (Excel-like behavior), so guarding on `getEffectiveValue()` would
731
+ // validate against the *stale* value. Defer validation for formulas
732
+ // entirely — calc-success drives it via setDataValidationResult.
733
+ if (!this.isFormula()) {
734
+ this.validate();
735
+ }
736
+ this.setVersion(((_c = this.version) !== null && _c !== void 0 ? _c : 0) + 1);
737
+ this.setUpdatedAt(Date.now());
738
+ return this;
739
+ };
740
+ SheetCell.prototype.clearUserEnteredValue = function () {
741
+ this.userEnteredValue = undefined;
742
+ this.formattedValue = undefined;
743
+ this.textFormatRuns = undefined;
744
+ this.clearSharedStringIndex();
745
+ // Remove effective value too
746
+ this.effectiveValue = undefined;
747
+ };
748
+ SheetCell.prototype.clearEffectiveValueForFormula = function () {
749
+ // Remove effective value
750
+ this.effectiveValue = undefined;
751
+ this.textFormatRuns = undefined;
752
+ this.formattedValue = "";
753
+ };
754
+ SheetCell.prototype.setUserEnteredValueByType = function (valueType, value, textFormatRuns, numberFormatType, numberValue, newPattern, originalStringValue) {
755
+ switch (valueType) {
756
+ case "boolValue":
757
+ this.setBooleanValue(value);
758
+ break;
759
+ case "numberValue":
760
+ this.setNumberValue(value, numberFormatType, numberValue, newPattern);
761
+ break;
762
+ case "formulaValue":
763
+ this.setFormulaValue(value);
764
+ break;
765
+ case "stringValue":
766
+ // Check if its url (unless original prefix forced plain text)
767
+ if (!originalStringValue && isValidURLorEmail(value)) {
768
+ // A fresh user entry replaces whatever string the cell held.
769
+ // `setHyperlink`'s no-title branch deliberately leaves the
770
+ // shared-string index alone (it also runs during hydration),
771
+ // so drop it here — otherwise `getCellData` keeps serializing
772
+ // the old SST slot and the cell renders the previous URL.
773
+ this.clearSharedStringIndex();
774
+ this.setUrl(value);
775
+ }
776
+ else {
777
+ this.setStringValue(value, textFormatRuns, originalStringValue);
778
+ }
779
+ break;
780
+ }
781
+ };
782
+ SheetCell.prototype.ensureUserEnteredFormatMutable = function () {
783
+ if (this.userEnteredFormat &&
784
+ !Object.isExtensible(this.userEnteredFormat)) {
785
+ this.userEnteredFormat = __assign({}, this.userEnteredFormat);
786
+ }
787
+ };
788
+ SheetCell.prototype.ensureFormatsMutable = function () {
789
+ this.ensureUserEnteredFormatMutable();
790
+ };
791
+ SheetCell.prototype.setBooleanValue = function (value) {
792
+ this.clearSharedStringIndex();
793
+ var effectiveValue = String(value).toUpperCase() === "TRUE";
794
+ set(this, "userEnteredValue", { bv: effectiveValue });
795
+ set(this, "effectiveValue", { bv: effectiveValue });
796
+ this.formattedValue = createFormattedValue(value, "boolValue", this.defaultPattern, this.locale);
797
+ this.ensureFormatsMutable();
798
+ // Excel parity: the cell's existing number format survives a boolean
799
+ // entry — re-typing a number later restores the styled display. Wiping
800
+ // `uf.numberFormat` here would silently drop a user-applied custom
801
+ // format the moment TRUE/FALSE was written.
802
+ };
803
+ SheetCell.prototype.setNumberValue = function (value, numberFormatType, numberValue, newPattern) {
804
+ var _a, _b;
805
+ this.clearSharedStringIndex();
806
+ // Read through getNumberFormat so we pick up either `uf.numberFormat`
807
+ // or the in-memory `effectiveFormat.numberFormat` (legacy `ef`-only
808
+ // cells loaded from older saved data populate effectiveFormat in
809
+ // assign()). Without this, editing a legacy ef-only currency cell
810
+ // would silently drop CURRENCY back to NUMBER.
811
+ var existingFormat = this.getNumberFormat();
812
+ var finalFormatType = numberFormatType;
813
+ var finalPattern = newPattern;
814
+ if ((existingFormat === null || existingFormat === void 0 ? void 0 : existingFormat.type) === "TEXT") {
815
+ finalFormatType = "TEXT";
816
+ finalPattern = (_a = existingFormat.pattern) !== null && _a !== void 0 ? _a : finalPattern;
817
+ }
818
+ // Excel-like behavior: Preserve existing format when entering plain numbers
819
+ if (existingFormat &&
820
+ this.shouldPreserveExistingFormat(numberFormatType, existingFormat, newPattern, numberValue)) {
821
+ finalFormatType = existingFormat.type;
822
+ finalPattern = (_b = existingFormat.pattern) !== null && _b !== void 0 ? _b : undefined;
823
+ }
824
+ // Calculate string value for user entered value
825
+ var stringValue = this.getStringValueForFormat(value, numberValue, finalFormatType);
826
+ // Create formatted display value
827
+ this.formattedValue = createFormattedValue(numberValue, "numberValue", finalPattern !== null && finalPattern !== void 0 ? finalPattern : this.defaultPattern, this.locale);
828
+ // Set values and alignment
829
+ if (finalFormatType === "TEXT") {
830
+ this.formattedValue = createFormattedValue(String(value), "stringValue", finalPattern !== null && finalPattern !== void 0 ? finalPattern : this.defaultPattern, this.locale);
831
+ set(this, "userEnteredValue", { sv: String(value) });
832
+ set(this, "effectiveValue", { sv: String(value) });
833
+ }
834
+ else {
835
+ var userString = typeof value === "string" && finalFormatType === "NUMBER"
836
+ ? this.normalizeUserEnteredNumber(value)
837
+ : typeof value === "string" && finalFormatType === "SCIENTIFIC"
838
+ ? stringValue // Use expanded numeric string for scientific notation
839
+ : typeof value === "string"
840
+ ? value
841
+ : stringValue;
842
+ set(this, "userEnteredValue", { sv: userString });
843
+ set(this, "effectiveValue", { nv: numberValue });
844
+ }
845
+ // Apply number format if specified — uf only.
846
+ if (finalFormatType) {
847
+ set(this, "userEnteredFormat.numberFormat.type", finalFormatType);
848
+ set(this, "userEnteredFormat.numberFormat.pattern", finalPattern);
849
+ }
850
+ };
851
+ SheetCell.prototype.normalizeUserEnteredNumber = function (value) {
852
+ var group = getLocaleSeparators(this.locale).group;
853
+ if (!group) {
854
+ return value;
855
+ }
856
+ var isWhitespaceGroup = group.trim() === "";
857
+ if (isWhitespaceGroup) {
858
+ return value.replace(/[\s\u00A0\u202F]/g, "");
859
+ }
860
+ var escaped = group.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
861
+ return value.replace(new RegExp(escaped, "g"), "");
862
+ };
863
+ SheetCell.prototype.shouldPreserveExistingFormat = function (newFormatType, existingFormat, _newPattern, _numberValue) {
864
+ // Excel rule, in three layers:
865
+ // 1. General cell → defer to the typed value's
866
+ // inferred format
867
+ // 2. Plain NUMBER input → preserve any non-General format
868
+ // 3. Explicit-format input → preserve only when the
869
+ // (Currency / Percent / Date) existing format is in the same
870
+ // category, else switch
871
+ if (isGeneralNumberFormat(existingFormat))
872
+ return false;
873
+ if (!newFormatType || newFormatType === "NUMBER")
874
+ return true;
875
+ // Specific data state: General type combined with a non-General
876
+ // pattern is the exact shape the Custom-format dialog produces.
877
+ // Excel's auto-format paths always stamp a named type (CURRENCY,
878
+ // PERCENT, DATE, …), so a pattern paired with a General type can
879
+ // only have come from explicit user action (dialog or programmatic).
880
+ // Respect it across all inputs.
881
+ if (hasGeneralType(existingFormat) && !hasGeneralPattern(existingFormat)) {
882
+ return true;
883
+ }
884
+ // Cross-category transitions — resolve the existing format's
885
+ // effective category, falling back to pattern inference for
886
+ // pattern-only formats imported from xlsx.
887
+ var effectiveType = !hasGeneralType(existingFormat)
888
+ ? existingFormat.type
889
+ : this.isDateTime(existingFormat)
890
+ ? "DATE_TIME"
891
+ : this.isDate(existingFormat)
892
+ ? "DATE"
893
+ : "NUMBER";
894
+ return effectiveType === newFormatType;
895
+ };
896
+ SheetCell.prototype.getStringValueForFormat = function (value, numberValue, formatType) {
897
+ var isDate = this.isDate(formatType ? { type: formatType } : undefined);
898
+ var isDateTime = this.isDateTime(formatType ? { type: formatType } : undefined);
899
+ if (isDate || isDateTime) {
900
+ return createFormattedValue(numberValue, "numberValue", isDate ? getDefaultDateFormat(this.locale) : getDefaultTimeFormat(this.locale), this.locale);
901
+ }
902
+ if (formatType === "PERCENT") {
903
+ return value; // Show user entered value for percent
904
+ }
905
+ return String(numberValue);
906
+ };
907
+ SheetCell.prototype.setFormulaValue = function (formulaValue, clearEffectiveValue) {
908
+ if (clearEffectiveValue === void 0) { clearEffectiveValue = false; }
909
+ if (formulaValue.startsWith("@") && !this.enableAtFormula) {
910
+ this.setStringValue(formulaValue);
911
+ return;
912
+ }
913
+ // A leading "==" can never start a valid formula expression (Excel/Sheets
914
+ // have no token for it), so values like "=== COMP DRIVERS ===" are label
915
+ // text, not formulas. Store them as a plain string rather than handing a
916
+ // never-parseable expression to the calculator. Mirrors the "@" guard
917
+ // above and the matching `isAFormula` classification.
918
+ if (formulaValue.startsWith("==")) {
919
+ this.setStringValue(formulaValue);
920
+ return;
921
+ }
922
+ this.clearSharedStringIndex();
923
+ // Balance parenthesis
924
+ formulaValue = balanceFormula(formulaValue);
925
+ // Sanitize formula
926
+ if (formulaValue.startsWith("@")) {
927
+ formulaValue = "=".concat(formulaValue.slice(1));
928
+ }
929
+ else if (isAlternateFormula(formulaValue)) {
930
+ // If it starts with @, replace it with =
931
+ formulaValue = "=".concat(formulaValue);
932
+ }
933
+ // Convert escaped quotes \\" or \" to Excel's doubled quote format ""
934
+ formulaValue = formulaValue.replace(/\\+"/g, '""');
935
+ // Convert newline escape sequences to CHAR(10) function
936
+ formulaValue = formulaValue.replace(/\\n/g, '"&CHAR(10)&"');
937
+ // Drop xlsx round-trip provenance — the user is supplying a brand-new
938
+ // formula, so any source-side `<f t="array" ref="…">` or
939
+ // `<f t="shared" si="…">` grouping no longer applies. Without this,
940
+ // the exporter would replay the stale marker and either:
941
+ // (a) write `<f t="array" ref="G7:G10">USER_FORMULA</f>` and spill
942
+ // the user's edit across cells that weren't part of the source
943
+ // array, or
944
+ // (b) emit `<f t="shared" si="N"/>` (self-closing, no formula text)
945
+ // and lose the user's new expression entirely.
946
+ // Editing a cell formula is the canonical "detach from group" action,
947
+ // mirroring how Excel breaks the grouping on in-place edits.
948
+ this.arrayFormulaRef = undefined;
949
+ this.sharedFormulaSpec = undefined;
950
+ // Set user entered value
951
+ this.userEnteredValue = { fv: formulaValue };
952
+ // Clear
953
+ if (clearEffectiveValue) {
954
+ if (isValidFormula(formulaValue)) {
955
+ this.clearEffectiveValueForFormula();
956
+ }
957
+ else {
958
+ this.formattedValue = formulaValue;
959
+ }
960
+ }
961
+ };
962
+ SheetCell.prototype.setStringValue = function (stringValue, textFormatRuns, userEnteredStringValue) {
963
+ var _a, _b, _c;
964
+ this.clearSharedStringIndex();
965
+ this.ensureFormatsMutable();
966
+ var coercedValue = String(stringValue);
967
+ var userValue = userEnteredStringValue !== null && userEnteredStringValue !== void 0 ? userEnteredStringValue : coercedValue;
968
+ set(this, "userEnteredValue", { sv: userValue });
969
+ set(this, "effectiveValue", { sv: coercedValue });
970
+ // Excel parity: the cell's existing pattern still applies to text. A
971
+ // 4-section custom format like `[Blue]#,##0.00;[Red]-#,##0.00;[Green]"zero";[Magenta]@`
972
+ // uses its `@` (segment 4) branch for string values, so the literal
973
+ // prefixes / suffixes around `@` (e.g. `"Note: "@` → `Note: hello`) and
974
+ // any `[Color]` directive in that segment must flow through. Falling
975
+ // back to `defaultPattern` here would silently drop them.
976
+ var pattern = (_c = (_b = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.numberFormat) === null || _b === void 0 ? void 0 : _b.pattern) !== null && _c !== void 0 ? _c : this.defaultPattern;
977
+ this.formattedValue = createFormattedValue(coercedValue, "stringValue", pattern, this.locale);
978
+ this.textFormatRuns = textFormatRuns;
979
+ // Don't clear `uf.numberFormat` here. Excel preserves the cell's number
980
+ // format when text is entered — re-typing a number later restores the
981
+ // styled display, and the `@` section of the existing pattern still
982
+ // formats the current text value. The previous "delete unless TEXT"
983
+ // branch nuked any user-applied custom format the moment a string was
984
+ // written, which also broke the per-section color path at render time.
985
+ };
986
+ SheetCell.prototype.getSharedStringCandidate = function () {
987
+ var _a;
988
+ return ((_a = getExtendedValueString(this.userEnteredValue)) !== null && _a !== void 0 ? _a : getExtendedValueString(this.effectiveValue));
989
+ };
990
+ /**
991
+ * Runs attached to this cell at write-time. The shared-string
992
+ * registry calls this to decide whether to intern a plain or rich
993
+ * SST entry. Returns `undefined` when the cell has no per-segment
994
+ * formatting (plain interning path stays unchanged).
995
+ */
996
+ SheetCell.prototype.getSharedStringRichRuns = function () {
997
+ if (!this.textFormatRuns || this.textFormatRuns.length === 0) {
998
+ return undefined;
999
+ }
1000
+ return this.textFormatRuns;
1001
+ };
1002
+ SheetCell.prototype.shouldUseSharedStrings = function (candidate) {
1003
+ var _a;
1004
+ if (!candidate || candidate === "") {
1005
+ return false;
1006
+ }
1007
+ if (hasExcelTextPrefix(candidate)) {
1008
+ return false;
1009
+ }
1010
+ if (this.isFormula()) {
1011
+ return false;
1012
+ }
1013
+ // The cell's effective value is numeric (or boolean) — the candidate
1014
+ // string is just a serialized form of a real number. Promoting it to
1015
+ // the SST would replace `ev.nv` with `ev.sv` on hydration, turning a
1016
+ // genuine number into a text cell. That's exactly how `-12` typed
1017
+ // into a `[Blue]…;[Red]-…;[Green]…;[Magenta]@` custom-format cell
1018
+ // ended up rendered in magenta and left-aligned: the renderer saw a
1019
+ // string and routed it through the `@` section instead of the
1020
+ // negative-number section. This single guard is sufficient — a
1021
+ // *text* value in the same custom-pattern cell still goes to the SST
1022
+ // normally (no `ev.nv` to protect), which keeps xlsx export's
1023
+ // string-interning optimization intact for the long-text case.
1024
+ if (this.effectiveValue &&
1025
+ (getExtendedValueNumber(this.effectiveValue) !== undefined ||
1026
+ getExtendedValueBool(this.effectiveValue) !== undefined)) {
1027
+ return false;
1028
+ }
1029
+ var numberFormat = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.numberFormat;
1030
+ var numberFormatType = numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type;
1031
+ // A pattern-only format (no `type`) imported from xlsx still carries
1032
+ // semantic intent. If the pattern is date/datetime/time, the cell is
1033
+ // numeric in Excel's eyes — promoting it to the SST would lose that
1034
+ // and re-emit the value as a literal text serial on save.
1035
+ if (!numberFormatType && (numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern)) {
1036
+ if (isDatePattern(numberFormat.pattern) ||
1037
+ isDateTimePattern(numberFormat.pattern)) {
1038
+ return false;
1039
+ }
1040
+ }
1041
+ return (numberFormatType === undefined ||
1042
+ numberFormatType === "GENERAL" ||
1043
+ numberFormatType === "TEXT");
1044
+ };
1045
+ SheetCell.prototype.getSharedStringIndex = function () {
1046
+ return this.sharedStringIndex;
1047
+ };
1048
+ SheetCell.prototype.applySharedStringIndex = function (index) {
1049
+ this.sharedStringIndex = index !== null && index !== void 0 ? index : undefined;
1050
+ };
1051
+ SheetCell.prototype.clearSharedStringIndex = function () {
1052
+ this.sharedStringIndex = undefined;
1053
+ };
1054
+ SheetCell.prototype.hydrateSharedStringValue = function (index) {
1055
+ var _a, _b, _c;
1056
+ var strings = (_b = (_a = this.sharedStrings) !== null && _a !== void 0 ? _a : SheetCell.defaultSharedStrings) !== null && _b !== void 0 ? _b : undefined;
1057
+ if (!strings) {
1058
+ return;
1059
+ }
1060
+ var rawValue = strings instanceof Map
1061
+ ? strings.get(String(index))
1062
+ : Array.isArray(strings)
1063
+ ? strings[Number(index)]
1064
+ : undefined;
1065
+ // SharedStrings may hold a plain string OR a rich `{text, runs}`
1066
+ // object. Either way we surface the plain text into `ue.sv` and
1067
+ // hydrate the cell's `textFormatRuns` from the rich runs when
1068
+ // present — so a cell loaded from a rich SST entry already
1069
+ // carries the runs without a second lookup at render time.
1070
+ var value;
1071
+ if (typeof rawValue === "string") {
1072
+ value = rawValue;
1073
+ }
1074
+ else if (rawValue &&
1075
+ typeof rawValue === "object" &&
1076
+ typeof rawValue.text === "string") {
1077
+ value = rawValue.text;
1078
+ var richRuns = rawValue.runs;
1079
+ if (Array.isArray(richRuns) && richRuns.length > 0) {
1080
+ this.textFormatRuns = richRuns;
1081
+ }
1082
+ }
1083
+ else {
1084
+ return;
1085
+ }
1086
+ if (value === undefined) {
1087
+ return;
1088
+ }
1089
+ var hasEffectiveError = Boolean(getExtendedValueError(this.effectiveValue));
1090
+ this.userEnteredValue = { sv: value };
1091
+ if (!hasEffectiveError) {
1092
+ this.effectiveValue = { sv: value };
1093
+ }
1094
+ this.formattedValue =
1095
+ (_c = this.formattedValue) !== null && _c !== void 0 ? _c : createFormattedValue(value, "stringValue", this.defaultPattern, this.locale);
1096
+ };
1097
+ SheetCell.prototype.validate = function () {
1098
+ var _a, _b;
1099
+ // Validation
1100
+ if (this.dataValidationRule) {
1101
+ try {
1102
+ var isFormulaRule = isDataValidationFormulaRule(this.dataValidationRule);
1103
+ var allowBlank = this.dataValidationRule.allowBlank;
1104
+ var hasEffectiveError = Boolean(getExtendedValueError(this.effectiveValue));
1105
+ var effectiveValue = this.getEffectiveValue();
1106
+ var isBlank = !hasEffectiveError &&
1107
+ (effectiveValue === undefined ||
1108
+ effectiveValue === null ||
1109
+ (typeof effectiveValue === "string" && effectiveValue === ""));
1110
+ var isValid = allowBlank && isBlank
1111
+ ? true
1112
+ : isFormulaRule
1113
+ ? this.dataValidationResult === undefined
1114
+ ? true
1115
+ : Boolean(this.dataValidationResult)
1116
+ : checkBooleanRule(this.dataValidationRule, effectiveValue, undefined, this.getRangeValues, { locale: this.locale });
1117
+ if (!isValid) {
1118
+ // Excel parity: a value that fails data validation is *flagged*,
1119
+ // not erased. The cell keeps showing its `sv` / `nv` / `bv` and
1120
+ // gets a red indicator (sourced from the `ev.ev` invalid marker).
1121
+ // Previously this replaced the entire effectiveValue with just
1122
+ // `{ev: ...}`, which destroyed the user's data the moment a
1123
+ // validation rule was applied to a non-matching cell.
1124
+ set(this, "effectiveValue.ev", {
1125
+ message: "This cell's contents violate its validation rule",
1126
+ type: "Invalid",
1127
+ });
1128
+ }
1129
+ else {
1130
+ (_a = this.effectiveValue) === null || _a === void 0 ? true : delete _a.ev;
1131
+ }
1132
+ }
1133
+ catch (err) {
1134
+ set(this, "effectiveValue.ev", {
1135
+ type: "Error",
1136
+ name: err instanceof FormulaError ? err.error : "#ERROR!",
1137
+ message: String(err),
1138
+ });
1139
+ }
1140
+ }
1141
+ else {
1142
+ (_b = this.effectiveValue) === null || _b === void 0 ? true : delete _b.ev;
1143
+ }
1144
+ };
1145
+ SheetCell.prototype.setConditionalFormatResult = function (ruleId, value) {
1146
+ if (!this.conditionalFormattingResultById) {
1147
+ this.conditionalFormattingResultById = {};
1148
+ }
1149
+ this.conditionalFormattingResultById[ruleId] = value;
1150
+ };
1151
+ SheetCell.prototype.clearConditionalFormatResults = function () {
1152
+ this.conditionalFormattingResultById = undefined;
1153
+ };
1154
+ SheetCell.prototype.setDataValidationResult = function (value) {
1155
+ this.dataValidationResult = value;
1156
+ // Validate
1157
+ this.validate();
1158
+ };
1159
+ /**
1160
+ * Refresh formatted value
1161
+ * from effective value and effective format
1162
+ */
1163
+ SheetCell.prototype.refreshFormattedValue = function () {
1164
+ var _a, _b;
1165
+ var effectiveValue = this.getEffectiveValue();
1166
+ if (isNil(effectiveValue)) {
1167
+ this.formattedValue = undefined;
1168
+ return;
1169
+ }
1170
+ var valueType = detectValueType(effectiveValue, this.locale, this.lenientGrouping);
1171
+ switch (valueType) {
1172
+ case "numberValue":
1173
+ this.formattedValue = createFormattedValue(effectiveValue, "numberValue", (_b = (_a = this.getNumberFormat()) === null || _a === void 0 ? void 0 : _a.pattern) !== null && _b !== void 0 ? _b : this.defaultPattern, this.locale);
1174
+ break;
1175
+ case "boolValue":
1176
+ this.setEffectiveBooleanValue(effectiveValue);
1177
+ break;
1178
+ case "stringValue":
1179
+ default:
1180
+ this.setEffectiveStringValue(effectiveValue);
1181
+ break;
1182
+ }
1183
+ };
1184
+ SheetCell.prototype.setEffectiveValue = function (value, isPreview, preserveStringLiteral) {
1185
+ var _a, _b;
1186
+ if (isPreview === void 0) { isPreview = false; }
1187
+ if (preserveStringLiteral === void 0) { preserveStringLiteral = false; }
1188
+ // Hide loading
1189
+ this.hideLoading();
1190
+ if (isNil(value)) {
1191
+ this.clearEffectiveValue();
1192
+ return this;
1193
+ }
1194
+ if (value instanceof FormulaError) {
1195
+ this.setErrorValue(value);
1196
+ return this;
1197
+ }
1198
+ if (value === AWAITING_CALCULATION) {
1199
+ // AWAITING_CALCULATION is a placeholder, not a computed result: the
1200
+ // on-demand gate publishes it when it deliberately does NOT evaluate
1201
+ // the formula. It must never destroy a persisted result — in
1202
+ // particular a persisted error ev (#VALUE! from a failed =AOP() run)
1203
+ // was erased here on every subsequent open: the open pass
1204
+ // force-enqueues persisted-error cells, the on-demand gate answers
1205
+ // AWAITING_CALCULATION, and the removeErrorValue() below scrubbed the
1206
+ // error from state and (via the leader's recalc broadcast) from the
1207
+ // Y.Doc, leaving the cell blank after reload.
1208
+ if (!this.error &&
1209
+ (!((_a = this.effectiveValue) === null || _a === void 0 ? void 0 : _a.structuredValue) ||
1210
+ this.formattedValue === this.loadingValue)) {
1211
+ this.formattedValue = value;
1212
+ }
1213
+ return this;
1214
+ }
1215
+ this.removeErrorValue();
1216
+ if (typeof value === "object" &&
1217
+ value.kind) {
1218
+ this.setStructuredValue(value);
1219
+ return this;
1220
+ }
1221
+ else if (typeof value === "object") {
1222
+ // Stringify objects to be displayed in a cell
1223
+ value = JSON.stringify(value);
1224
+ }
1225
+ var normalizedValue = value;
1226
+ var forceStringFromPrefix = false;
1227
+ if (hasExcelTextPrefix(normalizedValue)) {
1228
+ normalizedValue = stripExcelTextPrefix(normalizedValue);
1229
+ forceStringFromPrefix = true;
1230
+ }
1231
+ var valueType = (preserveStringLiteral || forceStringFromPrefix) &&
1232
+ typeof normalizedValue === "string"
1233
+ ? "stringValue"
1234
+ : detectValueType(normalizedValue, this.locale, this.lenientGrouping);
1235
+ switch (valueType) {
1236
+ case "numberValue":
1237
+ this.setEffectiveNumberValue(normalizedValue);
1238
+ break;
1239
+ case "stringValue":
1240
+ case "formulaValue":
1241
+ this.setEffectiveStringValue(normalizedValue);
1242
+ break;
1243
+ case "boolValue":
1244
+ this.setEffectiveBooleanValue(normalizedValue);
1245
+ break;
1246
+ }
1247
+ if (!isPreview) {
1248
+ this.validate();
1249
+ this.setVersion(((_b = this.version) !== null && _b !== void 0 ? _b : 0) + 1);
1250
+ this.setUpdatedAt(Date.now());
1251
+ }
1252
+ return this;
1253
+ };
1254
+ SheetCell.prototype.clearEffectiveValue = function () {
1255
+ this.effectiveValue = undefined;
1256
+ this.formattedValue = undefined;
1257
+ this.cellData = undefined;
1258
+ };
1259
+ SheetCell.prototype.setErrorValue = function (error) {
1260
+ this.effectiveValue = {
1261
+ ev: {
1262
+ type: "Error",
1263
+ name: error.error,
1264
+ message: error.message,
1265
+ },
1266
+ };
1267
+ this.formattedValue = String(error.error);
1268
+ };
1269
+ SheetCell.prototype.removeErrorValue = function () {
1270
+ var _a;
1271
+ (_a = this.effectiveValue) === null || _a === void 0 ? true : delete _a.ev;
1272
+ };
1273
+ SheetCell.prototype.setStructuredValue = function (structuredValue) {
1274
+ switch (structuredValue.kind) {
1275
+ case "hyperlink":
1276
+ this.setUrl(structuredValue.url, structuredValue.title);
1277
+ // Set structuredValue
1278
+ set(this, "effectiveValue.structuredValue", structuredValue);
1279
+ break;
1280
+ case "image":
1281
+ this.imageUrl = structuredValue.imageUrl;
1282
+ this.formattedValue = "";
1283
+ // Set structuredValue
1284
+ set(this, "effectiveValue", { structuredValue: structuredValue });
1285
+ break;
1286
+ case "sparkline":
1287
+ this.formattedValue = structuredValue.formattedValue;
1288
+ // Set structuredValue
1289
+ set(this, "effectiveValue", { structuredValue: structuredValue });
1290
+ break;
1291
+ default:
1292
+ this.formattedValue = structuredValue.formattedValue;
1293
+ // Set structuredValue
1294
+ set(this, "effectiveValue", { structuredValue: structuredValue });
1295
+ // Always set to left
1296
+ break;
1297
+ }
1298
+ };
1299
+ SheetCell.prototype.setEffectiveNumberValue = function (value) {
1300
+ var _a, _b, _c, _d, _e, _f;
1301
+ this.clearSharedStringIndex();
1302
+ var numberFormat = (_c = (_b = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.numberFormat) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : detectNumberFormatType(value, this.locale, this.lenientGrouping);
1303
+ var numberValue = createNumberValue(value, numberFormat, this.locale, this.use1904, this.lenientGrouping);
1304
+ var pattern = (_f = (_e = (_d = this.userEnteredFormat) === null || _d === void 0 ? void 0 : _d.numberFormat) === null || _e === void 0 ? void 0 : _e.pattern) !== null && _f !== void 0 ? _f : detectNumberFormatPattern(value, numberValue, numberFormat, this.locale);
1305
+ this.formattedValue = createFormattedValue(numberValue, "numberValue", pattern !== null && pattern !== void 0 ? pattern : this.defaultPattern, this.locale);
1306
+ this.effectiveValue = { nv: numberValue };
1307
+ };
1308
+ SheetCell.prototype.setEffectiveStringValue = function (value) {
1309
+ this.clearSharedStringIndex();
1310
+ var stringValue = String(value);
1311
+ this.effectiveValue = { sv: stringValue };
1312
+ this.formattedValue = createFormattedValue(stringValue, "stringValue", this.defaultPattern, this.locale);
1313
+ };
1314
+ SheetCell.prototype.setEffectiveBooleanValue = function (value) {
1315
+ this.clearSharedStringIndex();
1316
+ this.effectiveValue = { bv: Boolean(value) };
1317
+ this.formattedValue = createFormattedValue(value, "boolValue", this.defaultPattern, this.locale);
1318
+ };
1319
+ SheetCell.prototype.setHyperlink = function (hyperlink, title) {
1320
+ var target = getHyperlinkTarget(hyperlink);
1321
+ var display = title !== null && title !== void 0 ? title : getHyperlinkDisplay(hyperlink);
1322
+ if (!target) {
1323
+ return;
1324
+ }
1325
+ this.hyperlink = hyperlink;
1326
+ if (display) {
1327
+ this.clearSharedStringIndex();
1328
+ this.formattedValue = display;
1329
+ // Update both user entered and effective values
1330
+ set(this, "userEnteredValue.sv", display);
1331
+ set(this, "effectiveValue.sv", display);
1332
+ }
1333
+ else {
1334
+ if (!this.formattedValue && target) {
1335
+ this.formattedValue = target;
1336
+ }
1337
+ // Update both user entered and effective values with the URL if no
1338
+ // title. `userEnteredValue` must be populated so consumers that read
1339
+ // only `userEnteredValue` (e.g. the rnc-engine paste handler) see the
1340
+ // pasted URL instead of an empty cell.
1341
+ if (!display && target) {
1342
+ set(this, "userEnteredValue.sv", target);
1343
+ set(this, "effectiveValue.sv", target);
1344
+ }
1345
+ }
1346
+ // Persist the hyperlink underline on `userEnteredFormat`. Writing to
1347
+ // `effectiveFormat` here would silently drop on save/reload because
1348
+ // `effectiveFormat` is derived at render time and not persisted (see
1349
+ // the in-file note around `assign()` — `uf` is the single source of
1350
+ // truth). Excel saves the underline as part of the cell's style.
1351
+ this.ensureFormatsMutable();
1352
+ set(this, "userEnteredFormat.textFormat.underline", true);
1353
+ };
1354
+ SheetCell.prototype.setUrl = function (url, title) {
1355
+ this.setHyperlink(url, title);
1356
+ };
1357
+ SheetCell.prototype.deleteUrl = function () {
1358
+ var _a, _b;
1359
+ this.hyperlink = undefined;
1360
+ // Excel parity: removing the hyperlink also removes the underline that
1361
+ // was added when the hyperlink was applied. We only strip the
1362
+ // underline (not the whole textFormat) so any user-applied bold /
1363
+ // italic / color the user set on top of the hyperlink survives.
1364
+ if ((_b = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.textFormat) === null || _b === void 0 ? void 0 : _b.underline) {
1365
+ this.ensureFormatsMutable();
1366
+ delete this.userEnteredFormat.textFormat.underline;
1367
+ }
1368
+ };
1369
+ SheetCell.prototype.setDataValidation = function (dataValidationId, dataValidationRule) {
1370
+ this.dataValidationId = dataValidationId;
1371
+ this.dataValidationRule = dataValidationRule;
1372
+ // Excel parity: adding a validation rule (including a BOOLEAN /
1373
+ // checkbox rule) does NOT mutate the cell's existing value. The rule
1374
+ // is enforced on future edits — values that violate it get the
1375
+ // standard "invalid value" indicator via `validate()` instead. The
1376
+ // previous auto-coercion turned every cell into FALSE the moment a
1377
+ // checkbox rule was applied, which destroyed user data.
1378
+ this.validate();
1379
+ };
1380
+ SheetCell.prototype.deleteDataValidation = function () {
1381
+ var _a;
1382
+ this.dataValidationId = undefined;
1383
+ this.dataValidationRule = undefined;
1384
+ // Remove any errors
1385
+ (_a = this.effectiveValue) === null || _a === void 0 ? true : delete _a.ev;
1386
+ };
1387
+ SheetCell.prototype.clearUserEnteredFormat = function () {
1388
+ this.userEnteredFormat = undefined;
1389
+ this.originalUserEnteredFormat = undefined;
1390
+ };
1391
+ SheetCell.prototype.setUserEnteredFormat = function (type, value) {
1392
+ if (type === "textFormat") {
1393
+ this.setTextFormat(value);
1394
+ }
1395
+ else if (type === "numberFormat") {
1396
+ this.setNumberFormat(value);
1397
+ }
1398
+ else if (type === "borders") {
1399
+ this.setBorders(value);
1400
+ }
1401
+ else {
1402
+ set(this, "userEnteredFormat.".concat(type), value);
1403
+ }
1404
+ };
1405
+ SheetCell.prototype.setTextFormat = function (value) {
1406
+ this.ensureUserEnteredFormatMutable();
1407
+ if (!this.userEnteredFormat) {
1408
+ this.userEnteredFormat = {};
1409
+ }
1410
+ var existing = this.userEnteredFormat.textFormat;
1411
+ var textFormat = existing && Object.isExtensible(existing)
1412
+ ? existing
1413
+ : __assign({}, (existing !== null && existing !== void 0 ? existing : {}));
1414
+ this.userEnteredFormat.textFormat = textFormat;
1415
+ var target = textFormat;
1416
+ for (var key in value) {
1417
+ if (Object.prototype.hasOwnProperty.call(value, key)) {
1418
+ var finalValue = value[key];
1419
+ if (isNil(finalValue)) {
1420
+ delete textFormat[key];
1421
+ }
1422
+ else {
1423
+ target[key] = finalValue;
1424
+ }
1425
+ }
1426
+ }
1427
+ };
1428
+ SheetCell.prototype.setBorders = function (value) {
1429
+ this.ensureUserEnteredFormatMutable();
1430
+ if (!this.userEnteredFormat) {
1431
+ this.userEnteredFormat = {};
1432
+ }
1433
+ var existing = this.userEnteredFormat.borders;
1434
+ var borders = existing && Object.isExtensible(existing)
1435
+ ? existing
1436
+ : __assign({}, (existing !== null && existing !== void 0 ? existing : {}));
1437
+ this.userEnteredFormat.borders = borders;
1438
+ for (var key in value) {
1439
+ if (Object.prototype.hasOwnProperty.call(value, key)) {
1440
+ var borderValue = value[key];
1441
+ if (borderValue === null || borderValue === undefined) {
1442
+ delete borders[key];
1443
+ }
1444
+ else if (!borderValue.color) {
1445
+ delete borders[key];
1446
+ }
1447
+ else {
1448
+ borders[key] = borderValue;
1449
+ }
1450
+ }
1451
+ }
1452
+ };
1453
+ SheetCell.prototype.setNumberFormat = function (value) {
1454
+ var _a, _b;
1455
+ var previousFormatType = (_b = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.numberFormat) === null || _b === void 0 ? void 0 : _b.type;
1456
+ var numberFormatType = value === null || value === void 0 ? void 0 : value.type;
1457
+ var hasUserEnteredValue = this.getUserEnteredValue() !== undefined;
1458
+ if (!isNil(this.sharedStringIndex) &&
1459
+ numberFormatType &&
1460
+ numberFormatType !== "TEXT") {
1461
+ return;
1462
+ }
1463
+ set(this, "userEnteredFormat.numberFormat", value);
1464
+ var effectiveValue = this.getEffectiveValue();
1465
+ if (effectiveValue === null || effectiveValue === undefined) {
1466
+ return;
1467
+ }
1468
+ if (numberFormatType === "TEXT") {
1469
+ var userValue = this.getUserEnteredValue();
1470
+ this.formatAsText(userValue !== null && userValue !== void 0 ? userValue : effectiveValue, value, !hasUserEnteredValue);
1471
+ }
1472
+ else {
1473
+ var preserveUserEnteredText = previousFormatType === "TEXT";
1474
+ this.formatAsNumber(effectiveValue, value, preserveUserEnteredText, !hasUserEnteredValue);
1475
+ }
1476
+ };
1477
+ SheetCell.prototype.formatAsText = function (effectiveValue, numberFormat, keepUserEnteredUnset) {
1478
+ var _a;
1479
+ if (keepUserEnteredUnset === void 0) { keepUserEnteredUnset = false; }
1480
+ var textValue = String(effectiveValue);
1481
+ this.formattedValue = createFormattedValue(effectiveValue, "stringValue", (_a = numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern) !== null && _a !== void 0 ? _a : this.defaultPattern, this.locale);
1482
+ delete this.imageUrl;
1483
+ delete this.hyperlink;
1484
+ if (!keepUserEnteredUnset) {
1485
+ set(this, "userEnteredValue", { sv: textValue });
1486
+ }
1487
+ set(this, "effectiveValue", { sv: textValue });
1488
+ };
1489
+ SheetCell.prototype.formatAsNumber = function (effectiveValue, numberFormat, preserveUserEnteredText, keepUserEnteredUnset) {
1490
+ var _a, _b, _c, _d;
1491
+ if (preserveUserEnteredText === void 0) { preserveUserEnteredText = false; }
1492
+ if (keepUserEnteredUnset === void 0) { keepUserEnteredUnset = false; }
1493
+ var isDate = this.isDate(numberFormat);
1494
+ var isDateTime = this.isDateTime(numberFormat);
1495
+ var parsedNumberValue = createNumberValue(effectiveValue, numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type, this.locale, this.use1904, this.lenientGrouping);
1496
+ var hasValidNumberValue = typeof parsedNumberValue === "number" && !Number.isNaN(parsedNumberValue);
1497
+ // When conversion fails for plain text (e.g. "hello"), keep displaying text
1498
+ // instead of showing "NaN" while still preserving the selected number format.
1499
+ // Excel parity: the cell's pattern still applies via its `@` (text)
1500
+ // section — e.g. `"Note: "@` renders `Note: hello`, and a `[Magenta]@`
1501
+ // segment colors the text. Falling back to `defaultPattern` here would
1502
+ // silently drop the user-applied custom format from the display.
1503
+ if (!hasValidNumberValue && typeof effectiveValue === "string") {
1504
+ var textValue = String(effectiveValue);
1505
+ this.formattedValue = createFormattedValue(textValue, "stringValue", (_a = numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern) !== null && _a !== void 0 ? _a : this.defaultPattern, this.locale);
1506
+ if (!keepUserEnteredUnset &&
1507
+ (!preserveUserEnteredText || ((_b = this.userEnteredValue) === null || _b === void 0 ? void 0 : _b.sv) === undefined)) {
1508
+ set(this, "userEnteredValue", { sv: textValue });
1509
+ }
1510
+ set(this, "effectiveValue", { sv: textValue });
1511
+ return;
1512
+ }
1513
+ var numberValue = parsedNumberValue === undefined ? effectiveValue : parsedNumberValue;
1514
+ this.formattedValue = createFormattedValue(numberValue, "numberValue", (_c = numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern) !== null && _c !== void 0 ? _c : this.defaultPattern, this.locale);
1515
+ var stringValue = isDate || isDateTime
1516
+ ? createFormattedValue(numberValue, "numberValue", isDate ? getDefaultDateFormat(this.locale) : getDefaultTimeFormat(this.locale), this.locale)
1517
+ : (numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type) === "PERCENT"
1518
+ ? this.formattedValue
1519
+ : String(numberValue);
1520
+ if (!keepUserEnteredUnset &&
1521
+ (!preserveUserEnteredText || ((_d = this.userEnteredValue) === null || _d === void 0 ? void 0 : _d.sv) === undefined)) {
1522
+ set(this, "userEnteredValue.sv", stringValue);
1523
+ }
1524
+ set(this, "effectiveValue.nv", preserveUserEnteredText ? String(numberValue) : numberValue);
1525
+ // Default horizontal alignment for numbers/dates/currency is computed
1526
+ // at render time by `getDefaultHorizontalAlignment` in canvas-grid —
1527
+ // we deliberately do NOT stamp `uf.horizontalAlignment` here so the
1528
+ // user's explicit alignment choice (or its absence) is preserved.
1529
+ };
1530
+ SheetCell.prototype.getEffectiveValue = function () {
1531
+ var _a, _b;
1532
+ if (!this.effectiveValue) {
1533
+ return undefined;
1534
+ }
1535
+ return ((_b = (_a = getExtendedValueNumber(this.effectiveValue)) !== null && _a !== void 0 ? _a : getExtendedValueString(this.effectiveValue)) !== null && _b !== void 0 ? _b : getExtendedValueBool(this.effectiveValue));
1536
+ };
1537
+ SheetCell.prototype.getUserEnteredValue = function () {
1538
+ var _a, _b, _c;
1539
+ if (!this.userEnteredValue) {
1540
+ return undefined;
1541
+ }
1542
+ return ((_c = (_b = (_a = getExtendedValueFormula(this.userEnteredValue)) !== null && _a !== void 0 ? _a : getExtendedValueNumber(this.userEnteredValue)) !== null && _b !== void 0 ? _b : getExtendedValueString(this.userEnteredValue)) !== null && _c !== void 0 ? _c : getExtendedValueBool(this.userEnteredValue));
1543
+ };
1544
+ SheetCell.prototype.getNumberFormat = function () {
1545
+ var _a;
1546
+ return (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.numberFormat;
1547
+ };
1548
+ SheetCell.prototype.processDerivedCell = function (cellData) {
1549
+ var _a;
1550
+ // Image url
1551
+ if (cellData.imageUrl) {
1552
+ this.setImage(cellData.imageUrl);
1553
+ }
1554
+ // Set formatted value for hyperlink
1555
+ if (cellData.hyperlink) {
1556
+ this.setHyperlink(cellData.hyperlink, getCellFormattedValue(cellData));
1557
+ }
1558
+ var structuredValue = (_a = getCellEffectiveValue(cellData)) === null || _a === void 0 ? void 0 : _a.structuredValue;
1559
+ if (structuredValue) {
1560
+ this.setStructuredValue(structuredValue);
1561
+ }
1562
+ };
1563
+ // Excel parity: xlsx files often carry a `numberFormat.pattern` without
1564
+ // a corresponding `type` (the Google-Sheets style category that we layer
1565
+ // on top). Fall back to inspecting the pattern itself so DATE / DATE_TIME
1566
+ // / TEXT cells imported from Excel render and serialize correctly.
1567
+ SheetCell.prototype.isDate = function (numberFormat) {
1568
+ if ((numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type) === "DATE")
1569
+ return true;
1570
+ if (numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type)
1571
+ return false;
1572
+ return (isDatePattern(numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern) &&
1573
+ !isDateTimePattern(numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern));
1574
+ };
1575
+ SheetCell.prototype.isDateTime = function (numberFormat) {
1576
+ if ((numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type) === "DATE_TIME")
1577
+ return true;
1578
+ if (numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type)
1579
+ return false;
1580
+ return isDateTimePattern(numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern);
1581
+ };
1582
+ SheetCell.prototype.isText = function (numberFormat) {
1583
+ if ((numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type) === "TEXT")
1584
+ return true;
1585
+ if (numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.type)
1586
+ return false;
1587
+ return isTextPattern(numberFormat === null || numberFormat === void 0 ? void 0 : numberFormat.pattern);
1588
+ };
1589
+ SheetCell.prototype.setGroupKeys = function (groupKeys) {
1590
+ this.groupKeys = groupKeys;
1591
+ if (groupKeys) {
1592
+ // If a cell is not expandable and has group keys
1593
+ // its the last child the group. Indent persists on uf so the
1594
+ // renderer (and exporters) see it.
1595
+ var indent = (groupKeys.length - 1) * 2 + (this.expandable ? 0 : 4);
1596
+ if (!this.userEnteredFormat) {
1597
+ this.userEnteredFormat = {};
1598
+ }
1599
+ this.userEnteredFormat.indent = Math.max(0, indent);
1600
+ }
1601
+ };
1602
+ SheetCell.prototype.changeIndent = function (size) {
1603
+ var _a, _b;
1604
+ if (size === void 0) { size = 1; }
1605
+ var indent = (_b = (_a = this.userEnteredFormat) === null || _a === void 0 ? void 0 : _a.indent) !== null && _b !== void 0 ? _b : 0;
1606
+ if (!this.userEnteredFormat) {
1607
+ this.userEnteredFormat = {};
1608
+ }
1609
+ this.userEnteredFormat.indent = Math.max(0, indent + size);
1610
+ };
1611
+ SheetCell.prototype.setPivotId = function (pivotId) {
1612
+ this.pivotId = pivotId;
1613
+ };
1614
+ SheetCell.prototype.expand = function () {
1615
+ this.expanded = true;
1616
+ };
1617
+ SheetCell.prototype.collapse = function () {
1618
+ this.expanded = false;
1619
+ };
1620
+ SheetCell.prototype.setExpandable = function (expandable) {
1621
+ this.expandable = expandable;
1622
+ };
1623
+ SheetCell.prototype.setArrayFormulaRef = function (ref) {
1624
+ this.arrayFormulaRef = ref !== null && ref !== void 0 ? ref : undefined;
1625
+ };
1626
+ SheetCell.prototype.clearArrayFormulaRef = function () {
1627
+ if (!this.arrayFormulaRef) {
1628
+ return;
1629
+ }
1630
+ this.arrayFormulaRef = undefined;
1631
+ };
1632
+ SheetCell.prototype.setSharedFormulaSpec = function (spec) {
1633
+ this.sharedFormulaSpec = spec
1634
+ ? __assign({ si: spec.si }, (spec.ref ? { ref: spec.ref } : {})) : undefined;
1635
+ };
1636
+ SheetCell.prototype.clearSharedFormulaSpec = function () {
1637
+ if (!this.sharedFormulaSpec) {
1638
+ return;
1639
+ }
1640
+ this.sharedFormulaSpec = undefined;
1641
+ };
1642
+ SheetCell.prototype.increaseIndent = function () {
1643
+ this.changeIndent(2);
1644
+ };
1645
+ SheetCell.prototype.decreaseIndent = function () {
1646
+ this.changeIndent(-2);
1647
+ };
1648
+ SheetCell.prototype.clearFormatting = function () {
1649
+ this.userEnteredFormat = undefined;
1650
+ this.originalUserEnteredFormat = undefined;
1651
+ };
1652
+ SheetCell.prototype.clearHyperlink = function () {
1653
+ this.hyperlink = undefined;
1654
+ };
1655
+ // Inherit a different set of cell data
1656
+ SheetCell.prototype.inheritCellData = function (cellData) {
1657
+ this.cellData = cellData;
1658
+ };
1659
+ SheetCell.prototype.getUserCellData = function () {
1660
+ if (!this.cellData)
1661
+ return undefined;
1662
+ var result = {};
1663
+ for (var key in this.cellData) {
1664
+ if (!excludeKeys.has(key)) {
1665
+ result[key] = this.cellData[key];
1666
+ }
1667
+ }
1668
+ return Object.keys(result).length > 0 ? result : undefined;
1669
+ };
1670
+ SheetCell.prototype.extendCellData = function (newCellData) {
1671
+ this.assign(this.sheetId, this.coords, newCellData, {
1672
+ getRangeValues: this.getRangeValues,
1673
+ locale: this.locale,
1674
+ cellXfsRegistry: this.cellXfsRegistry,
1675
+ sharedStringRegistry: this.sharedStringRegistry,
1676
+ });
1677
+ };
1678
+ SheetCell.prototype.getUserEnteredFormat = function () {
1679
+ if (isStyleReference(this.originalUserEnteredFormat) &&
1680
+ !this.cellXfsRegistry) {
1681
+ return this.originalUserEnteredFormat;
1682
+ }
1683
+ return this.userEnteredFormat;
1684
+ };
1685
+ /**
1686
+ * Returns the user-entered format. The "effective" format (uf + auto-
1687
+ * derived alignment / pattern color / formula-precedent number format /
1688
+ * conditional formatting) is computed at render time by
1689
+ * `useSheetProperties.getEffectiveFormat`. SheetCell no longer maintains
1690
+ * a separate in-memory effective format.
1691
+ *
1692
+ * Loading-state alignment override is preserved for legacy callers that
1693
+ * sniff this method while a cell is being recalculated.
1694
+ */
1695
+ SheetCell.prototype.getEffectiveCellFormat = function () {
1696
+ var _a, _b;
1697
+ if (!this.userEnteredFormat && !this.isLoading) {
1698
+ return undefined;
1699
+ }
1700
+ if (this.isLoading) {
1701
+ return __assign(__assign({}, ((_a = this.userEnteredFormat) !== null && _a !== void 0 ? _a : {})), { horizontalAlignment: "center" });
1702
+ }
1703
+ return (_b = this.userEnteredFormat) !== null && _b !== void 0 ? _b : undefined;
1704
+ };
1705
+ SheetCell.prototype.getCellFormats = function (disableRegistry) {
1706
+ var _a, _b;
1707
+ // `ef` is no longer persisted: rendering derives the effective format
1708
+ // on the fly from `uf`, the cell value, and (for formulas) precedent
1709
+ // formats. The renderer caches the derivation so this stays cheap.
1710
+ //
1711
+ // Fall back to `originalUserEnteredFormat` when we never resolved a
1712
+ // CellFormat — happens when assign() ran without a cellXfsRegistry on
1713
+ // input that already had `uf: { sid: ... }` (e.g. the sheet-rename
1714
+ // formula round-trip). Without this fallback the StyleReference is
1715
+ // silently dropped on the way out.
1716
+ var format = (_a = this.userEnteredFormat) !== null && _a !== void 0 ? _a : this.originalUserEnteredFormat;
1717
+ if (!format)
1718
+ return {};
1719
+ if (!disableRegistry &&
1720
+ ((_b = this.cellXfsRegistry) === null || _b === void 0 ? void 0 : _b.active) &&
1721
+ this.userEnteredFormat) {
1722
+ return { uf: { sid: getCellXfsKey(this.userEnteredFormat) } };
1723
+ }
1724
+ return { uf: __assign({}, format) };
1725
+ };
1726
+ Object.defineProperty(SheetCell.prototype, "isModified", {
1727
+ get: function () {
1728
+ return !isEqual(this.cellData, this.getCellData());
1729
+ },
1730
+ enumerable: false,
1731
+ configurable: true
1732
+ });
1733
+ SheetCell.prototype.getCellData = function (options) {
1734
+ var hasSharedString = this.sharedStringIndex != null;
1735
+ var hasEffectiveError = Boolean(getExtendedValueError(this.effectiveValue));
1736
+ var useSharedString = hasSharedString;
1737
+ // Formula cells no longer persist `fv`: the renderer derives it from
1738
+ // `effectiveValue` + the resolved number format and caches the result.
1739
+ // Structured-value formula cells (sparkline/image/hyperlink) still get
1740
+ // their display text from `effectiveValue.structuredValue` itself, so
1741
+ // we don't need to write `fv` either.
1742
+ //
1743
+ // Exception: when `isLoading` is true, persist `fv = loadingValue` even
1744
+ // for formula cells (and even when a prior `effectiveValue` is on the
1745
+ // cell). The renderer surfaces "Loading..." while a recalc is in
1746
+ // flight; calc-success clears it by writing the cell back through
1747
+ // getCellData with isLoading=false.
1748
+ var isFormulaCell = !!getExtendedValueFormula(this.userEnteredValue);
1749
+ var shouldPersistFormattedValue = !useSharedString &&
1750
+ (this.isLoading || (!isFormulaCell && this.formattedValue));
1751
+ var newCellData = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, this.getUserCellData()), (this.conditionalFormattingResultById
1752
+ ? {
1753
+ conditionalFormattingResultById: this.conditionalFormattingResultById,
1754
+ }
1755
+ : {})), (this.dataValidationResult
1756
+ ? { dataValidationResult: this.dataValidationResult }
1757
+ : {})), (!useSharedString && this.userEnteredValue
1758
+ ? {
1759
+ ue: this.userEnteredValue,
1760
+ }
1761
+ : {})), (this.effectiveValue && (!useSharedString || hasEffectiveError)
1762
+ ? {
1763
+ ev: this.effectiveValue,
1764
+ }
1765
+ : {})), (shouldPersistFormattedValue
1766
+ ? {
1767
+ fv: this.isLoading ? this.loadingValue : this.formattedValue,
1768
+ }
1769
+ : undefined)), (hasSharedString
1770
+ ? {
1771
+ ss: typeof this.sharedStringIndex === "string"
1772
+ ? this.sharedStringIndex
1773
+ : String(this.sharedStringIndex),
1774
+ }
1775
+ : {})), this.getCellFormats(options === null || options === void 0 ? void 0 : options.disableRegistry)), (this.dataValidationId
1776
+ ? {
1777
+ dataValidation: this.dataValidationId,
1778
+ }
1779
+ : {})), (this.imageUrl
1780
+ ? {
1781
+ imageUrl: this.imageUrl,
1782
+ }
1783
+ : {})), (this.hyperlink
1784
+ ? {
1785
+ hyperlink: this.hyperlink,
1786
+ }
1787
+ : {})), (this.metaType ? { metaType: this.metaType } : {})), (this.pivotId ? { pivotId: this.pivotId } : {})), (this.groupKeys ? { groupKeys: this.groupKeys } : {})), (this.note ? { note: this.note } : {})), (!isNil(this.commentThreadId)
1788
+ ? { commentThreadId: this.commentThreadId }
1789
+ : {})), (!isNil(this.citationId) ? { citationId: this.citationId } : {})), (this.expandable
1790
+ ? {
1791
+ expandable: this.expandable,
1792
+ expanded: this.expanded,
1793
+ }
1794
+ : {})), (this.arrayFormulaRef ? { af: this.arrayFormulaRef } : {})), (this.sharedFormulaSpec
1795
+ ? {
1796
+ sf: __assign({ si: this.sharedFormulaSpec.si }, (this.sharedFormulaSpec.ref
1797
+ ? { ref: this.sharedFormulaSpec.ref }
1798
+ : {})),
1799
+ }
1800
+ : {}));
1801
+ if (newCellData && Object.keys(newCellData).length === 0) {
1802
+ return null;
1803
+ }
1804
+ return newCellData;
1805
+ };
1806
+ SheetCell.defaultEnableAtFormula = false;
1807
+ return SheetCell;
1808
+ }());
1809
+ export { SheetCell };