partforge 0.106.1 → 0.107.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "partforge",
3
- "version": "0.106.1",
3
+ "version": "0.107.0",
4
4
  "description": "Turn a declarative part definition into a parametric-CAD web app (three.js + Manifold/Replicad). Requires a Vite-based consumer.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -112,7 +112,12 @@ async function scoreMatchTargets(built, targets, onProgress) {
112
112
  const { best, views } = matchViews(viewMasks, reference, scoreOpts);
113
113
  if (!best) continue; // nothing scoreable — a dropped target, never a zero score
114
114
  const { delta, ...scores } = best;
115
- out.push({ kind: target.kind, best: scores, views, delta: { view: best.view, ...delta } });
115
+ // The caller's own label for this target, echoed verbatim when it sent one.
116
+ // Opaque here: a downstream that sends several photographs needs to know
117
+ // which score is whose, and order cannot say — an unscoreable target is
118
+ // dropped above and everything after it shifts.
119
+ const id = typeof target.id === "string" ? { id: target.id } : {};
120
+ out.push({ kind: target.kind, ...id, best: scores, views, delta: { view: best.view, ...delta } });
116
121
  } catch (err) {
117
122
  onProgress(`match target skipped: ${String(err?.message || err)}`);
118
123
  }