fiboui 2.1.0 → 2.2.0

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # FiboUI v2.1.0
1
+ # FiboUI v2.2.0
2
2
 
3
3
  **A Flutter & SwiftUI-inspired React UI framework featuring a fluent builder API and fine-grained reactivity.**
4
4
 
5
- FiboUI brings chainable builders to React. Compose screens with `Column()`, `Row()`, `Button()`, and `signal()`. Builders **are** React elements — return them from components, nest them in JSX, and skip `.build()`.
5
+ FiboUI brings chainable builders to React. Compose screens with `Column()`, `Row()`, `Button()`, and `signal()`. Builders **are** React elements — return them from functions and skip `.build()`. Prefer the fluent API (no JSX tags).
6
6
 
7
7
  ---
8
8
 
@@ -13,6 +13,8 @@ FiboUI brings chainable builders to React. Compose screens with `Column()`, `Row
13
13
  - **Fine-grained reactivity** — `signal()`, `computed()`, `createStore()`, `.bindSignal()`, `.observer()`.
14
14
  - **Multi-theme** — Material, Cupertino, and Web tokens with CSS variables.
15
15
  - **Type-safe** — TypeScript builders; `FiboChild` / `FiboChildren` describe child slots.
16
+ - **Media queries** — `Box().padding(8).md({ padding: 16 }).lg({ padding: 24 })` compiles to CSS `@media`. `.responsive({ mobile, tablet, desktop })` still works (JS).
17
+ - **CSS motion & scroll** — `Box().animate('fadeIn').ease('spring')`, `.onScroll('fadeIn')`, `.stagger(80)`, `.scrollProgress()`, `Presence(open).enter('fadeIn').exit('fadeOut')`. Default path is CSS (no rAF). See `docs/guide/animation.md`.
16
18
 
17
19
  ---
18
20
 
@@ -59,7 +61,7 @@ function Hello() {
59
61
 
60
62
  ### No `.build()`
61
63
 
62
- Builders are valid React elements (`isValidElement(Button('Go'))`). Use them as JSX children, return values, array items (`.key(id)`), props, or `React.createElement` arguments. `.build()` still exists and is deprecated.
64
+ Builders are valid React elements (`isValidElement(Button('Go'))`). Return them from functions, nest them in `.children()`, or pass them as `React.createElement` arguments. `.build()` still exists and is deprecated.
63
65
 
64
66
  The event API on `Button` is **`.onPress`** (not `onClick`). `FiboBuilder.onClick` still exists for raw DOM handlers on any builder.
65
67
 
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import s, { useRef as l, useEffect as p } from "react";
3
- import { i as x, r as m, E } from "./builder-6GkZlCaz.js";
3
+ import { w as x, r as m, E } from "./builder-KLTu7nAI.js";
4
4
  function R({
5
5
  compute: e,
6
6
  as: n = "span",
7
- className: i,
8
- style: o,
7
+ className: o,
8
+ style: i,
9
9
  ...u
10
10
  }) {
11
11
  const r = x(), t = l(null), a = e();
@@ -15,7 +15,7 @@ function R({
15
15
  t.current && t.current.textContent !== c && (t.current.textContent = c);
16
16
  });
17
17
  return () => f.dispose();
18
- }), [e, r]), s.createElement(n, { ref: t, className: i, style: o, ...u }, a);
18
+ }), [e, r]), s.createElement(n, { ref: t, className: o, style: i, ...u }, a);
19
19
  }
20
20
  function d(e, n) {
21
21
  return s.createElement(R, {