fiboui 2.9.5 → 2.9.14

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.
package/dist/content.d.ts CHANGED
@@ -310,6 +310,8 @@ declare class PseudoStateBuilder {
310
310
  translateY(value: number | string): this;
311
311
  rotate(degrees: number): this;
312
312
  shadow(value: string | number): this;
313
+ /** Same surface as `Box().css({})` — object bag or `(property, value)`. */
314
+ css(styles: React$1.CSSProperties): this;
313
315
  css(property: string, value: string | number): this;
314
316
  padding(value: string | number): this;
315
317
  p(value: string | number): this;
@@ -387,6 +389,12 @@ interface FrameSpec {
387
389
  idealHeight?: FrameSize;
388
390
  maxHeight?: FrameSize;
389
391
  alignment?: StackAlign | keyof typeof StackAlign;
392
+ /**
393
+ * Stretch the direct child to the frame slot (`width/height: 100%`).
394
+ * Default `false` — SwiftUI-like hug + `alignment`.
395
+ * Use when paint (`.bg`, border) lives on the child and should fill the frame.
396
+ */
397
+ fill?: boolean;
390
398
  }
391
399
  type ClipShapeName = "circle" | "rounded" | "square";
392
400
  interface OffsetSpec {
@@ -790,9 +798,12 @@ declare abstract class FiboBuilder {
790
798
  * maxHeight: Size.infinity,
791
799
  * alignment: StackAlign.topTrailing,
792
800
  * })
801
+ * // Child fills the slot (bg/border on the child cover the frame):
802
+ * Box().bg('red').frame({ maxWidth: Size.infinity, fill: true })
793
803
  * ```
794
804
  *
795
805
  * Chainable: each `.frame()` wraps the previous (same as SwiftUI).
806
+ * Default: child hugs + `alignment`. Pass `fill: true` to stretch the child.
796
807
  */
797
808
  frame(spec: FrameSpec): this;
798
809
  /**
@@ -1431,10 +1442,12 @@ declare class LabelBuilder extends FiboBuilder {
1431
1442
  }
1432
1443
  export declare const Label: (text?: string | undefined) => StyleBuilder<LabelBuilder>;
1433
1444
  type ClipShape = "circle" | "rounded" | "square";
1445
+ type ImagePosition = StackAlign | keyof typeof StackAlign | string;
1434
1446
  declare class ImageBuilder extends FiboBuilder {
1435
1447
  private _src;
1436
1448
  private _alt;
1437
1449
  private _fit;
1450
+ private _objectPosition?;
1438
1451
  private _resizable;
1439
1452
  /** Image-native clip (Tailwind / borderRadius on `<img>`). Distinct from
1440
1453
  * {@link FiboBuilder.clipShape} chrome wrapper. */
@@ -1447,7 +1460,16 @@ declare class ImageBuilder extends FiboBuilder {
1447
1460
  alt(value: string): this;
1448
1461
  resizable(): this;
1449
1462
  scaledToFit(): this;
1450
- scaledToFill(): this;
1463
+ /**
1464
+ * Cover the frame (`object-fit: cover`). Optional alignment biases the crop
1465
+ * — e.g. `scaledToFill(StackAlign.top)` keeps faces in a wide short hero.
1466
+ */
1467
+ scaledToFill(alignment?: ImagePosition): this;
1468
+ /**
1469
+ * CSS `object-position` for cover/contain crops.
1470
+ * Accepts {@link StackAlign} (`top`, `topLeft`, …) or a raw CSS value (`'50% 20%'`).
1471
+ */
1472
+ objectPosition(value: ImagePosition): this;
1451
1473
  /**
1452
1474
  * Fixed numeric `{ width, height }` still paints on the `<img>` (tests +
1453
1475
  * object-fit). Any flexible SwiftUI frame (`maxWidth: Size.infinity`, …)
package/dist/content.js CHANGED
@@ -1,16 +1,16 @@
1
- import { A as s, B as r, I as o } from "./icons-By9BFp7V.js";
2
- import { ak as n, aj as I } from "./client-Cc87LXic.js";
3
- import { A as m, I as p, L as x, P as A, a as f, S as l } from "./index-BxYsYMal.js";
1
+ import { A as s, B as r, I as o } from "./icons-CUjbVN8n.js";
2
+ import { am as n, al as m } from "./client-CNrWulRU.js";
3
+ import { A as g, I as l, L as p, P as x, a as A, S as f } from "./index-Dm9qGQyL.js";
4
4
  export {
5
- m as Alert,
5
+ g as Alert,
6
6
  s as Avatar,
7
7
  r as Badge,
8
8
  n as Icon,
9
9
  o as Image,
10
- p as Integration,
11
- x as Label,
12
- A as Progress,
13
- f as Skeleton,
14
- l as Spinner,
15
- I as Text
10
+ l as Integration,
11
+ p as Label,
12
+ x as Progress,
13
+ A as Skeleton,
14
+ f as Spinner,
15
+ m as Text
16
16
  };
package/dist/core.d.ts CHANGED
@@ -692,6 +692,8 @@ export declare class PseudoStateBuilder {
692
692
  translateY(value: number | string): this;
693
693
  rotate(degrees: number): this;
694
694
  shadow(value: string | number): this;
695
+ /** Same surface as `Box().css({})` — object bag or `(property, value)`. */
696
+ css(styles: React$1.CSSProperties): this;
695
697
  css(property: string, value: string | number): this;
696
698
  padding(value: string | number): this;
697
699
  p(value: string | number): this;
@@ -769,6 +771,12 @@ interface FrameSpec {
769
771
  idealHeight?: FrameSize;
770
772
  maxHeight?: FrameSize;
771
773
  alignment?: StackAlign | keyof typeof StackAlign;
774
+ /**
775
+ * Stretch the direct child to the frame slot (`width/height: 100%`).
776
+ * Default `false` — SwiftUI-like hug + `alignment`.
777
+ * Use when paint (`.bg`, border) lives on the child and should fill the frame.
778
+ */
779
+ fill?: boolean;
772
780
  }
773
781
  type ClipShapeName = "circle" | "rounded" | "square";
774
782
  interface OffsetSpec {
@@ -1154,9 +1162,12 @@ declare abstract class FiboBuilder {
1154
1162
  * maxHeight: Size.infinity,
1155
1163
  * alignment: StackAlign.topTrailing,
1156
1164
  * })
1165
+ * // Child fills the slot (bg/border on the child cover the frame):
1166
+ * Box().bg('red').frame({ maxWidth: Size.infinity, fill: true })
1157
1167
  * ```
1158
1168
  *
1159
1169
  * Chainable: each `.frame()` wraps the previous (same as SwiftUI).
1170
+ * Default: child hugs + `alignment`. Pass `fill: true` to stretch the child.
1160
1171
  */
1161
1172
  frame(spec: FrameSpec): this;
1162
1173
  /**
@@ -1683,9 +1694,38 @@ type KnownKeys<T> = {
1683
1694
  } extends {
1684
1695
  [_ in keyof T]: infer U;
1685
1696
  } ? U : never;
1686
- type StyleBuilder<T> = T & LogicalAxes & {
1697
+ /**
1698
+ * Fluent CSS methods on every builder. Kept as a named exported type so
1699
+ * `index.d.ts` references `StyleBuilder<T>` instead of expanding the CSS map
1700
+ * into every widget (that blew the file past 20MB and also typed chains as `any`).
1701
+ */
1702
+ export type StyleBuilder<T> = T & LogicalAxes & {
1687
1703
  [K in KnownKeys<React$1.CSSProperties>]-?: (value: React$1.CSSProperties[K]) => StyleBuilder<T>;
1688
1704
  } & React$1.ReactElement;
1705
+ /**
1706
+ * Like `React.memo`, but for fluent builders: write a normal function that
1707
+ * returns a builder — `createComponent` keeps every method of that return
1708
+ * (`GlassField().label().name()…`). No `fn('label', { opts })` bags.
1709
+ *
1710
+ * ```ts
1711
+ * // Preferred — your component is a normal function:
1712
+ * const glassField = () => {
1713
+ * return TextField().variant('outlined').rounded(16).className('cubee-field')
1714
+ * }
1715
+ * export const GlassField = createComponent(glassField)
1716
+ * GlassField().label('E-mail').name('email').type('email')
1717
+ *
1718
+ * // Optional — base factory + body gets `{ f }` (same idea as props):
1719
+ * export const GlassField = createComponent(TextField, ({ f }) => {
1720
+ * return f.variant('outlined').rounded(16).className('cubee-field')
1721
+ * })
1722
+ * ```
1723
+ */
1724
+ export declare function createComponent<Args extends any[], B>(factory: (...args: Args) => B, setup?: (ctx: {
1725
+ f: B;
1726
+ }) => B | void): (...args: Args) => B;
1727
+ /** @deprecated Prefer `createComponent` — same behavior. */
1728
+ export declare const preset: typeof createComponent;
1689
1729
  interface SignalLike<T> {
1690
1730
  value: T;
1691
1731
  subscribe: (listener: (val: T) => void) => () => void;
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e, E as t, X as r, a6 as i, a3 as o, a4 as n, _ as l, F as u, T as S, L as c, Q as p, Z as g, O as T, n as b, B as v, P as F, R as E, D as d, G as C, S as R, a8 as f, t as m, q as I, d as P, c as y, b as O, a as x, a2 as M, Y as N, e as _, f as w, a0 as A, g as B, $ as V, a1 as D, V as L, W as U, i as h, l as q, a5 as z, U as G, o as K, h as W, N as X, r as j, H as k, s as H, M as J, I as Q, K as Y, J as Z, a7 as $, m as ss, y as as, k as es, z as ts, p as rs, j as is, A as os, u as ns, w as ls, x as us, v as Ss } from "./client-Cc87LXic.js";
2
- import { F as ps, P as gs, T as Ts, U as bs, a as vs, c as Fs, p as Es, w as ds } from "./page-DbndR-7r.js";
1
+ import { C as e, E as t, X as r, a6 as i, a3 as o, a4 as n, _ as l, F as u, T as S, L as c, Q as p, Z as g, O as T, n as b, B as v, P as F, R as C, D as E, G as d, S as m, a8 as R, t as f, q as I, d as P, c as y, a9 as O, b as x, a as M, a2 as N, Y as _, e as w, f as A, a0 as B, g as V, $ as D, a1 as L, V as U, W as h, i as q, l as z, a5 as G, U as K, o as W, aa as X, h as j, N as k, r as H, H as J, s as Q, M as Y, I as Z, K as $, J as ss, a7 as as, m as es, y as ts, k as rs, z as is, p as os, j as ns, A as ls, u as us, w as Ss, x as cs, v as ps } from "./client-CNrWulRU.js";
2
+ import { F as Ts, P as bs, T as vs, U as Fs, a as Cs, c as Es, p as ds, w as ms } from "./page-LLSMLaL2.js";
3
3
  export {
4
4
  e as ComputedSignal,
5
5
  t as Easing,
@@ -9,67 +9,69 @@ export {
9
9
  n as FiboAppBuilder,
10
10
  l as FiboStyles,
11
11
  u as FineGrainText,
12
- ps as Format,
12
+ Ts as Format,
13
13
  S as INTERACTION_EFFECTS,
14
14
  c as ListSignal,
15
15
  p as MOTION_PRESETS,
16
16
  g as MotionStyles,
17
17
  T as Observable,
18
18
  b as Observer,
19
- gs as Plural,
19
+ bs as Plural,
20
20
  v as Presence,
21
21
  F as ProviderWrapper,
22
- E as ReactivityRoot,
23
- d as Reveal,
24
- C as ScrollProgress,
25
- R as Signal,
26
- Ts as Transform,
27
- bs as Unit,
28
- f as ValueBuilder,
29
- m as applyResponsiveStyles,
22
+ C as ReactivityRoot,
23
+ E as Reveal,
24
+ d as ScrollProgress,
25
+ m as Signal,
26
+ vs as Transform,
27
+ Fs as Unit,
28
+ R as ValueBuilder,
29
+ f as applyResponsiveStyles,
30
30
  I as bindText,
31
31
  P as collection,
32
32
  y as computed,
33
- vs as createPage,
34
- O as createReactivityRoot,
35
- x as createStore,
36
- Fs as cssCurve,
37
- M as endSsrRequest,
38
- N as ensureInteractionFxCss,
39
- _ as ensureListId,
40
- w as fiboDevStats,
41
- A as getCss,
42
- B as getCurrentScope,
43
- V as getMotionCss,
44
- D as getStyleTag,
45
- L as interactionEffectClass,
46
- U as interactionEffectKebab,
47
- h as interp,
48
- q as listSignal,
49
- z as mount,
50
- G as normalizeInteractionEffect,
51
- K as observable,
52
- Es as page,
53
- W as resetFiboDevStats,
54
- X as resolveCssEase,
55
- j as runInScope,
56
- k as scrollTo,
57
- H as signal,
58
- J as springEase,
59
- Q as startViewTransition,
60
- Y as supportsScrollTimeline,
61
- Z as supportsViewTimeline,
62
- $ as toElement,
63
- ss as useBuilderState,
64
- as as useMountTransition,
65
- es as useObservable,
66
- ts as usePrefersReducedMotion,
67
- rs as useProvider,
68
- is as useReactiveStore,
69
- os as useScrollProgress,
70
- ns as useSignal,
71
- ls as useSpring,
72
- us as useStagger,
73
- Ss as useTransition,
74
- ds as withFiboStyles
33
+ O as createComponent,
34
+ Cs as createPage,
35
+ x as createReactivityRoot,
36
+ M as createStore,
37
+ Es as cssCurve,
38
+ N as endSsrRequest,
39
+ _ as ensureInteractionFxCss,
40
+ w as ensureListId,
41
+ A as fiboDevStats,
42
+ B as getCss,
43
+ V as getCurrentScope,
44
+ D as getMotionCss,
45
+ L as getStyleTag,
46
+ U as interactionEffectClass,
47
+ h as interactionEffectKebab,
48
+ q as interp,
49
+ z as listSignal,
50
+ G as mount,
51
+ K as normalizeInteractionEffect,
52
+ W as observable,
53
+ ds as page,
54
+ X as preset,
55
+ j as resetFiboDevStats,
56
+ k as resolveCssEase,
57
+ H as runInScope,
58
+ J as scrollTo,
59
+ Q as signal,
60
+ Y as springEase,
61
+ Z as startViewTransition,
62
+ $ as supportsScrollTimeline,
63
+ ss as supportsViewTimeline,
64
+ as as toElement,
65
+ es as useBuilderState,
66
+ ts as useMountTransition,
67
+ rs as useObservable,
68
+ is as usePrefersReducedMotion,
69
+ os as useProvider,
70
+ ns as useReactiveStore,
71
+ ls as useScrollProgress,
72
+ us as useSignal,
73
+ Ss as useSpring,
74
+ cs as useStagger,
75
+ ps as useTransition,
76
+ ms as withFiboStyles
75
77
  };