fiboui 2.9.6 → 2.9.15
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-DspTEDnT.js → client-CNrWulRU.js} +1604 -1525
- package/dist/content.d.ts +14 -1
- package/dist/content.js +10 -10
- package/dist/core.d.ts +32 -1
- package/dist/core.js +56 -54
- package/dist/{icons-uTGNZEj2.js → icons-CUjbVN8n.js} +126 -112
- package/dist/{index-BK9NhRgp.js → index-BBa7p7cv.js} +6 -6
- package/dist/{index-CE3dybe8.js → index-Bcf-s8v0.js} +145 -138
- package/dist/{index-vSLH4ZkD.js → index-COE2gXjP.js} +1 -1
- package/dist/{index-B7vkEz57.js → index-CpUz5DNt.js} +39 -39
- package/dist/{index-pxNM6-DO.js → index-Dm9qGQyL.js} +2 -2
- package/dist/index.d.ts +51 -2
- package/dist/index.js +1303 -1170
- package/dist/interactive.d.ts +2 -0
- package/dist/interactive.js +6 -6
- package/dist/layout.d.ts +2 -0
- package/dist/layout.js +3 -3
- package/dist/{metadata-BqVnmMLq.js → metadata-CElV09j3.js} +20 -20
- package/dist/navigation.js +2 -2
- package/dist/{page-CQCVouvN.js → page-LLSMLaL2.js} +81 -82
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2346 -2897
- package/dist/structure.d.ts +2 -0
- package/dist/structure.js +8 -8
- package/dist/style.css +1 -1
- package/dist/theme.js +3 -3
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var nt = Object.defineProperty;
|
|
2
2
|
var et = (n, i, t) => i in n ? nt(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
3
|
+
var u = (n, i, t) => et(n, typeof i != "symbol" ? i + "" : i, t);
|
|
4
|
+
import p from "react";
|
|
5
|
+
import { b4 as T, b5 as B, b9 as $, b8 as y, bb as A, by as S, bz as E, bA as _, bB as rt, bh as ot, bC as st, bD as lt } from "./client-CNrWulRU.js";
|
|
6
6
|
function at(n, i) {
|
|
7
|
-
if (!(typeof i != "string" || !
|
|
7
|
+
if (!(typeof i != "string" || !y(i)))
|
|
8
8
|
for (const t of A(i))
|
|
9
9
|
n.bindSignal(t);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function N(n, i) {
|
|
12
12
|
if (typeof i == "function") {
|
|
13
13
|
try {
|
|
14
|
-
|
|
14
|
+
N(n, i());
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
17
|
return;
|
|
@@ -21,27 +21,27 @@ function L(n, i) {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
if (Array.isArray(i))
|
|
24
|
-
for (const t of i)
|
|
24
|
+
for (const t of i) N(n, t);
|
|
25
25
|
}
|
|
26
26
|
function ct(n) {
|
|
27
|
-
return typeof n == "string" &&
|
|
27
|
+
return typeof n == "string" && y(n) ? $(n) : n;
|
|
28
28
|
}
|
|
29
29
|
function ft(n) {
|
|
30
30
|
return n && typeof n == "object" && !Array.isArray(n) ? n : {};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function ht(n) {
|
|
33
33
|
n.display !== "none" && (n.display = "flex", (n.alignItems == null || n.alignItems === "") && (n.alignItems = "center"), (n.justifyContent == null || n.justifyContent === "") && (n.justifyContent = "center")), n.margin == null && (n.marginLeft == null && (n.marginLeft = "auto"), n.marginRight == null && (n.marginRight = "auto"));
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function dt(n, i) {
|
|
36
36
|
const { children: t, ...e } = i, r = t !== void 0 ? t : n;
|
|
37
37
|
return { nodes: r == null ? [] : Array.isArray(r) ? r : [r], rest: e };
|
|
38
38
|
}
|
|
39
39
|
class ut extends B {
|
|
40
40
|
children(i) {
|
|
41
|
-
return
|
|
41
|
+
return N(this, i), super.children(i);
|
|
42
42
|
}
|
|
43
43
|
props(i) {
|
|
44
|
-
return i && "children" in i &&
|
|
44
|
+
return i && "children" in i && N(this, i.children), super.props(i);
|
|
45
45
|
}
|
|
46
46
|
build() {
|
|
47
47
|
const i = [
|
|
@@ -53,8 +53,8 @@ class ut extends B {
|
|
|
53
53
|
// instead of clipping overflowing children.
|
|
54
54
|
this.isHug() ? "w-auto self-auto" : "w-full min-w-0 min-h-0 self-stretch",
|
|
55
55
|
...this._classNames
|
|
56
|
-
], { nodes: t, rest: e } =
|
|
57
|
-
return
|
|
56
|
+
], { nodes: t, rest: e } = dt(this.processChildren(), this._props), { className: r, style: o, ...s } = e, l = [...i, r].filter(Boolean).join(" "), a = t.map(ct), f = { ...this.getStyle(), ...ft(o) };
|
|
57
|
+
return ht(f), p.createElement(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
60
|
style: f,
|
|
@@ -67,14 +67,14 @@ class ut extends B {
|
|
|
67
67
|
}
|
|
68
68
|
const qt = T(ut);
|
|
69
69
|
function pt(n, i) {
|
|
70
|
-
if (!(typeof i != "string" || !
|
|
70
|
+
if (!(typeof i != "string" || !y(i)))
|
|
71
71
|
for (const t of A(i))
|
|
72
72
|
n.bindSignal(t);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function L(n, i) {
|
|
75
75
|
if (typeof i == "function") {
|
|
76
76
|
try {
|
|
77
|
-
|
|
77
|
+
L(n, i());
|
|
78
78
|
} catch {
|
|
79
79
|
}
|
|
80
80
|
return;
|
|
@@ -84,10 +84,10 @@ function N(n, i) {
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (Array.isArray(i))
|
|
87
|
-
for (const t of i)
|
|
87
|
+
for (const t of i) L(n, t);
|
|
88
88
|
}
|
|
89
89
|
function gt(n) {
|
|
90
|
-
return typeof n == "string" &&
|
|
90
|
+
return typeof n == "string" && y(n) ? $(n) : n;
|
|
91
91
|
}
|
|
92
92
|
function mt(n, i) {
|
|
93
93
|
const t = i !== void 0 ? i : n;
|
|
@@ -131,24 +131,24 @@ function z(n, i) {
|
|
|
131
131
|
const t = `fibo-${i}-`;
|
|
132
132
|
return n.some((e) => e.startsWith(t));
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function St(n) {
|
|
135
135
|
return typeof n == "number" ? `${n}px` : String(n);
|
|
136
136
|
}
|
|
137
137
|
function v(n, i) {
|
|
138
138
|
const t = `env(safe-area-inset-${i}, 0px)`;
|
|
139
139
|
if (n == null || n === "") return t;
|
|
140
|
-
const e =
|
|
140
|
+
const e = St(n);
|
|
141
141
|
return e.includes("safe-area-inset") ? e : `max(${e}, ${t})`;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function xt(n, i) {
|
|
144
144
|
const t = { ...n }, e = t;
|
|
145
145
|
for (const r of ["padding", "margin"]) {
|
|
146
146
|
const o = e[r];
|
|
147
147
|
if (o == null || o === "") continue;
|
|
148
148
|
const s = `${r}Top`, l = `${r}Right`, a = `${r}Bottom`, f = `${r}Left`;
|
|
149
149
|
if (!(e[s] != null || e[l] != null || e[a] != null || e[f] != null || i.has(`${r}-top`) || i.has(`${r}-right`) || i.has(`${r}-bottom`) || i.has(`${r}-left`))) continue;
|
|
150
|
-
const [
|
|
151
|
-
e[s] == null && !i.has(`${r}-top`) && (e[s] =
|
|
150
|
+
const [d, c, h, x] = E(String(o));
|
|
151
|
+
e[s] == null && !i.has(`${r}-top`) && (e[s] = d), e[l] == null && !i.has(`${r}-right`) && (e[l] = c), e[a] == null && !i.has(`${r}-bottom`) && (e[a] = h), e[f] == null && !i.has(`${r}-left`) && (e[f] = x), delete e[r];
|
|
152
152
|
}
|
|
153
153
|
return t;
|
|
154
154
|
}
|
|
@@ -173,49 +173,49 @@ function vt(n, i, t, e) {
|
|
|
173
173
|
l || (r.marginLeft = "auto"), a || (r.marginRight = "auto");
|
|
174
174
|
}
|
|
175
175
|
function Ct(n, i, t, e, r, o, s) {
|
|
176
|
-
const l = i ? rt({ ...n, ...i }) : { ...n }, a =
|
|
177
|
-
return !(a.maxWidth != null || z(r, "max-width") || o.has("max-width")) && t != null && t !== "" && (a.maxWidth =
|
|
176
|
+
const l = i ? rt({ ...n, ...i }) : { ...n }, a = xt(l, o);
|
|
177
|
+
return !(a.maxWidth != null || z(r, "max-width") || o.has("max-width")) && t != null && t !== "" && (a.maxWidth = S("maxWidth", t)), vt(a, e, r, o), wt(a, s), a;
|
|
178
178
|
}
|
|
179
179
|
class Tt extends B {
|
|
180
180
|
constructor() {
|
|
181
181
|
super(...arguments);
|
|
182
|
-
|
|
182
|
+
u(this, "_userPad", {});
|
|
183
183
|
}
|
|
184
184
|
children(t) {
|
|
185
|
-
return
|
|
185
|
+
return L(this, t), super.children(t);
|
|
186
186
|
}
|
|
187
187
|
props(t) {
|
|
188
|
-
return t && "children" in t &&
|
|
188
|
+
return t && "children" in t && L(this, t.children), super.props(t);
|
|
189
189
|
}
|
|
190
190
|
padding(t, e) {
|
|
191
191
|
if (e !== void 0 || t != null && typeof t == "object")
|
|
192
192
|
return super.padding(t, e);
|
|
193
|
-
const r = t, o =
|
|
193
|
+
const r = t, o = S("padding", r), [s, l, a, f] = E(o);
|
|
194
194
|
return this._boxLonghands.has("padding-top") || (this._userPad.top = s), this._boxLonghands.has("padding-right") || (this._userPad.right = l), this._boxLonghands.has("padding-bottom") || (this._userPad.bottom = a), this._boxLonghands.has("padding-left") || (this._userPad.left = f), super.padding(r);
|
|
195
195
|
}
|
|
196
196
|
paddingHorizontal(t) {
|
|
197
|
-
const e =
|
|
197
|
+
const e = S("paddingLeft", t);
|
|
198
198
|
return this._userPad.left = e, this._userPad.right = e, super.paddingHorizontal(t);
|
|
199
199
|
}
|
|
200
200
|
paddingVertical(t) {
|
|
201
|
-
const e =
|
|
201
|
+
const e = S("paddingTop", t);
|
|
202
202
|
return this._userPad.top = e, this._userPad.bottom = e, super.paddingVertical(t);
|
|
203
203
|
}
|
|
204
204
|
paddingLeft(t) {
|
|
205
|
-
const e =
|
|
206
|
-
return this._userPad.left = e, this._boxLonghands.add("padding-left"), this.addClassName(
|
|
205
|
+
const e = S("paddingLeft", t);
|
|
206
|
+
return this._userPad.left = e, this._boxLonghands.add("padding-left"), this.addClassName(_.register("padding-left", e)), this;
|
|
207
207
|
}
|
|
208
208
|
paddingRight(t) {
|
|
209
|
-
const e =
|
|
210
|
-
return this._userPad.right = e, this._boxLonghands.add("padding-right"), this.addClassName(
|
|
209
|
+
const e = S("paddingRight", t);
|
|
210
|
+
return this._userPad.right = e, this._boxLonghands.add("padding-right"), this.addClassName(_.register("padding-right", e)), this;
|
|
211
211
|
}
|
|
212
212
|
paddingTop(t) {
|
|
213
|
-
const e =
|
|
214
|
-
return this._userPad.top = e, this._boxLonghands.add("padding-top"), this.addClassName(
|
|
213
|
+
const e = S("paddingTop", t);
|
|
214
|
+
return this._userPad.top = e, this._boxLonghands.add("padding-top"), this.addClassName(_.register("padding-top", e)), this;
|
|
215
215
|
}
|
|
216
216
|
paddingBottom(t) {
|
|
217
|
-
const e =
|
|
218
|
-
return this._userPad.bottom = e, this._boxLonghands.add("padding-bottom"), this.addClassName(
|
|
217
|
+
const e = S("paddingBottom", t);
|
|
218
|
+
return this._userPad.bottom = e, this._boxLonghands.add("padding-bottom"), this.addClassName(_.register("padding-bottom", e)), this;
|
|
219
219
|
}
|
|
220
220
|
build() {
|
|
221
221
|
const {
|
|
@@ -227,34 +227,34 @@ class Tt extends B {
|
|
|
227
227
|
dangerouslySetInnerHTML: l,
|
|
228
228
|
maxWidth: a,
|
|
229
229
|
...f
|
|
230
|
-
} = this._props,
|
|
230
|
+
} = this._props, m = this.isHug(), d = mt(this.processChildren(), t).map(gt), c = Ct(
|
|
231
231
|
this.getStyle(),
|
|
232
232
|
r,
|
|
233
233
|
a,
|
|
234
|
-
|
|
234
|
+
m,
|
|
235
235
|
this._classNames,
|
|
236
236
|
this._boxLonghands,
|
|
237
237
|
this._userPad
|
|
238
|
-
),
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
), h = [
|
|
239
|
+
_.register("padding-left", String(c.paddingLeft ?? v(void 0, "left"))),
|
|
240
|
+
_.register("padding-right", String(c.paddingRight ?? v(void 0, "right")))
|
|
241
241
|
];
|
|
242
|
-
c.paddingTop != null && String(c.paddingTop).includes("safe-area-inset") &&
|
|
243
|
-
const
|
|
242
|
+
c.paddingTop != null && String(c.paddingTop).includes("safe-area-inset") && h.push(_.register("padding-top", String(c.paddingTop))), c.paddingBottom != null && String(c.paddingBottom).includes("safe-area-inset") && h.push(_.register("padding-bottom", String(c.paddingBottom)));
|
|
243
|
+
const x = [
|
|
244
244
|
"fibo-container",
|
|
245
|
-
|
|
245
|
+
m ? "w-auto" : "w-full mx-auto",
|
|
246
246
|
this.getClassName(),
|
|
247
247
|
e,
|
|
248
|
-
...
|
|
249
|
-
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(),
|
|
250
|
-
return
|
|
251
|
-
|
|
248
|
+
...h
|
|
249
|
+
].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), R = _t(o ?? s);
|
|
250
|
+
return p.createElement(
|
|
251
|
+
R,
|
|
252
252
|
{
|
|
253
253
|
...f,
|
|
254
|
-
className:
|
|
254
|
+
className: x,
|
|
255
255
|
style: c
|
|
256
256
|
},
|
|
257
|
-
...
|
|
257
|
+
...d
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -277,14 +277,14 @@ function M(n) {
|
|
|
277
277
|
if (t != null && typeof t != "boolean") return t;
|
|
278
278
|
}
|
|
279
279
|
function Bt(n, i) {
|
|
280
|
-
if (!(typeof i != "string" || !
|
|
280
|
+
if (!(typeof i != "string" || !y(i)))
|
|
281
281
|
for (const t of A(i))
|
|
282
282
|
n.bindSignal(t);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function H(n, i) {
|
|
285
285
|
if (typeof i == "function") {
|
|
286
286
|
try {
|
|
287
|
-
|
|
287
|
+
H(n, i());
|
|
288
288
|
} catch {
|
|
289
289
|
}
|
|
290
290
|
return;
|
|
@@ -294,10 +294,10 @@ function I(n, i) {
|
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
296
|
if (Array.isArray(i))
|
|
297
|
-
for (const t of i)
|
|
297
|
+
for (const t of i) H(n, t);
|
|
298
298
|
}
|
|
299
299
|
function $t(n) {
|
|
300
|
-
return typeof n == "string" &&
|
|
300
|
+
return typeof n == "string" && y(n) ? $(n) : n;
|
|
301
301
|
}
|
|
302
302
|
function At(n, i) {
|
|
303
303
|
const { children: t, ...e } = i, r = t !== void 0 ? t : n;
|
|
@@ -306,7 +306,7 @@ function At(n, i) {
|
|
|
306
306
|
function zt(n, i, t) {
|
|
307
307
|
if (n == null || typeof n == "boolean") return null;
|
|
308
308
|
const e = i === 0, r = st(t);
|
|
309
|
-
return e ?
|
|
309
|
+
return e ? p.createElement(
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
312
|
key: `fibo-zstack-layer-${i}`,
|
|
@@ -325,7 +325,7 @@ function zt(n, i, t) {
|
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
327
|
n
|
|
328
|
-
) :
|
|
328
|
+
) : p.createElement(
|
|
329
329
|
"div",
|
|
330
330
|
{
|
|
331
331
|
key: `fibo-zstack-layer-${i}`,
|
|
@@ -344,7 +344,7 @@ function zt(n, i, t) {
|
|
|
344
344
|
pointerEvents: "none"
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
|
-
|
|
347
|
+
p.createElement(
|
|
348
348
|
"div",
|
|
349
349
|
{
|
|
350
350
|
className: "fibo-zstack-overlay-content",
|
|
@@ -366,19 +366,19 @@ function zt(n, i, t) {
|
|
|
366
366
|
)
|
|
367
367
|
);
|
|
368
368
|
}
|
|
369
|
-
class
|
|
369
|
+
class Nt extends B {
|
|
370
370
|
constructor() {
|
|
371
371
|
super(...arguments);
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
u(this, "_alignment", "center");
|
|
373
|
+
u(this, "_fit", "content");
|
|
374
374
|
/** Copied from base child’s fixed frame, if any. */
|
|
375
|
-
|
|
375
|
+
u(this, "_baseFixedFrame");
|
|
376
376
|
}
|
|
377
377
|
children(t) {
|
|
378
|
-
return
|
|
378
|
+
return H(this, t), this._baseFixedFrame = K(M(t)), super.children(t);
|
|
379
379
|
}
|
|
380
380
|
props(t) {
|
|
381
|
-
return t && "children" in t && (
|
|
381
|
+
return t && "children" in t && (H(this, t.children), this._baseFixedFrame = K(M(t.children))), super.props(t);
|
|
382
382
|
}
|
|
383
383
|
alignment(t) {
|
|
384
384
|
return this._alignment = t, this;
|
|
@@ -402,66 +402,73 @@ class Lt extends B {
|
|
|
402
402
|
t ? "w-auto self-auto" : "w-full min-w-0 min-h-0 self-stretch",
|
|
403
403
|
...this._classNames
|
|
404
404
|
], r = this.getStyle();
|
|
405
|
-
r.overflow == null && (r.overflow = "hidden"), this._baseFixedFrame
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
if (r.overflow == null && (r.overflow = "hidden"), this._baseFixedFrame) {
|
|
406
|
+
const d = r.width != null || this._classNames.some(
|
|
407
|
+
(h) => h === "w-full" || h.startsWith("w-") || h.startsWith("fibo-width-")
|
|
408
|
+
), c = r.height != null || this._classNames.some(
|
|
409
|
+
(h) => h === "h-full" || h.startsWith("h-") || h.startsWith("fibo-height-")
|
|
410
|
+
);
|
|
411
|
+
d || (r.width = `${this._baseFixedFrame.width}px`), c || (r.height = `${this._baseFixedFrame.height}px`);
|
|
412
|
+
} else t && r.height == null && r.minHeight == null && (r.height = "fit-content");
|
|
413
|
+
const { nodes: o, rest: s } = At(this.processChildren(), this._props), { className: l, ...a } = s, f = [...e, l].filter(Boolean).join(" "), m = o.map($t).map((d, c) => zt(d, c, this._alignment));
|
|
414
|
+
return p.createElement(
|
|
408
415
|
"div",
|
|
409
416
|
{
|
|
410
417
|
style: r,
|
|
411
418
|
...a,
|
|
412
419
|
className: f
|
|
413
420
|
},
|
|
414
|
-
...
|
|
421
|
+
...m
|
|
415
422
|
);
|
|
416
423
|
}
|
|
417
424
|
}
|
|
418
|
-
const Jt = T(
|
|
419
|
-
function
|
|
420
|
-
if (!(typeof i != "string" || !
|
|
425
|
+
const Jt = T(Nt);
|
|
426
|
+
function Lt(n, i) {
|
|
427
|
+
if (!(typeof i != "string" || !y(i)))
|
|
421
428
|
for (const t of A(i))
|
|
422
429
|
n.bindSignal(t);
|
|
423
430
|
}
|
|
424
|
-
function
|
|
431
|
+
function I(n, i) {
|
|
425
432
|
if (typeof i == "function") {
|
|
426
433
|
try {
|
|
427
|
-
|
|
434
|
+
I(n, i());
|
|
428
435
|
} catch {
|
|
429
436
|
}
|
|
430
437
|
return;
|
|
431
438
|
}
|
|
432
439
|
if (typeof i == "string") {
|
|
433
|
-
|
|
440
|
+
Lt(n, i);
|
|
434
441
|
return;
|
|
435
442
|
}
|
|
436
443
|
if (Array.isArray(i))
|
|
437
|
-
for (const t of i)
|
|
438
|
-
}
|
|
439
|
-
function It(n) {
|
|
440
|
-
return typeof n == "string" && m(n) ? $(n) : n;
|
|
444
|
+
for (const t of i) I(n, t);
|
|
441
445
|
}
|
|
442
446
|
function Ht(n) {
|
|
447
|
+
return typeof n == "string" && y(n) ? $(n) : n;
|
|
448
|
+
}
|
|
449
|
+
function It(n) {
|
|
443
450
|
return n && typeof n == "object" && !Array.isArray(n) ? n : {};
|
|
444
451
|
}
|
|
445
|
-
function
|
|
452
|
+
function Wt(n, i) {
|
|
446
453
|
return n === !0 || n === "true" ? !0 : i === "none" || i === "presentation";
|
|
447
454
|
}
|
|
448
|
-
function
|
|
455
|
+
function Rt(n) {
|
|
449
456
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse";
|
|
450
457
|
}
|
|
451
|
-
function
|
|
458
|
+
function kt(n, i) {
|
|
452
459
|
const { children: t, ...e } = i, r = t !== void 0 ? t : n;
|
|
453
460
|
return { nodes: r == null ? [] : Array.isArray(r) ? r : [r], rest: e };
|
|
454
461
|
}
|
|
455
|
-
class
|
|
462
|
+
class Ft extends B {
|
|
456
463
|
constructor() {
|
|
457
464
|
super(...arguments);
|
|
458
|
-
|
|
465
|
+
u(this, "_sizeHeight");
|
|
459
466
|
}
|
|
460
467
|
children(t) {
|
|
461
|
-
return
|
|
468
|
+
return I(this, t), super.children(t);
|
|
462
469
|
}
|
|
463
470
|
props(t) {
|
|
464
|
-
return t && "children" in t &&
|
|
471
|
+
return t && "children" in t && I(this, t.children), super.props(t);
|
|
465
472
|
}
|
|
466
473
|
sizeHeight(t) {
|
|
467
474
|
return this._sizeHeight = t, this;
|
|
@@ -471,38 +478,38 @@ class Wt extends B {
|
|
|
471
478
|
return this.flexDirection(t === "vertical" ? "column" : "row");
|
|
472
479
|
}
|
|
473
480
|
build() {
|
|
474
|
-
const { nodes: t, rest: e } =
|
|
481
|
+
const { nodes: t, rest: e } = kt(this.processChildren(), this._props), { className: r, style: o, ...s } = e, l = { ...this.getStyle(), ...It(o) };
|
|
475
482
|
this._sizeHeight && (l.height = this._sizeHeight);
|
|
476
|
-
const a = t.map(
|
|
483
|
+
const a = t.map(Ht), f = Rt(l), m = Wt(s["aria-hidden"], s.role), d = ["fibo-line", ...this._classNames, r].filter(Boolean).join(" ");
|
|
477
484
|
if (f && a.length === 0)
|
|
478
|
-
return l.width = l.width ?? "1px", l.alignSelf = l.alignSelf ?? "stretch", l.height == null && (l.height = "100%"),
|
|
485
|
+
return l.width = l.width ?? "1px", l.alignSelf = l.alignSelf ?? "stretch", l.height == null && (l.height = "100%"), m ? p.createElement("div", {
|
|
479
486
|
...s,
|
|
480
487
|
role: "none",
|
|
481
488
|
"aria-hidden": !0,
|
|
482
489
|
"aria-orientation": void 0,
|
|
483
490
|
style: l,
|
|
484
|
-
className:
|
|
485
|
-
}) :
|
|
491
|
+
className: d
|
|
492
|
+
}) : p.createElement("div", {
|
|
486
493
|
...s,
|
|
487
494
|
role: "separator",
|
|
488
495
|
"aria-orientation": "vertical",
|
|
489
496
|
style: l,
|
|
490
|
-
className:
|
|
497
|
+
className: d
|
|
491
498
|
});
|
|
492
499
|
if (a.length === 0)
|
|
493
|
-
return
|
|
500
|
+
return m ? p.createElement("hr", {
|
|
494
501
|
...s,
|
|
495
502
|
role: "none",
|
|
496
503
|
"aria-hidden": !0,
|
|
497
504
|
"aria-orientation": void 0,
|
|
498
505
|
style: l,
|
|
499
|
-
className:
|
|
500
|
-
}) :
|
|
506
|
+
className: d
|
|
507
|
+
}) : p.createElement("hr", {
|
|
501
508
|
...s,
|
|
502
509
|
role: "separator",
|
|
503
510
|
"aria-orientation": "horizontal",
|
|
504
511
|
style: l,
|
|
505
|
-
className:
|
|
512
|
+
className: d
|
|
506
513
|
});
|
|
507
514
|
const c = [
|
|
508
515
|
"fibo-line",
|
|
@@ -512,7 +519,7 @@ class Wt extends B {
|
|
|
512
519
|
...this._classNames,
|
|
513
520
|
r
|
|
514
521
|
].filter(Boolean).join(" ");
|
|
515
|
-
return
|
|
522
|
+
return p.createElement(
|
|
516
523
|
"div",
|
|
517
524
|
{
|
|
518
525
|
...s,
|
|
@@ -523,10 +530,10 @@ class Wt extends B {
|
|
|
523
530
|
);
|
|
524
531
|
}
|
|
525
532
|
}
|
|
526
|
-
const Qt = T(
|
|
533
|
+
const Qt = T(Ft);
|
|
527
534
|
class Et {
|
|
528
535
|
constructor() {
|
|
529
|
-
|
|
536
|
+
u(this, "_node", null);
|
|
530
537
|
}
|
|
531
538
|
/** @internal Attached by ScrollView on mount. */
|
|
532
539
|
attach(i) {
|
|
@@ -593,14 +600,14 @@ function X(n) {
|
|
|
593
600
|
return n === "horizontal" ? "x mandatory" : n === "both" ? "both mandatory" : "y mandatory";
|
|
594
601
|
}
|
|
595
602
|
function jt(n, i) {
|
|
596
|
-
if (!(typeof i != "string" || !
|
|
603
|
+
if (!(typeof i != "string" || !y(i)))
|
|
597
604
|
for (const t of A(i))
|
|
598
605
|
n.bindSignal(t);
|
|
599
606
|
}
|
|
600
|
-
function
|
|
607
|
+
function W(n, i) {
|
|
601
608
|
if (typeof i == "function") {
|
|
602
609
|
try {
|
|
603
|
-
|
|
610
|
+
W(n, i());
|
|
604
611
|
} catch {
|
|
605
612
|
}
|
|
606
613
|
return;
|
|
@@ -610,10 +617,10 @@ function R(n, i) {
|
|
|
610
617
|
return;
|
|
611
618
|
}
|
|
612
619
|
if (Array.isArray(i))
|
|
613
|
-
for (const t of i)
|
|
620
|
+
for (const t of i) W(n, t);
|
|
614
621
|
}
|
|
615
622
|
function Pt(n) {
|
|
616
|
-
return typeof n == "string" &&
|
|
623
|
+
return typeof n == "string" && y(n) ? $(n) : n;
|
|
617
624
|
}
|
|
618
625
|
function Dt(n, i) {
|
|
619
626
|
const { children: t, ...e } = i, r = t !== void 0 ? t : n;
|
|
@@ -644,19 +651,19 @@ function Mt(n) {
|
|
|
644
651
|
class Xt extends B {
|
|
645
652
|
constructor() {
|
|
646
653
|
super(...arguments);
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
+
u(this, "_direction", "vertical");
|
|
655
|
+
u(this, "_scrollbar", "auto");
|
|
656
|
+
u(this, "_controller");
|
|
657
|
+
u(this, "_anchor");
|
|
658
|
+
u(this, "_refresh");
|
|
659
|
+
u(this, "_scrollTargetLayout", !1);
|
|
660
|
+
u(this, "_scrollPosition");
|
|
654
661
|
}
|
|
655
662
|
children(t) {
|
|
656
|
-
return
|
|
663
|
+
return W(this, t), super.children(t);
|
|
657
664
|
}
|
|
658
665
|
props(t) {
|
|
659
|
-
return t && "children" in t &&
|
|
666
|
+
return t && "children" in t && W(this, t.children), super.props(t);
|
|
660
667
|
}
|
|
661
668
|
direction(t) {
|
|
662
669
|
return this._direction = t, this;
|
|
@@ -705,23 +712,23 @@ class Xt extends B {
|
|
|
705
712
|
controller: l,
|
|
706
713
|
direction: a,
|
|
707
714
|
scrollbar: f,
|
|
708
|
-
onScroll:
|
|
709
|
-
...
|
|
710
|
-
} = e, c = Gt(a) ? a : this._direction,
|
|
715
|
+
onScroll: m,
|
|
716
|
+
...d
|
|
717
|
+
} = e, c = Gt(a) ? a : this._direction, h = Kt(f) ? f : this._scrollbar, x = this._controller ?? (l instanceof Et ? l : void 0), R = c === "horizontal" || c === "both", Y = c === "vertical" || c === "both", Z = this.getStyle(), { gap: j, rowGap: P, columnGap: D, ...O } = Z, q = R ? "auto" : "hidden", U = Y ? "auto" : "hidden", g = {
|
|
711
718
|
display: "flex",
|
|
712
719
|
flexDirection: c === "horizontal" ? "row" : "column",
|
|
713
720
|
flexWrap: "nowrap",
|
|
714
721
|
flex: "0 0 auto"
|
|
715
722
|
};
|
|
716
|
-
j != null && (
|
|
717
|
-
const
|
|
723
|
+
j != null && (g.gap = j), P != null && (g.rowGap = P), D != null && (g.columnGap = D), c === "horizontal" ? (g.width = "max-content", g.minHeight = "0px") : c === "both" ? (g.width = "max-content", g.height = "max-content", g.minWidth = "0px", g.minHeight = "0px") : (g.width = "100%", g.maxWidth = "100%", g.minWidth = "0px");
|
|
724
|
+
const k = [
|
|
718
725
|
"fibo-scrollview",
|
|
719
726
|
...this.getClassName().split(" ").filter(Boolean),
|
|
720
727
|
o
|
|
721
728
|
], J = Mt({
|
|
722
729
|
...O,
|
|
723
730
|
...s && typeof s == "object" ? s : {}
|
|
724
|
-
}),
|
|
731
|
+
}), b = {
|
|
725
732
|
WebkitOverflowScrolling: "touch",
|
|
726
733
|
minWidth: "0px",
|
|
727
734
|
minHeight: "0px",
|
|
@@ -732,43 +739,43 @@ class Xt extends B {
|
|
|
732
739
|
overflowX: q,
|
|
733
740
|
overflowY: U
|
|
734
741
|
};
|
|
735
|
-
if (
|
|
736
|
-
|
|
737
|
-
const w =
|
|
738
|
-
(w == null || w === "") && (
|
|
742
|
+
if (h === "hidden" && (k.push("scrollbar-hide"), b.scrollbarWidth = "none", b.msOverflowStyle = "none"), this._anchor) {
|
|
743
|
+
b.scrollSnapAlign = this._anchor;
|
|
744
|
+
const w = b.scrollSnapType ?? b["scroll-snap-type"];
|
|
745
|
+
(w == null || w === "") && (b.scrollSnapType = X(c));
|
|
739
746
|
}
|
|
740
747
|
const C = this._scrollPosition, Q = Vt(
|
|
741
748
|
(w) => {
|
|
742
|
-
|
|
743
|
-
const it = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(C) : C.replace(/"/g, '\\"'),
|
|
749
|
+
x == null || x.attach(w), w && C && requestAnimationFrame(() => {
|
|
750
|
+
const it = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(C) : C.replace(/"/g, '\\"'), F = w.querySelector(
|
|
744
751
|
`[data-scroll-id="${it}"]`
|
|
745
752
|
);
|
|
746
|
-
|
|
753
|
+
F == null || F.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
747
754
|
});
|
|
748
755
|
},
|
|
749
756
|
r
|
|
750
|
-
), V = this._refresh, tt =
|
|
757
|
+
), V = this._refresh, tt = p.createElement(
|
|
751
758
|
"div",
|
|
752
|
-
{ className: "fibo-scroll-inner", style:
|
|
759
|
+
{ className: "fibo-scroll-inner", style: g },
|
|
753
760
|
...t
|
|
754
761
|
);
|
|
755
|
-
this._scrollTargetLayout && (
|
|
756
|
-
const G =
|
|
762
|
+
this._scrollTargetLayout && (k.push("fibo-scroll-target-layout"), b.scrollSnapType == null && (b.scrollSnapType = X(c)));
|
|
763
|
+
const G = p.createElement(
|
|
757
764
|
"div",
|
|
758
765
|
{
|
|
759
|
-
...
|
|
766
|
+
...d,
|
|
760
767
|
...this._anchor ? { "data-scroll-anchor": this._anchor } : {},
|
|
761
768
|
...this._scrollTargetLayout ? { "data-scroll-target-layout": "1" } : {},
|
|
762
769
|
...C ? { "data-scroll-position": C } : {},
|
|
763
770
|
"data-fibo-scroll-host": "",
|
|
764
|
-
className:
|
|
765
|
-
style:
|
|
771
|
+
className: k.filter(Boolean).join(" "),
|
|
772
|
+
style: b,
|
|
766
773
|
ref: Q,
|
|
767
|
-
onScroll:
|
|
774
|
+
onScroll: m
|
|
768
775
|
},
|
|
769
776
|
tt
|
|
770
777
|
);
|
|
771
|
-
return !V || c === "horizontal" ? G :
|
|
778
|
+
return !V || c === "horizontal" ? G : p.createElement(lt, {
|
|
772
779
|
onRefresh: V,
|
|
773
780
|
children: G
|
|
774
781
|
});
|
|
@@ -2,7 +2,7 @@ var w = Object.defineProperty;
|
|
|
2
2
|
var S = (s, e, t) => e in s ? w(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var r = (s, e, t) => S(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import m from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { b4 as g, b5 as d, bc as N, bd as C, be as j, b9 as z, b8 as _, bb as B } from "./client-CNrWulRU.js";
|
|
6
6
|
function I(s, e) {
|
|
7
7
|
if (!(typeof e != "string" || !_(e)))
|
|
8
8
|
for (const t of B(e))
|