@vuer-ai/vuer-uikit 0.0.45 → 0.0.48

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 (326) hide show
  1. package/dist/{chunk-RFVRJ4XV.js → chunk-25I4OTUA.js} +1 -1
  2. package/dist/chunk-4HJQPZQ2.js +139 -0
  3. package/dist/chunk-53PX4SCN.js +61 -0
  4. package/dist/chunk-7NHWT7CO.mjs +26 -0
  5. package/dist/{chunk-NSN3O6CZ.mjs → chunk-AQENEOV3.mjs} +2 -2
  6. package/dist/{chunk-NKNUMZJL.mjs → chunk-DDG2W6BX.mjs} +36 -27
  7. package/dist/{chunk-KDRYDUQT.js → chunk-DWK23X7J.js} +1 -0
  8. package/dist/{chunk-R3SHGA4V.js → chunk-EOTROHFU.js} +36 -27
  9. package/dist/chunk-GCIH5IMQ.mjs +118 -0
  10. package/dist/chunk-HOQHWWLY.mjs +37 -0
  11. package/dist/{chunk-AKBWNVRH.js → chunk-HYVF2TGW.js} +2 -2
  12. package/dist/chunk-JBQP2CBI.mjs +136 -0
  13. package/dist/chunk-KYWKRMXK.js +48 -0
  14. package/dist/chunk-N6DZ364I.mjs +15 -0
  15. package/dist/chunk-NXTGTCPA.mjs +19 -0
  16. package/dist/{chunk-MFXAWZIK.mjs → chunk-PDXJXH4A.mjs} +1 -1
  17. package/dist/chunk-PF36CKO7.mjs +599 -0
  18. package/dist/{chunk-I5UCKLLT.mjs → chunk-PZ3FWTMB.mjs} +1 -1
  19. package/dist/chunk-QPQSH53G.js +17 -0
  20. package/dist/chunk-QQMHPZFI.js +92 -0
  21. package/dist/chunk-TVKPO5VK.mjs +32 -0
  22. package/dist/chunk-UBVYEZI3.js +2 -0
  23. package/dist/chunk-UZFOWGVD.mjs +90 -0
  24. package/dist/chunk-VAEPAW5L.js +126 -0
  25. package/dist/{chunk-M3S7NSGR.mjs → chunk-VSFCQCKQ.mjs} +2 -2
  26. package/dist/{chunk-LD654LL2.mjs → chunk-VSYSYSVQ.mjs} +47 -31
  27. package/dist/{chunk-NC6NIC5C.js → chunk-WEHNW5KY.js} +2 -2
  28. package/dist/chunk-WRF3C24J.js +34 -0
  29. package/dist/{chunk-HE63LZKF.js → chunk-XBKQWS7J.js} +3 -3
  30. package/dist/{chunk-THPNMIDZ.mjs → chunk-XPHG4P4D.mjs} +1 -1
  31. package/dist/chunk-YFPY5SLS.js +41 -0
  32. package/dist/{chunk-XWC6N2UQ.js → chunk-YNKO5FOU.js} +47 -31
  33. package/dist/chunk-YOKGP5F7.js +624 -0
  34. package/dist/chunk-ZFWQLAQA.mjs +1 -0
  35. package/dist/highlight-cursor/cursor-context.d.mts +7 -0
  36. package/dist/highlight-cursor/cursor-context.d.ts +7 -0
  37. package/dist/highlight-cursor/cursor-provider.d.mts +7 -0
  38. package/dist/highlight-cursor/cursor-provider.d.ts +7 -0
  39. package/dist/highlight-cursor/cursor-provider.js +2 -2
  40. package/dist/highlight-cursor/cursor-provider.mjs +1 -1
  41. package/dist/highlight-cursor/enhanced-components.d.mts +20 -0
  42. package/dist/highlight-cursor/enhanced-components.d.ts +20 -0
  43. package/dist/highlight-cursor/enhanced-components.js +11 -10
  44. package/dist/highlight-cursor/enhanced-components.mjs +6 -5
  45. package/dist/highlight-cursor/index.d.mts +16 -0
  46. package/dist/highlight-cursor/index.d.ts +16 -0
  47. package/dist/highlight-cursor/index.js +13 -12
  48. package/dist/highlight-cursor/index.mjs +7 -6
  49. package/dist/highlight-cursor/tabs-cursor-context.d.mts +14 -0
  50. package/dist/highlight-cursor/tabs-cursor-context.d.ts +14 -0
  51. package/dist/highlight-cursor/types.d.mts +39 -0
  52. package/dist/highlight-cursor/types.d.ts +39 -0
  53. package/dist/highlight-cursor/with-cursor.d.mts +7 -0
  54. package/dist/highlight-cursor/with-cursor.d.ts +7 -0
  55. package/dist/hooks/clientOnly.d.mts +27 -0
  56. package/dist/hooks/clientOnly.d.ts +27 -0
  57. package/dist/hooks/cn.d.mts +5 -0
  58. package/dist/hooks/cn.d.ts +5 -0
  59. package/dist/hooks/index.d.mts +8 -0
  60. package/dist/hooks/index.d.ts +8 -0
  61. package/dist/hooks/index.js +11 -6
  62. package/dist/hooks/index.mjs +3 -2
  63. package/dist/hooks/use-mobile.d.mts +3 -0
  64. package/dist/hooks/use-mobile.d.ts +3 -0
  65. package/dist/hooks/use-mobile.js +10 -0
  66. package/dist/hooks/use-mobile.mjs +1 -0
  67. package/dist/hooks/useDocument.d.mts +3 -0
  68. package/dist/hooks/useDocument.d.ts +3 -0
  69. package/dist/hooks/useDragSelect.d.mts +15 -0
  70. package/dist/hooks/useDragSelect.d.ts +15 -0
  71. package/dist/hooks/useDragSelect.js +10 -0
  72. package/dist/hooks/useDragSelect.mjs +1 -0
  73. package/dist/hooks/useLocalStorage.d.mts +3 -0
  74. package/dist/hooks/useLocalStorage.d.ts +3 -0
  75. package/dist/hooks/useWindow.d.mts +3 -0
  76. package/dist/hooks/useWindow.d.ts +3 -0
  77. package/dist/index.d.mts +85 -0
  78. package/dist/index.d.ts +85 -0
  79. package/dist/index.js +333 -167
  80. package/dist/index.mjs +34 -24
  81. package/dist/styles/theme.d.mts +2 -0
  82. package/dist/styles/theme.d.ts +2 -0
  83. package/dist/styles/toast.d.mts +2 -0
  84. package/dist/styles/toast.d.ts +2 -0
  85. package/dist/styles/variables.d.mts +2 -0
  86. package/dist/styles/variables.d.ts +2 -0
  87. package/dist/ui/avatar.d.mts +126 -0
  88. package/dist/ui/avatar.d.ts +126 -0
  89. package/dist/ui/avatar.js +3 -2
  90. package/dist/ui/avatar.mjs +3 -2
  91. package/dist/ui/badge.d.mts +14 -0
  92. package/dist/ui/badge.d.ts +14 -0
  93. package/dist/ui/badge.js +3 -2
  94. package/dist/ui/badge.mjs +3 -2
  95. package/dist/ui/button.d.mts +25 -0
  96. package/dist/ui/button.d.ts +25 -0
  97. package/dist/ui/button.js +9 -4
  98. package/dist/ui/button.mjs +4 -3
  99. package/dist/ui/card.d.mts +33 -0
  100. package/dist/ui/card.d.ts +33 -0
  101. package/dist/ui/card.js +3 -2
  102. package/dist/ui/card.mjs +3 -2
  103. package/dist/ui/checkbox.d.mts +11 -0
  104. package/dist/ui/checkbox.d.ts +11 -0
  105. package/dist/ui/checkbox.js +3 -2
  106. package/dist/ui/checkbox.mjs +3 -2
  107. package/dist/ui/collapsible.d.mts +8 -0
  108. package/dist/ui/collapsible.d.ts +8 -0
  109. package/dist/ui/collapsible.js +3 -2
  110. package/dist/ui/collapsible.mjs +3 -2
  111. package/dist/ui/drag-selectable/DragSelectProvider.d.mts +22 -0
  112. package/dist/ui/drag-selectable/DragSelectProvider.d.ts +22 -0
  113. package/dist/ui/drag-selectable/DragSelectProvider.js +14 -0
  114. package/dist/ui/drag-selectable/DragSelectProvider.mjs +1 -0
  115. package/dist/ui/drag-selectable/createSelectable.d.mts +16 -0
  116. package/dist/ui/drag-selectable/createSelectable.d.ts +16 -0
  117. package/dist/ui/drag-selectable/createSelectable.js +11 -0
  118. package/dist/ui/drag-selectable/createSelectable.mjs +2 -0
  119. package/dist/ui/drag-selectable/index.d.mts +4 -0
  120. package/dist/ui/drag-selectable/index.d.ts +4 -0
  121. package/dist/ui/drag-selectable/index.js +20 -0
  122. package/dist/ui/drag-selectable/index.mjs +3 -0
  123. package/dist/ui/drawer.d.mts +34 -0
  124. package/dist/ui/drawer.d.ts +34 -0
  125. package/dist/ui/drawer.js +3 -2
  126. package/dist/ui/drawer.mjs +3 -2
  127. package/dist/ui/dropdown.d.mts +29 -0
  128. package/dist/ui/dropdown.d.ts +29 -0
  129. package/dist/ui/dropdown.js +3 -2
  130. package/dist/ui/dropdown.mjs +3 -2
  131. package/dist/ui/form/CmInput.d.mts +11 -0
  132. package/dist/ui/form/CmInput.d.ts +11 -0
  133. package/dist/ui/form/CmInput.js +3 -2
  134. package/dist/ui/form/CmInput.mjs +3 -2
  135. package/dist/ui/form/DegInput.d.mts +11 -0
  136. package/dist/ui/form/DegInput.d.ts +11 -0
  137. package/dist/ui/form/DegInput.js +3 -2
  138. package/dist/ui/form/DegInput.mjs +3 -2
  139. package/dist/ui/form/EulerDegInput.d.mts +13 -0
  140. package/dist/ui/form/EulerDegInput.d.ts +13 -0
  141. package/dist/ui/form/EulerDegInput.js +3 -2
  142. package/dist/ui/form/EulerDegInput.mjs +3 -2
  143. package/dist/ui/form/EulerInput.d.mts +15 -0
  144. package/dist/ui/form/EulerInput.d.ts +15 -0
  145. package/dist/ui/form/EulerInput.js +3 -2
  146. package/dist/ui/form/EulerInput.mjs +3 -2
  147. package/dist/ui/form/EulerRadInput.d.mts +13 -0
  148. package/dist/ui/form/EulerRadInput.d.ts +13 -0
  149. package/dist/ui/form/EulerRadInput.js +3 -2
  150. package/dist/ui/form/EulerRadInput.mjs +3 -2
  151. package/dist/ui/form/InchInput.d.mts +11 -0
  152. package/dist/ui/form/InchInput.d.ts +11 -0
  153. package/dist/ui/form/InchInput.js +3 -2
  154. package/dist/ui/form/InchInput.mjs +3 -2
  155. package/dist/ui/form/IntInput.d.mts +11 -0
  156. package/dist/ui/form/IntInput.d.ts +11 -0
  157. package/dist/ui/form/IntInput.js +3 -2
  158. package/dist/ui/form/IntInput.mjs +3 -2
  159. package/dist/ui/form/KVectorInput.d.mts +13 -0
  160. package/dist/ui/form/KVectorInput.d.ts +13 -0
  161. package/dist/ui/form/KVectorInput.js +3 -2
  162. package/dist/ui/form/KVectorInput.mjs +3 -2
  163. package/dist/ui/form/NumberInput.d.mts +11 -0
  164. package/dist/ui/form/NumberInput.d.ts +11 -0
  165. package/dist/ui/form/NumberInput.js +3 -2
  166. package/dist/ui/form/NumberInput.mjs +3 -2
  167. package/dist/ui/form/QuaternionInput.d.mts +14 -0
  168. package/dist/ui/form/QuaternionInput.d.ts +14 -0
  169. package/dist/ui/form/QuaternionInput.js +3 -2
  170. package/dist/ui/form/QuaternionInput.mjs +3 -2
  171. package/dist/ui/form/RadInput.d.mts +11 -0
  172. package/dist/ui/form/RadInput.d.ts +11 -0
  173. package/dist/ui/form/RadInput.js +3 -2
  174. package/dist/ui/form/RadInput.mjs +3 -2
  175. package/dist/ui/form/TimeInput.d.mts +11 -0
  176. package/dist/ui/form/TimeInput.d.ts +11 -0
  177. package/dist/ui/form/TimeInput.js +3 -2
  178. package/dist/ui/form/TimeInput.mjs +3 -2
  179. package/dist/ui/form/Vec3Input.d.mts +14 -0
  180. package/dist/ui/form/Vec3Input.d.ts +14 -0
  181. package/dist/ui/form/Vec3Input.js +3 -2
  182. package/dist/ui/form/Vec3Input.mjs +3 -2
  183. package/dist/ui/form/VectorInput.d.mts +14 -0
  184. package/dist/ui/form/VectorInput.d.ts +14 -0
  185. package/dist/ui/form/VectorInput.js +3 -2
  186. package/dist/ui/form/VectorInput.mjs +3 -2
  187. package/dist/ui/form/index.d.mts +19 -0
  188. package/dist/ui/form/index.d.ts +19 -0
  189. package/dist/ui/form/index.js +18 -17
  190. package/dist/ui/form/index.mjs +6 -5
  191. package/dist/ui/index.d.mts +73 -0
  192. package/dist/ui/index.d.ts +73 -0
  193. package/dist/ui/index.js +311 -149
  194. package/dist/ui/index.mjs +32 -22
  195. package/dist/ui/input-numbers.d.mts +14 -0
  196. package/dist/ui/input-numbers.d.ts +14 -0
  197. package/dist/ui/input-numbers.js +3 -2
  198. package/dist/ui/input-numbers.mjs +3 -2
  199. package/dist/ui/input.d.mts +37 -0
  200. package/dist/ui/input.d.ts +37 -0
  201. package/dist/ui/input.js +3 -2
  202. package/dist/ui/input.mjs +3 -2
  203. package/dist/ui/layout.d.mts +15 -0
  204. package/dist/ui/layout.d.ts +15 -0
  205. package/dist/ui/layout.js +3 -2
  206. package/dist/ui/layout.mjs +3 -2
  207. package/dist/ui/modal.d.mts +32 -0
  208. package/dist/ui/modal.d.ts +32 -0
  209. package/dist/ui/modal.js +3 -2
  210. package/dist/ui/modal.mjs +3 -2
  211. package/dist/ui/pagination.d.mts +18 -0
  212. package/dist/ui/pagination.d.ts +18 -0
  213. package/dist/ui/pagination.js +43 -0
  214. package/dist/ui/pagination.mjs +10 -0
  215. package/dist/ui/popover.d.mts +11 -0
  216. package/dist/ui/popover.d.ts +11 -0
  217. package/dist/ui/popover.js +3 -2
  218. package/dist/ui/popover.mjs +3 -2
  219. package/dist/ui/radio-group.d.mts +14 -0
  220. package/dist/ui/radio-group.d.ts +14 -0
  221. package/dist/ui/radio-group.js +3 -2
  222. package/dist/ui/radio-group.mjs +3 -2
  223. package/dist/ui/resizable.d.mts +14 -0
  224. package/dist/ui/resizable.d.ts +14 -0
  225. package/dist/ui/resizable.js +25 -0
  226. package/dist/ui/resizable.mjs +8 -0
  227. package/dist/ui/select.d.mts +78 -0
  228. package/dist/ui/select.d.ts +78 -0
  229. package/dist/ui/select.js +3 -2
  230. package/dist/ui/select.mjs +3 -2
  231. package/dist/ui/separator.d.mts +7 -0
  232. package/dist/ui/separator.d.ts +7 -0
  233. package/dist/ui/separator.js +17 -0
  234. package/dist/ui/separator.mjs +8 -0
  235. package/dist/ui/sheet.d.mts +23 -0
  236. package/dist/ui/sheet.d.ts +23 -0
  237. package/dist/ui/sheet.js +3 -2
  238. package/dist/ui/sheet.mjs +3 -2
  239. package/dist/ui/sidebar.d.mts +75 -0
  240. package/dist/ui/sidebar.d.ts +75 -0
  241. package/dist/ui/sidebar.js +116 -0
  242. package/dist/ui/sidebar.mjs +15 -0
  243. package/dist/ui/skeleton.d.mts +6 -0
  244. package/dist/ui/skeleton.d.ts +6 -0
  245. package/dist/ui/skeleton.js +17 -0
  246. package/dist/ui/skeleton.mjs +8 -0
  247. package/dist/ui/slider.d.mts +10 -0
  248. package/dist/ui/slider.d.ts +10 -0
  249. package/dist/ui/slider.js +3 -2
  250. package/dist/ui/slider.mjs +3 -2
  251. package/dist/ui/switch.d.mts +6 -0
  252. package/dist/ui/switch.d.ts +6 -0
  253. package/dist/ui/switch.js +3 -2
  254. package/dist/ui/switch.mjs +3 -2
  255. package/dist/ui/tabs.d.mts +16 -0
  256. package/dist/ui/tabs.d.ts +16 -0
  257. package/dist/ui/tabs.js +3 -2
  258. package/dist/ui/tabs.mjs +3 -2
  259. package/dist/ui/textarea.d.mts +19 -0
  260. package/dist/ui/textarea.d.ts +19 -0
  261. package/dist/ui/textarea.js +3 -2
  262. package/dist/ui/textarea.mjs +3 -2
  263. package/dist/ui/theme/ThemeProvider.d.mts +16 -0
  264. package/dist/ui/theme/ThemeProvider.d.ts +16 -0
  265. package/dist/ui/theme/index.d.mts +5 -0
  266. package/dist/ui/theme/index.d.ts +5 -0
  267. package/dist/ui/theme/themeScript.d.mts +19 -0
  268. package/dist/ui/theme/themeScript.d.ts +19 -0
  269. package/dist/ui/theme/types.d.mts +47 -0
  270. package/dist/ui/theme/types.d.ts +47 -0
  271. package/dist/ui/timeline.d.mts +42 -0
  272. package/dist/ui/timeline.d.ts +42 -0
  273. package/dist/ui/timeline.js +6 -5
  274. package/dist/ui/timeline.mjs +5 -4
  275. package/dist/ui/toast.d.mts +10 -0
  276. package/dist/ui/toast.d.ts +10 -0
  277. package/dist/ui/toggle-group.d.mts +15 -0
  278. package/dist/ui/toggle-group.d.ts +15 -0
  279. package/dist/ui/toggle-group.js +3 -2
  280. package/dist/ui/toggle-group.mjs +3 -2
  281. package/dist/ui/toggle.d.mts +18 -0
  282. package/dist/ui/toggle.d.ts +18 -0
  283. package/dist/ui/toggle.js +3 -2
  284. package/dist/ui/toggle.mjs +3 -2
  285. package/dist/ui/tooltip.d.mts +22 -0
  286. package/dist/ui/tooltip.d.ts +22 -0
  287. package/dist/ui/tooltip.js +3 -2
  288. package/dist/ui/tooltip.mjs +3 -2
  289. package/dist/ui/tree-view-v2.d.mts +39 -0
  290. package/dist/ui/tree-view-v2.d.ts +39 -0
  291. package/dist/ui/tree-view-v2.js +5 -4
  292. package/dist/ui/tree-view-v2.mjs +4 -3
  293. package/dist/ui/tree-view.d.mts +31 -0
  294. package/dist/ui/tree-view.d.ts +31 -0
  295. package/dist/ui/tree-view.js +5 -4
  296. package/dist/ui/tree-view.mjs +4 -3
  297. package/dist/ui/version-badge.d.mts +26 -0
  298. package/dist/ui/version-badge.d.ts +26 -0
  299. package/dist/ui/version-badge.js +5 -4
  300. package/dist/ui/version-badge.mjs +4 -3
  301. package/package.json +4 -2
  302. package/src/highlight-cursor/cursor-provider.tsx +2 -2
  303. package/src/hooks/clientOnly.tsx +5 -5
  304. package/src/hooks/index.ts +1 -0
  305. package/src/hooks/use-mobile.ts +19 -0
  306. package/src/hooks/useDragSelect.ts +107 -0
  307. package/src/ui/button.tsx +1 -1
  308. package/src/ui/drag-selectable/DragSelectProvider.tsx +178 -0
  309. package/src/ui/drag-selectable/createSelectable.tsx +42 -0
  310. package/src/ui/drag-selectable/index.ts +2 -0
  311. package/src/ui/form/EulerInput.tsx +1 -1
  312. package/src/ui/form/QuaternionInput.tsx +1 -1
  313. package/src/ui/form/Vec3Input.tsx +1 -1
  314. package/src/ui/index.ts +4 -0
  315. package/src/ui/pagination.tsx +130 -0
  316. package/src/ui/resizable.tsx +50 -0
  317. package/src/ui/select.tsx +0 -1
  318. package/src/ui/separator.tsx +26 -0
  319. package/src/ui/sidebar.tsx +694 -0
  320. package/src/ui/skeleton.tsx +15 -0
  321. package/src/ui/tree-view-v2.tsx +48 -23
  322. package/src/ui/tree-view.tsx +7 -2
  323. /package/dist/{chunk-LXDQ4KMN.mjs → chunk-AYKQVWMR.mjs} +0 -0
  324. /package/dist/{chunk-NACWD4CC.js → chunk-GLGYNU3Q.js} +0 -0
  325. /package/dist/{chunk-T4N7UHZ7.js → chunk-JFSQNIDX.js} +0 -0
  326. /package/dist/{chunk-YRM45Z7N.mjs → chunk-KHROZRRE.mjs} +0 -0
@@ -3,7 +3,7 @@
3
3
  var chunkILJK43VJ_js = require('./chunk-ILJK43VJ.js');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
 
6
- var PACKAGE_VERSION = "0.0.45" ;
6
+ var PACKAGE_VERSION = "0.0.48" ;
7
7
  var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
8
8
  function VersionBadge({
9
9
  className,
@@ -0,0 +1,139 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ // src/ui/drag-selectable/DragSelectProvider.tsx
7
+ var DragSelectContext = react.createContext(void 0);
8
+ var DragSelectProvider = ({ children }) => {
9
+ const [selectedItems, setSelectedItems] = react.useState(/* @__PURE__ */ new Set());
10
+ const [isDragging, setIsDragging] = react.useState(false);
11
+ const dragStartId = react.useRef(null);
12
+ const dragMode = react.useRef("replace");
13
+ const dragStartSelection = react.useRef(/* @__PURE__ */ new Set());
14
+ const registeredItems = react.useRef(/* @__PURE__ */ new Map());
15
+ const registerItem = react.useCallback((id, index) => {
16
+ registeredItems.current.set(id, index);
17
+ }, []);
18
+ const unregisterItem = react.useCallback((id) => {
19
+ registeredItems.current.delete(id);
20
+ }, []);
21
+ const startDrag = react.useCallback(
22
+ (startId, mode = "replace") => {
23
+ setIsDragging(true);
24
+ dragStartId.current = startId;
25
+ dragMode.current = mode;
26
+ dragStartSelection.current = new Set(selectedItems);
27
+ if (mode === "replace") {
28
+ setSelectedItems(/* @__PURE__ */ new Set([startId]));
29
+ } else if (mode === "add") {
30
+ setSelectedItems((prev) => new Set(Array.from(prev).concat([startId])));
31
+ } else if (mode === "toggle") {
32
+ setSelectedItems((prev) => {
33
+ const newSelection = new Set(prev);
34
+ if (newSelection.has(startId)) {
35
+ newSelection.delete(startId);
36
+ } else {
37
+ newSelection.add(startId);
38
+ }
39
+ return newSelection;
40
+ });
41
+ }
42
+ },
43
+ [selectedItems]
44
+ );
45
+ const updateSelection = react.useCallback(
46
+ (currentId) => {
47
+ if (!isDragging || !dragStartId.current) return;
48
+ const startIndex = registeredItems.current.get(dragStartId.current);
49
+ const currentIndex = registeredItems.current.get(currentId);
50
+ if (startIndex === void 0 || currentIndex === void 0) return;
51
+ const minIndex = Math.min(startIndex, currentIndex);
52
+ const maxIndex = Math.max(startIndex, currentIndex);
53
+ const dragSelection = /* @__PURE__ */ new Set();
54
+ Array.from(registeredItems.current.entries()).forEach(([itemId, itemIndex]) => {
55
+ if (itemIndex >= minIndex && itemIndex <= maxIndex) {
56
+ dragSelection.add(itemId);
57
+ }
58
+ });
59
+ if (dragMode.current === "replace") {
60
+ setSelectedItems(dragSelection);
61
+ } else if (dragMode.current === "add") {
62
+ setSelectedItems(
63
+ () => new Set(Array.from(dragStartSelection.current).concat(Array.from(dragSelection)))
64
+ );
65
+ } else if (dragMode.current === "toggle") {
66
+ setSelectedItems(() => {
67
+ const newSelection = new Set(dragStartSelection.current);
68
+ Array.from(dragSelection).forEach((itemId) => {
69
+ if (newSelection.has(itemId)) {
70
+ newSelection.delete(itemId);
71
+ } else {
72
+ newSelection.add(itemId);
73
+ }
74
+ });
75
+ return newSelection;
76
+ });
77
+ }
78
+ },
79
+ [isDragging]
80
+ );
81
+ const endDrag = react.useCallback(() => {
82
+ setIsDragging(false);
83
+ dragStartId.current = null;
84
+ }, []);
85
+ const clearSelection = react.useCallback(() => {
86
+ setSelectedItems(/* @__PURE__ */ new Set());
87
+ }, []);
88
+ const isSelected = react.useCallback(
89
+ (id) => {
90
+ return selectedItems.has(id);
91
+ },
92
+ [selectedItems]
93
+ );
94
+ react.useEffect(() => {
95
+ const handleMouseUp = () => {
96
+ if (isDragging) {
97
+ endDrag();
98
+ }
99
+ };
100
+ const handleKeyDown = (e) => {
101
+ if (e.key === "Escape") {
102
+ clearSelection();
103
+ }
104
+ };
105
+ document.addEventListener("mouseup", handleMouseUp);
106
+ document.addEventListener("keydown", handleKeyDown);
107
+ return () => {
108
+ document.removeEventListener("mouseup", handleMouseUp);
109
+ document.removeEventListener("keydown", handleKeyDown);
110
+ };
111
+ }, [isDragging, endDrag, clearSelection]);
112
+ return /* @__PURE__ */ jsxRuntime.jsx(
113
+ DragSelectContext.Provider,
114
+ {
115
+ value: {
116
+ selectedItems,
117
+ isDragging,
118
+ registerItem,
119
+ unregisterItem,
120
+ startDrag,
121
+ updateSelection,
122
+ endDrag,
123
+ clearSelection,
124
+ isSelected
125
+ },
126
+ children
127
+ }
128
+ );
129
+ };
130
+ var useDragSelectContext = () => {
131
+ const context = react.useContext(DragSelectContext);
132
+ if (context === void 0) {
133
+ throw new Error("useDragSelectContext must be used within a DragSelectProvider");
134
+ }
135
+ return context;
136
+ };
137
+
138
+ exports.DragSelectProvider = DragSelectProvider;
139
+ exports.useDragSelectContext = useDragSelectContext;
@@ -0,0 +1,61 @@
1
+ 'use strict';
2
+
3
+ var chunk7KYAICHB_js = require('./chunk-7KYAICHB.js');
4
+ var lucideReact = require('lucide-react');
5
+ var ResizablePrimitive = require('react-resizable-panels');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
27
+
28
+ function ResizablePanelGroup({ className, ...props }) {
29
+ return /* @__PURE__ */ jsxRuntime.jsx(
30
+ ResizablePrimitive__namespace.PanelGroup,
31
+ {
32
+ "data-slot": "resizable-panel-group",
33
+ className: chunk7KYAICHB_js.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
34
+ ...props
35
+ }
36
+ );
37
+ }
38
+ function ResizablePanel(props) {
39
+ return /* @__PURE__ */ jsxRuntime.jsx(ResizablePrimitive__namespace.Panel, { "data-slot": "resizable-panel", ...props });
40
+ }
41
+ function ResizableHandle({ withHandle, className, children, ...props }) {
42
+ return /* @__PURE__ */ jsxRuntime.jsxs(
43
+ ResizablePrimitive__namespace.PanelResizeHandle,
44
+ {
45
+ "data-slot": "resizable-handle",
46
+ className: chunk7KYAICHB_js.cn(
47
+ "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
48
+ className
49
+ ),
50
+ ...props,
51
+ children: [
52
+ children,
53
+ !children && withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVerticalIcon, { className: "size-2.5" }) })
54
+ ]
55
+ }
56
+ );
57
+ }
58
+
59
+ exports.ResizableHandle = ResizableHandle;
60
+ exports.ResizablePanel = ResizablePanel;
61
+ exports.ResizablePanelGroup = ResizablePanelGroup;
@@ -0,0 +1,26 @@
1
+ import { cn } from './chunk-WM2VP7MI.mjs';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ function Separator({
6
+ className,
7
+ orientation = "horizontal",
8
+ decorative = true,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ SeparatorPrimitive.Root,
13
+ {
14
+ "data-slot": "separator-root",
15
+ decorative,
16
+ orientation,
17
+ className: cn(
18
+ "bg-line-primary shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
+ className
20
+ ),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+
26
+ export { Separator };
@@ -170,9 +170,9 @@ var CursorProvider = ({
170
170
  );
171
171
  let styleClass;
172
172
  if (hoveredElementId) {
173
- styleClass = `opacity-[0.05] rounded-md transition-[width,height,left,top] duration-${transitionDuration} ease-out`;
173
+ styleClass = `opacity-[0.05] rounded-uk-md transition-[width,height,left,top] duration-${transitionDuration} ease-out`;
174
174
  } else {
175
- styleClass = `opacity-90 rounded-xl z-10 transition-[width,height,left,top] duration-${transitionDuration} ease-out transition-opacity duration-${transitionDuration}`;
175
+ styleClass = `opacity-90 rounded-full z-10 transition-[width,height,left,top] duration-${transitionDuration} ease-out transition-opacity duration-${transitionDuration}`;
176
176
  }
177
177
  const cursorElement = isClient && isMouseInside && /* @__PURE__ */ jsx(
178
178
  "div",
@@ -69,33 +69,42 @@ var TreeViewRoot = forwardRef(
69
69
  walkTreeItems(data, initialSelectedItemId);
70
70
  return ids;
71
71
  }, [data, expandAll, initialSelectedItemId]);
72
- return /* @__PURE__ */ jsxs("div", { className: cn("px-sm relative w-[300px] overflow-hidden", className), children: [
73
- /* @__PURE__ */ jsx(
74
- TreeItem,
75
- {
76
- data,
77
- ref,
78
- selectedItemId,
79
- handleSelectChange,
80
- expandedItemIds,
81
- defaultLeafIcon,
82
- defaultNodeIcon,
83
- handleDragStart,
84
- handleDrop,
85
- draggedItem,
86
- ...props
87
- }
88
- ),
89
- /* @__PURE__ */ jsx(
90
- "div",
91
- {
92
- className: "h-[48px] w-full",
93
- onDrop: () => {
94
- handleDrop({ id: "", name: "parent_div" });
95
- }
96
- }
97
- )
98
- ] });
72
+ return /* @__PURE__ */ jsxs(
73
+ "div",
74
+ {
75
+ className: cn(
76
+ "px-sm relative w-[300px] w-full overflow-x-auto overflow-y-hidden",
77
+ className
78
+ ),
79
+ children: [
80
+ /* @__PURE__ */ jsx(
81
+ TreeItem,
82
+ {
83
+ data,
84
+ ref,
85
+ selectedItemId,
86
+ handleSelectChange,
87
+ expandedItemIds,
88
+ defaultLeafIcon,
89
+ defaultNodeIcon,
90
+ handleDragStart,
91
+ handleDrop,
92
+ draggedItem,
93
+ ...props
94
+ }
95
+ ),
96
+ /* @__PURE__ */ jsx(
97
+ "div",
98
+ {
99
+ className: "h-[0px] w-full",
100
+ onDrop: () => {
101
+ handleDrop({ id: "", name: "parent_div" });
102
+ }
103
+ }
104
+ )
105
+ ]
106
+ }
107
+ );
99
108
  }
100
109
  );
101
110
  TreeViewRoot.displayName = "TreeViewRoot";
@@ -91,3 +91,4 @@ var Button = react.forwardRef(function Button2({ className, variant, size, icon,
91
91
  });
92
92
 
93
93
  exports.Button = Button;
94
+ exports.buttonVariants = buttonVariants;
@@ -91,33 +91,42 @@ var TreeViewRoot = react.forwardRef(
91
91
  walkTreeItems(data, initialSelectedItemId);
92
92
  return ids;
93
93
  }, [data, expandAll, initialSelectedItemId]);
94
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk7KYAICHB_js.cn("px-sm relative w-[300px] overflow-hidden", className), children: [
95
- /* @__PURE__ */ jsxRuntime.jsx(
96
- TreeItem,
97
- {
98
- data,
99
- ref,
100
- selectedItemId,
101
- handleSelectChange,
102
- expandedItemIds,
103
- defaultLeafIcon,
104
- defaultNodeIcon,
105
- handleDragStart,
106
- handleDrop,
107
- draggedItem,
108
- ...props
109
- }
110
- ),
111
- /* @__PURE__ */ jsxRuntime.jsx(
112
- "div",
113
- {
114
- className: "h-[48px] w-full",
115
- onDrop: () => {
116
- handleDrop({ id: "", name: "parent_div" });
117
- }
118
- }
119
- )
120
- ] });
94
+ return /* @__PURE__ */ jsxRuntime.jsxs(
95
+ "div",
96
+ {
97
+ className: chunk7KYAICHB_js.cn(
98
+ "px-sm relative w-[300px] w-full overflow-x-auto overflow-y-hidden",
99
+ className
100
+ ),
101
+ children: [
102
+ /* @__PURE__ */ jsxRuntime.jsx(
103
+ TreeItem,
104
+ {
105
+ data,
106
+ ref,
107
+ selectedItemId,
108
+ handleSelectChange,
109
+ expandedItemIds,
110
+ defaultLeafIcon,
111
+ defaultNodeIcon,
112
+ handleDragStart,
113
+ handleDrop,
114
+ draggedItem,
115
+ ...props
116
+ }
117
+ ),
118
+ /* @__PURE__ */ jsxRuntime.jsx(
119
+ "div",
120
+ {
121
+ className: "h-[0px] w-full",
122
+ onDrop: () => {
123
+ handleDrop({ id: "", name: "parent_div" });
124
+ }
125
+ }
126
+ )
127
+ ]
128
+ }
129
+ );
121
130
  }
122
131
  );
123
132
  TreeViewRoot.displayName = "TreeViewRoot";
@@ -0,0 +1,118 @@
1
+ import { buttonVariants } from './chunk-PZ3FWTMB.mjs';
2
+ import { cn } from './chunk-WM2VP7MI.mjs';
3
+ import { useTabsCursor, TabsCursorProvider } from './chunk-XMG3IVGZ.mjs';
4
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
+
7
+ function Pagination({ className, ...props }) {
8
+ return /* @__PURE__ */ jsx(
9
+ "nav",
10
+ {
11
+ role: "navigation",
12
+ "aria-label": "pagination",
13
+ "data-slot": "pagination",
14
+ className: cn("mx-auto flex w-full justify-center", className),
15
+ ...props
16
+ }
17
+ );
18
+ }
19
+ function PaginationContent({ className, ...props }) {
20
+ const { setCursorTarget } = useTabsCursor();
21
+ return /* @__PURE__ */ jsx(TabsCursorProvider, { children: /* @__PURE__ */ jsx(
22
+ "ul",
23
+ {
24
+ onMouseLeave: () => setCursorTarget(null),
25
+ "data-slot": "pagination-content",
26
+ className: cn("gap-xs flex flex-row items-center", className),
27
+ style: {
28
+ marginBottom: "0px"
29
+ },
30
+ ...props
31
+ }
32
+ ) });
33
+ }
34
+ function PaginationItem({ ...props }) {
35
+ const { setCursorTarget } = useTabsCursor();
36
+ return /* @__PURE__ */ jsx(
37
+ "li",
38
+ {
39
+ onMouseEnter: (e) => setCursorTarget(e.currentTarget),
40
+ "data-slot": "pagination-item",
41
+ className: "rounded-uk-sm",
42
+ style: {
43
+ marginBottom: "0px"
44
+ },
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ function PaginationLink({
50
+ className,
51
+ isActive,
52
+ ...props
53
+ }) {
54
+ return /* @__PURE__ */ jsx(
55
+ "a",
56
+ {
57
+ "aria-current": isActive ? "page" : void 0,
58
+ "data-slot": "pagination-link",
59
+ "data-active": isActive,
60
+ className: cn(
61
+ buttonVariants({
62
+ variant: isActive ? "secondary" : "ghost"
63
+ }),
64
+ "hover:bg-transparent",
65
+ "hover:text-text-primary",
66
+ className
67
+ ),
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ function PaginationPrevious({ className, ...props }) {
73
+ return /* @__PURE__ */ jsxs(
74
+ PaginationLink,
75
+ {
76
+ "aria-label": "Go to previous page",
77
+ size: "base",
78
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className),
79
+ ...props,
80
+ children: [
81
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
82
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
83
+ ]
84
+ }
85
+ );
86
+ }
87
+ function PaginationNext({ className, ...props }) {
88
+ return /* @__PURE__ */ jsxs(
89
+ PaginationLink,
90
+ {
91
+ "aria-label": "Go to next page",
92
+ size: "base",
93
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className),
94
+ ...props,
95
+ children: [
96
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
97
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
98
+ ]
99
+ }
100
+ );
101
+ }
102
+ function PaginationEllipsis({ className, ...props }) {
103
+ return /* @__PURE__ */ jsxs(
104
+ "span",
105
+ {
106
+ "aria-hidden": true,
107
+ "data-slot": "pagination-ellipsis",
108
+ className: cn("text-text-primary flex size-9 items-center justify-center", className),
109
+ ...props,
110
+ children: [
111
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
112
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
113
+ ]
114
+ }
115
+ );
116
+ }
117
+
118
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -0,0 +1,37 @@
1
+ import { cn } from './chunk-WM2VP7MI.mjs';
2
+ import { GripVerticalIcon } from 'lucide-react';
3
+ import * as ResizablePrimitive from 'react-resizable-panels';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ function ResizablePanelGroup({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx(
8
+ ResizablePrimitive.PanelGroup,
9
+ {
10
+ "data-slot": "resizable-panel-group",
11
+ className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
12
+ ...props
13
+ }
14
+ );
15
+ }
16
+ function ResizablePanel(props) {
17
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
18
+ }
19
+ function ResizableHandle({ withHandle, className, children, ...props }) {
20
+ return /* @__PURE__ */ jsxs(
21
+ ResizablePrimitive.PanelResizeHandle,
22
+ {
23
+ "data-slot": "resizable-handle",
24
+ className: cn(
25
+ "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
26
+ className
27
+ ),
28
+ ...props,
29
+ children: [
30
+ children,
31
+ !children && withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
32
+ ]
33
+ }
34
+ );
35
+ }
36
+
37
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -172,9 +172,9 @@ var CursorProvider = ({
172
172
  );
173
173
  let styleClass;
174
174
  if (hoveredElementId) {
175
- styleClass = `opacity-[0.05] rounded-md transition-[width,height,left,top] duration-${transitionDuration} ease-out`;
175
+ styleClass = `opacity-[0.05] rounded-uk-md transition-[width,height,left,top] duration-${transitionDuration} ease-out`;
176
176
  } else {
177
- styleClass = `opacity-90 rounded-xl z-10 transition-[width,height,left,top] duration-${transitionDuration} ease-out transition-opacity duration-${transitionDuration}`;
177
+ styleClass = `opacity-90 rounded-full z-10 transition-[width,height,left,top] duration-${transitionDuration} ease-out transition-opacity duration-${transitionDuration}`;
178
178
  }
179
179
  const cursorElement = isClient && isMouseInside && /* @__PURE__ */ jsxRuntime.jsx(
180
180
  "div",