fiboui 2.8.3 → 2.8.4

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,25 +1,25 @@
1
- import { B as e } from "./index-CU0_oAGn.js";
2
- import { ap as r, at as t, ab as m, aq as i, as as l, ao as n, aa as x, ar as u, ag as h, an as p, ac as b, am as c, aj as d, af as f, ai as g, ae as T, ah as q, ad as k, ak as B, al as C } from "./client-8KCOzRhg.js";
1
+ import { B as e } from "./index-19mPjg_D.js";
2
+ import { at as r, ax as t, af as m, au as i, aw as x, as as l, ae as n, av as u, ak as h, ar as p, ag as f, aq as g, an as T, aj as b, am as c, ai as d, al as q, ah as k, ao as w, ap as B } from "./client-DOrZXJAN.js";
3
3
  export {
4
4
  e as Button,
5
5
  r as Checkbox,
6
6
  t as Combobox,
7
7
  m as Form,
8
8
  i as RadioGroup,
9
- l as Select,
10
- n as Switch,
11
- x as TextField,
9
+ x as Select,
10
+ l as Switch,
11
+ n as TextField,
12
12
  u as Textarea,
13
13
  h as email,
14
14
  p as equalTo,
15
- b as formDataToValues,
16
- c as integer,
17
- d as max,
18
- f as maxLength,
19
- g as min,
20
- T as minLength,
15
+ f as formDataToValues,
16
+ g as integer,
17
+ T as max,
18
+ b as maxLength,
19
+ c as min,
20
+ d as minLength,
21
21
  q as pattern,
22
22
  k as required,
23
- B as rule,
24
- C as url
23
+ w as rule,
24
+ B as url
25
25
  };
package/dist/layout.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as r, a as s, H as e, L as l, b as t, S, Z as n } from "./index-CFwY5hCL.js";
2
- import { C as c, S as f } from "./index-C5TPsNMz.js";
3
- import { a6 as m, a3 as d, a4 as p, a5 as u, a7 as b } from "./client-8KCOzRhg.js";
1
+ import { C as r, a as s, H as e, L as l, b as t, S, Z as n } from "./index-CYMoWJMX.js";
2
+ import { C as c, S as f } from "./index-C0qI47Zw.js";
3
+ import { aa as m, a7 as b, a8 as d, a9 as p, ab as u } from "./client-DOrZXJAN.js";
4
4
  export {
5
5
  r as Center,
6
6
  c as Column,
@@ -8,12 +8,12 @@ export {
8
8
  m as DashboardLayout,
9
9
  e as Header,
10
10
  l as Line,
11
- d as Row,
12
- p as Scaffold,
11
+ b as Row,
12
+ d as Scaffold,
13
13
  t as ScrollController,
14
14
  S as ScrollView,
15
- u as Sidebar,
15
+ p as Sidebar,
16
16
  f as Spacer,
17
- b as VirtualColumn,
17
+ u as VirtualColumn,
18
18
  n as ZStack
19
19
  };
@@ -1,24 +1,24 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { b6 as v, b5 as x, b7 as E, b8 as k, b9 as R, ba as D, bb as O, bc as g, bd as P, be as $, bf as z, aD as A, aE as K } from "./client-8KCOzRhg.js";
3
- import { useState as M, useMemo as N, lazy as S, Suspense as B } from "react";
2
+ import { bb as v, ba as w, bc as x, bd as E, be as R, bf as O, bg as P, bh as g, bi as $, bj as D, bk as z, aH as A, aI as H } from "./client-DOrZXJAN.js";
3
+ import { useState as I, useMemo as K, lazy as M, Suspense as N } from "react";
4
4
  function b(e) {
5
5
  const t = (typeof e == "string" ? e.trim() : "").split(/[?#]/, 1)[0];
6
6
  return !t || t === "/" ? "/" : t.startsWith("/") ? t : `/${t}`;
7
7
  }
8
- function H(e) {
8
+ function S(e) {
9
9
  let t = typeof e == "string" ? e.trim() : "", r = "";
10
10
  const a = t.indexOf("#");
11
11
  a >= 0 && (r = t.slice(a), t = t.slice(0, a));
12
12
  const s = t.indexOf("?");
13
13
  return { search: s >= 0 ? t.slice(s) : "", hash: r };
14
14
  }
15
- function I(e, n) {
16
- const { search: t, hash: r } = H(n), a = R(b(n), e);
17
- return `${D(e, a)}${t}${r}`;
15
+ function j(e, n) {
16
+ const { search: t, hash: r } = S(n), a = R(b(n), e);
17
+ return `${O(e, a)}${t}${r}`;
18
18
  }
19
- function j(e, n, t, r = "") {
19
+ function B(e, n, t, r = "") {
20
20
  const a = R(b(n), r), s = b(e);
21
- return a === "/" ? s === "/" : O(s, a, t).match;
21
+ return a === "/" ? s === "/" : P(s, a, t).match;
22
22
  }
23
23
  const W = ({
24
24
  to: e,
@@ -33,7 +33,7 @@ const W = ({
33
33
  rel: h,
34
34
  ...p
35
35
  }) => {
36
- const l = v(), m = x(e), y = !m && E(e), C = m ? void 0 : y ? e.trim() : I((l == null ? void 0 : l.basename) ?? "", e), w = i && String(i).toLowerCase() === "_blank" ? k(h, "noopener noreferrer") : h;
36
+ const l = v(), m = w(e), y = !m && x(e), C = m ? void 0 : y ? e.trim() : j((l == null ? void 0 : l.basename) ?? "", e), k = i && String(i).toLowerCase() === "_blank" ? E(h, "noopener noreferrer") : h;
37
37
  return /* @__PURE__ */ c(
38
38
  "a",
39
39
  {
@@ -52,7 +52,7 @@ const W = ({
52
52
  style: s,
53
53
  target: i,
54
54
  download: o,
55
- rel: w,
55
+ rel: k,
56
56
  children: n
57
57
  }
58
58
  );
@@ -66,7 +66,7 @@ const W = ({
66
66
  exact: f = !1,
67
67
  ...i
68
68
  }) => {
69
- const o = v(), h = !!o && j(
69
+ const o = v(), h = !!o && B(
70
70
  o.currentPath,
71
71
  e,
72
72
  f,
@@ -87,11 +87,11 @@ const W = ({
87
87
  const e = v(), n = g();
88
88
  if (!e || !n || !n.children || n.children.length === 0)
89
89
  return null;
90
- const { route: t } = P(n.children, e.currentPath);
90
+ const { route: t } = $(n.children, e.currentPath);
91
91
  if (!t)
92
92
  return null;
93
93
  const r = t.component;
94
- return /* @__PURE__ */ c($.Provider, { value: t, children: /* @__PURE__ */ c(r, {}) });
94
+ return /* @__PURE__ */ c(D.Provider, { value: t, children: /* @__PURE__ */ c(r, {}) });
95
95
  }, d = /* @__PURE__ */ new WeakMap();
96
96
  function _(e) {
97
97
  return e instanceof Error ? e : typeof e == "string" && e.trim() ? new Error(e) : new Error("Failed to load route");
@@ -107,15 +107,15 @@ function L(e) {
107
107
  }
108
108
  function Q(e, n) {
109
109
  function t(r) {
110
- const [a, s] = M(0), f = N(
111
- () => S(() => L(e)),
110
+ const [a, s] = I(0), f = K(
111
+ () => M(() => L(e)),
112
112
  [a]
113
113
  );
114
114
  return /* @__PURE__ */ c(
115
115
  z,
116
116
  {
117
117
  fallback: (i) => /* @__PURE__ */ c(
118
- K,
118
+ H,
119
119
  {
120
120
  error: i,
121
121
  onReset: () => {
@@ -123,7 +123,7 @@ function Q(e, n) {
123
123
  }
124
124
  }
125
125
  ),
126
- children: /* @__PURE__ */ c(B, { fallback: (n == null ? void 0 : n.loading) ?? /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(f, { ...r }) })
126
+ children: /* @__PURE__ */ c(N, { fallback: (n == null ? void 0 : n.loading) ?? /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(f, { ...r }) })
127
127
  },
128
128
  a
129
129
  );
@@ -1,5 +1,5 @@
1
- import { aE as s, aD as u, ax as o, aB as t, az as r, aA as l, aC as L, ay as R } from "./client-8KCOzRhg.js";
2
- import { L as i, N as p, O as m, l as n, p as x, u as y } from "./metadata-BEmm6pe-.js";
1
+ import { aI as s, aH as u, aB as o, aF as t, aD as r, aE as l, aG as L, aC as R } from "./client-DOrZXJAN.js";
2
+ import { L as i, N as p, O as m, l as n, p as D, u as N } from "./metadata-9Bpw89m2.js";
3
3
  export {
4
4
  s as DefaultErrorPage,
5
5
  u as DefaultLoader,
@@ -8,11 +8,11 @@ export {
8
8
  m as Outlet,
9
9
  o as Router,
10
10
  n as lazyRoute,
11
- x as preloadRoute,
11
+ D as preloadRoute,
12
12
  t as useLocation,
13
13
  r as useNavigate,
14
14
  l as useParams,
15
15
  L as useQuery,
16
- y as useRouteMeta,
16
+ N as useRouteMeta,
17
17
  R as useRouter
18
18
  };
@@ -0,0 +1,184 @@
1
+ import { K, S as q, b3 as V, b4 as I, Y as T, b5 as W, b6 as Y, b7 as P } from "./client-DOrZXJAN.js";
2
+ import y, { useSyncExternalStore as j } from "react";
3
+ const R = {
4
+ linear: (t) => t,
5
+ easeIn: (t) => t * t,
6
+ easeOut: (t) => t * (2 - t),
7
+ easeInOut: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t
8
+ };
9
+ function G(t, e, w) {
10
+ return t + (e - t) * w;
11
+ }
12
+ const m = /* @__PURE__ */ new WeakMap();
13
+ function H() {
14
+ return typeof requestAnimationFrame == "function";
15
+ }
16
+ function J() {
17
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
18
+ }
19
+ function Q(t) {
20
+ const e = m.get(t);
21
+ e != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(e), m.delete(t);
22
+ }
23
+ q.prototype.spring = function(t, e = {}) {
24
+ this.animate(t, { ...e, curve: "spring", damping: e.damping ?? 26, stiffness: e.stiffness ?? 170 });
25
+ };
26
+ q.prototype.animate = function(t, e = {}) {
27
+ var l, F;
28
+ const w = this.value, i = t;
29
+ if (Q(this), !H() || J()) {
30
+ this.value = i, (l = e.onComplete) == null || l.call(e);
31
+ return;
32
+ }
33
+ if (e.curve === "spring") {
34
+ const h = typeof e.stiffness == "number" && Number.isFinite(e.stiffness) && e.stiffness > 0 ? e.stiffness : 170, b = typeof e.damping == "number" && Number.isFinite(e.damping) && e.damping >= 0 ? e.damping : 26, o = typeof e.mass == "number" && Number.isFinite(e.mass) && e.mass > 0 ? e.mass : 1;
35
+ let f = w, g = typeof e.velocity == "number" && Number.isFinite(e.velocity) ? e.velocity : 0;
36
+ const E = 1 / 60, C = () => {
37
+ var N, A;
38
+ const k = -h * (f - i) - b * g;
39
+ if (g += k / o * E, f += g * E, !Number.isFinite(f) || !Number.isFinite(g)) {
40
+ this.value = i, m.delete(this), (N = e.onComplete) == null || N.call(e);
41
+ return;
42
+ }
43
+ this.value = f, Math.abs(f - i) > 0.01 || Math.abs(g) > 0.01 ? m.set(this, requestAnimationFrame(C)) : (this.value = i, m.delete(this), (A = e.onComplete) == null || A.call(e));
44
+ };
45
+ m.set(this, requestAnimationFrame(C));
46
+ return;
47
+ }
48
+ const v = e.duration, u = typeof v == "number" && Number.isFinite(v) && v > 0 ? v : v === void 0 ? 300 : 0;
49
+ if (u === 0) {
50
+ this.value = i, (F = e.onComplete) == null || F.call(e);
51
+ return;
52
+ }
53
+ const M = R[e.curve || "easeOut"] ?? R.easeOut;
54
+ let p = null;
55
+ const d = (h) => {
56
+ var o;
57
+ p || (p = h);
58
+ const b = Math.min((h - p) / u, 1);
59
+ this.value = G(w, i, M(b)), b < 1 ? m.set(this, requestAnimationFrame(d)) : (m.delete(this), (o = e.onComplete) == null || o.call(e));
60
+ };
61
+ m.set(this, requestAnimationFrame(d));
62
+ };
63
+ q.prototype.snapTo = function(t, e = {}) {
64
+ this.animate(t, { duration: 300, curve: "easeOut", ...e });
65
+ };
66
+ function $(t = {}) {
67
+ return K(t.curve ?? "easeOut", {
68
+ stiffness: t.stiffness,
69
+ damping: t.damping,
70
+ mass: t.mass
71
+ });
72
+ }
73
+ function X(t, e = {}) {
74
+ const { styles: w = !0, meta: i } = e, v = [], u = [], M = V(t.toString());
75
+ let p = "", d = 0, l = null, F = -1, h = !1, b = [], o = [];
76
+ const f = /* @__PURE__ */ new Set();
77
+ function g(n, r) {
78
+ if (n.length !== r.length) return !1;
79
+ for (let s = 0; s < n.length; s++) if (n[s] !== r[s]) return !1;
80
+ return !0;
81
+ }
82
+ function E(n) {
83
+ var r, s;
84
+ for (let a = 0; a < u.length; a++) {
85
+ const c = u[a];
86
+ if (c) {
87
+ if (a >= n) {
88
+ (r = c.unsubs) == null || r.forEach((S) => S()), c.unsubs = [], c.wired = void 0;
89
+ continue;
90
+ }
91
+ c.wired && g(c.wired, c.signals) || ((s = c.unsubs) == null || s.forEach((S) => S()), c.unsubs = c.signals.map((S) => S.subscribe(() => N(S))), c.wired = c.signals);
92
+ }
93
+ }
94
+ }
95
+ function C(n) {
96
+ g(b, n) || (o.forEach((r) => r()), o = n.map((r) => r.subscribe(() => N())), b = n);
97
+ }
98
+ function k(n) {
99
+ let r = !1;
100
+ for (let s = 0; s < u.length; s++) {
101
+ const a = u[s];
102
+ if (a != null && a.signals.includes(n)) {
103
+ if (r = !0, !a.parts || !a.node) return !1;
104
+ a.next = Y(a.parts);
105
+ }
106
+ }
107
+ return r ? P(u, u.length) : !1;
108
+ }
109
+ function N(n) {
110
+ if (!h) {
111
+ h = !0;
112
+ try {
113
+ if (n && k(n)) return;
114
+ D();
115
+ } finally {
116
+ h = !1;
117
+ }
118
+ }
119
+ }
120
+ function A(n) {
121
+ const r = [];
122
+ return typeof (i == null ? void 0 : i.title) == "string" && i.title.length > 0 && r.push(y.createElement("title", { key: "fibo-title" }, i.title)), typeof (i == null ? void 0 : i.description) == "string" && i.description.length > 0 && r.push(
123
+ y.createElement("meta", {
124
+ key: "fibo-description",
125
+ name: "description",
126
+ content: i.description
127
+ })
128
+ ), r.push(n), w && r.push(y.createElement(T)), y.createElement(y.Fragment, null, ...r);
129
+ }
130
+ function x() {
131
+ let n;
132
+ const r = W(v, u, () => {
133
+ n = I(t());
134
+ }, M);
135
+ return { tree: n, ...r.outcome };
136
+ }
137
+ function D() {
138
+ const n = x();
139
+ if (E(n.slotCount), C(n.roots), !(n.shape === p && !n.layout && P(u, n.slotCount))) {
140
+ p = n.shape, d += 1, l = A(n.tree), F = d;
141
+ for (const s of f) s();
142
+ }
143
+ }
144
+ function L() {
145
+ if (l && F === d) return l;
146
+ const n = x();
147
+ return p = n.shape, l = A(n.tree), F = d, E(n.slotCount), C(n.roots), l;
148
+ }
149
+ function U(n) {
150
+ return f.add(n), () => {
151
+ var r;
152
+ if (f.delete(n), f.size === 0) {
153
+ for (const s of u)
154
+ (r = s == null ? void 0 : s.unsubs) == null || r.forEach((a) => a()), s && (s.unsubs = [], s.wired = void 0);
155
+ o.forEach((s) => s()), o = [], b = [], l = null, F = -1;
156
+ }
157
+ };
158
+ }
159
+ function z() {
160
+ return d;
161
+ }
162
+ function B() {
163
+ return 0;
164
+ }
165
+ function O() {
166
+ return j(U, z, B), L();
167
+ }
168
+ return O.displayName = "FiboPage", i && (O.meta = i), O;
169
+ }
170
+ const ee = X;
171
+ function te(t) {
172
+ return y.createElement(
173
+ y.Fragment,
174
+ null,
175
+ I(t),
176
+ y.createElement(T)
177
+ );
178
+ }
179
+ export {
180
+ ee as a,
181
+ $ as c,
182
+ X as p,
183
+ te as w
184
+ };