fiboui 2.2.0 → 2.2.3

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,14 +1,14 @@
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 _, x as b, I as J, G as F, P as K } from "./builder-3Bc2PfP9.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";
11
- class se extends _ {
8
+ import { R as Q, I as U } from "./index-CZQ5erLU.js";
9
+ import { T as ee } from "./index-BObp1JkM.js";
10
+ import { e as te, L as ie } from "./Link-ElmaMZB8.js";
11
+ class se extends b {
12
12
  build() {
13
13
  const e = [
14
14
  "fibo-center",
@@ -28,8 +28,8 @@ class se extends _ {
28
28
  );
29
29
  }
30
30
  }
31
- const Ee = p(se);
32
- class re extends _ {
31
+ const Ie = _(se);
32
+ class re extends b {
33
33
  constructor() {
34
34
  super(...arguments);
35
35
  r(this, "_mainAxisAlignment", "start");
@@ -71,7 +71,8 @@ class re extends _ {
71
71
  "fibo-column",
72
72
  "flex",
73
73
  "flex-col",
74
- this.isHug() ? "w-auto self-auto" : "w-full",
74
+ // min-w-0: allow shrink inside flex/grid so wide children (tables, nowrap) don't blow the track
75
+ this.isHug() ? "w-auto self-auto" : "w-full min-w-0",
75
76
  e[this._mainAxisAlignment],
76
77
  t[this._crossAxisAlignment],
77
78
  this._size ? o[this._size] : "",
@@ -90,8 +91,8 @@ class re extends _ {
90
91
  );
91
92
  }
92
93
  }
93
- const Se = p(re);
94
- class ne extends _ {
94
+ const Se = _(re);
95
+ class ne extends b {
95
96
  build() {
96
97
  const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
97
98
  return i.createElement(
@@ -105,8 +106,8 @@ class ne extends _ {
105
106
  );
106
107
  }
107
108
  }
108
- const Ie = p(ne);
109
- class le extends _ {
109
+ const He = _(ne);
110
+ class oe extends b {
110
111
  constructor() {
111
112
  super(...arguments);
112
113
  r(this, "_height");
@@ -136,7 +137,7 @@ class le extends _ {
136
137
  });
137
138
  }
138
139
  }
139
- const He = p(le), oe = i.memo((n) => {
140
+ const ze = _(oe), le = i.memo((n) => {
140
141
  const {
141
142
  theme: s,
142
143
  locale: e,
@@ -149,7 +150,7 @@ const He = p(le), oe = i.memo((n) => {
149
150
  s && f.set("theme", s), e && f.set("locale", e), Object.entries(t).forEach(([B, w]) => {
150
151
  f.set(B, w);
151
152
  });
152
- const b = i.createElement(
153
+ const p = i.createElement(
153
154
  "div",
154
155
  {
155
156
  className: `fibo-scaffold ${o || ""}`,
@@ -169,11 +170,11 @@ const He = p(le), oe = i.memo((n) => {
169
170
  K,
170
171
  {
171
172
  providers: f,
172
- children: b
173
+ children: p
173
174
  }
174
- ) : b;
175
+ ) : p;
175
176
  });
176
- class ae extends _ {
177
+ class ae extends b {
177
178
  constructor() {
178
179
  super(...arguments);
179
180
  r(this, "_locale");
@@ -213,7 +214,7 @@ class ae extends _ {
213
214
  content: i.createElement(i.Fragment, null, ...J(e.children)),
214
215
  fixed: e.fixed ?? !1
215
216
  } : {
216
- content: V(e),
217
+ content: F(e),
217
218
  fixed: !1
218
219
  };
219
220
  }
@@ -221,8 +222,8 @@ class ae extends _ {
221
222
  return !e || typeof e != "object" || i.isValidElement(e) || "build" in e && typeof e.build == "function" ? !1 : "children" in e && !("type" in e);
222
223
  }
223
224
  build() {
224
- var N, C, z, j, y, E, S, L, R, $, A, O, l, a, m, g, I, M, H, P, T, Y;
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(
225
+ var N, C, z, j, y, E, I, L, R, $, A, O, l, a, m, g, S, M, H, P, T, Y;
226
+ 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), p = d && ((E = t.sidebarRight) == null ? void 0 : E.fullHeight), B = i.createElement(
226
227
  "div",
227
228
  {
228
229
  key: "scaffold-middle",
@@ -239,7 +240,7 @@ class ae extends _ {
239
240
  key: "sidebar-left",
240
241
  className: "z-20",
241
242
  style: {
242
- width: (S = t.sidebarLeft) == null ? void 0 : S.width,
243
+ width: (I = t.sidebarLeft) == null ? void 0 : I.width,
243
244
  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
245
  top: (($ = t.sidebarLeft) == null ? void 0 : $.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
245
246
  height: ((A = t.sidebarLeft) == null ? void 0 : A.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
@@ -258,7 +259,7 @@ class ae extends _ {
258
259
  position: "relative"
259
260
  }
260
261
  }, e),
261
- d && !b && i.createElement("div", {
262
+ d && !p && i.createElement("div", {
262
263
  key: "sidebar-right",
263
264
  className: "z-20",
264
265
  style: {
@@ -277,7 +278,7 @@ class ae extends _ {
277
278
  key: "header-bar",
278
279
  className: "z-30",
279
280
  style: {
280
- height: (I = t.header) == null ? void 0 : I.height,
281
+ height: (S = t.header) == null ? void 0 : S.height,
281
282
  position: ((M = t.header) == null ? void 0 : M.position) || (this._headerBar.fixed ? "sticky" : "static"),
282
283
  top: 0,
283
284
  backgroundColor: "var(--fibo-surface, #ffffff)",
@@ -325,7 +326,7 @@ class ae extends _ {
325
326
  }
326
327
  }, this._sideBarLeft.content),
327
328
  u
328
- ])), b && (u = i.createElement("div", {
329
+ ])), p && (u = i.createElement("div", {
329
330
  key: "full-height-right-wrapper",
330
331
  style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
331
332
  }, [
@@ -341,19 +342,19 @@ class ae extends _ {
341
342
  }
342
343
  }, this._sideBarRight.content)
343
344
  ]));
344
- const v = W.getInstance().getOverlays().map((Z) => Z().build()), x = {
345
+ const x = W.getInstance().getOverlays().map((Z) => Z().build()), v = {
345
346
  theme: this._theme,
346
347
  locale: this._locale,
347
348
  providers: this._customProviders,
348
349
  className: this.getClassName(),
349
350
  style: this.getStyle(),
350
351
  children: u,
351
- overlays: v
352
+ overlays: x
352
353
  };
353
- return i.createElement(oe, x);
354
+ return i.createElement(le, v);
354
355
  }
355
356
  }
356
- const ze = p(ae), he = i.memo((n) => {
357
+ const Le = _(ae), he = i.memo((n) => {
357
358
  const { height: s = 64, sticky: e, className: t, style: o, children: h, ...c } = n;
358
359
  return i.createElement(
359
360
  "header",
@@ -365,7 +366,7 @@ const ze = p(ae), he = i.memo((n) => {
365
366
  h
366
367
  );
367
368
  });
368
- class ce extends _ {
369
+ class ce extends b {
369
370
  constructor() {
370
371
  super(...arguments);
371
372
  r(this, "_height", 64);
@@ -406,16 +407,16 @@ class ce extends _ {
406
407
  return i.createElement(he, e);
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 Re = _(ce), de = i.memo((n) => {
411
+ const { width: s = 260, collapsed: e, className: t, style: o, children: h, ...c } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? "", p = e ? 80 : s, w = W.getInstance().getSidebarItems().map((u, k) => {
412
+ const x = f === u.path;
412
413
  return i.createElement(ie, {
413
414
  key: `plugin-item-${u.path || k}`,
414
415
  to: u.path,
415
416
  className: "no-underline block mb-1",
416
417
  children: Q().padding(12).alignItems("center").gap(12).className(`
417
418
  transition-colors duration-200 rounded-lg mx-2
418
- ${v ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
419
+ ${x ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
419
420
  `).children([
420
421
  u.icon ? U(u.icon).size(20).build() : null,
421
422
  e ? null : ee(u.label).style({ fontSize: 14 }).weight(500).build()
@@ -426,14 +427,14 @@ const Le = p(ce), de = i.memo((n) => {
426
427
  "aside",
427
428
  {
428
429
  className: `flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${t || ""}`,
429
- style: { width: b, minWidth: b, ...o },
430
+ style: { width: p, minWidth: p, ...o },
430
431
  ...c
431
432
  },
432
433
  h,
433
434
  w
434
435
  );
435
436
  });
436
- class fe extends _ {
437
+ class fe extends b {
437
438
  constructor() {
438
439
  super(...arguments);
439
440
  r(this, "_width", 260);
@@ -457,8 +458,8 @@ class fe extends _ {
457
458
  return i.createElement(de, e);
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 $e = _(fe), ue = i.memo((n) => {
462
+ const { sidebar: s, header: e, children: t, className: o, style: h, ...c } = n, [d, f] = V(!1);
462
463
  return i.createElement(
463
464
  "div",
464
465
  {
@@ -509,17 +510,17 @@ const Re = p(fe), ue = i.memo((n) => {
509
510
  )
510
511
  );
511
512
  });
512
- class me extends _ {
513
+ class me extends b {
513
514
  constructor() {
514
515
  super(...arguments);
515
516
  r(this, "_sidebar");
516
517
  r(this, "_header");
517
518
  }
518
519
  sidebar(e) {
519
- return this._sidebar = V(e), this;
520
+ return this._sidebar = F(e), this;
520
521
  }
521
522
  header(e) {
522
- return this._header = V(e), this;
523
+ return this._header = F(e), this;
523
524
  }
524
525
  build() {
525
526
  const e = {
@@ -533,8 +534,8 @@ class me extends _ {
533
534
  return i.createElement(ue, e);
534
535
  }
535
536
  }
536
- const $e = p(me);
537
- class ge extends _ {
537
+ const Ae = _(me);
538
+ class ge extends b {
538
539
  constructor() {
539
540
  super(...arguments);
540
541
  r(this, "_alignment", "center");
@@ -573,8 +574,8 @@ class ge extends _ {
573
574
  );
574
575
  }
575
576
  }
576
- const Ae = p(ge);
577
- class pe extends _ {
577
+ const Oe = _(ge);
578
+ class pe extends b {
578
579
  constructor() {
579
580
  super(...arguments);
580
581
  r(this, "_sizeHeight");
@@ -597,12 +598,19 @@ class pe extends _ {
597
598
  );
598
599
  }
599
600
  }
600
- const Oe = p(pe);
601
- class _e extends _ {
601
+ const je = _(pe);
602
+ function _e(...n) {
603
+ return (s) => {
604
+ for (const e of n)
605
+ e && (typeof e == "function" ? e(s) : e.current = s);
606
+ };
607
+ }
608
+ class be extends b {
602
609
  constructor() {
603
610
  super(...arguments);
604
611
  r(this, "_direction", "vertical");
605
612
  r(this, "_scrollbar", "auto");
613
+ r(this, "_controller");
606
614
  }
607
615
  direction(e) {
608
616
  return this._direction = e, this;
@@ -616,6 +624,10 @@ class _e extends _ {
616
624
  scrollbar(e) {
617
625
  return this._scrollbar = e, this;
618
626
  }
627
+ /** Attach a ScrollController for programmatic scroll (carousel prev/next). */
628
+ controller(e) {
629
+ return this._controller = e, this;
630
+ }
619
631
  build() {
620
632
  const e = {
621
633
  overflowX: this._direction === "horizontal" || this._direction === "both" ? "auto" : "hidden",
@@ -624,15 +636,27 @@ class _e extends _ {
624
636
  display: "flex",
625
637
  flexDirection: this._direction === "horizontal" ? "row" : "column",
626
638
  ...this.getStyle()
627
- }, t = [...this.getClassName().split(" ")];
628
- return this._scrollbar === "hidden" && (t.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none"), i.createElement("div", {
629
- className: t.join(" "),
630
- style: e,
631
- ...this._props
632
- }, ...this.processChildren());
639
+ }, t = [...this.getClassName().split(" ").filter(Boolean)];
640
+ this._scrollbar === "hidden" && (t.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none");
641
+ const o = this._controller, h = this._props.ref, { ref: c, ...d } = this._props, f = _e(
642
+ (p) => {
643
+ o == null || o.attach(p);
644
+ },
645
+ h
646
+ );
647
+ return i.createElement(
648
+ "div",
649
+ {
650
+ className: t.join(" "),
651
+ style: e,
652
+ ref: f,
653
+ ...d
654
+ },
655
+ ...this.processChildren()
656
+ );
633
657
  }
634
658
  }
635
- const je = p(_e), be = i.memo((n) => {
659
+ const Me = _(be), ye = i.memo((n) => {
636
660
  const {
637
661
  children: s,
638
662
  itemHeight: e,
@@ -642,52 +666,52 @@ const je = p(_e), be = i.memo((n) => {
642
666
  containerHeight: c = 500,
643
667
  className: d,
644
668
  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)
669
+ } = n, [p, 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) => {
670
+ if (v)
647
671
  return l * e;
648
672
  let a = 0;
649
673
  for (let m = 0; m < l; m++)
650
674
  a += N(m);
651
675
  return a;
652
676
  }, z = () => {
653
- if (x)
654
- return v * e;
677
+ if (v)
678
+ return x * e;
655
679
  let l = 0;
656
- for (let a = 0; a < v; a++)
680
+ for (let a = 0; a < x; a++)
657
681
  l += N(a);
658
682
  return l;
659
683
  }, y = Math.max(0, ((l) => {
660
- if (x)
684
+ if (v)
661
685
  return Math.floor(l / e);
662
- let a = 0, m = v - 1;
686
+ let a = 0, m = x - 1;
663
687
  for (; a < m; ) {
664
688
  const g = Math.floor((a + m) / 2);
665
689
  C(g) < l ? a = g + 1 : m = g;
666
690
  }
667
691
  return Math.max(0, a - 1);
668
- })(b) - h);
692
+ })(p) - h);
669
693
  let E;
670
- if (x) {
694
+ if (v) {
671
695
  const l = Math.ceil(c / e);
672
- E = Math.min(v, y + l + h * 2);
696
+ E = Math.min(x, y + l + h * 2);
673
697
  } else {
674
698
  let l = C(y), a = y;
675
- for (; l < b + c + h * t && a < v; )
699
+ for (; l < p + c + h * t && a < x; )
676
700
  l += N(a), a++;
677
- E = Math.min(v, a);
701
+ E = Math.min(x, a);
678
702
  }
679
- const S = s.slice(y, E), L = C(y), R = z(), [$, A] = F(0);
680
- G(() => {
681
- if (!o || x) return;
703
+ const I = s.slice(y, E), L = C(y), R = z(), [$, A] = V(0);
704
+ q(() => {
705
+ if (!o || v) return;
682
706
  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;
707
+ I.forEach((a, m) => {
708
+ const g = y + m, S = u.current.get(g);
709
+ if (S) {
710
+ const H = S.getBoundingClientRect().height;
687
711
  H > 0 && k.current.get(g) !== H && (k.current.set(g, H), l = !0);
688
712
  }
689
713
  }), l && A((a) => a + 1);
690
- }, [S, y, o, x, $]);
714
+ }, [I, y, o, v, $]);
691
715
  const O = (l) => {
692
716
  B(l.currentTarget.scrollTop);
693
717
  };
@@ -723,14 +747,14 @@ const je = p(_e), be = i.memo((n) => {
723
747
  width: "100%"
724
748
  }
725
749
  },
726
- S.map((l, a) => {
750
+ I.map((l, a) => {
727
751
  const m = y + a;
728
752
  return i.createElement(
729
753
  "div",
730
754
  {
731
755
  key: m,
732
756
  ref: (g) => {
733
- g && o && !x ? u.current.set(m, g) : g || u.current.delete(m);
757
+ g && o && !v ? u.current.set(m, g) : g || u.current.delete(m);
734
758
  },
735
759
  style: { width: "100%" }
736
760
  },
@@ -740,7 +764,7 @@ const je = p(_e), be = i.memo((n) => {
740
764
  )
741
765
  );
742
766
  });
743
- class ye extends _ {
767
+ class xe extends b {
744
768
  constructor() {
745
769
  super(...arguments);
746
770
  r(this, "_itemHeight");
@@ -775,21 +799,21 @@ class ye extends _ {
775
799
  className: this.getClassName(),
776
800
  style: this.getStyle()
777
801
  };
778
- return i.createElement(be, t);
802
+ return i.createElement(ye, t);
779
803
  }
780
804
  }
781
- const Me = p(ye);
805
+ const Pe = _(xe);
782
806
  export {
783
- Ee as C,
784
- $e as D,
785
- Le as H,
786
- Oe as L,
787
- He as S,
788
- Me as V,
789
- Ae as Z,
807
+ Ie as C,
808
+ Ae as D,
809
+ Re as H,
810
+ je as L,
811
+ ze as S,
812
+ Pe as V,
813
+ Oe as Z,
790
814
  Se as a,
791
- Ie as b,
792
- ze as c,
793
- Re as d,
794
- je as e
815
+ He as b,
816
+ Le as c,
817
+ $e as d,
818
+ Me as e
795
819
  };
@@ -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-3Bc2PfP9.js";
7
+ import { B as j } from "./index-BlciuWzU.js";
8
+ import { T as O } from "./index-BObp1JkM.js";
9
+ import { R as J } from "./index-CZQ5erLU.js";
10
10
  import { jsxs as $, jsx as f } from "react/jsx-runtime";
11
11
  const K = ({ size: n }) => t.createElement(
12
12
  "svg",
package/dist/index.d.ts CHANGED
@@ -267,7 +267,6 @@ declare abstract class GestureBuilder {
267
267
  abstract wrap(children: React$1.ReactNode): React$1.ReactNode;
268
268
  }
269
269
  export declare class PseudoStateBuilder {
270
- private baseClassName;
271
270
  private pseudoState;
272
271
  private parentBuilder;
273
272
  private isGroup;
@@ -276,7 +275,7 @@ export declare class PseudoStateBuilder {
276
275
  private transitionDelay;
277
276
  private transitionProperties;
278
277
  private transforms;
279
- constructor(baseClassName: string, pseudoState: string, parentBuilder: FiboBuilder, isGroup?: boolean);
278
+ constructor(pseudoState: string, parentBuilder: FiboBuilder, isGroup?: boolean);
280
279
  bg(color: string): this;
281
280
  color(value: string): this;
282
281
  text(color: string): this;
@@ -414,7 +413,6 @@ declare abstract class FiboBuilder {
414
413
  protected _cssStyles: React$1.CSSProperties;
415
414
  protected _classNames: string[];
416
415
  protected _children: React$1.ReactNode[];
417
- protected _responsive?: ResponsiveStyles;
418
416
  protected _theme?: ThemeConfig;
419
417
  protected _state: Map<string, any>;
420
418
  protected _providers: Map<string, any>;
@@ -425,7 +423,6 @@ declare abstract class FiboBuilder {
425
423
  protected _animationConfig?: Partial<AnimationOptions>;
426
424
  protected _animatedProps: Map<string, Signal<any>>;
427
425
  protected _transforms: string[];
428
- protected _pseudoStateClassName?: string;
429
426
  protected _transitionClass?: string;
430
427
  protected _motionClass?: string;
431
428
  protected _staggerMs?: number;
@@ -455,8 +452,11 @@ declare abstract class FiboBuilder {
455
452
  * that `.anchor()` applies).
456
453
  */
457
454
  scrollMargin(value: number | string): this;
455
+ /** Stamp a class onto the host. Used by PseudoStateBuilder (hashed `:hover` etc.). */
456
+ addClassName(name: string): this;
458
457
  /**
459
- * React list key. After this is called, React reads the key as a string.
458
+ * React list key. After this is called, React reads the key as a string
459
+ * on both the builder element and the inner host wrapper.
460
460
  * Builders are valid elements — you do not need `.build()`.
461
461
  */
462
462
  key(value: string | number): this;
@@ -501,6 +501,11 @@ declare abstract class FiboBuilder {
501
501
  color(value: string | Colors): this;
502
502
  private resolveSemanticColor;
503
503
  shadow(config?: ShadowConfig): this;
504
+ /**
505
+ * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
506
+ * Tiers stay mutually exclusive: mobile `<768`, tablet `768–1023`, desktop `≥1024`.
507
+ * No `window.innerWidth` — hydrate-safe.
508
+ */
504
509
  responsive(styles: ResponsiveStyles): this;
505
510
  /**
506
511
  * CSS `@media` (min-width or a raw query). Compiles to a class — no resize JS.
@@ -508,6 +513,7 @@ declare abstract class FiboBuilder {
508
513
  * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
509
514
  */
510
515
  media(query: BreakpointKey | string, styles: React$1.CSSProperties): this;
516
+ private registerMediaStyles;
511
517
  sm(styles: React$1.CSSProperties): this;
512
518
  md(styles: React$1.CSSProperties): this;
513
519
  lg(styles: React$1.CSSProperties): this;
@@ -634,7 +640,6 @@ declare abstract class FiboBuilder {
634
640
  focusRing(color?: string): this;
635
641
  protected ensureInteractiveTransition(): void;
636
642
  theme(themeConfig: ThemeConfig): this;
637
- private getPseudoStateClassName;
638
643
  hover(): PseudoStateBuilder;
639
644
  hover(callback: PseudoStateFn): this;
640
645
  focus(): PseudoStateBuilder;
@@ -1608,8 +1613,20 @@ export declare function supportsViewTimeline(): boolean;
1608
1613
  export declare function supportsScrollTimeline(): boolean;
1609
1614
  export declare function ensureMotionCss(): void;
1610
1615
  export declare function getMotionCss(): string;
1616
+ export declare function getCss(): string;
1617
+ /** `<style id="fibo-dynamic-styles">` HTML. Call **after** `renderToString` so rules are collected. */
1618
+ export declare function getStyleTag(): string;
1619
+ /**
1620
+ * Inject collected CSS into a document. Place as a **later sibling** of the app
1621
+ * so registrations from children run first during SSR.
1622
+ */
1623
+ export declare function FiboStyles(): React$1.ReactElement;
1611
1624
  export declare function MotionStyles(): React$1.ReactElement;
1612
- /** Current viewport width; SSR snapshot is 1024 (desktop). */
1625
+ /**
1626
+ * Current viewport width. Hydration uses 1024 (desktop) so the first client
1627
+ * render matches SSR; the real width arrives after mount.
1628
+ * Prefer `.md()` / `.responsive()` (CSS `@media`) over this hook.
1629
+ */
1613
1630
  export declare function useViewportWidth(): number;
1614
1631
  type Constructor<T = any> = new (...args: any[]) => T;
1615
1632
  type Factory<T = any> = () => T;
@@ -11341,15 +11358,33 @@ export declare const Line: () => LineBuilder & {
11341
11358
  colorRendering: (value: import("csstype").Property.ColorRendering | undefined) => LineBuilder & /*elided*/ any & React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
11342
11359
  glyphOrientationVertical: (value: import("csstype").Property.GlyphOrientationVertical | undefined) => LineBuilder & /*elided*/ any & React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
11343
11360
  } & React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
11361
+ /** Flutter-style handle for a mounted ScrollView — no document.querySelector. */
11362
+ export declare class ScrollController {
11363
+ private _node;
11364
+ /** @internal Attached by ScrollView on mount. */
11365
+ attach(node: HTMLElement | null): void;
11366
+ get node(): HTMLElement | null;
11367
+ scrollBy(options: ScrollToOptions): void;
11368
+ scrollTo(options: ScrollToOptions): void;
11369
+ /**
11370
+ * Carousel step: scroll by the first child's outer width (+ gap).
11371
+ * Prefer this over measuring in app code.
11372
+ */
11373
+ scrollByChild(dir?: -1 | 1, gap?: number): void;
11374
+ scrollToChild(index: number, gap?: number): void;
11375
+ }
11344
11376
  type ScrollDirection = "vertical" | "horizontal" | "both";
11345
11377
  type ScrollbarVisibility = "hidden" | "visible" | "auto";
11346
11378
  declare class ScrollViewBuilder extends FiboBuilder {
11347
11379
  private _direction;
11348
11380
  private _scrollbar;
11381
+ private _controller?;
11349
11382
  direction(direction: ScrollDirection): this;
11350
11383
  horizontal(): this;
11351
11384
  vertical(): this;
11352
11385
  scrollbar(visibility: ScrollbarVisibility): this;
11386
+ /** Attach a ScrollController for programmatic scroll (carousel prev/next). */
11387
+ controller(controller: ScrollController): this;
11353
11388
  build(): React$1.ReactElement;
11354
11389
  }
11355
11390
  export declare const ScrollView: () => ScrollViewBuilder & {
@@ -43026,11 +43061,12 @@ declare class PathBuilder extends ShapeBuilder {
43026
43061
  }
43027
43062
  export declare const Path: () => PathBuilder;
43028
43063
  declare class LinearGradientBuilder extends FiboBuilder {
43029
- private _id;
43064
+ private _id?;
43030
43065
  private _colors;
43031
43066
  private _stops?;
43032
43067
  private _angle;
43033
43068
  id(value: string): this;
43069
+ private gradientId;
43034
43070
  colors(colors: string[]): this;
43035
43071
  stops(stops: number[]): this;
43036
43072
  angle(degrees: number): this;
@@ -44778,6 +44814,7 @@ interface RouterContextValue {
44778
44814
  replace: (path: string) => void;
44779
44815
  params: Record<string, string>;
44780
44816
  query: URLSearchParams;
44817
+ hash: string;
44781
44818
  }
44782
44819
  interface NavigateOptions {
44783
44820
  replace?: boolean;
@@ -44797,6 +44834,12 @@ interface RouterProps {
44797
44834
  fallback?: React$1.ComponentType;
44798
44835
  loading?: React$1.ReactNode;
44799
44836
  basename?: string;
44837
+ /** Request path for SSR. First client render uses this (or `/`), then window after mount. */
44838
+ initialPath?: string;
44839
+ /** Request search string (`?a=1` or `a=1`) for SSR. */
44840
+ initialSearch?: string;
44841
+ /** Request hash (`#section` or `section`) for SSR. */
44842
+ initialHash?: string;
44800
44843
  errorBoundary?: React$1.ReactNode | ((error: Error, errorInfo: React$1.ErrorInfo) => React$1.ReactNode);
44801
44844
  onError?: (error: Error, errorInfo: React$1.ErrorInfo) => void;
44802
44845
  }