@1771technologies/lytenyte-pro 2.0.0-dev.0 → 2.0.0-dev.2

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 (423) hide show
  1. package/dist/__play__/alpha.play.d.ts +3 -0
  2. package/dist/__play__/alpha.play.js +56 -0
  3. package/dist/__play__/basic-server-data/data.d.ts +10 -0
  4. package/dist/__play__/basic-server-data/data.js +17746 -0
  5. package/dist/__play__/basic-server-data/server.d.ts +36 -0
  6. package/dist/__play__/basic-server-data/server.js +105 -0
  7. package/dist/__play__/buttons.play.d.ts +4 -0
  8. package/dist/__play__/buttons.play.js +7 -0
  9. package/dist/__play__/inputs.play.d.ts +3 -0
  10. package/dist/__play__/inputs.play.js +13 -0
  11. package/dist/__play__/server.play.d.ts +3 -0
  12. package/dist/__play__/server.play.js +66 -0
  13. package/dist/__play__/tree.play.d.ts +3 -0
  14. package/dist/__play__/tree.play.js +47 -0
  15. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +2 -0
  16. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +43 -0
  17. package/dist/cell-selection/are-rects-equal.d.ts +2 -0
  18. package/dist/cell-selection/are-rects-equal.js +6 -0
  19. package/dist/cell-selection/bound-selection-rect.d.ts +3 -0
  20. package/dist/cell-selection/bound-selection-rect.js +16 -0
  21. package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
  22. package/dist/cell-selection/cell-selection-containers.js +86 -0
  23. package/dist/cell-selection/cell-selection-driver/cell-selection-driver.d.ts +1 -0
  24. package/dist/cell-selection/cell-selection-driver/cell-selection-driver.js +279 -0
  25. package/dist/cell-selection/cell-selection-driver/use-cell-focus-change.d.ts +6 -0
  26. package/dist/cell-selection/cell-selection-driver/use-cell-focus-change.js +34 -0
  27. package/dist/cell-selection/cell-style-row.d.ts +8 -0
  28. package/dist/cell-selection/cell-style-row.js +79 -0
  29. package/dist/cell-selection/data-rect-from-cell-position.d.ts +3 -0
  30. package/dist/cell-selection/data-rect-from-cell-position.js +17 -0
  31. package/dist/cell-selection/deselect-rect-range.d.ts +2 -0
  32. package/dist/cell-selection/deselect-rect-range.js +43 -0
  33. package/dist/cell-selection/expand-selection-down.d.ts +3 -0
  34. package/dist/cell-selection/expand-selection-down.js +78 -0
  35. package/dist/cell-selection/expand-selection-end.d.ts +3 -0
  36. package/dist/cell-selection/expand-selection-end.js +76 -0
  37. package/dist/cell-selection/expand-selection-start.d.ts +3 -0
  38. package/dist/cell-selection/expand-selection-start.js +73 -0
  39. package/dist/cell-selection/expand-selection-up.d.ts +3 -0
  40. package/dist/cell-selection/expand-selection-up.js +74 -0
  41. package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
  42. package/dist/cell-selection/full-width-start-end-index.js +4 -0
  43. package/dist/cell-selection/get-root-cell.d.ts +3 -0
  44. package/dist/cell-selection/get-root-cell.js +6 -0
  45. package/dist/cell-selection/index.d.ts +13 -0
  46. package/dist/cell-selection/index.js +13 -0
  47. package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
  48. package/dist/cell-selection/is-bottom-rect.js +4 -0
  49. package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
  50. package/dist/cell-selection/is-center-col-rect.js +3 -0
  51. package/dist/cell-selection/is-center-rect.d.ts +2 -0
  52. package/dist/cell-selection/is-center-rect.js +4 -0
  53. package/dist/cell-selection/is-end-rect.d.ts +5 -0
  54. package/dist/cell-selection/is-end-rect.js +3 -0
  55. package/dist/cell-selection/is-fully-within-rect.d.ts +2 -0
  56. package/dist/cell-selection/is-fully-within-rect.js +6 -0
  57. package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
  58. package/dist/cell-selection/is-overlapping-rect.js +5 -0
  59. package/dist/cell-selection/is-start-rect.d.ts +5 -0
  60. package/dist/cell-selection/is-start-rect.js +3 -0
  61. package/dist/cell-selection/is-top-rect.d.ts +2 -0
  62. package/dist/cell-selection/is-top-rect.js +3 -0
  63. package/dist/cell-selection/is-within-selection-rect.d.ts +2 -0
  64. package/dist/cell-selection/is-within-selection-rect.js +3 -0
  65. package/dist/cell-selection/split-cell-selection-rect.d.ts +47 -0
  66. package/dist/cell-selection/split-cell-selection-rect.js +88 -0
  67. package/dist/cell-selection/split-on-pivot.d.ts +3 -0
  68. package/dist/cell-selection/split-on-pivot.js +50 -0
  69. package/dist/cell-selection/update-additive-cell-selection.d.ts +4 -0
  70. package/dist/cell-selection/update-additive-cell-selection.js +21 -0
  71. package/dist/cell-selection/use-edge-scroll.d.ts +6 -0
  72. package/dist/cell-selection/use-edge-scroll.js +71 -0
  73. package/dist/components/checkbox/checkbox.d.ts +15 -0
  74. package/dist/components/checkbox/checkbox.js +42 -0
  75. package/dist/components/checkbox/checkbox.play.d.ts +2 -0
  76. package/dist/components/checkbox/checkbox.play.js +6 -0
  77. package/dist/components/column-manager/column-manager.d.ts +13 -0
  78. package/dist/components/column-manager/column-manager.js +47 -0
  79. package/dist/components/external/clsx.d.ts +2 -0
  80. package/dist/components/external/clsx.js +44 -0
  81. package/dist/components/external/floating-ui.d.ts +268 -0
  82. package/dist/components/external/floating-ui.js +1802 -0
  83. package/dist/components/headless/dialog/arrow.d.ts +6 -0
  84. package/dist/components/headless/dialog/arrow.js +16 -0
  85. package/dist/components/headless/dialog/close.d.ts +10 -0
  86. package/dist/components/headless/dialog/close.js +22 -0
  87. package/dist/components/headless/dialog/container.d.ts +5 -0
  88. package/dist/components/headless/dialog/container.js +221 -0
  89. package/dist/components/headless/dialog/context.d.ts +32 -0
  90. package/dist/components/headless/dialog/context.js +3 -0
  91. package/dist/components/headless/dialog/description.d.ts +9 -0
  92. package/dist/components/headless/dialog/description.js +20 -0
  93. package/dist/components/headless/dialog/index.parts.d.ts +30 -0
  94. package/dist/components/headless/dialog/index.parts.js +17 -0
  95. package/dist/components/headless/dialog/root.d.ts +32 -0
  96. package/dist/components/headless/dialog/root.js +75 -0
  97. package/dist/components/headless/dialog/title.d.ts +9 -0
  98. package/dist/components/headless/dialog/title.js +20 -0
  99. package/dist/components/headless/dialog/transform-origin.d.ts +5 -0
  100. package/dist/components/headless/dialog/transform-origin.js +38 -0
  101. package/dist/components/headless/dialog/trigger.d.ts +10 -0
  102. package/dist/components/headless/dialog/trigger.js +24 -0
  103. package/dist/components/headless/dialog/use-dialog.d.ts +4 -0
  104. package/dist/components/headless/dialog/use-dialog.js +12 -0
  105. package/dist/components/headless/menu/checkbox-item.d.ts +11 -0
  106. package/dist/components/headless/menu/checkbox-item.js +42 -0
  107. package/dist/components/headless/menu/combo/combo-checkbox.d.ts +11 -0
  108. package/dist/components/headless/menu/combo/combo-checkbox.js +38 -0
  109. package/dist/components/headless/menu/combo/combo-context.d.ts +9 -0
  110. package/dist/components/headless/menu/combo/combo-context.js +3 -0
  111. package/dist/components/headless/menu/combo/combo-input.d.ts +7 -0
  112. package/dist/components/headless/menu/combo/combo-input.js +58 -0
  113. package/dist/components/headless/menu/combo/combo-menu.d.ts +5 -0
  114. package/dist/components/headless/menu/combo/combo-menu.js +24 -0
  115. package/dist/components/headless/menu/combo/combo-option.d.ts +9 -0
  116. package/dist/components/headless/menu/combo/combo-option.js +37 -0
  117. package/dist/components/headless/menu/container.d.ts +5 -0
  118. package/dist/components/headless/menu/container.js +19 -0
  119. package/dist/components/headless/menu/dom.d.ts +4 -0
  120. package/dist/components/headless/menu/dom.js +20 -0
  121. package/dist/components/headless/menu/index.d.ts +54 -0
  122. package/dist/components/headless/menu/index.js +39 -0
  123. package/dist/components/headless/menu/item/handle-vertical-navigation.d.ts +2 -0
  124. package/dist/components/headless/menu/item/handle-vertical-navigation.js +28 -0
  125. package/dist/components/headless/menu/item/item.d.ts +9 -0
  126. package/dist/components/headless/menu/item/item.js +45 -0
  127. package/dist/components/headless/menu/item/use-menu-item-events.d.ts +1 -0
  128. package/dist/components/headless/menu/item/use-menu-item-events.js +25 -0
  129. package/dist/components/headless/menu/menu-divider.d.ts +5 -0
  130. package/dist/components/headless/menu/menu-divider.js +6 -0
  131. package/dist/components/headless/menu/menu-group.d.ts +5 -0
  132. package/dist/components/headless/menu/menu-group.js +6 -0
  133. package/dist/components/headless/menu/menu-header.d.ts +5 -0
  134. package/dist/components/headless/menu/menu-header.js +6 -0
  135. package/dist/components/headless/menu/popover.d.ts +5 -0
  136. package/dist/components/headless/menu/popover.js +7 -0
  137. package/dist/components/headless/menu/radio-group/context.d.ts +11 -0
  138. package/dist/components/headless/menu/radio-group/context.js +7 -0
  139. package/dist/components/headless/menu/radio-group/radio-item.d.ts +10 -0
  140. package/dist/components/headless/menu/radio-group/radio-item.js +44 -0
  141. package/dist/components/headless/menu/submenu/submenu-context.d.ts +9 -0
  142. package/dist/components/headless/menu/submenu/submenu-context.js +3 -0
  143. package/dist/components/headless/menu/submenu/submenu-trigger.d.ts +7 -0
  144. package/dist/components/headless/menu/submenu/submenu-trigger.js +70 -0
  145. package/dist/components/headless/menu/submenu/submenu.d.ts +21 -0
  146. package/dist/components/headless/menu/submenu/submenu.js +55 -0
  147. package/dist/components/headless/menu/submenu/use-submenu-position.d.ts +5 -0
  148. package/dist/components/headless/menu/submenu/use-submenu-position.js +31 -0
  149. package/dist/components/headless/menu/use-menu.d.ts +1 -0
  150. package/dist/components/headless/menu/use-menu.js +52 -0
  151. package/dist/components/headless/popover/container.d.ts +5 -0
  152. package/dist/components/headless/popover/container.js +7 -0
  153. package/dist/components/headless/popover/context.d.ts +6 -0
  154. package/dist/components/headless/popover/context.js +3 -0
  155. package/dist/components/headless/popover/index.d.ts +30 -0
  156. package/dist/components/headless/popover/index.js +17 -0
  157. package/dist/components/headless/popover/root.d.ts +6 -0
  158. package/dist/components/headless/popover/root.js +8 -0
  159. package/dist/components/headless/popover/trigger.d.ts +7 -0
  160. package/dist/components/headless/popover/trigger.js +11 -0
  161. package/dist/components/pill-manager/container.d.ts +5 -0
  162. package/dist/components/pill-manager/container.js +127 -0
  163. package/dist/components/pill-manager/expander.d.ts +9 -0
  164. package/dist/components/pill-manager/expander.js +21 -0
  165. package/dist/components/pill-manager/icons.d.ts +12 -0
  166. package/dist/components/pill-manager/icons.js +35 -0
  167. package/dist/components/pill-manager/index.d.ts +33 -0
  168. package/dist/components/pill-manager/index.js +13 -0
  169. package/dist/components/pill-manager/item.d.ts +10 -0
  170. package/dist/components/pill-manager/item.js +178 -0
  171. package/dist/components/pill-manager/label.d.ts +10 -0
  172. package/dist/components/pill-manager/label.js +31 -0
  173. package/dist/components/pill-manager/pill-manager.play.d.ts +3 -0
  174. package/dist/components/pill-manager/pill-manager.play.js +73 -0
  175. package/dist/components/pill-manager/pill-row.context.d.ts +8 -0
  176. package/dist/components/pill-manager/pill-row.context.js +4 -0
  177. package/dist/components/pill-manager/pill-row.d.ts +12 -0
  178. package/dist/components/pill-manager/pill-row.js +22 -0
  179. package/dist/components/pill-manager/root.context.d.ts +40 -0
  180. package/dist/components/pill-manager/root.context.js +4 -0
  181. package/dist/components/pill-manager/root.d.ts +25 -0
  182. package/dist/components/pill-manager/root.js +33 -0
  183. package/dist/components/pill-manager/row-default.d.ts +3 -0
  184. package/dist/components/pill-manager/row-default.js +14 -0
  185. package/dist/components/pill-manager/types.d.ts +21 -0
  186. package/dist/components/pill-manager/types.js +1 -0
  187. package/dist/components/row-group-cell.d.ts +13 -0
  188. package/dist/components/row-group-cell.js +40 -0
  189. package/dist/components/select-all.d.ts +12 -0
  190. package/dist/components/select-all.js +34 -0
  191. package/dist/components/smart-select/chip-context.d.ts +8 -0
  192. package/dist/components/smart-select/chip-context.js +4 -0
  193. package/dist/components/smart-select/chip-remove.d.ts +1 -0
  194. package/dist/components/smart-select/chip-remove.js +13 -0
  195. package/dist/components/smart-select/chip.d.ts +13 -0
  196. package/dist/components/smart-select/chip.js +79 -0
  197. package/dist/components/smart-select/container.d.ts +1 -0
  198. package/dist/components/smart-select/container.js +13 -0
  199. package/dist/components/smart-select/context.d.ts +31 -0
  200. package/dist/components/smart-select/context.js +4 -0
  201. package/dist/components/smart-select/index.d.ts +30 -0
  202. package/dist/components/smart-select/index.js +19 -0
  203. package/dist/components/smart-select/option.d.ts +8 -0
  204. package/dist/components/smart-select/option.js +36 -0
  205. package/dist/components/smart-select/root.d.ts +17 -0
  206. package/dist/components/smart-select/root.js +165 -0
  207. package/dist/components/smart-select/smart-select.play.d.ts +2 -0
  208. package/dist/components/smart-select/smart-select.play.js +36 -0
  209. package/dist/components/smart-select/triggers/basic-trigger.d.ts +1 -0
  210. package/dist/components/smart-select/triggers/basic-trigger.js +18 -0
  211. package/dist/components/smart-select/triggers/combo-trigger.d.ts +1 -0
  212. package/dist/components/smart-select/triggers/combo-trigger.js +17 -0
  213. package/dist/components/smart-select/triggers/is-selectable-option.d.ts +1 -0
  214. package/dist/components/smart-select/triggers/is-selectable-option.js +3 -0
  215. package/dist/components/smart-select/triggers/multi-combo-trigger.d.ts +11 -0
  216. package/dist/components/smart-select/triggers/multi-combo-trigger.js +38 -0
  217. package/dist/components/smart-select/triggers/multi-trigger.d.ts +6 -0
  218. package/dist/components/smart-select/triggers/multi-trigger.js +8 -0
  219. package/dist/components/smart-select/triggers/use-combo-controls.d.ts +9 -0
  220. package/dist/components/smart-select/triggers/use-combo-controls.js +145 -0
  221. package/dist/components/smart-select/triggers/use-trigger-controls.d.ts +5 -0
  222. package/dist/components/smart-select/triggers/use-trigger-controls.js +126 -0
  223. package/dist/components/smart-select/type.d.ts +44 -0
  224. package/dist/components/smart-select/type.js +1 -0
  225. package/dist/components/smart-select/use-async-options.d.ts +8 -0
  226. package/dist/components/smart-select/use-async-options.js +42 -0
  227. package/dist/components/tree-view/index.d.ts +4 -0
  228. package/dist/components/tree-view/index.js +2 -0
  229. package/dist/components/tree-view/root.d.ts +37 -0
  230. package/dist/components/tree-view/root.js +139 -0
  231. package/dist/components/tree-view/select-all.d.ts +7 -0
  232. package/dist/components/tree-view/select-all.js +22 -0
  233. package/dist/components/tree-view/tree-children.d.ts +2 -0
  234. package/dist/components/tree-view/tree-children.js +15 -0
  235. package/dist/components/tree-view/types.d.ts +31 -0
  236. package/dist/components/tree-view/types.js +1 -0
  237. package/dist/components/types.d.ts +4 -0
  238. package/dist/components/types.js +1 -0
  239. package/dist/components/virtual-from-coordinates.d.ts +2 -0
  240. package/dist/components/virtual-from-coordinates.js +15 -0
  241. package/dist/components.d.ts +16 -0
  242. package/dist/components.js +11 -0
  243. package/dist/data-source-client/hooks/get-valid-leafs.d.ts +3 -0
  244. package/dist/data-source-client/hooks/get-valid-leafs.js +11 -0
  245. package/dist/data-source-client/hooks/use-controlled-ds-state.d.ts +13 -0
  246. package/dist/data-source-client/hooks/use-controlled-ds-state.js +39 -0
  247. package/dist/data-source-client/hooks/use-flattened-data.d.ts +18 -0
  248. package/dist/data-source-client/hooks/use-flattened-data.js +40 -0
  249. package/dist/data-source-client/hooks/use-flattened-groups.d.ts +5 -0
  250. package/dist/data-source-client/hooks/use-flattened-groups.js +63 -0
  251. package/dist/data-source-client/hooks/use-flattened-piece.d.ts +14 -0
  252. package/dist/data-source-client/hooks/use-flattened-piece.js +55 -0
  253. package/dist/data-source-client/hooks/use-group-tree/collapse-child.d.ts +2 -0
  254. package/dist/data-source-client/hooks/use-group-tree/collapse-child.js +11 -0
  255. package/dist/data-source-client/hooks/use-group-tree/collapse-last.d.ts +2 -0
  256. package/dist/data-source-client/hooks/use-group-tree/collapse-last.js +14 -0
  257. package/dist/data-source-client/hooks/use-group-tree/collapse.d.ts +2 -0
  258. package/dist/data-source-client/hooks/use-group-tree/collapse.js +17 -0
  259. package/dist/data-source-client/hooks/use-group-tree/use-group-tree.d.ts +31 -0
  260. package/dist/data-source-client/hooks/use-group-tree/use-group-tree.js +152 -0
  261. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/apply-reference-column.d.ts +2 -0
  262. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/apply-reference-column.js +22 -0
  263. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/evaluate-label-filter.d.ts +2 -0
  264. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/evaluate-label-filter.js +9 -0
  265. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths-with-totals.d.ts +18 -0
  266. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths-with-totals.js +140 -0
  267. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths.d.ts +4 -0
  268. package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths.js +31 -0
  269. package/dist/data-source-client/hooks/use-pivot/use-agg-model.d.ts +4 -0
  270. package/dist/data-source-client/hooks/use-pivot/use-agg-model.js +45 -0
  271. package/dist/data-source-client/hooks/use-pivot/use-filtered-data.d.ts +2 -0
  272. package/dist/data-source-client/hooks/use-pivot/use-filtered-data.js +18 -0
  273. package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.d.ts +14 -0
  274. package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.js +151 -0
  275. package/dist/data-source-client/hooks/use-pivot/use-pivot-data.d.ts +32 -0
  276. package/dist/data-source-client/hooks/use-pivot/use-pivot-data.js +83 -0
  277. package/dist/data-source-client/hooks/use-pivot/use-pivot-group-fn.d.ts +4 -0
  278. package/dist/data-source-client/hooks/use-pivot/use-pivot-group-fn.js +23 -0
  279. package/dist/data-source-client/hooks/use-pivot/use-pivot-state.d.ts +16 -0
  280. package/dist/data-source-client/hooks/use-pivot/use-pivot-state.js +40 -0
  281. package/dist/data-source-client/use-client-data-source.d.ts +91 -0
  282. package/dist/data-source-client/use-client-data-source.js +169 -0
  283. package/dist/data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
  284. package/dist/data-source-server/async-tree/+constants.async-tree.js +1 -0
  285. package/dist/data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
  286. package/dist/data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
  287. package/dist/data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
  288. package/dist/data-source-server/async-tree/apply-set-action-to-tree.js +26 -0
  289. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-unique.d.ts +2 -0
  290. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-unique.js +20 -0
  291. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-valid.d.ts +2 -0
  292. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-valid.js +12 -0
  293. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-fit.d.ts +2 -0
  294. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-fit.js +18 -0
  295. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-kinds.d.ts +2 -0
  296. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-kinds.js +12 -0
  297. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action.d.ts +2 -0
  298. package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action.js +24 -0
  299. package/dist/data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
  300. package/dist/data-source-server/async-tree/get-parent-node-by-path.js +18 -0
  301. package/dist/data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
  302. package/dist/data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
  303. package/dist/data-source-server/async-tree/make-async-tree.d.ts +2 -0
  304. package/dist/data-source-server/async-tree/make-async-tree.js +64 -0
  305. package/dist/data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
  306. package/dist/data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
  307. package/dist/data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
  308. package/dist/data-source-server/async-tree/maybe-apply-resize.js +17 -0
  309. package/dist/data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
  310. package/dist/data-source-server/async-tree/maybe-apply-set-action-items.js +54 -0
  311. package/dist/data-source-server/async-tree/types.d.ts +70 -0
  312. package/dist/data-source-server/async-tree/types.js +1 -0
  313. package/dist/data-source-server/range-tree/range-tree.d.ts +66 -0
  314. package/dist/data-source-server/range-tree/range-tree.js +102 -0
  315. package/dist/data-source-server/server-data.d.ts +73 -0
  316. package/dist/data-source-server/server-data.js +553 -0
  317. package/dist/data-source-server/source/use-on-rows-updated.d.ts +4 -0
  318. package/dist/data-source-server/source/use-on-rows-updated.js +29 -0
  319. package/dist/data-source-server/source/use-on-view-change.d.ts +3 -0
  320. package/dist/data-source-server/source/use-on-view-change.js +13 -0
  321. package/dist/data-source-server/source/use-row-add.d.ts +3 -0
  322. package/dist/data-source-server/source/use-row-add.js +36 -0
  323. package/dist/data-source-server/source/use-row-by-id.d.ts +2 -0
  324. package/dist/data-source-server/source/use-row-by-id.js +8 -0
  325. package/dist/data-source-server/source/use-row-by-index.d.ts +9 -0
  326. package/dist/data-source-server/source/use-row-by-index.js +89 -0
  327. package/dist/data-source-server/source/use-row-children.d.ts +2 -0
  328. package/dist/data-source-server/source/use-row-children.js +16 -0
  329. package/dist/data-source-server/source/use-row-delete.d.ts +3 -0
  330. package/dist/data-source-server/source/use-row-delete.js +39 -0
  331. package/dist/data-source-server/source/use-row-id-to-row-index.d.ts +2 -0
  332. package/dist/data-source-server/source/use-row-id-to-row-index.js +7 -0
  333. package/dist/data-source-server/source/use-row-index-to-row-id.d.ts +2 -0
  334. package/dist/data-source-server/source/use-row-index-to-row-id.js +7 -0
  335. package/dist/data-source-server/source/use-row-leafs.d.ts +2 -0
  336. package/dist/data-source-server/source/use-row-leafs.js +20 -0
  337. package/dist/data-source-server/source/use-row-parents.d.ts +2 -0
  338. package/dist/data-source-server/source/use-row-parents.js +16 -0
  339. package/dist/data-source-server/source/use-row-siblings.d.ts +2 -0
  340. package/dist/data-source-server/source/use-row-siblings.js +15 -0
  341. package/dist/data-source-server/source/use-rows-between.d.ts +2 -0
  342. package/dist/data-source-server/source/use-rows-between.js +20 -0
  343. package/dist/data-source-server/source/use-source-state.d.ts +28 -0
  344. package/dist/data-source-server/source/use-source-state.js +47 -0
  345. package/dist/data-source-server/source/use-source.d.ts +5 -0
  346. package/dist/data-source-server/source/use-source.js +66 -0
  347. package/dist/data-source-server/types.d.ts +42 -0
  348. package/dist/data-source-server/types.js +1 -0
  349. package/dist/data-source-server/use-server-data-source.d.ts +51 -0
  350. package/dist/data-source-server/use-server-data-source.js +192 -0
  351. package/dist/data-source-server/utils/get-node-depth.d.ts +2 -0
  352. package/dist/data-source-server/utils/get-node-depth.js +9 -0
  353. package/dist/data-source-server/utils/get-node-path.d.ts +2 -0
  354. package/dist/data-source-server/utils/get-node-path.js +9 -0
  355. package/dist/data-source-server/utils/get-request-id.d.ts +1 -0
  356. package/dist/data-source-server/utils/get-request-id.js +6 -0
  357. package/dist/data-source-tree/source/use-controlled-state.d.ts +8 -0
  358. package/dist/data-source-tree/source/use-controlled-state.js +21 -0
  359. package/dist/data-source-tree/source/use-flattened.d.ts +17 -0
  360. package/dist/data-source-tree/source/use-flattened.js +65 -0
  361. package/dist/data-source-tree/source/use-on-rows-updated.d.ts +3 -0
  362. package/dist/data-source-tree/source/use-on-rows-updated.js +49 -0
  363. package/dist/data-source-tree/source/use-row-by-id.d.ts +2 -0
  364. package/dist/data-source-tree/source/use-row-by-id.js +7 -0
  365. package/dist/data-source-tree/source/use-row-children.d.ts +2 -0
  366. package/dist/data-source-tree/source/use-row-children.js +11 -0
  367. package/dist/data-source-tree/source/use-row-leafs.d.ts +2 -0
  368. package/dist/data-source-tree/source/use-row-leafs.js +20 -0
  369. package/dist/data-source-tree/source/use-row-parents.d.ts +2 -0
  370. package/dist/data-source-tree/source/use-row-parents.js +16 -0
  371. package/dist/data-source-tree/source/use-row-siblings.d.ts +2 -0
  372. package/dist/data-source-tree/source/use-row-siblings.js +12 -0
  373. package/dist/data-source-tree/source/use-tree.d.ts +3 -0
  374. package/dist/data-source-tree/source/use-tree.js +59 -0
  375. package/dist/data-source-tree/types.d.ts +16 -0
  376. package/dist/data-source-tree/types.js +1 -0
  377. package/dist/data-source-tree/use-tree-data-source.d.ts +41 -0
  378. package/dist/data-source-tree/use-tree-data-source.js +101 -0
  379. package/dist/data-source-tree/utils/is-object.d.ts +1 -0
  380. package/dist/data-source-tree/utils/is-object.js +3 -0
  381. package/dist/hooks/use-slot/get-element-ref.d.ts +2 -0
  382. package/dist/hooks/use-slot/get-element-ref.js +20 -0
  383. package/dist/hooks/use-slot/index.d.ts +3 -0
  384. package/dist/hooks/use-slot/index.js +1 -0
  385. package/dist/hooks/use-slot/merge-props.d.ts +4 -0
  386. package/dist/hooks/use-slot/merge-props.js +27 -0
  387. package/dist/hooks/use-slot/react-version.d.ts +3 -0
  388. package/dist/hooks/use-slot/react-version.js +5 -0
  389. package/dist/hooks/use-slot/types.d.ts +4 -0
  390. package/dist/hooks/use-slot/types.js +1 -0
  391. package/dist/hooks/use-slot/use-slot.d.ts +12 -0
  392. package/dist/hooks/use-slot/use-slot.js +28 -0
  393. package/dist/hooks/use-transitioned-open.d.ts +2 -0
  394. package/dist/hooks/use-transitioned-open.js +50 -0
  395. package/dist/index.d.ts +121 -0
  396. package/dist/index.js +23 -0
  397. package/dist/license/index.d.ts +1 -0
  398. package/dist/license/index.js +1 -0
  399. package/dist/license/license.d.ts +3 -0
  400. package/dist/license/license.js +215 -0
  401. package/dist/license/md5-hash.d.ts +9 -0
  402. package/dist/license/md5-hash.js +167 -0
  403. package/dist/license.d.ts +3 -0
  404. package/dist/license.js +214 -0
  405. package/dist/root/context.d.ts +16 -0
  406. package/dist/root/context.js +4 -0
  407. package/dist/root/hooks/use-pro-api.d.ts +2 -0
  408. package/dist/root/hooks/use-pro-api.js +8 -0
  409. package/dist/root/root.d.ts +15 -0
  410. package/dist/root/root.js +112 -0
  411. package/dist/types/api.d.ts +100 -0
  412. package/dist/types/api.js +1 -0
  413. package/dist/types/column.d.ts +73 -0
  414. package/dist/types/column.js +1 -0
  415. package/dist/types/events.d.ts +56 -0
  416. package/dist/types/events.js +1 -0
  417. package/dist/types/grid.d.ts +47 -0
  418. package/dist/types/grid.js +1 -0
  419. package/dist/types/index.d.ts +7 -0
  420. package/dist/types/index.js +1 -0
  421. package/dist/types/props.d.ts +187 -0
  422. package/dist/types/props.js +1 -0
  423. package/package.json +5 -5
@@ -0,0 +1,73 @@
1
+ import { dataRectFromCellPosition } from "./data-rect-from-cell-position.js";
2
+ import { isOverlappingRect } from "./is-overlapping-rect.js";
3
+ import { isFullyWithinRect } from "./is-fully-within-rect.js";
4
+ export function expandSelectionStart(api, selections, setSelections, meta, position, excludeMarker, view) {
5
+ const pos = dataRectFromCellPosition(position);
6
+ const rect = selections.at(-1);
7
+ if (!rect || !isOverlappingRect(rect, pos) || isFullyWithinRect(pos, rect))
8
+ return;
9
+ const first = excludeMarker ? 1 : 0;
10
+ if (meta) {
11
+ const next = { ...rect, columnStart: first, columnEnd: pos.columnStart + 1 };
12
+ const nextSelections = [...selections];
13
+ nextSelections[nextSelections.length - 1] = next;
14
+ setSelections(nextSelections);
15
+ if (pos.columnStart !== view.visibleColumns.length - 1)
16
+ api.scrollIntoView({ column: first });
17
+ return;
18
+ }
19
+ const isAtEdge = pos.columnStart == rect.columnStart || pos.columnEnd === rect.columnEnd;
20
+ let pivotStart = pos.columnStart;
21
+ let pivotEnd = pos.columnEnd;
22
+ // Our cell some how is spanned over. so for the current rowIndex, find the maximum span along the columns
23
+ if (!isAtEdge) {
24
+ for (let i = rect.rowStart; i < rect.rowEnd; i++) {
25
+ const cell = dataRectFromCellPosition(api.cellRoot(pos.columnStart, i));
26
+ pivotStart = Math.min(pivotStart, cell.columnStart);
27
+ pivotEnd = Math.max(pivotEnd, cell.columnEnd);
28
+ }
29
+ }
30
+ let next;
31
+ if (rect.columnEnd <= pivotEnd) {
32
+ if (rect.columnStart === first)
33
+ return;
34
+ let highestColEnd = -Infinity;
35
+ let setCell = rect;
36
+ for (let i = rect.rowStart; i < rect.rowEnd; i++) {
37
+ const cell = dataRectFromCellPosition(api.cellRoot(i, rect.columnStart - 1));
38
+ if (cell.columnStart > highestColEnd) {
39
+ highestColEnd = cell.columnStart;
40
+ setCell = cell;
41
+ }
42
+ }
43
+ next = {
44
+ ...rect,
45
+ columnStart: highestColEnd,
46
+ rowStart: Math.min(setCell.rowStart, rect.rowStart),
47
+ rowEnd: Math.max(setCell.rowEnd, rect.rowEnd),
48
+ };
49
+ api.scrollIntoView({ column: highestColEnd });
50
+ }
51
+ else {
52
+ let highestColEnd = -Infinity;
53
+ let setCell = rect;
54
+ for (let i = rect.rowStart; i < rect.rowEnd; i++) {
55
+ const cell = dataRectFromCellPosition(api.cellRoot(i, rect.columnEnd - 1));
56
+ if (cell.columnStart > highestColEnd) {
57
+ highestColEnd = cell.columnStart;
58
+ setCell = cell;
59
+ }
60
+ }
61
+ next = {
62
+ ...rect,
63
+ columnEnd: highestColEnd,
64
+ rowStart: Math.min(setCell.rowStart, rect.rowStart),
65
+ rowEnd: Math.max(setCell.rowEnd, rect.rowEnd),
66
+ };
67
+ api.scrollIntoView({ column: highestColEnd - 1 });
68
+ }
69
+ const nextSelections = [...selections];
70
+ nextSelections[nextSelections.length - 1] = next;
71
+ setSelections(nextSelections);
72
+ return;
73
+ }
@@ -0,0 +1,3 @@
1
+ import type { PositionGridCell } from "@1771technologies/lytenyte-shared";
2
+ import type { API, DataRect } from "../types/api.js";
3
+ export declare function expandSelectionUp(api: API, selections: DataRect[], setSelections: (d: DataRect[]) => void, meta: boolean, position: PositionGridCell, rowCount: number): void;
@@ -0,0 +1,74 @@
1
+ import { dataRectFromCellPosition } from "./data-rect-from-cell-position.js";
2
+ import { isOverlappingRect } from "./is-overlapping-rect.js";
3
+ import { isFullyWithinRect } from "./is-fully-within-rect.js";
4
+ export function expandSelectionUp(api, selections, setSelections, meta, position, rowCount) {
5
+ const pos = dataRectFromCellPosition(position);
6
+ const rect = selections.at(-1);
7
+ if (!rect || !isOverlappingRect(rect, pos) || isFullyWithinRect(pos, rect))
8
+ return;
9
+ if (meta) {
10
+ const next = { ...rect, rowStart: 0, rowEnd: pos.rowStart + 1 };
11
+ const nextSelections = [...selections];
12
+ nextSelections[nextSelections.length - 1] = next;
13
+ setSelections(nextSelections);
14
+ if (pos.rowStart !== rowCount - 1)
15
+ api.scrollIntoView({ row: 0 });
16
+ return;
17
+ }
18
+ const isAtEdge = pos.rowStart == rect.rowStart || pos.rowEnd === rect.rowEnd;
19
+ let pivotStart = pos.rowStart;
20
+ let pivotEnd = pos.rowEnd;
21
+ // Our cell some how is spanned over. so for the current rowIndex, find the maximum span along the columns
22
+ if (!isAtEdge) {
23
+ for (let i = rect.columnStart; i < rect.columnEnd; i++) {
24
+ const cell = dataRectFromCellPosition(api.cellRoot(pos.rowStart, i));
25
+ pivotStart = Math.min(pivotStart, cell.rowStart);
26
+ pivotEnd = Math.max(pivotEnd, cell.rowEnd);
27
+ }
28
+ }
29
+ let next;
30
+ if (rect.rowEnd > pivotEnd) {
31
+ let lowestRowStart = Infinity;
32
+ let c = rect;
33
+ for (let i = rect.columnStart; i < rect.columnEnd; i++) {
34
+ const cell = dataRectFromCellPosition(api.cellRoot(rect.rowEnd - 1, i));
35
+ lowestRowStart = Math.min(cell.rowStart, lowestRowStart);
36
+ if (cell.rowStart < lowestRowStart) {
37
+ lowestRowStart = cell.rowStart;
38
+ c = cell;
39
+ }
40
+ }
41
+ api.scrollIntoView({ row: lowestRowStart - 1 });
42
+ next = {
43
+ ...rect,
44
+ rowEnd: lowestRowStart,
45
+ columnStart: Math.min(c.columnStart, rect.columnStart),
46
+ columnEnd: Math.max(c.columnEnd, rect.columnEnd),
47
+ };
48
+ }
49
+ else {
50
+ if (rect.rowStart === 0)
51
+ return;
52
+ let lowestRowStart = Infinity;
53
+ let c = rect;
54
+ for (let i = rect.columnStart; i < rect.columnEnd; i++) {
55
+ const cell = dataRectFromCellPosition(api.cellRoot(rect.rowStart - 1, i));
56
+ lowestRowStart = Math.min(cell.rowStart, lowestRowStart);
57
+ if (cell.rowStart < lowestRowStart) {
58
+ lowestRowStart = cell.rowStart;
59
+ c = cell;
60
+ }
61
+ }
62
+ api.scrollIntoView({ row: lowestRowStart });
63
+ next = {
64
+ ...rect,
65
+ rowStart: lowestRowStart,
66
+ columnStart: Math.min(c.columnStart, rect.columnStart),
67
+ columnEnd: Math.max(c.columnEnd, rect.columnEnd),
68
+ };
69
+ }
70
+ const nextSelections = [...selections];
71
+ nextSelections[nextSelections.length - 1] = next;
72
+ setSelections(nextSelections);
73
+ return;
74
+ }
@@ -0,0 +1,2 @@
1
+ import type { ColumnView } from "@1771technologies/lytenyte-shared";
2
+ export declare function fullWidthStartEndIndex(view: ColumnView): number[];
@@ -0,0 +1,4 @@
1
+ export function fullWidthStartEndIndex(view) {
2
+ const lastIndex = view.visibleColumns.length;
3
+ return [0, lastIndex];
4
+ }
@@ -0,0 +1,3 @@
1
+ import type { PositionGridCell } from "@1771technologies/lytenyte-shared";
2
+ import type { API } from "../types/api.js";
3
+ export declare const getRootCell: (cellRoot: API["cellRoot"], rowIndex: number, columnIndex: number) => PositionGridCell["root"];
@@ -0,0 +1,6 @@
1
+ export const getRootCell = (cellRoot, rowIndex, columnIndex) => {
2
+ const c = cellRoot(rowIndex, columnIndex);
3
+ if (!c || c.kind === "full-width")
4
+ return null;
5
+ return c.root;
6
+ };
@@ -0,0 +1,13 @@
1
+ export { isWithinSelectionRect } from "./is-within-selection-rect.js";
2
+ export { splitCellSelectionRect } from "./split-cell-selection-rect.js";
3
+ export { boundSelectionRect } from "./bound-selection-rect.js";
4
+ export { fullWidthStartEndIndex } from "./full-width-start-end-index.js";
5
+ export { areRectsEqual } from "./are-rects-equal.js";
6
+ export { deselectRectRange } from "./deselect-rect-range.js";
7
+ export { updateAdditiveCellSelection } from "./update-additive-cell-selection.js";
8
+ export { isBottomRect } from "./is-bottom-rect.js";
9
+ export { isCenterRect } from "./is-center-rect.js";
10
+ export { isTopRect } from "./is-top-rect.js";
11
+ export { isCenterColRect } from "./is-center-col-rect.js";
12
+ export { isStartRect } from "./is-start-rect.js";
13
+ export { isEndRect } from "./is-end-rect.js";
@@ -0,0 +1,13 @@
1
+ export { isWithinSelectionRect } from "./is-within-selection-rect.js";
2
+ export { splitCellSelectionRect } from "./split-cell-selection-rect.js";
3
+ export { boundSelectionRect } from "./bound-selection-rect.js";
4
+ export { fullWidthStartEndIndex } from "./full-width-start-end-index.js";
5
+ export { areRectsEqual } from "./are-rects-equal.js";
6
+ export { deselectRectRange } from "./deselect-rect-range.js";
7
+ export { updateAdditiveCellSelection } from "./update-additive-cell-selection.js";
8
+ export { isBottomRect } from "./is-bottom-rect.js";
9
+ export { isCenterRect } from "./is-center-rect.js";
10
+ export { isTopRect } from "./is-top-rect.js";
11
+ export { isCenterColRect } from "./is-center-col-rect.js";
12
+ export { isStartRect } from "./is-start-rect.js";
13
+ export { isEndRect } from "./is-end-rect.js";
@@ -0,0 +1,2 @@
1
+ import type { DataRect } from "../types/api.js";
2
+ export declare function isBottomRect(rowCount: number, botCount: number, rect: DataRect): boolean;
@@ -0,0 +1,4 @@
1
+ export function isBottomRect(rowCount, botCount, rect) {
2
+ const bottomStart = rowCount - botCount;
3
+ return rect.rowStart >= bottomStart;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { ColumnView } from "@1771technologies/lytenyte-shared";
2
+ export declare function isCenterColRect(view: ColumnView, rect: {
3
+ columnStart: number;
4
+ columnEnd: number;
5
+ }): boolean;
@@ -0,0 +1,3 @@
1
+ export function isCenterColRect(view, rect) {
2
+ return rect.columnStart >= view.startCount && rect.columnStart < view.centerCount + view.startCount;
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { DataRect } from "../types/api";
2
+ export declare function isCenterRect(rowCount: number, rowBottomCount: number, rowTopCount: number, rect: DataRect): boolean;
@@ -0,0 +1,4 @@
1
+ export function isCenterRect(rowCount, rowBottomCount, rowTopCount, rect) {
2
+ const bottomStart = rowCount - rowBottomCount;
3
+ return rect.rowStart < bottomStart && rect.rowStart >= rowTopCount;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { ColumnView } from "@1771technologies/lytenyte-shared";
2
+ export declare function isEndRect(view: ColumnView, rect: {
3
+ columnStart: number;
4
+ columnEnd: number;
5
+ }): boolean;
@@ -0,0 +1,3 @@
1
+ export function isEndRect(view, rect) {
2
+ return rect.columnStart >= view.startCount + view.centerCount;
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { DataRect } from "../types";
2
+ export declare function isFullyWithinRect(pos: DataRect, rect: DataRect): boolean;
@@ -0,0 +1,6 @@
1
+ export function isFullyWithinRect(pos, rect) {
2
+ return (pos.rowStart !== rect.rowStart &&
3
+ pos.rowEnd !== rect.rowEnd &&
4
+ pos.columnStart !== rect.columnStart &&
5
+ pos.columnEnd !== rect.columnEnd);
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { DataRect } from "../types/api.js";
2
+ export declare function isOverlappingRect(a: DataRect, b: DataRect): boolean;
@@ -0,0 +1,5 @@
1
+ export function isOverlappingRect(a, b) {
2
+ const rowsOverlap = a.rowStart < b.rowEnd && b.rowStart < a.rowEnd;
3
+ const columnsOverlap = a.columnStart < b.columnEnd && b.columnStart < a.columnEnd;
4
+ return rowsOverlap && columnsOverlap;
5
+ }
@@ -0,0 +1,5 @@
1
+ import type { ColumnView } from "@1771technologies/lytenyte-shared";
2
+ export declare function isStartRect(view: ColumnView, rect: {
3
+ columnStart: number;
4
+ columnEnd: number;
5
+ }): boolean;
@@ -0,0 +1,3 @@
1
+ export function isStartRect(view, rect) {
2
+ return rect.columnStart < view.startCount;
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { DataRect } from "../types/api.js";
2
+ export declare function isTopRect(topCount: number, rect: DataRect): boolean;
@@ -0,0 +1,3 @@
1
+ export function isTopRect(topCount, rect) {
2
+ return rect.rowStart < topCount;
3
+ }
@@ -0,0 +1,2 @@
1
+ import type { DataRect } from "../types/api.js";
2
+ export declare function isWithinSelectionRect(rect: DataRect, r: number, c: number): boolean;
@@ -0,0 +1,3 @@
1
+ export function isWithinSelectionRect(rect, r, c) {
2
+ return r >= rect.rowStart && r < rect.rowEnd && c >= rect.columnStart && c < rect.columnEnd;
3
+ }
@@ -0,0 +1,47 @@
1
+ import type { DataRect } from "../types/api.js";
2
+ interface SplitCellSelectionRectArgs {
3
+ readonly rect: DataRect;
4
+ readonly colStartCount: number;
5
+ readonly colCenterCount: number;
6
+ readonly rowTopCount: number;
7
+ readonly rowCenterCount: number;
8
+ readonly isDeselect?: boolean;
9
+ }
10
+ export interface DataRectSplit extends DataRect {
11
+ readonly isUnit: boolean;
12
+ readonly borderTop?: boolean;
13
+ readonly borderBottom?: boolean;
14
+ readonly borderStart?: boolean;
15
+ readonly borderEnd?: boolean;
16
+ }
17
+ /**
18
+ * Splits a cell selection rectangle into multiple rectangles when it crosses specified boundary regions.
19
+ * This is useful for handling selections that span across different grid sections (e.g., fixed columns/rows,
20
+ * scrollable areas).
21
+ *
22
+ * The splitting process happens in two phases:
23
+ * 1. Column-wise splitting: Splits rectangles that cross column section boundaries
24
+ * 2. Row-wise splitting: Further splits the resulting rectangles if they cross row section boundaries
25
+ *
26
+ * Splitting does not support full width rows. It is assumed that if full width rows are present then
27
+ * the cell selection will just be drawn over them
28
+ *
29
+ * @example
30
+ * // For a grid with 2 fixed start columns and 1 fixed top row:
31
+ * const splits = splitCellSelectionRect({
32
+ * rect: { columnStart: 0, columnEnd: 3, rowStart: 0, rowEnd: 2 },
33
+ * colStartCount: 2, // Number of fixed start columns
34
+ * colCenterCount: 10, // Number of scrollable columns
35
+ * rowTopCount: 1, // Number of fixed top rows
36
+ * rowCenterCount: 50 // Number of scrollable rows
37
+ * });
38
+ *
39
+ * @param rect - The original cell selection rectangle to split
40
+ * @param colStartCount - Number of columns in the start (usually fixed) section
41
+ * @param colCenterCount - Number of columns in the center (usually scrollable) section
42
+ * @param rowTopCount - Number of rows in the top (usually fixed) section
43
+ * @param rowCenterCount - Number of rows in the center (usually scrollable) section
44
+ * @returns An array of split rectangles. If no splits were necessary, returns an array with just the original rectangle
45
+ */
46
+ export declare function splitCellSelectionRect({ rect, colStartCount, colCenterCount, rowTopCount, rowCenterCount, }: SplitCellSelectionRectArgs): DataRectSplit[];
47
+ export {};
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Splits a cell selection rectangle into multiple rectangles when it crosses specified boundary regions.
3
+ * This is useful for handling selections that span across different grid sections (e.g., fixed columns/rows,
4
+ * scrollable areas).
5
+ *
6
+ * The splitting process happens in two phases:
7
+ * 1. Column-wise splitting: Splits rectangles that cross column section boundaries
8
+ * 2. Row-wise splitting: Further splits the resulting rectangles if they cross row section boundaries
9
+ *
10
+ * Splitting does not support full width rows. It is assumed that if full width rows are present then
11
+ * the cell selection will just be drawn over them
12
+ *
13
+ * @example
14
+ * // For a grid with 2 fixed start columns and 1 fixed top row:
15
+ * const splits = splitCellSelectionRect({
16
+ * rect: { columnStart: 0, columnEnd: 3, rowStart: 0, rowEnd: 2 },
17
+ * colStartCount: 2, // Number of fixed start columns
18
+ * colCenterCount: 10, // Number of scrollable columns
19
+ * rowTopCount: 1, // Number of fixed top rows
20
+ * rowCenterCount: 50 // Number of scrollable rows
21
+ * });
22
+ *
23
+ * @param rect - The original cell selection rectangle to split
24
+ * @param colStartCount - Number of columns in the start (usually fixed) section
25
+ * @param colCenterCount - Number of columns in the center (usually scrollable) section
26
+ * @param rowTopCount - Number of rows in the top (usually fixed) section
27
+ * @param rowCenterCount - Number of rows in the center (usually scrollable) section
28
+ * @returns An array of split rectangles. If no splits were necessary, returns an array with just the original rectangle
29
+ */
30
+ export function splitCellSelectionRect({ rect, colStartCount, colCenterCount, rowTopCount, rowCenterCount, }) {
31
+ // Calculate the boundary positions for columns
32
+ const colStartBound = colStartCount;
33
+ const colEndBound = colStartCount + colCenterCount;
34
+ const isUnit = rect.rowEnd - rect.rowStart === 1 && rect.columnEnd - rect.columnStart === 1;
35
+ const colSplits = [];
36
+ // Handle column splits first
37
+ // Case 1: Selection starts before the fixed columns and extends into the scrollable area
38
+ if (rect.columnStart < colStartBound && rect.columnEnd > colStartBound) {
39
+ const startSplit = {
40
+ ...rect,
41
+ columnEnd: colStartBound,
42
+ isUnit,
43
+ };
44
+ colSplits.push(startSplit);
45
+ rect = { ...rect, columnStart: colStartBound };
46
+ }
47
+ // Case 2: Selection starts in the scrollable area and extends into the end section
48
+ if (rect.columnStart < colEndBound && rect.columnEnd > colEndBound) {
49
+ const endSplit = {
50
+ ...rect,
51
+ columnStart: colEndBound,
52
+ isUnit,
53
+ };
54
+ rect = { ...rect, columnEnd: colEndBound };
55
+ colSplits.push(endSplit);
56
+ }
57
+ // Add the remaining rectangle after column splits
58
+ colSplits.push({ ...rect, isUnit });
59
+ // Calculate the boundary positions for rows
60
+ const topBound = rowTopCount;
61
+ const bottomBound = rowTopCount + rowCenterCount;
62
+ // Process row splits for each column-split rectangle
63
+ const rowSplits = [];
64
+ for (let split of colSplits) {
65
+ // Case 1: Selection spans from top section into center section
66
+ if (split.rowStart < topBound && split.rowEnd > topBound) {
67
+ const topSplit = { ...split, rowEnd: topBound, isUnit };
68
+ split = { ...split, rowStart: topBound };
69
+ rowSplits.push(topSplit);
70
+ }
71
+ // Case 2: Selection spans from center section into bottom section
72
+ if (split.rowStart < bottomBound && split.rowEnd > bottomBound) {
73
+ const bottomSplit = {
74
+ ...split,
75
+ rowStart: bottomBound,
76
+ isUnit,
77
+ };
78
+ split = { ...split, rowEnd: bottomBound };
79
+ rowSplits.push(bottomSplit);
80
+ }
81
+ rowSplits.push(split);
82
+ }
83
+ return rowSplits
84
+ .map((c) => ({ ...c, borderTop: true, borderBottom: true, borderEnd: true, borderStart: true }))
85
+ .sort((l, r) => {
86
+ return l.rowStart - r.rowStart || l.columnStart - r.columnStart;
87
+ });
88
+ }
@@ -0,0 +1,3 @@
1
+ import type { DataRectSplit } from "./split-cell-selection-rect";
2
+ import type { DataRect } from "../types/api.js";
3
+ export declare function splitOnPivot(rect: DataRectSplit, pivot: DataRect): DataRectSplit[] | null;
@@ -0,0 +1,50 @@
1
+ import { areRectsEqual } from "./are-rects-equal.js";
2
+ export function splitOnPivot(rect, pivot) {
3
+ if (rect.isUnit || areRectsEqual(rect, pivot))
4
+ return null;
5
+ const splits = [];
6
+ const isAfter = pivot.columnStart > rect.columnStart;
7
+ const isSame = pivot.columnStart === rect.columnStart && pivot.columnEnd === rect.columnEnd;
8
+ // The pivot is on the right side of the rect. So we split by end
9
+ if (isAfter) {
10
+ const split = { ...rect, columnEnd: rect.columnEnd - 1, borderEnd: false };
11
+ if (split.columnStart !== split.columnEnd)
12
+ splits.push(split);
13
+ }
14
+ else {
15
+ const split = {
16
+ ...rect,
17
+ columnStart: rect.columnStart + 1,
18
+ borderStart: false,
19
+ };
20
+ if (split.columnStart !== split.columnEnd)
21
+ splits.push(split);
22
+ }
23
+ if (pivot.rowStart > rect.rowStart) {
24
+ const split = {
25
+ ...rect,
26
+ columnStart: pivot.columnStart,
27
+ columnEnd: pivot.columnEnd,
28
+ rowEnd: rect.rowEnd - 1,
29
+ borderBottom: false,
30
+ borderStart: !isAfter,
31
+ borderEnd: isSame || isAfter,
32
+ };
33
+ if (split.rowStart !== split.rowEnd)
34
+ splits.push(split);
35
+ }
36
+ else {
37
+ const split = {
38
+ ...rect,
39
+ columnStart: pivot.columnStart,
40
+ columnEnd: pivot.columnEnd,
41
+ rowStart: rect.rowStart + 1,
42
+ borderTop: false,
43
+ borderStart: !isAfter,
44
+ borderEnd: isSame || isAfter,
45
+ };
46
+ if (split.rowStart !== split.rowEnd)
47
+ splits.push(split);
48
+ }
49
+ return splits;
50
+ }
@@ -0,0 +1,4 @@
1
+ import { type DataRectSplit } from "./split-cell-selection-rect.js";
2
+ import type { ColumnView } from "@1771technologies/lytenyte-shared";
3
+ import type { API, DataRect } from "../types/api.js";
4
+ export declare function updateAdditiveCellSelection(api: API, view: ColumnView, rowTopCount: number, rowCount: number, rowBottomCount: number, rect: DataRect, cellSelectionAdditiveRects: DataRectSplit[] | null, setSelectionAdditiveRects: (d: DataRectSplit[] | null) => void): void;
@@ -0,0 +1,21 @@
1
+ import { boundSelectionRect } from "./bound-selection-rect.js";
2
+ import { adjustRectForRowAndCellSpan } from "./adjust-rect-for-row-and-cell-span.js";
3
+ import { areRectsEqual } from "./are-rects-equal.js";
4
+ import { splitCellSelectionRect } from "./split-cell-selection-rect.js";
5
+ export function updateAdditiveCellSelection(api, view, rowTopCount, rowCount, rowBottomCount, rect, cellSelectionAdditiveRects, setSelectionAdditiveRects) {
6
+ const s = view;
7
+ const adjustedRect = adjustRectForRowAndCellSpan(api.cellRoot, rect);
8
+ const rects = splitCellSelectionRect({
9
+ rect: boundSelectionRect(view, rowCount, adjustedRect),
10
+ colCenterCount: s.centerCount,
11
+ colStartCount: s.startCount,
12
+ rowCenterCount: rowCount - rowTopCount - rowBottomCount,
13
+ rowTopCount: rowTopCount,
14
+ });
15
+ const current = cellSelectionAdditiveRects;
16
+ if (current && current.length === rects.length) {
17
+ if (current.every((c, i) => areRectsEqual(c, rects[i])))
18
+ return;
19
+ }
20
+ setSelectionAdditiveRects(rects);
21
+ }
@@ -0,0 +1,6 @@
1
+ export declare function useEdgeScroll(): {
2
+ cancelX: () => void;
3
+ edgeScrollX: (visualPositionX: number, isRtl: boolean) => void;
4
+ cancelY: () => void;
5
+ edgeScrollY: (visualPositionY: number, startY: number) => void;
6
+ };
@@ -0,0 +1,71 @@
1
+ import { useRoot } from "@1771technologies/lytenyte-core/internal";
2
+ import { useCallback, useRef } from "react";
3
+ export function useEdgeScroll() {
4
+ const { viewport, dimensions, totalHeaderHeight, yPositions, source } = useRoot();
5
+ const rowTopCount = source.useTopCount();
6
+ const rowBottomCount = source.useBottomCount();
7
+ const bottomHeight = yPositions.at(-1) - yPositions.at(-1 - rowBottomCount);
8
+ const topHeight = yPositions.at(rowTopCount);
9
+ const intervalIdX = useRef(null);
10
+ const intervalIdY = useRef(null);
11
+ const cancelX = useCallback(() => {
12
+ if (intervalIdX.current) {
13
+ clearInterval(intervalIdX.current);
14
+ intervalIdX.current = null;
15
+ }
16
+ }, []);
17
+ const cancelY = useCallback(() => {
18
+ if (intervalIdY.current) {
19
+ clearInterval(intervalIdY.current);
20
+ intervalIdY.current = null;
21
+ }
22
+ }, []);
23
+ const edgeScrollY = useCallback((visualPositionY, startY) => {
24
+ if (!viewport)
25
+ return;
26
+ const viewportClientHeight = dimensions.innerHeight;
27
+ const topBound = totalHeaderHeight + topHeight;
28
+ const botBound = viewportClientHeight - bottomHeight;
29
+ const scrollTop = startY > topBound && visualPositionY <= totalHeaderHeight + 20;
30
+ const scrollBottom = startY < botBound && visualPositionY >= viewportClientHeight - 20;
31
+ const speed = 6;
32
+ if (scrollTop && !intervalIdY.current) {
33
+ intervalIdY.current = setInterval(() => {
34
+ viewport.scrollBy({ top: -speed });
35
+ }, 6);
36
+ }
37
+ else if (scrollBottom && !intervalIdY.current) {
38
+ intervalIdY.current = setInterval(() => {
39
+ viewport.scrollBy({ top: speed });
40
+ }, 6);
41
+ }
42
+ if (!scrollBottom && !scrollTop && intervalIdY.current) {
43
+ clearInterval(intervalIdY.current);
44
+ intervalIdY.current = null;
45
+ }
46
+ }, [bottomHeight, dimensions.innerHeight, topHeight, totalHeaderHeight, viewport]);
47
+ const edgeScrollX = useCallback((visualPositionX, isRtl) => {
48
+ if (!viewport)
49
+ return;
50
+ const viewportClientWidth = dimensions.innerWidth;
51
+ const viewportWidth = Math.min(viewportClientWidth * 0.1, 100);
52
+ const buffer = viewportWidth;
53
+ const leftBound = buffer;
54
+ const rightBound = viewportClientWidth - buffer;
55
+ const speed = 3;
56
+ if (visualPositionX < leftBound && !intervalIdX.current) {
57
+ intervalIdX.current = setInterval(() => {
58
+ viewport.scrollBy({ left: isRtl ? speed : -speed });
59
+ }, 6);
60
+ }
61
+ else if (visualPositionX > rightBound && !intervalIdX.current) {
62
+ intervalIdX.current = setInterval(() => {
63
+ viewport.scrollBy({ left: isRtl ? -speed : speed });
64
+ }, 6);
65
+ }
66
+ if (intervalIdX.current && visualPositionX > leftBound && visualPositionX < rightBound) {
67
+ cancelX();
68
+ }
69
+ }, [cancelX, dimensions.innerWidth, viewport]);
70
+ return { cancelX, edgeScrollX, cancelY, edgeScrollY };
71
+ }
@@ -0,0 +1,15 @@
1
+ import { type JSX } from "react";
2
+ import { type SlotComponent } from "../../hooks/use-slot/index.js";
3
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Checkbox.Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ export declare namespace Checkbox {
5
+ type State = {
6
+ readonly indeterminate: boolean;
7
+ readonly checked: boolean;
8
+ };
9
+ type Props = JSX.IntrinsicElements["input"] & {
10
+ readonly indeterminate?: boolean;
11
+ readonly initialChecked?: boolean;
12
+ readonly renderMarker?: SlotComponent<State>;
13
+ readonly onCheckChange?: (b: boolean) => void;
14
+ };
15
+ }