@tscircuit/core 0.0.940 → 0.0.941

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 +19 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -16354,7 +16354,10 @@ var Panel = class extends Group6 {
16354
16354
  const absoluteY = panelGlobalPos.y + pos.y;
16355
16355
  board._repositionOnPcb({ x: absoluteX, y: absoluteY });
16356
16356
  db.pcb_board.update(board.pcb_board_id, {
16357
- center: { x: absoluteX, y: absoluteY }
16357
+ center: { x: absoluteX, y: absoluteY },
16358
+ position_mode: "relative_to_panel_anchor",
16359
+ display_offset_x: `${pos.x}mm`,
16360
+ display_offset_y: `${pos.y}mm`
16358
16361
  });
16359
16362
  }
16360
16363
  const hasExplicitWidth = this._parsedProps.width !== void 0;
@@ -16388,6 +16391,19 @@ var Panel = class extends Group6 {
16388
16391
  height: hasExplicitHeight ? distance10.parse(this._parsedProps.height) : gridHeight + edgePaddingTop + edgePaddingBottom
16389
16392
  });
16390
16393
  }
16394
+ } else {
16395
+ const panelGlobalPos = this._getGlobalPcbPositionBeforeLayout();
16396
+ for (const board of childBoardInstances) {
16397
+ const boardDb = db.pcb_board.get(board.pcb_board_id);
16398
+ if (!boardDb) continue;
16399
+ const relativeX = boardDb.center.x - panelGlobalPos.x;
16400
+ const relativeY = boardDb.center.y - panelGlobalPos.y;
16401
+ db.pcb_board.update(board.pcb_board_id, {
16402
+ position_mode: "relative_to_panel_anchor",
16403
+ display_offset_x: `${relativeX}mm`,
16404
+ display_offset_y: `${relativeY}mm`
16405
+ });
16406
+ }
16391
16407
  }
16392
16408
  if (this._tabsAndMouseBitesGenerated) return;
16393
16409
  const props = this._parsedProps;
@@ -19773,7 +19789,7 @@ import { identity as identity5 } from "transformation-matrix";
19773
19789
  var package_default = {
19774
19790
  name: "@tscircuit/core",
19775
19791
  type: "module",
19776
- version: "0.0.939",
19792
+ version: "0.0.940",
19777
19793
  types: "dist/index.d.ts",
19778
19794
  main: "dist/index.js",
19779
19795
  module: "dist/index.js",
@@ -19831,7 +19847,7 @@ var package_default = {
19831
19847
  "bun-match-svg": "0.0.12",
19832
19848
  "calculate-elbow": "^0.0.12",
19833
19849
  "chokidar-cli": "^3.0.0",
19834
- "circuit-json": "^0.0.336",
19850
+ "circuit-json": "^0.0.342",
19835
19851
  "circuit-json-to-bpc": "^0.0.13",
19836
19852
  "circuit-json-to-connectivity-map": "^0.0.23",
19837
19853
  "circuit-json-to-gltf": "^0.0.31",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.940",
4
+ "version": "0.0.941",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -59,7 +59,7 @@
59
59
  "bun-match-svg": "0.0.12",
60
60
  "calculate-elbow": "^0.0.12",
61
61
  "chokidar-cli": "^3.0.0",
62
- "circuit-json": "^0.0.336",
62
+ "circuit-json": "^0.0.342",
63
63
  "circuit-json-to-bpc": "^0.0.13",
64
64
  "circuit-json-to-connectivity-map": "^0.0.23",
65
65
  "circuit-json-to-gltf": "^0.0.31",