fiboui 2.2.1 → 2.2.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-uhDvqyeZ.js → FineGrain-BEvB51B2.js} +1 -1
- package/dist/{builder-KX69ixME.js → builder-3Bc2PfP9.js} +4 -0
- package/dist/content.js +3 -3
- package/dist/core.js +3 -3
- package/dist/{index-Dj85aIkg.js → index-BObp1JkM.js} +27 -20
- package/dist/{index-hNxXTy6z.js → index-BlciuWzU.js} +5 -4
- package/dist/{index-CgPc0zLh.js → index-CZQ5erLU.js} +3 -2
- package/dist/{index-Cud42ieq.js → index-Cae2Rtx1.js} +1 -1
- package/dist/{index-D7exw6yn.js → index-CxbrZGXa.js} +3 -3
- package/dist/{index-D0tQrTAU.js → index-DbjaknWm.js} +83 -59
- package/dist/{index-B7jJYOv5.js → index-DgRpEUs0.js} +4 -4
- package/dist/index.d.ts +18 -0
- package/dist/index.js +430 -384
- package/dist/interactive.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/{mount-DX2mgYvd.js → mount-D59e1COl.js} +1 -1
- package/dist/structure.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -463,6 +463,8 @@ const F = `
|
|
|
463
463
|
.fibo-stagger-item { display: contents; }
|
|
464
464
|
|
|
465
465
|
.fibo-reveal {
|
|
466
|
+
min-width: 0;
|
|
467
|
+
max-width: 100%;
|
|
466
468
|
opacity: 0;
|
|
467
469
|
transform: translate3d(0, 12px, 0);
|
|
468
470
|
transition-property: opacity, transform, filter;
|
|
@@ -1448,6 +1450,8 @@ function oe({
|
|
|
1448
1450
|
const l = [
|
|
1449
1451
|
"fibo-reveal",
|
|
1450
1452
|
`fibo-reveal-${r}`,
|
|
1453
|
+
// min-w-0 only — do NOT force w-full (breaks horizontal ScrollView / carousel slides)
|
|
1454
|
+
"min-w-0",
|
|
1451
1455
|
i ? "fibo-motion-force" : ""
|
|
1452
1456
|
].filter(Boolean).join(" ");
|
|
1453
1457
|
return g.createElement("div", { ref: a, className: l, "data-fibo-reveal": r }, n);
|
package/dist/content.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { b as s, A as r, B as o, I as t, c as n, L as I, P as g, a as l, S as m } from "./index-
|
|
3
|
-
import { T as x } from "./index-
|
|
4
|
-
import { I as f } from "./index-
|
|
2
|
+
import { b as s, A as r, B as o, I as t, c as n, L as I, P as g, a as l, S as m } from "./index-DgRpEUs0.js";
|
|
3
|
+
import { T as x } from "./index-BObp1JkM.js";
|
|
4
|
+
import { I as f } from "./index-CZQ5erLU.js";
|
|
5
5
|
export {
|
|
6
6
|
s as Alert,
|
|
7
7
|
r as Avatar,
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as a, F as r, M as o, p as t, O as i, d as l, P as n, R as u, f as p, h as S, S as c, V as g, c as b, b as v, a as d, t as m, g as T, q as R, v as P, o as F, n as y, r as C, i as E, s as f, m as M, j as O, l as x, k as V, u as B, e as h } from "./builder-
|
|
3
|
-
import { E as k, l as w, F as A, k as I, P as q, c as G, j as N, m as W, t as _, g as z, b as D, h as H, a as J, i as K, u as L, e as Q, f as U, d as X } from "./mount-
|
|
4
|
-
import { F as Z, b as $ } from "./FineGrain-
|
|
2
|
+
import { C as a, F as r, M as o, p as t, O as i, d as l, P as n, R as u, f as p, h as S, S as c, V as g, c as b, b as v, a as d, t as m, g as T, q as R, v as P, o as F, n as y, r as C, i as E, s as f, m as M, j as O, l as x, k as V, u as B, e as h } from "./builder-3Bc2PfP9.js";
|
|
3
|
+
import { E as k, l as w, F as A, k as I, P as q, c as G, j as N, m as W, t as _, g as z, b as D, h as H, a as J, i as K, u as L, e as Q, f as U, d as X } from "./mount-D59e1COl.js";
|
|
4
|
+
import { F as Z, b as $ } from "./FineGrain-BEvB51B2.js";
|
|
5
5
|
export {
|
|
6
6
|
a as ComputedSignal,
|
|
7
7
|
k as Easing,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var o = (i, e, t) =>
|
|
5
|
-
import
|
|
6
|
-
import { w as c, x as f } from "./builder-
|
|
7
|
-
import { F as g } from "./FineGrain-
|
|
2
|
+
var m = Object.defineProperty;
|
|
3
|
+
var p = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
4
|
+
var o = (i, e, t) => p(i, typeof e != "symbol" ? e + "" : e, t);
|
|
5
|
+
import h from "react";
|
|
6
|
+
import { w as c, x as f } from "./builder-3Bc2PfP9.js";
|
|
7
|
+
import { F as g } from "./FineGrain-BEvB51B2.js";
|
|
8
8
|
const y = {
|
|
9
9
|
h1: { fontSize: "2.25rem", fontWeight: 700, letterSpacing: "-0.025em", lineHeight: 1.2 },
|
|
10
10
|
h2: { fontSize: "1.875rem", fontWeight: 700, letterSpacing: "-0.025em", lineHeight: 1.25 },
|
|
@@ -17,10 +17,17 @@ const y = {
|
|
|
17
17
|
label: { fontSize: "0.875rem", fontWeight: 500, lineHeight: 1.4 }
|
|
18
18
|
};
|
|
19
19
|
function r(i, e) {
|
|
20
|
-
return {
|
|
20
|
+
return {
|
|
21
|
+
margin: 0,
|
|
22
|
+
overflowWrap: "anywhere",
|
|
23
|
+
wordBreak: "break-word",
|
|
24
|
+
maxWidth: "100%",
|
|
25
|
+
...y[i],
|
|
26
|
+
...e
|
|
27
|
+
};
|
|
21
28
|
}
|
|
22
|
-
const u =
|
|
23
|
-
const { text: e, type: t, className:
|
|
29
|
+
const u = h.memo((i) => {
|
|
30
|
+
const { text: e, type: t, className: n, style: s, ...a } = i, l = {
|
|
24
31
|
h1: "h1",
|
|
25
32
|
h2: "h2",
|
|
26
33
|
h3: "h3",
|
|
@@ -31,11 +38,11 @@ const u = s.memo((i) => {
|
|
|
31
38
|
caption: "span",
|
|
32
39
|
label: "label"
|
|
33
40
|
};
|
|
34
|
-
return
|
|
41
|
+
return h.createElement(
|
|
35
42
|
l[t],
|
|
36
43
|
{
|
|
37
|
-
className: `fibo-text fibo-text-${t} ${
|
|
38
|
-
style: r(t,
|
|
44
|
+
className: `fibo-text fibo-text-${t} min-w-0 ${n}`,
|
|
45
|
+
style: r(t, s),
|
|
39
46
|
...a
|
|
40
47
|
},
|
|
41
48
|
e
|
|
@@ -79,26 +86,26 @@ class x extends f {
|
|
|
79
86
|
label: "label"
|
|
80
87
|
};
|
|
81
88
|
if (typeof this._text == "function") {
|
|
82
|
-
const
|
|
83
|
-
return
|
|
84
|
-
compute:
|
|
89
|
+
const s = this._text;
|
|
90
|
+
return h.createElement(g, {
|
|
91
|
+
compute: s,
|
|
85
92
|
as: t[this._type],
|
|
86
|
-
className: `fibo-text fibo-text-${this._type} ${this.getClassName()}`,
|
|
93
|
+
className: `fibo-text fibo-text-${this._type} min-w-0 ${this.getClassName()}`,
|
|
87
94
|
style: r(this._type, this.getStyle()),
|
|
88
95
|
...this._props
|
|
89
96
|
});
|
|
90
97
|
}
|
|
91
|
-
const
|
|
98
|
+
const n = {
|
|
92
99
|
text: this._text,
|
|
93
100
|
type: this._type,
|
|
94
101
|
className: this.getClassName(),
|
|
95
102
|
style: this.getStyle(),
|
|
96
103
|
...this._props
|
|
97
104
|
};
|
|
98
|
-
return
|
|
105
|
+
return h.createElement(u, n);
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
|
-
const
|
|
108
|
+
const W = c(x);
|
|
102
109
|
export {
|
|
103
|
-
|
|
110
|
+
W as T
|
|
104
111
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import o from "react";
|
|
3
|
-
import { w as
|
|
3
|
+
import { w as l, x as i } from "./builder-3Bc2PfP9.js";
|
|
4
4
|
const a = o.memo((r) => {
|
|
5
5
|
const { className: c, style: e, children: s, ...t } = r;
|
|
6
6
|
return o.createElement(
|
|
@@ -17,17 +17,18 @@ class m extends i {
|
|
|
17
17
|
build() {
|
|
18
18
|
const e = [
|
|
19
19
|
"fibo-box",
|
|
20
|
+
"min-w-0",
|
|
20
21
|
...this._classNames
|
|
21
|
-
].filter(Boolean).join(" "), s = this.getStyle(), t = this.processChildren(),
|
|
22
|
+
].filter(Boolean).join(" "), s = this.getStyle(), t = this.processChildren(), n = {
|
|
22
23
|
className: e,
|
|
23
24
|
style: s,
|
|
24
25
|
children: t,
|
|
25
26
|
...this._props
|
|
26
27
|
};
|
|
27
|
-
return o.createElement(a,
|
|
28
|
+
return o.createElement(a, n);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
|
-
const B =
|
|
31
|
+
const B = l(m);
|
|
31
32
|
export {
|
|
32
33
|
B
|
|
33
34
|
};
|
|
@@ -3,7 +3,7 @@ var m = Object.defineProperty;
|
|
|
3
3
|
var p = (e, t, s) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
4
4
|
var r = (e, t, s) => p(e, typeof t != "symbol" ? t + "" : t, s);
|
|
5
5
|
import o from "react";
|
|
6
|
-
import { w as a, x as u } from "./builder-
|
|
6
|
+
import { w as a, x as u } from "./builder-3Bc2PfP9.js";
|
|
7
7
|
class g extends u {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -40,7 +40,8 @@ class g extends u {
|
|
|
40
40
|
"fibo-row",
|
|
41
41
|
"flex",
|
|
42
42
|
"flex-row",
|
|
43
|
-
|
|
43
|
+
// min-w-0: flex item can shrink below content intrinsic width (grid/flex overflow)
|
|
44
|
+
this.isHug() ? "w-auto self-auto shrink-0" : "w-full min-w-0 self-stretch",
|
|
44
45
|
s[this._mainAxisAlignment],
|
|
45
46
|
i[this._crossAxisAlignment],
|
|
46
47
|
...this._classNames
|
|
@@ -3,7 +3,7 @@ var H = Object.defineProperty;
|
|
|
3
3
|
var O = (c, l, e) => l in c ? H(c, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[l] = e;
|
|
4
4
|
var r = (c, l, e) => O(c, typeof l != "symbol" ? l + "" : l, e);
|
|
5
5
|
import t, { useState as M, useEffect as j, useRef as F } from "react";
|
|
6
|
-
import { w as $, x as D, S as P } from "./builder-
|
|
6
|
+
import { w as $, x as D, S as P } from "./builder-3Bc2PfP9.js";
|
|
7
7
|
import { t as L } from "./bundle-mjs-wppB-TKB.js";
|
|
8
8
|
const q = t.memo((c) => {
|
|
9
9
|
const {
|
|
@@ -3,10 +3,10 @@ var oe = Object.defineProperty;
|
|
|
3
3
|
var le = (n, s, e) => s in n ? oe(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var i = (n, s, e) => le(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import t, { useState as D, useRef as L, useLayoutEffect as Z, useEffect as ce } from "react";
|
|
6
|
-
import { w, x as I, G as T, H as q } from "./builder-
|
|
7
|
-
import { B as C } from "./index-
|
|
6
|
+
import { w, x as I, G as T, H as q } from "./builder-3Bc2PfP9.js";
|
|
7
|
+
import { B as C } from "./index-BlciuWzU.js";
|
|
8
8
|
import { t as de } from "./bundle-mjs-wppB-TKB.js";
|
|
9
|
-
import { T as me } from "./index-
|
|
9
|
+
import { T as me } from "./index-BObp1JkM.js";
|
|
10
10
|
const he = t.memo((n) => {
|
|
11
11
|
const { text: s, subtitle: e, number: r, color: d, className: p, style: c, children: u, ...g } = n;
|
|
12
12
|
return t.createElement(
|
|
@@ -3,12 +3,12 @@ var G = Object.defineProperty;
|
|
|
3
3
|
var X = (n, s, e) => s in n ? G(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var r = (n, s, e) => X(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import i, { useState as V, useRef as D, useLayoutEffect as q } from "react";
|
|
6
|
-
import { w as
|
|
6
|
+
import { w as _, x as b, I as J, G as F, P as K } from "./builder-3Bc2PfP9.js";
|
|
7
7
|
import { P as W } from "./PluginManager-D5-ApsSN.js";
|
|
8
|
-
import { R as Q, I as U } from "./index-
|
|
9
|
-
import { T as ee } from "./index-
|
|
8
|
+
import { R as Q, I as U } from "./index-CZQ5erLU.js";
|
|
9
|
+
import { T as ee } from "./index-BObp1JkM.js";
|
|
10
10
|
import { e as te, L as ie } from "./Link-ElmaMZB8.js";
|
|
11
|
-
class se extends
|
|
11
|
+
class se extends b {
|
|
12
12
|
build() {
|
|
13
13
|
const e = [
|
|
14
14
|
"fibo-center",
|
|
@@ -28,8 +28,8 @@ class se extends _ {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
class re extends
|
|
31
|
+
const Ie = _(se);
|
|
32
|
+
class re extends b {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
r(this, "_mainAxisAlignment", "start");
|
|
@@ -71,7 +71,8 @@ class re extends _ {
|
|
|
71
71
|
"fibo-column",
|
|
72
72
|
"flex",
|
|
73
73
|
"flex-col",
|
|
74
|
-
|
|
74
|
+
// min-w-0: allow shrink inside flex/grid so wide children (tables, nowrap) don't blow the track
|
|
75
|
+
this.isHug() ? "w-auto self-auto" : "w-full min-w-0",
|
|
75
76
|
e[this._mainAxisAlignment],
|
|
76
77
|
t[this._crossAxisAlignment],
|
|
77
78
|
this._size ? o[this._size] : "",
|
|
@@ -90,8 +91,8 @@ class re extends _ {
|
|
|
90
91
|
);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
|
-
const
|
|
94
|
-
class ne extends
|
|
94
|
+
const Se = _(re);
|
|
95
|
+
class ne extends b {
|
|
95
96
|
build() {
|
|
96
97
|
const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
|
|
97
98
|
return i.createElement(
|
|
@@ -105,8 +106,8 @@ class ne extends _ {
|
|
|
105
106
|
);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
const
|
|
109
|
-
class
|
|
109
|
+
const He = _(ne);
|
|
110
|
+
class oe extends b {
|
|
110
111
|
constructor() {
|
|
111
112
|
super(...arguments);
|
|
112
113
|
r(this, "_height");
|
|
@@ -136,7 +137,7 @@ class le extends _ {
|
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
const
|
|
140
|
+
const ze = _(oe), le = i.memo((n) => {
|
|
140
141
|
const {
|
|
141
142
|
theme: s,
|
|
142
143
|
locale: e,
|
|
@@ -149,7 +150,7 @@ const He = p(le), oe = i.memo((n) => {
|
|
|
149
150
|
s && f.set("theme", s), e && f.set("locale", e), Object.entries(t).forEach(([B, w]) => {
|
|
150
151
|
f.set(B, w);
|
|
151
152
|
});
|
|
152
|
-
const
|
|
153
|
+
const p = i.createElement(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
156
|
className: `fibo-scaffold ${o || ""}`,
|
|
@@ -169,11 +170,11 @@ const He = p(le), oe = i.memo((n) => {
|
|
|
169
170
|
K,
|
|
170
171
|
{
|
|
171
172
|
providers: f,
|
|
172
|
-
children:
|
|
173
|
+
children: p
|
|
173
174
|
}
|
|
174
|
-
) :
|
|
175
|
+
) : p;
|
|
175
176
|
});
|
|
176
|
-
class ae extends
|
|
177
|
+
class ae extends b {
|
|
177
178
|
constructor() {
|
|
178
179
|
super(...arguments);
|
|
179
180
|
r(this, "_locale");
|
|
@@ -222,7 +223,7 @@ class ae extends _ {
|
|
|
222
223
|
}
|
|
223
224
|
build() {
|
|
224
225
|
var N, C, z, j, y, E, I, L, R, $, A, O, l, a, m, g, S, M, H, P, T, Y;
|
|
225
|
-
const e = this.processChildren(), t = this._structure, o = this._headerBar && ((N = t.header) == null ? void 0 : N.visible) !== !1, h = this._footerBar && ((C = t.footer) == null ? void 0 : C.visible) !== !1, c = this._sideBarLeft && ((z = t.sidebarLeft) == null ? void 0 : z.visible) !== !1, d = this._sideBarRight && ((j = t.sidebarRight) == null ? void 0 : j.visible) !== !1, f = c && ((y = t.sidebarLeft) == null ? void 0 : y.fullHeight),
|
|
226
|
+
const e = this.processChildren(), t = this._structure, o = this._headerBar && ((N = t.header) == null ? void 0 : N.visible) !== !1, h = this._footerBar && ((C = t.footer) == null ? void 0 : C.visible) !== !1, c = this._sideBarLeft && ((z = t.sidebarLeft) == null ? void 0 : z.visible) !== !1, d = this._sideBarRight && ((j = t.sidebarRight) == null ? void 0 : j.visible) !== !1, f = c && ((y = t.sidebarLeft) == null ? void 0 : y.fullHeight), p = d && ((E = t.sidebarRight) == null ? void 0 : E.fullHeight), B = i.createElement(
|
|
226
227
|
"div",
|
|
227
228
|
{
|
|
228
229
|
key: "scaffold-middle",
|
|
@@ -258,7 +259,7 @@ class ae extends _ {
|
|
|
258
259
|
position: "relative"
|
|
259
260
|
}
|
|
260
261
|
}, e),
|
|
261
|
-
d && !
|
|
262
|
+
d && !p && i.createElement("div", {
|
|
262
263
|
key: "sidebar-right",
|
|
263
264
|
className: "z-20",
|
|
264
265
|
style: {
|
|
@@ -325,7 +326,7 @@ class ae extends _ {
|
|
|
325
326
|
}
|
|
326
327
|
}, this._sideBarLeft.content),
|
|
327
328
|
u
|
|
328
|
-
])),
|
|
329
|
+
])), p && (u = i.createElement("div", {
|
|
329
330
|
key: "full-height-right-wrapper",
|
|
330
331
|
style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
|
|
331
332
|
}, [
|
|
@@ -350,10 +351,10 @@ class ae extends _ {
|
|
|
350
351
|
children: u,
|
|
351
352
|
overlays: x
|
|
352
353
|
};
|
|
353
|
-
return i.createElement(
|
|
354
|
+
return i.createElement(le, v);
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
|
-
const
|
|
357
|
+
const Le = _(ae), he = i.memo((n) => {
|
|
357
358
|
const { height: s = 64, sticky: e, className: t, style: o, children: h, ...c } = n;
|
|
358
359
|
return i.createElement(
|
|
359
360
|
"header",
|
|
@@ -365,7 +366,7 @@ const ze = p(ae), he = i.memo((n) => {
|
|
|
365
366
|
h
|
|
366
367
|
);
|
|
367
368
|
});
|
|
368
|
-
class ce extends
|
|
369
|
+
class ce extends b {
|
|
369
370
|
constructor() {
|
|
370
371
|
super(...arguments);
|
|
371
372
|
r(this, "_height", 64);
|
|
@@ -406,8 +407,8 @@ class ce extends _ {
|
|
|
406
407
|
return i.createElement(he, e);
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
const
|
|
410
|
-
const { width: s = 260, collapsed: e, className: t, style: o, children: h, ...c } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? "",
|
|
410
|
+
const Re = _(ce), de = i.memo((n) => {
|
|
411
|
+
const { width: s = 260, collapsed: e, className: t, style: o, children: h, ...c } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? "", p = e ? 80 : s, w = W.getInstance().getSidebarItems().map((u, k) => {
|
|
411
412
|
const x = f === u.path;
|
|
412
413
|
return i.createElement(ie, {
|
|
413
414
|
key: `plugin-item-${u.path || k}`,
|
|
@@ -426,14 +427,14 @@ const Le = p(ce), de = i.memo((n) => {
|
|
|
426
427
|
"aside",
|
|
427
428
|
{
|
|
428
429
|
className: `flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${t || ""}`,
|
|
429
|
-
style: { width:
|
|
430
|
+
style: { width: p, minWidth: p, ...o },
|
|
430
431
|
...c
|
|
431
432
|
},
|
|
432
433
|
h,
|
|
433
434
|
w
|
|
434
435
|
);
|
|
435
436
|
});
|
|
436
|
-
class fe extends
|
|
437
|
+
class fe extends b {
|
|
437
438
|
constructor() {
|
|
438
439
|
super(...arguments);
|
|
439
440
|
r(this, "_width", 260);
|
|
@@ -457,7 +458,7 @@ class fe extends _ {
|
|
|
457
458
|
return i.createElement(de, e);
|
|
458
459
|
}
|
|
459
460
|
}
|
|
460
|
-
const
|
|
461
|
+
const $e = _(fe), ue = i.memo((n) => {
|
|
461
462
|
const { sidebar: s, header: e, children: t, className: o, style: h, ...c } = n, [d, f] = V(!1);
|
|
462
463
|
return i.createElement(
|
|
463
464
|
"div",
|
|
@@ -509,7 +510,7 @@ const Re = p(fe), ue = i.memo((n) => {
|
|
|
509
510
|
)
|
|
510
511
|
);
|
|
511
512
|
});
|
|
512
|
-
class me extends
|
|
513
|
+
class me extends b {
|
|
513
514
|
constructor() {
|
|
514
515
|
super(...arguments);
|
|
515
516
|
r(this, "_sidebar");
|
|
@@ -533,8 +534,8 @@ class me extends _ {
|
|
|
533
534
|
return i.createElement(ue, e);
|
|
534
535
|
}
|
|
535
536
|
}
|
|
536
|
-
const
|
|
537
|
-
class ge extends
|
|
537
|
+
const Ae = _(me);
|
|
538
|
+
class ge extends b {
|
|
538
539
|
constructor() {
|
|
539
540
|
super(...arguments);
|
|
540
541
|
r(this, "_alignment", "center");
|
|
@@ -573,8 +574,8 @@ class ge extends _ {
|
|
|
573
574
|
);
|
|
574
575
|
}
|
|
575
576
|
}
|
|
576
|
-
const
|
|
577
|
-
class pe extends
|
|
577
|
+
const Oe = _(ge);
|
|
578
|
+
class pe extends b {
|
|
578
579
|
constructor() {
|
|
579
580
|
super(...arguments);
|
|
580
581
|
r(this, "_sizeHeight");
|
|
@@ -597,12 +598,19 @@ class pe extends _ {
|
|
|
597
598
|
);
|
|
598
599
|
}
|
|
599
600
|
}
|
|
600
|
-
const
|
|
601
|
-
|
|
601
|
+
const je = _(pe);
|
|
602
|
+
function _e(...n) {
|
|
603
|
+
return (s) => {
|
|
604
|
+
for (const e of n)
|
|
605
|
+
e && (typeof e == "function" ? e(s) : e.current = s);
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
class be extends b {
|
|
602
609
|
constructor() {
|
|
603
610
|
super(...arguments);
|
|
604
611
|
r(this, "_direction", "vertical");
|
|
605
612
|
r(this, "_scrollbar", "auto");
|
|
613
|
+
r(this, "_controller");
|
|
606
614
|
}
|
|
607
615
|
direction(e) {
|
|
608
616
|
return this._direction = e, this;
|
|
@@ -616,6 +624,10 @@ class _e extends _ {
|
|
|
616
624
|
scrollbar(e) {
|
|
617
625
|
return this._scrollbar = e, this;
|
|
618
626
|
}
|
|
627
|
+
/** Attach a ScrollController for programmatic scroll (carousel prev/next). */
|
|
628
|
+
controller(e) {
|
|
629
|
+
return this._controller = e, this;
|
|
630
|
+
}
|
|
619
631
|
build() {
|
|
620
632
|
const e = {
|
|
621
633
|
overflowX: this._direction === "horizontal" || this._direction === "both" ? "auto" : "hidden",
|
|
@@ -624,15 +636,27 @@ class _e extends _ {
|
|
|
624
636
|
display: "flex",
|
|
625
637
|
flexDirection: this._direction === "horizontal" ? "row" : "column",
|
|
626
638
|
...this.getStyle()
|
|
627
|
-
}, t = [...this.getClassName().split(" ")];
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
639
|
+
}, t = [...this.getClassName().split(" ").filter(Boolean)];
|
|
640
|
+
this._scrollbar === "hidden" && (t.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none");
|
|
641
|
+
const o = this._controller, h = this._props.ref, { ref: c, ...d } = this._props, f = _e(
|
|
642
|
+
(p) => {
|
|
643
|
+
o == null || o.attach(p);
|
|
644
|
+
},
|
|
645
|
+
h
|
|
646
|
+
);
|
|
647
|
+
return i.createElement(
|
|
648
|
+
"div",
|
|
649
|
+
{
|
|
650
|
+
className: t.join(" "),
|
|
651
|
+
style: e,
|
|
652
|
+
ref: f,
|
|
653
|
+
...d
|
|
654
|
+
},
|
|
655
|
+
...this.processChildren()
|
|
656
|
+
);
|
|
633
657
|
}
|
|
634
658
|
}
|
|
635
|
-
const
|
|
659
|
+
const Me = _(be), ye = i.memo((n) => {
|
|
636
660
|
const {
|
|
637
661
|
children: s,
|
|
638
662
|
itemHeight: e,
|
|
@@ -642,7 +666,7 @@ const je = p(_e), be = i.memo((n) => {
|
|
|
642
666
|
containerHeight: c = 500,
|
|
643
667
|
className: d,
|
|
644
668
|
style: f
|
|
645
|
-
} = n, [
|
|
669
|
+
} = n, [p, B] = V(0), w = D(null), u = D(/* @__PURE__ */ new Map()), k = D(/* @__PURE__ */ new Map()), x = s.length, v = e !== void 0, N = (l) => v ? e : k.current.get(l) ?? t, C = (l) => {
|
|
646
670
|
if (v)
|
|
647
671
|
return l * e;
|
|
648
672
|
let a = 0;
|
|
@@ -665,14 +689,14 @@ const je = p(_e), be = i.memo((n) => {
|
|
|
665
689
|
C(g) < l ? a = g + 1 : m = g;
|
|
666
690
|
}
|
|
667
691
|
return Math.max(0, a - 1);
|
|
668
|
-
})(
|
|
692
|
+
})(p) - h);
|
|
669
693
|
let E;
|
|
670
694
|
if (v) {
|
|
671
695
|
const l = Math.ceil(c / e);
|
|
672
696
|
E = Math.min(x, y + l + h * 2);
|
|
673
697
|
} else {
|
|
674
698
|
let l = C(y), a = y;
|
|
675
|
-
for (; l <
|
|
699
|
+
for (; l < p + c + h * t && a < x; )
|
|
676
700
|
l += N(a), a++;
|
|
677
701
|
E = Math.min(x, a);
|
|
678
702
|
}
|
|
@@ -740,7 +764,7 @@ const je = p(_e), be = i.memo((n) => {
|
|
|
740
764
|
)
|
|
741
765
|
);
|
|
742
766
|
});
|
|
743
|
-
class
|
|
767
|
+
class xe extends b {
|
|
744
768
|
constructor() {
|
|
745
769
|
super(...arguments);
|
|
746
770
|
r(this, "_itemHeight");
|
|
@@ -775,21 +799,21 @@ class ye extends _ {
|
|
|
775
799
|
className: this.getClassName(),
|
|
776
800
|
style: this.getStyle()
|
|
777
801
|
};
|
|
778
|
-
return i.createElement(
|
|
802
|
+
return i.createElement(ye, t);
|
|
779
803
|
}
|
|
780
804
|
}
|
|
781
|
-
const
|
|
805
|
+
const Pe = _(xe);
|
|
782
806
|
export {
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
807
|
+
Ie as C,
|
|
808
|
+
Ae as D,
|
|
809
|
+
Re as H,
|
|
810
|
+
je as L,
|
|
811
|
+
ze as S,
|
|
812
|
+
Pe as V,
|
|
813
|
+
Oe as Z,
|
|
814
|
+
Se as a,
|
|
815
|
+
He as b,
|
|
816
|
+
Le as c,
|
|
817
|
+
$e as d,
|
|
818
|
+
Me as e
|
|
795
819
|
};
|
|
@@ -3,10 +3,10 @@ var U = Object.defineProperty;
|
|
|
3
3
|
var G = (n, s, e) => s in n ? U(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var r = (n, s, e) => G(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import t from "react";
|
|
6
|
-
import { w as C, x as F } from "./builder-
|
|
7
|
-
import { B as j } from "./index-
|
|
8
|
-
import { T as O } from "./index-
|
|
9
|
-
import { R as J } from "./index-
|
|
6
|
+
import { w as C, x as F } from "./builder-3Bc2PfP9.js";
|
|
7
|
+
import { B as j } from "./index-BlciuWzU.js";
|
|
8
|
+
import { T as O } from "./index-BObp1JkM.js";
|
|
9
|
+
import { R as J } from "./index-CZQ5erLU.js";
|
|
10
10
|
import { jsxs as $, jsx as f } from "react/jsx-runtime";
|
|
11
11
|
const K = ({ size: n }) => t.createElement(
|
|
12
12
|
"svg",
|
package/dist/index.d.ts
CHANGED
|
@@ -11358,15 +11358,33 @@ export declare const Line: () => LineBuilder & {
|
|
|
11358
11358
|
colorRendering: (value: import("csstype").Property.ColorRendering | undefined) => LineBuilder & /*elided*/ any & React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
11359
11359
|
glyphOrientationVertical: (value: import("csstype").Property.GlyphOrientationVertical | undefined) => LineBuilder & /*elided*/ any & React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
11360
11360
|
} & React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
11361
|
+
/** Flutter-style handle for a mounted ScrollView — no document.querySelector. */
|
|
11362
|
+
export declare class ScrollController {
|
|
11363
|
+
private _node;
|
|
11364
|
+
/** @internal Attached by ScrollView on mount. */
|
|
11365
|
+
attach(node: HTMLElement | null): void;
|
|
11366
|
+
get node(): HTMLElement | null;
|
|
11367
|
+
scrollBy(options: ScrollToOptions): void;
|
|
11368
|
+
scrollTo(options: ScrollToOptions): void;
|
|
11369
|
+
/**
|
|
11370
|
+
* Carousel step: scroll by the first child's outer width (+ gap).
|
|
11371
|
+
* Prefer this over measuring in app code.
|
|
11372
|
+
*/
|
|
11373
|
+
scrollByChild(dir?: -1 | 1, gap?: number): void;
|
|
11374
|
+
scrollToChild(index: number, gap?: number): void;
|
|
11375
|
+
}
|
|
11361
11376
|
type ScrollDirection = "vertical" | "horizontal" | "both";
|
|
11362
11377
|
type ScrollbarVisibility = "hidden" | "visible" | "auto";
|
|
11363
11378
|
declare class ScrollViewBuilder extends FiboBuilder {
|
|
11364
11379
|
private _direction;
|
|
11365
11380
|
private _scrollbar;
|
|
11381
|
+
private _controller?;
|
|
11366
11382
|
direction(direction: ScrollDirection): this;
|
|
11367
11383
|
horizontal(): this;
|
|
11368
11384
|
vertical(): this;
|
|
11369
11385
|
scrollbar(visibility: ScrollbarVisibility): this;
|
|
11386
|
+
/** Attach a ScrollController for programmatic scroll (carousel prev/next). */
|
|
11387
|
+
controller(controller: ScrollController): this;
|
|
11370
11388
|
build(): React$1.ReactElement;
|
|
11371
11389
|
}
|
|
11372
11390
|
export declare const ScrollView: () => ScrollViewBuilder & {
|