Skip to content

Split Avatar React into renderer and editor exports - #38

Merged
NWYLZW merged 5 commits into
mainfrom
codex/avatar-sdk-subpath-exports
Sep 5, 2026
Merged

Split Avatar React into renderer and editor exports#38
NWYLZW merged 5 commits into
mainfrom
codex/avatar-sdk-subpath-exports

Conversation

@NWYLZW

@NWYLZW NWYLZW commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Display-only React consumers currently retain the full Avatar editor and its inlined preview assets. Add independent @oneworks/avatar-react/renderer and /editor exports with complete /renderer.css and /editor.css stylesheets, while preserving the root API and style.css.

Vite now emits ESM entries, shared chunks, and relative hashed SVG assets. Renderer imports do not reach editor code or preview images. Applications can load the editor and its CSS with dynamic imports. The editor no longer preloads all 32 base previews during idle time, and its project icon resolves relative to the package. Existing React/Web/Vue APIs remain available. Bilingual package guides and the Avatar Skill explain the new integration. All four SDK manifests are prepared for 1.0.0-rc.9; npm publication is separate.

Validation:

  • React rendering/lifecycle 39 tests passed; AvatarControls 58 tests passed, including the regression for hidden preview preloads.
  • All four SDK typechecks and final clean installed-tarball smoke passed. New consumer checks cover entry/type resolution, renderer JS/CSS budgets, initial graph boundaries, deferred editor CSS, and emitted relative SVG assets.
  • Packed consumer: renderer 319,093 B JS / 1,708 B CSS; lazy-editor initial JS 382,321 B; 379 external SVG assets (including the project icon).
  • Final-head production browser fixture served under /plugins/generation-a/: startup loaded only shell/React (144,218 B JS), display action loaded renderer/model/CSS with no SVG/editor requests, editor action loaded editor/CSS and four visible previews plus the project icon. Close/reopen added no requests. Every SDK graph request returned 200; the temporary HTML fixture's unrelated automatic /favicon.ico request returned 404. This is browser package evidence, not native CordisX startup timing.
  • Independent read-only review of final commit 9664cc68104e68528bb4dc573495e5ce3bbf402e found no blockers. Full diff whitespace checks and Skill validation pass. CI supplies the full repository gate.

@NWYLZW
NWYLZW merged commit abce277 into main Sep 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant