@rowsncolumns/spreadsheet-state 28.0.76 → 29.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (633) hide show
  1. package/dist/cjs/api/anchored-objects.d.ts +122 -6
  2. package/dist/cjs/api/anchored-objects.d.ts.map +1 -1
  3. package/dist/cjs/api/anchored-objects.js +464 -43
  4. package/dist/cjs/api/copy-paste.d.ts +8 -2
  5. package/dist/cjs/api/copy-paste.d.ts.map +1 -1
  6. package/dist/cjs/api/copy-paste.js +4 -4
  7. package/dist/cjs/api/filter.d.ts +15 -1
  8. package/dist/cjs/api/filter.d.ts.map +1 -1
  9. package/dist/cjs/api/filter.js +32 -2
  10. package/dist/cjs/api/formula.d.ts +63 -0
  11. package/dist/cjs/api/formula.d.ts.map +1 -1
  12. package/dist/cjs/api/formula.js +278 -8
  13. package/dist/cjs/api/immer-utils.d.ts +11 -1
  14. package/dist/cjs/api/immer-utils.d.ts.map +1 -1
  15. package/dist/cjs/api/immer-utils.js +17 -1
  16. package/dist/cjs/api/insert-cut-cells.d.ts +35 -0
  17. package/dist/cjs/api/insert-cut-cells.d.ts.map +1 -0
  18. package/dist/cjs/api/insert-cut-cells.js +60 -0
  19. package/dist/cjs/api/merges.d.ts +8 -0
  20. package/dist/cjs/api/merges.d.ts.map +1 -1
  21. package/dist/cjs/api/merges.js +11 -0
  22. package/dist/cjs/api/paint-format.d.ts +22 -1
  23. package/dist/cjs/api/paint-format.d.ts.map +1 -1
  24. package/dist/cjs/api/paint-format.js +57 -1
  25. package/dist/cjs/api/sort.d.ts +23 -1
  26. package/dist/cjs/api/sort.d.ts.map +1 -1
  27. package/dist/cjs/api/sort.js +52 -6
  28. package/dist/cjs/api/structural-guards.d.ts +57 -0
  29. package/dist/cjs/api/structural-guards.d.ts.map +1 -1
  30. package/dist/cjs/api/structural-guards.js +93 -1
  31. package/dist/cjs/api/structural-table-refs.d.ts +58 -3
  32. package/dist/cjs/api/structural-table-refs.d.ts.map +1 -1
  33. package/dist/cjs/api/structural-table-refs.js +177 -16
  34. package/dist/cjs/api/subtotal.d.ts +20 -13
  35. package/dist/cjs/api/subtotal.d.ts.map +1 -1
  36. package/dist/cjs/api/subtotal.js +26 -19
  37. package/dist/cjs/api/table.d.ts +26 -2
  38. package/dist/cjs/api/table.d.ts.map +1 -1
  39. package/dist/cjs/api/table.js +93 -60
  40. package/dist/cjs/api/validation.d.ts.map +1 -1
  41. package/dist/cjs/api/validation.js +53 -8
  42. package/dist/cjs/atoms/creating-table.atom.d.ts +22 -0
  43. package/dist/cjs/atoms/creating-table.atom.d.ts.map +1 -0
  44. package/dist/cjs/atoms/creating-table.atom.js +4 -0
  45. package/dist/cjs/atoms/dialog-state.atom.d.ts +8 -0
  46. package/dist/cjs/atoms/dialog-state.atom.d.ts.map +1 -1
  47. package/dist/cjs/atoms/dialog-state.atom.js +28 -0
  48. package/dist/cjs/atoms/editing-slicer.atom.d.ts +9 -0
  49. package/dist/cjs/atoms/editing-slicer.atom.d.ts.map +1 -0
  50. package/dist/cjs/atoms/editing-slicer.atom.js +6 -0
  51. package/dist/cjs/atoms/index.d.ts +4 -0
  52. package/dist/cjs/atoms/index.d.ts.map +1 -1
  53. package/dist/cjs/atoms/index.js +4 -0
  54. package/dist/cjs/atoms/inserting-slicer.atom.d.ts +8 -0
  55. package/dist/cjs/atoms/inserting-slicer.atom.d.ts.map +1 -0
  56. package/dist/cjs/atoms/inserting-slicer.atom.js +5 -0
  57. package/dist/cjs/atoms/resizing-table.atom.d.ts +8 -0
  58. package/dist/cjs/atoms/resizing-table.atom.d.ts.map +1 -0
  59. package/dist/cjs/atoms/resizing-table.atom.js +5 -0
  60. package/dist/cjs/commands.d.ts +138 -2
  61. package/dist/cjs/commands.d.ts.map +1 -1
  62. package/dist/cjs/components/editors/embed-editor.d.ts +4 -2
  63. package/dist/cjs/components/editors/embed-editor.d.ts.map +1 -1
  64. package/dist/cjs/components/editors/embed-editor.js +38 -9
  65. package/dist/cjs/components/editors/slicer-editor.d.ts +15 -0
  66. package/dist/cjs/components/editors/slicer-editor.d.ts.map +1 -0
  67. package/dist/cjs/components/editors/slicer-editor.js +87 -0
  68. package/dist/cjs/components/editors/table-editor.d.ts +58 -2
  69. package/dist/cjs/components/editors/table-editor.d.ts.map +1 -1
  70. package/dist/cjs/components/editors/table-editor.js +261 -20
  71. package/dist/cjs/components/index.d.ts +1 -0
  72. package/dist/cjs/components/index.d.ts.map +1 -1
  73. package/dist/cjs/components/index.js +1 -0
  74. package/dist/cjs/constants.d.ts +9 -1
  75. package/dist/cjs/constants.d.ts.map +1 -1
  76. package/dist/cjs/constants.js +12 -0
  77. package/dist/cjs/generated-names.d.ts +13 -3
  78. package/dist/cjs/generated-names.d.ts.map +1 -1
  79. package/dist/cjs/generated-names.js +3 -1
  80. package/dist/cjs/helpers.d.ts +5 -0
  81. package/dist/cjs/helpers.d.ts.map +1 -1
  82. package/dist/cjs/helpers.js +10 -1
  83. package/dist/cjs/hooks/use-on-change-batch.d.ts +19 -2
  84. package/dist/cjs/hooks/use-on-change-batch.d.ts.map +1 -1
  85. package/dist/cjs/hooks/use-on-change-batch.js +43 -35
  86. package/dist/cjs/hooks/use-on-change-calculated-column.d.ts +10 -1
  87. package/dist/cjs/hooks/use-on-change-calculated-column.d.ts.map +1 -1
  88. package/dist/cjs/hooks/use-on-change-calculated-column.js +17 -5
  89. package/dist/cjs/hooks/use-on-change-table-column.d.ts +6 -1
  90. package/dist/cjs/hooks/use-on-change-table-column.d.ts.map +1 -1
  91. package/dist/cjs/hooks/use-on-change-table-column.js +17 -5
  92. package/dist/cjs/hooks/use-on-change.d.ts +36 -3
  93. package/dist/cjs/hooks/use-on-change.d.ts.map +1 -1
  94. package/dist/cjs/hooks/use-on-change.js +218 -136
  95. package/dist/cjs/hooks/use-on-copy.d.ts +1 -1
  96. package/dist/cjs/hooks/use-on-copy.d.ts.map +1 -1
  97. package/dist/cjs/hooks/use-on-copy.js +2 -3
  98. package/dist/cjs/hooks/use-on-create-custom-table-style.d.ts +17 -0
  99. package/dist/cjs/hooks/use-on-create-custom-table-style.d.ts.map +1 -0
  100. package/dist/cjs/hooks/use-on-create-custom-table-style.js +28 -0
  101. package/dist/cjs/hooks/use-on-create-named-range.d.ts +4 -2
  102. package/dist/cjs/hooks/use-on-create-named-range.d.ts.map +1 -1
  103. package/dist/cjs/hooks/use-on-create-named-range.js +11 -1
  104. package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts +2 -1
  105. package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -1
  106. package/dist/cjs/hooks/use-on-delete-cells-shift-left.js +3 -1
  107. package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts +2 -1
  108. package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -1
  109. package/dist/cjs/hooks/use-on-delete-cells-shift-up.js +3 -1
  110. package/dist/cjs/hooks/use-on-delete-column.d.ts +2 -1
  111. package/dist/cjs/hooks/use-on-delete-column.d.ts.map +1 -1
  112. package/dist/cjs/hooks/use-on-delete-column.js +3 -1
  113. package/dist/cjs/hooks/use-on-delete-row.d.ts +2 -1
  114. package/dist/cjs/hooks/use-on-delete-row.d.ts.map +1 -1
  115. package/dist/cjs/hooks/use-on-delete-row.js +3 -1
  116. package/dist/cjs/hooks/use-on-delete-sheet.d.ts +9 -1
  117. package/dist/cjs/hooks/use-on-delete-sheet.d.ts.map +1 -1
  118. package/dist/cjs/hooks/use-on-delete-sheet.js +17 -1
  119. package/dist/cjs/hooks/use-on-delete-table-row.d.ts +4 -1
  120. package/dist/cjs/hooks/use-on-delete-table-row.d.ts.map +1 -1
  121. package/dist/cjs/hooks/use-on-delete-table-row.js +19 -1
  122. package/dist/cjs/hooks/use-on-delete.d.ts +5 -2
  123. package/dist/cjs/hooks/use-on-delete.d.ts.map +1 -1
  124. package/dist/cjs/hooks/use-on-delete.js +5 -1
  125. package/dist/cjs/hooks/use-on-embeds.d.ts +7 -4
  126. package/dist/cjs/hooks/use-on-embeds.d.ts.map +1 -1
  127. package/dist/cjs/hooks/use-on-embeds.js +26 -24
  128. package/dist/cjs/hooks/use-on-fill.d.ts +17 -2
  129. package/dist/cjs/hooks/use-on-fill.d.ts.map +1 -1
  130. package/dist/cjs/hooks/use-on-fill.js +29 -15
  131. package/dist/cjs/hooks/use-on-filter-table.d.ts.map +1 -1
  132. package/dist/cjs/hooks/use-on-filter-table.js +209 -103
  133. package/dist/cjs/hooks/use-on-import-excel.d.ts +2 -1
  134. package/dist/cjs/hooks/use-on-import-excel.d.ts.map +1 -1
  135. package/dist/cjs/hooks/use-on-import-excel.js +22 -19
  136. package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts +2 -1
  137. package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -1
  138. package/dist/cjs/hooks/use-on-insert-cells-shift-down.js +3 -1
  139. package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts +2 -1
  140. package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -1
  141. package/dist/cjs/hooks/use-on-insert-cells-shift-right.js +3 -1
  142. package/dist/cjs/hooks/use-on-insert-column.d.ts +2 -1
  143. package/dist/cjs/hooks/use-on-insert-column.d.ts.map +1 -1
  144. package/dist/cjs/hooks/use-on-insert-column.js +3 -1
  145. package/dist/cjs/hooks/use-on-insert-row.d.ts +2 -1
  146. package/dist/cjs/hooks/use-on-insert-row.d.ts.map +1 -1
  147. package/dist/cjs/hooks/use-on-insert-row.js +3 -1
  148. package/dist/cjs/hooks/use-on-insert-table-row.d.ts +5 -2
  149. package/dist/cjs/hooks/use-on-insert-table-row.d.ts.map +1 -1
  150. package/dist/cjs/hooks/use-on-insert-table-row.js +19 -1
  151. package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts +3 -2
  152. package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -1
  153. package/dist/cjs/hooks/use-on-merge-unmerge-cells.js +14 -1
  154. package/dist/cjs/hooks/use-on-move-columns.d.ts +4 -1
  155. package/dist/cjs/hooks/use-on-move-columns.d.ts.map +1 -1
  156. package/dist/cjs/hooks/use-on-move-columns.js +28 -6
  157. package/dist/cjs/hooks/use-on-move-rows.d.ts +18 -1
  158. package/dist/cjs/hooks/use-on-move-rows.d.ts.map +1 -1
  159. package/dist/cjs/hooks/use-on-move-rows.js +44 -6
  160. package/dist/cjs/hooks/use-on-move-selection.d.ts +9 -2
  161. package/dist/cjs/hooks/use-on-move-selection.d.ts.map +1 -1
  162. package/dist/cjs/hooks/use-on-move-selection.js +101 -25
  163. package/dist/cjs/hooks/use-on-paste.d.ts +33 -2
  164. package/dist/cjs/hooks/use-on-paste.d.ts.map +1 -1
  165. package/dist/cjs/hooks/use-on-paste.js +1005 -740
  166. package/dist/cjs/hooks/use-on-remove-duplicates.d.ts +5 -2
  167. package/dist/cjs/hooks/use-on-remove-duplicates.d.ts.map +1 -1
  168. package/dist/cjs/hooks/use-on-remove-duplicates.js +5 -1
  169. package/dist/cjs/hooks/use-on-request-create-table.d.ts +13 -0
  170. package/dist/cjs/hooks/use-on-request-create-table.d.ts.map +1 -0
  171. package/dist/cjs/hooks/use-on-request-create-table.js +44 -0
  172. package/dist/cjs/hooks/use-on-request-insert-slicer.d.ts +7 -0
  173. package/dist/cjs/hooks/use-on-request-insert-slicer.d.ts.map +1 -0
  174. package/dist/cjs/hooks/use-on-request-insert-slicer.js +15 -0
  175. package/dist/cjs/hooks/use-on-request-resize-table.d.ts +7 -0
  176. package/dist/cjs/hooks/use-on-request-resize-table.d.ts.map +1 -0
  177. package/dist/cjs/hooks/use-on-request-resize-table.js +15 -0
  178. package/dist/cjs/hooks/use-on-resize-table.d.ts +5 -1
  179. package/dist/cjs/hooks/use-on-resize-table.d.ts.map +1 -1
  180. package/dist/cjs/hooks/use-on-resize-table.js +110 -33
  181. package/dist/cjs/hooks/use-on-sort-column.d.ts +28 -3
  182. package/dist/cjs/hooks/use-on-sort-column.d.ts.map +1 -1
  183. package/dist/cjs/hooks/use-on-sort-column.js +136 -90
  184. package/dist/cjs/hooks/use-on-sort-range.d.ts +26 -3
  185. package/dist/cjs/hooks/use-on-sort-range.d.ts.map +1 -1
  186. package/dist/cjs/hooks/use-on-sort-range.js +113 -67
  187. package/dist/cjs/hooks/use-on-sort-table.d.ts +18 -1
  188. package/dist/cjs/hooks/use-on-sort-table.d.ts.map +1 -1
  189. package/dist/cjs/hooks/use-on-sort-table.js +128 -98
  190. package/dist/cjs/hooks/use-on-subtotal.d.ts +10 -3
  191. package/dist/cjs/hooks/use-on-subtotal.d.ts.map +1 -1
  192. package/dist/cjs/hooks/use-on-subtotal.js +13 -9
  193. package/dist/cjs/hooks/use-on-table.d.ts +39 -7
  194. package/dist/cjs/hooks/use-on-table.d.ts.map +1 -1
  195. package/dist/cjs/hooks/use-on-table.js +257 -49
  196. package/dist/cjs/hooks/use-on-undo-calculated-column.d.ts +23 -0
  197. package/dist/cjs/hooks/use-on-undo-calculated-column.d.ts.map +1 -0
  198. package/dist/cjs/hooks/use-on-undo-calculated-column.js +70 -0
  199. package/dist/cjs/hooks/use-on-undo-table-auto-expansion.d.ts +28 -0
  200. package/dist/cjs/hooks/use-on-undo-table-auto-expansion.d.ts.map +1 -0
  201. package/dist/cjs/hooks/use-on-undo-table-auto-expansion.js +96 -0
  202. package/dist/cjs/hooks/use-on-update-named-range.d.ts +4 -2
  203. package/dist/cjs/hooks/use-on-update-named-range.d.ts.map +1 -1
  204. package/dist/cjs/hooks/use-on-update-named-range.js +13 -1
  205. package/dist/cjs/hooks/use-sheet-properties.d.ts +1 -0
  206. package/dist/cjs/hooks/use-sheet-properties.d.ts.map +1 -1
  207. package/dist/cjs/hooks/use-sheet-properties.js +54 -34
  208. package/dist/cjs/hooks/use-slicers.d.ts +2 -2
  209. package/dist/cjs/hooks/use-slicers.d.ts.map +1 -1
  210. package/dist/cjs/hooks/use-slicers.js +17 -26
  211. package/dist/cjs/hooks/use-sparkline-groups.d.ts +50 -0
  212. package/dist/cjs/hooks/use-sparkline-groups.d.ts.map +1 -0
  213. package/dist/cjs/hooks/use-sparkline-groups.js +192 -0
  214. package/dist/cjs/hooks/use-spreadsheet-state.d.ts +69 -12
  215. package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -1
  216. package/dist/cjs/hooks/use-spreadsheet-state.js +383 -84
  217. package/dist/cjs/hooks/use-structured-reference.d.ts.map +1 -1
  218. package/dist/cjs/hooks/use-structured-reference.js +17 -0
  219. package/dist/cjs/hooks/use-undo-redo-actions.d.ts +2 -1
  220. package/dist/cjs/hooks/use-undo-redo-actions.d.ts.map +1 -1
  221. package/dist/cjs/hooks/use-undo-redo-actions.js +10 -2
  222. package/dist/cjs/hooks/use-undo-redo.d.ts +12 -0
  223. package/dist/cjs/hooks/use-undo-redo.d.ts.map +1 -1
  224. package/dist/cjs/hooks/use-undo-redo.js +169 -10
  225. package/dist/cjs/hooks/utils/sort-rows.d.ts.map +1 -1
  226. package/dist/cjs/hooks/utils/sort-rows.js +4 -3
  227. package/dist/cjs/index.d.ts +8 -0
  228. package/dist/cjs/index.d.ts.map +1 -1
  229. package/dist/cjs/index.js +9 -0
  230. package/dist/cjs/interface/apply-fill.d.ts +26 -3
  231. package/dist/cjs/interface/apply-fill.d.ts.map +1 -1
  232. package/dist/cjs/interface/apply-fill.js +207 -98
  233. package/dist/cjs/interface/change-batch.d.ts +1 -1
  234. package/dist/cjs/interface/change-batch.d.ts.map +1 -1
  235. package/dist/cjs/interface/change-batch.js +112 -15
  236. package/dist/cjs/interface/change-calculated-column.d.ts +6 -2
  237. package/dist/cjs/interface/change-calculated-column.d.ts.map +1 -1
  238. package/dist/cjs/interface/change-calculated-column.js +87 -17
  239. package/dist/cjs/interface/change-table-column.d.ts +81 -7
  240. package/dist/cjs/interface/change-table-column.d.ts.map +1 -1
  241. package/dist/cjs/interface/change-table-column.js +336 -76
  242. package/dist/cjs/interface/create-table.d.ts +15 -3
  243. package/dist/cjs/interface/create-table.d.ts.map +1 -1
  244. package/dist/cjs/interface/create-table.js +100 -25
  245. package/dist/cjs/interface/delete-cells-shift-left.d.ts +1 -1
  246. package/dist/cjs/interface/delete-cells-shift-left.d.ts.map +1 -1
  247. package/dist/cjs/interface/delete-cells-shift-left.js +10 -1
  248. package/dist/cjs/interface/delete-cells-shift-up.d.ts +1 -1
  249. package/dist/cjs/interface/delete-cells-shift-up.d.ts.map +1 -1
  250. package/dist/cjs/interface/delete-cells-shift-up.js +10 -1
  251. package/dist/cjs/interface/delete-cells.d.ts +1 -1
  252. package/dist/cjs/interface/delete-cells.d.ts.map +1 -1
  253. package/dist/cjs/interface/delete-cells.js +81 -25
  254. package/dist/cjs/interface/delete-column.d.ts +1 -1
  255. package/dist/cjs/interface/delete-column.d.ts.map +1 -1
  256. package/dist/cjs/interface/delete-column.js +29 -22
  257. package/dist/cjs/interface/delete-row.d.ts +1 -1
  258. package/dist/cjs/interface/delete-row.d.ts.map +1 -1
  259. package/dist/cjs/interface/delete-row.js +244 -39
  260. package/dist/cjs/interface/delete-sheet.d.ts +2 -2
  261. package/dist/cjs/interface/delete-sheet.d.ts.map +1 -1
  262. package/dist/cjs/interface/delete-sheet.js +118 -1
  263. package/dist/cjs/interface/delete-table-column.d.ts +1 -1
  264. package/dist/cjs/interface/delete-table-column.d.ts.map +1 -1
  265. package/dist/cjs/interface/delete-table-column.js +11 -1
  266. package/dist/cjs/interface/delete-table-row.d.ts +1 -1
  267. package/dist/cjs/interface/delete-table-row.d.ts.map +1 -1
  268. package/dist/cjs/interface/delete-table-row.js +361 -275
  269. package/dist/cjs/interface/duplicate-sheet.d.ts.map +1 -1
  270. package/dist/cjs/interface/duplicate-sheet.js +83 -31
  271. package/dist/cjs/interface/embeds.d.ts +10 -1
  272. package/dist/cjs/interface/embeds.d.ts.map +1 -1
  273. package/dist/cjs/interface/embeds.js +120 -6
  274. package/dist/cjs/interface/insert-cells-shift-down.d.ts +1 -1
  275. package/dist/cjs/interface/insert-cells-shift-down.d.ts.map +1 -1
  276. package/dist/cjs/interface/insert-cells-shift-down.js +10 -1
  277. package/dist/cjs/interface/insert-cells-shift-right.d.ts +1 -1
  278. package/dist/cjs/interface/insert-cells-shift-right.d.ts.map +1 -1
  279. package/dist/cjs/interface/insert-cells-shift-right.js +10 -1
  280. package/dist/cjs/interface/insert-column.d.ts +2 -2
  281. package/dist/cjs/interface/insert-column.d.ts.map +1 -1
  282. package/dist/cjs/interface/insert-column.js +101 -56
  283. package/dist/cjs/interface/insert-row.d.ts +1 -1
  284. package/dist/cjs/interface/insert-row.d.ts.map +1 -1
  285. package/dist/cjs/interface/insert-row.js +25 -7
  286. package/dist/cjs/interface/insert-table-row.d.ts +2 -1
  287. package/dist/cjs/interface/insert-table-row.d.ts.map +1 -1
  288. package/dist/cjs/interface/insert-table-row.js +70 -19
  289. package/dist/cjs/interface/remove-duplicates.d.ts +1 -1
  290. package/dist/cjs/interface/remove-duplicates.d.ts.map +1 -1
  291. package/dist/cjs/interface/remove-duplicates.js +46 -6
  292. package/dist/cjs/interface/remove-table.d.ts +1 -1
  293. package/dist/cjs/interface/remove-table.d.ts.map +1 -1
  294. package/dist/cjs/interface/remove-table.js +72 -16
  295. package/dist/cjs/interface/slicers.d.ts +12 -1
  296. package/dist/cjs/interface/slicers.d.ts.map +1 -1
  297. package/dist/cjs/interface/slicers.js +47 -2
  298. package/dist/cjs/interface/spreadsheet-interface.d.ts +1 -1
  299. package/dist/cjs/interface/spreadsheet-interface.d.ts.map +1 -1
  300. package/dist/cjs/interface/spreadsheet-interface.js +64 -1
  301. package/dist/cjs/interface/table-totalrow.d.ts +13 -1
  302. package/dist/cjs/interface/table-totalrow.d.ts.map +1 -1
  303. package/dist/cjs/interface/table-totalrow.js +107 -73
  304. package/dist/cjs/interface/table-utils.d.ts +59 -6
  305. package/dist/cjs/interface/table-utils.d.ts.map +1 -1
  306. package/dist/cjs/interface/table-utils.js +211 -15
  307. package/dist/cjs/interface/update-table.d.ts +16 -1
  308. package/dist/cjs/interface/update-table.d.ts.map +1 -1
  309. package/dist/cjs/interface/update-table.js +190 -44
  310. package/dist/cjs/sheet-cell.d.ts.map +1 -1
  311. package/dist/cjs/test-setup.d.ts.map +1 -1
  312. package/dist/cjs/test-setup.js +6 -0
  313. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  314. package/dist/cjs/validation-schema/table.schema.d.ts +11 -0
  315. package/dist/cjs/validation-schema/table.schema.d.ts.map +1 -1
  316. package/dist/cjs/validation-schema/table.schema.js +20 -3
  317. package/dist/esm/api/anchored-objects.d.ts +122 -6
  318. package/dist/esm/api/anchored-objects.d.ts.map +1 -1
  319. package/dist/esm/api/anchored-objects.js +375 -15
  320. package/dist/esm/api/copy-paste.d.ts +8 -2
  321. package/dist/esm/api/copy-paste.d.ts.map +1 -1
  322. package/dist/esm/api/copy-paste.js +4 -4
  323. package/dist/esm/api/filter.d.ts +15 -1
  324. package/dist/esm/api/filter.d.ts.map +1 -1
  325. package/dist/esm/api/filter.js +28 -0
  326. package/dist/esm/api/formula.d.ts +63 -0
  327. package/dist/esm/api/formula.d.ts.map +1 -1
  328. package/dist/esm/api/formula.js +235 -8
  329. package/dist/esm/api/immer-utils.d.ts +11 -1
  330. package/dist/esm/api/immer-utils.d.ts.map +1 -1
  331. package/dist/esm/api/immer-utils.js +16 -0
  332. package/dist/esm/api/insert-cut-cells.d.ts +35 -0
  333. package/dist/esm/api/insert-cut-cells.d.ts.map +1 -0
  334. package/dist/esm/api/insert-cut-cells.js +67 -0
  335. package/dist/esm/api/merges.d.ts +8 -0
  336. package/dist/esm/api/merges.d.ts.map +1 -1
  337. package/dist/esm/api/merges.js +9 -0
  338. package/dist/esm/api/paint-format.d.ts +22 -1
  339. package/dist/esm/api/paint-format.d.ts.map +1 -1
  340. package/dist/esm/api/paint-format.js +44 -1
  341. package/dist/esm/api/sort.d.ts +23 -1
  342. package/dist/esm/api/sort.d.ts.map +1 -1
  343. package/dist/esm/api/sort.js +45 -6
  344. package/dist/esm/api/structural-guards.d.ts +57 -0
  345. package/dist/esm/api/structural-guards.d.ts.map +1 -1
  346. package/dist/esm/api/structural-guards.js +85 -0
  347. package/dist/esm/api/structural-table-refs.d.ts +58 -3
  348. package/dist/esm/api/structural-table-refs.d.ts.map +1 -1
  349. package/dist/esm/api/structural-table-refs.js +126 -6
  350. package/dist/esm/api/subtotal.d.ts +20 -13
  351. package/dist/esm/api/subtotal.d.ts.map +1 -1
  352. package/dist/esm/api/subtotal.js +15 -8
  353. package/dist/esm/api/table.d.ts +26 -2
  354. package/dist/esm/api/table.d.ts.map +1 -1
  355. package/dist/esm/api/table.js +70 -48
  356. package/dist/esm/api/validation.d.ts.map +1 -1
  357. package/dist/esm/api/validation.js +53 -8
  358. package/dist/esm/atoms/creating-table.atom.d.ts +22 -0
  359. package/dist/esm/atoms/creating-table.atom.d.ts.map +1 -0
  360. package/dist/esm/atoms/creating-table.atom.js +4 -0
  361. package/dist/esm/atoms/dialog-state.atom.d.ts +8 -0
  362. package/dist/esm/atoms/dialog-state.atom.d.ts.map +1 -1
  363. package/dist/esm/atoms/dialog-state.atom.js +12 -0
  364. package/dist/esm/atoms/editing-slicer.atom.d.ts +9 -0
  365. package/dist/esm/atoms/editing-slicer.atom.d.ts.map +1 -0
  366. package/dist/esm/atoms/editing-slicer.atom.js +6 -0
  367. package/dist/esm/atoms/index.d.ts +4 -0
  368. package/dist/esm/atoms/index.d.ts.map +1 -1
  369. package/dist/esm/atoms/index.js +4 -0
  370. package/dist/esm/atoms/inserting-slicer.atom.d.ts +8 -0
  371. package/dist/esm/atoms/inserting-slicer.atom.d.ts.map +1 -0
  372. package/dist/esm/atoms/inserting-slicer.atom.js +5 -0
  373. package/dist/esm/atoms/resizing-table.atom.d.ts +8 -0
  374. package/dist/esm/atoms/resizing-table.atom.d.ts.map +1 -0
  375. package/dist/esm/atoms/resizing-table.atom.js +5 -0
  376. package/dist/esm/commands.d.ts +138 -2
  377. package/dist/esm/commands.d.ts.map +1 -1
  378. package/dist/esm/components/editors/embed-editor.d.ts +4 -2
  379. package/dist/esm/components/editors/embed-editor.d.ts.map +1 -1
  380. package/dist/esm/components/editors/embed-editor.js +40 -6
  381. package/dist/esm/components/editors/slicer-editor.d.ts +15 -0
  382. package/dist/esm/components/editors/slicer-editor.d.ts.map +1 -0
  383. package/dist/esm/components/editors/slicer-editor.js +85 -0
  384. package/dist/esm/components/editors/table-editor.d.ts +58 -2
  385. package/dist/esm/components/editors/table-editor.d.ts.map +1 -1
  386. package/dist/esm/components/editors/table-editor.js +243 -19
  387. package/dist/esm/components/index.d.ts +1 -0
  388. package/dist/esm/components/index.d.ts.map +1 -1
  389. package/dist/esm/components/index.js +1 -0
  390. package/dist/esm/constants.d.ts +9 -1
  391. package/dist/esm/constants.d.ts.map +1 -1
  392. package/dist/esm/constants.js +12 -0
  393. package/dist/esm/generated-names.d.ts +13 -3
  394. package/dist/esm/generated-names.d.ts.map +1 -1
  395. package/dist/esm/generated-names.js +3 -1
  396. package/dist/esm/helpers.d.ts +5 -0
  397. package/dist/esm/helpers.d.ts.map +1 -1
  398. package/dist/esm/helpers.js +7 -1
  399. package/dist/esm/hooks/use-on-change-batch.d.ts +19 -2
  400. package/dist/esm/hooks/use-on-change-batch.d.ts.map +1 -1
  401. package/dist/esm/hooks/use-on-change-batch.js +19 -3
  402. package/dist/esm/hooks/use-on-change-calculated-column.d.ts +10 -1
  403. package/dist/esm/hooks/use-on-change-calculated-column.d.ts.map +1 -1
  404. package/dist/esm/hooks/use-on-change-calculated-column.js +17 -5
  405. package/dist/esm/hooks/use-on-change-table-column.d.ts +6 -1
  406. package/dist/esm/hooks/use-on-change-table-column.d.ts.map +1 -1
  407. package/dist/esm/hooks/use-on-change-table-column.js +17 -5
  408. package/dist/esm/hooks/use-on-change.d.ts +36 -3
  409. package/dist/esm/hooks/use-on-change.d.ts.map +1 -1
  410. package/dist/esm/hooks/use-on-change.js +214 -124
  411. package/dist/esm/hooks/use-on-copy.d.ts +1 -1
  412. package/dist/esm/hooks/use-on-copy.d.ts.map +1 -1
  413. package/dist/esm/hooks/use-on-copy.js +2 -3
  414. package/dist/esm/hooks/use-on-create-custom-table-style.d.ts +17 -0
  415. package/dist/esm/hooks/use-on-create-custom-table-style.d.ts.map +1 -0
  416. package/dist/esm/hooks/use-on-create-custom-table-style.js +26 -0
  417. package/dist/esm/hooks/use-on-create-named-range.d.ts +4 -2
  418. package/dist/esm/hooks/use-on-create-named-range.d.ts.map +1 -1
  419. package/dist/esm/hooks/use-on-create-named-range.js +11 -1
  420. package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts +2 -1
  421. package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -1
  422. package/dist/esm/hooks/use-on-delete-cells-shift-left.js +3 -1
  423. package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts +2 -1
  424. package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -1
  425. package/dist/esm/hooks/use-on-delete-cells-shift-up.js +3 -1
  426. package/dist/esm/hooks/use-on-delete-column.d.ts +2 -1
  427. package/dist/esm/hooks/use-on-delete-column.d.ts.map +1 -1
  428. package/dist/esm/hooks/use-on-delete-column.js +3 -1
  429. package/dist/esm/hooks/use-on-delete-row.d.ts +2 -1
  430. package/dist/esm/hooks/use-on-delete-row.d.ts.map +1 -1
  431. package/dist/esm/hooks/use-on-delete-row.js +3 -1
  432. package/dist/esm/hooks/use-on-delete-sheet.d.ts +9 -1
  433. package/dist/esm/hooks/use-on-delete-sheet.d.ts.map +1 -1
  434. package/dist/esm/hooks/use-on-delete-sheet.js +17 -1
  435. package/dist/esm/hooks/use-on-delete-table-row.d.ts +4 -1
  436. package/dist/esm/hooks/use-on-delete-table-row.d.ts.map +1 -1
  437. package/dist/esm/hooks/use-on-delete-table-row.js +19 -1
  438. package/dist/esm/hooks/use-on-delete.d.ts +5 -2
  439. package/dist/esm/hooks/use-on-delete.d.ts.map +1 -1
  440. package/dist/esm/hooks/use-on-delete.js +5 -1
  441. package/dist/esm/hooks/use-on-embeds.d.ts +7 -4
  442. package/dist/esm/hooks/use-on-embeds.d.ts.map +1 -1
  443. package/dist/esm/hooks/use-on-embeds.js +23 -6
  444. package/dist/esm/hooks/use-on-fill.d.ts +17 -2
  445. package/dist/esm/hooks/use-on-fill.d.ts.map +1 -1
  446. package/dist/esm/hooks/use-on-fill.js +27 -1
  447. package/dist/esm/hooks/use-on-filter-table.d.ts.map +1 -1
  448. package/dist/esm/hooks/use-on-filter-table.js +97 -26
  449. package/dist/esm/hooks/use-on-import-excel.d.ts +2 -1
  450. package/dist/esm/hooks/use-on-import-excel.d.ts.map +1 -1
  451. package/dist/esm/hooks/use-on-import-excel.js +4 -1
  452. package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts +2 -1
  453. package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -1
  454. package/dist/esm/hooks/use-on-insert-cells-shift-down.js +3 -1
  455. package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts +2 -1
  456. package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -1
  457. package/dist/esm/hooks/use-on-insert-cells-shift-right.js +3 -1
  458. package/dist/esm/hooks/use-on-insert-column.d.ts +2 -1
  459. package/dist/esm/hooks/use-on-insert-column.d.ts.map +1 -1
  460. package/dist/esm/hooks/use-on-insert-column.js +3 -1
  461. package/dist/esm/hooks/use-on-insert-row.d.ts +2 -1
  462. package/dist/esm/hooks/use-on-insert-row.d.ts.map +1 -1
  463. package/dist/esm/hooks/use-on-insert-row.js +3 -1
  464. package/dist/esm/hooks/use-on-insert-table-row.d.ts +5 -2
  465. package/dist/esm/hooks/use-on-insert-table-row.d.ts.map +1 -1
  466. package/dist/esm/hooks/use-on-insert-table-row.js +19 -1
  467. package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts +3 -2
  468. package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -1
  469. package/dist/esm/hooks/use-on-merge-unmerge-cells.js +12 -1
  470. package/dist/esm/hooks/use-on-move-columns.d.ts +4 -1
  471. package/dist/esm/hooks/use-on-move-columns.d.ts.map +1 -1
  472. package/dist/esm/hooks/use-on-move-columns.js +28 -6
  473. package/dist/esm/hooks/use-on-move-rows.d.ts +18 -1
  474. package/dist/esm/hooks/use-on-move-rows.d.ts.map +1 -1
  475. package/dist/esm/hooks/use-on-move-rows.js +44 -6
  476. package/dist/esm/hooks/use-on-move-selection.d.ts +9 -2
  477. package/dist/esm/hooks/use-on-move-selection.d.ts.map +1 -1
  478. package/dist/esm/hooks/use-on-move-selection.js +57 -1
  479. package/dist/esm/hooks/use-on-paste.d.ts +33 -2
  480. package/dist/esm/hooks/use-on-paste.d.ts.map +1 -1
  481. package/dist/esm/hooks/use-on-paste.js +825 -643
  482. package/dist/esm/hooks/use-on-remove-duplicates.d.ts +5 -2
  483. package/dist/esm/hooks/use-on-remove-duplicates.d.ts.map +1 -1
  484. package/dist/esm/hooks/use-on-remove-duplicates.js +5 -1
  485. package/dist/esm/hooks/use-on-request-create-table.d.ts +13 -0
  486. package/dist/esm/hooks/use-on-request-create-table.d.ts.map +1 -0
  487. package/dist/esm/hooks/use-on-request-create-table.js +43 -0
  488. package/dist/esm/hooks/use-on-request-insert-slicer.d.ts +7 -0
  489. package/dist/esm/hooks/use-on-request-insert-slicer.d.ts.map +1 -0
  490. package/dist/esm/hooks/use-on-request-insert-slicer.js +15 -0
  491. package/dist/esm/hooks/use-on-request-resize-table.d.ts +7 -0
  492. package/dist/esm/hooks/use-on-request-resize-table.d.ts.map +1 -0
  493. package/dist/esm/hooks/use-on-request-resize-table.js +15 -0
  494. package/dist/esm/hooks/use-on-resize-table.d.ts +5 -1
  495. package/dist/esm/hooks/use-on-resize-table.d.ts.map +1 -1
  496. package/dist/esm/hooks/use-on-resize-table.js +107 -27
  497. package/dist/esm/hooks/use-on-sort-column.d.ts +28 -3
  498. package/dist/esm/hooks/use-on-sort-column.d.ts.map +1 -1
  499. package/dist/esm/hooks/use-on-sort-column.js +105 -68
  500. package/dist/esm/hooks/use-on-sort-range.d.ts +26 -3
  501. package/dist/esm/hooks/use-on-sort-range.d.ts.map +1 -1
  502. package/dist/esm/hooks/use-on-sort-range.js +100 -64
  503. package/dist/esm/hooks/use-on-sort-table.d.ts +18 -1
  504. package/dist/esm/hooks/use-on-sort-table.d.ts.map +1 -1
  505. package/dist/esm/hooks/use-on-sort-table.js +107 -86
  506. package/dist/esm/hooks/use-on-subtotal.d.ts +10 -3
  507. package/dist/esm/hooks/use-on-subtotal.d.ts.map +1 -1
  508. package/dist/esm/hooks/use-on-subtotal.js +7 -5
  509. package/dist/esm/hooks/use-on-table.d.ts +39 -7
  510. package/dist/esm/hooks/use-on-table.d.ts.map +1 -1
  511. package/dist/esm/hooks/use-on-table.js +234 -26
  512. package/dist/esm/hooks/use-on-undo-calculated-column.d.ts +23 -0
  513. package/dist/esm/hooks/use-on-undo-calculated-column.d.ts.map +1 -0
  514. package/dist/esm/hooks/use-on-undo-calculated-column.js +62 -0
  515. package/dist/esm/hooks/use-on-undo-table-auto-expansion.d.ts +28 -0
  516. package/dist/esm/hooks/use-on-undo-table-auto-expansion.d.ts.map +1 -0
  517. package/dist/esm/hooks/use-on-undo-table-auto-expansion.js +75 -0
  518. package/dist/esm/hooks/use-on-update-named-range.d.ts +4 -2
  519. package/dist/esm/hooks/use-on-update-named-range.d.ts.map +1 -1
  520. package/dist/esm/hooks/use-on-update-named-range.js +13 -1
  521. package/dist/esm/hooks/use-sheet-properties.d.ts +1 -0
  522. package/dist/esm/hooks/use-sheet-properties.d.ts.map +1 -1
  523. package/dist/esm/hooks/use-sheet-properties.js +38 -19
  524. package/dist/esm/hooks/use-slicers.d.ts +2 -2
  525. package/dist/esm/hooks/use-slicers.d.ts.map +1 -1
  526. package/dist/esm/hooks/use-slicers.js +16 -8
  527. package/dist/esm/hooks/use-sparkline-groups.d.ts +50 -0
  528. package/dist/esm/hooks/use-sparkline-groups.d.ts.map +1 -0
  529. package/dist/esm/hooks/use-sparkline-groups.js +146 -0
  530. package/dist/esm/hooks/use-spreadsheet-state.d.ts +69 -12
  531. package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -1
  532. package/dist/esm/hooks/use-spreadsheet-state.js +321 -14
  533. package/dist/esm/hooks/use-structured-reference.d.ts.map +1 -1
  534. package/dist/esm/hooks/use-structured-reference.js +17 -0
  535. package/dist/esm/hooks/use-undo-redo-actions.d.ts +2 -1
  536. package/dist/esm/hooks/use-undo-redo-actions.d.ts.map +1 -1
  537. package/dist/esm/hooks/use-undo-redo-actions.js +8 -2
  538. package/dist/esm/hooks/use-undo-redo.d.ts +12 -0
  539. package/dist/esm/hooks/use-undo-redo.d.ts.map +1 -1
  540. package/dist/esm/hooks/use-undo-redo.js +158 -7
  541. package/dist/esm/hooks/utils/sort-rows.d.ts.map +1 -1
  542. package/dist/esm/hooks/utils/sort-rows.js +4 -3
  543. package/dist/esm/index.d.ts +8 -0
  544. package/dist/esm/index.d.ts.map +1 -1
  545. package/dist/esm/index.js +9 -0
  546. package/dist/esm/interface/apply-fill.d.ts +26 -3
  547. package/dist/esm/interface/apply-fill.d.ts.map +1 -1
  548. package/dist/esm/interface/apply-fill.js +188 -88
  549. package/dist/esm/interface/change-batch.d.ts +1 -1
  550. package/dist/esm/interface/change-batch.d.ts.map +1 -1
  551. package/dist/esm/interface/change-batch.js +89 -8
  552. package/dist/esm/interface/change-calculated-column.d.ts +6 -2
  553. package/dist/esm/interface/change-calculated-column.d.ts.map +1 -1
  554. package/dist/esm/interface/change-calculated-column.js +81 -16
  555. package/dist/esm/interface/change-table-column.d.ts +81 -7
  556. package/dist/esm/interface/change-table-column.d.ts.map +1 -1
  557. package/dist/esm/interface/change-table-column.js +295 -67
  558. package/dist/esm/interface/create-table.d.ts +15 -3
  559. package/dist/esm/interface/create-table.d.ts.map +1 -1
  560. package/dist/esm/interface/create-table.js +103 -27
  561. package/dist/esm/interface/delete-cells-shift-left.d.ts +1 -1
  562. package/dist/esm/interface/delete-cells-shift-left.d.ts.map +1 -1
  563. package/dist/esm/interface/delete-cells-shift-left.js +10 -1
  564. package/dist/esm/interface/delete-cells-shift-up.d.ts +1 -1
  565. package/dist/esm/interface/delete-cells-shift-up.d.ts.map +1 -1
  566. package/dist/esm/interface/delete-cells-shift-up.js +10 -1
  567. package/dist/esm/interface/delete-cells.d.ts +1 -1
  568. package/dist/esm/interface/delete-cells.d.ts.map +1 -1
  569. package/dist/esm/interface/delete-cells.js +47 -14
  570. package/dist/esm/interface/delete-column.d.ts +1 -1
  571. package/dist/esm/interface/delete-column.d.ts.map +1 -1
  572. package/dist/esm/interface/delete-column.js +26 -30
  573. package/dist/esm/interface/delete-row.d.ts +1 -1
  574. package/dist/esm/interface/delete-row.d.ts.map +1 -1
  575. package/dist/esm/interface/delete-row.js +191 -44
  576. package/dist/esm/interface/delete-sheet.d.ts +2 -2
  577. package/dist/esm/interface/delete-sheet.d.ts.map +1 -1
  578. package/dist/esm/interface/delete-sheet.js +113 -1
  579. package/dist/esm/interface/delete-table-column.d.ts +1 -1
  580. package/dist/esm/interface/delete-table-column.d.ts.map +1 -1
  581. package/dist/esm/interface/delete-table-column.js +11 -1
  582. package/dist/esm/interface/delete-table-row.d.ts +1 -1
  583. package/dist/esm/interface/delete-table-row.d.ts.map +1 -1
  584. package/dist/esm/interface/delete-table-row.js +312 -232
  585. package/dist/esm/interface/duplicate-sheet.d.ts.map +1 -1
  586. package/dist/esm/interface/duplicate-sheet.js +73 -26
  587. package/dist/esm/interface/embeds.d.ts +10 -1
  588. package/dist/esm/interface/embeds.d.ts.map +1 -1
  589. package/dist/esm/interface/embeds.js +84 -5
  590. package/dist/esm/interface/insert-cells-shift-down.d.ts +1 -1
  591. package/dist/esm/interface/insert-cells-shift-down.d.ts.map +1 -1
  592. package/dist/esm/interface/insert-cells-shift-down.js +10 -1
  593. package/dist/esm/interface/insert-cells-shift-right.d.ts +1 -1
  594. package/dist/esm/interface/insert-cells-shift-right.d.ts.map +1 -1
  595. package/dist/esm/interface/insert-cells-shift-right.js +10 -1
  596. package/dist/esm/interface/insert-column.d.ts +2 -2
  597. package/dist/esm/interface/insert-column.d.ts.map +1 -1
  598. package/dist/esm/interface/insert-column.js +70 -33
  599. package/dist/esm/interface/insert-row.d.ts +1 -1
  600. package/dist/esm/interface/insert-row.d.ts.map +1 -1
  601. package/dist/esm/interface/insert-row.js +22 -6
  602. package/dist/esm/interface/insert-table-row.d.ts +2 -1
  603. package/dist/esm/interface/insert-table-row.d.ts.map +1 -1
  604. package/dist/esm/interface/insert-table-row.js +67 -12
  605. package/dist/esm/interface/remove-duplicates.d.ts +1 -1
  606. package/dist/esm/interface/remove-duplicates.d.ts.map +1 -1
  607. package/dist/esm/interface/remove-duplicates.js +41 -6
  608. package/dist/esm/interface/remove-table.d.ts +1 -1
  609. package/dist/esm/interface/remove-table.d.ts.map +1 -1
  610. package/dist/esm/interface/remove-table.js +58 -10
  611. package/dist/esm/interface/slicers.d.ts +12 -1
  612. package/dist/esm/interface/slicers.d.ts.map +1 -1
  613. package/dist/esm/interface/slicers.js +44 -2
  614. package/dist/esm/interface/spreadsheet-interface.d.ts +1 -1
  615. package/dist/esm/interface/spreadsheet-interface.d.ts.map +1 -1
  616. package/dist/esm/interface/spreadsheet-interface.js +73 -1
  617. package/dist/esm/interface/table-totalrow.d.ts +13 -1
  618. package/dist/esm/interface/table-totalrow.d.ts.map +1 -1
  619. package/dist/esm/interface/table-totalrow.js +98 -68
  620. package/dist/esm/interface/table-utils.d.ts +59 -6
  621. package/dist/esm/interface/table-utils.d.ts.map +1 -1
  622. package/dist/esm/interface/table-utils.js +155 -14
  623. package/dist/esm/interface/update-table.d.ts +16 -1
  624. package/dist/esm/interface/update-table.d.ts.map +1 -1
  625. package/dist/esm/interface/update-table.js +203 -42
  626. package/dist/esm/sheet-cell.d.ts.map +1 -1
  627. package/dist/esm/test-setup.d.ts.map +1 -1
  628. package/dist/esm/test-setup.js +6 -0
  629. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  630. package/dist/esm/validation-schema/table.schema.d.ts +11 -0
  631. package/dist/esm/validation-schema/table.schema.d.ts.map +1 -1
  632. package/dist/esm/validation-schema/table.schema.js +15 -2
  633. package/package.json +25 -17
@@ -0,0 +1,60 @@
1
+ import { __assign, __read } from "tslib";
2
+ import { areaIntersects } from "@rowsncolumns/grid";
3
+ var LAST_INDEX = Number.MAX_SAFE_INTEGER;
4
+ /**
5
+ * Excel "Insert Cut Cells" / Shift+drag of a cell block, as the three structural steps the
6
+ * legacy hooks already own: open the destination band (`insertCells…` at `to`), move the block
7
+ * into the opening, then close the gap the block left (`deleteCells…` on the vacated source).
8
+ * The sheet keeps its cell count — Shift+drag A5 to A2 over r1..r6 gives r1 r5 r2 r3 r4 r6, never
9
+ * a blank — and a forward move within its own lanes lands `size` lines before `to`, Excel's
10
+ * pre-removal reference (cut A2, drop at row 6 → r1 r3 r4 r5 r2 r6), because the closing shift
11
+ * pulls the landed block up. `null` when the move is a no-op (the drop is inside the block or
12
+ * right after it) or cannot land the block whole (destination lanes overlapping the source
13
+ * lanes only partially — the closing shift would tear the block); the rnc engine's
14
+ * `move-range { insert }` applies the same rules.
15
+ */
16
+ export var planInsertCutCells = function (from, to) {
17
+ if (areaIntersects(from, to)) {
18
+ return null;
19
+ }
20
+ var shift = to.startRowIndex === from.startRowIndex ? "right" : "down";
21
+ var vertical = shift === "down";
22
+ // (line, lane): the axis the bands shift along, and the perpendicular index.
23
+ var _a = __read(vertical
24
+ ? [
25
+ from.startRowIndex,
26
+ from.endRowIndex,
27
+ from.startColumnIndex,
28
+ from.endColumnIndex,
29
+ to.startRowIndex,
30
+ to.startColumnIndex,
31
+ ]
32
+ : [
33
+ from.startColumnIndex,
34
+ from.endColumnIndex,
35
+ from.startRowIndex,
36
+ from.endRowIndex,
37
+ to.startColumnIndex,
38
+ to.startRowIndex,
39
+ ], 6), l1 = _a[0], l2 = _a[1], k1 = _a[2], k2 = _a[3], t = _a[4], tk1 = _a[5];
40
+ var size = l2 - l1 + 1;
41
+ var tk2 = tk1 + (k2 - k1);
42
+ var lanesMeet = tk1 <= k2 && tk2 >= k1;
43
+ if (lanesMeet && tk1 !== k1) {
44
+ return null;
45
+ }
46
+ if (lanesMeet && t > l1 && t <= l2 + 1) {
47
+ return null;
48
+ }
49
+ // Opening the destination band above the block slides the block along with it.
50
+ var slides = lanesMeet && t < l1;
51
+ var shiftedSource = !slides
52
+ ? from
53
+ : vertical
54
+ ? __assign(__assign({}, from), { startRowIndex: from.startRowIndex + size, endRowIndex: from.endRowIndex + size }) : __assign(__assign({}, from), { startColumnIndex: from.startColumnIndex + size, endColumnIndex: from.endColumnIndex + size });
55
+ var band = function (range) {
56
+ return vertical
57
+ ? __assign(__assign({}, range), { endRowIndex: LAST_INDEX }) : __assign(__assign({}, range), { endColumnIndex: LAST_INDEX });
58
+ };
59
+ return { shift: shift, shiftedSource: shiftedSource, bands: [band(to), band(from)] };
60
+ };
@@ -1,4 +1,12 @@
1
1
  import type { GridRange } from "@rowsncolumns/common-types";
2
+ /** Excel's refusal when a move / cut-paste / shift would tear a merged cell. */
3
+ export declare const MERGED_CELL_MOVE_ERROR = "We can't do that to a merged cell.";
4
+ /**
5
+ * The first merge that `range` covers only PARTIALLY (it intersects the range without being
6
+ * wholly inside it). Excel refuses any move, cut + paste or cell shift whose source or destination
7
+ * does that ("We can't do that to a merged cell."); merges wholly inside the range travel intact.
8
+ */
9
+ export declare const findPartiallyCoveredMerge: (range: GridRange, merges: GridRange[] | undefined | null) => GridRange | undefined;
2
10
  export declare const moveMergedCells: (mergedCells: GridRange[] | undefined | null, op: "column-insert" | "row-insert" | "column-remove" | "row-remove", referenceIndex: number, count?: number, condition?: (area: GridRange) => boolean) => GridRange[] | null | undefined;
3
11
  export declare const shrinkMergesOnRowDelete: (merges: GridRange[], deleteStart: number, deleteCount: number) => GridRange[];
4
12
  export declare const shrinkMergesOnColumnDelete: (merges: GridRange[], deleteStart: number, deleteCount: number) => GridRange[];
@@ -1 +1 @@
1
- {"version":3,"file":"merges.d.ts","sourceRoot":"","sources":["../../../api/merges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAY5D,eAAO,MAAM,eAAe,GAC1B,aAAa,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,EAC3C,IAAI,eAAe,GAAG,YAAY,GAAG,eAAe,GAAG,YAAY,EACnE,gBAAgB,MAAM,EACtB,cAAS,EACT,YAAY,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,mCA2DzC,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,aAAa,MAAM,gBA8CpB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,aAAa,MAAM,gBA8CpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,OAAO,MAAM,gBAyBd,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,OAAO,MAAM,gBAyBd,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,EACtC,MAAM,KAAK,GAAG,QAAQ,EACtB,OAAO,MAAM,EACb,OAAO,MAAM,EACb,QAAQ,OAAO,EACf,WAAW,MAAM,EACjB,SAAS,MAAM,mCAkDhB,CAAC"}
1
+ {"version":3,"file":"merges.d.ts","sourceRoot":"","sources":["../../../api/merges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAG5D,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,uCAAuC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,SAAS,EAChB,QAAQ,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,KACrC,SAAS,GAAG,SAGZ,CAAC;AAYJ,eAAO,MAAM,eAAe,GAC1B,aAAa,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,EAC3C,IAAI,eAAe,GAAG,YAAY,GAAG,eAAe,GAAG,YAAY,EACnE,gBAAgB,MAAM,EACtB,cAAS,EACT,YAAY,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,mCA2DzC,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,aAAa,MAAM,gBA8CpB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,aAAa,MAAM,gBA8CpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,OAAO,MAAM,gBAyBd,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,QAAQ,SAAS,EAAE,EACnB,aAAa,MAAM,EACnB,OAAO,MAAM,gBAyBd,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,EACtC,MAAM,KAAK,GAAG,QAAQ,EACtB,OAAO,MAAM,EACb,OAAO,MAAM,EACb,QAAQ,OAAO,EACf,WAAW,MAAM,EACjB,SAAS,MAAM,mCAkDhB,CAAC"}
@@ -1,4 +1,15 @@
1
1
  import { __assign, __values } from "tslib";
2
+ import { areaInsideArea, areaIntersects } from "@rowsncolumns/grid";
3
+ /** Excel's refusal when a move / cut-paste / shift would tear a merged cell. */
4
+ export var MERGED_CELL_MOVE_ERROR = "We can't do that to a merged cell.";
5
+ /**
6
+ * The first merge that `range` covers only PARTIALLY (it intersects the range without being
7
+ * wholly inside it). Excel refuses any move, cut + paste or cell shift whose source or destination
8
+ * does that ("We can't do that to a merged cell."); merges wholly inside the range travel intact.
9
+ */
10
+ export var findPartiallyCoveredMerge = function (range, merges) {
11
+ return merges === null || merges === void 0 ? void 0 : merges.find(function (merge) { return areaIntersects(merge, range) && !areaInsideArea(merge, range); });
12
+ };
2
13
  /**
3
14
  * Move merged cells when user is inserts, deletes row and columns
4
15
  * @param mergedCells
@@ -1,4 +1,9 @@
1
1
  import type { CellFormat, CellInterface, GridRange } from "@rowsncolumns/common-types";
2
+ import type { CellData } from "@rowsncolumns/spreadsheet";
3
+ import type { Draft } from "immer";
4
+ import type { CellXfsRegistry } from "../hooks/use-cellxfs-registry";
5
+ import type { SheetData } from "../hooks/use-spreadsheet-state";
6
+ import type { SharedStringRegistry } from "../hooks/use-ss-registry";
2
7
  /**
3
8
  * Format-painter pattern shared by both engines: the captured 2-D format grid plus the
4
9
  * source block's merge configuration, re-based to the block's top-left so it can be tiled
@@ -49,7 +54,23 @@ export declare const getBandedCellFormat: (bandedCells: Map<string, CellFormat>
49
54
  * Layer a cell's explicit format over the banded format the grid would paint beneath it, so the
50
55
  * captured pattern carries the VISIBLE look (Sheets copies the alternating colours as static cell
51
56
  * fills — it does not create a table or banding at the target). Explicit keys win; an explicit
52
- * `undefined` never clobbers a banded value.
57
+ * `undefined` never clobbers a banded value. `textFormat` merges key-wise: an explicitly bold
58
+ * header keeps the contrast text colour the band paints it with.
53
59
  */
54
60
  export declare const layerBandedFormat: (explicit: CellFormat | null | undefined, banded: CellFormat | undefined) => CellFormat | null | undefined;
61
+ /**
62
+ * Write the banded (table stripe) formats the grid paints under `range` into the cells as
63
+ * static formats — Excel's Convert to Range bakes the table style into the cell formats — each
64
+ * cell's explicit format layered on top exactly as the format painter captures it. Runs inside
65
+ * the caller's sheet-data draft; cells without a band are untouched.
66
+ */
67
+ export declare const bakeBandedFormats: <T extends CellData>({ draft, sheetId, range, bandedCells, locale, cellXfsRegistry, sharedStringRegistry, }: {
68
+ draft: Draft<SheetData<T>>;
69
+ sheetId: number;
70
+ range: GridRange;
71
+ bandedCells: Map<string, CellFormat> | undefined | null;
72
+ locale?: string;
73
+ cellXfsRegistry?: CellXfsRegistry;
74
+ sharedStringRegistry?: SharedStringRegistry;
75
+ }) => void;
55
76
  //# sourceMappingURL=paint-format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paint-format.d.ts","sourceRoot":"","sources":["../../../api/paint-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACV,MAAM,4BAA4B,CAAC;AAGpC;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC;IAC7C,kFAAkF;IAClF,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAQF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,SAAS,KAChB,SAAS,EAaX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,EACtC,YAAY,aAAa,KACxB,SAkBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,EAC5C,gBAAgB,SAAS,EAAE,KAC1B,IAYF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,gBAAgB,SAAS,EAAE,EAC3B,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,QAAQ,SAAS,KAChB,SAAS,EAqBX,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,GAAG,CAAC,MAAM,EAAE,U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AEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,EAC5C,gBAAgB,SAAS,EAAE,KAC1B,IAYF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,gBAAgB,SAAS,EAAE,EAC3B,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,QAAQ,SAAS,KAChB,SAAS,EAqBX,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,SAAS,GAAG,IAAI,EACvD,UAAU,MAAM,EAChB,aAAa,MAAM,KAClB,UAAU,GAAG,SACyC,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,UAAU,GAAG,IAAI,GAAG,SAAS,EACvC,QAAQ,UAAU,GAAG,SAAS,KAC7B,UAAU,GAAG,IAAI,GAAG,SActB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,QAAQ,EAAE,wFAQnD;IACD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,SA6CA,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { __assign, __read, __values } from "tslib";
2
2
  import { cellIdentifier, isCellWithinBounds } from "@rowsncolumns/grid";
3
+ import { SheetCell } from "../sheet-cell";
4
+ import { createSheetDraft } from "./immer-utils";
3
5
  var rangeContains = function (outer, inner) {
4
6
  return inner.startRowIndex >= outer.startRowIndex &&
5
7
  inner.endRowIndex <= outer.endRowIndex &&
@@ -146,7 +148,8 @@ export var getBandedCellFormat = function (bandedCells, rowIndex, columnIndex) {
146
148
  * Layer a cell's explicit format over the banded format the grid would paint beneath it, so the
147
149
  * captured pattern carries the VISIBLE look (Sheets copies the alternating colours as static cell
148
150
  * fills — it does not create a table or banding at the target). Explicit keys win; an explicit
149
- * `undefined` never clobbers a banded value.
151
+ * `undefined` never clobbers a banded value. `textFormat` merges key-wise: an explicitly bold
152
+ * header keeps the contrast text colour the band paints it with.
150
153
  */
151
154
  export var layerBandedFormat = function (explicit, banded) {
152
155
  var e_4, _a;
@@ -169,6 +172,59 @@ export var layerBandedFormat = function (explicit, banded) {
169
172
  }
170
173
  finally { if (e_4) throw e_4.error; }
171
174
  }
175
+ if (explicit.textFormat && banded.textFormat) {
176
+ merged.textFormat = __assign(__assign({}, banded.textFormat), explicit.textFormat);
177
+ }
172
178
  }
173
179
  return merged;
174
180
  };
181
+ /**
182
+ * Write the banded (table stripe) formats the grid paints under `range` into the cells as
183
+ * static formats — Excel's Convert to Range bakes the table style into the cell formats — each
184
+ * cell's explicit format layered on top exactly as the format painter captures it. Runs inside
185
+ * the caller's sheet-data draft; cells without a band are untouched.
186
+ */
187
+ export var bakeBandedFormats = function (_a) {
188
+ var e_5, _b;
189
+ var _c, _d;
190
+ var draft = _a.draft, sheetId = _a.sheetId, range = _a.range, bandedCells = _a.bandedCells, locale = _a.locale, cellXfsRegistry = _a.cellXfsRegistry, sharedStringRegistry = _a.sharedStringRegistry;
191
+ if (!(bandedCells === null || bandedCells === void 0 ? void 0 : bandedCells.size))
192
+ return;
193
+ var sheetCell = new SheetCell();
194
+ for (var rowIndex = range.startRowIndex; rowIndex <= range.endRowIndex; rowIndex++) {
195
+ for (var columnIndex = range.startColumnIndex; columnIndex <= range.endColumnIndex; columnIndex++) {
196
+ var banded = getBandedCellFormat(bandedCells, rowIndex, columnIndex);
197
+ if (!banded)
198
+ continue;
199
+ var currentSheet = createSheetDraft(draft, sheetId, rowIndex);
200
+ sheetCell.assign(sheetId, { rowIndex: rowIndex, columnIndex: columnIndex }, (_d = (_c = currentSheet[rowIndex]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[columnIndex], { locale: locale, cellXfsRegistry: cellXfsRegistry, sharedStringRegistry: sharedStringRegistry });
201
+ var baked = layerBandedFormat(sheetCell.userEnteredFormat, banded);
202
+ sheetCell.clearUserEnteredFormat();
203
+ try {
204
+ for (var _e = (e_5 = void 0, __values(Object.entries(baked !== null && baked !== void 0 ? baked : {}))), _f = _e.next(); !_f.done; _f = _e.next()) {
205
+ var _g = __read(_f.value, 2), key = _g[0], value = _g[1];
206
+ // A band carries `undefined` for the parts it does not paint (no border, no text
207
+ // colour) — those must not land as empty `{}` formats on the cell.
208
+ if (value === undefined)
209
+ continue;
210
+ if (typeof value === "object" &&
211
+ value !== null &&
212
+ Object.values(value).every(function (part) { return part === undefined; })) {
213
+ continue;
214
+ }
215
+ sheetCell.setUserEnteredFormat(key, value);
216
+ }
217
+ }
218
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
219
+ finally {
220
+ try {
221
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
222
+ }
223
+ finally { if (e_5) throw e_5.error; }
224
+ }
225
+ currentSheet[rowIndex].values[columnIndex] =
226
+ sheetCell.getCellData();
227
+ cellXfsRegistry === null || cellXfsRegistry === void 0 ? void 0 : cellXfsRegistry.registerCellXfs(sheetCell);
228
+ }
229
+ }
230
+ };
@@ -1,3 +1,25 @@
1
1
  import type { SortOrder } from "@rowsncolumns/spreadsheet";
2
- export declare const cellValueSorter: (left: string | number | boolean | undefined | null, right: string | number | boolean | undefined | null, sortOrder: SortOrder) => number;
2
+ /**
3
+ * A cell whose effective value is an error (`#DIV/0!`, `#N/A`, …). Errors
4
+ * form the last value tier and keep their relative order, as in Excel.
5
+ */
6
+ export type SortErrorValue = {
7
+ readonly sortError: string;
8
+ };
9
+ export type SortCellValue = string | number | boolean | SortErrorValue | undefined | null;
10
+ export declare const isSortErrorValue: (value: unknown) => value is SortErrorValue;
11
+ /**
12
+ * The value a sort compares for a cell: its error when it has one, else the
13
+ * effective value, else the display text.
14
+ */
15
+ export declare const getCellSortValue: (cell: {
16
+ readonly error: unknown;
17
+ getEffectiveValue(): string | number | boolean | undefined;
18
+ readonly formattedValue: string | undefined | null;
19
+ }) => SortCellValue;
20
+ /**
21
+ * Excel's sort order: numbers < text < logicals < errors, blanks last in
22
+ * BOTH directions, text compared case-insensitively through the collator.
23
+ */
24
+ export declare const cellValueSorter: (left: SortCellValue, right: SortCellValue, sortOrder: SortOrder) => number;
3
25
  //# sourceMappingURL=sort.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../api/sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAQ3D,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,EAClD,OAAO,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,EACnD,WAAW,SAAS,WAiCrB,CAAC"}
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../api/sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAa3D;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,MAAM,GACN,OAAO,GACP,cAAc,GACd,SAAS,GACT,IAAI,CAAC;AAET,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,cACU,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM;IACrC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,iBAAiB,IAAI,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACpD,KAAG,aAGmD,CAAC;AAYxD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,aAAa,EACnB,OAAO,aAAa,EACpB,WAAW,SAAS,WA8CrB,CAAC"}
@@ -1,8 +1,40 @@
1
1
  import { isNil } from "@rowsncolumns/utils";
2
+ /**
3
+ * The text order both engines sort with: case- and accent-insensitive,
4
+ * digit runs by numeric value ("a2" < "a10"). `rnc_cellmodel::collate_text`
5
+ * is its Rust twin.
6
+ */
2
7
  var comparator = new Intl.Collator("en", {
3
8
  numeric: true,
4
9
  sensitivity: "base",
5
10
  }).compare;
11
+ export var isSortErrorValue = function (value) {
12
+ return typeof value === "object" && value !== null && "sortError" in value;
13
+ };
14
+ /**
15
+ * The value a sort compares for a cell: its error when it has one, else the
16
+ * effective value, else the display text.
17
+ */
18
+ export var getCellSortValue = function (cell) {
19
+ var _a, _b;
20
+ return cell.error
21
+ ? { sortError: (_a = cell.formattedValue) !== null && _a !== void 0 ? _a : "" }
22
+ : ((_b = cell.getEffectiveValue()) !== null && _b !== void 0 ? _b : cell.formattedValue);
23
+ };
24
+ /** Excel's ascending order of value types: numbers < text < logicals < errors. */
25
+ var tierOf = function (value) {
26
+ return typeof value === "number"
27
+ ? 0
28
+ : typeof value === "string"
29
+ ? 1
30
+ : typeof value === "boolean"
31
+ ? 2
32
+ : 3;
33
+ };
34
+ /**
35
+ * Excel's sort order: numbers < text < logicals < errors, blanks last in
36
+ * BOTH directions, text compared case-insensitively through the collator.
37
+ */
6
38
  export var cellValueSorter = function (left, right, sortOrder) {
7
39
  var isEmpty = function (value) {
8
40
  if (isNil(value)) {
@@ -12,7 +44,7 @@ export var cellValueSorter = function (left, right, sortOrder) {
12
44
  };
13
45
  var leftEmpty = isEmpty(left);
14
46
  var rightEmpty = isEmpty(right);
15
- // Ignore empty rows
47
+ // Blanks stay last regardless of direction.
16
48
  if (leftEmpty && rightEmpty) {
17
49
  return 0;
18
50
  }
@@ -22,12 +54,26 @@ export var cellValueSorter = function (left, right, sortOrder) {
22
54
  if (rightEmpty) {
23
55
  return -1;
24
56
  }
25
- var isNumbers = typeof left === "number" && typeof right === "number";
26
- var comparisonResult = isNumbers
27
- ? left - right
28
- : comparator(String(left), String(right));
57
+ var direction = sortOrder === "ASCENDING" ? 1 : -1;
58
+ var leftTier = tierOf(left);
59
+ var rightTier = tierOf(right);
60
+ if (leftTier !== rightTier) {
61
+ return direction * Math.sign(leftTier - rightTier);
62
+ }
63
+ var comparisonResult = 0;
64
+ if (typeof left === "number" && typeof right === "number") {
65
+ comparisonResult = left - right;
66
+ }
67
+ else if (typeof left === "string" && typeof right === "string") {
68
+ comparisonResult = comparator(left, right);
69
+ }
70
+ else if (typeof left === "boolean" && typeof right === "boolean") {
71
+ // FALSE before TRUE.
72
+ comparisonResult = Number(left) - Number(right);
73
+ }
74
+ // Errors compare equal: Excel keeps them in their original order.
29
75
  if (comparisonResult !== 0) {
30
- return (sortOrder === "ASCENDING" ? 1 : -1) * Math.sign(comparisonResult);
76
+ return direction * Math.sign(comparisonResult);
31
77
  }
32
78
  return 0;
33
79
  };
@@ -46,6 +46,24 @@ export declare const findTornArray: (arrayRanges: readonly GridRange[] | undefin
46
46
  * inside the deleted block. */
47
47
  export declare const isRangeInsideBand: (range: GridRange, band: StructuralBand) => boolean;
48
48
  export declare const isRangeInsideBlock: (outer: GridRange, inner: GridRange) => boolean;
49
+ /**
50
+ * T-07 — the Excel refusal for defining a table over `range` (create / update): another table on
51
+ * the sheet (`table-overlap`, judged first) or a merged cell (`table-merged-cells`). `excludeTableId`
52
+ * leaves the table being edited out. `insertedRows`, when given, is a one-or-more-row insert that
53
+ * runs first (the Create Table dialog's header row): tables and merges wholly inside its band are
54
+ * judged at their shifted position.
55
+ */
56
+ export declare const getTableRangeRefusal: ({ sheetId, range, tables, merges, excludeTableId, insertedRows, }: {
57
+ sheetId: number;
58
+ range: GridRange;
59
+ tables?: readonly TableView[] | null;
60
+ merges?: readonly GridRange[] | null;
61
+ excludeTableId?: TableView["id"];
62
+ insertedRows?: {
63
+ band: StructuralBand;
64
+ count: number;
65
+ };
66
+ }) => StructuralRefusal | undefined;
49
67
  /**
50
68
  * The Excel refusal (if any) for an insert/delete-cells shift of `range`. Checks run in Excel's
51
69
  * order: array tear, merge tear, table tear, off-sheet push. `undefined` means the edit may proceed.
@@ -63,6 +81,45 @@ export declare const getShiftCellsRefusal: <T extends CellData>({ direction, ran
63
81
  tables?: readonly TableView[] | null;
64
82
  arrayRanges?: readonly GridRange[] | null;
65
83
  }) => StructuralRefusal | undefined;
84
+ /**
85
+ * T-46 — the refusal (if any) for a drag-move / cut of `from` onto `to`. Excel moves a table whole
86
+ * when the block contains it, but refuses to move PART of a table (the block covers some of its
87
+ * cells) and refuses a block landing on another table's cells; a block that is a whole table
88
+ * landing on another table is a table overlap. A same-table column reorder is decided before this.
89
+ */
90
+ export declare const getMoveRangeRefusal: ({ sheetId, from, to, toSheetId, tables, }: {
91
+ sheetId: number;
92
+ from: GridRange;
93
+ to: GridRange;
94
+ /** The destination sheet — a cut + paste can land on another sheet; defaults to `sheetId`. */
95
+ toSheetId?: number;
96
+ tables?: readonly TableView[] | null;
97
+ }) => StructuralRefusal | undefined;
98
+ /**
99
+ * T-81 — the refusal for a fill whose filled cells (`target` minus `source`) reach a table's totals
100
+ * row. Excel's fill handle never extends over a totals row (the row is derived, not data), so the
101
+ * whole fill is refused and nothing is written. A fill whose source IS the totals row (filling away
102
+ * from the table) is not affected.
103
+ */
104
+ export declare const getFillTotalsRowRefusal: ({ sheetId, source, target, tables, }: {
105
+ sheetId: number;
106
+ source: GridRange;
107
+ target: GridRange;
108
+ tables?: readonly TableView[] | null;
109
+ }) => StructuralRefusal | undefined;
110
+ /**
111
+ * T-47 — the refusal (if any) for Insert / Delete Table Rows (`axis: "row"`) or Table Columns
112
+ * (`axis: "column"`) on `table`. The edit shifts the cells of the table's band — its columns from
113
+ * the table down to the sheet edge, or its rows from the table right to the sheet edge. Another
114
+ * table wholly inside that band moves with it; one the band reaches but does not contain would be
115
+ * torn apart, so Excel refuses the edit.
116
+ */
117
+ export declare const getTableEditRefusal: ({ sheetId, table, axis, tables, }: {
118
+ sheetId: number;
119
+ table: TableView;
120
+ axis: "row" | "column";
121
+ tables?: readonly TableView[] | null;
122
+ }) => StructuralRefusal | undefined;
66
123
  /**
67
124
  * INS-06 / INS-09 — the refusal for a whole-row (`axis: "row"`) or whole-column insert of `count`
68
125
  * lines before `referenceIndex`, given the hard grid cap (`maxRowCount` / `maxColumnCount`). Blank
@@ -1 +1 @@
1
- {"version":3,"file":"structural-guards.d.ts","sourceRoot":"","sources":["../../../api/structural-guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,SAAS,EACT,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGhF,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;AAE9D;0FAC0F;AAC1F,eAAO,MAAM,qBAAqB,GAChC,YAAY,aAAa,EACzB,YAAY,aAAa,CAAC,mBAAmB,CAAC,EAAE,KAC/C,aAAa,CAAC,mBAAmB,CAKnC,CAAC;AAcF,yGAAyG;AACzG,eAAO,MAAM,SAAS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AC,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACvC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,KAAG,iBAAiB,GAAG,SAkBvB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { __read } from "tslib";
1
+ import { __assign, __read } from "tslib";
2
2
  import { selectionFromActiveCell } from "@rowsncolumns/utils";
3
3
  import { structuralRefusal, } from "../constants";
4
4
  /** The selection a cell shift operates on — the LAST selection, or the active cell as a 1×1. The
@@ -140,6 +140,31 @@ export var isRangeInsideBand = function (range, band) {
140
140
  return rangeContains(band, range);
141
141
  };
142
142
  export var isRangeInsideBlock = rangeContains;
143
+ /**
144
+ * T-07 — the Excel refusal for defining a table over `range` (create / update): another table on
145
+ * the sheet (`table-overlap`, judged first) or a merged cell (`table-merged-cells`). `excludeTableId`
146
+ * leaves the table being edited out. `insertedRows`, when given, is a one-or-more-row insert that
147
+ * runs first (the Create Table dialog's header row): tables and merges wholly inside its band are
148
+ * judged at their shifted position.
149
+ */
150
+ export var getTableRangeRefusal = function (_a) {
151
+ var sheetId = _a.sheetId, range = _a.range, tables = _a.tables, merges = _a.merges, excludeTableId = _a.excludeTableId, insertedRows = _a.insertedRows;
152
+ var shifted = function (candidate) {
153
+ return insertedRows && isRangeInsideBand(candidate, insertedRows.band)
154
+ ? __assign(__assign({}, candidate), { startRowIndex: candidate.startRowIndex + insertedRows.count, endRowIndex: candidate.endRowIndex + insertedRows.count }) : candidate;
155
+ };
156
+ if (tables === null || tables === void 0 ? void 0 : tables.some(function (table) {
157
+ return table.sheetId === sheetId &&
158
+ table.id !== excludeTableId &&
159
+ rangesIntersect(shifted(table.range), range);
160
+ })) {
161
+ return structuralRefusal("table-overlap");
162
+ }
163
+ if (merges === null || merges === void 0 ? void 0 : merges.some(function (merge) { return rangesIntersect(shifted(merge), range); })) {
164
+ return structuralRefusal("table-merged-cells");
165
+ }
166
+ return undefined;
167
+ };
143
168
  /**
144
169
  * The Excel refusal (if any) for an insert/delete-cells shift of `range`. Checks run in Excel's
145
170
  * order: array tear, merge tear, table tear, off-sheet push. `undefined` means the edit may proceed.
@@ -176,6 +201,73 @@ export var getShiftCellsRefusal = function (_a) {
176
201
  }
177
202
  return undefined;
178
203
  };
204
+ /**
205
+ * T-46 — the refusal (if any) for a drag-move / cut of `from` onto `to`. Excel moves a table whole
206
+ * when the block contains it, but refuses to move PART of a table (the block covers some of its
207
+ * cells) and refuses a block landing on another table's cells; a block that is a whole table
208
+ * landing on another table is a table overlap. A same-table column reorder is decided before this.
209
+ */
210
+ export var getMoveRangeRefusal = function (_a) {
211
+ var _b;
212
+ var sheetId = _a.sheetId, from = _a.from, to = _a.to, _c = _a.toSheetId, toSheetId = _c === void 0 ? sheetId : _c, tables = _a.tables;
213
+ var sheetTables = tables === null || tables === void 0 ? void 0 : tables.filter(function (table) { return table.sheetId === sheetId; });
214
+ var destinationTables = toSheetId === sheetId
215
+ ? sheetTables
216
+ : tables === null || tables === void 0 ? void 0 : tables.filter(function (table) { return table.sheetId === toSheetId; });
217
+ if (!(sheetTables === null || sheetTables === void 0 ? void 0 : sheetTables.length) && !(destinationTables === null || destinationTables === void 0 ? void 0 : destinationTables.length))
218
+ return undefined;
219
+ var moved = (_b = sheetTables === null || sheetTables === void 0 ? void 0 : sheetTables.filter(function (table) { return rangeContains(from, table.range); })) !== null && _b !== void 0 ? _b : [];
220
+ if (sheetTables === null || sheetTables === void 0 ? void 0 : sheetTables.some(function (table) {
221
+ return !moved.includes(table) && rangesIntersect(table.range, from);
222
+ })) {
223
+ return structuralRefusal("torn-table");
224
+ }
225
+ if (destinationTables === null || destinationTables === void 0 ? void 0 : destinationTables.some(function (table) { return !moved.includes(table) && rangesIntersect(table.range, to); })) {
226
+ return structuralRefusal(moved.length ? "table-overlap" : "torn-table");
227
+ }
228
+ return undefined;
229
+ };
230
+ /**
231
+ * T-81 — the refusal for a fill whose filled cells (`target` minus `source`) reach a table's totals
232
+ * row. Excel's fill handle never extends over a totals row (the row is derived, not data), so the
233
+ * whole fill is refused and nothing is written. A fill whose source IS the totals row (filling away
234
+ * from the table) is not affected.
235
+ */
236
+ export var getFillTotalsRowRefusal = function (_a) {
237
+ var sheetId = _a.sheetId, source = _a.source, target = _a.target, tables = _a.tables;
238
+ return (tables === null || tables === void 0 ? void 0 : tables.some(function (table) {
239
+ if (table.sheetId !== sheetId || !table.totalRow)
240
+ return false;
241
+ var totalsRow = table.range.endRowIndex;
242
+ if (totalsRow < target.startRowIndex || totalsRow > target.endRowIndex) {
243
+ return false;
244
+ }
245
+ var hit = {
246
+ startRowIndex: totalsRow,
247
+ endRowIndex: totalsRow,
248
+ startColumnIndex: Math.max(table.range.startColumnIndex, target.startColumnIndex),
249
+ endColumnIndex: Math.min(table.range.endColumnIndex, target.endColumnIndex),
250
+ };
251
+ return hit.startColumnIndex <= hit.endColumnIndex && !rangeContains(source, hit);
252
+ }))
253
+ ? structuralRefusal("table-totals-fill")
254
+ : undefined;
255
+ };
256
+ /**
257
+ * T-47 — the refusal (if any) for Insert / Delete Table Rows (`axis: "row"`) or Table Columns
258
+ * (`axis: "column"`) on `table`. The edit shifts the cells of the table's band — its columns from
259
+ * the table down to the sheet edge, or its rows from the table right to the sheet edge. Another
260
+ * table wholly inside that band moves with it; one the band reaches but does not contain would be
261
+ * torn apart, so Excel refuses the edit.
262
+ */
263
+ export var getTableEditRefusal = function (_a) {
264
+ var sheetId = _a.sheetId, table = _a.table, axis = _a.axis, tables = _a.tables;
265
+ var band = axis === "row"
266
+ ? __assign(__assign({}, table.range), { endRowIndex: Number.POSITIVE_INFINITY }) : __assign(__assign({}, table.range), { endColumnIndex: Number.POSITIVE_INFINITY });
267
+ return findTornTable(tables === null || tables === void 0 ? void 0 : tables.filter(function (other) { return other.id !== table.id; }), sheetId, band)
268
+ ? structuralRefusal("torn-table")
269
+ : undefined;
270
+ };
179
271
  /**
180
272
  * INS-06 / INS-09 — the refusal for a whole-row (`axis: "row"`) or whole-column insert of `count`
181
273
  * lines before `referenceIndex`, given the hard grid cap (`maxRowCount` / `maxColumnCount`). Blank
@@ -27,9 +27,10 @@ export type RemovedTableParts = {
27
27
  }>;
28
28
  };
29
29
  /**
30
- * Which tables / table columns `deleteRow` (a table goes with its header row)
31
- * or `deleteColumn` (a table goes when every column is deleted; otherwise the
32
- * covered columns are spliced out) removes for the band
30
+ * Which tables / table columns `deleteRow` (a table goes only when every one
31
+ * of its rows is deleted — losing its header row keeps it, the next row
32
+ * becomes the header) or `deleteColumn` (a table goes when every column is
33
+ * deleted; otherwise the covered columns are spliced out) removes for the band
33
34
  * `[minIndex, maxIndex]` on `sheetId`. Mirrors the table updates those
34
35
  * interfaces apply to `tables`.
35
36
  */
@@ -59,6 +60,60 @@ export type BreakStructuredRefsParams<T extends CellData> = {
59
60
  * when it is available (cost O(formula cells)); without one the draft is swept.
60
61
  */
61
62
  export declare const breakStructuredRefsForRemovedTableParts: <T extends CellData>({ draft, sheetId, axis, referenceIndex, count, removed, getGraphNodes, enqueueCalculation, enqueueGraphOperation, recalcCells, locale, cellXfsRegistry, sharedStringRegistry, }: BreakStructuredRefsParams<T>) => void;
63
+ export type RewriteFormulasParams<T extends CellData> = Pick<BreakStructuredRefsParams<T>, "draft" | "getGraphNodes" | "enqueueCalculation" | "enqueueGraphOperation" | "recalcCells" | "locale" | "cellXfsRegistry" | "sharedStringRegistry">;
64
+ /**
65
+ * Column `oldName` of `table` was renamed `newName` (a header-cell edit):
66
+ * rewrite every structured reference to it across the workbook, including the
67
+ * bare `[@Old]` forms of the formulas that sit inside the table.
68
+ */
69
+ export declare const renameTableColumnInFormulas: <T extends CellData>({ table, oldName, newName, ...params }: RewriteFormulasParams<T> & {
70
+ table: Pick<TableView, "title" | "sheetId" | "range">;
71
+ oldName: string;
72
+ newName: string;
73
+ }) => void;
74
+ /**
75
+ * Several columns of `table` were renamed at once (a header row re-derived
76
+ * after a row delete, several header cells written by one paste /
77
+ * change-batch): `renames` maps each LOWER-CASED old name to its new name and
78
+ * every formula is rewritten in ONE pass, so `Name` → `Qty` and `Qty` → `Name`
79
+ * swap instead of chaining into the same column.
80
+ */
81
+ export declare const renameTableColumnsInFormulas: <T extends CellData>({ table, renames, ...params }: RewriteFormulasParams<T> & {
82
+ table: Pick<TableView, "title" | "sheetId" | "range">;
83
+ renames: ReadonlyMap<string, string>;
84
+ }) => void;
85
+ /**
86
+ * The header cells one write renamed (`planHeaderCellRenames`), applied per
87
+ * table as a single multi-column rename.
88
+ */
89
+ export declare const renameHeaderCellsInFormulas: <T extends CellData>({ headerRenames, ...params }: RewriteFormulasParams<T> & {
90
+ headerRenames: readonly {
91
+ table: Pick<TableView, "id" | "title" | "sheetId" | "range">;
92
+ oldName: string | undefined;
93
+ newName: string;
94
+ }[];
95
+ }) => void;
96
+ /**
97
+ * `table` is being converted to a range (Excel's Convert to Range): rewrite
98
+ * every structured reference into it across the workbook to the A1 reference
99
+ * it resolves to — `T[Col]` → `$B$2:$B$9`, `[@Col]` → `B3`,
100
+ * `T[[#Headers],[Col]]` → `$B$1`, qualified with the table's sheet from another
101
+ * sheet — so the formulas keep their values once the table is gone. Runs
102
+ * BEFORE the table is removed; the bare `[@Col]` forms belong to the formulas
103
+ * that sit inside the table.
104
+ */
105
+ export declare const convertTableReferencesToA1InFormulas: <T extends CellData>({ table, getSheetName, ...params }: RewriteFormulasParams<T> & {
106
+ table: Pick<TableView, "title" | "sheetId" | "range" | "headerRow" | "totalRow" | "columns">;
107
+ getSheetName(sheetId: number): string;
108
+ }) => void;
109
+ /**
110
+ * Table `oldName` was renamed `newName` (the Edit Table dialog / `updateTable`):
111
+ * rewrite `Old[…]` → `New[…]` in every formula across the workbook.
112
+ */
113
+ export declare const renameTableInFormulas: <T extends CellData>({ oldName, newName, ...params }: RewriteFormulasParams<T> & {
114
+ oldName: string;
115
+ newName: string;
116
+ }) => void;
62
117
  /**
63
118
  * Drop the materialised spill cells of every dynamic-array anchor that sits
64
119
  * inside the deleted band `[minIndex, maxIndex]` (rows or columns) of
@@ -1 +1 @@
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