diff --git a/.changeset/adapter-surface-m3-m6.md b/.changeset/adapter-surface-m3-m6.md deleted file mode 100644 index aec7fab8..00000000 --- a/.changeset/adapter-surface-m3-m6.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@chestnutlabs/gcode-renderer-three": minor -"@chestnutlabs/gcode-preview-core": minor -"@chestnutlabs/gcode-preview-vue": minor -"@chestnutlabs/gcode-preview-react": minor -"@chestnutlabs/gcode-preview-svelte": minor -"@chestnutlabs/gcode-preview-element": minor ---- - -Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` (#275 M3+M6) - -**M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence -map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on -capability-honesty without reaching for the raw handle. - -**M6** — the `setView`/`getCameraState`/`setCameraState` methods (#268) get first-class declarative -props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), -paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user -camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing -via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the -capabilities/warnings payload across all four adapters. diff --git a/.changeset/camera-ux-orbitcontrols.md b/.changeset/camera-ux-orbitcontrols.md deleted file mode 100644 index 3c3de5ad..00000000 --- a/.changeset/camera-ux-orbitcontrols.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@chestnutlabs/gcode-renderer-three": patch ---- - -Camera UX polish: enable OrbitControls affordances already available (#267) - -Turns on `zoomToCursor` (wheel zoom moves toward the pointer, not the orbit target) and derives -`minDistance`/`maxDistance` clamps from the framed model size so the view can't dolly through the -model or lose it at the extremes. Clamps are recomputed in `frame()`, so they track each file's -bounds. Internal to `scene.ts` — no dependency, no public-API/adapter change; the headless -still-render path (no OrbitControls) is unaffected. diff --git a/.changeset/keyboard-camera-a11y.md b/.changeset/keyboard-camera-a11y.md deleted file mode 100644 index a300abe3..00000000 --- a/.changeset/keyboard-camera-a11y.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@chestnutlabs/gcode-renderer-three": patch -"@chestnutlabs/gcode-preview-vue": patch -"@chestnutlabs/gcode-preview-react": patch -"@chestnutlabs/gcode-preview-svelte": patch -"@chestnutlabs/gcode-preview-element": patch ---- - -Keyboard-operable camera for embedded viewers (DD-004 a11y) (#275/M4) - -The embedded adapter canvases had `aria-label` but no `tabindex`, so they weren't focusable, and the -renderer never enabled OrbitControls key events — only the standalone demo page was keyboard-usable. -Now every adapter canvas is focusable (`tabindex="0"`) and the renderer enables OrbitControls keyboard -events scoped to the canvas (arrow keys pan the view when it's focused, without hijacking the page's -arrow keys). Keyboard operability is satisfied for embedders, not just the demo. diff --git a/.changeset/preset-views-camera-state.md b/.changeset/preset-views-camera-state.md deleted file mode 100644 index 8bba96f8..00000000 --- a/.changeset/preset-views-camera-state.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"@chestnutlabs/gcode-renderer-three": minor -"@chestnutlabs/gcode-preview-core": minor -"@chestnutlabs/gcode-preview-vue": minor -"@chestnutlabs/gcode-preview-react": minor -"@chestnutlabs/gcode-preview-svelte": minor -"@chestnutlabs/gcode-preview-element": minor ---- - -Preset camera views + serializable camera state (#268) - -Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the -`controls` handle into all four adapters: - -- `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), - instant, preserving the active projection. -- `getCameraState()` — read the current camera as a serializable `CameraState` - (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can - persist. -- `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). - -New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation -(snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented -disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather -than fabricating a pose. Covered across all four adapters by the portable behavioral suite. diff --git a/.changeset/svelte-buildvolume-reactive.md b/.changeset/svelte-buildvolume-reactive.md deleted file mode 100644 index 10d3e147..00000000 --- a/.changeset/svelte-buildvolume-reactive.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@chestnutlabs/gcode-preview-svelte": patch ---- - -Fix: Svelte `buildVolume` is reactive after mount (parity with Vue/React) (#274) - -The Svelte shell applied `buildVolume` once at init with no reactive statement, so changing it after -mount was a silent no-op — a cross-adapter parity break (Vue watches it; React re-applies via -`useEffect`). It was the only writable prop missing a `$:` wiring. Now a post-mount `buildVolume` -change re-applies through the handle, matching the other twelve props. A source-invariant test guards -that every writable prop stays reactively wired (the shell has no component-mount harness). diff --git a/package-lock.json b/package-lock.json index 8d984506..d17cd5b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7385,11 +7385,11 @@ }, "packages/gcode-bgcode": { "name": "@chestnutlabs/gcode-bgcode", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-containers": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-containers": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7397,10 +7397,10 @@ }, "packages/gcode-colors": { "name": "@chestnutlabs/gcode-colors", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7408,10 +7408,10 @@ }, "packages/gcode-containers": { "name": "@chestnutlabs/gcode-containers", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7419,10 +7419,10 @@ }, "packages/gcode-dialects": { "name": "@chestnutlabs/gcode-dialects", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7430,13 +7430,13 @@ }, "packages/gcode-parser": { "name": "@chestnutlabs/gcode-parser", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-bgcode": "0.4.0", - "@chestnutlabs/gcode-containers": "0.4.0", - "@chestnutlabs/gcode-dialects": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-bgcode": "0.5.0", + "@chestnutlabs/gcode-containers": "0.5.0", + "@chestnutlabs/gcode-dialects": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7444,13 +7444,13 @@ }, "packages/gcode-preview-core": { "name": "@chestnutlabs/gcode-preview-core", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-renderer-2d": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-renderer-2d": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7458,13 +7458,13 @@ }, "packages/gcode-preview-element": { "name": "@chestnutlabs/gcode-preview-element", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7472,13 +7472,13 @@ }, "packages/gcode-preview-react": { "name": "@chestnutlabs/gcode-preview-react", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "devDependencies": { "@types/react": "^18.3.0", @@ -7494,13 +7494,13 @@ }, "packages/gcode-preview-svelte": { "name": "@chestnutlabs/gcode-preview-svelte", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "devDependencies": { "svelte": "^4.2.0" @@ -7514,13 +7514,13 @@ }, "packages/gcode-preview-vue": { "name": "@chestnutlabs/gcode-preview-vue", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "devDependencies": { "vue": "^3.4.0" @@ -7534,11 +7534,11 @@ }, "packages/gcode-renderer-2d": { "name": "@chestnutlabs/gcode-renderer-2d", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-colors": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-colors": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "engines": { "node": ">=22" @@ -7546,11 +7546,11 @@ }, "packages/gcode-renderer-three": { "name": "@chestnutlabs/gcode-renderer-three", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-colors": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-colors": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "devDependencies": { "@types/three": "0.178.0" @@ -7564,7 +7564,7 @@ }, "packages/toolpath-core": { "name": "@chestnutlabs/toolpath-core", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "engines": { "node": ">=22" diff --git a/packages/gcode-bgcode/CHANGELOG.md b/packages/gcode-bgcode/CHANGELOG.md index 98247a5d..95385297 100644 --- a/packages/gcode-bgcode/CHANGELOG.md +++ b/packages/gcode-bgcode/CHANGELOG.md @@ -1,5 +1,13 @@ # @chestnutlabs/gcode-bgcode +## 0.5.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-containers@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-bgcode/package.json b/packages/gcode-bgcode/package.json index 124e0995..ffa0a5f1 100644 --- a/packages/gcode-bgcode/package.json +++ b/packages/gcode-bgcode/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-bgcode", - "version": "0.4.0", + "version": "0.5.0", "description": "Binary G-code (.bgcode) decode adapter for the Chestnut Labs G-code toolpath stack (DD-011): a license-clean, in-memory block walker that decodes Prusa .bgcode to plain G-code for the existing parser/dialect/renderer pipeline. Decode-only.", "keywords": [ "gcode", @@ -47,7 +47,7 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0", - "@chestnutlabs/gcode-containers": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0", + "@chestnutlabs/gcode-containers": "0.5.0" } } diff --git a/packages/gcode-colors/CHANGELOG.md b/packages/gcode-colors/CHANGELOG.md index 8199bd0d..fd28c2cb 100644 --- a/packages/gcode-colors/CHANGELOG.md +++ b/packages/gcode-colors/CHANGELOG.md @@ -1,5 +1,12 @@ # @chestnutlabs/gcode-colors +## 0.5.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Minor Changes diff --git a/packages/gcode-colors/package.json b/packages/gcode-colors/package.json index 37a414d1..c2f6a286 100644 --- a/packages/gcode-colors/package.json +++ b/packages/gcode-colors/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-colors", - "version": "0.4.0", + "version": "0.5.0", "description": "Renderer-agnostic per-segment color model for the Chestnut Labs G-code toolpath stack (DD-014 D3): the ColorMode union and honest, capability-gated segment coloring over ToolpathIR channels, shared by the 3D and 2D renderers.", "keywords": [ "gcode", @@ -47,6 +47,6 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0" } } diff --git a/packages/gcode-containers/CHANGELOG.md b/packages/gcode-containers/CHANGELOG.md index c619c592..11d54ff5 100644 --- a/packages/gcode-containers/CHANGELOG.md +++ b/packages/gcode-containers/CHANGELOG.md @@ -1,5 +1,12 @@ # @chestnutlabs/gcode-containers +## 0.5.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-containers/package.json b/packages/gcode-containers/package.json index b5cf4409..3836cf8c 100644 --- a/packages/gcode-containers/package.json +++ b/packages/gcode-containers/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-containers", - "version": "0.4.0", + "version": "0.5.0", "description": "Safe, bounded, in-memory container extraction for sliced G-code (.gcode.3mf) — DD-005 §4.4/§7. Never writes files, never fetches, zero dependencies.", "keywords": [ "gcode", @@ -42,6 +42,6 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0" } } diff --git a/packages/gcode-dialects/CHANGELOG.md b/packages/gcode-dialects/CHANGELOG.md index cacaa069..c84da47e 100644 --- a/packages/gcode-dialects/CHANGELOG.md +++ b/packages/gcode-dialects/CHANGELOG.md @@ -1,5 +1,12 @@ # @chestnutlabs/gcode-dialects +## 0.5.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Minor Changes diff --git a/packages/gcode-dialects/package.json b/packages/gcode-dialects/package.json index 1955fda4..0f318876 100644 --- a/packages/gcode-dialects/package.json +++ b/packages/gcode-dialects/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-dialects", - "version": "0.4.0", + "version": "0.5.0", "description": "Slicer/firmware dialect adapters for ToolpathIR annotation (DD-005). Adapters annotate metadata and optional channels — they can never alter geometry.", "keywords": [ "gcode", @@ -45,6 +45,6 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0" } } diff --git a/packages/gcode-parser/CHANGELOG.md b/packages/gcode-parser/CHANGELOG.md index 0880b56a..cf78fc77 100644 --- a/packages/gcode-parser/CHANGELOG.md +++ b/packages/gcode-parser/CHANGELOG.md @@ -1,5 +1,15 @@ # @chestnutlabs/gcode-parser +## 0.5.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-bgcode@0.5.0 + - @chestnutlabs/gcode-containers@0.5.0 + - @chestnutlabs/gcode-dialects@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Minor Changes diff --git a/packages/gcode-parser/package.json b/packages/gcode-parser/package.json index 453c24ef..e701d52e 100644 --- a/packages/gcode-parser/package.json +++ b/packages/gcode-parser/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-parser", - "version": "0.4.0", + "version": "0.5.0", "description": "Worker-safe G-code parse core producing ToolpathIR (DD-003).", "keywords": [ "gcode", @@ -49,9 +49,9 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/toolpath-core": "0.4.0", - "@chestnutlabs/gcode-dialects": "0.4.0", - "@chestnutlabs/gcode-containers": "0.4.0", - "@chestnutlabs/gcode-bgcode": "0.4.0" + "@chestnutlabs/toolpath-core": "0.5.0", + "@chestnutlabs/gcode-dialects": "0.5.0", + "@chestnutlabs/gcode-containers": "0.5.0", + "@chestnutlabs/gcode-bgcode": "0.5.0" } } diff --git a/packages/gcode-preview-core/CHANGELOG.md b/packages/gcode-preview-core/CHANGELOG.md index 46a09aa8..42f528af 100644 --- a/packages/gcode-preview-core/CHANGELOG.md +++ b/packages/gcode-preview-core/CHANGELOG.md @@ -1,5 +1,46 @@ # @chestnutlabs/gcode-preview-core +## 0.5.0 + +### Minor Changes + +- [#283](https://github.com/ChestnutLabs/gcode-preview/pull/283) [`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275) M3+M6) + + **M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence + map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on + capability-honesty without reaching for the raw handle. + + **M6** — the `setView`/`getCameraState`/`setCameraState` methods ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) get first-class declarative + props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), + paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user + camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing + via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the + capabilities/warnings payload across all four adapters. + +- [#270](https://github.com/ChestnutLabs/gcode-preview/pull/270) [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Preset camera views + serializable camera state ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) + + Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the + `controls` handle into all four adapters: + - `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), + instant, preserving the active projection. + - `getCameraState()` — read the current camera as a serializable `CameraState` + (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can + persist. + - `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). + + New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation + (snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented + disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather + than fabricating a pose. Covered across all four adapters by the portable behavioral suite. + +### Patch Changes + +- Updated dependencies [[`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941), [`b671d02`](https://github.com/ChestnutLabs/gcode-preview/commit/b671d02179ba6cf30ce9888fa4b851328852e0f1), [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069), [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e)]: + - @chestnutlabs/gcode-renderer-three@0.5.0 + - @chestnutlabs/gcode-parser@0.5.0 + - @chestnutlabs/gcode-renderer-2d@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-preview-core/package.json b/packages/gcode-preview-core/package.json index 80b68ee8..301274cf 100644 --- a/packages/gcode-preview-core/package.json +++ b/packages/gcode-preview-core/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-preview-core", - "version": "0.4.0", + "version": "0.5.0", "description": "Framework-neutral preview controller for the Chestnut Labs G-code viewer (DD-007 §4.6): the shared engine glue, state model, and TypeScript contracts beneath the Vue/React/Svelte adapters.", "keywords": [ "gcode", @@ -52,9 +52,9 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-renderer-2d": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-renderer-2d": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" } } diff --git a/packages/gcode-preview-element/CHANGELOG.md b/packages/gcode-preview-element/CHANGELOG.md index 394ca749..94b657f9 100644 --- a/packages/gcode-preview-element/CHANGELOG.md +++ b/packages/gcode-preview-element/CHANGELOG.md @@ -1,5 +1,54 @@ # @chestnutlabs/gcode-preview-element +## 0.5.0 + +### Minor Changes + +- [#283](https://github.com/ChestnutLabs/gcode-preview/pull/283) [`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275) M3+M6) + + **M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence + map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on + capability-honesty without reaching for the raw handle. + + **M6** — the `setView`/`getCameraState`/`setCameraState` methods ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) get first-class declarative + props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), + paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user + camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing + via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the + capabilities/warnings payload across all four adapters. + +- [#270](https://github.com/ChestnutLabs/gcode-preview/pull/270) [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Preset camera views + serializable camera state ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) + + Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the + `controls` handle into all four adapters: + - `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), + instant, preserving the active projection. + - `getCameraState()` — read the current camera as a serializable `CameraState` + (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can + persist. + - `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). + + New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation + (snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented + disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather + than fabricating a pose. Covered across all four adapters by the portable behavioral suite. + +### Patch Changes + +- [#282](https://github.com/ChestnutLabs/gcode-preview/pull/282) [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Keyboard-operable camera for embedded viewers (DD-004 a11y) ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275)/M4) + + The embedded adapter canvases had `aria-label` but no `tabindex`, so they weren't focusable, and the + renderer never enabled OrbitControls key events — only the standalone demo page was keyboard-usable. + Now every adapter canvas is focusable (`tabindex="0"`) and the renderer enables OrbitControls keyboard + events scoped to the canvas (arrow keys pan the view when it's focused, without hijacking the page's + arrow keys). Keyboard operability is satisfied for embedders, not just the demo. + +- Updated dependencies [[`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941), [`b671d02`](https://github.com/ChestnutLabs/gcode-preview/commit/b671d02179ba6cf30ce9888fa4b851328852e0f1), [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069), [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e)]: + - @chestnutlabs/gcode-renderer-three@0.5.0 + - @chestnutlabs/gcode-preview-core@0.5.0 + - @chestnutlabs/gcode-parser@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-preview-element/package.json b/packages/gcode-preview-element/package.json index f790bd6a..5e566cf2 100644 --- a/packages/gcode-preview-element/package.json +++ b/packages/gcode-preview-element/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-preview-element", - "version": "0.4.0", + "version": "0.5.0", "description": "Framework-free Web Component for the Chestnut Labs G-code viewer (DD-007 D1 / DD-009 D5): a custom element bridging @chestnutlabs/gcode-preview-core, no framework peer dependency.", "keywords": [ "gcode", @@ -52,9 +52,9 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" } } diff --git a/packages/gcode-preview-react/CHANGELOG.md b/packages/gcode-preview-react/CHANGELOG.md index ea9071d1..7da55bcb 100644 --- a/packages/gcode-preview-react/CHANGELOG.md +++ b/packages/gcode-preview-react/CHANGELOG.md @@ -1,5 +1,54 @@ # @chestnutlabs/gcode-preview-react +## 0.5.0 + +### Minor Changes + +- [#283](https://github.com/ChestnutLabs/gcode-preview/pull/283) [`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275) M3+M6) + + **M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence + map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on + capability-honesty without reaching for the raw handle. + + **M6** — the `setView`/`getCameraState`/`setCameraState` methods ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) get first-class declarative + props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), + paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user + camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing + via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the + capabilities/warnings payload across all four adapters. + +- [#270](https://github.com/ChestnutLabs/gcode-preview/pull/270) [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Preset camera views + serializable camera state ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) + + Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the + `controls` handle into all four adapters: + - `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), + instant, preserving the active projection. + - `getCameraState()` — read the current camera as a serializable `CameraState` + (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can + persist. + - `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). + + New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation + (snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented + disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather + than fabricating a pose. Covered across all four adapters by the portable behavioral suite. + +### Patch Changes + +- [#282](https://github.com/ChestnutLabs/gcode-preview/pull/282) [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Keyboard-operable camera for embedded viewers (DD-004 a11y) ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275)/M4) + + The embedded adapter canvases had `aria-label` but no `tabindex`, so they weren't focusable, and the + renderer never enabled OrbitControls key events — only the standalone demo page was keyboard-usable. + Now every adapter canvas is focusable (`tabindex="0"`) and the renderer enables OrbitControls keyboard + events scoped to the canvas (arrow keys pan the view when it's focused, without hijacking the page's + arrow keys). Keyboard operability is satisfied for embedders, not just the demo. + +- Updated dependencies [[`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941), [`b671d02`](https://github.com/ChestnutLabs/gcode-preview/commit/b671d02179ba6cf30ce9888fa4b851328852e0f1), [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069), [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e)]: + - @chestnutlabs/gcode-renderer-three@0.5.0 + - @chestnutlabs/gcode-preview-core@0.5.0 + - @chestnutlabs/gcode-parser@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-preview-react/package.json b/packages/gcode-preview-react/package.json index b5694e3e..5b309bd2 100644 --- a/packages/gcode-preview-react/package.json +++ b/packages/gcode-preview-react/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-preview-react", - "version": "0.4.0", + "version": "0.5.0", "description": "Thin React integration for the Chestnut Labs G-code viewer (DD-007 D1 amendment): useGcodePreview hook + GcodePreview component as a reactivity bridge over @chestnutlabs/gcode-preview-core.", "keywords": [ "gcode", @@ -49,10 +49,10 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0" diff --git a/packages/gcode-preview-svelte/CHANGELOG.md b/packages/gcode-preview-svelte/CHANGELOG.md index da69cef6..2d9a34ae 100644 --- a/packages/gcode-preview-svelte/CHANGELOG.md +++ b/packages/gcode-preview-svelte/CHANGELOG.md @@ -1,5 +1,62 @@ # @chestnutlabs/gcode-preview-svelte +## 0.5.0 + +### Minor Changes + +- [#283](https://github.com/ChestnutLabs/gcode-preview/pull/283) [`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275) M3+M6) + + **M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence + map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on + capability-honesty without reaching for the raw handle. + + **M6** — the `setView`/`getCameraState`/`setCameraState` methods ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) get first-class declarative + props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), + paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user + camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing + via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the + capabilities/warnings payload across all four adapters. + +- [#270](https://github.com/ChestnutLabs/gcode-preview/pull/270) [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Preset camera views + serializable camera state ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) + + Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the + `controls` handle into all four adapters: + - `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), + instant, preserving the active projection. + - `getCameraState()` — read the current camera as a serializable `CameraState` + (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can + persist. + - `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). + + New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation + (snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented + disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather + than fabricating a pose. Covered across all four adapters by the portable behavioral suite. + +### Patch Changes + +- [#282](https://github.com/ChestnutLabs/gcode-preview/pull/282) [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Keyboard-operable camera for embedded viewers (DD-004 a11y) ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275)/M4) + + The embedded adapter canvases had `aria-label` but no `tabindex`, so they weren't focusable, and the + renderer never enabled OrbitControls key events — only the standalone demo page was keyboard-usable. + Now every adapter canvas is focusable (`tabindex="0"`) and the renderer enables OrbitControls keyboard + events scoped to the canvas (arrow keys pan the view when it's focused, without hijacking the page's + arrow keys). Keyboard operability is satisfied for embedders, not just the demo. + +- [#281](https://github.com/ChestnutLabs/gcode-preview/pull/281) [`775598f`](https://github.com/ChestnutLabs/gcode-preview/commit/775598fcde26d19c72567725b7f78dd16fc14c8e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Fix: Svelte `buildVolume` is reactive after mount (parity with Vue/React) ([#274](https://github.com/ChestnutLabs/gcode-preview/issues/274)) + + The Svelte shell applied `buildVolume` once at init with no reactive statement, so changing it after + mount was a silent no-op — a cross-adapter parity break (Vue watches it; React re-applies via + `useEffect`). It was the only writable prop missing a `$:` wiring. Now a post-mount `buildVolume` + change re-applies through the handle, matching the other twelve props. A source-invariant test guards + that every writable prop stays reactively wired (the shell has no component-mount harness). + +- Updated dependencies [[`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941), [`b671d02`](https://github.com/ChestnutLabs/gcode-preview/commit/b671d02179ba6cf30ce9888fa4b851328852e0f1), [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069), [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e)]: + - @chestnutlabs/gcode-renderer-three@0.5.0 + - @chestnutlabs/gcode-preview-core@0.5.0 + - @chestnutlabs/gcode-parser@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-preview-svelte/package.json b/packages/gcode-preview-svelte/package.json index e1b53813..0b03f99a 100644 --- a/packages/gcode-preview-svelte/package.json +++ b/packages/gcode-preview-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-preview-svelte", - "version": "0.4.0", + "version": "0.5.0", "description": "Thin Svelte integration for the Chestnut Labs G-code viewer (DD-007 D1 amendment): createGcodePreview store/action API + GcodePreview component as a reactivity bridge over @chestnutlabs/gcode-preview-core.", "keywords": [ "gcode", @@ -55,10 +55,10 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "peerDependencies": { "svelte": "^4.0.0 || ^5.0.0" diff --git a/packages/gcode-preview-vue/CHANGELOG.md b/packages/gcode-preview-vue/CHANGELOG.md index b5664a3f..fb391f06 100644 --- a/packages/gcode-preview-vue/CHANGELOG.md +++ b/packages/gcode-preview-vue/CHANGELOG.md @@ -1,5 +1,54 @@ # @chestnutlabs/gcode-preview-vue +## 0.5.0 + +### Minor Changes + +- [#283](https://github.com/ChestnutLabs/gcode-preview/pull/283) [`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275) M3+M6) + + **M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence + map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on + capability-honesty without reaching for the raw handle. + + **M6** — the `setView`/`getCameraState`/`setCameraState` methods ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) get first-class declarative + props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), + paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user + camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing + via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the + capabilities/warnings payload across all four adapters. + +- [#270](https://github.com/ChestnutLabs/gcode-preview/pull/270) [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Preset camera views + serializable camera state ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) + + Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the + `controls` handle into all four adapters: + - `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), + instant, preserving the active projection. + - `getCameraState()` — read the current camera as a serializable `CameraState` + (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can + persist. + - `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). + + New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation + (snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented + disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather + than fabricating a pose. Covered across all four adapters by the portable behavioral suite. + +### Patch Changes + +- [#282](https://github.com/ChestnutLabs/gcode-preview/pull/282) [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Keyboard-operable camera for embedded viewers (DD-004 a11y) ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275)/M4) + + The embedded adapter canvases had `aria-label` but no `tabindex`, so they weren't focusable, and the + renderer never enabled OrbitControls key events — only the standalone demo page was keyboard-usable. + Now every adapter canvas is focusable (`tabindex="0"`) and the renderer enables OrbitControls keyboard + events scoped to the canvas (arrow keys pan the view when it's focused, without hijacking the page's + arrow keys). Keyboard operability is satisfied for embedders, not just the demo. + +- Updated dependencies [[`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941), [`b671d02`](https://github.com/ChestnutLabs/gcode-preview/commit/b671d02179ba6cf30ce9888fa4b851328852e0f1), [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069), [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e)]: + - @chestnutlabs/gcode-renderer-three@0.5.0 + - @chestnutlabs/gcode-preview-core@0.5.0 + - @chestnutlabs/gcode-parser@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-preview-vue/package.json b/packages/gcode-preview-vue/package.json index c2da5933..de6db526 100644 --- a/packages/gcode-preview-vue/package.json +++ b/packages/gcode-preview-vue/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-preview-vue", - "version": "0.4.0", + "version": "0.5.0", "description": "Thin Vue 3 integration for the Chestnut Labs G-code viewer (DD-007): useGcodePreview composable + GcodePreview component over the framework-neutral parser/renderer/progress packages.", "keywords": [ "gcode", @@ -50,10 +50,10 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-parser": "0.4.0", - "@chestnutlabs/gcode-renderer-three": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0", - "@chestnutlabs/gcode-preview-core": "0.4.0" + "@chestnutlabs/gcode-parser": "0.5.0", + "@chestnutlabs/gcode-renderer-three": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0", + "@chestnutlabs/gcode-preview-core": "0.5.0" }, "peerDependencies": { "vue": "^3.4.0" diff --git a/packages/gcode-renderer-2d/CHANGELOG.md b/packages/gcode-renderer-2d/CHANGELOG.md index b947e1f5..3fb75506 100644 --- a/packages/gcode-renderer-2d/CHANGELOG.md +++ b/packages/gcode-renderer-2d/CHANGELOG.md @@ -1,5 +1,13 @@ # @chestnutlabs/gcode-renderer-2d +## 0.5.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-colors@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/gcode-renderer-2d/package.json b/packages/gcode-renderer-2d/package.json index 9aa60b83..5bd539e2 100644 --- a/packages/gcode-renderer-2d/package.json +++ b/packages/gcode-renderer-2d/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-renderer-2d", - "version": "0.4.0", + "version": "0.5.0", "description": "Low-resource Canvas 2D layer renderer for the Chestnut Labs G-code viewer (DD-014 / E8): an opt-in current/adjacent-layer 2D view over the existing ToolpathIR for low-GPU/low-memory/WebGL-blocked devices. No three, no framework.", "keywords": [ "gcode", @@ -49,7 +49,7 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-colors": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-colors": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" } } diff --git a/packages/gcode-renderer-three/CHANGELOG.md b/packages/gcode-renderer-three/CHANGELOG.md index 10ff8a30..798c31d5 100644 --- a/packages/gcode-renderer-three/CHANGELOG.md +++ b/packages/gcode-renderer-three/CHANGELOG.md @@ -1,5 +1,60 @@ # @chestnutlabs/gcode-renderer-three +## 0.5.0 + +### Minor Changes + +- [#283](https://github.com/ChestnutLabs/gcode-preview/pull/283) [`804cafb`](https://github.com/ChestnutLabs/gcode-preview/commit/804cafb33f8f8be2617585156babf1221a856941) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Adapter surface: capabilities/warnings on `ready` + declarative `view`/`cameraState` ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275) M3+M6) + + **M3** — the `parse-complete` / `ready` event now carries `capabilities` (the per-field confidence + map) and `warnings` alongside `{ segments, layers, complete }`, so consumers can gate their own UI on + capability-honesty without reaching for the raw handle. + + **M6** — the `setView`/`getCameraState`/`setCameraState` methods ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) get first-class declarative + props on all four adapters: a `view` prop (preset orientation) and a `cameraState` prop (restore), + paired with a new **`camera-changed`** event (renderer → controller → adapters, emitted when a user + camera interaction settles) so a `cameraState` binding round-trips. The 2D renderer keeps disclosing + via `renderer-unsupported` rather than fabricating a pose. Behavioral-suite coverage added for the + capabilities/warnings payload across all four adapters. + +- [#270](https://github.com/ChestnutLabs/gcode-preview/pull/270) [`bb2af7a`](https://github.com/ChestnutLabs/gcode-preview/commit/bb2af7a4b9c433ef8caf59ecb5ece51f39a8eb9e) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Preset camera views + serializable camera state ([#268](https://github.com/ChestnutLabs/gcode-preview/issues/268)) + + Adds three imperative camera methods, threaded from the renderer through `PreviewRenderer` and the + `controls` handle into all four adapters: + - `setView(view)` — snap to a preset orientation (`top`/`bottom`/`front`/`back`/`left`/`right`/`iso`), + instant, preserving the active projection. + - `getCameraState()` — read the current camera as a serializable `CameraState` + (`{ position, target, zoom, cameraMode }`, scene coordinates); a stable contract a dashboard can + persist. + - `setCameraState(state)` — restore a snapshot verbatim (no re-fit to the current model). + + New public types `CameraView` and `CameraState`. No new dependency, no IR/schema change, no animation + (snapping is instant). The low-resource 2D renderer has no 3D pose, so it honors these as documented + disclosures (`getCameraState()` → `null`; `setView`/`setCameraState` → `renderer-unsupported`) rather + than fabricating a pose. Covered across all four adapters by the portable behavioral suite. + +### Patch Changes + +- [#269](https://github.com/ChestnutLabs/gcode-preview/pull/269) [`b671d02`](https://github.com/ChestnutLabs/gcode-preview/commit/b671d02179ba6cf30ce9888fa4b851328852e0f1) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Camera UX polish: enable OrbitControls affordances already available ([#267](https://github.com/ChestnutLabs/gcode-preview/issues/267)) + + Turns on `zoomToCursor` (wheel zoom moves toward the pointer, not the orbit target) and derives + `minDistance`/`maxDistance` clamps from the framed model size so the view can't dolly through the + model or lose it at the extremes. Clamps are recomputed in `frame()`, so they track each file's + bounds. Internal to `scene.ts` — no dependency, no public-API/adapter change; the headless + still-render path (no OrbitControls) is unaffected. + +- [#282](https://github.com/ChestnutLabs/gcode-preview/pull/282) [`54b54fe`](https://github.com/ChestnutLabs/gcode-preview/commit/54b54fe240e5ef7edae0e03e351127de531c5069) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Keyboard-operable camera for embedded viewers (DD-004 a11y) ([#275](https://github.com/ChestnutLabs/gcode-preview/issues/275)/M4) + + The embedded adapter canvases had `aria-label` but no `tabindex`, so they weren't focusable, and the + renderer never enabled OrbitControls key events — only the standalone demo page was keyboard-usable. + Now every adapter canvas is focusable (`tabindex="0"`) and the renderer enables OrbitControls keyboard + events scoped to the canvas (arrow keys pan the view when it's focused, without hijacking the page's + arrow keys). Keyboard operability is satisfied for embedders, not just the demo. + +- Updated dependencies []: + - @chestnutlabs/gcode-colors@0.5.0 + - @chestnutlabs/toolpath-core@0.5.0 + ## 0.4.0 ### Minor Changes diff --git a/packages/gcode-renderer-three/package.json b/packages/gcode-renderer-three/package.json index 78ac75ac..21b63dbd 100644 --- a/packages/gcode-renderer-three/package.json +++ b/packages/gcode-renderer-three/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-renderer-three", - "version": "0.4.0", + "version": "0.5.0", "description": "Three.js toolpath renderer consuming ToolpathIR (DD-004). Phases 1-2: geometry builders + scene/lifecycle.", "keywords": [ "gcode", @@ -49,8 +49,8 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-colors": "0.4.0", - "@chestnutlabs/toolpath-core": "0.4.0" + "@chestnutlabs/gcode-colors": "0.5.0", + "@chestnutlabs/toolpath-core": "0.5.0" }, "devDependencies": { "@types/three": "0.178.0" diff --git a/packages/toolpath-core/CHANGELOG.md b/packages/toolpath-core/CHANGELOG.md index 4c0cb7be..8ca631e3 100644 --- a/packages/toolpath-core/CHANGELOG.md +++ b/packages/toolpath-core/CHANGELOG.md @@ -1,5 +1,7 @@ # @chestnutlabs/toolpath-core +## 0.5.0 + ## 0.4.0 ### Minor Changes diff --git a/packages/toolpath-core/package.json b/packages/toolpath-core/package.json index 47d2a5c9..f47aacea 100644 --- a/packages/toolpath-core/package.json +++ b/packages/toolpath-core/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/toolpath-core", - "version": "0.4.0", + "version": "0.5.0", "description": "Neutral ToolpathIR and capability model for the Chestnut Labs G-code Preview toolpath stack.", "keywords": [ "gcode",