fiboui 2.2.3 → 2.2.4
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.
- package/README.md +1 -1
- package/dist/{FineGrain-BEvB51B2.js → FineGrain-Bishpo5C.js} +1 -1
- package/dist/{builder-3Bc2PfP9.js → builder-DxmEDvW3.js} +255 -253
- package/dist/content.js +3 -3
- package/dist/core.js +3 -3
- package/dist/{index-BlciuWzU.js → index-B_NshIUT.js} +1 -1
- package/dist/{index-CxbrZGXa.js → index-CIUytVXq.js} +3 -3
- package/dist/{index-DgRpEUs0.js → index-CKbAiJg2.js} +4 -4
- package/dist/{index-Cae2Rtx1.js → index-CdDg3sZt.js} +1 -1
- package/dist/{index-BObp1JkM.js → index-Des7FiFH.js} +2 -2
- package/dist/{index-DbjaknWm.js → index-K-VIFyCP.js} +3 -3
- package/dist/{index-CZQ5erLU.js → index-nFXU29Ly.js} +1 -1
- package/dist/index.d.ts +47 -2
- package/dist/index.js +632 -586
- package/dist/interactive.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/{mount-D59e1COl.js → mount-B316Ig0o.js} +1 -1
- package/dist/structure.js +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var gt = Object.defineProperty;
|
|
3
3
|
var bt = (r, t, e) => t in r ? gt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
4
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
|
|
5
|
+
import g, { useRef as w, createContext as j, useContext as B, useCallback as E, useSyncExternalStore as O, useEffect as A, useState as Z, cloneElement as yt } from "react";
|
|
6
6
|
import { jsx as C, Fragment as W } from "react/jsx-runtime";
|
|
7
7
|
class J {
|
|
8
8
|
constructor() {
|
|
@@ -195,8 +195,8 @@ class St {
|
|
|
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 },
|
|
199
|
-
|
|
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());
|
|
200
200
|
}
|
|
201
201
|
subscribe(t) {
|
|
202
202
|
return this.listeners.add(t), () => this.listeners.delete(t);
|
|
@@ -216,7 +216,7 @@ function ke(r) {
|
|
|
216
216
|
}
|
|
217
217
|
const vt = tt(), st = j(vt);
|
|
218
218
|
function Ct() {
|
|
219
|
-
return
|
|
219
|
+
return B(st);
|
|
220
220
|
}
|
|
221
221
|
function _e({ children: r, scope: t }) {
|
|
222
222
|
const e = w(t ?? tt()).current;
|
|
@@ -227,10 +227,10 @@ function Nt({ children: r }) {
|
|
|
227
227
|
s.current || (s.current = new xt(() => {
|
|
228
228
|
t.current += 1, e.current.forEach((l) => l());
|
|
229
229
|
}));
|
|
230
|
-
const
|
|
230
|
+
const o = E((l) => (e.current.add(l), () => {
|
|
231
231
|
e.current.delete(l);
|
|
232
|
-
}), []),
|
|
233
|
-
|
|
232
|
+
}), []), i = E(() => t.current, []);
|
|
233
|
+
O(o, i, i), A(() => () => {
|
|
234
234
|
var l;
|
|
235
235
|
(l = s.current) == null || l.dispose();
|
|
236
236
|
}, []);
|
|
@@ -245,51 +245,51 @@ function Nt({ children: r }) {
|
|
|
245
245
|
}
|
|
246
246
|
const Et = j(/* @__PURE__ */ new Map()), rt = j(null);
|
|
247
247
|
function xe(r) {
|
|
248
|
-
const t =
|
|
248
|
+
const t = B(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
253
|
function Mt({ stateMap: r = /* @__PURE__ */ new Map(), children: t }) {
|
|
254
|
-
const [e, s] =
|
|
254
|
+
const [e, s] = Z(() => new Map(r)), o = {
|
|
255
255
|
map: e,
|
|
256
|
-
get: (
|
|
257
|
-
set: (
|
|
256
|
+
get: (i) => e.get(i),
|
|
257
|
+
set: (i, n) => {
|
|
258
258
|
s((a) => {
|
|
259
|
-
if (Object.is(a.get(
|
|
259
|
+
if (Object.is(a.get(i), n))
|
|
260
260
|
return a;
|
|
261
261
|
const l = new Map(a);
|
|
262
|
-
return l.set(
|
|
262
|
+
return l.set(i, n), l;
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
|
-
return /* @__PURE__ */ C(rt.Provider, { value:
|
|
266
|
+
return /* @__PURE__ */ C(rt.Provider, { value: o, children: /* @__PURE__ */ C(Et.Provider, { value: e, children: t }) });
|
|
267
267
|
}
|
|
268
268
|
function Tt({ observables: r, children: t }) {
|
|
269
|
-
const e = w(0), s = E((
|
|
269
|
+
const e = w(0), s = E((i) => {
|
|
270
270
|
const n = Array.from(r).map(
|
|
271
271
|
(a) => a.subscribe(() => {
|
|
272
|
-
e.current += 1,
|
|
272
|
+
e.current += 1, i();
|
|
273
273
|
})
|
|
274
274
|
);
|
|
275
275
|
return () => n.forEach((a) => a());
|
|
276
|
-
}, [r]),
|
|
277
|
-
return
|
|
276
|
+
}, [r]), o = E(() => e.current, []);
|
|
277
|
+
return O(s, o, o), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
|
|
278
278
|
}
|
|
279
279
|
function It({ signals: r, children: t }) {
|
|
280
|
-
const e = w(0), s = E((
|
|
280
|
+
const e = w(0), s = E((i) => {
|
|
281
281
|
const n = Array.from(r).map(
|
|
282
282
|
(a) => a.subscribe(() => {
|
|
283
|
-
e.current += 1,
|
|
283
|
+
e.current += 1, i();
|
|
284
284
|
})
|
|
285
285
|
);
|
|
286
286
|
return () => n.forEach((a) => a());
|
|
287
|
-
}, [r]),
|
|
288
|
-
return
|
|
287
|
+
}, [r]), o = E(() => e.current, []);
|
|
288
|
+
return O(s, o, o), /* @__PURE__ */ C(W, { children: typeof t == "function" ? t() : t });
|
|
289
289
|
}
|
|
290
290
|
const ot = j(/* @__PURE__ */ new Map());
|
|
291
291
|
function $e(r) {
|
|
292
|
-
const t =
|
|
292
|
+
const t = B(ot);
|
|
293
293
|
return t == null ? void 0 : t.get(r);
|
|
294
294
|
}
|
|
295
295
|
function Rt({ providers: r = /* @__PURE__ */ new Map(), children: t }) {
|
|
@@ -314,7 +314,7 @@ function K(r) {
|
|
|
314
314
|
if (r == null)
|
|
315
315
|
return [];
|
|
316
316
|
const t = typeof r == "function" ? r() : r;
|
|
317
|
-
return (Array.isArray(t) ? t : [t]).map((s,
|
|
317
|
+
return (Array.isArray(t) ? t : [t]).map((s, o) => Dt(jt(s), o));
|
|
318
318
|
}
|
|
319
319
|
const Y = /* @__PURE__ */ new Map(), Lt = {
|
|
320
320
|
easeIn: "ease-in",
|
|
@@ -324,8 +324,8 @@ const Y = /* @__PURE__ */ new Map(), Lt = {
|
|
|
324
324
|
ease: "ease"
|
|
325
325
|
};
|
|
326
326
|
function it(r = {}) {
|
|
327
|
-
const t = r.stiffness ?? 170, e = r.damping ?? 26, s = r.mass ?? 1,
|
|
328
|
-
if (
|
|
327
|
+
const t = r.stiffness ?? 170, e = r.damping ?? 26, s = r.mass ?? 1, o = `${t}:${e}:${s}`, i = Y.get(o);
|
|
328
|
+
if (i) return i;
|
|
329
329
|
const n = 1 / 60, a = 1;
|
|
330
330
|
let l = 0, d = 0;
|
|
331
331
|
const h = [0];
|
|
@@ -340,7 +340,7 @@ function it(r = {}) {
|
|
|
340
340
|
p.push(b === 0 ? `${S}` : `${S} ${Math.round(x * 1e4) / 100}%`);
|
|
341
341
|
}
|
|
342
342
|
const y = `linear(${p.join(", ")})`;
|
|
343
|
-
return Y.set(
|
|
343
|
+
return Y.set(o, y), y;
|
|
344
344
|
}
|
|
345
345
|
function v(r, t) {
|
|
346
346
|
return r === "spring" ? it(t) : Lt[r] ?? r;
|
|
@@ -374,8 +374,8 @@ function Pt(r) {
|
|
|
374
374
|
function G(r) {
|
|
375
375
|
const t = /* @__PURE__ */ new Set(["opacity", "zIndex", "z-index", "flex", "fontWeight", "lineHeight"]);
|
|
376
376
|
return Object.entries(r).map(([e, s]) => {
|
|
377
|
-
const
|
|
378
|
-
return `${
|
|
377
|
+
const o = e.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), i = typeof s == "number" && !t.has(e) ? `${s}px` : String(s);
|
|
378
|
+
return `${o}: ${i}`;
|
|
379
379
|
}).join("; ");
|
|
380
380
|
}
|
|
381
381
|
function Ft(r) {
|
|
@@ -383,7 +383,7 @@ function Ft(r) {
|
|
|
383
383
|
for (let e = 0; e < r.length; e += 1) t = (t << 5) + t ^ r.charCodeAt(e);
|
|
384
384
|
return (t >>> 0).toString(36);
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function Bt(r) {
|
|
387
387
|
const t = Vt[r] ?? r;
|
|
388
388
|
if (!U.includes(t))
|
|
389
389
|
throw new Error(`Unknown motion preset "${r}". Use: ${U.join(", ")}`);
|
|
@@ -531,7 +531,7 @@ const F = `
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
`.trim();
|
|
534
|
-
function
|
|
534
|
+
function q(r) {
|
|
535
535
|
let t = 5381;
|
|
536
536
|
for (let e = 0; e < r.length; e += 1)
|
|
537
537
|
t = (t << 5) + t ^ r.charCodeAt(e);
|
|
@@ -568,11 +568,11 @@ const $ = class $ {
|
|
|
568
568
|
* CSS `@media` rule, deduped. Used by `.media()` / `.md()` / `.responsive()` — not JS resize.
|
|
569
569
|
*/
|
|
570
570
|
registerMedia(t, e, s) {
|
|
571
|
-
const
|
|
572
|
-
if (this.cache.has(
|
|
573
|
-
return this.cache.get(
|
|
574
|
-
const
|
|
575
|
-
return this.insert(n), this.cache.set(
|
|
571
|
+
const o = `@media ${t}|${e}:${s}`;
|
|
572
|
+
if (this.cache.has(o))
|
|
573
|
+
return this.cache.get(o);
|
|
574
|
+
const i = `fibo-mq-${q(o)}`, n = `@media ${t} { .${i} { ${e}: ${s} !important; } }`;
|
|
575
|
+
return this.insert(n), this.cache.set(o, i), i;
|
|
576
576
|
}
|
|
577
577
|
ensureDefaults() {
|
|
578
578
|
var t;
|
|
@@ -585,10 +585,10 @@ const $ = class $ {
|
|
|
585
585
|
`);
|
|
586
586
|
}
|
|
587
587
|
registerKeyframes(t, e, s) {
|
|
588
|
-
const
|
|
589
|
-
if (this.cache.has(
|
|
590
|
-
const
|
|
591
|
-
return this.insert(`@keyframes ${
|
|
588
|
+
const o = `kf:${e}=>${s}`;
|
|
589
|
+
if (this.cache.has(o)) return this.cache.get(o);
|
|
590
|
+
const i = `fibo-c-${t}`;
|
|
591
|
+
return this.insert(`@keyframes ${i} { from { ${e} } to { ${s} } }`), this.insert(`.${i} { animation-name: ${i}; }`), this.cache.set(o, i), i;
|
|
592
592
|
}
|
|
593
593
|
insert(t, e = !0) {
|
|
594
594
|
var s;
|
|
@@ -615,27 +615,27 @@ const $ = class $ {
|
|
|
615
615
|
const s = `${t}:${e}`;
|
|
616
616
|
if (this.cache.has(s))
|
|
617
617
|
return this.cache.get(s);
|
|
618
|
-
const
|
|
619
|
-
return this.insert(n), this.cache.set(s,
|
|
618
|
+
const o = e.replace(/[^a-zA-Z0-9-]/g, "_"), i = `fibo-${t}-${o}`, n = `.${i} { ${t}: ${e} !important; }`;
|
|
619
|
+
return this.insert(n), this.cache.set(s, i), i;
|
|
620
620
|
}
|
|
621
621
|
/**
|
|
622
622
|
* One class per (pseudo, property, value). Same rules → same class on server and client.
|
|
623
623
|
* Order-independent: each declaration hashes on its own.
|
|
624
624
|
*/
|
|
625
|
-
registerPseudo(t, e, s,
|
|
626
|
-
const
|
|
627
|
-
if (this.cache.has(
|
|
628
|
-
return this.cache.get(
|
|
629
|
-
const n = `fibo-ps-${
|
|
630
|
-
return this.insert(a), this.cache.set(
|
|
625
|
+
registerPseudo(t, e, s, o = !1) {
|
|
626
|
+
const i = `${o ? "group:" : ""}${t}:${e}:${s}`;
|
|
627
|
+
if (this.cache.has(i))
|
|
628
|
+
return this.cache.get(i);
|
|
629
|
+
const n = `fibo-ps-${q(i)}`, a = o ? `.group:${t} .${n} { ${e}: ${s} !important; }` : `.${n}:${t} { ${e}: ${s} !important; }`;
|
|
630
|
+
return this.insert(a), this.cache.set(i, n), n;
|
|
631
631
|
}
|
|
632
|
-
registerGroupPseudo(t, e, s,
|
|
633
|
-
return this.registerPseudo(e, s,
|
|
632
|
+
registerGroupPseudo(t, e, s, o) {
|
|
633
|
+
return this.registerPseudo(e, s, o, !0);
|
|
634
634
|
}
|
|
635
635
|
};
|
|
636
636
|
c($, "instance");
|
|
637
637
|
let T = $;
|
|
638
|
-
const
|
|
638
|
+
const u = T.getInstance();
|
|
639
639
|
function _() {
|
|
640
640
|
T.getInstance().ensureDefaults();
|
|
641
641
|
}
|
|
@@ -656,7 +656,7 @@ function ve() {
|
|
|
656
656
|
dangerouslySetInnerHTML: { __html: nt() }
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function Ot() {
|
|
660
660
|
return _(), g.createElement("style", {
|
|
661
661
|
id: "fibo-motion-presets",
|
|
662
662
|
"data-fibo-motion": "1",
|
|
@@ -682,20 +682,20 @@ function ct(r) {
|
|
|
682
682
|
var t, e, s = "";
|
|
683
683
|
if (typeof r == "string" || typeof r == "number") s += r;
|
|
684
684
|
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
685
|
-
var
|
|
686
|
-
for (t = 0; t <
|
|
685
|
+
var o = r.length;
|
|
686
|
+
for (t = 0; t < o; t++) r[t] && (e = ct(r[t])) && (s && (s += " "), s += e);
|
|
687
687
|
} else for (e in r) r[e] && (s && (s += " "), s += e);
|
|
688
688
|
return s;
|
|
689
689
|
}
|
|
690
690
|
function Xt() {
|
|
691
|
-
for (var r, t, e = 0, s = "",
|
|
691
|
+
for (var r, t, e = 0, s = "", o = arguments.length; e < o; e++) (r = arguments[e]) && (t = ct(r)) && (s && (s += " "), s += t);
|
|
692
692
|
return s;
|
|
693
693
|
}
|
|
694
694
|
function Kt(r) {
|
|
695
695
|
const t = r.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
|
|
696
696
|
if (!t)
|
|
697
697
|
return r;
|
|
698
|
-
const [, e, s,
|
|
698
|
+
const [, e, s, o] = t, i = parseFloat(e), n = parseFloat(s), a = parseFloat(o), l = n * Math.cos(a * Math.PI / 180), d = n * Math.sin(a * Math.PI / 180), h = i + 0.3963377774 * l + 0.2158037573 * d, f = i - 0.1055613458 * l - 0.0638541728 * d, m = i - 0.0894841775 * l - 1.291485548 * d, p = h * h * h, y = f * f * f, b = m * m * m, x = 4.0767416621 * p - 3.3077115913 * y + 0.2309699292 * b, S = -1.2684380046 * p + 2.6097574011 * y - 0.3413193965 * b, ft = -0.0041960863 * p - 0.7034186147 * y + 1.707614701 * b, L = (I) => I >= 31308e-7 ? 1.055 * I ** (1 / 2.4) - 0.055 : 12.92 * I, dt = Math.max(0, Math.min(1, L(x))), mt = Math.max(0, Math.min(1, L(S))), pt = Math.max(0, Math.min(1, L(ft))), V = (I) => {
|
|
699
699
|
var X;
|
|
700
700
|
const P = (X = Math.round(I * 255).toString(16)) == null ? void 0 : X.toUpperCase();
|
|
701
701
|
return P.length === 1 ? `0${P}` : P;
|
|
@@ -705,11 +705,11 @@ function Kt(r) {
|
|
|
705
705
|
function Yt(r) {
|
|
706
706
|
const t = {}, e = {}, s = r.split(`
|
|
707
707
|
`);
|
|
708
|
-
for (const
|
|
709
|
-
const
|
|
710
|
-
if (!
|
|
708
|
+
for (const o of s) {
|
|
709
|
+
const i = o.trim();
|
|
710
|
+
if (!i || i.startsWith("//") || i.startsWith("*") || i === "@theme {" || i === "}")
|
|
711
711
|
continue;
|
|
712
|
-
const n =
|
|
712
|
+
const n = i.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = i.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
|
|
713
713
|
if (n) {
|
|
714
714
|
const [, l, d] = n, h = Kt(d);
|
|
715
715
|
t[h.toLowerCase()] = `bg-${l}`, e[h.toLowerCase()] = `text-${l}`;
|
|
@@ -971,7 +971,7 @@ const Ut = (r) => {
|
|
|
971
971
|
--color-stone-950: oklch(0.147 0.004 49.25);
|
|
972
972
|
--color-black: #000;
|
|
973
973
|
--color-white: #fff;
|
|
974
|
-
`,
|
|
974
|
+
`, qt = Yt(Gt), lt = {
|
|
975
975
|
borderRadius: {
|
|
976
976
|
0: "rounded-none",
|
|
977
977
|
"0px": "rounded-none",
|
|
@@ -1068,7 +1068,7 @@ const Ut = (r) => {
|
|
|
1068
1068
|
fixed: "fixed",
|
|
1069
1069
|
sticky: "sticky"
|
|
1070
1070
|
}
|
|
1071
|
-
},
|
|
1071
|
+
}, Zt = (r, t) => ({
|
|
1072
1072
|
// 背景色
|
|
1073
1073
|
backgroundColor: (e) => e.backgroundColor ? [r.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
|
|
1074
1074
|
// 文字色
|
|
@@ -1084,8 +1084,8 @@ const Ut = (r) => {
|
|
|
1084
1084
|
margin: (e) => {
|
|
1085
1085
|
const s = [];
|
|
1086
1086
|
if (e.margin !== void 0) {
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1087
|
+
const i = N("m", e.margin);
|
|
1088
|
+
return i ? [i] : [];
|
|
1089
1089
|
}
|
|
1090
1090
|
return [
|
|
1091
1091
|
{ prop: e.marginTop, dir: "mt" },
|
|
@@ -1094,9 +1094,9 @@ const Ut = (r) => {
|
|
|
1094
1094
|
{ prop: e.marginLeft, dir: "ml" },
|
|
1095
1095
|
{ prop: e.marginX, dir: "mx" },
|
|
1096
1096
|
{ prop: e.marginY, dir: "my" }
|
|
1097
|
-
].forEach(({ prop:
|
|
1098
|
-
if (
|
|
1099
|
-
const a = N(n,
|
|
1097
|
+
].forEach(({ prop: i, dir: n }) => {
|
|
1098
|
+
if (i !== void 0) {
|
|
1099
|
+
const a = N(n, i);
|
|
1100
1100
|
a && s.push(a);
|
|
1101
1101
|
}
|
|
1102
1102
|
}), s;
|
|
@@ -1105,8 +1105,8 @@ const Ut = (r) => {
|
|
|
1105
1105
|
padding: (e) => {
|
|
1106
1106
|
const s = [];
|
|
1107
1107
|
if (e.padding !== void 0) {
|
|
1108
|
-
const
|
|
1109
|
-
return
|
|
1108
|
+
const i = N("p", e.padding);
|
|
1109
|
+
return i ? [i] : [];
|
|
1110
1110
|
}
|
|
1111
1111
|
return [
|
|
1112
1112
|
{ prop: e.paddingTop, dir: "pt" },
|
|
@@ -1115,9 +1115,9 @@ const Ut = (r) => {
|
|
|
1115
1115
|
{ prop: e.paddingLeft, dir: "pl" },
|
|
1116
1116
|
{ prop: e.paddingX, dir: "px" },
|
|
1117
1117
|
{ prop: e.paddingY, dir: "py" }
|
|
1118
|
-
].forEach(({ prop:
|
|
1119
|
-
if (
|
|
1120
|
-
const a = N(n,
|
|
1118
|
+
].forEach(({ prop: i, dir: n }) => {
|
|
1119
|
+
if (i !== void 0) {
|
|
1120
|
+
const a = N(n, i);
|
|
1121
1121
|
a && s.push(a);
|
|
1122
1122
|
}
|
|
1123
1123
|
}), s;
|
|
@@ -1126,28 +1126,28 @@ const Ut = (r) => {
|
|
|
1126
1126
|
font: (e) => {
|
|
1127
1127
|
const s = [];
|
|
1128
1128
|
if (e.fontSize && s.push(t.fontSize[e.fontSize.toString()] || `text-[${e.fontSize}]`), e.fontWeight) {
|
|
1129
|
-
const
|
|
1130
|
-
|
|
1129
|
+
const o = t.fontWeight[e.fontWeight.toString()];
|
|
1130
|
+
o && s.push(o);
|
|
1131
1131
|
}
|
|
1132
1132
|
if (e.textAlign) {
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1133
|
+
const o = t.textAlign[e.textAlign];
|
|
1134
|
+
o && s.push(o);
|
|
1135
1135
|
}
|
|
1136
1136
|
if (e.fontFamily) {
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1137
|
+
const o = t.fontFamily[e.fontFamily];
|
|
1138
|
+
o && s.push(o);
|
|
1139
1139
|
}
|
|
1140
1140
|
if (e.textDecoration) {
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1141
|
+
const o = t.textDecoration[e.textDecoration];
|
|
1142
|
+
o && s.push(o);
|
|
1143
1143
|
}
|
|
1144
1144
|
if (e.fontVariantNumeric) {
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1145
|
+
const o = t.fontVariantNumeric[e.fontVariantNumeric];
|
|
1146
|
+
o && s.push(o);
|
|
1147
1147
|
}
|
|
1148
1148
|
if (e.fontStyle) {
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1149
|
+
const o = t.fontStyle[e.fontStyle];
|
|
1150
|
+
o && s.push(o);
|
|
1151
1151
|
}
|
|
1152
1152
|
return s;
|
|
1153
1153
|
},
|
|
@@ -1155,12 +1155,12 @@ const Ut = (r) => {
|
|
|
1155
1155
|
size: (e) => {
|
|
1156
1156
|
const s = [];
|
|
1157
1157
|
if (e.width) {
|
|
1158
|
-
const
|
|
1159
|
-
s.push(`w-[${
|
|
1158
|
+
const o = e.width.toString();
|
|
1159
|
+
s.push(`w-[${o}]`);
|
|
1160
1160
|
}
|
|
1161
1161
|
if (e.height) {
|
|
1162
|
-
const
|
|
1163
|
-
s.push(`h-[${
|
|
1162
|
+
const o = e.height.toString();
|
|
1163
|
+
s.push(`h-[${o}]`);
|
|
1164
1164
|
}
|
|
1165
1165
|
return s;
|
|
1166
1166
|
},
|
|
@@ -1168,20 +1168,20 @@ const Ut = (r) => {
|
|
|
1168
1168
|
layout: (e) => {
|
|
1169
1169
|
const s = [];
|
|
1170
1170
|
if (e.display) {
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1171
|
+
const o = t.display[e.display];
|
|
1172
|
+
o && s.push(o);
|
|
1173
1173
|
}
|
|
1174
1174
|
if (e.flexDirection) {
|
|
1175
|
-
const
|
|
1175
|
+
const i = {
|
|
1176
1176
|
row: "flex-row",
|
|
1177
1177
|
column: "flex-col",
|
|
1178
1178
|
"row-reverse": "flex-row-reverse",
|
|
1179
1179
|
"column-reverse": "flex-col-reverse"
|
|
1180
1180
|
}[e.flexDirection];
|
|
1181
|
-
|
|
1181
|
+
i && s.push(i);
|
|
1182
1182
|
}
|
|
1183
1183
|
if (e.justifyContent) {
|
|
1184
|
-
const
|
|
1184
|
+
const i = {
|
|
1185
1185
|
"flex-start": "justify-start",
|
|
1186
1186
|
"flex-end": "justify-end",
|
|
1187
1187
|
center: "justify-center",
|
|
@@ -1189,21 +1189,21 @@ const Ut = (r) => {
|
|
|
1189
1189
|
"space-around": "justify-around",
|
|
1190
1190
|
"space-evenly": "justify-evenly"
|
|
1191
1191
|
}[e.justifyContent];
|
|
1192
|
-
|
|
1192
|
+
i && s.push(i);
|
|
1193
1193
|
}
|
|
1194
1194
|
if (e.alignItems) {
|
|
1195
|
-
const
|
|
1195
|
+
const i = {
|
|
1196
1196
|
"flex-start": "items-start",
|
|
1197
1197
|
"flex-end": "items-end",
|
|
1198
1198
|
center: "items-center",
|
|
1199
1199
|
baseline: "items-baseline",
|
|
1200
1200
|
stretch: "items-stretch"
|
|
1201
1201
|
}[e.alignItems];
|
|
1202
|
-
|
|
1202
|
+
i && s.push(i);
|
|
1203
1203
|
}
|
|
1204
1204
|
if (e.gap) {
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1205
|
+
const o = N("gap", e.gap);
|
|
1206
|
+
o && s.push(o);
|
|
1207
1207
|
}
|
|
1208
1208
|
return s;
|
|
1209
1209
|
},
|
|
@@ -1259,17 +1259,17 @@ const Ut = (r) => {
|
|
|
1259
1259
|
opacity: "opacity",
|
|
1260
1260
|
className: "className"
|
|
1261
1261
|
}, Qt = (r, t) => {
|
|
1262
|
-
const e = (t == null ? void 0 : t.colorMaps) ||
|
|
1262
|
+
const e = (t == null ? void 0 : t.colorMaps) || qt, s = (t == null ? void 0 : t.styleMaps) || lt, o = Zt(e, s), i = [], n = /* @__PURE__ */ new Set();
|
|
1263
1263
|
return Object.keys(r).forEach((a) => {
|
|
1264
1264
|
const l = Jt[a];
|
|
1265
1265
|
if (l && !n.has(l)) {
|
|
1266
|
-
const d =
|
|
1266
|
+
const d = o[l];
|
|
1267
1267
|
if (d) {
|
|
1268
1268
|
const h = d(r);
|
|
1269
|
-
|
|
1269
|
+
i.push(...h), n.add(l);
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
|
-
}),
|
|
1272
|
+
}), i.filter(Boolean).join(" ");
|
|
1273
1273
|
};
|
|
1274
1274
|
function te(r) {
|
|
1275
1275
|
const t = {};
|
|
@@ -1278,28 +1278,28 @@ function te(r) {
|
|
|
1278
1278
|
}), t;
|
|
1279
1279
|
}
|
|
1280
1280
|
function ee({ animatedProps: r, animationConfig: t, children: e }) {
|
|
1281
|
-
const [s,
|
|
1281
|
+
const [s, o] = Z(
|
|
1282
1282
|
() => te(r)
|
|
1283
1283
|
);
|
|
1284
1284
|
A(() => {
|
|
1285
1285
|
const l = [];
|
|
1286
1286
|
return r.forEach((d, h) => {
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1287
|
+
const f = (m) => {
|
|
1288
|
+
o((p) => ({
|
|
1289
1289
|
...p,
|
|
1290
1290
|
[h]: m
|
|
1291
1291
|
}));
|
|
1292
1292
|
};
|
|
1293
|
-
l.push(d.subscribe(
|
|
1293
|
+
l.push(d.subscribe(f)), f(d.value);
|
|
1294
1294
|
}), () => {
|
|
1295
1295
|
l.forEach((d) => d());
|
|
1296
1296
|
};
|
|
1297
1297
|
}, [r]);
|
|
1298
|
-
const
|
|
1299
|
-
s.translateX !== void 0 &&
|
|
1298
|
+
const i = [];
|
|
1299
|
+
s.translateX !== void 0 && i.push(`translateX(${s.translateX}px)`), s.translateY !== void 0 && i.push(`translateY(${s.translateY}px)`), s.scale !== void 0 && i.push(`scale(${s.scale})`), s.rotate !== void 0 && i.push(`rotate(${s.rotate}deg)`);
|
|
1300
1300
|
const n = {};
|
|
1301
|
-
if (
|
|
1302
|
-
const { duration: l = 300, curve: d = "easeOut", stiffness: h, damping:
|
|
1301
|
+
if (i.length > 0 && (n.transform = i.join(" ")), t) {
|
|
1302
|
+
const { duration: l = 300, curve: d = "easeOut", stiffness: h, damping: f } = t, m = v(d, { stiffness: h, damping: f });
|
|
1303
1303
|
n.transition = `transform ${l}ms ${m}`;
|
|
1304
1304
|
}
|
|
1305
1305
|
const a = {
|
|
@@ -1358,11 +1358,11 @@ class k {
|
|
|
1358
1358
|
css(t, e) {
|
|
1359
1359
|
return this.set(t, e);
|
|
1360
1360
|
}
|
|
1361
|
-
transition(t, e, s,
|
|
1361
|
+
transition(t, e, s, o) {
|
|
1362
1362
|
if (typeof t == "string" && e === void 0)
|
|
1363
1363
|
return this.set("transition", t);
|
|
1364
|
-
const
|
|
1365
|
-
return this.set("transition", `${
|
|
1364
|
+
const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = v(s || this.transitionEasing), l = o ? `${o}ms` : "0ms";
|
|
1365
|
+
return this.set("transition", `${i} ${n} ${a} ${l}`);
|
|
1366
1366
|
}
|
|
1367
1367
|
duration(t) {
|
|
1368
1368
|
return this.transitionDuration = t, this.applyTransition(), this;
|
|
@@ -1380,14 +1380,14 @@ class k {
|
|
|
1380
1380
|
return this.transitionProperties = t, this.applyTransition(), this;
|
|
1381
1381
|
}
|
|
1382
1382
|
applyTransition() {
|
|
1383
|
-
const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing,
|
|
1384
|
-
this.set("transition", `${t} ${e} ${s} ${
|
|
1383
|
+
const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing, o = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
|
|
1384
|
+
this.set("transition", `${t} ${e} ${s} ${o}`);
|
|
1385
1385
|
}
|
|
1386
1386
|
flushTransform() {
|
|
1387
1387
|
return this.set("transform", [...this.transforms.values()].join(" "));
|
|
1388
1388
|
}
|
|
1389
1389
|
set(t, e) {
|
|
1390
|
-
const s =
|
|
1390
|
+
const s = u.registerPseudo(this.pseudoState, t, e, this.isGroup);
|
|
1391
1391
|
return this.parentBuilder.addClassName(s), this;
|
|
1392
1392
|
}
|
|
1393
1393
|
end() {
|
|
@@ -1396,8 +1396,10 @@ class k {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
function Ce(r, t) {
|
|
1398
1398
|
if (typeof document > "u") return;
|
|
1399
|
-
const e = typeof r == "string" ?
|
|
1400
|
-
|
|
1399
|
+
const e = typeof r == "string" ? r : null, s = (e == null ? void 0 : e.replace(/^#/, "")) ?? null;
|
|
1400
|
+
t != null && t.hash && s && typeof window < "u" && (window.location.hash = s);
|
|
1401
|
+
const o = typeof r == "string" ? document.getElementById(r.replace(/^#/, "")) ?? document.querySelector(r.startsWith("#") ? r : `#${r}`) ?? document.querySelector(r) : r;
|
|
1402
|
+
o && o.scrollIntoView({
|
|
1401
1403
|
behavior: (t == null ? void 0 : t.behavior) ?? "smooth",
|
|
1402
1404
|
block: (t == null ? void 0 : t.block) ?? "start"
|
|
1403
1405
|
});
|
|
@@ -1421,8 +1423,8 @@ function oe({
|
|
|
1421
1423
|
once: t = !0,
|
|
1422
1424
|
rootMargin: e = "0px 0px -8% 0px",
|
|
1423
1425
|
threshold: s = 0.12,
|
|
1424
|
-
forceMotion:
|
|
1425
|
-
preferTimeline:
|
|
1426
|
+
forceMotion: o = !1,
|
|
1427
|
+
preferTimeline: i = !1,
|
|
1426
1428
|
children: n
|
|
1427
1429
|
}) {
|
|
1428
1430
|
const a = w(null);
|
|
@@ -1430,7 +1432,7 @@ function oe({
|
|
|
1430
1432
|
_();
|
|
1431
1433
|
const d = a.current;
|
|
1432
1434
|
if (!d) return;
|
|
1433
|
-
if (
|
|
1435
|
+
if (i && se()) {
|
|
1434
1436
|
d.classList.add("fibo-inview");
|
|
1435
1437
|
return;
|
|
1436
1438
|
}
|
|
@@ -1439,20 +1441,20 @@ function oe({
|
|
|
1439
1441
|
return;
|
|
1440
1442
|
}
|
|
1441
1443
|
const h = new IntersectionObserver(
|
|
1442
|
-
(
|
|
1443
|
-
for (const m of
|
|
1444
|
+
(f) => {
|
|
1445
|
+
for (const m of f)
|
|
1444
1446
|
m.isIntersecting ? (m.target.classList.add("fibo-inview"), t && h.unobserve(m.target)) : t || m.target.classList.remove("fibo-inview");
|
|
1445
1447
|
},
|
|
1446
1448
|
{ rootMargin: e, threshold: s }
|
|
1447
1449
|
);
|
|
1448
1450
|
return h.observe(d), () => h.disconnect();
|
|
1449
|
-
}, [t, e, s,
|
|
1451
|
+
}, [t, e, s, i]);
|
|
1450
1452
|
const l = [
|
|
1451
1453
|
"fibo-reveal",
|
|
1452
1454
|
`fibo-reveal-${r}`,
|
|
1453
1455
|
// min-w-0 only — do NOT force w-full (breaks horizontal ScrollView / carousel slides)
|
|
1454
1456
|
"min-w-0",
|
|
1455
|
-
|
|
1457
|
+
o ? "fibo-motion-force" : ""
|
|
1456
1458
|
].filter(Boolean).join(" ");
|
|
1457
1459
|
return g.createElement("div", { ref: a, className: l, "data-fibo-reveal": r }, n);
|
|
1458
1460
|
}
|
|
@@ -1461,13 +1463,13 @@ function ie({ children: r }) {
|
|
|
1461
1463
|
return A(() => {
|
|
1462
1464
|
if (_(), re()) return;
|
|
1463
1465
|
const e = () => {
|
|
1464
|
-
var
|
|
1465
|
-
return ((
|
|
1466
|
+
var i, n;
|
|
1467
|
+
return ((i = t.current) == null ? void 0 : i.querySelector(".fibo-scroll-progress")) ?? ((n = t.current) == null ? void 0 : n.firstElementChild);
|
|
1466
1468
|
}, s = () => {
|
|
1467
|
-
const
|
|
1468
|
-
if (!
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1469
|
+
const o = e();
|
|
1470
|
+
if (!o) return;
|
|
1471
|
+
const i = document.documentElement.scrollHeight - window.innerHeight, n = i > 0 ? Math.min(1, Math.max(0, window.scrollY / i)) : 0;
|
|
1472
|
+
o.style.setProperty("--fibo-progress", String(n));
|
|
1471
1473
|
};
|
|
1472
1474
|
return s(), window.addEventListener("scroll", s, { passive: !0 }), window.addEventListener("resize", s), () => {
|
|
1473
1475
|
window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
|
|
@@ -1532,7 +1534,7 @@ class Ee {
|
|
|
1532
1534
|
*/
|
|
1533
1535
|
anchor(t) {
|
|
1534
1536
|
return this.id(t), this._explicitScrollMargin || this._classNames.push(
|
|
1535
|
-
|
|
1537
|
+
u.register("scroll-margin-top", "var(--fibo-sticky-offset, 0px)")
|
|
1536
1538
|
), this;
|
|
1537
1539
|
}
|
|
1538
1540
|
/**
|
|
@@ -1542,7 +1544,7 @@ class Ee {
|
|
|
1542
1544
|
scrollMargin(t) {
|
|
1543
1545
|
this._explicitScrollMargin = !0;
|
|
1544
1546
|
const e = typeof t == "number" ? `${t}px` : t;
|
|
1545
|
-
return this._classNames.push(
|
|
1547
|
+
return this._classNames.push(u.register("scroll-margin-top", e)), this;
|
|
1546
1548
|
}
|
|
1547
1549
|
/** Stamp a class onto the host. Used by PseudoStateBuilder (hashed `:hover` etc.). */
|
|
1548
1550
|
addClassName(t) {
|
|
@@ -1559,20 +1561,20 @@ class Ee {
|
|
|
1559
1561
|
return e && typeof e == "object" && (this.__fiboElementProps = { ...e, key: String(t) }), this;
|
|
1560
1562
|
}
|
|
1561
1563
|
paddingHorizontal(t) {
|
|
1562
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1563
|
-
return this._classNames.push(s,
|
|
1564
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-left", e), o = u.register("padding-right", e);
|
|
1565
|
+
return this._classNames.push(s, o), this;
|
|
1564
1566
|
}
|
|
1565
1567
|
paddingVertical(t) {
|
|
1566
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1567
|
-
return this._classNames.push(s,
|
|
1568
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-top", e), o = u.register("padding-bottom", e);
|
|
1569
|
+
return this._classNames.push(s, o), this;
|
|
1568
1570
|
}
|
|
1569
1571
|
marginHorizontal(t) {
|
|
1570
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1571
|
-
return this._classNames.push(s,
|
|
1572
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-left", e), o = u.register("margin-right", e);
|
|
1573
|
+
return this._classNames.push(s, o), this;
|
|
1572
1574
|
}
|
|
1573
1575
|
marginVertical(t) {
|
|
1574
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1575
|
-
return this._classNames.push(s,
|
|
1576
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-top", e), o = u.register("margin-bottom", e);
|
|
1577
|
+
return this._classNames.push(s, o), this;
|
|
1576
1578
|
}
|
|
1577
1579
|
flexDirection(t) {
|
|
1578
1580
|
return this._classNames.push(`flex-${t}`), this;
|
|
@@ -1586,7 +1588,7 @@ class Ee {
|
|
|
1586
1588
|
flex(t) {
|
|
1587
1589
|
if (this._classNames.push("flex"), t !== void 0)
|
|
1588
1590
|
if (typeof t == "number") {
|
|
1589
|
-
const e =
|
|
1591
|
+
const e = u.register("flex", String(t));
|
|
1590
1592
|
this._classNames.push(e);
|
|
1591
1593
|
} else typeof t == "string" && this._classNames.push(`flex-${t}`);
|
|
1592
1594
|
return this;
|
|
@@ -1637,18 +1639,18 @@ class Ee {
|
|
|
1637
1639
|
return this._classNames.push("h-full"), this;
|
|
1638
1640
|
}
|
|
1639
1641
|
square(t) {
|
|
1640
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1641
|
-
return this._classNames.push(s,
|
|
1642
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("width", e), o = u.register("height", e);
|
|
1643
|
+
return this._classNames.push(s, o), this;
|
|
1642
1644
|
}
|
|
1643
1645
|
circle() {
|
|
1644
1646
|
return this._classNames.push("rounded-full"), this;
|
|
1645
1647
|
}
|
|
1646
1648
|
opacity(t) {
|
|
1647
|
-
const e =
|
|
1649
|
+
const e = u.register("opacity", String(t));
|
|
1648
1650
|
return this._classNames.push(e), this;
|
|
1649
1651
|
}
|
|
1650
1652
|
p(t) {
|
|
1651
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1653
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding", e);
|
|
1652
1654
|
return this._classNames.push(s), this;
|
|
1653
1655
|
}
|
|
1654
1656
|
px(t) {
|
|
@@ -1664,7 +1666,7 @@ class Ee {
|
|
|
1664
1666
|
return this.paddingVertical(t);
|
|
1665
1667
|
}
|
|
1666
1668
|
m(t) {
|
|
1667
|
-
const e = typeof t == "number" ? `${t}px` : t, s =
|
|
1669
|
+
const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin", e);
|
|
1668
1670
|
return this._classNames.push(s), this;
|
|
1669
1671
|
}
|
|
1670
1672
|
mx(t) {
|
|
@@ -1680,15 +1682,15 @@ class Ee {
|
|
|
1680
1682
|
return this.marginVertical(t);
|
|
1681
1683
|
}
|
|
1682
1684
|
bg(t) {
|
|
1683
|
-
const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s =
|
|
1685
|
+
const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("background-color", e);
|
|
1684
1686
|
return this._classNames.push(s), this;
|
|
1685
1687
|
}
|
|
1686
1688
|
text(t) {
|
|
1687
|
-
const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s =
|
|
1689
|
+
const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
|
|
1688
1690
|
return this._classNames.push(s), this;
|
|
1689
1691
|
}
|
|
1690
1692
|
color(t) {
|
|
1691
|
-
const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s =
|
|
1693
|
+
const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
|
|
1692
1694
|
return this._classNames.push(s), this;
|
|
1693
1695
|
}
|
|
1694
1696
|
resolveSemanticColor(t) {
|
|
@@ -1718,8 +1720,8 @@ class Ee {
|
|
|
1718
1720
|
}
|
|
1719
1721
|
shadow(t) {
|
|
1720
1722
|
if (t === null || t === "none") {
|
|
1721
|
-
const
|
|
1722
|
-
return this._classNames.push(
|
|
1723
|
+
const i = u.register("box-shadow", "none");
|
|
1724
|
+
return this._classNames.push(i), this;
|
|
1723
1725
|
}
|
|
1724
1726
|
const e = {
|
|
1725
1727
|
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
@@ -1732,11 +1734,11 @@ class Ee {
|
|
|
1732
1734
|
modal: "0 10px 40px rgba(0, 0, 0, 0.2)",
|
|
1733
1735
|
float: "0 8px 16px rgba(0, 0, 0, 0.15)",
|
|
1734
1736
|
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
|
|
1735
|
-
}, s = (
|
|
1736
|
-
let
|
|
1737
|
+
}, s = (i) => i.startsWith("#") || i.startsWith("rgb") || i.startsWith("hsl") || ["red", "blue", "green", "yellow", "purple", "pink", "orange", "white", "black", "gray"].some((n) => i.includes(n)), o = (i, n, a, l) => {
|
|
1738
|
+
let f = a || "rgba(0, 0, 0, " + (l ?? 0.1) + ")";
|
|
1737
1739
|
if (a && a.startsWith("#") && l !== void 0) {
|
|
1738
1740
|
const y = parseInt(a.slice(1, 3), 16), b = parseInt(a.slice(3, 5), 16), x = parseInt(a.slice(5, 7), 16);
|
|
1739
|
-
|
|
1741
|
+
f = `rgba(${y}, ${b}, ${x}, ${l})`;
|
|
1740
1742
|
}
|
|
1741
1743
|
const p = {
|
|
1742
1744
|
sm: "2px",
|
|
@@ -1745,50 +1747,50 @@ class Ee {
|
|
|
1745
1747
|
xl: "12px",
|
|
1746
1748
|
"2xl": "16px"
|
|
1747
1749
|
}[n] || "4px";
|
|
1748
|
-
switch (
|
|
1750
|
+
switch (i) {
|
|
1749
1751
|
case "top":
|
|
1750
|
-
return `0 -${p} ${p} -1px ${
|
|
1752
|
+
return `0 -${p} ${p} -1px ${f}`;
|
|
1751
1753
|
case "bottom":
|
|
1752
|
-
return `0 ${p} ${p} -1px ${
|
|
1754
|
+
return `0 ${p} ${p} -1px ${f}`;
|
|
1753
1755
|
case "left":
|
|
1754
|
-
return `-${p} 0 ${p} -1px ${
|
|
1756
|
+
return `-${p} 0 ${p} -1px ${f}`;
|
|
1755
1757
|
case "right":
|
|
1756
|
-
return `${p} 0 ${p} -1px ${
|
|
1758
|
+
return `${p} 0 ${p} -1px ${f}`;
|
|
1757
1759
|
case "top-bottom":
|
|
1758
1760
|
case "vertical":
|
|
1759
|
-
return `0 -${p} ${p} -1px ${
|
|
1761
|
+
return `0 -${p} ${p} -1px ${f}, 0 ${p} ${p} -1px ${f}`;
|
|
1760
1762
|
case "left-right":
|
|
1761
1763
|
case "horizontal":
|
|
1762
|
-
return `-${p} 0 ${p} -1px ${
|
|
1764
|
+
return `-${p} 0 ${p} -1px ${f}, ${p} 0 ${p} -1px ${f}`;
|
|
1763
1765
|
case "all":
|
|
1764
1766
|
default:
|
|
1765
1767
|
return e[n] || e.md;
|
|
1766
1768
|
}
|
|
1767
1769
|
};
|
|
1768
1770
|
if (!t) {
|
|
1769
|
-
const
|
|
1770
|
-
return this._classNames.push(
|
|
1771
|
+
const i = u.register("box-shadow", e.md);
|
|
1772
|
+
return this._classNames.push(i), this;
|
|
1771
1773
|
}
|
|
1772
1774
|
if (typeof t == "string") {
|
|
1773
1775
|
if (s(t)) {
|
|
1774
|
-
const a =
|
|
1776
|
+
const a = o("all", "md", t), l = u.register("box-shadow", a);
|
|
1775
1777
|
return this._classNames.push(l), this;
|
|
1776
1778
|
}
|
|
1777
|
-
const
|
|
1779
|
+
const i = e[t] || e.md, n = u.register("box-shadow", i);
|
|
1778
1780
|
return this._classNames.push(n), this;
|
|
1779
1781
|
}
|
|
1780
1782
|
if (Array.isArray(t)) {
|
|
1781
|
-
const [
|
|
1782
|
-
if (typeof
|
|
1783
|
-
const
|
|
1783
|
+
const [i, n, a, l] = t;
|
|
1784
|
+
if (typeof i == "string" && s(i)) {
|
|
1785
|
+
const f = o("all", "md", i, n), m = u.register("box-shadow", f);
|
|
1784
1786
|
return this._classNames.push(m), this;
|
|
1785
1787
|
}
|
|
1786
|
-
const d =
|
|
1788
|
+
const d = i;
|
|
1787
1789
|
if (typeof n == "string" && s(n)) {
|
|
1788
|
-
const
|
|
1790
|
+
const f = o(d, "md", n, a), m = u.register("box-shadow", f);
|
|
1789
1791
|
return this._classNames.push(m), this;
|
|
1790
1792
|
} else {
|
|
1791
|
-
const m =
|
|
1793
|
+
const m = o(d, n, a, l), p = u.register("box-shadow", m);
|
|
1792
1794
|
return this._classNames.push(p), this;
|
|
1793
1795
|
}
|
|
1794
1796
|
}
|
|
@@ -1823,10 +1825,10 @@ class Ee {
|
|
|
1823
1825
|
"fontWeight",
|
|
1824
1826
|
"lineHeight"
|
|
1825
1827
|
]);
|
|
1826
|
-
for (const [
|
|
1827
|
-
if (
|
|
1828
|
-
const n =
|
|
1829
|
-
this._classNames.push(
|
|
1828
|
+
for (const [o, i] of Object.entries(e)) {
|
|
1829
|
+
if (i == null) continue;
|
|
1830
|
+
const n = o.replace(/[A-Z]/g, (l) => `-${l.toLowerCase()}`), a = typeof i == "number" && !s.has(o) && !s.has(n) ? `${i}px` : String(i);
|
|
1831
|
+
this._classNames.push(u.registerMedia(t, n, a));
|
|
1830
1832
|
}
|
|
1831
1833
|
}
|
|
1832
1834
|
sm(t) {
|
|
@@ -1843,23 +1845,23 @@ class Ee {
|
|
|
1843
1845
|
}
|
|
1844
1846
|
rounded(t) {
|
|
1845
1847
|
if (typeof t == "number") {
|
|
1846
|
-
const e =
|
|
1848
|
+
const e = u.register("border-radius", `${t}px`);
|
|
1847
1849
|
this._classNames.push(e);
|
|
1848
1850
|
} else if (typeof t == "string" && (t.startsWith("rounded-") || ["sm", "md", "lg", "xl", "2xl", "3xl", "full", "none"].includes(t))) {
|
|
1849
1851
|
const e = t.startsWith("rounded-") ? t : `rounded-${t}`;
|
|
1850
1852
|
this._classNames.push(e);
|
|
1851
1853
|
} else {
|
|
1852
|
-
const e =
|
|
1854
|
+
const e = u.register("border-radius", t);
|
|
1853
1855
|
this._classNames.push(e);
|
|
1854
1856
|
}
|
|
1855
1857
|
return this;
|
|
1856
1858
|
}
|
|
1857
1859
|
borderRadius(t) {
|
|
1858
1860
|
if (typeof t == "number") {
|
|
1859
|
-
const e =
|
|
1861
|
+
const e = u.register("border-radius", `${t}px`);
|
|
1860
1862
|
this._classNames.push(e);
|
|
1861
1863
|
} else {
|
|
1862
|
-
const e =
|
|
1864
|
+
const e = u.register("border-radius", t);
|
|
1863
1865
|
this._classNames.push(e);
|
|
1864
1866
|
}
|
|
1865
1867
|
return this;
|
|
@@ -1870,45 +1872,45 @@ class Ee {
|
|
|
1870
1872
|
else if (["red", "blue", "green", "gray", "white", "black", "transparent"].some((e) => t.includes(e)))
|
|
1871
1873
|
this._classNames.push(`border-${t}`);
|
|
1872
1874
|
else {
|
|
1873
|
-
const e =
|
|
1875
|
+
const e = u.register("border-color", t);
|
|
1874
1876
|
this._classNames.push(e);
|
|
1875
1877
|
}
|
|
1876
1878
|
return this;
|
|
1877
1879
|
}
|
|
1878
1880
|
width(t) {
|
|
1879
1881
|
if (typeof t == "number") {
|
|
1880
|
-
const e =
|
|
1882
|
+
const e = u.register("width", `${t}px`);
|
|
1881
1883
|
this._classNames.push(e);
|
|
1882
1884
|
} else if (typeof t == "string" && (t.startsWith("w-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
|
|
1883
1885
|
const e = t.startsWith("w-") ? t : `w-${t}`;
|
|
1884
1886
|
this._classNames.push(e);
|
|
1885
1887
|
} else {
|
|
1886
|
-
const e =
|
|
1888
|
+
const e = u.register("width", t);
|
|
1887
1889
|
this._classNames.push(e);
|
|
1888
1890
|
}
|
|
1889
1891
|
return this;
|
|
1890
1892
|
}
|
|
1891
1893
|
height(t) {
|
|
1892
1894
|
if (typeof t == "number") {
|
|
1893
|
-
const e =
|
|
1895
|
+
const e = u.register("height", `${t}px`);
|
|
1894
1896
|
this._classNames.push(e);
|
|
1895
1897
|
} else if (typeof t == "string" && (t.startsWith("h-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
|
|
1896
1898
|
const e = t.startsWith("h-") ? t : `h-${t}`;
|
|
1897
1899
|
this._classNames.push(e);
|
|
1898
1900
|
} else {
|
|
1899
|
-
const e =
|
|
1901
|
+
const e = u.register("height", t);
|
|
1900
1902
|
this._classNames.push(e);
|
|
1901
1903
|
}
|
|
1902
1904
|
return this;
|
|
1903
1905
|
}
|
|
1904
1906
|
gap(t) {
|
|
1905
1907
|
if (typeof t == "number") {
|
|
1906
|
-
const e =
|
|
1908
|
+
const e = u.register("gap", `${t}px`);
|
|
1907
1909
|
this._classNames.push(e);
|
|
1908
1910
|
} else if (typeof t == "string" && t.startsWith("gap-"))
|
|
1909
1911
|
this._classNames.push(t);
|
|
1910
1912
|
else {
|
|
1911
|
-
const e =
|
|
1913
|
+
const e = u.register("gap", t);
|
|
1912
1914
|
this._classNames.push(e);
|
|
1913
1915
|
}
|
|
1914
1916
|
return this;
|
|
@@ -1959,18 +1961,18 @@ class Ee {
|
|
|
1959
1961
|
), this;
|
|
1960
1962
|
}
|
|
1961
1963
|
borderInput(t = "gray-300", e = "blue-500") {
|
|
1962
|
-
const s = (n) => ["red", "blue", "green", "yellow", "purple", "pink", "indigo", "gray", "orange", "teal", "cyan", "emerald", "lime", "amber", "fuchsia", "rose", "violet", "sky", "slate", "zinc", "neutral", "stone"].includes(n) ? `${n}-500` : n,
|
|
1964
|
+
const s = (n) => ["red", "blue", "green", "yellow", "purple", "pink", "indigo", "gray", "orange", "teal", "cyan", "emerald", "lime", "amber", "fuchsia", "rose", "violet", "sky", "slate", "zinc", "neutral", "stone"].includes(n) ? `${n}-500` : n, o = s(t), i = s(e);
|
|
1963
1965
|
return this._classNames.push(
|
|
1964
1966
|
"border",
|
|
1965
|
-
`border-${
|
|
1967
|
+
`border-${o}`,
|
|
1966
1968
|
"focus-within:ring-2",
|
|
1967
|
-
`focus-within:ring-${
|
|
1968
|
-
`focus-within:border-${
|
|
1969
|
+
`focus-within:ring-${i}`,
|
|
1970
|
+
`focus-within:border-${i}`
|
|
1969
1971
|
), this.clean();
|
|
1970
1972
|
}
|
|
1971
1973
|
weight(t) {
|
|
1972
1974
|
if (typeof t == "number") {
|
|
1973
|
-
const e =
|
|
1975
|
+
const e = u.register("font-weight", String(t));
|
|
1974
1976
|
this._classNames.push(e);
|
|
1975
1977
|
} else {
|
|
1976
1978
|
const e = {
|
|
@@ -1987,7 +1989,7 @@ class Ee {
|
|
|
1987
1989
|
if (e[t])
|
|
1988
1990
|
this._classNames.push(e[t]);
|
|
1989
1991
|
else {
|
|
1990
|
-
const s =
|
|
1992
|
+
const s = u.register("font-weight", t);
|
|
1991
1993
|
this._classNames.push(s);
|
|
1992
1994
|
}
|
|
1993
1995
|
}
|
|
@@ -2056,11 +2058,11 @@ class Ee {
|
|
|
2056
2058
|
props(t) {
|
|
2057
2059
|
return this._props = { ...this._props, ...t }, this;
|
|
2058
2060
|
}
|
|
2059
|
-
transition(t, e, s,
|
|
2061
|
+
transition(t, e, s, o) {
|
|
2060
2062
|
if (typeof t == "string" && e === void 0)
|
|
2061
|
-
return this.replaceTransitionClass(
|
|
2062
|
-
const
|
|
2063
|
-
return this.replaceTransitionClass(
|
|
2063
|
+
return this.replaceTransitionClass(u.register("transition", t)), this;
|
|
2064
|
+
const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = v(s || this._transitionEasing), l = o ? `${o}ms` : "0ms";
|
|
2065
|
+
return this.replaceTransitionClass(u.register("transition", `${i} ${n} ${a} ${l}`)), this;
|
|
2064
2066
|
}
|
|
2065
2067
|
/**
|
|
2066
2068
|
* Set transition duration in milliseconds
|
|
@@ -2098,15 +2100,15 @@ class Ee {
|
|
|
2098
2100
|
* Apply the built transition to the element
|
|
2099
2101
|
*/
|
|
2100
2102
|
_applyTransition() {
|
|
2101
|
-
const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing,
|
|
2102
|
-
this.replaceTransitionClass(
|
|
2103
|
+
const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing, o = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
|
|
2104
|
+
this.replaceTransitionClass(u.register("transition", `${t} ${e} ${s} ${o}`));
|
|
2103
2105
|
}
|
|
2104
2106
|
replaceTransitionClass(t) {
|
|
2105
2107
|
this._transitionClass && (this._classNames = this._classNames.filter((e) => e !== this._transitionClass)), this._transitionClass = t, this._classNames.push(t);
|
|
2106
2108
|
}
|
|
2107
2109
|
animate(t, e) {
|
|
2108
2110
|
_(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((h) => h !== this._motionClass));
|
|
2109
|
-
const s = Pt(t),
|
|
2111
|
+
const s = Pt(t), o = (s ? t.duration : e == null ? void 0 : e.duration) ?? this._transitionDuration, i = (s ? t.delay : e == null ? void 0 : e.delay) ?? this._transitionDelay;
|
|
2110
2112
|
let n = s ? t.ease : e == null ? void 0 : e.ease;
|
|
2111
2113
|
const a = {
|
|
2112
2114
|
stiffness: (s ? t.stiffness : e == null ? void 0 : e.stiffness) ?? void 0,
|
|
@@ -2114,16 +2116,16 @@ class Ee {
|
|
|
2114
2116
|
mass: (s ? t.mass : e == null ? void 0 : e.mass) ?? void 0
|
|
2115
2117
|
};
|
|
2116
2118
|
if (s) {
|
|
2117
|
-
const h = G(t.from),
|
|
2119
|
+
const h = G(t.from), f = G(t.to), m = u.registerKeyframes(Ft(`${h}=>${f}`), h, f);
|
|
2118
2120
|
this._motionClass = `fibo-anim ${m}`, this._props["data-fibo-anim"] = "custom";
|
|
2119
2121
|
} else {
|
|
2120
|
-
const h =
|
|
2122
|
+
const h = Bt(t);
|
|
2121
2123
|
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");
|
|
2122
2124
|
}
|
|
2123
2125
|
const l = v(n ?? "ease", a);
|
|
2124
2126
|
this._classNames.push(this._motionClass);
|
|
2125
2127
|
const d = this._style;
|
|
2126
|
-
return d["--fibo-dur"] = `${
|
|
2128
|
+
return d["--fibo-dur"] = `${o}ms`, d["--fibo-ease"] = l, d["--fibo-delay"] = `${i}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
|
|
2127
2129
|
}
|
|
2128
2130
|
/** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
|
|
2129
2131
|
spring(t) {
|
|
@@ -2161,7 +2163,7 @@ class Ee {
|
|
|
2161
2163
|
return _(), this._scrollProgress = !0, this._classNames.push("fibo-scroll-progress"), this._usesCssMotion = !0, this;
|
|
2162
2164
|
}
|
|
2163
2165
|
smoothScroll() {
|
|
2164
|
-
return this._classNames.push(
|
|
2166
|
+
return this._classNames.push(u.register("scroll-behavior", "smooth")), this;
|
|
2165
2167
|
}
|
|
2166
2168
|
scrollSnap(t = "y") {
|
|
2167
2169
|
return _(), this._classNames.push(`fibo-snap-${t}`), this;
|
|
@@ -2171,9 +2173,9 @@ class Ee {
|
|
|
2171
2173
|
}
|
|
2172
2174
|
sticky(t = 0) {
|
|
2173
2175
|
if (t === !1) return this;
|
|
2174
|
-
this._classNames.push(
|
|
2176
|
+
this._classNames.push(u.register("position", "sticky"));
|
|
2175
2177
|
const e = t === !0 ? "0px" : typeof t == "number" ? `${t}px` : t;
|
|
2176
|
-
this._classNames.push(
|
|
2178
|
+
this._classNames.push(u.register("top", e));
|
|
2177
2179
|
const s = t === !0 || t === 0 ? ne : typeof t == "number" ? `${Math.max(t, ht)}px` : t;
|
|
2178
2180
|
return this.publishStickyOffset(s), this;
|
|
2179
2181
|
}
|
|
@@ -2183,7 +2185,7 @@ class Ee {
|
|
|
2183
2185
|
*/
|
|
2184
2186
|
publishStickyOffset(t) {
|
|
2185
2187
|
const e = typeof t == "number" ? `${t}px` : t;
|
|
2186
|
-
|
|
2188
|
+
u.registerRoot("--fibo-sticky-offset", e), u.ensureScrollPadding();
|
|
2187
2189
|
}
|
|
2188
2190
|
viewTransition(t) {
|
|
2189
2191
|
return this._viewTransition = t, this._style.viewTransitionName = t, this;
|
|
@@ -2196,7 +2198,7 @@ class Ee {
|
|
|
2196
2198
|
}
|
|
2197
2199
|
ensureInteractiveTransition() {
|
|
2198
2200
|
this._transitionClass || this._motionClass || this.replaceTransitionClass(
|
|
2199
|
-
|
|
2201
|
+
u.register(
|
|
2200
2202
|
"transition",
|
|
2201
2203
|
`transform ${this._transitionDuration}ms ${this._transitionEasing}, opacity ${this._transitionDuration}ms ${this._transitionEasing}`
|
|
2202
2204
|
)
|
|
@@ -2278,7 +2280,7 @@ class Ee {
|
|
|
2278
2280
|
t.transform = e ? `${e} ${this._transforms.join(" ")}` : this._transforms.join(" ");
|
|
2279
2281
|
}
|
|
2280
2282
|
if (this._animationConfig && this._animatedProps.size === 0) {
|
|
2281
|
-
const { duration: e = 300, curve: s = "easeOut", stiffness:
|
|
2283
|
+
const { duration: e = 300, curve: s = "easeOut", stiffness: o, damping: i } = this._animationConfig, n = v(s, { stiffness: o, damping: i });
|
|
2282
2284
|
t.transition = `all ${e}ms ${n}`;
|
|
2283
2285
|
}
|
|
2284
2286
|
return t;
|
|
@@ -2321,7 +2323,7 @@ function ce(r) {
|
|
|
2321
2323
|
return t;
|
|
2322
2324
|
}
|
|
2323
2325
|
function le(r) {
|
|
2324
|
-
const t = r._isObserver, e = r._signals, s = r._observers,
|
|
2326
|
+
const t = r._isObserver, e = r._signals, s = r._observers, o = r._state, i = r._providers, n = ce(r), a = () => {
|
|
2325
2327
|
var S;
|
|
2326
2328
|
let m = r.build();
|
|
2327
2329
|
const p = r._animatedProps, y = r._animationConfig;
|
|
@@ -2344,42 +2346,42 @@ function le(r) {
|
|
|
2344
2346
|
})), r._scrollProgress && (m = g.createElement(ie, { key: n, children: m })), r._usesCssMotion && (m = g.createElement(
|
|
2345
2347
|
g.Fragment,
|
|
2346
2348
|
{ key: n },
|
|
2347
|
-
g.createElement(
|
|
2349
|
+
g.createElement(Ot),
|
|
2348
2350
|
m
|
|
2349
2351
|
));
|
|
2350
2352
|
const x = r._gesture;
|
|
2351
2353
|
return x && (m = x.wrap(m)), m;
|
|
2352
|
-
}, l = typeof r.hasStateManagement == "function" ? r.hasStateManagement() : !!(t || e && e.size || s && s.size ||
|
|
2354
|
+
}, l = typeof r.hasStateManagement == "function" ? r.hasStateManagement() : !!(t || e && e.size || s && s.size || o && o.size || i && i.size), d = t ? g.createElement(Nt, {
|
|
2353
2355
|
key: n,
|
|
2354
2356
|
children: a
|
|
2355
2357
|
}) : null, h = () => d ?? a();
|
|
2356
|
-
let
|
|
2357
|
-
return l && e && e.size > 0 ?
|
|
2358
|
+
let f = h();
|
|
2359
|
+
return l && e && e.size > 0 ? f = g.createElement(It, {
|
|
2358
2360
|
key: n,
|
|
2359
2361
|
signals: e,
|
|
2360
2362
|
children: h
|
|
2361
|
-
}) : l && s && s.size > 0 && (
|
|
2363
|
+
}) : l && s && s.size > 0 && (f = g.createElement(Tt, {
|
|
2362
2364
|
key: n,
|
|
2363
2365
|
observables: s,
|
|
2364
2366
|
children: h
|
|
2365
|
-
})), l &&
|
|
2367
|
+
})), l && o && o.size > 0 && (f = g.createElement(Mt, {
|
|
2366
2368
|
key: n,
|
|
2367
|
-
stateMap:
|
|
2368
|
-
children:
|
|
2369
|
-
})), l &&
|
|
2369
|
+
stateMap: o,
|
|
2370
|
+
children: f
|
|
2371
|
+
})), l && i && i.size > 0 && (f = g.createElement(Rt, {
|
|
2370
2372
|
key: n,
|
|
2371
|
-
providers:
|
|
2372
|
-
children:
|
|
2373
|
-
})),
|
|
2373
|
+
providers: i,
|
|
2374
|
+
children: f
|
|
2375
|
+
})), f;
|
|
2374
2376
|
}
|
|
2375
|
-
function
|
|
2377
|
+
function ut(r, t, e) {
|
|
2376
2378
|
const s = function() {
|
|
2377
2379
|
return t();
|
|
2378
2380
|
};
|
|
2379
2381
|
s.displayName = e;
|
|
2380
|
-
const
|
|
2382
|
+
const o = g.createElement(s);
|
|
2381
2383
|
Object.defineProperty(r, "$$typeof", {
|
|
2382
|
-
value:
|
|
2384
|
+
value: o.$$typeof,
|
|
2383
2385
|
enumerable: !0,
|
|
2384
2386
|
configurable: !0
|
|
2385
2387
|
}), Object.defineProperty(r, "type", {
|
|
@@ -2387,36 +2389,36 @@ function ft(r, t, e) {
|
|
|
2387
2389
|
enumerable: !0,
|
|
2388
2390
|
configurable: !0,
|
|
2389
2391
|
writable: !0
|
|
2390
|
-
}), r.ref =
|
|
2392
|
+
}), r.ref = o.ref ?? null, r.__fiboElementProps = o.props ?? {}, o._owner !== void 0 && (r._owner = o._owner), r._store = { validated: 1 };
|
|
2391
2393
|
}
|
|
2392
2394
|
function Me(r) {
|
|
2393
2395
|
return (...t) => {
|
|
2394
|
-
const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo",
|
|
2395
|
-
return
|
|
2396
|
-
get(
|
|
2396
|
+
const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo", o = () => le(e);
|
|
2397
|
+
return ut(e, o, s), new Proxy(e, {
|
|
2398
|
+
get(i, n, a) {
|
|
2397
2399
|
var l, d;
|
|
2398
2400
|
if (n === "build")
|
|
2399
|
-
return
|
|
2401
|
+
return o;
|
|
2400
2402
|
if (n === "key") {
|
|
2401
|
-
const h = (l =
|
|
2403
|
+
const h = (l = i._props) == null ? void 0 : l.key;
|
|
2402
2404
|
if (h != null && h !== "")
|
|
2403
2405
|
return String(h);
|
|
2404
|
-
if (!
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2406
|
+
if (!i.__fiboKeyFn) {
|
|
2407
|
+
const f = (m) => (i.key(m), a);
|
|
2408
|
+
i.__fiboKeyFn = f;
|
|
2407
2409
|
}
|
|
2408
|
-
return
|
|
2410
|
+
return i.__fiboKeyFn;
|
|
2409
2411
|
}
|
|
2410
2412
|
if (n === "props") {
|
|
2411
|
-
const h = (d =
|
|
2412
|
-
...
|
|
2413
|
+
const h = (d = i._props) == null ? void 0 : d.key, f = {
|
|
2414
|
+
...i.__fiboElementProps ?? {},
|
|
2413
2415
|
...h != null && h !== "" ? { key: String(h) } : {}
|
|
2414
|
-
}, m = Object.getPrototypeOf(
|
|
2415
|
-
return typeof m == "function" ? Object.assign((y) => (m.call(
|
|
2416
|
+
}, m = Object.getPrototypeOf(i).props;
|
|
2417
|
+
return typeof m == "function" ? Object.assign((y) => (m.call(i, y), a), f) : f;
|
|
2416
2418
|
}
|
|
2417
|
-
return ae.has(n) || Reflect.has(
|
|
2418
|
-
const
|
|
2419
|
-
return
|
|
2419
|
+
return ae.has(n) || Reflect.has(i, n) ? Reflect.get(i, n, a) : (h) => {
|
|
2420
|
+
const f = n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), p = ["opacity", "z-index", "flex", "flex-grow", "flex-shrink", "order", "font-weight", "line-height"].includes(f), y = typeof h == "number" && !p ? `${h}px` : String(h), b = u.register(f, y);
|
|
2421
|
+
return i.className(b), a;
|
|
2420
2422
|
};
|
|
2421
2423
|
}
|
|
2422
2424
|
});
|
|
@@ -2428,19 +2430,19 @@ const he = ({
|
|
|
2428
2430
|
loading: e,
|
|
2429
2431
|
error: s
|
|
2430
2432
|
}) => {
|
|
2431
|
-
const
|
|
2433
|
+
const o = g.useSyncExternalStore(
|
|
2432
2434
|
g.useCallback((a) => r.subscribe ? r.subscribe(a) : () => {
|
|
2433
2435
|
}, [r]),
|
|
2434
2436
|
() => r.value
|
|
2435
|
-
),
|
|
2436
|
-
return
|
|
2437
|
-
},
|
|
2438
|
-
class
|
|
2437
|
+
), i = o == null ? void 0 : o.error;
|
|
2438
|
+
return i && s ? s(i) : ((o == null ? void 0 : o.isLoading) || (o == null ? void 0 : o.loading)) === !0 && e ? e() : t ? t(o) : null;
|
|
2439
|
+
}, ue = g.memo(he);
|
|
2440
|
+
class fe {
|
|
2439
2441
|
constructor(t) {
|
|
2440
2442
|
c(this, "_loading");
|
|
2441
2443
|
c(this, "_error");
|
|
2442
2444
|
c(this, "_builder");
|
|
2443
|
-
this._signal = t,
|
|
2445
|
+
this._signal = t, ut(this, () => this.build(), "ValueBuilder");
|
|
2444
2446
|
}
|
|
2445
2447
|
loading(t) {
|
|
2446
2448
|
return this._loading = typeof t == "function" ? t : () => t, this;
|
|
@@ -2455,7 +2457,7 @@ class ue {
|
|
|
2455
2457
|
return this._builder = t, this;
|
|
2456
2458
|
}
|
|
2457
2459
|
build() {
|
|
2458
|
-
return g.createElement(
|
|
2460
|
+
return g.createElement(ue, {
|
|
2459
2461
|
signal: this._signal,
|
|
2460
2462
|
builder: this._builder,
|
|
2461
2463
|
loading: this._loading,
|
|
@@ -2464,10 +2466,10 @@ class ue {
|
|
|
2464
2466
|
}
|
|
2465
2467
|
}
|
|
2466
2468
|
function Te(r) {
|
|
2467
|
-
return new
|
|
2469
|
+
return new fe(r);
|
|
2468
2470
|
}
|
|
2469
2471
|
export {
|
|
2470
|
-
|
|
2472
|
+
Bt as A,
|
|
2471
2473
|
Mt as B,
|
|
2472
2474
|
$t as C,
|
|
2473
2475
|
zt as D,
|
|
@@ -2476,7 +2478,7 @@ export {
|
|
|
2476
2478
|
jt as G,
|
|
2477
2479
|
At as H,
|
|
2478
2480
|
K as I,
|
|
2479
|
-
|
|
2481
|
+
q as J,
|
|
2480
2482
|
F as K,
|
|
2481
2483
|
at as L,
|
|
2482
2484
|
U as M,
|
|
@@ -2501,7 +2503,7 @@ export {
|
|
|
2501
2503
|
it as m,
|
|
2502
2504
|
v as n,
|
|
2503
2505
|
ye as o,
|
|
2504
|
-
|
|
2506
|
+
Ot as p,
|
|
2505
2507
|
we as q,
|
|
2506
2508
|
kt as r,
|
|
2507
2509
|
ge as s,
|