fiboui 2.2.0 → 2.2.1

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/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-CbTvwN9K.js";
3
- import { T as x } from "./index-DhPBYTPt.js";
4
- import { I as f } from "./index-ijbJR6lD.js";
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-B7jJYOv5.js";
3
+ import { T as x } from "./index-Dj85aIkg.js";
4
+ import { I as f } from "./index-CgPc0zLh.js";
5
5
  export {
6
6
  s as Alert,
7
7
  r as Avatar,
package/dist/core.js CHANGED
@@ -1,53 +1,56 @@
1
1
  "use client";
2
- import { C as a, M as r, q as o, O as t, d as i, P as n, R as l, h as u, i as p, S as c, V as S, f as g, c as b, b as v, a as d, g as m, t as R, o as T, p as P, r as E, j as f, s as C, n as F, k as M, m as O, l as x, u as y, e as V } from "./builder-KLTu7nAI.js";
3
- import { E as h, k as j, F as k, j as w, P as A, i as I, m as q, t as G, f as N, b as W, g as _, a as z, h as D, u as H, d as J, e as K, c as L } from "./mount-D5gt_GWO.js";
4
- import { F as U, b as X } from "./FineGrain-6w615KQw.js";
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-KX69ixME.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-DX2mgYvd.js";
4
+ import { F as Z, b as $ } from "./FineGrain-uhDvqyeZ.js";
5
5
  export {
6
6
  a as ComputedSignal,
7
- h as Easing,
8
- j as Fibo,
9
- k as FiboApp,
10
- w as FiboAppBuilder,
11
- U as FineGrainText,
12
- r as MOTION_PRESETS,
13
- o as MotionStyles,
14
- t as Observable,
15
- i as Observer,
16
- A as Presence,
7
+ k as Easing,
8
+ w as Fibo,
9
+ A as FiboApp,
10
+ I as FiboAppBuilder,
11
+ r as FiboStyles,
12
+ Z as FineGrainText,
13
+ o as MOTION_PRESETS,
14
+ t as MotionStyles,
15
+ i as Observable,
16
+ l as Observer,
17
+ q as Presence,
17
18
  n as ProviderWrapper,
18
- l as ReactivityRoot,
19
- u as Reveal,
20
- p as ScrollProgress,
19
+ u as ReactivityRoot,
20
+ p as Reveal,
21
+ S as ScrollProgress,
21
22
  c as Signal,
22
- S as ValueBuilder,
23
- g as applyResponsiveStyles,
24
- X as bindText,
23
+ g as ValueBuilder,
24
+ G as applyResponsiveStyles,
25
+ $ as bindText,
25
26
  b as computed,
26
27
  v as createReactivityRoot,
27
28
  d as createStore,
28
- I as cssCurve,
29
- m as getCurrentScope,
29
+ N as cssCurve,
30
+ m as getCss,
31
+ T as getCurrentScope,
30
32
  R as getMotionCss,
31
- q as mount,
32
- T as observable,
33
- P as resolveCssEase,
34
- E as runInScope,
35
- f as scrollTo,
36
- C as signal,
37
- F as springEase,
38
- M as startViewTransition,
39
- O as supportsScrollTimeline,
40
- x as supportsViewTimeline,
41
- G as toElement,
42
- y as useBuilderState,
43
- N as useMountTransition,
44
- W as useObservable,
45
- _ as usePrefersReducedMotion,
46
- V as useProvider,
47
- z as useReactiveStore,
48
- D as useScrollProgress,
49
- H as useSignal,
50
- J as useSpring,
51
- K as useStagger,
52
- L as useTransition
33
+ P as getStyleTag,
34
+ W as mount,
35
+ F as observable,
36
+ y as resolveCssEase,
37
+ C as runInScope,
38
+ E as scrollTo,
39
+ f as signal,
40
+ M as springEase,
41
+ O as startViewTransition,
42
+ x as supportsScrollTimeline,
43
+ V as supportsViewTimeline,
44
+ _ as toElement,
45
+ B as useBuilderState,
46
+ z as useMountTransition,
47
+ D as useObservable,
48
+ H as usePrefersReducedMotion,
49
+ h as useProvider,
50
+ J as useReactiveStore,
51
+ K as useScrollProgress,
52
+ L as useSignal,
53
+ Q as useSpring,
54
+ U as useStagger,
55
+ X as useTransition
53
56
  };
@@ -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 { 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";
6
+ import { w as C, x as F } from "./builder-KX69ixME.js";
7
+ import { B as j } from "./index-hNxXTy6z.js";
8
+ import { T as O } from "./index-Dj85aIkg.js";
9
+ import { R as J } from "./index-CgPc0zLh.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,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 { v as a, F as u } from "./builder-KLTu7nAI.js";
6
+ import { w as a, x as u } from "./builder-KX69ixME.js";
7
7
  class g extends u {
8
8
  constructor() {
9
9
  super(...arguments);
@@ -58,7 +58,7 @@ class g extends u {
58
58
  );
59
59
  }
60
60
  }
61
- const x = a(g), _ = o.memo((e) => {
61
+ const y = a(g), _ = o.memo((e) => {
62
62
  const {
63
63
  source: t,
64
64
  color: s,
@@ -112,8 +112,8 @@ class f extends u {
112
112
  return o.createElement(_, c);
113
113
  }
114
114
  }
115
- const b = a(f);
115
+ const w = a(f);
116
116
  export {
117
- b as I,
118
- x as R
117
+ w as I,
118
+ y as R
119
119
  };
@@ -2,8 +2,8 @@
2
2
  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
- import t, { useState as F, useEffect as M, useRef as j } from "react";
6
- import { v as $, F as D, S as P } from "./builder-KLTu7nAI.js";
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-KX69ixME.js";
7
7
  import { t as L } from "./bundle-mjs-wppB-TKB.js";
8
8
  const q = t.memo((c) => {
9
9
  const {
@@ -164,8 +164,8 @@ const de = $(V), W = (c, l) => {
164
164
  leadingIcon: _,
165
165
  trailingIcon: y,
166
166
  ...f
167
- } = c, g = x instanceof P, [S, m] = F(g ? x.value : x);
168
- M(() => {
167
+ } = c, g = x instanceof P, [S, m] = M(g ? x.value : x);
168
+ j(() => {
169
169
  if (g)
170
170
  return x.subscribe((u) => {
171
171
  m(u);
@@ -417,8 +417,8 @@ const ue = $(J), Q = t.memo((c) => {
417
417
  className: d,
418
418
  style: h,
419
419
  id: p
420
- } = c, k = j(null), v = l || s;
421
- M(() => {
420
+ } = c, k = F(null), v = l || s;
421
+ j(() => {
422
422
  k.current && (k.current.indeterminate = !!s);
423
423
  }, [s]);
424
424
  let x = null;
@@ -689,7 +689,7 @@ class te extends D {
689
689
  }
690
690
  }
691
691
  const be = $(te), re = t.memo((c) => {
692
- const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = F(!1), [d, h] = F(0), p = j(null), {
692
+ const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = M(!1), [d, h] = M(0), p = F(null), {
693
693
  containerClass: k,
694
694
  containerStyle: v,
695
695
  label: x,
@@ -701,7 +701,7 @@ const be = $(te), re = t.memo((c) => {
701
701
  disabled: S,
702
702
  multiple: m
703
703
  } = c;
704
- M(() => {
704
+ j(() => {
705
705
  const n = (u) => {
706
706
  p.current && !p.current.contains(u.target) && s(!1);
707
707
  };
@@ -878,7 +878,7 @@ class ae extends D {
878
878
  }
879
879
  }
880
880
  const fe = $(ae), se = t.memo((c) => {
881
- const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = F(!1), [d, h] = F(""), [p, k] = F(0), v = j(null), {
881
+ const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = M(!1), [d, h] = M(""), [p, k] = M(0), v = F(null), {
882
882
  containerClass: x,
883
883
  containerStyle: E,
884
884
  label: _,
@@ -891,7 +891,7 @@ const fe = $(ae), se = t.memo((c) => {
891
891
  disabled: w,
892
892
  multiple: I
893
893
  } = c;
894
- M(() => {
894
+ j(() => {
895
895
  if (!I) {
896
896
  const i = g.find((N) => N.value === f);
897
897
  i && !a && d !== i.label && h(i.label);
@@ -900,9 +900,9 @@ const fe = $(ae), se = t.memo((c) => {
900
900
  const C = g.filter(
901
901
  (i) => i.label.toLowerCase().includes(d.toLowerCase())
902
902
  );
903
- M(() => {
903
+ j(() => {
904
904
  k(0);
905
- }, [d, a]), M(() => {
905
+ }, [d, a]), j(() => {
906
906
  const i = (N) => {
907
907
  if (v.current && !v.current.contains(N.target))
908
908
  if (s(!1), I)
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- var X = Object.defineProperty;
3
- var q = (n, s, e) => s in n ? X(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
4
- var r = (n, s, e) => q(n, typeof s != "symbol" ? s + "" : s, e);
5
- import i, { useState as F, useRef as D, useLayoutEffect as G } from "react";
6
- import { v as p, F as _, D as J, B as V, P as K } from "./builder-KLTu7nAI.js";
2
+ var G = Object.defineProperty;
3
+ var X = (n, s, e) => s in n ? G(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
4
+ var r = (n, s, e) => X(n, typeof s != "symbol" ? s + "" : s, e);
5
+ import i, { useState as V, useRef as D, useLayoutEffect as q } from "react";
6
+ import { w as p, x as _, I as J, G as F, P as K } from "./builder-KX69ixME.js";
7
7
  import { P as W } from "./PluginManager-D5-ApsSN.js";
8
- import { R as Q, I as U } from "./index-ijbJR6lD.js";
9
- import { T as ee } from "./index-DhPBYTPt.js";
10
- import { e as te, L as ie } from "./Link-DDzSPY1Q.js";
8
+ import { R as Q, I as U } from "./index-CgPc0zLh.js";
9
+ import { T as ee } from "./index-Dj85aIkg.js";
10
+ import { e as te, L as ie } from "./Link-ElmaMZB8.js";
11
11
  class se extends _ {
12
12
  build() {
13
13
  const e = [
@@ -90,7 +90,7 @@ class re extends _ {
90
90
  );
91
91
  }
92
92
  }
93
- const Se = p(re);
93
+ const Ie = p(re);
94
94
  class ne extends _ {
95
95
  build() {
96
96
  const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
@@ -105,7 +105,7 @@ class ne extends _ {
105
105
  );
106
106
  }
107
107
  }
108
- const Ie = p(ne);
108
+ const Se = p(ne);
109
109
  class le extends _ {
110
110
  constructor() {
111
111
  super(...arguments);
@@ -213,7 +213,7 @@ class ae extends _ {
213
213
  content: i.createElement(i.Fragment, null, ...J(e.children)),
214
214
  fixed: e.fixed ?? !1
215
215
  } : {
216
- content: V(e),
216
+ content: F(e),
217
217
  fixed: !1
218
218
  };
219
219
  }
@@ -221,7 +221,7 @@ class ae extends _ {
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 N, C, z, j, y, E, S, L, R, $, A, O, l, a, m, g, I, M, H, P, T, Y;
224
+ var N, C, z, j, y, E, I, L, R, $, A, O, l, a, m, g, S, M, H, P, T, Y;
225
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
  {
@@ -239,7 +239,7 @@ class ae extends _ {
239
239
  key: "sidebar-left",
240
240
  className: "z-20",
241
241
  style: {
242
- width: (S = t.sidebarLeft) == null ? void 0 : S.width,
242
+ width: (I = t.sidebarLeft) == null ? void 0 : I.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
244
  top: (($ = t.sidebarLeft) == null ? void 0 : $.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
245
245
  height: ((A = t.sidebarLeft) == null ? void 0 : A.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
@@ -277,7 +277,7 @@ class ae extends _ {
277
277
  key: "header-bar",
278
278
  className: "z-30",
279
279
  style: {
280
- height: (I = t.header) == null ? void 0 : I.height,
280
+ height: (S = t.header) == null ? void 0 : S.height,
281
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)",
@@ -341,16 +341,16 @@ class ae extends _ {
341
341
  }
342
342
  }, this._sideBarRight.content)
343
343
  ]));
344
- const v = W.getInstance().getOverlays().map((Z) => Z().build()), x = {
344
+ const x = W.getInstance().getOverlays().map((Z) => Z().build()), v = {
345
345
  theme: this._theme,
346
346
  locale: this._locale,
347
347
  providers: this._customProviders,
348
348
  className: this.getClassName(),
349
349
  style: this.getStyle(),
350
350
  children: u,
351
- overlays: v
351
+ overlays: x
352
352
  };
353
- return i.createElement(oe, x);
353
+ return i.createElement(oe, v);
354
354
  }
355
355
  }
356
356
  const ze = p(ae), he = i.memo((n) => {
@@ -407,15 +407,15 @@ class ce extends _ {
407
407
  }
408
408
  }
409
409
  const Le = p(ce), de = i.memo((n) => {
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;
410
+ const { width: s = 260, collapsed: e, className: t, style: o, children: h, ...c } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? "", b = e ? 80 : s, w = W.getInstance().getSidebarItems().map((u, k) => {
411
+ const x = f === u.path;
412
412
  return i.createElement(ie, {
413
413
  key: `plugin-item-${u.path || k}`,
414
414
  to: u.path,
415
415
  className: "no-underline block mb-1",
416
416
  children: Q().padding(12).alignItems("center").gap(12).className(`
417
417
  transition-colors duration-200 rounded-lg mx-2
418
- ${v ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
418
+ ${x ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
419
419
  `).children([
420
420
  u.icon ? U(u.icon).size(20).build() : null,
421
421
  e ? null : ee(u.label).style({ fontSize: 14 }).weight(500).build()
@@ -458,7 +458,7 @@ class fe extends _ {
458
458
  }
459
459
  }
460
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);
461
+ const { sidebar: s, header: e, children: t, className: o, style: h, ...c } = n, [d, f] = V(!1);
462
462
  return i.createElement(
463
463
  "div",
464
464
  {
@@ -516,10 +516,10 @@ class me extends _ {
516
516
  r(this, "_header");
517
517
  }
518
518
  sidebar(e) {
519
- return this._sidebar = V(e), this;
519
+ return this._sidebar = F(e), this;
520
520
  }
521
521
  header(e) {
522
- return this._header = V(e), this;
522
+ return this._header = F(e), this;
523
523
  }
524
524
  build() {
525
525
  const e = {
@@ -642,24 +642,24 @@ const je = p(_e), be = i.memo((n) => {
642
642
  containerHeight: c = 500,
643
643
  className: d,
644
644
  style: f
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) => {
646
- if (x)
645
+ } = n, [b, 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
+ if (v)
647
647
  return l * e;
648
648
  let a = 0;
649
649
  for (let m = 0; m < l; m++)
650
650
  a += N(m);
651
651
  return a;
652
652
  }, z = () => {
653
- if (x)
654
- return v * e;
653
+ if (v)
654
+ return x * e;
655
655
  let l = 0;
656
- for (let a = 0; a < v; a++)
656
+ for (let a = 0; a < x; a++)
657
657
  l += N(a);
658
658
  return l;
659
659
  }, y = Math.max(0, ((l) => {
660
- if (x)
660
+ if (v)
661
661
  return Math.floor(l / e);
662
- let a = 0, m = v - 1;
662
+ let a = 0, m = x - 1;
663
663
  for (; a < m; ) {
664
664
  const g = Math.floor((a + m) / 2);
665
665
  C(g) < l ? a = g + 1 : m = g;
@@ -667,27 +667,27 @@ const je = p(_e), be = i.memo((n) => {
667
667
  return Math.max(0, a - 1);
668
668
  })(b) - h);
669
669
  let E;
670
- if (x) {
670
+ if (v) {
671
671
  const l = Math.ceil(c / e);
672
- E = Math.min(v, y + l + h * 2);
672
+ E = Math.min(x, y + l + h * 2);
673
673
  } else {
674
674
  let l = C(y), a = y;
675
- for (; l < b + c + h * t && a < v; )
675
+ for (; l < b + c + h * t && a < x; )
676
676
  l += N(a), a++;
677
- E = Math.min(v, a);
677
+ E = Math.min(x, a);
678
678
  }
679
- const S = s.slice(y, E), L = C(y), R = z(), [$, A] = F(0);
680
- G(() => {
681
- if (!o || x) return;
679
+ const I = s.slice(y, E), L = C(y), R = z(), [$, A] = V(0);
680
+ q(() => {
681
+ if (!o || v) return;
682
682
  let l = !1;
683
- S.forEach((a, m) => {
684
- const g = y + m, I = u.current.get(g);
685
- if (I) {
686
- const H = I.getBoundingClientRect().height;
683
+ I.forEach((a, m) => {
684
+ const g = y + m, S = u.current.get(g);
685
+ if (S) {
686
+ const H = S.getBoundingClientRect().height;
687
687
  H > 0 && k.current.get(g) !== H && (k.current.set(g, H), l = !0);
688
688
  }
689
689
  }), l && A((a) => a + 1);
690
- }, [S, y, o, x, $]);
690
+ }, [I, y, o, v, $]);
691
691
  const O = (l) => {
692
692
  B(l.currentTarget.scrollTop);
693
693
  };
@@ -723,14 +723,14 @@ const je = p(_e), be = i.memo((n) => {
723
723
  width: "100%"
724
724
  }
725
725
  },
726
- S.map((l, a) => {
726
+ I.map((l, a) => {
727
727
  const m = y + a;
728
728
  return i.createElement(
729
729
  "div",
730
730
  {
731
731
  key: m,
732
732
  ref: (g) => {
733
- g && o && !x ? u.current.set(m, g) : g || u.current.delete(m);
733
+ g && o && !v ? u.current.set(m, g) : g || u.current.delete(m);
734
734
  },
735
735
  style: { width: "100%" }
736
736
  },
@@ -787,8 +787,8 @@ export {
787
787
  He as S,
788
788
  Me as V,
789
789
  Ae as Z,
790
- Se as a,
791
- Ie as b,
790
+ Ie as a,
791
+ Se as b,
792
792
  ze as c,
793
793
  Re as d,
794
794
  je as e