30 Commits

Author SHA1 Message Date
4c396d9f60 Add repository field to package.json (#9)
Required for npm provenance verification — npm checks that the
repository URL matches the GitHub repo publishing the package.

Co-authored-by: Ona <no-reply@ona.com>
0.2.0
2026-03-14 01:32:17 +00:00
8680ef66c8 Add setup-node step for npm registry auth (#8)
setup-node with registry-url configures the .npmrc with the OIDC
token needed for trusted publishing via bunx npm publish.

Co-authored-by: Ona <no-reply@ona.com>
2026-03-14 01:29:36 +00:00
3827ccff23 Add top-level OIDC permissions to publish workflow (#7)
Co-authored-by: Ona <no-reply@ona.com>
2026-03-14 01:23:37 +00:00
650e2141d8 Use bunx npm publish for trusted publishing (#6)
bun publish does not pick up the OIDC token for npm trusted publishing.

Co-authored-by: Ona <no-reply@ona.com>
2026-03-14 01:19:35 +00:00
2d75600913 Bump version to 0.2.0 (#5)
Breaking: JrxNode is now a union type (JrxElement | null | undefined),
isJrxNode renamed to isJrxElement.

Co-authored-by: Ona <no-reply@ona.com>
2026-03-14 01:11:45 +00:00
69a8a8fe67 Merge pull request #4 from kennethnym/jrx-node-null-undefined
Support null and undefined in JrxNode type
2026-03-14 01:10:25 +00:00
4dcd184de0 Support null and undefined in JrxNode type
Split JrxNode into JrxElement (concrete branded object) and JrxNode
(JrxElement | null | undefined), mirroring React's ReactElement vs
ReactNode pattern. Components can now return null/undefined to render
nothing.

- Rename isJrxNode to isJrxElement (deprecated alias kept)
- Handle null-returning components in jsx/jsxs factories
- Add tests for null/undefined returns, children filtering, render()
  rejection

Co-authored-by: Ona <no-reply@ona.com>
2026-03-14 01:06:22 +00:00
00a5e83e8b Use trusted publishing (OIDC) instead of npm token
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:57:57 +00:00
4bd3a5f2da Use bun publish in CI workflow
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:56:06 +00:00
c8496ff5e9 Replace tsup with bun build + tsc, drop CJS
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:51:01 +00:00
2bdcada7c8 Remove sourcemaps from build output
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:47:20 +00:00
b88bb9886a Disable code splitting in tsup build
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:46:43 +00:00
4c22ad4d87 Set publishConfig access to public
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:43:52 +00:00
e641c33f56 Rename package to @nym.sh/jrx
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:42:09 +00:00
99fe5e1db9 Rename package from jfx to jsonsx
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:37:10 +00:00
c9d4ff28e3 Add npm publish workflow on GitHub release
Requires NPM_TOKEN secret. Builds, tests, then publishes with provenance.

Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:30:17 +00:00
2f9e0a9936 Rename package from jrx to jfx
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:27:37 +00:00
b8d1d2de80 Add CI workflow: build, typecheck, test
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:16:40 +00:00
c52e5c7765 Add MIT license
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:14:12 +00:00
0c926dc3e9 Merge pull request #3 from kennethnym/add-readme
Add README
2026-02-28 01:13:18 +00:00
a38feebc2a Add README with usage instructions and example
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:10:49 +00:00
12500a869d Merge pull request #2 from kennethnym/update-devcontainer
Add devcontainer with Bun
2026-02-28 01:09:25 +00:00
403d40ab8c Install bun from Dockerfile instead of devcontainer feature
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:09:08 +00:00
acf9f7f696 Remove Node.js feature — Bun handles everything
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:06:50 +00:00
0a1a4fbf09 Add devcontainer with Node.js 22 and Bun
Installs dependencies for both root and example/ on container creation.

Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:03:04 +00:00
b9e45afea0 Merge pull request #1 from kennethnym/add-example
Add example: Bun HTTP server showcasing jrx JSX-to-JSON rendering
2026-02-28 01:01:35 +00:00
e4d11b68c5 Fix null type error in Input registry component
Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 01:00:31 +00:00
968faac7f5 Fix counter, add input binding, syntax highlighting, dark mode
- Fix increment button: custom action handler instead of no-op setState
- Toggle visibility on Show/Hide Details button via $cond
- Input uses $bindState + useBoundProp for two-way binding
- Add shiki syntax highlighting (catppuccin-latte/mocha dual theme)
- Dark mode via prefers-color-scheme with CSS variables
- Layout: Live UI left, JSX Source + JSON Output stacked right

Co-authored-by: Ona <no-reply@ona.com>
2026-02-28 00:56:59 +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