fiboui 2.8.1 → 2.8.2
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/dist/{client-BxtRoL1i.js → client-BISJTJUX.js} +5296 -4957
- package/dist/content.js +3 -3
- package/dist/core.js +2 -2
- package/dist/{icons-BKXx-EqO.js → icons-BGZkIpm8.js} +3 -3
- package/dist/{index-B0FFbOUi.js → index-5LiratLS.js} +3 -3
- package/dist/{index-DD-zM-WX.js → index-B5hJpNl2.js} +10 -10
- package/dist/{index-E-wbUFLi.js → index-C2EZ1rgJ.js} +17 -17
- package/dist/{index-DUohJXW2.js → index-CZs58ByQ.js} +23 -16
- package/dist/{index-DF6X_GZs.js → index-DBeuxHdZ.js} +64 -64
- package/dist/index.d.ts +522 -14
- package/dist/index.js +312 -259
- package/dist/interactive.js +2 -2
- package/dist/layout.js +3 -3
- package/dist/{metadata-YreqtxtK.js → metadata-SJcQu-yM.js} +1 -1
- package/dist/navigation.js +2 -2
- package/dist/page-D8FyCPcH.js +302 -0
- package/dist/server.js +1416 -1356
- package/dist/structure.js +2 -2
- package/dist/theme.js +1 -1
- package/package.json +1 -1
- package/dist/page-BiOQBd4k.js +0 -266
package/dist/interactive.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as e } from "./index-
|
|
2
|
-
import { ap as r, at as t, ab as m, aq as i, as as l, ao as n, aa as x, ar as u, ag as h, an as p, ac as b, am as c, aj as d, af as f, ai as g, ae as T, ah as q, ad as k, ak as B, al as C } from "./client-
|
|
1
|
+
import { B as e } from "./index-CZs58ByQ.js";
|
|
2
|
+
import { ap as r, at as t, ab as m, aq as i, as as l, ao as n, aa as x, ar as u, ag as h, an as p, ac as b, am as c, aj as d, af as f, ai as g, ae as T, ah as q, ad as k, ak as B, al as C } from "./client-BISJTJUX.js";
|
|
3
3
|
export {
|
|
4
4
|
e as Button,
|
|
5
5
|
r as Checkbox,
|
package/dist/layout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as r, a as s, H as e, L as l, b as t, S, Z as n } from "./index-
|
|
2
|
-
import { C as c, S as f } from "./index-
|
|
3
|
-
import { a6 as m, a3 as d, a4 as p, a5 as u, a7 as b } from "./client-
|
|
1
|
+
import { C as r, a as s, H as e, L as l, b as t, S, Z as n } from "./index-DBeuxHdZ.js";
|
|
2
|
+
import { C as c, S as f } from "./index-5LiratLS.js";
|
|
3
|
+
import { a6 as m, a3 as d, a4 as p, a5 as u, a7 as b } from "./client-BISJTJUX.js";
|
|
4
4
|
export {
|
|
5
5
|
r as Center,
|
|
6
6
|
c as Column,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { b6 as v, b5 as x, b7 as E, b8 as k, b9 as R, ba as D, bb as O, bc as g, bd as P, be as $, bf as z, aD as A, aE as K } from "./client-BISJTJUX.js";
|
|
3
3
|
import { useState as M, useMemo as N, lazy as S, Suspense as B } from "react";
|
|
4
4
|
function b(e) {
|
|
5
5
|
const t = (typeof e == "string" ? e.trim() : "").split(/[?#]/, 1)[0];
|
package/dist/navigation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aE as s, aD as u, ax as o, aB as t, az as r, aA as l, aC as L, ay as R } from "./client-
|
|
2
|
-
import { L as i, N as p, O as m, l as n, p as x, u as y } from "./metadata-
|
|
1
|
+
import { aE as s, aD as u, ax as o, aB as t, az as r, aA as l, aC as L, ay as R } from "./client-BISJTJUX.js";
|
|
2
|
+
import { L as i, N as p, O as m, l as n, p as x, u as y } from "./metadata-SJcQu-yM.js";
|
|
3
3
|
export {
|
|
4
4
|
s as DefaultErrorPage,
|
|
5
5
|
u as DefaultLoader,
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var L = (e, t, n) => t in e ? O(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var w = (e, t, n) => L(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { S as C, c as $, i as U, H as D, b1 as I, U as k, b2 as P, b3 as T, b4 as B } from "./client-BISJTJUX.js";
|
|
5
|
+
import m, { useSyncExternalStore as V } from "react";
|
|
6
|
+
function j() {
|
|
7
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `lst_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
8
|
+
}
|
|
9
|
+
function N(e) {
|
|
10
|
+
return typeof e._id == "string" && e._id.length > 0;
|
|
11
|
+
}
|
|
12
|
+
function F(e) {
|
|
13
|
+
return N(e) ? e : { ...e, _id: j() };
|
|
14
|
+
}
|
|
15
|
+
function M(e, t, n) {
|
|
16
|
+
if (typeof n == "function")
|
|
17
|
+
return n(e, t);
|
|
18
|
+
if (e != null && typeof e == "object") {
|
|
19
|
+
const r = e;
|
|
20
|
+
return r._id != null && r._id === n || r.id != null && r.id === n;
|
|
21
|
+
}
|
|
22
|
+
return e === n;
|
|
23
|
+
}
|
|
24
|
+
function R(e, t) {
|
|
25
|
+
if (typeof t == "function")
|
|
26
|
+
return F({ ...t(e), _id: e._id });
|
|
27
|
+
const { _id: n, ...r } = t;
|
|
28
|
+
return { ...e, ...r, _id: e._id };
|
|
29
|
+
}
|
|
30
|
+
function W(e, t, n) {
|
|
31
|
+
const r = e;
|
|
32
|
+
return (n && n.length > 0 ? n.map((i) => r[i]) : Object.entries(r).filter(([i]) => i !== "_id").map(([, i]) => i)).some((i) => i == null ? !1 : typeof i == "string" || typeof i == "number" || typeof i == "boolean" ? String(i).toLowerCase().includes(t) : !1);
|
|
33
|
+
}
|
|
34
|
+
class z extends C {
|
|
35
|
+
constructor(n = []) {
|
|
36
|
+
const r = (Array.isArray(n) ? n : []).map((s) => F(s));
|
|
37
|
+
super(r);
|
|
38
|
+
w(this, "_$length");
|
|
39
|
+
/** Full list. `.value` is this array, or a filtered slice while a view/filter is set. */
|
|
40
|
+
w(this, "_source");
|
|
41
|
+
w(this, "_query", "");
|
|
42
|
+
w(this, "_keys");
|
|
43
|
+
w(this, "_predicate");
|
|
44
|
+
this._source = r, this.publish();
|
|
45
|
+
}
|
|
46
|
+
get value() {
|
|
47
|
+
return super.value;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Replaces the full list, then reapplies the current view.
|
|
51
|
+
* In-place mutation of this array (`push` / `splice`) does not notify
|
|
52
|
+
* and does not write the stored list — assign a new array or use
|
|
53
|
+
* `add` / `update` / `remove`.
|
|
54
|
+
*/
|
|
55
|
+
set value(n) {
|
|
56
|
+
this._source = n.map((r) => F(r)), this.publish();
|
|
57
|
+
}
|
|
58
|
+
/** Push the visible rows. Always a copy so `.value.splice` cannot write `_source`. */
|
|
59
|
+
publish() {
|
|
60
|
+
const r = !!this._query || !!this._predicate ? this._source.filter((s, i) => !(this._query && !W(s, this._query, this._keys) || this._predicate && !this._predicate(s, i))) : this._source.slice();
|
|
61
|
+
super.value = r;
|
|
62
|
+
}
|
|
63
|
+
get length() {
|
|
64
|
+
return this.value.length;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Reactive length for plain templates:
|
|
68
|
+
* `Text(\`Total todos: ${todos.$length}\`)`
|
|
69
|
+
*
|
|
70
|
+
* Embeds a marker via `interp()`; `Text` resolves it on each update.
|
|
71
|
+
* (`todos.length` is a plain number and still freezes — use `$length`.)
|
|
72
|
+
*/
|
|
73
|
+
get $length() {
|
|
74
|
+
return this._$length || (this._$length = $(() => this.value.length)), U(this._$length);
|
|
75
|
+
}
|
|
76
|
+
/** Replace the whole array (missing `_id`s are generated). */
|
|
77
|
+
set(n) {
|
|
78
|
+
return this.value = n.map((r) => F(r)), this;
|
|
79
|
+
}
|
|
80
|
+
clear() {
|
|
81
|
+
return this.value = [], this;
|
|
82
|
+
}
|
|
83
|
+
/** Append items — each gets `_id` if not already set. Writes the full list. */
|
|
84
|
+
add(...n) {
|
|
85
|
+
return n.length === 0 ? this : (this.value = [...this._source, ...n.map((r) => F(r))], this);
|
|
86
|
+
}
|
|
87
|
+
/** Insert at index (clamped) in the full list. */
|
|
88
|
+
insert(n, r) {
|
|
89
|
+
const s = [...this._source], i = Math.max(0, Math.min(n, s.length));
|
|
90
|
+
return s.splice(i, 0, F(r)), this.value = s, this;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Patch by `_id` / `id` / predicate.
|
|
94
|
+
* `patch` can be a partial object or a mapper.
|
|
95
|
+
*/
|
|
96
|
+
update(n, r) {
|
|
97
|
+
let s = !1;
|
|
98
|
+
const i = this._source.map((a, c) => M(a, c, n) ? (s = !0, R(a, r)) : a);
|
|
99
|
+
return s && (this.value = i), this;
|
|
100
|
+
}
|
|
101
|
+
/** Replace the first match (keeps original `_id` unless `item` already has one). */
|
|
102
|
+
replace(n, r) {
|
|
103
|
+
const s = this._source.findIndex((c, l) => M(c, l, n));
|
|
104
|
+
if (s < 0) return this;
|
|
105
|
+
const i = this._source[s], a = [...this._source];
|
|
106
|
+
return a[s] = N(r) ? r : { ...r, _id: i._id }, this.value = a, this;
|
|
107
|
+
}
|
|
108
|
+
/** Remove by `_id` / `id` / predicate. Alias: `delete`. */
|
|
109
|
+
remove(n) {
|
|
110
|
+
const r = this._source.filter((s, i) => !M(s, i, n));
|
|
111
|
+
return r.length !== this._source.length && (this.value = r), this;
|
|
112
|
+
}
|
|
113
|
+
delete(n) {
|
|
114
|
+
return this.remove(n);
|
|
115
|
+
}
|
|
116
|
+
find(n) {
|
|
117
|
+
return this._source.find((r, s) => M(r, s, n));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Show only rows that match `query`. The full list stays stored.
|
|
121
|
+
* `view('')` or `view()` shows every item again (does not clear `viewWhere`).
|
|
122
|
+
* `keys` limits the match to those fields (`['text']`).
|
|
123
|
+
*/
|
|
124
|
+
view(n = "", r) {
|
|
125
|
+
return this._query = n.trim().toLowerCase(), this._keys = r, this.publish(), this;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Live predicate on `publish()` (AND with `view`/`search` query).
|
|
129
|
+
* `viewWhere()` with no fn (or `null`) clears it.
|
|
130
|
+
*/
|
|
131
|
+
viewWhere(n) {
|
|
132
|
+
return this._predicate = typeof n == "function" ? n : void 0, this.publish(), this;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Same live view as `view()`, plus a copy of the visible rows.
|
|
136
|
+
* Bound List/Table update; `const hits = todos.search('x')` still works.
|
|
137
|
+
*/
|
|
138
|
+
search(n, r) {
|
|
139
|
+
return this.view(n, r), [...this.value];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* One-shot snapshot of `_source` (Array.filter). Does not change `.value`.
|
|
143
|
+
* Safe inside `computed(() => todos.filter(fn))`.
|
|
144
|
+
* `todos.set(todos.filter(fn))` replaces the full list (clearDone).
|
|
145
|
+
*/
|
|
146
|
+
filter(n) {
|
|
147
|
+
return this._source.filter(n);
|
|
148
|
+
}
|
|
149
|
+
map(n) {
|
|
150
|
+
return this._source.map(n);
|
|
151
|
+
}
|
|
152
|
+
move(n, r) {
|
|
153
|
+
const s = [...this._source];
|
|
154
|
+
if (n < 0 || n >= s.length) return this;
|
|
155
|
+
const i = Math.max(0, Math.min(r, s.length - 1));
|
|
156
|
+
if (n === i) return this;
|
|
157
|
+
const [a] = s.splice(n, 1);
|
|
158
|
+
return s.splice(i, 0, a), this.value = s, this;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function H(e = []) {
|
|
162
|
+
return new z(e);
|
|
163
|
+
}
|
|
164
|
+
const te = H, A = {
|
|
165
|
+
linear: (e) => e,
|
|
166
|
+
easeIn: (e) => e * e,
|
|
167
|
+
easeOut: (e) => e * (2 - e),
|
|
168
|
+
easeInOut: (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e
|
|
169
|
+
};
|
|
170
|
+
function G(e, t, n) {
|
|
171
|
+
return e + (t - e) * n;
|
|
172
|
+
}
|
|
173
|
+
const h = /* @__PURE__ */ new WeakMap();
|
|
174
|
+
function J() {
|
|
175
|
+
return typeof requestAnimationFrame == "function";
|
|
176
|
+
}
|
|
177
|
+
function K() {
|
|
178
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
179
|
+
}
|
|
180
|
+
function Q(e) {
|
|
181
|
+
const t = h.get(e);
|
|
182
|
+
t != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(t), h.delete(e);
|
|
183
|
+
}
|
|
184
|
+
C.prototype.spring = function(e, t = {}) {
|
|
185
|
+
this.animate(e, { ...t, curve: "spring", damping: t.damping ?? 26, stiffness: t.stiffness ?? 170 });
|
|
186
|
+
};
|
|
187
|
+
C.prototype.animate = function(e, t = {}) {
|
|
188
|
+
var p, f;
|
|
189
|
+
const n = this.value, r = e;
|
|
190
|
+
if (Q(this), !J() || K()) {
|
|
191
|
+
this.value = r, (p = t.onComplete) == null || p.call(t);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (t.curve === "spring") {
|
|
195
|
+
const o = typeof t.stiffness == "number" && Number.isFinite(t.stiffness) && t.stiffness > 0 ? t.stiffness : 170, g = typeof t.damping == "number" && Number.isFinite(t.damping) && t.damping >= 0 ? t.damping : 26, _ = typeof t.mass == "number" && Number.isFinite(t.mass) && t.mass > 0 ? t.mass : 1;
|
|
196
|
+
let y = n, v = typeof t.velocity == "number" && Number.isFinite(t.velocity) ? t.velocity : 0;
|
|
197
|
+
const S = 1 / 60, x = () => {
|
|
198
|
+
var b, u;
|
|
199
|
+
const q = -o * (y - r) - g * v;
|
|
200
|
+
if (v += q / _ * S, y += v * S, !Number.isFinite(y) || !Number.isFinite(v)) {
|
|
201
|
+
this.value = r, h.delete(this), (b = t.onComplete) == null || b.call(t);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
this.value = y, Math.abs(y - r) > 0.01 || Math.abs(v) > 0.01 ? h.set(this, requestAnimationFrame(x)) : (this.value = r, h.delete(this), (u = t.onComplete) == null || u.call(t));
|
|
205
|
+
};
|
|
206
|
+
h.set(this, requestAnimationFrame(x));
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const s = t.duration, i = typeof s == "number" && Number.isFinite(s) && s > 0 ? s : s === void 0 ? 300 : 0;
|
|
210
|
+
if (i === 0) {
|
|
211
|
+
this.value = r, (f = t.onComplete) == null || f.call(t);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const a = A[t.curve || "easeOut"] ?? A.easeOut;
|
|
215
|
+
let c = null;
|
|
216
|
+
const l = (o) => {
|
|
217
|
+
var _;
|
|
218
|
+
c || (c = o);
|
|
219
|
+
const g = Math.min((o - c) / i, 1);
|
|
220
|
+
this.value = G(n, r, a(g)), g < 1 ? h.set(this, requestAnimationFrame(l)) : (h.delete(this), (_ = t.onComplete) == null || _.call(t));
|
|
221
|
+
};
|
|
222
|
+
h.set(this, requestAnimationFrame(l));
|
|
223
|
+
};
|
|
224
|
+
C.prototype.snapTo = function(e, t = {}) {
|
|
225
|
+
this.animate(e, { duration: 300, curve: "easeOut", ...t });
|
|
226
|
+
};
|
|
227
|
+
function ne(e = {}) {
|
|
228
|
+
return D(e.curve ?? "easeOut", {
|
|
229
|
+
stiffness: e.stiffness,
|
|
230
|
+
damping: e.damping,
|
|
231
|
+
mass: e.mass
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
function X(e, t = {}) {
|
|
235
|
+
const { styles: n = !0, meta: r } = t, s = [], i = [];
|
|
236
|
+
let a = "", c = 0, l = null, p = -1, f = null;
|
|
237
|
+
const o = /* @__PURE__ */ new Set();
|
|
238
|
+
function g(u) {
|
|
239
|
+
const d = [];
|
|
240
|
+
return typeof (r == null ? void 0 : r.title) == "string" && r.title.length > 0 && d.push(m.createElement("title", { key: "fibo-title" }, r.title)), typeof (r == null ? void 0 : r.description) == "string" && r.description.length > 0 && d.push(
|
|
241
|
+
m.createElement("meta", {
|
|
242
|
+
key: "fibo-description",
|
|
243
|
+
name: "description",
|
|
244
|
+
content: r.description
|
|
245
|
+
})
|
|
246
|
+
), d.push(u), n && d.push(m.createElement(k)), m.createElement(m.Fragment, null, ...d);
|
|
247
|
+
}
|
|
248
|
+
function _() {
|
|
249
|
+
f || (f = new P(y));
|
|
250
|
+
let u;
|
|
251
|
+
const d = T(s, i, () => {
|
|
252
|
+
u = f.execute(() => I(e()));
|
|
253
|
+
});
|
|
254
|
+
return { tree: u, ...d.outcome };
|
|
255
|
+
}
|
|
256
|
+
function y() {
|
|
257
|
+
const u = _();
|
|
258
|
+
if (!(u.shape === a && !u.layout && B(i, u.slotCount))) {
|
|
259
|
+
a = u.shape, c += 1, l = g(u.tree), p = c;
|
|
260
|
+
for (const E of o) E();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function v() {
|
|
264
|
+
if (l && p === c) return l;
|
|
265
|
+
const u = _();
|
|
266
|
+
return a = u.shape, l = g(u.tree), p = c, l;
|
|
267
|
+
}
|
|
268
|
+
function S(u) {
|
|
269
|
+
return o.add(u), () => {
|
|
270
|
+
o.delete(u), o.size === 0 && f && (f.dispose(), f = null, l = null, p = -1);
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function x() {
|
|
274
|
+
return c;
|
|
275
|
+
}
|
|
276
|
+
function q() {
|
|
277
|
+
return 0;
|
|
278
|
+
}
|
|
279
|
+
function b() {
|
|
280
|
+
return V(S, x, q), v();
|
|
281
|
+
}
|
|
282
|
+
return b.displayName = "FiboPage", r && (b.meta = r), b;
|
|
283
|
+
}
|
|
284
|
+
const re = X;
|
|
285
|
+
function se(e) {
|
|
286
|
+
return m.createElement(
|
|
287
|
+
m.Fragment,
|
|
288
|
+
null,
|
|
289
|
+
I(e),
|
|
290
|
+
m.createElement(k)
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
export {
|
|
294
|
+
z as L,
|
|
295
|
+
ne as a,
|
|
296
|
+
re as b,
|
|
297
|
+
te as c,
|
|
298
|
+
F as e,
|
|
299
|
+
H as l,
|
|
300
|
+
X as p,
|
|
301
|
+
se as w
|
|
302
|
+
};
|