fiboui 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{FineGrain-BBvoBgWP.js → FineGrain-BOIYZ80-.js} +1 -1
- package/dist/{builder-FPfXLYM6.js → builder-Dnz93Wem.js} +373 -308
- package/dist/content.js +3 -3
- package/dist/core.js +3 -3
- package/dist/{index-DkH15EIF.js → index-BZcrpasQ.js} +3 -3
- package/dist/{index-ClppTuYv.js → index-B_aiikJG.js} +3 -3
- package/dist/{index-3GitHTeZ.js → index-BpMNotfc.js} +1 -1
- package/dist/{index-BuatCnp7.js → index-DN_fam2s.js} +1 -1
- package/dist/{index-kWLK5n5t.js → index-DP7-rISq.js} +1 -1
- package/dist/{index-Cnox750A.js → index-De55bvQW.js} +4 -4
- package/dist/{index-y7-9rhRQ.js → index-EM-UZNWN.js} +2 -2
- package/dist/index.d.ts +16 -0
- package/dist/index.js +17 -17
- package/dist/interactive.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/{mount-Du-X9Dqn.js → mount-DIQx3NWo.js} +1 -1
- package/dist/structure.js +2 -2
- package/package.json +1 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var a = (t, o, i) =>
|
|
5
|
-
import g, { useRef as _, createContext as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { r as
|
|
8
|
-
class
|
|
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 {
|
|
9
9
|
constructor() {
|
|
10
10
|
a(this, "activeEffect", null);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
return new
|
|
13
|
+
const ro = new fo(), F = [ro];
|
|
14
|
+
function no() {
|
|
15
|
+
return new fo();
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function so() {
|
|
18
|
+
return F[F.length - 1] ?? ro;
|
|
19
19
|
}
|
|
20
20
|
function Y() {
|
|
21
|
-
return
|
|
21
|
+
return so().activeEffect;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
23
|
+
function Eo(t, o) {
|
|
24
|
+
F.push(t);
|
|
25
25
|
try {
|
|
26
26
|
return o();
|
|
27
27
|
} finally {
|
|
28
|
-
|
|
28
|
+
F.pop();
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const o =
|
|
31
|
+
function E(t) {
|
|
32
|
+
const o = so(), i = o.activeEffect;
|
|
33
33
|
return o.activeEffect = t, i;
|
|
34
34
|
}
|
|
35
|
-
class
|
|
35
|
+
class Ro {
|
|
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 =
|
|
42
|
+
const o = E(this);
|
|
43
43
|
try {
|
|
44
44
|
this.cleanup(), this.fn();
|
|
45
45
|
} finally {
|
|
46
|
-
|
|
46
|
+
E(o);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
track(o) {
|
|
@@ -60,17 +60,17 @@ class Eo {
|
|
|
60
60
|
this.cleanup(), (o = this._onDispose) == null || o.call(this);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
class
|
|
63
|
+
class Io {
|
|
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 =
|
|
69
|
+
const i = E(this);
|
|
70
70
|
try {
|
|
71
71
|
return this.cleanup(), o();
|
|
72
72
|
} finally {
|
|
73
|
-
|
|
73
|
+
E(i);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
track(o) {
|
|
@@ -86,7 +86,7 @@ class No {
|
|
|
86
86
|
this.cleanup();
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
class
|
|
89
|
+
class I {
|
|
90
90
|
constructor(o) {
|
|
91
91
|
a(this, "listeners", /* @__PURE__ */ new Set());
|
|
92
92
|
a(this, "effects", /* @__PURE__ */ new Set());
|
|
@@ -113,28 +113,28 @@ class R {
|
|
|
113
113
|
o.forEach((e) => e.trigger()), i.forEach((e) => e(this._value));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return new
|
|
116
|
+
function Li(t) {
|
|
117
|
+
return new I(t);
|
|
118
118
|
}
|
|
119
|
-
class
|
|
119
|
+
class Fo {
|
|
120
120
|
constructor(o) {
|
|
121
121
|
a(this, "listeners", /* @__PURE__ */ new Set());
|
|
122
122
|
a(this, "effects", /* @__PURE__ */ new Set());
|
|
123
123
|
a(this, "_value");
|
|
124
124
|
a(this, "_dirty", !0);
|
|
125
125
|
a(this, "internalEffect");
|
|
126
|
-
this.fn = o, this.internalEffect = new
|
|
126
|
+
this.fn = o, this.internalEffect = new Ro(() => {
|
|
127
127
|
this._dirty || (this._dirty = !0, this.notify());
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
get value() {
|
|
131
131
|
const o = Y();
|
|
132
132
|
if (o && o.track(this), this._dirty) {
|
|
133
|
-
const i =
|
|
133
|
+
const i = E(this.internalEffect);
|
|
134
134
|
try {
|
|
135
135
|
this.internalEffect.cleanup(), this._value = this.fn(), this._dirty = !1;
|
|
136
136
|
} finally {
|
|
137
|
-
|
|
137
|
+
E(i);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
return this._value;
|
|
@@ -153,10 +153,10 @@ class To {
|
|
|
153
153
|
o.forEach((e) => e.trigger()), i.forEach((e) => e(this._value));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return new
|
|
156
|
+
function Oi(t) {
|
|
157
|
+
return new Fo(t);
|
|
158
158
|
}
|
|
159
|
-
class
|
|
159
|
+
class Xo {
|
|
160
160
|
constructor(o) {
|
|
161
161
|
a(this, "listeners", /* @__PURE__ */ new Set());
|
|
162
162
|
a(this, "effects", /* @__PURE__ */ new Set());
|
|
@@ -182,10 +182,10 @@ class Io {
|
|
|
182
182
|
Array.from(this.effects).forEach((o) => o.trigger()), Array.from(this.listeners).forEach((o) => o(this._value));
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return new
|
|
185
|
+
function Pi(t) {
|
|
186
|
+
return new Xo(t);
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class Mo {
|
|
189
189
|
constructor(o) {
|
|
190
190
|
a(this, "listeners", /* @__PURE__ */ new Set());
|
|
191
191
|
a(this, "effects", /* @__PURE__ */ new Set());
|
|
@@ -212,47 +212,47 @@ class Ro {
|
|
|
212
212
|
Array.from(this.effects).forEach((o) => o.trigger()), Array.from(this.listeners).forEach((o) => o(this.state));
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return new
|
|
215
|
+
function Ai(t) {
|
|
216
|
+
return new Mo(t);
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
220
|
-
return
|
|
218
|
+
const Yo = no(), ao = X(Yo);
|
|
219
|
+
function Bo() {
|
|
220
|
+
return j(ao);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
const i = _(o ??
|
|
224
|
-
return /* @__PURE__ */
|
|
222
|
+
function ji({ children: t, scope: o }) {
|
|
223
|
+
const i = _(o ?? no()).current;
|
|
224
|
+
return /* @__PURE__ */ $(ao.Provider, { value: i, children: t });
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Lo({ children: t }) {
|
|
227
227
|
const o = _(0), i = _(/* @__PURE__ */ new Set()), e = _(null);
|
|
228
|
-
e.current || (e.current = new
|
|
228
|
+
e.current || (e.current = new Io(() => {
|
|
229
229
|
o.current += 1, i.current.forEach((c) => c());
|
|
230
230
|
}));
|
|
231
|
-
const r =
|
|
231
|
+
const r = T((c) => (i.current.add(c), () => {
|
|
232
232
|
i.current.delete(c);
|
|
233
|
-
}), []), f =
|
|
234
|
-
|
|
233
|
+
}), []), f = T(() => o.current, []);
|
|
234
|
+
D(r, f, f), M(() => () => {
|
|
235
235
|
var c;
|
|
236
236
|
(c = e.current) == null || c.dispose();
|
|
237
237
|
}, []);
|
|
238
|
-
const n =
|
|
238
|
+
const n = Bo();
|
|
239
239
|
let s = null;
|
|
240
240
|
try {
|
|
241
|
-
s =
|
|
241
|
+
s = Eo(n, () => e.current.execute(t));
|
|
242
242
|
} catch {
|
|
243
243
|
s = null;
|
|
244
244
|
}
|
|
245
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ $(V, { children: s });
|
|
246
246
|
}
|
|
247
|
-
const
|
|
248
|
-
function
|
|
249
|
-
const o =
|
|
247
|
+
const Oo = X(/* @__PURE__ */ new Map()), co = X(null);
|
|
248
|
+
function Di(t) {
|
|
249
|
+
const o = j(co);
|
|
250
250
|
if (!o)
|
|
251
251
|
throw new Error("useBuilderState must be used under a builder that called .state()");
|
|
252
252
|
return [o.get(t), (i) => o.set(t, i)];
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const [i, e] =
|
|
254
|
+
function Po({ stateMap: t = /* @__PURE__ */ new Map(), children: o }) {
|
|
255
|
+
const [i, e] = eo(() => new Map(t)), r = {
|
|
256
256
|
map: i,
|
|
257
257
|
get: (f) => i.get(f),
|
|
258
258
|
set: (f, n) => {
|
|
@@ -264,89 +264,89 @@ function Bo({ stateMap: t = /* @__PURE__ */ new Map(), children: o }) {
|
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
|
-
return /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ $(co.Provider, { value: r, children: /* @__PURE__ */ $(Oo.Provider, { value: i, children: o }) });
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
const i = _(0), e =
|
|
269
|
+
function Ao({ observables: t, children: o }) {
|
|
270
|
+
const i = _(0), e = T((f) => {
|
|
271
271
|
const n = Array.from(t).map(
|
|
272
272
|
(s) => s.subscribe(() => {
|
|
273
273
|
i.current += 1, f();
|
|
274
274
|
})
|
|
275
275
|
);
|
|
276
276
|
return () => n.forEach((s) => s());
|
|
277
|
-
}, [t]), r =
|
|
278
|
-
return
|
|
277
|
+
}, [t]), r = T(() => i.current, []);
|
|
278
|
+
return D(e, r, r), /* @__PURE__ */ $(V, { children: typeof o == "function" ? o() : o });
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const i = _(0), e =
|
|
280
|
+
function jo({ signals: t, children: o }) {
|
|
281
|
+
const i = _(0), e = T((f) => {
|
|
282
282
|
const n = Array.from(t).map(
|
|
283
283
|
(s) => s.subscribe(() => {
|
|
284
284
|
i.current += 1, f();
|
|
285
285
|
})
|
|
286
286
|
);
|
|
287
287
|
return () => n.forEach((s) => s());
|
|
288
|
-
}, [t]), r =
|
|
289
|
-
return
|
|
288
|
+
}, [t]), r = T(() => i.current, []);
|
|
289
|
+
return D(e, r, r), /* @__PURE__ */ $(V, { children: typeof o == "function" ? o() : o });
|
|
290
290
|
}
|
|
291
|
-
const
|
|
292
|
-
function
|
|
293
|
-
const o =
|
|
291
|
+
const bo = X(/* @__PURE__ */ new Map());
|
|
292
|
+
function Vi(t) {
|
|
293
|
+
const o = j(bo);
|
|
294
294
|
return o == null ? void 0 : o.get(t);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
return /* @__PURE__ */
|
|
296
|
+
function Do({ providers: t = /* @__PURE__ */ new Map(), children: o }) {
|
|
297
|
+
return /* @__PURE__ */ $(bo.Provider, { value: t, children: o });
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Vo(t) {
|
|
300
300
|
return !!t && typeof t == "object" && "build" in t && typeof t.build == "function";
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
return g.isValidElement(t) ? t :
|
|
302
|
+
function Wo(t) {
|
|
303
|
+
return g.isValidElement(t) ? t : Vo(t) ? t.build() : t;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function W(t) {
|
|
306
306
|
return typeof t == "string" || typeof t == "number";
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
return g.isValidElement(t) &&
|
|
308
|
+
function Ho(t, o) {
|
|
309
|
+
return g.isValidElement(t) && W(t.key) && t.key !== "" ? t.key : `.$fibo-${o}`;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
return !g.isValidElement(t) ||
|
|
311
|
+
function Uo(t, o) {
|
|
312
|
+
return !g.isValidElement(t) || W(t.key) && t.key !== "" ? t : g.cloneElement(t, { key: Ho(t, o) });
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function U(t) {
|
|
315
315
|
if (t == null)
|
|
316
316
|
return [];
|
|
317
317
|
const o = typeof t == "function" ? t() : t;
|
|
318
|
-
return (Array.isArray(o) ? o : [o]).map((e, r) =>
|
|
318
|
+
return (Array.isArray(o) ? o : [o]).map((e, r) => Uo(Wo(e), r));
|
|
319
319
|
}
|
|
320
|
-
const
|
|
320
|
+
const G = /* @__PURE__ */ new Map(), Go = {
|
|
321
321
|
easeIn: "ease-in",
|
|
322
322
|
easeOut: "ease-out",
|
|
323
323
|
easeInOut: "ease-in-out",
|
|
324
324
|
linear: "linear",
|
|
325
325
|
ease: "ease"
|
|
326
326
|
};
|
|
327
|
-
function
|
|
328
|
-
const o = t.stiffness ?? 170, i = t.damping ?? 26, e = t.mass ?? 1, r = `${o}:${i}:${e}`, f =
|
|
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);
|
|
329
329
|
if (f) return f;
|
|
330
330
|
const n = 1 / 60, s = 1;
|
|
331
331
|
let c = 0, h = 0;
|
|
332
332
|
const b = [0];
|
|
333
333
|
for (let d = 0; d < 180; d += 1) {
|
|
334
|
-
const
|
|
335
|
-
if (h +=
|
|
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;
|
|
336
336
|
}
|
|
337
337
|
b[b.length - 1] !== 1 && b.push(1);
|
|
338
338
|
const x = Math.max(1, Math.floor((b.length - 1) / 24)), p = [];
|
|
339
339
|
for (let d = 0; d < b.length; d += x) {
|
|
340
|
-
const
|
|
341
|
-
p.push(d === 0 ? `${z}` : `${z} ${Math.round(
|
|
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}%`);
|
|
342
342
|
}
|
|
343
343
|
const m = `linear(${p.join(", ")})`;
|
|
344
|
-
return
|
|
344
|
+
return G.set(r, m), m;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
return t === "spring" ?
|
|
346
|
+
function S(t, o) {
|
|
347
|
+
return t === "spring" ? uo(o) : Go[t] ?? t;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const K = [
|
|
350
350
|
"fadeIn",
|
|
351
351
|
"fadeOut",
|
|
352
352
|
"fade",
|
|
@@ -362,35 +362,35 @@ const G = [
|
|
|
362
362
|
"blur",
|
|
363
363
|
"pop",
|
|
364
364
|
"bounce"
|
|
365
|
-
],
|
|
365
|
+
], Ko = {
|
|
366
366
|
fade: "fadeIn",
|
|
367
367
|
scale: "scaleIn",
|
|
368
368
|
blur: "blurIn"
|
|
369
369
|
};
|
|
370
|
-
function
|
|
370
|
+
function Zo(t) {
|
|
371
371
|
if (!t || typeof t != "object") return !1;
|
|
372
372
|
const o = t;
|
|
373
373
|
return typeof o.from == "object" && o.from !== null && typeof o.to == "object" && o.to !== null;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Z(t) {
|
|
376
376
|
const o = /* @__PURE__ */ new Set(["opacity", "zIndex", "z-index", "flex", "fontWeight", "lineHeight"]);
|
|
377
377
|
return Object.entries(t).map(([i, e]) => {
|
|
378
378
|
const r = i.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), f = typeof e == "number" && !o.has(i) ? `${e}px` : String(e);
|
|
379
379
|
return `${r}: ${f}`;
|
|
380
380
|
}).join("; ");
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function qo(t) {
|
|
383
383
|
let o = 5381;
|
|
384
384
|
for (let i = 0; i < t.length; i += 1) o = (o << 5) + o ^ t.charCodeAt(i);
|
|
385
385
|
return (o >>> 0).toString(36);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
const o =
|
|
389
|
-
if (!
|
|
390
|
-
throw new Error(`Unknown motion preset "${t}". Use: ${
|
|
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(", ")}`);
|
|
391
391
|
return o;
|
|
392
392
|
}
|
|
393
|
-
const
|
|
393
|
+
const A = `
|
|
394
394
|
.fibo-anim {
|
|
395
395
|
animation-duration: var(--fibo-dur, 300ms);
|
|
396
396
|
animation-timing-function: var(--fibo-ease, ease);
|
|
@@ -532,13 +532,13 @@ const P = `
|
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
`.trim();
|
|
535
|
-
function
|
|
535
|
+
function q(t) {
|
|
536
536
|
let o = 5381;
|
|
537
537
|
for (let i = 0; i < t.length; i += 1)
|
|
538
538
|
o = (o << 5) + o ^ t.charCodeAt(i);
|
|
539
539
|
return (o >>> 0).toString(36);
|
|
540
540
|
}
|
|
541
|
-
const
|
|
541
|
+
const k = class k {
|
|
542
542
|
constructor() {
|
|
543
543
|
a(this, "sheet", null);
|
|
544
544
|
a(this, "cache", /* @__PURE__ */ new Map());
|
|
@@ -547,14 +547,14 @@ const y = class y {
|
|
|
547
547
|
this.attachSheet(), this.ensureDefaults();
|
|
548
548
|
}
|
|
549
549
|
static getInstance() {
|
|
550
|
-
return
|
|
550
|
+
return k.instance || (k.instance = new k()), k.instance;
|
|
551
551
|
}
|
|
552
552
|
/** Test-only: empty cache/sheet so a simulated client starts cold. */
|
|
553
553
|
reset() {
|
|
554
554
|
this.cache.clear(), this.extras = [], this.defaultsReady = !1, this.sheet = null, this.attachSheet(), this.ensureDefaults();
|
|
555
555
|
}
|
|
556
556
|
static resetForTests() {
|
|
557
|
-
|
|
557
|
+
k.getInstance().reset();
|
|
558
558
|
}
|
|
559
559
|
attachSheet() {
|
|
560
560
|
if (typeof document > "u") return;
|
|
@@ -572,12 +572,12 @@ const y = class y {
|
|
|
572
572
|
const r = `@media ${o}|${i}:${e}`;
|
|
573
573
|
if (this.cache.has(r))
|
|
574
574
|
return this.cache.get(r);
|
|
575
|
-
const f = `fibo-mq-${
|
|
575
|
+
const f = `fibo-mq-${q(r)}`, n = `@media ${o} { .${f} { ${i}: ${e} !important; } }`;
|
|
576
576
|
return this.insert(n), this.cache.set(r, f), f;
|
|
577
577
|
}
|
|
578
578
|
ensureDefaults() {
|
|
579
579
|
var o;
|
|
580
|
-
this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((o = this.sheet.textContent) != null && o.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(
|
|
580
|
+
this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((o = this.sheet.textContent) != null && o.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(A)));
|
|
581
581
|
}
|
|
582
582
|
/**
|
|
583
583
|
* Append a large static CSS blob once (keyed). Used by interaction-effect presets.
|
|
@@ -590,7 +590,7 @@ const y = class y {
|
|
|
590
590
|
getCss() {
|
|
591
591
|
this.ensureDefaults();
|
|
592
592
|
const o = [...this.extras].sort();
|
|
593
|
-
return [
|
|
593
|
+
return [A, ...o].filter(Boolean).join(`
|
|
594
594
|
`);
|
|
595
595
|
}
|
|
596
596
|
registerKeyframes(o, i, e) {
|
|
@@ -635,83 +635,83 @@ const y = class y {
|
|
|
635
635
|
const f = `${r ? "group:" : ""}${o}:${i}:${e}`;
|
|
636
636
|
if (this.cache.has(f))
|
|
637
637
|
return this.cache.get(f);
|
|
638
|
-
const n = `fibo-ps-${
|
|
638
|
+
const n = `fibo-ps-${q(f)}`, s = r ? `.group:${o} .${n} { ${i}: ${e} !important; }` : `.${n}:${o} { ${i}: ${e} !important; }`;
|
|
639
639
|
return this.insert(s), this.cache.set(f, n), n;
|
|
640
640
|
}
|
|
641
641
|
registerGroupPseudo(o, i, e, r) {
|
|
642
642
|
return this.registerPseudo(i, e, r, !0);
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
|
-
a(
|
|
646
|
-
let C =
|
|
645
|
+
a(k, "instance");
|
|
646
|
+
let C = k;
|
|
647
647
|
const u = C.getInstance();
|
|
648
648
|
function w() {
|
|
649
649
|
C.getInstance().ensureDefaults();
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function Wi() {
|
|
652
652
|
return C.getInstance().getCss();
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function lo() {
|
|
655
655
|
return C.getInstance().getCss();
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
return `<style id="fibo-dynamic-styles" data-fibo="1">${
|
|
657
|
+
function Hi() {
|
|
658
|
+
return `<style id="fibo-dynamic-styles" data-fibo="1">${lo().replace(/<\/style/gi, "<\\/style")}</style>`;
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function Ui() {
|
|
661
661
|
return w(), g.createElement("style", {
|
|
662
662
|
id: "fibo-dynamic-styles",
|
|
663
663
|
"data-fibo": "1",
|
|
664
664
|
suppressHydrationWarning: !0,
|
|
665
|
-
dangerouslySetInnerHTML: { __html:
|
|
665
|
+
dangerouslySetInnerHTML: { __html: lo() }
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Jo() {
|
|
669
669
|
return w(), g.createElement("style", {
|
|
670
670
|
id: "fibo-motion-presets",
|
|
671
671
|
"data-fibo-motion": "1",
|
|
672
|
-
dangerouslySetInnerHTML: { __html:
|
|
672
|
+
dangerouslySetInnerHTML: { __html: A }
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
|
-
const
|
|
675
|
+
const ho = {
|
|
676
676
|
sm: 640,
|
|
677
677
|
md: 768,
|
|
678
678
|
lg: 1024,
|
|
679
679
|
xl: 1280
|
|
680
680
|
};
|
|
681
|
-
function
|
|
682
|
-
return t in
|
|
681
|
+
function oi(t) {
|
|
682
|
+
return t in ho;
|
|
683
683
|
}
|
|
684
|
-
function
|
|
685
|
-
if (
|
|
686
|
-
return `(min-width: ${
|
|
684
|
+
function ii(t) {
|
|
685
|
+
if (oi(t))
|
|
686
|
+
return `(min-width: ${ho[t]}px)`;
|
|
687
687
|
const o = t.trim();
|
|
688
688
|
return o.startsWith("@media") ? o.replace(/^@media\s+/, "") : o;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function xo(t) {
|
|
691
691
|
var o, i, e = "";
|
|
692
692
|
if (typeof t == "string" || typeof t == "number") e += t;
|
|
693
693
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
694
694
|
var r = t.length;
|
|
695
|
-
for (o = 0; o < r; o++) t[o] && (i =
|
|
695
|
+
for (o = 0; o < r; o++) t[o] && (i = xo(t[o])) && (e && (e += " "), e += i);
|
|
696
696
|
} else for (i in t) t[i] && (e && (e += " "), e += i);
|
|
697
697
|
return e;
|
|
698
698
|
}
|
|
699
|
-
function
|
|
700
|
-
for (var t, o, i = 0, e = "", r = arguments.length; i < r; i++) (t = arguments[i]) && (o =
|
|
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);
|
|
701
701
|
return e;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function ei(t) {
|
|
704
704
|
const o = t.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
|
|
705
705
|
if (!o)
|
|
706
706
|
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,
|
|
708
|
-
var
|
|
709
|
-
const O = (
|
|
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
710
|
return O.length === 1 ? `0${O}` : O;
|
|
711
711
|
};
|
|
712
|
-
return `#${L(
|
|
712
|
+
return `#${L(yo)}${L(ko)}${L(_o)}`;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function fi(t) {
|
|
715
715
|
const o = {}, i = {}, e = t.split(`
|
|
716
716
|
`);
|
|
717
717
|
for (const r of e) {
|
|
@@ -720,7 +720,7 @@ function ii(t) {
|
|
|
720
720
|
continue;
|
|
721
721
|
const n = f.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), s = f.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
|
|
722
722
|
if (n) {
|
|
723
|
-
const [, c, h] = n, b =
|
|
723
|
+
const [, c, h] = n, b = ei(h);
|
|
724
724
|
o[b.toLowerCase()] = `bg-${c}`, i[b.toLowerCase()] = `text-${c}`;
|
|
725
725
|
} else if (s) {
|
|
726
726
|
const [, c, h] = s;
|
|
@@ -729,13 +729,13 @@ function ii(t) {
|
|
|
729
729
|
}
|
|
730
730
|
return { background: o, text: i };
|
|
731
731
|
}
|
|
732
|
-
const
|
|
732
|
+
const ri = (t) => {
|
|
733
733
|
if (t !== void 0)
|
|
734
734
|
return typeof t == "number" ? `${t}px` : t.toString();
|
|
735
|
-
},
|
|
736
|
-
const i =
|
|
735
|
+
}, N = (t, o) => {
|
|
736
|
+
const i = ri(o);
|
|
737
737
|
return i === void 0 ? "" : `${t}-[${i}]`;
|
|
738
|
-
},
|
|
738
|
+
}, ni = `
|
|
739
739
|
--color-red-50: oklch(0.971 0.013 17.38);
|
|
740
740
|
--color-red-100: oklch(0.936 0.032 17.717);
|
|
741
741
|
--color-red-200: oklch(0.885 0.062 18.334);
|
|
@@ -980,7 +980,7 @@ const ti = (t) => {
|
|
|
980
980
|
--color-stone-950: oklch(0.147 0.004 49.25);
|
|
981
981
|
--color-black: #000;
|
|
982
982
|
--color-white: #fff;
|
|
983
|
-
`,
|
|
983
|
+
`, si = fi(ni), po = {
|
|
984
984
|
borderRadius: {
|
|
985
985
|
0: "rounded-none",
|
|
986
986
|
"0px": "rounded-none",
|
|
@@ -1077,7 +1077,7 @@ const ti = (t) => {
|
|
|
1077
1077
|
fixed: "fixed",
|
|
1078
1078
|
sticky: "sticky"
|
|
1079
1079
|
}
|
|
1080
|
-
},
|
|
1080
|
+
}, ai = (t, o) => ({
|
|
1081
1081
|
// 背景色
|
|
1082
1082
|
backgroundColor: (i) => i.backgroundColor ? [t.background[i.backgroundColor.toLowerCase()] || `bg-[${i.backgroundColor}]`] : [],
|
|
1083
1083
|
// 文字色
|
|
@@ -1086,14 +1086,14 @@ const ti = (t) => {
|
|
|
1086
1086
|
borderRadius: (i) => {
|
|
1087
1087
|
if (!i.borderRadius)
|
|
1088
1088
|
return [];
|
|
1089
|
-
const e =
|
|
1089
|
+
const e = po.borderRadius[i.borderRadius] || N("rounded", i.borderRadius);
|
|
1090
1090
|
return e ? [e] : [];
|
|
1091
1091
|
},
|
|
1092
1092
|
// 外边距
|
|
1093
1093
|
margin: (i) => {
|
|
1094
1094
|
const e = [];
|
|
1095
1095
|
if (i.margin !== void 0) {
|
|
1096
|
-
const f =
|
|
1096
|
+
const f = N("m", i.margin);
|
|
1097
1097
|
return f ? [f] : [];
|
|
1098
1098
|
}
|
|
1099
1099
|
return [
|
|
@@ -1105,7 +1105,7 @@ const ti = (t) => {
|
|
|
1105
1105
|
{ prop: i.marginY, dir: "my" }
|
|
1106
1106
|
].forEach(({ prop: f, dir: n }) => {
|
|
1107
1107
|
if (f !== void 0) {
|
|
1108
|
-
const s =
|
|
1108
|
+
const s = N(n, f);
|
|
1109
1109
|
s && e.push(s);
|
|
1110
1110
|
}
|
|
1111
1111
|
}), e;
|
|
@@ -1114,7 +1114,7 @@ const ti = (t) => {
|
|
|
1114
1114
|
padding: (i) => {
|
|
1115
1115
|
const e = [];
|
|
1116
1116
|
if (i.padding !== void 0) {
|
|
1117
|
-
const f =
|
|
1117
|
+
const f = N("p", i.padding);
|
|
1118
1118
|
return f ? [f] : [];
|
|
1119
1119
|
}
|
|
1120
1120
|
return [
|
|
@@ -1126,7 +1126,7 @@ const ti = (t) => {
|
|
|
1126
1126
|
{ prop: i.paddingY, dir: "py" }
|
|
1127
1127
|
].forEach(({ prop: f, dir: n }) => {
|
|
1128
1128
|
if (f !== void 0) {
|
|
1129
|
-
const s =
|
|
1129
|
+
const s = N(n, f);
|
|
1130
1130
|
s && e.push(s);
|
|
1131
1131
|
}
|
|
1132
1132
|
}), e;
|
|
@@ -1211,7 +1211,7 @@ const ti = (t) => {
|
|
|
1211
1211
|
f && e.push(f);
|
|
1212
1212
|
}
|
|
1213
1213
|
if (i.gap) {
|
|
1214
|
-
const r =
|
|
1214
|
+
const r = N("gap", i.gap);
|
|
1215
1215
|
r && e.push(r);
|
|
1216
1216
|
}
|
|
1217
1217
|
return e;
|
|
@@ -1233,7 +1233,7 @@ const ti = (t) => {
|
|
|
1233
1233
|
},
|
|
1234
1234
|
// 自定义类名
|
|
1235
1235
|
className: (i) => i.className ? [i.className] : []
|
|
1236
|
-
}),
|
|
1236
|
+
}), ci = {
|
|
1237
1237
|
backgroundColor: "backgroundColor",
|
|
1238
1238
|
color: "color",
|
|
1239
1239
|
borderRadius: "borderRadius",
|
|
@@ -1267,10 +1267,10 @@ const ti = (t) => {
|
|
|
1267
1267
|
position: "position",
|
|
1268
1268
|
opacity: "opacity",
|
|
1269
1269
|
className: "className"
|
|
1270
|
-
},
|
|
1271
|
-
const i = (o == null ? void 0 : o.colorMaps) ||
|
|
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();
|
|
1272
1272
|
return Object.keys(t).forEach((s) => {
|
|
1273
|
-
const c =
|
|
1273
|
+
const c = ci[s];
|
|
1274
1274
|
if (c && !n.has(c)) {
|
|
1275
1275
|
const h = r[c];
|
|
1276
1276
|
if (h) {
|
|
@@ -1280,15 +1280,15 @@ const ti = (t) => {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}), f.filter(Boolean).join(" ");
|
|
1282
1282
|
};
|
|
1283
|
-
function
|
|
1283
|
+
function ui(t) {
|
|
1284
1284
|
const o = {};
|
|
1285
1285
|
return t.forEach((i, e) => {
|
|
1286
1286
|
o[e] = i.value;
|
|
1287
1287
|
}), o;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const [e, r] =
|
|
1291
|
-
() =>
|
|
1289
|
+
function li({ animatedProps: t, animationConfig: o, children: i }) {
|
|
1290
|
+
const [e, r] = eo(
|
|
1291
|
+
() => ui(t)
|
|
1292
1292
|
);
|
|
1293
1293
|
M(() => {
|
|
1294
1294
|
const c = [];
|
|
@@ -1308,16 +1308,16 @@ function ci({ animatedProps: t, animationConfig: o, children: i }) {
|
|
|
1308
1308
|
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
1309
|
const n = {};
|
|
1310
1310
|
if (f.length > 0 && (n.transform = f.join(" ")), o) {
|
|
1311
|
-
const { duration: c = 300, curve: h = "easeOut", stiffness: b, damping: l } = o, x =
|
|
1311
|
+
const { duration: c = 300, curve: h = "easeOut", stiffness: b, damping: l } = o, x = S(h, { stiffness: b, damping: l });
|
|
1312
1312
|
n.transition = `transform ${c}ms ${x}`;
|
|
1313
1313
|
}
|
|
1314
1314
|
const s = {
|
|
1315
1315
|
...i.props.style,
|
|
1316
1316
|
...n
|
|
1317
1317
|
};
|
|
1318
|
-
return
|
|
1318
|
+
return $o(i, { style: s });
|
|
1319
1319
|
}
|
|
1320
|
-
const
|
|
1320
|
+
const go = [
|
|
1321
1321
|
// —— 2D Transitions ——
|
|
1322
1322
|
"grow",
|
|
1323
1323
|
"shrink",
|
|
@@ -1437,7 +1437,7 @@ const ho = [
|
|
|
1437
1437
|
"curlTopRight",
|
|
1438
1438
|
"curlBottomRight",
|
|
1439
1439
|
"curlBottomLeft"
|
|
1440
|
-
],
|
|
1440
|
+
], Q = {
|
|
1441
1441
|
"pulse-grow": "pulseGrow",
|
|
1442
1442
|
"pulse-shrink": "pulseShrink",
|
|
1443
1443
|
"bounce-in": "bounceIn",
|
|
@@ -1534,29 +1534,29 @@ const ho = [
|
|
|
1534
1534
|
"hvr-float": "float",
|
|
1535
1535
|
"hvr-sweep-to-right": "sweepToRight"
|
|
1536
1536
|
};
|
|
1537
|
-
function
|
|
1537
|
+
function hi(t) {
|
|
1538
1538
|
return t.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`);
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1541
|
-
return
|
|
1540
|
+
function J(t) {
|
|
1541
|
+
return go.includes(t);
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const o = t.trim(), i =
|
|
1543
|
+
function xi(t) {
|
|
1544
|
+
const o = t.trim(), i = Q[o] ?? Q[o.toLowerCase()];
|
|
1545
1545
|
if (i) return i;
|
|
1546
|
-
if (
|
|
1546
|
+
if (J(o)) return o;
|
|
1547
1547
|
const e = o.replace(/-([a-z])/g, (r, f) => f.toUpperCase());
|
|
1548
|
-
if (
|
|
1548
|
+
if (J(e)) return e;
|
|
1549
1549
|
throw new Error(
|
|
1550
|
-
`Unknown interaction effect "${t}". Use one of ${
|
|
1550
|
+
`Unknown interaction effect "${t}". Use one of ${go.length} presets — see INTERACTION_EFFECTS.`
|
|
1551
1551
|
);
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function pi(t, o = !1) {
|
|
1554
1554
|
return o ? `fibo-fx-on-group-${t}` : `fibo-fx-on-${t}`;
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1557
|
-
return `fibo-fx-${
|
|
1556
|
+
function gi(t) {
|
|
1557
|
+
return `fibo-fx-${hi(t)}`;
|
|
1558
1558
|
}
|
|
1559
|
-
const
|
|
1559
|
+
const di = `
|
|
1560
1560
|
@keyframes fibo-fx-pulse { 25% { transform: scale(1.1); } 75% { transform: scale(0.9); } }
|
|
1561
1561
|
@keyframes fibo-fx-pulse-grow { to { transform: scale(1.1); } }
|
|
1562
1562
|
@keyframes fibo-fx-pulse-shrink { to { transform: scale(0.9); } }
|
|
@@ -1650,7 +1650,8 @@ const xi = `
|
|
|
1650
1650
|
|
|
1651
1651
|
.fibo-fx {
|
|
1652
1652
|
-webkit-tap-highlight-color: transparent;
|
|
1653
|
-
transform
|
|
1653
|
+
/* Do NOT set a resting transform — hover/active replace transform and would jump. */
|
|
1654
|
+
backface-visibility: hidden;
|
|
1654
1655
|
box-shadow: 0 0 1px rgba(0,0,0,0);
|
|
1655
1656
|
}
|
|
1656
1657
|
.fibo-fx[class*="fibo-fx-sweep"],
|
|
@@ -1945,7 +1946,7 @@ const xi = `
|
|
|
1945
1946
|
.group:active .fibo-fx-backward.fibo-fx-on-group-active,
|
|
1946
1947
|
.group:focus-within .fibo-fx-backward.fibo-fx-on-group-focus-within { transform:translateX(-8px); }
|
|
1947
1948
|
|
|
1948
|
-
.fibo-fx-nudge { transition-duration:.
|
|
1949
|
+
.fibo-fx-nudge { transition-duration:.24s;transition-property:transform;transition-timing-function:ease-out; }
|
|
1949
1950
|
.fibo-fx-nudge.fibo-fx-on-hover:hover,
|
|
1950
1951
|
.fibo-fx-nudge.fibo-fx-on-active:active,
|
|
1951
1952
|
.fibo-fx-nudge.fibo-fx-on-focus:focus,
|
|
@@ -1953,7 +1954,7 @@ const xi = `
|
|
|
1953
1954
|
.fibo-fx-nudge.fibo-fx-on-focus-within:focus-within,
|
|
1954
1955
|
.group:hover .fibo-fx-nudge.fibo-fx-on-group-hover,
|
|
1955
1956
|
.group:active .fibo-fx-nudge.fibo-fx-on-group-active,
|
|
1956
|
-
.group:focus-within .fibo-fx-nudge.fibo-fx-on-group-focus-within { transform:
|
|
1957
|
+
.group:focus-within .fibo-fx-nudge.fibo-fx-on-group-focus-within { transform:translate3d(3px,0,0); }
|
|
1957
1958
|
|
|
1958
1959
|
.fibo-fx-fade { transition-duration:.3s;transition-property:background-color,color,opacity; }
|
|
1959
1960
|
.fibo-fx-fade.fibo-fx-on-hover:hover,
|
|
@@ -2846,13 +2847,52 @@ const xi = `
|
|
|
2846
2847
|
}
|
|
2847
2848
|
}
|
|
2848
2849
|
`.trim();
|
|
2849
|
-
let
|
|
2850
|
-
function
|
|
2851
|
-
if (
|
|
2852
|
-
|
|
2850
|
+
let oo = !1;
|
|
2851
|
+
function mi() {
|
|
2852
|
+
if (oo) return;
|
|
2853
|
+
oo = !0;
|
|
2853
2854
|
const t = C.getInstance();
|
|
2854
|
-
t.ensureDefaults(), t.injectExtra(
|
|
2855
|
+
t.ensureDefaults(), t.injectExtra(di, "fibo-interaction-fx");
|
|
2856
|
+
}
|
|
2857
|
+
function P(t) {
|
|
2858
|
+
const o = { ...t };
|
|
2859
|
+
let i = !1;
|
|
2860
|
+
const e = o.background;
|
|
2861
|
+
typeof e == "string" && e.trim() && o.backgroundColor == null && wi(e) && (o.backgroundColor = e, delete o.background, i = !0);
|
|
2862
|
+
const r = o.border;
|
|
2863
|
+
if (typeof r == "string" && r.trim()) {
|
|
2864
|
+
const f = yi(r);
|
|
2865
|
+
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
|
+
}
|
|
2867
|
+
return i ? o : t;
|
|
2868
|
+
}
|
|
2869
|
+
const vi = "translate3d(0, 0, 0)";
|
|
2870
|
+
function io(t) {
|
|
2871
|
+
return t.transform != null && String(t.transform).trim() !== "" ? t : { ...t, transform: vi };
|
|
2872
|
+
}
|
|
2873
|
+
function to(t, o) {
|
|
2874
|
+
const i = typeof o == "number" ? `${o}px` : o;
|
|
2875
|
+
return t === "x" ? `translate3d(${i}, 0, 0)` : `translate3d(0, ${i}, 0)`;
|
|
2855
2876
|
}
|
|
2877
|
+
function wi(t) {
|
|
2878
|
+
const o = t.trim().toLowerCase();
|
|
2879
|
+
return !(!o || o.includes("gradient(") || o.includes("url(") || o.includes("image(") || o.includes("element(") || o.startsWith("repeat") || o.includes(" / "));
|
|
2880
|
+
}
|
|
2881
|
+
function yi(t) {
|
|
2882
|
+
const o = t.trim();
|
|
2883
|
+
if (!o) return null;
|
|
2884
|
+
const i = o.match(/^(\S+)\s+(\S+)\s+(.+)$/);
|
|
2885
|
+
return i ? { width: i[1], style: i[2], color: i[3] } : null;
|
|
2886
|
+
}
|
|
2887
|
+
const ki = {
|
|
2888
|
+
"background-color": ["background-color"],
|
|
2889
|
+
"border-color": ["border-color"],
|
|
2890
|
+
color: ["color"],
|
|
2891
|
+
opacity: ["opacity"],
|
|
2892
|
+
transform: ["transform"],
|
|
2893
|
+
"box-shadow": ["box-shadow"],
|
|
2894
|
+
"border-radius": ["border-radius"]
|
|
2895
|
+
};
|
|
2856
2896
|
class v {
|
|
2857
2897
|
constructor(o, i, e = !1) {
|
|
2858
2898
|
a(this, "pseudoState");
|
|
@@ -2871,10 +2911,10 @@ class v {
|
|
|
2871
2911
|
* Stamps CSS classes; sheet is fiboui-owned (not a Hover.css vendor).
|
|
2872
2912
|
*/
|
|
2873
2913
|
effect(o) {
|
|
2874
|
-
const i =
|
|
2875
|
-
return
|
|
2876
|
-
|
|
2877
|
-
), this.parentBuilder.
|
|
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)
|
|
2917
|
+
), this.parentBuilder.prepareSmoothInteraction([
|
|
2878
2918
|
"transform",
|
|
2879
2919
|
"opacity",
|
|
2880
2920
|
"box-shadow",
|
|
@@ -2906,12 +2946,10 @@ class v {
|
|
|
2906
2946
|
return this.transforms.set("scale", `scale(${o})`), this.flushTransform();
|
|
2907
2947
|
}
|
|
2908
2948
|
translateX(o) {
|
|
2909
|
-
|
|
2910
|
-
return this.transforms.set("translateX", `translateX(${i})`), this.flushTransform();
|
|
2949
|
+
return this.transforms.set("translateX", to("x", o)), this.flushTransform();
|
|
2911
2950
|
}
|
|
2912
2951
|
translateY(o) {
|
|
2913
|
-
|
|
2914
|
-
return this.transforms.set("translateY", `translateY(${i})`), this.flushTransform();
|
|
2952
|
+
return this.transforms.set("translateY", to("y", o)), this.flushTransform();
|
|
2915
2953
|
}
|
|
2916
2954
|
rotate(o) {
|
|
2917
2955
|
return this.transforms.set("rotate", `rotate(${o}deg)`), this.flushTransform();
|
|
@@ -2925,14 +2963,14 @@ class v {
|
|
|
2925
2963
|
transition(o, i, e, r) {
|
|
2926
2964
|
if (typeof o == "string" && i === void 0)
|
|
2927
2965
|
return this.set("transition", o);
|
|
2928
|
-
const f = Array.isArray(o) ? o.join(", ") : o, n = `${i || this.transitionDuration}ms`, s =
|
|
2966
|
+
const f = Array.isArray(o) ? o.join(", ") : o, n = `${i || this.transitionDuration}ms`, s = S(e || this.transitionEasing), c = r ? `${r}ms` : "0ms";
|
|
2929
2967
|
return this.set("transition", `${f} ${n} ${s} ${c}`);
|
|
2930
2968
|
}
|
|
2931
2969
|
duration(o) {
|
|
2932
2970
|
return this.transitionDuration = o, this.applyTransition(), this;
|
|
2933
2971
|
}
|
|
2934
2972
|
easing(o) {
|
|
2935
|
-
return this.transitionEasing =
|
|
2973
|
+
return this.transitionEasing = S(o), this.applyTransition(), this;
|
|
2936
2974
|
}
|
|
2937
2975
|
ease(o) {
|
|
2938
2976
|
return this.easing(o);
|
|
@@ -2951,14 +2989,16 @@ class v {
|
|
|
2951
2989
|
return this.set("transform", [...this.transforms.values()].join(" "));
|
|
2952
2990
|
}
|
|
2953
2991
|
set(o, i) {
|
|
2954
|
-
const e =
|
|
2955
|
-
|
|
2992
|
+
const e = ki[o];
|
|
2993
|
+
e && this.parentBuilder.prepareSmoothInteraction(e);
|
|
2994
|
+
const r = u.registerPseudo(this.pseudoState, o, i, this.isGroup);
|
|
2995
|
+
return this.parentBuilder.addClassName(r), this;
|
|
2956
2996
|
}
|
|
2957
2997
|
end() {
|
|
2958
2998
|
return this.parentBuilder;
|
|
2959
2999
|
}
|
|
2960
3000
|
}
|
|
2961
|
-
function
|
|
3001
|
+
function Gi(t, o) {
|
|
2962
3002
|
if (typeof document > "u") return;
|
|
2963
3003
|
const i = typeof t == "string" ? t : null, e = (i == null ? void 0 : i.replace(/^#/, "")) ?? null;
|
|
2964
3004
|
o != null && o.hash && e && typeof window < "u" && (window.location.hash = e);
|
|
@@ -2968,7 +3008,7 @@ function Ai(t, o) {
|
|
|
2968
3008
|
block: (o == null ? void 0 : o.block) ?? "start"
|
|
2969
3009
|
});
|
|
2970
3010
|
}
|
|
2971
|
-
function
|
|
3011
|
+
function Ki(t) {
|
|
2972
3012
|
const o = typeof document < "u" ? document : void 0, i = o == null ? void 0 : o.startViewTransition;
|
|
2973
3013
|
if (typeof i == "function") {
|
|
2974
3014
|
i.call(o, t);
|
|
@@ -2976,13 +3016,13 @@ function ji(t) {
|
|
|
2976
3016
|
}
|
|
2977
3017
|
t();
|
|
2978
3018
|
}
|
|
2979
|
-
function
|
|
3019
|
+
function _i() {
|
|
2980
3020
|
return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
|
|
2981
3021
|
}
|
|
2982
|
-
function
|
|
3022
|
+
function zi() {
|
|
2983
3023
|
return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
|
|
2984
3024
|
}
|
|
2985
|
-
function
|
|
3025
|
+
function Si({
|
|
2986
3026
|
preset: t = "fadeUp",
|
|
2987
3027
|
once: o = !0,
|
|
2988
3028
|
rootMargin: i = "0px 0px -8% 0px",
|
|
@@ -2996,7 +3036,7 @@ function mi({
|
|
|
2996
3036
|
w();
|
|
2997
3037
|
const h = s.current;
|
|
2998
3038
|
if (!h) return;
|
|
2999
|
-
if (f &&
|
|
3039
|
+
if (f && _i()) {
|
|
3000
3040
|
h.classList.add("fibo-inview");
|
|
3001
3041
|
return;
|
|
3002
3042
|
}
|
|
@@ -3022,10 +3062,10 @@ function mi({
|
|
|
3022
3062
|
].filter(Boolean).join(" ");
|
|
3023
3063
|
return g.createElement("div", { ref: s, className: c, "data-fibo-reveal": t }, n);
|
|
3024
3064
|
}
|
|
3025
|
-
function
|
|
3065
|
+
function $i({ children: t }) {
|
|
3026
3066
|
const o = _(null);
|
|
3027
3067
|
return M(() => {
|
|
3028
|
-
if (w(),
|
|
3068
|
+
if (w(), zi()) return;
|
|
3029
3069
|
const i = () => {
|
|
3030
3070
|
var f, n;
|
|
3031
3071
|
return ((f = o.current) == null ? void 0 : f.querySelector(".fibo-scroll-progress")) ?? ((n = o.current) == null ? void 0 : n.firstElementChild);
|
|
@@ -3044,8 +3084,8 @@ function vi({ children: t }) {
|
|
|
3044
3084
|
t
|
|
3045
3085
|
);
|
|
3046
3086
|
}
|
|
3047
|
-
const
|
|
3048
|
-
class
|
|
3087
|
+
const mo = 64, Ci = `${mo}px`;
|
|
3088
|
+
class Zi {
|
|
3049
3089
|
constructor() {
|
|
3050
3090
|
/** @internal Extra DOM props forwarded to the host element. */
|
|
3051
3091
|
a(this, "_props", {});
|
|
@@ -3068,6 +3108,12 @@ class Vi {
|
|
|
3068
3108
|
/** True while transition class was auto-managed for hover/effect presets (expandable). */
|
|
3069
3109
|
a(this, "_autoEffectTransition", !1);
|
|
3070
3110
|
a(this, "_effectTransitionProps", []);
|
|
3111
|
+
/**
|
|
3112
|
+
* When true, getStyle() promotes background/border shorthands to longhands and
|
|
3113
|
+
* (optionally) stamps a resting translate3d so pseudo transforms ease cleanly.
|
|
3114
|
+
*/
|
|
3115
|
+
a(this, "_smoothSurface", !1);
|
|
3116
|
+
a(this, "_smoothNeedsRestTransform", !1);
|
|
3071
3117
|
a(this, "_motionClass");
|
|
3072
3118
|
a(this, "_staggerMs");
|
|
3073
3119
|
a(this, "_reveal");
|
|
@@ -3305,8 +3351,8 @@ class Vi {
|
|
|
3305
3351
|
}, e = (f) => f.startsWith("#") || f.startsWith("rgb") || f.startsWith("hsl") || ["red", "blue", "green", "yellow", "purple", "pink", "orange", "white", "black", "gray"].some((n) => f.includes(n)), r = (f, n, s, c) => {
|
|
3306
3352
|
let l = s || "rgba(0, 0, 0, " + (c ?? 0.1) + ")";
|
|
3307
3353
|
if (s && s.startsWith("#") && c !== void 0) {
|
|
3308
|
-
const m = parseInt(s.slice(1, 3), 16), d = parseInt(s.slice(3, 5), 16),
|
|
3309
|
-
l = `rgba(${m}, ${d}, ${
|
|
3354
|
+
const m = parseInt(s.slice(1, 3), 16), d = parseInt(s.slice(3, 5), 16), y = parseInt(s.slice(5, 7), 16);
|
|
3355
|
+
l = `rgba(${m}, ${d}, ${y}, ${c})`;
|
|
3310
3356
|
}
|
|
3311
3357
|
const p = {
|
|
3312
3358
|
sm: "2px",
|
|
@@ -3378,7 +3424,7 @@ class Vi {
|
|
|
3378
3424
|
* @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
|
|
3379
3425
|
*/
|
|
3380
3426
|
media(o, i) {
|
|
3381
|
-
return this.registerMediaStyles(
|
|
3427
|
+
return this.registerMediaStyles(ii(o), i), this;
|
|
3382
3428
|
}
|
|
3383
3429
|
registerMediaStyles(o, i) {
|
|
3384
3430
|
if (!i) return;
|
|
@@ -3591,16 +3637,16 @@ class Vi {
|
|
|
3591
3637
|
return this._signals.add(o), this;
|
|
3592
3638
|
}
|
|
3593
3639
|
translateX(o) {
|
|
3594
|
-
return o instanceof
|
|
3640
|
+
return o instanceof I ? this._animatedProps.set("translateX", o) : this._transforms.push(`translateX(${o}px)`), this;
|
|
3595
3641
|
}
|
|
3596
3642
|
translateY(o) {
|
|
3597
|
-
return o instanceof
|
|
3643
|
+
return o instanceof I ? this._animatedProps.set("translateY", o) : this._transforms.push(`translateY(${o}px)`), this;
|
|
3598
3644
|
}
|
|
3599
3645
|
scale(o) {
|
|
3600
|
-
return o instanceof
|
|
3646
|
+
return o instanceof I ? this._animatedProps.set("scale", o) : this._transforms.push(`scale(${o})`), this;
|
|
3601
3647
|
}
|
|
3602
3648
|
rotate(o) {
|
|
3603
|
-
return o instanceof
|
|
3649
|
+
return o instanceof I ? this._animatedProps.set("rotate", o) : this._transforms.push(`rotate(${o}deg)`), this;
|
|
3604
3650
|
}
|
|
3605
3651
|
gesture(o) {
|
|
3606
3652
|
return this._gesture = o, this;
|
|
@@ -3629,7 +3675,7 @@ class Vi {
|
|
|
3629
3675
|
transition(o, i, e, r) {
|
|
3630
3676
|
if (this._autoEffectTransition = !1, this._effectTransitionProps = [], typeof o == "string" && i === void 0)
|
|
3631
3677
|
return this.replaceTransitionClass(u.register("transition", o)), this;
|
|
3632
|
-
const f = Array.isArray(o) ? o.join(", ") : o, n = `${i || this._transitionDuration}ms`, s =
|
|
3678
|
+
const f = Array.isArray(o) ? o.join(", ") : o, n = `${i || this._transitionDuration}ms`, s = S(e || this._transitionEasing), c = r ? `${r}ms` : "0ms";
|
|
3633
3679
|
return this.replaceTransitionClass(u.register("transition", `${f} ${n} ${s} ${c}`)), this;
|
|
3634
3680
|
}
|
|
3635
3681
|
/**
|
|
@@ -3644,7 +3690,7 @@ class Vi {
|
|
|
3644
3690
|
* Example: .easing('ease-in-out')
|
|
3645
3691
|
*/
|
|
3646
3692
|
easing(o) {
|
|
3647
|
-
return this._transitionEasing =
|
|
3693
|
+
return this._transitionEasing = S(o), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
|
|
3648
3694
|
}
|
|
3649
3695
|
/** Alias of `.easing()`. `'spring'` becomes CSS `linear()`. */
|
|
3650
3696
|
ease(o) {
|
|
@@ -3677,7 +3723,7 @@ class Vi {
|
|
|
3677
3723
|
}
|
|
3678
3724
|
animate(o, i) {
|
|
3679
3725
|
w(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((b) => b !== this._motionClass));
|
|
3680
|
-
const e =
|
|
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;
|
|
3681
3727
|
let n = e ? o.ease : i == null ? void 0 : i.ease;
|
|
3682
3728
|
const s = {
|
|
3683
3729
|
stiffness: (e ? o.stiffness : i == null ? void 0 : i.stiffness) ?? void 0,
|
|
@@ -3685,20 +3731,20 @@ class Vi {
|
|
|
3685
3731
|
mass: (e ? o.mass : i == null ? void 0 : i.mass) ?? void 0
|
|
3686
3732
|
};
|
|
3687
3733
|
if (e) {
|
|
3688
|
-
const b =
|
|
3734
|
+
const b = Z(o.from), l = Z(o.to), x = u.registerKeyframes(qo(`${b}=>${l}`), b, l);
|
|
3689
3735
|
this._motionClass = `fibo-anim ${x}`, this._props["data-fibo-anim"] = "custom";
|
|
3690
3736
|
} else {
|
|
3691
|
-
const b =
|
|
3737
|
+
const b = Qo(o);
|
|
3692
3738
|
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");
|
|
3693
3739
|
}
|
|
3694
|
-
const c =
|
|
3740
|
+
const c = S(n ?? "ease", s);
|
|
3695
3741
|
this._classNames.push(this._motionClass);
|
|
3696
3742
|
const h = this._style;
|
|
3697
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;
|
|
3698
3744
|
}
|
|
3699
3745
|
/** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
|
|
3700
3746
|
spring(o) {
|
|
3701
|
-
const i =
|
|
3747
|
+
const i = uo(o);
|
|
3702
3748
|
return this._transitionEasing = i, this._motionClass ? (this._style["--fibo-ease"] = i, this) : (this._applyTransition(), this);
|
|
3703
3749
|
}
|
|
3704
3750
|
reducedMotion(o = "reduce") {
|
|
@@ -3786,7 +3832,7 @@ class Vi {
|
|
|
3786
3832
|
this._classNames.push(u.register("position", "sticky"));
|
|
3787
3833
|
const i = o === !0 ? "0px" : typeof o == "number" ? `${o}px` : o;
|
|
3788
3834
|
this._classNames.push(u.register("top", i));
|
|
3789
|
-
const e = o === !0 || o === 0 ?
|
|
3835
|
+
const e = o === !0 || o === 0 ? Ci : typeof o == "number" ? `${Math.max(o, mo)}px` : o;
|
|
3790
3836
|
return this.publishStickyOffset(e), this;
|
|
3791
3837
|
}
|
|
3792
3838
|
/**
|
|
@@ -3807,7 +3853,7 @@ class Vi {
|
|
|
3807
3853
|
}), this;
|
|
3808
3854
|
}
|
|
3809
3855
|
ensureInteractiveTransition() {
|
|
3810
|
-
this.ensureEffectTransition([
|
|
3856
|
+
this._smoothSurface = !0, this.promoteSurfaceLonghands(), this.ensureEffectTransition([
|
|
3811
3857
|
"transform",
|
|
3812
3858
|
"opacity",
|
|
3813
3859
|
"box-shadow",
|
|
@@ -3815,6 +3861,23 @@ class Vi {
|
|
|
3815
3861
|
"border-color"
|
|
3816
3862
|
]);
|
|
3817
3863
|
}
|
|
3864
|
+
/**
|
|
3865
|
+
* Prepare resting styles + transition so pseudo-state longhands (bg/border/transform)
|
|
3866
|
+
* interpolate instead of snapping. Safe to call repeatedly from PseudoStateBuilder.
|
|
3867
|
+
* @internal
|
|
3868
|
+
*/
|
|
3869
|
+
prepareSmoothInteraction(o) {
|
|
3870
|
+
this._smoothSurface = !0, o.some((i) => i === "transform") && (this._smoothNeedsRestTransform = !0), this.promoteSurfaceLonghands(), this._smoothNeedsRestTransform && this.ensureRestTransform(), this.ensureEffectTransition(o);
|
|
3871
|
+
}
|
|
3872
|
+
/** @internal Convert inline background/border shorthands → longhands. */
|
|
3873
|
+
promoteSurfaceLonghands() {
|
|
3874
|
+
this._style = P(this._style), this._cssStyles = P(this._cssStyles);
|
|
3875
|
+
}
|
|
3876
|
+
/** @internal Stamp translate3d(0,0,0) when no resting transform exists. */
|
|
3877
|
+
ensureRestTransform() {
|
|
3878
|
+
const o = io(this._style);
|
|
3879
|
+
o !== this._style && (this._style = o);
|
|
3880
|
+
}
|
|
3818
3881
|
/**
|
|
3819
3882
|
* Ensure the base element transitions the properties an interaction effect needs.
|
|
3820
3883
|
* Expands an auto-managed transition; no-ops if the caller set `.transition(...)`
|
|
@@ -3824,11 +3887,13 @@ class Vi {
|
|
|
3824
3887
|
ensureEffectTransition(o) {
|
|
3825
3888
|
if (this._motionClass || this._transitionClass && !this._autoEffectTransition) return;
|
|
3826
3889
|
const i = new Set(this._effectTransitionProps);
|
|
3827
|
-
for (const
|
|
3828
|
-
i.add("transform"), i.add("opacity"), this._effectTransitionProps = [...i], this._autoEffectTransition = !0
|
|
3890
|
+
for (const f of o) i.add(f);
|
|
3891
|
+
i.add("transform"), i.add("opacity"), this._effectTransitionProps = [...i], this._autoEffectTransition = !0;
|
|
3892
|
+
const e = this._transitionEasing === "ease-in-out" ? "ease-out" : this._transitionEasing, r = this._transitionDuration === 200 ? 240 : this._transitionDuration;
|
|
3893
|
+
this.replaceTransitionClass(
|
|
3829
3894
|
u.register(
|
|
3830
3895
|
"transition",
|
|
3831
|
-
`${this._effectTransitionProps.join(", ")} ${
|
|
3896
|
+
`${this._effectTransitionProps.join(", ")} ${r}ms ${e}`
|
|
3832
3897
|
)
|
|
3833
3898
|
);
|
|
3834
3899
|
}
|
|
@@ -3838,8 +3903,8 @@ class Vi {
|
|
|
3838
3903
|
* SSR-safe: class + inline vars on first paint (no useEffect).
|
|
3839
3904
|
*/
|
|
3840
3905
|
theme(o) {
|
|
3841
|
-
const i =
|
|
3842
|
-
return this._theme = i, this.addClassName(
|
|
3906
|
+
const i = Co(o);
|
|
3907
|
+
return this._theme = i, this.addClassName(No(i)), this;
|
|
3843
3908
|
}
|
|
3844
3909
|
/** Prefer dark/light system chrome for native controls under this subtree. */
|
|
3845
3910
|
colorScheme(o) {
|
|
@@ -3898,16 +3963,16 @@ class Vi {
|
|
|
3898
3963
|
return this._classNames.push("group"), this;
|
|
3899
3964
|
}
|
|
3900
3965
|
children(o) {
|
|
3901
|
-
return typeof o == "function" ? (this._childFunction = o, this._children = []) : (this._children =
|
|
3966
|
+
return typeof o == "function" ? (this._childFunction = o, this._children = []) : (this._children = U(o), this._childFunction = void 0), this;
|
|
3902
3967
|
}
|
|
3903
3968
|
getClassName() {
|
|
3904
3969
|
let o;
|
|
3905
|
-
return Object.keys(this._cssStyles).length > 0 && (o =
|
|
3970
|
+
return Object.keys(this._cssStyles).length > 0 && (o = bi(this._cssStyles) || void 0), ti(this._classNames, o);
|
|
3906
3971
|
}
|
|
3907
3972
|
getStyle() {
|
|
3908
3973
|
let o = { ...this._style, ...this._cssStyles };
|
|
3909
|
-
if (this._theme && (o = {
|
|
3910
|
-
...
|
|
3974
|
+
if (this._smoothSurface && (o = P(o), this._smoothNeedsRestTransform && (o = io(o))), this._theme && (o = {
|
|
3975
|
+
...To(this._theme),
|
|
3911
3976
|
...o,
|
|
3912
3977
|
backgroundColor: o.backgroundColor ?? this._theme.colors.background,
|
|
3913
3978
|
color: o.color ?? this._theme.colors.onBackground,
|
|
@@ -3917,18 +3982,18 @@ class Vi {
|
|
|
3917
3982
|
o.transform = i ? `${i} ${this._transforms.join(" ")}` : this._transforms.join(" ");
|
|
3918
3983
|
}
|
|
3919
3984
|
if (this._animationConfig && this._animatedProps.size === 0) {
|
|
3920
|
-
const { duration: i = 300, curve: e = "easeOut", stiffness: r, damping: f } = this._animationConfig, n =
|
|
3985
|
+
const { duration: i = 300, curve: e = "easeOut", stiffness: r, damping: f } = this._animationConfig, n = S(e, { stiffness: r, damping: f });
|
|
3921
3986
|
o.transition = `all ${i}ms ${n}`;
|
|
3922
3987
|
}
|
|
3923
3988
|
return o;
|
|
3924
3989
|
}
|
|
3925
3990
|
processChildren() {
|
|
3926
|
-
const o = this._childFunction ?
|
|
3991
|
+
const o = this._childFunction ? U(this._childFunction) : this._children;
|
|
3927
3992
|
return this._staggerMs == null ? o : o.map(
|
|
3928
3993
|
(i, e) => g.createElement(
|
|
3929
3994
|
"span",
|
|
3930
3995
|
{
|
|
3931
|
-
key: g.isValidElement(i) &&
|
|
3996
|
+
key: g.isValidElement(i) && W(i.key) ? i.key : `fibo-stagger-${e}`,
|
|
3932
3997
|
className: "fibo-stagger-item",
|
|
3933
3998
|
style: { "--fibo-i": String(e) }
|
|
3934
3999
|
},
|
|
@@ -3940,7 +4005,7 @@ class Vi {
|
|
|
3940
4005
|
return this._childFunction;
|
|
3941
4006
|
}
|
|
3942
4007
|
}
|
|
3943
|
-
const
|
|
4008
|
+
const Ni = /* @__PURE__ */ new Set([
|
|
3944
4009
|
"$$typeof",
|
|
3945
4010
|
"type",
|
|
3946
4011
|
"props",
|
|
@@ -3953,25 +4018,25 @@ const ki = /* @__PURE__ */ new Set([
|
|
|
3953
4018
|
"_debugTask",
|
|
3954
4019
|
"_debugInfo"
|
|
3955
4020
|
]);
|
|
3956
|
-
function
|
|
4021
|
+
function Ti(t) {
|
|
3957
4022
|
var i;
|
|
3958
4023
|
const o = (i = t._props) == null ? void 0 : i.key;
|
|
3959
4024
|
if (!(o == null || o === ""))
|
|
3960
4025
|
return o;
|
|
3961
4026
|
}
|
|
3962
|
-
function
|
|
3963
|
-
const o = t._isObserver, i = t._signals, e = t._observers, r = t._state, f = t._providers, n =
|
|
4027
|
+
function Ei(t) {
|
|
4028
|
+
const o = t._isObserver, i = t._signals, e = t._observers, r = t._state, f = t._providers, n = Ti(t), s = () => {
|
|
3964
4029
|
var z;
|
|
3965
4030
|
let x = t.build();
|
|
3966
4031
|
const p = t._animatedProps, m = t._animationConfig;
|
|
3967
|
-
p && p.size > 0 && (x = g.createElement(
|
|
4032
|
+
p && p.size > 0 && (x = g.createElement(li, {
|
|
3968
4033
|
key: n,
|
|
3969
4034
|
animatedProps: p,
|
|
3970
4035
|
animationConfig: m,
|
|
3971
4036
|
children: x
|
|
3972
4037
|
}));
|
|
3973
4038
|
const d = t._reveal;
|
|
3974
|
-
d && (x = g.createElement(
|
|
4039
|
+
d && (x = g.createElement(Si, {
|
|
3975
4040
|
key: n,
|
|
3976
4041
|
preset: d.preset,
|
|
3977
4042
|
once: d.once,
|
|
@@ -3980,38 +4045,38 @@ function _i(t) {
|
|
|
3980
4045
|
forceMotion: t._reducedMotion === "never",
|
|
3981
4046
|
preferTimeline: (z = t._classNames) == null ? void 0 : z.includes("fibo-view-timeline"),
|
|
3982
4047
|
children: x
|
|
3983
|
-
})), t._scrollProgress && (x = g.createElement(
|
|
4048
|
+
})), t._scrollProgress && (x = g.createElement($i, { key: n, children: x })), t._usesCssMotion && (x = g.createElement(
|
|
3984
4049
|
g.Fragment,
|
|
3985
4050
|
{ key: n },
|
|
3986
|
-
g.createElement(
|
|
4051
|
+
g.createElement(Jo),
|
|
3987
4052
|
x
|
|
3988
4053
|
));
|
|
3989
|
-
const
|
|
3990
|
-
return
|
|
3991
|
-
}, c = typeof t.hasStateManagement == "function" ? t.hasStateManagement() : !!(o || i && i.size || e && e.size || r && r.size || f && f.size), h = o ? g.createElement(
|
|
4054
|
+
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, {
|
|
3992
4057
|
key: n,
|
|
3993
4058
|
children: s
|
|
3994
4059
|
}) : null, b = () => h ?? s();
|
|
3995
4060
|
let l = b();
|
|
3996
|
-
return c && i && i.size > 0 ? l = g.createElement(
|
|
4061
|
+
return c && i && i.size > 0 ? l = g.createElement(jo, {
|
|
3997
4062
|
key: n,
|
|
3998
4063
|
signals: i,
|
|
3999
4064
|
children: b
|
|
4000
|
-
}) : c && e && e.size > 0 && (l = g.createElement(
|
|
4065
|
+
}) : c && e && e.size > 0 && (l = g.createElement(Ao, {
|
|
4001
4066
|
key: n,
|
|
4002
4067
|
observables: e,
|
|
4003
4068
|
children: b
|
|
4004
|
-
})), c && r && r.size > 0 && (l = g.createElement(
|
|
4069
|
+
})), c && r && r.size > 0 && (l = g.createElement(Po, {
|
|
4005
4070
|
key: n,
|
|
4006
4071
|
stateMap: r,
|
|
4007
4072
|
children: l
|
|
4008
|
-
})), c && f && f.size > 0 && (l = g.createElement(
|
|
4073
|
+
})), c && f && f.size > 0 && (l = g.createElement(Do, {
|
|
4009
4074
|
key: n,
|
|
4010
4075
|
providers: f,
|
|
4011
4076
|
children: l
|
|
4012
4077
|
})), l;
|
|
4013
4078
|
}
|
|
4014
|
-
function
|
|
4079
|
+
function vo(t, o, i) {
|
|
4015
4080
|
const e = function() {
|
|
4016
4081
|
return o();
|
|
4017
4082
|
};
|
|
@@ -4028,10 +4093,10 @@ function po(t, o, i) {
|
|
|
4028
4093
|
writable: !0
|
|
4029
4094
|
}), t.ref = r.ref ?? null, t.__fiboElementProps = r.props ?? {}, r._owner !== void 0 && (t._owner = r._owner), t._store = { validated: 1 };
|
|
4030
4095
|
}
|
|
4031
|
-
function
|
|
4096
|
+
function qi(t) {
|
|
4032
4097
|
return (...o) => {
|
|
4033
|
-
const i = new t(...o), e = t.name.replace(/Builder$/, "") || "Fibo", r = () =>
|
|
4034
|
-
return
|
|
4098
|
+
const i = new t(...o), e = t.name.replace(/Builder$/, "") || "Fibo", r = () => Ei(i);
|
|
4099
|
+
return vo(i, r, e), new Proxy(i, {
|
|
4035
4100
|
get(f, n, s) {
|
|
4036
4101
|
var c, h;
|
|
4037
4102
|
if (n === "build")
|
|
@@ -4053,7 +4118,7 @@ function Di(t) {
|
|
|
4053
4118
|
}, x = Object.getPrototypeOf(f).props;
|
|
4054
4119
|
return typeof x == "function" ? Object.assign((m) => (x.call(f, m), s), l) : l;
|
|
4055
4120
|
}
|
|
4056
|
-
return
|
|
4121
|
+
return Ni.has(n) || Reflect.has(f, n) ? Reflect.get(f, n, s) : (b) => {
|
|
4057
4122
|
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);
|
|
4058
4123
|
return f.className(d), s;
|
|
4059
4124
|
};
|
|
@@ -4061,7 +4126,7 @@ function Di(t) {
|
|
|
4061
4126
|
});
|
|
4062
4127
|
};
|
|
4063
4128
|
}
|
|
4064
|
-
const
|
|
4129
|
+
const Ri = ({
|
|
4065
4130
|
signal: t,
|
|
4066
4131
|
builder: o,
|
|
4067
4132
|
loading: i,
|
|
@@ -4073,13 +4138,13 @@ const zi = ({
|
|
|
4073
4138
|
() => t.value
|
|
4074
4139
|
), f = r == null ? void 0 : r.error;
|
|
4075
4140
|
return f && e ? e(f) : ((r == null ? void 0 : r.isLoading) || (r == null ? void 0 : r.loading)) === !0 && i ? i() : o ? o(r) : null;
|
|
4076
|
-
},
|
|
4077
|
-
class
|
|
4141
|
+
}, Ii = g.memo(Ri);
|
|
4142
|
+
class Fi {
|
|
4078
4143
|
constructor(o) {
|
|
4079
4144
|
a(this, "_loading");
|
|
4080
4145
|
a(this, "_error");
|
|
4081
4146
|
a(this, "_builder");
|
|
4082
|
-
this._signal = o,
|
|
4147
|
+
this._signal = o, vo(this, () => this.build(), "ValueBuilder");
|
|
4083
4148
|
}
|
|
4084
4149
|
loading(o) {
|
|
4085
4150
|
return this._loading = typeof o == "function" ? o : () => o, this;
|
|
@@ -4094,7 +4159,7 @@ class Si {
|
|
|
4094
4159
|
return this._builder = o, this;
|
|
4095
4160
|
}
|
|
4096
4161
|
build() {
|
|
4097
|
-
return g.createElement(
|
|
4162
|
+
return g.createElement(Ii, {
|
|
4098
4163
|
signal: this._signal,
|
|
4099
4164
|
builder: this._builder,
|
|
4100
4165
|
loading: this._loading,
|
|
@@ -4102,59 +4167,59 @@ class Si {
|
|
|
4102
4167
|
});
|
|
4103
4168
|
}
|
|
4104
4169
|
}
|
|
4105
|
-
function
|
|
4106
|
-
return new
|
|
4170
|
+
function Qi(t) {
|
|
4171
|
+
return new Fi(t);
|
|
4107
4172
|
}
|
|
4108
4173
|
export {
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4174
|
+
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,
|
|
4116
4181
|
w as H,
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4182
|
+
go as I,
|
|
4183
|
+
Qo as J,
|
|
4184
|
+
Po as K,
|
|
4185
|
+
Vo as L,
|
|
4186
|
+
K as M,
|
|
4187
|
+
Wo as N,
|
|
4188
|
+
Xo as O,
|
|
4189
|
+
Do as P,
|
|
4190
|
+
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,
|
|
4201
|
+
Oi as c,
|
|
4202
|
+
Lo as d,
|
|
4203
|
+
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,
|
|
4217
|
+
Li as s,
|
|
4218
|
+
hi as t,
|
|
4219
|
+
Di as u,
|
|
4220
|
+
mi as v,
|
|
4221
|
+
Jo as w,
|
|
4222
|
+
Ui as x,
|
|
4223
|
+
Wi as y,
|
|
4224
|
+
lo as z
|
|
4160
4225
|
};
|