fiboui 2.2.4 → 2.3.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.
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  var gt = Object.defineProperty;
3
- var bt = (r, t, e) => t in r ? gt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
4
- var c = (r, t, e) => bt(r, typeof t != "symbol" ? t + "" : t, e);
5
- import g, { useRef as w, createContext as j, useContext as B, useCallback as E, useSyncExternalStore as O, useEffect as A, useState as Z, cloneElement as yt } from "react";
3
+ var bt = (s, t, e) => t in s ? gt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
4
+ var l = (s, t, e) => bt(s, typeof t != "symbol" ? t + "" : t, e);
5
+ import g, { useRef as w, createContext as j, useContext as O, useCallback as E, useSyncExternalStore as B, useEffect as A, useState as Z, cloneElement as yt } from "react";
6
6
  import { jsx as C, Fragment as W } from "react/jsx-runtime";
7
+ import { r as kt, f as _t, b as xt } from "./themeData-CmTJt3dU.js";
7
8
  class J {
8
9
  constructor() {
9
- c(this, "activeEffect", null);
10
+ l(this, "activeEffect", null);
10
11
  }
11
12
  }
12
13
  const Q = new J(), z = [Q];
@@ -19,22 +20,22 @@ function et() {
19
20
  function D() {
20
21
  return et().activeEffect;
21
22
  }
22
- function kt(r, t) {
23
- z.push(r);
23
+ function $t(s, t) {
24
+ z.push(s);
24
25
  try {
25
26
  return t();
26
27
  } finally {
27
28
  z.pop();
28
29
  }
29
30
  }
30
- function M(r) {
31
+ function M(s) {
31
32
  const t = et(), e = t.activeEffect;
32
- return t.activeEffect = r, e;
33
+ return t.activeEffect = s, e;
33
34
  }
34
- class _t {
35
+ class wt {
35
36
  constructor(t) {
36
- c(this, "dependencies", /* @__PURE__ */ new Set());
37
- c(this, "_onDispose");
37
+ l(this, "dependencies", /* @__PURE__ */ new Set());
38
+ l(this, "_onDispose");
38
39
  this.fn = t, this.run();
39
40
  }
40
41
  run() {
@@ -59,9 +60,9 @@ class _t {
59
60
  this.cleanup(), (t = this._onDispose) == null || t.call(this);
60
61
  }
61
62
  }
62
- class xt {
63
+ class St {
63
64
  constructor(t) {
64
- c(this, "dependencies", /* @__PURE__ */ new Set());
65
+ l(this, "dependencies", /* @__PURE__ */ new Set());
65
66
  this._onInvalidate = t;
66
67
  }
67
68
  execute(t) {
@@ -87,8 +88,8 @@ class xt {
87
88
  }
88
89
  class R {
89
90
  constructor(t) {
90
- c(this, "listeners", /* @__PURE__ */ new Set());
91
- c(this, "effects", /* @__PURE__ */ new Set());
91
+ l(this, "listeners", /* @__PURE__ */ new Set());
92
+ l(this, "effects", /* @__PURE__ */ new Set());
92
93
  this._value = t;
93
94
  }
94
95
  get value() {
@@ -109,20 +110,20 @@ class R {
109
110
  }
110
111
  notify() {
111
112
  const t = Array.from(this.effects), e = Array.from(this.listeners);
112
- t.forEach((s) => s.trigger()), e.forEach((s) => s(this._value));
113
+ t.forEach((r) => r.trigger()), e.forEach((r) => r(this._value));
113
114
  }
114
115
  }
115
- function ge(r) {
116
- return new R(r);
116
+ function _e(s) {
117
+ return new R(s);
117
118
  }
118
- class $t {
119
+ class vt {
119
120
  constructor(t) {
120
- c(this, "listeners", /* @__PURE__ */ new Set());
121
- c(this, "effects", /* @__PURE__ */ new Set());
122
- c(this, "_value");
123
- c(this, "_dirty", !0);
124
- c(this, "internalEffect");
125
- this.fn = t, this.internalEffect = new _t(() => {
121
+ l(this, "listeners", /* @__PURE__ */ new Set());
122
+ l(this, "effects", /* @__PURE__ */ new Set());
123
+ l(this, "_value");
124
+ l(this, "_dirty", !0);
125
+ l(this, "internalEffect");
126
+ this.fn = t, this.internalEffect = new wt(() => {
126
127
  this._dirty || (this._dirty = !0, this.notify());
127
128
  });
128
129
  }
@@ -149,16 +150,16 @@ class $t {
149
150
  }
150
151
  notify() {
151
152
  const t = Array.from(this.effects), e = Array.from(this.listeners);
152
- t.forEach((s) => s.trigger()), e.forEach((s) => s(this._value));
153
+ t.forEach((r) => r.trigger()), e.forEach((r) => r(this._value));
153
154
  }
154
155
  }
155
- function be(r) {
156
- return new $t(r);
156
+ function xe(s) {
157
+ return new vt(s);
157
158
  }
158
- class wt {
159
+ class Ct {
159
160
  constructor(t) {
160
- c(this, "listeners", /* @__PURE__ */ new Set());
161
- c(this, "effects", /* @__PURE__ */ new Set());
161
+ l(this, "listeners", /* @__PURE__ */ new Set());
162
+ l(this, "effects", /* @__PURE__ */ new Set());
162
163
  this._value = t;
163
164
  }
164
165
  get() {
@@ -181,13 +182,13 @@ class wt {
181
182
  Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this._value));
182
183
  }
183
184
  }
184
- function ye(r) {
185
- return new wt(r);
185
+ function $e(s) {
186
+ return new Ct(s);
186
187
  }
187
- class St {
188
+ class Nt {
188
189
  constructor(t) {
189
- c(this, "listeners", /* @__PURE__ */ new Set());
190
- c(this, "effects", /* @__PURE__ */ new Set());
190
+ l(this, "listeners", /* @__PURE__ */ new Set());
191
+ l(this, "effects", /* @__PURE__ */ new Set());
191
192
  this.state = t;
192
193
  }
193
194
  getState() {
@@ -195,8 +196,8 @@ class St {
195
196
  return t && t.track(this), this.state;
196
197
  }
197
198
  setState(t) {
198
- const e = typeof t == "function" ? t(this.state) : t, s = { ...this.state, ...e }, o = Object.keys(this.state), i = Object.keys(s);
199
- o.length === i.length && i.every((a) => Object.is(s[a], this.state[a])) || (this.state = s, this.notify());
199
+ const e = typeof t == "function" ? t(this.state) : t, r = { ...this.state, ...e }, o = Object.keys(this.state), i = Object.keys(r);
200
+ o.length === i.length && i.every((a) => Object.is(r[a], this.state[a])) || (this.state = r, this.notify());
200
201
  }
201
202
  subscribe(t) {
202
203
  return this.listeners.add(t), () => this.listeners.delete(t);
@@ -211,127 +212,127 @@ class St {
211
212
  Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this.state));
212
213
  }
213
214
  }
214
- function ke(r) {
215
- return new St(r);
215
+ function we(s) {
216
+ return new Nt(s);
216
217
  }
217
- const vt = tt(), st = j(vt);
218
- function Ct() {
219
- return B(st);
218
+ const Et = tt(), st = j(Et);
219
+ function Mt() {
220
+ return O(st);
220
221
  }
221
- function _e({ children: r, scope: t }) {
222
+ function Se({ children: s, scope: t }) {
222
223
  const e = w(t ?? tt()).current;
223
- return /* @__PURE__ */ C(st.Provider, { value: e, children: r });
224
+ return /* @__PURE__ */ C(st.Provider, { value: e, children: s });
224
225
  }
225
- function Nt({ children: r }) {
226
- const t = w(0), e = w(/* @__PURE__ */ new Set()), s = w(null);
227
- s.current || (s.current = new xt(() => {
228
- t.current += 1, e.current.forEach((l) => l());
226
+ function Tt({ children: s }) {
227
+ const t = w(0), e = w(/* @__PURE__ */ new Set()), r = w(null);
228
+ r.current || (r.current = new St(() => {
229
+ t.current += 1, e.current.forEach((c) => c());
229
230
  }));
230
- const o = E((l) => (e.current.add(l), () => {
231
- e.current.delete(l);
231
+ const o = E((c) => (e.current.add(c), () => {
232
+ e.current.delete(c);
232
233
  }), []), i = E(() => t.current, []);
233
- O(o, i, i), A(() => () => {
234
- var l;
235
- (l = s.current) == null || l.dispose();
234
+ B(o, i, i), A(() => () => {
235
+ var c;
236
+ (c = r.current) == null || c.dispose();
236
237
  }, []);
237
- const n = Ct();
238
+ const n = Mt();
238
239
  let a = null;
239
240
  try {
240
- a = kt(n, () => s.current.execute(r));
241
+ a = $t(n, () => r.current.execute(s));
241
242
  } catch {
242
243
  a = null;
243
244
  }
244
245
  return /* @__PURE__ */ C(W, { children: a });
245
246
  }
246
- const Et = j(/* @__PURE__ */ new Map()), rt = j(null);
247
- function xe(r) {
248
- const t = B(rt);
247
+ const It = j(/* @__PURE__ */ new Map()), rt = j(null);
248
+ function ve(s) {
249
+ const t = O(rt);
249
250
  if (!t)
250
251
  throw new Error("useBuilderState must be used under a builder that called .state()");
251
- return [t.get(r), (e) => t.set(r, e)];
252
+ return [t.get(s), (e) => t.set(s, e)];
252
253
  }
253
- function Mt({ stateMap: r = /* @__PURE__ */ new Map(), children: t }) {
254
- const [e, s] = Z(() => new Map(r)), o = {
254
+ function Rt({ stateMap: s = /* @__PURE__ */ new Map(), children: t }) {
255
+ const [e, r] = Z(() => new Map(s)), o = {
255
256
  map: e,
256
257
  get: (i) => e.get(i),
257
258
  set: (i, n) => {
258
- s((a) => {
259
+ r((a) => {
259
260
  if (Object.is(a.get(i), n))
260
261
  return a;
261
- const l = new Map(a);
262
- return l.set(i, n), l;
262
+ const c = new Map(a);
263
+ return c.set(i, n), c;
263
264
  });
264
265
  }
265
266
  };
266
- return /* @__PURE__ */ C(rt.Provider, { value: o, children: /* @__PURE__ */ C(Et.Provider, { value: e, children: t }) });
267
+ return /* @__PURE__ */ C(rt.Provider, { value: o, children: /* @__PURE__ */ C(It.Provider, { value: e, children: t }) });
267
268
  }
268
- function Tt({ observables: r, children: t }) {
269
- const e = w(0), s = E((i) => {
270
- const n = Array.from(r).map(
269
+ function zt({ observables: s, children: t }) {
270
+ const e = w(0), r = E((i) => {
271
+ const n = Array.from(s).map(
271
272
  (a) => a.subscribe(() => {
272
273
  e.current += 1, i();
273
274
  })
274
275
  );
275
276
  return () => n.forEach((a) => a());
276
- }, [r]), o = E(() => e.current, []);
277
- return O(s, o, o), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
277
+ }, [s]), o = E(() => e.current, []);
278
+ return B(r, o, o), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
278
279
  }
279
- function It({ signals: r, children: t }) {
280
- const e = w(0), s = E((i) => {
281
- const n = Array.from(r).map(
280
+ function jt({ signals: s, children: t }) {
281
+ const e = w(0), r = E((i) => {
282
+ const n = Array.from(s).map(
282
283
  (a) => a.subscribe(() => {
283
284
  e.current += 1, i();
284
285
  })
285
286
  );
286
287
  return () => n.forEach((a) => a());
287
- }, [r]), o = E(() => e.current, []);
288
- return O(s, o, o), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
288
+ }, [s]), o = E(() => e.current, []);
289
+ return B(r, o, o), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
289
290
  }
290
291
  const ot = j(/* @__PURE__ */ new Map());
291
- function $e(r) {
292
- const t = B(ot);
293
- return t == null ? void 0 : t.get(r);
292
+ function Ce(s) {
293
+ const t = O(ot);
294
+ return t == null ? void 0 : t.get(s);
294
295
  }
295
- function Rt({ providers: r = /* @__PURE__ */ new Map(), children: t }) {
296
- return /* @__PURE__ */ C(ot.Provider, { value: r, children: t });
296
+ function At({ providers: s = /* @__PURE__ */ new Map(), children: t }) {
297
+ return /* @__PURE__ */ C(ot.Provider, { value: s, children: t });
297
298
  }
298
- function zt(r) {
299
- return !!r && typeof r == "object" && "build" in r && typeof r.build == "function";
299
+ function Dt(s) {
300
+ return !!s && typeof s == "object" && "build" in s && typeof s.build == "function";
300
301
  }
301
- function jt(r) {
302
- return g.isValidElement(r) ? r : zt(r) ? r.build() : r;
302
+ function Ft(s) {
303
+ return g.isValidElement(s) ? s : Dt(s) ? s.build() : s;
303
304
  }
304
- function H(r) {
305
- return typeof r == "string" || typeof r == "number";
305
+ function H(s) {
306
+ return typeof s == "string" || typeof s == "number";
306
307
  }
307
- function At(r, t) {
308
- return g.isValidElement(r) && H(r.key) && r.key !== "" ? r.key : `.$fibo-${t}`;
308
+ function Lt(s, t) {
309
+ return g.isValidElement(s) && H(s.key) && s.key !== "" ? s.key : `.$fibo-${t}`;
309
310
  }
310
- function Dt(r, t) {
311
- return !g.isValidElement(r) || H(r.key) && r.key !== "" ? r : g.cloneElement(r, { key: At(r, t) });
311
+ function Vt(s, t) {
312
+ return !g.isValidElement(s) || H(s.key) && s.key !== "" ? s : g.cloneElement(s, { key: Lt(s, t) });
312
313
  }
313
- function K(r) {
314
- if (r == null)
314
+ function K(s) {
315
+ if (s == null)
315
316
  return [];
316
- const t = typeof r == "function" ? r() : r;
317
- return (Array.isArray(t) ? t : [t]).map((s, o) => Dt(jt(s), o));
317
+ const t = typeof s == "function" ? s() : s;
318
+ return (Array.isArray(t) ? t : [t]).map((r, o) => Vt(Ft(r), o));
318
319
  }
319
- const Y = /* @__PURE__ */ new Map(), Lt = {
320
+ const Y = /* @__PURE__ */ new Map(), Pt = {
320
321
  easeIn: "ease-in",
321
322
  easeOut: "ease-out",
322
323
  easeInOut: "ease-in-out",
323
324
  linear: "linear",
324
325
  ease: "ease"
325
326
  };
326
- function it(r = {}) {
327
- const t = r.stiffness ?? 170, e = r.damping ?? 26, s = r.mass ?? 1, o = `${t}:${e}:${s}`, i = Y.get(o);
327
+ function it(s = {}) {
328
+ const t = s.stiffness ?? 170, e = s.damping ?? 26, r = s.mass ?? 1, o = `${t}:${e}:${r}`, i = Y.get(o);
328
329
  if (i) return i;
329
330
  const n = 1 / 60, a = 1;
330
- let l = 0, d = 0;
331
+ let c = 0, d = 0;
331
332
  const h = [0];
332
333
  for (let b = 0; b < 180; b += 1) {
333
- const x = -t * (l - a) - e * d;
334
- if (d += x / s * n, l += d * n, h.push(l), b > 8 && Math.abs(l - a) < 2e-3 && Math.abs(d) < 2e-3) break;
334
+ const x = -t * (c - a) - e * d;
335
+ if (d += x / r * n, c += d * n, h.push(c), b > 8 && Math.abs(c - a) < 2e-3 && Math.abs(d) < 2e-3) break;
335
336
  }
336
337
  h[h.length - 1] !== 1 && h.push(1);
337
338
  const m = Math.max(1, Math.floor((h.length - 1) / 24)), p = [];
@@ -342,8 +343,8 @@ function it(r = {}) {
342
343
  const y = `linear(${p.join(", ")})`;
343
344
  return Y.set(o, y), y;
344
345
  }
345
- function v(r, t) {
346
- return r === "spring" ? it(t) : Lt[r] ?? r;
346
+ function v(s, t) {
347
+ return s === "spring" ? it(t) : Pt[s] ?? s;
347
348
  }
348
349
  const U = [
349
350
  "fadeIn",
@@ -361,35 +362,35 @@ const U = [
361
362
  "blur",
362
363
  "pop",
363
364
  "bounce"
364
- ], Vt = {
365
+ ], Ot = {
365
366
  fade: "fadeIn",
366
367
  scale: "scaleIn",
367
368
  blur: "blurIn"
368
369
  };
369
- function Pt(r) {
370
- if (!r || typeof r != "object") return !1;
371
- const t = r;
370
+ function Bt(s) {
371
+ if (!s || typeof s != "object") return !1;
372
+ const t = s;
372
373
  return typeof t.from == "object" && t.from !== null && typeof t.to == "object" && t.to !== null;
373
374
  }
374
- function G(r) {
375
+ function G(s) {
375
376
  const t = /* @__PURE__ */ new Set(["opacity", "zIndex", "z-index", "flex", "fontWeight", "lineHeight"]);
376
- return Object.entries(r).map(([e, s]) => {
377
- const o = e.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), i = typeof s == "number" && !t.has(e) ? `${s}px` : String(s);
377
+ return Object.entries(s).map(([e, r]) => {
378
+ const o = e.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), i = typeof r == "number" && !t.has(e) ? `${r}px` : String(r);
378
379
  return `${o}: ${i}`;
379
380
  }).join("; ");
380
381
  }
381
- function Ft(r) {
382
+ function Wt(s) {
382
383
  let t = 5381;
383
- for (let e = 0; e < r.length; e += 1) t = (t << 5) + t ^ r.charCodeAt(e);
384
+ for (let e = 0; e < s.length; e += 1) t = (t << 5) + t ^ s.charCodeAt(e);
384
385
  return (t >>> 0).toString(36);
385
386
  }
386
- function Bt(r) {
387
- const t = Vt[r] ?? r;
387
+ function Ht(s) {
388
+ const t = Ot[s] ?? s;
388
389
  if (!U.includes(t))
389
- throw new Error(`Unknown motion preset "${r}". Use: ${U.join(", ")}`);
390
+ throw new Error(`Unknown motion preset "${s}". Use: ${U.join(", ")}`);
390
391
  return t;
391
392
  }
392
- const F = `
393
+ const P = `
393
394
  .fibo-anim {
394
395
  animation-duration: var(--fibo-dur, 300ms);
395
396
  animation-timing-function: var(--fibo-ease, ease);
@@ -531,18 +532,18 @@ const F = `
531
532
  }
532
533
  }
533
534
  `.trim();
534
- function q(r) {
535
+ function q(s) {
535
536
  let t = 5381;
536
- for (let e = 0; e < r.length; e += 1)
537
- t = (t << 5) + t ^ r.charCodeAt(e);
537
+ for (let e = 0; e < s.length; e += 1)
538
+ t = (t << 5) + t ^ s.charCodeAt(e);
538
539
  return (t >>> 0).toString(36);
539
540
  }
540
541
  const $ = class $ {
541
542
  constructor() {
542
- c(this, "sheet", null);
543
- c(this, "cache", /* @__PURE__ */ new Map());
544
- c(this, "extras", []);
545
- c(this, "defaultsReady", !1);
543
+ l(this, "sheet", null);
544
+ l(this, "cache", /* @__PURE__ */ new Map());
545
+ l(this, "extras", []);
546
+ l(this, "defaultsReady", !1);
546
547
  this.attachSheet(), this.ensureDefaults();
547
548
  }
548
549
  static getInstance() {
@@ -567,32 +568,32 @@ const $ = class $ {
567
568
  /**
568
569
  * CSS `@media` rule, deduped. Used by `.media()` / `.md()` / `.responsive()` — not JS resize.
569
570
  */
570
- registerMedia(t, e, s) {
571
- const o = `@media ${t}|${e}:${s}`;
571
+ registerMedia(t, e, r) {
572
+ const o = `@media ${t}|${e}:${r}`;
572
573
  if (this.cache.has(o))
573
574
  return this.cache.get(o);
574
- const i = `fibo-mq-${q(o)}`, n = `@media ${t} { .${i} { ${e}: ${s} !important; } }`;
575
+ const i = `fibo-mq-${q(o)}`, n = `@media ${t} { .${i} { ${e}: ${r} !important; } }`;
575
576
  return this.insert(n), this.cache.set(o, i), i;
576
577
  }
577
578
  ensureDefaults() {
578
579
  var t;
579
- this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((t = this.sheet.textContent) != null && t.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(F)));
580
+ this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((t = this.sheet.textContent) != null && t.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(P)));
580
581
  }
581
582
  getCss() {
582
583
  this.ensureDefaults();
583
584
  const t = [...this.extras].sort();
584
- return [F, ...t].filter(Boolean).join(`
585
+ return [P, ...t].filter(Boolean).join(`
585
586
  `);
586
587
  }
587
- registerKeyframes(t, e, s) {
588
- const o = `kf:${e}=>${s}`;
588
+ registerKeyframes(t, e, r) {
589
+ const o = `kf:${e}=>${r}`;
589
590
  if (this.cache.has(o)) return this.cache.get(o);
590
591
  const i = `fibo-c-${t}`;
591
- return this.insert(`@keyframes ${i} { from { ${e} } to { ${s} } }`), this.insert(`.${i} { animation-name: ${i}; }`), this.cache.set(o, i), i;
592
+ return this.insert(`@keyframes ${i} { from { ${e} } to { ${r} } }`), this.insert(`.${i} { animation-name: ${i}; }`), this.cache.set(o, i), i;
592
593
  }
593
594
  insert(t, e = !0) {
594
- var s;
595
- if (!(e && this.extras.includes(t)) && (e && this.extras.push(t), !(this.sheet && ((s = this.sheet.textContent) != null && s.includes(t)))))
595
+ var r;
596
+ if (!(e && this.extras.includes(t)) && (e && this.extras.push(t), !(this.sheet && ((r = this.sheet.textContent) != null && r.includes(t)))))
596
597
  if (this.sheet && this.sheet.sheet)
597
598
  try {
598
599
  this.sheet.sheet.insertRule(t, this.sheet.sheet.cssRules.length);
@@ -603,8 +604,8 @@ const $ = class $ {
603
604
  }
604
605
  /** Set a `:root` custom property (e.g. `--fibo-sticky-offset`). */
605
606
  registerRoot(t, e) {
606
- const s = `:root:${t}:${e}`;
607
- this.cache.has(s) || (this.insert(`:root { ${t}: ${e}; }`), this.cache.set(s, ":root"));
607
+ const r = `:root:${t}:${e}`;
608
+ this.cache.has(r) || (this.insert(`:root { ${t}: ${e}; }`), this.cache.set(r, ":root"));
608
609
  }
609
610
  /** Once: `html { scroll-padding-top: var(--fibo-sticky-offset, 0px) }`. */
610
611
  ensureScrollPadding() {
@@ -612,43 +613,43 @@ const $ = class $ {
612
613
  this.cache.has(t) || (this.insert("html { scroll-padding-top: var(--fibo-sticky-offset, 0px); }"), this.cache.set(t, "html"));
613
614
  }
614
615
  register(t, e) {
615
- const s = `${t}:${e}`;
616
- if (this.cache.has(s))
617
- return this.cache.get(s);
616
+ const r = `${t}:${e}`;
617
+ if (this.cache.has(r))
618
+ return this.cache.get(r);
618
619
  const o = e.replace(/[^a-zA-Z0-9-]/g, "_"), i = `fibo-${t}-${o}`, n = `.${i} { ${t}: ${e} !important; }`;
619
- return this.insert(n), this.cache.set(s, i), i;
620
+ return this.insert(n), this.cache.set(r, i), i;
620
621
  }
621
622
  /**
622
623
  * One class per (pseudo, property, value). Same rules → same class on server and client.
623
624
  * Order-independent: each declaration hashes on its own.
624
625
  */
625
- registerPseudo(t, e, s, o = !1) {
626
- const i = `${o ? "group:" : ""}${t}:${e}:${s}`;
626
+ registerPseudo(t, e, r, o = !1) {
627
+ const i = `${o ? "group:" : ""}${t}:${e}:${r}`;
627
628
  if (this.cache.has(i))
628
629
  return this.cache.get(i);
629
- const n = `fibo-ps-${q(i)}`, a = o ? `.group:${t} .${n} { ${e}: ${s} !important; }` : `.${n}:${t} { ${e}: ${s} !important; }`;
630
+ const n = `fibo-ps-${q(i)}`, a = o ? `.group:${t} .${n} { ${e}: ${r} !important; }` : `.${n}:${t} { ${e}: ${r} !important; }`;
630
631
  return this.insert(a), this.cache.set(i, n), n;
631
632
  }
632
- registerGroupPseudo(t, e, s, o) {
633
- return this.registerPseudo(e, s, o, !0);
633
+ registerGroupPseudo(t, e, r, o) {
634
+ return this.registerPseudo(e, r, o, !0);
634
635
  }
635
636
  };
636
- c($, "instance");
637
+ l($, "instance");
637
638
  let T = $;
638
639
  const u = T.getInstance();
639
640
  function _() {
640
641
  T.getInstance().ensureDefaults();
641
642
  }
642
- function we() {
643
+ function Ne() {
643
644
  return T.getInstance().getCss();
644
645
  }
645
646
  function nt() {
646
647
  return T.getInstance().getCss();
647
648
  }
648
- function Se() {
649
+ function Ee() {
649
650
  return `<style id="fibo-dynamic-styles" data-fibo="1">${nt().replace(/<\/style/gi, "<\\/style")}</style>`;
650
651
  }
651
- function ve() {
652
+ function Me() {
652
653
  return _(), g.createElement("style", {
653
654
  id: "fibo-dynamic-styles",
654
655
  "data-fibo": "1",
@@ -656,11 +657,11 @@ function ve() {
656
657
  dangerouslySetInnerHTML: { __html: nt() }
657
658
  });
658
659
  }
659
- function Ot() {
660
+ function Xt() {
660
661
  return _(), g.createElement("style", {
661
662
  id: "fibo-motion-presets",
662
663
  "data-fibo-motion": "1",
663
- dangerouslySetInnerHTML: { __html: F }
664
+ dangerouslySetInnerHTML: { __html: P }
664
665
  });
665
666
  }
666
667
  const at = {
@@ -669,64 +670,64 @@ const at = {
669
670
  lg: 1024,
670
671
  xl: 1280
671
672
  };
672
- function Wt(r) {
673
- return r in at;
673
+ function Kt(s) {
674
+ return s in at;
674
675
  }
675
- function Ht(r) {
676
- if (Wt(r))
677
- return `(min-width: ${at[r]}px)`;
678
- const t = r.trim();
676
+ function Yt(s) {
677
+ if (Kt(s))
678
+ return `(min-width: ${at[s]}px)`;
679
+ const t = s.trim();
679
680
  return t.startsWith("@media") ? t.replace(/^@media\s+/, "") : t;
680
681
  }
681
- function ct(r) {
682
- var t, e, s = "";
683
- if (typeof r == "string" || typeof r == "number") s += r;
684
- else if (typeof r == "object") if (Array.isArray(r)) {
685
- var o = r.length;
686
- for (t = 0; t < o; t++) r[t] && (e = ct(r[t])) && (s && (s += " "), s += e);
687
- } else for (e in r) r[e] && (s && (s += " "), s += e);
688
- return s;
689
- }
690
- function Xt() {
691
- for (var r, t, e = 0, s = "", o = arguments.length; e < o; e++) (r = arguments[e]) && (t = ct(r)) && (s && (s += " "), s += t);
692
- return s;
693
- }
694
- function Kt(r) {
695
- const t = r.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
682
+ function lt(s) {
683
+ var t, e, r = "";
684
+ if (typeof s == "string" || typeof s == "number") r += s;
685
+ else if (typeof s == "object") if (Array.isArray(s)) {
686
+ var o = s.length;
687
+ for (t = 0; t < o; t++) s[t] && (e = lt(s[t])) && (r && (r += " "), r += e);
688
+ } else for (e in s) s[e] && (r && (r += " "), r += e);
689
+ return r;
690
+ }
691
+ function Ut() {
692
+ for (var s, t, e = 0, r = "", o = arguments.length; e < o; e++) (s = arguments[e]) && (t = lt(s)) && (r && (r += " "), r += t);
693
+ return r;
694
+ }
695
+ function Gt(s) {
696
+ const t = s.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
696
697
  if (!t)
697
- return r;
698
- const [, e, s, o] = t, i = parseFloat(e), n = parseFloat(s), a = parseFloat(o), l = n * Math.cos(a * Math.PI / 180), d = n * Math.sin(a * Math.PI / 180), h = i + 0.3963377774 * l + 0.2158037573 * d, f = i - 0.1055613458 * l - 0.0638541728 * d, m = i - 0.0894841775 * l - 1.291485548 * d, p = h * h * h, y = f * f * f, b = m * m * m, x = 4.0767416621 * p - 3.3077115913 * y + 0.2309699292 * b, S = -1.2684380046 * p + 2.6097574011 * y - 0.3413193965 * b, ft = -0.0041960863 * p - 0.7034186147 * y + 1.707614701 * b, L = (I) => I >= 31308e-7 ? 1.055 * I ** (1 / 2.4) - 0.055 : 12.92 * I, dt = Math.max(0, Math.min(1, L(x))), mt = Math.max(0, Math.min(1, L(S))), pt = Math.max(0, Math.min(1, L(ft))), V = (I) => {
698
+ return s;
699
+ const [, e, r, o] = t, i = parseFloat(e), n = parseFloat(r), a = parseFloat(o), c = n * Math.cos(a * Math.PI / 180), d = n * Math.sin(a * Math.PI / 180), h = i + 0.3963377774 * c + 0.2158037573 * d, f = i - 0.1055613458 * c - 0.0638541728 * d, m = i - 0.0894841775 * c - 1.291485548 * d, p = h * h * h, y = f * f * f, b = m * m * m, x = 4.0767416621 * p - 3.3077115913 * y + 0.2309699292 * b, S = -1.2684380046 * p + 2.6097574011 * y - 0.3413193965 * b, ft = -0.0041960863 * p - 0.7034186147 * y + 1.707614701 * b, F = (I) => I >= 31308e-7 ? 1.055 * I ** (1 / 2.4) - 0.055 : 12.92 * I, dt = Math.max(0, Math.min(1, F(x))), mt = Math.max(0, Math.min(1, F(S))), pt = Math.max(0, Math.min(1, F(ft))), L = (I) => {
699
700
  var X;
700
- const P = (X = Math.round(I * 255).toString(16)) == null ? void 0 : X.toUpperCase();
701
- return P.length === 1 ? `0${P}` : P;
701
+ const V = (X = Math.round(I * 255).toString(16)) == null ? void 0 : X.toUpperCase();
702
+ return V.length === 1 ? `0${V}` : V;
702
703
  };
703
- return `#${V(dt)}${V(mt)}${V(pt)}`;
704
+ return `#${L(dt)}${L(mt)}${L(pt)}`;
704
705
  }
705
- function Yt(r) {
706
- const t = {}, e = {}, s = r.split(`
706
+ function qt(s) {
707
+ const t = {}, e = {}, r = s.split(`
707
708
  `);
708
- for (const o of s) {
709
+ for (const o of r) {
709
710
  const i = o.trim();
710
711
  if (!i || i.startsWith("//") || i.startsWith("*") || i === "@theme {" || i === "}")
711
712
  continue;
712
713
  const n = i.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = i.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
713
714
  if (n) {
714
- const [, l, d] = n, h = Kt(d);
715
- t[h.toLowerCase()] = `bg-${l}`, e[h.toLowerCase()] = `text-${l}`;
715
+ const [, c, d] = n, h = Gt(d);
716
+ t[h.toLowerCase()] = `bg-${c}`, e[h.toLowerCase()] = `text-${c}`;
716
717
  } else if (a) {
717
- const [, l, d] = a;
718
- t[d.toLowerCase()] = `bg-${l}`, e[d.toLowerCase()] = `text-${l}`;
718
+ const [, c, d] = a;
719
+ t[d.toLowerCase()] = `bg-${c}`, e[d.toLowerCase()] = `text-${c}`;
719
720
  }
720
721
  }
721
722
  return { background: t, text: e };
722
723
  }
723
- const Ut = (r) => {
724
- if (r !== void 0)
725
- return typeof r == "number" ? `${r}px` : r.toString();
726
- }, N = (r, t) => {
727
- const e = Ut(t);
728
- return e === void 0 ? "" : `${r}-[${e}]`;
729
- }, Gt = `
724
+ const Zt = (s) => {
725
+ if (s !== void 0)
726
+ return typeof s == "number" ? `${s}px` : s.toString();
727
+ }, N = (s, t) => {
728
+ const e = Zt(t);
729
+ return e === void 0 ? "" : `${s}-[${e}]`;
730
+ }, Jt = `
730
731
  --color-red-50: oklch(0.971 0.013 17.38);
731
732
  --color-red-100: oklch(0.936 0.032 17.717);
732
733
  --color-red-200: oklch(0.885 0.062 18.334);
@@ -971,7 +972,7 @@ const Ut = (r) => {
971
972
  --color-stone-950: oklch(0.147 0.004 49.25);
972
973
  --color-black: #000;
973
974
  --color-white: #fff;
974
- `, qt = Yt(Gt), lt = {
975
+ `, Qt = qt(Jt), ct = {
975
976
  borderRadius: {
976
977
  0: "rounded-none",
977
978
  "0px": "rounded-none",
@@ -1068,21 +1069,21 @@ const Ut = (r) => {
1068
1069
  fixed: "fixed",
1069
1070
  sticky: "sticky"
1070
1071
  }
1071
- }, Zt = (r, t) => ({
1072
+ }, te = (s, t) => ({
1072
1073
  // 背景色
1073
- backgroundColor: (e) => e.backgroundColor ? [r.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
1074
+ backgroundColor: (e) => e.backgroundColor ? [s.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
1074
1075
  // 文字色
1075
- color: (e) => e.color ? [r.text[e.color.toLowerCase()] || `text-[${e.color}]`] : [],
1076
+ color: (e) => e.color ? [s.text[e.color.toLowerCase()] || `text-[${e.color}]`] : [],
1076
1077
  // 圆角
1077
1078
  borderRadius: (e) => {
1078
1079
  if (!e.borderRadius)
1079
1080
  return [];
1080
- const s = lt.borderRadius[e.borderRadius] || N("rounded", e.borderRadius);
1081
- return s ? [s] : [];
1081
+ const r = ct.borderRadius[e.borderRadius] || N("rounded", e.borderRadius);
1082
+ return r ? [r] : [];
1082
1083
  },
1083
1084
  // 外边距
1084
1085
  margin: (e) => {
1085
- const s = [];
1086
+ const r = [];
1086
1087
  if (e.margin !== void 0) {
1087
1088
  const i = N("m", e.margin);
1088
1089
  return i ? [i] : [];
@@ -1097,13 +1098,13 @@ const Ut = (r) => {
1097
1098
  ].forEach(({ prop: i, dir: n }) => {
1098
1099
  if (i !== void 0) {
1099
1100
  const a = N(n, i);
1100
- a && s.push(a);
1101
+ a && r.push(a);
1101
1102
  }
1102
- }), s;
1103
+ }), r;
1103
1104
  },
1104
1105
  // 内边距
1105
1106
  padding: (e) => {
1106
- const s = [];
1107
+ const r = [];
1107
1108
  if (e.padding !== void 0) {
1108
1109
  const i = N("p", e.padding);
1109
1110
  return i ? [i] : [];
@@ -1118,58 +1119,58 @@ const Ut = (r) => {
1118
1119
  ].forEach(({ prop: i, dir: n }) => {
1119
1120
  if (i !== void 0) {
1120
1121
  const a = N(n, i);
1121
- a && s.push(a);
1122
+ a && r.push(a);
1122
1123
  }
1123
- }), s;
1124
+ }), r;
1124
1125
  },
1125
1126
  // 字体
1126
1127
  font: (e) => {
1127
- const s = [];
1128
- if (e.fontSize && s.push(t.fontSize[e.fontSize.toString()] || `text-[${e.fontSize}]`), e.fontWeight) {
1128
+ const r = [];
1129
+ if (e.fontSize && r.push(t.fontSize[e.fontSize.toString()] || `text-[${e.fontSize}]`), e.fontWeight) {
1129
1130
  const o = t.fontWeight[e.fontWeight.toString()];
1130
- o && s.push(o);
1131
+ o && r.push(o);
1131
1132
  }
1132
1133
  if (e.textAlign) {
1133
1134
  const o = t.textAlign[e.textAlign];
1134
- o && s.push(o);
1135
+ o && r.push(o);
1135
1136
  }
1136
1137
  if (e.fontFamily) {
1137
1138
  const o = t.fontFamily[e.fontFamily];
1138
- o && s.push(o);
1139
+ o && r.push(o);
1139
1140
  }
1140
1141
  if (e.textDecoration) {
1141
1142
  const o = t.textDecoration[e.textDecoration];
1142
- o && s.push(o);
1143
+ o && r.push(o);
1143
1144
  }
1144
1145
  if (e.fontVariantNumeric) {
1145
1146
  const o = t.fontVariantNumeric[e.fontVariantNumeric];
1146
- o && s.push(o);
1147
+ o && r.push(o);
1147
1148
  }
1148
1149
  if (e.fontStyle) {
1149
1150
  const o = t.fontStyle[e.fontStyle];
1150
- o && s.push(o);
1151
+ o && r.push(o);
1151
1152
  }
1152
- return s;
1153
+ return r;
1153
1154
  },
1154
1155
  // 尺寸
1155
1156
  size: (e) => {
1156
- const s = [];
1157
+ const r = [];
1157
1158
  if (e.width) {
1158
1159
  const o = e.width.toString();
1159
- s.push(`w-[${o}]`);
1160
+ r.push(`w-[${o}]`);
1160
1161
  }
1161
1162
  if (e.height) {
1162
1163
  const o = e.height.toString();
1163
- s.push(`h-[${o}]`);
1164
+ r.push(`h-[${o}]`);
1164
1165
  }
1165
- return s;
1166
+ return r;
1166
1167
  },
1167
1168
  // 布局
1168
1169
  layout: (e) => {
1169
- const s = [];
1170
+ const r = [];
1170
1171
  if (e.display) {
1171
1172
  const o = t.display[e.display];
1172
- o && s.push(o);
1173
+ o && r.push(o);
1173
1174
  }
1174
1175
  if (e.flexDirection) {
1175
1176
  const i = {
@@ -1178,7 +1179,7 @@ const Ut = (r) => {
1178
1179
  "row-reverse": "flex-row-reverse",
1179
1180
  "column-reverse": "flex-col-reverse"
1180
1181
  }[e.flexDirection];
1181
- i && s.push(i);
1182
+ i && r.push(i);
1182
1183
  }
1183
1184
  if (e.justifyContent) {
1184
1185
  const i = {
@@ -1189,7 +1190,7 @@ const Ut = (r) => {
1189
1190
  "space-around": "justify-around",
1190
1191
  "space-evenly": "justify-evenly"
1191
1192
  }[e.justifyContent];
1192
- i && s.push(i);
1193
+ i && r.push(i);
1193
1194
  }
1194
1195
  if (e.alignItems) {
1195
1196
  const i = {
@@ -1199,13 +1200,13 @@ const Ut = (r) => {
1199
1200
  baseline: "items-baseline",
1200
1201
  stretch: "items-stretch"
1201
1202
  }[e.alignItems];
1202
- i && s.push(i);
1203
+ i && r.push(i);
1203
1204
  }
1204
1205
  if (e.gap) {
1205
1206
  const o = N("gap", e.gap);
1206
- o && s.push(o);
1207
+ o && r.push(o);
1207
1208
  }
1208
- return s;
1209
+ return r;
1209
1210
  },
1210
1211
  // 定位
1211
1212
  position: (e) => e.position ? [t.position[e.position] || ""].filter(Boolean) : [],
@@ -1213,18 +1214,18 @@ const Ut = (r) => {
1213
1214
  opacity: (e) => {
1214
1215
  if (e.opacity === void 0)
1215
1216
  return [];
1216
- const s = typeof e.opacity == "string" ? parseFloat(e.opacity) : e.opacity;
1217
+ const r = typeof e.opacity == "string" ? parseFloat(e.opacity) : e.opacity;
1217
1218
  return [`opacity-${{
1218
1219
  0: "0",
1219
1220
  0.25: "25",
1220
1221
  0.5: "50",
1221
1222
  0.75: "75",
1222
1223
  1: "100"
1223
- }[s] || Math.round(s * 100)}`];
1224
+ }[r] || Math.round(r * 100)}`];
1224
1225
  },
1225
1226
  // 自定义类名
1226
1227
  className: (e) => e.className ? [e.className] : []
1227
- }), Jt = {
1228
+ }), ee = {
1228
1229
  backgroundColor: "backgroundColor",
1229
1230
  color: "color",
1230
1231
  borderRadius: "borderRadius",
@@ -1258,49 +1259,49 @@ const Ut = (r) => {
1258
1259
  position: "position",
1259
1260
  opacity: "opacity",
1260
1261
  className: "className"
1261
- }, Qt = (r, t) => {
1262
- const e = (t == null ? void 0 : t.colorMaps) || qt, s = (t == null ? void 0 : t.styleMaps) || lt, o = Zt(e, s), i = [], n = /* @__PURE__ */ new Set();
1263
- return Object.keys(r).forEach((a) => {
1264
- const l = Jt[a];
1265
- if (l && !n.has(l)) {
1266
- const d = o[l];
1262
+ }, se = (s, t) => {
1263
+ const e = (t == null ? void 0 : t.colorMaps) || Qt, r = (t == null ? void 0 : t.styleMaps) || ct, o = te(e, r), i = [], n = /* @__PURE__ */ new Set();
1264
+ return Object.keys(s).forEach((a) => {
1265
+ const c = ee[a];
1266
+ if (c && !n.has(c)) {
1267
+ const d = o[c];
1267
1268
  if (d) {
1268
- const h = d(r);
1269
- i.push(...h), n.add(l);
1269
+ const h = d(s);
1270
+ i.push(...h), n.add(c);
1270
1271
  }
1271
1272
  }
1272
1273
  }), i.filter(Boolean).join(" ");
1273
1274
  };
1274
- function te(r) {
1275
+ function re(s) {
1275
1276
  const t = {};
1276
- return r.forEach((e, s) => {
1277
- t[s] = e.value;
1277
+ return s.forEach((e, r) => {
1278
+ t[r] = e.value;
1278
1279
  }), t;
1279
1280
  }
1280
- function ee({ animatedProps: r, animationConfig: t, children: e }) {
1281
- const [s, o] = Z(
1282
- () => te(r)
1281
+ function oe({ animatedProps: s, animationConfig: t, children: e }) {
1282
+ const [r, o] = Z(
1283
+ () => re(s)
1283
1284
  );
1284
1285
  A(() => {
1285
- const l = [];
1286
- return r.forEach((d, h) => {
1286
+ const c = [];
1287
+ return s.forEach((d, h) => {
1287
1288
  const f = (m) => {
1288
1289
  o((p) => ({
1289
1290
  ...p,
1290
1291
  [h]: m
1291
1292
  }));
1292
1293
  };
1293
- l.push(d.subscribe(f)), f(d.value);
1294
+ c.push(d.subscribe(f)), f(d.value);
1294
1295
  }), () => {
1295
- l.forEach((d) => d());
1296
+ c.forEach((d) => d());
1296
1297
  };
1297
- }, [r]);
1298
+ }, [s]);
1298
1299
  const i = [];
1299
- s.translateX !== void 0 && i.push(`translateX(${s.translateX}px)`), s.translateY !== void 0 && i.push(`translateY(${s.translateY}px)`), s.scale !== void 0 && i.push(`scale(${s.scale})`), s.rotate !== void 0 && i.push(`rotate(${s.rotate}deg)`);
1300
+ r.translateX !== void 0 && i.push(`translateX(${r.translateX}px)`), r.translateY !== void 0 && i.push(`translateY(${r.translateY}px)`), r.scale !== void 0 && i.push(`scale(${r.scale})`), r.rotate !== void 0 && i.push(`rotate(${r.rotate}deg)`);
1300
1301
  const n = {};
1301
1302
  if (i.length > 0 && (n.transform = i.join(" ")), t) {
1302
- const { duration: l = 300, curve: d = "easeOut", stiffness: h, damping: f } = t, m = v(d, { stiffness: h, damping: f });
1303
- n.transition = `transform ${l}ms ${m}`;
1303
+ const { duration: c = 300, curve: d = "easeOut", stiffness: h, damping: f } = t, m = v(d, { stiffness: h, damping: f });
1304
+ n.transition = `transform ${c}ms ${m}`;
1304
1305
  }
1305
1306
  const a = {
1306
1307
  ...e.props.style,
@@ -1309,16 +1310,16 @@ function ee({ animatedProps: r, animationConfig: t, children: e }) {
1309
1310
  return yt(e, { style: a });
1310
1311
  }
1311
1312
  class k {
1312
- constructor(t, e, s = !1) {
1313
- c(this, "pseudoState");
1314
- c(this, "parentBuilder");
1315
- c(this, "isGroup");
1316
- c(this, "transitionDuration", 200);
1317
- c(this, "transitionEasing", "ease-in-out");
1318
- c(this, "transitionDelay", 0);
1319
- c(this, "transitionProperties", ["all"]);
1320
- c(this, "transforms", /* @__PURE__ */ new Map());
1321
- this.pseudoState = t, this.parentBuilder = e, this.isGroup = s;
1313
+ constructor(t, e, r = !1) {
1314
+ l(this, "pseudoState");
1315
+ l(this, "parentBuilder");
1316
+ l(this, "isGroup");
1317
+ l(this, "transitionDuration", 200);
1318
+ l(this, "transitionEasing", "ease-in-out");
1319
+ l(this, "transitionDelay", 0);
1320
+ l(this, "transitionProperties", ["all"]);
1321
+ l(this, "transforms", /* @__PURE__ */ new Map());
1322
+ this.pseudoState = t, this.parentBuilder = e, this.isGroup = r;
1322
1323
  }
1323
1324
  bg(t) {
1324
1325
  return this.set("background-color", t);
@@ -1358,11 +1359,11 @@ class k {
1358
1359
  css(t, e) {
1359
1360
  return this.set(t, e);
1360
1361
  }
1361
- transition(t, e, s, o) {
1362
+ transition(t, e, r, o) {
1362
1363
  if (typeof t == "string" && e === void 0)
1363
1364
  return this.set("transition", t);
1364
- const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = v(s || this.transitionEasing), l = o ? `${o}ms` : "0ms";
1365
- return this.set("transition", `${i} ${n} ${a} ${l}`);
1365
+ const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = v(r || this.transitionEasing), c = o ? `${o}ms` : "0ms";
1366
+ return this.set("transition", `${i} ${n} ${a} ${c}`);
1366
1367
  }
1367
1368
  duration(t) {
1368
1369
  return this.transitionDuration = t, this.applyTransition(), this;
@@ -1380,49 +1381,49 @@ class k {
1380
1381
  return this.transitionProperties = t, this.applyTransition(), this;
1381
1382
  }
1382
1383
  applyTransition() {
1383
- const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing, o = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
1384
- this.set("transition", `${t} ${e} ${s} ${o}`);
1384
+ const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, r = this.transitionEasing, o = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
1385
+ this.set("transition", `${t} ${e} ${r} ${o}`);
1385
1386
  }
1386
1387
  flushTransform() {
1387
1388
  return this.set("transform", [...this.transforms.values()].join(" "));
1388
1389
  }
1389
1390
  set(t, e) {
1390
- const s = u.registerPseudo(this.pseudoState, t, e, this.isGroup);
1391
- return this.parentBuilder.addClassName(s), this;
1391
+ const r = u.registerPseudo(this.pseudoState, t, e, this.isGroup);
1392
+ return this.parentBuilder.addClassName(r), this;
1392
1393
  }
1393
1394
  end() {
1394
1395
  return this.parentBuilder;
1395
1396
  }
1396
1397
  }
1397
- function Ce(r, t) {
1398
+ function Te(s, t) {
1398
1399
  if (typeof document > "u") return;
1399
- const e = typeof r == "string" ? r : null, s = (e == null ? void 0 : e.replace(/^#/, "")) ?? null;
1400
- t != null && t.hash && s && typeof window < "u" && (window.location.hash = s);
1401
- const o = typeof r == "string" ? document.getElementById(r.replace(/^#/, "")) ?? document.querySelector(r.startsWith("#") ? r : `#${r}`) ?? document.querySelector(r) : r;
1400
+ const e = typeof s == "string" ? s : null, r = (e == null ? void 0 : e.replace(/^#/, "")) ?? null;
1401
+ t != null && t.hash && r && typeof window < "u" && (window.location.hash = r);
1402
+ const o = typeof s == "string" ? document.getElementById(s.replace(/^#/, "")) ?? document.querySelector(s.startsWith("#") ? s : `#${s}`) ?? document.querySelector(s) : s;
1402
1403
  o && o.scrollIntoView({
1403
1404
  behavior: (t == null ? void 0 : t.behavior) ?? "smooth",
1404
1405
  block: (t == null ? void 0 : t.block) ?? "start"
1405
1406
  });
1406
1407
  }
1407
- function Ne(r) {
1408
+ function Ie(s) {
1408
1409
  const t = typeof document < "u" ? document : void 0, e = t == null ? void 0 : t.startViewTransition;
1409
1410
  if (typeof e == "function") {
1410
- e.call(t, r);
1411
+ e.call(t, s);
1411
1412
  return;
1412
1413
  }
1413
- r();
1414
+ s();
1414
1415
  }
1415
- function se() {
1416
+ function ie() {
1416
1417
  return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
1417
1418
  }
1418
- function re() {
1419
+ function ne() {
1419
1420
  return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
1420
1421
  }
1421
- function oe({
1422
- preset: r = "fadeUp",
1422
+ function ae({
1423
+ preset: s = "fadeUp",
1423
1424
  once: t = !0,
1424
1425
  rootMargin: e = "0px 0px -8% 0px",
1425
- threshold: s = 0.12,
1426
+ threshold: r = 0.12,
1426
1427
  forceMotion: o = !1,
1427
1428
  preferTimeline: i = !1,
1428
1429
  children: n
@@ -1432,7 +1433,7 @@ function oe({
1432
1433
  _();
1433
1434
  const d = a.current;
1434
1435
  if (!d) return;
1435
- if (i && se()) {
1436
+ if (i && ie()) {
1436
1437
  d.classList.add("fibo-inview");
1437
1438
  return;
1438
1439
  }
@@ -1445,79 +1446,80 @@ function oe({
1445
1446
  for (const m of f)
1446
1447
  m.isIntersecting ? (m.target.classList.add("fibo-inview"), t && h.unobserve(m.target)) : t || m.target.classList.remove("fibo-inview");
1447
1448
  },
1448
- { rootMargin: e, threshold: s }
1449
+ { rootMargin: e, threshold: r }
1449
1450
  );
1450
1451
  return h.observe(d), () => h.disconnect();
1451
- }, [t, e, s, i]);
1452
- const l = [
1452
+ }, [t, e, r, i]);
1453
+ const c = [
1453
1454
  "fibo-reveal",
1454
- `fibo-reveal-${r}`,
1455
+ `fibo-reveal-${s}`,
1455
1456
  // min-w-0 only — do NOT force w-full (breaks horizontal ScrollView / carousel slides)
1456
1457
  "min-w-0",
1457
1458
  o ? "fibo-motion-force" : ""
1458
1459
  ].filter(Boolean).join(" ");
1459
- return g.createElement("div", { ref: a, className: l, "data-fibo-reveal": r }, n);
1460
+ return g.createElement("div", { ref: a, className: c, "data-fibo-reveal": s }, n);
1460
1461
  }
1461
- function ie({ children: r }) {
1462
+ function le({ children: s }) {
1462
1463
  const t = w(null);
1463
1464
  return A(() => {
1464
- if (_(), re()) return;
1465
+ if (_(), ne()) return;
1465
1466
  const e = () => {
1466
1467
  var i, n;
1467
1468
  return ((i = t.current) == null ? void 0 : i.querySelector(".fibo-scroll-progress")) ?? ((n = t.current) == null ? void 0 : n.firstElementChild);
1468
- }, s = () => {
1469
+ }, r = () => {
1469
1470
  const o = e();
1470
1471
  if (!o) return;
1471
1472
  const i = document.documentElement.scrollHeight - window.innerHeight, n = i > 0 ? Math.min(1, Math.max(0, window.scrollY / i)) : 0;
1472
1473
  o.style.setProperty("--fibo-progress", String(n));
1473
1474
  };
1474
- return s(), window.addEventListener("scroll", s, { passive: !0 }), window.addEventListener("resize", s), () => {
1475
- window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
1475
+ return r(), window.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r), () => {
1476
+ window.removeEventListener("scroll", r), window.removeEventListener("resize", r);
1476
1477
  };
1477
1478
  }, []), g.createElement(
1478
1479
  "div",
1479
1480
  { ref: t, "data-fibo-scroll-progress": "1", style: { display: "contents" } },
1480
- r
1481
+ s
1481
1482
  );
1482
1483
  }
1483
- const ht = 64, ne = `${ht}px`;
1484
- class Ee {
1484
+ const ht = 64, ce = `${ht}px`;
1485
+ class Re {
1485
1486
  constructor() {
1486
1487
  /** @internal Extra DOM props forwarded to the host element. */
1487
- c(this, "_props", {});
1488
- c(this, "_style", {});
1489
- c(this, "_cssStyles", {});
1490
- c(this, "_classNames", []);
1491
- c(this, "_children", []);
1492
- c(this, "_theme");
1493
- c(this, "_state", /* @__PURE__ */ new Map());
1494
- c(this, "_providers", /* @__PURE__ */ new Map());
1495
- c(this, "_observers", /* @__PURE__ */ new Set());
1496
- c(this, "_signals", /* @__PURE__ */ new Set());
1497
- c(this, "_isObserver", !1);
1498
- c(this, "_gesture");
1499
- c(this, "_animationConfig");
1500
- c(this, "_animatedProps", /* @__PURE__ */ new Map());
1501
- c(this, "_transforms", []);
1502
- c(this, "_transitionClass");
1503
- c(this, "_motionClass");
1504
- c(this, "_staggerMs");
1505
- c(this, "_reveal");
1506
- c(this, "_scrollProgress", !1);
1507
- c(this, "_viewTransition");
1508
- c(this, "_reducedMotion", "reduce");
1509
- c(this, "_usesCssMotion", !1);
1510
- c(this, "_explicitScrollMargin", !1);
1488
+ l(this, "_props", {});
1489
+ l(this, "_style", {});
1490
+ l(this, "_cssStyles", {});
1491
+ l(this, "_classNames", []);
1492
+ l(this, "_children", []);
1493
+ /** Resolved theme for this subtree (SwiftUI Environment / Flutter Theme). */
1494
+ l(this, "_theme");
1495
+ l(this, "_state", /* @__PURE__ */ new Map());
1496
+ l(this, "_providers", /* @__PURE__ */ new Map());
1497
+ l(this, "_observers", /* @__PURE__ */ new Set());
1498
+ l(this, "_signals", /* @__PURE__ */ new Set());
1499
+ l(this, "_isObserver", !1);
1500
+ l(this, "_gesture");
1501
+ l(this, "_animationConfig");
1502
+ l(this, "_animatedProps", /* @__PURE__ */ new Map());
1503
+ l(this, "_transforms", []);
1504
+ l(this, "_transitionClass");
1505
+ l(this, "_motionClass");
1506
+ l(this, "_staggerMs");
1507
+ l(this, "_reveal");
1508
+ l(this, "_scrollProgress", !1);
1509
+ l(this, "_viewTransition");
1510
+ l(this, "_reducedMotion", "reduce");
1511
+ l(this, "_usesCssMotion", !1);
1512
+ l(this, "_explicitScrollMargin", !1);
1511
1513
  /** Shrink-wrap: skip the default `w-full` / `self-stretch` on Row and Column. */
1512
- c(this, "_hug", !1);
1514
+ l(this, "_hug", !1);
1513
1515
  // Transition properties
1514
- c(this, "_transitionDuration", 200);
1516
+ l(this, "_transitionDuration", 200);
1515
1517
  // ms
1516
- c(this, "_transitionEasing", "ease-in-out");
1517
- c(this, "_transitionDelay", 0);
1518
+ l(this, "_transitionEasing", "ease-in-out");
1519
+ l(this, "_transitionDelay", 0);
1518
1520
  // ms
1519
- c(this, "_transitionProperties", ["all"]);
1520
- c(this, "_childFunction");
1521
+ l(this, "_transitionProperties", ["all"]);
1522
+ l(this, "_childFunction");
1521
1523
  }
1522
1524
  hug() {
1523
1525
  return this._hug = !0, this;
@@ -1561,20 +1563,20 @@ class Ee {
1561
1563
  return e && typeof e == "object" && (this.__fiboElementProps = { ...e, key: String(t) }), this;
1562
1564
  }
1563
1565
  paddingHorizontal(t) {
1564
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-left", e), o = u.register("padding-right", e);
1565
- return this._classNames.push(s, o), this;
1566
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("padding-left", e), o = u.register("padding-right", e);
1567
+ return this._classNames.push(r, o), this;
1566
1568
  }
1567
1569
  paddingVertical(t) {
1568
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-top", e), o = u.register("padding-bottom", e);
1569
- return this._classNames.push(s, o), this;
1570
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("padding-top", e), o = u.register("padding-bottom", e);
1571
+ return this._classNames.push(r, o), this;
1570
1572
  }
1571
1573
  marginHorizontal(t) {
1572
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-left", e), o = u.register("margin-right", e);
1573
- return this._classNames.push(s, o), this;
1574
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("margin-left", e), o = u.register("margin-right", e);
1575
+ return this._classNames.push(r, o), this;
1574
1576
  }
1575
1577
  marginVertical(t) {
1576
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-top", e), o = u.register("margin-bottom", e);
1577
- return this._classNames.push(s, o), this;
1578
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("margin-top", e), o = u.register("margin-bottom", e);
1579
+ return this._classNames.push(r, o), this;
1578
1580
  }
1579
1581
  flexDirection(t) {
1580
1582
  return this._classNames.push(`flex-${t}`), this;
@@ -1639,8 +1641,8 @@ class Ee {
1639
1641
  return this._classNames.push("h-full"), this;
1640
1642
  }
1641
1643
  square(t) {
1642
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("width", e), o = u.register("height", e);
1643
- return this._classNames.push(s, o), this;
1644
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("width", e), o = u.register("height", e);
1645
+ return this._classNames.push(r, o), this;
1644
1646
  }
1645
1647
  circle() {
1646
1648
  return this._classNames.push("rounded-full"), this;
@@ -1650,8 +1652,8 @@ class Ee {
1650
1652
  return this._classNames.push(e), this;
1651
1653
  }
1652
1654
  p(t) {
1653
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding", e);
1654
- return this._classNames.push(s), this;
1655
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("padding", e);
1656
+ return this._classNames.push(r), this;
1655
1657
  }
1656
1658
  px(t) {
1657
1659
  return this.paddingHorizontal(t);
@@ -1666,8 +1668,8 @@ class Ee {
1666
1668
  return this.paddingVertical(t);
1667
1669
  }
1668
1670
  m(t) {
1669
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin", e);
1670
- return this._classNames.push(s), this;
1671
+ const e = typeof t == "number" ? `${t}px` : t, r = u.register("margin", e);
1672
+ return this._classNames.push(r), this;
1671
1673
  }
1672
1674
  mx(t) {
1673
1675
  return this.marginHorizontal(t);
@@ -1682,16 +1684,16 @@ class Ee {
1682
1684
  return this.marginVertical(t);
1683
1685
  }
1684
1686
  bg(t) {
1685
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("background-color", e);
1686
- return this._classNames.push(s), this;
1687
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, r = u.register("background-color", e);
1688
+ return this._classNames.push(r), this;
1687
1689
  }
1688
1690
  text(t) {
1689
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1690
- return this._classNames.push(s), this;
1691
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, r = u.register("color", e);
1692
+ return this._classNames.push(r), this;
1691
1693
  }
1692
1694
  color(t) {
1693
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1694
- return this._classNames.push(s), this;
1695
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, r = u.register("color", e);
1696
+ return this._classNames.push(r), this;
1695
1697
  }
1696
1698
  resolveSemanticColor(t) {
1697
1699
  return [
@@ -1734,11 +1736,11 @@ class Ee {
1734
1736
  modal: "0 10px 40px rgba(0, 0, 0, 0.2)",
1735
1737
  float: "0 8px 16px rgba(0, 0, 0, 0.15)",
1736
1738
  inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
1737
- }, s = (i) => i.startsWith("#") || i.startsWith("rgb") || i.startsWith("hsl") || ["red", "blue", "green", "yellow", "purple", "pink", "orange", "white", "black", "gray"].some((n) => i.includes(n)), o = (i, n, a, l) => {
1738
- let f = a || "rgba(0, 0, 0, " + (l ?? 0.1) + ")";
1739
- if (a && a.startsWith("#") && l !== void 0) {
1739
+ }, r = (i) => i.startsWith("#") || i.startsWith("rgb") || i.startsWith("hsl") || ["red", "blue", "green", "yellow", "purple", "pink", "orange", "white", "black", "gray"].some((n) => i.includes(n)), o = (i, n, a, c) => {
1740
+ let f = a || "rgba(0, 0, 0, " + (c ?? 0.1) + ")";
1741
+ if (a && a.startsWith("#") && c !== void 0) {
1740
1742
  const y = parseInt(a.slice(1, 3), 16), b = parseInt(a.slice(3, 5), 16), x = parseInt(a.slice(5, 7), 16);
1741
- f = `rgba(${y}, ${b}, ${x}, ${l})`;
1743
+ f = `rgba(${y}, ${b}, ${x}, ${c})`;
1742
1744
  }
1743
1745
  const p = {
1744
1746
  sm: "2px",
@@ -1772,25 +1774,25 @@ class Ee {
1772
1774
  return this._classNames.push(i), this;
1773
1775
  }
1774
1776
  if (typeof t == "string") {
1775
- if (s(t)) {
1776
- const a = o("all", "md", t), l = u.register("box-shadow", a);
1777
- return this._classNames.push(l), this;
1777
+ if (r(t)) {
1778
+ const a = o("all", "md", t), c = u.register("box-shadow", a);
1779
+ return this._classNames.push(c), this;
1778
1780
  }
1779
1781
  const i = e[t] || e.md, n = u.register("box-shadow", i);
1780
1782
  return this._classNames.push(n), this;
1781
1783
  }
1782
1784
  if (Array.isArray(t)) {
1783
- const [i, n, a, l] = t;
1784
- if (typeof i == "string" && s(i)) {
1785
+ const [i, n, a, c] = t;
1786
+ if (typeof i == "string" && r(i)) {
1785
1787
  const f = o("all", "md", i, n), m = u.register("box-shadow", f);
1786
1788
  return this._classNames.push(m), this;
1787
1789
  }
1788
1790
  const d = i;
1789
- if (typeof n == "string" && s(n)) {
1791
+ if (typeof n == "string" && r(n)) {
1790
1792
  const f = o(d, "md", n, a), m = u.register("box-shadow", f);
1791
1793
  return this._classNames.push(m), this;
1792
1794
  } else {
1793
- const m = o(d, n, a, l), p = u.register("box-shadow", m);
1795
+ const m = o(d, n, a, c), p = u.register("box-shadow", m);
1794
1796
  return this._classNames.push(p), this;
1795
1797
  }
1796
1798
  }
@@ -1810,11 +1812,11 @@ class Ee {
1810
1812
  * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
1811
1813
  */
1812
1814
  media(t, e) {
1813
- return this.registerMediaStyles(Ht(t), e), this;
1815
+ return this.registerMediaStyles(Yt(t), e), this;
1814
1816
  }
1815
1817
  registerMediaStyles(t, e) {
1816
1818
  if (!e) return;
1817
- const s = /* @__PURE__ */ new Set([
1819
+ const r = /* @__PURE__ */ new Set([
1818
1820
  "opacity",
1819
1821
  "zIndex",
1820
1822
  "z-index",
@@ -1827,7 +1829,7 @@ class Ee {
1827
1829
  ]);
1828
1830
  for (const [o, i] of Object.entries(e)) {
1829
1831
  if (i == null) continue;
1830
- const n = o.replace(/[A-Z]/g, (l) => `-${l.toLowerCase()}`), a = typeof i == "number" && !s.has(o) && !s.has(n) ? `${i}px` : String(i);
1832
+ const n = o.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`), a = typeof i == "number" && !r.has(o) && !r.has(n) ? `${i}px` : String(i);
1831
1833
  this._classNames.push(u.registerMedia(t, n, a));
1832
1834
  }
1833
1835
  }
@@ -1961,7 +1963,7 @@ class Ee {
1961
1963
  ), this;
1962
1964
  }
1963
1965
  borderInput(t = "gray-300", e = "blue-500") {
1964
- const s = (n) => ["red", "blue", "green", "yellow", "purple", "pink", "indigo", "gray", "orange", "teal", "cyan", "emerald", "lime", "amber", "fuchsia", "rose", "violet", "sky", "slate", "zinc", "neutral", "stone"].includes(n) ? `${n}-500` : n, o = s(t), i = s(e);
1966
+ const r = (n) => ["red", "blue", "green", "yellow", "purple", "pink", "indigo", "gray", "orange", "teal", "cyan", "emerald", "lime", "amber", "fuchsia", "rose", "violet", "sky", "slate", "zinc", "neutral", "stone"].includes(n) ? `${n}-500` : n, o = r(t), i = r(e);
1965
1967
  return this._classNames.push(
1966
1968
  "border",
1967
1969
  `border-${o}`,
@@ -1989,8 +1991,8 @@ class Ee {
1989
1991
  if (e[t])
1990
1992
  this._classNames.push(e[t]);
1991
1993
  else {
1992
- const s = u.register("font-weight", t);
1993
- this._classNames.push(s);
1994
+ const r = u.register("font-weight", t);
1995
+ this._classNames.push(r);
1994
1996
  }
1995
1997
  }
1996
1998
  return this;
@@ -2058,11 +2060,11 @@ class Ee {
2058
2060
  props(t) {
2059
2061
  return this._props = { ...this._props, ...t }, this;
2060
2062
  }
2061
- transition(t, e, s, o) {
2063
+ transition(t, e, r, o) {
2062
2064
  if (typeof t == "string" && e === void 0)
2063
2065
  return this.replaceTransitionClass(u.register("transition", t)), this;
2064
- const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = v(s || this._transitionEasing), l = o ? `${o}ms` : "0ms";
2065
- return this.replaceTransitionClass(u.register("transition", `${i} ${n} ${a} ${l}`)), this;
2066
+ const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = v(r || this._transitionEasing), c = o ? `${o}ms` : "0ms";
2067
+ return this.replaceTransitionClass(u.register("transition", `${i} ${n} ${a} ${c}`)), this;
2066
2068
  }
2067
2069
  /**
2068
2070
  * Set transition duration in milliseconds
@@ -2100,32 +2102,32 @@ class Ee {
2100
2102
  * Apply the built transition to the element
2101
2103
  */
2102
2104
  _applyTransition() {
2103
- const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing, o = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
2104
- this.replaceTransitionClass(u.register("transition", `${t} ${e} ${s} ${o}`));
2105
+ const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, r = this._transitionEasing, o = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
2106
+ this.replaceTransitionClass(u.register("transition", `${t} ${e} ${r} ${o}`));
2105
2107
  }
2106
2108
  replaceTransitionClass(t) {
2107
2109
  this._transitionClass && (this._classNames = this._classNames.filter((e) => e !== this._transitionClass)), this._transitionClass = t, this._classNames.push(t);
2108
2110
  }
2109
2111
  animate(t, e) {
2110
2112
  _(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((h) => h !== this._motionClass));
2111
- const s = Pt(t), o = (s ? t.duration : e == null ? void 0 : e.duration) ?? this._transitionDuration, i = (s ? t.delay : e == null ? void 0 : e.delay) ?? this._transitionDelay;
2112
- let n = s ? t.ease : e == null ? void 0 : e.ease;
2113
+ const r = Bt(t), o = (r ? t.duration : e == null ? void 0 : e.duration) ?? this._transitionDuration, i = (r ? t.delay : e == null ? void 0 : e.delay) ?? this._transitionDelay;
2114
+ let n = r ? t.ease : e == null ? void 0 : e.ease;
2113
2115
  const a = {
2114
- stiffness: (s ? t.stiffness : e == null ? void 0 : e.stiffness) ?? void 0,
2115
- damping: (s ? t.damping : e == null ? void 0 : e.damping) ?? void 0,
2116
- mass: (s ? t.mass : e == null ? void 0 : e.mass) ?? void 0
2116
+ stiffness: (r ? t.stiffness : e == null ? void 0 : e.stiffness) ?? void 0,
2117
+ damping: (r ? t.damping : e == null ? void 0 : e.damping) ?? void 0,
2118
+ mass: (r ? t.mass : e == null ? void 0 : e.mass) ?? void 0
2117
2119
  };
2118
- if (s) {
2119
- const h = G(t.from), f = G(t.to), m = u.registerKeyframes(Ft(`${h}=>${f}`), h, f);
2120
+ if (r) {
2121
+ const h = G(t.from), f = G(t.to), m = u.registerKeyframes(Wt(`${h}=>${f}`), h, f);
2120
2122
  this._motionClass = `fibo-anim ${m}`, this._props["data-fibo-anim"] = "custom";
2121
2123
  } else {
2122
- const h = Bt(t);
2124
+ const h = Ht(t);
2123
2125
  this._motionClass = `fibo-anim fibo-anim-${h}`, this._props["data-fibo-anim"] = h, (e == null ? void 0 : e.from) !== void 0 && (this._style["--fibo-from"] = typeof e.from == "number" ? `${e.from}px` : e.from), !n && h === "pop" && (n = "spring");
2124
2126
  }
2125
- const l = v(n ?? "ease", a);
2127
+ const c = v(n ?? "ease", a);
2126
2128
  this._classNames.push(this._motionClass);
2127
2129
  const d = this._style;
2128
- return d["--fibo-dur"] = `${o}ms`, d["--fibo-ease"] = l, d["--fibo-delay"] = `${i}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
2130
+ return d["--fibo-dur"] = `${o}ms`, d["--fibo-ease"] = c, d["--fibo-delay"] = `${i}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
2129
2131
  }
2130
2132
  /** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
2131
2133
  spring(t) {
@@ -2176,8 +2178,8 @@ class Ee {
2176
2178
  this._classNames.push(u.register("position", "sticky"));
2177
2179
  const e = t === !0 ? "0px" : typeof t == "number" ? `${t}px` : t;
2178
2180
  this._classNames.push(u.register("top", e));
2179
- const s = t === !0 || t === 0 ? ne : typeof t == "number" ? `${Math.max(t, ht)}px` : t;
2180
- return this.publishStickyOffset(s), this;
2181
+ const r = t === !0 || t === 0 ? ce : typeof t == "number" ? `${Math.max(t, ht)}px` : t;
2182
+ return this.publishStickyOffset(r), this;
2181
2183
  }
2182
2184
  /**
2183
2185
  * Publish `--fibo-sticky-offset` on `:root` so `.anchor()` / `html` scroll-padding
@@ -2204,8 +2206,18 @@ class Ee {
2204
2206
  )
2205
2207
  );
2206
2208
  }
2209
+ /**
2210
+ * Apply a theme to this node and descendants (CSS vars inherit).
2211
+ * Fluent: `.theme("noir")` | `.theme(noirTheme)` | `.theme(extendTheme(webTheme, {…}))`.
2212
+ * SSR-safe: class + inline vars on first paint (no useEffect).
2213
+ */
2207
2214
  theme(t) {
2208
- return this._theme = t, this;
2215
+ const e = kt(t);
2216
+ return this._theme = e, this.addClassName(_t(e)), this;
2217
+ }
2218
+ /** Prefer dark/light system chrome for native controls under this subtree. */
2219
+ colorScheme(t) {
2220
+ return this._style = { ...this._style, colorScheme: t }, this;
2209
2221
  }
2210
2222
  hover(t) {
2211
2223
  this.ensureInteractiveTransition();
@@ -2264,23 +2276,22 @@ class Ee {
2264
2276
  }
2265
2277
  getClassName() {
2266
2278
  let t;
2267
- return Object.keys(this._cssStyles).length > 0 && (t = Qt(this._cssStyles) || void 0), Xt(this._classNames, t);
2279
+ return Object.keys(this._cssStyles).length > 0 && (t = se(this._cssStyles) || void 0), Ut(this._classNames, t);
2268
2280
  }
2269
2281
  getStyle() {
2270
2282
  let t = { ...this._style, ...this._cssStyles };
2271
- if (this._theme) {
2272
- const e = this._theme.colors || this._theme.colorScheme;
2273
- if (e) {
2274
- const s = t;
2275
- e.primary && (s["--fibo-primary"] = e.primary), e.onPrimary && (s["--fibo-on-primary"] = e.onPrimary), e.secondary && (s["--fibo-secondary"] = e.secondary), e.onSecondary && (s["--fibo-on-secondary"] = e.onSecondary), e.background && (s["--fibo-background"] = e.background), e.onBackground && (s["--fibo-on-background"] = e.onBackground), e.surface && (s["--fibo-surface"] = e.surface), e.onSurface && (s["--fibo-on-surface"] = e.onSurface), e.error && (s["--fibo-error"] = e.error);
2276
- }
2277
- }
2278
- if (this._transforms.length > 0) {
2283
+ if (this._theme && (t = {
2284
+ ...xt(this._theme),
2285
+ ...t,
2286
+ backgroundColor: t.backgroundColor ?? this._theme.colors.background,
2287
+ color: t.color ?? this._theme.colors.onBackground,
2288
+ fontFamily: t.fontFamily ?? this._theme.fontFamily
2289
+ }), this._transforms.length > 0) {
2279
2290
  const e = t.transform || "";
2280
2291
  t.transform = e ? `${e} ${this._transforms.join(" ")}` : this._transforms.join(" ");
2281
2292
  }
2282
2293
  if (this._animationConfig && this._animatedProps.size === 0) {
2283
- const { duration: e = 300, curve: s = "easeOut", stiffness: o, damping: i } = this._animationConfig, n = v(s, { stiffness: o, damping: i });
2294
+ const { duration: e = 300, curve: r = "easeOut", stiffness: o, damping: i } = this._animationConfig, n = v(r, { stiffness: o, damping: i });
2284
2295
  t.transition = `all ${e}ms ${n}`;
2285
2296
  }
2286
2297
  return t;
@@ -2288,12 +2299,12 @@ class Ee {
2288
2299
  processChildren() {
2289
2300
  const t = this._childFunction ? K(this._childFunction) : this._children;
2290
2301
  return this._staggerMs == null ? t : t.map(
2291
- (e, s) => g.createElement(
2302
+ (e, r) => g.createElement(
2292
2303
  "span",
2293
2304
  {
2294
- key: g.isValidElement(e) && H(e.key) ? e.key : `fibo-stagger-${s}`,
2305
+ key: g.isValidElement(e) && H(e.key) ? e.key : `fibo-stagger-${r}`,
2295
2306
  className: "fibo-stagger-item",
2296
- style: { "--fibo-i": String(s) }
2307
+ style: { "--fibo-i": String(r) }
2297
2308
  },
2298
2309
  e
2299
2310
  )
@@ -2303,7 +2314,7 @@ class Ee {
2303
2314
  return this._childFunction;
2304
2315
  }
2305
2316
  }
2306
- const ae = /* @__PURE__ */ new Set([
2317
+ const he = /* @__PURE__ */ new Set([
2307
2318
  "$$typeof",
2308
2319
  "type",
2309
2320
  "props",
@@ -2316,91 +2327,91 @@ const ae = /* @__PURE__ */ new Set([
2316
2327
  "_debugTask",
2317
2328
  "_debugInfo"
2318
2329
  ]);
2319
- function ce(r) {
2330
+ function ue(s) {
2320
2331
  var e;
2321
- const t = (e = r._props) == null ? void 0 : e.key;
2332
+ const t = (e = s._props) == null ? void 0 : e.key;
2322
2333
  if (!(t == null || t === ""))
2323
2334
  return t;
2324
2335
  }
2325
- function le(r) {
2326
- const t = r._isObserver, e = r._signals, s = r._observers, o = r._state, i = r._providers, n = ce(r), a = () => {
2336
+ function fe(s) {
2337
+ const t = s._isObserver, e = s._signals, r = s._observers, o = s._state, i = s._providers, n = ue(s), a = () => {
2327
2338
  var S;
2328
- let m = r.build();
2329
- const p = r._animatedProps, y = r._animationConfig;
2330
- p && p.size > 0 && (m = g.createElement(ee, {
2339
+ let m = s.build();
2340
+ const p = s._animatedProps, y = s._animationConfig;
2341
+ p && p.size > 0 && (m = g.createElement(oe, {
2331
2342
  key: n,
2332
2343
  animatedProps: p,
2333
2344
  animationConfig: y,
2334
2345
  children: m
2335
2346
  }));
2336
- const b = r._reveal;
2337
- b && (m = g.createElement(oe, {
2347
+ const b = s._reveal;
2348
+ b && (m = g.createElement(ae, {
2338
2349
  key: n,
2339
2350
  preset: b.preset,
2340
2351
  once: b.once,
2341
2352
  rootMargin: b.rootMargin,
2342
2353
  threshold: b.threshold,
2343
- forceMotion: r._reducedMotion === "never",
2344
- preferTimeline: (S = r._classNames) == null ? void 0 : S.includes("fibo-view-timeline"),
2354
+ forceMotion: s._reducedMotion === "never",
2355
+ preferTimeline: (S = s._classNames) == null ? void 0 : S.includes("fibo-view-timeline"),
2345
2356
  children: m
2346
- })), r._scrollProgress && (m = g.createElement(ie, { key: n, children: m })), r._usesCssMotion && (m = g.createElement(
2357
+ })), s._scrollProgress && (m = g.createElement(le, { key: n, children: m })), s._usesCssMotion && (m = g.createElement(
2347
2358
  g.Fragment,
2348
2359
  { key: n },
2349
- g.createElement(Ot),
2360
+ g.createElement(Xt),
2350
2361
  m
2351
2362
  ));
2352
- const x = r._gesture;
2363
+ const x = s._gesture;
2353
2364
  return x && (m = x.wrap(m)), m;
2354
- }, l = typeof r.hasStateManagement == "function" ? r.hasStateManagement() : !!(t || e && e.size || s && s.size || o && o.size || i && i.size), d = t ? g.createElement(Nt, {
2365
+ }, c = typeof s.hasStateManagement == "function" ? s.hasStateManagement() : !!(t || e && e.size || r && r.size || o && o.size || i && i.size), d = t ? g.createElement(Tt, {
2355
2366
  key: n,
2356
2367
  children: a
2357
2368
  }) : null, h = () => d ?? a();
2358
2369
  let f = h();
2359
- return l && e && e.size > 0 ? f = g.createElement(It, {
2370
+ return c && e && e.size > 0 ? f = g.createElement(jt, {
2360
2371
  key: n,
2361
2372
  signals: e,
2362
2373
  children: h
2363
- }) : l && s && s.size > 0 && (f = g.createElement(Tt, {
2374
+ }) : c && r && r.size > 0 && (f = g.createElement(zt, {
2364
2375
  key: n,
2365
- observables: s,
2376
+ observables: r,
2366
2377
  children: h
2367
- })), l && o && o.size > 0 && (f = g.createElement(Mt, {
2378
+ })), c && o && o.size > 0 && (f = g.createElement(Rt, {
2368
2379
  key: n,
2369
2380
  stateMap: o,
2370
2381
  children: f
2371
- })), l && i && i.size > 0 && (f = g.createElement(Rt, {
2382
+ })), c && i && i.size > 0 && (f = g.createElement(At, {
2372
2383
  key: n,
2373
2384
  providers: i,
2374
2385
  children: f
2375
2386
  })), f;
2376
2387
  }
2377
- function ut(r, t, e) {
2378
- const s = function() {
2388
+ function ut(s, t, e) {
2389
+ const r = function() {
2379
2390
  return t();
2380
2391
  };
2381
- s.displayName = e;
2382
- const o = g.createElement(s);
2383
- Object.defineProperty(r, "$$typeof", {
2392
+ r.displayName = e;
2393
+ const o = g.createElement(r);
2394
+ Object.defineProperty(s, "$$typeof", {
2384
2395
  value: o.$$typeof,
2385
2396
  enumerable: !0,
2386
2397
  configurable: !0
2387
- }), Object.defineProperty(r, "type", {
2388
- value: s,
2398
+ }), Object.defineProperty(s, "type", {
2399
+ value: r,
2389
2400
  enumerable: !0,
2390
2401
  configurable: !0,
2391
2402
  writable: !0
2392
- }), r.ref = o.ref ?? null, r.__fiboElementProps = o.props ?? {}, o._owner !== void 0 && (r._owner = o._owner), r._store = { validated: 1 };
2403
+ }), s.ref = o.ref ?? null, s.__fiboElementProps = o.props ?? {}, o._owner !== void 0 && (s._owner = o._owner), s._store = { validated: 1 };
2393
2404
  }
2394
- function Me(r) {
2405
+ function ze(s) {
2395
2406
  return (...t) => {
2396
- const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo", o = () => le(e);
2397
- return ut(e, o, s), new Proxy(e, {
2407
+ const e = new s(...t), r = s.name.replace(/Builder$/, "") || "Fibo", o = () => fe(e);
2408
+ return ut(e, o, r), new Proxy(e, {
2398
2409
  get(i, n, a) {
2399
- var l, d;
2410
+ var c, d;
2400
2411
  if (n === "build")
2401
2412
  return o;
2402
2413
  if (n === "key") {
2403
- const h = (l = i._props) == null ? void 0 : l.key;
2414
+ const h = (c = i._props) == null ? void 0 : c.key;
2404
2415
  if (h != null && h !== "")
2405
2416
  return String(h);
2406
2417
  if (!i.__fiboKeyFn) {
@@ -2416,7 +2427,7 @@ function Me(r) {
2416
2427
  }, m = Object.getPrototypeOf(i).props;
2417
2428
  return typeof m == "function" ? Object.assign((y) => (m.call(i, y), a), f) : f;
2418
2429
  }
2419
- return ae.has(n) || Reflect.has(i, n) ? Reflect.get(i, n, a) : (h) => {
2430
+ return he.has(n) || Reflect.has(i, n) ? Reflect.get(i, n, a) : (h) => {
2420
2431
  const f = n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), p = ["opacity", "z-index", "flex", "flex-grow", "flex-shrink", "order", "font-weight", "line-height"].includes(f), y = typeof h == "number" && !p ? `${h}px` : String(h), b = u.register(f, y);
2421
2432
  return i.className(b), a;
2422
2433
  };
@@ -2424,24 +2435,24 @@ function Me(r) {
2424
2435
  });
2425
2436
  };
2426
2437
  }
2427
- const he = ({
2428
- signal: r,
2438
+ const de = ({
2439
+ signal: s,
2429
2440
  builder: t,
2430
2441
  loading: e,
2431
- error: s
2442
+ error: r
2432
2443
  }) => {
2433
2444
  const o = g.useSyncExternalStore(
2434
- g.useCallback((a) => r.subscribe ? r.subscribe(a) : () => {
2435
- }, [r]),
2436
- () => r.value
2445
+ g.useCallback((a) => s.subscribe ? s.subscribe(a) : () => {
2446
+ }, [s]),
2447
+ () => s.value
2437
2448
  ), i = o == null ? void 0 : o.error;
2438
- return i && s ? s(i) : ((o == null ? void 0 : o.isLoading) || (o == null ? void 0 : o.loading)) === !0 && e ? e() : t ? t(o) : null;
2439
- }, ue = g.memo(he);
2440
- class fe {
2449
+ return i && r ? r(i) : ((o == null ? void 0 : o.isLoading) || (o == null ? void 0 : o.loading)) === !0 && e ? e() : t ? t(o) : null;
2450
+ }, me = g.memo(de);
2451
+ class pe {
2441
2452
  constructor(t) {
2442
- c(this, "_loading");
2443
- c(this, "_error");
2444
- c(this, "_builder");
2453
+ l(this, "_loading");
2454
+ l(this, "_error");
2455
+ l(this, "_builder");
2445
2456
  this._signal = t, ut(this, () => this.build(), "ValueBuilder");
2446
2457
  }
2447
2458
  loading(t) {
@@ -2457,7 +2468,7 @@ class fe {
2457
2468
  return this._builder = t, this;
2458
2469
  }
2459
2470
  build() {
2460
- return g.createElement(ue, {
2471
+ return g.createElement(me, {
2461
2472
  signal: this._signal,
2462
2473
  builder: this._builder,
2463
2474
  loading: this._loading,
@@ -2465,53 +2476,53 @@ class fe {
2465
2476
  });
2466
2477
  }
2467
2478
  }
2468
- function Te(r) {
2469
- return new fe(r);
2479
+ function je(s) {
2480
+ return new pe(s);
2470
2481
  }
2471
2482
  export {
2472
- Bt as A,
2473
- Mt as B,
2474
- $t as C,
2475
- zt as D,
2476
- _t as E,
2477
- ve as F,
2478
- jt as G,
2479
- At as H,
2483
+ Ht as A,
2484
+ Rt as B,
2485
+ vt as C,
2486
+ Dt as D,
2487
+ wt as E,
2488
+ Me as F,
2489
+ Ft as G,
2490
+ Lt as H,
2480
2491
  K as I,
2481
2492
  q as J,
2482
- F as K,
2493
+ P as K,
2483
2494
  at as L,
2484
2495
  U as M,
2485
- Ht as N,
2486
- wt as O,
2487
- Rt as P,
2488
- _e as R,
2496
+ Yt as N,
2497
+ Ct as O,
2498
+ At as P,
2499
+ Se as R,
2489
2500
  R as S,
2490
- Te as V,
2491
- ke as a,
2501
+ je as V,
2502
+ we as a,
2492
2503
  tt as b,
2493
- be as c,
2494
- Nt as d,
2495
- $e as e,
2496
- oe as f,
2504
+ xe as c,
2505
+ Tt as d,
2506
+ Ce as e,
2507
+ ae as f,
2497
2508
  et as g,
2498
- ie as h,
2499
- Ce as i,
2500
- Ne as j,
2501
- se as k,
2502
- re as l,
2509
+ le as h,
2510
+ Te as i,
2511
+ Ie as j,
2512
+ ie as k,
2513
+ ne as l,
2503
2514
  it as m,
2504
2515
  v as n,
2505
- ye as o,
2506
- Ot as p,
2507
- we as q,
2508
- kt as r,
2509
- ge as s,
2516
+ $e as o,
2517
+ Xt as p,
2518
+ Ne as q,
2519
+ $t as r,
2520
+ _e as s,
2510
2521
  nt as t,
2511
- xe as u,
2512
- Se as v,
2513
- Me as w,
2514
- Ee as x,
2515
- Ct as y,
2522
+ ve as u,
2523
+ Ee as v,
2524
+ ze as w,
2525
+ Re as x,
2526
+ Mt as y,
2516
2527
  _ as z
2517
2528
  };