fiboui 2.4.4 → 2.6.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,12 +1,12 @@
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-BxH8dhoT.js";
1
+ import { B as e, R as s, S as t, T as r } from "./index-BGRLxUem.js";
2
+ import { a1 as b, a3 as c, a2 as i, a0 as m } from "./client-C9ZVisXx.js";
3
3
  export {
4
- o as Button,
5
- s as Checkbox,
6
- t as Combobox,
7
- c as RadioGroup,
8
- x as Select,
9
- b as Switch,
10
- i as TextField,
4
+ e as Button,
5
+ b as Checkbox,
6
+ c as Combobox,
7
+ s as RadioGroup,
8
+ i as Select,
9
+ t as Switch,
10
+ m as TextField,
11
11
  r as Textarea
12
12
  };
package/dist/layout.js CHANGED
@@ -1,18 +1,18 @@
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-DGQVwcWx.js";
3
- import { R as m } from "./index-BMIo5j9Y.js";
1
+ import { C as r, a as s, b as e, H as t, L as l, c as n, e as S, d as c, S as d, Z as f } from "./index-eboXR8k_.js";
2
+ import { R as m } from "./index-BQ1MDC96.js";
3
+ import { Z as p, _ as u } from "./client-C9ZVisXx.js";
4
4
  export {
5
- e as Center,
6
- o as Column,
7
- r as Container,
8
- t as DashboardLayout,
9
- l as Header,
10
- n as Line,
5
+ r as Center,
6
+ s as Column,
7
+ e as Container,
8
+ p as DashboardLayout,
9
+ t as Header,
10
+ l as Line,
11
11
  m as Row,
12
- c as Scaffold,
13
- i as ScrollView,
14
- S as Sidebar,
12
+ n as Scaffold,
13
+ S as ScrollView,
14
+ c as Sidebar,
15
15
  d as Spacer,
16
16
  u as VirtualColumn,
17
- C as ZStack
17
+ f as ZStack
18
18
  };
@@ -0,0 +1,135 @@
1
+ var S = Object.defineProperty;
2
+ var O = (e, t, n) => t in e ? S(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var p = (e, t, n) => O(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { G as P, S as g, av as E, T as _, R as C, aw as q, P as I, ax as k } from "./client-C9ZVisXx.js";
5
+ import r, { StrictMode as x } from "react";
6
+ import { createRoot as M } from "react-dom/client";
7
+ import { P as B } from "./PluginManager-BRjgOLVa.js";
8
+ const y = {
9
+ linear: (e) => e,
10
+ easeIn: (e) => e * e,
11
+ easeOut: (e) => e * (2 - e),
12
+ easeInOut: (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e
13
+ };
14
+ function T(e, t, n) {
15
+ return e + (t - e) * n;
16
+ }
17
+ const i = /* @__PURE__ */ new WeakMap();
18
+ g.prototype.spring = function(e, t = {}) {
19
+ this.animate(e, { ...t, curve: "spring", damping: t.damping ?? 26, stiffness: t.stiffness ?? 170 });
20
+ };
21
+ g.prototype.animate = function(e, t = {}) {
22
+ const n = this.value, s = e, a = i.get(this);
23
+ if (a && cancelAnimationFrame(a), t.curve === "spring") {
24
+ const c = t.stiffness ?? 170, m = t.damping ?? 26, f = t.mass ?? 1;
25
+ let h = n, d = t.velocity ?? 0;
26
+ const F = 1 / 60, b = () => {
27
+ var w;
28
+ const R = -c * (h - s) - m * d;
29
+ d += R / f * F, h += d * F, this.value = h, Math.abs(h - s) > 0.01 || Math.abs(d) > 0.01 ? i.set(this, requestAnimationFrame(b)) : (this.value = s, i.delete(this), (w = t.onComplete) == null || w.call(t));
30
+ };
31
+ i.set(this, requestAnimationFrame(b));
32
+ return;
33
+ }
34
+ const u = t.duration || 300, l = y[t.curve || "easeOut"] ?? y.easeOut;
35
+ let o = null;
36
+ const v = (c) => {
37
+ var f;
38
+ o || (o = c);
39
+ const m = Math.min((c - o) / u, 1);
40
+ this.value = T(n, s, l(m)), m < 1 ? i.set(this, requestAnimationFrame(v)) : (i.delete(this), (f = t.onComplete) == null || f.call(t));
41
+ };
42
+ i.set(this, requestAnimationFrame(v));
43
+ };
44
+ g.prototype.snapTo = function(e, t = {}) {
45
+ this.animate(e, { duration: 300, curve: "easeOut", ...t });
46
+ };
47
+ function D(e = {}) {
48
+ return P(e.curve ?? "easeOut", {
49
+ stiffness: e.stiffness,
50
+ damping: e.damping,
51
+ mass: e.mass
52
+ });
53
+ }
54
+ function H(e, t = {}) {
55
+ const { styles: n = !0 } = t;
56
+ function s() {
57
+ const a = E(e());
58
+ return n ? r.createElement(r.Fragment, null, a, r.createElement(_)) : r.createElement(r.Fragment, null, a);
59
+ }
60
+ return s.displayName = "FiboPage", s;
61
+ }
62
+ function J(e) {
63
+ return r.createElement(
64
+ r.Fragment,
65
+ null,
66
+ E(e),
67
+ r.createElement(_)
68
+ );
69
+ }
70
+ class W {
71
+ constructor() {
72
+ p(this, "_rootComponent", null);
73
+ p(this, "_rootElement", null);
74
+ p(this, "_plugins", []);
75
+ }
76
+ use(t) {
77
+ return this._plugins.push(t), this;
78
+ }
79
+ plugins(t) {
80
+ return this._plugins.push(...t), this;
81
+ }
82
+ root(t) {
83
+ return this._rootComponent = t, this;
84
+ }
85
+ mount(t) {
86
+ const n = document.getElementById(t);
87
+ if (!n)
88
+ throw new Error(`Root element with id "${t}" not found`);
89
+ this._rootElement = n, this.build();
90
+ }
91
+ build() {
92
+ if (!this._rootComponent || !this._rootElement)
93
+ throw new Error("Root component and mount element must be provided");
94
+ const t = B.getInstance();
95
+ this._plugins.forEach((u) => {
96
+ t.use(u);
97
+ });
98
+ const n = this._rootComponent, s = () => r.createElement(C, {
99
+ children: r.createElement(q, {
100
+ stateMap: /* @__PURE__ */ new Map(),
101
+ children: r.createElement(I, {
102
+ providers: /* @__PURE__ */ new Map(),
103
+ children: r.createElement(n, null)
104
+ })
105
+ })
106
+ });
107
+ M(this._rootElement).render(r.createElement(s));
108
+ }
109
+ }
110
+ const K = () => new W();
111
+ function A(e) {
112
+ return E(e);
113
+ }
114
+ function L({ children: e }) {
115
+ return A(e);
116
+ }
117
+ function Q(e, t, n) {
118
+ const s = typeof e == "string" ? document.querySelector(e) : e;
119
+ if (!s)
120
+ throw new Error(`mount: element not found: ${String(e)}`);
121
+ const a = typeof t == "function" && !k(t) ? t() : t, u = A(a), l = M(s), o = r.createElement(C, { children: u });
122
+ return l.render(
123
+ (n == null ? void 0 : n.strict) === !1 ? o : r.createElement(x, null, o)
124
+ ), l;
125
+ }
126
+ export {
127
+ K as F,
128
+ W as a,
129
+ L as b,
130
+ D as c,
131
+ Q as m,
132
+ H as p,
133
+ A as t,
134
+ J as w
135
+ };
@@ -1,13 +1,12 @@
1
- "use client";
2
- import { R as e } from "./Router-BwbaHooU.js";
3
- import { L as o, N as r, c as t, a as i, b as n, d as L, u as c } from "./Link-ElmaMZB8.js";
1
+ import { a8 as e, ac as o, aa as r, ab as u, ad as t, a9 as i } from "./client-C9ZVisXx.js";
2
+ import { L as m, N as n } from "./Link-dHd4e7BS.js";
4
3
  export {
5
- o as Link,
6
- r as NavLink,
4
+ m as Link,
5
+ n as NavLink,
7
6
  e as Router,
8
- t as useLocation,
9
- i as useNavigate,
10
- n as useParams,
11
- L as useQuery,
12
- c as useRouter
7
+ o as useLocation,
8
+ r as useNavigate,
9
+ u as useParams,
10
+ t as useQuery,
11
+ i as useRouter
13
12
  };