fiboui 2.9.6 → 2.9.15

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.
@@ -309,6 +309,8 @@ declare class PseudoStateBuilder {
309
309
  translateY(value: number | string): this;
310
310
  rotate(degrees: number): this;
311
311
  shadow(value: string | number): this;
312
+ /** Same surface as `Box().css({})` — object bag or `(property, value)`. */
313
+ css(styles: React$1.CSSProperties): this;
312
314
  css(property: string, value: string | number): this;
313
315
  padding(value: string | number): this;
314
316
  p(value: string | number): this;
@@ -1,5 +1,5 @@
1
- import { B as e } from "./index-BK9NhRgp.js";
2
- import { aA as r, aE as t, am as m, aB as x, aD as i, az as l, al as n, aC as u, ar as p, ay as h, an as T, ax as b, au as c, aq as d, at as f, ap as g, as as q, ao as B, av as C, aw as w } from "./client-DspTEDnT.js";
1
+ import { B as e } from "./index-BBa7p7cv.js";
2
+ import { aC as r, aG as t, ao as m, aD as x, aF as i, aB as n, an as u, aE as l, at as p, aA as h, ap as T, az as b, aw as c, as as d, av as f, ar as g, au as q, aq as B, ax as C, ay as F } from "./client-CNrWulRU.js";
3
3
  export {
4
4
  e as Button,
5
5
  r as Checkbox,
@@ -7,9 +7,9 @@ export {
7
7
  m as Form,
8
8
  x as RadioGroup,
9
9
  i as Select,
10
- l as Switch,
11
- n as TextField,
12
- u as Textarea,
10
+ n as Switch,
11
+ u as TextField,
12
+ l as Textarea,
13
13
  p as email,
14
14
  h as equalTo,
15
15
  T as formDataToValues,
@@ -21,5 +21,5 @@ export {
21
21
  q as pattern,
22
22
  B as required,
23
23
  C as rule,
24
- w as url
24
+ F as url
25
25
  };
package/dist/layout.d.ts CHANGED
@@ -311,6 +311,8 @@ declare class PseudoStateBuilder {
311
311
  translateY(value: number | string): this;
312
312
  rotate(degrees: number): this;
313
313
  shadow(value: string | number): this;
314
+ /** Same surface as `Box().css({})` — object bag or `(property, value)`. */
315
+ css(styles: React$1.CSSProperties): this;
314
316
  css(property: string, value: string | number): this;
315
317
  padding(value: string | number): this;
316
318
  p(value: string | number): this;
package/dist/layout.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, a as o, L as s, b as l, S as t, Z as i } from "./index-CE3dybe8.js";
2
- import { C as d, S as c } from "./index-vSLH4ZkD.js";
3
- import { ad as u, ai as C, ab as f, ah as m, a9 as b, aa as p, ae as w, ac as L, af as R, ag as V } from "./client-DspTEDnT.js";
1
+ import { C as e, a as o, L as s, b as l, S as t, Z as i } from "./index-Bcf-s8v0.js";
2
+ import { C as d, S as c } from "./index-COE2gXjP.js";
3
+ import { af as u, ak as C, ad as f, aj as m, ab as b, ac as p, ag as w, ae as L, ah as R, ai as V } from "./client-CNrWulRU.js";
4
4
  export {
5
5
  e as Center,
6
6
  d as Column,
@@ -1,5 +1,5 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { bf as v, bd as w, bg as x, bh as O, bi as R, bj as P, bk as E, bl as g, bm as $, bn as D, bo as z, aO as A, aP as K } from "./client-DspTEDnT.js";
2
+ import { bi as v, bf as w, bj as x, bk as E, bl as R, bm as O, bn as P, bo as g, bp as $, bq as D, br as z, aQ as A, aR as K } from "./client-CNrWulRU.js";
3
3
  import { useState as M, useMemo as N, lazy as S, Suspense as j } from "react";
4
4
  function b(e) {
5
5
  const t = (typeof e == "string" ? e.trim() : "").split(/[?#]/, 1)[0];
@@ -14,13 +14,13 @@ function B(e) {
14
14
  }
15
15
  function H(e, n) {
16
16
  const { search: t, hash: r } = B(n), a = R(b(n), e);
17
- return `${P(e, a)}${t}${r}`;
17
+ return `${O(e, a)}${t}${r}`;
18
18
  }
19
19
  function I(e, n, t, r = "") {
20
20
  const a = R(b(n), r), s = b(e);
21
- return a === "/" ? s === "/" : E(s, a, t).match;
21
+ return a === "/" ? s === "/" : P(s, a, t).match;
22
22
  }
23
- const W = ({
23
+ const q = ({
24
24
  to: e,
25
25
  children: n,
26
26
  replace: t = !1,
@@ -31,17 +31,17 @@ const W = ({
31
31
  target: i,
32
32
  download: o,
33
33
  rel: h,
34
- ...m
34
+ ...p
35
35
  }) => {
36
- const l = v(), p = w(e), y = !p && x(e), C = p ? void 0 : y ? e.trim() : H((l == null ? void 0 : l.basename) ?? "", e), k = i && String(i).toLowerCase() === "_blank" ? O(h, "noopener noreferrer") : h;
36
+ const l = v(), m = w(e), y = !m && x(e), C = m ? void 0 : y ? e.trim() : H((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
  {
40
- ...m,
40
+ ...p,
41
41
  href: C,
42
42
  onClick: (u) => {
43
43
  if (f == null || f(u), !u.defaultPrevented) {
44
- if (p) {
44
+ if (m) {
45
45
  u.preventDefault();
46
46
  return;
47
47
  }
@@ -56,7 +56,7 @@ const W = ({
56
56
  children: n
57
57
  }
58
58
  );
59
- }, G = ({
59
+ }, V = ({
60
60
  to: e,
61
61
  children: n,
62
62
  className: t = "",
@@ -71,19 +71,19 @@ const W = ({
71
71
  e,
72
72
  f,
73
73
  o.basename
74
- ), m = h ? `${t} ${a}`.trim() : t, l = h ? { ...r, ...s } : r;
74
+ ), p = h ? `${t} ${a}`.trim() : t, l = h ? { ...r, ...s } : r;
75
75
  return /* @__PURE__ */ c(
76
- W,
76
+ q,
77
77
  {
78
78
  to: e,
79
- className: m,
79
+ className: p,
80
80
  style: l,
81
81
  ...i,
82
82
  "aria-current": h ? "page" : void 0,
83
83
  children: n
84
84
  }
85
85
  );
86
- }, J = () => {
86
+ }, G = () => {
87
87
  const e = v(), n = g();
88
88
  if (!e || !n || !n.children || n.children.length === 0)
89
89
  return null;
@@ -93,7 +93,7 @@ const W = ({
93
93
  const r = t.component;
94
94
  return /* @__PURE__ */ c(D.Provider, { value: t, children: /* @__PURE__ */ c(r, {}) });
95
95
  }, d = /* @__PURE__ */ new WeakMap();
96
- function _(e) {
96
+ function W(e) {
97
97
  return e instanceof Error ? e : typeof e == "string" && e.trim() ? new Error(e) : new Error("Failed to load route");
98
98
  }
99
99
  function L(e) {
@@ -101,11 +101,11 @@ function L(e) {
101
101
  return n || (n = e().then(
102
102
  (t) => t,
103
103
  (t) => {
104
- throw d.delete(e), _(t);
104
+ throw d.delete(e), W(t);
105
105
  }
106
106
  ), d.set(e, n)), n;
107
107
  }
108
- function Q(e, n) {
108
+ function J(e, n) {
109
109
  function t(r) {
110
110
  const [a, s] = M(0), f = N(
111
111
  () => S(() => L(e)),
@@ -138,10 +138,10 @@ function X() {
138
138
  return e == null ? void 0 : e.meta;
139
139
  }
140
140
  export {
141
- W as L,
142
- G as N,
143
- J as O,
144
- Q as l,
141
+ q as L,
142
+ V as N,
143
+ G as O,
144
+ J as l,
145
145
  T as p,
146
146
  X as u
147
147
  };
@@ -1,5 +1,5 @@
1
- import { aP as s, aO as u, aI as o, aM as t, aK as r, aL as l, aN as L, aJ as R } from "./client-DspTEDnT.js";
2
- import { L as i, N as p, O as N, l as m, p as n, u as O } from "./metadata-BqVnmMLq.js";
1
+ import { aR as s, aQ as u, aK as o, aO as t, aM as r, aN as l, aP as L, aL as R } from "./client-CNrWulRU.js";
2
+ import { L as i, N as p, O as N, l as m, p as n, u as O } from "./metadata-CElV09j3.js";
3
3
  export {
4
4
  s as DefaultErrorPage,
5
5
  u as DefaultLoader,
@@ -1,11 +1,11 @@
1
- import { bp as z, N as B, S as k, bq as V, br as O, _ as I, bs as W, bt as _, bu as G } from "./client-DspTEDnT.js";
2
- import p, { useSyncExternalStore as H } from "react";
1
+ import { bs as j, N as z, S as k, bt as B, bu as q, _ as I, bv as W, bw as _, bx as G } from "./client-CNrWulRU.js";
2
+ import b, { useSyncExternalStore as H } from "react";
3
3
  function J(t) {
4
4
  return typeof t == "number" ? t : t != null && typeof t == "object" && "value" in t ? Number(t.value) : Number(t);
5
5
  }
6
6
  function c(t, e) {
7
7
  const i = J(t), n = (o) => e(Number(o));
8
- return z(n), n(i);
8
+ return j(n), n(i);
9
9
  }
10
10
  const R = {
11
11
  /** Decimals — default 2: `Format.fixed(price)` → `"12.50"`. */
@@ -44,7 +44,7 @@ const R = {
44
44
  }).format(i)
45
45
  );
46
46
  }
47
- }, ne = R, re = {
47
+ }, te = R, ne = {
48
48
  px(t) {
49
49
  return c(t, (e) => `${e}px`);
50
50
  },
@@ -64,7 +64,7 @@ const R = {
64
64
  vw(t) {
65
65
  return c(t, (e) => `${e}vw`);
66
66
  }
67
- }, se = {
67
+ }, re = {
68
68
  /**
69
69
  * `"N word"` — uses `one` when the absolute count is 1, otherwise `many`.
70
70
  */
@@ -78,7 +78,7 @@ const R = {
78
78
  word(t, e, i) {
79
79
  return c(t, (n) => Math.abs(n) === 1 ? e : i);
80
80
  }
81
- }, q = {
81
+ }, O = {
82
82
  linear: (t) => t,
83
83
  easeIn: (t) => t * t,
84
84
  easeOut: (t) => t * (2 - t),
@@ -87,40 +87,40 @@ const R = {
87
87
  function K(t, e, i) {
88
88
  return t + (e - t) * i;
89
89
  }
90
- const b = /* @__PURE__ */ new WeakMap();
90
+ const h = /* @__PURE__ */ new WeakMap();
91
91
  function Q() {
92
92
  return typeof requestAnimationFrame == "function";
93
93
  }
94
- function X() {
94
+ function V() {
95
95
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
96
96
  }
97
- function Y(t) {
98
- const e = b.get(t);
99
- e != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(e), b.delete(t);
97
+ function X(t) {
98
+ const e = h.get(t);
99
+ e != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(e), h.delete(t);
100
100
  }
101
101
  k.prototype.spring = function(t, e = {}) {
102
102
  this.animate(t, { ...e, curve: "spring", damping: e.damping ?? 26, stiffness: e.stiffness ?? 170 });
103
103
  };
104
104
  k.prototype.animate = function(t, e = {}) {
105
- var v, N;
105
+ var w, N;
106
106
  const i = this.value, n = t;
107
- if (Y(this), !Q() || X()) {
108
- this.value = n, (v = e.onComplete) == null || v.call(e);
107
+ if (X(this), !Q() || V()) {
108
+ this.value = n, (w = e.onComplete) == null || w.call(e);
109
109
  return;
110
110
  }
111
111
  if (e.curve === "spring") {
112
- const y = typeof e.stiffness == "number" && Number.isFinite(e.stiffness) && e.stiffness > 0 ? e.stiffness : 170, d = typeof e.damping == "number" && Number.isFinite(e.damping) && e.damping >= 0 ? e.damping : 26, h = typeof e.mass == "number" && Number.isFinite(e.mass) && e.mass > 0 ? e.mass : 1;
113
- let F = i, w = typeof e.velocity == "number" && Number.isFinite(e.velocity) ? e.velocity : 0;
114
- const E = 1 / 60, x = () => {
115
- var M, $;
116
- const C = -y * (F - n) - d * w;
117
- if (w += C / h * E, F += w * E, !Number.isFinite(F) || !Number.isFinite(w)) {
118
- this.value = n, b.delete(this), (M = e.onComplete) == null || M.call(e);
112
+ const m = typeof e.stiffness == "number" && Number.isFinite(e.stiffness) && e.stiffness > 0 ? e.stiffness : 170, d = typeof e.damping == "number" && Number.isFinite(e.damping) && e.damping >= 0 ? e.damping : 26, y = typeof e.mass == "number" && Number.isFinite(e.mass) && e.mass > 0 ? e.mass : 1;
113
+ let F = i, v = typeof e.velocity == "number" && Number.isFinite(e.velocity) ? e.velocity : 0;
114
+ const x = 1 / 60, E = () => {
115
+ var C, M;
116
+ const A = -m * (F - n) - d * v;
117
+ if (v += A / y * x, F += v * x, !Number.isFinite(F) || !Number.isFinite(v)) {
118
+ this.value = n, h.delete(this), (C = e.onComplete) == null || C.call(e);
119
119
  return;
120
120
  }
121
- this.value = F, Math.abs(F - n) > 0.01 || Math.abs(w) > 0.01 ? b.set(this, requestAnimationFrame(x)) : (this.value = n, b.delete(this), ($ = e.onComplete) == null || $.call(e));
121
+ this.value = F, Math.abs(F - n) > 0.01 || Math.abs(v) > 0.01 ? h.set(this, requestAnimationFrame(E)) : (this.value = n, h.delete(this), (M = e.onComplete) == null || M.call(e));
122
122
  };
123
- b.set(this, requestAnimationFrame(x));
123
+ h.set(this, requestAnimationFrame(E));
124
124
  return;
125
125
  }
126
126
  const o = e.duration, l = typeof o == "number" && Number.isFinite(o) && o > 0 ? o : o === void 0 ? 300 : 0;
@@ -128,36 +128,36 @@ k.prototype.animate = function(t, e = {}) {
128
128
  this.value = n, (N = e.onComplete) == null || N.call(e);
129
129
  return;
130
130
  }
131
- const A = q[e.curve || "easeOut"] ?? q.easeOut;
132
- let g = null;
133
- const m = (y) => {
134
- var h;
135
- g || (g = y);
136
- const d = Math.min((y - g) / l, 1);
137
- this.value = K(i, n, A(d)), d < 1 ? b.set(this, requestAnimationFrame(m)) : (b.delete(this), (h = e.onComplete) == null || h.call(e));
131
+ const $ = O[e.curve || "easeOut"] ?? O.easeOut;
132
+ let p = null;
133
+ const g = (m) => {
134
+ var y;
135
+ p || (p = m);
136
+ const d = Math.min((m - p) / l, 1);
137
+ this.value = K(i, n, $(d)), d < 1 ? h.set(this, requestAnimationFrame(g)) : (h.delete(this), (y = e.onComplete) == null || y.call(e));
138
138
  };
139
- b.set(this, requestAnimationFrame(m));
139
+ h.set(this, requestAnimationFrame(g));
140
140
  };
141
141
  k.prototype.snapTo = function(t, e = {}) {
142
142
  this.animate(t, { duration: 300, curve: "easeOut", ...e });
143
143
  };
144
- function ie(t = {}) {
145
- return B(t.curve ?? "easeOut", {
144
+ function se(t = {}) {
145
+ return z(t.curve ?? "easeOut", {
146
146
  stiffness: t.stiffness,
147
147
  damping: t.damping,
148
148
  mass: t.mass
149
149
  });
150
150
  }
151
- function Z(t, e = {}) {
152
- const { styles: i = !0, meta: n } = e, o = [], l = [], A = V(t.toString());
153
- let g = 0, m = null, v = -1, N = !1, y = [], d = [];
154
- const h = /* @__PURE__ */ new Set();
155
- function F(r, s) {
151
+ function Y(t, e = {}) {
152
+ const { styles: i = !0, meta: n } = e, o = [], l = [], $ = B(t.toString());
153
+ let p = 0, g = null, w = !1, N = [], m = [];
154
+ const d = /* @__PURE__ */ new Set();
155
+ function y(r, s) {
156
156
  if (r.length !== s.length) return !1;
157
157
  for (let u = 0; u < r.length; u++) if (r[u] !== s[u]) return !1;
158
158
  return !0;
159
159
  }
160
- function w(r) {
160
+ function F(r) {
161
161
  var s, u;
162
162
  for (let a = 0; a < l.length; a++) {
163
163
  const f = l[a];
@@ -166,12 +166,12 @@ function Z(t, e = {}) {
166
166
  (s = f.unsubs) == null || s.forEach((S) => S()), f.unsubs = [], f.wired = void 0;
167
167
  continue;
168
168
  }
169
- f.wired && F(f.wired, f.signals) || ((u = f.unsubs) == null || u.forEach((S) => S()), f.unsubs = f.signals.map((S) => S.subscribe(() => C(S))), f.wired = f.signals);
169
+ f.wired && y(f.wired, f.signals) || ((u = f.unsubs) == null || u.forEach((S) => S()), f.unsubs = f.signals.map((S) => S.subscribe(() => E(S))), f.wired = f.signals);
170
170
  }
171
171
  }
172
172
  }
173
- function E(r) {
174
- F(y, r) || (d.forEach((s) => s()), d = r.map((s) => s.subscribe(() => C())), y = r);
173
+ function v(r) {
174
+ y(N, r) || (m.forEach((s) => s()), m = r.map((s) => s.subscribe(() => E())), N = r);
175
175
  }
176
176
  function x(r) {
177
177
  let s = !1;
@@ -184,80 +184,79 @@ function Z(t, e = {}) {
184
184
  }
185
185
  return s ? G(l, l.length) : !1;
186
186
  }
187
- function C(r) {
188
- if (!N) {
189
- N = !0;
187
+ function E(r) {
188
+ if (!w) {
189
+ w = !0;
190
190
  try {
191
191
  if (r && x(r)) return;
192
- T();
192
+ M();
193
193
  } finally {
194
- N = !1;
194
+ w = !1;
195
195
  }
196
196
  }
197
197
  }
198
- function M(r) {
198
+ function A(r) {
199
199
  const s = [];
200
- return typeof (n == null ? void 0 : n.title) == "string" && n.title.length > 0 && s.push(p.createElement("title", { key: "fibo-title" }, n.title)), typeof (n == null ? void 0 : n.description) == "string" && n.description.length > 0 && s.push(
201
- p.createElement("meta", {
200
+ return typeof (n == null ? void 0 : n.title) == "string" && n.title.length > 0 && s.push(b.createElement("title", { key: "fibo-title" }, n.title)), typeof (n == null ? void 0 : n.description) == "string" && n.description.length > 0 && s.push(
201
+ b.createElement("meta", {
202
202
  key: "fibo-description",
203
203
  name: "description",
204
204
  content: n.description
205
205
  })
206
- ), s.push(r), i && s.push(p.createElement(I)), p.createElement(p.Fragment, null, ...s);
206
+ ), s.push(r), i && s.push(b.createElement(I)), b.createElement(b.Fragment, null, ...s);
207
207
  }
208
- function $() {
208
+ function C() {
209
209
  let r;
210
210
  const s = W(o, l, () => {
211
- r = O(t());
212
- }, A);
211
+ r = q(t());
212
+ }, $);
213
213
  return { tree: r, ...s.outcome };
214
214
  }
215
- function T() {
216
- g += 1, m = null, v = -1;
217
- for (const r of h) r();
215
+ function M() {
216
+ p += 1, g = null;
217
+ for (const r of d) r();
218
218
  }
219
- function U() {
220
- if (m && v === g) return m;
221
- const r = $();
222
- return m = M(r.tree), v = g, w(r.slotCount), E(r.roots), m;
219
+ function T() {
220
+ const r = C();
221
+ return g = A(r.tree), F(r.slotCount), v(r.roots), g;
223
222
  }
224
- function D(r) {
225
- return h.add(r), () => {
223
+ function U(r) {
224
+ return d.add(r), () => {
226
225
  var s;
227
- if (h.delete(r), h.size === 0) {
226
+ if (d.delete(r), d.size === 0) {
228
227
  for (const u of l)
229
228
  (s = u == null ? void 0 : u.unsubs) == null || s.forEach((a) => a()), u && (u.unsubs = [], u.wired = void 0);
230
- d.forEach((u) => u()), d = [], y = [], m = null, v = -1;
229
+ m.forEach((u) => u()), m = [], N = [], g = null;
231
230
  }
232
231
  };
233
232
  }
234
- function L() {
235
- return g;
233
+ function D() {
234
+ return p;
236
235
  }
237
- function j() {
236
+ function L() {
238
237
  return 0;
239
238
  }
240
239
  function P() {
241
- return H(D, L, j), U();
240
+ return H(U, D, L), T();
242
241
  }
243
242
  return P.displayName = "FiboPage", n && (P.meta = n), P;
244
243
  }
245
- const ue = Z;
246
- function ae(t) {
247
- return p.createElement(
248
- p.Fragment,
244
+ const ie = Y;
245
+ function ue(t) {
246
+ return b.createElement(
247
+ b.Fragment,
249
248
  null,
250
- O(t),
251
- p.createElement(I)
249
+ q(t),
250
+ b.createElement(I)
252
251
  );
253
252
  }
254
253
  export {
255
254
  R as F,
256
- se as P,
257
- ne as T,
258
- re as U,
259
- ue as a,
260
- ie as c,
261
- Z as p,
262
- ae as w
255
+ re as P,
256
+ te as T,
257
+ ne as U,
258
+ ie as a,
259
+ se as c,
260
+ Y as p,
261
+ ue as w
263
262
  };
package/dist/server.d.ts CHANGED
@@ -348,6 +348,8 @@ declare class PseudoStateBuilder {
348
348
  translateY(value: number | string): this;
349
349
  rotate(degrees: number): this;
350
350
  shadow(value: string | number): this;
351
+ /** Same surface as `Box().css({})` — object bag or `(property, value)`. */
352
+ css(styles: React$1.CSSProperties): this;
351
353
  css(property: string, value: string | number): this;
352
354
  padding(value: string | number): this;
353
355
  p(value: string | number): this;