@tscircuit/core 0.0.2154 → 0.0.2155

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 +8 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10727,6 +10727,9 @@ var Keepout = class extends PrimitiveComponent2 {
10727
10727
  const subcircuit = this.getSubcircuit();
10728
10728
  const { db: db2 } = this.root;
10729
10729
  const { _parsedProps: props } = this;
10730
+ const pcbComponentId = this.getPrimitiveContainer()?.pcb_component_id ?? void 0;
10731
+ const pcbKeepoutOwnershipProps = pcbComponentId ? { pcb_component_id: pcbComponentId } : {};
10732
+ const pcbGroupId = this.getGroup()?.pcb_group_id ?? void 0;
10730
10733
  const position = this._getGlobalPcbPositionBeforeLayout();
10731
10734
  const decomposedMat = decomposeTSR3(
10732
10735
  this._computePcbGlobalTransformBeforeLayout()
@@ -10746,6 +10749,7 @@ var Keepout = class extends PrimitiveComponent2 {
10746
10749
  pcb_keepout = db2.pcb_keepout.insert({
10747
10750
  layers,
10748
10751
  shape: "circle",
10752
+ ...pcbKeepoutOwnershipProps,
10749
10753
  ...pcbKeepoutExclusionProps,
10750
10754
  ...props.allowTraces !== void 0 ? { allow_traces: props.allowTraces } : {},
10751
10755
  ...props.allowPlacements !== void 0 ? { allow_placements: props.allowPlacements } : {},
@@ -10757,12 +10761,13 @@ var Keepout = class extends PrimitiveComponent2 {
10757
10761
  y: position.y
10758
10762
  },
10759
10763
  subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
10760
- pcb_group_id: subcircuit?.getGroup()?.pcb_group_id ?? void 0
10764
+ pcb_group_id: pcbGroupId
10761
10765
  });
10762
10766
  } else if (props.shape === "rect") {
10763
10767
  pcb_keepout = db2.pcb_keepout.insert({
10764
10768
  layers,
10765
10769
  shape: "rect",
10770
+ ...pcbKeepoutOwnershipProps,
10766
10771
  ...pcbKeepoutExclusionProps,
10767
10772
  ...props.allowTraces !== void 0 ? { allow_traces: props.allowTraces } : {},
10768
10773
  ...props.allowPlacements !== void 0 ? { allow_placements: props.allowPlacements } : {},
@@ -10774,7 +10779,7 @@ var Keepout = class extends PrimitiveComponent2 {
10774
10779
  y: position.y
10775
10780
  },
10776
10781
  subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
10777
- pcb_group_id: subcircuit?.getGroup()?.pcb_group_id ?? void 0
10782
+ pcb_group_id: pcbGroupId
10778
10783
  });
10779
10784
  }
10780
10785
  if (pcb_keepout) {
@@ -119162,7 +119167,7 @@ var RoutingPhasePreparationError = class extends Error {
119162
119167
  var package_default = {
119163
119168
  name: "@tscircuit/core",
119164
119169
  type: "module",
119165
- version: "0.0.2153",
119170
+ version: "0.0.2154",
119166
119171
  types: "dist/index.d.ts",
119167
119172
  main: "dist/index.js",
119168
119173
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.2154",
4
+ "version": "0.0.2155",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",