release: WRNexusJS 0.4.0

This commit is contained in:
2026-07-27 12:42:18 +05:30
parent 8b728a3e5d
commit 30e5721e84
250 changed files with 10065 additions and 3923 deletions
+10 -13
View File
@@ -1,19 +1,16 @@
# Framework integration
The current WRNexusJS component scanner always includes `packages/ui/components` and the applications `app/components`. The installer therefore copies `Captcha.wrn` into `packages/ui/components/Captcha.wrn` while retaining the canonical package copy at `packages/captcha/components/Captcha.wrn`.
WRNexusJS 0.4 discovers components and browser runtimes from installed package plugins.
A future framework improvement can read component directories registered by plugins and pass them to `createRouter({ componentDirs })`. `captchaPlugin()` already exposes the package directory through configuration and plugin metadata, so the package is ready for that change without changing its public API.
`@wrnexus/captcha` is a complete example:
The installer adds these TypeScript aliases:
- `packages/captcha/package.json` declares `wrnexus.plugin`.
- `captchaPlugin()` contributes its component directory, client runtime, Tailwind source, and DevToolbar audit panel.
- `Captcha.wrn` renders `data-wrnexus-runtime="captcha"`.
- SSR injects the runtime only when the component appears.
- CSR navigation mounts and unmounts the runtime.
- Development serves the package source; production emits a hashed chunk.
```json
{
"@wrnexus/captcha": ["./packages/captcha/src/index.ts"],
"@wrnexus/captcha/server": ["./packages/captcha/src/server/index.ts"],
"@wrnexus/captcha/client": ["./packages/captcha/src/client/index.ts"],
"@wrnexus/captcha/plugin": ["./packages/captcha/src/plugin.ts"],
"@wrnexus/captcha/*": ["./packages/captcha/src/*"]
}
```
There is intentionally no `packages/ui/components/Captcha.wrn`, no showcase-local copy, and no public `captcha.js` file.
After installation, regenerate the UI component reference so `Captcha` appears in generated component documentation.
`integration/platform-upgrade.test.ts` exercises the 0.4 cross-package foundation.