@floegence/floe-webapp-core 0.35.10 → 0.35.11

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.
@@ -1,204 +1,212 @@
1
- import { spread as m, mergeProps as h, insert as i, effect as A, setStyleProperty as L, className as E, memo as R, template as v, use as j, delegateEvents as H } from "solid-js/web";
1
+ import { spread as g, mergeProps as h, insert as i, effect as A, setStyleProperty as L, className as E, memo as R, template as v, use as j, delegateEvents as H } from "solid-js/web";
2
2
  import { splitProps as b, createSignal as F, onCleanup as q } from "solid-js";
3
- import { cn as p } from "../../utils/cn.js";
4
- var W = /* @__PURE__ */ v('<div style="background-size:200% 200%;animation:gradient-shift 3s ease infinite">'), D = /* @__PURE__ */ v('<div class="absolute inset-[1px] rounded-[7px] bg-card">'), G = /* @__PURE__ */ v('<div class="pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100">'), N = /* @__PURE__ */ v('<div class="absolute inset-0 -translate-x-full animate-[shimmer_2s_infinite] bg-gradient-to-r from-transparent via-white/10 to-transparent">'), Z = /* @__PURE__ */ v("<div><div>"), T = /* @__PURE__ */ v("<div>"), J = /* @__PURE__ */ v("<h3>"), K = /* @__PURE__ */ v("<p>"), O = /* @__PURE__ */ v('<div><div class="relative z-10"style=transform:translateZ(20px)>'), Q = /* @__PURE__ */ v('<div class="pointer-events-none absolute inset-0 z-20 opacity-0 transition-opacity duration-300">'), U = /* @__PURE__ */ v('<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">'), V = /* @__PURE__ */ v('<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">');
3
+ import { cn as f } from "../../utils/cn.js";
4
+ var W = /* @__PURE__ */ v('<div style="background-size:200% 200%;animation:gradient-shift 3s ease infinite">'), D = /* @__PURE__ */ v('<div class="absolute inset-[1px] rounded-[7px] bg-card">'), G = /* @__PURE__ */ v('<div class="pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100">'), N = /* @__PURE__ */ v('<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)">'), Z = /* @__PURE__ */ v("<div><div>"), k = /* @__PURE__ */ v("<div>"), J = /* @__PURE__ */ v("<h3>"), K = /* @__PURE__ */ v("<p>"), O = /* @__PURE__ */ v('<div><div class="relative z-10"style=transform:translateZ(20px)>'), Q = /* @__PURE__ */ v('<div class="pointer-events-none absolute inset-0 z-20 opacity-0 transition-opacity duration-300">'), U = /* @__PURE__ */ v('<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">'), V = /* @__PURE__ */ v('<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
5
  function ne(l) {
6
- const [e, o] = b(l, ["variant", "enableTilt", "gradientColors", "glowColor", "class", "children", "style"]), t = () => e.variant ?? "default", [d, g] = F({});
6
+ const [e, o] = b(l, ["variant", "enableTilt", "gradientColors", "glowColor", "class", "children", "style"]), r = () => e.variant ?? "default", [d, m] = F({});
7
7
  let u, s = null, _ = 0, y = 0;
8
- const f = () => {
9
- if (s = null, !u || !e.enableTilt && t() !== "spotlight") return;
10
- const r = u.getBoundingClientRect(), a = _ - r.left, c = y - r.top;
8
+ const p = () => {
9
+ if (s = null, !u || !e.enableTilt && r() !== "spotlight") return;
10
+ const t = u.getBoundingClientRect(), a = _ - t.left, c = y - t.top;
11
11
  if (e.enableTilt) {
12
- const w = r.width / 2, Y = r.height / 2, B = (c - Y) / 10, I = (w - a) / 10;
13
- g({
12
+ const C = t.width / 2, Y = t.height / 2, B = (c - Y) / 10, I = (C - a) / 10;
13
+ m({
14
14
  transform: `perspective(1000px) rotateX(${B}deg) rotateY(${I}deg) scale3d(1.02, 1.02, 1.02)`
15
15
  });
16
16
  }
17
- t() === "spotlight" && X({
17
+ r() === "spotlight" && X({
18
18
  x: a,
19
19
  y: c
20
20
  });
21
- }, M = (r) => {
22
- if (u && !(!e.enableTilt && t() !== "spotlight") && (_ = r.clientX, y = r.clientY, s === null)) {
21
+ }, M = (t) => {
22
+ if (u && !(!e.enableTilt && r() !== "spotlight") && (_ = t.clientX, y = t.clientY, s === null)) {
23
23
  if (typeof requestAnimationFrame > "u") {
24
- f();
24
+ p();
25
25
  return;
26
26
  }
27
- s = requestAnimationFrame(f);
27
+ s = requestAnimationFrame(p);
28
28
  }
29
29
  }, S = () => {
30
- s !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(s), s = null), e.enableTilt && g({
30
+ s !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(s), s = null), e.enableTilt && m({
31
31
  transform: "perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"
32
32
  });
33
- }, [C, X] = F({
33
+ }, [w, X] = F({
34
34
  x: 0,
35
35
  y: 0
36
36
  });
37
37
  q(() => {
38
38
  s !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(s), s = null);
39
39
  });
40
- const k = "rounded-lg transition-all duration-300 ease-out", P = {
40
+ const T = "rounded-lg transition-all duration-300 ease-out", P = {
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",
44
- glass: "backdrop-blur-xl bg-card/30 border border-white/10 shadow-lg",
44
+ glass: "backdrop-blur-xl bg-card/30 border border-border/50 shadow-lg",
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
  }, z = () => {
49
- if (t() !== "gradient-border") return null;
50
- const r = e.gradientColors ?? "from-primary via-accent to-secondary";
49
+ if (r() !== "gradient-border") return null;
50
+ const t = e.gradientColors ?? "from-primary via-accent to-secondary";
51
51
  return [(() => {
52
52
  var a = W();
53
- return A(() => E(a, p("absolute inset-0 bg-gradient-to-r opacity-75", r, "animate-[gradient-rotate_3s_linear_infinite]"))), a;
53
+ return A(() => E(a, f("absolute inset-0 bg-gradient-to-r opacity-75", t, "animate-[gradient-rotate_3s_linear_infinite]"))), a;
54
54
  })(), D()];
55
- }, n = () => t() !== "spotlight" ? null : (() => {
56
- var r = G();
57
- return A((a) => L(r, "background", `radial-gradient(400px circle at ${C().x}px ${C().y}px, rgba(var(--primary-rgb, 99, 102, 241), 0.15), transparent 40%)`)), r;
58
- })(), $ = () => t() !== "shimmer" ? null : N(), x = () => {
59
- if (t() !== "glow") return {};
60
- const r = e.glowColor ?? "var(--primary)";
55
+ }, n = () => r() !== "spotlight" ? null : (() => {
56
+ var t = G();
57
+ return A((a) => L(t, "background", `radial-gradient(
58
+ 400px circle at ${w().x}px ${w().y}px,
59
+ color-mix(in srgb, var(--primary) 18%, transparent),
60
+ transparent 40%
61
+ )`)), t;
62
+ })(), x = () => r() !== "shimmer" ? null : N(), $ = () => {
63
+ if (r() !== "glow") return {};
64
+ const t = e.glowColor ?? "var(--primary)";
61
65
  return {
62
- "box-shadow": `0 0 0 1px ${r}, 0 0 20px -5px ${r}, 0 0 40px -10px ${r}`
66
+ "box-shadow": `0 0 0 1px ${t}, 0 0 20px -5px ${t}, 0 0 40px -10px ${t}`
63
67
  };
64
68
  };
65
69
  return (() => {
66
- var r = Z(), a = r.firstChild;
67
- r.addEventListener("mouseleave", S), r.$$mousemove = M;
70
+ var t = Z(), a = t.firstChild;
71
+ t.addEventListener("mouseleave", S), t.$$mousemove = M;
68
72
  var c = u;
69
- return typeof c == "function" ? j(c, r) : u = r, m(r, h({
73
+ return typeof c == "function" ? j(c, t) : u = t, g(t, h({
70
74
  get class() {
71
- return p(k, P[t()], t() === "spotlight" && "group", e.class);
75
+ return f(T, P[r()], r() === "spotlight" && "group", e.class);
72
76
  },
73
77
  get style() {
74
78
  return {
75
79
  ...typeof e.style == "object" ? e.style : {},
76
80
  ...d(),
77
- ...x(),
81
+ ...$(),
78
82
  "transform-style": "preserve-3d"
79
83
  };
80
84
  }
81
- }, o), !1, !0), i(r, z, a), i(r, n, a), i(r, $, a), i(a, () => e.children), A(() => E(a, p("relative z-10", t() === "gradient-border" && "relative"))), r;
85
+ }, o), !1, !0), i(t, z, a), i(t, n, a), i(t, x, a), i(a, () => e.children), A(() => E(a, f("relative z-10", r() === "gradient-border" && "relative"))), t;
82
86
  })();
83
87
  }
84
88
  function le(l) {
85
89
  const [e, o] = b(l, ["class", "children"]);
86
90
  return (() => {
87
- var t = T();
88
- return m(t, h({
91
+ var r = k();
92
+ return g(r, h({
89
93
  get class() {
90
- return p("flex flex-col space-y-1.5 p-4", e.class);
94
+ return f("flex flex-col space-y-1.5 p-4", e.class);
91
95
  }
92
- }, o), !1, !0), i(t, () => e.children), t;
96
+ }, o), !1, !0), i(r, () => e.children), r;
93
97
  })();
94
98
  }
95
99
  function oe(l) {
96
100
  const [e, o] = b(l, ["class", "children"]);
97
101
  return (() => {
98
- var t = J();
99
- return m(t, h({
102
+ var r = J();
103
+ return g(r, h({
100
104
  get class() {
101
- return p("text-sm font-semibold leading-none tracking-tight", e.class);
105
+ return f("text-sm font-semibold leading-none tracking-tight", e.class);
102
106
  }
103
- }, o), !1, !0), i(t, () => e.children), t;
107
+ }, o), !1, !0), i(r, () => e.children), r;
104
108
  })();
105
109
  }
106
110
  function ae(l) {
107
111
  const [e, o] = b(l, ["class", "children"]);
108
112
  return (() => {
109
- var t = K();
110
- return m(t, h({
113
+ var r = K();
114
+ return g(r, h({
111
115
  get class() {
112
- return p("text-xs text-muted-foreground", e.class);
116
+ return f("text-xs text-muted-foreground", e.class);
113
117
  }
114
- }, o), !1, !0), i(t, () => e.children), t;
118
+ }, o), !1, !0), i(r, () => e.children), r;
115
119
  })();
116
120
  }
117
121
  function se(l) {
118
122
  const [e, o] = b(l, ["class", "children"]);
119
123
  return (() => {
120
- var t = T();
121
- return m(t, h({
124
+ var r = k();
125
+ return g(r, h({
122
126
  get class() {
123
- return p("p-4 pt-0", e.class);
127
+ return f("p-4 pt-0", e.class);
124
128
  }
125
- }, o), !1, !0), i(t, () => e.children), t;
129
+ }, o), !1, !0), i(r, () => e.children), r;
126
130
  })();
127
131
  }
128
132
  function ie(l) {
129
133
  const [e, o] = b(l, ["class", "children"]);
130
134
  return (() => {
131
- var t = T();
132
- return m(t, h({
135
+ var r = k();
136
+ return g(r, h({
133
137
  get class() {
134
- return p("flex items-center p-4 pt-0", e.class);
138
+ return f("flex items-center p-4 pt-0", e.class);
135
139
  }
136
- }, o), !1, !0), i(t, () => e.children), t;
140
+ }, o), !1, !0), i(r, () => e.children), r;
137
141
  })();
138
142
  }
139
143
  function de(l) {
140
- const [e, o] = b(l, ["intensity", "shine", "borderGlow", "class", "children", "style"]), [t, d] = F(""), [g, u] = F({
144
+ const [e, o] = b(l, ["intensity", "shine", "borderGlow", "class", "children", "style"]), [r, d] = F(""), [m, u] = F({
141
145
  x: 50,
142
146
  y: 50
143
147
  }), [s, _] = F(!1);
144
- let y, f = null, M = 0, S = 0;
145
- const C = () => e.intensity ?? 10, X = () => {
146
- if (f = null, !y) return;
147
- const n = y.getBoundingClientRect(), $ = M - n.left, x = S - n.top, r = n.width / 2, a = n.height / 2, c = (x - a) / a * C(), w = (r - $) / r * C();
148
- d(`perspective(1000px) rotateX(${-c}deg) rotateY(${w}deg)`), e.shine && u({
149
- x: $ / n.width * 100,
150
- y: x / n.height * 100
148
+ let y, p = null, M = 0, S = 0;
149
+ const w = () => e.intensity ?? 10, X = () => {
150
+ if (p = null, !y) return;
151
+ const n = y.getBoundingClientRect(), x = M - n.left, $ = S - n.top, t = n.width / 2, a = n.height / 2, c = ($ - a) / a * w(), C = (t - x) / t * w();
152
+ d(`perspective(1000px) rotateX(${-c}deg) rotateY(${C}deg)`), e.shine && u({
153
+ x: x / n.width * 100,
154
+ y: $ / n.height * 100
151
155
  });
152
- }, k = (n) => {
153
- if (y && (M = n.clientX, S = n.clientY, f === null)) {
156
+ }, T = (n) => {
157
+ if (y && (M = n.clientX, S = n.clientY, p === null)) {
154
158
  if (typeof requestAnimationFrame > "u") {
155
159
  X();
156
160
  return;
157
161
  }
158
- f = requestAnimationFrame(X);
162
+ p = requestAnimationFrame(X);
159
163
  }
160
164
  }, P = () => _(!0), z = () => {
161
- f !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(f), f = null), _(!1), d("perspective(1000px) rotateX(0deg) rotateY(0deg)");
165
+ p !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(p), p = null), _(!1), d("perspective(1000px) rotateX(0deg) rotateY(0deg)");
162
166
  };
163
167
  return q(() => {
164
- f !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(f), f = null);
168
+ p !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(p), p = null);
165
169
  }), (() => {
166
- var n = O(), $ = n.firstChild;
167
- n.addEventListener("mouseleave", z), n.addEventListener("mouseenter", P), n.$$mousemove = k;
168
- var x = y;
169
- return typeof x == "function" ? j(x, n) : y = n, m(n, h({
170
+ var n = O(), x = n.firstChild;
171
+ n.addEventListener("mouseleave", z), n.addEventListener("mouseenter", P), n.$$mousemove = T;
172
+ var $ = y;
173
+ return typeof $ == "function" ? j($, n) : y = n, g(n, h({
170
174
  get class() {
171
- return p("relative rounded-xl bg-card border border-border overflow-hidden", "transition-all duration-200 ease-out", e.borderGlow && s() && "shadow-[0_0_30px_-5px_var(--primary)]", e.class);
175
+ return f("relative rounded-xl bg-card border border-border overflow-hidden", "transition-all duration-200 ease-out", e.borderGlow && s() && "shadow-[0_0_30px_-5px_var(--primary)]", e.class);
172
176
  },
173
177
  get style() {
174
178
  return {
175
179
  ...typeof e.style == "object" ? e.style : {},
176
- transform: t(),
180
+ transform: r(),
177
181
  "transform-style": "preserve-3d"
178
182
  };
179
183
  }
180
184
  }, o), !1, !0), i(n, (() => {
181
- var r = R(() => !!e.shine);
182
- return () => r() && (() => {
185
+ var t = R(() => !!e.shine);
186
+ return () => t() && (() => {
183
187
  var a = Q();
184
188
  return A((c) => {
185
- var w = !!s(), Y = `radial-gradient(circle at ${g().x}% ${g().y}%, rgba(255,255,255,0.2) 0%, transparent 50%)`;
186
- return w !== c.e && a.classList.toggle("opacity-100", c.e = w), Y !== c.t && L(a, "background", c.t = Y), c;
189
+ var C = !!s(), Y = `radial-gradient(
190
+ circle at ${m().x}% ${m().y}%,
191
+ color-mix(in srgb, var(--primary) 18%, transparent) 0%,
192
+ transparent 50%
193
+ )`;
194
+ return C !== c.e && a.classList.toggle("opacity-100", c.e = C), Y !== c.t && L(a, "background", c.t = Y), c;
187
195
  }, {
188
196
  e: void 0,
189
197
  t: void 0
190
198
  }), a;
191
199
  })();
192
- })(), $), i($, () => e.children), n;
200
+ })(), x), i(x, () => e.children), n;
193
201
  })();
194
202
  }
195
203
  function ce(l) {
196
- const [e, o] = b(l, ["duration", "borderWidth", "colors", "class", "children", "style"]), t = () => e.duration ?? 3, d = () => e.borderWidth ?? 2;
204
+ const [e, o] = b(l, ["duration", "borderWidth", "colors", "class", "children", "style"]), r = () => e.duration ?? 3, d = () => e.borderWidth ?? 2;
197
205
  return (() => {
198
- var g = U(), u = g.firstChild, s = u.nextSibling;
199
- return m(g, h({
206
+ var m = U(), u = m.firstChild, s = u.nextSibling;
207
+ return g(m, h({
200
208
  get class() {
201
- return p("relative rounded-xl p-[2px] overflow-hidden", e.class);
209
+ return f("relative rounded-xl p-[2px] overflow-hidden", e.class);
202
210
  },
203
211
  get style() {
204
212
  return {
@@ -206,41 +214,41 @@ function ce(l) {
206
214
  padding: `${d()}px`
207
215
  };
208
216
  }
209
- }, o), !1, !0), i(s, () => e.children), A((_) => L(u, "animation", `spin ${t()}s linear infinite`)), g;
217
+ }, o), !1, !0), i(s, () => e.children), A((_) => L(u, "animation", `spin ${r()}s linear infinite`)), m;
210
218
  })();
211
219
  }
212
220
  function ue(l) {
213
- const [e, o] = b(l, ["color", "pulse", "class", "children", "style"]), t = () => e.color ?? "var(--primary)";
221
+ const [e, o] = b(l, ["color", "pulse", "class", "children", "style"]), r = () => e.color ?? "var(--primary)";
214
222
  return (() => {
215
- var d = T();
216
- return m(d, h({
223
+ var d = k();
224
+ return g(d, h({
217
225
  get class() {
218
- return p("relative rounded-xl bg-card border-2 transition-shadow duration-300", e.pulse && "animate-pulse", e.class);
226
+ return f("relative rounded-xl bg-card border-2 transition-shadow duration-300", e.pulse && "animate-pulse", e.class);
219
227
  },
220
228
  get style() {
221
229
  return {
222
230
  ...typeof e.style == "object" ? e.style : {},
223
- "border-color": t(),
224
- "box-shadow": `0 0 5px ${t()}, 0 0 20px ${t()}, 0 0 40px ${t()}, inset 0 0 20px ${t()}20`
231
+ "border-color": r(),
232
+ "box-shadow": `0 0 5px ${r()}, 0 0 20px color-mix(in srgb, ${r()} 72%, transparent), 0 0 40px color-mix(in srgb, ${r()} 45%, transparent), inset 0 0 20px color-mix(in srgb, ${r()} 15%, transparent)`
225
233
  };
226
234
  }
227
235
  }, o), !1, !0), i(d, () => e.children), d;
228
236
  })();
229
237
  }
230
- function fe(l) {
238
+ function pe(l) {
231
239
  const [e, o] = b(l, ["class", "children", "style"]);
232
240
  return (() => {
233
- var t = V(), d = t.firstChild, g = d.firstChild;
234
- g.nextSibling;
241
+ var r = V(), d = r.firstChild, m = d.firstChild;
242
+ m.nextSibling;
235
243
  var u = d.nextSibling;
236
- return m(t, h({
244
+ return g(r, h({
237
245
  get class() {
238
- return p("relative rounded-2xl bg-card/80 backdrop-blur-sm border border-border overflow-hidden", e.class);
246
+ return f("relative rounded-2xl bg-card/80 backdrop-blur-sm border border-border overflow-hidden", e.class);
239
247
  },
240
248
  get style() {
241
249
  return e.style;
242
250
  }
243
- }, o), !1, !0), i(u, () => e.children), t;
251
+ }, o), !1, !0), i(u, () => e.children), r;
244
252
  })();
245
253
  }
246
254
  H(["mousemove"]);
@@ -253,6 +261,6 @@ export {
253
261
  le as CardHeader,
254
262
  oe as CardTitle,
255
263
  de as Interactive3DCard,
256
- fe as MorphCard,
264
+ pe as MorphCard,
257
265
  ue as NeonCard
258
266
  };