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.
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import o from "react";
3
- import { h as n, F as i } from "./builder-DjLYXkXu.js";
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 p = n(m);
30
+ const B = n(m);
31
31
  export {
32
- p as B
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 { h as C, F } from "./builder-DjLYXkXu.js";
7
- import { B as j } from "./index-DKFr-sai.js";
8
- import { T as O } from "./index-CTRZRn9S.js";
9
- import { R as J } from "./index-RbfIZuAo.js";
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 { h as w, F as I, l as T } from "./builder-DjLYXkXu.js";
7
- import { B as C } from "./index-DKFr-sai.js";
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-CTRZRn9S.js";
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 { h as p, F as b, n as J, l as V, P as K } from "./builder-DjLYXkXu.js";
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-RbfIZuAo.js";
9
- import { T as ee } from "./index-CTRZRn9S.js";
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 b {
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 ke = p(se);
32
- class re extends b {
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
- }, c = [
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
- ], h = this.getStyle();
80
- this._spacing && (typeof this._spacing == "number" ? h.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? h.gap = this._spacing : h.gap = `${Number(this._spacing) * 4}px`);
81
- const d = c.filter(Boolean).join(" "), f = this.processChildren();
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: h,
86
+ style: c,
87
87
  ...this._props
88
88
  },
89
89
  ...f
90
90
  );
91
91
  }
92
92
  }
93
- const Ie = p(re);
94
- class ne extends b {
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 He = p(ne);
109
- class le extends b {
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 ze = p(le), ae = i.memo((n) => {
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: c,
146
- children: h,
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 _ = i.createElement(
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
- ...c
163
+ ...h
164
164
  }
165
165
  },
166
- [h, ...d]
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 oe extends b {
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 C, E, S, M, y, k, I, L, R, A, $, j, l, a, u, g, H, O, z, P, T, Y;
225
- const e = this.processChildren(), t = this._structure, o = this._headerBar && ((C = t.header) == null ? void 0 : C.visible) !== !1, c = this._footerBar && ((E = t.footer) == null ? void 0 : E.visible) !== !1, h = this._sideBarLeft && ((S = t.sidebarLeft) == null ? void 0 : S.visible) !== !1, d = this._sideBarRight && ((M = t.sidebarRight) == null ? void 0 : M.visible) !== !1, f = h && ((y = t.sidebarLeft) == null ? void 0 : y.fullHeight), _ = d && ((k = t.sidebarRight) == null ? void 0 : k.fullHeight), B = i.createElement(
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
- h && !f && i.createElement("div", {
238
+ c && !f && i.createElement("div", {
239
239
  key: "sidebar-left",
240
240
  className: "z-20",
241
241
  style: {
242
- width: (I = t.sidebarLeft) == null ? void 0 : I.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: ((A = t.sidebarLeft) == null ? void 0 : A.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
245
- height: (($ = t.sidebarLeft) == null ? void 0 : $.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
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 && !_ && i.createElement("div", {
261
+ d && !b && i.createElement("div", {
262
262
  key: "sidebar-right",
263
263
  className: "z-20",
264
264
  style: {
265
- width: (j = t.sidebarRight) == null ? void 0 : j.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: ((u = t.sidebarRight) == null ? void 0 : u.behavior) === "fixed" || this._sideBarRight.fixed ? 0 : void 0,
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: (H = t.header) == null ? void 0 : H.height,
281
- position: ((O = t.header) == null ? void 0 : O.position) || (this._headerBar.fixed ? "sticky" : "static"),
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
- c && i.createElement("div", {
289
+ h && i.createElement("div", {
290
290
  key: "footer-bar",
291
291
  className: "z-30",
292
292
  style: {
293
- height: (z = t.footer) == null ? void 0 : z.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 m = i.createElement("div", {
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 && (m = i.createElement("div", {
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
- m
328
- ])), _ && (m = i.createElement("div", {
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
- m,
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: m,
350
+ children: u,
351
351
  overlays: v
352
352
  };
353
- return i.createElement(ae, x);
353
+ return i.createElement(oe, x);
354
354
  }
355
355
  }
356
- const Se = p(oe), he = i.memo((n) => {
357
- const { height: s = 64, sticky: e, className: t, style: o, children: c, ...h } = n;
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
- ...h
363
+ ...c
364
364
  },
365
- c
365
+ h
366
366
  );
367
367
  });
368
- class ce extends b {
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
- return this._sticky = e, this;
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: c, ...h } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? (typeof window < "u" ? window.location.pathname : ""), _ = e ? 80 : s, w = W.getInstance().getSidebarItems().map((m, N) => {
394
- const v = f === m.path;
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-${m.path || N}`,
397
- to: m.path,
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
- m.icon ? U(m.icon).size(20).build() : null,
404
- e ? null : ee(m.label).style({ fontSize: 14 }).weight(500).build()
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: _, minWidth: _, ...o },
413
- ...h
429
+ style: { width: b, minWidth: b, ...o },
430
+ ...c
414
431
  },
415
- c,
432
+ h,
416
433
  w
417
434
  );
418
435
  });
419
- class fe extends b {
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), me = i.memo((n) => {
444
- const { sidebar: s, header: e, children: t, className: o, style: c, ...h } = n, [d, f] = F(!1);
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: c,
450
- ...h
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 ue extends b {
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(me, e);
533
+ return i.createElement(ue, e);
517
534
  }
518
535
  }
519
- const Ae = p(ue);
520
- class ge extends b {
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(" "), c = this.getStyle(), h = this.processChildren();
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: c,
569
+ style: h,
553
570
  ...this._props
554
571
  },
555
- ...h
572
+ ...c
556
573
  );
557
574
  }
558
575
  }
559
- const $e = p(ge);
560
- class pe extends b {
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 c = this.processChildren();
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
- ...c
596
+ ...h
580
597
  );
581
598
  }
582
599
  }
583
- const je = p(pe);
584
- class be extends b {
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 Me = p(be), _e = i.memo((n) => {
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: c = 5,
625
- containerHeight: h = 500,
641
+ overscan: h = 5,
642
+ containerHeight: c = 500,
626
643
  className: d,
627
644
  style: f
628
- } = n, [_, B] = F(0), w = D(null), m = D(/* @__PURE__ */ new Map()), N = D(/* @__PURE__ */ new Map()), v = s.length, x = e !== void 0, C = (l) => x ? e : N.current.get(l) ?? t, E = (l) => {
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 u = 0; u < l; u++)
633
- a += C(u);
649
+ for (let m = 0; m < l; m++)
650
+ a += N(m);
634
651
  return a;
635
- }, S = () => {
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 += C(a);
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, u = v - 1;
646
- for (; a < u; ) {
647
- const g = Math.floor((a + u) / 2);
648
- E(g) < l ? a = g + 1 : u = g;
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
- })(_) - c);
652
- let k;
668
+ })(b) - h);
669
+ let E;
653
670
  if (x) {
654
- const l = Math.ceil(h / e);
655
- k = Math.min(v, y + l + c * 2);
671
+ const l = Math.ceil(c / e);
672
+ E = Math.min(v, y + l + h * 2);
656
673
  } else {
657
- let l = E(y), a = y;
658
- for (; l < _ + h + c * t && a < v; )
659
- l += C(a), a++;
660
- k = Math.min(v, a);
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 I = s.slice(y, k), L = E(y), R = S(), [A, $] = F(0);
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
- I.forEach((a, u) => {
667
- const g = y + u, H = m.current.get(g);
668
- if (H) {
669
- const z = H.getBoundingClientRect().height;
670
- z > 0 && N.current.get(g) !== z && (N.current.set(g, z), l = !0);
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 && $((a) => a + 1);
673
- }, [I, y, o, x, A]);
674
- const j = (l) => {
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: `${h}px`,
700
+ height: `${c}px`,
684
701
  overflowY: "auto",
685
702
  position: "relative",
686
703
  ...f
687
704
  },
688
- onScroll: j
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
- I.map((l, a) => {
710
- const u = y + a;
726
+ S.map((l, a) => {
727
+ const m = y + a;
711
728
  return i.createElement(
712
729
  "div",
713
730
  {
714
- key: u,
731
+ key: m,
715
732
  ref: (g) => {
716
- g && o && !x ? m.current.set(u, g) : g || m.current.delete(u);
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 b {
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(_e, t);
778
+ return i.createElement(be, t);
762
779
  }
763
780
  }
764
- const Oe = p(ye);
781
+ const Me = p(ye);
765
782
  export {
766
- ke as C,
767
- Ae as D,
783
+ Ee as C,
784
+ $e as D,
768
785
  Le as H,
769
- je as L,
770
- ze as S,
771
- Oe as V,
772
- $e as Z,
773
- Ie as a,
774
- He as b,
775
- Se as c,
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
- Me as e
794
+ je as e
778
795
  };