@particle-academy/react-fancy 3.2.0 → 3.2.2

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,6 +1,6 @@
1
1
  # @particle-academy/react-fancy
2
2
 
3
- React UI component library — the React port of the `fancy-flux` Blade/Livewire component library. The goal is **visual and behavioral parity** with fancy-flux.
3
+ React UI component library for **Human+ UX** controlled, agent-bridgeable primitives that humans and agents share. Every component exposes `value` / `onChange`, stable handles, and JSON-friendly props so MCP bridges can drive the UI without DOM scraping.
4
4
 
5
5
  ## Inertia.js integration
6
6
 
@@ -240,7 +240,7 @@ src/
240
240
 
241
241
  - `Size` — `"xs" | "sm" | "md" | "lg" | "xl"`
242
242
  - `Color` — Full Tailwind color palette (17 colors)
243
- - `ActionColor` — Subset of 10 standalone colors matching fancy-flux
243
+ - `ActionColor` — Subset of 10 standalone colors used by Action and friends
244
244
  - `Variant` — `"solid" | "outline" | "ghost" | "soft"`
245
245
  - `Placement` — `"top" | "bottom" | "left" | "right"` + start/end variants
246
246
 
@@ -268,16 +268,23 @@ Every component follows this structure:
268
268
 
269
269
  Use `lucide-react` as the default icon library. It is a dependency of this package and marked as external in tsup. Components should import icons directly (e.g., `import { X, ChevronDown } from "lucide-react"`).
270
270
 
271
- ### Parity with fancy-flux
271
+ ### Human+ UX contract
272
272
 
273
- - **Always reference the corresponding Blade component** in `packages/fancy-flux/stubs/resources/views/flux/` when implementing or updating a component. Match the Tailwind classes, color values, state logic, and dark mode support exactly.
274
- - React-specific additions (e.g., `loading` spinner, `href` anchor rendering) are fine — they don't exist in Blade but are idiomatic in React.
275
- - Icons are passed as `ReactNode` (not string names like Blade's `<flux:icon>`). This is the correct React pattern.
273
+ Every interactive component must:
274
+
275
+ - Expose **`value` + `onChange`** so an agent can read and write state. No internal-only state for anything an agent might want to inspect or change.
276
+ - Carry **stable handles** — `id`, `data-react-fancy-*` attributes, or a selector prop — so MCP bridges can address elements without guessing DOM structure.
277
+ - Accept **JSON-friendly props** — arrays of objects, primitives, simple discriminated unions. Avoid forcing React children for things the agent needs to populate.
278
+ - Support a **bridgeable surface**: a `register<Surface>Bridge(server, { adapter })` (in `agent-integrations`) should be sketchable in one sitting.
279
+ - Broadcast **`AgentActivity`** events for mutations so presence, undo, and coaching layers can compose.
280
+ - Provide **trust-but-verify** hooks for destructive actions — agents propose, humans confirm via `pendingMode` / staged-write affordances.
281
+
282
+ Purely visual primitives (labels, dividers, layout shells) only owe the first bullet.
276
283
 
277
284
  ### Styling
278
285
 
279
286
  - **Tailwind v4** — CSS-first config. Use `@import "tailwindcss"` not `@tailwind` directives.
280
- - **Dark mode** — Every color variant must include `dark:` equivalents. Check fancy-flux for the exact classes. Portal components get dark mode automatically via the Portal wrapper.
287
+ - **Dark mode** — Every color variant must include `dark:` equivalents. Portal components get dark mode automatically via the Portal wrapper.
281
288
  - **No component library deps** — Only `clsx`, `tailwind-merge`, and `lucide-react`. Don't add Radix, Headless UI, or similar.
282
289
  - Class maps should be `Record<Size, string>` (or similar) constants outside the component function, not inline.
283
290
 
package/docs/InputTag.md CHANGED
@@ -63,7 +63,7 @@ Each trigger character maps to a config:
63
63
  "/": {
64
64
  items: COMMANDS,
65
65
  insert: (item, query) => `${item.name} `, // replaces "/<query>" with this
66
- filter?: (item, query) => boolean, // default: prefix match against name/id
66
+ filter?: (item, query) => boolean, // default: case-insensitive substring match against name/id
67
67
  render?: (item, active) => ReactNode, // default: item.name | item.id
68
68
  keyOf?: (item) => string, // default: same as render fallback
69
69
  label?: "Commands", // optional header
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@particle-academy/react-fancy",
3
- "version": "3.2.0",
4
- "description": "React UI component library React port of the fancy-flux Blade component library",
3
+ "version": "3.2.2",
4
+ "description": "React UI component library for Human+ UX controlled, agent-bridgeable primitives",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Particle-Academy/react-fancy.git"
@@ -52,7 +52,7 @@
52
52
  "components",
53
53
  "ui",
54
54
  "tailwind",
55
- "fancy-flux"
55
+ "human-plus-ux"
56
56
  ],
57
57
  "peerDependencies": {
58
58
  "react": "^18.0.0 || ^19.0.0",