@1771technologies/lytenyte-pro 1.0.19 → 2.0.0-dev.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 (534) hide show
  1. package/css/all-colors.css +8 -0
  2. package/css/components/button.css +176 -0
  3. package/css/components/checkbox.css +54 -0
  4. package/css/components/input.css +64 -0
  5. package/css/components/tree-view.css +108 -0
  6. package/css/components.css +300 -0
  7. package/css/cotton-candy.css +1 -0
  8. package/css/dark.css +1 -0
  9. package/css/design.css +1 -0
  10. package/css/fonts.css +1 -0
  11. package/css/grid-full.css +3 -0
  12. package/css/grid.css +81 -0
  13. package/css/light-dark.css +3 -0
  14. package/css/light.css +1 -0
  15. package/css/pill-manager.css +184 -0
  16. package/css/shadcn-vars.css +1 -0
  17. package/css/shadcn.css +1 -0
  18. package/css/teal.css +1 -0
  19. package/css/term.css +1 -0
  20. package/css/tw.css +1 -0
  21. package/package.json +29 -16
  22. package/dist/+types.d.ts +0 -6177
  23. package/dist/+types.js +0 -1
  24. package/dist/__play__/cell-selections/cell-selection.play.d.ts +0 -5
  25. package/dist/__play__/cell-selections/cell-selection.play.js +0 -80
  26. package/dist/__play__/filter-select/filter-select.play.d.ts +0 -4
  27. package/dist/__play__/filter-select/filter-select.play.js +0 -76
  28. package/dist/__play__/test-utils/bank-data-smaller.d.ts +0 -19
  29. package/dist/__play__/test-utils/bank-data-smaller.js +0 -252
  30. package/dist/__play__/test-utils/row-handler.d.ts +0 -6
  31. package/dist/__play__/test-utils/row-handler.js +0 -32
  32. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +0 -2
  33. package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +0 -43
  34. package/dist/cell-selection/are-rects-equal.d.ts +0 -2
  35. package/dist/cell-selection/are-rects-equal.js +0 -6
  36. package/dist/cell-selection/bound-selection-rect.d.ts +0 -2
  37. package/dist/cell-selection/bound-selection-rect.js +0 -17
  38. package/dist/cell-selection/cell-selection-containers.d.ts +0 -3
  39. package/dist/cell-selection/cell-selection-containers.js +0 -91
  40. package/dist/cell-selection/cell-selection-driver.d.ts +0 -1
  41. package/dist/cell-selection/cell-selection-driver.js +0 -289
  42. package/dist/cell-selection/cell-style-row.d.ts +0 -8
  43. package/dist/cell-selection/cell-style-row.js +0 -84
  44. package/dist/cell-selection/deselect-rect-range.d.ts +0 -2
  45. package/dist/cell-selection/deselect-rect-range.js +0 -43
  46. package/dist/cell-selection/expand-cell-selection-down.d.ts +0 -5
  47. package/dist/cell-selection/expand-cell-selection-down.js +0 -39
  48. package/dist/cell-selection/expand-cell-selection-end.d.ts +0 -5
  49. package/dist/cell-selection/expand-cell-selection-end.js +0 -40
  50. package/dist/cell-selection/expand-cell-selection-start.d.ts +0 -5
  51. package/dist/cell-selection/expand-cell-selection-start.js +0 -39
  52. package/dist/cell-selection/expand-cell-selection-up.d.ts +0 -5
  53. package/dist/cell-selection/expand-cell-selection-up.js +0 -39
  54. package/dist/cell-selection/full-width-start-end-index.d.ts +0 -2
  55. package/dist/cell-selection/full-width-start-end-index.js +0 -5
  56. package/dist/cell-selection/get-root-cell.d.ts +0 -2
  57. package/dist/cell-selection/get-root-cell.js +0 -6
  58. package/dist/cell-selection/index.d.ts +0 -18
  59. package/dist/cell-selection/index.js +0 -18
  60. package/dist/cell-selection/is-bottom-rect.d.ts +0 -2
  61. package/dist/cell-selection/is-bottom-rect.js +0 -7
  62. package/dist/cell-selection/is-center-col-rect.d.ts +0 -5
  63. package/dist/cell-selection/is-center-col-rect.js +0 -5
  64. package/dist/cell-selection/is-center-rect.d.ts +0 -2
  65. package/dist/cell-selection/is-center-rect.js +0 -5
  66. package/dist/cell-selection/is-end-rect.d.ts +0 -5
  67. package/dist/cell-selection/is-end-rect.js +0 -4
  68. package/dist/cell-selection/is-overlapping-rect.d.ts +0 -2
  69. package/dist/cell-selection/is-overlapping-rect.js +0 -6
  70. package/dist/cell-selection/is-start-rect.d.ts +0 -5
  71. package/dist/cell-selection/is-start-rect.js +0 -4
  72. package/dist/cell-selection/is-top-rect.d.ts +0 -2
  73. package/dist/cell-selection/is-top-rect.js +0 -4
  74. package/dist/cell-selection/is-within-selection-rect.d.ts +0 -2
  75. package/dist/cell-selection/is-within-selection-rect.js +0 -3
  76. package/dist/cell-selection/split-cell-selection-rect.d.ts +0 -46
  77. package/dist/cell-selection/split-cell-selection-rect.js +0 -88
  78. package/dist/cell-selection/split-on-pivot.d.ts +0 -3
  79. package/dist/cell-selection/split-on-pivot.js +0 -50
  80. package/dist/cell-selection/update-additive-cell-selection.d.ts +0 -5
  81. package/dist/cell-selection/update-additive-cell-selection.js +0 -23
  82. package/dist/cell-selection/use-edge-scroll.d.ts +0 -10
  83. package/dist/cell-selection/use-edge-scroll.js +0 -66
  84. package/dist/column-manager/branch-lookup-context.d.ts +0 -4
  85. package/dist/column-manager/branch-lookup-context.js +0 -3
  86. package/dist/column-manager/branch.d.ts +0 -15
  87. package/dist/column-manager/branch.js +0 -54
  88. package/dist/column-manager/column-manager.d.ts +0 -13
  89. package/dist/column-manager/column-manager.js +0 -18
  90. package/dist/column-manager/context.d.ts +0 -7
  91. package/dist/column-manager/context.js +0 -3
  92. package/dist/column-manager/label.d.ts +0 -5
  93. package/dist/column-manager/label.js +0 -18
  94. package/dist/column-manager/leaf.d.ts +0 -6
  95. package/dist/column-manager/leaf.js +0 -58
  96. package/dist/column-manager/move-handle.d.ts +0 -5
  97. package/dist/column-manager/move-handle.js +0 -72
  98. package/dist/column-manager/panel.d.ts +0 -1
  99. package/dist/column-manager/panel.js +0 -2
  100. package/dist/column-manager/root.d.ts +0 -8
  101. package/dist/column-manager/root.js +0 -7
  102. package/dist/column-manager/use-column-manager.d.ts +0 -10
  103. package/dist/column-manager/use-column-manager.js +0 -24
  104. package/dist/column-manager/use-columns-from-context.d.ts +0 -3
  105. package/dist/column-manager/use-columns-from-context.js +0 -23
  106. package/dist/column-manager/visibility-checkbox.d.ts +0 -9
  107. package/dist/column-manager/visibility-checkbox.js +0 -30
  108. package/dist/context.d.ts +0 -11
  109. package/dist/context.js +0 -5
  110. package/dist/filter-selects/apply.d.ts +0 -7
  111. package/dist/filter-selects/apply.js +0 -22
  112. package/dist/filter-selects/clear.d.ts +0 -7
  113. package/dist/filter-selects/clear.js +0 -22
  114. package/dist/filter-selects/context.d.ts +0 -13
  115. package/dist/filter-selects/context.js +0 -3
  116. package/dist/filter-selects/filter-combinator.d.ts +0 -10
  117. package/dist/filter-selects/filter-combinator.js +0 -19
  118. package/dist/filter-selects/filter-row-context.d.ts +0 -30
  119. package/dist/filter-selects/filter-row-context.js +0 -3
  120. package/dist/filter-selects/filter-row.d.ts +0 -13
  121. package/dist/filter-selects/filter-row.js +0 -118
  122. package/dist/filter-selects/index.d.ts +0 -22
  123. package/dist/filter-selects/index.js +0 -20
  124. package/dist/filter-selects/is-complete-filter.d.ts +0 -2
  125. package/dist/filter-selects/is-complete-filter.js +0 -5
  126. package/dist/filter-selects/operator-select.d.ts +0 -14
  127. package/dist/filter-selects/operator-select.js +0 -25
  128. package/dist/filter-selects/options.d.ts +0 -9
  129. package/dist/filter-selects/options.js +0 -100
  130. package/dist/filter-selects/reset.d.ts +0 -7
  131. package/dist/filter-selects/reset.js +0 -22
  132. package/dist/filter-selects/root.d.ts +0 -14
  133. package/dist/filter-selects/root.js +0 -5
  134. package/dist/filter-selects/to-filter-item.d.ts +0 -3
  135. package/dist/filter-selects/to-filter-item.js +0 -7
  136. package/dist/filter-selects/use-filter-select.d.ts +0 -38
  137. package/dist/filter-selects/use-filter-select.js +0 -167
  138. package/dist/filter-selects/value-input.d.ts +0 -12
  139. package/dist/filter-selects/value-input.js +0 -27
  140. package/dist/filter-tree/branch.d.ts +0 -13
  141. package/dist/filter-tree/branch.js +0 -21
  142. package/dist/filter-tree/context.d.ts +0 -27
  143. package/dist/filter-tree/context.js +0 -5
  144. package/dist/filter-tree/filter-tree.d.ts +0 -14
  145. package/dist/filter-tree/filter-tree.js +0 -18
  146. package/dist/filter-tree/hooks/use-filter-tree.d.ts +0 -38
  147. package/dist/filter-tree/hooks/use-filter-tree.js +0 -101
  148. package/dist/filter-tree/hooks/use-tree-item.d.ts +0 -8
  149. package/dist/filter-tree/hooks/use-tree-item.js +0 -116
  150. package/dist/filter-tree/inclusion-checkbox.d.ts +0 -9
  151. package/dist/filter-tree/inclusion-checkbox.js +0 -14
  152. package/dist/filter-tree/label.d.ts +0 -5
  153. package/dist/filter-tree/label.js +0 -18
  154. package/dist/filter-tree/leaf.d.ts +0 -6
  155. package/dist/filter-tree/leaf.js +0 -14
  156. package/dist/filter-tree/root.d.ts +0 -13
  157. package/dist/filter-tree/root.js +0 -30
  158. package/dist/grid/cell.d.ts +0 -6
  159. package/dist/grid/cell.js +0 -3
  160. package/dist/grid/dialog-driver.d.ts +0 -1
  161. package/dist/grid/dialog-driver.js +0 -21
  162. package/dist/grid/header-cell.d.ts +0 -10
  163. package/dist/grid/header-cell.js +0 -3
  164. package/dist/grid/header-group-cell.d.ts +0 -6
  165. package/dist/grid/header-group-cell.js +0 -3
  166. package/dist/grid/header-row.d.ts +0 -5
  167. package/dist/grid/header-row.js +0 -2
  168. package/dist/grid/header.d.ts +0 -1
  169. package/dist/grid/header.js +0 -2
  170. package/dist/grid/popover-driver.d.ts +0 -1
  171. package/dist/grid/popover-driver.js +0 -21
  172. package/dist/grid/root.d.ts +0 -8
  173. package/dist/grid/root.js +0 -37
  174. package/dist/grid/row-full-width.d.ts +0 -9
  175. package/dist/grid/row-full-width.js +0 -3
  176. package/dist/grid/row.d.ts +0 -8
  177. package/dist/grid/row.js +0 -3
  178. package/dist/grid/rows-container.d.ts +0 -1
  179. package/dist/grid/rows-container.js +0 -2
  180. package/dist/grid/rows-sections.d.ts +0 -3
  181. package/dist/grid/rows-sections.js +0 -13
  182. package/dist/grid/viewport.d.ts +0 -1
  183. package/dist/grid/viewport.js +0 -9
  184. package/dist/grid-box/+types.d.ts +0 -15
  185. package/dist/grid-box/+types.js +0 -1
  186. package/dist/grid-box/context.d.ts +0 -9
  187. package/dist/grid-box/context.js +0 -3
  188. package/dist/grid-box/grid-box.d.ts +0 -12
  189. package/dist/grid-box/grid-box.js +0 -14
  190. package/dist/grid-box/item.d.ts +0 -10
  191. package/dist/grid-box/item.js +0 -62
  192. package/dist/grid-box/panel.d.ts +0 -1
  193. package/dist/grid-box/panel.js +0 -9
  194. package/dist/grid-box/root.d.ts +0 -9
  195. package/dist/grid-box/root.js +0 -8
  196. package/dist/grid-box/use-aggregation-box-items.d.ts +0 -18
  197. package/dist/grid-box/use-aggregation-box-items.js +0 -61
  198. package/dist/grid-box/use-column-box-items.d.ts +0 -34
  199. package/dist/grid-box/use-column-box-items.js +0 -78
  200. package/dist/grid-box/use-row-group-box-items.d.ts +0 -18
  201. package/dist/grid-box/use-row-group-box-items.js +0 -169
  202. package/dist/grid-provider/context.d.ts +0 -5
  203. package/dist/grid-provider/context.js +0 -2
  204. package/dist/grid-provider/provider.d.ts +0 -3
  205. package/dist/grid-provider/provider.js +0 -2
  206. package/dist/grid-provider/use-grid.d.ts +0 -3
  207. package/dist/grid-provider/use-grid.js +0 -3
  208. package/dist/grid.d.ts +0 -18
  209. package/dist/grid.js +0 -28
  210. package/dist/icons/index.d.ts +0 -1
  211. package/dist/icons/index.js +0 -1
  212. package/dist/index.d.ts +0 -14
  213. package/dist/index.js +0 -14
  214. package/dist/license/index.d.ts +0 -1
  215. package/dist/license/index.js +0 -1
  216. package/dist/license/license.d.ts +0 -3
  217. package/dist/license/license.js +0 -215
  218. package/dist/license/md5-hash.d.ts +0 -9
  219. package/dist/license/md5-hash.js +0 -167
  220. package/dist/license.d.ts +0 -3
  221. package/dist/license.js +0 -214
  222. package/dist/listbox/context.d.ts +0 -6
  223. package/dist/listbox/context.js +0 -3
  224. package/dist/listbox/item.d.ts +0 -1
  225. package/dist/listbox/item.js +0 -25
  226. package/dist/listbox/panel.d.ts +0 -1
  227. package/dist/listbox/panel.js +0 -50
  228. package/dist/listbox/root.d.ts +0 -6
  229. package/dist/listbox/root.js +0 -12
  230. package/dist/row-data-source-client/+constants.d.ts +0 -2
  231. package/dist/row-data-source-client/+constants.js +0 -2
  232. package/dist/row-data-source-client/+types.d.ts +0 -27
  233. package/dist/row-data-source-client/+types.js +0 -1
  234. package/dist/row-data-source-client/built-ins/avg.d.ts +0 -10
  235. package/dist/row-data-source-client/built-ins/avg.js +0 -16
  236. package/dist/row-data-source-client/built-ins/built-ins.d.ts +0 -44
  237. package/dist/row-data-source-client/built-ins/built-ins.js +0 -44
  238. package/dist/row-data-source-client/built-ins/count.d.ts +0 -10
  239. package/dist/row-data-source-client/built-ins/count.js +0 -16
  240. package/dist/row-data-source-client/built-ins/first.d.ts +0 -10
  241. package/dist/row-data-source-client/built-ins/first.js +0 -12
  242. package/dist/row-data-source-client/built-ins/group.d.ts +0 -1
  243. package/dist/row-data-source-client/built-ins/group.js +0 -3
  244. package/dist/row-data-source-client/built-ins/last.d.ts +0 -10
  245. package/dist/row-data-source-client/built-ins/last.js +0 -12
  246. package/dist/row-data-source-client/built-ins/max.d.ts +0 -11
  247. package/dist/row-data-source-client/built-ins/max.js +0 -25
  248. package/dist/row-data-source-client/built-ins/min.d.ts +0 -11
  249. package/dist/row-data-source-client/built-ins/min.js +0 -25
  250. package/dist/row-data-source-client/built-ins/sum.d.ts +0 -10
  251. package/dist/row-data-source-client/built-ins/sum.js +0 -21
  252. package/dist/row-data-source-client/filter/+types.d.ts +0 -23
  253. package/dist/row-data-source-client/filter/+types.js +0 -1
  254. package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +0 -2
  255. package/dist/row-data-source-client/filter/compute-filtered-rows.js +0 -109
  256. package/dist/row-data-source-client/pivots/create-agg-model.d.ts +0 -6
  257. package/dist/row-data-source-client/pivots/create-agg-model.js +0 -13
  258. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +0 -2
  259. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +0 -50
  260. package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +0 -2
  261. package/dist/row-data-source-client/pivots/create-pivot-columns.js +0 -22
  262. package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +0 -2
  263. package/dist/row-data-source-client/pivots/create-pivot-tree.js +0 -23
  264. package/dist/row-data-source-client/tree/client-tree.d.ts +0 -18
  265. package/dist/row-data-source-client/tree/client-tree.js +0 -76
  266. package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +0 -2
  267. package/dist/row-data-source-client/tree/evaluator-aggregation.js +0 -8
  268. package/dist/row-data-source-client/tree/evaluator-group.d.ts +0 -2
  269. package/dist/row-data-source-client/tree/evaluator-group.js +0 -9
  270. package/dist/row-data-source-client/tree/traverse.d.ts +0 -2
  271. package/dist/row-data-source-client/tree/traverse.js +0 -22
  272. package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +0 -10
  273. package/dist/row-data-source-client/use-client-data-source-paginated.js +0 -573
  274. package/dist/row-data-source-client/use-client-data-source.d.ts +0 -10
  275. package/dist/row-data-source-client/use-client-data-source.js +0 -667
  276. package/dist/row-data-source-client/use-client-tree-data-source.d.ts +0 -9
  277. package/dist/row-data-source-client/use-client-tree-data-source.js +0 -512
  278. package/dist/row-data-source-server/async-tree/+constants.async-tree.d.ts +0 -1
  279. package/dist/row-data-source-server/async-tree/+constants.async-tree.js +0 -1
  280. package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +0 -59
  281. package/dist/row-data-source-server/async-tree/+types.async-tree.js +0 -1
  282. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +0 -2
  283. package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +0 -27
  284. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +0 -2
  285. package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +0 -36
  286. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +0 -2
  287. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +0 -24
  288. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +0 -2
  289. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +0 -14
  290. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +0 -2
  291. package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +0 -18
  292. package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +0 -2
  293. package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +0 -14
  294. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +0 -2
  295. package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +0 -18
  296. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +0 -2
  297. package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +0 -3
  298. package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +0 -2
  299. package/dist/row-data-source-server/async-tree/make-async-tree.js +0 -19
  300. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +0 -2
  301. package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +0 -8
  302. package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +0 -2
  303. package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +0 -17
  304. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +0 -2
  305. package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +0 -52
  306. package/dist/row-data-source-server/range-tree/range-tree.d.ts +0 -66
  307. package/dist/row-data-source-server/range-tree/range-tree.js +0 -102
  308. package/dist/row-data-source-server/server-data.d.ts +0 -70
  309. package/dist/row-data-source-server/server-data.js +0 -519
  310. package/dist/row-data-source-server/use-server-data-source.d.ts +0 -3
  311. package/dist/row-data-source-server/use-server-data-source.js +0 -413
  312. package/dist/row-data-source-server/utils/get-node-depth.d.ts +0 -2
  313. package/dist/row-data-source-server/utils/get-node-depth.js +0 -9
  314. package/dist/row-data-source-server/utils/get-node-path.d.ts +0 -2
  315. package/dist/row-data-source-server/utils/get-node-path.js +0 -9
  316. package/dist/row-data-source-server/utils/get-request-id.d.ts +0 -1
  317. package/dist/row-data-source-server/utils/get-request-id.js +0 -6
  318. package/dist/sort-manager/+types.d.ts +0 -13
  319. package/dist/sort-manager/+types.js +0 -1
  320. package/dist/sort-manager/context.d.ts +0 -14
  321. package/dist/sort-manager/context.js +0 -5
  322. package/dist/sort-manager/hooks/use-sort-manager.d.ts +0 -15
  323. package/dist/sort-manager/hooks/use-sort-manager.js +0 -56
  324. package/dist/sort-manager/hooks/use-sort-row-item.d.ts +0 -51
  325. package/dist/sort-manager/hooks/use-sort-row-item.js +0 -145
  326. package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +0 -5
  327. package/dist/sort-manager/hooks/use-sortable-column-items.js +0 -13
  328. package/dist/sort-manager/root.d.ts +0 -3
  329. package/dist/sort-manager/root.js +0 -14
  330. package/dist/sort-manager/sort-add.d.ts +0 -8
  331. package/dist/sort-manager/sort-add.js +0 -14
  332. package/dist/sort-manager/sort-apply.d.ts +0 -7
  333. package/dist/sort-manager/sort-apply.js +0 -24
  334. package/dist/sort-manager/sort-cancel.d.ts +0 -7
  335. package/dist/sort-manager/sort-cancel.js +0 -27
  336. package/dist/sort-manager/sort-clear.d.ts +0 -7
  337. package/dist/sort-manager/sort-clear.js +0 -22
  338. package/dist/sort-manager/sort-column-select.d.ts +0 -10
  339. package/dist/sort-manager/sort-column-select.js +0 -20
  340. package/dist/sort-manager/sort-direction-select.d.ts +0 -10
  341. package/dist/sort-manager/sort-direction-select.js +0 -24
  342. package/dist/sort-manager/sort-manager.d.ts +0 -16
  343. package/dist/sort-manager/sort-manager.js +0 -26
  344. package/dist/sort-manager/sort-remove.d.ts +0 -7
  345. package/dist/sort-manager/sort-remove.js +0 -14
  346. package/dist/sort-manager/sort-row.d.ts +0 -5
  347. package/dist/sort-manager/sort-row.js +0 -7
  348. package/dist/sort-manager/sort-rows.d.ts +0 -1
  349. package/dist/sort-manager/sort-rows.js +0 -6
  350. package/dist/sort-manager/sort-value-select.d.ts +0 -11
  351. package/dist/sort-manager/sort-value-select.js +0 -25
  352. package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +0 -3
  353. package/dist/sort-manager/utils/sort-item-to-sort-model.js +0 -62
  354. package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +0 -3
  355. package/dist/sort-manager/utils/sort-model-to-sort-items.js +0 -50
  356. package/dist/state/+types.d.ts +0 -36
  357. package/dist/state/+types.js +0 -1
  358. package/dist/state/api/cell-root.d.ts +0 -5
  359. package/dist/state/api/cell-root.js +0 -65
  360. package/dist/state/api/column-autosize.d.ts +0 -5
  361. package/dist/state/api/column-autosize.js +0 -72
  362. package/dist/state/api/column-by-id.d.ts +0 -2
  363. package/dist/state/api/column-by-id.js +0 -6
  364. package/dist/state/api/column-field.d.ts +0 -2
  365. package/dist/state/api/column-field.js +0 -23
  366. package/dist/state/api/column-from-index.d.ts +0 -2
  367. package/dist/state/api/column-from-index.js +0 -6
  368. package/dist/state/api/column-group-toggle.d.ts +0 -2
  369. package/dist/state/api/column-group-toggle.js +0 -10
  370. package/dist/state/api/column-index.d.ts +0 -2
  371. package/dist/state/api/column-index.js +0 -7
  372. package/dist/state/api/column-move.d.ts +0 -2
  373. package/dist/state/api/column-move.js +0 -49
  374. package/dist/state/api/column-resize.d.ts +0 -2
  375. package/dist/state/api/column-resize.js +0 -9
  376. package/dist/state/api/column-update.d.ts +0 -5
  377. package/dist/state/api/column-update.js +0 -26
  378. package/dist/state/api/dialog-frame.d.ts +0 -8
  379. package/dist/state/api/dialog-frame.js +0 -16
  380. package/dist/state/api/edit-begin.d.ts +0 -5
  381. package/dist/state/api/edit-begin.js +0 -87
  382. package/dist/state/api/edit-end.d.ts +0 -5
  383. package/dist/state/api/edit-end.js +0 -43
  384. package/dist/state/api/edit-is-cell-active.d.ts +0 -5
  385. package/dist/state/api/edit-is-cell-active.js +0 -22
  386. package/dist/state/api/edit-update.d.ts +0 -5
  387. package/dist/state/api/edit-update.js +0 -88
  388. package/dist/state/api/event-listeners.d.ts +0 -5
  389. package/dist/state/api/event-listeners.js +0 -19
  390. package/dist/state/api/export-csv.d.ts +0 -3
  391. package/dist/state/api/export-csv.js +0 -40
  392. package/dist/state/api/export-data-rect.d.ts +0 -2
  393. package/dist/state/api/export-data-rect.js +0 -24
  394. package/dist/state/api/popover-frame.d.ts +0 -8
  395. package/dist/state/api/popover-frame.js +0 -16
  396. package/dist/state/api/position-from-element.d.ts +0 -5
  397. package/dist/state/api/position-from-element.js +0 -9
  398. package/dist/state/api/row-by-id.d.ts +0 -2
  399. package/dist/state/api/row-by-id.js +0 -5
  400. package/dist/state/api/row-by-index.d.ts +0 -2
  401. package/dist/state/api/row-by-index.js +0 -9
  402. package/dist/state/api/row-detail-is-expanded.d.ts +0 -2
  403. package/dist/state/api/row-detail-is-expanded.js +0 -6
  404. package/dist/state/api/row-detail-rendered-height.d.ts +0 -5
  405. package/dist/state/api/row-detail-rendered-height.js +0 -14
  406. package/dist/state/api/row-detail-toggle.d.ts +0 -2
  407. package/dist/state/api/row-detail-toggle.js +0 -32
  408. package/dist/state/api/row-group-apply-expansions.d.ts +0 -2
  409. package/dist/state/api/row-group-apply-expansions.js +0 -20
  410. package/dist/state/api/row-group-column-index.d.ts +0 -2
  411. package/dist/state/api/row-group-column-index.js +0 -14
  412. package/dist/state/api/row-group-is-expanded.d.ts +0 -2
  413. package/dist/state/api/row-group-is-expanded.js +0 -15
  414. package/dist/state/api/row-group-toggle.d.ts +0 -2
  415. package/dist/state/api/row-group-toggle.js +0 -7
  416. package/dist/state/api/row-handle-select.d.ts +0 -5
  417. package/dist/state/api/row-handle-select.js +0 -43
  418. package/dist/state/api/row-select-all.d.ts +0 -2
  419. package/dist/state/api/row-select-all.js +0 -17
  420. package/dist/state/api/row-select.d.ts +0 -5
  421. package/dist/state/api/row-select.js +0 -35
  422. package/dist/state/api/row-selected.d.ts +0 -2
  423. package/dist/state/api/row-selected.js +0 -13
  424. package/dist/state/api/scroll-into-view.d.ts +0 -5
  425. package/dist/state/api/scroll-into-view.js +0 -50
  426. package/dist/state/api/sort-for-column.d.ts +0 -2
  427. package/dist/state/api/sort-for-column.js +0 -9
  428. package/dist/state/api/use-row-drag.d.ts +0 -2
  429. package/dist/state/api/use-row-drag.js +0 -20
  430. package/dist/state/helpers/cell-row-group.d.ts +0 -2
  431. package/dist/state/helpers/cell-row-group.js +0 -19
  432. package/dist/state/helpers/column-add-row-group.d.ts +0 -10
  433. package/dist/state/helpers/column-add-row-group.js +0 -74
  434. package/dist/state/helpers/column-layout.d.ts +0 -3
  435. package/dist/state/helpers/column-layout.js +0 -59
  436. package/dist/state/helpers/column-marker.d.ts +0 -8
  437. package/dist/state/helpers/column-marker.js +0 -45
  438. package/dist/state/helpers/column-view.d.ts +0 -21
  439. package/dist/state/helpers/column-view.js +0 -33
  440. package/dist/state/helpers/edit-on-change.d.ts +0 -15
  441. package/dist/state/helpers/edit-on-change.js +0 -27
  442. package/dist/state/helpers/empty-row-data-source.d.ts +0 -2
  443. package/dist/state/helpers/empty-row-data-source.js +0 -18
  444. package/dist/state/helpers/get-data-rect.d.ts +0 -13
  445. package/dist/state/helpers/get-data-rect.js +0 -65
  446. package/dist/state/helpers/get-full-width-callback.d.ts +0 -2
  447. package/dist/state/helpers/get-full-width-callback.js +0 -10
  448. package/dist/state/helpers/get-span-callback.d.ts +0 -2
  449. package/dist/state/helpers/get-span-callback.js +0 -22
  450. package/dist/state/helpers/resolve-column.d.ts +0 -4
  451. package/dist/state/helpers/resolve-column.js +0 -29
  452. package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +0 -17
  453. package/dist/state/helpers/row-layout/get-focus-criteria.js +0 -62
  454. package/dist/state/helpers/row-layout/row-layout.d.ts +0 -19
  455. package/dist/state/helpers/row-layout/row-layout.js +0 -162
  456. package/dist/state/use-lytenyte.d.ts +0 -3
  457. package/dist/state/use-lytenyte.js +0 -686
  458. package/dist/tree-view/branch/branch.d.ts +0 -14
  459. package/dist/tree-view/branch/branch.js +0 -63
  460. package/dist/tree-view/branch/use-branch-keys.d.ts +0 -2
  461. package/dist/tree-view/branch/use-branch-keys.js +0 -87
  462. package/dist/tree-view/context.d.ts +0 -22
  463. package/dist/tree-view/context.js +0 -3
  464. package/dist/tree-view/depth-provider.d.ts +0 -2
  465. package/dist/tree-view/depth-provider.js +0 -3
  466. package/dist/tree-view/hooks/use-tree-view-paths.d.ts +0 -2
  467. package/dist/tree-view/hooks/use-tree-view-paths.js +0 -9
  468. package/dist/tree-view/index.d.ts +0 -16
  469. package/dist/tree-view/index.js +0 -16
  470. package/dist/tree-view/leaf.d.ts +0 -4
  471. package/dist/tree-view/leaf.js +0 -28
  472. package/dist/tree-view/navigation/get-all-ids.d.ts +0 -1
  473. package/dist/tree-view/navigation/get-all-ids.js +0 -7
  474. package/dist/tree-view/navigation/get-first-node.d.ts +0 -1
  475. package/dist/tree-view/navigation/get-first-node.js +0 -7
  476. package/dist/tree-view/navigation/get-last-node.d.ts +0 -1
  477. package/dist/tree-view/navigation/get-last-node.js +0 -7
  478. package/dist/tree-view/navigation/get-next-node.d.ts +0 -1
  479. package/dist/tree-view/navigation/get-next-node.js +0 -13
  480. package/dist/tree-view/navigation/get-prev-node.d.ts +0 -1
  481. package/dist/tree-view/navigation/get-prev-node.js +0 -13
  482. package/dist/tree-view/panel/make-handle-navigation.d.ts +0 -2
  483. package/dist/tree-view/panel/make-handle-navigation.js +0 -39
  484. package/dist/tree-view/panel/make-handle-selection.d.ts +0 -2
  485. package/dist/tree-view/panel/make-handle-selection.js +0 -92
  486. package/dist/tree-view/panel/make-handle-typeahead.d.ts +0 -1
  487. package/dist/tree-view/panel/make-handle-typeahead.js +0 -45
  488. package/dist/tree-view/panel/panel.d.ts +0 -1
  489. package/dist/tree-view/panel/panel.js +0 -30
  490. package/dist/tree-view/panel/use-tree-navigation.d.ts +0 -1
  491. package/dist/tree-view/panel/use-tree-navigation.js +0 -63
  492. package/dist/tree-view/root.d.ts +0 -17
  493. package/dist/tree-view/root.js +0 -63
  494. package/dist/tree-view/utils/get-focusable-nodes.d.ts +0 -1
  495. package/dist/tree-view/utils/get-focusable-nodes.js +0 -5
  496. package/dist/tree-view/utils/get-focused-node.d.ts +0 -1
  497. package/dist/tree-view/utils/get-focused-node.js +0 -14
  498. package/dist/tree-view/utils/get-ids-between-nodes.d.ts +0 -1
  499. package/dist/tree-view/utils/get-ids-between-nodes.js +0 -15
  500. package/dist/tree-view/utils/get-panel.d.ts +0 -1
  501. package/dist/tree-view/utils/get-panel.js +0 -7
  502. package/dist/tree-view/utils/get-parent-node.d.ts +0 -1
  503. package/dist/tree-view/utils/get-parent-node.js +0 -10
  504. package/dist/tree-view/utils/get-sibling-branches.d.ts +0 -1
  505. package/dist/tree-view/utils/get-sibling-branches.js +0 -14
  506. package/dist/tree-view/utils/get-tree-node-id.d.ts +0 -1
  507. package/dist/tree-view/utils/get-tree-node-id.js +0 -3
  508. package/dist/tree-view/utils/is-branch-node.d.ts +0 -1
  509. package/dist/tree-view/utils/is-branch-node.js +0 -3
  510. package/dist/tree-view/utils/is-leaf-node.d.ts +0 -1
  511. package/dist/tree-view/utils/is-leaf-node.js +0 -3
  512. package/dist/tree-view/utils/is-tree-node-disabled.d.ts +0 -1
  513. package/dist/tree-view/utils/is-tree-node-disabled.js +0 -3
  514. package/dist/tree-view/utils/select-node.d.ts +0 -2
  515. package/dist/tree-view/utils/select-node.js +0 -15
  516. package/dist/tree-view/utils/toggle-all-selections.d.ts +0 -2
  517. package/dist/tree-view/utils/toggle-all-selections.js +0 -9
  518. package/dist/tree-view/utils/toggle-selection.d.ts +0 -2
  519. package/dist/tree-view/utils/toggle-selection.js +0 -21
  520. package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +0 -2
  521. package/dist/tree-view/virtualized/force-sync-scrolling.js +0 -23
  522. package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +0 -2
  523. package/dist/tree-view/virtualized/get-virtual-tree-paths.js +0 -14
  524. package/dist/tree-view/virtualized/make-virtual-tree.d.ts +0 -31
  525. package/dist/tree-view/virtualized/make-virtual-tree.js +0 -90
  526. package/dist/tree-view/virtualized/use-flattened-tree.d.ts +0 -9
  527. package/dist/tree-view/virtualized/use-flattened-tree.js +0 -36
  528. package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +0 -2
  529. package/dist/tree-view/virtualized/use-row-start-and-end.js +0 -27
  530. package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +0 -22
  531. package/dist/tree-view/virtualized/use-virtualized-tree.js +0 -100
  532. package/dist/types/types.d.ts +0 -8
  533. package/dist/types/types.js +0 -1
  534. package/main.css +0 -453
@@ -1,14 +0,0 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
- export interface TreeBranchProps {
3
- readonly itemId: string;
4
- readonly labelWrap?: SlotComponent;
5
- readonly label?: SlotComponent;
6
- readonly expander?: SlotComponent<{
7
- expanded: boolean;
8
- toggle: () => void;
9
- }>;
10
- readonly transitionEnterMs?: number;
11
- readonly transitionExitMs?: number;
12
- readonly gridWrapped?: boolean;
13
- }
14
- export declare const TreeBranch: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & TreeBranchProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
@@ -1,63 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useEffect } from "react";
3
- import { depthContext, useDepth } from "../depth-provider.js";
4
- import { useTreeRoot } from "../context.js";
5
- import { useBranchKeys } from "./use-branch-keys.js";
6
- import { useEvent, useSlot, useTransitionedOpen, } from "@1771technologies/lytenyte-core/yinternal";
7
- export const TreeBranch = forwardRef(function TreeBranch({ itemId, label, expander, transitionEnterMs, transitionExitMs, gridWrapped, labelWrap, ...props }, forwarded) {
8
- const depth = useDepth();
9
- const root = useTreeRoot();
10
- // Manage the open and close state of the branch
11
- const expanded = root.expansions[itemId] ?? root.expansionDefault ?? false;
12
- const { open, shouldMount, state, toggle } = useTransitionedOpen({
13
- initial: expanded,
14
- timeEnter: transitionEnterMs ?? root.transitionEnterMs,
15
- timeExit: transitionExitMs ?? root.transitionExitMs,
16
- });
17
- const onExpansionChange = useEvent((b) => {
18
- root.onExpansionChange({
19
- ...root.expansions,
20
- [itemId]: b,
21
- });
22
- });
23
- useEffect(() => {
24
- if (expanded === open)
25
- return;
26
- toggle(expanded);
27
- }, [expanded, open, toggle]);
28
- // Component part rendering
29
- const labelRendered = useSlot({
30
- props: [],
31
- slot: label ?? _jsx("div", {}),
32
- });
33
- const expandedProps = {
34
- onClick: (e) => {
35
- e.stopPropagation();
36
- onExpansionChange(!expanded);
37
- },
38
- };
39
- const expanderRendered = useSlot({
40
- props: [expandedProps],
41
- slot: expander ?? _jsx("button", { children: ">" }),
42
- state: { toggle, expanded },
43
- });
44
- const wrapped = gridWrapped ?? root.gridWrappedBranches;
45
- const labelWrapSlot = useSlot({
46
- props: [
47
- {
48
- "data-tree-branch-label": true,
49
- children: (_jsxs(_Fragment, { children: [expanderRendered, labelRendered] })),
50
- },
51
- ],
52
- slot: labelWrap ?? _jsx("div", {}),
53
- });
54
- return (_jsx(depthContext.Provider, { value: depth + 1, children: _jsxs("li", { ...props, onKeyDown: useBranchKeys(itemId, root.expansionDefault ?? false, props.onKeyDown), tabIndex: -1, ref: forwarded, role: "treeitem", "aria-expanded": open, "aria-selected": root.selection.has(itemId), "aria-level": depth + 1, "data-ln-selected": root.selection.has(itemId), "data-ln-tree-node": true, "data-ln-tree-branch": true, "data-ln-tree-id": itemId, style: {
55
- ...props.style,
56
- "--ln-tree-depth": depth,
57
- }, children: [labelWrapSlot, _jsx("div", { children: _jsx(Wrapped, { wrapped: wrapped, expanded: open, children: shouldMount && (_jsx("ul", { "data-tree-branch-children": true, "data-expanded": open, "data-open-state": state, role: "group", children: props.children })) }) })] }) }));
58
- });
59
- function Wrapped(props) {
60
- if (!props.wrapped)
61
- return _jsx(_Fragment, { children: props.children });
62
- return (_jsx("div", { "data-tree-branch-grid-wrapped": true, "data-expanded": props.expanded, children: _jsx("div", { "data-tree-branch-grid-wrapped-content": true, children: props.children }) }));
63
- }
@@ -1,2 +0,0 @@
1
- import type { KeyboardEvent, KeyboardEventHandler } from "react";
2
- export declare function useBranchKeys(id: string, defaultExpansion: boolean, current?: KeyboardEventHandler): (ev: KeyboardEvent) => void;
@@ -1,87 +0,0 @@
1
- import { useTreeRoot } from "../context.js";
2
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
3
- import { getFocusedNode } from "../utils/get-focused-node.js";
4
- import { isBranchNode } from "../utils/is-branch-node.js";
5
- import { getTreeNodeId } from "../utils/get-tree-node-id.js";
6
- import { getParentNode } from "../utils/get-parent-node.js";
7
- import { getSiblingBranches } from "../utils/get-sibling-branches.js";
8
- import { getFocusables } from "@1771technologies/lytenyte-shared";
9
- import { useEvent } from "@1771technologies/lytenyte-core/yinternal";
10
- const accepted = ["ArrowRight", "ArrowLeft", "Enter", "*"];
11
- export function useBranchKeys(id, defaultExpansion, current) {
12
- const ctx = useTreeRoot();
13
- const onKeyDown = useEvent((ev) => {
14
- current?.(ev);
15
- if (!accepted.includes(ev.key))
16
- return;
17
- const isExpanded = ctx.expansions[id] ?? defaultExpansion;
18
- if (ev.key === "*") {
19
- const node = getFocusedNode();
20
- const siblings = getSiblingBranches(node);
21
- const next = { ...ctx.expansions };
22
- siblings?.forEach((c) => {
23
- next[getTreeNodeId(c)] = true;
24
- });
25
- ctx.onExpansionChange(next);
26
- ev.stopPropagation();
27
- return;
28
- }
29
- if (ev.key === "Enter") {
30
- if (ev.currentTarget !== ev.target)
31
- return;
32
- const next = { ...ctx.expansions };
33
- next[id] = !isExpanded;
34
- ctx.onExpansionChange(next);
35
- return;
36
- }
37
- if (ev.key === "ArrowRight") {
38
- const branch = getFocusedNode();
39
- if (ev.currentTarget !== branch)
40
- return;
41
- if (!isExpanded) {
42
- const next = { ...ctx.expansions };
43
- next[id] = !(next[id] ?? defaultExpansion);
44
- ctx.onExpansionChange(next);
45
- return;
46
- }
47
- const childNodes = getFocusables(branch.firstElementChild);
48
- if (childNodes.length > 1 && childNodes.at(-1) !== document.activeElement) {
49
- const current = childNodes.indexOf(document.activeElement);
50
- const index = current === -1 || current === 0 ? 1 : current + 1;
51
- childNodes[index]?.focus();
52
- return;
53
- }
54
- // Get the first focusable node.
55
- const nodes = getFocusableNodes(branch);
56
- nodes.at(0)?.focus();
57
- }
58
- if (ev.key === "ArrowLeft") {
59
- const node = getFocusedNode();
60
- // We need to collapse this node
61
- if (isBranchNode(node) && isExpanded) {
62
- // Ensure we don't collapse the node when the event bubbles and the left arrow
63
- // was pressed on a child element. Pressing left arrow on the child will focus the
64
- // parent, and then run the parent's on keydown handler.
65
- if (ev.target !== ev.currentTarget &&
66
- !ev.currentTarget.firstElementChild?.contains(document.activeElement))
67
- return;
68
- const next = { ...ctx.expansions };
69
- const id = getTreeNodeId(node);
70
- next[id] = false;
71
- ctx.onExpansionChange(next);
72
- return;
73
- }
74
- else {
75
- const parent = getParentNode(node);
76
- if (!parent) {
77
- const focusNodes = getFocusableNodes(ctx.panel);
78
- focusNodes.at(0)?.focus();
79
- }
80
- else {
81
- parent.focus();
82
- }
83
- }
84
- }
85
- });
86
- return onKeyDown;
87
- }
@@ -1,22 +0,0 @@
1
- import { type Dispatch, type SetStateAction } from "react";
2
- export interface TreeViewRootContext {
3
- readonly panel: HTMLUListElement | null;
4
- readonly panelRef: Dispatch<SetStateAction<HTMLUListElement | null>>;
5
- readonly expansions: Record<string, boolean>;
6
- readonly onExpansionChange: (n: Record<string, boolean>) => void;
7
- readonly expansionDefault: boolean;
8
- readonly selectionMode: "single" | "multiple" | "none";
9
- readonly selection: Set<string>;
10
- readonly onSelectionChange: (c: Set<string>) => void;
11
- readonly selectionPivotRef: {
12
- current: string | null;
13
- };
14
- readonly transitionEnterMs: number;
15
- readonly transitionExitMs: number;
16
- readonly gridWrappedBranches: boolean;
17
- readonly onFocusChange: (el: HTMLElement | null) => void;
18
- readonly getAllIds: (panel: HTMLElement) => Set<string>;
19
- readonly getIdsBetweenNodes: (start: HTMLElement, end: HTMLElement, panel: HTMLElement) => string[];
20
- }
21
- export declare const context: import("react").Context<TreeViewRootContext>;
22
- export declare const useTreeRoot: () => TreeViewRootContext;
@@ -1,3 +0,0 @@
1
- import { createContext, useContext } from "react";
2
- export const context = createContext({});
3
- export const useTreeRoot = () => useContext(context);
@@ -1,2 +0,0 @@
1
- export declare const depthContext: import("react").Context<number>;
2
- export declare const useDepth: () => number;
@@ -1,3 +0,0 @@
1
- import { createContext, useContext } from "react";
2
- export const depthContext = createContext(0);
3
- export const useDepth = () => useContext(depthContext);
@@ -1,2 +0,0 @@
1
- import { type PathProvidedItem } from "@1771technologies/lytenyte-shared";
2
- export declare function useTreeViewPaths<T extends PathProvidedItem>(paths: T[], nonAdjacentAreDistinct?: boolean): (import("@1771technologies/lytenyte-shared").PathBranch<T> | import("@1771technologies/lytenyte-shared").PathLeaf<T>)[];
@@ -1,9 +0,0 @@
1
- import { computePathTree } from "@1771technologies/lytenyte-shared";
2
- import { useMemo } from "react";
3
- export function useTreeViewPaths(paths, nonAdjacentAreDistinct) {
4
- const tree = useMemo(() => {
5
- const result = computePathTree(paths, {}, nonAdjacentAreDistinct);
6
- return [...result.children.values()];
7
- }, [nonAdjacentAreDistinct, paths]);
8
- return tree;
9
- }
@@ -1,16 +0,0 @@
1
- import { useTreeViewPaths } from "./hooks/use-tree-view-paths.js";
2
- import { ForceSyncScrolling } from "./virtualized/force-sync-scrolling.js";
3
- import { useVirtualizedTree } from "./virtualized/use-virtualized-tree.js";
4
- export declare const Tree: {
5
- Leaf: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("./leaf.js").TreeLeafProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
6
- Branch: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("./index.js").TreeBranchProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
7
- Root: import("react").ForwardRefExoticComponent<Omit<import("react").PropsWithChildren<import("./root.js").TreeRootProps>, "ref"> & import("react").RefAttributes<HTMLElement>>;
8
- Panel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
9
- usePaths: typeof useTreeViewPaths;
10
- useVirtualTree: typeof useVirtualizedTree;
11
- ForceSyncScrolling: typeof ForceSyncScrolling;
12
- };
13
- export type { TreeRootProps } from "./root.js";
14
- export type { TreeBranchProps } from "./branch/branch.js";
15
- export type { TreeLeafProps } from "./leaf.js";
16
- export type { VirtualizedTreeViewPathsArgs } from "./virtualized/use-virtualized-tree.js";
@@ -1,16 +0,0 @@
1
- import { TreeBranch } from "./branch/branch.js";
2
- import { useTreeViewPaths } from "./hooks/use-tree-view-paths.js";
3
- import { TreeLeaf } from "./leaf.js";
4
- import { TreePanel } from "./panel/panel.js";
5
- import { TreeRoot } from "./root.js";
6
- import { ForceSyncScrolling } from "./virtualized/force-sync-scrolling.js";
7
- import { useVirtualizedTree } from "./virtualized/use-virtualized-tree.js";
8
- export const Tree = {
9
- Leaf: TreeLeaf,
10
- Branch: TreeBranch,
11
- Root: TreeRoot,
12
- Panel: TreePanel,
13
- usePaths: useTreeViewPaths,
14
- useVirtualTree: useVirtualizedTree,
15
- ForceSyncScrolling,
16
- };
@@ -1,4 +0,0 @@
1
- export interface TreeLeafProps {
2
- readonly itemId: string;
3
- }
4
- export declare const TreeLeaf: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & TreeLeafProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import { useDepth } from "./depth-provider.js";
4
- import { useTreeRoot } from "./context.js";
5
- import { getFocusables } from "@1771technologies/lytenyte-shared";
6
- export const TreeLeaf = forwardRef(function TreeLeaf({ itemId, ...props }, forwarded) {
7
- const depth = useDepth();
8
- const root = useTreeRoot();
9
- return (_jsx("li", { ...props, tabIndex: -1, "data-ln-tree-node": true, "data-ln-tree-leaf": true, "data-ln-selected": root.selection.has(itemId), "data-ln-tree-id": itemId, onKeyDown: (e) => {
10
- props.onKeyDown?.(e);
11
- if ((e.key !== "ArrowLeft" && e.key !== "ArrowRight") ||
12
- e.metaKey ||
13
- e.ctrlKey ||
14
- e.shiftKey)
15
- return;
16
- e.preventDefault();
17
- const nodes = getFocusables(e.currentTarget);
18
- const index = nodes.indexOf(document.activeElement);
19
- if (index === -1) {
20
- nodes.at(0)?.focus();
21
- return;
22
- }
23
- if (e.key === "ArrowLeft")
24
- nodes[index === 0 ? nodes.length - 1 : index - 1].focus();
25
- else
26
- nodes[index === nodes.length - 1 ? 0 : index + 1].focus();
27
- }, ref: forwarded, role: "treeitem", "aria-level": depth + 1, "aria-selected": root.selection.has(itemId), style: { ...props.style, "--tree-depth": depth }, children: props.children }));
28
- });
@@ -1 +0,0 @@
1
- export declare function getAllIds(panel: HTMLElement): Set<string>;
@@ -1,7 +0,0 @@
1
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
2
- import { getTreeNodeId } from "../utils/get-tree-node-id.js";
3
- export function getAllIds(panel) {
4
- const focusables = getFocusableNodes(panel);
5
- const allIds = new Set(focusables.map((c) => getTreeNodeId(c)));
6
- return allIds;
7
- }
@@ -1 +0,0 @@
1
- export declare function getFirstNode(panel: HTMLElement): HTMLElement | undefined;
@@ -1,7 +0,0 @@
1
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
2
- import { isTreeNodeDisabled } from "../utils/is-tree-node-disabled.js";
3
- export function getFirstNode(panel) {
4
- const focusables = getFocusableNodes(panel);
5
- const first = focusables.find((c) => !isTreeNodeDisabled(c));
6
- return first;
7
- }
@@ -1 +0,0 @@
1
- export declare function getLastNode(panel: HTMLElement): HTMLElement | undefined;
@@ -1,7 +0,0 @@
1
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
2
- import { isTreeNodeDisabled } from "../utils/is-tree-node-disabled.js";
3
- export function getLastNode(panel) {
4
- const focusables = getFocusableNodes(panel);
5
- const first = focusables.findLast((c) => !isTreeNodeDisabled(c));
6
- return first;
7
- }
@@ -1 +0,0 @@
1
- export declare function getNextNode(el: HTMLElement): HTMLElement | undefined;
@@ -1,13 +0,0 @@
1
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
2
- import { getPanel } from "../utils/get-panel.js";
3
- // Assumes that el is a branch or leaf node
4
- export function getNextNode(el) {
5
- const panel = getPanel(el);
6
- if (!panel)
7
- return;
8
- const focusables = getFocusableNodes(panel);
9
- const index = focusables.indexOf(el);
10
- if (index === -1)
11
- return;
12
- return focusables.at(index + 1);
13
- }
@@ -1 +0,0 @@
1
- export declare function getPrevNode(el: HTMLElement): HTMLElement | undefined;
@@ -1,13 +0,0 @@
1
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
2
- import { getPanel } from "../utils/get-panel.js";
3
- // Assumes that el is a branch or leaf node
4
- export function getPrevNode(el) {
5
- const panel = getPanel(el);
6
- if (!panel)
7
- return;
8
- const focusables = getFocusableNodes(panel);
9
- const index = focusables.indexOf(el);
10
- if (index === -1)
11
- return;
12
- return focusables[index - 1];
13
- }
@@ -1,2 +0,0 @@
1
- import type { TreeViewRootContext } from "../context.js";
2
- export declare function makeHandleNavigation(ctx: TreeViewRootContext): (ev: KeyboardEvent) => void;
@@ -1,39 +0,0 @@
1
- import { isInView } from "@1771technologies/lytenyte-shared";
2
- import { getFirstNode } from "../navigation/get-first-node.js";
3
- import { getLastNode } from "../navigation/get-last-node.js";
4
- import { getNextNode } from "../navigation/get-next-node.js";
5
- import { getPrevNode } from "../navigation/get-prev-node.js";
6
- import { getFocusedNode } from "../utils/get-focused-node.js";
7
- export function makeHandleNavigation(ctx) {
8
- const acceptedKeys = ["ArrowUp", "ArrowDown", "Home", "End"];
9
- return (ev) => {
10
- if (!acceptedKeys.includes(ev.key) || ev.shiftKey || ev.ctrlKey || ev.metaKey)
11
- return;
12
- const current = getFocusedNode();
13
- if (!current)
14
- return;
15
- if (ev.key === "ArrowUp") {
16
- const prev = getPrevNode(current);
17
- if (!prev)
18
- return;
19
- const inView = isInView(prev, ctx.panel);
20
- if (!inView)
21
- prev?.scrollIntoView({ behavior: "instant", block: "start" });
22
- prev?.focus();
23
- }
24
- if (ev.key === "ArrowDown") {
25
- const node = getNextNode(current);
26
- if (!node)
27
- return;
28
- const inView = isInView(node, ctx.panel);
29
- if (!inView)
30
- node?.scrollIntoView({ behavior: "instant", block: "end" });
31
- node?.focus();
32
- }
33
- if (ev.key === "Home")
34
- getFirstNode(ctx.panel)?.focus();
35
- if (ev.key === "End")
36
- getLastNode(ctx.panel)?.focus();
37
- ev.preventDefault();
38
- };
39
- }
@@ -1,2 +0,0 @@
1
- import type { TreeViewRootContext } from "../context.js";
2
- export declare function makeHandleSelection(ctx: TreeViewRootContext): (ev: KeyboardEvent) => void;
@@ -1,92 +0,0 @@
1
- import { isInView } from "@1771technologies/lytenyte-shared";
2
- import { getFirstNode } from "../navigation/get-first-node.js";
3
- import { getLastNode } from "../navigation/get-last-node.js";
4
- import { getNextNode } from "../navigation/get-next-node.js";
5
- import { getPrevNode } from "../navigation/get-prev-node.js";
6
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
7
- import { getFocusedNode } from "../utils/get-focused-node.js";
8
- import { getIdsBetweenNodes } from "../utils/get-ids-between-nodes.js";
9
- import { getTreeNodeId } from "../utils/get-tree-node-id.js";
10
- import { selectNode } from "../utils/select-node.js";
11
- import { toggleAllSelections } from "../utils/toggle-all-selections.js";
12
- import { toggleSelection } from "../utils/toggle-selection.js";
13
- export function makeHandleSelection(ctx) {
14
- const acceptedKeys = ["Enter", "Home", "End", "ArrowDown", "ArrowUp", "Space", " ", "a"];
15
- const make = (ev) => {
16
- if (ctx.selectionMode === "none")
17
- return;
18
- if (!acceptedKeys.includes(ev.key))
19
- return;
20
- ev.preventDefault();
21
- const pivot = ctx.selectionPivotRef.current;
22
- if (ev.key === " " && (ctx.selectionMode === "single" || !ev.shiftKey || !pivot)) {
23
- const node = getFocusedNode();
24
- toggleSelection(node, ctx);
25
- return;
26
- }
27
- if (ctx.selectionMode !== "multiple")
28
- return;
29
- const focusables = getFocusableNodes(ctx.panel);
30
- const focused = getFocusedNode();
31
- const focusedIndex = focusables.indexOf(focused);
32
- if (focusedIndex === -1)
33
- return;
34
- if (ev.ctrlKey || ev.metaKey) {
35
- if (ev.key === "a") {
36
- ev.preventDefault();
37
- toggleAllSelections(ctx);
38
- return;
39
- }
40
- }
41
- if (!ev.shiftKey)
42
- return;
43
- if (ev.key === "ArrowUp" && focusedIndex !== 0) {
44
- const node = getPrevNode(focused);
45
- if (!isInView(node, ctx.panel))
46
- node?.scrollIntoView({ behavior: "instant", block: "start" });
47
- selectNode(node, ctx, true);
48
- return;
49
- }
50
- if (ev.key === "ArrowDown" && focusedIndex !== focusables.length) {
51
- const node = getNextNode(focused);
52
- if (!isInView(node, ctx.panel))
53
- node?.scrollIntoView({ behavior: "instant", block: "end" });
54
- selectNode(node, ctx, true);
55
- return;
56
- }
57
- if (ev.key === " ") {
58
- const pivotNode = focusables.find((c) => getTreeNodeId(c) === pivot);
59
- if (!pivotNode)
60
- return;
61
- const ids = ctx.getIdsBetweenNodes(pivotNode, focused, ctx.panel);
62
- const next = new Set(ctx.selection);
63
- ids.forEach((c) => next.add(c));
64
- ctx.onSelectionChange(next);
65
- ctx.selectionPivotRef.current = getTreeNodeId(focused);
66
- return;
67
- }
68
- if (!ev.ctrlKey && !ev.metaKey)
69
- return;
70
- if (ev.key === "Home") {
71
- const firstNode = getFirstNode(ctx.panel);
72
- const ids = getIdsBetweenNodes(firstNode, focused, ctx.panel);
73
- const next = new Set(ctx.selection);
74
- ids.forEach((c) => next.add(c));
75
- ctx.onSelectionChange(next);
76
- firstNode?.focus();
77
- ctx.selectionPivotRef.current = getTreeNodeId(firstNode);
78
- return;
79
- }
80
- if (ev.key === "End") {
81
- const lastNode = getLastNode(ctx.panel);
82
- const ids = ctx.getIdsBetweenNodes(focused, lastNode, ctx.panel);
83
- const next = new Set(ctx.selection);
84
- ids.forEach((c) => next.add(c));
85
- ctx.onSelectionChange(next);
86
- lastNode?.focus();
87
- ctx.selectionPivotRef.current = getTreeNodeId(lastNode);
88
- return;
89
- }
90
- };
91
- return make;
92
- }
@@ -1 +0,0 @@
1
- export declare function makeHandleTypeahead(): (panel: HTMLElement, ev: KeyboardEvent) => void;
@@ -1,45 +0,0 @@
1
- import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
2
- import { getFocusedNode } from "../utils/get-focused-node.js";
3
- import { isBranchNode } from "../utils/is-branch-node.js";
4
- export function makeHandleTypeahead() {
5
- let typeaheadCapture = [];
6
- let typeaheadTimeout = null;
7
- const handleTypeahead = (panel, ev) => {
8
- if (ev.ctrlKey || ev.shiftKey || ev.metaKey)
9
- return;
10
- if (ev.key.length === 1 && ev.key.match(/[\S\s]/) && ev.key != " ") {
11
- // Begin the typeahead.
12
- typeaheadCapture.push(ev.key);
13
- if (typeaheadTimeout)
14
- clearTimeout(typeaheadTimeout);
15
- typeaheadTimeout = setTimeout(() => {
16
- const text = typeaheadCapture.join("");
17
- const nodes = getFocusableNodes(panel);
18
- const focused = getFocusedNode();
19
- if (!focused)
20
- return;
21
- const index = nodes.indexOf(focused);
22
- if (index === -1)
23
- return;
24
- const nodesAfterCurrent = nodes.slice(index);
25
- const nodeToFocus = nodesAfterCurrent.find((c) => {
26
- let textContent = "";
27
- if (isBranchNode(c)) {
28
- // On a branch node the text content of the expanded should not be included. We should simply
29
- // look at the text content of the node.
30
- textContent = c.firstElementChild?.lastElementChild?.textContent ?? "";
31
- }
32
- else {
33
- textContent = c.textContent ?? "";
34
- }
35
- return textContent?.toLowerCase()?.startsWith(text);
36
- });
37
- if (nodeToFocus)
38
- nodeToFocus.focus();
39
- typeaheadCapture = [];
40
- typeaheadTimeout = null;
41
- }, 300);
42
- }
43
- };
44
- return handleTypeahead;
45
- }
@@ -1 +0,0 @@
1
- export declare const TreePanel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useRef } from "react";
3
- import { depthContext } from "../depth-provider.js";
4
- import { useTreeRoot } from "../context.js";
5
- import { useTreeNavigation } from "./use-tree-navigation.js";
6
- import { getFocusedNode } from "../utils/get-focused-node.js";
7
- import { getFirstNode } from "../navigation/get-first-node.js";
8
- import { useCombinedRefs } from "@1771technologies/lytenyte-core/yinternal";
9
- export const TreePanel = forwardRef(function TreePanel(props, forwarded) {
10
- const ctx = useTreeRoot();
11
- const ref = useCombinedRefs(ctx.panelRef, forwarded);
12
- const focused = useTreeNavigation();
13
- const focusTime = useRef(null);
14
- return (_jsxs(depthContext.Provider, { value: 0, children: [_jsx("ul", { ...props, role: "tree", ref: ref, tabIndex: focused ? -1 : 0, "aria-multiselectable": ctx.selectionMode === "multiple", "aria-orientation": "vertical", "data-ln-tree-panel": true, onFocus: () => {
15
- if (focusTime.current) {
16
- clearTimeout(focusTime.current);
17
- focusTime.current = null;
18
- }
19
- ctx.onFocusChange(getFocusedNode());
20
- }, onBlur: () => {
21
- if (focusTime.current)
22
- return;
23
- focusTime.current = setTimeout(() => {
24
- ctx.onFocusChange(null);
25
- focusTime.current = null;
26
- }, 20);
27
- }, children: props.children }), _jsx("div", { role: "presentation", tabIndex: focused ? -1 : 0, onFocus: () => {
28
- getFirstNode(ctx.panel)?.focus();
29
- } })] }));
30
- });
@@ -1 +0,0 @@
1
- export declare function useTreeNavigation(): boolean;