fiboui 2.0.0 → 2.2.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 +23 -22
- package/dist/{FineGrain-kBxv0WeR.js → FineGrain-6w615KQw.js} +4 -4
- package/dist/builder-KLTu7nAI.js +2476 -0
- package/dist/content.js +3 -3
- package/dist/core.js +49 -29
- package/dist/{index-B1av7e36.js → index-BN2z9MuJ.js} +317 -308
- package/dist/{index-DKFr-sai.js → index-CYnY7jAX.js} +3 -3
- package/dist/{index-Dm4j2mMM.js → index-CbTvwN9K.js} +4 -4
- package/dist/{index-BQGRpkzR.js → index-CdJvNseK.js} +3 -3
- package/dist/{index-yeYkDTAx.js → index-DU2MC5u3.js} +143 -126
- package/dist/index-DhPBYTPt.js +104 -0
- package/dist/{index-RbfIZuAo.js → index-ijbJR6lD.js} +1 -1
- package/dist/index.d.ts +43188 -42071
- package/dist/index.js +462 -420
- package/dist/interactive.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/mount-D5gt_GWO.js +331 -0
- package/dist/structure.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +5 -1
- package/dist/builder-DjLYXkXu.js +0 -1842
- package/dist/index-CTRZRn9S.js +0 -90
- package/dist/mount-sAVX_FBU.js +0 -95
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import o from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { v as n, F as i } from "./builder-KLTu7nAI.js";
|
|
4
4
|
const a = o.memo((r) => {
|
|
5
5
|
const { className: c, style: e, children: s, ...t } = r;
|
|
6
6
|
return o.createElement(
|
|
@@ -27,7 +27,7 @@ class m extends i {
|
|
|
27
27
|
return o.createElement(a, l);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const B = n(m);
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
B
|
|
33
33
|
};
|
|
@@ -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 {
|
|
7
|
-
import { B as j } from "./index-
|
|
8
|
-
import { T as O } from "./index-
|
|
9
|
-
import { R as J } from "./index-
|
|
6
|
+
import { v as C, F } from "./builder-KLTu7nAI.js";
|
|
7
|
+
import { B as j } from "./index-CYnY7jAX.js";
|
|
8
|
+
import { T as O } from "./index-DhPBYTPt.js";
|
|
9
|
+
import { R as J } from "./index-ijbJR6lD.js";
|
|
10
10
|
import { jsxs as $, jsx as f } from "react/jsx-runtime";
|
|
11
11
|
const K = ({ size: n }) => t.createElement(
|
|
12
12
|
"svg",
|
|
@@ -3,10 +3,10 @@ var ae = Object.defineProperty;
|
|
|
3
3
|
var le = (n, s, e) => s in n ? ae(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 q, useEffect as oe } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { B as C } from "./index-
|
|
6
|
+
import { v as w, F as I, B as T } from "./builder-KLTu7nAI.js";
|
|
7
|
+
import { B as C } from "./index-CYnY7jAX.js";
|
|
8
8
|
import { t as ce } from "./bundle-mjs-wppB-TKB.js";
|
|
9
|
-
import { T as de } from "./index-
|
|
9
|
+
import { T as de } from "./index-DhPBYTPt.js";
|
|
10
10
|
const me = t.memo((n) => {
|
|
11
11
|
const { text: s, subtitle: e, number: r, color: d, className: p, style: o, children: u, ...g } = n;
|
|
12
12
|
return t.createElement(
|
|
@@ -3,12 +3,12 @@ var X = Object.defineProperty;
|
|
|
3
3
|
var q = (n, s, e) => s in n ? X(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var r = (n, s, e) => q(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import i, { useState as F, useRef as D, useLayoutEffect as G } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { v as p, F as _, D as J, B as V, P as K } from "./builder-KLTu7nAI.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-ijbJR6lD.js";
|
|
9
|
+
import { T as ee } from "./index-DhPBYTPt.js";
|
|
10
10
|
import { e as te, L as ie } from "./Link-DDzSPY1Q.js";
|
|
11
|
-
class se extends
|
|
11
|
+
class se extends _ {
|
|
12
12
|
build() {
|
|
13
13
|
const e = [
|
|
14
14
|
"fibo-center",
|
|
@@ -28,8 +28,8 @@ class se extends b {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
class re extends
|
|
31
|
+
const Ee = p(se);
|
|
32
|
+
class re extends _ {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
r(this, "_mainAxisAlignment", "start");
|
|
@@ -67,7 +67,7 @@ class re extends b {
|
|
|
67
67
|
small: "flex-[0.3]",
|
|
68
68
|
medium: "flex-1",
|
|
69
69
|
large: "flex-[1.5]"
|
|
70
|
-
},
|
|
70
|
+
}, h = [
|
|
71
71
|
"fibo-column",
|
|
72
72
|
"flex",
|
|
73
73
|
"flex-col",
|
|
@@ -76,22 +76,22 @@ class re extends b {
|
|
|
76
76
|
t[this._crossAxisAlignment],
|
|
77
77
|
this._size ? o[this._size] : "",
|
|
78
78
|
...this._classNames
|
|
79
|
-
],
|
|
80
|
-
this._spacing && (typeof this._spacing == "number" ?
|
|
81
|
-
const d =
|
|
79
|
+
], c = this.getStyle();
|
|
80
|
+
this._spacing && (typeof this._spacing == "number" ? c.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? c.gap = this._spacing : c.gap = `${Number(this._spacing) * 4}px`);
|
|
81
|
+
const d = h.filter(Boolean).join(" "), f = this.processChildren();
|
|
82
82
|
return i.createElement(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
85
|
className: d,
|
|
86
|
-
style:
|
|
86
|
+
style: c,
|
|
87
87
|
...this._props
|
|
88
88
|
},
|
|
89
89
|
...f
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
class ne extends
|
|
93
|
+
const Se = p(re);
|
|
94
|
+
class ne extends _ {
|
|
95
95
|
build() {
|
|
96
96
|
const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
|
|
97
97
|
return i.createElement(
|
|
@@ -105,8 +105,8 @@ class ne extends b {
|
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
class le extends
|
|
108
|
+
const Ie = p(ne);
|
|
109
|
+
class le extends _ {
|
|
110
110
|
constructor() {
|
|
111
111
|
super(...arguments);
|
|
112
112
|
r(this, "_height");
|
|
@@ -136,20 +136,20 @@ class le extends b {
|
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const He = p(le), oe = i.memo((n) => {
|
|
140
140
|
const {
|
|
141
141
|
theme: s,
|
|
142
142
|
locale: e,
|
|
143
143
|
providers: t = {},
|
|
144
144
|
className: o,
|
|
145
|
-
style:
|
|
146
|
-
children:
|
|
145
|
+
style: h,
|
|
146
|
+
children: c,
|
|
147
147
|
overlays: d = []
|
|
148
148
|
} = n, f = /* @__PURE__ */ new Map();
|
|
149
149
|
s && f.set("theme", s), e && f.set("locale", e), Object.entries(t).forEach(([B, w]) => {
|
|
150
150
|
f.set(B, w);
|
|
151
151
|
});
|
|
152
|
-
const
|
|
152
|
+
const b = i.createElement(
|
|
153
153
|
"div",
|
|
154
154
|
{
|
|
155
155
|
className: `fibo-scaffold ${o || ""}`,
|
|
@@ -160,20 +160,20 @@ const ze = p(le), ae = i.memo((n) => {
|
|
|
160
160
|
flexDirection: "column",
|
|
161
161
|
position: "relative",
|
|
162
162
|
// Ensure relative positioning for overlays
|
|
163
|
-
...
|
|
163
|
+
...h
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
|
-
[
|
|
166
|
+
[c, ...d]
|
|
167
167
|
);
|
|
168
168
|
return f.size > 0 ? i.createElement(
|
|
169
169
|
K,
|
|
170
170
|
{
|
|
171
171
|
providers: f,
|
|
172
|
-
children:
|
|
172
|
+
children: b
|
|
173
173
|
}
|
|
174
|
-
) :
|
|
174
|
+
) : b;
|
|
175
175
|
});
|
|
176
|
-
class
|
|
176
|
+
class ae extends _ {
|
|
177
177
|
constructor() {
|
|
178
178
|
super(...arguments);
|
|
179
179
|
r(this, "_locale");
|
|
@@ -221,8 +221,8 @@ class oe extends b {
|
|
|
221
221
|
return !e || typeof e != "object" || i.isValidElement(e) || "build" in e && typeof e.build == "function" ? !1 : "children" in e && !("type" in e);
|
|
222
222
|
}
|
|
223
223
|
build() {
|
|
224
|
-
var
|
|
225
|
-
const e = this.processChildren(), t = this._structure, o = this._headerBar && ((
|
|
224
|
+
var N, C, z, j, y, E, S, L, R, $, A, O, l, a, m, g, I, 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), b = d && ((E = t.sidebarRight) == null ? void 0 : E.fullHeight), B = i.createElement(
|
|
226
226
|
"div",
|
|
227
227
|
{
|
|
228
228
|
key: "scaffold-middle",
|
|
@@ -235,14 +235,14 @@ class oe extends b {
|
|
|
235
235
|
}
|
|
236
236
|
},
|
|
237
237
|
[
|
|
238
|
-
|
|
238
|
+
c && !f && i.createElement("div", {
|
|
239
239
|
key: "sidebar-left",
|
|
240
240
|
className: "z-20",
|
|
241
241
|
style: {
|
|
242
|
-
width: (
|
|
242
|
+
width: (S = t.sidebarLeft) == null ? void 0 : S.width,
|
|
243
243
|
position: ((L = t.sidebarLeft) == null ? void 0 : L.mode) === "over" ? "absolute" : ((R = t.sidebarLeft) == null ? void 0 : R.behavior) === "fixed" || this._sideBarLeft.fixed ? "sticky" : void 0,
|
|
244
|
-
top: ((
|
|
245
|
-
height: ((
|
|
244
|
+
top: (($ = t.sidebarLeft) == null ? void 0 : $.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
|
|
245
|
+
height: ((A = t.sidebarLeft) == null ? void 0 : A.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
|
|
246
246
|
overflowY: "auto",
|
|
247
247
|
borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
|
|
248
248
|
backgroundColor: "var(--fibo-surface, #ffffff)"
|
|
@@ -258,13 +258,13 @@ class oe extends b {
|
|
|
258
258
|
position: "relative"
|
|
259
259
|
}
|
|
260
260
|
}, e),
|
|
261
|
-
d && !
|
|
261
|
+
d && !b && i.createElement("div", {
|
|
262
262
|
key: "sidebar-right",
|
|
263
263
|
className: "z-20",
|
|
264
264
|
style: {
|
|
265
|
-
width: (
|
|
265
|
+
width: (O = t.sidebarRight) == null ? void 0 : O.width,
|
|
266
266
|
position: ((l = t.sidebarRight) == null ? void 0 : l.mode) === "over" ? "absolute" : ((a = t.sidebarRight) == null ? void 0 : a.behavior) === "fixed" || this._sideBarRight.fixed ? "sticky" : void 0,
|
|
267
|
-
top: ((
|
|
267
|
+
top: ((m = t.sidebarRight) == null ? void 0 : m.behavior) === "fixed" || this._sideBarRight.fixed ? 0 : void 0,
|
|
268
268
|
height: ((g = t.sidebarRight) == null ? void 0 : g.behavior) === "fixed" || this._sideBarRight.fixed ? "100%" : void 0,
|
|
269
269
|
overflowY: "auto",
|
|
270
270
|
borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
|
|
@@ -277,8 +277,8 @@ class oe extends b {
|
|
|
277
277
|
key: "header-bar",
|
|
278
278
|
className: "z-30",
|
|
279
279
|
style: {
|
|
280
|
-
height: (
|
|
281
|
-
position: ((
|
|
280
|
+
height: (I = t.header) == null ? void 0 : I.height,
|
|
281
|
+
position: ((M = t.header) == null ? void 0 : M.position) || (this._headerBar.fixed ? "sticky" : "static"),
|
|
282
282
|
top: 0,
|
|
283
283
|
backgroundColor: "var(--fibo-surface, #ffffff)",
|
|
284
284
|
zIndex: 30,
|
|
@@ -286,11 +286,11 @@ class oe extends b {
|
|
|
286
286
|
}
|
|
287
287
|
}, this._headerBar.content),
|
|
288
288
|
B,
|
|
289
|
-
|
|
289
|
+
h && i.createElement("div", {
|
|
290
290
|
key: "footer-bar",
|
|
291
291
|
className: "z-30",
|
|
292
292
|
style: {
|
|
293
|
-
height: (
|
|
293
|
+
height: (H = t.footer) == null ? void 0 : H.height,
|
|
294
294
|
position: ((P = t.footer) == null ? void 0 : P.position) || (this._footerBar.fixed ? "sticky" : "static"),
|
|
295
295
|
bottom: 0,
|
|
296
296
|
backgroundColor: "var(--fibo-surface, #ffffff)",
|
|
@@ -299,7 +299,7 @@ class oe extends b {
|
|
|
299
299
|
}
|
|
300
300
|
}, this._footerBar.content)
|
|
301
301
|
].filter(Boolean));
|
|
302
|
-
let
|
|
302
|
+
let u = i.createElement("div", {
|
|
303
303
|
key: "vertical-stack",
|
|
304
304
|
style: {
|
|
305
305
|
display: "flex",
|
|
@@ -310,7 +310,7 @@ class oe extends b {
|
|
|
310
310
|
overflow: "hidden"
|
|
311
311
|
}
|
|
312
312
|
}, w);
|
|
313
|
-
f && (
|
|
313
|
+
f && (u = i.createElement("div", {
|
|
314
314
|
key: "full-height-left-wrapper",
|
|
315
315
|
style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
|
|
316
316
|
}, [
|
|
@@ -324,12 +324,12 @@ class oe extends b {
|
|
|
324
324
|
zIndex: 40
|
|
325
325
|
}
|
|
326
326
|
}, this._sideBarLeft.content),
|
|
327
|
-
|
|
328
|
-
])),
|
|
327
|
+
u
|
|
328
|
+
])), b && (u = i.createElement("div", {
|
|
329
329
|
key: "full-height-right-wrapper",
|
|
330
330
|
style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
|
|
331
331
|
}, [
|
|
332
|
-
|
|
332
|
+
u,
|
|
333
333
|
i.createElement("div", {
|
|
334
334
|
key: "sidebar-right-full",
|
|
335
335
|
style: {
|
|
@@ -347,35 +347,52 @@ class oe extends b {
|
|
|
347
347
|
providers: this._customProviders,
|
|
348
348
|
className: this.getClassName(),
|
|
349
349
|
style: this.getStyle(),
|
|
350
|
-
children:
|
|
350
|
+
children: u,
|
|
351
351
|
overlays: v
|
|
352
352
|
};
|
|
353
|
-
return i.createElement(
|
|
353
|
+
return i.createElement(oe, x);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
const
|
|
357
|
-
const { height: s = 64, sticky: e, className: t, style: o, children:
|
|
356
|
+
const ze = p(ae), he = i.memo((n) => {
|
|
357
|
+
const { height: s = 64, sticky: e, className: t, style: o, children: h, ...c } = n;
|
|
358
358
|
return i.createElement(
|
|
359
359
|
"header",
|
|
360
360
|
{
|
|
361
361
|
className: `flex items-center px-6 border-b border-gray-200 bg-white/80 backdrop-blur-md z-10 w-full ${e ? "sticky top-0" : ""} ${t || ""}`,
|
|
362
362
|
style: { height: s, minHeight: s, ...o },
|
|
363
|
-
...
|
|
363
|
+
...c
|
|
364
364
|
},
|
|
365
|
-
|
|
365
|
+
h
|
|
366
366
|
);
|
|
367
367
|
});
|
|
368
|
-
class ce extends
|
|
368
|
+
class ce extends _ {
|
|
369
369
|
constructor() {
|
|
370
370
|
super(...arguments);
|
|
371
371
|
r(this, "_height", 64);
|
|
372
372
|
r(this, "_sticky", !1);
|
|
373
373
|
}
|
|
374
374
|
height(e) {
|
|
375
|
-
return this._height = e, this;
|
|
375
|
+
return this._height = e, this._sticky && this.syncStickyOffset(!0), this;
|
|
376
376
|
}
|
|
377
377
|
sticky(e = !0) {
|
|
378
|
-
|
|
378
|
+
if (e === !1)
|
|
379
|
+
return this._sticky = !1, this;
|
|
380
|
+
this._sticky = !0;
|
|
381
|
+
const t = e === !0 ? 0 : e;
|
|
382
|
+
return super.sticky(t), this.syncStickyOffset(e), this;
|
|
383
|
+
}
|
|
384
|
+
syncStickyOffset(e) {
|
|
385
|
+
const t = e === !0 || e === !1 ? 0 : e;
|
|
386
|
+
if (typeof t == "number" && typeof this._height == "number") {
|
|
387
|
+
this.publishStickyOffset(t + this._height);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
if (t === 0 || t === "0" || t === "0px") {
|
|
391
|
+
this.publishStickyOffset(this._height);
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
const o = typeof t == "number" ? `${t}px` : t, h = typeof this._height == "number" ? `${this._height}px` : this._height;
|
|
395
|
+
this.publishStickyOffset(`calc(${o} + ${h})`);
|
|
379
396
|
}
|
|
380
397
|
build() {
|
|
381
398
|
const e = {
|
|
@@ -390,18 +407,18 @@ class ce extends b {
|
|
|
390
407
|
}
|
|
391
408
|
}
|
|
392
409
|
const Le = p(ce), de = i.memo((n) => {
|
|
393
|
-
const { width: s = 260, collapsed: e, className: t, style: o, children:
|
|
394
|
-
const v = f ===
|
|
410
|
+
const { width: s = 260, collapsed: e, className: t, style: o, children: h, ...c } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? (typeof window < "u" ? window.location.pathname : ""), b = e ? 80 : s, w = W.getInstance().getSidebarItems().map((u, k) => {
|
|
411
|
+
const v = f === u.path;
|
|
395
412
|
return i.createElement(ie, {
|
|
396
|
-
key: `plugin-item-${
|
|
397
|
-
to:
|
|
413
|
+
key: `plugin-item-${u.path || k}`,
|
|
414
|
+
to: u.path,
|
|
398
415
|
className: "no-underline block mb-1",
|
|
399
416
|
children: Q().padding(12).alignItems("center").gap(12).className(`
|
|
400
417
|
transition-colors duration-200 rounded-lg mx-2
|
|
401
418
|
${v ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
|
|
402
419
|
`).children([
|
|
403
|
-
|
|
404
|
-
e ? null : ee(
|
|
420
|
+
u.icon ? U(u.icon).size(20).build() : null,
|
|
421
|
+
e ? null : ee(u.label).style({ fontSize: 14 }).weight(500).build()
|
|
405
422
|
].filter(Boolean)).build()
|
|
406
423
|
});
|
|
407
424
|
});
|
|
@@ -409,14 +426,14 @@ const Le = p(ce), de = i.memo((n) => {
|
|
|
409
426
|
"aside",
|
|
410
427
|
{
|
|
411
428
|
className: `flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${t || ""}`,
|
|
412
|
-
style: { width:
|
|
413
|
-
...
|
|
429
|
+
style: { width: b, minWidth: b, ...o },
|
|
430
|
+
...c
|
|
414
431
|
},
|
|
415
|
-
|
|
432
|
+
h,
|
|
416
433
|
w
|
|
417
434
|
);
|
|
418
435
|
});
|
|
419
|
-
class fe extends
|
|
436
|
+
class fe extends _ {
|
|
420
437
|
constructor() {
|
|
421
438
|
super(...arguments);
|
|
422
439
|
r(this, "_width", 260);
|
|
@@ -440,14 +457,14 @@ class fe extends b {
|
|
|
440
457
|
return i.createElement(de, e);
|
|
441
458
|
}
|
|
442
459
|
}
|
|
443
|
-
const Re = p(fe),
|
|
444
|
-
const { sidebar: s, header: e, children: t, className: o, style:
|
|
460
|
+
const Re = p(fe), ue = i.memo((n) => {
|
|
461
|
+
const { sidebar: s, header: e, children: t, className: o, style: h, ...c } = n, [d, f] = F(!1);
|
|
445
462
|
return i.createElement(
|
|
446
463
|
"div",
|
|
447
464
|
{
|
|
448
465
|
className: `h-full w-full bg-[#0B0C15] overflow-hidden relative ${o || ""}`,
|
|
449
|
-
style:
|
|
450
|
-
...
|
|
466
|
+
style: h,
|
|
467
|
+
...c
|
|
451
468
|
},
|
|
452
469
|
d && i.createElement("div", {
|
|
453
470
|
className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm transition-opacity lg:hidden",
|
|
@@ -492,7 +509,7 @@ const Re = p(fe), me = i.memo((n) => {
|
|
|
492
509
|
)
|
|
493
510
|
);
|
|
494
511
|
});
|
|
495
|
-
class
|
|
512
|
+
class me extends _ {
|
|
496
513
|
constructor() {
|
|
497
514
|
super(...arguments);
|
|
498
515
|
r(this, "_sidebar");
|
|
@@ -513,11 +530,11 @@ class ue extends b {
|
|
|
513
530
|
children: this.processChildren(),
|
|
514
531
|
...this._props
|
|
515
532
|
};
|
|
516
|
-
return i.createElement(
|
|
533
|
+
return i.createElement(ue, e);
|
|
517
534
|
}
|
|
518
535
|
}
|
|
519
|
-
const
|
|
520
|
-
class ge extends
|
|
536
|
+
const $e = p(me);
|
|
537
|
+
class ge extends _ {
|
|
521
538
|
constructor() {
|
|
522
539
|
super(...arguments);
|
|
523
540
|
r(this, "_alignment", "center");
|
|
@@ -544,20 +561,20 @@ class ge extends b {
|
|
|
544
561
|
bottomRight: "place-items-end"
|
|
545
562
|
}[this._alignment] || "place-items-center",
|
|
546
563
|
...this._classNames
|
|
547
|
-
].filter(Boolean).join(" "),
|
|
564
|
+
].filter(Boolean).join(" "), h = this.getStyle(), c = this.processChildren();
|
|
548
565
|
return i.createElement(
|
|
549
566
|
"div",
|
|
550
567
|
{
|
|
551
568
|
className: o,
|
|
552
|
-
style:
|
|
569
|
+
style: h,
|
|
553
570
|
...this._props
|
|
554
571
|
},
|
|
555
|
-
...
|
|
572
|
+
...c
|
|
556
573
|
);
|
|
557
574
|
}
|
|
558
575
|
}
|
|
559
|
-
const
|
|
560
|
-
class pe extends
|
|
576
|
+
const Ae = p(ge);
|
|
577
|
+
class pe extends _ {
|
|
561
578
|
constructor() {
|
|
562
579
|
super(...arguments);
|
|
563
580
|
r(this, "_sizeHeight");
|
|
@@ -568,7 +585,7 @@ class pe extends b {
|
|
|
568
585
|
build() {
|
|
569
586
|
const t = ["fibo-line", "flex", "flex-row", ...this._classNames].filter(Boolean).join(" "), o = this.getStyle();
|
|
570
587
|
this._sizeHeight && (o.height = this._sizeHeight);
|
|
571
|
-
const
|
|
588
|
+
const h = this.processChildren();
|
|
572
589
|
return i.createElement(
|
|
573
590
|
"div",
|
|
574
591
|
{
|
|
@@ -576,12 +593,12 @@ class pe extends b {
|
|
|
576
593
|
style: o,
|
|
577
594
|
...this._props
|
|
578
595
|
},
|
|
579
|
-
...
|
|
596
|
+
...h
|
|
580
597
|
);
|
|
581
598
|
}
|
|
582
599
|
}
|
|
583
|
-
const
|
|
584
|
-
class
|
|
600
|
+
const Oe = p(pe);
|
|
601
|
+
class _e extends _ {
|
|
585
602
|
constructor() {
|
|
586
603
|
super(...arguments);
|
|
587
604
|
r(this, "_direction", "vertical");
|
|
@@ -615,63 +632,63 @@ class be extends b {
|
|
|
615
632
|
}, ...this.processChildren());
|
|
616
633
|
}
|
|
617
634
|
}
|
|
618
|
-
const
|
|
635
|
+
const je = p(_e), be = i.memo((n) => {
|
|
619
636
|
const {
|
|
620
637
|
children: s,
|
|
621
638
|
itemHeight: e,
|
|
622
639
|
estimatedItemHeight: t = 50,
|
|
623
640
|
measureItems: o = !1,
|
|
624
|
-
overscan:
|
|
625
|
-
containerHeight:
|
|
641
|
+
overscan: h = 5,
|
|
642
|
+
containerHeight: c = 500,
|
|
626
643
|
className: d,
|
|
627
644
|
style: f
|
|
628
|
-
} = n, [
|
|
645
|
+
} = n, [b, B] = F(0), w = D(null), u = D(/* @__PURE__ */ new Map()), k = D(/* @__PURE__ */ new Map()), v = s.length, x = e !== void 0, N = (l) => x ? e : k.current.get(l) ?? t, C = (l) => {
|
|
629
646
|
if (x)
|
|
630
647
|
return l * e;
|
|
631
648
|
let a = 0;
|
|
632
|
-
for (let
|
|
633
|
-
a +=
|
|
649
|
+
for (let m = 0; m < l; m++)
|
|
650
|
+
a += N(m);
|
|
634
651
|
return a;
|
|
635
|
-
},
|
|
652
|
+
}, z = () => {
|
|
636
653
|
if (x)
|
|
637
654
|
return v * e;
|
|
638
655
|
let l = 0;
|
|
639
656
|
for (let a = 0; a < v; a++)
|
|
640
|
-
l +=
|
|
657
|
+
l += N(a);
|
|
641
658
|
return l;
|
|
642
659
|
}, y = Math.max(0, ((l) => {
|
|
643
660
|
if (x)
|
|
644
661
|
return Math.floor(l / e);
|
|
645
|
-
let a = 0,
|
|
646
|
-
for (; a <
|
|
647
|
-
const g = Math.floor((a +
|
|
648
|
-
|
|
662
|
+
let a = 0, m = v - 1;
|
|
663
|
+
for (; a < m; ) {
|
|
664
|
+
const g = Math.floor((a + m) / 2);
|
|
665
|
+
C(g) < l ? a = g + 1 : m = g;
|
|
649
666
|
}
|
|
650
667
|
return Math.max(0, a - 1);
|
|
651
|
-
})(
|
|
652
|
-
let
|
|
668
|
+
})(b) - h);
|
|
669
|
+
let E;
|
|
653
670
|
if (x) {
|
|
654
|
-
const l = Math.ceil(
|
|
655
|
-
|
|
671
|
+
const l = Math.ceil(c / e);
|
|
672
|
+
E = Math.min(v, y + l + h * 2);
|
|
656
673
|
} else {
|
|
657
|
-
let l =
|
|
658
|
-
for (; l <
|
|
659
|
-
l +=
|
|
660
|
-
|
|
674
|
+
let l = C(y), a = y;
|
|
675
|
+
for (; l < b + c + h * t && a < v; )
|
|
676
|
+
l += N(a), a++;
|
|
677
|
+
E = Math.min(v, a);
|
|
661
678
|
}
|
|
662
|
-
const
|
|
679
|
+
const S = s.slice(y, E), L = C(y), R = z(), [$, A] = F(0);
|
|
663
680
|
G(() => {
|
|
664
681
|
if (!o || x) return;
|
|
665
682
|
let l = !1;
|
|
666
|
-
|
|
667
|
-
const g = y +
|
|
668
|
-
if (
|
|
669
|
-
const
|
|
670
|
-
|
|
683
|
+
S.forEach((a, m) => {
|
|
684
|
+
const g = y + m, I = u.current.get(g);
|
|
685
|
+
if (I) {
|
|
686
|
+
const H = I.getBoundingClientRect().height;
|
|
687
|
+
H > 0 && k.current.get(g) !== H && (k.current.set(g, H), l = !0);
|
|
671
688
|
}
|
|
672
|
-
}), l &&
|
|
673
|
-
}, [
|
|
674
|
-
const
|
|
689
|
+
}), l && A((a) => a + 1);
|
|
690
|
+
}, [S, y, o, x, $]);
|
|
691
|
+
const O = (l) => {
|
|
675
692
|
B(l.currentTarget.scrollTop);
|
|
676
693
|
};
|
|
677
694
|
return i.createElement(
|
|
@@ -680,12 +697,12 @@ const Me = p(be), _e = i.memo((n) => {
|
|
|
680
697
|
ref: w,
|
|
681
698
|
className: `fibo-virtual-column ${d || ""}`,
|
|
682
699
|
style: {
|
|
683
|
-
height: `${
|
|
700
|
+
height: `${c}px`,
|
|
684
701
|
overflowY: "auto",
|
|
685
702
|
position: "relative",
|
|
686
703
|
...f
|
|
687
704
|
},
|
|
688
|
-
onScroll:
|
|
705
|
+
onScroll: O
|
|
689
706
|
},
|
|
690
707
|
i.createElement("div", {
|
|
691
708
|
style: {
|
|
@@ -706,14 +723,14 @@ const Me = p(be), _e = i.memo((n) => {
|
|
|
706
723
|
width: "100%"
|
|
707
724
|
}
|
|
708
725
|
},
|
|
709
|
-
|
|
710
|
-
const
|
|
726
|
+
S.map((l, a) => {
|
|
727
|
+
const m = y + a;
|
|
711
728
|
return i.createElement(
|
|
712
729
|
"div",
|
|
713
730
|
{
|
|
714
|
-
key:
|
|
731
|
+
key: m,
|
|
715
732
|
ref: (g) => {
|
|
716
|
-
g && o && !x ?
|
|
733
|
+
g && o && !x ? u.current.set(m, g) : g || u.current.delete(m);
|
|
717
734
|
},
|
|
718
735
|
style: { width: "100%" }
|
|
719
736
|
},
|
|
@@ -723,7 +740,7 @@ const Me = p(be), _e = i.memo((n) => {
|
|
|
723
740
|
)
|
|
724
741
|
);
|
|
725
742
|
});
|
|
726
|
-
class ye extends
|
|
743
|
+
class ye extends _ {
|
|
727
744
|
constructor() {
|
|
728
745
|
super(...arguments);
|
|
729
746
|
r(this, "_itemHeight");
|
|
@@ -758,21 +775,21 @@ class ye extends b {
|
|
|
758
775
|
className: this.getClassName(),
|
|
759
776
|
style: this.getStyle()
|
|
760
777
|
};
|
|
761
|
-
return i.createElement(
|
|
778
|
+
return i.createElement(be, t);
|
|
762
779
|
}
|
|
763
780
|
}
|
|
764
|
-
const
|
|
781
|
+
const Me = p(ye);
|
|
765
782
|
export {
|
|
766
|
-
|
|
767
|
-
|
|
783
|
+
Ee as C,
|
|
784
|
+
$e as D,
|
|
768
785
|
Le as H,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
786
|
+
Oe as L,
|
|
787
|
+
He as S,
|
|
788
|
+
Me as V,
|
|
789
|
+
Ae as Z,
|
|
790
|
+
Se as a,
|
|
791
|
+
Ie as b,
|
|
792
|
+
ze as c,
|
|
776
793
|
Re as d,
|
|
777
|
-
|
|
794
|
+
je as e
|
|
778
795
|
};
|