circuit-json-to-gltf 0.0.129 → 0.0.131

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +11 -5
package/dist/index.js CHANGED
@@ -16998,16 +16998,16 @@ async function convertCircuitJsonTo3D(circuitJson, options = {}) {
16998
16998
  const hasFootprinterModel = Boolean(
16999
16999
  cad.footprinter_string && !model_stl_url && !model_obj_url && !model_glb_url && !model_gltf_url && !model_jscad && !model_step_url
17000
17000
  );
17001
- if (cad.show_as_bounding_box) {
17001
+ if (cad.show_as_bounding_box && cad.pcb_component_id) {
17002
17002
  pcbComponentIdsWithBoundingBox.add(cad.pcb_component_id);
17003
17003
  }
17004
17004
  const hasModelSource = Boolean(
17005
17005
  model_stl_url || model_obj_url || model_glb_url || model_gltf_url || model_jscad || model_step_url || hasFootprinterModel
17006
17006
  );
17007
17007
  if (!hasModelSource) continue;
17008
- pcbComponentIdsWith3D.add(cad.pcb_component_id);
17009
- const pcbComponent = db.pcb_component.get(cad.pcb_component_id);
17010
- const isBottomLayer = pcbComponent?.layer === "bottom";
17008
+ if (cad.pcb_component_id) pcbComponentIdsWith3D.add(cad.pcb_component_id);
17009
+ const pcbComponent = cad.pcb_component_id ? db.pcb_component.get(cad.pcb_component_id) : void 0;
17010
+ const isBottomLayer = (cad.layer ?? pcbComponent?.layer) === "bottom";
17011
17011
  const modelScaleFactor = cad.model_unit_to_mm_scale_factor ?? 1;
17012
17012
  const size = cad.size ? convertCadSizeToSceneSize({
17013
17013
  x: cad.size.x * modelScaleFactor,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "circuit-json-to-gltf",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.129",
5
+ "version": "0.0.131",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/tscircuit/circuit-json-to-gltf.git"
@@ -23,7 +23,7 @@
23
23
  "@jscad/modeling": "^2.12.6",
24
24
  "@tscircuit/alphabet": "^0.0.25",
25
25
  "earcut": "^3.0.2",
26
- "jscad-electronics": "^0.0.159",
26
+ "jscad-electronics": "^0.0.178",
27
27
  "jscad-planner": "^0.0.14",
28
28
  "jscad-to-gltf": "^0.0.5",
29
29
  "occt-import-js": "^0.0.23"
@@ -35,14 +35,16 @@
35
35
  "@playwright/test": "^1.58.2",
36
36
  "@resvg/resvg-js": "^2.6.2",
37
37
  "@resvg/resvg-wasm": "^2.6.2",
38
- "@tscircuit/circuit-json-util": "^0.0.106",
38
+ "@tscircuit/circuit-json-util": "^0.0.114",
39
+ "@tscircuit/core": "^0.0.1955",
40
+ "@tscircuit/props": "^0.0.664",
39
41
  "@types/bun": "latest",
40
42
  "@types/earcut": "^3.0.0",
41
43
  "@types/react": "^19.1.9",
42
44
  "@types/react-dom": "^19.1.7",
43
45
  "@vitejs/plugin-react": "^5.0.0",
44
46
  "bun-match-svg": "^0.0.12",
45
- "circuit-json": "^0.0.489",
47
+ "circuit-json": "^0.0.497",
46
48
  "circuit-to-svg": "^0.0.422",
47
49
  "graphics-debug": "^0.0.96",
48
50
  "looks-same": "^9.0.1",
@@ -51,7 +53,7 @@
51
53
  "react-cosmos": "^7.0.0",
52
54
  "react-cosmos-plugin-vite": "^7.0.0",
53
55
  "react-dom": "^19.1.1",
54
- "tscircuit": "^0.0.2562",
56
+ "tscircuit": "^0.0.2611",
55
57
  "tsup": "^8.5.0",
56
58
  "vite": "^7.1.1"
57
59
  },
@@ -70,5 +72,9 @@
70
72
  "@resvg/resvg-js": {
71
73
  "optional": true
72
74
  }
75
+ },
76
+ "overrides": {
77
+ "@tscircuit/core": "^0.0.1955",
78
+ "circuit-json": "^0.0.497"
73
79
  }
74
80
  }