@tscircuit/core 0.0.974 → 0.0.975

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 +3 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9631,10 +9631,8 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
9631
9631
  const props = this._parsedProps;
9632
9632
  const hasExplicitPcbPosition = props.pcbX !== void 0 || props.pcbY !== void 0;
9633
9633
  if (!hasExplicitPcbPosition) return;
9634
- const sourceComponent = db.source_component.get(this.source_component_id);
9635
- const positionedRelativeToGroupId = sourceComponent?.source_group_id ? db.pcb_group.getWhere({
9636
- source_group_id: sourceComponent.source_group_id
9637
- })?.pcb_group_id : void 0;
9634
+ const parentGroup = this.getGroup();
9635
+ const positionedRelativeToGroupId = parentGroup?.pcb_group_id ?? void 0;
9638
9636
  const positionedRelativeToBoardId = positionedRelativeToGroupId ? void 0 : this._getBoard()?.pcb_board_id ?? void 0;
9639
9637
  db.pcb_component.update(this.pcb_component_id, {
9640
9638
  position_mode: "relative_to_group_anchor",
@@ -20900,7 +20898,7 @@ import { identity as identity5 } from "transformation-matrix";
20900
20898
  var package_default = {
20901
20899
  name: "@tscircuit/core",
20902
20900
  type: "module",
20903
- version: "0.0.973",
20901
+ version: "0.0.974",
20904
20902
  types: "dist/index.d.ts",
20905
20903
  main: "dist/index.js",
20906
20904
  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.974",
4
+ "version": "0.0.975",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",