Codex: Expose integration APIs and Vite WASM support - #5
Draft
pierremtb wants to merge 2 commits into
Draft
Conversation
## Summary Adds the web-view surface needed for modeling-app to use `@kittycad/web-view` as the core WebRTC scene layer. - Exposes lifecycle and connection APIs on `ZooWebView` - Emits typed events for WebRTC, track, data channel, connected/ready/close, and worker messages - Adds `kclWasmUrl` support so consumers can provide the correct KCL WASM URL - Adds `@kittycad/web-view/vite` with `kittyCadWebViewWasmPlugin()` - Updates the package build/exports to publish the Vite helper entrypoint ## Why modeling-app needs to integrate web-view without reaching into private WebRTC fields, clicking internal DOM nodes, monkey-patching `@kittycad/lib`, or carrying app-local Vite worker rewrite code. This moves that integration surface into `@kittycad/web-view`, where it can be shared and maintained with the package. ## Testing - `make build` in `web-view` - Downstream modeling-app validation: - `make check build` - `npm run tronb:vite:dev` - verified generated worker payloads no longer hardcode `/kcl_wasm_lib_bg.wasm`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the web-view surface needed for modeling-app to use
@kittycad/web-viewas the core WebRTC scene layer.ZooWebViewkclWasmUrlsupport so consumers can provide the correct KCL WASM URL@kittycad/web-view/vitewithkittyCadWebViewWasmPlugin()Why
modeling-app needs to integrate web-view without reaching into private WebRTC fields, clicking internal DOM nodes, monkey-patching
@kittycad/lib, or carrying app-local Vite worker rewrite code.This moves that integration surface into
@kittycad/web-view, where it can be shared and maintained with the package.Testing
make buildinweb-viewmake check buildnpm run tronb:vite:dev/kcl_wasm_lib_bg.wasm