@tscircuit/core 0.0.113 → 0.0.115

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 +5 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -704,7 +704,7 @@ var PrimitiveComponent = class extends Renderable {
704
704
  getAvailablePcbLayers() {
705
705
  if (this.isPcbPrimitive) {
706
706
  const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
707
- if ("layer" in this._parsedProps) {
707
+ if ("layer" in this._parsedProps || this.componentName === "SmtPad") {
708
708
  const layer = maybeFlipLayer(this._parsedProps.layer ?? "top");
709
709
  return [layer];
710
710
  }
@@ -2238,17 +2238,18 @@ var NormalComponent = class extends PrimitiveComponent {
2238
2238
  z: 0,
2239
2239
  ...typeof cadModel?.positionOffset === "object" ? cadModel.positionOffset : {}
2240
2240
  });
2241
+ const computedLayer = this.props.layer === "bottom" ? "bottom" : "top";
2241
2242
  const cad_model = db.cad_component.insert({
2242
2243
  // TODO z maybe depends on layer
2243
2244
  position: {
2244
2245
  x: bounds.center.x + positionOffset.x,
2245
2246
  y: bounds.center.y + positionOffset.y,
2246
- z: (this.props.layer === "bottom" ? -boardThickness / 2 : boardThickness / 2) + positionOffset.z
2247
+ z: (computedLayer === "bottom" ? -boardThickness / 2 : boardThickness / 2) + positionOffset.z
2247
2248
  },
2248
2249
  rotation: {
2249
2250
  x: rotationOffset.x,
2250
- y: (this.props.layer === "top" ? 0 : 180) + rotationOffset.y,
2251
- z: (pcb_component?.rotation ?? 0) + (this.props.layer === "bottom" ? 180 : 0) + rotationOffset.z
2251
+ y: (computedLayer === "top" ? 0 : 180) + rotationOffset.y,
2252
+ z: (pcb_component?.rotation ?? 0) + (computedLayer === "bottom" ? 180 : 0) + rotationOffset.z
2252
2253
  },
2253
2254
  pcb_component_id: this.pcb_component_id,
2254
2255
  source_component_id: this.source_component_id,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.113",
4
+ "version": "0.0.115",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -36,13 +36,13 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@lume/kiwi": "^0.4.3",
39
+ "@tscircuit/footprinter": "^0.0.70",
39
40
  "@tscircuit/infgrid-ijump-astar": "^0.0.21",
40
41
  "@tscircuit/math-utils": "^0.0.4",
41
42
  "@tscircuit/props": "^0.0.68",
42
43
  "@tscircuit/soup-util": "^0.0.33",
43
44
  "circuit-json": "^0.0.85",
44
45
  "circuit-json-to-connectivity-map": "^0.0.17",
45
- "@tscircuit/footprinter": "^0.0.66",
46
46
  "nanoid": "^5.0.7",
47
47
  "performance-now": "^2.1.0",
48
48
  "react": "^18.3.1",