fiboui 2.2.0 → 2.2.1

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;
@@ -531,53 +528,76 @@ const F = `
531
528
  filter: none !important;
532
529
  }
533
530
  }
534
- `.trim(), S = class S {
531
+ `.trim();
532
+ function Z(r) {
533
+ let t = 5381;
534
+ for (let e = 0; e < r.length; e += 1)
535
+ t = (t << 5) + t ^ r.charCodeAt(e);
536
+ return (t >>> 0).toString(36);
537
+ }
538
+ const $ = class $ {
535
539
  constructor() {
536
540
  c(this, "sheet", null);
537
541
  c(this, "cache", /* @__PURE__ */ new Map());
538
542
  c(this, "extras", []);
539
543
  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();
544
+ this.attachSheet(), this.ensureDefaults();
541
545
  }
542
546
  static getInstance() {
543
- return S.instance || (S.instance = new S()), S.instance;
547
+ return $.instance || ($.instance = new $()), $.instance;
548
+ }
549
+ /** Test-only: empty cache/sheet so a simulated client starts cold. */
550
+ reset() {
551
+ this.cache.clear(), this.extras = [], this.defaultsReady = !1, this.sheet = null, this.attachSheet(), this.ensureDefaults();
552
+ }
553
+ static resetForTests() {
554
+ $.getInstance().reset();
555
+ }
556
+ attachSheet() {
557
+ if (typeof document > "u") return;
558
+ const t = document.getElementById("fibo-dynamic-styles");
559
+ if (t) {
560
+ this.sheet = t, this.defaultsReady = !0;
561
+ return;
562
+ }
563
+ this.sheet = document.createElement("style"), this.sheet.id = "fibo-dynamic-styles", this.sheet.setAttribute("data-fibo", "1"), document.head.appendChild(this.sheet);
544
564
  }
545
565
  /**
546
- * CSS `@media` rule, deduped. Used by `.media()` / `.md()` — not JS resize.
566
+ * CSS `@media` rule, deduped. Used by `.media()` / `.md()` / `.responsive()` — not JS resize.
547
567
  */
548
568
  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;
569
+ const i = `@media ${t}|${e}:${s}`;
570
+ if (this.cache.has(i))
571
+ return this.cache.get(i);
572
+ const o = `fibo-mq-${Z(i)}`, n = `@media ${t} { .${o} { ${e}: ${s} !important; } }`;
573
+ return this.insert(n), this.cache.set(i, o), o;
554
574
  }
555
575
  ensureDefaults() {
556
576
  var t;
557
577
  this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((t = this.sheet.textContent) != null && t.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(F)));
558
578
  }
559
579
  getCss() {
560
- var e;
561
580
  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(`
581
+ const t = [...this.extras].sort();
582
+ return [F, ...t].filter(Boolean).join(`
565
583
  `);
566
584
  }
567
585
  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;
586
+ const i = `kf:${e}=>${s}`;
587
+ if (this.cache.has(i)) return this.cache.get(i);
588
+ const o = `fibo-c-${t}`;
589
+ return this.insert(`@keyframes ${o} { from { ${e} } to { ${s} } }`), this.insert(`.${o} { animation-name: ${o}; }`), this.cache.set(i, o), o;
572
590
  }
573
591
  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));
592
+ var s;
593
+ if (!(e && this.extras.includes(t)) && (e && this.extras.push(t), !(this.sheet && ((s = this.sheet.textContent) != null && s.includes(t)))))
594
+ if (this.sheet && this.sheet.sheet)
595
+ try {
596
+ this.sheet.sheet.insertRule(t, this.sheet.sheet.cssRules.length);
597
+ } catch {
598
+ this.sheet && this.sheet.appendChild(document.createTextNode(t));
599
+ }
600
+ else this.sheet && this.sheet.appendChild(document.createTextNode(t));
581
601
  }
582
602
  /** Set a `:root` custom property (e.g. `--fibo-sticky-offset`). */
583
603
  registerRoot(t, e) {
@@ -593,110 +613,118 @@ const F = `
593
613
  const s = `${t}:${e}`;
594
614
  if (this.cache.has(s))
595
615
  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;
616
+ const i = e.replace(/[^a-zA-Z0-9-]/g, "_"), o = `fibo-${t}-${i}`, n = `.${o} { ${t}: ${e} !important; }`;
617
+ return this.insert(n), this.cache.set(s, o), o;
598
618
  }
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;
619
+ /**
620
+ * One class per (pseudo, property, value). Same rules → same class on server and client.
621
+ * Order-independent: each declaration hashes on its own.
622
+ */
623
+ registerPseudo(t, e, s, i = !1) {
624
+ const o = `${i ? "group:" : ""}${t}:${e}:${s}`;
625
+ if (this.cache.has(o))
626
+ return this.cache.get(o);
627
+ const n = `fibo-ps-${Z(o)}`, a = i ? `.group:${t} .${n} { ${e}: ${s} !important; }` : `.${n}:${t} { ${e}: ${s} !important; }`;
628
+ return this.insert(a), this.cache.set(o, n), n;
605
629
  }
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;
630
+ registerGroupPseudo(t, e, s, i) {
631
+ return this.registerPseudo(e, s, i, !0);
612
632
  }
613
633
  };
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);
634
+ c($, "instance");
635
+ let T = $;
636
+ const f = T.getInstance();
637
+ function _() {
638
+ T.getInstance().ensureDefaults();
639
+ }
640
+ function we() {
641
+ return T.getInstance().getCss();
621
642
  }
622
- const u = W.getInstance();
623
- function x() {
624
- u.ensureDefaults();
643
+ function nt() {
644
+ return T.getInstance().getCss();
645
+ }
646
+ function Se() {
647
+ return `<style id="fibo-dynamic-styles" data-fibo="1">${nt().replace(/<\/style/gi, "<\\/style")}</style>`;
625
648
  }
626
649
  function ve() {
627
- return u.getCss();
650
+ return _(), g.createElement("style", {
651
+ id: "fibo-dynamic-styles",
652
+ "data-fibo": "1",
653
+ suppressHydrationWarning: !0,
654
+ dangerouslySetInnerHTML: { __html: nt() }
655
+ });
628
656
  }
629
- function Xt() {
630
- return x(), g.createElement("style", {
657
+ function Bt() {
658
+ return _(), g.createElement("style", {
631
659
  id: "fibo-motion-presets",
632
660
  "data-fibo-motion": "1",
633
661
  dangerouslySetInnerHTML: { __html: F }
634
662
  });
635
663
  }
636
- const nt = {
664
+ const at = {
637
665
  sm: 640,
638
666
  md: 768,
639
667
  lg: 1024,
640
668
  xl: 1280
641
669
  };
642
- function Ht(r) {
643
- return r in nt;
670
+ function Wt(r) {
671
+ return r in at;
644
672
  }
645
- function Yt(r) {
646
- if (Ht(r))
647
- return `(min-width: ${nt[r]}px)`;
673
+ function Ht(r) {
674
+ if (Wt(r))
675
+ return `(min-width: ${at[r]}px)`;
648
676
  const t = r.trim();
649
677
  return t.startsWith("@media") ? t.replace(/^@media\s+/, "") : t;
650
678
  }
651
- function at(r) {
679
+ function ct(r) {
652
680
  var t, e, s = "";
653
681
  if (typeof r == "string" || typeof r == "number") s += r;
654
682
  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);
683
+ var i = r.length;
684
+ for (t = 0; t < i; t++) r[t] && (e = ct(r[t])) && (s && (s += " "), s += e);
657
685
  } else for (e in r) r[e] && (s && (s += " "), s += e);
658
686
  return s;
659
687
  }
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);
688
+ function Xt() {
689
+ for (var r, t, e = 0, s = "", i = arguments.length; e < i; e++) (r = arguments[e]) && (t = ct(r)) && (s && (s += " "), s += t);
662
690
  return s;
663
691
  }
664
692
  function Kt(r) {
665
693
  const t = r.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
666
694
  if (!t)
667
695
  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) => {
696
+ 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
697
  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;
698
+ const P = (X = Math.round(I * 255).toString(16)) == null ? void 0 : X.toUpperCase();
699
+ return P.length === 1 ? `0${P}` : P;
672
700
  };
673
- return `#${D(pt)}${D(gt)}${D(bt)}`;
701
+ return `#${V(dt)}${V(mt)}${V(pt)}`;
674
702
  }
675
- function Gt(r) {
703
+ function Yt(r) {
676
704
  const t = {}, e = {}, s = r.split(`
677
705
  `);
678
- for (const o of s) {
679
- const i = o.trim();
680
- if (!i || i.startsWith("//") || i.startsWith("*") || i === "@theme {" || i === "}")
706
+ for (const i of s) {
707
+ const o = i.trim();
708
+ if (!o || o.startsWith("//") || o.startsWith("*") || o === "@theme {" || o === "}")
681
709
  continue;
682
- const n = i.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = i.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
710
+ const n = o.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = o.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
683
711
  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;
712
+ const [, l, d] = n, h = Kt(d);
688
713
  t[h.toLowerCase()] = `bg-${l}`, e[h.toLowerCase()] = `text-${l}`;
714
+ } else if (a) {
715
+ const [, l, d] = a;
716
+ t[d.toLowerCase()] = `bg-${l}`, e[d.toLowerCase()] = `text-${l}`;
689
717
  }
690
718
  }
691
719
  return { background: t, text: e };
692
720
  }
693
- const qt = (r) => {
721
+ const Ut = (r) => {
694
722
  if (r !== void 0)
695
723
  return typeof r == "number" ? `${r}px` : r.toString();
696
- }, C = (r, t) => {
697
- const e = qt(t);
724
+ }, N = (r, t) => {
725
+ const e = Ut(t);
698
726
  return e === void 0 ? "" : `${r}-[${e}]`;
699
- }, Zt = `
727
+ }, Gt = `
700
728
  --color-red-50: oklch(0.971 0.013 17.38);
701
729
  --color-red-100: oklch(0.936 0.032 17.717);
702
730
  --color-red-200: oklch(0.885 0.062 18.334);
@@ -941,7 +969,7 @@ const qt = (r) => {
941
969
  --color-stone-950: oklch(0.147 0.004 49.25);
942
970
  --color-black: #000;
943
971
  --color-white: #fff;
944
- `, Jt = Gt(Zt), ct = {
972
+ `, Zt = Yt(Gt), lt = {
945
973
  borderRadius: {
946
974
  0: "rounded-none",
947
975
  "0px": "rounded-none",
@@ -1038,7 +1066,7 @@ const qt = (r) => {
1038
1066
  fixed: "fixed",
1039
1067
  sticky: "sticky"
1040
1068
  }
1041
- }, Qt = (r, t) => ({
1069
+ }, qt = (r, t) => ({
1042
1070
  // 背景色
1043
1071
  backgroundColor: (e) => e.backgroundColor ? [r.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
1044
1072
  // 文字色
@@ -1047,15 +1075,15 @@ const qt = (r) => {
1047
1075
  borderRadius: (e) => {
1048
1076
  if (!e.borderRadius)
1049
1077
  return [];
1050
- const s = ct.borderRadius[e.borderRadius] || C("rounded", e.borderRadius);
1078
+ const s = lt.borderRadius[e.borderRadius] || N("rounded", e.borderRadius);
1051
1079
  return s ? [s] : [];
1052
1080
  },
1053
1081
  // 外边距
1054
1082
  margin: (e) => {
1055
1083
  const s = [];
1056
1084
  if (e.margin !== void 0) {
1057
- const i = C("m", e.margin);
1058
- return i ? [i] : [];
1085
+ const o = N("m", e.margin);
1086
+ return o ? [o] : [];
1059
1087
  }
1060
1088
  return [
1061
1089
  { prop: e.marginTop, dir: "mt" },
@@ -1064,9 +1092,9 @@ const qt = (r) => {
1064
1092
  { prop: e.marginLeft, dir: "ml" },
1065
1093
  { prop: e.marginX, dir: "mx" },
1066
1094
  { prop: e.marginY, dir: "my" }
1067
- ].forEach(({ prop: i, dir: n }) => {
1068
- if (i !== void 0) {
1069
- const a = C(n, i);
1095
+ ].forEach(({ prop: o, dir: n }) => {
1096
+ if (o !== void 0) {
1097
+ const a = N(n, o);
1070
1098
  a && s.push(a);
1071
1099
  }
1072
1100
  }), s;
@@ -1075,8 +1103,8 @@ const qt = (r) => {
1075
1103
  padding: (e) => {
1076
1104
  const s = [];
1077
1105
  if (e.padding !== void 0) {
1078
- const i = C("p", e.padding);
1079
- return i ? [i] : [];
1106
+ const o = N("p", e.padding);
1107
+ return o ? [o] : [];
1080
1108
  }
1081
1109
  return [
1082
1110
  { prop: e.paddingTop, dir: "pt" },
@@ -1085,9 +1113,9 @@ const qt = (r) => {
1085
1113
  { prop: e.paddingLeft, dir: "pl" },
1086
1114
  { prop: e.paddingX, dir: "px" },
1087
1115
  { prop: e.paddingY, dir: "py" }
1088
- ].forEach(({ prop: i, dir: n }) => {
1089
- if (i !== void 0) {
1090
- const a = C(n, i);
1116
+ ].forEach(({ prop: o, dir: n }) => {
1117
+ if (o !== void 0) {
1118
+ const a = N(n, o);
1091
1119
  a && s.push(a);
1092
1120
  }
1093
1121
  }), s;
@@ -1096,28 +1124,28 @@ const qt = (r) => {
1096
1124
  font: (e) => {
1097
1125
  const s = [];
1098
1126
  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);
1127
+ const i = t.fontWeight[e.fontWeight.toString()];
1128
+ i && s.push(i);
1101
1129
  }
1102
1130
  if (e.textAlign) {
1103
- const o = t.textAlign[e.textAlign];
1104
- o && s.push(o);
1131
+ const i = t.textAlign[e.textAlign];
1132
+ i && s.push(i);
1105
1133
  }
1106
1134
  if (e.fontFamily) {
1107
- const o = t.fontFamily[e.fontFamily];
1108
- o && s.push(o);
1135
+ const i = t.fontFamily[e.fontFamily];
1136
+ i && s.push(i);
1109
1137
  }
1110
1138
  if (e.textDecoration) {
1111
- const o = t.textDecoration[e.textDecoration];
1112
- o && s.push(o);
1139
+ const i = t.textDecoration[e.textDecoration];
1140
+ i && s.push(i);
1113
1141
  }
1114
1142
  if (e.fontVariantNumeric) {
1115
- const o = t.fontVariantNumeric[e.fontVariantNumeric];
1116
- o && s.push(o);
1143
+ const i = t.fontVariantNumeric[e.fontVariantNumeric];
1144
+ i && s.push(i);
1117
1145
  }
1118
1146
  if (e.fontStyle) {
1119
- const o = t.fontStyle[e.fontStyle];
1120
- o && s.push(o);
1147
+ const i = t.fontStyle[e.fontStyle];
1148
+ i && s.push(i);
1121
1149
  }
1122
1150
  return s;
1123
1151
  },
@@ -1125,12 +1153,12 @@ const qt = (r) => {
1125
1153
  size: (e) => {
1126
1154
  const s = [];
1127
1155
  if (e.width) {
1128
- const o = e.width.toString();
1129
- s.push(`w-[${o}]`);
1156
+ const i = e.width.toString();
1157
+ s.push(`w-[${i}]`);
1130
1158
  }
1131
1159
  if (e.height) {
1132
- const o = e.height.toString();
1133
- s.push(`h-[${o}]`);
1160
+ const i = e.height.toString();
1161
+ s.push(`h-[${i}]`);
1134
1162
  }
1135
1163
  return s;
1136
1164
  },
@@ -1138,20 +1166,20 @@ const qt = (r) => {
1138
1166
  layout: (e) => {
1139
1167
  const s = [];
1140
1168
  if (e.display) {
1141
- const o = t.display[e.display];
1142
- o && s.push(o);
1169
+ const i = t.display[e.display];
1170
+ i && s.push(i);
1143
1171
  }
1144
1172
  if (e.flexDirection) {
1145
- const i = {
1173
+ const o = {
1146
1174
  row: "flex-row",
1147
1175
  column: "flex-col",
1148
1176
  "row-reverse": "flex-row-reverse",
1149
1177
  "column-reverse": "flex-col-reverse"
1150
1178
  }[e.flexDirection];
1151
- i && s.push(i);
1179
+ o && s.push(o);
1152
1180
  }
1153
1181
  if (e.justifyContent) {
1154
- const i = {
1182
+ const o = {
1155
1183
  "flex-start": "justify-start",
1156
1184
  "flex-end": "justify-end",
1157
1185
  center: "justify-center",
@@ -1159,21 +1187,21 @@ const qt = (r) => {
1159
1187
  "space-around": "justify-around",
1160
1188
  "space-evenly": "justify-evenly"
1161
1189
  }[e.justifyContent];
1162
- i && s.push(i);
1190
+ o && s.push(o);
1163
1191
  }
1164
1192
  if (e.alignItems) {
1165
- const i = {
1193
+ const o = {
1166
1194
  "flex-start": "items-start",
1167
1195
  "flex-end": "items-end",
1168
1196
  center: "items-center",
1169
1197
  baseline: "items-baseline",
1170
1198
  stretch: "items-stretch"
1171
1199
  }[e.alignItems];
1172
- i && s.push(i);
1200
+ o && s.push(o);
1173
1201
  }
1174
1202
  if (e.gap) {
1175
- const o = C("gap", e.gap);
1176
- o && s.push(o);
1203
+ const i = N("gap", e.gap);
1204
+ i && s.push(i);
1177
1205
  }
1178
1206
  return s;
1179
1207
  },
@@ -1194,7 +1222,7 @@ const qt = (r) => {
1194
1222
  },
1195
1223
  // 自定义类名
1196
1224
  className: (e) => e.className ? [e.className] : []
1197
- }), te = {
1225
+ }), Jt = {
1198
1226
  backgroundColor: "backgroundColor",
1199
1227
  color: "color",
1200
1228
  borderRadius: "borderRadius",
@@ -1228,59 +1256,58 @@ const qt = (r) => {
1228
1256
  position: "position",
1229
1257
  opacity: "opacity",
1230
1258
  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();
1259
+ }, Qt = (r, t) => {
1260
+ 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
1261
  return Object.keys(r).forEach((a) => {
1234
- const l = te[a];
1262
+ const l = Jt[a];
1235
1263
  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);
1264
+ const d = i[l];
1265
+ if (d) {
1266
+ const h = d(r);
1267
+ o.push(...h), n.add(l);
1240
1268
  }
1241
1269
  }
1242
- }), i.filter(Boolean).join(" ");
1270
+ }), o.filter(Boolean).join(" ");
1243
1271
  };
1244
- function se(r) {
1272
+ function te(r) {
1245
1273
  const t = {};
1246
1274
  return r.forEach((e, s) => {
1247
1275
  t[s] = e.value;
1248
1276
  }), t;
1249
1277
  }
1250
- function re({ animatedProps: r, animationConfig: t, children: e }) {
1251
- const [s, o] = q(
1252
- () => se(r)
1278
+ function ee({ animatedProps: r, animationConfig: t, children: e }) {
1279
+ const [s, i] = q(
1280
+ () => te(r)
1253
1281
  );
1254
- j(() => {
1282
+ A(() => {
1255
1283
  const l = [];
1256
- return r.forEach((h, f) => {
1257
- const d = (m) => {
1258
- o((p) => ({
1284
+ return r.forEach((d, h) => {
1285
+ const u = (m) => {
1286
+ i((p) => ({
1259
1287
  ...p,
1260
- [f]: m
1288
+ [h]: m
1261
1289
  }));
1262
1290
  };
1263
- l.push(h.subscribe(d)), d(h.value);
1291
+ l.push(d.subscribe(u)), u(d.value);
1264
1292
  }), () => {
1265
- l.forEach((h) => h());
1293
+ l.forEach((d) => d());
1266
1294
  };
1267
1295
  }, [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)`);
1296
+ const o = [];
1297
+ 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
1298
  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 });
1299
+ if (o.length > 0 && (n.transform = o.join(" ")), t) {
1300
+ const { duration: l = 300, curve: d = "easeOut", stiffness: h, damping: u } = t, m = v(d, { stiffness: h, damping: u });
1273
1301
  n.transition = `transform ${l}ms ${m}`;
1274
1302
  }
1275
1303
  const a = {
1276
1304
  ...e.props.style,
1277
1305
  ...n
1278
1306
  };
1279
- return Z(e, { style: a });
1307
+ return yt(e, { style: a });
1280
1308
  }
1281
- class _ {
1282
- constructor(t, e, s, o = !1) {
1283
- c(this, "baseClassName");
1309
+ class k {
1310
+ constructor(t, e, s = !1) {
1284
1311
  c(this, "pseudoState");
1285
1312
  c(this, "parentBuilder");
1286
1313
  c(this, "isGroup");
@@ -1289,7 +1316,7 @@ class _ {
1289
1316
  c(this, "transitionDelay", 0);
1290
1317
  c(this, "transitionProperties", ["all"]);
1291
1318
  c(this, "transforms", /* @__PURE__ */ new Map());
1292
- this.baseClassName = t, this.pseudoState = e, this.parentBuilder = s, this.isGroup = o;
1319
+ this.pseudoState = t, this.parentBuilder = e, this.isGroup = s;
1293
1320
  }
1294
1321
  bg(t) {
1295
1322
  return this.set("background-color", t);
@@ -1329,17 +1356,17 @@ class _ {
1329
1356
  css(t, e) {
1330
1357
  return this.set(t, e);
1331
1358
  }
1332
- transition(t, e, s, o) {
1359
+ transition(t, e, s, i) {
1333
1360
  if (typeof t == "string" && e === void 0)
1334
1361
  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}`);
1362
+ const o = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = v(s || this.transitionEasing), l = i ? `${i}ms` : "0ms";
1363
+ return this.set("transition", `${o} ${n} ${a} ${l}`);
1337
1364
  }
1338
1365
  duration(t) {
1339
1366
  return this.transitionDuration = t, this.applyTransition(), this;
1340
1367
  }
1341
1368
  easing(t) {
1342
- return this.transitionEasing = N(t), this.applyTransition(), this;
1369
+ return this.transitionEasing = v(t), this.applyTransition(), this;
1343
1370
  }
1344
1371
  ease(t) {
1345
1372
  return this.easing(t);
@@ -1351,38 +1378,21 @@ class _ {
1351
1378
  return this.transitionProperties = t, this.applyTransition(), this;
1352
1379
  }
1353
1380
  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}`);
1381
+ const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing, i = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
1382
+ this.set("transition", `${t} ${e} ${s} ${i}`);
1356
1383
  }
1357
1384
  flushTransform() {
1358
1385
  return this.set("transform", [...this.transforms.values()].join(" "));
1359
1386
  }
1360
1387
  set(t, e) {
1361
- return this.isGroup ? u.registerGroupPseudo(this.baseClassName, this.pseudoState, t, e) : u.registerPseudo(this.baseClassName, this.pseudoState, t, e), this;
1388
+ const s = f.registerPseudo(this.pseudoState, t, e, this.isGroup);
1389
+ return this.parentBuilder.addClassName(s), this;
1362
1390
  }
1363
1391
  end() {
1364
1392
  return this.parentBuilder;
1365
1393
  }
1366
1394
  }
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) {
1395
+ function Ce(r, t) {
1386
1396
  if (typeof document > "u") return;
1387
1397
  const e = typeof r == "string" ? document.querySelector(r) : r;
1388
1398
  e && e.scrollIntoView({
@@ -1390,7 +1400,7 @@ function Ee(r, t) {
1390
1400
  block: (t == null ? void 0 : t.block) ?? "start"
1391
1401
  });
1392
1402
  }
1393
- function Me(r) {
1403
+ function Ne(r) {
1394
1404
  const t = typeof document < "u" ? document : void 0, e = t == null ? void 0 : t.startViewTransition;
1395
1405
  if (typeof e == "function") {
1396
1406
  e.call(t, r);
@@ -1398,62 +1408,62 @@ function Me(r) {
1398
1408
  }
1399
1409
  r();
1400
1410
  }
1401
- function ie() {
1411
+ function se() {
1402
1412
  return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
1403
1413
  }
1404
- function ne() {
1414
+ function re() {
1405
1415
  return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
1406
1416
  }
1407
- function ae({
1417
+ function oe({
1408
1418
  preset: r = "fadeUp",
1409
1419
  once: t = !0,
1410
1420
  rootMargin: e = "0px 0px -8% 0px",
1411
1421
  threshold: s = 0.12,
1412
- forceMotion: o = !1,
1413
- preferTimeline: i = !1,
1422
+ forceMotion: i = !1,
1423
+ preferTimeline: o = !1,
1414
1424
  children: n
1415
1425
  }) {
1416
1426
  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");
1427
+ A(() => {
1428
+ _();
1429
+ const d = a.current;
1430
+ if (!d) return;
1431
+ if (o && se()) {
1432
+ d.classList.add("fibo-inview");
1423
1433
  return;
1424
1434
  }
1425
1435
  if (typeof IntersectionObserver > "u") {
1426
- h.classList.add("fibo-inview");
1436
+ d.classList.add("fibo-inview");
1427
1437
  return;
1428
1438
  }
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");
1439
+ const h = new IntersectionObserver(
1440
+ (u) => {
1441
+ for (const m of u)
1442
+ m.isIntersecting ? (m.target.classList.add("fibo-inview"), t && h.unobserve(m.target)) : t || m.target.classList.remove("fibo-inview");
1433
1443
  },
1434
1444
  { rootMargin: e, threshold: s }
1435
1445
  );
1436
- return f.observe(h), () => f.disconnect();
1437
- }, [t, e, s, i]);
1446
+ return h.observe(d), () => h.disconnect();
1447
+ }, [t, e, s, o]);
1438
1448
  const l = [
1439
1449
  "fibo-reveal",
1440
1450
  `fibo-reveal-${r}`,
1441
- o ? "fibo-motion-force" : ""
1451
+ i ? "fibo-motion-force" : ""
1442
1452
  ].filter(Boolean).join(" ");
1443
1453
  return g.createElement("div", { ref: a, className: l, "data-fibo-reveal": r }, n);
1444
1454
  }
1445
- function ce({ children: r }) {
1455
+ function ie({ children: r }) {
1446
1456
  const t = w(null);
1447
- return j(() => {
1448
- if (x(), ne()) return;
1457
+ return A(() => {
1458
+ if (_(), re()) return;
1449
1459
  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);
1460
+ var o, n;
1461
+ return ((o = t.current) == null ? void 0 : o.querySelector(".fibo-scroll-progress")) ?? ((n = t.current) == null ? void 0 : n.firstElementChild);
1452
1462
  }, 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));
1463
+ const i = e();
1464
+ if (!i) return;
1465
+ const o = document.documentElement.scrollHeight - window.innerHeight, n = o > 0 ? Math.min(1, Math.max(0, window.scrollY / o)) : 0;
1466
+ i.style.setProperty("--fibo-progress", String(n));
1457
1467
  };
1458
1468
  return s(), window.addEventListener("scroll", s, { passive: !0 }), window.addEventListener("resize", s), () => {
1459
1469
  window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
@@ -1464,8 +1474,8 @@ function ce({ children: r }) {
1464
1474
  r
1465
1475
  );
1466
1476
  }
1467
- const ft = 64, le = `${ft}px`;
1468
- class Te {
1477
+ const ht = 64, ne = `${ht}px`;
1478
+ class Ee {
1469
1479
  constructor() {
1470
1480
  /** @internal Extra DOM props forwarded to the host element. */
1471
1481
  c(this, "_props", {});
@@ -1473,7 +1483,6 @@ class Te {
1473
1483
  c(this, "_cssStyles", {});
1474
1484
  c(this, "_classNames", []);
1475
1485
  c(this, "_children", []);
1476
- c(this, "_responsive");
1477
1486
  c(this, "_theme");
1478
1487
  c(this, "_state", /* @__PURE__ */ new Map());
1479
1488
  c(this, "_providers", /* @__PURE__ */ new Map());
@@ -1484,7 +1493,6 @@ class Te {
1484
1493
  c(this, "_animationConfig");
1485
1494
  c(this, "_animatedProps", /* @__PURE__ */ new Map());
1486
1495
  c(this, "_transforms", []);
1487
- c(this, "_pseudoStateClassName");
1488
1496
  c(this, "_transitionClass");
1489
1497
  c(this, "_motionClass");
1490
1498
  c(this, "_staggerMs");
@@ -1520,7 +1528,7 @@ class Te {
1520
1528
  */
1521
1529
  anchor(t) {
1522
1530
  return this.id(t), this._explicitScrollMargin || this._classNames.push(
1523
- u.register("scroll-margin-top", "var(--fibo-sticky-offset, 0px)")
1531
+ f.register("scroll-margin-top", "var(--fibo-sticky-offset, 0px)")
1524
1532
  ), this;
1525
1533
  }
1526
1534
  /**
@@ -1530,30 +1538,37 @@ class Te {
1530
1538
  scrollMargin(t) {
1531
1539
  this._explicitScrollMargin = !0;
1532
1540
  const e = typeof t == "number" ? `${t}px` : t;
1533
- return this._classNames.push(u.register("scroll-margin-top", e)), this;
1541
+ return this._classNames.push(f.register("scroll-margin-top", e)), this;
1542
+ }
1543
+ /** Stamp a class onto the host. Used by PseudoStateBuilder (hashed `:hover` etc.). */
1544
+ addClassName(t) {
1545
+ return t && !this._classNames.includes(t) && this._classNames.push(t), this;
1534
1546
  }
1535
1547
  /**
1536
- * React list key. After this is called, React reads the key as a string.
1548
+ * React list key. After this is called, React reads the key as a string
1549
+ * on both the builder element and the inner host wrapper.
1537
1550
  * Builders are valid elements — you do not need `.build()`.
1538
1551
  */
1539
1552
  key(t) {
1540
- return this._props.key = t, this;
1553
+ this._props.key = t;
1554
+ const e = this.__fiboElementProps;
1555
+ return e && typeof e == "object" && (this.__fiboElementProps = { ...e, key: String(t) }), this;
1541
1556
  }
1542
1557
  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;
1558
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("padding-left", e), i = f.register("padding-right", e);
1559
+ return this._classNames.push(s, i), this;
1545
1560
  }
1546
1561
  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;
1562
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("padding-top", e), i = f.register("padding-bottom", e);
1563
+ return this._classNames.push(s, i), this;
1549
1564
  }
1550
1565
  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;
1566
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("margin-left", e), i = f.register("margin-right", e);
1567
+ return this._classNames.push(s, i), this;
1553
1568
  }
1554
1569
  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;
1570
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("margin-top", e), i = f.register("margin-bottom", e);
1571
+ return this._classNames.push(s, i), this;
1557
1572
  }
1558
1573
  flexDirection(t) {
1559
1574
  return this._classNames.push(`flex-${t}`), this;
@@ -1567,7 +1582,7 @@ class Te {
1567
1582
  flex(t) {
1568
1583
  if (this._classNames.push("flex"), t !== void 0)
1569
1584
  if (typeof t == "number") {
1570
- const e = u.register("flex", String(t));
1585
+ const e = f.register("flex", String(t));
1571
1586
  this._classNames.push(e);
1572
1587
  } else typeof t == "string" && this._classNames.push(`flex-${t}`);
1573
1588
  return this;
@@ -1618,18 +1633,18 @@ class Te {
1618
1633
  return this._classNames.push("h-full"), this;
1619
1634
  }
1620
1635
  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;
1636
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("width", e), i = f.register("height", e);
1637
+ return this._classNames.push(s, i), this;
1623
1638
  }
1624
1639
  circle() {
1625
1640
  return this._classNames.push("rounded-full"), this;
1626
1641
  }
1627
1642
  opacity(t) {
1628
- const e = u.register("opacity", String(t));
1643
+ const e = f.register("opacity", String(t));
1629
1644
  return this._classNames.push(e), this;
1630
1645
  }
1631
1646
  p(t) {
1632
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding", e);
1647
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("padding", e);
1633
1648
  return this._classNames.push(s), this;
1634
1649
  }
1635
1650
  px(t) {
@@ -1645,7 +1660,7 @@ class Te {
1645
1660
  return this.paddingVertical(t);
1646
1661
  }
1647
1662
  m(t) {
1648
- const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin", e);
1663
+ const e = typeof t == "number" ? `${t}px` : t, s = f.register("margin", e);
1649
1664
  return this._classNames.push(s), this;
1650
1665
  }
1651
1666
  mx(t) {
@@ -1661,15 +1676,15 @@ class Te {
1661
1676
  return this.marginVertical(t);
1662
1677
  }
1663
1678
  bg(t) {
1664
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("background-color", e);
1679
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = f.register("background-color", e);
1665
1680
  return this._classNames.push(s), this;
1666
1681
  }
1667
1682
  text(t) {
1668
- const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1683
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = f.register("color", e);
1669
1684
  return this._classNames.push(s), this;
1670
1685
  }
1671
1686
  color(t) {
1672
- 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);
1673
1688
  return this._classNames.push(s), this;
1674
1689
  }
1675
1690
  resolveSemanticColor(t) {
@@ -1699,8 +1714,8 @@ class Te {
1699
1714
  }
1700
1715
  shadow(t) {
1701
1716
  if (t === null || t === "none") {
1702
- const i = u.register("box-shadow", "none");
1703
- return this._classNames.push(i), this;
1717
+ const o = f.register("box-shadow", "none");
1718
+ return this._classNames.push(o), this;
1704
1719
  }
1705
1720
  const e = {
1706
1721
  sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
@@ -1713,11 +1728,11 @@ class Te {
1713
1728
  modal: "0 10px 40px rgba(0, 0, 0, 0.2)",
1714
1729
  float: "0 8px 16px rgba(0, 0, 0, 0.15)",
1715
1730
  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) + ")";
1731
+ }, 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) => {
1732
+ let u = a || "rgba(0, 0, 0, " + (l ?? 0.1) + ")";
1718
1733
  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})`;
1734
+ const y = parseInt(a.slice(1, 3), 16), b = parseInt(a.slice(3, 5), 16), x = parseInt(a.slice(5, 7), 16);
1735
+ u = `rgba(${y}, ${b}, ${x}, ${l})`;
1721
1736
  }
1722
1737
  const p = {
1723
1738
  sm: "2px",
@@ -1726,57 +1741,62 @@ class Te {
1726
1741
  xl: "12px",
1727
1742
  "2xl": "16px"
1728
1743
  }[n] || "4px";
1729
- switch (i) {
1744
+ switch (o) {
1730
1745
  case "top":
1731
- return `0 -${p} ${p} -1px ${d}`;
1746
+ return `0 -${p} ${p} -1px ${u}`;
1732
1747
  case "bottom":
1733
- return `0 ${p} ${p} -1px ${d}`;
1748
+ return `0 ${p} ${p} -1px ${u}`;
1734
1749
  case "left":
1735
- return `-${p} 0 ${p} -1px ${d}`;
1750
+ return `-${p} 0 ${p} -1px ${u}`;
1736
1751
  case "right":
1737
- return `${p} 0 ${p} -1px ${d}`;
1752
+ return `${p} 0 ${p} -1px ${u}`;
1738
1753
  case "top-bottom":
1739
1754
  case "vertical":
1740
- return `0 -${p} ${p} -1px ${d}, 0 ${p} ${p} -1px ${d}`;
1755
+ return `0 -${p} ${p} -1px ${u}, 0 ${p} ${p} -1px ${u}`;
1741
1756
  case "left-right":
1742
1757
  case "horizontal":
1743
- return `-${p} 0 ${p} -1px ${d}, ${p} 0 ${p} -1px ${d}`;
1758
+ return `-${p} 0 ${p} -1px ${u}, ${p} 0 ${p} -1px ${u}`;
1744
1759
  case "all":
1745
1760
  default:
1746
1761
  return e[n] || e.md;
1747
1762
  }
1748
1763
  };
1749
1764
  if (!t) {
1750
- const i = u.register("box-shadow", e.md);
1751
- return this._classNames.push(i), this;
1765
+ const o = f.register("box-shadow", e.md);
1766
+ return this._classNames.push(o), this;
1752
1767
  }
1753
1768
  if (typeof t == "string") {
1754
1769
  if (s(t)) {
1755
- const a = o("all", "md", t), l = u.register("box-shadow", a);
1770
+ const a = i("all", "md", t), l = f.register("box-shadow", a);
1756
1771
  return this._classNames.push(l), this;
1757
1772
  }
1758
- const i = e[t] || e.md, n = u.register("box-shadow", i);
1773
+ const o = e[t] || e.md, n = f.register("box-shadow", o);
1759
1774
  return this._classNames.push(n), this;
1760
1775
  }
1761
1776
  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);
1777
+ const [o, n, a, l] = t;
1778
+ if (typeof o == "string" && s(o)) {
1779
+ const u = i("all", "md", o, n), m = f.register("box-shadow", u);
1765
1780
  return this._classNames.push(m), this;
1766
1781
  }
1767
- const h = i;
1782
+ const d = o;
1768
1783
  if (typeof n == "string" && s(n)) {
1769
- const d = o(h, "md", n, a), m = u.register("box-shadow", d);
1784
+ const u = i(d, "md", n, a), m = f.register("box-shadow", u);
1770
1785
  return this._classNames.push(m), this;
1771
1786
  } else {
1772
- const m = o(h, n, a, l), p = u.register("box-shadow", m);
1787
+ const m = i(d, n, a, l), p = f.register("box-shadow", m);
1773
1788
  return this._classNames.push(p), this;
1774
1789
  }
1775
1790
  }
1776
1791
  return this;
1777
1792
  }
1793
+ /**
1794
+ * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
1795
+ * Tiers stay mutually exclusive: mobile `<768`, tablet `768–1023`, desktop `≥1024`.
1796
+ * No `window.innerWidth` — hydrate-safe.
1797
+ */
1778
1798
  responsive(t) {
1779
- return this._responsive = t, this;
1799
+ 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
1800
  }
1781
1801
  /**
1782
1802
  * CSS `@media` (min-width or a raw query). Compiles to a class — no resize JS.
@@ -1784,7 +1804,11 @@ class Te {
1784
1804
  * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
1785
1805
  */
1786
1806
  media(t, e) {
1787
- const s = Yt(t), o = /* @__PURE__ */ new Set([
1807
+ return this.registerMediaStyles(Ht(t), e), this;
1808
+ }
1809
+ registerMediaStyles(t, e) {
1810
+ if (!e) return;
1811
+ const s = /* @__PURE__ */ new Set([
1788
1812
  "opacity",
1789
1813
  "zIndex",
1790
1814
  "z-index",
@@ -1795,12 +1819,11 @@ class Te {
1795
1819
  "fontWeight",
1796
1820
  "lineHeight"
1797
1821
  ]);
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));
1822
+ for (const [i, o] of Object.entries(e)) {
1823
+ if (o == null) continue;
1824
+ const n = i.replace(/[A-Z]/g, (l) => `-${l.toLowerCase()}`), a = typeof o == "number" && !s.has(i) && !s.has(n) ? `${o}px` : String(o);
1825
+ this._classNames.push(f.registerMedia(t, n, a));
1802
1826
  }
1803
- return this;
1804
1827
  }
1805
1828
  sm(t) {
1806
1829
  return this.media("sm", t);
@@ -1816,23 +1839,23 @@ class Te {
1816
1839
  }
1817
1840
  rounded(t) {
1818
1841
  if (typeof t == "number") {
1819
- const e = u.register("border-radius", `${t}px`);
1842
+ const e = f.register("border-radius", `${t}px`);
1820
1843
  this._classNames.push(e);
1821
1844
  } else if (typeof t == "string" && (t.startsWith("rounded-") || ["sm", "md", "lg", "xl", "2xl", "3xl", "full", "none"].includes(t))) {
1822
1845
  const e = t.startsWith("rounded-") ? t : `rounded-${t}`;
1823
1846
  this._classNames.push(e);
1824
1847
  } else {
1825
- const e = u.register("border-radius", t);
1848
+ const e = f.register("border-radius", t);
1826
1849
  this._classNames.push(e);
1827
1850
  }
1828
1851
  return this;
1829
1852
  }
1830
1853
  borderRadius(t) {
1831
1854
  if (typeof t == "number") {
1832
- const e = u.register("border-radius", `${t}px`);
1855
+ const e = f.register("border-radius", `${t}px`);
1833
1856
  this._classNames.push(e);
1834
1857
  } else {
1835
- const e = u.register("border-radius", t);
1858
+ const e = f.register("border-radius", t);
1836
1859
  this._classNames.push(e);
1837
1860
  }
1838
1861
  return this;
@@ -1843,45 +1866,45 @@ class Te {
1843
1866
  else if (["red", "blue", "green", "gray", "white", "black", "transparent"].some((e) => t.includes(e)))
1844
1867
  this._classNames.push(`border-${t}`);
1845
1868
  else {
1846
- const e = u.register("border-color", t);
1869
+ const e = f.register("border-color", t);
1847
1870
  this._classNames.push(e);
1848
1871
  }
1849
1872
  return this;
1850
1873
  }
1851
1874
  width(t) {
1852
1875
  if (typeof t == "number") {
1853
- const e = u.register("width", `${t}px`);
1876
+ const e = f.register("width", `${t}px`);
1854
1877
  this._classNames.push(e);
1855
1878
  } else if (typeof t == "string" && (t.startsWith("w-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
1856
1879
  const e = t.startsWith("w-") ? t : `w-${t}`;
1857
1880
  this._classNames.push(e);
1858
1881
  } else {
1859
- const e = u.register("width", t);
1882
+ const e = f.register("width", t);
1860
1883
  this._classNames.push(e);
1861
1884
  }
1862
1885
  return this;
1863
1886
  }
1864
1887
  height(t) {
1865
1888
  if (typeof t == "number") {
1866
- const e = u.register("height", `${t}px`);
1889
+ const e = f.register("height", `${t}px`);
1867
1890
  this._classNames.push(e);
1868
1891
  } else if (typeof t == "string" && (t.startsWith("h-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
1869
1892
  const e = t.startsWith("h-") ? t : `h-${t}`;
1870
1893
  this._classNames.push(e);
1871
1894
  } else {
1872
- const e = u.register("height", t);
1895
+ const e = f.register("height", t);
1873
1896
  this._classNames.push(e);
1874
1897
  }
1875
1898
  return this;
1876
1899
  }
1877
1900
  gap(t) {
1878
1901
  if (typeof t == "number") {
1879
- const e = u.register("gap", `${t}px`);
1902
+ const e = f.register("gap", `${t}px`);
1880
1903
  this._classNames.push(e);
1881
1904
  } else if (typeof t == "string" && t.startsWith("gap-"))
1882
1905
  this._classNames.push(t);
1883
1906
  else {
1884
- const e = u.register("gap", t);
1907
+ const e = f.register("gap", t);
1885
1908
  this._classNames.push(e);
1886
1909
  }
1887
1910
  return this;
@@ -1932,18 +1955,18 @@ class Te {
1932
1955
  ), this;
1933
1956
  }
1934
1957
  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);
1958
+ 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
1959
  return this._classNames.push(
1937
1960
  "border",
1938
- `border-${o}`,
1961
+ `border-${i}`,
1939
1962
  "focus-within:ring-2",
1940
- `focus-within:ring-${i}`,
1941
- `focus-within:border-${i}`
1963
+ `focus-within:ring-${o}`,
1964
+ `focus-within:border-${o}`
1942
1965
  ), this.clean();
1943
1966
  }
1944
1967
  weight(t) {
1945
1968
  if (typeof t == "number") {
1946
- const e = u.register("font-weight", String(t));
1969
+ const e = f.register("font-weight", String(t));
1947
1970
  this._classNames.push(e);
1948
1971
  } else {
1949
1972
  const e = {
@@ -1960,7 +1983,7 @@ class Te {
1960
1983
  if (e[t])
1961
1984
  this._classNames.push(e[t]);
1962
1985
  else {
1963
- const s = u.register("font-weight", t);
1986
+ const s = f.register("font-weight", t);
1964
1987
  this._classNames.push(s);
1965
1988
  }
1966
1989
  }
@@ -1994,16 +2017,16 @@ class Te {
1994
2017
  return this._signals.add(t), this;
1995
2018
  }
1996
2019
  translateX(t) {
1997
- return t instanceof z ? this._animatedProps.set("translateX", t) : this._transforms.push(`translateX(${t}px)`), this;
2020
+ return t instanceof R ? this._animatedProps.set("translateX", t) : this._transforms.push(`translateX(${t}px)`), this;
1998
2021
  }
1999
2022
  translateY(t) {
2000
- return t instanceof z ? this._animatedProps.set("translateY", t) : this._transforms.push(`translateY(${t}px)`), this;
2023
+ return t instanceof R ? this._animatedProps.set("translateY", t) : this._transforms.push(`translateY(${t}px)`), this;
2001
2024
  }
2002
2025
  scale(t) {
2003
- return t instanceof z ? this._animatedProps.set("scale", t) : this._transforms.push(`scale(${t})`), this;
2026
+ return t instanceof R ? this._animatedProps.set("scale", t) : this._transforms.push(`scale(${t})`), this;
2004
2027
  }
2005
2028
  rotate(t) {
2006
- return t instanceof z ? this._animatedProps.set("rotate", t) : this._transforms.push(`rotate(${t}deg)`), this;
2029
+ return t instanceof R ? this._animatedProps.set("rotate", t) : this._transforms.push(`rotate(${t}deg)`), this;
2007
2030
  }
2008
2031
  gesture(t) {
2009
2032
  return this._gesture = t, this;
@@ -2029,11 +2052,11 @@ class Te {
2029
2052
  props(t) {
2030
2053
  return this._props = { ...this._props, ...t }, this;
2031
2054
  }
2032
- transition(t, e, s, o) {
2055
+ transition(t, e, s, i) {
2033
2056
  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;
2057
+ return this.replaceTransitionClass(f.register("transition", t)), this;
2058
+ const o = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = v(s || this._transitionEasing), l = i ? `${i}ms` : "0ms";
2059
+ return this.replaceTransitionClass(f.register("transition", `${o} ${n} ${a} ${l}`)), this;
2037
2060
  }
2038
2061
  /**
2039
2062
  * Set transition duration in milliseconds
@@ -2047,7 +2070,7 @@ class Te {
2047
2070
  * Example: .easing('ease-in-out')
2048
2071
  */
2049
2072
  easing(t) {
2050
- return this._transitionEasing = N(t), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
2073
+ return this._transitionEasing = v(t), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
2051
2074
  }
2052
2075
  /** Alias of `.easing()`. `'spring'` becomes CSS `linear()`. */
2053
2076
  ease(t) {
@@ -2071,15 +2094,15 @@ class Te {
2071
2094
  * Apply the built transition to the element
2072
2095
  */
2073
2096
  _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}`));
2097
+ const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing, i = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
2098
+ this.replaceTransitionClass(f.register("transition", `${t} ${e} ${s} ${i}`));
2076
2099
  }
2077
2100
  replaceTransitionClass(t) {
2078
2101
  this._transitionClass && (this._classNames = this._classNames.filter((e) => e !== this._transitionClass)), this._transitionClass = t, this._classNames.push(t);
2079
2102
  }
2080
2103
  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;
2104
+ _(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((h) => h !== this._motionClass));
2105
+ 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
2106
  let n = s ? t.ease : e == null ? void 0 : e.ease;
2084
2107
  const a = {
2085
2108
  stiffness: (s ? t.stiffness : e == null ? void 0 : e.stiffness) ?? void 0,
@@ -2087,16 +2110,16 @@ class Te {
2087
2110
  mass: (s ? t.mass : e == null ? void 0 : e.mass) ?? void 0
2088
2111
  };
2089
2112
  if (s) {
2090
- const f = K(t.from), d = K(t.to), m = u.registerKeyframes(Wt(`${f}=>${d}`), f, d);
2113
+ const h = G(t.from), u = G(t.to), m = f.registerKeyframes(Ft(`${h}=>${u}`), h, u);
2091
2114
  this._motionClass = `fibo-anim ${m}`, this._props["data-fibo-anim"] = "custom";
2092
2115
  } 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");
2116
+ const h = Ot(t);
2117
+ 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
2118
  }
2096
- const l = N(n ?? "ease", a);
2119
+ const l = v(n ?? "ease", a);
2097
2120
  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;
2121
+ const d = this._style;
2122
+ 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
2123
  }
2101
2124
  /** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
2102
2125
  spring(t) {
@@ -2112,15 +2135,15 @@ class Te {
2112
2135
  }), this);
2113
2136
  }
2114
2137
  focusVisible(t) {
2115
- const e = this.getPseudoStateClassName(), s = new _(e, "focus-visible", this);
2116
- return t ? (t(s), this) : s;
2138
+ const e = new k("focus-visible", this);
2139
+ return t ? (t(e), this) : e;
2117
2140
  }
2118
2141
  stagger(t) {
2119
- return this._staggerMs = t, this._usesCssMotion = !0, this._style["--fibo-stagger"] = `${t}ms`, x(), this;
2142
+ return this._staggerMs = t, this._usesCssMotion = !0, this._style["--fibo-stagger"] = `${t}ms`, _(), this;
2120
2143
  }
2121
2144
  /** Scroll-reveal: IntersectionObserver toggles `.fibo-inview`. */
2122
2145
  reveal(t = "fadeUp") {
2123
- return this._reveal = typeof t == "string" ? { preset: t, once: !0 } : { preset: "fadeUp", once: !0, ...t }, this._usesCssMotion = !0, x(), this;
2146
+ return this._reveal = typeof t == "string" ? { preset: t, once: !0 } : { preset: "fadeUp", once: !0, ...t }, this._usesCssMotion = !0, _(), this;
2124
2147
  }
2125
2148
  /** Alias of `.reveal()` for scroll-triggered presets. */
2126
2149
  onScroll(t = "fadeIn") {
@@ -2128,26 +2151,26 @@ class Te {
2128
2151
  }
2129
2152
  /** CSS `animation-timeline: view()` / `scroll()`; IntersectionObserver reveal is the fallback. */
2130
2153
  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;
2154
+ 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
2155
  }
2133
2156
  scrollProgress() {
2134
- return x(), this._scrollProgress = !0, this._classNames.push("fibo-scroll-progress"), this._usesCssMotion = !0, this;
2157
+ return _(), this._scrollProgress = !0, this._classNames.push("fibo-scroll-progress"), this._usesCssMotion = !0, this;
2135
2158
  }
2136
2159
  smoothScroll() {
2137
- return this._classNames.push(u.register("scroll-behavior", "smooth")), this;
2160
+ return this._classNames.push(f.register("scroll-behavior", "smooth")), this;
2138
2161
  }
2139
2162
  scrollSnap(t = "y") {
2140
- return x(), this._classNames.push(`fibo-snap-${t}`), this;
2163
+ return _(), this._classNames.push(`fibo-snap-${t}`), this;
2141
2164
  }
2142
2165
  scrollSnapAlign(t = "start") {
2143
- return x(), this._classNames.push(`fibo-snap-${t}`), this;
2166
+ return _(), this._classNames.push(`fibo-snap-${t}`), this;
2144
2167
  }
2145
2168
  sticky(t = 0) {
2146
2169
  if (t === !1) return this;
2147
- this._classNames.push(u.register("position", "sticky"));
2170
+ this._classNames.push(f.register("position", "sticky"));
2148
2171
  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;
2172
+ this._classNames.push(f.register("top", e));
2173
+ const s = t === !0 || t === 0 ? ne : typeof t == "number" ? `${Math.max(t, ht)}px` : t;
2151
2174
  return this.publishStickyOffset(s), this;
2152
2175
  }
2153
2176
  /**
@@ -2156,7 +2179,7 @@ class Te {
2156
2179
  */
2157
2180
  publishStickyOffset(t) {
2158
2181
  const e = typeof t == "number" ? `${t}px` : t;
2159
- u.registerRoot("--fibo-sticky-offset", e), u.ensureScrollPadding();
2182
+ f.registerRoot("--fibo-sticky-offset", e), f.ensureScrollPadding();
2160
2183
  }
2161
2184
  viewTransition(t) {
2162
2185
  return this._viewTransition = t, this._style.viewTransitionName = t, this;
@@ -2169,7 +2192,7 @@ class Te {
2169
2192
  }
2170
2193
  ensureInteractiveTransition() {
2171
2194
  this._transitionClass || this._motionClass || this.replaceTransitionClass(
2172
- u.register(
2195
+ f.register(
2173
2196
  "transition",
2174
2197
  `transform ${this._transitionDuration}ms ${this._transitionEasing}, opacity ${this._transitionDuration}ms ${this._transitionEasing}`
2175
2198
  )
@@ -2178,67 +2201,64 @@ class Te {
2178
2201
  theme(t) {
2179
2202
  return this._theme = t, this;
2180
2203
  }
2181
- getPseudoStateClassName() {
2182
- return this._pseudoStateClassName || (this._pseudoStateClassName = ut("fibo-pseudo"), this._classNames.push(this._pseudoStateClassName)), this._pseudoStateClassName;
2183
- }
2184
2204
  hover(t) {
2185
2205
  this.ensureInteractiveTransition();
2186
- const e = this.getPseudoStateClassName(), s = new _(e, "hover", this);
2187
- return t ? (t(s), this) : s;
2206
+ const e = new k("hover", this);
2207
+ return t ? (t(e), this) : e;
2188
2208
  }
2189
2209
  focus(t) {
2190
- const e = this.getPseudoStateClassName(), s = new _(e, "focus", this);
2191
- return t ? (t(s), this) : s;
2210
+ const e = new k("focus", this);
2211
+ return t ? (t(e), this) : e;
2192
2212
  }
2193
2213
  active(t) {
2194
- const e = this.getPseudoStateClassName(), s = new _(e, "active", this);
2195
- return t ? (t(s), this) : s;
2214
+ const e = new k("active", this);
2215
+ return t ? (t(e), this) : e;
2196
2216
  }
2197
2217
  visited(t) {
2198
- const e = this.getPseudoStateClassName(), s = new _(e, "visited", this);
2199
- return t ? (t(s), this) : s;
2218
+ const e = new k("visited", this);
2219
+ return t ? (t(e), this) : e;
2200
2220
  }
2201
2221
  disabledState(t) {
2202
- const e = this.getPseudoStateClassName(), s = new _(e, "disabled", this);
2203
- return t ? (t(s), this) : s;
2222
+ const e = new k("disabled", this);
2223
+ return t ? (t(e), this) : e;
2204
2224
  }
2205
2225
  focusWithin(t) {
2206
- const e = this.getPseudoStateClassName(), s = new _(e, "focus-within", this);
2207
- return t ? (t(s), this) : s;
2226
+ const e = new k("focus-within", this);
2227
+ return t ? (t(e), this) : e;
2208
2228
  }
2209
2229
  firstChild(t) {
2210
- const e = this.getPseudoStateClassName(), s = new _(e, "first-child", this);
2211
- return t ? (t(s), this) : s;
2230
+ const e = new k("first-child", this);
2231
+ return t ? (t(e), this) : e;
2212
2232
  }
2213
2233
  lastChild(t) {
2214
- const e = this.getPseudoStateClassName(), s = new _(e, "last-child", this);
2215
- return t ? (t(s), this) : s;
2234
+ const e = new k("last-child", this);
2235
+ return t ? (t(e), this) : e;
2216
2236
  }
2217
2237
  groupHover(t) {
2218
- const e = this.getPseudoStateClassName(), s = new _(e, "hover", this, !0);
2219
- return t ? (t(s), this) : s;
2238
+ const e = new k("hover", this, !0);
2239
+ return t ? (t(e), this) : e;
2220
2240
  }
2221
2241
  groupFocus(t) {
2222
- const e = this.getPseudoStateClassName(), s = new _(e, "focus", this, !0);
2223
- return t ? (t(s), this) : s;
2242
+ const e = new k("focus", this, !0);
2243
+ return t ? (t(e), this) : e;
2224
2244
  }
2225
2245
  groupActive(t) {
2226
- const e = this.getPseudoStateClassName(), s = new _(e, "active", this, !0);
2227
- return t ? (t(s), this) : s;
2246
+ const e = new k("active", this, !0);
2247
+ return t ? (t(e), this) : e;
2228
2248
  }
2229
2249
  groupFocusWithin(t) {
2230
- const e = this.getPseudoStateClassName(), s = new _(e, "focus-within", this, !0);
2231
- return t ? (t(s), this) : s;
2250
+ const e = new k("focus-within", this, !0);
2251
+ return t ? (t(e), this) : e;
2232
2252
  }
2233
2253
  group() {
2234
2254
  return this._classNames.push("group"), this;
2235
2255
  }
2236
2256
  children(t) {
2237
- return typeof t == "function" ? (this._childFunction = t, this._children = []) : (this._children = H(t), this._childFunction = void 0), this;
2257
+ return typeof t == "function" ? (this._childFunction = t, this._children = []) : (this._children = K(t), this._childFunction = void 0), this;
2238
2258
  }
2239
2259
  getClassName() {
2240
2260
  let t;
2241
- return Object.keys(this._cssStyles).length > 0 && (t = ee(this._cssStyles) || void 0), Ut(this._classNames, t);
2261
+ return Object.keys(this._cssStyles).length > 0 && (t = Qt(this._cssStyles) || void 0), Xt(this._classNames, t);
2242
2262
  }
2243
2263
  getStyle() {
2244
2264
  let t = { ...this._style, ...this._cssStyles };
@@ -2254,18 +2274,18 @@ class Te {
2254
2274
  t.transform = e ? `${e} ${this._transforms.join(" ")}` : this._transforms.join(" ");
2255
2275
  }
2256
2276
  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 });
2277
+ const { duration: e = 300, curve: s = "easeOut", stiffness: i, damping: o } = this._animationConfig, n = v(s, { stiffness: i, damping: o });
2258
2278
  t.transition = `all ${e}ms ${n}`;
2259
2279
  }
2260
2280
  return t;
2261
2281
  }
2262
2282
  processChildren() {
2263
- const t = this._childFunction ? H(this._childFunction) : this._children;
2283
+ const t = this._childFunction ? K(this._childFunction) : this._children;
2264
2284
  return this._staggerMs == null ? t : t.map(
2265
2285
  (e, s) => g.createElement(
2266
2286
  "span",
2267
2287
  {
2268
- key: g.isValidElement(e) && e.key != null ? e.key : `fibo-stagger-${s}`,
2288
+ key: g.isValidElement(e) && H(e.key) ? e.key : `fibo-stagger-${s}`,
2269
2289
  className: "fibo-stagger-item",
2270
2290
  style: { "--fibo-i": String(s) }
2271
2291
  },
@@ -2277,7 +2297,7 @@ class Te {
2277
2297
  return this._childFunction;
2278
2298
  }
2279
2299
  }
2280
- const he = /* @__PURE__ */ new Set([
2300
+ const ae = /* @__PURE__ */ new Set([
2281
2301
  "$$typeof",
2282
2302
  "type",
2283
2303
  "props",
@@ -2290,61 +2310,72 @@ const he = /* @__PURE__ */ new Set([
2290
2310
  "_debugTask",
2291
2311
  "_debugInfo"
2292
2312
  ]);
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
2313
+ function ce(r) {
2314
+ var e;
2315
+ const t = (e = r._props) == null ? void 0 : e.key;
2316
+ if (!(t == null || t === ""))
2317
+ return t;
2318
+ }
2319
+ function le(r) {
2320
+ const t = r._isObserver, e = r._signals, s = r._observers, i = r._state, o = r._providers, n = ce(r), a = () => {
2321
+ var S;
2322
+ let m = r.build();
2323
+ const p = r._animatedProps, y = r._animationConfig;
2324
+ p && p.size > 0 && (m = g.createElement(ee, {
2325
+ key: n,
2326
+ animatedProps: p,
2327
+ animationConfig: y,
2328
+ children: m
2302
2329
  }));
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,
2330
+ const b = r._reveal;
2331
+ b && (m = g.createElement(oe, {
2332
+ key: n,
2333
+ preset: b.preset,
2334
+ once: b.once,
2335
+ rootMargin: b.rootMargin,
2336
+ threshold: b.threshold,
2309
2337
  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,
2338
+ preferTimeline: (S = r._classNames) == null ? void 0 : S.includes("fibo-view-timeline"),
2339
+ children: m
2340
+ })), r._scrollProgress && (m = g.createElement(ie, { key: n, children: m })), r._usesCssMotion && (m = g.createElement(
2341
+ g.Fragment,
2342
+ { key: n },
2343
+ g.createElement(Bt),
2344
+ m
2345
+ ));
2346
+ const x = r._gesture;
2347
+ return x && (m = x.wrap(m)), m;
2348
+ }, 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, {
2349
+ key: n,
2350
+ children: a
2351
+ }) : null, h = () => d ?? a();
2352
+ let u = h();
2353
+ return l && e && e.size > 0 ? u = g.createElement(It, {
2354
+ key: n,
2327
2355
  signals: e,
2328
2356
  children: h
2329
- }) : a && s && s.size > 0 && (f = g.createElement(It, {
2357
+ }) : l && s && s.size > 0 && (u = g.createElement(Tt, {
2358
+ key: n,
2330
2359
  observables: s,
2331
2360
  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) {
2361
+ })), l && i && i.size > 0 && (u = g.createElement(Mt, {
2362
+ key: n,
2363
+ stateMap: i,
2364
+ children: u
2365
+ })), l && o && o.size > 0 && (u = g.createElement(Rt, {
2366
+ key: n,
2367
+ providers: o,
2368
+ children: u
2369
+ })), u;
2370
+ }
2371
+ function ft(r, t, e) {
2341
2372
  const s = function() {
2342
2373
  return t();
2343
2374
  };
2344
2375
  s.displayName = e;
2345
- const o = g.createElement(s);
2376
+ const i = g.createElement(s);
2346
2377
  Object.defineProperty(r, "$$typeof", {
2347
- value: o.$$typeof,
2378
+ value: i.$$typeof,
2348
2379
  enumerable: !0,
2349
2380
  configurable: !0
2350
2381
  }), Object.defineProperty(r, "type", {
@@ -2352,57 +2383,60 @@ function dt(r, t, e) {
2352
2383
  enumerable: !0,
2353
2384
  configurable: !0,
2354
2385
  writable: !0
2355
- }), r.ref = o.ref ?? null, r.__fiboElementProps = o.props ?? {}, o._owner !== void 0 && (r._owner = o._owner), r._store = { validated: 1 };
2386
+ }), r.ref = i.ref ?? null, r.__fiboElementProps = i.props ?? {}, i._owner !== void 0 && (r._owner = i._owner), r._store = { validated: 1 };
2356
2387
  }
2357
- function ze(r) {
2388
+ function Me(r) {
2358
2389
  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;
2390
+ const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo", i = () => le(e);
2391
+ return ft(e, i, s), new Proxy(e, {
2392
+ get(o, n, a) {
2393
+ var l, d;
2363
2394
  if (n === "build")
2364
- return o;
2395
+ return i;
2365
2396
  if (n === "key") {
2366
- const h = (l = i._props) == null ? void 0 : l.key;
2397
+ const h = (l = o._props) == null ? void 0 : l.key;
2367
2398
  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;
2399
+ return String(h);
2400
+ if (!o.__fiboKeyFn) {
2401
+ const u = (m) => (o.key(m), a);
2402
+ o.__fiboKeyFn = u;
2372
2403
  }
2373
- return i.__fiboKeyFn;
2404
+ return o.__fiboKeyFn;
2374
2405
  }
2375
2406
  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 ?? {};
2407
+ const h = (d = o._props) == null ? void 0 : d.key, u = {
2408
+ ...o.__fiboElementProps ?? {},
2409
+ ...h != null && h !== "" ? { key: String(h) } : {}
2410
+ }, m = Object.getPrototypeOf(o).props;
2411
+ return typeof m == "function" ? Object.assign((y) => (m.call(o, y), a), u) : u;
2378
2412
  }
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;
2413
+ return ae.has(n) || Reflect.has(o, n) ? Reflect.get(o, n, a) : (h) => {
2414
+ 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);
2415
+ return o.className(b), a;
2382
2416
  };
2383
2417
  }
2384
2418
  });
2385
2419
  };
2386
2420
  }
2387
- const fe = ({
2421
+ const he = ({
2388
2422
  signal: r,
2389
2423
  builder: t,
2390
2424
  loading: e,
2391
2425
  error: s
2392
2426
  }) => {
2393
- const o = g.useSyncExternalStore(
2427
+ const i = g.useSyncExternalStore(
2394
2428
  g.useCallback((a) => r.subscribe ? r.subscribe(a) : () => {
2395
2429
  }, [r]),
2396
2430
  () => 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 {
2431
+ ), o = i == null ? void 0 : i.error;
2432
+ return o && s ? s(o) : ((i == null ? void 0 : i.isLoading) || (i == null ? void 0 : i.loading)) === !0 && e ? e() : t ? t(i) : null;
2433
+ }, fe = g.memo(he);
2434
+ class ue {
2401
2435
  constructor(t) {
2402
2436
  c(this, "_loading");
2403
2437
  c(this, "_error");
2404
2438
  c(this, "_builder");
2405
- this._signal = t, dt(this, () => this.build(), "ValueBuilder");
2439
+ this._signal = t, ft(this, () => this.build(), "ValueBuilder");
2406
2440
  }
2407
2441
  loading(t) {
2408
2442
  return this._loading = typeof t == "function" ? t : () => t, this;
@@ -2417,7 +2451,7 @@ class me {
2417
2451
  return this._builder = t, this;
2418
2452
  }
2419
2453
  build() {
2420
- return g.createElement(de, {
2454
+ return g.createElement(fe, {
2421
2455
  signal: this._signal,
2422
2456
  builder: this._builder,
2423
2457
  loading: this._loading,
@@ -2425,52 +2459,53 @@ class me {
2425
2459
  });
2426
2460
  }
2427
2461
  }
2428
- function Ie(r) {
2429
- return new me(r);
2462
+ function Te(r) {
2463
+ return new ue(r);
2430
2464
  }
2431
2465
  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,
2466
+ Ot as A,
2467
+ Mt as B,
2468
+ $t as C,
2469
+ zt as D,
2470
+ _t as E,
2471
+ ve as F,
2472
+ jt as G,
2473
+ At as H,
2474
+ K as I,
2475
+ Z as J,
2476
+ F as K,
2477
+ at as L,
2444
2478
  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,
2479
+ Ht as N,
2480
+ wt as O,
2481
+ Rt as P,
2482
+ _e as R,
2483
+ R as S,
2484
+ Te as V,
2485
+ ke as a,
2451
2486
  tt as b,
2452
- _e as c,
2453
- Mt as d,
2454
- Se as e,
2455
- Vt as f,
2487
+ be as c,
2488
+ Nt as d,
2489
+ $e as e,
2490
+ oe as f,
2456
2491
  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
2492
+ ie as h,
2493
+ Ce as i,
2494
+ Ne as j,
2495
+ se as k,
2496
+ re as l,
2497
+ it as m,
2498
+ v as n,
2499
+ ye as o,
2500
+ Bt as p,
2501
+ we as q,
2502
+ kt as r,
2503
+ ge as s,
2504
+ nt as t,
2505
+ xe as u,
2506
+ Se as v,
2507
+ Me as w,
2508
+ Ee as x,
2509
+ Ct as y,
2510
+ _ as z
2476
2511
  };