Commit Graph

3 Commits

Author SHA1 Message Date
2f9e0a9936 Rename package from jrx to jfx
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:27:37 +00:00
af85ad3b07 Add example: Bun HTTP server showcasing jrx JSX-to-JSON rendering
Bun React app with HMR that demonstrates jrx's render() pipeline.
Shows JSX source, live UI via @json-render/react, and JSON output
side by side.

- example/specs/simple.tsx: flat Stack > Text + Button
- example/specs/full.tsx: nested layout with state, events,
  visibility conditions, and watchers
- Uses defineCatalog + defineRegistry from @json-render/react
- Fix package.json exports to match actual tsup output (.js/.cjs
  instead of .mjs/.js)

Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 00:48:37 +00:00
Kenneth Nym
f36256dda9 Initial implementation of jrx - JSX factory for json-render
JSX factory that compiles JSX trees into json-render Spec JSON.
Framework-agnostic custom jsx-runtime, no React dependency at runtime.

- jsx/jsxs/Fragment via jsxImportSource: "jrx"
- render() flattens JrxNode tree into { root, elements, state? } Spec
- Auto key generation (type-N) with explicit key override
- Full feature parity: visible, on, repeat, watch as reserved props
- Function components via component() or plain functions
- @json-render/core as peer dependency

Co-authored-by: Ona <no-reply@ona.com>
2026-02-27 00:31:52 +00:00