@floegence/floe-webapp-core 0.50.6 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/chat/input/ChatInput.js +8 -8
- package/dist/components/ui/Button.js +16 -13
- package/dist/components/ui/Card.js +125 -119
- package/dist/components/ui/Checkbox.js +178 -132
- package/dist/components/ui/CommandPalette.js +10 -10
- package/dist/components/ui/Dialog.d.ts +7 -0
- package/dist/components/ui/Dialog.js +160 -114
- package/dist/components/ui/DirectoryInput.js +5 -5
- package/dist/components/ui/Dropdown.d.ts +2 -0
- package/dist/components/ui/Dropdown.js +183 -160
- package/dist/components/ui/FloatingWindow.js +211 -199
- package/dist/components/ui/HighlightBlock.js +8 -8
- package/dist/components/ui/Input.js +40 -40
- package/dist/components/ui/Pagination.js +90 -88
- package/dist/components/ui/ProcessingIndicator.js +1 -1
- package/dist/components/ui/Progress.js +99 -88
- package/dist/components/ui/QuoteBlock.js +9 -9
- package/dist/components/ui/Radio.js +151 -127
- package/dist/components/ui/SegmentedControl.js +26 -25
- package/dist/components/ui/Stepper.js +114 -112
- package/dist/components/ui/Switch.js +34 -33
- package/dist/components/ui/Tabs.js +153 -150
- package/dist/components/ui/Tag.js +24 -21
- package/dist/components/ui/Tooltip.js +10 -10
- package/dist/components/ui/floatingPresence.js +40 -30
- package/dist/components/workbench/WorkbenchHud.js +9 -9
- package/dist/components/workbench/WorkbenchLockButton.js +4 -4
- package/dist/components/workbench/WorkbenchWidget.js +46 -43
- package/dist/context/FloeConfigContext.d.ts +5 -1
- package/dist/context/FloeConfigContext.js +10 -9
- package/dist/context/ThemeContext.d.ts +3 -1
- package/dist/context/ThemeContext.js +78 -71
- package/dist/floe.css +32 -0
- package/dist/full.js +839 -836
- package/dist/hooks/useOverlayMask.js +95 -83
- package/dist/index.js +150 -147
- package/dist/input-focus.css +0 -1
- package/dist/styles/themes/index.d.ts +3 -0
- package/dist/styles/themes/index.js +40 -31
- package/dist/styles/tokens.d.ts +36 -0
- package/dist/styles/tokens.js +12 -5
- package/dist/styles.css +1 -1
- package/dist/surface.css +467 -0
- package/dist/themes.d.ts +1 -1
- package/dist/ui.css +9 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { addEventListener as u, insert as s, createComponent as l, effect as D, setAttribute as E, className as F, template as c, use as z, delegateEvents as K } from "solid-js/web";
|
|
2
|
-
import { createSignal as R, onCleanup as U, Show as
|
|
2
|
+
import { createSignal as R, onCleanup as U, Show as v } from "solid-js";
|
|
3
3
|
import { cn as I } from "../../../utils/cn.js";
|
|
4
4
|
import { useChatContext as N } from "../ChatProvider.js";
|
|
5
5
|
import { useAttachments as O } from "../hooks/useAttachments.js";
|
|
6
6
|
import { AttachmentPreview as G } from "./AttachmentPreview.js";
|
|
7
|
-
var J = /* @__PURE__ */ c("<div class=chat-input-drop-overlay><span>Drop files here"), Q = /* @__PURE__ */ c('<button type=button class=chat-input-attachment-btn title="Add attachments">'), V = /* @__PURE__ */ c('<div data-floe-input-surface><div class=chat-input-body><textarea class=chat-input-textarea rows=2></textarea></div><div class=chat-input-toolbar><div class=chat-input-toolbar-left></div><div class=chat-input-toolbar-right><span class=chat-input-hint><kbd>Enter</kbd> send <kbd>Shift+Enter</kbd> newline</span><button type=button title="Send message">'), W = /* @__PURE__ */ c('<svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48">'), X = /* @__PURE__ */ c('<svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><line x1=22 y1=2 x2=11 y2=13></line><polygon points="22 2 15 22 11 13 2 9 22 2">'), Y = /* @__PURE__ */ c('<svg width=32 height=32 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1=12 y1=3 x2=12 y2=15>');
|
|
7
|
+
var J = /* @__PURE__ */ c("<div class=chat-input-drop-overlay><span>Drop files here"), Q = /* @__PURE__ */ c('<button type=button class=chat-input-attachment-btn title="Add attachments">'), V = /* @__PURE__ */ c('<div data-floe-input-surface data-floe-surface=inset><div class=chat-input-body><textarea class=chat-input-textarea rows=2></textarea></div><div class=chat-input-toolbar><div class=chat-input-toolbar-left></div><div class=chat-input-toolbar-right><span class=chat-input-hint><kbd>Enter</kbd> send <kbd>Shift+Enter</kbd> newline</span><button type=button title="Send message">'), W = /* @__PURE__ */ c('<svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48">'), X = /* @__PURE__ */ c('<svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><line x1=22 y1=2 x2=11 y2=13></line><polygon points="22 2 15 22 11 13 2 9 22 2">'), Y = /* @__PURE__ */ c('<svg width=32 height=32 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1=12 y1=3 x2=12 y2=15>');
|
|
8
8
|
const st = (d) => {
|
|
9
9
|
const a = N(), [p, y] = R("");
|
|
10
10
|
let h, r = null;
|
|
@@ -13,7 +13,7 @@ const st = (d) => {
|
|
|
13
13
|
maxSize: a.config().maxAttachmentSize,
|
|
14
14
|
acceptedTypes: a.config().acceptedFileTypes,
|
|
15
15
|
onUpload: a.config().allowAttachments ? (t) => a.uploadAttachment(t) : void 0
|
|
16
|
-
}), P = () => d.placeholder || a.config().placeholder || "Type a message...",
|
|
16
|
+
}), P = () => d.placeholder || a.config().placeholder || "Type a message...", f = () => (p().trim() || n.attachments().length > 0) && !d.disabled, b = () => {
|
|
17
17
|
const t = h;
|
|
18
18
|
t && (t.style.height = "auto", t.style.height = `${Math.min(t.scrollHeight, 320)}px`);
|
|
19
19
|
}, T = () => {
|
|
@@ -31,7 +31,7 @@ const st = (d) => {
|
|
|
31
31
|
}, B = (t) => {
|
|
32
32
|
t.isComposing || t.key === "Enter" && !t.shiftKey && (t.preventDefault(), w());
|
|
33
33
|
}, w = async () => {
|
|
34
|
-
if (!
|
|
34
|
+
if (!f()) return;
|
|
35
35
|
const t = p().trim(), o = n.attachments();
|
|
36
36
|
y(""), n.clearAttachments(), h && (h.style.height = "auto"), await a.sendMessage(t, o);
|
|
37
37
|
}, L = async (t) => {
|
|
@@ -41,7 +41,7 @@ const st = (d) => {
|
|
|
41
41
|
r !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(r), r = null);
|
|
42
42
|
}), (() => {
|
|
43
43
|
var t = V(), o = t.firstChild, i = o.firstChild, M = o.nextSibling, x = M.firstChild, j = x.nextSibling, q = j.firstChild, m = q.nextSibling;
|
|
44
|
-
u(t, "drop", n.handleDrop), u(t, "dragover", n.handleDragOver), u(t, "dragleave", n.handleDragLeave), u(t, "dragenter", n.handleDragEnter), s(t, l(
|
|
44
|
+
u(t, "drop", n.handleDrop), u(t, "dragover", n.handleDragOver), u(t, "dragleave", n.handleDragLeave), u(t, "dragenter", n.handleDragEnter), s(t, l(v, {
|
|
45
45
|
get when() {
|
|
46
46
|
return n.isDragging();
|
|
47
47
|
},
|
|
@@ -49,7 +49,7 @@ const st = (d) => {
|
|
|
49
49
|
var e = J(), g = e.firstChild;
|
|
50
50
|
return s(e, l(et, {}), g), e;
|
|
51
51
|
}
|
|
52
|
-
}), o), s(t, l(
|
|
52
|
+
}), o), s(t, l(v, {
|
|
53
53
|
get when() {
|
|
54
54
|
return n.attachments().length > 0;
|
|
55
55
|
},
|
|
@@ -65,7 +65,7 @@ const st = (d) => {
|
|
|
65
65
|
}
|
|
66
66
|
}), o), i.addEventListener("paste", L), i.$$keydown = B, i.$$input = H;
|
|
67
67
|
var $ = h;
|
|
68
|
-
return typeof $ == "function" ? z($, i) : h = i, s(x, l(
|
|
68
|
+
return typeof $ == "function" ? z($, i) : h = i, s(x, l(v, {
|
|
69
69
|
get when() {
|
|
70
70
|
return a.config().allowAttachments;
|
|
71
71
|
},
|
|
@@ -74,7 +74,7 @@ const st = (d) => {
|
|
|
74
74
|
return u(e, "click", n.openFilePicker, !0), s(e, l(Z, {})), e;
|
|
75
75
|
}
|
|
76
76
|
})), m.$$click = w, s(m, l(tt, {})), D((e) => {
|
|
77
|
-
var g = d.disabled ? !0 : void 0, A = I("chat-input-container", n.isDragging() && "chat-input-container-dragging", d.class), k = P(), C = d.disabled, S = I("chat-input-send-btn",
|
|
77
|
+
var g = d.disabled ? !0 : void 0, A = I("chat-input-container", n.isDragging() && "chat-input-container-dragging", d.class), k = P(), C = d.disabled, S = I("chat-input-send-btn", f() && "chat-input-send-btn-active"), _ = !f();
|
|
78
78
|
return g !== e.e && E(t, "aria-disabled", e.e = g), A !== e.t && F(t, e.t = A), k !== e.a && E(i, "placeholder", e.a = k), C !== e.o && (i.disabled = e.o = C), S !== e.i && F(m, e.i = S), _ !== e.n && (m.disabled = e.n = _), e;
|
|
79
79
|
}, {
|
|
80
80
|
e: void 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { spread as c, mergeProps as d, insert as n, createComponent as t, memo as l, Dynamic as u, template as g } from "solid-js/web";
|
|
2
|
-
import { splitProps as m, Show as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Loader2 as
|
|
5
|
-
var
|
|
6
|
-
const
|
|
2
|
+
import { splitProps as m, Show as h } from "solid-js";
|
|
3
|
+
import { cn as a } from "../../utils/cn.js";
|
|
4
|
+
import { Loader2 as p } from "../icons/index.js";
|
|
5
|
+
var v = /* @__PURE__ */ g("<button type=button data-floe-surface-part=action>");
|
|
6
|
+
const f = {
|
|
7
7
|
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:scale-[0.98]",
|
|
8
8
|
primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:scale-[0.98]",
|
|
9
9
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 active:scale-[0.98]",
|
|
@@ -11,7 +11,7 @@ const v = {
|
|
|
11
11
|
ghost: "hover:bg-accent hover:text-accent-foreground active:scale-[0.98]",
|
|
12
12
|
"ghost-destructive": "bg-transparent text-muted-foreground hover:bg-error hover:text-error-foreground active:scale-[0.98]",
|
|
13
13
|
destructive: "bg-error text-error-foreground shadow-sm hover:bg-error/90 active:scale-[0.98]"
|
|
14
|
-
},
|
|
14
|
+
}, b = {
|
|
15
15
|
xs: "h-6 px-2 text-[11px] rounded",
|
|
16
16
|
sm: "h-7 px-2.5 text-xs rounded",
|
|
17
17
|
md: "h-8 px-3 text-xs rounded-md",
|
|
@@ -24,18 +24,21 @@ const v = {
|
|
|
24
24
|
lg: "w-4 h-4",
|
|
25
25
|
icon: "w-4 h-4"
|
|
26
26
|
};
|
|
27
|
-
function k(
|
|
28
|
-
const [e,
|
|
27
|
+
function k(s) {
|
|
28
|
+
const [e, i] = m(s, ["variant", "size", "loading", "icon", "class", "children", "disabled"]), o = () => x[e.size ?? "md"];
|
|
29
29
|
return (() => {
|
|
30
|
-
var r =
|
|
30
|
+
var r = v();
|
|
31
31
|
return c(r, d({
|
|
32
|
+
get "data-floe-surface"() {
|
|
33
|
+
return e.variant === "ghost" || e.variant === "ghost-destructive" ? void 0 : "raised";
|
|
34
|
+
},
|
|
32
35
|
get class() {
|
|
33
|
-
return
|
|
36
|
+
return a("inline-flex items-center justify-center gap-1.5 font-medium cursor-pointer", "transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed", f[e.variant ?? "default"], b[e.size ?? "md"], e.class);
|
|
34
37
|
},
|
|
35
38
|
get disabled() {
|
|
36
39
|
return e.disabled || e.loading;
|
|
37
40
|
}
|
|
38
|
-
},
|
|
41
|
+
}, i), !1, !0), n(r, t(h, {
|
|
39
42
|
get when() {
|
|
40
43
|
return e.loading;
|
|
41
44
|
},
|
|
@@ -50,9 +53,9 @@ function k(i) {
|
|
|
50
53
|
});
|
|
51
54
|
},
|
|
52
55
|
get children() {
|
|
53
|
-
return t(
|
|
56
|
+
return t(p, {
|
|
54
57
|
get class() {
|
|
55
|
-
return
|
|
58
|
+
return a(o(), "animate-spin");
|
|
56
59
|
}
|
|
57
60
|
});
|
|
58
61
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { spread as
|
|
2
|
-
import { splitProps as h, createSignal as F, onCleanup as
|
|
3
|
-
import { cn as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
const [e,
|
|
7
|
-
let
|
|
8
|
-
const
|
|
9
|
-
if (
|
|
10
|
-
const t =
|
|
1
|
+
import { spread as m, mergeProps as b, insert as i, effect as A, setStyleProperty as z, memo as E, className as L, template as f, use as q, delegateEvents as W } from "solid-js/web";
|
|
2
|
+
import { splitProps as h, createSignal as F, onCleanup as B } from "solid-js";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
var D = /* @__PURE__ */ f('<div style="background-size:200% 200%;animation:gradient-shift 3s ease infinite">'), G = /* @__PURE__ */ f('<div class="absolute inset-[1px] rounded-[7px] bg-card">'), N = /* @__PURE__ */ f('<div class="pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100">'), Z = /* @__PURE__ */ f('<div class="absolute inset-0 -translate-x-full animate-[shimmer_2s_infinite]"style="background:linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 12%, transparent), transparent)">'), J = /* @__PURE__ */ f("<div><div>"), T = /* @__PURE__ */ f("<div>"), K = /* @__PURE__ */ f("<h3>"), O = /* @__PURE__ */ f("<p>"), Q = /* @__PURE__ */ f('<div><div class="relative z-10"style=transform:translateZ(20px)>'), U = /* @__PURE__ */ f('<div class="pointer-events-none absolute inset-0 z-20 opacity-0 transition-opacity duration-300">'), V = /* @__PURE__ */ f('<div><div class="absolute inset-0"style="background:conic-gradient(from 0deg, var(--primary), var(--accent), var(--secondary), var(--primary))"></div><div class="relative rounded-[10px] bg-card h-full">'), ee = /* @__PURE__ */ f('<div><div class="absolute inset-0 -z-10 overflow-hidden"><div class="absolute -top-1/2 -left-1/2 w-full h-full rounded-full bg-primary/20"style="animation:morph 8s ease-in-out infinite;filter:blur(40px)"></div><div class="absolute -bottom-1/2 -right-1/2 w-full h-full rounded-full bg-accent/20"style="animation:morph 8s ease-in-out infinite reverse;filter:blur(40px)"></div></div><div class="relative z-10">');
|
|
5
|
+
function oe(l) {
|
|
6
|
+
const [e, a] = h(l, ["variant", "enableTilt", "gradientColors", "glowColor", "class", "children", "style"]), r = () => e.variant ?? "default", [d, g] = F({});
|
|
7
|
+
let c, s = null, _ = 0, y = 0;
|
|
8
|
+
const u = () => {
|
|
9
|
+
if (s = null, !c || !e.enableTilt && r() !== "spotlight") return;
|
|
10
|
+
const t = c.getBoundingClientRect(), o = _ - t.left, v = y - t.top;
|
|
11
11
|
if (e.enableTilt) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
transform: `perspective(1000px) rotateX(${
|
|
12
|
+
const Y = t.width / 2, I = t.height / 2, R = (v - I) / 10, H = (Y - o) / 10;
|
|
13
|
+
g({
|
|
14
|
+
transform: `perspective(1000px) rotateX(${R}deg) rotateY(${H}deg) scale3d(1.02, 1.02, 1.02)`
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
r() === "spotlight" && X({
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
18
|
+
x: o,
|
|
19
|
+
y: v
|
|
20
20
|
});
|
|
21
21
|
}, M = (t) => {
|
|
22
|
-
if (
|
|
22
|
+
if (c && !(!e.enableTilt && r() !== "spotlight") && (_ = t.clientX, y = t.clientY, s === null)) {
|
|
23
23
|
if (typeof requestAnimationFrame > "u") {
|
|
24
|
-
|
|
24
|
+
u();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
s = requestAnimationFrame(u);
|
|
28
28
|
}
|
|
29
29
|
}, S = () => {
|
|
30
|
-
|
|
30
|
+
s !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(s), s = null), e.enableTilt && g({
|
|
31
31
|
transform: "perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"
|
|
32
32
|
});
|
|
33
33
|
}, [C, X] = F({
|
|
34
34
|
x: 0,
|
|
35
35
|
y: 0
|
|
36
36
|
});
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
B(() => {
|
|
38
|
+
s !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(s), s = null);
|
|
39
39
|
});
|
|
40
|
-
const
|
|
40
|
+
const k = "rounded-lg duration-300 ease-out", P = () => e.enableTilt || r() === "hover-lift" ? "transition-[color,background-color,border-color,box-shadow,transform]" : "transition-[color,background-color,border-color,box-shadow]", j = {
|
|
41
41
|
default: "bg-card border border-border shadow-sm hover:shadow-md",
|
|
42
42
|
"hover-lift": "bg-card border border-border shadow-sm hover:shadow-xl hover:-translate-y-1",
|
|
43
43
|
"gradient-border": "relative bg-card overflow-hidden",
|
|
@@ -45,21 +45,21 @@ function ne(l) {
|
|
|
45
45
|
spotlight: "relative bg-card border border-border overflow-hidden",
|
|
46
46
|
shimmer: "relative bg-card border border-border overflow-hidden",
|
|
47
47
|
glow: "bg-card border border-border shadow-sm"
|
|
48
|
-
},
|
|
48
|
+
}, n = () => {
|
|
49
49
|
if (r() !== "gradient-border") return null;
|
|
50
50
|
const t = e.gradientColors ?? "from-primary via-accent to-secondary";
|
|
51
51
|
return [(() => {
|
|
52
|
-
var
|
|
53
|
-
return A(() => L(
|
|
54
|
-
})(),
|
|
55
|
-
},
|
|
56
|
-
var t =
|
|
57
|
-
return A((
|
|
52
|
+
var o = D();
|
|
53
|
+
return A(() => L(o, p("absolute inset-0 bg-gradient-to-r opacity-75", t, "animate-[gradient-rotate_3s_linear_infinite]"))), o;
|
|
54
|
+
})(), G()];
|
|
55
|
+
}, x = () => r() !== "spotlight" ? null : (() => {
|
|
56
|
+
var t = N();
|
|
57
|
+
return A((o) => z(t, "background", `radial-gradient(
|
|
58
58
|
400px circle at ${C().x}px ${C().y}px,
|
|
59
59
|
color-mix(in srgb, var(--primary) 18%, transparent),
|
|
60
60
|
transparent 40%
|
|
61
61
|
)`)), t;
|
|
62
|
-
})(),
|
|
62
|
+
})(), $ = () => r() !== "shimmer" ? null : Z(), w = () => {
|
|
63
63
|
if (r() !== "glow") return {};
|
|
64
64
|
const t = e.glowColor ?? "var(--glow)";
|
|
65
65
|
return {
|
|
@@ -67,112 +67,118 @@ function ne(l) {
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
return (() => {
|
|
70
|
-
var t =
|
|
70
|
+
var t = J(), o = t.firstChild;
|
|
71
71
|
t.addEventListener("mouseleave", S), t.$$mousemove = M;
|
|
72
|
-
var
|
|
73
|
-
return typeof
|
|
72
|
+
var v = c;
|
|
73
|
+
return typeof v == "function" ? q(v, t) : c = t, m(t, b({
|
|
74
|
+
get "data-floe-card-variant"() {
|
|
75
|
+
return E(() => !!e.enableTilt)() ? "tilt" : r();
|
|
76
|
+
},
|
|
77
|
+
get "data-floe-surface"() {
|
|
78
|
+
return r() === "default" && !e.enableTilt ? "raised" : void 0;
|
|
79
|
+
},
|
|
74
80
|
get class() {
|
|
75
|
-
return
|
|
81
|
+
return p(k, P(), j[r()], r() === "spotlight" && "group", e.class);
|
|
76
82
|
},
|
|
77
83
|
get style() {
|
|
78
84
|
return {
|
|
79
85
|
...typeof e.style == "object" ? e.style : {},
|
|
80
86
|
...d(),
|
|
81
|
-
|
|
87
|
+
...w(),
|
|
82
88
|
"transform-style": "preserve-3d"
|
|
83
89
|
};
|
|
84
90
|
}
|
|
85
|
-
},
|
|
91
|
+
}, a), !1, !0), i(t, n, o), i(t, x, o), i(t, $, o), i(o, () => e.children), A(() => L(o, p("relative z-10", r() === "gradient-border" && "relative"))), t;
|
|
86
92
|
})();
|
|
87
93
|
}
|
|
88
94
|
function le(l) {
|
|
89
|
-
const [e,
|
|
95
|
+
const [e, a] = h(l, ["class", "children"]);
|
|
90
96
|
return (() => {
|
|
91
|
-
var r =
|
|
92
|
-
return
|
|
97
|
+
var r = T();
|
|
98
|
+
return m(r, b({
|
|
93
99
|
get class() {
|
|
94
|
-
return
|
|
100
|
+
return p("flex flex-col space-y-1.5 p-4", e.class);
|
|
95
101
|
}
|
|
96
|
-
},
|
|
102
|
+
}, a), !1, !0), i(r, () => e.children), r;
|
|
97
103
|
})();
|
|
98
104
|
}
|
|
99
|
-
function
|
|
100
|
-
const [e,
|
|
105
|
+
function ae(l) {
|
|
106
|
+
const [e, a] = h(l, ["class", "children"]);
|
|
101
107
|
return (() => {
|
|
102
|
-
var r =
|
|
103
|
-
return
|
|
108
|
+
var r = K();
|
|
109
|
+
return m(r, b({
|
|
104
110
|
get class() {
|
|
105
|
-
return
|
|
111
|
+
return p("text-sm font-semibold leading-none tracking-tight", e.class);
|
|
106
112
|
}
|
|
107
|
-
},
|
|
113
|
+
}, a), !1, !0), i(r, () => e.children), r;
|
|
108
114
|
})();
|
|
109
115
|
}
|
|
110
116
|
function se(l) {
|
|
111
|
-
const [e,
|
|
117
|
+
const [e, a] = h(l, ["class", "children"]);
|
|
112
118
|
return (() => {
|
|
113
|
-
var r =
|
|
114
|
-
return
|
|
119
|
+
var r = O();
|
|
120
|
+
return m(r, b({
|
|
115
121
|
get class() {
|
|
116
|
-
return
|
|
122
|
+
return p("text-xs text-muted-foreground", e.class);
|
|
117
123
|
}
|
|
118
|
-
},
|
|
124
|
+
}, a), !1, !0), i(r, () => e.children), r;
|
|
119
125
|
})();
|
|
120
126
|
}
|
|
121
|
-
function
|
|
122
|
-
const [e,
|
|
127
|
+
function ie(l) {
|
|
128
|
+
const [e, a] = h(l, ["class", "children"]);
|
|
123
129
|
return (() => {
|
|
124
|
-
var r =
|
|
125
|
-
return
|
|
130
|
+
var r = T();
|
|
131
|
+
return m(r, b({
|
|
126
132
|
get class() {
|
|
127
|
-
return
|
|
133
|
+
return p("p-4 pt-0", e.class);
|
|
128
134
|
}
|
|
129
|
-
},
|
|
135
|
+
}, a), !1, !0), i(r, () => e.children), r;
|
|
130
136
|
})();
|
|
131
137
|
}
|
|
132
|
-
function
|
|
133
|
-
const [e,
|
|
138
|
+
function de(l) {
|
|
139
|
+
const [e, a] = h(l, ["class", "children"]);
|
|
134
140
|
return (() => {
|
|
135
|
-
var r =
|
|
136
|
-
return
|
|
141
|
+
var r = T();
|
|
142
|
+
return m(r, b({
|
|
137
143
|
get class() {
|
|
138
|
-
return
|
|
144
|
+
return p("flex items-center p-4 pt-0", e.class);
|
|
139
145
|
}
|
|
140
|
-
},
|
|
146
|
+
}, a), !1, !0), i(r, () => e.children), r;
|
|
141
147
|
})();
|
|
142
148
|
}
|
|
143
|
-
function
|
|
144
|
-
const [e,
|
|
149
|
+
function ce(l) {
|
|
150
|
+
const [e, a] = h(l, ["intensity", "shine", "borderGlow", "class", "children", "style"]), [r, d] = F(""), [g, c] = F({
|
|
145
151
|
x: 50,
|
|
146
152
|
y: 50
|
|
147
|
-
}), [
|
|
148
|
-
let y,
|
|
153
|
+
}), [s, _] = F(!1);
|
|
154
|
+
let y, u = null, M = 0, S = 0;
|
|
149
155
|
const C = () => e.intensity ?? 10, X = () => {
|
|
150
|
-
if (
|
|
151
|
-
const n = y.getBoundingClientRect(), x = M - n.left, $ = S - n.top,
|
|
152
|
-
d(`perspective(1000px) rotateX(${-
|
|
156
|
+
if (u = null, !y) return;
|
|
157
|
+
const n = y.getBoundingClientRect(), x = M - n.left, $ = S - n.top, w = n.width / 2, t = n.height / 2, o = ($ - t) / t * C(), v = (w - x) / w * C();
|
|
158
|
+
d(`perspective(1000px) rotateX(${-o}deg) rotateY(${v}deg)`), e.shine && c({
|
|
153
159
|
x: x / n.width * 100,
|
|
154
160
|
y: $ / n.height * 100
|
|
155
161
|
});
|
|
156
|
-
},
|
|
157
|
-
if (y && (M = n.clientX, S = n.clientY,
|
|
162
|
+
}, k = (n) => {
|
|
163
|
+
if (y && (M = n.clientX, S = n.clientY, u === null)) {
|
|
158
164
|
if (typeof requestAnimationFrame > "u") {
|
|
159
165
|
X();
|
|
160
166
|
return;
|
|
161
167
|
}
|
|
162
|
-
|
|
168
|
+
u = requestAnimationFrame(X);
|
|
163
169
|
}
|
|
164
170
|
}, P = () => _(!0), j = () => {
|
|
165
|
-
|
|
171
|
+
u !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(u), u = null), _(!1), d("perspective(1000px) rotateX(0deg) rotateY(0deg)");
|
|
166
172
|
};
|
|
167
|
-
return
|
|
168
|
-
|
|
173
|
+
return B(() => {
|
|
174
|
+
u !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(u), u = null);
|
|
169
175
|
}), (() => {
|
|
170
|
-
var n =
|
|
171
|
-
n.addEventListener("mouseleave", j), n.addEventListener("mouseenter", P), n.$$mousemove =
|
|
176
|
+
var n = Q(), x = n.firstChild;
|
|
177
|
+
n.addEventListener("mouseleave", j), n.addEventListener("mouseenter", P), n.$$mousemove = k;
|
|
172
178
|
var $ = y;
|
|
173
|
-
return typeof $ == "function" ?
|
|
179
|
+
return typeof $ == "function" ? q($, n) : y = n, m(n, b({
|
|
174
180
|
get class() {
|
|
175
|
-
return
|
|
181
|
+
return p("relative rounded-xl bg-card border border-border overflow-hidden", "transition-all duration-200 ease-out", e.borderGlow && s() && "shadow-[0_0_18px_-6px_var(--glow)]", e.class);
|
|
176
182
|
},
|
|
177
183
|
get style() {
|
|
178
184
|
return {
|
|
@@ -181,32 +187,32 @@ function de(l) {
|
|
|
181
187
|
"transform-style": "preserve-3d"
|
|
182
188
|
};
|
|
183
189
|
}
|
|
184
|
-
},
|
|
185
|
-
var
|
|
186
|
-
return () =>
|
|
187
|
-
var
|
|
188
|
-
return A((
|
|
189
|
-
var
|
|
190
|
-
circle at ${
|
|
190
|
+
}, a), !1, !0), i(n, (() => {
|
|
191
|
+
var w = E(() => !!e.shine);
|
|
192
|
+
return () => w() && (() => {
|
|
193
|
+
var t = U();
|
|
194
|
+
return A((o) => {
|
|
195
|
+
var v = !!s(), Y = `radial-gradient(
|
|
196
|
+
circle at ${g().x}% ${g().y}%,
|
|
191
197
|
color-mix(in srgb, var(--primary) 18%, transparent) 0%,
|
|
192
198
|
transparent 50%
|
|
193
199
|
)`;
|
|
194
|
-
return
|
|
200
|
+
return v !== o.e && t.classList.toggle("opacity-100", o.e = v), Y !== o.t && z(t, "background", o.t = Y), o;
|
|
195
201
|
}, {
|
|
196
202
|
e: void 0,
|
|
197
203
|
t: void 0
|
|
198
|
-
}),
|
|
204
|
+
}), t;
|
|
199
205
|
})();
|
|
200
206
|
})(), x), i(x, () => e.children), n;
|
|
201
207
|
})();
|
|
202
208
|
}
|
|
203
|
-
function
|
|
204
|
-
const [e,
|
|
209
|
+
function ue(l) {
|
|
210
|
+
const [e, a] = h(l, ["duration", "borderWidth", "colors", "class", "children", "style"]), r = () => e.duration ?? 3, d = () => e.borderWidth ?? 2;
|
|
205
211
|
return (() => {
|
|
206
|
-
var
|
|
207
|
-
return
|
|
212
|
+
var g = V(), c = g.firstChild, s = c.nextSibling;
|
|
213
|
+
return m(g, b({
|
|
208
214
|
get class() {
|
|
209
|
-
return
|
|
215
|
+
return p("relative rounded-xl p-[2px] overflow-hidden", e.class);
|
|
210
216
|
},
|
|
211
217
|
get style() {
|
|
212
218
|
return {
|
|
@@ -214,16 +220,16 @@ function ce(l) {
|
|
|
214
220
|
padding: `${d()}px`
|
|
215
221
|
};
|
|
216
222
|
}
|
|
217
|
-
},
|
|
223
|
+
}, a), !1, !0), i(s, () => e.children), A((_) => z(c, "animation", `spin ${r()}s linear infinite`)), g;
|
|
218
224
|
})();
|
|
219
225
|
}
|
|
220
|
-
function
|
|
221
|
-
const [e,
|
|
226
|
+
function pe(l) {
|
|
227
|
+
const [e, a] = h(l, ["color", "pulse", "class", "children", "style"]), r = () => e.color ?? "var(--glow)";
|
|
222
228
|
return (() => {
|
|
223
|
-
var d =
|
|
224
|
-
return
|
|
229
|
+
var d = T();
|
|
230
|
+
return m(d, b({
|
|
225
231
|
get class() {
|
|
226
|
-
return
|
|
232
|
+
return p("relative rounded-xl bg-card border-2 transition-shadow duration-300", e.pulse && "animate-pulse", e.class);
|
|
227
233
|
},
|
|
228
234
|
get style() {
|
|
229
235
|
return {
|
|
@@ -232,35 +238,35 @@ function ue(l) {
|
|
|
232
238
|
"box-shadow": [`0 0 4px color-mix(in srgb, ${r()} 80%, transparent)`, `0 0 14px color-mix(in srgb, ${r()} 50%, transparent)`, `0 0 28px color-mix(in srgb, ${r()} 30%, transparent)`, `inset 0 0 14px color-mix(in srgb, ${r()} 10%, transparent)`].join(", ")
|
|
233
239
|
};
|
|
234
240
|
}
|
|
235
|
-
},
|
|
241
|
+
}, a), !1, !0), i(d, () => e.children), d;
|
|
236
242
|
})();
|
|
237
243
|
}
|
|
238
|
-
function
|
|
239
|
-
const [e,
|
|
244
|
+
function fe(l) {
|
|
245
|
+
const [e, a] = h(l, ["class", "children", "style"]);
|
|
240
246
|
return (() => {
|
|
241
|
-
var r =
|
|
242
|
-
|
|
243
|
-
var
|
|
244
|
-
return
|
|
247
|
+
var r = ee(), d = r.firstChild, g = d.firstChild;
|
|
248
|
+
g.nextSibling;
|
|
249
|
+
var c = d.nextSibling;
|
|
250
|
+
return m(r, b({
|
|
245
251
|
get class() {
|
|
246
|
-
return
|
|
252
|
+
return p("relative rounded-2xl bg-card/80 backdrop-blur-sm border border-border overflow-hidden", e.class);
|
|
247
253
|
},
|
|
248
254
|
get style() {
|
|
249
255
|
return e.style;
|
|
250
256
|
}
|
|
251
|
-
},
|
|
257
|
+
}, a), !1, !0), i(c, () => e.children), r;
|
|
252
258
|
})();
|
|
253
259
|
}
|
|
254
|
-
|
|
260
|
+
W(["mousemove"]);
|
|
255
261
|
export {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
ue as AnimatedBorderCard,
|
|
263
|
+
oe as Card,
|
|
264
|
+
ie as CardContent,
|
|
259
265
|
se as CardDescription,
|
|
260
|
-
|
|
266
|
+
de as CardFooter,
|
|
261
267
|
le as CardHeader,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
268
|
+
ae as CardTitle,
|
|
269
|
+
ce as Interactive3DCard,
|
|
270
|
+
fe as MorphCard,
|
|
271
|
+
pe as NeonCard
|
|
266
272
|
};
|