Skip to content

Codex: Expose integration APIs and Vite WASM support - #5

Draft
pierremtb wants to merge 2 commits into
mainfrom
pierremtb/modeling-app-integration-api
Draft

Codex: Expose integration APIs and Vite WASM support#5
pierremtb wants to merge 2 commits into
mainfrom
pierremtb/modeling-app-integration-api

Conversation

@pierremtb

Copy link
Copy Markdown

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

## 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`
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