fiboui 2.8.4 → 2.9.0
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 +89 -0
- package/dist/{client-DOrZXJAN.js → client-3NdKI2xE.js} +9527 -6843
- package/dist/content.d.ts +1535 -1
- package/dist/content.js +3 -3
- package/dist/core.d.ts +1897 -2
- package/dist/core.js +52 -46
- package/dist/{icons-DujcjAOD.js → icons-DS8J4SFk.js} +83 -75
- package/dist/{index-rNMzRy8Y.js → index-B6F3yf3H.js} +8 -8
- package/dist/{index-C0qI47Zw.js → index-BLEG6Nql.js} +5 -5
- package/dist/{index-uks8jtfK.js → index-BaTO66yA.js} +561 -492
- package/dist/index-FuD1J3Qo.js +785 -0
- package/dist/{index-19mPjg_D.js → index-I-MXiId0.js} +10 -10
- package/dist/index.d.ts +2218 -117983
- package/dist/index.js +1155 -1070
- package/dist/interactive.d.ts +1702 -2
- package/dist/interactive.js +15 -15
- package/dist/layout.d.ts +1680 -1
- package/dist/layout.js +20 -16
- package/dist/{metadata-9Bpw89m2.js → metadata-B2MRlDTz.js} +19 -19
- package/dist/navigation.d.ts +88 -1
- package/dist/navigation.js +6 -6
- package/dist/page-xwU8SnoZ.js +263 -0
- package/dist/server.d.ts +1729 -2
- package/dist/server.js +3795 -2401
- package/dist/structure.d.ts +1697 -1
- package/dist/structure.js +8 -8
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +149 -2
- package/dist/theme.js +3 -3
- package/package.json +5 -3
- package/dist/index-CYMoWJMX.js +0 -839
- package/dist/page-BOQJIKa5.js +0 -184
package/dist/page-BOQJIKa5.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { K, S as q, b3 as V, b4 as I, Y as T, b5 as W, b6 as Y, b7 as P } from "./client-DOrZXJAN.js";
|
|
2
|
-
import y, { useSyncExternalStore as j } from "react";
|
|
3
|
-
const R = {
|
|
4
|
-
linear: (t) => t,
|
|
5
|
-
easeIn: (t) => t * t,
|
|
6
|
-
easeOut: (t) => t * (2 - t),
|
|
7
|
-
easeInOut: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t
|
|
8
|
-
};
|
|
9
|
-
function G(t, e, w) {
|
|
10
|
-
return t + (e - t) * w;
|
|
11
|
-
}
|
|
12
|
-
const m = /* @__PURE__ */ new WeakMap();
|
|
13
|
-
function H() {
|
|
14
|
-
return typeof requestAnimationFrame == "function";
|
|
15
|
-
}
|
|
16
|
-
function J() {
|
|
17
|
-
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
18
|
-
}
|
|
19
|
-
function Q(t) {
|
|
20
|
-
const e = m.get(t);
|
|
21
|
-
e != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(e), m.delete(t);
|
|
22
|
-
}
|
|
23
|
-
q.prototype.spring = function(t, e = {}) {
|
|
24
|
-
this.animate(t, { ...e, curve: "spring", damping: e.damping ?? 26, stiffness: e.stiffness ?? 170 });
|
|
25
|
-
};
|
|
26
|
-
q.prototype.animate = function(t, e = {}) {
|
|
27
|
-
var l, F;
|
|
28
|
-
const w = this.value, i = t;
|
|
29
|
-
if (Q(this), !H() || J()) {
|
|
30
|
-
this.value = i, (l = e.onComplete) == null || l.call(e);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (e.curve === "spring") {
|
|
34
|
-
const h = typeof e.stiffness == "number" && Number.isFinite(e.stiffness) && e.stiffness > 0 ? e.stiffness : 170, b = typeof e.damping == "number" && Number.isFinite(e.damping) && e.damping >= 0 ? e.damping : 26, o = typeof e.mass == "number" && Number.isFinite(e.mass) && e.mass > 0 ? e.mass : 1;
|
|
35
|
-
let f = w, g = typeof e.velocity == "number" && Number.isFinite(e.velocity) ? e.velocity : 0;
|
|
36
|
-
const E = 1 / 60, C = () => {
|
|
37
|
-
var N, A;
|
|
38
|
-
const k = -h * (f - i) - b * g;
|
|
39
|
-
if (g += k / o * E, f += g * E, !Number.isFinite(f) || !Number.isFinite(g)) {
|
|
40
|
-
this.value = i, m.delete(this), (N = e.onComplete) == null || N.call(e);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
this.value = f, Math.abs(f - i) > 0.01 || Math.abs(g) > 0.01 ? m.set(this, requestAnimationFrame(C)) : (this.value = i, m.delete(this), (A = e.onComplete) == null || A.call(e));
|
|
44
|
-
};
|
|
45
|
-
m.set(this, requestAnimationFrame(C));
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const v = e.duration, u = typeof v == "number" && Number.isFinite(v) && v > 0 ? v : v === void 0 ? 300 : 0;
|
|
49
|
-
if (u === 0) {
|
|
50
|
-
this.value = i, (F = e.onComplete) == null || F.call(e);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const M = R[e.curve || "easeOut"] ?? R.easeOut;
|
|
54
|
-
let p = null;
|
|
55
|
-
const d = (h) => {
|
|
56
|
-
var o;
|
|
57
|
-
p || (p = h);
|
|
58
|
-
const b = Math.min((h - p) / u, 1);
|
|
59
|
-
this.value = G(w, i, M(b)), b < 1 ? m.set(this, requestAnimationFrame(d)) : (m.delete(this), (o = e.onComplete) == null || o.call(e));
|
|
60
|
-
};
|
|
61
|
-
m.set(this, requestAnimationFrame(d));
|
|
62
|
-
};
|
|
63
|
-
q.prototype.snapTo = function(t, e = {}) {
|
|
64
|
-
this.animate(t, { duration: 300, curve: "easeOut", ...e });
|
|
65
|
-
};
|
|
66
|
-
function $(t = {}) {
|
|
67
|
-
return K(t.curve ?? "easeOut", {
|
|
68
|
-
stiffness: t.stiffness,
|
|
69
|
-
damping: t.damping,
|
|
70
|
-
mass: t.mass
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function X(t, e = {}) {
|
|
74
|
-
const { styles: w = !0, meta: i } = e, v = [], u = [], M = V(t.toString());
|
|
75
|
-
let p = "", d = 0, l = null, F = -1, h = !1, b = [], o = [];
|
|
76
|
-
const f = /* @__PURE__ */ new Set();
|
|
77
|
-
function g(n, r) {
|
|
78
|
-
if (n.length !== r.length) return !1;
|
|
79
|
-
for (let s = 0; s < n.length; s++) if (n[s] !== r[s]) return !1;
|
|
80
|
-
return !0;
|
|
81
|
-
}
|
|
82
|
-
function E(n) {
|
|
83
|
-
var r, s;
|
|
84
|
-
for (let a = 0; a < u.length; a++) {
|
|
85
|
-
const c = u[a];
|
|
86
|
-
if (c) {
|
|
87
|
-
if (a >= n) {
|
|
88
|
-
(r = c.unsubs) == null || r.forEach((S) => S()), c.unsubs = [], c.wired = void 0;
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
c.wired && g(c.wired, c.signals) || ((s = c.unsubs) == null || s.forEach((S) => S()), c.unsubs = c.signals.map((S) => S.subscribe(() => N(S))), c.wired = c.signals);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function C(n) {
|
|
96
|
-
g(b, n) || (o.forEach((r) => r()), o = n.map((r) => r.subscribe(() => N())), b = n);
|
|
97
|
-
}
|
|
98
|
-
function k(n) {
|
|
99
|
-
let r = !1;
|
|
100
|
-
for (let s = 0; s < u.length; s++) {
|
|
101
|
-
const a = u[s];
|
|
102
|
-
if (a != null && a.signals.includes(n)) {
|
|
103
|
-
if (r = !0, !a.parts || !a.node) return !1;
|
|
104
|
-
a.next = Y(a.parts);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return r ? P(u, u.length) : !1;
|
|
108
|
-
}
|
|
109
|
-
function N(n) {
|
|
110
|
-
if (!h) {
|
|
111
|
-
h = !0;
|
|
112
|
-
try {
|
|
113
|
-
if (n && k(n)) return;
|
|
114
|
-
D();
|
|
115
|
-
} finally {
|
|
116
|
-
h = !1;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
function A(n) {
|
|
121
|
-
const r = [];
|
|
122
|
-
return typeof (i == null ? void 0 : i.title) == "string" && i.title.length > 0 && r.push(y.createElement("title", { key: "fibo-title" }, i.title)), typeof (i == null ? void 0 : i.description) == "string" && i.description.length > 0 && r.push(
|
|
123
|
-
y.createElement("meta", {
|
|
124
|
-
key: "fibo-description",
|
|
125
|
-
name: "description",
|
|
126
|
-
content: i.description
|
|
127
|
-
})
|
|
128
|
-
), r.push(n), w && r.push(y.createElement(T)), y.createElement(y.Fragment, null, ...r);
|
|
129
|
-
}
|
|
130
|
-
function x() {
|
|
131
|
-
let n;
|
|
132
|
-
const r = W(v, u, () => {
|
|
133
|
-
n = I(t());
|
|
134
|
-
}, M);
|
|
135
|
-
return { tree: n, ...r.outcome };
|
|
136
|
-
}
|
|
137
|
-
function D() {
|
|
138
|
-
const n = x();
|
|
139
|
-
if (E(n.slotCount), C(n.roots), !(n.shape === p && !n.layout && P(u, n.slotCount))) {
|
|
140
|
-
p = n.shape, d += 1, l = A(n.tree), F = d;
|
|
141
|
-
for (const s of f) s();
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function L() {
|
|
145
|
-
if (l && F === d) return l;
|
|
146
|
-
const n = x();
|
|
147
|
-
return p = n.shape, l = A(n.tree), F = d, E(n.slotCount), C(n.roots), l;
|
|
148
|
-
}
|
|
149
|
-
function U(n) {
|
|
150
|
-
return f.add(n), () => {
|
|
151
|
-
var r;
|
|
152
|
-
if (f.delete(n), f.size === 0) {
|
|
153
|
-
for (const s of u)
|
|
154
|
-
(r = s == null ? void 0 : s.unsubs) == null || r.forEach((a) => a()), s && (s.unsubs = [], s.wired = void 0);
|
|
155
|
-
o.forEach((s) => s()), o = [], b = [], l = null, F = -1;
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function z() {
|
|
160
|
-
return d;
|
|
161
|
-
}
|
|
162
|
-
function B() {
|
|
163
|
-
return 0;
|
|
164
|
-
}
|
|
165
|
-
function O() {
|
|
166
|
-
return j(U, z, B), L();
|
|
167
|
-
}
|
|
168
|
-
return O.displayName = "FiboPage", i && (O.meta = i), O;
|
|
169
|
-
}
|
|
170
|
-
const ee = X;
|
|
171
|
-
function te(t) {
|
|
172
|
-
return y.createElement(
|
|
173
|
-
y.Fragment,
|
|
174
|
-
null,
|
|
175
|
-
I(t),
|
|
176
|
-
y.createElement(T)
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
export {
|
|
180
|
-
ee as a,
|
|
181
|
-
$ as c,
|
|
182
|
-
X as p,
|
|
183
|
-
te as w
|
|
184
|
-
};
|