fiboui 2.4.1 → 2.4.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,49 +1,49 @@
1
1
  "use client";
2
- var zo = Object.defineProperty;
3
- var So = (t, o, i) => o in t ? zo(t, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[o] = i;
4
- var a = (t, o, i) => So(t, typeof o != "symbol" ? o + "" : o, i);
5
- import g, { useRef as _, createContext as X, useContext as j, useCallback as T, useSyncExternalStore as D, useEffect as M, useState as eo, cloneElement as $o } from "react";
6
- import { jsx as $, Fragment as V } from "react/jsx-runtime";
7
- import { r as Co, f as No, b as To } from "./themeData-CmTJt3dU.js";
8
- class fo {
2
+ var So = Object.defineProperty;
3
+ var Co = (t, o, i) => o in t ? So(t, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[o] = i;
4
+ var a = (t, o, i) => Co(t, typeof o != "symbol" ? o + "" : o, i);
5
+ import g, { useRef as z, createContext as B, useContext as V, useCallback as E, useSyncExternalStore as W, useEffect as L, useState as ro, cloneElement as $o } from "react";
6
+ import { jsx as T, Fragment as H } from "react/jsx-runtime";
7
+ import { r as To, f as No, b as Eo } from "./themeData-Dtm0M_mF.js";
8
+ class no {
9
9
  constructor() {
10
10
  a(this, "activeEffect", null);
11
11
  }
12
12
  }
13
- const ro = new fo(), F = [ro];
14
- function no() {
15
- return new fo();
13
+ const so = new no(), Y = [so];
14
+ function ao() {
15
+ return new no();
16
16
  }
17
- function so() {
18
- return F[F.length - 1] ?? ro;
17
+ function co() {
18
+ return Y[Y.length - 1] ?? so;
19
19
  }
20
- function Y() {
21
- return so().activeEffect;
20
+ function O() {
21
+ return co().activeEffect;
22
22
  }
23
- function Eo(t, o) {
24
- F.push(t);
23
+ function Ro(t, o) {
24
+ Y.push(t);
25
25
  try {
26
26
  return o();
27
27
  } finally {
28
- F.pop();
28
+ Y.pop();
29
29
  }
30
30
  }
31
- function E(t) {
32
- const o = so(), i = o.activeEffect;
31
+ function R(t) {
32
+ const o = co(), i = o.activeEffect;
33
33
  return o.activeEffect = t, i;
34
34
  }
35
- class Ro {
35
+ class Io {
36
36
  constructor(o) {
37
37
  a(this, "dependencies", /* @__PURE__ */ new Set());
38
38
  a(this, "_onDispose");
39
39
  this.fn = o, this.run();
40
40
  }
41
41
  run() {
42
- const o = E(this);
42
+ const o = R(this);
43
43
  try {
44
44
  this.cleanup(), this.fn();
45
45
  } finally {
46
- E(o);
46
+ R(o);
47
47
  }
48
48
  }
49
49
  track(o) {
@@ -60,17 +60,17 @@ class Ro {
60
60
  this.cleanup(), (o = this._onDispose) == null || o.call(this);
61
61
  }
62
62
  }
63
- class Io {
63
+ class Fo {
64
64
  constructor(o) {
65
65
  a(this, "dependencies", /* @__PURE__ */ new Set());
66
66
  this._onInvalidate = o;
67
67
  }
68
68
  execute(o) {
69
- const i = E(this);
69
+ const i = R(this);
70
70
  try {
71
71
  return this.cleanup(), o();
72
72
  } finally {
73
- E(i);
73
+ R(i);
74
74
  }
75
75
  }
76
76
  track(o) {
@@ -86,14 +86,15 @@ class Io {
86
86
  this.cleanup();
87
87
  }
88
88
  }
89
- class I {
89
+ class X {
90
90
  constructor(o) {
91
91
  a(this, "listeners", /* @__PURE__ */ new Set());
92
92
  a(this, "effects", /* @__PURE__ */ new Set());
93
+ a(this, "_notifyDepth", 0);
93
94
  this._value = o;
94
95
  }
95
96
  get value() {
96
- const o = Y();
97
+ const o = O();
97
98
  return o && o.track(this), this._value;
98
99
  }
99
100
  set value(o) {
@@ -109,32 +110,42 @@ class I {
109
110
  this.effects.delete(o);
110
111
  }
111
112
  notify() {
112
- const o = Array.from(this.effects), i = Array.from(this.listeners);
113
- o.forEach((e) => e.trigger()), i.forEach((e) => e(this._value));
113
+ if (this._notifyDepth > 32) {
114
+ typeof console < "u" && console.error("[fiboui] Signal update loop detected — aborting notify");
115
+ return;
116
+ }
117
+ this._notifyDepth += 1;
118
+ try {
119
+ const o = Array.from(this.effects), i = Array.from(this.listeners);
120
+ o.forEach((e) => e.trigger()), i.forEach((e) => e(this._value));
121
+ } finally {
122
+ this._notifyDepth -= 1;
123
+ }
114
124
  }
115
125
  }
116
126
  function Li(t) {
117
- return new I(t);
127
+ return new X(t);
118
128
  }
119
- class Fo {
129
+ class Xo {
120
130
  constructor(o) {
121
131
  a(this, "listeners", /* @__PURE__ */ new Set());
122
132
  a(this, "effects", /* @__PURE__ */ new Set());
123
133
  a(this, "_value");
124
134
  a(this, "_dirty", !0);
125
135
  a(this, "internalEffect");
126
- this.fn = o, this.internalEffect = new Ro(() => {
136
+ a(this, "_notifyDepth", 0);
137
+ this.fn = o, this.internalEffect = new Io(() => {
127
138
  this._dirty || (this._dirty = !0, this.notify());
128
139
  });
129
140
  }
130
141
  get value() {
131
- const o = Y();
142
+ const o = O();
132
143
  if (o && o.track(this), this._dirty) {
133
- const i = E(this.internalEffect);
144
+ const i = R(this.internalEffect);
134
145
  try {
135
146
  this.internalEffect.cleanup(), this._value = this.fn(), this._dirty = !1;
136
147
  } finally {
137
- E(i);
148
+ R(i);
138
149
  }
139
150
  }
140
151
  return this._value;
@@ -149,21 +160,30 @@ class Fo {
149
160
  this.effects.delete(o);
150
161
  }
151
162
  notify() {
152
- const o = Array.from(this.effects), i = Array.from(this.listeners);
153
- o.forEach((e) => e.trigger()), i.forEach((e) => e(this._value));
163
+ if (this._notifyDepth > 32) {
164
+ typeof console < "u" && console.error("[fiboui] ComputedSignal update loop detected — aborting notify");
165
+ return;
166
+ }
167
+ this._notifyDepth += 1;
168
+ try {
169
+ const o = Array.from(this.effects), i = Array.from(this.listeners);
170
+ o.forEach((e) => e.trigger()), i.forEach((e) => e(this._value));
171
+ } finally {
172
+ this._notifyDepth -= 1;
173
+ }
154
174
  }
155
175
  }
156
176
  function Oi(t) {
157
- return new Fo(t);
177
+ return new Xo(t);
158
178
  }
159
- class Xo {
179
+ class Mo {
160
180
  constructor(o) {
161
181
  a(this, "listeners", /* @__PURE__ */ new Set());
162
182
  a(this, "effects", /* @__PURE__ */ new Set());
163
183
  this._value = o;
164
184
  }
165
185
  get() {
166
- const o = Y();
186
+ const o = O();
167
187
  return o && o.track(this), this._value;
168
188
  }
169
189
  set(o) {
@@ -182,17 +202,17 @@ class Xo {
182
202
  Array.from(this.effects).forEach((o) => o.trigger()), Array.from(this.listeners).forEach((o) => o(this._value));
183
203
  }
184
204
  }
185
- function Pi(t) {
186
- return new Xo(t);
205
+ function Ai(t) {
206
+ return new Mo(t);
187
207
  }
188
- class Mo {
208
+ class Yo {
189
209
  constructor(o) {
190
210
  a(this, "listeners", /* @__PURE__ */ new Set());
191
211
  a(this, "effects", /* @__PURE__ */ new Set());
192
212
  this.state = o;
193
213
  }
194
214
  getState() {
195
- const o = Y();
215
+ const o = O();
196
216
  return o && o.track(this), this.state;
197
217
  }
198
218
  setState(o) {
@@ -212,47 +232,47 @@ class Mo {
212
232
  Array.from(this.effects).forEach((o) => o.trigger()), Array.from(this.listeners).forEach((o) => o(this.state));
213
233
  }
214
234
  }
215
- function Ai(t) {
216
- return new Mo(t);
235
+ function Pi(t) {
236
+ return new Yo(t);
217
237
  }
218
- const Yo = no(), ao = X(Yo);
219
- function Bo() {
220
- return j(ao);
238
+ const Bo = ao(), bo = B(Bo);
239
+ function Lo() {
240
+ return V(bo);
221
241
  }
222
- function ji({ children: t, scope: o }) {
223
- const i = _(o ?? no()).current;
224
- return /* @__PURE__ */ $(ao.Provider, { value: i, children: t });
242
+ function Di({ children: t, scope: o }) {
243
+ const i = z(o ?? ao()).current;
244
+ return /* @__PURE__ */ T(bo.Provider, { value: i, children: t });
225
245
  }
226
- function Lo({ children: t }) {
227
- const o = _(0), i = _(/* @__PURE__ */ new Set()), e = _(null);
228
- e.current || (e.current = new Io(() => {
246
+ function Oo({ children: t }) {
247
+ const o = z(0), i = z(/* @__PURE__ */ new Set()), e = z(null);
248
+ e.current || (e.current = new Fo(() => {
229
249
  o.current += 1, i.current.forEach((c) => c());
230
250
  }));
231
- const r = T((c) => (i.current.add(c), () => {
251
+ const r = E((c) => (i.current.add(c), () => {
232
252
  i.current.delete(c);
233
- }), []), f = T(() => o.current, []);
234
- D(r, f, f), M(() => () => {
253
+ }), []), f = E(() => o.current, []);
254
+ W(r, f, f), L(() => () => {
235
255
  var c;
236
256
  (c = e.current) == null || c.dispose();
237
257
  }, []);
238
- const n = Bo();
258
+ const n = Lo();
239
259
  let s = null;
240
260
  try {
241
- s = Eo(n, () => e.current.execute(t));
261
+ s = Ro(n, () => e.current.execute(t));
242
262
  } catch {
243
263
  s = null;
244
264
  }
245
- return /* @__PURE__ */ $(V, { children: s });
265
+ return /* @__PURE__ */ T(H, { children: s });
246
266
  }
247
- const Oo = X(/* @__PURE__ */ new Map()), co = X(null);
248
- function Di(t) {
249
- const o = j(co);
267
+ const Ao = B(/* @__PURE__ */ new Map()), uo = B(null);
268
+ function ji(t) {
269
+ const o = V(uo);
250
270
  if (!o)
251
271
  throw new Error("useBuilderState must be used under a builder that called .state()");
252
272
  return [o.get(t), (i) => o.set(t, i)];
253
273
  }
254
274
  function Po({ stateMap: t = /* @__PURE__ */ new Map(), children: o }) {
255
- const [i, e] = eo(() => new Map(t)), r = {
275
+ const [i, e] = ro(() => new Map(t)), r = {
256
276
  map: i,
257
277
  get: (f) => i.get(f),
258
278
  set: (f, n) => {
@@ -264,89 +284,89 @@ function Po({ stateMap: t = /* @__PURE__ */ new Map(), children: o }) {
264
284
  });
265
285
  }
266
286
  };
267
- return /* @__PURE__ */ $(co.Provider, { value: r, children: /* @__PURE__ */ $(Oo.Provider, { value: i, children: o }) });
287
+ return /* @__PURE__ */ T(uo.Provider, { value: r, children: /* @__PURE__ */ T(Ao.Provider, { value: i, children: o }) });
268
288
  }
269
- function Ao({ observables: t, children: o }) {
270
- const i = _(0), e = T((f) => {
289
+ function Do({ observables: t, children: o }) {
290
+ const i = z(0), e = E((f) => {
271
291
  const n = Array.from(t).map(
272
292
  (s) => s.subscribe(() => {
273
293
  i.current += 1, f();
274
294
  })
275
295
  );
276
296
  return () => n.forEach((s) => s());
277
- }, [t]), r = T(() => i.current, []);
278
- return D(e, r, r), /* @__PURE__ */ $(V, { children: typeof o == "function" ? o() : o });
297
+ }, [t]), r = E(() => i.current, []);
298
+ return W(e, r, r), /* @__PURE__ */ T(H, { children: typeof o == "function" ? o() : o });
279
299
  }
280
300
  function jo({ signals: t, children: o }) {
281
- const i = _(0), e = T((f) => {
301
+ const i = z(0), e = E((f) => {
282
302
  const n = Array.from(t).map(
283
303
  (s) => s.subscribe(() => {
284
304
  i.current += 1, f();
285
305
  })
286
306
  );
287
307
  return () => n.forEach((s) => s());
288
- }, [t]), r = T(() => i.current, []);
289
- return D(e, r, r), /* @__PURE__ */ $(V, { children: typeof o == "function" ? o() : o });
308
+ }, [t]), r = E(() => i.current, []);
309
+ return W(e, r, r), /* @__PURE__ */ T(H, { children: typeof o == "function" ? o() : o });
290
310
  }
291
- const bo = X(/* @__PURE__ */ new Map());
311
+ const lo = B(/* @__PURE__ */ new Map());
292
312
  function Vi(t) {
293
- const o = j(bo);
313
+ const o = V(lo);
294
314
  return o == null ? void 0 : o.get(t);
295
315
  }
296
- function Do({ providers: t = /* @__PURE__ */ new Map(), children: o }) {
297
- return /* @__PURE__ */ $(bo.Provider, { value: t, children: o });
316
+ function Vo({ providers: t = /* @__PURE__ */ new Map(), children: o }) {
317
+ return /* @__PURE__ */ T(lo.Provider, { value: t, children: o });
298
318
  }
299
- function Vo(t) {
319
+ function Wo(t) {
300
320
  return !!t && typeof t == "object" && "build" in t && typeof t.build == "function";
301
321
  }
302
- function Wo(t) {
303
- return g.isValidElement(t) ? t : Vo(t) ? t.build() : t;
322
+ function Ho(t) {
323
+ return g.isValidElement(t) ? t : Wo(t) ? t.build() : t;
304
324
  }
305
- function W(t) {
325
+ function U(t) {
306
326
  return typeof t == "string" || typeof t == "number";
307
327
  }
308
- function Ho(t, o) {
309
- return g.isValidElement(t) && W(t.key) && t.key !== "" ? t.key : `.$fibo-${o}`;
310
- }
311
328
  function Uo(t, o) {
312
- return !g.isValidElement(t) || W(t.key) && t.key !== "" ? t : g.cloneElement(t, { key: Ho(t, o) });
329
+ return g.isValidElement(t) && U(t.key) && t.key !== "" ? t.key : `.$fibo-${o}`;
313
330
  }
314
- function U(t) {
331
+ function Go(t, o) {
332
+ return !g.isValidElement(t) || U(t.key) && t.key !== "" ? t : g.cloneElement(t, { key: Uo(t, o) });
333
+ }
334
+ function K(t) {
315
335
  if (t == null)
316
336
  return [];
317
337
  const o = typeof t == "function" ? t() : t;
318
- return (Array.isArray(o) ? o : [o]).map((e, r) => Uo(Wo(e), r));
338
+ return (Array.isArray(o) ? o : [o]).map((e, r) => Go(Ho(e), r));
319
339
  }
320
- const G = /* @__PURE__ */ new Map(), Go = {
340
+ const Z = /* @__PURE__ */ new Map(), Ko = {
321
341
  easeIn: "ease-in",
322
342
  easeOut: "ease-out",
323
343
  easeInOut: "ease-in-out",
324
344
  linear: "linear",
325
345
  ease: "ease"
326
346
  };
327
- function uo(t = {}) {
328
- const o = t.stiffness ?? 170, i = t.damping ?? 26, e = t.mass ?? 1, r = `${o}:${i}:${e}`, f = G.get(r);
347
+ function ho(t = {}) {
348
+ const o = t.stiffness ?? 170, i = t.damping ?? 26, e = t.mass ?? 1, r = `${o}:${i}:${e}`, f = Z.get(r);
329
349
  if (f) return f;
330
350
  const n = 1 / 60, s = 1;
331
- let c = 0, h = 0;
351
+ let c = 0, x = 0;
332
352
  const b = [0];
333
353
  for (let d = 0; d < 180; d += 1) {
334
- const y = -o * (c - s) - i * h;
335
- if (h += y / e * n, c += h * n, b.push(c), d > 8 && Math.abs(c - s) < 2e-3 && Math.abs(h) < 2e-3) break;
354
+ const y = -o * (c - s) - i * x;
355
+ if (x += y / e * n, c += x * n, b.push(c), d > 8 && Math.abs(c - s) < 2e-3 && Math.abs(x) < 2e-3) break;
336
356
  }
337
357
  b[b.length - 1] !== 1 && b.push(1);
338
- const x = Math.max(1, Math.floor((b.length - 1) / 24)), p = [];
339
- for (let d = 0; d < b.length; d += x) {
340
- const y = d / (b.length - 1), z = Math.round(b[d] * 1e4) / 1e4;
341
- p.push(d === 0 ? `${z}` : `${z} ${Math.round(y * 1e4) / 100}%`);
358
+ const h = Math.max(1, Math.floor((b.length - 1) / 24)), p = [];
359
+ for (let d = 0; d < b.length; d += h) {
360
+ const y = d / (b.length - 1), S = Math.round(b[d] * 1e4) / 1e4;
361
+ p.push(d === 0 ? `${S}` : `${S} ${Math.round(y * 1e4) / 100}%`);
342
362
  }
343
363
  const m = `linear(${p.join(", ")})`;
344
- return G.set(r, m), m;
364
+ return Z.set(r, m), m;
345
365
  }
346
- function S(t, o) {
347
- return t === "spring" ? uo(o) : Go[t] ?? t;
366
+ function $(t, o) {
367
+ return t === "spring" ? ho(o) : Ko[t] ?? t;
348
368
  }
349
- const K = [
369
+ const q = [
350
370
  "fadeIn",
351
371
  "fadeOut",
352
372
  "fade",
@@ -362,35 +382,35 @@ const K = [
362
382
  "blur",
363
383
  "pop",
364
384
  "bounce"
365
- ], Ko = {
385
+ ], Zo = {
366
386
  fade: "fadeIn",
367
387
  scale: "scaleIn",
368
388
  blur: "blurIn"
369
389
  };
370
- function Zo(t) {
390
+ function qo(t) {
371
391
  if (!t || typeof t != "object") return !1;
372
392
  const o = t;
373
393
  return typeof o.from == "object" && o.from !== null && typeof o.to == "object" && o.to !== null;
374
394
  }
375
- function Z(t) {
395
+ function Q(t) {
376
396
  const o = /* @__PURE__ */ new Set(["opacity", "zIndex", "z-index", "flex", "fontWeight", "lineHeight"]);
377
397
  return Object.entries(t).map(([i, e]) => {
378
398
  const r = i.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), f = typeof e == "number" && !o.has(i) ? `${e}px` : String(e);
379
399
  return `${r}: ${f}`;
380
400
  }).join("; ");
381
401
  }
382
- function qo(t) {
402
+ function Qo(t) {
383
403
  let o = 5381;
384
404
  for (let i = 0; i < t.length; i += 1) o = (o << 5) + o ^ t.charCodeAt(i);
385
405
  return (o >>> 0).toString(36);
386
406
  }
387
- function Qo(t) {
388
- const o = Ko[t] ?? t;
389
- if (!K.includes(o))
390
- throw new Error(`Unknown motion preset "${t}". Use: ${K.join(", ")}`);
407
+ function Jo(t) {
408
+ const o = Zo[t] ?? t;
409
+ if (!q.includes(o))
410
+ throw new Error(`Unknown motion preset "${t}". Use: ${q.join(", ")}`);
391
411
  return o;
392
412
  }
393
- const A = `
413
+ const j = `
394
414
  .fibo-anim {
395
415
  animation-duration: var(--fibo-dur, 300ms);
396
416
  animation-timing-function: var(--fibo-ease, ease);
@@ -532,13 +552,13 @@ const A = `
532
552
  }
533
553
  }
534
554
  `.trim();
535
- function q(t) {
555
+ function J(t) {
536
556
  let o = 5381;
537
557
  for (let i = 0; i < t.length; i += 1)
538
558
  o = (o << 5) + o ^ t.charCodeAt(i);
539
559
  return (o >>> 0).toString(36);
540
560
  }
541
- const k = class k {
561
+ const _ = class _ {
542
562
  constructor() {
543
563
  a(this, "sheet", null);
544
564
  a(this, "cache", /* @__PURE__ */ new Map());
@@ -547,14 +567,14 @@ const k = class k {
547
567
  this.attachSheet(), this.ensureDefaults();
548
568
  }
549
569
  static getInstance() {
550
- return k.instance || (k.instance = new k()), k.instance;
570
+ return _.instance || (_.instance = new _()), _.instance;
551
571
  }
552
572
  /** Test-only: empty cache/sheet so a simulated client starts cold. */
553
573
  reset() {
554
574
  this.cache.clear(), this.extras = [], this.defaultsReady = !1, this.sheet = null, this.attachSheet(), this.ensureDefaults();
555
575
  }
556
576
  static resetForTests() {
557
- k.getInstance().reset();
577
+ _.getInstance().reset();
558
578
  }
559
579
  attachSheet() {
560
580
  if (typeof document > "u") return;
@@ -572,12 +592,12 @@ const k = class k {
572
592
  const r = `@media ${o}|${i}:${e}`;
573
593
  if (this.cache.has(r))
574
594
  return this.cache.get(r);
575
- const f = `fibo-mq-${q(r)}`, n = `@media ${o} { .${f} { ${i}: ${e} !important; } }`;
595
+ const f = `fibo-mq-${J(r)}`, n = `@media ${o} { .${f} { ${i}: ${e} !important; } }`;
576
596
  return this.insert(n), this.cache.set(r, f), f;
577
597
  }
578
598
  ensureDefaults() {
579
599
  var o;
580
- this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((o = this.sheet.textContent) != null && o.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(A)));
600
+ this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((o = this.sheet.textContent) != null && o.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(j)));
581
601
  }
582
602
  /**
583
603
  * Append a large static CSS blob once (keyed). Used by interaction-effect presets.
@@ -590,7 +610,7 @@ const k = class k {
590
610
  getCss() {
591
611
  this.ensureDefaults();
592
612
  const o = [...this.extras].sort();
593
- return [A, ...o].filter(Boolean).join(`
613
+ return [j, ...o].filter(Boolean).join(`
594
614
  `);
595
615
  }
596
616
  registerKeyframes(o, i, e) {
@@ -635,83 +655,87 @@ const k = class k {
635
655
  const f = `${r ? "group:" : ""}${o}:${i}:${e}`;
636
656
  if (this.cache.has(f))
637
657
  return this.cache.get(f);
638
- const n = `fibo-ps-${q(f)}`, s = r ? `.group:${o} .${n} { ${i}: ${e} !important; }` : `.${n}:${o} { ${i}: ${e} !important; }`;
658
+ const n = `fibo-ps-${J(f)}`, s = r ? `.group:${o} .${n} { ${i}: ${e} !important; }` : `.${n}:${o} { ${i}: ${e} !important; }`;
639
659
  return this.insert(s), this.cache.set(f, n), n;
640
660
  }
641
661
  registerGroupPseudo(o, i, e, r) {
642
662
  return this.registerPseudo(i, e, r, !0);
643
663
  }
644
664
  };
645
- a(k, "instance");
646
- let C = k;
647
- const u = C.getInstance();
665
+ a(_, "instance");
666
+ let k = _;
667
+ const u = k.getInstance();
648
668
  function w() {
649
- C.getInstance().ensureDefaults();
669
+ k.getInstance().ensureDefaults();
650
670
  }
651
671
  function Wi() {
652
- return C.getInstance().getCss();
672
+ return k.getInstance().getCss();
653
673
  }
654
- function lo() {
655
- return C.getInstance().getCss();
674
+ function xo() {
675
+ return k.getInstance().getCss();
656
676
  }
657
677
  function Hi() {
658
- return `<style id="fibo-dynamic-styles" data-fibo="1">${lo().replace(/<\/style/gi, "<\\/style")}</style>`;
678
+ const o = `<style id="fibo-dynamic-styles" data-fibo="1">${xo().replace(/<\/style/gi, "<\\/style")}</style>`;
679
+ return typeof document > "u" && k.resetForTests(), o;
659
680
  }
660
681
  function Ui() {
682
+ k.resetForTests();
683
+ }
684
+ function Gi() {
661
685
  return w(), g.createElement("style", {
662
686
  id: "fibo-dynamic-styles",
663
687
  "data-fibo": "1",
664
688
  suppressHydrationWarning: !0,
665
- dangerouslySetInnerHTML: { __html: lo() }
689
+ dangerouslySetInnerHTML: { __html: xo() }
666
690
  });
667
691
  }
668
- function Jo() {
692
+ function oi() {
669
693
  return w(), g.createElement("style", {
670
694
  id: "fibo-motion-presets",
671
695
  "data-fibo-motion": "1",
672
- dangerouslySetInnerHTML: { __html: A }
696
+ dangerouslySetInnerHTML: { __html: j }
673
697
  });
674
698
  }
675
- const ho = {
699
+ const po = {
676
700
  sm: 640,
677
701
  md: 768,
678
702
  lg: 1024,
679
703
  xl: 1280
680
704
  };
681
- function oi(t) {
682
- return t in ho;
683
- }
684
705
  function ii(t) {
685
- if (oi(t))
686
- return `(min-width: ${ho[t]}px)`;
706
+ return t in po;
707
+ }
708
+ function ti(t) {
709
+ if (ii(t))
710
+ return `(min-width: ${po[t]}px)`;
687
711
  const o = t.trim();
688
712
  return o.startsWith("@media") ? o.replace(/^@media\s+/, "") : o;
689
713
  }
690
- function xo(t) {
714
+ function go(t) {
691
715
  var o, i, e = "";
692
716
  if (typeof t == "string" || typeof t == "number") e += t;
693
717
  else if (typeof t == "object") if (Array.isArray(t)) {
694
718
  var r = t.length;
695
- for (o = 0; o < r; o++) t[o] && (i = xo(t[o])) && (e && (e += " "), e += i);
719
+ for (o = 0; o < r; o++) t[o] && (i = go(t[o])) && (e && (e += " "), e += i);
696
720
  } else for (i in t) t[i] && (e && (e += " "), e += i);
697
721
  return e;
698
722
  }
699
- function ti() {
700
- for (var t, o, i = 0, e = "", r = arguments.length; i < r; i++) (t = arguments[i]) && (o = xo(t)) && (e && (e += " "), e += o);
723
+ function ei() {
724
+ for (var t, o, i = 0, e = "", r = arguments.length; i < r; i++) (t = arguments[i]) && (o = go(t)) && (e && (e += " "), e += o);
701
725
  return e;
702
726
  }
703
- function ei(t) {
727
+ function fi(t) {
704
728
  const o = t.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
705
729
  if (!o)
706
730
  return t;
707
- const [, i, e, r] = o, f = parseFloat(i), n = parseFloat(e), s = parseFloat(r), c = n * Math.cos(s * Math.PI / 180), h = n * Math.sin(s * Math.PI / 180), b = f + 0.3963377774 * c + 0.2158037573 * h, l = f - 0.1055613458 * c - 0.0638541728 * h, x = f - 0.0894841775 * c - 1.291485548 * h, p = b * b * b, m = l * l * l, d = x * x * x, y = 4.0767416621 * p - 3.3077115913 * m + 0.2309699292 * d, z = -1.2684380046 * p + 2.6097574011 * m - 0.3413193965 * d, wo = -0.0041960863 * p - 0.7034186147 * m + 1.707614701 * d, B = (R) => R >= 31308e-7 ? 1.055 * R ** (1 / 2.4) - 0.055 : 12.92 * R, yo = Math.max(0, Math.min(1, B(y))), ko = Math.max(0, Math.min(1, B(z))), _o = Math.max(0, Math.min(1, B(wo))), L = (R) => {
708
- var H;
709
- const O = (H = Math.round(R * 255).toString(16)) == null ? void 0 : H.toUpperCase();
710
- return O.length === 1 ? `0${O}` : O;
731
+ const [, i, e, r] = o, f = parseFloat(i), n = parseFloat(e), s = parseFloat(r), c = n * Math.cos(s * Math.PI / 180), x = n * Math.sin(s * Math.PI / 180), b = f + 0.3963377774 * c + 0.2158037573 * x, l = f - 0.1055613458 * c - 0.0638541728 * x, h = f - 0.0894841775 * c - 1.291485548 * x, p = b * b * b, m = l * l * l, d = h * h * h, y = 4.0767416621 * p - 3.3077115913 * m + 0.2309699292 * d, S = -1.2684380046 * p + 2.6097574011 * m - 0.3413193965 * d, I = -0.0041960863 * p - 0.7034186147 * m + 1.707614701 * d, C = (F) => F >= 31308e-7 ? 1.055 * F ** (1 / 2.4) - 0.055 : 12.92 * F, ko = Math.max(0, Math.min(1, C(y))), _o = Math.max(0, Math.min(1, C(S))), zo = Math.max(0, Math.min(1, C(I))), A = (F) => {
732
+ var G;
733
+ const P = (G = Math.round(F * 255).toString(16)) == null ? void 0 : G.toUpperCase();
734
+ return P.length === 1 ? `0${P}` : P;
711
735
  };
712
- return `#${L(yo)}${L(ko)}${L(_o)}`;
736
+ return `#${A(ko)}${A(_o)}${A(zo)}`;
713
737
  }
714
- function fi(t) {
738
+ function ri(t) {
715
739
  const o = {}, i = {}, e = t.split(`
716
740
  `);
717
741
  for (const r of e) {
@@ -720,22 +744,22 @@ function fi(t) {
720
744
  continue;
721
745
  const n = f.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), s = f.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
722
746
  if (n) {
723
- const [, c, h] = n, b = ei(h);
747
+ const [, c, x] = n, b = fi(x);
724
748
  o[b.toLowerCase()] = `bg-${c}`, i[b.toLowerCase()] = `text-${c}`;
725
749
  } else if (s) {
726
- const [, c, h] = s;
727
- o[h.toLowerCase()] = `bg-${c}`, i[h.toLowerCase()] = `text-${c}`;
750
+ const [, c, x] = s;
751
+ o[x.toLowerCase()] = `bg-${c}`, i[x.toLowerCase()] = `text-${c}`;
728
752
  }
729
753
  }
730
754
  return { background: o, text: i };
731
755
  }
732
- const ri = (t) => {
756
+ const ni = (t) => {
733
757
  if (t !== void 0)
734
758
  return typeof t == "number" ? `${t}px` : t.toString();
735
759
  }, N = (t, o) => {
736
- const i = ri(o);
760
+ const i = ni(o);
737
761
  return i === void 0 ? "" : `${t}-[${i}]`;
738
- }, ni = `
762
+ }, si = `
739
763
  --color-red-50: oklch(0.971 0.013 17.38);
740
764
  --color-red-100: oklch(0.936 0.032 17.717);
741
765
  --color-red-200: oklch(0.885 0.062 18.334);
@@ -980,7 +1004,7 @@ const ri = (t) => {
980
1004
  --color-stone-950: oklch(0.147 0.004 49.25);
981
1005
  --color-black: #000;
982
1006
  --color-white: #fff;
983
- `, si = fi(ni), po = {
1007
+ `, ai = ri(si), mo = {
984
1008
  borderRadius: {
985
1009
  0: "rounded-none",
986
1010
  "0px": "rounded-none",
@@ -1077,7 +1101,7 @@ const ri = (t) => {
1077
1101
  fixed: "fixed",
1078
1102
  sticky: "sticky"
1079
1103
  }
1080
- }, ai = (t, o) => ({
1104
+ }, ci = (t, o) => ({
1081
1105
  // 背景色
1082
1106
  backgroundColor: (i) => i.backgroundColor ? [t.background[i.backgroundColor.toLowerCase()] || `bg-[${i.backgroundColor}]`] : [],
1083
1107
  // 文字色
@@ -1086,7 +1110,7 @@ const ri = (t) => {
1086
1110
  borderRadius: (i) => {
1087
1111
  if (!i.borderRadius)
1088
1112
  return [];
1089
- const e = po.borderRadius[i.borderRadius] || N("rounded", i.borderRadius);
1113
+ const e = mo.borderRadius[i.borderRadius] || N("rounded", i.borderRadius);
1090
1114
  return e ? [e] : [];
1091
1115
  },
1092
1116
  // 外边距
@@ -1233,7 +1257,7 @@ const ri = (t) => {
1233
1257
  },
1234
1258
  // 自定义类名
1235
1259
  className: (i) => i.className ? [i.className] : []
1236
- }), ci = {
1260
+ }), bi = {
1237
1261
  backgroundColor: "backgroundColor",
1238
1262
  color: "color",
1239
1263
  borderRadius: "borderRadius",
@@ -1267,49 +1291,49 @@ const ri = (t) => {
1267
1291
  position: "position",
1268
1292
  opacity: "opacity",
1269
1293
  className: "className"
1270
- }, bi = (t, o) => {
1271
- const i = (o == null ? void 0 : o.colorMaps) || si, e = (o == null ? void 0 : o.styleMaps) || po, r = ai(i, e), f = [], n = /* @__PURE__ */ new Set();
1294
+ }, ui = (t, o) => {
1295
+ const i = (o == null ? void 0 : o.colorMaps) || ai, e = (o == null ? void 0 : o.styleMaps) || mo, r = ci(i, e), f = [], n = /* @__PURE__ */ new Set();
1272
1296
  return Object.keys(t).forEach((s) => {
1273
- const c = ci[s];
1297
+ const c = bi[s];
1274
1298
  if (c && !n.has(c)) {
1275
- const h = r[c];
1276
- if (h) {
1277
- const b = h(t);
1299
+ const x = r[c];
1300
+ if (x) {
1301
+ const b = x(t);
1278
1302
  f.push(...b), n.add(c);
1279
1303
  }
1280
1304
  }
1281
1305
  }), f.filter(Boolean).join(" ");
1282
1306
  };
1283
- function ui(t) {
1307
+ function li(t) {
1284
1308
  const o = {};
1285
1309
  return t.forEach((i, e) => {
1286
1310
  o[e] = i.value;
1287
1311
  }), o;
1288
1312
  }
1289
- function li({ animatedProps: t, animationConfig: o, children: i }) {
1290
- const [e, r] = eo(
1291
- () => ui(t)
1313
+ function hi({ animatedProps: t, animationConfig: o, children: i }) {
1314
+ const [e, r] = ro(
1315
+ () => li(t)
1292
1316
  );
1293
- M(() => {
1317
+ L(() => {
1294
1318
  const c = [];
1295
- return t.forEach((h, b) => {
1296
- const l = (x) => {
1319
+ return t.forEach((x, b) => {
1320
+ const l = (h) => {
1297
1321
  r((p) => ({
1298
1322
  ...p,
1299
- [b]: x
1323
+ [b]: h
1300
1324
  }));
1301
1325
  };
1302
- c.push(h.subscribe(l)), l(h.value);
1326
+ c.push(x.subscribe(l)), l(x.value);
1303
1327
  }), () => {
1304
- c.forEach((h) => h());
1328
+ c.forEach((x) => x());
1305
1329
  };
1306
1330
  }, [t]);
1307
1331
  const f = [];
1308
1332
  e.translateX !== void 0 && f.push(`translateX(${e.translateX}px)`), e.translateY !== void 0 && f.push(`translateY(${e.translateY}px)`), e.scale !== void 0 && f.push(`scale(${e.scale})`), e.rotate !== void 0 && f.push(`rotate(${e.rotate}deg)`);
1309
1333
  const n = {};
1310
1334
  if (f.length > 0 && (n.transform = f.join(" ")), o) {
1311
- const { duration: c = 300, curve: h = "easeOut", stiffness: b, damping: l } = o, x = S(h, { stiffness: b, damping: l });
1312
- n.transition = `transform ${c}ms ${x}`;
1335
+ const { duration: c = 300, curve: x = "easeOut", stiffness: b, damping: l } = o, h = $(x, { stiffness: b, damping: l });
1336
+ n.transition = `transform ${c}ms ${h}`;
1313
1337
  }
1314
1338
  const s = {
1315
1339
  ...i.props.style,
@@ -1317,7 +1341,7 @@ function li({ animatedProps: t, animationConfig: o, children: i }) {
1317
1341
  };
1318
1342
  return $o(i, { style: s });
1319
1343
  }
1320
- const go = [
1344
+ const vo = [
1321
1345
  // —— 2D Transitions ——
1322
1346
  "grow",
1323
1347
  "shrink",
@@ -1437,7 +1461,7 @@ const go = [
1437
1461
  "curlTopRight",
1438
1462
  "curlBottomRight",
1439
1463
  "curlBottomLeft"
1440
- ], Q = {
1464
+ ], oo = {
1441
1465
  "pulse-grow": "pulseGrow",
1442
1466
  "pulse-shrink": "pulseShrink",
1443
1467
  "bounce-in": "bounceIn",
@@ -1534,29 +1558,29 @@ const go = [
1534
1558
  "hvr-float": "float",
1535
1559
  "hvr-sweep-to-right": "sweepToRight"
1536
1560
  };
1537
- function hi(t) {
1561
+ function xi(t) {
1538
1562
  return t.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`);
1539
1563
  }
1540
- function J(t) {
1541
- return go.includes(t);
1564
+ function io(t) {
1565
+ return vo.includes(t);
1542
1566
  }
1543
- function xi(t) {
1544
- const o = t.trim(), i = Q[o] ?? Q[o.toLowerCase()];
1567
+ function pi(t) {
1568
+ const o = t.trim(), i = oo[o] ?? oo[o.toLowerCase()];
1545
1569
  if (i) return i;
1546
- if (J(o)) return o;
1570
+ if (io(o)) return o;
1547
1571
  const e = o.replace(/-([a-z])/g, (r, f) => f.toUpperCase());
1548
- if (J(e)) return e;
1572
+ if (io(e)) return e;
1549
1573
  throw new Error(
1550
- `Unknown interaction effect "${t}". Use one of ${go.length} presets — see INTERACTION_EFFECTS.`
1574
+ `Unknown interaction effect "${t}". Use one of ${vo.length} presets — see INTERACTION_EFFECTS.`
1551
1575
  );
1552
1576
  }
1553
- function pi(t, o = !1) {
1577
+ function gi(t, o = !1) {
1554
1578
  return o ? `fibo-fx-on-group-${t}` : `fibo-fx-on-${t}`;
1555
1579
  }
1556
- function gi(t) {
1557
- return `fibo-fx-${hi(t)}`;
1580
+ function di(t) {
1581
+ return `fibo-fx-${xi(t)}`;
1558
1582
  }
1559
- const di = `
1583
+ const mi = `
1560
1584
  @keyframes fibo-fx-pulse { 25% { transform: scale(1.1); } 75% { transform: scale(0.9); } }
1561
1585
  @keyframes fibo-fx-pulse-grow { to { transform: scale(1.1); } }
1562
1586
  @keyframes fibo-fx-pulse-shrink { to { transform: scale(0.9); } }
@@ -1571,10 +1595,10 @@ const di = `
1571
1595
  100% { transform: scale(0); opacity: 0; }
1572
1596
  }
1573
1597
  @keyframes fibo-fx-bob {
1574
- 0% { transform: translateY(-8px); } 50% { transform: translateY(-4px); } 100% { transform: translateY(-8px); }
1598
+ 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); }
1575
1599
  }
1576
1600
  @keyframes fibo-fx-hang {
1577
- 0% { transform: translateY(8px); } 50% { transform: translateY(4px); } 100% { transform: translateY(8px); }
1601
+ 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); }
1578
1602
  }
1579
1603
  @keyframes fibo-fx-wobble-h {
1580
1604
  16.65% { transform: translateX(8px); } 33.3% { transform: translateX(-6px); }
@@ -1613,8 +1637,9 @@ const di = `
1613
1637
  83.25% { transform: skew(-2deg); } 100% { transform: skew(0); }
1614
1638
  }
1615
1639
  @keyframes fibo-fx-buzz {
1616
- 50% { transform: translateX(3px) rotate(2deg); }
1617
- 100% { transform: translateX(-3px) rotate(-2deg); }
1640
+ 0%,100% { transform: translateX(0) rotate(0); }
1641
+ 25% { transform: translateX(3px) rotate(2deg); }
1642
+ 75% { transform: translateX(-3px) rotate(-2deg); }
1618
1643
  }
1619
1644
  @keyframes fibo-fx-buzz-out {
1620
1645
  10% { transform: translateX(3px) rotate(2deg); }
@@ -1629,14 +1654,15 @@ const di = `
1629
1654
  100% { opacity: 1; transform: translateY(0); }
1630
1655
  }
1631
1656
  @keyframes fibo-fx-icon-bob {
1632
- 0%,100% { transform: translateY(-6px); } 50% { transform: translateY(-2px); }
1657
+ 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); }
1633
1658
  }
1634
1659
  @keyframes fibo-fx-icon-hang {
1635
- 0%,100% { transform: translateY(6px); } 50% { transform: translateY(2px); }
1660
+ 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); }
1636
1661
  }
1637
1662
  @keyframes fibo-fx-icon-buzz {
1638
- 50% { transform: translateX(3px) rotate(2deg); }
1639
- 100% { transform: translateX(-3px) rotate(-2deg); }
1663
+ 0%,100% { transform: translateX(0) rotate(0); }
1664
+ 25% { transform: translateX(3px) rotate(2deg); }
1665
+ 75% { transform: translateX(-3px) rotate(-2deg); }
1640
1666
  }
1641
1667
  @keyframes fibo-fx-back-pulse {
1642
1668
  50% { background-color: rgba(127,127,127,0.25); }
@@ -2847,44 +2873,50 @@ const di = `
2847
2873
  }
2848
2874
  }
2849
2875
  `.trim();
2850
- let oo = !1;
2851
- function mi() {
2852
- if (oo) return;
2853
- oo = !0;
2854
- const t = C.getInstance();
2855
- t.ensureDefaults(), t.injectExtra(di, "fibo-interaction-fx");
2876
+ let to = !1;
2877
+ function vi() {
2878
+ if (to) return;
2879
+ to = !0;
2880
+ const t = k.getInstance();
2881
+ t.ensureDefaults(), t.injectExtra(mi, "fibo-interaction-fx");
2856
2882
  }
2857
- function P(t) {
2883
+ function M(t, o, i, e = 0) {
2884
+ const r = (Array.isArray(t) ? t : [t]).flatMap((s) => String(s).split(",")).map((s) => s.trim()).filter(Boolean);
2885
+ r.length === 0 && r.push("all");
2886
+ const f = `${o}ms`, n = e > 0 ? ` ${e}ms` : "";
2887
+ return r.map((s) => `${s} ${f} ${i}${n}`).join(", ");
2888
+ }
2889
+ function D(t) {
2858
2890
  const o = { ...t };
2859
2891
  let i = !1;
2860
2892
  const e = o.background;
2861
- typeof e == "string" && e.trim() && o.backgroundColor == null && wi(e) && (o.backgroundColor = e, delete o.background, i = !0);
2893
+ typeof e == "string" && e.trim() && o.backgroundColor == null && yi(e) && (o.backgroundColor = e, delete o.background, i = !0);
2862
2894
  const r = o.border;
2863
2895
  if (typeof r == "string" && r.trim()) {
2864
- const f = yi(r);
2896
+ const f = ki(r);
2865
2897
  f && (o.borderWidth == null && f.width != null && (o.borderWidth = f.width), o.borderStyle == null && f.style != null && (o.borderStyle = f.style), o.borderColor == null && f.color != null && (o.borderColor = f.color), delete o.border, i = !0);
2866
2898
  }
2867
2899
  return i ? o : t;
2868
2900
  }
2869
- const vi = "translate3d(0, 0, 0)";
2870
- function io(t) {
2871
- return t.transform != null && String(t.transform).trim() !== "" ? t : { ...t, transform: vi };
2901
+ const wi = "translate3d(0, 0, 0)";
2902
+ function eo(t) {
2903
+ return t.transform != null && String(t.transform).trim() !== "" ? t : { ...t, transform: wi };
2872
2904
  }
2873
- function to(t, o) {
2905
+ function fo(t, o) {
2874
2906
  const i = typeof o == "number" ? `${o}px` : o;
2875
2907
  return t === "x" ? `translate3d(${i}, 0, 0)` : `translate3d(0, ${i}, 0)`;
2876
2908
  }
2877
- function wi(t) {
2909
+ function yi(t) {
2878
2910
  const o = t.trim().toLowerCase();
2879
2911
  return !(!o || o.includes("gradient(") || o.includes("url(") || o.includes("image(") || o.includes("element(") || o.startsWith("repeat") || o.includes(" / "));
2880
2912
  }
2881
- function yi(t) {
2913
+ function ki(t) {
2882
2914
  const o = t.trim();
2883
2915
  if (!o) return null;
2884
2916
  const i = o.match(/^(\S+)\s+(\S+)\s+(.+)$/);
2885
2917
  return i ? { width: i[1], style: i[2], color: i[3] } : null;
2886
2918
  }
2887
- const ki = {
2919
+ const _i = {
2888
2920
  "background-color": ["background-color"],
2889
2921
  "border-color": ["border-color"],
2890
2922
  color: ["color"],
@@ -2911,18 +2943,17 @@ class v {
2911
2943
  * Stamps CSS classes; sheet is fiboui-owned (not a Hover.css vendor).
2912
2944
  */
2913
2945
  effect(o) {
2914
- const i = xi(o);
2915
- return mi(), this.parentBuilder.addClassName("fibo-fx"), this.parentBuilder.addClassName(gi(i)), this.parentBuilder.addClassName(
2916
- pi(this.pseudoState, this.isGroup)
2946
+ const i = pi(o);
2947
+ return vi(), this.parentBuilder.addClassName("fibo-fx"), this.parentBuilder.addClassName(di(i)), this.parentBuilder.addClassName(
2948
+ gi(this.pseudoState, this.isGroup)
2917
2949
  ), this.parentBuilder.prepareSmoothInteraction([
2918
- "transform",
2919
2950
  "opacity",
2920
2951
  "box-shadow",
2921
2952
  "background-color",
2922
2953
  "border-color",
2923
2954
  "color",
2924
2955
  "border-radius"
2925
- ]), this;
2956
+ ]), this.parentBuilder.ensureEffectTransition(["transform"]), this;
2926
2957
  }
2927
2958
  bg(o) {
2928
2959
  return this.set("background-color", o);
@@ -2946,10 +2977,10 @@ class v {
2946
2977
  return this.transforms.set("scale", `scale(${o})`), this.flushTransform();
2947
2978
  }
2948
2979
  translateX(o) {
2949
- return this.transforms.set("translateX", to("x", o)), this.flushTransform();
2980
+ return this.transforms.set("translateX", fo("x", o)), this.flushTransform();
2950
2981
  }
2951
2982
  translateY(o) {
2952
- return this.transforms.set("translateY", to("y", o)), this.flushTransform();
2983
+ return this.transforms.set("translateY", fo("y", o)), this.flushTransform();
2953
2984
  }
2954
2985
  rotate(o) {
2955
2986
  return this.transforms.set("rotate", `rotate(${o}deg)`), this.flushTransform();
@@ -2963,14 +2994,17 @@ class v {
2963
2994
  transition(o, i, e, r) {
2964
2995
  if (typeof o == "string" && i === void 0)
2965
2996
  return this.set("transition", o);
2966
- const f = Array.isArray(o) ? o.join(", ") : o, n = `${i || this.transitionDuration}ms`, s = S(e || this.transitionEasing), c = r ? `${r}ms` : "0ms";
2967
- return this.set("transition", `${f} ${n} ${s} ${c}`);
2997
+ const f = Array.isArray(o) ? o : [o], n = $(e || this.transitionEasing);
2998
+ return this.set(
2999
+ "transition",
3000
+ M(f, i || this.transitionDuration, n, r || 0)
3001
+ );
2968
3002
  }
2969
3003
  duration(o) {
2970
3004
  return this.transitionDuration = o, this.applyTransition(), this;
2971
3005
  }
2972
3006
  easing(o) {
2973
- return this.transitionEasing = S(o), this.applyTransition(), this;
3007
+ return this.transitionEasing = $(o), this.applyTransition(), this;
2974
3008
  }
2975
3009
  ease(o) {
2976
3010
  return this.easing(o);
@@ -2982,14 +3016,21 @@ class v {
2982
3016
  return this.transitionProperties = o, this.applyTransition(), this;
2983
3017
  }
2984
3018
  applyTransition() {
2985
- const o = this.transitionProperties.join(", "), i = `${this.transitionDuration}ms`, e = this.transitionEasing, r = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
2986
- this.set("transition", `${o} ${i} ${e} ${r}`);
3019
+ this.set(
3020
+ "transition",
3021
+ M(
3022
+ this.transitionProperties,
3023
+ this.transitionDuration,
3024
+ this.transitionEasing,
3025
+ this.transitionDelay
3026
+ )
3027
+ );
2987
3028
  }
2988
3029
  flushTransform() {
2989
3030
  return this.set("transform", [...this.transforms.values()].join(" "));
2990
3031
  }
2991
3032
  set(o, i) {
2992
- const e = ki[o];
3033
+ const e = _i[o];
2993
3034
  e && this.parentBuilder.prepareSmoothInteraction(e);
2994
3035
  const r = u.registerPseudo(this.pseudoState, o, i, this.isGroup);
2995
3036
  return this.parentBuilder.addClassName(r), this;
@@ -2998,61 +3039,33 @@ class v {
2998
3039
  return this.parentBuilder;
2999
3040
  }
3000
3041
  }
3001
- function Gi(t, o) {
3002
- if (typeof document > "u") return;
3003
- const i = typeof t == "string" ? t : null, e = (i == null ? void 0 : i.replace(/^#/, "")) ?? null;
3004
- o != null && o.hash && e && typeof window < "u" && (window.location.hash = e);
3005
- const r = typeof t == "string" ? document.getElementById(t.replace(/^#/, "")) ?? document.querySelector(t.startsWith("#") ? t : `#${t}`) ?? document.querySelector(t) : t;
3006
- r && r.scrollIntoView({
3007
- behavior: (o == null ? void 0 : o.behavior) ?? "smooth",
3008
- block: (o == null ? void 0 : o.block) ?? "start"
3009
- });
3010
- }
3011
- function Ki(t) {
3012
- const o = typeof document < "u" ? document : void 0, i = o == null ? void 0 : o.startViewTransition;
3013
- if (typeof i == "function") {
3014
- i.call(o, t);
3015
- return;
3016
- }
3017
- t();
3018
- }
3019
- function _i() {
3020
- return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
3021
- }
3022
- function zi() {
3023
- return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
3024
- }
3025
- function Si({
3042
+ function zi({
3026
3043
  preset: t = "fadeUp",
3027
3044
  once: o = !0,
3028
3045
  rootMargin: i = "0px 0px -8% 0px",
3029
3046
  threshold: e = 0.12,
3030
3047
  forceMotion: r = !1,
3031
- preferTimeline: f = !1,
3048
+ style: f,
3032
3049
  children: n
3033
3050
  }) {
3034
- const s = _(null);
3035
- M(() => {
3051
+ const s = z(null);
3052
+ L(() => {
3036
3053
  w();
3037
- const h = s.current;
3038
- if (!h) return;
3039
- if (f && _i()) {
3040
- h.classList.add("fibo-inview");
3041
- return;
3042
- }
3054
+ const x = s.current;
3055
+ if (!x) return;
3043
3056
  if (typeof IntersectionObserver > "u") {
3044
- h.classList.add("fibo-inview");
3057
+ x.classList.add("fibo-inview");
3045
3058
  return;
3046
3059
  }
3047
3060
  const b = new IntersectionObserver(
3048
3061
  (l) => {
3049
- for (const x of l)
3050
- x.isIntersecting ? (x.target.classList.add("fibo-inview"), o && b.unobserve(x.target)) : o || x.target.classList.remove("fibo-inview");
3062
+ for (const h of l)
3063
+ h.isIntersecting ? (h.target.classList.add("fibo-inview"), o && b.unobserve(h.target)) : o || h.target.classList.remove("fibo-inview");
3051
3064
  },
3052
3065
  { rootMargin: i, threshold: e }
3053
3066
  );
3054
- return b.observe(h), () => b.disconnect();
3055
- }, [o, i, e, f]);
3067
+ return b.observe(x), () => b.disconnect();
3068
+ }, [o, i, e]);
3056
3069
  const c = [
3057
3070
  "fibo-reveal",
3058
3071
  `fibo-reveal-${t}`,
@@ -3060,12 +3073,40 @@ function Si({
3060
3073
  "min-w-0",
3061
3074
  r ? "fibo-motion-force" : ""
3062
3075
  ].filter(Boolean).join(" ");
3063
- return g.createElement("div", { ref: s, className: c, "data-fibo-reveal": t }, n);
3076
+ return g.createElement(
3077
+ "div",
3078
+ { ref: s, className: c, style: f, "data-fibo-reveal": t },
3079
+ n
3080
+ );
3081
+ }
3082
+ function Ki(t, o) {
3083
+ if (typeof document > "u") return;
3084
+ const i = typeof t == "string" ? t : null, e = (i == null ? void 0 : i.replace(/^#/, "")) ?? null;
3085
+ o != null && o.hash && e && typeof window < "u" && (window.location.hash = e);
3086
+ const r = typeof t == "string" ? document.getElementById(t.replace(/^#/, "")) ?? document.querySelector(t.startsWith("#") ? t : `#${t}`) ?? document.querySelector(t) : t;
3087
+ r && r.scrollIntoView({
3088
+ behavior: (o == null ? void 0 : o.behavior) ?? "smooth",
3089
+ block: (o == null ? void 0 : o.block) ?? "start"
3090
+ });
3091
+ }
3092
+ function Zi(t) {
3093
+ const o = typeof document < "u" ? document : void 0, i = o == null ? void 0 : o.startViewTransition;
3094
+ if (typeof i == "function") {
3095
+ i.call(o, t);
3096
+ return;
3097
+ }
3098
+ t();
3099
+ }
3100
+ function qi() {
3101
+ return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
3102
+ }
3103
+ function Si() {
3104
+ return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
3064
3105
  }
3065
- function $i({ children: t }) {
3066
- const o = _(null);
3067
- return M(() => {
3068
- if (w(), zi()) return;
3106
+ function Ci({ children: t }) {
3107
+ const o = z(null);
3108
+ return L(() => {
3109
+ if (w(), Si()) return;
3069
3110
  const i = () => {
3070
3111
  var f, n;
3071
3112
  return ((f = o.current) == null ? void 0 : f.querySelector(".fibo-scroll-progress")) ?? ((n = o.current) == null ? void 0 : n.firstElementChild);
@@ -3084,8 +3125,8 @@ function $i({ children: t }) {
3084
3125
  t
3085
3126
  );
3086
3127
  }
3087
- const mo = 64, Ci = `${mo}px`;
3088
- class Zi {
3128
+ const wo = 64, $i = `${wo}px`;
3129
+ class Qi {
3089
3130
  constructor() {
3090
3131
  /** @internal Extra DOM props forwarded to the host element. */
3091
3132
  a(this, "_props", {});
@@ -3323,6 +3364,9 @@ class Zi {
3323
3364
  "on-tertiary-container",
3324
3365
  "error",
3325
3366
  "on-error",
3367
+ "success",
3368
+ "warning",
3369
+ "info",
3326
3370
  "background",
3327
3371
  "on-background",
3328
3372
  "surface",
@@ -3396,15 +3440,15 @@ class Zi {
3396
3440
  if (Array.isArray(o)) {
3397
3441
  const [f, n, s, c] = o;
3398
3442
  if (typeof f == "string" && e(f)) {
3399
- const l = r("all", "md", f, n), x = u.register("box-shadow", l);
3400
- return this._classNames.push(x), this;
3443
+ const l = r("all", "md", f, n), h = u.register("box-shadow", l);
3444
+ return this._classNames.push(h), this;
3401
3445
  }
3402
- const h = f;
3446
+ const x = f;
3403
3447
  if (typeof n == "string" && e(n)) {
3404
- const l = r(h, "md", n, s), x = u.register("box-shadow", l);
3405
- return this._classNames.push(x), this;
3448
+ const l = r(x, "md", n, s), h = u.register("box-shadow", l);
3449
+ return this._classNames.push(h), this;
3406
3450
  } else {
3407
- const x = r(h, n, s, c), p = u.register("box-shadow", x);
3451
+ const h = r(x, n, s, c), p = u.register("box-shadow", h);
3408
3452
  return this._classNames.push(p), this;
3409
3453
  }
3410
3454
  }
@@ -3424,7 +3468,7 @@ class Zi {
3424
3468
  * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
3425
3469
  */
3426
3470
  media(o, i) {
3427
- return this.registerMediaStyles(ii(o), i), this;
3471
+ return this.registerMediaStyles(ti(o), i), this;
3428
3472
  }
3429
3473
  registerMediaStyles(o, i) {
3430
3474
  if (!i) return;
@@ -3637,16 +3681,16 @@ class Zi {
3637
3681
  return this._signals.add(o), this;
3638
3682
  }
3639
3683
  translateX(o) {
3640
- return o instanceof I ? this._animatedProps.set("translateX", o) : this._transforms.push(`translateX(${o}px)`), this;
3684
+ return o instanceof X ? this._animatedProps.set("translateX", o) : this._transforms.push(`translateX(${o}px)`), this;
3641
3685
  }
3642
3686
  translateY(o) {
3643
- return o instanceof I ? this._animatedProps.set("translateY", o) : this._transforms.push(`translateY(${o}px)`), this;
3687
+ return o instanceof X ? this._animatedProps.set("translateY", o) : this._transforms.push(`translateY(${o}px)`), this;
3644
3688
  }
3645
3689
  scale(o) {
3646
- return o instanceof I ? this._animatedProps.set("scale", o) : this._transforms.push(`scale(${o})`), this;
3690
+ return o instanceof X ? this._animatedProps.set("scale", o) : this._transforms.push(`scale(${o})`), this;
3647
3691
  }
3648
3692
  rotate(o) {
3649
- return o instanceof I ? this._animatedProps.set("rotate", o) : this._transforms.push(`rotate(${o}deg)`), this;
3693
+ return o instanceof X ? this._animatedProps.set("rotate", o) : this._transforms.push(`rotate(${o}deg)`), this;
3650
3694
  }
3651
3695
  gesture(o) {
3652
3696
  return this._gesture = o, this;
@@ -3675,22 +3719,27 @@ class Zi {
3675
3719
  transition(o, i, e, r) {
3676
3720
  if (this._autoEffectTransition = !1, this._effectTransitionProps = [], typeof o == "string" && i === void 0)
3677
3721
  return this.replaceTransitionClass(u.register("transition", o)), this;
3678
- const f = Array.isArray(o) ? o.join(", ") : o, n = `${i || this._transitionDuration}ms`, s = S(e || this._transitionEasing), c = r ? `${r}ms` : "0ms";
3679
- return this.replaceTransitionClass(u.register("transition", `${f} ${n} ${s} ${c}`)), this;
3722
+ const f = Array.isArray(o) ? o : [o], n = $(e || this._transitionEasing);
3723
+ return this.replaceTransitionClass(
3724
+ u.register(
3725
+ "transition",
3726
+ M(f, i || this._transitionDuration, n, r || 0)
3727
+ )
3728
+ ), this;
3680
3729
  }
3681
3730
  /**
3682
3731
  * Set transition duration in milliseconds
3683
3732
  * Example: .duration(200) → 200ms
3684
3733
  */
3685
3734
  duration(o) {
3686
- return this._transitionDuration = o, this._motionClass ? (this._style["--fibo-dur"] = `${o}ms`, this) : (this._applyTransition(), this);
3735
+ return this._transitionDuration = o, (this._motionClass || this._reveal || this._usesCssMotion) && (this._style["--fibo-dur"] = `${o}ms`, this._motionClass) ? this : (this._applyTransition(), this);
3687
3736
  }
3688
3737
  /**
3689
3738
  * Set transition easing function
3690
3739
  * Example: .easing('ease-in-out')
3691
3740
  */
3692
3741
  easing(o) {
3693
- return this._transitionEasing = S(o), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
3742
+ return this._transitionEasing = $(o), (this._motionClass || this._reveal || this._usesCssMotion) && (this._style["--fibo-ease"] = this._transitionEasing, this._motionClass) ? this : (this._applyTransition(), this);
3694
3743
  }
3695
3744
  /** Alias of `.easing()`. `'spring'` becomes CSS `linear()`. */
3696
3745
  ease(o) {
@@ -3701,7 +3750,7 @@ class Zi {
3701
3750
  * Example: .delay(100) → 100ms delay
3702
3751
  */
3703
3752
  delay(o) {
3704
- return this._transitionDelay = o, this._motionClass ? (this._style["--fibo-delay"] = `${o}ms`, this) : (this._applyTransition(), this);
3753
+ return this._transitionDelay = o, (this._motionClass || this._reveal || this._usesCssMotion) && (this._style["--fibo-delay"] = `${o}ms`, this._motionClass) ? this : (this._applyTransition(), this);
3705
3754
  }
3706
3755
  /**
3707
3756
  * Set which properties to transition
@@ -3714,16 +3763,24 @@ class Zi {
3714
3763
  * Apply the built transition to the element
3715
3764
  */
3716
3765
  _applyTransition() {
3717
- this._autoEffectTransition = !1, this._effectTransitionProps = [];
3718
- const o = this._transitionProperties.join(", "), i = `${this._transitionDuration}ms`, e = this._transitionEasing, r = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
3719
- this.replaceTransitionClass(u.register("transition", `${o} ${i} ${e} ${r}`));
3766
+ this._autoEffectTransition = !1, this._effectTransitionProps = [], this.replaceTransitionClass(
3767
+ u.register(
3768
+ "transition",
3769
+ M(
3770
+ this._transitionProperties,
3771
+ this._transitionDuration,
3772
+ this._transitionEasing,
3773
+ this._transitionDelay
3774
+ )
3775
+ )
3776
+ );
3720
3777
  }
3721
3778
  replaceTransitionClass(o) {
3722
3779
  this._transitionClass && (this._classNames = this._classNames.filter((i) => i !== this._transitionClass)), this._transitionClass = o, this._classNames.push(o);
3723
3780
  }
3724
3781
  animate(o, i) {
3725
3782
  w(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((b) => b !== this._motionClass));
3726
- const e = Zo(o), r = (e ? o.duration : i == null ? void 0 : i.duration) ?? this._transitionDuration, f = (e ? o.delay : i == null ? void 0 : i.delay) ?? this._transitionDelay;
3783
+ const e = qo(o), r = (e ? o.duration : i == null ? void 0 : i.duration) ?? this._transitionDuration, f = (e ? o.delay : i == null ? void 0 : i.delay) ?? this._transitionDelay;
3727
3784
  let n = e ? o.ease : i == null ? void 0 : i.ease;
3728
3785
  const s = {
3729
3786
  stiffness: (e ? o.stiffness : i == null ? void 0 : i.stiffness) ?? void 0,
@@ -3731,20 +3788,20 @@ class Zi {
3731
3788
  mass: (e ? o.mass : i == null ? void 0 : i.mass) ?? void 0
3732
3789
  };
3733
3790
  if (e) {
3734
- const b = Z(o.from), l = Z(o.to), x = u.registerKeyframes(qo(`${b}=>${l}`), b, l);
3735
- this._motionClass = `fibo-anim ${x}`, this._props["data-fibo-anim"] = "custom";
3791
+ const b = Q(o.from), l = Q(o.to), h = u.registerKeyframes(Qo(`${b}=>${l}`), b, l);
3792
+ this._motionClass = `fibo-anim ${h}`, this._props["data-fibo-anim"] = "custom";
3736
3793
  } else {
3737
- const b = Qo(o);
3794
+ const b = Jo(o);
3738
3795
  this._motionClass = `fibo-anim fibo-anim-${b}`, this._props["data-fibo-anim"] = b, (i == null ? void 0 : i.from) !== void 0 && (this._style["--fibo-from"] = typeof i.from == "number" ? `${i.from}px` : i.from), !n && b === "pop" && (n = "spring");
3739
3796
  }
3740
- const c = S(n ?? "ease", s);
3797
+ const c = $(n ?? "ease", s);
3741
3798
  this._classNames.push(this._motionClass);
3742
- const h = this._style;
3743
- return h["--fibo-dur"] = `${r}ms`, h["--fibo-ease"] = c, h["--fibo-delay"] = `${f}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
3799
+ const x = this._style;
3800
+ return x["--fibo-dur"] = `${r}ms`, x["--fibo-ease"] = c, x["--fibo-delay"] = `${f}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
3744
3801
  }
3745
3802
  /** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
3746
3803
  spring(o) {
3747
- const i = uo(o);
3804
+ const i = ho(o);
3748
3805
  return this._transitionEasing = i, this._motionClass ? (this._style["--fibo-ease"] = i, this) : (this._applyTransition(), this);
3749
3806
  }
3750
3807
  reducedMotion(o = "reduce") {
@@ -3832,7 +3889,7 @@ class Zi {
3832
3889
  this._classNames.push(u.register("position", "sticky"));
3833
3890
  const i = o === !0 ? "0px" : typeof o == "number" ? `${o}px` : o;
3834
3891
  this._classNames.push(u.register("top", i));
3835
- const e = o === !0 || o === 0 ? Ci : typeof o == "number" ? `${Math.max(o, mo)}px` : o;
3892
+ const e = o === !0 || o === 0 ? $i : typeof o == "number" ? `${Math.max(o, wo)}px` : o;
3836
3893
  return this.publishStickyOffset(e), this;
3837
3894
  }
3838
3895
  /**
@@ -3871,11 +3928,11 @@ class Zi {
3871
3928
  }
3872
3929
  /** @internal Convert inline background/border shorthands → longhands. */
3873
3930
  promoteSurfaceLonghands() {
3874
- this._style = P(this._style), this._cssStyles = P(this._cssStyles);
3931
+ this._style = D(this._style), this._cssStyles = D(this._cssStyles);
3875
3932
  }
3876
3933
  /** @internal Stamp translate3d(0,0,0) when no resting transform exists. */
3877
3934
  ensureRestTransform() {
3878
- const o = io(this._style);
3935
+ const o = eo(this._style);
3879
3936
  o !== this._style && (this._style = o);
3880
3937
  }
3881
3938
  /**
@@ -3885,7 +3942,7 @@ class Zi {
3885
3942
  * @internal Used by PseudoStateBuilder.effect() and hover/press shortcuts.
3886
3943
  */
3887
3944
  ensureEffectTransition(o) {
3888
- if (this._motionClass || this._transitionClass && !this._autoEffectTransition) return;
3945
+ if (this._transitionClass && !this._autoEffectTransition) return;
3889
3946
  const i = new Set(this._effectTransitionProps);
3890
3947
  for (const f of o) i.add(f);
3891
3948
  i.add("transform"), i.add("opacity"), this._effectTransitionProps = [...i], this._autoEffectTransition = !0;
@@ -3893,7 +3950,7 @@ class Zi {
3893
3950
  this.replaceTransitionClass(
3894
3951
  u.register(
3895
3952
  "transition",
3896
- `${this._effectTransitionProps.join(", ")} ${r}ms ${e}`
3953
+ M(this._effectTransitionProps, r, e)
3897
3954
  )
3898
3955
  );
3899
3956
  }
@@ -3903,7 +3960,7 @@ class Zi {
3903
3960
  * SSR-safe: class + inline vars on first paint (no useEffect).
3904
3961
  */
3905
3962
  theme(o) {
3906
- const i = Co(o);
3963
+ const i = To(o);
3907
3964
  return this._theme = i, this.addClassName(No(i)), this;
3908
3965
  }
3909
3966
  /** Prefer dark/light system chrome for native controls under this subtree. */
@@ -3916,10 +3973,12 @@ class Zi {
3916
3973
  return o ? (o(i), this) : i;
3917
3974
  }
3918
3975
  focus(o) {
3976
+ this.ensureInteractiveTransition();
3919
3977
  const i = new v("focus", this);
3920
3978
  return o ? (o(i), this) : i;
3921
3979
  }
3922
3980
  active(o) {
3981
+ this.ensureInteractiveTransition();
3923
3982
  const i = new v("active", this);
3924
3983
  return o ? (o(i), this) : i;
3925
3984
  }
@@ -3948,7 +4007,7 @@ class Zi {
3948
4007
  return o ? (o(i), this) : i;
3949
4008
  }
3950
4009
  groupFocus(o) {
3951
- const i = new v("focus", this, !0);
4010
+ const i = new v("focus-within", this, !0);
3952
4011
  return o ? (o(i), this) : i;
3953
4012
  }
3954
4013
  groupActive(o) {
@@ -3963,16 +4022,16 @@ class Zi {
3963
4022
  return this._classNames.push("group"), this;
3964
4023
  }
3965
4024
  children(o) {
3966
- return typeof o == "function" ? (this._childFunction = o, this._children = []) : (this._children = U(o), this._childFunction = void 0), this;
4025
+ return typeof o == "function" ? (this._childFunction = o, this._children = []) : (this._children = K(o), this._childFunction = void 0), this;
3967
4026
  }
3968
4027
  getClassName() {
3969
4028
  let o;
3970
- return Object.keys(this._cssStyles).length > 0 && (o = bi(this._cssStyles) || void 0), ti(this._classNames, o);
4029
+ return Object.keys(this._cssStyles).length > 0 && (o = ui(this._cssStyles) || void 0), ei(this._classNames, o);
3971
4030
  }
3972
4031
  getStyle() {
3973
4032
  let o = { ...this._style, ...this._cssStyles };
3974
- if (this._smoothSurface && (o = P(o), this._smoothNeedsRestTransform && (o = io(o))), this._theme && (o = {
3975
- ...To(this._theme),
4033
+ if (this._smoothSurface && (o = D(o), this._smoothNeedsRestTransform && (o = eo(o))), this._theme && (o = {
4034
+ ...Eo(this._theme),
3976
4035
  ...o,
3977
4036
  backgroundColor: o.backgroundColor ?? this._theme.colors.background,
3978
4037
  color: o.color ?? this._theme.colors.onBackground,
@@ -3982,18 +4041,18 @@ class Zi {
3982
4041
  o.transform = i ? `${i} ${this._transforms.join(" ")}` : this._transforms.join(" ");
3983
4042
  }
3984
4043
  if (this._animationConfig && this._animatedProps.size === 0) {
3985
- const { duration: i = 300, curve: e = "easeOut", stiffness: r, damping: f } = this._animationConfig, n = S(e, { stiffness: r, damping: f });
4044
+ const { duration: i = 300, curve: e = "easeOut", stiffness: r, damping: f } = this._animationConfig, n = $(e, { stiffness: r, damping: f });
3986
4045
  o.transition = `all ${i}ms ${n}`;
3987
4046
  }
3988
4047
  return o;
3989
4048
  }
3990
4049
  processChildren() {
3991
- const o = this._childFunction ? U(this._childFunction) : this._children;
4050
+ const o = this._childFunction ? K(this._childFunction) : this._children;
3992
4051
  return this._staggerMs == null ? o : o.map(
3993
4052
  (i, e) => g.createElement(
3994
4053
  "span",
3995
4054
  {
3996
- key: g.isValidElement(i) && W(i.key) ? i.key : `fibo-stagger-${e}`,
4055
+ key: g.isValidElement(i) && U(i.key) ? i.key : `fibo-stagger-${e}`,
3997
4056
  className: "fibo-stagger-item",
3998
4057
  style: { "--fibo-i": String(e) }
3999
4058
  },
@@ -4005,7 +4064,7 @@ class Zi {
4005
4064
  return this._childFunction;
4006
4065
  }
4007
4066
  }
4008
- const Ni = /* @__PURE__ */ new Set([
4067
+ const Ti = /* @__PURE__ */ new Set([
4009
4068
  "$$typeof",
4010
4069
  "type",
4011
4070
  "props",
@@ -4018,51 +4077,56 @@ const Ni = /* @__PURE__ */ new Set([
4018
4077
  "_debugTask",
4019
4078
  "_debugInfo"
4020
4079
  ]);
4021
- function Ti(t) {
4080
+ function Ni(t) {
4022
4081
  var i;
4023
4082
  const o = (i = t._props) == null ? void 0 : i.key;
4024
4083
  if (!(o == null || o === ""))
4025
4084
  return o;
4026
4085
  }
4027
4086
  function Ei(t) {
4028
- const o = t._isObserver, i = t._signals, e = t._observers, r = t._state, f = t._providers, n = Ti(t), s = () => {
4029
- var z;
4030
- let x = t.build();
4087
+ const o = t._isObserver, i = t._signals, e = t._observers, r = t._state, f = t._providers, n = Ni(t), s = () => {
4088
+ let h = t.build();
4031
4089
  const p = t._animatedProps, m = t._animationConfig;
4032
- p && p.size > 0 && (x = g.createElement(li, {
4090
+ p && p.size > 0 && (h = g.createElement(hi, {
4033
4091
  key: n,
4034
4092
  animatedProps: p,
4035
4093
  animationConfig: m,
4036
- children: x
4094
+ children: h
4037
4095
  }));
4038
4096
  const d = t._reveal;
4039
- d && (x = g.createElement(Si, {
4040
- key: n,
4041
- preset: d.preset,
4042
- once: d.once,
4043
- rootMargin: d.rootMargin,
4044
- threshold: d.threshold,
4045
- forceMotion: t._reducedMotion === "never",
4046
- preferTimeline: (z = t._classNames) == null ? void 0 : z.includes("fibo-view-timeline"),
4047
- children: x
4048
- })), t._scrollProgress && (x = g.createElement($i, { key: n, children: x })), t._usesCssMotion && (x = g.createElement(
4097
+ if (d) {
4098
+ const S = t._style || {}, I = {};
4099
+ for (const C of ["--fibo-dur", "--fibo-ease", "--fibo-delay", "--fibo-stagger", "--fibo-from"])
4100
+ S[C] != null && (I[C] = S[C]);
4101
+ h = g.createElement(zi, {
4102
+ key: n,
4103
+ preset: d.preset,
4104
+ once: d.once,
4105
+ rootMargin: d.rootMargin,
4106
+ threshold: d.threshold,
4107
+ forceMotion: t._reducedMotion === "never",
4108
+ style: Object.keys(I).length > 0 ? I : void 0,
4109
+ children: h
4110
+ });
4111
+ }
4112
+ t._scrollProgress && (h = g.createElement(Ci, { key: n, children: h })), t._usesCssMotion && (h = g.createElement(
4049
4113
  g.Fragment,
4050
4114
  { key: n },
4051
- g.createElement(Jo),
4052
- x
4115
+ g.createElement(oi),
4116
+ h
4053
4117
  ));
4054
4118
  const y = t._gesture;
4055
- return y && (x = y.wrap(x)), x;
4056
- }, c = typeof t.hasStateManagement == "function" ? t.hasStateManagement() : !!(o || i && i.size || e && e.size || r && r.size || f && f.size), h = o ? g.createElement(Lo, {
4119
+ return y && (h = y.wrap(h)), h;
4120
+ }, c = typeof t.hasStateManagement == "function" ? t.hasStateManagement() : !!(o || i && i.size || e && e.size || r && r.size || f && f.size), x = o ? g.createElement(Oo, {
4057
4121
  key: n,
4058
4122
  children: s
4059
- }) : null, b = () => h ?? s();
4123
+ }) : null, b = () => x ?? s();
4060
4124
  let l = b();
4061
4125
  return c && i && i.size > 0 ? l = g.createElement(jo, {
4062
4126
  key: n,
4063
4127
  signals: i,
4064
4128
  children: b
4065
- }) : c && e && e.size > 0 && (l = g.createElement(Ao, {
4129
+ }) : c && e && e.size > 0 && (l = g.createElement(Do, {
4066
4130
  key: n,
4067
4131
  observables: e,
4068
4132
  children: b
@@ -4070,13 +4134,13 @@ function Ei(t) {
4070
4134
  key: n,
4071
4135
  stateMap: r,
4072
4136
  children: l
4073
- })), c && f && f.size > 0 && (l = g.createElement(Do, {
4137
+ })), c && f && f.size > 0 && (l = g.createElement(Vo, {
4074
4138
  key: n,
4075
4139
  providers: f,
4076
4140
  children: l
4077
4141
  })), l;
4078
4142
  }
4079
- function vo(t, o, i) {
4143
+ function yo(t, o, i) {
4080
4144
  const e = function() {
4081
4145
  return o();
4082
4146
  };
@@ -4093,12 +4157,12 @@ function vo(t, o, i) {
4093
4157
  writable: !0
4094
4158
  }), t.ref = r.ref ?? null, t.__fiboElementProps = r.props ?? {}, r._owner !== void 0 && (t._owner = r._owner), t._store = { validated: 1 };
4095
4159
  }
4096
- function qi(t) {
4160
+ function Ji(t) {
4097
4161
  return (...o) => {
4098
4162
  const i = new t(...o), e = t.name.replace(/Builder$/, "") || "Fibo", r = () => Ei(i);
4099
- return vo(i, r, e), new Proxy(i, {
4163
+ return yo(i, r, e), new Proxy(i, {
4100
4164
  get(f, n, s) {
4101
- var c, h;
4165
+ var c, x;
4102
4166
  if (n === "build")
4103
4167
  return r;
4104
4168
  if (n === "key") {
@@ -4106,19 +4170,19 @@ function qi(t) {
4106
4170
  if (b != null && b !== "")
4107
4171
  return String(b);
4108
4172
  if (!f.__fiboKeyFn) {
4109
- const l = (x) => (f.key(x), s);
4173
+ const l = (h) => (f.key(h), s);
4110
4174
  f.__fiboKeyFn = l;
4111
4175
  }
4112
4176
  return f.__fiboKeyFn;
4113
4177
  }
4114
4178
  if (n === "props") {
4115
- const b = (h = f._props) == null ? void 0 : h.key, l = {
4179
+ const b = (x = f._props) == null ? void 0 : x.key, l = {
4116
4180
  ...f.__fiboElementProps ?? {},
4117
4181
  ...b != null && b !== "" ? { key: String(b) } : {}
4118
- }, x = Object.getPrototypeOf(f).props;
4119
- return typeof x == "function" ? Object.assign((m) => (x.call(f, m), s), l) : l;
4182
+ }, h = Object.getPrototypeOf(f).props;
4183
+ return typeof h == "function" ? Object.assign((m) => (h.call(f, m), s), l) : l;
4120
4184
  }
4121
- return Ni.has(n) || Reflect.has(f, n) ? Reflect.get(f, n, s) : (b) => {
4185
+ return Ti.has(n) || Reflect.has(f, n) ? Reflect.get(f, n, s) : (b) => {
4122
4186
  const l = 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(l), m = typeof b == "number" && !p ? `${b}px` : String(b), d = u.register(l, m);
4123
4187
  return f.className(d), s;
4124
4188
  };
@@ -4144,7 +4208,7 @@ class Fi {
4144
4208
  a(this, "_loading");
4145
4209
  a(this, "_error");
4146
4210
  a(this, "_builder");
4147
- this._signal = o, vo(this, () => this.build(), "ValueBuilder");
4211
+ this._signal = o, yo(this, () => this.build(), "ValueBuilder");
4148
4212
  }
4149
4213
  loading(o) {
4150
4214
  return this._loading = typeof o == "function" ? o : () => o, this;
@@ -4167,59 +4231,60 @@ class Fi {
4167
4231
  });
4168
4232
  }
4169
4233
  }
4170
- function Qi(t) {
4234
+ function ot(t) {
4171
4235
  return new Fi(t);
4172
4236
  }
4173
4237
  export {
4174
4238
  Hi as A,
4175
- qi as B,
4176
- Fo as C,
4177
- Zi as D,
4178
- Bo as E,
4179
- di as F,
4180
- Ro as G,
4181
- w as H,
4182
- go as I,
4183
- Qo as J,
4184
- Po as K,
4185
- Vo as L,
4186
- K as M,
4239
+ Ui as B,
4240
+ Xo as C,
4241
+ Ji as D,
4242
+ Qi as E,
4243
+ mi as F,
4244
+ Lo as G,
4245
+ Io as H,
4246
+ vo as I,
4247
+ w as J,
4248
+ Jo as K,
4249
+ Po as L,
4250
+ q as M,
4187
4251
  Wo as N,
4188
- Xo as O,
4189
- Do as P,
4252
+ Mo as O,
4253
+ Vo as P,
4190
4254
  Ho as Q,
4191
- ji as R,
4192
- I as S,
4193
- U as T,
4194
- q as U,
4195
- Qi as V,
4196
- A as W,
4197
- ho as X,
4198
- ii as Y,
4199
- Ai as a,
4200
- no as b,
4255
+ Di as R,
4256
+ X as S,
4257
+ Uo as T,
4258
+ K as U,
4259
+ ot as V,
4260
+ J as W,
4261
+ j as X,
4262
+ po as Y,
4263
+ ti as Z,
4264
+ Pi as a,
4265
+ ao as b,
4201
4266
  Oi as c,
4202
- Lo as d,
4267
+ Oo as d,
4203
4268
  Vi as e,
4204
- Si as f,
4205
- so as g,
4206
- $i as h,
4207
- Gi as i,
4208
- Ki as j,
4209
- _i as k,
4210
- zi as l,
4211
- uo as m,
4212
- S as n,
4213
- Pi as o,
4214
- xi as p,
4215
- gi as q,
4216
- Eo as r,
4269
+ zi as f,
4270
+ co as g,
4271
+ Ci as h,
4272
+ Ki as i,
4273
+ Zi as j,
4274
+ qi as k,
4275
+ Si as l,
4276
+ ho as m,
4277
+ $ as n,
4278
+ Ai as o,
4279
+ pi as p,
4280
+ di as q,
4281
+ Ro as r,
4217
4282
  Li as s,
4218
- hi as t,
4219
- Di as u,
4220
- mi as v,
4221
- Jo as w,
4222
- Ui as x,
4283
+ xi as t,
4284
+ ji as u,
4285
+ vi as v,
4286
+ oi as w,
4287
+ Gi as x,
4223
4288
  Wi as y,
4224
- lo as z
4289
+ xo as z
4225
4290
  };