@vuer-ai/vuer-uikit 0.0.121 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (628) hide show
  1. package/README.md +28 -0
  2. package/dist/SyncScroll/SyncScroll.cjs +4 -4
  3. package/dist/SyncScroll/SyncScroll.mjs +4 -4
  4. package/dist/SyncScroll/index.cjs +4 -4
  5. package/dist/SyncScroll/index.mjs +4 -4
  6. package/dist/SyncScroll/useSyncScroll.d.cts +5 -5
  7. package/dist/SyncScroll/useSyncScroll.d.ts +5 -5
  8. package/dist/{chunk-3SUV56TH.mjs → chunk-2IMCDH5J.mjs} +2 -2
  9. package/dist/{chunk-3P2OP4KO.mjs → chunk-2J466BYZ.mjs} +2 -1
  10. package/dist/{chunk-QF3JWGWX.cjs → chunk-2KBNQ5PY.cjs} +2 -2
  11. package/dist/{chunk-D5WTSBUX.cjs → chunk-3UQ323EB.cjs} +6 -40
  12. package/dist/{chunk-G45SP3DA.mjs → chunk-44U6VC46.mjs} +480 -62
  13. package/dist/{chunk-VW2NEQHK.cjs → chunk-4FIP3EXW.cjs} +2 -2
  14. package/dist/chunk-4SI4QV5R.cjs +14 -0
  15. package/dist/{chunk-O5YP3JQ4.mjs → chunk-4W7JKZVN.mjs} +2 -1
  16. package/dist/chunk-52GNIM6H.mjs +12 -0
  17. package/dist/{chunk-6ZLK2RYS.mjs → chunk-5GBMVMLS.mjs} +4 -4
  18. package/dist/{chunk-MMQR4IEY.cjs → chunk-753HUOAI.cjs} +6 -6
  19. package/dist/chunk-7MKCWXNV.cjs +32 -0
  20. package/dist/{chunk-ZQ2DPA2M.mjs → chunk-7WJ73FEI.mjs} +1 -1
  21. package/dist/{chunk-XMVARRN6.cjs → chunk-AFALU3AK.cjs} +2 -2
  22. package/dist/{chunk-XDIHVSZ5.cjs → chunk-BNXJ5VBE.cjs} +2 -2
  23. package/dist/{chunk-YBUMQX6M.mjs → chunk-BPCD4L7T.mjs} +1 -1
  24. package/dist/{chunk-BDFUHPX2.mjs → chunk-BTGAKK3B.mjs} +1 -1
  25. package/dist/{chunk-4G2LN6XU.cjs → chunk-BXJTOIRR.cjs} +513 -93
  26. package/dist/{chunk-B6CIRZI4.cjs → chunk-BZI74LKX.cjs} +1 -0
  27. package/dist/{chunk-KWSH253U.cjs → chunk-CMO3SLOU.cjs} +2 -2
  28. package/dist/{chunk-HGN7J4CP.mjs → chunk-D2LUQKPM.mjs} +128 -89
  29. package/dist/chunk-DF7WIFZK.cjs +316 -0
  30. package/dist/{chunk-HVACIZB5.cjs → chunk-DKLVWYTC.cjs} +29 -12
  31. package/dist/chunk-DKWLF3KW.mjs +149 -0
  32. package/dist/{chunk-4WKFVKFF.cjs → chunk-DPJPOBUT.cjs} +2 -2
  33. package/dist/{chunk-XHNM6XE3.mjs → chunk-EG6JETUN.mjs} +1 -1
  34. package/dist/{chunk-QYYMLZFE.mjs → chunk-EXM6QMNR.mjs} +1 -1
  35. package/dist/{chunk-2KQXKQNU.mjs → chunk-EYMZP5PL.mjs} +1 -1
  36. package/dist/chunk-FRM27RLN.cjs +264 -0
  37. package/dist/chunk-FTB337IJ.cjs +143 -0
  38. package/dist/{chunk-PZDC5ZKG.mjs → chunk-G35PQKU5.mjs} +3 -3
  39. package/dist/{chunk-BLG4IPRR.mjs → chunk-GAAP5JO4.mjs} +1 -1
  40. package/dist/{chunk-LOMLR5AA.mjs → chunk-HI4LO6IJ.mjs} +1 -1
  41. package/dist/{chunk-FUMJBAQI.mjs → chunk-HNW2DRPV.mjs} +2 -6
  42. package/dist/{chunk-YAFKQ5ZV.cjs → chunk-HSUL5OUG.cjs} +2 -1
  43. package/dist/{chunk-KKGDRIR2.cjs → chunk-I2COLDHC.cjs} +2 -2
  44. package/dist/{chunk-E7ACJ3NX.cjs → chunk-IAWMCOHS.cjs} +2 -2
  45. package/dist/{chunk-PC42NEBI.mjs → chunk-ITOTSGSL.mjs} +1 -1
  46. package/dist/{chunk-CEYNTMQP.mjs → chunk-IYTGWOZY.mjs} +1 -1
  47. package/dist/chunk-J74A5LNZ.cjs +179 -0
  48. package/dist/{chunk-CV2EDA3W.cjs → chunk-JDEZ6NNG.cjs} +2 -2
  49. package/dist/chunk-JEWTYDLX.cjs +119 -0
  50. package/dist/{chunk-UTHAZV2T.cjs → chunk-JTFQFULL.cjs} +2 -6
  51. package/dist/{chunk-GJKFQHUX.mjs → chunk-KXKUQSNY.mjs} +1 -1
  52. package/dist/chunk-L2AKG4VJ.mjs +258 -0
  53. package/dist/{chunk-7MR3M2HW.mjs → chunk-L2DME42Q.mjs} +1 -1
  54. package/dist/{chunk-Z7PWETGZ.mjs → chunk-LHP7FLGK.mjs} +1 -1
  55. package/dist/{chunk-LJYIEOGQ.mjs → chunk-LLFE3UHZ.mjs} +5 -5
  56. package/dist/chunk-NUBFD3YP.mjs +117 -0
  57. package/dist/{chunk-COL2MXGC.cjs → chunk-OX5FXH6W.cjs} +2 -2
  58. package/dist/{chunk-COJRGW3A.cjs → chunk-P7J7XHDE.cjs} +2 -2
  59. package/dist/chunk-PHRZ5JE6.mjs +1 -0
  60. package/dist/chunk-PMYOKSO3.mjs +30 -0
  61. package/dist/chunk-PTUZYCOY.mjs +314 -0
  62. package/dist/{chunk-WQT7JQN4.cjs → chunk-PZZW3E5D.cjs} +2 -2
  63. package/dist/chunk-Q3UN25WC.mjs +141 -0
  64. package/dist/{chunk-JVZ6J2UX.cjs → chunk-QS6WNNLM.cjs} +2 -2
  65. package/dist/{chunk-S4BL7C3Y.mjs → chunk-QSDYNIZB.mjs} +1 -0
  66. package/dist/{chunk-WYD3KNAT.cjs → chunk-QTLUPDLH.cjs} +5 -4
  67. package/dist/{chunk-NC2U7QTW.cjs → chunk-RHVKIZMQ.cjs} +2 -2
  68. package/dist/{chunk-67H3OSM3.mjs → chunk-RR76Z6OK.mjs} +2 -2
  69. package/dist/chunk-SBAVMK7J.cjs +181 -0
  70. package/dist/{chunk-GBRIW266.cjs → chunk-SOHGIAGF.cjs} +2 -2
  71. package/dist/{chunk-4YVKJKWV.mjs → chunk-TCCFFSXM.mjs} +27 -10
  72. package/dist/{chunk-EMZEL54F.cjs → chunk-THE6FZKP.cjs} +2 -0
  73. package/dist/{chunk-DGJ7E77I.mjs → chunk-TQOGGHSJ.mjs} +1 -1
  74. package/dist/{chunk-XC25ZQ7H.mjs → chunk-UBGNADCN.mjs} +1 -1
  75. package/dist/chunk-UEHPZIQB.cjs +2 -0
  76. package/dist/{chunk-DG2EVWIW.cjs → chunk-UZTOUPJ7.cjs} +128 -89
  77. package/dist/{chunk-HUPECWNG.mjs → chunk-V4THHKSO.mjs} +1 -1
  78. package/dist/chunk-VDYJAOMN.mjs +177 -0
  79. package/dist/{chunk-6NSLYQ35.mjs → chunk-VLNU7Y2K.mjs} +7 -42
  80. package/dist/{chunk-Z42BBOSG.cjs → chunk-VT6E2N6C.cjs} +2 -2
  81. package/dist/{chunk-RS4T6S3Z.mjs → chunk-VWLZKPDB.mjs} +5 -4
  82. package/dist/{chunk-OON7LFBQ.cjs → chunk-W22SQYEO.cjs} +6 -6
  83. package/dist/{chunk-42DBXENE.cjs → chunk-WGY33IHV.cjs} +2 -2
  84. package/dist/{chunk-EOTGD64D.cjs → chunk-WX3VWVWD.cjs} +2 -2
  85. package/dist/{chunk-UFYHIDMC.cjs → chunk-WZQ2BT3P.cjs} +25 -6
  86. package/dist/{chunk-KR7VBV3B.cjs → chunk-XIDCYS6G.cjs} +2 -1
  87. package/dist/chunk-YDF6VWBW.cjs +151 -0
  88. package/dist/{chunk-FB3M2JJV.cjs → chunk-YQL6JDVP.cjs} +5 -5
  89. package/dist/{chunk-7RRQ2HHL.mjs → chunk-YRNI7ZJ7.mjs} +25 -6
  90. package/dist/{chunk-FK6ZROZE.mjs → chunk-ZJYPKTF4.mjs} +2 -1
  91. package/dist/chunk-ZMRODJ3I.mjs +149 -0
  92. package/dist/dial/DialPanel.cjs +66 -56
  93. package/dist/dial/DialPanel.d.cts +4 -3
  94. package/dist/dial/DialPanel.d.ts +4 -3
  95. package/dist/dial/DialPanel.mjs +65 -55
  96. package/dist/dial/DialProvider.d.cts +3 -3
  97. package/dist/dial/DialProvider.d.ts +3 -3
  98. package/dist/dial/IconRenderer.d.cts +2 -2
  99. package/dist/dial/IconRenderer.d.ts +2 -2
  100. package/dist/dial/components/DialButton.cjs +22 -0
  101. package/dist/dial/components/DialButton.d.cts +28 -0
  102. package/dist/dial/components/DialButton.d.ts +28 -0
  103. package/dist/dial/components/DialButton.mjs +13 -0
  104. package/dist/dial/components/DialCustom.cjs +11 -0
  105. package/dist/dial/components/DialCustom.d.cts +34 -0
  106. package/dist/dial/components/DialCustom.d.ts +34 -0
  107. package/dist/dial/components/DialCustom.mjs +2 -0
  108. package/dist/dial/components/index.cjs +29 -0
  109. package/dist/dial/components/index.d.cts +4 -0
  110. package/dist/dial/components/index.d.ts +4 -0
  111. package/dist/dial/components/index.mjs +16 -0
  112. package/dist/dial/index.cjs +90 -72
  113. package/dist/dial/index.d.cts +4 -1
  114. package/dist/dial/index.d.ts +4 -1
  115. package/dist/dial/index.mjs +65 -55
  116. package/dist/dial/types.d.cts +4 -93
  117. package/dist/dial/types.d.ts +4 -93
  118. package/dist/dial/wrapped-inputs/ControlledInputs.cjs +70 -60
  119. package/dist/dial/wrapped-inputs/ControlledInputs.d.cts +7 -6
  120. package/dist/dial/wrapped-inputs/ControlledInputs.d.ts +7 -6
  121. package/dist/dial/wrapped-inputs/ControlledInputs.mjs +65 -55
  122. package/dist/{auth/components/index.cjs → dial/wrapped-inputs/DialArrayInput.cjs} +67 -57
  123. package/dist/dial/wrapped-inputs/DialArrayInput.d.cts +20 -0
  124. package/dist/dial/wrapped-inputs/DialArrayInput.d.ts +20 -0
  125. package/dist/{auth/components/index.mjs → dial/wrapped-inputs/DialArrayInput.mjs} +65 -55
  126. package/dist/dial/wrapped-inputs/DialInputs.cjs +79 -69
  127. package/dist/dial/wrapped-inputs/DialInputs.d.cts +18 -15
  128. package/dist/dial/wrapped-inputs/DialInputs.d.ts +18 -15
  129. package/dist/dial/wrapped-inputs/DialInputs.mjs +65 -55
  130. package/dist/dial/wrapped-inputs/DialInterfaceInput.cjs +66 -56
  131. package/dist/dial/wrapped-inputs/DialInterfaceInput.d.cts +7 -2
  132. package/dist/dial/wrapped-inputs/DialInterfaceInput.d.ts +7 -2
  133. package/dist/dial/wrapped-inputs/DialInterfaceInput.mjs +65 -55
  134. package/dist/dial/wrapped-inputs/DialPresetsInput.cjs +56 -49
  135. package/dist/dial/wrapped-inputs/DialPresetsInput.d.cts +3 -2
  136. package/dist/dial/wrapped-inputs/DialPresetsInput.d.ts +3 -2
  137. package/dist/dial/wrapped-inputs/DialPresetsInput.mjs +55 -48
  138. package/dist/dial/wrapped-inputs/DialTupleInput.cjs +139 -0
  139. package/dist/dial/wrapped-inputs/DialTupleInput.d.cts +18 -0
  140. package/dist/dial/wrapped-inputs/DialTupleInput.d.ts +18 -0
  141. package/dist/dial/wrapped-inputs/DialTupleInput.mjs +130 -0
  142. package/dist/dial/wrapped-inputs/DialVectorInput.cjs +66 -56
  143. package/dist/dial/wrapped-inputs/DialVectorInput.d.cts +2 -2
  144. package/dist/dial/wrapped-inputs/DialVectorInput.d.ts +2 -2
  145. package/dist/dial/wrapped-inputs/DialVectorInput.mjs +65 -55
  146. package/dist/dial/wrapped-inputs/index.cjs +94 -76
  147. package/dist/dial/wrapped-inputs/index.d.cts +3 -0
  148. package/dist/dial/wrapped-inputs/index.d.ts +3 -0
  149. package/dist/dial/wrapped-inputs/index.mjs +65 -55
  150. package/dist/highlight-cursor/cursor-context.d.cts +2 -2
  151. package/dist/highlight-cursor/cursor-context.d.ts +2 -2
  152. package/dist/highlight-cursor/cursor-provider.cjs +2 -2
  153. package/dist/highlight-cursor/cursor-provider.d.cts +1 -1
  154. package/dist/highlight-cursor/cursor-provider.d.ts +1 -1
  155. package/dist/highlight-cursor/cursor-provider.mjs +1 -1
  156. package/dist/highlight-cursor/enhanced-components.cjs +14 -14
  157. package/dist/highlight-cursor/enhanced-components.d.cts +4 -4
  158. package/dist/highlight-cursor/enhanced-components.d.ts +4 -4
  159. package/dist/highlight-cursor/enhanced-components.mjs +9 -9
  160. package/dist/highlight-cursor/index.cjs +16 -16
  161. package/dist/highlight-cursor/index.mjs +10 -10
  162. package/dist/highlight-cursor/types.d.cts +2 -1
  163. package/dist/highlight-cursor/types.d.ts +2 -1
  164. package/dist/highlight-cursor/with-cursor.d.cts +2 -2
  165. package/dist/highlight-cursor/with-cursor.d.ts +2 -2
  166. package/dist/hooks/clientOnly.d.cts +4 -4
  167. package/dist/hooks/clientOnly.d.ts +4 -4
  168. package/dist/hooks/index.cjs +20 -20
  169. package/dist/hooks/index.mjs +4 -4
  170. package/dist/index.cjs +340 -254
  171. package/dist/index.css +13 -13
  172. package/dist/index.d.cts +14 -3
  173. package/dist/index.d.ts +14 -3
  174. package/dist/index.mjs +65 -55
  175. package/dist/schema-types-D9b7Dc1G.d.cts +163 -0
  176. package/dist/schema-types-D9b7Dc1G.d.ts +163 -0
  177. package/dist/styles/theme.css +1 -1
  178. package/dist/ui/DialBadge.cjs +9 -9
  179. package/dist/ui/DialBadge.mjs +5 -5
  180. package/dist/ui/UIKitBadge.cjs +9 -9
  181. package/dist/ui/UIKitBadge.mjs +5 -5
  182. package/dist/ui/alert-dialog.cjs +60 -0
  183. package/dist/ui/alert-dialog.d.cts +17 -0
  184. package/dist/ui/alert-dialog.d.ts +17 -0
  185. package/dist/ui/alert-dialog.mjs +11 -0
  186. package/dist/ui/avatar.cjs +4 -4
  187. package/dist/ui/avatar.d.cts +2 -2
  188. package/dist/ui/avatar.d.ts +2 -2
  189. package/dist/ui/avatar.mjs +4 -4
  190. package/dist/ui/badge.cjs +7 -7
  191. package/dist/ui/badge.d.cts +2 -2
  192. package/dist/ui/badge.d.ts +2 -2
  193. package/dist/ui/badge.mjs +5 -5
  194. package/dist/ui/button.cjs +4 -4
  195. package/dist/ui/button.d.cts +2 -2
  196. package/dist/ui/button.d.ts +2 -2
  197. package/dist/ui/button.mjs +4 -4
  198. package/dist/ui/card.cjs +12 -12
  199. package/dist/ui/card.mjs +5 -5
  200. package/dist/ui/checkbox.cjs +4 -4
  201. package/dist/ui/checkbox.mjs +4 -4
  202. package/dist/ui/collapsible.cjs +4 -4
  203. package/dist/ui/collapsible.mjs +4 -4
  204. package/dist/ui/context-menu.cjs +4 -4
  205. package/dist/ui/context-menu.mjs +4 -4
  206. package/dist/ui/drag-selectable/createSelectable.d.cts +2 -2
  207. package/dist/ui/drag-selectable/createSelectable.d.ts +2 -2
  208. package/dist/ui/drawer.cjs +4 -4
  209. package/dist/ui/drawer.d.cts +11 -11
  210. package/dist/ui/drawer.d.ts +11 -11
  211. package/dist/ui/drawer.mjs +4 -4
  212. package/dist/ui/dropdown.cjs +4 -4
  213. package/dist/ui/dropdown.mjs +4 -4
  214. package/dist/ui/icons/index.cjs +9 -9
  215. package/dist/ui/icons/index.mjs +1 -1
  216. package/dist/ui/index.cjs +246 -171
  217. package/dist/ui/index.d.cts +10 -2
  218. package/dist/ui/index.d.ts +10 -2
  219. package/dist/ui/index.mjs +52 -45
  220. package/dist/ui/inputs/color-input.cjs +6 -6
  221. package/dist/ui/inputs/color-input.d.cts +7 -3
  222. package/dist/ui/inputs/color-input.d.ts +7 -3
  223. package/dist/ui/inputs/color-input.mjs +5 -5
  224. package/dist/ui/inputs/index.cjs +50 -50
  225. package/dist/ui/inputs/index.mjs +21 -21
  226. package/dist/ui/inputs/input-numbers.cjs +6 -6
  227. package/dist/ui/inputs/input-numbers.d.cts +7 -3
  228. package/dist/ui/inputs/input-numbers.d.ts +7 -3
  229. package/dist/ui/inputs/input-numbers.mjs +5 -5
  230. package/dist/ui/inputs/input.cjs +4 -4
  231. package/dist/ui/inputs/input.d.cts +4 -4
  232. package/dist/ui/inputs/input.d.ts +4 -4
  233. package/dist/ui/inputs/input.mjs +4 -4
  234. package/dist/ui/inputs/number-inputs/CmInput.cjs +7 -7
  235. package/dist/ui/inputs/number-inputs/CmInput.d.cts +2 -2
  236. package/dist/ui/inputs/number-inputs/CmInput.d.ts +2 -2
  237. package/dist/ui/inputs/number-inputs/CmInput.mjs +6 -6
  238. package/dist/ui/inputs/number-inputs/DegInput.cjs +7 -7
  239. package/dist/ui/inputs/number-inputs/DegInput.d.cts +2 -2
  240. package/dist/ui/inputs/number-inputs/DegInput.d.ts +2 -2
  241. package/dist/ui/inputs/number-inputs/DegInput.mjs +6 -6
  242. package/dist/ui/inputs/number-inputs/EulerDegInput.cjs +9 -9
  243. package/dist/ui/inputs/number-inputs/EulerDegInput.d.cts +2 -2
  244. package/dist/ui/inputs/number-inputs/EulerDegInput.d.ts +2 -2
  245. package/dist/ui/inputs/number-inputs/EulerDegInput.mjs +8 -8
  246. package/dist/ui/inputs/number-inputs/EulerInput.cjs +8 -8
  247. package/dist/ui/inputs/number-inputs/EulerInput.d.cts +2 -2
  248. package/dist/ui/inputs/number-inputs/EulerInput.d.ts +2 -2
  249. package/dist/ui/inputs/number-inputs/EulerInput.mjs +7 -7
  250. package/dist/ui/inputs/number-inputs/EulerRadInput.cjs +8 -8
  251. package/dist/ui/inputs/number-inputs/EulerRadInput.d.cts +2 -2
  252. package/dist/ui/inputs/number-inputs/EulerRadInput.d.ts +2 -2
  253. package/dist/ui/inputs/number-inputs/EulerRadInput.mjs +7 -7
  254. package/dist/ui/inputs/number-inputs/InchInput.cjs +7 -7
  255. package/dist/ui/inputs/number-inputs/InchInput.d.cts +2 -2
  256. package/dist/ui/inputs/number-inputs/InchInput.d.ts +2 -2
  257. package/dist/ui/inputs/number-inputs/InchInput.mjs +6 -6
  258. package/dist/ui/inputs/number-inputs/IntInput.cjs +7 -7
  259. package/dist/ui/inputs/number-inputs/IntInput.d.cts +2 -2
  260. package/dist/ui/inputs/number-inputs/IntInput.d.ts +2 -2
  261. package/dist/ui/inputs/number-inputs/IntInput.mjs +6 -6
  262. package/dist/ui/inputs/number-inputs/KVectorInput.cjs +8 -8
  263. package/dist/ui/inputs/number-inputs/KVectorInput.d.cts +2 -2
  264. package/dist/ui/inputs/number-inputs/KVectorInput.d.ts +2 -2
  265. package/dist/ui/inputs/number-inputs/KVectorInput.mjs +7 -7
  266. package/dist/ui/inputs/number-inputs/QuaternionInput.cjs +8 -8
  267. package/dist/ui/inputs/number-inputs/QuaternionInput.d.cts +2 -2
  268. package/dist/ui/inputs/number-inputs/QuaternionInput.d.ts +2 -2
  269. package/dist/ui/inputs/number-inputs/QuaternionInput.mjs +7 -7
  270. package/dist/ui/inputs/number-inputs/RadInput.cjs +7 -7
  271. package/dist/ui/inputs/number-inputs/RadInput.d.cts +2 -2
  272. package/dist/ui/inputs/number-inputs/RadInput.d.ts +2 -2
  273. package/dist/ui/inputs/number-inputs/RadInput.mjs +6 -6
  274. package/dist/ui/inputs/number-inputs/TimeInput.cjs +7 -7
  275. package/dist/ui/inputs/number-inputs/TimeInput.d.cts +2 -2
  276. package/dist/ui/inputs/number-inputs/TimeInput.d.ts +2 -2
  277. package/dist/ui/inputs/number-inputs/TimeInput.mjs +6 -6
  278. package/dist/ui/inputs/number-inputs/Vec3Input.cjs +8 -8
  279. package/dist/ui/inputs/number-inputs/Vec3Input.d.cts +2 -2
  280. package/dist/ui/inputs/number-inputs/Vec3Input.d.ts +2 -2
  281. package/dist/ui/inputs/number-inputs/Vec3Input.mjs +7 -7
  282. package/dist/ui/inputs/number-inputs/VectorInput.cjs +7 -7
  283. package/dist/ui/inputs/number-inputs/VectorInput.d.cts +4 -2
  284. package/dist/ui/inputs/number-inputs/VectorInput.d.ts +4 -2
  285. package/dist/ui/inputs/number-inputs/VectorInput.mjs +6 -6
  286. package/dist/ui/inputs/number-inputs/index.cjs +41 -41
  287. package/dist/ui/inputs/number-inputs/index.mjs +18 -18
  288. package/dist/ui/inputs/presets-input.cjs +7 -7
  289. package/dist/ui/inputs/presets-input.d.cts +2 -2
  290. package/dist/ui/inputs/presets-input.d.ts +2 -2
  291. package/dist/ui/inputs/presets-input.mjs +6 -6
  292. package/dist/ui/inputs/presets-rad-input.cjs +8 -8
  293. package/dist/ui/inputs/presets-rad-input.d.cts +2 -2
  294. package/dist/ui/inputs/presets-rad-input.d.ts +2 -2
  295. package/dist/ui/inputs/presets-rad-input.mjs +7 -7
  296. package/dist/ui/inputs/text-input.cjs +4 -4
  297. package/dist/ui/inputs/text-input.d.cts +2 -2
  298. package/dist/ui/inputs/text-input.d.ts +2 -2
  299. package/dist/ui/inputs/text-input.mjs +4 -4
  300. package/dist/ui/label.cjs +4 -4
  301. package/dist/ui/label.d.cts +4 -4
  302. package/dist/ui/label.d.ts +4 -4
  303. package/dist/ui/label.mjs +4 -4
  304. package/dist/ui/layout.cjs +4 -4
  305. package/dist/ui/layout.mjs +4 -4
  306. package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +4 -4
  307. package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +4 -4
  308. package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +4 -4
  309. package/dist/ui/layouts/dock-layout/LayoutSlots.d.cts +3 -3
  310. package/dist/ui/layouts/dock-layout/LayoutSlots.d.ts +3 -3
  311. package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +4 -4
  312. package/dist/ui/layouts/dock-layout/index.cjs +4 -4
  313. package/dist/ui/layouts/dock-layout/index.mjs +4 -4
  314. package/dist/ui/layouts/index.cjs +5 -5
  315. package/dist/ui/layouts/index.mjs +5 -5
  316. package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +4 -4
  317. package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +4 -4
  318. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +4 -4
  319. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +4 -4
  320. package/dist/ui/layouts/liquid-layout/index.cjs +4 -4
  321. package/dist/ui/layouts/liquid-layout/index.mjs +4 -4
  322. package/dist/ui/modal.cjs +4 -4
  323. package/dist/ui/modal.mjs +4 -4
  324. package/dist/ui/navigation.cjs +4 -4
  325. package/dist/ui/navigation.d.cts +2 -2
  326. package/dist/ui/navigation.d.ts +2 -2
  327. package/dist/ui/navigation.mjs +4 -4
  328. package/dist/ui/pagination.cjs +4 -4
  329. package/dist/ui/pagination.mjs +4 -4
  330. package/dist/ui/popover.cjs +13 -9
  331. package/dist/ui/popover.d.cts +18 -8
  332. package/dist/ui/popover.d.ts +18 -8
  333. package/dist/ui/popover.mjs +5 -5
  334. package/dist/ui/progress.cjs +4 -4
  335. package/dist/ui/progress.mjs +4 -4
  336. package/dist/ui/radio-group.cjs +4 -4
  337. package/dist/ui/radio-group.mjs +4 -4
  338. package/dist/ui/resizable.cjs +4 -4
  339. package/dist/ui/resizable.d.cts +2 -2
  340. package/dist/ui/resizable.d.ts +2 -2
  341. package/dist/ui/resizable.mjs +4 -4
  342. package/dist/ui/select.cjs +16 -16
  343. package/dist/ui/select.d.cts +3 -2
  344. package/dist/ui/select.d.ts +3 -2
  345. package/dist/ui/select.mjs +5 -5
  346. package/dist/ui/separator.cjs +4 -4
  347. package/dist/ui/separator.mjs +4 -4
  348. package/dist/ui/sheet.cjs +4 -4
  349. package/dist/ui/sheet.mjs +4 -4
  350. package/dist/ui/sidebar.cjs +4 -4
  351. package/dist/ui/sidebar.mjs +4 -4
  352. package/dist/ui/simple-tree-view.cjs +4 -4
  353. package/dist/ui/simple-tree-view.d.cts +2 -2
  354. package/dist/ui/simple-tree-view.d.ts +2 -2
  355. package/dist/ui/simple-tree-view.mjs +4 -4
  356. package/dist/ui/skeleton.cjs +4 -4
  357. package/dist/ui/skeleton.mjs +4 -4
  358. package/dist/ui/slider.cjs +4 -4
  359. package/dist/ui/slider.d.cts +2 -2
  360. package/dist/ui/slider.d.ts +2 -2
  361. package/dist/ui/slider.mjs +4 -4
  362. package/dist/ui/switch.cjs +6 -6
  363. package/dist/ui/switch.d.cts +4 -1
  364. package/dist/ui/switch.d.ts +4 -1
  365. package/dist/ui/switch.mjs +5 -5
  366. package/dist/ui/table.cjs +4 -4
  367. package/dist/ui/table.d.cts +9 -9
  368. package/dist/ui/table.d.ts +9 -9
  369. package/dist/ui/table.mjs +4 -4
  370. package/dist/ui/tabs.cjs +13 -9
  371. package/dist/ui/tabs.d.cts +4 -1
  372. package/dist/ui/tabs.d.ts +4 -1
  373. package/dist/ui/tabs.mjs +5 -5
  374. package/dist/ui/textarea.cjs +4 -4
  375. package/dist/ui/textarea.d.cts +1 -1
  376. package/dist/ui/textarea.d.ts +1 -1
  377. package/dist/ui/textarea.mjs +4 -4
  378. package/dist/ui/theme/ThemeProvider.cjs +15 -15
  379. package/dist/ui/theme/ThemeProvider.d.cts +2 -2
  380. package/dist/ui/theme/ThemeProvider.d.ts +2 -2
  381. package/dist/ui/theme/ThemeProvider.mjs +1 -1
  382. package/dist/ui/theme/ThemeToggles.cjs +8 -8
  383. package/dist/ui/theme/ThemeToggles.d.cts +18 -3
  384. package/dist/ui/theme/ThemeToggles.d.ts +18 -3
  385. package/dist/ui/theme/ThemeToggles.mjs +6 -6
  386. package/dist/ui/theme/index.cjs +12 -12
  387. package/dist/ui/theme/index.mjs +6 -6
  388. package/dist/ui/theme/themeScript.d.cts +2 -2
  389. package/dist/ui/theme/themeScript.d.ts +2 -2
  390. package/dist/ui/toast.cjs +9 -9
  391. package/dist/ui/toast.mjs +7 -7
  392. package/dist/ui/toggle-buttons.cjs +4 -4
  393. package/dist/ui/toggle-buttons.d.cts +7 -7
  394. package/dist/ui/toggle-buttons.d.ts +7 -7
  395. package/dist/ui/toggle-buttons.mjs +4 -4
  396. package/dist/ui/toggle-group.cjs +4 -4
  397. package/dist/ui/toggle-group.d.cts +3 -3
  398. package/dist/ui/toggle-group.d.ts +3 -3
  399. package/dist/ui/toggle-group.mjs +4 -4
  400. package/dist/ui/toggle.cjs +4 -4
  401. package/dist/ui/toggle.mjs +4 -4
  402. package/dist/ui/toolbar.cjs +4 -4
  403. package/dist/ui/toolbar.mjs +4 -4
  404. package/dist/ui/tooltip.cjs +4 -4
  405. package/dist/ui/tooltip.mjs +4 -4
  406. package/dist/ui/tree-view/TreeSearchBar.cjs +4 -4
  407. package/dist/ui/tree-view/TreeSearchBar.mjs +4 -4
  408. package/dist/ui/tree-view/TreeView.cjs +7 -7
  409. package/dist/ui/tree-view/TreeView.mjs +5 -5
  410. package/dist/ui/tree-view/index.cjs +12 -12
  411. package/dist/ui/tree-view/index.mjs +6 -6
  412. package/dist/ui/tree-view/types.d.cts +1 -0
  413. package/dist/ui/tree-view/types.d.ts +1 -0
  414. package/dist/ui/tree-view-legacy.cjs +4 -4
  415. package/dist/ui/tree-view-legacy.mjs +4 -4
  416. package/dist/ui/virtual-grid/VirtualGrid.cjs +21 -0
  417. package/dist/ui/virtual-grid/VirtualGrid.d.cts +10 -0
  418. package/dist/ui/virtual-grid/VirtualGrid.d.ts +10 -0
  419. package/dist/ui/virtual-grid/VirtualGrid.mjs +12 -0
  420. package/dist/ui/virtual-grid/index.cjs +26 -0
  421. package/dist/ui/virtual-grid/index.d.cts +4 -0
  422. package/dist/ui/virtual-grid/index.d.ts +4 -0
  423. package/dist/ui/virtual-grid/index.mjs +13 -0
  424. package/dist/ui/virtual-grid/types.cjs +2 -0
  425. package/dist/ui/virtual-grid/types.d.cts +70 -0
  426. package/dist/ui/virtual-grid/types.d.ts +70 -0
  427. package/dist/ui/virtual-grid/types.mjs +1 -0
  428. package/dist/ui/virtual-grid/useVirtualGrid.cjs +10 -0
  429. package/dist/ui/virtual-grid/useVirtualGrid.d.cts +9 -0
  430. package/dist/ui/virtual-grid/useVirtualGrid.d.ts +9 -0
  431. package/dist/ui/virtual-grid/useVirtualGrid.mjs +1 -0
  432. package/dist/ui/virtual-list/VirtualList.cjs +21 -0
  433. package/dist/ui/virtual-list/VirtualList.d.cts +10 -0
  434. package/dist/ui/virtual-list/VirtualList.d.ts +10 -0
  435. package/dist/ui/virtual-list/VirtualList.mjs +12 -0
  436. package/dist/ui/virtual-list/index.cjs +26 -0
  437. package/dist/ui/virtual-list/index.d.cts +4 -0
  438. package/dist/ui/virtual-list/index.d.ts +4 -0
  439. package/dist/ui/virtual-list/index.mjs +13 -0
  440. package/dist/ui/virtual-list/types.cjs +2 -0
  441. package/dist/ui/virtual-list/types.d.cts +54 -0
  442. package/dist/ui/virtual-list/types.d.ts +54 -0
  443. package/dist/ui/virtual-list/types.mjs +1 -0
  444. package/dist/ui/virtual-list/useVirtualList.cjs +10 -0
  445. package/dist/ui/virtual-list/useVirtualList.d.cts +9 -0
  446. package/dist/ui/virtual-list/useVirtualList.d.ts +9 -0
  447. package/dist/ui/virtual-list/useVirtualList.mjs +1 -0
  448. package/dist/ui/waterfall/CursorOverlay.cjs +4 -4
  449. package/dist/ui/waterfall/CursorOverlay.mjs +4 -4
  450. package/dist/ui/waterfall/NavigationControls.d.cts +2 -2
  451. package/dist/ui/waterfall/NavigationControls.d.ts +2 -2
  452. package/dist/ui/waterfall/TimelineEvent.cjs +4 -4
  453. package/dist/ui/waterfall/TimelineEvent.mjs +4 -4
  454. package/dist/ui/waterfall/TimelineProcessBar.cjs +4 -4
  455. package/dist/ui/waterfall/TimelineProcessBar.mjs +4 -4
  456. package/dist/ui/waterfall/Wedges.cjs +4 -4
  457. package/dist/ui/waterfall/Wedges.mjs +4 -4
  458. package/dist/ui/waterfall/WheelZoomContext.d.cts +2 -2
  459. package/dist/ui/waterfall/WheelZoomContext.d.ts +2 -2
  460. package/dist/ui/waterfall/hooks/useTimelineState.d.cts +4 -3
  461. package/dist/ui/waterfall/hooks/useTimelineState.d.ts +4 -3
  462. package/dist/ui/waterfall/hooks/useViewport.d.cts +4 -4
  463. package/dist/ui/waterfall/hooks/useViewport.d.ts +4 -4
  464. package/dist/ui/waterfall/index.cjs +13 -13
  465. package/dist/ui/waterfall/index.d.cts +2 -2
  466. package/dist/ui/waterfall/index.d.ts +2 -2
  467. package/dist/ui/waterfall/index.mjs +12 -12
  468. package/package.json +5 -9
  469. package/src/dial/DialPanel.tsx +118 -6
  470. package/src/dial/components/DialButton.tsx +52 -0
  471. package/src/dial/components/DialCustom.tsx +45 -0
  472. package/src/dial/components/index.ts +3 -0
  473. package/src/dial/index.ts +4 -1
  474. package/src/dial/types.ts +4 -12
  475. package/src/dial/wrapped-inputs/ControlledInputs.tsx +16 -11
  476. package/src/dial/wrapped-inputs/DialArrayInput.tsx +175 -0
  477. package/src/dial/wrapped-inputs/DialInputs.tsx +117 -22
  478. package/src/dial/wrapped-inputs/DialInterfaceInput.tsx +48 -12
  479. package/src/dial/wrapped-inputs/DialPresetsInput.tsx +1 -1
  480. package/src/dial/wrapped-inputs/DialTupleInput.tsx +102 -0
  481. package/src/dial/wrapped-inputs/DialVectorInput.tsx +9 -4
  482. package/src/dial/wrapped-inputs/index.ts +6 -0
  483. package/src/highlight-cursor/cursor-provider.tsx +279 -131
  484. package/src/highlight-cursor/types.ts +2 -1
  485. package/src/styles/theme.css +2 -2
  486. package/src/ui/alert-dialog.tsx +168 -0
  487. package/src/ui/badge.tsx +1 -0
  488. package/src/ui/card.tsx +1 -5
  489. package/src/ui/index.ts +4 -0
  490. package/src/ui/inputs/color-input.tsx +92 -8
  491. package/src/ui/inputs/input-numbers.tsx +148 -92
  492. package/src/ui/inputs/number-inputs/VectorInput.tsx +2 -0
  493. package/src/ui/popover.tsx +10 -49
  494. package/src/ui/select.tsx +5 -2
  495. package/src/ui/switch.tsx +7 -2
  496. package/src/ui/tabs.tsx +2 -1
  497. package/src/ui/theme/ThemeProvider.tsx +4 -3
  498. package/src/ui/theme/ThemeToggles.tsx +48 -12
  499. package/src/ui/toast.tsx +1 -3
  500. package/src/ui/tree-view/TreeView.tsx +37 -8
  501. package/src/ui/tree-view/types.ts +1 -0
  502. package/src/ui/virtual-grid/VirtualGrid.tsx +345 -0
  503. package/src/ui/virtual-grid/index.ts +10 -0
  504. package/src/ui/virtual-grid/types.ts +72 -0
  505. package/src/ui/virtual-grid/useVirtualGrid.ts +243 -0
  506. package/src/ui/virtual-list/VirtualList.tsx +207 -0
  507. package/src/ui/virtual-list/index.ts +8 -0
  508. package/src/ui/virtual-list/types.ts +54 -0
  509. package/src/ui/virtual-list/useVirtualList.ts +203 -0
  510. package/dist/auth/components/index.d.cts +0 -2
  511. package/dist/auth/components/index.d.ts +0 -2
  512. package/dist/auth/components/user-avatar/index.cjs +0 -128
  513. package/dist/auth/components/user-avatar/index.d.cts +0 -8
  514. package/dist/auth/components/user-avatar/index.d.ts +0 -8
  515. package/dist/auth/components/user-avatar/index.mjs +0 -119
  516. package/dist/auth/context/user-context.cjs +0 -10
  517. package/dist/auth/context/user-context.d.cts +0 -13
  518. package/dist/auth/context/user-context.d.ts +0 -13
  519. package/dist/auth/context/user-context.mjs +0 -1
  520. package/dist/auth/handler/fetch-auth.cjs +0 -11
  521. package/dist/auth/handler/fetch-auth.d.cts +0 -3
  522. package/dist/auth/handler/fetch-auth.d.ts +0 -3
  523. package/dist/auth/handler/fetch-auth.mjs +0 -2
  524. package/dist/auth/handler/fetch-server.cjs +0 -11
  525. package/dist/auth/handler/fetch-server.d.cts +0 -3
  526. package/dist/auth/handler/fetch-server.d.ts +0 -3
  527. package/dist/auth/handler/fetch-server.mjs +0 -2
  528. package/dist/auth/handler/get-session.cjs +0 -12
  529. package/dist/auth/handler/get-session.d.cts +0 -21
  530. package/dist/auth/handler/get-session.d.ts +0 -21
  531. package/dist/auth/handler/get-session.mjs +0 -3
  532. package/dist/auth/handler/get-sessions.cjs +0 -12
  533. package/dist/auth/handler/get-sessions.d.cts +0 -21
  534. package/dist/auth/handler/get-sessions.d.ts +0 -21
  535. package/dist/auth/handler/get-sessions.mjs +0 -3
  536. package/dist/auth/handler/sign-in-handler.cjs +0 -11
  537. package/dist/auth/handler/sign-in-handler.d.cts +0 -6
  538. package/dist/auth/handler/sign-in-handler.d.ts +0 -6
  539. package/dist/auth/handler/sign-in-handler.mjs +0 -2
  540. package/dist/auth/handler/sign-out-handler.cjs +0 -12
  541. package/dist/auth/handler/sign-out-handler.d.cts +0 -5
  542. package/dist/auth/handler/sign-out-handler.d.ts +0 -5
  543. package/dist/auth/handler/sign-out-handler.mjs +0 -3
  544. package/dist/auth/hooks/use-sign-in.cjs +0 -14
  545. package/dist/auth/hooks/use-sign-in.d.cts +0 -9
  546. package/dist/auth/hooks/use-sign-in.d.ts +0 -9
  547. package/dist/auth/hooks/use-sign-in.mjs +0 -5
  548. package/dist/auth/hooks/use-sign-out.cjs +0 -15
  549. package/dist/auth/hooks/use-sign-out.d.cts +0 -6
  550. package/dist/auth/hooks/use-sign-out.d.ts +0 -6
  551. package/dist/auth/hooks/use-sign-out.mjs +0 -6
  552. package/dist/auth/hooks/use-user.cjs +0 -11
  553. package/dist/auth/hooks/use-user.d.cts +0 -8
  554. package/dist/auth/hooks/use-user.d.ts +0 -8
  555. package/dist/auth/hooks/use-user.mjs +0 -2
  556. package/dist/auth/hooks/use-vuer-sessions.cjs +0 -15
  557. package/dist/auth/hooks/use-vuer-sessions.d.cts +0 -9
  558. package/dist/auth/hooks/use-vuer-sessions.d.ts +0 -9
  559. package/dist/auth/hooks/use-vuer-sessions.mjs +0 -6
  560. package/dist/auth/index.cjs +0 -166
  561. package/dist/auth/index.d.cts +0 -13
  562. package/dist/auth/index.d.ts +0 -13
  563. package/dist/auth/index.mjs +0 -125
  564. package/dist/auth/localstorage-key.cjs +0 -14
  565. package/dist/auth/localstorage-key.d.cts +0 -4
  566. package/dist/auth/localstorage-key.d.ts +0 -4
  567. package/dist/auth/localstorage-key.mjs +0 -1
  568. package/dist/auth/types.d.cts +0 -27
  569. package/dist/auth/types.d.ts +0 -27
  570. package/dist/auth/vuer-user-provider.cjs +0 -14
  571. package/dist/auth/vuer-user-provider.d.cts +0 -9
  572. package/dist/auth/vuer-user-provider.d.ts +0 -9
  573. package/dist/auth/vuer-user-provider.mjs +0 -5
  574. package/dist/chunk-2DXJJLJL.mjs +0 -51
  575. package/dist/chunk-3WMO5QJJ.cjs +0 -8
  576. package/dist/chunk-4TRHQ7MJ.cjs +0 -68
  577. package/dist/chunk-5OHAV55L.mjs +0 -24
  578. package/dist/chunk-6GJM7TPE.cjs +0 -28
  579. package/dist/chunk-7E5Y224I.cjs +0 -14
  580. package/dist/chunk-7R5HY3IM.cjs +0 -12
  581. package/dist/chunk-C4U5BMQH.mjs +0 -206
  582. package/dist/chunk-EMVKGL5D.mjs +0 -28
  583. package/dist/chunk-EMXEFZEB.cjs +0 -30
  584. package/dist/chunk-F4Z5KATZ.cjs +0 -8
  585. package/dist/chunk-FROQ45MN.mjs +0 -6
  586. package/dist/chunk-HOMAESTR.mjs +0 -12
  587. package/dist/chunk-HZBP6QTE.cjs +0 -208
  588. package/dist/chunk-IKSER6BF.mjs +0 -66
  589. package/dist/chunk-KIZEJMW4.cjs +0 -15
  590. package/dist/chunk-MO5V43Z3.mjs +0 -13
  591. package/dist/chunk-MRMSCW3P.cjs +0 -19
  592. package/dist/chunk-OOHCJIRV.cjs +0 -26
  593. package/dist/chunk-PX2H7Z4D.mjs +0 -26
  594. package/dist/chunk-PXDT5GFJ.mjs +0 -13
  595. package/dist/chunk-Q76WU4DL.cjs +0 -17
  596. package/dist/chunk-RSBVQ7SJ.cjs +0 -54
  597. package/dist/chunk-RTZNHV43.cjs +0 -58
  598. package/dist/chunk-SO2UTKSV.mjs +0 -17
  599. package/dist/chunk-SQJL67BU.mjs +0 -56
  600. package/dist/chunk-UT7B4TLZ.mjs +0 -5
  601. package/dist/chunk-V4KDK3BN.mjs +0 -52
  602. package/dist/chunk-VSFPXAGN.mjs +0 -10
  603. package/dist/chunk-VSIOXWSI.cjs +0 -53
  604. package/dist/chunk-X3H6FYAM.cjs +0 -15
  605. package/dist/chunk-Z7BZFZEV.mjs +0 -15
  606. package/src/auth/components/index.ts +0 -1
  607. package/src/auth/components/user-avatar/index.tsx +0 -94
  608. package/src/auth/context/user-context.ts +0 -15
  609. package/src/auth/handler/fetch-auth.ts +0 -10
  610. package/src/auth/handler/fetch-server.ts +0 -10
  611. package/src/auth/handler/get-session.ts +0 -19
  612. package/src/auth/handler/get-sessions.ts +0 -16
  613. package/src/auth/handler/sign-in-handler.ts +0 -64
  614. package/src/auth/handler/sign-out-handler.ts +0 -9
  615. package/src/auth/hooks/use-sign-in.ts +0 -33
  616. package/src/auth/hooks/use-sign-out.ts +0 -30
  617. package/src/auth/hooks/use-user.ts +0 -10
  618. package/src/auth/hooks/use-vuer-sessions.ts +0 -29
  619. package/src/auth/index.ts +0 -12
  620. package/src/auth/localstorage-key.ts +0 -3
  621. package/src/auth/types.ts +0 -38
  622. package/src/auth/vuer-user-provider.tsx +0 -58
  623. /package/dist/{auth/types.mjs → chunk-6NZ5VXK7.mjs} +0 -0
  624. /package/dist/{auth/types.cjs → chunk-AS3GNGJN.cjs} +0 -0
  625. /package/dist/{chunk-NK7L5H2Y.cjs → chunk-DPILGC4Y.cjs} +0 -0
  626. /package/dist/{chunk-OBWKFURE.cjs → chunk-IM5QVMGO.cjs} +0 -0
  627. /package/dist/{chunk-U4AANBRZ.mjs → chunk-NU5W73NH.mjs} +0 -0
  628. /package/dist/{chunk-UXWS62ZO.mjs → chunk-O57DAVOQ.mjs} +0 -0
@@ -0,0 +1,345 @@
1
+ import React, {
2
+ forwardRef,
3
+ useCallback,
4
+ useEffect,
5
+ useLayoutEffect,
6
+ useRef,
7
+ useState,
8
+ type ComponentProps,
9
+ } from "react";
10
+
11
+ import type { VirtualGridProps } from "./types";
12
+ import { useVirtualGrid } from "./useVirtualGrid";
13
+ import { cn } from "../../hooks";
14
+
15
+ interface VirtualGridComponentProps<T>
16
+ extends Omit<ComponentProps<"div">, "children">,
17
+ VirtualGridProps<T> {}
18
+
19
+ /**
20
+ * VirtualGrid component - renders only visible cells for efficient grid rendering.
21
+ * Supports both fixed and variable row/column sizes, cell spanning, and sticky headers/columns.
22
+ *
23
+ * @param data - 2D array of cell data
24
+ * @param rowCount - Number of rows in the grid
25
+ * @param columnCount - Number of columns in the grid
26
+ * @param rowHeight - Height for each row (fixed or function)
27
+ * @param columnWidth - Width for each column (fixed or function)
28
+ * @param height - Container height
29
+ * @param width - Container width (default: '100%')
30
+ * @param overscanRows - Extra rows to render outside visible area (default: 2)
31
+ * @param overscanColumns - Extra columns to render outside visible area (default: 2)
32
+ * @param getCellKey - Function to get a unique key for each cell
33
+ * @param getColSpan - Function to get column span for a cell
34
+ * @param getRowSpan - Function to get row span for a cell
35
+ * @param children - Render function for each cell
36
+ * @param stickyHeader - Keep first row visible
37
+ * @param stickyColumn - Keep first column visible
38
+ */
39
+ function VirtualGridInner<T>(
40
+ {
41
+ data,
42
+ rowCount,
43
+ columnCount,
44
+ rowHeight,
45
+ columnWidth,
46
+ height,
47
+ width = "100%",
48
+ overscanRows = 2,
49
+ overscanColumns = 2,
50
+ getCellKey,
51
+ getColSpan,
52
+ getRowSpan,
53
+ children,
54
+ stickyHeader = false,
55
+ stickyColumn = false,
56
+ className,
57
+ style,
58
+ ...props
59
+ }: VirtualGridComponentProps<T>,
60
+ ref: React.ForwardedRef<HTMLDivElement>,
61
+ ) {
62
+ const containerRef = useRef<HTMLDivElement>(null);
63
+ const stickyLayerRef = useRef<HTMLDivElement>(null);
64
+ const [scrollTop, setScrollTop] = useState(0);
65
+ const [scrollLeft, setScrollLeft] = useState(0);
66
+ const [containerWidth, setContainerWidth] = useState(0);
67
+ const [containerHeight, setContainerHeight] = useState(0);
68
+
69
+ // Track scroll position in ref for immediate updates
70
+ const scrollRef = useRef({ top: 0, left: 0 });
71
+
72
+ // Combine refs
73
+ const setRefs = useCallback(
74
+ (node: HTMLDivElement | null) => {
75
+ (containerRef as React.MutableRefObject<HTMLDivElement | null>).current = node;
76
+ if (typeof ref === "function") {
77
+ ref(node);
78
+ } else if (ref) {
79
+ ref.current = node;
80
+ }
81
+ },
82
+ [ref],
83
+ );
84
+
85
+ // Measure container dimensions
86
+ useEffect(() => {
87
+ const container = containerRef.current;
88
+ if (!container) return;
89
+
90
+ const resizeObserver = new ResizeObserver((entries) => {
91
+ for (const entry of entries) {
92
+ setContainerWidth(entry.contentRect.width);
93
+ setContainerHeight(entry.contentRect.height);
94
+ }
95
+ });
96
+
97
+ resizeObserver.observe(container);
98
+ setContainerWidth(container.clientWidth);
99
+ setContainerHeight(container.clientHeight);
100
+
101
+ return () => resizeObserver.disconnect();
102
+ }, []);
103
+
104
+ const {
105
+ visibleRange,
106
+ totalWidth,
107
+ totalHeight,
108
+ getCellStyle,
109
+ getRowOffset,
110
+ getColumnOffset,
111
+ getRowHeight,
112
+ getColumnWidth,
113
+ } = useVirtualGrid({
114
+ rowCount,
115
+ columnCount,
116
+ rowHeight,
117
+ columnWidth,
118
+ containerWidth,
119
+ containerHeight,
120
+ scrollTop,
121
+ scrollLeft,
122
+ overscanRows,
123
+ overscanColumns,
124
+ getColSpan,
125
+ getRowSpan,
126
+ });
127
+
128
+ // Handle scroll - update CSS variables immediately, debounce state updates
129
+ const rafRef = useRef<number | null>(null);
130
+
131
+ const handleScroll = useCallback((e: React.UIEvent<HTMLDivElement>) => {
132
+ const newScrollTop = e.currentTarget.scrollTop;
133
+ const newScrollLeft = e.currentTarget.scrollLeft;
134
+
135
+ // Update ref immediately
136
+ scrollRef.current = { top: newScrollTop, left: newScrollLeft };
137
+
138
+ // Update CSS variables immediately for smooth sticky positioning
139
+ // Round to prevent sub-pixel jitter
140
+ if (stickyLayerRef.current) {
141
+ stickyLayerRef.current.style.setProperty("--scroll-top", `${Math.round(newScrollTop)}px`);
142
+ stickyLayerRef.current.style.setProperty("--scroll-left", `${Math.round(newScrollLeft)}px`);
143
+ }
144
+
145
+ // Debounce state updates for virtualization range calculation
146
+ if (rafRef.current) {
147
+ cancelAnimationFrame(rafRef.current);
148
+ }
149
+ rafRef.current = requestAnimationFrame(() => {
150
+ setScrollTop(newScrollTop);
151
+ setScrollLeft(newScrollLeft);
152
+ });
153
+ }, []);
154
+
155
+ // Cleanup RAF on unmount
156
+ useEffect(() => {
157
+ return () => {
158
+ if (rafRef.current) {
159
+ cancelAnimationFrame(rafRef.current);
160
+ }
161
+ };
162
+ }, []);
163
+
164
+ // Initialize CSS variables
165
+ useLayoutEffect(() => {
166
+ if (stickyLayerRef.current) {
167
+ stickyLayerRef.current.style.setProperty("--scroll-top", "0px");
168
+ stickyLayerRef.current.style.setProperty("--scroll-left", "0px");
169
+ }
170
+ }, []);
171
+
172
+ // Track which cells are covered by spans
173
+ const coveredCells = new Set<string>();
174
+
175
+ // Pre-calculate covered cells from spans
176
+ if (getColSpan || getRowSpan) {
177
+ for (let row = visibleRange.startRow; row <= visibleRange.endRow; row++) {
178
+ for (let col = visibleRange.startCol; col <= visibleRange.endCol; col++) {
179
+ const colspan = getColSpan?.(row, col) ?? 1;
180
+ const rowspan = getRowSpan?.(row, col) ?? 1;
181
+
182
+ if (colspan > 1 || rowspan > 1) {
183
+ for (let r = row; r < row + rowspan; r++) {
184
+ for (let c = col; c < col + colspan; c++) {
185
+ if (r !== row || c !== col) {
186
+ coveredCells.add(`${r}-${c}`);
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+
195
+ // Render visible cells
196
+ const visibleCells = [];
197
+ for (let row = visibleRange.startRow; row <= visibleRange.endRow && row < rowCount; row++) {
198
+ for (let col = visibleRange.startCol; col <= visibleRange.endCol && col < columnCount; col++) {
199
+ // Skip cells covered by spans
200
+ if (coveredCells.has(`${row}-${col}`)) {
201
+ continue;
202
+ }
203
+
204
+ // Skip header row and sticky column cells - they're rendered separately
205
+ if ((stickyHeader && row === 0) || (stickyColumn && col === 0)) {
206
+ continue;
207
+ }
208
+
209
+ const cellData = data[row]?.[col];
210
+ const key = getCellKey ? getCellKey(row, col) : `${row}-${col}`;
211
+ const cellStyle = getCellStyle(row, col);
212
+
213
+ visibleCells.push(
214
+ <React.Fragment key={key}>{children(cellData, row, col, cellStyle)}</React.Fragment>,
215
+ );
216
+ }
217
+ }
218
+
219
+ // Style for sticky cell content - fills the wrapper
220
+ const stickyContentStyle = { width: "100%", height: "100%" };
221
+
222
+ // Render sticky header cells (using CSS variable for Y position)
223
+ const stickyHeaderCells = [];
224
+ if (stickyHeader && rowCount > 0) {
225
+ for (let col = visibleRange.startCol; col <= visibleRange.endCol && col < columnCount; col++) {
226
+ // Skip first column if sticky column is enabled
227
+ if (stickyColumn && col === 0) continue;
228
+ if (coveredCells.has(`0-${col}`)) continue;
229
+
230
+ const cellData = data[0]?.[col];
231
+ const key = getCellKey ? getCellKey(0, col) : `header-${col}`;
232
+
233
+ stickyHeaderCells.push(
234
+ <div
235
+ key={key}
236
+ className="sticky-header-cell"
237
+ style={{
238
+ position: "absolute",
239
+ top: 0,
240
+ left: 0,
241
+ width: getColumnWidth(col),
242
+ height: getRowHeight(0),
243
+ transform: `translate3d(${getColumnOffset(col)}px, var(--scroll-top, 0px), 0)`,
244
+ willChange: "transform",
245
+ zIndex: 2,
246
+ }}
247
+ >
248
+ {children(cellData, 0, col, stickyContentStyle)}
249
+ </div>,
250
+ );
251
+ }
252
+ }
253
+
254
+ // Render sticky column cells (using CSS variable for X position)
255
+ const stickyColumnCells = [];
256
+ if (stickyColumn && columnCount > 0) {
257
+ for (let row = visibleRange.startRow; row <= visibleRange.endRow && row < rowCount; row++) {
258
+ // Skip first row if sticky header is enabled
259
+ if (stickyHeader && row === 0) continue;
260
+ if (coveredCells.has(`${row}-0`)) continue;
261
+
262
+ const cellData = data[row]?.[0];
263
+ const key = getCellKey ? getCellKey(row, 0) : `sticky-col-${row}`;
264
+
265
+ stickyColumnCells.push(
266
+ <div
267
+ key={key}
268
+ className="sticky-column-cell"
269
+ style={{
270
+ position: "absolute",
271
+ top: 0,
272
+ left: 0,
273
+ width: getColumnWidth(0),
274
+ height: getRowHeight(row),
275
+ transform: `translate3d(var(--scroll-left, 0px), ${getRowOffset(row)}px, 0)`,
276
+ willChange: "transform",
277
+ zIndex: 2,
278
+ }}
279
+ >
280
+ {children(cellData, row, 0, stickyContentStyle)}
281
+ </div>,
282
+ );
283
+ }
284
+ }
285
+
286
+ // Render sticky corner cell (using CSS variables for both X and Y)
287
+ const stickyCornerCell =
288
+ stickyHeader && stickyColumn && rowCount > 0 && columnCount > 0 ? (
289
+ <div
290
+ key="sticky-corner"
291
+ className="sticky-corner-cell"
292
+ style={{
293
+ position: "absolute",
294
+ top: 0,
295
+ left: 0,
296
+ width: getColumnWidth(0),
297
+ height: getRowHeight(0),
298
+ transform: `translate3d(var(--scroll-left, 0px), var(--scroll-top, 0px), 0)`,
299
+ willChange: "transform",
300
+ zIndex: 3,
301
+ }}
302
+ >
303
+ {children(data[0]?.[0], 0, 0, stickyContentStyle)}
304
+ </div>
305
+ ) : null;
306
+
307
+ const hasStickyElements = stickyHeader || stickyColumn;
308
+
309
+ return (
310
+ <div
311
+ ref={setRefs}
312
+ className={cn("relative overflow-auto", className)}
313
+ style={{
314
+ height,
315
+ width,
316
+ ...style,
317
+ }}
318
+ onScroll={handleScroll}
319
+ {...props}
320
+ >
321
+ <div
322
+ ref={hasStickyElements ? stickyLayerRef : undefined}
323
+ style={{
324
+ height: totalHeight,
325
+ width: totalWidth,
326
+ position: "relative",
327
+ }}
328
+ >
329
+ {/* Sticky elements first - stable position in DOM during scroll */}
330
+ {stickyCornerCell}
331
+ {stickyHeaderCells}
332
+ {stickyColumnCells}
333
+ {/* Visible cells last - changes frequently during scroll */}
334
+ {visibleCells}
335
+ </div>
336
+ </div>
337
+ );
338
+ }
339
+
340
+ // Use a generic forwardRef pattern
341
+ export const VirtualGrid = forwardRef(VirtualGridInner) as <T>(
342
+ props: VirtualGridComponentProps<T> & { ref?: React.ForwardedRef<HTMLDivElement> },
343
+ ) => React.ReactElement;
344
+
345
+ export type { VirtualGridProps };
@@ -0,0 +1,10 @@
1
+ export { VirtualGrid } from "./VirtualGrid";
2
+ export type {
3
+ VirtualGridProps,
4
+ RowHeight,
5
+ ColumnWidth,
6
+ GridRange,
7
+ UseVirtualGridOptions,
8
+ UseVirtualGridResult,
9
+ } from "./types";
10
+ export { useVirtualGrid } from "./useVirtualGrid";
@@ -0,0 +1,72 @@
1
+ import type { CSSProperties, ReactNode } from "react";
2
+
3
+ export type RowHeight = number | ((rowIndex: number) => number);
4
+ export type ColumnWidth = number | ((colIndex: number) => number);
5
+
6
+ export interface VirtualGridProps<T> {
7
+ /** 2D array of cell data */
8
+ data: T[][];
9
+ /** Number of rows in the grid */
10
+ rowCount: number;
11
+ /** Number of columns in the grid */
12
+ columnCount: number;
13
+ /** Height for each row - fixed number or function returning height for a given row */
14
+ rowHeight: RowHeight;
15
+ /** Width for each column - fixed number or function returning width for a given column */
16
+ columnWidth: ColumnWidth;
17
+ /** Container height */
18
+ height: number | string;
19
+ /** Container width (default: '100%') */
20
+ width?: number | string;
21
+ /** Number of extra rows to render outside visible area (default: 2) */
22
+ overscanRows?: number;
23
+ /** Number of extra columns to render outside visible area (default: 2) */
24
+ overscanColumns?: number;
25
+ /** Function to get a unique key for each cell */
26
+ getCellKey?: (row: number, col: number) => string;
27
+ /** Function to get column span for a cell (default: 1) */
28
+ getColSpan?: (row: number, col: number) => number;
29
+ /** Function to get row span for a cell (default: 1) */
30
+ getRowSpan?: (row: number, col: number) => number;
31
+ /** Render function for each cell */
32
+ children: (data: T, row: number, col: number, style: CSSProperties) => ReactNode;
33
+ /** Keep first row visible when scrolling vertically */
34
+ stickyHeader?: boolean;
35
+ /** Keep first column visible when scrolling horizontally */
36
+ stickyColumn?: boolean;
37
+ /** Additional className for the container */
38
+ className?: string;
39
+ }
40
+
41
+ export interface GridRange {
42
+ startRow: number;
43
+ endRow: number;
44
+ startCol: number;
45
+ endCol: number;
46
+ }
47
+
48
+ export interface UseVirtualGridOptions {
49
+ rowCount: number;
50
+ columnCount: number;
51
+ rowHeight: RowHeight;
52
+ columnWidth: ColumnWidth;
53
+ containerWidth: number;
54
+ containerHeight: number;
55
+ scrollTop: number;
56
+ scrollLeft: number;
57
+ overscanRows: number;
58
+ overscanColumns: number;
59
+ getColSpan?: (row: number, col: number) => number;
60
+ getRowSpan?: (row: number, col: number) => number;
61
+ }
62
+
63
+ export interface UseVirtualGridResult {
64
+ visibleRange: GridRange;
65
+ totalWidth: number;
66
+ totalHeight: number;
67
+ getRowOffset: (rowIndex: number) => number;
68
+ getColumnOffset: (colIndex: number) => number;
69
+ getRowHeight: (rowIndex: number) => number;
70
+ getColumnWidth: (colIndex: number) => number;
71
+ getCellStyle: (row: number, col: number) => CSSProperties;
72
+ }
@@ -0,0 +1,243 @@
1
+ import { useCallback, useMemo, type CSSProperties } from "react";
2
+
3
+ import type {
4
+ ColumnWidth,
5
+ GridRange,
6
+ RowHeight,
7
+ UseVirtualGridOptions,
8
+ UseVirtualGridResult,
9
+ } from "./types";
10
+
11
+ /**
12
+ * Get the height for a row
13
+ */
14
+ function getHeight(rowHeight: RowHeight, rowIndex: number): number {
15
+ return typeof rowHeight === "function" ? rowHeight(rowIndex) : rowHeight;
16
+ }
17
+
18
+ /**
19
+ * Get the width for a column
20
+ */
21
+ function getWidth(columnWidth: ColumnWidth, colIndex: number): number {
22
+ return typeof columnWidth === "function" ? columnWidth(colIndex) : columnWidth;
23
+ }
24
+
25
+ /**
26
+ * Binary search to find the start index for a given offset
27
+ */
28
+ function findStartIndex(
29
+ count: number,
30
+ scrollOffset: number,
31
+ getSize: (index: number) => number,
32
+ ): number {
33
+ if (count === 0) return 0;
34
+
35
+ let offset = 0;
36
+ let low = 0;
37
+ let high = count - 1;
38
+
39
+ // Binary search approximation
40
+ while (low <= high) {
41
+ const mid = Math.floor((low + high) / 2);
42
+
43
+ // Calculate offset for mid
44
+ let midOffset = 0;
45
+ for (let i = 0; i < mid; i++) {
46
+ midOffset += getSize(i);
47
+ }
48
+
49
+ if (midOffset < scrollOffset) {
50
+ low = mid + 1;
51
+ offset = midOffset;
52
+ } else if (midOffset > scrollOffset) {
53
+ high = mid - 1;
54
+ } else {
55
+ return mid;
56
+ }
57
+ }
58
+
59
+ // Fine-tune by scanning from low
60
+ let index = Math.max(0, low - 1);
61
+ offset = 0;
62
+ for (let i = 0; i < index; i++) {
63
+ offset += getSize(i);
64
+ }
65
+
66
+ while (index < count - 1 && offset + getSize(index) <= scrollOffset) {
67
+ offset += getSize(index);
68
+ index++;
69
+ }
70
+
71
+ return index;
72
+ }
73
+
74
+ /**
75
+ * Hook for virtualizing a 2D grid of items
76
+ */
77
+ export function useVirtualGrid({
78
+ rowCount,
79
+ columnCount,
80
+ rowHeight,
81
+ columnWidth,
82
+ containerWidth,
83
+ containerHeight,
84
+ scrollTop,
85
+ scrollLeft,
86
+ overscanRows,
87
+ overscanColumns,
88
+ getColSpan = () => 1,
89
+ getRowSpan = () => 1,
90
+ }: UseVirtualGridOptions): UseVirtualGridResult {
91
+ // Memoize size functions
92
+ const getRowHeightFn = useCallback((index: number) => getHeight(rowHeight, index), [rowHeight]);
93
+
94
+ const getColumnWidthFn = useCallback(
95
+ (index: number) => getWidth(columnWidth, index),
96
+ [columnWidth],
97
+ );
98
+
99
+ // Calculate total dimensions
100
+ const totalHeight = useMemo(() => {
101
+ let height = 0;
102
+ for (let i = 0; i < rowCount; i++) {
103
+ height += getRowHeightFn(i);
104
+ }
105
+ return height;
106
+ }, [rowCount, getRowHeightFn]);
107
+
108
+ const totalWidth = useMemo(() => {
109
+ let width = 0;
110
+ for (let i = 0; i < columnCount; i++) {
111
+ width += getColumnWidthFn(i);
112
+ }
113
+ return width;
114
+ }, [columnCount, getColumnWidthFn]);
115
+
116
+ // Calculate row offsets (memoized)
117
+ const rowOffsets = useMemo(() => {
118
+ const offsets: number[] = [0];
119
+ for (let i = 0; i < rowCount; i++) {
120
+ offsets.push(offsets[i] + getRowHeightFn(i));
121
+ }
122
+ return offsets;
123
+ }, [rowCount, getRowHeightFn]);
124
+
125
+ // Calculate column offsets (memoized)
126
+ const columnOffsets = useMemo(() => {
127
+ const offsets: number[] = [0];
128
+ for (let i = 0; i < columnCount; i++) {
129
+ offsets.push(offsets[i] + getColumnWidthFn(i));
130
+ }
131
+ return offsets;
132
+ }, [columnCount, getColumnWidthFn]);
133
+
134
+ // Get offset for a row
135
+ const getRowOffset = useCallback((rowIndex: number) => rowOffsets[rowIndex] ?? 0, [rowOffsets]);
136
+
137
+ // Get offset for a column
138
+ const getColumnOffset = useCallback(
139
+ (colIndex: number) => columnOffsets[colIndex] ?? 0,
140
+ [columnOffsets],
141
+ );
142
+
143
+ // Calculate visible range
144
+ const visibleRange = useMemo<GridRange>(() => {
145
+ if (rowCount === 0 || columnCount === 0) {
146
+ return { startRow: 0, endRow: 0, startCol: 0, endCol: 0 };
147
+ }
148
+
149
+ // Find start row
150
+ const startRow = findStartIndex(rowCount, scrollTop, getRowHeightFn);
151
+
152
+ // Find end row
153
+ let endRow = startRow;
154
+ let accumulatedHeight = getRowOffset(startRow) - scrollTop;
155
+ while (endRow < rowCount - 1 && accumulatedHeight < containerHeight) {
156
+ accumulatedHeight += getRowHeightFn(endRow);
157
+ endRow++;
158
+ }
159
+
160
+ // Find start column
161
+ const startCol = findStartIndex(columnCount, scrollLeft, getColumnWidthFn);
162
+
163
+ // Find end column
164
+ let endCol = startCol;
165
+ let accumulatedWidth = getColumnOffset(startCol) - scrollLeft;
166
+ while (endCol < columnCount - 1 && accumulatedWidth < containerWidth) {
167
+ accumulatedWidth += getColumnWidthFn(endCol);
168
+ endCol++;
169
+ }
170
+
171
+ return {
172
+ startRow: Math.max(0, startRow - overscanRows),
173
+ endRow: Math.min(rowCount - 1, endRow + overscanRows),
174
+ startCol: Math.max(0, startCol - overscanColumns),
175
+ endCol: Math.min(columnCount - 1, endCol + overscanColumns),
176
+ };
177
+ }, [
178
+ rowCount,
179
+ columnCount,
180
+ scrollTop,
181
+ scrollLeft,
182
+ containerHeight,
183
+ containerWidth,
184
+ overscanRows,
185
+ overscanColumns,
186
+ getRowHeightFn,
187
+ getColumnWidthFn,
188
+ getRowOffset,
189
+ getColumnOffset,
190
+ ]);
191
+
192
+ // Get style for a cell
193
+ const getCellStyle = useCallback(
194
+ (row: number, col: number): CSSProperties => {
195
+ const top = getRowOffset(row);
196
+ const left = getColumnOffset(col);
197
+
198
+ // Calculate width with colspan
199
+ const colspan = getColSpan(row, col);
200
+ let width = 0;
201
+ for (let c = col; c < col + colspan && c < columnCount; c++) {
202
+ width += getColumnWidthFn(c);
203
+ }
204
+
205
+ // Calculate height with rowspan
206
+ const rowspan = getRowSpan(row, col);
207
+ let height = 0;
208
+ for (let r = row; r < row + rowspan && r < rowCount; r++) {
209
+ height += getRowHeightFn(r);
210
+ }
211
+
212
+ return {
213
+ position: "absolute",
214
+ top: 0,
215
+ left: 0,
216
+ width,
217
+ height,
218
+ transform: `translate(${left}px, ${top}px)`,
219
+ };
220
+ },
221
+ [
222
+ getRowOffset,
223
+ getColumnOffset,
224
+ getColSpan,
225
+ getRowSpan,
226
+ columnCount,
227
+ rowCount,
228
+ getColumnWidthFn,
229
+ getRowHeightFn,
230
+ ],
231
+ );
232
+
233
+ return {
234
+ visibleRange,
235
+ totalWidth,
236
+ totalHeight,
237
+ getRowOffset,
238
+ getColumnOffset,
239
+ getRowHeight: getRowHeightFn,
240
+ getColumnWidth: getColumnWidthFn,
241
+ getCellStyle,
242
+ };
243
+ }