@vuer-ai/vuer-uikit 0.0.7 → 0.0.12
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.
- package/README.md +2 -0
- package/dist/{chunk-EGPLKTJM.js → chunk-2YCL2ET2.js} +1 -1
- package/dist/{chunk-CP7QYV4N.mjs → chunk-44KW6PTD.mjs} +1 -0
- package/dist/{chunk-KQAHAGUG.js → chunk-AOUGWGQR.js} +2 -2
- package/dist/{chunk-J7PTSP4Q.mjs → chunk-EAZQH4IX.mjs} +8 -0
- package/dist/{chunk-4PAHMURP.js → chunk-EFIRD3FN.js} +2 -1
- package/dist/chunk-EOFYA6CS.js +53 -0
- package/dist/{chunk-O4TK3AKI.mjs → chunk-EYIFKSU2.mjs} +1 -1
- package/dist/{chunk-WMXX2UMD.mjs → chunk-FEOONYZ2.mjs} +2 -2
- package/dist/{chunk-66DYOZI3.js → chunk-FORVP7XH.js} +6 -5
- package/dist/{chunk-7X6N54LX.mjs → chunk-G5KMD72J.mjs} +6 -5
- package/dist/{chunk-5MZCQW4U.js → chunk-IXHMIR5P.js} +4 -4
- package/dist/{chunk-OBWGRG45.js → chunk-JAJNLRY5.js} +7 -7
- package/dist/{chunk-WOZWC6KO.mjs → chunk-JMPVDU2C.mjs} +35 -4
- package/dist/{chunk-E5KWKBH3.mjs → chunk-LEPXSM36.mjs} +10 -24
- package/dist/chunk-M4TZHOUK.js +41 -0
- package/dist/{chunk-3XVIJY3H.mjs → chunk-MRVMXKZO.mjs} +1 -1
- package/dist/{chunk-UMIQYHO6.mjs → chunk-OOI3SJDU.mjs} +10 -4
- package/dist/{chunk-B5EMQBVL.js → chunk-OTPUWWEB.js} +8 -3
- package/dist/{chunk-FSMKJAZT.js → chunk-PVRQNCSJ.js} +9 -23
- package/dist/chunk-Q5KEB4UK.mjs +51 -0
- package/dist/{chunk-XUQ5A7ZA.js → chunk-QEY7BWIR.js} +10 -4
- package/dist/{chunk-QZASHJNJ.js → chunk-QJR6MCTR.js} +8 -0
- package/dist/chunk-T3WBC5YK.mjs +39 -0
- package/dist/{chunk-IOI3YFTY.js → chunk-U2ZLDPOE.js} +8 -8
- package/dist/{chunk-ZJXBC33M.js → chunk-UFHMEEGL.js} +1 -0
- package/dist/{chunk-IG43DNY2.mjs → chunk-UKFVRXAR.mjs} +1 -1
- package/dist/{chunk-5P3KAS53.js → chunk-WJ7T7FAH.js} +34 -3
- package/dist/{chunk-SP3DH5MP.mjs → chunk-WO3WHXDP.mjs} +2 -1
- package/dist/{chunk-6L4KPPOD.mjs → chunk-XMG3IVGZ.mjs} +8 -3
- package/dist/{chunk-XCCC7HVN.mjs → chunk-ZVG2UKKC.mjs} +1 -1
- package/dist/highlight-cursor/cursor-provider.js +2 -2
- package/dist/highlight-cursor/cursor-provider.mjs +1 -1
- package/dist/highlight-cursor/enhanced-components.js +11 -10
- package/dist/highlight-cursor/enhanced-components.mjs +6 -5
- package/dist/highlight-cursor/index.js +15 -14
- package/dist/highlight-cursor/index.mjs +7 -6
- package/dist/highlight-cursor/tabs-cursor-context.js +3 -3
- package/dist/highlight-cursor/tabs-cursor-context.mjs +1 -1
- package/dist/highlight-cursor/with-cursor.js +2 -2
- package/dist/highlight-cursor/with-cursor.mjs +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +72 -62
- package/dist/index.mjs +18 -16
- package/dist/ui/avatar.js +2 -1
- package/dist/ui/avatar.mjs +2 -1
- package/dist/ui/badge.d.mts +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +5 -4
- package/dist/ui/badge.mjs +3 -2
- package/dist/ui/button.js +2 -1
- package/dist/ui/button.mjs +2 -1
- package/dist/ui/card.js +2 -1
- package/dist/ui/card.mjs +2 -1
- package/dist/ui/checkbox.js +2 -1
- package/dist/ui/checkbox.mjs +2 -1
- package/dist/ui/collapsible.js +2 -1
- package/dist/ui/collapsible.mjs +2 -1
- package/dist/ui/dropdown.js +2 -1
- package/dist/ui/dropdown.mjs +2 -1
- package/dist/ui/index.d.mts +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +57 -51
- package/dist/ui/index.mjs +15 -13
- package/dist/ui/input-numbers.js +4 -3
- package/dist/ui/input-numbers.mjs +3 -2
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/input.js +2 -1
- package/dist/ui/input.mjs +2 -1
- package/dist/ui/layout.js +2 -1
- package/dist/ui/layout.mjs +2 -1
- package/dist/ui/modal.js +2 -1
- package/dist/ui/modal.mjs +2 -1
- package/dist/ui/popover.js +2 -1
- package/dist/ui/popover.mjs +2 -1
- package/dist/ui/radio-group.js +2 -1
- package/dist/ui/radio-group.mjs +2 -1
- package/dist/ui/select.d.mts +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.js +2 -1
- package/dist/ui/select.mjs +2 -1
- package/dist/ui/slider.js +2 -1
- package/dist/ui/slider.mjs +2 -1
- package/dist/ui/switch.js +2 -1
- package/dist/ui/switch.mjs +2 -1
- package/dist/ui/tabs.js +8 -7
- package/dist/ui/tabs.mjs +4 -3
- package/dist/ui/textarea.d.mts +1 -1
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.js +2 -1
- package/dist/ui/textarea.mjs +2 -1
- package/dist/ui/theme-context.js +6 -3
- package/dist/ui/theme-context.mjs +4 -1
- package/dist/ui/timeline.js +6 -5
- package/dist/ui/timeline.mjs +5 -4
- package/dist/ui/toast.d.mts +1 -1
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toast.js +3 -3
- package/dist/ui/toast.mjs +1 -1
- package/dist/ui/toggle-group.js +2 -1
- package/dist/ui/toggle-group.mjs +2 -1
- package/dist/ui/toggle.js +2 -1
- package/dist/ui/toggle.mjs +2 -1
- package/dist/ui/tooltip.d.mts +3 -3
- package/dist/ui/tooltip.d.ts +3 -3
- package/dist/ui/tooltip.js +7 -6
- package/dist/ui/tooltip.mjs +3 -2
- package/dist/ui/tree-view-v2.js +5 -4
- package/dist/ui/tree-view-v2.mjs +4 -3
- package/dist/ui/tree-view.js +2 -2
- package/dist/ui/tree-view.mjs +1 -1
- package/dist/ui/version-badge.d.mts +26 -0
- package/dist/ui/version-badge.d.ts +26 -0
- package/dist/ui/version-badge.js +14 -0
- package/dist/ui/version-badge.mjs +5 -0
- package/dist/utils/index.d.mts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +6 -1
- package/dist/utils/index.mjs +2 -1
- package/dist/utils/use-local-storage.d.mts +3 -0
- package/dist/utils/use-local-storage.d.ts +3 -0
- package/dist/utils/use-local-storage.js +10 -0
- package/dist/utils/use-local-storage.mjs +1 -0
- package/package.json +4 -3
- /package/dist/{chunk-IKIXD35H.mjs → chunk-F56ZKT7B.mjs} +0 -0
- /package/dist/{chunk-QS7WS6DD.mjs → chunk-M4IVLZIH.mjs} +0 -0
- /package/dist/{chunk-P3NMVNEO.js → chunk-N7CINZS2.js} +0 -0
- /package/dist/{chunk-ST4P6AN6.js → chunk-XWS4SIB5.js} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useState, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/utils/use-local-storage.ts
|
|
4
|
+
function useLocalStorage(key, initialValue) {
|
|
5
|
+
const [storedValue, setStoredValue] = useState(() => {
|
|
6
|
+
if (typeof window === "undefined") {
|
|
7
|
+
return initialValue;
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
const item = window.localStorage.getItem(key);
|
|
11
|
+
if (item === null) return initialValue;
|
|
12
|
+
if (typeof initialValue === "string") {
|
|
13
|
+
return item;
|
|
14
|
+
} else if (typeof initialValue === "number") {
|
|
15
|
+
return parseFloat(item) || initialValue;
|
|
16
|
+
} else if (typeof initialValue === "boolean") {
|
|
17
|
+
return item === "true";
|
|
18
|
+
} else {
|
|
19
|
+
return JSON.parse(item);
|
|
20
|
+
}
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.warn(`Error reading localStorage key "${key}":`, error);
|
|
23
|
+
return initialValue;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const setValue = useCallback(
|
|
27
|
+
(value) => {
|
|
28
|
+
try {
|
|
29
|
+
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
30
|
+
setStoredValue(valueToStore);
|
|
31
|
+
if (typeof window !== "undefined") {
|
|
32
|
+
let stringValue;
|
|
33
|
+
if (typeof valueToStore === "string") {
|
|
34
|
+
stringValue = valueToStore;
|
|
35
|
+
} else if (typeof valueToStore === "number" || typeof valueToStore === "boolean") {
|
|
36
|
+
stringValue = valueToStore.toString();
|
|
37
|
+
} else {
|
|
38
|
+
stringValue = JSON.stringify(valueToStore);
|
|
39
|
+
}
|
|
40
|
+
window.localStorage.setItem(key, stringValue);
|
|
41
|
+
}
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.warn(`Error setting localStorage key "${key}":`, error);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[key, storedValue]
|
|
47
|
+
);
|
|
48
|
+
return [storedValue, setValue];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { useLocalStorage };
|
|
@@ -17,6 +17,7 @@ var CursorProvider = ({
|
|
|
17
17
|
as: Component = "div",
|
|
18
18
|
...props
|
|
19
19
|
}) => {
|
|
20
|
+
const [isClient, setIsClient] = react.useState(false);
|
|
20
21
|
const [isMouseInside, setIsMouseInside] = react.useState(false);
|
|
21
22
|
const [mousePosition, setMousePosition] = react.useState({ x: 0, y: 0 });
|
|
22
23
|
const [hoveredElementId, setHoveredElementId] = react.useState(null);
|
|
@@ -30,12 +31,16 @@ var CursorProvider = ({
|
|
|
30
31
|
});
|
|
31
32
|
const hoveredElementRef = react.useRef(null);
|
|
32
33
|
react.useEffect(() => {
|
|
34
|
+
setIsClient(true);
|
|
35
|
+
}, []);
|
|
36
|
+
react.useEffect(() => {
|
|
37
|
+
if (!isClient) return;
|
|
33
38
|
const handleMouseMove = (e) => {
|
|
34
39
|
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
35
40
|
};
|
|
36
41
|
document.addEventListener("mousemove", handleMouseMove);
|
|
37
42
|
return () => document.removeEventListener("mousemove", handleMouseMove);
|
|
38
|
-
}, []);
|
|
43
|
+
}, [isClient]);
|
|
39
44
|
const handleMouseEnter = react.useCallback(() => {
|
|
40
45
|
setIsMouseInside(true);
|
|
41
46
|
}, []);
|
|
@@ -64,6 +69,7 @@ var CursorProvider = ({
|
|
|
64
69
|
}
|
|
65
70
|
}, [mousePosition, hoveredElementId]);
|
|
66
71
|
react.useEffect(() => {
|
|
72
|
+
if (!isClient) return;
|
|
67
73
|
const handleScroll = () => {
|
|
68
74
|
checkMouseInElement();
|
|
69
75
|
};
|
|
@@ -71,7 +77,7 @@ var CursorProvider = ({
|
|
|
71
77
|
return () => {
|
|
72
78
|
document.removeEventListener("scroll", handleScroll, { capture: true });
|
|
73
79
|
};
|
|
74
|
-
}, [checkMouseInElement]);
|
|
80
|
+
}, [checkMouseInElement, isClient]);
|
|
75
81
|
const registerHoveredElement = react.useCallback(
|
|
76
82
|
(id, dimensions, element) => {
|
|
77
83
|
setHoveredElementId(id);
|
|
@@ -170,7 +176,7 @@ var CursorProvider = ({
|
|
|
170
176
|
} else {
|
|
171
177
|
styleClass = `opacity-90 rounded-xl z-10 transition-[width,height,left,top] duration-${transitionDuration} ease-out transition-opacity duration-${transitionDuration}`;
|
|
172
178
|
}
|
|
173
|
-
const cursorElement = isMouseInside && /* @__PURE__ */ jsxRuntime.jsx(
|
|
179
|
+
const cursorElement = isClient && isMouseInside && /* @__PURE__ */ jsxRuntime.jsx(
|
|
174
180
|
"div",
|
|
175
181
|
{
|
|
176
182
|
className: `pointer-events-none fixed ${styleClass} ${hoveredElementId ? "" : cursorClassName || ""}`,
|
|
@@ -181,7 +187,7 @@ var CursorProvider = ({
|
|
|
181
187
|
}
|
|
182
188
|
);
|
|
183
189
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
184
|
-
typeof document !== "undefined" && document.body && cursorElement && reactDom.createPortal(cursorElement, document.body),
|
|
190
|
+
isClient && typeof document !== "undefined" && document.body && cursorElement && reactDom.createPortal(cursorElement, document.body),
|
|
185
191
|
/* @__PURE__ */ jsxRuntime.jsx(chunkCLTLT5XW_js.CursorContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
186
192
|
Component,
|
|
187
193
|
{
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var react = require('react');
|
|
3
4
|
var sonner = require('sonner');
|
|
4
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
|
|
6
7
|
// src/ui/toast.tsx
|
|
7
8
|
var Toaster = ({ ...props }) => {
|
|
9
|
+
const [isClient, setIsClient] = react.useState(false);
|
|
10
|
+
react.useEffect(() => {
|
|
11
|
+
setIsClient(true);
|
|
12
|
+
}, []);
|
|
13
|
+
if (!isClient) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
8
16
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
17
|
sonner.Toaster,
|
|
10
18
|
{
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Badge } from './chunk-WO3WHXDP.mjs';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var PACKAGE_VERSION = "0.0.11";
|
|
5
|
+
var PACKAGE_NAME = "@vuer-ai/vuer-uikit";
|
|
6
|
+
function VersionBadge({
|
|
7
|
+
className,
|
|
8
|
+
showPrefix = true,
|
|
9
|
+
linkable = true,
|
|
10
|
+
version: overrideVersion
|
|
11
|
+
}) {
|
|
12
|
+
const currentVersion = overrideVersion || PACKAGE_VERSION;
|
|
13
|
+
const displayVersion = showPrefix ? `v${currentVersion}` : currentVersion;
|
|
14
|
+
const npmUrl = `https://www.npmjs.com/package/${PACKAGE_NAME}/v/${currentVersion}`;
|
|
15
|
+
const badge = /* @__PURE__ */ jsx(
|
|
16
|
+
Badge,
|
|
17
|
+
{
|
|
18
|
+
variant: "accent",
|
|
19
|
+
className,
|
|
20
|
+
style: linkable ? { cursor: "pointer" } : void 0,
|
|
21
|
+
children: displayVersion
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
if (linkable) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"a",
|
|
27
|
+
{
|
|
28
|
+
href: npmUrl,
|
|
29
|
+
target: "_blank",
|
|
30
|
+
rel: "noopener noreferrer",
|
|
31
|
+
className: "no-underline hover:no-underline",
|
|
32
|
+
children: badge
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return badge;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { VersionBadge };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWJ7T7FAH_js = require('./chunk-WJ7T7FAH.js');
|
|
4
4
|
var chunkXXWQ4RVP_js = require('./chunk-XXWQ4RVP.js');
|
|
5
5
|
var lucideReact = require('lucide-react');
|
|
6
6
|
var react = require('react');
|
|
@@ -148,9 +148,9 @@ function TreeView({
|
|
|
148
148
|
onChange: (e) => setSearchQuery(e.target.value)
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
152
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
153
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkWJ7T7FAH_js.TooltipProvider, { delayDuration: 200, children: [
|
|
152
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkWJ7T7FAH_js.Tooltip, { children: [
|
|
153
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWJ7T7FAH_js.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
154
154
|
"button",
|
|
155
155
|
{
|
|
156
156
|
onClick: () => setIsCaseSensitive((prev) => !prev),
|
|
@@ -158,10 +158,10 @@ function TreeView({
|
|
|
158
158
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CaseSensitive, { className: "size-4" })
|
|
159
159
|
}
|
|
160
160
|
) }),
|
|
161
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
161
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWJ7T7FAH_js.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Case Sensitive" }) })
|
|
162
162
|
] }),
|
|
163
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
164
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
163
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkWJ7T7FAH_js.Tooltip, { children: [
|
|
164
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWJ7T7FAH_js.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
165
165
|
"button",
|
|
166
166
|
{
|
|
167
167
|
onClick: () => setIsRegex((prev) => !prev),
|
|
@@ -169,7 +169,7 @@ function TreeView({
|
|
|
169
169
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Regex, { className: "size-4" })
|
|
170
170
|
}
|
|
171
171
|
) }),
|
|
172
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
172
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkWJ7T7FAH_js.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Use Regular Expression" }) })
|
|
173
173
|
] })
|
|
174
174
|
] })
|
|
175
175
|
] }),
|
|
@@ -18,6 +18,7 @@ var getVisibleRect = (element, elementRect) => {
|
|
|
18
18
|
y: elementRect.y
|
|
19
19
|
};
|
|
20
20
|
while (parent) {
|
|
21
|
+
if (typeof window === "undefined") break;
|
|
21
22
|
const style = window.getComputedStyle(parent);
|
|
22
23
|
const hasOverflow = [style.overflowY, style.overflowX].some(
|
|
23
24
|
(overflow) => ["auto", "scroll", "hidden"].includes(overflow)
|
|
@@ -89,7 +89,7 @@ var TreeView = forwardRef(
|
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
91
|
className: cn(
|
|
92
|
-
"bg-bg-primary relative max-w-[300px] min-w-[240px] overflow-hidden p-2",
|
|
92
|
+
"bg-bg-primary rounded-uk-md relative max-w-[300px] min-w-[240px] overflow-hidden p-2",
|
|
93
93
|
className
|
|
94
94
|
),
|
|
95
95
|
"data-tree-container": true,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkXXWQ4RVP_js = require('./chunk-XXWQ4RVP.js');
|
|
4
4
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
5
|
+
var react = require('react');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
|
|
7
8
|
function _interopNamespace(e) {
|
|
@@ -26,21 +27,44 @@ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitiv
|
|
|
26
27
|
|
|
27
28
|
function TooltipProvider({
|
|
28
29
|
delayDuration = 0,
|
|
30
|
+
children,
|
|
29
31
|
...props
|
|
30
32
|
}) {
|
|
33
|
+
const [isClient, setIsClient] = react.useState(false);
|
|
34
|
+
react.useEffect(() => {
|
|
35
|
+
setIsClient(true);
|
|
36
|
+
}, []);
|
|
37
|
+
if (!isClient) {
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
39
|
+
}
|
|
31
40
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
41
|
TooltipPrimitive__namespace.Provider,
|
|
33
42
|
{
|
|
34
43
|
"data-slot": "tooltip-provider",
|
|
35
44
|
delayDuration,
|
|
36
|
-
...props
|
|
45
|
+
...props,
|
|
46
|
+
children
|
|
37
47
|
}
|
|
38
48
|
);
|
|
39
49
|
}
|
|
40
|
-
function Tooltip({ ...props }) {
|
|
41
|
-
|
|
50
|
+
function Tooltip({ children, ...props }) {
|
|
51
|
+
const [isClient, setIsClient] = react.useState(false);
|
|
52
|
+
react.useEffect(() => {
|
|
53
|
+
setIsClient(true);
|
|
54
|
+
}, []);
|
|
55
|
+
if (!isClient) {
|
|
56
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props, children }) });
|
|
42
59
|
}
|
|
43
60
|
function TooltipTrigger({ ...props }) {
|
|
61
|
+
const [isClient, setIsClient] = react.useState(false);
|
|
62
|
+
react.useEffect(() => {
|
|
63
|
+
setIsClient(true);
|
|
64
|
+
}, []);
|
|
65
|
+
if (!isClient) {
|
|
66
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.children });
|
|
67
|
+
}
|
|
44
68
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
45
69
|
}
|
|
46
70
|
function TooltipContent({
|
|
@@ -49,6 +73,13 @@ function TooltipContent({
|
|
|
49
73
|
children,
|
|
50
74
|
...props
|
|
51
75
|
}) {
|
|
76
|
+
const [isClient, setIsClient] = react.useState(false);
|
|
77
|
+
react.useEffect(() => {
|
|
78
|
+
setIsClient(true);
|
|
79
|
+
}, []);
|
|
80
|
+
if (!isClient) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
52
83
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
53
84
|
TooltipPrimitive__namespace.Content,
|
|
54
85
|
{
|
|
@@ -30,7 +30,8 @@ var badgeVariants = cva(
|
|
|
30
30
|
secondary: "bg-bg-secondary",
|
|
31
31
|
destructive: "bg-danger-primary",
|
|
32
32
|
success: "bg-accent-success",
|
|
33
|
-
warning: "bg-accent-warning"
|
|
33
|
+
warning: "bg-accent-warning",
|
|
34
|
+
accent: "bg-accent-primary text-text-primary"
|
|
34
35
|
},
|
|
35
36
|
type: {
|
|
36
37
|
default: "",
|
|
@@ -10,17 +10,22 @@ var TabsCursorProvider = ({
|
|
|
10
10
|
className,
|
|
11
11
|
...props
|
|
12
12
|
}) => {
|
|
13
|
+
const [isClient, setIsClient] = useState(false);
|
|
13
14
|
const [cursorTarget, setCursorTarget] = useState(null);
|
|
14
15
|
const [targetRect, setTargetRect] = useState(null);
|
|
15
16
|
const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
|
|
16
17
|
const [isMouseInside, setIsMouseInside] = useState(false);
|
|
17
18
|
useEffect(() => {
|
|
19
|
+
setIsClient(true);
|
|
20
|
+
}, []);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!isClient) return;
|
|
18
23
|
const handleMouseMove = (e) => {
|
|
19
24
|
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
20
25
|
};
|
|
21
26
|
document.addEventListener("mousemove", handleMouseMove);
|
|
22
27
|
return () => document.removeEventListener("mousemove", handleMouseMove);
|
|
23
|
-
}, []);
|
|
28
|
+
}, [isClient]);
|
|
24
29
|
useEffect(() => {
|
|
25
30
|
if (cursorTarget) {
|
|
26
31
|
setTargetRect(cursorTarget.getBoundingClientRect());
|
|
@@ -49,7 +54,7 @@ var TabsCursorProvider = ({
|
|
|
49
54
|
onMouseLeave: handleMouseLeave,
|
|
50
55
|
children: /* @__PURE__ */ jsxs(TabsCursorContext.Provider, { value: contextValue, children: [
|
|
51
56
|
children,
|
|
52
|
-
isMouseInside && createPortal(
|
|
57
|
+
isClient && isMouseInside && typeof document !== "undefined" && document.body && createPortal(
|
|
53
58
|
/* @__PURE__ */ jsx(
|
|
54
59
|
motion.div,
|
|
55
60
|
{
|
|
@@ -60,7 +65,7 @@ var TabsCursorProvider = ({
|
|
|
60
65
|
y: targetRect ? targetRect.top : mousePosition.y - 8,
|
|
61
66
|
width: targetRect ? targetRect.width : 16,
|
|
62
67
|
height: targetRect ? targetRect.height : 16,
|
|
63
|
-
borderRadius: targetRect && cursorTarget ? getComputedStyle(cursorTarget).borderRadius : "50%"
|
|
68
|
+
borderRadius: targetRect && cursorTarget && typeof window !== "undefined" ? getComputedStyle(cursorTarget).borderRadius : "50%"
|
|
64
69
|
},
|
|
65
70
|
transition: { type: "spring", stiffness: 1e3, damping: 60, mass: 1 },
|
|
66
71
|
style: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TreeView } from './chunk-
|
|
1
|
+
import { TreeView } from './chunk-EYIFKSU2.mjs';
|
|
2
2
|
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
3
3
|
import { Magnet, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
4
4
|
import React, { useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQEY7BWIR_js = require('../chunk-QEY7BWIR.js');
|
|
4
4
|
require('../chunk-XXWQ4RVP.js');
|
|
5
5
|
require('../chunk-CLTLT5XW.js');
|
|
6
6
|
|
|
@@ -8,5 +8,5 @@ require('../chunk-CLTLT5XW.js');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "CursorProvider", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkQEY7BWIR_js.CursorProvider; }
|
|
12
12
|
});
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkJAJNLRY5_js = require('../chunk-JAJNLRY5.js');
|
|
4
|
+
require('../chunk-IXHMIR5P.js');
|
|
5
5
|
require('../chunk-5OUTEHVX.js');
|
|
6
6
|
require('../chunk-MZ4POL3U.js');
|
|
7
7
|
require('../chunk-QA7H2Z3Z.js');
|
|
8
8
|
require('../chunk-SKO72K64.js');
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-UFHMEEGL.js');
|
|
10
|
+
require('../chunk-XWS4SIB5.js');
|
|
11
|
+
require('../chunk-EOFYA6CS.js');
|
|
11
12
|
require('../chunk-XXWQ4RVP.js');
|
|
12
13
|
require('../chunk-CLTLT5XW.js');
|
|
13
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-OTPUWWEB.js');
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
Object.defineProperty(exports, "CursorButton", {
|
|
18
19
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkJAJNLRY5_js.CursorButton; }
|
|
20
21
|
});
|
|
21
22
|
Object.defineProperty(exports, "CursorInputRoot", {
|
|
22
23
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkJAJNLRY5_js.CursorInputRoot; }
|
|
24
25
|
});
|
|
25
26
|
Object.defineProperty(exports, "CursorSelectTrigger", {
|
|
26
27
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkJAJNLRY5_js.CursorSelectTrigger; }
|
|
28
29
|
});
|
|
29
30
|
Object.defineProperty(exports, "CursorTabs", {
|
|
30
31
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkJAJNLRY5_js.CursorTabs; }
|
|
32
33
|
});
|
|
33
34
|
Object.defineProperty(exports, "CursorTextarea", {
|
|
34
35
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkJAJNLRY5_js.CursorTextarea; }
|
|
36
37
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-FEOONYZ2.mjs';
|
|
2
|
+
import '../chunk-MRVMXKZO.mjs';
|
|
3
3
|
import '../chunk-DDOX4EEM.mjs';
|
|
4
4
|
import '../chunk-QVUX6LLD.mjs';
|
|
5
5
|
import '../chunk-IQ6J7YTQ.mjs';
|
|
6
6
|
import '../chunk-QYRRQ65X.mjs';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-44KW6PTD.mjs';
|
|
8
|
+
import '../chunk-M4IVLZIH.mjs';
|
|
9
|
+
import '../chunk-Q5KEB4UK.mjs';
|
|
9
10
|
import '../chunk-KTNZSZ5Y.mjs';
|
|
10
11
|
import '../chunk-3FR3WKI4.mjs';
|
|
11
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-XMG3IVGZ.mjs';
|
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-KJ42IGH6.js');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkQEY7BWIR_js = require('../chunk-QEY7BWIR.js');
|
|
5
|
+
var chunkJAJNLRY5_js = require('../chunk-JAJNLRY5.js');
|
|
6
|
+
require('../chunk-IXHMIR5P.js');
|
|
7
7
|
require('../chunk-5OUTEHVX.js');
|
|
8
8
|
require('../chunk-MZ4POL3U.js');
|
|
9
9
|
require('../chunk-QA7H2Z3Z.js');
|
|
10
10
|
require('../chunk-SKO72K64.js');
|
|
11
|
-
var
|
|
12
|
-
require('../chunk-
|
|
11
|
+
var chunkUFHMEEGL_js = require('../chunk-UFHMEEGL.js');
|
|
12
|
+
require('../chunk-XWS4SIB5.js');
|
|
13
|
+
require('../chunk-EOFYA6CS.js');
|
|
13
14
|
require('../chunk-XXWQ4RVP.js');
|
|
14
15
|
require('../chunk-CLTLT5XW.js');
|
|
15
|
-
var
|
|
16
|
+
var chunkOTPUWWEB_js = require('../chunk-OTPUWWEB.js');
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
Object.defineProperty(exports, "CursorProvider", {
|
|
20
21
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkQEY7BWIR_js.CursorProvider; }
|
|
22
23
|
});
|
|
23
24
|
Object.defineProperty(exports, "CursorButton", {
|
|
24
25
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkJAJNLRY5_js.CursorButton; }
|
|
26
27
|
});
|
|
27
28
|
Object.defineProperty(exports, "CursorInputRoot", {
|
|
28
29
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkJAJNLRY5_js.CursorInputRoot; }
|
|
30
31
|
});
|
|
31
32
|
Object.defineProperty(exports, "CursorSelectTrigger", {
|
|
32
33
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkJAJNLRY5_js.CursorSelectTrigger; }
|
|
34
35
|
});
|
|
35
36
|
Object.defineProperty(exports, "CursorTabs", {
|
|
36
37
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkJAJNLRY5_js.CursorTabs; }
|
|
38
39
|
});
|
|
39
40
|
Object.defineProperty(exports, "CursorTextarea", {
|
|
40
41
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkJAJNLRY5_js.CursorTextarea; }
|
|
42
43
|
});
|
|
43
44
|
Object.defineProperty(exports, "withCursor", {
|
|
44
45
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkUFHMEEGL_js.withCursor; }
|
|
46
47
|
});
|
|
47
48
|
Object.defineProperty(exports, "TabsCursorProvider", {
|
|
48
49
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkOTPUWWEB_js.TabsCursorProvider; }
|
|
50
51
|
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import '../chunk-VGCVIHBR.mjs';
|
|
2
|
-
export { CursorProvider } from '../chunk-
|
|
3
|
-
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { CursorProvider } from '../chunk-OOI3SJDU.mjs';
|
|
3
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-FEOONYZ2.mjs';
|
|
4
|
+
import '../chunk-MRVMXKZO.mjs';
|
|
5
5
|
import '../chunk-DDOX4EEM.mjs';
|
|
6
6
|
import '../chunk-QVUX6LLD.mjs';
|
|
7
7
|
import '../chunk-IQ6J7YTQ.mjs';
|
|
8
8
|
import '../chunk-QYRRQ65X.mjs';
|
|
9
|
-
export { withCursor } from '../chunk-
|
|
10
|
-
import '../chunk-
|
|
9
|
+
export { withCursor } from '../chunk-44KW6PTD.mjs';
|
|
10
|
+
import '../chunk-M4IVLZIH.mjs';
|
|
11
|
+
import '../chunk-Q5KEB4UK.mjs';
|
|
11
12
|
import '../chunk-KTNZSZ5Y.mjs';
|
|
12
13
|
import '../chunk-3FR3WKI4.mjs';
|
|
13
|
-
export { TabsCursorProvider } from '../chunk-
|
|
14
|
+
export { TabsCursorProvider } from '../chunk-XMG3IVGZ.mjs';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOTPUWWEB_js = require('../chunk-OTPUWWEB.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "TabsCursorProvider", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkOTPUWWEB_js.TabsCursorProvider; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "useTabsCursor", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkOTPUWWEB_js.useTabsCursor; }
|
|
14
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TabsCursorProvider, useTabsCursor } from '../chunk-
|
|
1
|
+
export { TabsCursorProvider, useTabsCursor } from '../chunk-XMG3IVGZ.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUFHMEEGL_js = require('../chunk-UFHMEEGL.js');
|
|
4
4
|
require('../chunk-CLTLT5XW.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "withCursor", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkUFHMEEGL_js.withCursor; }
|
|
11
11
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { withCursor } from '../chunk-
|
|
1
|
+
export { withCursor } from '../chunk-44KW6PTD.mjs';
|
|
2
2
|
import '../chunk-3FR3WKI4.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -24,8 +24,10 @@ export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/collap
|
|
|
24
24
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './ui/select.mjs';
|
|
25
25
|
export { Slider, SliderProps } from './ui/slider.mjs';
|
|
26
26
|
export { Layout, LayoutProps } from './ui/layout.mjs';
|
|
27
|
+
export { VersionBadge } from './ui/version-badge.mjs';
|
|
27
28
|
export { Theme, ThemeProvider, useTheme } from './ui/theme-context.mjs';
|
|
28
29
|
export { cn } from './utils/cn.mjs';
|
|
30
|
+
export { useLocalStorage } from './utils/use-local-storage.mjs';
|
|
29
31
|
export { CursorProvider } from './highlight-cursor/cursor-provider.mjs';
|
|
30
32
|
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from './highlight-cursor/enhanced-components.mjs';
|
|
31
33
|
export { TabsCursorProvider } from './highlight-cursor/tabs-cursor-context.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -24,8 +24,10 @@ export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/collap
|
|
|
24
24
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './ui/select.js';
|
|
25
25
|
export { Slider, SliderProps } from './ui/slider.js';
|
|
26
26
|
export { Layout, LayoutProps } from './ui/layout.js';
|
|
27
|
+
export { VersionBadge } from './ui/version-badge.js';
|
|
27
28
|
export { Theme, ThemeProvider, useTheme } from './ui/theme-context.js';
|
|
28
29
|
export { cn } from './utils/cn.js';
|
|
30
|
+
export { useLocalStorage } from './utils/use-local-storage.js';
|
|
29
31
|
export { CursorProvider } from './highlight-cursor/cursor-provider.js';
|
|
30
32
|
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from './highlight-cursor/enhanced-components.js';
|
|
31
33
|
export { TabsCursorProvider } from './highlight-cursor/tabs-cursor-context.js';
|