fiboui 2.2.0 → 2.2.3

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,37 +1,37 @@
1
1
  "use client";
2
- var yt = Object.defineProperty;
3
- var _t = (r, t, e) => t in r ? yt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
4
- var c = (r, t, e) => _t(r, typeof t != "symbol" ? t + "" : t, e);
5
- import g, { useRef as w, createContext as P, useContext as O, useCallback as E, useSyncExternalStore as I, useEffect as j, useState as q, memo as kt, cloneElement as Z } from "react";
6
- import { jsx as v, Fragment as B } from "react/jsx-runtime";
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 O, useCallback as E, useSyncExternalStore as B, useEffect as A, useState as q, cloneElement as yt } from "react";
6
+ import { jsx as C, Fragment as W } from "react/jsx-runtime";
7
7
  class J {
8
8
  constructor() {
9
9
  c(this, "activeEffect", null);
10
10
  }
11
11
  }
12
- const Q = new J(), R = [Q];
12
+ const Q = new J(), z = [Q];
13
13
  function tt() {
14
14
  return new J();
15
15
  }
16
16
  function et() {
17
- return R[R.length - 1] ?? Q;
17
+ return z[z.length - 1] ?? Q;
18
18
  }
19
- function A() {
19
+ function D() {
20
20
  return et().activeEffect;
21
21
  }
22
- function xt(r, t) {
23
- R.push(r);
22
+ function kt(r, t) {
23
+ z.push(r);
24
24
  try {
25
25
  return t();
26
26
  } finally {
27
- R.pop();
27
+ z.pop();
28
28
  }
29
29
  }
30
30
  function M(r) {
31
31
  const t = et(), e = t.activeEffect;
32
32
  return t.activeEffect = r, e;
33
33
  }
34
- class wt {
34
+ class _t {
35
35
  constructor(t) {
36
36
  c(this, "dependencies", /* @__PURE__ */ new Set());
37
37
  c(this, "_onDispose");
@@ -59,7 +59,7 @@ class wt {
59
59
  this.cleanup(), (t = this._onDispose) == null || t.call(this);
60
60
  }
61
61
  }
62
- class $t {
62
+ class xt {
63
63
  constructor(t) {
64
64
  c(this, "dependencies", /* @__PURE__ */ new Set());
65
65
  this._onInvalidate = t;
@@ -85,14 +85,14 @@ class $t {
85
85
  this.cleanup();
86
86
  }
87
87
  }
88
- class z {
88
+ class R {
89
89
  constructor(t) {
90
90
  c(this, "listeners", /* @__PURE__ */ new Set());
91
91
  c(this, "effects", /* @__PURE__ */ new Set());
92
92
  this._value = t;
93
93
  }
94
94
  get value() {
95
- const t = A();
95
+ const t = D();
96
96
  return t && t.track(this), this._value;
97
97
  }
98
98
  set value(t) {
@@ -112,22 +112,22 @@ class z {
112
112
  t.forEach((s) => s.trigger()), e.forEach((s) => s(this._value));
113
113
  }
114
114
  }
115
- function ye(r) {
116
- return new z(r);
115
+ function ge(r) {
116
+ return new R(r);
117
117
  }
118
- class St {
118
+ class $t {
119
119
  constructor(t) {
120
120
  c(this, "listeners", /* @__PURE__ */ new Set());
121
121
  c(this, "effects", /* @__PURE__ */ new Set());
122
122
  c(this, "_value");
123
123
  c(this, "_dirty", !0);
124
124
  c(this, "internalEffect");
125
- this.fn = t, this.internalEffect = new wt(() => {
125
+ this.fn = t, this.internalEffect = new _t(() => {
126
126
  this._dirty || (this._dirty = !0, this.notify());
127
127
  });
128
128
  }
129
129
  get value() {
130
- const t = A();
130
+ const t = D();
131
131
  if (t && t.track(this), this._dirty) {
132
132
  const e = M(this.internalEffect);
133
133
  try {
@@ -152,17 +152,17 @@ class St {
152
152
  t.forEach((s) => s.trigger()), e.forEach((s) => s(this._value));
153
153
  }
154
154
  }
155
- function _e(r) {
156
- return new St(r);
155
+ function be(r) {
156
+ return new $t(r);
157
157
  }
158
- class Nt {
158
+ class wt {
159
159
  constructor(t) {
160
160
  c(this, "listeners", /* @__PURE__ */ new Set());
161
161
  c(this, "effects", /* @__PURE__ */ new Set());
162
162
  this._value = t;
163
163
  }
164
164
  get() {
165
- const t = A();
165
+ const t = D();
166
166
  return t && t.track(this), this._value;
167
167
  }
168
168
  set(t) {
@@ -181,22 +181,22 @@ class Nt {
181
181
  Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this._value));
182
182
  }
183
183
  }
184
- function ke(r) {
185
- return new Nt(r);
184
+ function ye(r) {
185
+ return new wt(r);
186
186
  }
187
- class vt {
187
+ class St {
188
188
  constructor(t) {
189
189
  c(this, "listeners", /* @__PURE__ */ new Set());
190
190
  c(this, "effects", /* @__PURE__ */ new Set());
191
191
  this.state = t;
192
192
  }
193
193
  getState() {
194
- const t = A();
194
+ const t = D();
195
195
  return t && t.track(this), this.state;
196
196
  }
197
197
  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());
198
+ const e = typeof t == "function" ? t(this.state) : t, s = { ...this.state, ...e }, i = Object.keys(this.state), o = Object.keys(s);
199
+ i.length === o.length && o.every((a) => Object.is(s[a], this.state[a])) || (this.state = s, this.notify());
200
200
  }
201
201
  subscribe(t) {
202
202
  return this.listeners.add(t), () => this.listeners.delete(t);
@@ -211,115 +211,112 @@ class vt {
211
211
  Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this.state));
212
212
  }
213
213
  }
214
- function xe(r) {
215
- return new vt(r);
214
+ function ke(r) {
215
+ return new St(r);
216
216
  }
217
- const Ct = tt(), st = P(Ct);
218
- function Et() {
217
+ const vt = tt(), st = j(vt);
218
+ function Ct() {
219
219
  return O(st);
220
220
  }
221
- function we({ children: r, scope: t }) {
221
+ function _e({ children: r, scope: t }) {
222
222
  const e = w(t ?? tt()).current;
223
- return /* @__PURE__ */ v(st.Provider, { value: e, children: r });
223
+ return /* @__PURE__ */ C(st.Provider, { value: e, children: r });
224
224
  }
225
- function Mt({ children: r }) {
225
+ function Nt({ children: r }) {
226
226
  const t = w(0), e = w(/* @__PURE__ */ new Set()), s = w(null);
227
- s.current || (s.current = new $t(() => {
227
+ s.current || (s.current = new xt(() => {
228
228
  t.current += 1, e.current.forEach((l) => l());
229
229
  }));
230
- const o = E((l) => (e.current.add(l), () => {
230
+ const i = E((l) => (e.current.add(l), () => {
231
231
  e.current.delete(l);
232
- }), []), i = E(() => t.current, []);
233
- I(o, i, i), j(() => () => {
232
+ }), []), o = E(() => t.current, []);
233
+ B(i, o, o), A(() => () => {
234
234
  var l;
235
235
  (l = s.current) == null || l.dispose();
236
236
  }, []);
237
- const n = Et();
237
+ const n = Ct();
238
238
  let a = null;
239
239
  try {
240
- a = xt(n, () => s.current.execute(r));
240
+ a = kt(n, () => s.current.execute(r));
241
241
  } catch {
242
242
  a = null;
243
243
  }
244
- return /* @__PURE__ */ v(B, { children: a });
244
+ return /* @__PURE__ */ C(W, { children: a });
245
245
  }
246
- const Tt = P(/* @__PURE__ */ new Map()), rt = P(null);
247
- function $e(r) {
246
+ const Et = j(/* @__PURE__ */ new Map()), rt = j(null);
247
+ function xe(r) {
248
248
  const t = O(rt);
249
249
  if (!t)
250
250
  throw new Error("useBuilderState must be used under a builder that called .state()");
251
251
  return [t.get(r), (e) => t.set(r, e)];
252
252
  }
253
- function zt({ stateMap: r = /* @__PURE__ */ new Map(), children: t }) {
254
- const [e, s] = q(() => new Map(r)), o = {
253
+ function Mt({ stateMap: r = /* @__PURE__ */ new Map(), children: t }) {
254
+ const [e, s] = q(() => new Map(r)), i = {
255
255
  map: e,
256
- get: (i) => e.get(i),
257
- set: (i, n) => {
256
+ get: (o) => e.get(o),
257
+ set: (o, n) => {
258
258
  s((a) => {
259
- if (Object.is(a.get(i), n))
259
+ if (Object.is(a.get(o), n))
260
260
  return a;
261
261
  const l = new Map(a);
262
- return l.set(i, n), l;
262
+ return l.set(o, n), l;
263
263
  });
264
264
  }
265
265
  };
266
- return /* @__PURE__ */ v(rt.Provider, { value: o, children: /* @__PURE__ */ v(Tt.Provider, { value: e, children: t }) });
266
+ return /* @__PURE__ */ C(rt.Provider, { value: i, children: /* @__PURE__ */ C(Et.Provider, { value: e, children: t }) });
267
267
  }
268
- function It({ observables: r, children: t }) {
269
- const e = w(0), s = E((i) => {
268
+ function Tt({ observables: r, children: t }) {
269
+ const e = w(0), s = E((o) => {
270
270
  const n = Array.from(r).map(
271
271
  (a) => a.subscribe(() => {
272
- e.current += 1, i();
272
+ e.current += 1, o();
273
273
  })
274
274
  );
275
275
  return () => n.forEach((a) => a());
276
- }, [r]), o = E(() => e.current, []);
277
- return I(s, o, o), /* @__PURE__ */ v(B, { children: typeof t == "function" ? t() : t });
276
+ }, [r]), i = E(() => e.current, []);
277
+ return B(s, i, i), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
278
278
  }
279
- function Rt({ signals: r, children: t }) {
280
- const e = w(0), s = E((i) => {
279
+ function It({ signals: r, children: t }) {
280
+ const e = w(0), s = E((o) => {
281
281
  const n = Array.from(r).map(
282
282
  (a) => a.subscribe(() => {
283
- e.current += 1, i();
283
+ e.current += 1, o();
284
284
  })
285
285
  );
286
286
  return () => n.forEach((a) => a());
287
- }, [r]), o = E(() => e.current, []);
288
- return I(s, o, o), /* @__PURE__ */ v(B, { children: typeof t == "function" ? t() : t });
287
+ }, [r]), i = E(() => e.current, []);
288
+ return B(s, i, i), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
289
289
  }
290
- const ot = P(/* @__PURE__ */ new Map());
291
- function Se(r) {
290
+ const ot = j(/* @__PURE__ */ new Map());
291
+ function $e(r) {
292
292
  const t = O(ot);
293
293
  return t == null ? void 0 : t.get(r);
294
294
  }
295
- function Pt({ providers: r = /* @__PURE__ */ new Map(), children: t }) {
296
- return /* @__PURE__ */ v(ot.Provider, { value: r, children: t });
295
+ function Rt({ providers: r = /* @__PURE__ */ new Map(), children: t }) {
296
+ return /* @__PURE__ */ C(ot.Provider, { value: r, children: t });
297
297
  }
298
- function jt(r) {
298
+ function zt(r) {
299
299
  return !!r && typeof r == "object" && "build" in r && typeof r.build == "function";
300
300
  }
301
- function At(r) {
302
- return g.isValidElement(r) ? r : jt(r) ? r.build() : r;
301
+ function jt(r) {
302
+ return g.isValidElement(r) ? r : zt(r) ? r.build() : r;
303
303
  }
304
304
  function H(r) {
305
+ return typeof r == "string" || typeof r == "number";
306
+ }
307
+ function At(r, t) {
308
+ return g.isValidElement(r) && H(r.key) && r.key !== "" ? r.key : `.$fibo-${t}`;
309
+ }
310
+ function Dt(r, t) {
311
+ return !g.isValidElement(r) || H(r.key) && r.key !== "" ? r : g.cloneElement(r, { key: At(r, t) });
312
+ }
313
+ function K(r) {
305
314
  if (r == null)
306
315
  return [];
307
316
  const t = typeof r == "function" ? r() : r;
308
- return (Array.isArray(t) ? t : [t]).map(At);
309
- }
310
- function Vt(r, t, e) {
311
- if (!t) return r;
312
- const s = e ?? (typeof window < "u" ? window.innerWidth : void 0);
313
- if (s === void 0)
314
- return r;
315
- let o = { ...r };
316
- return s < 768 && t.mobile ? o = { ...o, ...t.mobile } : s >= 768 && s < 1024 && t.tablet ? o = { ...o, ...t.tablet } : s >= 1024 && t.desktop && (o = { ...o, ...t.desktop }), o;
317
- }
318
- function Ne(r, t) {
319
- const e = kt(r, t);
320
- return (s) => g.createElement(e, s);
317
+ return (Array.isArray(t) ? t : [t]).map((s, i) => Dt(jt(s), i));
321
318
  }
322
- const Y = /* @__PURE__ */ new Map(), Dt = {
319
+ const Y = /* @__PURE__ */ new Map(), Lt = {
323
320
  easeIn: "ease-in",
324
321
  easeOut: "ease-out",
325
322
  easeInOut: "ease-in-out",
@@ -327,26 +324,26 @@ const Y = /* @__PURE__ */ new Map(), Dt = {
327
324
  ease: "ease"
328
325
  };
329
326
  function it(r = {}) {
330
- const t = r.stiffness ?? 170, e = r.damping ?? 26, s = r.mass ?? 1, o = `${t}:${e}:${s}`, i = Y.get(o);
331
- if (i) return i;
327
+ const t = r.stiffness ?? 170, e = r.damping ?? 26, s = r.mass ?? 1, i = `${t}:${e}:${s}`, o = Y.get(i);
328
+ if (o) return o;
332
329
  const n = 1 / 60, a = 1;
333
- let l = 0, h = 0;
334
- const f = [0];
330
+ let l = 0, d = 0;
331
+ const h = [0];
335
332
  for (let b = 0; b < 180; b += 1) {
336
- const k = -t * (l - a) - e * h;
337
- if (h += k / s * n, l += h * n, f.push(l), b > 8 && Math.abs(l - a) < 2e-3 && Math.abs(h) < 2e-3) break;
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;
338
335
  }
339
- f[f.length - 1] !== 1 && f.push(1);
340
- const m = Math.max(1, Math.floor((f.length - 1) / 24)), p = [];
341
- for (let b = 0; b < f.length; b += m) {
342
- const k = b / (f.length - 1), $ = Math.round(f[b] * 1e4) / 1e4;
343
- p.push(b === 0 ? `${$}` : `${$} ${Math.round(k * 1e4) / 100}%`);
336
+ h[h.length - 1] !== 1 && h.push(1);
337
+ const m = Math.max(1, Math.floor((h.length - 1) / 24)), p = [];
338
+ for (let b = 0; b < h.length; b += m) {
339
+ const x = b / (h.length - 1), S = Math.round(h[b] * 1e4) / 1e4;
340
+ p.push(b === 0 ? `${S}` : `${S} ${Math.round(x * 1e4) / 100}%`);
344
341
  }
345
342
  const y = `linear(${p.join(", ")})`;
346
- return Y.set(o, y), y;
343
+ return Y.set(i, y), y;
347
344
  }
348
- function N(r, t) {
349
- return r === "spring" ? it(t) : Dt[r] ?? r;
345
+ function v(r, t) {
346
+ return r === "spring" ? it(t) : Lt[r] ?? r;
350
347
  }
351
348
  const U = [
352
349
  "fadeIn",
@@ -364,30 +361,30 @@ const U = [
364
361
  "blur",
365
362
  "pop",
366
363
  "bounce"
367
- ], Lt = {
364
+ ], Vt = {
368
365
  fade: "fadeIn",
369
366
  scale: "scaleIn",
370
367
  blur: "blurIn"
371
368
  };
372
- function Ft(r) {
369
+ function Pt(r) {
373
370
  if (!r || typeof r != "object") return !1;
374
371
  const t = r;
375
372
  return typeof t.from == "object" && t.from !== null && typeof t.to == "object" && t.to !== null;
376
373
  }
377
- function K(r) {
374
+ function G(r) {
378
375
  const t = /* @__PURE__ */ new Set(["opacity", "zIndex", "z-index", "flex", "fontWeight", "lineHeight"]);
379
376
  return Object.entries(r).map(([e, s]) => {
380
- const o = e.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), i = typeof s == "number" && !t.has(e) ? `${s}px` : String(s);
381
- return `${o}: ${i}`;
377
+ const i = e.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), o = typeof s == "number" && !t.has(e) ? `${s}px` : String(s);
378
+ return `${i}: ${o}`;
382
379
  }).join("; ");
383
380
  }
384
- function Wt(r) {
381
+ function Ft(r) {
385
382
  let t = 5381;
386
383
  for (let e = 0; e < r.length; e += 1) t = (t << 5) + t ^ r.charCodeAt(e);
387
384
  return (t >>> 0).toString(36);
388
385
  }
389
386
  function Ot(r) {
390
- const t = Lt[r] ?? r;
387
+ const t = Vt[r] ?? r;
391
388
  if (!U.includes(t))
392
389
  throw new Error(`Unknown motion preset "${r}". Use: ${U.join(", ")}`);
393
390
  return t;
@@ -466,6 +463,8 @@ const F = `
466
463
  .fibo-stagger-item { display: contents; }
467
464
 
468
465
  .fibo-reveal {
466
+ min-width: 0;
467
+ max-width: 100%;
469
468
  opacity: 0;
470
469
  transform: translate3d(0, 12px, 0);
471
470
  transition-property: opacity, transform, filter;
@@ -531,53 +530,76 @@ const F = `
531
530
  filter: none !important;
532
531
  }
533
532
  }
534
- `.trim(), S = class S {
533
+ `.trim();
534
+ function Z(r) {
535
+ let t = 5381;
536
+ for (let e = 0; e < r.length; e += 1)
537
+ t = (t << 5) + t ^ r.charCodeAt(e);
538
+ return (t >>> 0).toString(36);
539
+ }
540
+ const $ = class $ {
535
541
  constructor() {
536
542
  c(this, "sheet", null);
537
543
  c(this, "cache", /* @__PURE__ */ new Map());
538
544
  c(this, "extras", []);
539
545
  c(this, "defaultsReady", !1);
540
- typeof document < "u" && (this.sheet = document.createElement("style"), this.sheet.id = "fibo-dynamic-styles", document.head.appendChild(this.sheet)), this.ensureDefaults();
546
+ this.attachSheet(), this.ensureDefaults();
541
547
  }
542
548
  static getInstance() {
543
- return S.instance || (S.instance = new S()), S.instance;
549
+ return $.instance || ($.instance = new $()), $.instance;
550
+ }
551
+ /** Test-only: empty cache/sheet so a simulated client starts cold. */
552
+ reset() {
553
+ this.cache.clear(), this.extras = [], this.defaultsReady = !1, this.sheet = null, this.attachSheet(), this.ensureDefaults();
554
+ }
555
+ static resetForTests() {
556
+ $.getInstance().reset();
557
+ }
558
+ attachSheet() {
559
+ if (typeof document > "u") return;
560
+ const t = document.getElementById("fibo-dynamic-styles");
561
+ if (t) {
562
+ this.sheet = t, this.defaultsReady = !0;
563
+ return;
564
+ }
565
+ this.sheet = document.createElement("style"), this.sheet.id = "fibo-dynamic-styles", this.sheet.setAttribute("data-fibo", "1"), document.head.appendChild(this.sheet);
544
566
  }
545
567
  /**
546
- * CSS `@media` rule, deduped. Used by `.media()` / `.md()` — not JS resize.
568
+ * CSS `@media` rule, deduped. Used by `.media()` / `.md()` / `.responsive()` — not JS resize.
547
569
  */
548
570
  registerMedia(t, e, s) {
549
- const o = `@media ${t}|${e}:${s}`;
550
- if (this.cache.has(o))
551
- return this.cache.get(o);
552
- const i = `fibo-mq-${Bt(o)}`, n = `@media ${t} { .${i} { ${e}: ${s} !important; } }`;
553
- return this.insert(n), this.cache.set(o, i), i;
571
+ const i = `@media ${t}|${e}:${s}`;
572
+ if (this.cache.has(i))
573
+ return this.cache.get(i);
574
+ const o = `fibo-mq-${Z(i)}`, n = `@media ${t} { .${o} { ${e}: ${s} !important; } }`;
575
+ return this.insert(n), this.cache.set(i, o), o;
554
576
  }
555
577
  ensureDefaults() {
556
578
  var t;
557
579
  this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((t = this.sheet.textContent) != null && t.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(F)));
558
580
  }
559
581
  getCss() {
560
- var e;
561
582
  this.ensureDefaults();
562
- const t = (e = this.sheet) != null && e.sheet ? Array.from(this.sheet.sheet.cssRules).map((s) => s.cssText).join(`
563
- `) : "";
564
- return [F, ...this.extras, t].filter(Boolean).join(`
583
+ const t = [...this.extras].sort();
584
+ return [F, ...t].filter(Boolean).join(`
565
585
  `);
566
586
  }
567
587
  registerKeyframes(t, e, s) {
568
- const o = `kf:${e}=>${s}`;
569
- if (this.cache.has(o)) return this.cache.get(o);
570
- const i = `fibo-c-${t}`;
571
- return this.insert(`@keyframes ${i} { from { ${e} } to { ${s} } }`), this.insert(`.${i} { animation-name: ${i}; }`), this.cache.set(o, i), i;
588
+ const i = `kf:${e}=>${s}`;
589
+ if (this.cache.has(i)) return this.cache.get(i);
590
+ const o = `fibo-c-${t}`;
591
+ return this.insert(`@keyframes ${o} { from { ${e} } to { ${s} } }`), this.insert(`.${o} { animation-name: ${o}; }`), this.cache.set(i, o), o;
572
592
  }
573
593
  insert(t, e = !0) {
574
- if (e && this.extras.push(t), this.sheet && this.sheet.sheet)
575
- try {
576
- this.sheet.sheet.insertRule(t, this.sheet.sheet.cssRules.length);
577
- } catch {
578
- this.sheet && this.sheet.appendChild(document.createTextNode(t));
579
- }
580
- else this.sheet && this.sheet.appendChild(document.createTextNode(t));
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)))))
596
+ if (this.sheet && this.sheet.sheet)
597
+ try {
598
+ this.sheet.sheet.insertRule(t, this.sheet.sheet.cssRules.length);
599
+ } catch {
600
+ this.sheet && this.sheet.appendChild(document.createTextNode(t));
601
+ }
602
+ else this.sheet && this.sheet.appendChild(document.createTextNode(t));
581
603
  }
582
604
  /** Set a `:root` custom property (e.g. `--fibo-sticky-offset`). */
583
605
  registerRoot(t, e) {
@@ -593,110 +615,118 @@ const F = `
593
615
  const s = `${t}:${e}`;
594
616
  if (this.cache.has(s))
595
617
  return this.cache.get(s);
596
- const o = e.replace(/[^a-zA-Z0-9-]/g, "_"), i = `fibo-${t}-${o}`, n = `.${i} { ${t}: ${e} !important; }`;
597
- return this.insert(n), this.cache.set(s, i), i;
618
+ const i = e.replace(/[^a-zA-Z0-9-]/g, "_"), o = `fibo-${t}-${i}`, n = `.${o} { ${t}: ${e} !important; }`;
619
+ return this.insert(n), this.cache.set(s, o), o;
598
620
  }
599
- registerPseudo(t, e, s, o) {
600
- const i = `${t}:${e}:${s}:${o}`;
601
- if (this.cache.has(i))
602
- return t;
603
- const n = `.${t}:${e} { ${s}: ${o} !important; }`;
604
- return this.insert(n), this.cache.set(i, t), t;
621
+ /**
622
+ * One class per (pseudo, property, value). Same rules → same class on server and client.
623
+ * Order-independent: each declaration hashes on its own.
624
+ */
625
+ registerPseudo(t, e, s, i = !1) {
626
+ const o = `${i ? "group:" : ""}${t}:${e}:${s}`;
627
+ if (this.cache.has(o))
628
+ return this.cache.get(o);
629
+ const n = `fibo-ps-${Z(o)}`, a = i ? `.group:${t} .${n} { ${e}: ${s} !important; }` : `.${n}:${t} { ${e}: ${s} !important; }`;
630
+ return this.insert(a), this.cache.set(o, n), n;
605
631
  }
606
- registerGroupPseudo(t, e, s, o) {
607
- const i = `group:${t}:${e}:${s}:${o}`;
608
- if (this.cache.has(i))
609
- return t;
610
- const n = `.group:${e} .${t} { ${s}: ${o} !important; }`;
611
- return this.insert(n), this.cache.set(i, t), t;
632
+ registerGroupPseudo(t, e, s, i) {
633
+ return this.registerPseudo(e, s, i, !0);
612
634
  }
613
635
  };
614
- c(S, "instance");
615
- let W = S;
616
- function Bt(r) {
617
- let t = 5381;
618
- for (let e = 0; e < r.length; e += 1)
619
- t = (t << 5) + t ^ r.charCodeAt(e);
620
- return (t >>> 0).toString(36);
636
+ c($, "instance");
637
+ let T = $;
638
+ const f = T.getInstance();
639
+ function _() {
640
+ T.getInstance().ensureDefaults();
641
+ }
642
+ function we() {
643
+ return T.getInstance().getCss();
621
644
  }
622
- const u = W.getInstance();
623
- function x() {
624
- u.ensureDefaults();
645
+ function nt() {
646
+ return T.getInstance().getCss();
647
+ }
648
+ function Se() {
649
+ return `<style id="fibo-dynamic-styles" data-fibo="1">${nt().replace(/<\/style/gi, "<\\/style")}</style>`;
625
650
  }
626
651
  function ve() {
627
- return u.getCss();
652
+ return _(), g.createElement("style", {
653
+ id: "fibo-dynamic-styles",
654
+ "data-fibo": "1",
655
+ suppressHydrationWarning: !0,
656
+ dangerouslySetInnerHTML: { __html: nt() }
657
+ });
628
658
  }
629
- function Xt() {
630
- return x(), g.createElement("style", {
659
+ function Bt() {
660
+ return _(), g.createElement("style", {
631
661
  id: "fibo-motion-presets",
632
662
  "data-fibo-motion": "1",
633
663
  dangerouslySetInnerHTML: { __html: F }
634
664
  });
635
665
  }
636
- const nt = {
666
+ const at = {
637
667
  sm: 640,
638
668
  md: 768,
639
669
  lg: 1024,
640
670
  xl: 1280
641
671
  };
642
- function Ht(r) {
643
- return r in nt;
672
+ function Wt(r) {
673
+ return r in at;
644
674
  }
645
- function Yt(r) {
646
- if (Ht(r))
647
- return `(min-width: ${nt[r]}px)`;
675
+ function Ht(r) {
676
+ if (Wt(r))
677
+ return `(min-width: ${at[r]}px)`;
648
678
  const t = r.trim();
649
679
  return t.startsWith("@media") ? t.replace(/^@media\s+/, "") : t;
650
680
  }
651
- function at(r) {
681
+ function ct(r) {
652
682
  var t, e, s = "";
653
683
  if (typeof r == "string" || typeof r == "number") s += r;
654
684
  else if (typeof r == "object") if (Array.isArray(r)) {
655
- var o = r.length;
656
- for (t = 0; t < o; t++) r[t] && (e = at(r[t])) && (s && (s += " "), s += e);
685
+ var i = r.length;
686
+ for (t = 0; t < i; t++) r[t] && (e = ct(r[t])) && (s && (s += " "), s += e);
657
687
  } else for (e in r) r[e] && (s && (s += " "), s += e);
658
688
  return s;
659
689
  }
660
- function Ut() {
661
- for (var r, t, e = 0, s = "", o = arguments.length; e < o; e++) (r = arguments[e]) && (t = at(r)) && (s && (s += " "), s += t);
690
+ function Xt() {
691
+ for (var r, t, e = 0, s = "", i = arguments.length; e < i; e++) (r = arguments[e]) && (t = ct(r)) && (s && (s += " "), s += t);
662
692
  return s;
663
693
  }
664
694
  function Kt(r) {
665
695
  const t = r.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
666
696
  if (!t)
667
697
  return r;
668
- const [, e, s, o] = t, i = parseFloat(e), n = parseFloat(s), a = parseFloat(o), l = n * Math.cos(a * Math.PI / 180), h = n * Math.sin(a * Math.PI / 180), f = i + 0.3963377774 * l + 0.2158037573 * h, d = i - 0.1055613458 * l - 0.0638541728 * h, m = i - 0.0894841775 * l - 1.291485548 * h, p = f * f * f, y = d * d * d, b = m * m * m, k = 4.0767416621 * p - 3.3077115913 * y + 0.2309699292 * b, $ = -1.2684380046 * p + 2.6097574011 * y - 0.3413193965 * b, mt = -0.0041960863 * p - 0.7034186147 * y + 1.707614701 * b, V = (T) => T >= 31308e-7 ? 1.055 * T ** (1 / 2.4) - 0.055 : 12.92 * T, pt = Math.max(0, Math.min(1, V(k))), gt = Math.max(0, Math.min(1, V($))), bt = Math.max(0, Math.min(1, V(mt))), D = (T) => {
698
+ const [, e, s, i] = t, o = parseFloat(e), n = parseFloat(s), a = parseFloat(i), l = n * Math.cos(a * Math.PI / 180), d = n * Math.sin(a * Math.PI / 180), h = o + 0.3963377774 * l + 0.2158037573 * d, u = o - 0.1055613458 * l - 0.0638541728 * d, m = o - 0.0894841775 * l - 1.291485548 * d, p = h * h * h, y = u * u * u, b = m * m * m, x = 4.0767416621 * p - 3.3077115913 * y + 0.2309699292 * b, S = -1.2684380046 * p + 2.6097574011 * y - 0.3413193965 * b, ut = -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(ut))), V = (I) => {
669
699
  var X;
670
- const L = (X = Math.round(T * 255).toString(16)) == null ? void 0 : X.toUpperCase();
671
- return L.length === 1 ? `0${L}` : L;
700
+ const P = (X = Math.round(I * 255).toString(16)) == null ? void 0 : X.toUpperCase();
701
+ return P.length === 1 ? `0${P}` : P;
672
702
  };
673
- return `#${D(pt)}${D(gt)}${D(bt)}`;
703
+ return `#${V(dt)}${V(mt)}${V(pt)}`;
674
704
  }
675
- function Gt(r) {
705
+ function Yt(r) {
676
706
  const t = {}, e = {}, s = r.split(`
677
707
  `);
678
- for (const o of s) {
679
- const i = o.trim();
680
- if (!i || i.startsWith("//") || i.startsWith("*") || i === "@theme {" || i === "}")
708
+ for (const i of s) {
709
+ const o = i.trim();
710
+ if (!o || o.startsWith("//") || o.startsWith("*") || o === "@theme {" || o === "}")
681
711
  continue;
682
- const n = i.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = i.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
712
+ const n = o.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = o.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
683
713
  if (n) {
684
- const [, l, h] = n, f = Kt(h);
685
- t[f.toLowerCase()] = `bg-${l}`, e[f.toLowerCase()] = `text-${l}`;
686
- } else if (a) {
687
- const [, l, h] = a;
714
+ const [, l, d] = n, h = Kt(d);
688
715
  t[h.toLowerCase()] = `bg-${l}`, e[h.toLowerCase()] = `text-${l}`;
716
+ } else if (a) {
717
+ const [, l, d] = a;
718
+ t[d.toLowerCase()] = `bg-${l}`, e[d.toLowerCase()] = `text-${l}`;
689
719
  }
690
720
  }
691
721
  return { background: t, text: e };
692
722
  }
693
- const qt = (r) => {
723
+ const Ut = (r) => {
694
724
  if (r !== void 0)
695
725
  return typeof r == "number" ? `${r}px` : r.toString();
696
- }, C = (r, t) => {
697
- const e = qt(t);
726
+ }, N = (r, t) => {
727
+ const e = Ut(t);
698
728
  return e === void 0 ? "" : `${r}-[${e}]`;
699
- }, Zt = `
729
+ }, Gt = `
700
730
  --color-red-50: oklch(0.971 0.013 17.38);
701
731
  --color-red-100: oklch(0.936 0.032 17.717);
702
732
  --color-red-200: oklch(0.885 0.062 18.334);
@@ -941,7 +971,7 @@ const qt = (r) => {
941
971
  --color-stone-950: oklch(0.147 0.004 49.25);
942
972
  --color-black: #000;
943
973
  --color-white: #fff;
944
- `, Jt = Gt(Zt), ct = {
974
+ `, Zt = Yt(Gt), lt = {
945
975
  borderRadius: {
946
976
  0: "rounded-none",
947
977
  "0px": "rounded-none",
@@ -1038,7 +1068,7 @@ const qt = (r) => {
1038
1068
  fixed: "fixed",
1039
1069
  sticky: "sticky"
1040
1070
  }
1041
- }, Qt = (r, t) => ({
1071
+ }, qt = (r, t) => ({
1042
1072
  // 背景色
1043
1073
  backgroundColor: (e) => e.backgroundColor ? [r.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
1044
1074
  // 文字色
@@ -1047,15 +1077,15 @@ const qt = (r) => {
1047
1077
  borderRadius: (e) => {
1048
1078
  if (!e.borderRadius)
1049
1079
  return [];
1050
- const s = ct.borderRadius[e.borderRadius] || C("rounded", e.borderRadius);
1080
+ const s = lt.borderRadius[e.borderRadius] || N("rounded", e.borderRadius);
1051
1081
  return s ? [s] : [];
1052
1082
  },
1053
1083
  // 外边距
1054
1084
  margin: (e) => {
1055
1085
  const s = [];
1056
1086
  if (e.margin !== void 0) {
1057
- const i = C("m", e.margin);
1058
- return i ? [i] : [];
1087
+ const o = N("m", e.margin);
1088
+ return o ? [o] : [];
1059
1089
  }
1060
1090
  return [
1061
1091
  { prop: e.marginTop, dir: "mt" },
@@ -1064,9 +1094,9 @@ const qt = (r) => {
1064
1094
  { prop: e.marginLeft, dir: "ml" },
1065
1095
  { prop: e.marginX, dir: "mx" },
1066
1096
  { prop: e.marginY, dir: "my" }
1067
- ].forEach(({ prop: i, dir: n }) => {
1068
- if (i !== void 0) {
1069
- const a = C(n, i);
1097
+ ].forEach(({ prop: o, dir: n }) => {
1098
+ if (o !== void 0) {
1099
+ const a = N(n, o);
1070
1100
  a && s.push(a);
1071
1101
  }
1072
1102
  }), s;
@@ -1075,8 +1105,8 @@ const qt = (r) => {
1075
1105
  padding: (e) => {
1076
1106
  const s = [];
1077
1107
  if (e.padding !== void 0) {
1078
- const i = C("p", e.padding);
1079
- return i ? [i] : [];
1108
+ const o = N("p", e.padding);
1109
+ return o ? [o] : [];
1080
1110
  }
1081
1111
  return [
1082
1112
  { prop: e.paddingTop, dir: "pt" },
@@ -1085,9 +1115,9 @@ const qt = (r) => {
1085
1115
  { prop: e.paddingLeft, dir: "pl" },
1086
1116
  { prop: e.paddingX, dir: "px" },
1087
1117
  { prop: e.paddingY, dir: "py" }
1088
- ].forEach(({ prop: i, dir: n }) => {
1089
- if (i !== void 0) {
1090
- const a = C(n, i);
1118
+ ].forEach(({ prop: o, dir: n }) => {
1119
+ if (o !== void 0) {
1120
+ const a = N(n, o);
1091
1121
  a && s.push(a);
1092
1122
  }
1093
1123
  }), s;
@@ -1096,28 +1126,28 @@ const qt = (r) => {
1096
1126
  font: (e) => {
1097
1127
  const s = [];
1098
1128
  if (e.fontSize && s.push(t.fontSize[e.fontSize.toString()] || `text-[${e.fontSize}]`), e.fontWeight) {
1099
- const o = t.fontWeight[e.fontWeight.toString()];
1100
- o && s.push(o);
1129
+ const i = t.fontWeight[e.fontWeight.toString()];
1130
+ i && s.push(i);
1101
1131
  }
1102
1132
  if (e.textAlign) {
1103
- const o = t.textAlign[e.textAlign];
1104
- o && s.push(o);
1133
+ const i = t.textAlign[e.textAlign];
1134
+ i && s.push(i);
1105
1135
  }
1106
1136
  if (e.fontFamily) {
1107
- const o = t.fontFamily[e.fontFamily];
1108
- o && s.push(o);
1137
+ const i = t.fontFamily[e.fontFamily];
1138
+ i && s.push(i);
1109
1139
  }
1110
1140
  if (e.textDecoration) {
1111
- const o = t.textDecoration[e.textDecoration];
1112
- o && s.push(o);
1141
+ const i = t.textDecoration[e.textDecoration];
1142
+ i && s.push(i);
1113
1143
  }
1114
1144
  if (e.fontVariantNumeric) {
1115
- const o = t.fontVariantNumeric[e.fontVariantNumeric];
1116
- o && s.push(o);
1145
+ const i = t.fontVariantNumeric[e.fontVariantNumeric];
1146
+ i && s.push(i);
1117
1147
  }
1118
1148
  if (e.fontStyle) {
1119
- const o = t.fontStyle[e.fontStyle];
1120
- o && s.push(o);
1149
+ const i = t.fontStyle[e.fontStyle];
1150
+ i && s.push(i);
1121
1151
  }
1122
1152
  return s;
1123
1153
  },
@@ -1125,12 +1155,12 @@ const qt = (r) => {
1125
1155
  size: (e) => {
1126
1156
  const s = [];
1127
1157
  if (e.width) {
1128
- const o = e.width.toString();
1129
- s.push(`w-[${o}]`);
1158
+ const i = e.width.toString();
1159
+ s.push(`w-[${i}]`);
1130
1160
  }
1131
1161
  if (e.height) {
1132
- const o = e.height.toString();
1133
- s.push(`h-[${o}]`);
1162
+ const i = e.height.toString();
1163
+ s.push(`h-[${i}]`);
1134
1164
  }
1135
1165
  return s;
1136
1166
  },
@@ -1138,20 +1168,20 @@ const qt = (r) => {
1138
1168
  layout: (e) => {
1139
1169
  const s = [];
1140
1170
  if (e.display) {
1141
- const o = t.display[e.display];
1142
- o && s.push(o);
1171
+ const i = t.display[e.display];
1172
+ i && s.push(i);
1143
1173
  }
1144
1174
  if (e.flexDirection) {
1145
- const i = {
1175
+ const o = {
1146
1176
  row: "flex-row",
1147
1177
  column: "flex-col",
1148
1178
  "row-reverse": "flex-row-reverse",
1149
1179
  "column-reverse": "flex-col-reverse"
1150
1180
  }[e.flexDirection];
1151
- i && s.push(i);
1181
+ o && s.push(o);
1152
1182
  }
1153
1183
  if (e.justifyContent) {
1154
- const i = {
1184
+ const o = {
1155
1185
  "flex-start": "justify-start",
1156
1186
  "flex-end": "justify-end",
1157
1187
  center: "justify-center",
@@ -1159,21 +1189,21 @@ const qt = (r) => {
1159
1189
  "space-around": "justify-around",
1160
1190
  "space-evenly": "justify-evenly"
1161
1191
  }[e.justifyContent];
1162
- i && s.push(i);
1192
+ o && s.push(o);
1163
1193
  }
1164
1194
  if (e.alignItems) {
1165
- const i = {
1195
+ const o = {
1166
1196
  "flex-start": "items-start",
1167
1197
  "flex-end": "items-end",
1168
1198
  center: "items-center",
1169
1199
  baseline: "items-baseline",
1170
1200
  stretch: "items-stretch"
1171
1201
  }[e.alignItems];
1172
- i && s.push(i);
1202
+ o && s.push(o);
1173
1203
  }
1174
1204
  if (e.gap) {
1175
- const o = C("gap", e.gap);
1176
- o && s.push(o);
1205
+ const i = N("gap", e.gap);
1206
+ i && s.push(i);
1177
1207
  }
1178
1208
  return s;
1179
1209
  },
@@ -1194,7 +1224,7 @@ const qt = (r) => {
1194
1224
  },
1195
1225
  // 自定义类名
1196
1226
  className: (e) => e.className ? [e.className] : []
1197
- }), te = {
1227
+ }), Jt = {
1198
1228
  backgroundColor: "backgroundColor",
1199
1229
  color: "color",
1200
1230
  borderRadius: "borderRadius",
@@ -1228,59 +1258,58 @@ const qt = (r) => {
1228
1258
  position: "position",
1229
1259
  opacity: "opacity",
1230
1260
  className: "className"
1231
- }, ee = (r, t) => {
1232
- const e = (t == null ? void 0 : t.colorMaps) || Jt, s = (t == null ? void 0 : t.styleMaps) || ct, o = Qt(e, s), i = [], n = /* @__PURE__ */ new Set();
1261
+ }, Qt = (r, t) => {
1262
+ const e = (t == null ? void 0 : t.colorMaps) || Zt, s = (t == null ? void 0 : t.styleMaps) || lt, i = qt(e, s), o = [], n = /* @__PURE__ */ new Set();
1233
1263
  return Object.keys(r).forEach((a) => {
1234
- const l = te[a];
1264
+ const l = Jt[a];
1235
1265
  if (l && !n.has(l)) {
1236
- const h = o[l];
1237
- if (h) {
1238
- const f = h(r);
1239
- i.push(...f), n.add(l);
1266
+ const d = i[l];
1267
+ if (d) {
1268
+ const h = d(r);
1269
+ o.push(...h), n.add(l);
1240
1270
  }
1241
1271
  }
1242
- }), i.filter(Boolean).join(" ");
1272
+ }), o.filter(Boolean).join(" ");
1243
1273
  };
1244
- function se(r) {
1274
+ function te(r) {
1245
1275
  const t = {};
1246
1276
  return r.forEach((e, s) => {
1247
1277
  t[s] = e.value;
1248
1278
  }), t;
1249
1279
  }
1250
- function re({ animatedProps: r, animationConfig: t, children: e }) {
1251
- const [s, o] = q(
1252
- () => se(r)
1280
+ function ee({ animatedProps: r, animationConfig: t, children: e }) {
1281
+ const [s, i] = q(
1282
+ () => te(r)
1253
1283
  );
1254
- j(() => {
1284
+ A(() => {
1255
1285
  const l = [];
1256
- return r.forEach((h, f) => {
1257
- const d = (m) => {
1258
- o((p) => ({
1286
+ return r.forEach((d, h) => {
1287
+ const u = (m) => {
1288
+ i((p) => ({
1259
1289
  ...p,
1260
- [f]: m
1290
+ [h]: m
1261
1291
  }));
1262
1292
  };
1263
- l.push(h.subscribe(d)), d(h.value);
1293
+ l.push(d.subscribe(u)), u(d.value);
1264
1294
  }), () => {
1265
- l.forEach((h) => h());
1295
+ l.forEach((d) => d());
1266
1296
  };
1267
1297
  }, [r]);
1268
- const i = [];
1269
- 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)`);
1298
+ const o = [];
1299
+ s.translateX !== void 0 && o.push(`translateX(${s.translateX}px)`), s.translateY !== void 0 && o.push(`translateY(${s.translateY}px)`), s.scale !== void 0 && o.push(`scale(${s.scale})`), s.rotate !== void 0 && o.push(`rotate(${s.rotate}deg)`);
1270
1300
  const n = {};
1271
- if (i.length > 0 && (n.transform = i.join(" ")), t) {
1272
- const { duration: l = 300, curve: h = "easeOut", stiffness: f, damping: d } = t, m = N(h, { stiffness: f, damping: d });
1301
+ if (o.length > 0 && (n.transform = o.join(" ")), t) {
1302
+ const { duration: l = 300, curve: d = "easeOut", stiffness: h, damping: u } = t, m = v(d, { stiffness: h, damping: u });
1273
1303
  n.transition = `transform ${l}ms ${m}`;
1274
1304
  }
1275
1305
  const a = {
1276
1306
  ...e.props.style,
1277
1307
  ...n
1278
1308
  };
1279
- return Z(e, { style: a });
1309
+ return yt(e, { style: a });
1280
1310
  }
1281
- class _ {
1282
- constructor(t, e, s, o = !1) {
1283
- c(this, "baseClassName");
1311
+ class k {
1312
+ constructor(t, e, s = !1) {
1284
1313
  c(this, "pseudoState");
1285
1314
  c(this, "parentBuilder");
1286
1315
  c(this, "isGroup");
@@ -1289,7 +1318,7 @@ class _ {
1289
1318
  c(this, "transitionDelay", 0);
1290
1319
  c(this, "transitionProperties", ["all"]);
1291
1320
  c(this, "transforms", /* @__PURE__ */ new Map());
1292
- this.baseClassName = t, this.pseudoState = e, this.parentBuilder = s, this.isGroup = o;
1321
+ this.pseudoState = t, this.parentBuilder = e, this.isGroup = s;
1293
1322
  }
1294
1323
  bg(t) {
1295
1324
  return this.set("background-color", t);
@@ -1329,17 +1358,17 @@ class _ {
1329
1358
  css(t, e) {
1330
1359
  return this.set(t, e);
1331
1360
  }
1332
- transition(t, e, s, o) {
1361
+ transition(t, e, s, i) {
1333
1362
  if (typeof t == "string" && e === void 0)
1334
1363
  return this.set("transition", t);
1335
- const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = N(s || this.transitionEasing), l = o ? `${o}ms` : "0ms";
1336
- return this.set("transition", `${i} ${n} ${a} ${l}`);
1364
+ const o = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = v(s || this.transitionEasing), l = i ? `${i}ms` : "0ms";
1365
+ return this.set("transition", `${o} ${n} ${a} ${l}`);
1337
1366
  }
1338
1367
  duration(t) {
1339
1368
  return this.transitionDuration = t, this.applyTransition(), this;
1340
1369
  }
1341
1370
  easing(t) {
1342
- return this.transitionEasing = N(t), this.applyTransition(), this;
1371
+ return this.transitionEasing = v(t), this.applyTransition(), this;
1343
1372
  }
1344
1373
  ease(t) {
1345
1374
  return this.easing(t);
@@ -1351,38 +1380,21 @@ class _ {
1351
1380
  return this.transitionProperties = t, this.applyTransition(), this;
1352
1381
  }
1353
1382
  applyTransition() {
1354
- const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing, o = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
1355
- this.set("transition", `${t} ${e} ${s} ${o}`);
1383
+ const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing, i = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
1384
+ this.set("transition", `${t} ${e} ${s} ${i}`);
1356
1385
  }
1357
1386
  flushTransform() {
1358
1387
  return this.set("transform", [...this.transforms.values()].join(" "));
1359
1388
  }
1360
1389
  set(t, e) {
1361
- return this.isGroup ? u.registerGroupPseudo(this.baseClassName, this.pseudoState, t, e) : u.registerPseudo(this.baseClassName, this.pseudoState, t, e), this;
1390
+ const s = f.registerPseudo(this.pseudoState, t, e, this.isGroup);
1391
+ return this.parentBuilder.addClassName(s), this;
1362
1392
  }
1363
1393
  end() {
1364
1394
  return this.parentBuilder;
1365
1395
  }
1366
1396
  }
1367
- function lt(r) {
1368
- return typeof window > "u" ? () => {
1369
- } : (window.addEventListener("resize", r), () => window.removeEventListener("resize", r));
1370
- }
1371
- function ht() {
1372
- return typeof window > "u" ? 1024 : window.innerWidth;
1373
- }
1374
- function oe({ responsive: r, children: t }) {
1375
- const e = I(lt, ht, () => 1024), s = Vt(t.props.style ?? {}, r, e);
1376
- return Z(t, { style: s });
1377
- }
1378
- function Ce() {
1379
- return I(lt, ht, () => 1024);
1380
- }
1381
- let G = 0;
1382
- function ut(r) {
1383
- return G += 1, `${r}-${G}`;
1384
- }
1385
- function Ee(r, t) {
1397
+ function Ce(r, t) {
1386
1398
  if (typeof document > "u") return;
1387
1399
  const e = typeof r == "string" ? document.querySelector(r) : r;
1388
1400
  e && e.scrollIntoView({
@@ -1390,7 +1402,7 @@ function Ee(r, t) {
1390
1402
  block: (t == null ? void 0 : t.block) ?? "start"
1391
1403
  });
1392
1404
  }
1393
- function Me(r) {
1405
+ function Ne(r) {
1394
1406
  const t = typeof document < "u" ? document : void 0, e = t == null ? void 0 : t.startViewTransition;
1395
1407
  if (typeof e == "function") {
1396
1408
  e.call(t, r);
@@ -1398,62 +1410,64 @@ function Me(r) {
1398
1410
  }
1399
1411
  r();
1400
1412
  }
1401
- function ie() {
1413
+ function se() {
1402
1414
  return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
1403
1415
  }
1404
- function ne() {
1416
+ function re() {
1405
1417
  return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
1406
1418
  }
1407
- function ae({
1419
+ function oe({
1408
1420
  preset: r = "fadeUp",
1409
1421
  once: t = !0,
1410
1422
  rootMargin: e = "0px 0px -8% 0px",
1411
1423
  threshold: s = 0.12,
1412
- forceMotion: o = !1,
1413
- preferTimeline: i = !1,
1424
+ forceMotion: i = !1,
1425
+ preferTimeline: o = !1,
1414
1426
  children: n
1415
1427
  }) {
1416
1428
  const a = w(null);
1417
- j(() => {
1418
- x();
1419
- const h = a.current;
1420
- if (!h) return;
1421
- if (i && ie()) {
1422
- h.classList.add("fibo-inview");
1429
+ A(() => {
1430
+ _();
1431
+ const d = a.current;
1432
+ if (!d) return;
1433
+ if (o && se()) {
1434
+ d.classList.add("fibo-inview");
1423
1435
  return;
1424
1436
  }
1425
1437
  if (typeof IntersectionObserver > "u") {
1426
- h.classList.add("fibo-inview");
1438
+ d.classList.add("fibo-inview");
1427
1439
  return;
1428
1440
  }
1429
- const f = new IntersectionObserver(
1430
- (d) => {
1431
- for (const m of d)
1432
- m.isIntersecting ? (m.target.classList.add("fibo-inview"), t && f.unobserve(m.target)) : t || m.target.classList.remove("fibo-inview");
1441
+ const h = new IntersectionObserver(
1442
+ (u) => {
1443
+ for (const m of u)
1444
+ m.isIntersecting ? (m.target.classList.add("fibo-inview"), t && h.unobserve(m.target)) : t || m.target.classList.remove("fibo-inview");
1433
1445
  },
1434
1446
  { rootMargin: e, threshold: s }
1435
1447
  );
1436
- return f.observe(h), () => f.disconnect();
1437
- }, [t, e, s, i]);
1448
+ return h.observe(d), () => h.disconnect();
1449
+ }, [t, e, s, o]);
1438
1450
  const l = [
1439
1451
  "fibo-reveal",
1440
1452
  `fibo-reveal-${r}`,
1441
- o ? "fibo-motion-force" : ""
1453
+ // min-w-0 only — do NOT force w-full (breaks horizontal ScrollView / carousel slides)
1454
+ "min-w-0",
1455
+ i ? "fibo-motion-force" : ""
1442
1456
  ].filter(Boolean).join(" ");
1443
1457
  return g.createElement("div", { ref: a, className: l, "data-fibo-reveal": r }, n);
1444
1458
  }
1445
- function ce({ children: r }) {
1459
+ function ie({ children: r }) {
1446
1460
  const t = w(null);
1447
- return j(() => {
1448
- if (x(), ne()) return;
1461
+ return A(() => {
1462
+ if (_(), re()) return;
1449
1463
  const e = () => {
1450
- var i, n;
1451
- return ((i = t.current) == null ? void 0 : i.querySelector(".fibo-scroll-progress")) ?? ((n = t.current) == null ? void 0 : n.firstElementChild);
1464
+ var o, n;
1465
+ return ((o = t.current) == null ? void 0 : o.querySelector(".fibo-scroll-progress")) ?? ((n = t.current) == null ? void 0 : n.firstElementChild);
1452
1466
  }, s = () => {
1453
- const o = e();
1454
- if (!o) return;
1455
- const i = document.documentElement.scrollHeight - window.innerHeight, n = i > 0 ? Math.min(1, Math.max(0, window.scrollY / i)) : 0;
1456
- o.style.setProperty("--fibo-progress", String(n));
1467
+ const i = e();
1468
+ if (!i) return;
1469
+ const o = document.documentElement.scrollHeight - window.innerHeight, n = o > 0 ? Math.min(1, Math.max(0, window.scrollY / o)) : 0;
1470
+ i.style.setProperty("--fibo-progress", String(n));
1457
1471
  };
1458
1472
  return s(), window.addEventListener("scroll", s, { passive: !0 }), window.addEventListener("resize", s), () => {
1459
1473
  window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
@@ -1464,8 +1478,8 @@ function ce({ children: r }) {
1464
1478
  r
1465
1479
  );
1466
1480
  }
1467
- const ft = 64, le = `${ft}px`;
1468
- class Te {
1481
+ const ht = 64, ne = `${ht}px`;
1482
+ class Ee {
1469
1483
  constructor() {
1470
1484
  /** @internal Extra DOM props forwarded to the host element. */
1471
1485
  c(this, "_props", {});
@@ -1473,7 +1487,6 @@ class Te {
1473
1487
  c(this, "_cssStyles", {});
1474
1488
  c(this, "_classNames", []);
1475
1489
  c(this, "_children", []);
1476
- c(this, "_responsive");
1477
1490
  c(this, "_theme");
1478
1491
  c(this, "_state", /* @__PURE__ */ new Map());
1479
1492
  c(this, "_providers", /* @__PURE__ */ new Map());
@@ -1484,7 +1497,6 @@ class Te {
1484
1497
  c(this, "_animationConfig");
1485
1498
  c(this, "_animatedProps", /* @__PURE__ */ new Map());
1486
1499
  c(this, "_transforms", []);
1487
- c(this, "_pseudoStateClassName");
1488
1500
  c(this, "_transitionClass");
1489
1501
  c(this, "_motionClass");
1490
1502
  c(this, "_staggerMs");
@@ -1520,7 +1532,7 @@ class Te {
1520
1532
  */
1521
1533
  anchor(t) {
1522
1534
  return this.id(t), this._explicitScrollMargin || this._classNames.push(
1523
- u.register("scroll-margin-top", "var(--fibo-sticky-offset, 0px)")
1535
+ f.register("scroll-margin-top", "var(--fibo-sticky-offset, 0px)")
1524
1536
  ), this;
1525
1537
  }
1526
1538
  /**
@@ -1530,30 +1542,37 @@ class Te {
1530
1542
  scrollMargin(t) {
1531
1543
  this._explicitScrollMargin = !0;
1532
1544
  const e = typeof t == "number" ? `${t}px` : t;
1533
- return this._classNames.push(u.register("scroll-margin-top", e)), this;
1545
+ return this._classNames.push(f.register("scroll-margin-top", e)), this;
1546
+ }
1547
+ /** Stamp a class onto the host. Used by PseudoStateBuilder (hashed `:hover` etc.). */
1548
+ addClassName(t) {
1549
+ return t && !this._classNames.includes(t) && this._classNames.push(t), this;
1534
1550
  }
1535
1551
  /**
1536
- * React list key. After this is called, React reads the key as a string.
1552
+ * React list key. After this is called, React reads the key as a string
1553
+ * on both the builder element and the inner host wrapper.
1537
1554
  * Builders are valid elements — you do not need `.build()`.
1538
1555
  */
1539
1556
  key(t) {
1540
- return this._props.key = t, this;
1557
+ this._props.key = t;
1558
+ const e = this.__fiboElementProps;
1559
+ return e && typeof e == "object" && (this.__fiboElementProps = { ...e, key: String(t) }), this;
1541
1560
  }
1542
1561
  paddingHorizontal(t) {
1543
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-left", e), o = u.register("padding-right", e);
1544
- return this._classNames.push(s, o), this;
1562
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("padding-left", e), i = f.register("padding-right", e);
1563
+ return this._classNames.push(s, i), this;
1545
1564
  }
1546
1565
  paddingVertical(t) {
1547
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-top", e), o = u.register("padding-bottom", e);
1548
- return this._classNames.push(s, o), this;
1566
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("padding-top", e), i = f.register("padding-bottom", e);
1567
+ return this._classNames.push(s, i), this;
1549
1568
  }
1550
1569
  marginHorizontal(t) {
1551
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-left", e), o = u.register("margin-right", e);
1552
- return this._classNames.push(s, o), this;
1570
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("margin-left", e), i = f.register("margin-right", e);
1571
+ return this._classNames.push(s, i), this;
1553
1572
  }
1554
1573
  marginVertical(t) {
1555
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-top", e), o = u.register("margin-bottom", e);
1556
- return this._classNames.push(s, o), this;
1574
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("margin-top", e), i = f.register("margin-bottom", e);
1575
+ return this._classNames.push(s, i), this;
1557
1576
  }
1558
1577
  flexDirection(t) {
1559
1578
  return this._classNames.push(`flex-${t}`), this;
@@ -1567,7 +1586,7 @@ class Te {
1567
1586
  flex(t) {
1568
1587
  if (this._classNames.push("flex"), t !== void 0)
1569
1588
  if (typeof t == "number") {
1570
- const e = u.register("flex", String(t));
1589
+ const e = f.register("flex", String(t));
1571
1590
  this._classNames.push(e);
1572
1591
  } else typeof t == "string" && this._classNames.push(`flex-${t}`);
1573
1592
  return this;
@@ -1618,18 +1637,18 @@ class Te {
1618
1637
  return this._classNames.push("h-full"), this;
1619
1638
  }
1620
1639
  square(t) {
1621
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("width", e), o = u.register("height", e);
1622
- return this._classNames.push(s, o), this;
1640
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("width", e), i = f.register("height", e);
1641
+ return this._classNames.push(s, i), this;
1623
1642
  }
1624
1643
  circle() {
1625
1644
  return this._classNames.push("rounded-full"), this;
1626
1645
  }
1627
1646
  opacity(t) {
1628
- const e = u.register("opacity", String(t));
1647
+ const e = f.register("opacity", String(t));
1629
1648
  return this._classNames.push(e), this;
1630
1649
  }
1631
1650
  p(t) {
1632
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding", e);
1651
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("padding", e);
1633
1652
  return this._classNames.push(s), this;
1634
1653
  }
1635
1654
  px(t) {
@@ -1645,7 +1664,7 @@ class Te {
1645
1664
  return this.paddingVertical(t);
1646
1665
  }
1647
1666
  m(t) {
1648
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin", e);
1667
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("margin", e);
1649
1668
  return this._classNames.push(s), this;
1650
1669
  }
1651
1670
  mx(t) {
@@ -1661,15 +1680,15 @@ class Te {
1661
1680
  return this.marginVertical(t);
1662
1681
  }
1663
1682
  bg(t) {
1664
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("background-color", e);
1683
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = f.register("background-color", e);
1665
1684
  return this._classNames.push(s), this;
1666
1685
  }
1667
1686
  text(t) {
1668
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1687
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = f.register("color", e);
1669
1688
  return this._classNames.push(s), this;
1670
1689
  }
1671
1690
  color(t) {
1672
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1691
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = f.register("color", e);
1673
1692
  return this._classNames.push(s), this;
1674
1693
  }
1675
1694
  resolveSemanticColor(t) {
@@ -1699,8 +1718,8 @@ class Te {
1699
1718
  }
1700
1719
  shadow(t) {
1701
1720
  if (t === null || t === "none") {
1702
- const i = u.register("box-shadow", "none");
1703
- return this._classNames.push(i), this;
1721
+ const o = f.register("box-shadow", "none");
1722
+ return this._classNames.push(o), this;
1704
1723
  }
1705
1724
  const e = {
1706
1725
  sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
@@ -1713,11 +1732,11 @@ class Te {
1713
1732
  modal: "0 10px 40px rgba(0, 0, 0, 0.2)",
1714
1733
  float: "0 8px 16px rgba(0, 0, 0, 0.15)",
1715
1734
  inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
1716
- }, 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) => {
1717
- let d = a || "rgba(0, 0, 0, " + (l ?? 0.1) + ")";
1735
+ }, s = (o) => o.startsWith("#") || o.startsWith("rgb") || o.startsWith("hsl") || ["red", "blue", "green", "yellow", "purple", "pink", "orange", "white", "black", "gray"].some((n) => o.includes(n)), i = (o, n, a, l) => {
1736
+ let u = a || "rgba(0, 0, 0, " + (l ?? 0.1) + ")";
1718
1737
  if (a && a.startsWith("#") && l !== void 0) {
1719
- const y = parseInt(a.slice(1, 3), 16), b = parseInt(a.slice(3, 5), 16), k = parseInt(a.slice(5, 7), 16);
1720
- d = `rgba(${y}, ${b}, ${k}, ${l})`;
1738
+ const y = parseInt(a.slice(1, 3), 16), b = parseInt(a.slice(3, 5), 16), x = parseInt(a.slice(5, 7), 16);
1739
+ u = `rgba(${y}, ${b}, ${x}, ${l})`;
1721
1740
  }
1722
1741
  const p = {
1723
1742
  sm: "2px",
@@ -1726,57 +1745,62 @@ class Te {
1726
1745
  xl: "12px",
1727
1746
  "2xl": "16px"
1728
1747
  }[n] || "4px";
1729
- switch (i) {
1748
+ switch (o) {
1730
1749
  case "top":
1731
- return `0 -${p} ${p} -1px ${d}`;
1750
+ return `0 -${p} ${p} -1px ${u}`;
1732
1751
  case "bottom":
1733
- return `0 ${p} ${p} -1px ${d}`;
1752
+ return `0 ${p} ${p} -1px ${u}`;
1734
1753
  case "left":
1735
- return `-${p} 0 ${p} -1px ${d}`;
1754
+ return `-${p} 0 ${p} -1px ${u}`;
1736
1755
  case "right":
1737
- return `${p} 0 ${p} -1px ${d}`;
1756
+ return `${p} 0 ${p} -1px ${u}`;
1738
1757
  case "top-bottom":
1739
1758
  case "vertical":
1740
- return `0 -${p} ${p} -1px ${d}, 0 ${p} ${p} -1px ${d}`;
1759
+ return `0 -${p} ${p} -1px ${u}, 0 ${p} ${p} -1px ${u}`;
1741
1760
  case "left-right":
1742
1761
  case "horizontal":
1743
- return `-${p} 0 ${p} -1px ${d}, ${p} 0 ${p} -1px ${d}`;
1762
+ return `-${p} 0 ${p} -1px ${u}, ${p} 0 ${p} -1px ${u}`;
1744
1763
  case "all":
1745
1764
  default:
1746
1765
  return e[n] || e.md;
1747
1766
  }
1748
1767
  };
1749
1768
  if (!t) {
1750
- const i = u.register("box-shadow", e.md);
1751
- return this._classNames.push(i), this;
1769
+ const o = f.register("box-shadow", e.md);
1770
+ return this._classNames.push(o), this;
1752
1771
  }
1753
1772
  if (typeof t == "string") {
1754
1773
  if (s(t)) {
1755
- const a = o("all", "md", t), l = u.register("box-shadow", a);
1774
+ const a = i("all", "md", t), l = f.register("box-shadow", a);
1756
1775
  return this._classNames.push(l), this;
1757
1776
  }
1758
- const i = e[t] || e.md, n = u.register("box-shadow", i);
1777
+ const o = e[t] || e.md, n = f.register("box-shadow", o);
1759
1778
  return this._classNames.push(n), this;
1760
1779
  }
1761
1780
  if (Array.isArray(t)) {
1762
- const [i, n, a, l] = t;
1763
- if (typeof i == "string" && s(i)) {
1764
- const d = o("all", "md", i, n), m = u.register("box-shadow", d);
1781
+ const [o, n, a, l] = t;
1782
+ if (typeof o == "string" && s(o)) {
1783
+ const u = i("all", "md", o, n), m = f.register("box-shadow", u);
1765
1784
  return this._classNames.push(m), this;
1766
1785
  }
1767
- const h = i;
1786
+ const d = o;
1768
1787
  if (typeof n == "string" && s(n)) {
1769
- const d = o(h, "md", n, a), m = u.register("box-shadow", d);
1788
+ const u = i(d, "md", n, a), m = f.register("box-shadow", u);
1770
1789
  return this._classNames.push(m), this;
1771
1790
  } else {
1772
- const m = o(h, n, a, l), p = u.register("box-shadow", m);
1791
+ const m = i(d, n, a, l), p = f.register("box-shadow", m);
1773
1792
  return this._classNames.push(p), this;
1774
1793
  }
1775
1794
  }
1776
1795
  return this;
1777
1796
  }
1797
+ /**
1798
+ * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
1799
+ * Tiers stay mutually exclusive: mobile `<768`, tablet `768–1023`, desktop `≥1024`.
1800
+ * No `window.innerWidth` — hydrate-safe.
1801
+ */
1778
1802
  responsive(t) {
1779
- return this._responsive = t, this;
1803
+ return this.registerMediaStyles("(max-width: 767px)", t.mobile), this.registerMediaStyles("(min-width: 768px) and (max-width: 1023px)", t.tablet), this.registerMediaStyles("(min-width: 1024px)", t.desktop), this;
1780
1804
  }
1781
1805
  /**
1782
1806
  * CSS `@media` (min-width or a raw query). Compiles to a class — no resize JS.
@@ -1784,7 +1808,11 @@ class Te {
1784
1808
  * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
1785
1809
  */
1786
1810
  media(t, e) {
1787
- const s = Yt(t), o = /* @__PURE__ */ new Set([
1811
+ return this.registerMediaStyles(Ht(t), e), this;
1812
+ }
1813
+ registerMediaStyles(t, e) {
1814
+ if (!e) return;
1815
+ const s = /* @__PURE__ */ new Set([
1788
1816
  "opacity",
1789
1817
  "zIndex",
1790
1818
  "z-index",
@@ -1795,12 +1823,11 @@ class Te {
1795
1823
  "fontWeight",
1796
1824
  "lineHeight"
1797
1825
  ]);
1798
- for (const [i, n] of Object.entries(e)) {
1799
- if (n == null) continue;
1800
- const a = i.replace(/[A-Z]/g, (h) => `-${h.toLowerCase()}`), l = typeof n == "number" && !o.has(i) && !o.has(a) ? `${n}px` : String(n);
1801
- this._classNames.push(u.registerMedia(s, a, l));
1826
+ for (const [i, o] of Object.entries(e)) {
1827
+ if (o == null) continue;
1828
+ const n = i.replace(/[A-Z]/g, (l) => `-${l.toLowerCase()}`), a = typeof o == "number" && !s.has(i) && !s.has(n) ? `${o}px` : String(o);
1829
+ this._classNames.push(f.registerMedia(t, n, a));
1802
1830
  }
1803
- return this;
1804
1831
  }
1805
1832
  sm(t) {
1806
1833
  return this.media("sm", t);
@@ -1816,23 +1843,23 @@ class Te {
1816
1843
  }
1817
1844
  rounded(t) {
1818
1845
  if (typeof t == "number") {
1819
- const e = u.register("border-radius", `${t}px`);
1846
+ const e = f.register("border-radius", `${t}px`);
1820
1847
  this._classNames.push(e);
1821
1848
  } else if (typeof t == "string" && (t.startsWith("rounded-") || ["sm", "md", "lg", "xl", "2xl", "3xl", "full", "none"].includes(t))) {
1822
1849
  const e = t.startsWith("rounded-") ? t : `rounded-${t}`;
1823
1850
  this._classNames.push(e);
1824
1851
  } else {
1825
- const e = u.register("border-radius", t);
1852
+ const e = f.register("border-radius", t);
1826
1853
  this._classNames.push(e);
1827
1854
  }
1828
1855
  return this;
1829
1856
  }
1830
1857
  borderRadius(t) {
1831
1858
  if (typeof t == "number") {
1832
- const e = u.register("border-radius", `${t}px`);
1859
+ const e = f.register("border-radius", `${t}px`);
1833
1860
  this._classNames.push(e);
1834
1861
  } else {
1835
- const e = u.register("border-radius", t);
1862
+ const e = f.register("border-radius", t);
1836
1863
  this._classNames.push(e);
1837
1864
  }
1838
1865
  return this;
@@ -1843,45 +1870,45 @@ class Te {
1843
1870
  else if (["red", "blue", "green", "gray", "white", "black", "transparent"].some((e) => t.includes(e)))
1844
1871
  this._classNames.push(`border-${t}`);
1845
1872
  else {
1846
- const e = u.register("border-color", t);
1873
+ const e = f.register("border-color", t);
1847
1874
  this._classNames.push(e);
1848
1875
  }
1849
1876
  return this;
1850
1877
  }
1851
1878
  width(t) {
1852
1879
  if (typeof t == "number") {
1853
- const e = u.register("width", `${t}px`);
1880
+ const e = f.register("width", `${t}px`);
1854
1881
  this._classNames.push(e);
1855
1882
  } else if (typeof t == "string" && (t.startsWith("w-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
1856
1883
  const e = t.startsWith("w-") ? t : `w-${t}`;
1857
1884
  this._classNames.push(e);
1858
1885
  } else {
1859
- const e = u.register("width", t);
1886
+ const e = f.register("width", t);
1860
1887
  this._classNames.push(e);
1861
1888
  }
1862
1889
  return this;
1863
1890
  }
1864
1891
  height(t) {
1865
1892
  if (typeof t == "number") {
1866
- const e = u.register("height", `${t}px`);
1893
+ const e = f.register("height", `${t}px`);
1867
1894
  this._classNames.push(e);
1868
1895
  } else if (typeof t == "string" && (t.startsWith("h-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
1869
1896
  const e = t.startsWith("h-") ? t : `h-${t}`;
1870
1897
  this._classNames.push(e);
1871
1898
  } else {
1872
- const e = u.register("height", t);
1899
+ const e = f.register("height", t);
1873
1900
  this._classNames.push(e);
1874
1901
  }
1875
1902
  return this;
1876
1903
  }
1877
1904
  gap(t) {
1878
1905
  if (typeof t == "number") {
1879
- const e = u.register("gap", `${t}px`);
1906
+ const e = f.register("gap", `${t}px`);
1880
1907
  this._classNames.push(e);
1881
1908
  } else if (typeof t == "string" && t.startsWith("gap-"))
1882
1909
  this._classNames.push(t);
1883
1910
  else {
1884
- const e = u.register("gap", t);
1911
+ const e = f.register("gap", t);
1885
1912
  this._classNames.push(e);
1886
1913
  }
1887
1914
  return this;
@@ -1932,18 +1959,18 @@ class Te {
1932
1959
  ), this;
1933
1960
  }
1934
1961
  borderInput(t = "gray-300", e = "blue-500") {
1935
- 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);
1962
+ 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, i = s(t), o = s(e);
1936
1963
  return this._classNames.push(
1937
1964
  "border",
1938
- `border-${o}`,
1965
+ `border-${i}`,
1939
1966
  "focus-within:ring-2",
1940
- `focus-within:ring-${i}`,
1941
- `focus-within:border-${i}`
1967
+ `focus-within:ring-${o}`,
1968
+ `focus-within:border-${o}`
1942
1969
  ), this.clean();
1943
1970
  }
1944
1971
  weight(t) {
1945
1972
  if (typeof t == "number") {
1946
- const e = u.register("font-weight", String(t));
1973
+ const e = f.register("font-weight", String(t));
1947
1974
  this._classNames.push(e);
1948
1975
  } else {
1949
1976
  const e = {
@@ -1960,7 +1987,7 @@ class Te {
1960
1987
  if (e[t])
1961
1988
  this._classNames.push(e[t]);
1962
1989
  else {
1963
- const s = u.register("font-weight", t);
1990
+ const s = f.register("font-weight", t);
1964
1991
  this._classNames.push(s);
1965
1992
  }
1966
1993
  }
@@ -1994,16 +2021,16 @@ class Te {
1994
2021
  return this._signals.add(t), this;
1995
2022
  }
1996
2023
  translateX(t) {
1997
- return t instanceof z ? this._animatedProps.set("translateX", t) : this._transforms.push(`translateX(${t}px)`), this;
2024
+ return t instanceof R ? this._animatedProps.set("translateX", t) : this._transforms.push(`translateX(${t}px)`), this;
1998
2025
  }
1999
2026
  translateY(t) {
2000
- return t instanceof z ? this._animatedProps.set("translateY", t) : this._transforms.push(`translateY(${t}px)`), this;
2027
+ return t instanceof R ? this._animatedProps.set("translateY", t) : this._transforms.push(`translateY(${t}px)`), this;
2001
2028
  }
2002
2029
  scale(t) {
2003
- return t instanceof z ? this._animatedProps.set("scale", t) : this._transforms.push(`scale(${t})`), this;
2030
+ return t instanceof R ? this._animatedProps.set("scale", t) : this._transforms.push(`scale(${t})`), this;
2004
2031
  }
2005
2032
  rotate(t) {
2006
- return t instanceof z ? this._animatedProps.set("rotate", t) : this._transforms.push(`rotate(${t}deg)`), this;
2033
+ return t instanceof R ? this._animatedProps.set("rotate", t) : this._transforms.push(`rotate(${t}deg)`), this;
2007
2034
  }
2008
2035
  gesture(t) {
2009
2036
  return this._gesture = t, this;
@@ -2029,11 +2056,11 @@ class Te {
2029
2056
  props(t) {
2030
2057
  return this._props = { ...this._props, ...t }, this;
2031
2058
  }
2032
- transition(t, e, s, o) {
2059
+ transition(t, e, s, i) {
2033
2060
  if (typeof t == "string" && e === void 0)
2034
- return this.replaceTransitionClass(u.register("transition", t)), this;
2035
- const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = N(s || this._transitionEasing), l = o ? `${o}ms` : "0ms";
2036
- return this.replaceTransitionClass(u.register("transition", `${i} ${n} ${a} ${l}`)), this;
2061
+ return this.replaceTransitionClass(f.register("transition", t)), this;
2062
+ const o = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = v(s || this._transitionEasing), l = i ? `${i}ms` : "0ms";
2063
+ return this.replaceTransitionClass(f.register("transition", `${o} ${n} ${a} ${l}`)), this;
2037
2064
  }
2038
2065
  /**
2039
2066
  * Set transition duration in milliseconds
@@ -2047,7 +2074,7 @@ class Te {
2047
2074
  * Example: .easing('ease-in-out')
2048
2075
  */
2049
2076
  easing(t) {
2050
- return this._transitionEasing = N(t), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
2077
+ return this._transitionEasing = v(t), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
2051
2078
  }
2052
2079
  /** Alias of `.easing()`. `'spring'` becomes CSS `linear()`. */
2053
2080
  ease(t) {
@@ -2071,15 +2098,15 @@ class Te {
2071
2098
  * Apply the built transition to the element
2072
2099
  */
2073
2100
  _applyTransition() {
2074
- const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing, o = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
2075
- this.replaceTransitionClass(u.register("transition", `${t} ${e} ${s} ${o}`));
2101
+ const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing, i = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
2102
+ this.replaceTransitionClass(f.register("transition", `${t} ${e} ${s} ${i}`));
2076
2103
  }
2077
2104
  replaceTransitionClass(t) {
2078
2105
  this._transitionClass && (this._classNames = this._classNames.filter((e) => e !== this._transitionClass)), this._transitionClass = t, this._classNames.push(t);
2079
2106
  }
2080
2107
  animate(t, e) {
2081
- x(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((f) => f !== this._motionClass));
2082
- const s = Ft(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;
2108
+ _(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((h) => h !== this._motionClass));
2109
+ const s = Pt(t), i = (s ? t.duration : e == null ? void 0 : e.duration) ?? this._transitionDuration, o = (s ? t.delay : e == null ? void 0 : e.delay) ?? this._transitionDelay;
2083
2110
  let n = s ? t.ease : e == null ? void 0 : e.ease;
2084
2111
  const a = {
2085
2112
  stiffness: (s ? t.stiffness : e == null ? void 0 : e.stiffness) ?? void 0,
@@ -2087,16 +2114,16 @@ class Te {
2087
2114
  mass: (s ? t.mass : e == null ? void 0 : e.mass) ?? void 0
2088
2115
  };
2089
2116
  if (s) {
2090
- const f = K(t.from), d = K(t.to), m = u.registerKeyframes(Wt(`${f}=>${d}`), f, d);
2117
+ const h = G(t.from), u = G(t.to), m = f.registerKeyframes(Ft(`${h}=>${u}`), h, u);
2091
2118
  this._motionClass = `fibo-anim ${m}`, this._props["data-fibo-anim"] = "custom";
2092
2119
  } else {
2093
- const f = Ot(t);
2094
- this._motionClass = `fibo-anim fibo-anim-${f}`, this._props["data-fibo-anim"] = f, (e == null ? void 0 : e.from) !== void 0 && (this._style["--fibo-from"] = typeof e.from == "number" ? `${e.from}px` : e.from), !n && f === "pop" && (n = "spring");
2120
+ const h = Ot(t);
2121
+ 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");
2095
2122
  }
2096
- const l = N(n ?? "ease", a);
2123
+ const l = v(n ?? "ease", a);
2097
2124
  this._classNames.push(this._motionClass);
2098
- const h = this._style;
2099
- return h["--fibo-dur"] = `${o}ms`, h["--fibo-ease"] = l, h["--fibo-delay"] = `${i}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
2125
+ const d = this._style;
2126
+ return d["--fibo-dur"] = `${i}ms`, d["--fibo-ease"] = l, d["--fibo-delay"] = `${o}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
2100
2127
  }
2101
2128
  /** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
2102
2129
  spring(t) {
@@ -2112,15 +2139,15 @@ class Te {
2112
2139
  }), this);
2113
2140
  }
2114
2141
  focusVisible(t) {
2115
- const e = this.getPseudoStateClassName(), s = new _(e, "focus-visible", this);
2116
- return t ? (t(s), this) : s;
2142
+ const e = new k("focus-visible", this);
2143
+ return t ? (t(e), this) : e;
2117
2144
  }
2118
2145
  stagger(t) {
2119
- return this._staggerMs = t, this._usesCssMotion = !0, this._style["--fibo-stagger"] = `${t}ms`, x(), this;
2146
+ return this._staggerMs = t, this._usesCssMotion = !0, this._style["--fibo-stagger"] = `${t}ms`, _(), this;
2120
2147
  }
2121
2148
  /** Scroll-reveal: IntersectionObserver toggles `.fibo-inview`. */
2122
2149
  reveal(t = "fadeUp") {
2123
- return this._reveal = typeof t == "string" ? { preset: t, once: !0 } : { preset: "fadeUp", once: !0, ...t }, this._usesCssMotion = !0, x(), this;
2150
+ return this._reveal = typeof t == "string" ? { preset: t, once: !0 } : { preset: "fadeUp", once: !0, ...t }, this._usesCssMotion = !0, _(), this;
2124
2151
  }
2125
2152
  /** Alias of `.reveal()` for scroll-triggered presets. */
2126
2153
  onScroll(t = "fadeIn") {
@@ -2128,26 +2155,26 @@ class Te {
2128
2155
  }
2129
2156
  /** CSS `animation-timeline: view()` / `scroll()`; IntersectionObserver reveal is the fallback. */
2130
2157
  scrollTimeline(t = "view") {
2131
- return x(), this._classNames.push(t === "scroll" ? "fibo-scroll-timeline" : "fibo-view-timeline"), this._usesCssMotion = !0, t === "view" && !this._reveal && (this._reveal = { preset: "fadeUp", once: !0 }), this;
2158
+ return _(), this._classNames.push(t === "scroll" ? "fibo-scroll-timeline" : "fibo-view-timeline"), this._usesCssMotion = !0, t === "view" && !this._reveal && (this._reveal = { preset: "fadeUp", once: !0 }), this;
2132
2159
  }
2133
2160
  scrollProgress() {
2134
- return x(), this._scrollProgress = !0, this._classNames.push("fibo-scroll-progress"), this._usesCssMotion = !0, this;
2161
+ return _(), this._scrollProgress = !0, this._classNames.push("fibo-scroll-progress"), this._usesCssMotion = !0, this;
2135
2162
  }
2136
2163
  smoothScroll() {
2137
- return this._classNames.push(u.register("scroll-behavior", "smooth")), this;
2164
+ return this._classNames.push(f.register("scroll-behavior", "smooth")), this;
2138
2165
  }
2139
2166
  scrollSnap(t = "y") {
2140
- return x(), this._classNames.push(`fibo-snap-${t}`), this;
2167
+ return _(), this._classNames.push(`fibo-snap-${t}`), this;
2141
2168
  }
2142
2169
  scrollSnapAlign(t = "start") {
2143
- return x(), this._classNames.push(`fibo-snap-${t}`), this;
2170
+ return _(), this._classNames.push(`fibo-snap-${t}`), this;
2144
2171
  }
2145
2172
  sticky(t = 0) {
2146
2173
  if (t === !1) return this;
2147
- this._classNames.push(u.register("position", "sticky"));
2174
+ this._classNames.push(f.register("position", "sticky"));
2148
2175
  const e = t === !0 ? "0px" : typeof t == "number" ? `${t}px` : t;
2149
- this._classNames.push(u.register("top", e));
2150
- const s = t === !0 || t === 0 ? le : typeof t == "number" ? `${Math.max(t, ft)}px` : t;
2176
+ this._classNames.push(f.register("top", e));
2177
+ const s = t === !0 || t === 0 ? ne : typeof t == "number" ? `${Math.max(t, ht)}px` : t;
2151
2178
  return this.publishStickyOffset(s), this;
2152
2179
  }
2153
2180
  /**
@@ -2156,7 +2183,7 @@ class Te {
2156
2183
  */
2157
2184
  publishStickyOffset(t) {
2158
2185
  const e = typeof t == "number" ? `${t}px` : t;
2159
- u.registerRoot("--fibo-sticky-offset", e), u.ensureScrollPadding();
2186
+ f.registerRoot("--fibo-sticky-offset", e), f.ensureScrollPadding();
2160
2187
  }
2161
2188
  viewTransition(t) {
2162
2189
  return this._viewTransition = t, this._style.viewTransitionName = t, this;
@@ -2169,7 +2196,7 @@ class Te {
2169
2196
  }
2170
2197
  ensureInteractiveTransition() {
2171
2198
  this._transitionClass || this._motionClass || this.replaceTransitionClass(
2172
- u.register(
2199
+ f.register(
2173
2200
  "transition",
2174
2201
  `transform ${this._transitionDuration}ms ${this._transitionEasing}, opacity ${this._transitionDuration}ms ${this._transitionEasing}`
2175
2202
  )
@@ -2178,67 +2205,64 @@ class Te {
2178
2205
  theme(t) {
2179
2206
  return this._theme = t, this;
2180
2207
  }
2181
- getPseudoStateClassName() {
2182
- return this._pseudoStateClassName || (this._pseudoStateClassName = ut("fibo-pseudo"), this._classNames.push(this._pseudoStateClassName)), this._pseudoStateClassName;
2183
- }
2184
2208
  hover(t) {
2185
2209
  this.ensureInteractiveTransition();
2186
- const e = this.getPseudoStateClassName(), s = new _(e, "hover", this);
2187
- return t ? (t(s), this) : s;
2210
+ const e = new k("hover", this);
2211
+ return t ? (t(e), this) : e;
2188
2212
  }
2189
2213
  focus(t) {
2190
- const e = this.getPseudoStateClassName(), s = new _(e, "focus", this);
2191
- return t ? (t(s), this) : s;
2214
+ const e = new k("focus", this);
2215
+ return t ? (t(e), this) : e;
2192
2216
  }
2193
2217
  active(t) {
2194
- const e = this.getPseudoStateClassName(), s = new _(e, "active", this);
2195
- return t ? (t(s), this) : s;
2218
+ const e = new k("active", this);
2219
+ return t ? (t(e), this) : e;
2196
2220
  }
2197
2221
  visited(t) {
2198
- const e = this.getPseudoStateClassName(), s = new _(e, "visited", this);
2199
- return t ? (t(s), this) : s;
2222
+ const e = new k("visited", this);
2223
+ return t ? (t(e), this) : e;
2200
2224
  }
2201
2225
  disabledState(t) {
2202
- const e = this.getPseudoStateClassName(), s = new _(e, "disabled", this);
2203
- return t ? (t(s), this) : s;
2226
+ const e = new k("disabled", this);
2227
+ return t ? (t(e), this) : e;
2204
2228
  }
2205
2229
  focusWithin(t) {
2206
- const e = this.getPseudoStateClassName(), s = new _(e, "focus-within", this);
2207
- return t ? (t(s), this) : s;
2230
+ const e = new k("focus-within", this);
2231
+ return t ? (t(e), this) : e;
2208
2232
  }
2209
2233
  firstChild(t) {
2210
- const e = this.getPseudoStateClassName(), s = new _(e, "first-child", this);
2211
- return t ? (t(s), this) : s;
2234
+ const e = new k("first-child", this);
2235
+ return t ? (t(e), this) : e;
2212
2236
  }
2213
2237
  lastChild(t) {
2214
- const e = this.getPseudoStateClassName(), s = new _(e, "last-child", this);
2215
- return t ? (t(s), this) : s;
2238
+ const e = new k("last-child", this);
2239
+ return t ? (t(e), this) : e;
2216
2240
  }
2217
2241
  groupHover(t) {
2218
- const e = this.getPseudoStateClassName(), s = new _(e, "hover", this, !0);
2219
- return t ? (t(s), this) : s;
2242
+ const e = new k("hover", this, !0);
2243
+ return t ? (t(e), this) : e;
2220
2244
  }
2221
2245
  groupFocus(t) {
2222
- const e = this.getPseudoStateClassName(), s = new _(e, "focus", this, !0);
2223
- return t ? (t(s), this) : s;
2246
+ const e = new k("focus", this, !0);
2247
+ return t ? (t(e), this) : e;
2224
2248
  }
2225
2249
  groupActive(t) {
2226
- const e = this.getPseudoStateClassName(), s = new _(e, "active", this, !0);
2227
- return t ? (t(s), this) : s;
2250
+ const e = new k("active", this, !0);
2251
+ return t ? (t(e), this) : e;
2228
2252
  }
2229
2253
  groupFocusWithin(t) {
2230
- const e = this.getPseudoStateClassName(), s = new _(e, "focus-within", this, !0);
2231
- return t ? (t(s), this) : s;
2254
+ const e = new k("focus-within", this, !0);
2255
+ return t ? (t(e), this) : e;
2232
2256
  }
2233
2257
  group() {
2234
2258
  return this._classNames.push("group"), this;
2235
2259
  }
2236
2260
  children(t) {
2237
- return typeof t == "function" ? (this._childFunction = t, this._children = []) : (this._children = H(t), this._childFunction = void 0), this;
2261
+ return typeof t == "function" ? (this._childFunction = t, this._children = []) : (this._children = K(t), this._childFunction = void 0), this;
2238
2262
  }
2239
2263
  getClassName() {
2240
2264
  let t;
2241
- return Object.keys(this._cssStyles).length > 0 && (t = ee(this._cssStyles) || void 0), Ut(this._classNames, t);
2265
+ return Object.keys(this._cssStyles).length > 0 && (t = Qt(this._cssStyles) || void 0), Xt(this._classNames, t);
2242
2266
  }
2243
2267
  getStyle() {
2244
2268
  let t = { ...this._style, ...this._cssStyles };
@@ -2254,18 +2278,18 @@ class Te {
2254
2278
  t.transform = e ? `${e} ${this._transforms.join(" ")}` : this._transforms.join(" ");
2255
2279
  }
2256
2280
  if (this._animationConfig && this._animatedProps.size === 0) {
2257
- const { duration: e = 300, curve: s = "easeOut", stiffness: o, damping: i } = this._animationConfig, n = N(s, { stiffness: o, damping: i });
2281
+ const { duration: e = 300, curve: s = "easeOut", stiffness: i, damping: o } = this._animationConfig, n = v(s, { stiffness: i, damping: o });
2258
2282
  t.transition = `all ${e}ms ${n}`;
2259
2283
  }
2260
2284
  return t;
2261
2285
  }
2262
2286
  processChildren() {
2263
- const t = this._childFunction ? H(this._childFunction) : this._children;
2287
+ const t = this._childFunction ? K(this._childFunction) : this._children;
2264
2288
  return this._staggerMs == null ? t : t.map(
2265
2289
  (e, s) => g.createElement(
2266
2290
  "span",
2267
2291
  {
2268
- key: g.isValidElement(e) && e.key != null ? e.key : `fibo-stagger-${s}`,
2292
+ key: g.isValidElement(e) && H(e.key) ? e.key : `fibo-stagger-${s}`,
2269
2293
  className: "fibo-stagger-item",
2270
2294
  style: { "--fibo-i": String(s) }
2271
2295
  },
@@ -2277,7 +2301,7 @@ class Te {
2277
2301
  return this._childFunction;
2278
2302
  }
2279
2303
  }
2280
- const he = /* @__PURE__ */ new Set([
2304
+ const ae = /* @__PURE__ */ new Set([
2281
2305
  "$$typeof",
2282
2306
  "type",
2283
2307
  "props",
@@ -2290,61 +2314,72 @@ const he = /* @__PURE__ */ new Set([
2290
2314
  "_debugTask",
2291
2315
  "_debugInfo"
2292
2316
  ]);
2293
- function ue(r) {
2294
- const t = r._isObserver, e = r._signals, s = r._observers, o = r._state, i = r._providers, n = () => {
2295
- var $;
2296
- let d = r.build();
2297
- const m = r._animatedProps, p = r._animationConfig;
2298
- m && m.size > 0 && (d = g.createElement(re, {
2299
- animatedProps: m,
2300
- animationConfig: p,
2301
- children: d
2317
+ function ce(r) {
2318
+ var e;
2319
+ const t = (e = r._props) == null ? void 0 : e.key;
2320
+ if (!(t == null || t === ""))
2321
+ return t;
2322
+ }
2323
+ function le(r) {
2324
+ const t = r._isObserver, e = r._signals, s = r._observers, i = r._state, o = r._providers, n = ce(r), a = () => {
2325
+ var S;
2326
+ let m = r.build();
2327
+ const p = r._animatedProps, y = r._animationConfig;
2328
+ p && p.size > 0 && (m = g.createElement(ee, {
2329
+ key: n,
2330
+ animatedProps: p,
2331
+ animationConfig: y,
2332
+ children: m
2302
2333
  }));
2303
- const y = r._reveal;
2304
- y && (d = g.createElement(ae, {
2305
- preset: y.preset,
2306
- once: y.once,
2307
- rootMargin: y.rootMargin,
2308
- threshold: y.threshold,
2334
+ const b = r._reveal;
2335
+ b && (m = g.createElement(oe, {
2336
+ key: n,
2337
+ preset: b.preset,
2338
+ once: b.once,
2339
+ rootMargin: b.rootMargin,
2340
+ threshold: b.threshold,
2309
2341
  forceMotion: r._reducedMotion === "never",
2310
- preferTimeline: ($ = r._classNames) == null ? void 0 : $.includes("fibo-view-timeline"),
2311
- children: d
2312
- })), r._scrollProgress && (d = g.createElement(ce, { children: d })), r._usesCssMotion && (d = g.createElement(g.Fragment, null, g.createElement(Xt), d));
2313
- const b = r._gesture;
2314
- b && (d = b.wrap(d));
2315
- const k = r._responsive;
2316
- return k && (d = g.createElement(oe, {
2317
- responsive: k,
2318
- children: d
2319
- })), d;
2320
- }, a = typeof r.hasStateManagement == "function" ? r.hasStateManagement() : !!(t || e && e.size || s && s.size || o && o.size || i && i.size), l = t ? g.createElement(Mt, {
2321
- key: r._props.key,
2322
- children: n
2323
- }) : null, h = () => l ?? n();
2324
- let f = h();
2325
- return a && e && e.size > 0 ? f = g.createElement(Rt, {
2326
- key: r._props.key,
2342
+ preferTimeline: (S = r._classNames) == null ? void 0 : S.includes("fibo-view-timeline"),
2343
+ children: m
2344
+ })), r._scrollProgress && (m = g.createElement(ie, { key: n, children: m })), r._usesCssMotion && (m = g.createElement(
2345
+ g.Fragment,
2346
+ { key: n },
2347
+ g.createElement(Bt),
2348
+ m
2349
+ ));
2350
+ const x = r._gesture;
2351
+ return x && (m = x.wrap(m)), m;
2352
+ }, l = typeof r.hasStateManagement == "function" ? r.hasStateManagement() : !!(t || e && e.size || s && s.size || i && i.size || o && o.size), d = t ? g.createElement(Nt, {
2353
+ key: n,
2354
+ children: a
2355
+ }) : null, h = () => d ?? a();
2356
+ let u = h();
2357
+ return l && e && e.size > 0 ? u = g.createElement(It, {
2358
+ key: n,
2327
2359
  signals: e,
2328
2360
  children: h
2329
- }) : a && s && s.size > 0 && (f = g.createElement(It, {
2361
+ }) : l && s && s.size > 0 && (u = g.createElement(Tt, {
2362
+ key: n,
2330
2363
  observables: s,
2331
2364
  children: h
2332
- })), a && o && o.size > 0 && (f = g.createElement(zt, {
2333
- stateMap: o,
2334
- children: f
2335
- })), a && i && i.size > 0 && (f = g.createElement(Pt, {
2336
- providers: i,
2337
- children: f
2338
- })), f;
2339
- }
2340
- function dt(r, t, e) {
2365
+ })), l && i && i.size > 0 && (u = g.createElement(Mt, {
2366
+ key: n,
2367
+ stateMap: i,
2368
+ children: u
2369
+ })), l && o && o.size > 0 && (u = g.createElement(Rt, {
2370
+ key: n,
2371
+ providers: o,
2372
+ children: u
2373
+ })), u;
2374
+ }
2375
+ function ft(r, t, e) {
2341
2376
  const s = function() {
2342
2377
  return t();
2343
2378
  };
2344
2379
  s.displayName = e;
2345
- const o = g.createElement(s);
2380
+ const i = g.createElement(s);
2346
2381
  Object.defineProperty(r, "$$typeof", {
2347
- value: o.$$typeof,
2382
+ value: i.$$typeof,
2348
2383
  enumerable: !0,
2349
2384
  configurable: !0
2350
2385
  }), Object.defineProperty(r, "type", {
@@ -2352,57 +2387,60 @@ function dt(r, t, e) {
2352
2387
  enumerable: !0,
2353
2388
  configurable: !0,
2354
2389
  writable: !0
2355
- }), r.ref = o.ref ?? null, r.__fiboElementProps = o.props ?? {}, o._owner !== void 0 && (r._owner = o._owner), r._store = { validated: 1 };
2390
+ }), r.ref = i.ref ?? null, r.__fiboElementProps = i.props ?? {}, i._owner !== void 0 && (r._owner = i._owner), r._store = { validated: 1 };
2356
2391
  }
2357
- function ze(r) {
2392
+ function Me(r) {
2358
2393
  return (...t) => {
2359
- const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo", o = () => ue(e);
2360
- return dt(e, o, s), new Proxy(e, {
2361
- get(i, n, a) {
2362
- var l;
2394
+ const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo", i = () => le(e);
2395
+ return ft(e, i, s), new Proxy(e, {
2396
+ get(o, n, a) {
2397
+ var l, d;
2363
2398
  if (n === "build")
2364
- return o;
2399
+ return i;
2365
2400
  if (n === "key") {
2366
- const h = (l = i._props) == null ? void 0 : l.key;
2401
+ const h = (l = o._props) == null ? void 0 : l.key;
2367
2402
  if (h != null && h !== "")
2368
- return typeof h == "number" ? String(h) : h;
2369
- if (!i.__fiboKeyFn) {
2370
- const f = ut("fibo"), d = (m) => (i.key(m), a);
2371
- d.toString = () => f, d.valueOf = () => f, i.__fiboKeyFn = d, i.__fiboAutoKey = f;
2403
+ return String(h);
2404
+ if (!o.__fiboKeyFn) {
2405
+ const u = (m) => (o.key(m), a);
2406
+ o.__fiboKeyFn = u;
2372
2407
  }
2373
- return i.__fiboKeyFn;
2408
+ return o.__fiboKeyFn;
2374
2409
  }
2375
2410
  if (n === "props") {
2376
- const h = Object.getPrototypeOf(i).props;
2377
- return typeof h == "function" ? Object.assign((d) => (h.call(i, d), a), i.__fiboElementProps ?? {}) : i.__fiboElementProps ?? {};
2411
+ const h = (d = o._props) == null ? void 0 : d.key, u = {
2412
+ ...o.__fiboElementProps ?? {},
2413
+ ...h != null && h !== "" ? { key: String(h) } : {}
2414
+ }, m = Object.getPrototypeOf(o).props;
2415
+ return typeof m == "function" ? Object.assign((y) => (m.call(o, y), a), u) : u;
2378
2416
  }
2379
- return he.has(n) || Reflect.has(i, n) ? Reflect.get(i, n, a) : (h) => {
2380
- const f = n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), m = ["opacity", "z-index", "flex", "flex-grow", "flex-shrink", "order", "font-weight", "line-height"].includes(f), p = typeof h == "number" && !m ? `${h}px` : String(h), y = u.register(f, p);
2381
- return i.className(y), a;
2417
+ return ae.has(n) || Reflect.has(o, n) ? Reflect.get(o, n, a) : (h) => {
2418
+ const u = 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(u), y = typeof h == "number" && !p ? `${h}px` : String(h), b = f.register(u, y);
2419
+ return o.className(b), a;
2382
2420
  };
2383
2421
  }
2384
2422
  });
2385
2423
  };
2386
2424
  }
2387
- const fe = ({
2425
+ const he = ({
2388
2426
  signal: r,
2389
2427
  builder: t,
2390
2428
  loading: e,
2391
2429
  error: s
2392
2430
  }) => {
2393
- const o = g.useSyncExternalStore(
2431
+ const i = g.useSyncExternalStore(
2394
2432
  g.useCallback((a) => r.subscribe ? r.subscribe(a) : () => {
2395
2433
  }, [r]),
2396
2434
  () => r.value
2397
- ), i = o == null ? void 0 : o.error;
2398
- return i && s ? s(i) : ((o == null ? void 0 : o.isLoading) || (o == null ? void 0 : o.loading)) === !0 && e ? e() : t ? t(o) : null;
2399
- }, de = g.memo(fe);
2400
- class me {
2435
+ ), o = i == null ? void 0 : i.error;
2436
+ return o && s ? s(o) : ((i == null ? void 0 : i.isLoading) || (i == null ? void 0 : i.loading)) === !0 && e ? e() : t ? t(i) : null;
2437
+ }, fe = g.memo(he);
2438
+ class ue {
2401
2439
  constructor(t) {
2402
2440
  c(this, "_loading");
2403
2441
  c(this, "_error");
2404
2442
  c(this, "_builder");
2405
- this._signal = t, dt(this, () => this.build(), "ValueBuilder");
2443
+ this._signal = t, ft(this, () => this.build(), "ValueBuilder");
2406
2444
  }
2407
2445
  loading(t) {
2408
2446
  return this._loading = typeof t == "function" ? t : () => t, this;
@@ -2417,7 +2455,7 @@ class me {
2417
2455
  return this._builder = t, this;
2418
2456
  }
2419
2457
  build() {
2420
- return g.createElement(de, {
2458
+ return g.createElement(fe, {
2421
2459
  signal: this._signal,
2422
2460
  builder: this._builder,
2423
2461
  loading: this._loading,
@@ -2425,52 +2463,53 @@ class me {
2425
2463
  });
2426
2464
  }
2427
2465
  }
2428
- function Ie(r) {
2429
- return new me(r);
2466
+ function Te(r) {
2467
+ return new ue(r);
2430
2468
  }
2431
2469
  export {
2432
- jt as A,
2433
- At as B,
2434
- St as C,
2435
- H as D,
2436
- wt as E,
2437
- Te as F,
2438
- ut as G,
2439
- Ne as H,
2440
- F as I,
2441
- nt as J,
2442
- Yt as K,
2443
- Ce as L,
2470
+ Ot as A,
2471
+ Mt as B,
2472
+ $t as C,
2473
+ zt as D,
2474
+ _t as E,
2475
+ ve as F,
2476
+ jt as G,
2477
+ At as H,
2478
+ K as I,
2479
+ Z as J,
2480
+ F as K,
2481
+ at as L,
2444
2482
  U as M,
2445
- Nt as O,
2446
- Pt as P,
2447
- we as R,
2448
- z as S,
2449
- Ie as V,
2450
- xe as a,
2483
+ Ht as N,
2484
+ wt as O,
2485
+ Rt as P,
2486
+ _e as R,
2487
+ R as S,
2488
+ Te as V,
2489
+ ke as a,
2451
2490
  tt as b,
2452
- _e as c,
2453
- Mt as d,
2454
- Se as e,
2455
- Vt as f,
2491
+ be as c,
2492
+ Nt as d,
2493
+ $e as e,
2494
+ oe as f,
2456
2495
  et as g,
2457
- ae as h,
2458
- ce as i,
2459
- Ee as j,
2460
- Me as k,
2461
- ie as l,
2462
- ne as m,
2463
- it as n,
2464
- ke as o,
2465
- N as p,
2466
- Xt as q,
2467
- xt as r,
2468
- ye as s,
2469
- ve as t,
2470
- $e as u,
2471
- ze as v,
2472
- Et as w,
2473
- x,
2474
- Ot as y,
2475
- zt as z
2496
+ ie as h,
2497
+ Ce as i,
2498
+ Ne as j,
2499
+ se as k,
2500
+ re as l,
2501
+ it as m,
2502
+ v as n,
2503
+ ye as o,
2504
+ Bt as p,
2505
+ we as q,
2506
+ kt as r,
2507
+ ge as s,
2508
+ nt as t,
2509
+ xe as u,
2510
+ Se as v,
2511
+ Me as w,
2512
+ Ee as x,
2513
+ Ct as y,
2514
+ _ as z
2476
2515
  };