fiboui 2.9.4 → 2.9.6

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.
@@ -386,6 +386,12 @@ interface FrameSpec {
386
386
  idealHeight?: FrameSize;
387
387
  maxHeight?: FrameSize;
388
388
  alignment?: StackAlign | keyof typeof StackAlign;
389
+ /**
390
+ * Stretch the direct child to the frame slot (`width/height: 100%`).
391
+ * Default `false` — SwiftUI-like hug + `alignment`.
392
+ * Use when paint (`.bg`, border) lives on the child and should fill the frame.
393
+ */
394
+ fill?: boolean;
389
395
  }
390
396
  type ClipShapeName = "circle" | "rounded" | "square";
391
397
  interface OffsetSpec {
@@ -472,6 +478,30 @@ type EdgeInsetsValue = {
472
478
  /** CSS right — alias of trailing in LTR */
473
479
  right?: number | string;
474
480
  };
481
+ declare const Material: {
482
+ readonly ultraThin: {
483
+ readonly blur: 20;
484
+ readonly background: "rgba(255, 255, 255, 0.35)";
485
+ };
486
+ readonly thin: {
487
+ readonly blur: 28;
488
+ readonly background: "rgba(255, 255, 255, 0.48)";
489
+ };
490
+ readonly regular: {
491
+ readonly blur: 36;
492
+ readonly background: "rgba(255, 255, 255, 0.62)";
493
+ };
494
+ readonly thick: {
495
+ readonly blur: 48;
496
+ readonly background: "rgba(255, 255, 255, 0.78)";
497
+ };
498
+ readonly ultraThick: {
499
+ readonly blur: 60;
500
+ readonly background: "rgba(255, 255, 255, 0.88)";
501
+ };
502
+ };
503
+ type MaterialKind = keyof typeof Material;
504
+ type MaterialSpec = (typeof Material)[MaterialKind];
475
505
  type SafeAreaInsetEdge = Edge | "top" | "bottom" | "leading" | "trailing" | "left" | "right";
476
506
  type SafeAreaInsetSpec = {
477
507
  edge: SafeAreaInsetEdge;
@@ -765,9 +795,12 @@ declare abstract class FiboBuilder {
765
795
  * maxHeight: Size.infinity,
766
796
  * alignment: StackAlign.topTrailing,
767
797
  * })
798
+ * // Child fills the slot (bg/border on the child cover the frame):
799
+ * Box().bg('red').frame({ maxWidth: Size.infinity, fill: true })
768
800
  * ```
769
801
  *
770
802
  * Chainable: each `.frame()` wraps the previous (same as SwiftUI).
803
+ * Default: child hugs + `alignment`. Pass `fill: true` to stretch the child.
771
804
  */
772
805
  frame(spec: FrameSpec): this;
773
806
  /**
@@ -976,6 +1009,16 @@ declare abstract class FiboBuilder {
976
1009
  text(color: string | Colors): this;
977
1010
  color(value: string | Colors): this;
978
1011
  private resolveSemanticColor;
1012
+ /**
1013
+ * Backdrop blur (glass). Prefer over raw `.backdropFilter('blur(…)')`.
1014
+ * `20` → `blur(20px)`; also accepts `'20px'` or a full `blur(…)` string.
1015
+ */
1016
+ backdropBlur(radius?: number | string): this;
1017
+ /**
1018
+ * SwiftUI `Material` glass fill — blur + translucent background.
1019
+ * `Box().material(Material.ultraThin)` or `.material('regular')`.
1020
+ */
1021
+ material(kind: MaterialKind | MaterialSpec): this;
979
1022
  shadow(config?: ShadowConfig): this;
980
1023
  /**
981
1024
  * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
@@ -1,5 +1,5 @@
1
- import { B as e } from "./index-CtvQ20_N.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-lzMYg4vy.js";
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";
3
3
  export {
4
4
  e as Button,
5
5
  r as Checkbox,
package/dist/layout.d.ts CHANGED
@@ -388,6 +388,12 @@ interface FrameSpec {
388
388
  idealHeight?: FrameSize;
389
389
  maxHeight?: FrameSize;
390
390
  alignment?: StackAlign | keyof typeof StackAlign;
391
+ /**
392
+ * Stretch the direct child to the frame slot (`width/height: 100%`).
393
+ * Default `false` — SwiftUI-like hug + `alignment`.
394
+ * Use when paint (`.bg`, border) lives on the child and should fill the frame.
395
+ */
396
+ fill?: boolean;
391
397
  }
392
398
  type ClipShapeName = "circle" | "rounded" | "square";
393
399
  interface OffsetSpec {
@@ -474,6 +480,30 @@ type EdgeInsetsValue = {
474
480
  /** CSS right — alias of trailing in LTR */
475
481
  right?: number | string;
476
482
  };
483
+ declare const Material: {
484
+ readonly ultraThin: {
485
+ readonly blur: 20;
486
+ readonly background: "rgba(255, 255, 255, 0.35)";
487
+ };
488
+ readonly thin: {
489
+ readonly blur: 28;
490
+ readonly background: "rgba(255, 255, 255, 0.48)";
491
+ };
492
+ readonly regular: {
493
+ readonly blur: 36;
494
+ readonly background: "rgba(255, 255, 255, 0.62)";
495
+ };
496
+ readonly thick: {
497
+ readonly blur: 48;
498
+ readonly background: "rgba(255, 255, 255, 0.78)";
499
+ };
500
+ readonly ultraThick: {
501
+ readonly blur: 60;
502
+ readonly background: "rgba(255, 255, 255, 0.88)";
503
+ };
504
+ };
505
+ type MaterialKind = keyof typeof Material;
506
+ type MaterialSpec = (typeof Material)[MaterialKind];
477
507
  type SafeAreaInsetEdge = Edge | "top" | "bottom" | "leading" | "trailing" | "left" | "right";
478
508
  type SafeAreaInsetSpec = {
479
509
  edge: SafeAreaInsetEdge;
@@ -767,9 +797,12 @@ declare abstract class FiboBuilder {
767
797
  * maxHeight: Size.infinity,
768
798
  * alignment: StackAlign.topTrailing,
769
799
  * })
800
+ * // Child fills the slot (bg/border on the child cover the frame):
801
+ * Box().bg('red').frame({ maxWidth: Size.infinity, fill: true })
770
802
  * ```
771
803
  *
772
804
  * Chainable: each `.frame()` wraps the previous (same as SwiftUI).
805
+ * Default: child hugs + `alignment`. Pass `fill: true` to stretch the child.
773
806
  */
774
807
  frame(spec: FrameSpec): this;
775
808
  /**
@@ -978,6 +1011,16 @@ declare abstract class FiboBuilder {
978
1011
  text(color: string | Colors): this;
979
1012
  color(value: string | Colors): this;
980
1013
  private resolveSemanticColor;
1014
+ /**
1015
+ * Backdrop blur (glass). Prefer over raw `.backdropFilter('blur(…)')`.
1016
+ * `20` → `blur(20px)`; also accepts `'20px'` or a full `blur(…)` string.
1017
+ */
1018
+ backdropBlur(radius?: number | string): this;
1019
+ /**
1020
+ * SwiftUI `Material` glass fill — blur + translucent background.
1021
+ * `Box().material(Material.ultraThin)` or `.material('regular')`.
1022
+ */
1023
+ material(kind: MaterialKind | MaterialSpec): this;
981
1024
  shadow(config?: ShadowConfig): this;
982
1025
  /**
983
1026
  * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
@@ -1310,6 +1353,11 @@ declare class ColumnBuilder extends FiboBuilder {
1310
1353
  alignY(alignment: AlignAxis): this;
1311
1354
  spacing(value: string | number): this;
1312
1355
  size(size: "small" | "medium" | "large"): this;
1356
+ /**
1357
+ * Sugar for `.children(ForEach(data).renderItem(fn))`.
1358
+ * Prefer `ForEach` when you need `.keyBy()`.
1359
+ */
1360
+ forEach<T>(items: T[] | readonly T[], renderItem: (item: T, index: number) => unknown): this;
1313
1361
  build(): React$1.ReactElement;
1314
1362
  }
1315
1363
  export declare const Column: () => StyleBuilder<ColumnBuilder>;
@@ -1342,6 +1390,11 @@ declare class RowBuilder extends FiboBuilder {
1342
1390
  alignY(alignment: AlignAxis): this;
1343
1391
  spacing(value: string | number): this;
1344
1392
  items(children: React$1.ReactElement[]): this;
1393
+ /**
1394
+ * Sugar for `.children(ForEach(data).renderItem(fn))`.
1395
+ * Prefer `ForEach` when you need `.keyBy()`.
1396
+ */
1397
+ forEach<T>(items: T[] | readonly T[], renderItem: (item: T, index: number) => unknown): this;
1345
1398
  build(): React$1.ReactElement;
1346
1399
  }
1347
1400
  export declare const Row: () => StyleBuilder<RowBuilder>;
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-DYFx4V14.js";
2
- import { C as d, S as c } from "./index-C_GtMcVT.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-lzMYg4vy.js";
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";
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 { be as v, bc as w, bf as x, bg as O, bh as R, bi as P, bj as E, bk as g, bl as $, bm as D, bn as z, aO as A, aP as K } from "./client-lzMYg4vy.js";
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";
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];
@@ -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-lzMYg4vy.js";
2
- import { L as i, N as p, O as N, l as m, p as n, u as O } from "./metadata-DPU8tP_P.js";
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";
3
3
  export {
4
4
  s as DefaultErrorPage,
5
5
  u as DefaultLoader,
@@ -1,4 +1,4 @@
1
- import { bo as z, N as B, S as k, bp as V, bq as O, _ as I, br as W, bs as _, bt as G } from "./client-lzMYg4vy.js";
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
2
  import p, { 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);
package/dist/server.d.ts CHANGED
@@ -425,6 +425,12 @@ interface FrameSpec {
425
425
  idealHeight?: FrameSize;
426
426
  maxHeight?: FrameSize;
427
427
  alignment?: StackAlign | keyof typeof StackAlign;
428
+ /**
429
+ * Stretch the direct child to the frame slot (`width/height: 100%`).
430
+ * Default `false` — SwiftUI-like hug + `alignment`.
431
+ * Use when paint (`.bg`, border) lives on the child and should fill the frame.
432
+ */
433
+ fill?: boolean;
428
434
  }
429
435
  type ClipShapeName = "circle" | "rounded" | "square";
430
436
  interface OffsetSpec {
@@ -511,6 +517,30 @@ type EdgeInsetsValue = {
511
517
  /** CSS right — alias of trailing in LTR */
512
518
  right?: number | string;
513
519
  };
520
+ declare const Material: {
521
+ readonly ultraThin: {
522
+ readonly blur: 20;
523
+ readonly background: "rgba(255, 255, 255, 0.35)";
524
+ };
525
+ readonly thin: {
526
+ readonly blur: 28;
527
+ readonly background: "rgba(255, 255, 255, 0.48)";
528
+ };
529
+ readonly regular: {
530
+ readonly blur: 36;
531
+ readonly background: "rgba(255, 255, 255, 0.62)";
532
+ };
533
+ readonly thick: {
534
+ readonly blur: 48;
535
+ readonly background: "rgba(255, 255, 255, 0.78)";
536
+ };
537
+ readonly ultraThick: {
538
+ readonly blur: 60;
539
+ readonly background: "rgba(255, 255, 255, 0.88)";
540
+ };
541
+ };
542
+ type MaterialKind = keyof typeof Material;
543
+ type MaterialSpec = (typeof Material)[MaterialKind];
514
544
  type SafeAreaInsetEdge = Edge | "top" | "bottom" | "leading" | "trailing" | "left" | "right";
515
545
  type SafeAreaInsetSpec = {
516
546
  edge: SafeAreaInsetEdge;
@@ -804,9 +834,12 @@ declare abstract class FiboBuilder {
804
834
  * maxHeight: Size.infinity,
805
835
  * alignment: StackAlign.topTrailing,
806
836
  * })
837
+ * // Child fills the slot (bg/border on the child cover the frame):
838
+ * Box().bg('red').frame({ maxWidth: Size.infinity, fill: true })
807
839
  * ```
808
840
  *
809
841
  * Chainable: each `.frame()` wraps the previous (same as SwiftUI).
842
+ * Default: child hugs + `alignment`. Pass `fill: true` to stretch the child.
810
843
  */
811
844
  frame(spec: FrameSpec): this;
812
845
  /**
@@ -1015,6 +1048,16 @@ declare abstract class FiboBuilder {
1015
1048
  text(color: string | Colors): this;
1016
1049
  color(value: string | Colors): this;
1017
1050
  private resolveSemanticColor;
1051
+ /**
1052
+ * Backdrop blur (glass). Prefer over raw `.backdropFilter('blur(…)')`.
1053
+ * `20` → `blur(20px)`; also accepts `'20px'` or a full `blur(…)` string.
1054
+ */
1055
+ backdropBlur(radius?: number | string): this;
1056
+ /**
1057
+ * SwiftUI `Material` glass fill — blur + translucent background.
1058
+ * `Box().material(Material.ultraThin)` or `.material('regular')`.
1059
+ */
1060
+ material(kind: MaterialKind | MaterialSpec): this;
1018
1061
  shadow(config?: ShadowConfig): this;
1019
1062
  /**
1020
1063
  * Breakpoint styles compiled to CSS `@media` (same engine as `.md()`).
@@ -1347,6 +1390,11 @@ declare class ColumnBuilder extends FiboBuilder {
1347
1390
  alignY(alignment: AlignAxis): this;
1348
1391
  spacing(value: string | number): this;
1349
1392
  size(size: "small" | "medium" | "large"): this;
1393
+ /**
1394
+ * Sugar for `.children(ForEach(data).renderItem(fn))`.
1395
+ * Prefer `ForEach` when you need `.keyBy()`.
1396
+ */
1397
+ forEach<T>(items: T[] | readonly T[], renderItem: (item: T, index: number) => unknown): this;
1350
1398
  build(): React$1.ReactElement;
1351
1399
  }
1352
1400
  export declare const Column: () => StyleBuilder<ColumnBuilder>;
@@ -1379,6 +1427,11 @@ declare class RowBuilder extends FiboBuilder {
1379
1427
  alignY(alignment: AlignAxis): this;
1380
1428
  spacing(value: string | number): this;
1381
1429
  items(children: React$1.ReactElement[]): this;
1430
+ /**
1431
+ * Sugar for `.children(ForEach(data).renderItem(fn))`.
1432
+ * Prefer `ForEach` when you need `.keyBy()`.
1433
+ */
1434
+ forEach<T>(items: T[] | readonly T[], renderItem: (item: T, index: number) => unknown): this;
1382
1435
  build(): React$1.ReactElement;
1383
1436
  }
1384
1437
  export declare const Row: () => StyleBuilder<RowBuilder>;