@vuer-ai/vuer-uikit 0.0.66 → 0.0.69

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 (253) hide show
  1. package/README.md +4 -4
  2. package/dist/SyncScroll/SyncScroll.cjs +15 -12
  3. package/dist/SyncScroll/SyncScroll.mjs +9 -6
  4. package/dist/SyncScroll/index.cjs +15 -12
  5. package/dist/SyncScroll/index.mjs +9 -6
  6. package/dist/{chunk-TVCXFAR3.cjs → chunk-2LU2B5XU.cjs} +2 -2
  7. package/dist/chunk-3LO2GIJ4.cjs +71 -0
  8. package/dist/{chunk-UGIIFY42.mjs → chunk-3QT5VABC.mjs} +1 -0
  9. package/dist/chunk-3XH7NAMK.mjs +97 -0
  10. package/dist/{chunk-4WSB6SKT.mjs → chunk-4MW4SKOD.mjs} +17 -25
  11. package/dist/chunk-6BOWMGFG.cjs +69 -0
  12. package/dist/chunk-7JYI3VUI.mjs +69 -0
  13. package/dist/chunk-BPGKIZ6G.mjs +27 -0
  14. package/dist/{chunk-MPB4237J.mjs → chunk-CGFJLQRG.mjs} +5 -1
  15. package/dist/{chunk-ZVN4KYHQ.mjs → chunk-CX7AH4R4.mjs} +1 -1
  16. package/dist/{chunk-4DPLDAHW.cjs → chunk-D6326INV.cjs} +5 -1
  17. package/dist/chunk-DSWSIBVQ.cjs +100 -0
  18. package/dist/{chunk-CEHN5RWA.mjs → chunk-DWU32IXO.mjs} +1 -1
  19. package/dist/chunk-ES4LBRHV.mjs +18 -0
  20. package/dist/{chunk-HX6SSKPA.mjs → chunk-EWAKGFQG.mjs} +4 -5
  21. package/dist/{chunk-5RQE4EDL.mjs → chunk-GOXZ3TTM.mjs} +1 -1
  22. package/dist/chunk-GXRV2QEP.cjs +29 -0
  23. package/dist/chunk-IZARTVYN.mjs +67 -0
  24. package/dist/chunk-JR4TVE43.cjs +31 -0
  25. package/dist/chunk-JTLBOAN6.cjs +106 -0
  26. package/dist/{chunk-JSNFXIT2.mjs → chunk-JVCED76T.mjs} +46 -8
  27. package/dist/{chunk-CJW3KZ6E.cjs → chunk-KC7D4OEU.cjs} +4 -5
  28. package/dist/{chunk-QESAYFKT.cjs → chunk-LH5AV54U.cjs} +17 -25
  29. package/dist/{chunk-BN7JFMO6.cjs → chunk-LUAVB7SY.cjs} +3 -3
  30. package/dist/chunk-MTB2EWG2.mjs +26 -0
  31. package/dist/chunk-NJEIDGQY.cjs +20 -0
  32. package/dist/{chunk-MPF74YSO.cjs → chunk-NLHG6BEP.cjs} +1 -1
  33. package/dist/chunk-NWA32DT2.cjs +28 -0
  34. package/dist/{chunk-DI43KCLF.mjs → chunk-PIRVEHSD.mjs} +3 -3
  35. package/dist/{chunk-HI4H4KTS.cjs → chunk-PWOICFNA.cjs} +6 -4
  36. package/dist/{chunk-B4UCHLYR.cjs → chunk-Q7E73DVJ.cjs} +1 -0
  37. package/dist/chunk-QCD2WTD3.mjs +98 -0
  38. package/dist/{chunk-AF5LOIRG.cjs → chunk-QCSP3AI3.cjs} +46 -8
  39. package/dist/chunk-QFMQNY4G.cjs +20 -0
  40. package/dist/chunk-RHX3D3GE.mjs +18 -0
  41. package/dist/{chunk-RUR3YIY3.cjs → chunk-RXQGFPLP.cjs} +2 -2
  42. package/dist/{chunk-YO34TYBG.cjs → chunk-S4EDLSFB.cjs} +3 -3
  43. package/dist/{chunk-2XRTRMJT.cjs → chunk-WRR5LMHR.cjs} +11 -11
  44. package/dist/chunk-XHJDRQD7.mjs +29 -0
  45. package/dist/{chunk-XXBZDDEK.mjs → chunk-Y76RAMHQ.mjs} +1 -1
  46. package/dist/{chunk-ICPSHW4S.mjs → chunk-YNHK66TC.mjs} +2 -2
  47. package/dist/{chunk-HNV4QN76.mjs → chunk-YTM334QC.mjs} +6 -4
  48. package/dist/highlight-cursor/enhanced-components.cjs +16 -13
  49. package/dist/highlight-cursor/enhanced-components.mjs +11 -8
  50. package/dist/highlight-cursor/index.cjs +20 -17
  51. package/dist/highlight-cursor/index.mjs +11 -8
  52. package/dist/hooks/index.cjs +26 -11
  53. package/dist/hooks/index.d.cts +3 -0
  54. package/dist/hooks/index.d.ts +3 -0
  55. package/dist/hooks/index.mjs +8 -5
  56. package/dist/hooks/useDocument.cjs +2 -2
  57. package/dist/hooks/useDocument.mjs +1 -1
  58. package/dist/hooks/useDragSelect.cjs +2 -2
  59. package/dist/hooks/useDragSelect.mjs +1 -1
  60. package/dist/hooks/useIsMobile.cjs +10 -0
  61. package/dist/hooks/useIsMobile.mjs +1 -0
  62. package/dist/hooks/useLocalStorage.cjs +2 -2
  63. package/dist/hooks/useLocalStorage.mjs +1 -1
  64. package/dist/hooks/useLocation.cjs +10 -0
  65. package/dist/hooks/useLocation.d.cts +14 -0
  66. package/dist/hooks/useLocation.d.ts +14 -0
  67. package/dist/hooks/useLocation.mjs +1 -0
  68. package/dist/hooks/useQueryParams.cjs +12 -0
  69. package/dist/hooks/useQueryParams.d.cts +3 -0
  70. package/dist/hooks/useQueryParams.d.ts +3 -0
  71. package/dist/hooks/useQueryParams.mjs +3 -0
  72. package/dist/hooks/useWindow.cjs +2 -2
  73. package/dist/hooks/useWindow.d.cts +1 -1
  74. package/dist/hooks/useWindow.d.ts +1 -1
  75. package/dist/hooks/useWindow.mjs +1 -1
  76. package/dist/index.cjs +338 -286
  77. package/dist/index.css +7 -1
  78. package/dist/index.d.cts +6 -1
  79. package/dist/index.d.ts +6 -1
  80. package/dist/index.mjs +48 -44
  81. package/dist/ui/avatar.cjs +8 -5
  82. package/dist/ui/avatar.mjs +8 -5
  83. package/dist/ui/badge.cjs +8 -5
  84. package/dist/ui/badge.d.cts +2 -2
  85. package/dist/ui/badge.d.ts +2 -2
  86. package/dist/ui/badge.mjs +8 -5
  87. package/dist/ui/button.cjs +8 -5
  88. package/dist/ui/button.mjs +8 -5
  89. package/dist/ui/card.cjs +8 -5
  90. package/dist/ui/card.mjs +8 -5
  91. package/dist/ui/checkbox.cjs +8 -5
  92. package/dist/ui/checkbox.mjs +8 -5
  93. package/dist/ui/collapsible.cjs +8 -5
  94. package/dist/ui/collapsible.mjs +8 -5
  95. package/dist/ui/color-input.cjs +8 -5
  96. package/dist/ui/color-input.mjs +8 -5
  97. package/dist/ui/drawer.cjs +8 -5
  98. package/dist/ui/drawer.mjs +8 -5
  99. package/dist/ui/dropdown.cjs +8 -5
  100. package/dist/ui/dropdown.mjs +8 -5
  101. package/dist/ui/form/CmInput.cjs +8 -5
  102. package/dist/ui/form/CmInput.mjs +8 -5
  103. package/dist/ui/form/DegInput.cjs +8 -5
  104. package/dist/ui/form/DegInput.mjs +8 -5
  105. package/dist/ui/form/EulerDegInput.cjs +8 -5
  106. package/dist/ui/form/EulerDegInput.mjs +8 -5
  107. package/dist/ui/form/EulerInput.cjs +8 -5
  108. package/dist/ui/form/EulerInput.mjs +8 -5
  109. package/dist/ui/form/EulerRadInput.cjs +8 -5
  110. package/dist/ui/form/EulerRadInput.mjs +8 -5
  111. package/dist/ui/form/InchInput.cjs +8 -5
  112. package/dist/ui/form/InchInput.mjs +8 -5
  113. package/dist/ui/form/IntInput.cjs +8 -5
  114. package/dist/ui/form/IntInput.mjs +8 -5
  115. package/dist/ui/form/KVectorInput.cjs +8 -5
  116. package/dist/ui/form/KVectorInput.mjs +8 -5
  117. package/dist/ui/form/NumberInput.cjs +8 -5
  118. package/dist/ui/form/NumberInput.mjs +8 -5
  119. package/dist/ui/form/QuaternionInput.cjs +8 -5
  120. package/dist/ui/form/QuaternionInput.mjs +8 -5
  121. package/dist/ui/form/RadInput.cjs +8 -5
  122. package/dist/ui/form/RadInput.mjs +8 -5
  123. package/dist/ui/form/TimeInput.cjs +8 -5
  124. package/dist/ui/form/TimeInput.mjs +8 -5
  125. package/dist/ui/form/Vec3Input.cjs +8 -5
  126. package/dist/ui/form/Vec3Input.mjs +8 -5
  127. package/dist/ui/form/VectorInput.cjs +8 -5
  128. package/dist/ui/form/VectorInput.mjs +8 -5
  129. package/dist/ui/form/index.cjs +13 -10
  130. package/dist/ui/form/index.mjs +9 -6
  131. package/dist/ui/index.cjs +302 -262
  132. package/dist/ui/index.d.cts +3 -1
  133. package/dist/ui/index.d.ts +3 -1
  134. package/dist/ui/index.mjs +45 -41
  135. package/dist/ui/input-numbers.cjs +8 -5
  136. package/dist/ui/input-numbers.mjs +8 -5
  137. package/dist/ui/input.cjs +8 -5
  138. package/dist/ui/input.d.cts +1 -1
  139. package/dist/ui/input.d.ts +1 -1
  140. package/dist/ui/input.mjs +8 -5
  141. package/dist/ui/label.cjs +8 -5
  142. package/dist/ui/label.mjs +8 -5
  143. package/dist/ui/layout.cjs +8 -5
  144. package/dist/ui/layout.mjs +8 -5
  145. package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +11 -8
  146. package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +10 -7
  147. package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +15 -12
  148. package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +9 -6
  149. package/dist/ui/layouts/dock-layout/index.cjs +17 -14
  150. package/dist/ui/layouts/dock-layout/index.mjs +10 -7
  151. package/dist/ui/layouts/index.cjs +19 -16
  152. package/dist/ui/layouts/index.mjs +11 -8
  153. package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +8 -5
  154. package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +8 -5
  155. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +10 -7
  156. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.d.cts +11 -1
  157. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.d.ts +11 -1
  158. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +9 -6
  159. package/dist/ui/layouts/liquid-layout/index.cjs +10 -7
  160. package/dist/ui/layouts/liquid-layout/index.mjs +9 -6
  161. package/dist/ui/modal.cjs +8 -5
  162. package/dist/ui/modal.mjs +8 -5
  163. package/dist/ui/navigation.cjs +21 -0
  164. package/dist/ui/navigation.d.cts +18 -0
  165. package/dist/ui/navigation.d.ts +18 -0
  166. package/dist/ui/navigation.mjs +12 -0
  167. package/dist/ui/pagination.cjs +17 -14
  168. package/dist/ui/pagination.mjs +10 -7
  169. package/dist/ui/panel.cjs +8 -5
  170. package/dist/ui/panel.mjs +8 -5
  171. package/dist/ui/popover.cjs +8 -5
  172. package/dist/ui/popover.mjs +8 -5
  173. package/dist/ui/presets-input.cjs +8 -5
  174. package/dist/ui/presets-input.mjs +8 -5
  175. package/dist/ui/radio-group.cjs +8 -5
  176. package/dist/ui/radio-group.mjs +8 -5
  177. package/dist/ui/resizable.cjs +8 -5
  178. package/dist/ui/resizable.mjs +8 -5
  179. package/dist/ui/select.cjs +8 -5
  180. package/dist/ui/select.d.cts +1 -1
  181. package/dist/ui/select.d.ts +1 -1
  182. package/dist/ui/select.mjs +8 -5
  183. package/dist/ui/separator.cjs +8 -5
  184. package/dist/ui/separator.mjs +8 -5
  185. package/dist/ui/sheet.cjs +8 -5
  186. package/dist/ui/sheet.mjs +8 -5
  187. package/dist/ui/sidebar.cjs +34 -32
  188. package/dist/ui/sidebar.d.cts +1 -1
  189. package/dist/ui/sidebar.d.ts +1 -1
  190. package/dist/ui/sidebar.mjs +10 -8
  191. package/dist/ui/skeleton.cjs +8 -5
  192. package/dist/ui/skeleton.mjs +8 -5
  193. package/dist/ui/slider.cjs +8 -5
  194. package/dist/ui/slider.mjs +8 -5
  195. package/dist/ui/switch.cjs +8 -5
  196. package/dist/ui/switch.mjs +8 -5
  197. package/dist/ui/table.cjs +48 -0
  198. package/dist/ui/table.d.cts +13 -0
  199. package/dist/ui/table.d.ts +13 -0
  200. package/dist/ui/table.mjs +11 -0
  201. package/dist/ui/tabs.cjs +14 -11
  202. package/dist/ui/tabs.mjs +10 -7
  203. package/dist/ui/textarea.cjs +8 -5
  204. package/dist/ui/textarea.d.cts +1 -1
  205. package/dist/ui/textarea.d.ts +1 -1
  206. package/dist/ui/textarea.mjs +8 -5
  207. package/dist/ui/theme/ThemeToggles.cjs +11 -8
  208. package/dist/ui/theme/ThemeToggles.mjs +9 -6
  209. package/dist/ui/theme/index.cjs +11 -8
  210. package/dist/ui/theme/index.mjs +9 -6
  211. package/dist/ui/timeline.cjs +11 -8
  212. package/dist/ui/timeline.mjs +10 -7
  213. package/dist/ui/toggle-buttons.cjs +14 -11
  214. package/dist/ui/toggle-buttons.mjs +9 -6
  215. package/dist/ui/toggle-group.cjs +12 -9
  216. package/dist/ui/toggle-group.mjs +9 -6
  217. package/dist/ui/toggle.cjs +8 -5
  218. package/dist/ui/toggle.mjs +8 -5
  219. package/dist/ui/toolbar.cjs +8 -5
  220. package/dist/ui/toolbar.mjs +8 -5
  221. package/dist/ui/tooltip.cjs +8 -5
  222. package/dist/ui/tooltip.mjs +8 -5
  223. package/dist/ui/tree-view-v2.cjs +10 -7
  224. package/dist/ui/tree-view-v2.d.cts +2 -1
  225. package/dist/ui/tree-view-v2.d.ts +2 -1
  226. package/dist/ui/tree-view-v2.mjs +9 -6
  227. package/dist/ui/tree-view.cjs +8 -5
  228. package/dist/ui/tree-view.mjs +8 -5
  229. package/dist/ui/version-badge.cjs +10 -7
  230. package/dist/ui/version-badge.mjs +9 -6
  231. package/package.json +2 -1
  232. package/dist/chunk-76NWNNDA.mjs +0 -22
  233. package/dist/chunk-C7I2Y5NY.cjs +0 -16
  234. package/dist/chunk-IWH3T7TD.mjs +0 -48
  235. package/dist/chunk-LZPXMTJ7.cjs +0 -16
  236. package/dist/chunk-NXTGTCPA.mjs +0 -19
  237. package/dist/chunk-PR4VD5F2.mjs +0 -14
  238. package/dist/chunk-QG5Z4C65.mjs +0 -14
  239. package/dist/chunk-RFHOLY3Q.cjs +0 -41
  240. package/dist/chunk-UP4H5VPE.cjs +0 -24
  241. package/dist/chunk-Z3BZQSWV.cjs +0 -50
  242. package/dist/hooks/use-mobile.cjs +0 -10
  243. package/dist/hooks/use-mobile.mjs +0 -1
  244. package/dist/{chunk-2CJREAQO.cjs → chunk-3LAJ7S6U.cjs} +1 -1
  245. package/dist/{chunk-OPVNPU6U.cjs → chunk-4PPIKQNU.cjs} +1 -1
  246. package/dist/{chunk-5HZ6JUMF.cjs → chunk-CVGK4HLB.cjs} +0 -0
  247. package/dist/{chunk-AYKQVWMR.mjs → chunk-F7ZHPSLA.mjs} +0 -0
  248. package/dist/{chunk-JEIVAYVK.mjs → chunk-N4S67ZRW.mjs} +1 -1
  249. package/dist/{chunk-G3EIVAVR.mjs → chunk-QHXNBB5E.mjs} +0 -0
  250. package/dist/{chunk-KFPS5CCR.cjs → chunk-QN4N4I3Z.cjs} +0 -0
  251. package/dist/{chunk-3GYDDYRD.mjs → chunk-WM25JXCI.mjs} +1 -1
  252. /package/dist/hooks/{use-mobile.d.cts → useIsMobile.d.cts} +0 -0
  253. /package/dist/hooks/{use-mobile.d.ts → useIsMobile.d.ts} +0 -0
@@ -0,0 +1,100 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // src/hooks/useLocalStorage.ts
6
+ var localStorageStore = /* @__PURE__ */ (() => {
7
+ const listeners = /* @__PURE__ */ new Map();
8
+ function subscribe(key, callback) {
9
+ if (!listeners.has(key)) {
10
+ listeners.set(key, /* @__PURE__ */ new Set());
11
+ }
12
+ listeners.get(key).add(callback);
13
+ const handleStorageChange = (e) => {
14
+ if (e.key === key && e.storageArea === localStorage) {
15
+ listeners.get(key)?.forEach((listener) => listener());
16
+ }
17
+ };
18
+ if (typeof window !== "undefined") {
19
+ window.addEventListener("storage", handleStorageChange);
20
+ }
21
+ return () => {
22
+ listeners.get(key)?.delete(callback);
23
+ if (listeners.get(key)?.size === 0) {
24
+ listeners.delete(key);
25
+ }
26
+ if (typeof window !== "undefined") {
27
+ window.removeEventListener("storage", handleStorageChange);
28
+ }
29
+ };
30
+ }
31
+ function notifyListeners(key) {
32
+ listeners.get(key)?.forEach((listener) => listener());
33
+ }
34
+ return { subscribe, notifyListeners };
35
+ })();
36
+ function useLocalStorage(key, initialValue) {
37
+ const keyRef = react.useRef(key);
38
+ const initialValueRef = react.useRef(initialValue);
39
+ keyRef.current = key;
40
+ initialValueRef.current = initialValue;
41
+ const subscribe = react.useCallback(
42
+ (callback) => localStorageStore.subscribe(keyRef.current, callback),
43
+ []
44
+ );
45
+ const getSnapshot = react.useCallback(() => {
46
+ if (typeof window === "undefined") {
47
+ return initialValueRef.current;
48
+ }
49
+ try {
50
+ const item = window.localStorage.getItem(keyRef.current);
51
+ if (item === null) return initialValueRef.current;
52
+ if (typeof initialValueRef.current === "string") {
53
+ return item;
54
+ } else if (typeof initialValueRef.current === "number") {
55
+ return parseFloat(item) || initialValueRef.current;
56
+ } else if (typeof initialValueRef.current === "boolean") {
57
+ return item === "true";
58
+ } else {
59
+ return JSON.parse(item);
60
+ }
61
+ } catch (error) {
62
+ console.warn(`Error reading localStorage key "${keyRef.current}":`, error);
63
+ return initialValueRef.current;
64
+ }
65
+ }, []);
66
+ const getServerSnapshot = react.useCallback(() => {
67
+ return initialValueRef.current;
68
+ }, []);
69
+ const storedValue = react.useSyncExternalStore(
70
+ subscribe,
71
+ getSnapshot,
72
+ getServerSnapshot
73
+ );
74
+ const setValue = react.useCallback(
75
+ (value) => {
76
+ try {
77
+ const currentValue = getSnapshot();
78
+ const valueToStore = value instanceof Function ? value(currentValue) : value;
79
+ if (typeof window !== "undefined") {
80
+ let stringValue;
81
+ if (typeof valueToStore === "string") {
82
+ stringValue = valueToStore;
83
+ } else if (typeof valueToStore === "number" || typeof valueToStore === "boolean") {
84
+ stringValue = valueToStore.toString();
85
+ } else {
86
+ stringValue = JSON.stringify(valueToStore);
87
+ }
88
+ window.localStorage.setItem(keyRef.current, stringValue);
89
+ localStorageStore.notifyListeners(keyRef.current);
90
+ }
91
+ } catch (error) {
92
+ console.warn(`Error setting localStorage key "${keyRef.current}":`, error);
93
+ }
94
+ },
95
+ [getSnapshot]
96
+ );
97
+ return [storedValue, setValue];
98
+ }
99
+
100
+ exports.useLocalStorage = useLocalStorage;
@@ -1,8 +1,8 @@
1
1
  import { useTheme } from './chunk-CWBLCQD7.mjs';
2
2
  import { Tooltip, TooltipTrigger, TooltipContent } from './chunk-XSJ6XVTR.mjs';
3
3
  import { Button } from './chunk-3MSEMXKG.mjs';
4
- import { useDocument } from './chunk-QG5Z4C65.mjs';
5
4
  import { createClientOnlyComponent } from './chunk-4F2GSF2T.mjs';
5
+ import { useDocument } from './chunk-ES4LBRHV.mjs';
6
6
  import { cn } from './chunk-KVFUDYD3.mjs';
7
7
  import { Droplet, Sun, SunMoon, Moon } from 'lucide-react';
8
8
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -0,0 +1,18 @@
1
+ import { useSyncExternalStore } from 'react';
2
+
3
+ // src/hooks/useDocument.tsx
4
+ function subscribe(callback) {
5
+ return () => {
6
+ };
7
+ }
8
+ function getSnapshot() {
9
+ return typeof document !== "undefined" ? document : void 0;
10
+ }
11
+ function getServerSnapshot() {
12
+ return void 0;
13
+ }
14
+ function useDocument() {
15
+ return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
16
+ }
17
+
18
+ export { useDocument };
@@ -65,11 +65,10 @@ var toggleGroupVariants = cva(
65
65
  "data-[state=on]:shadow-[inset_0.5px_0_0_var(--muted),inset_-0.5px_0_0_var(--muted)]"
66
66
  ],
67
67
  ghost: [
68
- "bg-bg-primary",
69
- "hover:bg-group-hover",
70
- "text-text-secondary",
71
- "data-[state=on]:text-text-withbg",
72
- "data-[state=on]:bg-group-primary",
68
+ "hover:bg-tertiary",
69
+ "text-icon-secondary",
70
+ "data-[state=on]:text-icon-highlight",
71
+ "data-[state=on]:bg-bg-secondary",
73
72
  "data-[state=on]:shadow-[inset_0.5px_0_0_var(--muted),inset_-0.5px_0_0_var(--muted)]",
74
73
  "data-[state=on]:first:shadow-[inset_-0.5px_0_0_var(--muted)]",
75
74
  "data-[state=on]:last:shadow-[inset_0.5px_0_0_var(--muted)]"
@@ -1,7 +1,7 @@
1
1
  import { Badge } from './chunk-Q27ILZE6.mjs';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
- var PACKAGE_VERSION = "0.0.66" ;
4
+ var PACKAGE_VERSION = "0.0.69" ;
5
5
  var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
6
6
  function VersionBadge({
7
7
  className,
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var chunkWTUAR2X5_cjs = require('./chunk-WTUAR2X5.cjs');
4
+ var chunkDWD754BX_cjs = require('./chunk-DWD754BX.cjs');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var LiquidLayoutView = ({
8
+ left,
9
+ right,
10
+ top,
11
+ bottom,
12
+ children,
13
+ className,
14
+ leftClassName,
15
+ rightClassName,
16
+ topClassName,
17
+ bottomClassName,
18
+ contentClassName
19
+ }) => {
20
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkWTUAR2X5_cjs.LiquidLayout, { className, children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWTUAR2X5_cjs.LiquidLayoutContent, { className: chunkDWD754BX_cjs.cn("flex flex-col items-center justify-center", contentClassName), children }),
22
+ bottom && /* @__PURE__ */ jsxRuntime.jsx(chunkWTUAR2X5_cjs.LiquidLayoutBottom, { className: chunkDWD754BX_cjs.cn("mt-4", bottomClassName), children: bottom }),
23
+ right && /* @__PURE__ */ jsxRuntime.jsx(chunkWTUAR2X5_cjs.LiquidLayoutRight, { className: rightClassName, children: right }),
24
+ left && /* @__PURE__ */ jsxRuntime.jsx(chunkWTUAR2X5_cjs.LiquidLayoutLeft, { className: leftClassName, children: left }),
25
+ top && /* @__PURE__ */ jsxRuntime.jsx(chunkWTUAR2X5_cjs.LiquidLayoutTop, { className: topClassName, children: top })
26
+ ] });
27
+ };
28
+
29
+ exports.LiquidLayoutView = LiquidLayoutView;
@@ -0,0 +1,67 @@
1
+ import { useSyncExternalStore } from 'react';
2
+
3
+ // src/hooks/useLocation.tsx
4
+ var listeners = [];
5
+ var currentSnapshot = void 0;
6
+ function updateSnapshot() {
7
+ if (typeof window === "undefined") {
8
+ currentSnapshot = void 0;
9
+ return;
10
+ }
11
+ currentSnapshot = {
12
+ href: window.location.href,
13
+ pathname: window.location.pathname,
14
+ search: window.location.search,
15
+ hash: window.location.hash,
16
+ host: window.location.host,
17
+ hostname: window.location.hostname,
18
+ port: window.location.port,
19
+ protocol: window.location.protocol,
20
+ origin: window.location.origin
21
+ };
22
+ }
23
+ updateSnapshot();
24
+ function subscribe(callback) {
25
+ listeners.push(callback);
26
+ if (typeof window === "undefined") {
27
+ return () => {
28
+ listeners = listeners.filter((l) => l !== callback);
29
+ };
30
+ }
31
+ const notifyListeners = () => {
32
+ updateSnapshot();
33
+ listeners.forEach((listener) => listener());
34
+ };
35
+ window.addEventListener("popstate", notifyListeners);
36
+ window.addEventListener("hashchange", notifyListeners);
37
+ const originalPushState = window.history.pushState;
38
+ const originalReplaceState = window.history.replaceState;
39
+ window.history.pushState = function(...args) {
40
+ originalPushState.apply(window.history, args);
41
+ notifyListeners();
42
+ };
43
+ window.history.replaceState = function(...args) {
44
+ originalReplaceState.apply(window.history, args);
45
+ notifyListeners();
46
+ };
47
+ return () => {
48
+ listeners = listeners.filter((l) => l !== callback);
49
+ window.removeEventListener("popstate", notifyListeners);
50
+ window.removeEventListener("hashchange", notifyListeners);
51
+ if (listeners.length === 0) {
52
+ window.history.pushState = originalPushState;
53
+ window.history.replaceState = originalReplaceState;
54
+ }
55
+ };
56
+ }
57
+ function getSnapshot() {
58
+ return currentSnapshot;
59
+ }
60
+ function getServerSnapshot() {
61
+ return void 0;
62
+ }
63
+ function useLocation() {
64
+ return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
65
+ }
66
+
67
+ export { useLocation };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // src/hooks/useIsMobile.ts
6
+ var MOBILE_BREAKPOINT = 768;
7
+ function subscribe(callback) {
8
+ if (typeof window === "undefined") {
9
+ return () => {
10
+ };
11
+ }
12
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
13
+ if (mql.addEventListener) {
14
+ mql.addEventListener("change", callback);
15
+ return () => mql.removeEventListener("change", callback);
16
+ }
17
+ mql.addListener(callback);
18
+ return () => mql.removeListener(callback);
19
+ }
20
+ function getSnapshot() {
21
+ if (typeof window === "undefined") return false;
22
+ return window.innerWidth < MOBILE_BREAKPOINT;
23
+ }
24
+ function getServerSnapshot() {
25
+ return false;
26
+ }
27
+ function useIsMobile() {
28
+ return react.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
29
+ }
30
+
31
+ exports.useIsMobile = useIsMobile;
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+ var chunkDWD754BX_cjs = require('./chunk-DWD754BX.cjs');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ function Table({ className, ...props }) {
7
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
8
+ "table",
9
+ {
10
+ "data-slot": "table",
11
+ className: chunkDWD754BX_cjs.cn("text-uk-md w-full caption-bottom rounded-none!", className),
12
+ ...props
13
+ }
14
+ ) });
15
+ }
16
+ function TableHeader({ className, ...props }) {
17
+ return /* @__PURE__ */ jsxRuntime.jsx(
18
+ "thead",
19
+ {
20
+ "data-slot": "table-header",
21
+ className: chunkDWD754BX_cjs.cn("hover:bg-bg-tertiary [&_tr]:border-b", className),
22
+ ...props
23
+ }
24
+ );
25
+ }
26
+ function TableBody({ className, ...props }) {
27
+ return /* @__PURE__ */ jsxRuntime.jsx(
28
+ "tbody",
29
+ {
30
+ "data-slot": "table-body",
31
+ className: chunkDWD754BX_cjs.cn("[&_tr:last-child]:border-0", className),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function TableFooter({ className, ...props }) {
37
+ return /* @__PURE__ */ jsxRuntime.jsx(
38
+ "tfoot",
39
+ {
40
+ "data-slot": "table-footer",
41
+ className: chunkDWD754BX_cjs.cn(
42
+ "bg-bg-secondary border-bg-secondary hover:bg-bg-tertiary border-t font-medium [&>tr]:last:border-b-0",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ function TableRow({ className, ...props }) {
50
+ return /* @__PURE__ */ jsxRuntime.jsx(
51
+ "tr",
52
+ {
53
+ "data-slot": "table-row",
54
+ className: chunkDWD754BX_cjs.cn(
55
+ "hover:bg-bg-secondary data-[state=selected]:bg-bg-secondary border-bg-secondary border-b transition-colors",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function TableHead({ className, ...props }) {
63
+ return /* @__PURE__ */ jsxRuntime.jsx(
64
+ "th",
65
+ {
66
+ "data-slot": "table-head",
67
+ className: chunkDWD754BX_cjs.cn(
68
+ "bg-bg-secondary! px-lg! text-text-primary! text-uk-md h-[40px] py-0! text-left align-middle font-medium! whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
69
+ className
70
+ ),
71
+ ...props
72
+ }
73
+ );
74
+ }
75
+ function TableCell({ className, ...props }) {
76
+ return /* @__PURE__ */ jsxRuntime.jsx(
77
+ "td",
78
+ {
79
+ "data-slot": "table-cell",
80
+ className: chunkDWD754BX_cjs.cn(
81
+ "px-lg! text-text-primary! text-uk-md h-[40px] py-0! align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
82
+ className
83
+ ),
84
+ ...props
85
+ }
86
+ );
87
+ }
88
+ function TableCaption({ className, ...props }) {
89
+ return /* @__PURE__ */ jsxRuntime.jsx(
90
+ "caption",
91
+ {
92
+ "data-slot": "table-caption",
93
+ className: chunkDWD754BX_cjs.cn("text-text-tertiary text-uk-md mt-4", className),
94
+ ...props
95
+ }
96
+ );
97
+ }
98
+
99
+ exports.Table = Table;
100
+ exports.TableBody = TableBody;
101
+ exports.TableCaption = TableCaption;
102
+ exports.TableCell = TableCell;
103
+ exports.TableFooter = TableFooter;
104
+ exports.TableHead = TableHead;
105
+ exports.TableHeader = TableHeader;
106
+ exports.TableRow = TableRow;
@@ -14,7 +14,8 @@ function TreeView({
14
14
  isSelectable = false,
15
15
  selectedItemId,
16
16
  onSelectChange,
17
- isSearchable = true
17
+ isSearchable = true,
18
+ alwaysShowExpand = false
18
19
  }) {
19
20
  const [expandedItems, setExpandedItems] = useState(() => {
20
21
  const initial = /* @__PURE__ */ new Set();
@@ -43,6 +44,9 @@ function TreeView({
43
44
  onSelectChange(selectedItemId === id ? null : id);
44
45
  }
45
46
  };
47
+ const hasDescendants = (itemId) => {
48
+ return (childrenMap.get(itemId) || []).length > 0;
49
+ };
46
50
  const childrenMap = useMemo(() => {
47
51
  const map = /* @__PURE__ */ new Map();
48
52
  data.forEach((item) => {
@@ -69,7 +73,20 @@ function TreeView({
69
73
  }
70
74
  return ancestors;
71
75
  };
72
- return data.map((item) => {
76
+ const sortedData = [];
77
+ const visited = /* @__PURE__ */ new Set();
78
+ const traverseNode = (nodeId, depth = 0) => {
79
+ const children = childrenMap.get(nodeId) || [];
80
+ children.forEach((child) => {
81
+ if (!visited.has(child.id)) {
82
+ visited.add(child.id);
83
+ sortedData.push(child);
84
+ traverseNode(child.id, depth + 1);
85
+ }
86
+ });
87
+ };
88
+ traverseNode(null);
89
+ return sortedData.map((item) => {
73
90
  const siblings = childrenMap.get(item.parentId) || [];
74
91
  const isLast = siblings.length > 0 && siblings[siblings.length - 1].id === item.id;
75
92
  const ancestors = getAncestors(item);
@@ -139,8 +156,8 @@ function TreeView({
139
156
  (part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx("span", { className: "rounded-uk-xs bg-yellow-300 dark:bg-yellow-700", children: part }, i) : part
140
157
  ) });
141
158
  };
142
- return /* @__PURE__ */ jsxs("div", { className: cn("border-line-secondary/20 flex flex-col", className), children: [
143
- isSearchable && /* @__PURE__ */ jsxs("div", { className: "border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2", children: [
159
+ return /* @__PURE__ */ jsxs("div", { className: cn("border-line-primary flex flex-col", className), children: [
160
+ isSearchable && /* @__PURE__ */ jsxs("div", { className: "border-line-primary flex h-[32px] shrink-0 items-center gap-1 border-b px-2", children: [
144
161
  /* @__PURE__ */ jsx(Search, { className: "text-text-secondary size-4" }),
145
162
  /* @__PURE__ */ jsx(
146
163
  "input",
@@ -203,7 +220,7 @@ function TreeView({
203
220
  className: cn(
204
221
  "h-full w-[1.25rem]",
205
222
  parentIsLast ? "" : "border-l",
206
- "border-line-secondary/20"
223
+ "border-line-primary"
207
224
  )
208
225
  },
209
226
  index
@@ -216,11 +233,11 @@ function TreeView({
216
233
  className: cn(
217
234
  "absolute top-0 left-0 h-1/2 w-1/2 border-b border-l",
218
235
  item.isLast ? "rounded-bl-md" : "",
219
- "border-line-secondary/20"
236
+ "border-line-primary"
220
237
  )
221
238
  }
222
239
  ),
223
- !item.isLast && /* @__PURE__ */ jsx("div", { className: "border-line-secondary/20 absolute top-1/2 left-0 h-1/2 w-1/2 border-l" })
240
+ !item.isLast && /* @__PURE__ */ jsx("div", { className: "border-line-primary absolute top-1/2 left-0 h-1/2 w-1/2 border-l" })
224
241
  ] })
225
242
  ] }),
226
243
  /* @__PURE__ */ jsxs(
@@ -230,7 +247,28 @@ function TreeView({
230
247
  style: { paddingLeft: `${item.indent * 1.25 + 0.5}rem` },
231
248
  children: [
232
249
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
233
- /* @__PURE__ */ jsxs("div", { className: "relative flex size-4 items-center justify-center", children: [
250
+ alwaysShowExpand && hasDescendants(item.id) && !expandedItems.has(item.id) ? /* @__PURE__ */ jsxs(Fragment, { children: [
251
+ /* @__PURE__ */ jsx(
252
+ "button",
253
+ {
254
+ onClick: (e) => {
255
+ e.stopPropagation();
256
+ toggleItem(item.id);
257
+ },
258
+ className: "flex size-4 cursor-pointer items-center justify-center",
259
+ children: /* @__PURE__ */ jsx(
260
+ ChevronDown,
261
+ {
262
+ className: cn(
263
+ "size-4 transition-transform -rotate-90",
264
+ item.disable && "text-icon-tertiary"
265
+ )
266
+ }
267
+ )
268
+ }
269
+ ),
270
+ /* @__PURE__ */ jsx("div", { className: cn("flex size-4 items-center justify-center", item.disable && "text-icon-tertiary"), children: getIcon(item) })
271
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "relative flex size-4 items-center justify-center", children: [
234
272
  item.isCollapsible && /* @__PURE__ */ jsx(
235
273
  "button",
236
274
  {
@@ -87,11 +87,10 @@ var toggleGroupVariants = classVarianceAuthority.cva(
87
87
  "data-[state=on]:shadow-[inset_0.5px_0_0_var(--muted),inset_-0.5px_0_0_var(--muted)]"
88
88
  ],
89
89
  ghost: [
90
- "bg-bg-primary",
91
- "hover:bg-group-hover",
92
- "text-text-secondary",
93
- "data-[state=on]:text-text-withbg",
94
- "data-[state=on]:bg-group-primary",
90
+ "hover:bg-tertiary",
91
+ "text-icon-secondary",
92
+ "data-[state=on]:text-icon-highlight",
93
+ "data-[state=on]:bg-bg-secondary",
95
94
  "data-[state=on]:shadow-[inset_0.5px_0_0_var(--muted),inset_-0.5px_0_0_var(--muted)]",
96
95
  "data-[state=on]:first:shadow-[inset_-0.5px_0_0_var(--muted)]",
97
96
  "data-[state=on]:last:shadow-[inset_0.5px_0_0_var(--muted)]"
@@ -12,30 +12,32 @@ var DockLayout = react.forwardRef(
12
12
  {
13
13
  ref,
14
14
  ...props,
15
- className: chunkDWD754BX_cjs.cn(
16
- "relative h-full w-full flex flex-col overflow-hidden",
17
- className
18
- )
15
+ className: chunkDWD754BX_cjs.cn("relative flex h-full w-full flex-col overflow-hidden", className)
19
16
  }
20
17
  );
21
18
  }
22
19
  );
23
20
  DockLayout.displayName = "DockLayout";
24
21
  function DockLayoutContent({ className, ...props }) {
25
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: chunkDWD754BX_cjs.cn("flex-1 flex flex-col items-center justify-center overflow-auto relative", className) });
22
+ return /* @__PURE__ */ jsxRuntime.jsx(
23
+ "div",
24
+ {
25
+ ...props,
26
+ className: chunkDWD754BX_cjs.cn(
27
+ "relative flex flex-1 flex-col items-center justify-center overflow-auto",
28
+ className
29
+ )
30
+ }
31
+ );
26
32
  }
27
- function DockLayoutLeft({
28
- className,
29
- asChild,
30
- ...props
31
- }) {
33
+ function DockLayoutLeft({ className, asChild, ...props }) {
32
34
  const Comp = asChild ? reactSlot.Slot : "div";
33
35
  return /* @__PURE__ */ jsxRuntime.jsx(
34
36
  Comp,
35
37
  {
36
38
  ...props,
37
39
  className: chunkDWD754BX_cjs.cn(
38
- "h-full flex flex-col items-start gap-4 bg-bg-primary flex-shrink-0",
40
+ "bg-bg-primary flex h-full flex-shrink-0 flex-col items-start gap-4",
39
41
  className
40
42
  )
41
43
  }
@@ -47,26 +49,19 @@ function DockLayoutTop({ className, ...props }) {
47
49
  {
48
50
  ...props,
49
51
  className: chunkDWD754BX_cjs.cn(
50
- "absolute top-4 left-1/2 transform -translate-x-1/2 z-20 flex items-start justify-center",
52
+ "absolute top-4 left-1/2 z-20 flex -translate-x-1/2 transform items-start justify-center",
51
53
  className
52
54
  )
53
55
  }
54
56
  );
55
57
  }
56
- function DockLayoutRight({
57
- className,
58
- asChild,
59
- ...props
60
- }) {
58
+ function DockLayoutRight({ className, asChild, ...props }) {
61
59
  const Comp = asChild ? reactSlot.Slot : "div";
62
60
  return /* @__PURE__ */ jsxRuntime.jsx(
63
61
  Comp,
64
62
  {
65
63
  ...props,
66
- className: chunkDWD754BX_cjs.cn(
67
- "h-full flex flex-col items-end gap-4 bg-bg-primary flex-shrink-0",
68
- className
69
- )
64
+ className: chunkDWD754BX_cjs.cn("bg-bg-primary flex h-full flex-shrink-0 flex-col items-end gap-4", className)
70
65
  }
71
66
  );
72
67
  }
@@ -78,10 +73,7 @@ var DockLayoutBottom = react.forwardRef(
78
73
  {
79
74
  ref,
80
75
  ...props,
81
- className: chunkDWD754BX_cjs.cn(
82
- "inline-flex justify-center bg-bg-primary flex-shrink-0 w-full",
83
- className
84
- )
76
+ className: chunkDWD754BX_cjs.cn("bg-bg-primary inline-flex w-full flex-shrink-0 justify-center", className)
85
77
  }
86
78
  );
87
79
  }
@@ -3,15 +3,15 @@
3
3
  var chunkJT64WF26_cjs = require('./chunk-JT64WF26.cjs');
4
4
  var chunkMKKH4EGP_cjs = require('./chunk-MKKH4EGP.cjs');
5
5
  var chunkBHC7GX53_cjs = require('./chunk-BHC7GX53.cjs');
6
- var chunkLZPXMTJ7_cjs = require('./chunk-LZPXMTJ7.cjs');
7
6
  var chunkRPTRTGC2_cjs = require('./chunk-RPTRTGC2.cjs');
7
+ var chunkQFMQNY4G_cjs = require('./chunk-QFMQNY4G.cjs');
8
8
  var chunkDWD754BX_cjs = require('./chunk-DWD754BX.cjs');
9
9
  var lucideReact = require('lucide-react');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
 
12
12
  var LiquidToggleButton = ({ className, ...props }) => {
13
13
  const { theme, setTheme, storageKey } = chunkJT64WF26_cjs.useTheme();
14
- const document = chunkLZPXMTJ7_cjs.useDocument();
14
+ const document = chunkQFMQNY4G_cjs.useDocument();
15
15
  const handleLiquidToggle = () => {
16
16
  let newTheme;
17
17
  if (theme === "light") {
@@ -54,7 +54,7 @@ var LiquidToggleButton = ({ className, ...props }) => {
54
54
  };
55
55
  var ThemeToggleButton = (props) => {
56
56
  const { theme, setTheme, storageKey } = chunkJT64WF26_cjs.useTheme();
57
- const document = chunkLZPXMTJ7_cjs.useDocument();
57
+ const document = chunkQFMQNY4G_cjs.useDocument();
58
58
  const handleThemeChange = () => {
59
59
  let newTheme;
60
60
  if (theme === "light") {
@@ -0,0 +1,26 @@
1
+ import { useLocation } from './chunk-IZARTVYN.mjs';
2
+ import { useWindow } from './chunk-RHX3D3GE.mjs';
3
+ import { atom, useAtom } from 'jotai';
4
+ import { useEffect } from 'react';
5
+
6
+ var queryParamsAtom = atom({});
7
+ function useQueryParams(key) {
8
+ const [queryParams, setQueryParams] = useAtom(queryParamsAtom);
9
+ const window = useWindow();
10
+ const location = useLocation();
11
+ useEffect(() => {
12
+ if (!window) return;
13
+ const updateParams = () => {
14
+ const queries = new URLSearchParams(location?.search);
15
+ const params = Object.fromEntries(queries);
16
+ setQueryParams(params);
17
+ };
18
+ updateParams();
19
+ window.addEventListener("popstate", updateParams);
20
+ return () => window.removeEventListener("popstate", updateParams);
21
+ }, [window, location, setQueryParams]);
22
+ if (!window) return key ? null : {};
23
+ return key ? queryParams[key] || null : queryParams;
24
+ }
25
+
26
+ export { useQueryParams };
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // src/hooks/useWindow.tsx
6
+ function subscribe(callback) {
7
+ return () => {
8
+ };
9
+ }
10
+ function getSnapshot() {
11
+ return typeof window !== "undefined" ? window : void 0;
12
+ }
13
+ function getServerSnapshot() {
14
+ return void 0;
15
+ }
16
+ function useWindow() {
17
+ return react.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
18
+ }
19
+
20
+ exports.useWindow = useWindow;