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