diff --git a/.changeset/capture-exclude-build-volume.md b/.changeset/capture-exclude-build-volume.md deleted file mode 100644 index 414b71a2..00000000 --- a/.changeset/capture-exclude-build-volume.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@chestnutlabs/gcode-renderer-three": minor ---- - -`CaptureOptions` gains `includeBuildVolume?: boolean` (default `true`). Set it to `false` to exclude -the whole build-volume group (grid + bed surface + origin + cage) from the off-screen capture render -only — so `capture({ background: 'transparent', includeBuildVolume: false })` produces a clean -toolpath-only cutout, matching `ModelRenderer` thumbnails. The live view is untouched (visibility is -restored synchronously, no intermediate frame is painted). The option flows through -`GcodePreviewControls.capture` to every adapter; it is a no-op where there is no build volume -(`ModelViewer`) or no capture (the 2D renderer). diff --git a/.changeset/consumer-ux-parity-dark-capabilities.md b/.changeset/consumer-ux-parity-dark-capabilities.md deleted file mode 100644 index 830a660c..00000000 --- a/.changeset/consumer-ux-parity-dark-capabilities.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -"@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 ---- - -Close the dark-capability gaps so no shipped capability is reachable only through the -`raw.renderer()` escape hatch, with full parity across all four framework adapters (DD-031). - -**New on the public controller (`GcodePreviewControls`), so it flows to every adapter's `controls`:** - -- `getRenderStats()` — the DD-027 render-diagnostics snapshot (backend, GPU, geometry mode, build - parallelism, timings), previously reachable only on the Three renderer. Returns `null` on the 2D - renderer (which produces no GPU/geometry diagnostics — never a fabricated stats object). -- `pickSegment(ndcX, ndcY, threshold?)` — source-mapping / segment picking, previously renderer-only. -- `isColorModeAvailable(mode)` — the honest per-file color-mode capability gate. - -**New capability-aware state (`GcodePreviewState`):** `availableColorModes`, `hasRetractions`, -`hasColorChanges` — refreshed after each parse, so a UI can offer and *explain* controls instead of -guessing (e.g. gray out feature coloring on a file with no feature roles, with a reason). - -**Adapter parity:** - -- `hiddenFeatureRoles` is now a declarative prop (Vue/React/Svelte) and a `hidden-feature-roles` - attribute (Web Component) — the declarative form of `setFeatureRoleVisible` (hide Skirt/Brim to - declutter a part). Gate it on `capabilities.featureRoles`. -- `capture()` is now a top-level method on the Vue/React/Svelte handles too, matching the Web - Component's `element.capture()`. -- Web Component: `renderer`/`adjacentLayers` gain property accessors; the package now also re-exports - `RendererMode` and `PreviewRenderer`. - -All additive — existing code keeps working unchanged; the 2D renderer honors the widened contract as -documented no-ops / honest `null`. The portable behavioral suite is extended (layer-range, color-mode -gating, diagnostics + picking reachability) and gains a controls-completeness parity guard so a -capability can no longer ship in core and silently vanish from an adapter. diff --git a/.changeset/model-viewer-adapters.md b/.changeset/model-viewer-adapters.md deleted file mode 100644 index 23ab1879..00000000 --- a/.changeset/model-viewer-adapters.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -"@chestnutlabs/gcode-model-renderer": minor -"@chestnutlabs/gcode-preview-vue": minor -"@chestnutlabs/gcode-preview-react": minor -"@chestnutlabs/gcode-preview-svelte": minor -"@chestnutlabs/gcode-preview-element": minor ---- - -Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — -the Prepare side alongside the toolpath Preview side — so consumers no longer have to drop to the -imperative `createModelViewer` engine to show a model in a framework (DD-031). - -**New framework-neutral controller** (`@chestnutlabs/gcode-model-renderer`): - -- `createModelPreviewController(options)` — the Prepare-side analogue of `gcode-preview-core`'s toolpath - controller. It wraps the existing `createModelViewer` engine unchanged and adds what a framework - binding needs: canvas-deferred construction with `bindCanvas` (rebuilding on a canvas swap and - replaying the last source), a reactive `getState()`/`onStateChange()` snapshot derived from the - engine's events (`ModelPreviewState`: `loading`/`ready`/`rendererSupported`/`objectCount`/`materials`/ - `instancedCount`/`decimationApplied`/`bounds`/`plates`/`hasPlates`/`cameraState`/`progress`/`error`), - and an op queue for calls made before the canvas binds. `ModelPreviewControls` exposes `setSource`, - `setView`, get/`setCameraState`, `setBackground`, `setInteractionQuality`, `setRenderScope`, `frame`, - `resize`, and `capture`. -- A portable model behavioral suite ships via the `@chestnutlabs/gcode-model-renderer/testing` subpath - (`runModelBehavioralSuite`) with controls/state completeness parity guards. - -**New `/model` adapter subpath on every framework** — thin shells over the one controller, mirroring -each framework's toolpath idiom: - -- `@chestnutlabs/gcode-preview-react/model` — `useModelViewer` hook + `` component. -- `@chestnutlabs/gcode-preview-vue/model` — `useModelViewer` composable + `` component. -- `@chestnutlabs/gcode-preview-svelte/model` — `createModelViewer` store/action + the raw - `@chestnutlabs/gcode-preview-svelte/model/ModelViewer.svelte` component. -- `@chestnutlabs/gcode-preview-element/model` (+ `/model/define`) — the `` custom - element (tag chosen to avoid the reserved ``). - -All additive — the toolpath surface is unchanged, and toolpath-only consumers don't pull the model -renderer (it lives behind the opt-in `/model` subpath). Every adapter passes the portable model -behavioral suite; each package gains `@chestnutlabs/gcode-model-renderer` as a dependency. diff --git a/README.md b/README.md index 475b215f..f419091d 100644 --- a/README.md +++ b/README.md @@ -452,7 +452,7 @@ row inspects the *toolpath*, the bottom row presents the *source model* (see Design rationale, boundaries, and the accepted architecture live in [`docs/design/`](docs/design); the [docs index](docs/README.md) maps the whole set. Fourteen -packages publish to npm in lockstep (currently **v0.19.0**) with npm provenance. +packages publish to npm in lockstep (currently **v0.20.0**) with npm provenance. ## Development diff --git a/RELEASE_REVIEW.md b/RELEASE_REVIEW.md index 4173b390..b53c1d25 100644 --- a/RELEASE_REVIEW.md +++ b/RELEASE_REVIEW.md @@ -12,10 +12,10 @@ parses them literally. Delete rows only for packages that did not change. --> -# Release review — v0.19.0 +# Release review — v0.20.0 -**Review version:** v0.19.0 -**Changed-capability inventory diffed against:** `v0.18.0` +**Review version:** v0.20.0 +**Changed-capability inventory diffed against:** `v0.19.0` This artifact records the per-release **Public Product + Documentation + Visual** reconciliation: before the `dev` -> `main` promotion, compare the changed capabilities below against the README, @@ -28,9 +28,13 @@ each disposition. Guidance: CLAUDE.md "Public-docs completion check" and | Package | Changed src files | Changelog summary | Disposition | |---|--:|---|---| -| `@chestnutlabs/gcode-preview-core` | 2 | feat(renderer): `setFeatureRoleVisible(role, visible)` — show/hide a single feature role | Status: reviewed | -| `@chestnutlabs/gcode-renderer-three` | 2 | feat(renderer): `setFeatureRoleVisible(role, visible)` — show/hide a single feature role | Status: reviewed | -| `@chestnutlabs/toolpath-core` | 1 | feat(renderer): `setFeatureRoleVisible(role, visible)` — show/hide a single feature role | Status: reviewed | +| `@chestnutlabs/gcode-model-renderer` | 4 | Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — | Status: reviewed | +| `@chestnutlabs/gcode-preview-core` | 4 | Close the dark-capability gaps so no shipped capability is reachable only through the | Status: reviewed | +| `@chestnutlabs/gcode-preview-element` | 6 | Close the dark-capability gaps so no shipped capability is reachable only through the | Status: reviewed | +| `@chestnutlabs/gcode-preview-react` | 7 | Close the dark-capability gaps so no shipped capability is reachable only through the | Status: reviewed | +| `@chestnutlabs/gcode-preview-svelte` | 6 | Close the dark-capability gaps so no shipped capability is reachable only through the | Status: reviewed | +| `@chestnutlabs/gcode-preview-vue` | 6 | Close the dark-capability gaps so no shipped capability is reachable only through the | Status: reviewed | +| `@chestnutlabs/gcode-renderer-three` | 3 | `CaptureOptions` gains `includeBuildVolume?: boolean` (default `true`). Set it to `false` to exclude | Status: reviewed | Set each **Disposition** to one of `Status: reviewed` / `Status: no-change-needed` / `Status: not-applicable` (never `Status: pending`). @@ -42,3 +46,27 @@ Set each **Disposition** to one of `Status: reviewed` / `Status: no-change-neede - **Visual review:** resolved — every changed user-facing capability is visually documented, or the coverage matrix records why not. _Resolve each marker above by replacing `pending` with `resolved` once reconciled._ + +## Reconciliation notes (v0.20.0) + +All seven changed packages are the DD-031 consumer-UX / framework-parity pass, reconciled together: + +- **Product:** the whole point of this release is consumer-facing surface. `docs/README.md` + "Current state" leads with v0.20.0; the two-viewer (Preview + Prepare) story is accurate. The root + README and Pages homepage remain accurate (they describe the toolpath viewer + source-model + rendering; the new framework model adapters are additive API documented in the canonical adapter + docs). No existing product copy misrepresents the shipped software. +- **Docs:** `docs/manual/adapters.md` gained "Two viewers: Preview and Prepare" + a per-framework + import table; all four adapter READMEs gained a "Model viewing (Prepare side)" section; the + `gcode-model-renderer` README documents `createModelPreviewController` + the `/testing` suite; + `CLAUDE.md`'s parity check now covers both viewer surfaces. `npm run docs:links` passes. +- **Visual:** the interactive model viewer is now demonstrated in the Feature Lab + all four + showcases (Preview/Prepare toggle) and a minimal model page per framework; the coverage matrix + (`docs/VISUAL_FEATURE_COVERAGE.md` §6/§10) records this. Dark **app-UI** screenshots of Prepare + mode were captured for review but are **not yet canonical `docs/media`** — the manifest harness + emits the mid-grey capability presentation, not app chrome; that gap is explicitly recorded and + carried to the next Visual Review. No shipped capability's existing media is now stale. +- **Framework parity:** every new controller/model capability is exposed across Vue, React, Svelte, + and the Web Component (declaratively where it belongs; the `` tag and the + `/model` subpath are documented intentional differences), exercised by the portable behavioral + suites with controls/state completeness parity guards for both the toolpath and model surfaces. diff --git a/docs/README.md b/docs/README.md index 06b6a840..ae3fd213 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,7 +39,7 @@ See also [`../PROJECT_SETUP.md`](../PROJECT_SETUP.md) for the local environment Provenance of inherited vs. Chestnut code, the exact founding baseline, and the branch mapping are tracked in [`UPSTREAM_PROVENANCE.md`](UPSTREAM_PROVENANCE.md). -## Current state (updated 2026-08-28 — **v0.19.0 shipped to npm** (14 lockstep pkgs): a new **`setFeatureRoleVisible(role, visible)`** on the toolpath renderer and the shared controls hides or shows a single **feature role** — e.g. hide brim/skirt to declutter a part preview, or isolate support — by collapsing those per-segment moves to GPU-discarded geometry and restoring them byte-for-byte; it's extrude-only, capability-gated (`featureRoles: 'known'`), and **byte-identical when unused**. Shipped alongside a **public-product + documentation pass**: GitHub Pages is now a visual product manual — a product-first homepage, a comprehensive **feature gallery** with real screenshots plus scrub/build-up **animations**, and screenshots across the concept pages — backed by a maintained **Visual Feature Coverage Matrix** ([`VISUAL_FEATURE_COVERAGE.md`](VISUAL_FEATURE_COVERAGE.md)), a canonical mid-grey documentation-capture look, and an **enforced per-release Public Product + Docs + Visual review** (`RELEASE_REVIEW.md`) that blocks the `dev → main` promotion until every changed capability is reconciled. Prior: **v0.18.0** (14 lockstep pkgs): the parser now executes the full **RS274NGC programming layer** that CAM / LinuxCNC output uses to *generate* geometry — numbered/named/global **parameters**, bracket **expressions** (degree trig + the full operator set), **O-word control flow** (`if`/`elseif`/`else`, `while`/`do`/`repeat`, `break`/`continue`), and in-file **subroutines** (`sub`/`call`/`return` with recursion-safe LinuxCNC scoping) — so a bolt circle written as a `while` loop, or a feature factored into a called sub, resolves to the real toolpath instead of rendering empty; all bounded (`maxProgramIterations` / `maxCallDepth` — a hostile program wastes only bounded CPU), honesty-tiered (`parametricProgram` `known` / `approximated`), and **byte-identical** for FDM / non-parametric input ([DD-017](design/DD-017-rs274ngc-parametric-programs.md), phases 1–3). Plus a generic **renderer/viewer interoperability** batch ([DD-030](design/DD-030-renderer-viewer-interop.md)): interactive **`capture()` → `Blob`** (render-to-target — user-selected thumbnails, large-file fallback, screenshots) on the controls (all four adapters inherit it) and the model viewer; **per-plate render scope** so a single-plate variant of a multi-plate project renders and frames just *that* plate (`renderModelStill({ renderScope })` + `ModelViewer.setRenderScope()`); and **non-rectangular build beds** (`BuildVolumeDef.shape` — delta / round / polygon, with the floor grid clipped to the true outline). Prior: **v0.17.0** — `frameContent: 'object'` now frames the **printed model** — a non-model classifier excludes slicer housekeeping (skirt, brim, raft, prime/wipe tower, purge) by object membership when the file carries it, else by feature role, producing a new additive `modelBounds` and a `nonModelClassification` confidence (`known` / `inferred` / `unavailable`); the framing precedence is `modelBounds → objectBounds → bounds`, so a Bambu wipe tower at the plate edge no longer inflates the frame — validated on a real 6.5 M-segment four-colour plate ([DD-026](design/DD-026-non-model-geometry-classification-and-object-framing.md) T2), and the OrcaSlicer/Bambu adapter now reads `FLUSH_START/END` and `WIPE_TOWER_START/END` brackets into first-class `Purge` / `WipeTower` roles. `renderStill` gains **`tubeByteBudget`** so a deployment with RAM to spare can retain full tubes on a large plate instead of silently falling to lines behind the conservative default — a separate axis from the parallel build's `geometryMemoryBudgetBytes` (CPU→build speed vs RAM→tubes-retained). And a geometry-worker-pool failure now degrades to a **serial main-thread tube build** — never an unhandled rejection or a silent drop to lines — so the [DD-028](design/DD-028-parallel-geometry-worker-pool.md) pool is safe to enable in headless bundlers that cannot construct the worker URL. Prior: **v0.16.0** — heavy toolpaths now build their tube geometry **off the main thread** on a capability-sized, memory-bounded worker pool — byte-identical to the serial build and degrading to continuous lines (never chopped) if a worker fails ([DD-028](design/DD-028-parallel-geometry-worker-pool.md)); the viewer prepares the **complete** geometry and reveals it **once** via `progressivePreview: 'auto' | 'lines' | 'hold' | 'off'` (`'hold'` reveals only the final, correctly-coloured build — no low-quality preview, no segment-dropping), backed by a staged `stage` event that carries a real building-geometry `%` ([DD-029](design/DD-029-preparation-and-reveal.md)); a new **render-diagnostics** surface — `getRenderStats()` plus a `renderStats` event — reports whether WebGL is running on **hardware or software**, the GPU renderer, geometry mode, segment/vertex counts, draw calls, and timings, with honest `null`s rather than guesses ([DD-027](design/DD-027-render-diagnostics.md)); and the slicer adapters now capture real **object labels and feature roles** from OrcaSlicer, PrusaSlicer, ideaMaker, and Simplify3D, with first-class non-model **FeatureRoles** — PrimeTower, WipeTower, Raft, Purge ([DD-026](design/DD-026-non-model-geometry-classification-and-object-framing.md) T1/T2). Prior: **v0.15.0** — a **`progressivePreview`** curtain (`'lines'` default / `'hold'` / `'off'`) over the during-parse preview, across the toolpath renderer, core controller, and all four adapters ([#373](https://github.com/ChestnutLabs/gcode-preview/pull/373)). `'hold'` keeps the progress signal (drive a `%` bar from `parse-progress`) but reveals **only the final, correctly-coloured, policy-quality build** — replacing the neutral-then-recolour "double render" on streamed files with a single clean reveal; `'off'` suppresses the built-in preview for a consumer-driven loading treatment; `'lines'` (the default) preserves today's streaming line preview. Orthogonal to `quality`/`qualityMode` — the revealed representation is always the policy-correct one, never a silent large-file lines fallback. Prior: **v0.14.0** — a **`qualityMode`** fidelity policy (Full / Adaptive / Fast) across the toolpath renderer, core controller, and all four adapters ([DD-023](design/DD-023-capability-aware-render-budget.md) §4 D6, Phase B) — `'full'` renders the COMPLETE representation (no every-Nth decimation, full-radial continuous tubes, no budget→lines fallback); `'adaptive'` (default) is the capability-aware auto path; `'fast'` is flat lines. Plus a **continuity correction: tubes are never segment-decimated** — `autoDecimation`'s every-Nth drop was chopping tube geometry into disconnected stubs (the RR-006 continuity break via the decimation lever the v0.12.0 fix didn't cover); tube memory is now bounded ONLY by continuity-preserving radial reduction, degrading to continuous lines when even a 3-sided tube won't fit — never chopped. The honest order is full-radial tubes → lower-radial tubes → continuous lines. (Classifier-driven auto budget + the too-heavy signal land later.) Prior: **v0.13.0** (14 lockstep pkgs), a farm-workload batch: render the colour/structure a source model actually carries, stop over-degrading normal large plates, and lay the capability-aware groundwork. **Toolpath:** the tube memory budget now counts only **extrude** segments (not travel/wipe), so a heavy-travel plate (800+ parts) renders as continuous tubes instead of dropping to lines; a new **`filament` colour mode** renders a toolpath in the file's OWN filament colours (resolved from parse metadata before the first build — no neutral-then-recolour flash on raw `.gcode`). **Source model** ([`gcode-model-renderer`](../packages/gcode-model-renderer)): **multi-plate structure** ([DD-025](design/DD-025-multi-plate-model-structure.md) Phase A — `ModelScene.plates` + placement-level `plateIds` + `capabilities.plates`, declared-only), **Bambu/Orca per-object extruder colours** (a `.3mf` coloured via the project convention renders in colour, not neutral), and **staged loading progress** ([DD-024](design/DD-024-staged-loading-progress.md) Phase A — typed, consumer-neutral, generation-scoped, never a faked %). **Capability groundwork** ([DD-023](design/DD-023-capability-aware-render-budget.md) Phase A): a shared fail-safe WebGL hw/sw classifier + `QualityPolicy`/`CapabilityHint` types (no behaviour change yet; capability-aware budgets + `qualityMode` land later). Prior: **v0.12.0** — fixes the two regressions surfaced against v0.11.0 and promotes the tube memory bound to an honest control. **Tube rendering** ([RR-006](research/RR-006-tube-mesh-memory-and-large-file-budget.md) correction) now bounds memory by **coarsening the cross-section** (fewer radial sides) at full segment continuity — replacing the v0.10.0 drop-every-Nth-segment budget that shredded tubes into spiky capped stubs; new public `tubeByteBudget` option, `tubeSegmentBudget` deprecated, lines fallback only when even a 3-sided tube can't fit. **Model estimate** now counts **unique** master triangles, not baked-per-placement, so a full-sheet instanced `.3mf` plate (~40 reused copies) parses/renders at default limits instead of falsely rejecting as "too large" (instance bomb still guarded by `maxInstances`). Prior: **v0.11.0** — **instance-aware source-model rendering** ([DD-022](design/DD-022-model-instancing-and-lod.md), Phases 0–1) — a full-sheet `.3mf` that reuses a master mesh via production-extension components / repeated build items now renders each master **once** via GPU instancing (three `InstancedMesh`) instead of baking a copy per placement, so memory scales with unique geometry not copy count (a ~40× instanced plate that used to exceed the triangle limit now renders); plus a **sub-second byte-estimate fast-reject** for genuinely oversize / instance-bomb files, and `instancedCount` + `decimationApplied` disclosure on the model `ready`/still result. **v0.10.0** added a **tube-mesh memory budget** so large forced-`tubes` renders (≈1.6 M+ segments) no longer OOM a 2 GB render worker — tubes decimate to a `TUBE_SEGMENT_BUDGET`, disclosed via `decimationApplied` (also on `RenderStillResult`), layer boundaries preserved ([RR-006](research/RR-006-tube-mesh-memory-and-large-file-budget.md)); plus a fix so `frameContent:'object'` frames the printed object on AnycubicSlicerNext and every object-labeling file (`objectBounds` is refreshed after dialect annotation). **v0.9.0** shipped the **interactive source-model viewer** `createModelViewer` in `@chestnutlabs/gcode-model-renderer` — the live orbit/zoom/pan analogue of `renderModelStill` for an STL or 3MF, over a shared interactive "stage" extracted in `gcode-renderer-three`, with an open-`kind` model-source loader registry (STL/3MF now, OBJ/STEP/PLY later without an API change), capability-honest color pass-through, and a `renderer-unsupported` fallback ([DD-021](design/DD-021-interactive-model-viewer.md)). v0.8.1 added production Bambu/Orca 3MF `paint_color` multicolor decode ([RR-005](research/RR-005-3mf-paint-color-facet-format.md)) so a designer's painted model renders in its true colors without slicing, plus a filament-slot dedup fix. v0.7.0 shipped the presentation package `@chestnutlabs/gcode-model-renderer` (headless `renderModelStill`, STL + 3MF multi-object/material, [DD-018](design/DD-018-model-renderer.md)), the 3MF Production-Extension (`p:path`) reader, and a toolpath-renderer batch — slice metadata on `ready`, structured multi-plate metadata, independent build-volume cage, frame-to-content, interaction-aware render quality ([DD-020](design/DD-020-interaction-aware-quality.md)), and a `renderStill` background option. v0.5.x added camera preset-views + serializable `CameraState`, zoom-to-cursor, keyboard-a11y, `capabilities`/`warnings` on `ready`, and the Vue/Svelte adapter mount-prop fixes (epics #279/#296/#306/DD-021). DD-017 RS274NGC parametric programs proposed, unbuilt) +## Current state (updated 2026-08-30 — **v0.20.0 shipped to npm** (14 lockstep pkgs): interactive **source-model viewing** (STL / 3MF) becomes a first-class, declarative half of the SDK — the Prepare side alongside the toolpath Preview side. A framework-neutral **`createModelPreviewController`** (wrapping the existing `createModelViewer` engine unchanged) plus a **``** adapter on each framework's **`/model`** subpath — `@chestnutlabs/gcode-preview-{react,vue,svelte,element}/model` (the Web Component ships as ``) — give the source model the same declarative parity as the toolpath component: lifecycle, props/options, events, capability exposure (the honest `materials` colour tier + object/instance counts), cleanup and error handling, all locked by a portable model behavioral suite with its own controls/state parity guard ([DD-031](design/DD-031-consumer-ux-and-framework-parity.md)). Shipped with the **dark-capability closure** across all four toolpath adapters so no shipped capability is reachable only through the raw-renderer escape hatch — `getRenderStats()` render diagnostics, `pickSegment()` source-mapping, `isColorModeAvailable()`, declarative `hiddenFeatureRoles`, and handle-level `capture()` — plus `capture({ includeBuildVolume: false })` for grid-free toolpath cutouts. The demo is rebuilt as a viewport-first **Feature Lab** and every framework ships **two-tier examples** (a minimal getting-started page + a full capability-aware showcase, with a Preview/Prepare toggle) on the real published adapters. Prior: **v0.19.0** (14 lockstep pkgs): a new **`setFeatureRoleVisible(role, visible)`** on the toolpath renderer and the shared controls hides or shows a single **feature role** — e.g. hide brim/skirt to declutter a part preview, or isolate support — by collapsing those per-segment moves to GPU-discarded geometry and restoring them byte-for-byte; it's extrude-only, capability-gated (`featureRoles: 'known'`), and **byte-identical when unused**. Shipped alongside a **public-product + documentation pass**: GitHub Pages is now a visual product manual — a product-first homepage, a comprehensive **feature gallery** with real screenshots plus scrub/build-up **animations**, and screenshots across the concept pages — backed by a maintained **Visual Feature Coverage Matrix** ([`VISUAL_FEATURE_COVERAGE.md`](VISUAL_FEATURE_COVERAGE.md)), a canonical mid-grey documentation-capture look, and an **enforced per-release Public Product + Docs + Visual review** (`RELEASE_REVIEW.md`) that blocks the `dev → main` promotion until every changed capability is reconciled. Prior: **v0.18.0** (14 lockstep pkgs): the parser now executes the full **RS274NGC programming layer** that CAM / LinuxCNC output uses to *generate* geometry — numbered/named/global **parameters**, bracket **expressions** (degree trig + the full operator set), **O-word control flow** (`if`/`elseif`/`else`, `while`/`do`/`repeat`, `break`/`continue`), and in-file **subroutines** (`sub`/`call`/`return` with recursion-safe LinuxCNC scoping) — so a bolt circle written as a `while` loop, or a feature factored into a called sub, resolves to the real toolpath instead of rendering empty; all bounded (`maxProgramIterations` / `maxCallDepth` — a hostile program wastes only bounded CPU), honesty-tiered (`parametricProgram` `known` / `approximated`), and **byte-identical** for FDM / non-parametric input ([DD-017](design/DD-017-rs274ngc-parametric-programs.md), phases 1–3). Plus a generic **renderer/viewer interoperability** batch ([DD-030](design/DD-030-renderer-viewer-interop.md)): interactive **`capture()` → `Blob`** (render-to-target — user-selected thumbnails, large-file fallback, screenshots) on the controls (all four adapters inherit it) and the model viewer; **per-plate render scope** so a single-plate variant of a multi-plate project renders and frames just *that* plate (`renderModelStill({ renderScope })` + `ModelViewer.setRenderScope()`); and **non-rectangular build beds** (`BuildVolumeDef.shape` — delta / round / polygon, with the floor grid clipped to the true outline). Prior: **v0.17.0** — `frameContent: 'object'` now frames the **printed model** — a non-model classifier excludes slicer housekeeping (skirt, brim, raft, prime/wipe tower, purge) by object membership when the file carries it, else by feature role, producing a new additive `modelBounds` and a `nonModelClassification` confidence (`known` / `inferred` / `unavailable`); the framing precedence is `modelBounds → objectBounds → bounds`, so a Bambu wipe tower at the plate edge no longer inflates the frame — validated on a real 6.5 M-segment four-colour plate ([DD-026](design/DD-026-non-model-geometry-classification-and-object-framing.md) T2), and the OrcaSlicer/Bambu adapter now reads `FLUSH_START/END` and `WIPE_TOWER_START/END` brackets into first-class `Purge` / `WipeTower` roles. `renderStill` gains **`tubeByteBudget`** so a deployment with RAM to spare can retain full tubes on a large plate instead of silently falling to lines behind the conservative default — a separate axis from the parallel build's `geometryMemoryBudgetBytes` (CPU→build speed vs RAM→tubes-retained). And a geometry-worker-pool failure now degrades to a **serial main-thread tube build** — never an unhandled rejection or a silent drop to lines — so the [DD-028](design/DD-028-parallel-geometry-worker-pool.md) pool is safe to enable in headless bundlers that cannot construct the worker URL. Prior: **v0.16.0** — heavy toolpaths now build their tube geometry **off the main thread** on a capability-sized, memory-bounded worker pool — byte-identical to the serial build and degrading to continuous lines (never chopped) if a worker fails ([DD-028](design/DD-028-parallel-geometry-worker-pool.md)); the viewer prepares the **complete** geometry and reveals it **once** via `progressivePreview: 'auto' | 'lines' | 'hold' | 'off'` (`'hold'` reveals only the final, correctly-coloured build — no low-quality preview, no segment-dropping), backed by a staged `stage` event that carries a real building-geometry `%` ([DD-029](design/DD-029-preparation-and-reveal.md)); a new **render-diagnostics** surface — `getRenderStats()` plus a `renderStats` event — reports whether WebGL is running on **hardware or software**, the GPU renderer, geometry mode, segment/vertex counts, draw calls, and timings, with honest `null`s rather than guesses ([DD-027](design/DD-027-render-diagnostics.md)); and the slicer adapters now capture real **object labels and feature roles** from OrcaSlicer, PrusaSlicer, ideaMaker, and Simplify3D, with first-class non-model **FeatureRoles** — PrimeTower, WipeTower, Raft, Purge ([DD-026](design/DD-026-non-model-geometry-classification-and-object-framing.md) T1/T2). Prior: **v0.15.0** — a **`progressivePreview`** curtain (`'lines'` default / `'hold'` / `'off'`) over the during-parse preview, across the toolpath renderer, core controller, and all four adapters ([#373](https://github.com/ChestnutLabs/gcode-preview/pull/373)). `'hold'` keeps the progress signal (drive a `%` bar from `parse-progress`) but reveals **only the final, correctly-coloured, policy-quality build** — replacing the neutral-then-recolour "double render" on streamed files with a single clean reveal; `'off'` suppresses the built-in preview for a consumer-driven loading treatment; `'lines'` (the default) preserves today's streaming line preview. Orthogonal to `quality`/`qualityMode` — the revealed representation is always the policy-correct one, never a silent large-file lines fallback. Prior: **v0.14.0** — a **`qualityMode`** fidelity policy (Full / Adaptive / Fast) across the toolpath renderer, core controller, and all four adapters ([DD-023](design/DD-023-capability-aware-render-budget.md) §4 D6, Phase B) — `'full'` renders the COMPLETE representation (no every-Nth decimation, full-radial continuous tubes, no budget→lines fallback); `'adaptive'` (default) is the capability-aware auto path; `'fast'` is flat lines. Plus a **continuity correction: tubes are never segment-decimated** — `autoDecimation`'s every-Nth drop was chopping tube geometry into disconnected stubs (the RR-006 continuity break via the decimation lever the v0.12.0 fix didn't cover); tube memory is now bounded ONLY by continuity-preserving radial reduction, degrading to continuous lines when even a 3-sided tube won't fit — never chopped. The honest order is full-radial tubes → lower-radial tubes → continuous lines. (Classifier-driven auto budget + the too-heavy signal land later.) Prior: **v0.13.0** (14 lockstep pkgs), a farm-workload batch: render the colour/structure a source model actually carries, stop over-degrading normal large plates, and lay the capability-aware groundwork. **Toolpath:** the tube memory budget now counts only **extrude** segments (not travel/wipe), so a heavy-travel plate (800+ parts) renders as continuous tubes instead of dropping to lines; a new **`filament` colour mode** renders a toolpath in the file's OWN filament colours (resolved from parse metadata before the first build — no neutral-then-recolour flash on raw `.gcode`). **Source model** ([`gcode-model-renderer`](../packages/gcode-model-renderer)): **multi-plate structure** ([DD-025](design/DD-025-multi-plate-model-structure.md) Phase A — `ModelScene.plates` + placement-level `plateIds` + `capabilities.plates`, declared-only), **Bambu/Orca per-object extruder colours** (a `.3mf` coloured via the project convention renders in colour, not neutral), and **staged loading progress** ([DD-024](design/DD-024-staged-loading-progress.md) Phase A — typed, consumer-neutral, generation-scoped, never a faked %). **Capability groundwork** ([DD-023](design/DD-023-capability-aware-render-budget.md) Phase A): a shared fail-safe WebGL hw/sw classifier + `QualityPolicy`/`CapabilityHint` types (no behaviour change yet; capability-aware budgets + `qualityMode` land later). Prior: **v0.12.0** — fixes the two regressions surfaced against v0.11.0 and promotes the tube memory bound to an honest control. **Tube rendering** ([RR-006](research/RR-006-tube-mesh-memory-and-large-file-budget.md) correction) now bounds memory by **coarsening the cross-section** (fewer radial sides) at full segment continuity — replacing the v0.10.0 drop-every-Nth-segment budget that shredded tubes into spiky capped stubs; new public `tubeByteBudget` option, `tubeSegmentBudget` deprecated, lines fallback only when even a 3-sided tube can't fit. **Model estimate** now counts **unique** master triangles, not baked-per-placement, so a full-sheet instanced `.3mf` plate (~40 reused copies) parses/renders at default limits instead of falsely rejecting as "too large" (instance bomb still guarded by `maxInstances`). Prior: **v0.11.0** — **instance-aware source-model rendering** ([DD-022](design/DD-022-model-instancing-and-lod.md), Phases 0–1) — a full-sheet `.3mf` that reuses a master mesh via production-extension components / repeated build items now renders each master **once** via GPU instancing (three `InstancedMesh`) instead of baking a copy per placement, so memory scales with unique geometry not copy count (a ~40× instanced plate that used to exceed the triangle limit now renders); plus a **sub-second byte-estimate fast-reject** for genuinely oversize / instance-bomb files, and `instancedCount` + `decimationApplied` disclosure on the model `ready`/still result. **v0.10.0** added a **tube-mesh memory budget** so large forced-`tubes` renders (≈1.6 M+ segments) no longer OOM a 2 GB render worker — tubes decimate to a `TUBE_SEGMENT_BUDGET`, disclosed via `decimationApplied` (also on `RenderStillResult`), layer boundaries preserved ([RR-006](research/RR-006-tube-mesh-memory-and-large-file-budget.md)); plus a fix so `frameContent:'object'` frames the printed object on AnycubicSlicerNext and every object-labeling file (`objectBounds` is refreshed after dialect annotation). **v0.9.0** shipped the **interactive source-model viewer** `createModelViewer` in `@chestnutlabs/gcode-model-renderer` — the live orbit/zoom/pan analogue of `renderModelStill` for an STL or 3MF, over a shared interactive "stage" extracted in `gcode-renderer-three`, with an open-`kind` model-source loader registry (STL/3MF now, OBJ/STEP/PLY later without an API change), capability-honest color pass-through, and a `renderer-unsupported` fallback ([DD-021](design/DD-021-interactive-model-viewer.md)). v0.8.1 added production Bambu/Orca 3MF `paint_color` multicolor decode ([RR-005](research/RR-005-3mf-paint-color-facet-format.md)) so a designer's painted model renders in its true colors without slicing, plus a filament-slot dedup fix. v0.7.0 shipped the presentation package `@chestnutlabs/gcode-model-renderer` (headless `renderModelStill`, STL + 3MF multi-object/material, [DD-018](design/DD-018-model-renderer.md)), the 3MF Production-Extension (`p:path`) reader, and a toolpath-renderer batch — slice metadata on `ready`, structured multi-plate metadata, independent build-volume cage, frame-to-content, interaction-aware render quality ([DD-020](design/DD-020-interaction-aware-quality.md)), and a `renderStill` background option. v0.5.x added camera preset-views + serializable `CameraState`, zoom-to-cursor, keyboard-a11y, `capabilities`/`warnings` on `ready`, and the Vue/Svelte adapter mount-prop fixes (epics #279/#296/#306/DD-021). DD-017 RS274NGC parametric programs proposed, unbuilt) | Epic | Status | Gate | |---|---|---| @@ -67,7 +67,7 @@ golden/native fixtures + manifest with CI validation, boundary lint, license CI consumer smoke harnesses, plus the five framework adapters (`gcode-preview-core`/`-vue`/`-react`/ `-svelte`/`-element`) and the presentation renderer (`gcode-model-renderer`). CI (`build`) is a required check on `main`/`dev`. **All fourteen `@chestnutlabs/*` packages are published to npm at -`v0.19.0`** (lockstep, npm provenance); `main` is the release branch, publishing from tagged GitHub +`v0.20.0`** (lockstep, npm provenance); `main` is the release branch, publishing from tagged GitHub Releases (`v0.1.0` E7/DD-008, `v0.2.0` E9/DD-009, `v0.3.0` E8/#188, `v0.4.0` #189 non-extrusion, `v0.5.x` hardening #279, `v0.6.0`/`v0.7.0` ModelRenderer + toolpath batch #296/#306, `v0.8.1` 3MF `paint_color` multicolor decode, `v0.9.0` interactive `createModelViewer` #296/DD-021, `v0.10.0` @@ -80,5 +80,10 @@ programming layer — parameters/expressions/O-word control flow/subroutines DD- renderer/viewer interop — interactive `capture()`, per-plate render scope, non-rectangular build beds DD-030; `v0.19.0` `setFeatureRoleVisible` per-feature-role hide/show (hide brim/skirt) + the public-product/docs pass — visual Pages homepage + feature gallery + scrub/build-up animations, -Visual Feature Coverage Matrix, and the enforced per-release Product/Docs/Visual review gate). +Visual Feature Coverage Matrix, and the enforced per-release Product/Docs/Visual review gate; +`v0.20.0` source-model viewing as a first-class declarative half of the SDK — `createModelPreviewController` ++ `` on each framework's `/model` subpath (`` for the Web Component), +the toolpath dark-capability closure (`getRenderStats`/`pickSegment`/`isColorModeAvailable`/declarative +`hiddenFeatureRoles`/handle `capture`) + `capture({ includeBuildVolume })`, the Feature Lab demo, and +two-tier framework examples DD-031). Changesets accumulate on `dev` for the next release. diff --git a/docs/manual/index.md b/docs/manual/index.md index df3ec600..73107ad0 100644 --- a/docs/manual/index.md +++ b/docs/manual/index.md @@ -107,6 +107,6 @@ viewer is reachable without switching APIs. [Parametric programs (RS274NGC)](concept-parametric-programs.md). - **API reference** — pick a package in the sidebar (`toolpath-core`, `gcode-parser`, …). -> **Status:** published — all fourteen `@chestnutlabs/*` packages are on npm (latest `v0.19.0`, +> **Status:** published — all fourteen `@chestnutlabs/*` packages are on npm (latest `v0.20.0`, > lockstep-versioned with provenance). Governance and epic status live in the > [repository docs](https://github.com/ChestnutLabs/gcode-preview/tree/dev/docs). diff --git a/package-lock.json b/package-lock.json index 0b076d7d..b7fca061 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7389,11 +7389,11 @@ }, "packages/gcode-bgcode": { "name": "@chestnutlabs/gcode-bgcode", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-containers": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-containers": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7401,10 +7401,10 @@ }, "packages/gcode-colors": { "name": "@chestnutlabs/gcode-colors", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7412,10 +7412,10 @@ }, "packages/gcode-containers": { "name": "@chestnutlabs/gcode-containers", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7423,10 +7423,10 @@ }, "packages/gcode-dialects": { "name": "@chestnutlabs/gcode-dialects", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7434,12 +7434,12 @@ }, "packages/gcode-model-renderer": { "name": "@chestnutlabs/gcode-model-renderer", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-containers": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-containers": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "@types/three": "0.178.0" @@ -7453,13 +7453,13 @@ }, "packages/gcode-parser": { "name": "@chestnutlabs/gcode-parser", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-bgcode": "0.19.0", - "@chestnutlabs/gcode-containers": "0.19.0", - "@chestnutlabs/gcode-dialects": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-bgcode": "0.20.0", + "@chestnutlabs/gcode-containers": "0.20.0", + "@chestnutlabs/gcode-dialects": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7467,13 +7467,13 @@ }, "packages/gcode-preview-core": { "name": "@chestnutlabs/gcode-preview-core", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-renderer-2d": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-renderer-2d": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7481,13 +7481,14 @@ }, "packages/gcode-preview-element": { "name": "@chestnutlabs/gcode-preview-element", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7495,13 +7496,14 @@ }, "packages/gcode-preview-react": { "name": "@chestnutlabs/gcode-preview-react", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "@types/react": "^18.3.0", @@ -7517,13 +7519,14 @@ }, "packages/gcode-preview-svelte": { "name": "@chestnutlabs/gcode-preview-svelte", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "svelte": "^4.2.0" @@ -7537,13 +7540,14 @@ }, "packages/gcode-preview-vue": { "name": "@chestnutlabs/gcode-preview-vue", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "vue": "^3.4.0" @@ -7557,11 +7561,11 @@ }, "packages/gcode-renderer-2d": { "name": "@chestnutlabs/gcode-renderer-2d", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-colors": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-colors": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "engines": { "node": ">=22" @@ -7569,11 +7573,11 @@ }, "packages/gcode-renderer-three": { "name": "@chestnutlabs/gcode-renderer-three", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "dependencies": { - "@chestnutlabs/gcode-colors": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-colors": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "@types/three": "0.178.0" @@ -7587,7 +7591,7 @@ }, "packages/toolpath-core": { "name": "@chestnutlabs/toolpath-core", - "version": "0.19.0", + "version": "0.20.0", "license": "MIT", "engines": { "node": ">=22" diff --git a/packages/gcode-bgcode/CHANGELOG.md b/packages/gcode-bgcode/CHANGELOG.md index 1b52b049..05afa4d2 100644 --- a/packages/gcode-bgcode/CHANGELOG.md +++ b/packages/gcode-bgcode/CHANGELOG.md @@ -1,5 +1,13 @@ # @chestnutlabs/gcode-bgcode +## 0.20.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-containers@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-bgcode/package.json b/packages/gcode-bgcode/package.json index f70e47d9..ee673526 100644 --- a/packages/gcode-bgcode/package.json +++ b/packages/gcode-bgcode/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-bgcode", - "version": "0.19.0", + "version": "0.20.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.19.0", - "@chestnutlabs/gcode-containers": "0.19.0" + "@chestnutlabs/toolpath-core": "0.20.0", + "@chestnutlabs/gcode-containers": "0.20.0" } } diff --git a/packages/gcode-colors/CHANGELOG.md b/packages/gcode-colors/CHANGELOG.md index 00030f07..60aa8c78 100644 --- a/packages/gcode-colors/CHANGELOG.md +++ b/packages/gcode-colors/CHANGELOG.md @@ -1,5 +1,12 @@ # @chestnutlabs/gcode-colors +## 0.20.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-colors/package.json b/packages/gcode-colors/package.json index 7b9ad81c..6f349fc5 100644 --- a/packages/gcode-colors/package.json +++ b/packages/gcode-colors/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-colors", - "version": "0.19.0", + "version": "0.20.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.19.0" + "@chestnutlabs/toolpath-core": "0.20.0" } } diff --git a/packages/gcode-containers/CHANGELOG.md b/packages/gcode-containers/CHANGELOG.md index e09799dd..6ce5c0ad 100644 --- a/packages/gcode-containers/CHANGELOG.md +++ b/packages/gcode-containers/CHANGELOG.md @@ -1,5 +1,12 @@ # @chestnutlabs/gcode-containers +## 0.20.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-containers/package.json b/packages/gcode-containers/package.json index 354e24f3..020d7a6e 100644 --- a/packages/gcode-containers/package.json +++ b/packages/gcode-containers/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-containers", - "version": "0.19.0", + "version": "0.20.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.19.0" + "@chestnutlabs/toolpath-core": "0.20.0" } } diff --git a/packages/gcode-dialects/CHANGELOG.md b/packages/gcode-dialects/CHANGELOG.md index 52da7064..bf7af41b 100644 --- a/packages/gcode-dialects/CHANGELOG.md +++ b/packages/gcode-dialects/CHANGELOG.md @@ -1,5 +1,12 @@ # @chestnutlabs/gcode-dialects +## 0.20.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-dialects/package.json b/packages/gcode-dialects/package.json index 76c4ca94..c8973b3d 100644 --- a/packages/gcode-dialects/package.json +++ b/packages/gcode-dialects/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-dialects", - "version": "0.19.0", + "version": "0.20.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.19.0" + "@chestnutlabs/toolpath-core": "0.20.0" } } diff --git a/packages/gcode-model-renderer/CHANGELOG.md b/packages/gcode-model-renderer/CHANGELOG.md index 11a68be4..99a8a015 100644 --- a/packages/gcode-model-renderer/CHANGELOG.md +++ b/packages/gcode-model-renderer/CHANGELOG.md @@ -1,5 +1,46 @@ # @chestnutlabs/gcode-model-renderer +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — + the Prepare side alongside the toolpath Preview side — so consumers no longer have to drop to the + imperative `createModelViewer` engine to show a model in a framework (DD-031). + + **New framework-neutral controller** (`@chestnutlabs/gcode-model-renderer`): + - `createModelPreviewController(options)` — the Prepare-side analogue of `gcode-preview-core`'s toolpath + controller. It wraps the existing `createModelViewer` engine unchanged and adds what a framework + binding needs: canvas-deferred construction with `bindCanvas` (rebuilding on a canvas swap and + replaying the last source), a reactive `getState()`/`onStateChange()` snapshot derived from the + engine's events (`ModelPreviewState`: `loading`/`ready`/`rendererSupported`/`objectCount`/`materials`/ + `instancedCount`/`decimationApplied`/`bounds`/`plates`/`hasPlates`/`cameraState`/`progress`/`error`), + and an op queue for calls made before the canvas binds. `ModelPreviewControls` exposes `setSource`, + `setView`, get/`setCameraState`, `setBackground`, `setInteractionQuality`, `setRenderScope`, `frame`, + `resize`, and `capture`. + - A portable model behavioral suite ships via the `@chestnutlabs/gcode-model-renderer/testing` subpath + (`runModelBehavioralSuite`) with controls/state completeness parity guards. + + **New `/model` adapter subpath on every framework** — thin shells over the one controller, mirroring + each framework's toolpath idiom: + - `@chestnutlabs/gcode-preview-react/model` — `useModelViewer` hook + `` component. + - `@chestnutlabs/gcode-preview-vue/model` — `useModelViewer` composable + `` component. + - `@chestnutlabs/gcode-preview-svelte/model` — `createModelViewer` store/action + the raw + `@chestnutlabs/gcode-preview-svelte/model/ModelViewer.svelte` component. + - `@chestnutlabs/gcode-preview-element/model` (+ `/model/define`) — the `` custom + element (tag chosen to avoid the reserved ``). + + All additive — the toolpath surface is unchanged, and toolpath-only consumers don't pull the model + renderer (it lives behind the opt-in `/model` subpath). Every adapter passes the portable model + behavioral suite; each package gains `@chestnutlabs/gcode-model-renderer` as a dependency. + +### Patch Changes + +- Updated dependencies [[`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004)]: + - @chestnutlabs/gcode-renderer-three@0.20.0 + - @chestnutlabs/gcode-containers@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-model-renderer/package.json b/packages/gcode-model-renderer/package.json index c30e750e..b0aa9be5 100644 --- a/packages/gcode-model-renderer/package.json +++ b/packages/gcode-model-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-model-renderer", - "version": "0.19.0", + "version": "0.20.0", "description": "Three.js presentation renderer for source models (STL/3MF) — clean thumbnails/cards, distinct from toolpath inspection (DD-018).", "keywords": [ "3d-printing", @@ -55,9 +55,9 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-containers": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-containers": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "@types/three": "0.178.0" diff --git a/packages/gcode-parser/CHANGELOG.md b/packages/gcode-parser/CHANGELOG.md index 8ee8372f..c331189b 100644 --- a/packages/gcode-parser/CHANGELOG.md +++ b/packages/gcode-parser/CHANGELOG.md @@ -1,5 +1,15 @@ # @chestnutlabs/gcode-parser +## 0.20.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-bgcode@0.20.0 + - @chestnutlabs/gcode-containers@0.20.0 + - @chestnutlabs/gcode-dialects@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-parser/package.json b/packages/gcode-parser/package.json index 43b09e3e..2bda8c7d 100644 --- a/packages/gcode-parser/package.json +++ b/packages/gcode-parser/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/gcode-parser", - "version": "0.19.0", + "version": "0.20.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.19.0", - "@chestnutlabs/gcode-dialects": "0.19.0", - "@chestnutlabs/gcode-containers": "0.19.0", - "@chestnutlabs/gcode-bgcode": "0.19.0" + "@chestnutlabs/toolpath-core": "0.20.0", + "@chestnutlabs/gcode-dialects": "0.20.0", + "@chestnutlabs/gcode-containers": "0.20.0", + "@chestnutlabs/gcode-bgcode": "0.20.0" } } diff --git a/packages/gcode-preview-core/CHANGELOG.md b/packages/gcode-preview-core/CHANGELOG.md index d9cc6702..259237dd 100644 --- a/packages/gcode-preview-core/CHANGELOG.md +++ b/packages/gcode-preview-core/CHANGELOG.md @@ -1,5 +1,45 @@ # @chestnutlabs/gcode-preview-core +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Close the dark-capability gaps so no shipped capability is reachable only through the + `raw.renderer()` escape hatch, with full parity across all four framework adapters (DD-031). + + **New on the public controller (`GcodePreviewControls`), so it flows to every adapter's `controls`:** + - `getRenderStats()` — the DD-027 render-diagnostics snapshot (backend, GPU, geometry mode, build + parallelism, timings), previously reachable only on the Three renderer. Returns `null` on the 2D + renderer (which produces no GPU/geometry diagnostics — never a fabricated stats object). + - `pickSegment(ndcX, ndcY, threshold?)` — source-mapping / segment picking, previously renderer-only. + - `isColorModeAvailable(mode)` — the honest per-file color-mode capability gate. + + **New capability-aware state (`GcodePreviewState`):** `availableColorModes`, `hasRetractions`, + `hasColorChanges` — refreshed after each parse, so a UI can offer and _explain_ controls instead of + guessing (e.g. gray out feature coloring on a file with no feature roles, with a reason). + + **Adapter parity:** + - `hiddenFeatureRoles` is now a declarative prop (Vue/React/Svelte) and a `hidden-feature-roles` + attribute (Web Component) — the declarative form of `setFeatureRoleVisible` (hide Skirt/Brim to + declutter a part). Gate it on `capabilities.featureRoles`. + - `capture()` is now a top-level method on the Vue/React/Svelte handles too, matching the Web + Component's `element.capture()`. + - Web Component: `renderer`/`adjacentLayers` gain property accessors; the package now also re-exports + `RendererMode` and `PreviewRenderer`. + + All additive — existing code keeps working unchanged; the 2D renderer honors the widened contract as + documented no-ops / honest `null`. The portable behavioral suite is extended (layer-range, color-mode + gating, diagnostics + picking reachability) and gains a controls-completeness parity guard so a + capability can no longer ship in core and silently vanish from an adapter. + +### Patch Changes + +- Updated dependencies [[`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004)]: + - @chestnutlabs/gcode-renderer-three@0.20.0 + - @chestnutlabs/gcode-parser@0.20.0 + - @chestnutlabs/gcode-renderer-2d@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Minor Changes diff --git a/packages/gcode-preview-core/package.json b/packages/gcode-preview-core/package.json index a11e7c62..25d148b5 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.19.0", + "version": "0.20.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.19.0", - "@chestnutlabs/gcode-renderer-2d": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-renderer-2d": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" } } diff --git a/packages/gcode-preview-element/CHANGELOG.md b/packages/gcode-preview-element/CHANGELOG.md index a8bc573d..33b01219 100644 --- a/packages/gcode-preview-element/CHANGELOG.md +++ b/packages/gcode-preview-element/CHANGELOG.md @@ -1,5 +1,76 @@ # @chestnutlabs/gcode-preview-element +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Close the dark-capability gaps so no shipped capability is reachable only through the + `raw.renderer()` escape hatch, with full parity across all four framework adapters (DD-031). + + **New on the public controller (`GcodePreviewControls`), so it flows to every adapter's `controls`:** + - `getRenderStats()` — the DD-027 render-diagnostics snapshot (backend, GPU, geometry mode, build + parallelism, timings), previously reachable only on the Three renderer. Returns `null` on the 2D + renderer (which produces no GPU/geometry diagnostics — never a fabricated stats object). + - `pickSegment(ndcX, ndcY, threshold?)` — source-mapping / segment picking, previously renderer-only. + - `isColorModeAvailable(mode)` — the honest per-file color-mode capability gate. + + **New capability-aware state (`GcodePreviewState`):** `availableColorModes`, `hasRetractions`, + `hasColorChanges` — refreshed after each parse, so a UI can offer and _explain_ controls instead of + guessing (e.g. gray out feature coloring on a file with no feature roles, with a reason). + + **Adapter parity:** + - `hiddenFeatureRoles` is now a declarative prop (Vue/React/Svelte) and a `hidden-feature-roles` + attribute (Web Component) — the declarative form of `setFeatureRoleVisible` (hide Skirt/Brim to + declutter a part). Gate it on `capabilities.featureRoles`. + - `capture()` is now a top-level method on the Vue/React/Svelte handles too, matching the Web + Component's `element.capture()`. + - Web Component: `renderer`/`adjacentLayers` gain property accessors; the package now also re-exports + `RendererMode` and `PreviewRenderer`. + + All additive — existing code keeps working unchanged; the 2D renderer honors the widened contract as + documented no-ops / honest `null`. The portable behavioral suite is extended (layer-range, color-mode + gating, diagnostics + picking reachability) and gains a controls-completeness parity guard so a + capability can no longer ship in core and silently vanish from an adapter. + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — + the Prepare side alongside the toolpath Preview side — so consumers no longer have to drop to the + imperative `createModelViewer` engine to show a model in a framework (DD-031). + + **New framework-neutral controller** (`@chestnutlabs/gcode-model-renderer`): + - `createModelPreviewController(options)` — the Prepare-side analogue of `gcode-preview-core`'s toolpath + controller. It wraps the existing `createModelViewer` engine unchanged and adds what a framework + binding needs: canvas-deferred construction with `bindCanvas` (rebuilding on a canvas swap and + replaying the last source), a reactive `getState()`/`onStateChange()` snapshot derived from the + engine's events (`ModelPreviewState`: `loading`/`ready`/`rendererSupported`/`objectCount`/`materials`/ + `instancedCount`/`decimationApplied`/`bounds`/`plates`/`hasPlates`/`cameraState`/`progress`/`error`), + and an op queue for calls made before the canvas binds. `ModelPreviewControls` exposes `setSource`, + `setView`, get/`setCameraState`, `setBackground`, `setInteractionQuality`, `setRenderScope`, `frame`, + `resize`, and `capture`. + - A portable model behavioral suite ships via the `@chestnutlabs/gcode-model-renderer/testing` subpath + (`runModelBehavioralSuite`) with controls/state completeness parity guards. + + **New `/model` adapter subpath on every framework** — thin shells over the one controller, mirroring + each framework's toolpath idiom: + - `@chestnutlabs/gcode-preview-react/model` — `useModelViewer` hook + `` component. + - `@chestnutlabs/gcode-preview-vue/model` — `useModelViewer` composable + `` component. + - `@chestnutlabs/gcode-preview-svelte/model` — `createModelViewer` store/action + the raw + `@chestnutlabs/gcode-preview-svelte/model/ModelViewer.svelte` component. + - `@chestnutlabs/gcode-preview-element/model` (+ `/model/define`) — the `` custom + element (tag chosen to avoid the reserved ``). + + All additive — the toolpath surface is unchanged, and toolpath-only consumers don't pull the model + renderer (it lives behind the opt-in `/model` subpath). Every adapter passes the portable model + behavioral suite; each package gains `@chestnutlabs/gcode-model-renderer` as a dependency. + +### Patch Changes + +- Updated dependencies [[`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004), [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a), [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb)]: + - @chestnutlabs/gcode-renderer-three@0.20.0 + - @chestnutlabs/gcode-preview-core@0.20.0 + - @chestnutlabs/gcode-model-renderer@0.20.0 + - @chestnutlabs/gcode-parser@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-preview-element/package.json b/packages/gcode-preview-element/package.json index 99c82e42..088db298 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.19.0", + "version": "0.20.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", @@ -60,10 +60,10 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-model-renderer": "0.19.0", - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" } } diff --git a/packages/gcode-preview-react/CHANGELOG.md b/packages/gcode-preview-react/CHANGELOG.md index 7b0c6ee8..4dd36628 100644 --- a/packages/gcode-preview-react/CHANGELOG.md +++ b/packages/gcode-preview-react/CHANGELOG.md @@ -1,5 +1,76 @@ # @chestnutlabs/gcode-preview-react +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Close the dark-capability gaps so no shipped capability is reachable only through the + `raw.renderer()` escape hatch, with full parity across all four framework adapters (DD-031). + + **New on the public controller (`GcodePreviewControls`), so it flows to every adapter's `controls`:** + - `getRenderStats()` — the DD-027 render-diagnostics snapshot (backend, GPU, geometry mode, build + parallelism, timings), previously reachable only on the Three renderer. Returns `null` on the 2D + renderer (which produces no GPU/geometry diagnostics — never a fabricated stats object). + - `pickSegment(ndcX, ndcY, threshold?)` — source-mapping / segment picking, previously renderer-only. + - `isColorModeAvailable(mode)` — the honest per-file color-mode capability gate. + + **New capability-aware state (`GcodePreviewState`):** `availableColorModes`, `hasRetractions`, + `hasColorChanges` — refreshed after each parse, so a UI can offer and _explain_ controls instead of + guessing (e.g. gray out feature coloring on a file with no feature roles, with a reason). + + **Adapter parity:** + - `hiddenFeatureRoles` is now a declarative prop (Vue/React/Svelte) and a `hidden-feature-roles` + attribute (Web Component) — the declarative form of `setFeatureRoleVisible` (hide Skirt/Brim to + declutter a part). Gate it on `capabilities.featureRoles`. + - `capture()` is now a top-level method on the Vue/React/Svelte handles too, matching the Web + Component's `element.capture()`. + - Web Component: `renderer`/`adjacentLayers` gain property accessors; the package now also re-exports + `RendererMode` and `PreviewRenderer`. + + All additive — existing code keeps working unchanged; the 2D renderer honors the widened contract as + documented no-ops / honest `null`. The portable behavioral suite is extended (layer-range, color-mode + gating, diagnostics + picking reachability) and gains a controls-completeness parity guard so a + capability can no longer ship in core and silently vanish from an adapter. + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — + the Prepare side alongside the toolpath Preview side — so consumers no longer have to drop to the + imperative `createModelViewer` engine to show a model in a framework (DD-031). + + **New framework-neutral controller** (`@chestnutlabs/gcode-model-renderer`): + - `createModelPreviewController(options)` — the Prepare-side analogue of `gcode-preview-core`'s toolpath + controller. It wraps the existing `createModelViewer` engine unchanged and adds what a framework + binding needs: canvas-deferred construction with `bindCanvas` (rebuilding on a canvas swap and + replaying the last source), a reactive `getState()`/`onStateChange()` snapshot derived from the + engine's events (`ModelPreviewState`: `loading`/`ready`/`rendererSupported`/`objectCount`/`materials`/ + `instancedCount`/`decimationApplied`/`bounds`/`plates`/`hasPlates`/`cameraState`/`progress`/`error`), + and an op queue for calls made before the canvas binds. `ModelPreviewControls` exposes `setSource`, + `setView`, get/`setCameraState`, `setBackground`, `setInteractionQuality`, `setRenderScope`, `frame`, + `resize`, and `capture`. + - A portable model behavioral suite ships via the `@chestnutlabs/gcode-model-renderer/testing` subpath + (`runModelBehavioralSuite`) with controls/state completeness parity guards. + + **New `/model` adapter subpath on every framework** — thin shells over the one controller, mirroring + each framework's toolpath idiom: + - `@chestnutlabs/gcode-preview-react/model` — `useModelViewer` hook + `` component. + - `@chestnutlabs/gcode-preview-vue/model` — `useModelViewer` composable + `` component. + - `@chestnutlabs/gcode-preview-svelte/model` — `createModelViewer` store/action + the raw + `@chestnutlabs/gcode-preview-svelte/model/ModelViewer.svelte` component. + - `@chestnutlabs/gcode-preview-element/model` (+ `/model/define`) — the `` custom + element (tag chosen to avoid the reserved ``). + + All additive — the toolpath surface is unchanged, and toolpath-only consumers don't pull the model + renderer (it lives behind the opt-in `/model` subpath). Every adapter passes the portable model + behavioral suite; each package gains `@chestnutlabs/gcode-model-renderer` as a dependency. + +### Patch Changes + +- Updated dependencies [[`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004), [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a), [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb)]: + - @chestnutlabs/gcode-renderer-three@0.20.0 + - @chestnutlabs/gcode-preview-core@0.20.0 + - @chestnutlabs/gcode-model-renderer@0.20.0 + - @chestnutlabs/gcode-parser@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-preview-react/package.json b/packages/gcode-preview-react/package.json index 2076e0ab..404fb03d 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.19.0", + "version": "0.20.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", @@ -53,11 +53,11 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-model-renderer": "0.19.0", - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.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 8f741945..762f68e7 100644 --- a/packages/gcode-preview-svelte/CHANGELOG.md +++ b/packages/gcode-preview-svelte/CHANGELOG.md @@ -1,5 +1,76 @@ # @chestnutlabs/gcode-preview-svelte +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Close the dark-capability gaps so no shipped capability is reachable only through the + `raw.renderer()` escape hatch, with full parity across all four framework adapters (DD-031). + + **New on the public controller (`GcodePreviewControls`), so it flows to every adapter's `controls`:** + - `getRenderStats()` — the DD-027 render-diagnostics snapshot (backend, GPU, geometry mode, build + parallelism, timings), previously reachable only on the Three renderer. Returns `null` on the 2D + renderer (which produces no GPU/geometry diagnostics — never a fabricated stats object). + - `pickSegment(ndcX, ndcY, threshold?)` — source-mapping / segment picking, previously renderer-only. + - `isColorModeAvailable(mode)` — the honest per-file color-mode capability gate. + + **New capability-aware state (`GcodePreviewState`):** `availableColorModes`, `hasRetractions`, + `hasColorChanges` — refreshed after each parse, so a UI can offer and _explain_ controls instead of + guessing (e.g. gray out feature coloring on a file with no feature roles, with a reason). + + **Adapter parity:** + - `hiddenFeatureRoles` is now a declarative prop (Vue/React/Svelte) and a `hidden-feature-roles` + attribute (Web Component) — the declarative form of `setFeatureRoleVisible` (hide Skirt/Brim to + declutter a part). Gate it on `capabilities.featureRoles`. + - `capture()` is now a top-level method on the Vue/React/Svelte handles too, matching the Web + Component's `element.capture()`. + - Web Component: `renderer`/`adjacentLayers` gain property accessors; the package now also re-exports + `RendererMode` and `PreviewRenderer`. + + All additive — existing code keeps working unchanged; the 2D renderer honors the widened contract as + documented no-ops / honest `null`. The portable behavioral suite is extended (layer-range, color-mode + gating, diagnostics + picking reachability) and gains a controls-completeness parity guard so a + capability can no longer ship in core and silently vanish from an adapter. + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — + the Prepare side alongside the toolpath Preview side — so consumers no longer have to drop to the + imperative `createModelViewer` engine to show a model in a framework (DD-031). + + **New framework-neutral controller** (`@chestnutlabs/gcode-model-renderer`): + - `createModelPreviewController(options)` — the Prepare-side analogue of `gcode-preview-core`'s toolpath + controller. It wraps the existing `createModelViewer` engine unchanged and adds what a framework + binding needs: canvas-deferred construction with `bindCanvas` (rebuilding on a canvas swap and + replaying the last source), a reactive `getState()`/`onStateChange()` snapshot derived from the + engine's events (`ModelPreviewState`: `loading`/`ready`/`rendererSupported`/`objectCount`/`materials`/ + `instancedCount`/`decimationApplied`/`bounds`/`plates`/`hasPlates`/`cameraState`/`progress`/`error`), + and an op queue for calls made before the canvas binds. `ModelPreviewControls` exposes `setSource`, + `setView`, get/`setCameraState`, `setBackground`, `setInteractionQuality`, `setRenderScope`, `frame`, + `resize`, and `capture`. + - A portable model behavioral suite ships via the `@chestnutlabs/gcode-model-renderer/testing` subpath + (`runModelBehavioralSuite`) with controls/state completeness parity guards. + + **New `/model` adapter subpath on every framework** — thin shells over the one controller, mirroring + each framework's toolpath idiom: + - `@chestnutlabs/gcode-preview-react/model` — `useModelViewer` hook + `` component. + - `@chestnutlabs/gcode-preview-vue/model` — `useModelViewer` composable + `` component. + - `@chestnutlabs/gcode-preview-svelte/model` — `createModelViewer` store/action + the raw + `@chestnutlabs/gcode-preview-svelte/model/ModelViewer.svelte` component. + - `@chestnutlabs/gcode-preview-element/model` (+ `/model/define`) — the `` custom + element (tag chosen to avoid the reserved ``). + + All additive — the toolpath surface is unchanged, and toolpath-only consumers don't pull the model + renderer (it lives behind the opt-in `/model` subpath). Every adapter passes the portable model + behavioral suite; each package gains `@chestnutlabs/gcode-model-renderer` as a dependency. + +### Patch Changes + +- Updated dependencies [[`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004), [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a), [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb)]: + - @chestnutlabs/gcode-renderer-three@0.20.0 + - @chestnutlabs/gcode-preview-core@0.20.0 + - @chestnutlabs/gcode-model-renderer@0.20.0 + - @chestnutlabs/gcode-parser@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-preview-svelte/package.json b/packages/gcode-preview-svelte/package.json index 0c62e835..8ca0c71d 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.19.0", + "version": "0.20.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", @@ -64,11 +64,11 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-model-renderer": "0.19.0", - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.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 6b4bb5c7..a19fe5f9 100644 --- a/packages/gcode-preview-vue/CHANGELOG.md +++ b/packages/gcode-preview-vue/CHANGELOG.md @@ -1,5 +1,76 @@ # @chestnutlabs/gcode-preview-vue +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Close the dark-capability gaps so no shipped capability is reachable only through the + `raw.renderer()` escape hatch, with full parity across all four framework adapters (DD-031). + + **New on the public controller (`GcodePreviewControls`), so it flows to every adapter's `controls`:** + - `getRenderStats()` — the DD-027 render-diagnostics snapshot (backend, GPU, geometry mode, build + parallelism, timings), previously reachable only on the Three renderer. Returns `null` on the 2D + renderer (which produces no GPU/geometry diagnostics — never a fabricated stats object). + - `pickSegment(ndcX, ndcY, threshold?)` — source-mapping / segment picking, previously renderer-only. + - `isColorModeAvailable(mode)` — the honest per-file color-mode capability gate. + + **New capability-aware state (`GcodePreviewState`):** `availableColorModes`, `hasRetractions`, + `hasColorChanges` — refreshed after each parse, so a UI can offer and _explain_ controls instead of + guessing (e.g. gray out feature coloring on a file with no feature roles, with a reason). + + **Adapter parity:** + - `hiddenFeatureRoles` is now a declarative prop (Vue/React/Svelte) and a `hidden-feature-roles` + attribute (Web Component) — the declarative form of `setFeatureRoleVisible` (hide Skirt/Brim to + declutter a part). Gate it on `capabilities.featureRoles`. + - `capture()` is now a top-level method on the Vue/React/Svelte handles too, matching the Web + Component's `element.capture()`. + - Web Component: `renderer`/`adjacentLayers` gain property accessors; the package now also re-exports + `RendererMode` and `PreviewRenderer`. + + All additive — existing code keeps working unchanged; the 2D renderer honors the widened contract as + documented no-ops / honest `null`. The portable behavioral suite is extended (layer-range, color-mode + gating, diagnostics + picking reachability) and gains a controls-completeness parity guard so a + capability can no longer ship in core and silently vanish from an adapter. + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - Make interactive **source-model viewing** (STL / 3MF) a first-class, declarative half of the SDK — + the Prepare side alongside the toolpath Preview side — so consumers no longer have to drop to the + imperative `createModelViewer` engine to show a model in a framework (DD-031). + + **New framework-neutral controller** (`@chestnutlabs/gcode-model-renderer`): + - `createModelPreviewController(options)` — the Prepare-side analogue of `gcode-preview-core`'s toolpath + controller. It wraps the existing `createModelViewer` engine unchanged and adds what a framework + binding needs: canvas-deferred construction with `bindCanvas` (rebuilding on a canvas swap and + replaying the last source), a reactive `getState()`/`onStateChange()` snapshot derived from the + engine's events (`ModelPreviewState`: `loading`/`ready`/`rendererSupported`/`objectCount`/`materials`/ + `instancedCount`/`decimationApplied`/`bounds`/`plates`/`hasPlates`/`cameraState`/`progress`/`error`), + and an op queue for calls made before the canvas binds. `ModelPreviewControls` exposes `setSource`, + `setView`, get/`setCameraState`, `setBackground`, `setInteractionQuality`, `setRenderScope`, `frame`, + `resize`, and `capture`. + - A portable model behavioral suite ships via the `@chestnutlabs/gcode-model-renderer/testing` subpath + (`runModelBehavioralSuite`) with controls/state completeness parity guards. + + **New `/model` adapter subpath on every framework** — thin shells over the one controller, mirroring + each framework's toolpath idiom: + - `@chestnutlabs/gcode-preview-react/model` — `useModelViewer` hook + `` component. + - `@chestnutlabs/gcode-preview-vue/model` — `useModelViewer` composable + `` component. + - `@chestnutlabs/gcode-preview-svelte/model` — `createModelViewer` store/action + the raw + `@chestnutlabs/gcode-preview-svelte/model/ModelViewer.svelte` component. + - `@chestnutlabs/gcode-preview-element/model` (+ `/model/define`) — the `` custom + element (tag chosen to avoid the reserved ``). + + All additive — the toolpath surface is unchanged, and toolpath-only consumers don't pull the model + renderer (it lives behind the opt-in `/model` subpath). Every adapter passes the portable model + behavioral suite; each package gains `@chestnutlabs/gcode-model-renderer` as a dependency. + +### Patch Changes + +- Updated dependencies [[`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004), [`8810ba4`](https://github.com/ChestnutLabs/gcode-preview/commit/8810ba43f1641362e1705e713a8afe93659f740a), [`b25ddb6`](https://github.com/ChestnutLabs/gcode-preview/commit/b25ddb68fdf4a5b12689c67f411e7d8c316086bb)]: + - @chestnutlabs/gcode-renderer-three@0.20.0 + - @chestnutlabs/gcode-preview-core@0.20.0 + - @chestnutlabs/gcode-model-renderer@0.20.0 + - @chestnutlabs/gcode-parser@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-preview-vue/package.json b/packages/gcode-preview-vue/package.json index c5ac5993..db7c6895 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.19.0", + "version": "0.20.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", @@ -54,11 +54,11 @@ "test": "vitest run" }, "dependencies": { - "@chestnutlabs/gcode-model-renderer": "0.19.0", - "@chestnutlabs/gcode-parser": "0.19.0", - "@chestnutlabs/gcode-renderer-three": "0.19.0", - "@chestnutlabs/toolpath-core": "0.19.0", - "@chestnutlabs/gcode-preview-core": "0.19.0" + "@chestnutlabs/gcode-model-renderer": "0.20.0", + "@chestnutlabs/gcode-parser": "0.20.0", + "@chestnutlabs/gcode-renderer-three": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0", + "@chestnutlabs/gcode-preview-core": "0.20.0" }, "peerDependencies": { "vue": "^3.4.0" diff --git a/packages/gcode-renderer-2d/CHANGELOG.md b/packages/gcode-renderer-2d/CHANGELOG.md index a7e04b99..8d41ec78 100644 --- a/packages/gcode-renderer-2d/CHANGELOG.md +++ b/packages/gcode-renderer-2d/CHANGELOG.md @@ -1,5 +1,13 @@ # @chestnutlabs/gcode-renderer-2d +## 0.20.0 + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-colors@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Patch Changes diff --git a/packages/gcode-renderer-2d/package.json b/packages/gcode-renderer-2d/package.json index 68f71504..a46cd15b 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.19.0", + "version": "0.20.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.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-colors": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" } } diff --git a/packages/gcode-renderer-three/CHANGELOG.md b/packages/gcode-renderer-three/CHANGELOG.md index 0ab97efb..51308574 100644 --- a/packages/gcode-renderer-three/CHANGELOG.md +++ b/packages/gcode-renderer-three/CHANGELOG.md @@ -1,5 +1,23 @@ # @chestnutlabs/gcode-renderer-three +## 0.20.0 + +### Minor Changes + +- [#427](https://github.com/ChestnutLabs/gcode-preview/pull/427) [`718d1bd`](https://github.com/ChestnutLabs/gcode-preview/commit/718d1bde45856b58c37580d629da6d177f9f2004) Thanks [@sobechestnut-dev](https://github.com/sobechestnut-dev)! - `CaptureOptions` gains `includeBuildVolume?: boolean` (default `true`). Set it to `false` to exclude + the whole build-volume group (grid + bed surface + origin + cage) from the off-screen capture render + only — so `capture({ background: 'transparent', includeBuildVolume: false })` produces a clean + toolpath-only cutout, matching `ModelRenderer` thumbnails. The live view is untouched (visibility is + restored synchronously, no intermediate frame is painted). The option flows through + `GcodePreviewControls.capture` to every adapter; it is a no-op where there is no build volume + (`ModelViewer`) or no capture (the 2D renderer). + +### Patch Changes + +- Updated dependencies []: + - @chestnutlabs/gcode-colors@0.20.0 + - @chestnutlabs/toolpath-core@0.20.0 + ## 0.19.0 ### Minor Changes diff --git a/packages/gcode-renderer-three/package.json b/packages/gcode-renderer-three/package.json index fb82ae54..60fa3394 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.19.0", + "version": "0.20.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.19.0", - "@chestnutlabs/toolpath-core": "0.19.0" + "@chestnutlabs/gcode-colors": "0.20.0", + "@chestnutlabs/toolpath-core": "0.20.0" }, "devDependencies": { "@types/three": "0.178.0" diff --git a/packages/toolpath-core/CHANGELOG.md b/packages/toolpath-core/CHANGELOG.md index 96d2df6e..f95a4c94 100644 --- a/packages/toolpath-core/CHANGELOG.md +++ b/packages/toolpath-core/CHANGELOG.md @@ -1,5 +1,7 @@ # @chestnutlabs/toolpath-core +## 0.20.0 + ## 0.19.0 ### Minor Changes diff --git a/packages/toolpath-core/package.json b/packages/toolpath-core/package.json index f36b06ae..01d15f47 100644 --- a/packages/toolpath-core/package.json +++ b/packages/toolpath-core/package.json @@ -1,6 +1,6 @@ { "name": "@chestnutlabs/toolpath-core", - "version": "0.19.0", + "version": "0.20.0", "description": "Neutral ToolpathIR and capability model for the Chestnut Labs G-code Preview toolpath stack.", "keywords": [ "gcode",