fiboui 2.2.4 → 2.4.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,5 +1,5 @@
1
1
  "use client";
2
- import { B as o, C as s, c as t, R as c, b as x, S as b, T as i, a as r } from "./index-CdDg3sZt.js";
2
+ import { B as o, C as s, c as t, R as c, b as x, S as b, T as i, a as r } from "./index-3GitHTeZ.js";
3
3
  export {
4
4
  o as Button,
5
5
  s as Checkbox,
package/dist/layout.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { C as e, a as o, b as r, D as t, H as l, L as n, c, e as i, d as S, S as d, V as u, Z as C } from "./index-K-VIFyCP.js";
3
- import { R as m } from "./index-nFXU29Ly.js";
2
+ import { C as e, a as o, b as r, D as t, H as l, L as n, c, e as i, d as S, S as d, V as u, Z as C } from "./index-ClppTuYv.js";
3
+ import { R as m } from "./index-kWLK5n5t.js";
4
4
  export {
5
5
  e as Center,
6
6
  o as Column,
@@ -3,14 +3,14 @@ var q = Object.defineProperty;
3
3
  var I = (e, t, n) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
4
  var b = (e, t, n) => I(e, typeof t != "symbol" ? t + "" : t, n);
5
5
  import h, { useCallback as R, useSyncExternalStore as E, memo as T, useState as w, useRef as _, useEffect as v, StrictMode as L } from "react";
6
- import { n as k, S as F, w as z, z as $, A as j, x as H, R as x, B as D, P as N, D as W, G } from "./builder-DxmEDvW3.js";
6
+ import { n as k, S as F, B as H, H as $, J as j, D as z, R as x, K as N, P as D, L as W, N as J } from "./builder-FPfXLYM6.js";
7
7
  import { createRoot as C } from "react-dom/client";
8
- import { P as Y } from "./PluginManager-D5-ApsSN.js";
9
- function J(e) {
8
+ import { P as K } from "./PluginManager-D5-ApsSN.js";
9
+ function Y(e) {
10
10
  return (t) => e.subscribe(t);
11
11
  }
12
12
  function fe(e) {
13
- const t = R(J(e), [e]);
13
+ const t = R(Y(e), [e]);
14
14
  return E(t, () => e.value, () => e.value);
15
15
  }
16
16
  function me(e) {
@@ -38,7 +38,7 @@ function we(e, t) {
38
38
  const n = T(e, t);
39
39
  return (r) => h.createElement(n, r);
40
40
  }
41
- const K = {
41
+ const G = {
42
42
  linear: (e) => e,
43
43
  easeIn: (e) => e * e,
44
44
  easeOut: (e) => e * (2 - e),
@@ -49,7 +49,7 @@ const K = {
49
49
  bounce: (e) => e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + 0.75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 : 7.5625 * (e -= 2.625 / 2.75) * e + 0.984375
50
50
  };
51
51
  function be(e, t) {
52
- const { duration: n = 300, delay: r = 0, easing: i = K.easeOut } = t || {}, [o, c] = w(e), s = _(), l = _(o);
52
+ const { duration: n = 300, delay: r = 0, easing: i = G.easeOut } = t || {}, [o, c] = w(e), s = _(), l = _(o);
53
53
  return l.current = o, v(() => {
54
54
  s.current && cancelAnimationFrame(s.current);
55
55
  let u = null;
@@ -129,7 +129,7 @@ function ye() {
129
129
  };
130
130
  }, []), e;
131
131
  }
132
- const P = {
132
+ const A = {
133
133
  linear: (e) => e,
134
134
  easeIn: (e) => e * e,
135
135
  easeOut: (e) => e * (2 - e),
@@ -148,14 +148,14 @@ F.prototype.animate = function(e, t = {}) {
148
148
  const u = t.stiffness ?? 170, a = t.damping ?? 26, d = t.mass ?? 1;
149
149
  let m = n, f = t.velocity ?? 0;
150
150
  const p = 1 / 60, y = () => {
151
- var A;
151
+ var P;
152
152
  const S = -u * (m - r) - a * f;
153
- f += S / d * p, m += f * p, this.value = m, Math.abs(m - r) > 0.01 || Math.abs(f) > 0.01 ? g.set(this, requestAnimationFrame(y)) : (this.value = r, g.delete(this), (A = t.onComplete) == null || A.call(t));
153
+ f += S / d * p, m += f * p, this.value = m, Math.abs(m - r) > 0.01 || Math.abs(f) > 0.01 ? g.set(this, requestAnimationFrame(y)) : (this.value = r, g.delete(this), (P = t.onComplete) == null || P.call(t));
154
154
  };
155
155
  g.set(this, requestAnimationFrame(y));
156
156
  return;
157
157
  }
158
- const o = t.duration || 300, c = P[t.curve || "easeOut"] ?? P.easeOut;
158
+ const o = t.duration || 300, c = A[t.curve || "easeOut"] ?? A.easeOut;
159
159
  let s = null;
160
160
  const l = (u) => {
161
161
  var d;
@@ -243,7 +243,7 @@ function B({
243
243
  o
244
244
  );
245
245
  }
246
- class re extends H {
246
+ class re extends z {
247
247
  constructor(n = !0) {
248
248
  super();
249
249
  b(this, "_show", !0);
@@ -274,7 +274,7 @@ class re extends H {
274
274
  });
275
275
  }
276
276
  }
277
- const ie = z(re);
277
+ const ie = H(re);
278
278
  function se(e) {
279
279
  return X(e) ? h.createElement(B, e) : ie(e ?? !0);
280
280
  }
@@ -303,14 +303,14 @@ class oe {
303
303
  build() {
304
304
  if (!this._rootComponent || !this._rootElement)
305
305
  throw new Error("Root component and mount element must be provided");
306
- const t = Y.getInstance();
306
+ const t = K.getInstance();
307
307
  this._plugins.forEach((o) => {
308
308
  t.use(o);
309
309
  });
310
310
  const n = this._rootComponent, r = () => h.createElement(x, {
311
- children: h.createElement(D, {
311
+ children: h.createElement(N, {
312
312
  stateMap: /* @__PURE__ */ new Map(),
313
- children: h.createElement(N, {
313
+ children: h.createElement(D, {
314
314
  providers: /* @__PURE__ */ new Map(),
315
315
  children: h.createElement(n, null)
316
316
  })
@@ -321,7 +321,7 @@ class oe {
321
321
  }
322
322
  const Se = () => new oe();
323
323
  function O(e) {
324
- return G(e);
324
+ return J(e);
325
325
  }
326
326
  function Re({ children: e }) {
327
327
  return O(e);
@@ -336,7 +336,7 @@ function Fe(e, t, n) {
336
336
  ), c;
337
337
  }
338
338
  export {
339
- K as E,
339
+ G as E,
340
340
  Se as F,
341
341
  se as P,
342
342
  me as a,
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ import { useState as a, useCallback as F, useMemo as T, createContext as C, useContext as p } from "react";
4
+ import { r as x, f as P, b as g } from "./themeData-CmTJt3dU.js";
5
+ const l = C(void 0);
6
+ function k(e) {
7
+ return typeof e == "string" ? e : `${e.name}|${e.colors.primary}|${e.colors.background}|${e.fontFamily}`;
8
+ }
9
+ function N({
10
+ theme: e = "web",
11
+ children: m,
12
+ className: c,
13
+ style: i
14
+ }) {
15
+ const t = k(e), [u, f] = a(t), [h, r] = a(null);
16
+ t !== u && (f(t), r(null));
17
+ const o = x(h ?? e), n = F((v) => {
18
+ r(v);
19
+ }, []), b = T(
20
+ () => ({
21
+ theme: o,
22
+ themeName: o.name,
23
+ setTheme: n
24
+ }),
25
+ [o, n]
26
+ ), d = [P(o), c].filter(Boolean).join(" "), y = {
27
+ ...g(o),
28
+ backgroundColor: o.colors.background,
29
+ color: o.colors.onBackground,
30
+ fontFamily: o.fontFamily,
31
+ ...i
32
+ };
33
+ return /* @__PURE__ */ s(l.Provider, { value: b, children: /* @__PURE__ */ s("div", { className: d, "data-fibo-theme": o.name, style: y, children: m }) });
34
+ }
35
+ function S() {
36
+ const e = p(l);
37
+ if (!e)
38
+ throw new Error("useFiboTheme must be used within a FiboThemeProvider");
39
+ return e;
40
+ }
41
+ export {
42
+ N as F,
43
+ S as u
44
+ };
package/dist/structure.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { B as e } from "./index-B_NshIUT.js";
3
- import { B as i, C as o, c as t, G as l, d, L as B, a as T, T as m, b as n } from "./index-CIUytVXq.js";
2
+ import { B as e } from "./index-BuatCnp7.js";
3
+ import { B as i, C as o, c as t, G as l, d, L as B, a as T, T as m, b as n } from "./index-DkH15EIF.js";
4
4
  export {
5
5
  i as Banner,
6
6
  e as Box,