@tscircuit/core 0.0.898 → 0.0.900

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 +21 -30
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1576,7 +1576,7 @@ var PrimitiveComponent2 = class extends Renderable {
1576
1576
  get [Symbol.toStringTag]() {
1577
1577
  return this.getString();
1578
1578
  }
1579
- [Symbol.for("nodejs.util.inspect.custom")]() {
1579
+ [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
1580
1580
  return this.getString();
1581
1581
  }
1582
1582
  };
@@ -14501,39 +14501,30 @@ var Group6 = class extends NormalComponent3 {
14501
14501
  // lib/utils/circuit-json/inflate-circuit-json.ts
14502
14502
  import { cju } from "@tscircuit/circuit-json-util";
14503
14503
 
14504
- // lib/components/primitive-components/Group/Subcircuit/inflators/inflateSourceBoard.ts
14505
- function inflateSourceBoard(sourceBoard, inflatorContext) {
14506
- const { injectionDb, subcircuit, groupsMap } = inflatorContext;
14504
+ // lib/components/primitive-components/Group/Subcircuit/inflators/inflatePcbBoard.ts
14505
+ function inflatePcbBoard(pcbBoard, inflatorContext) {
14506
+ const { subcircuit } = inflatorContext;
14507
14507
  if (subcircuit.lowercaseComponentName === "board") {
14508
14508
  return;
14509
14509
  }
14510
14510
  if (subcircuit.parent?.lowercaseComponentName === "board") {
14511
14511
  return;
14512
14512
  }
14513
- const pcbBoards = injectionDb.pcb_board.list();
14514
- const pcbBoard = pcbBoards.length > 0 ? pcbBoards[0] : null;
14515
14513
  const boardProps2 = {
14516
- name: sourceBoard.title || "inflated_board"
14514
+ name: "inflated_board"
14517
14515
  };
14518
- if (pcbBoard) {
14519
- if (pcbBoard.width) boardProps2.width = pcbBoard.width;
14520
- if (pcbBoard.height) boardProps2.height = pcbBoard.height;
14521
- if (pcbBoard.center) {
14522
- boardProps2.pcbX = pcbBoard.center.x;
14523
- boardProps2.pcbY = pcbBoard.center.y;
14524
- }
14525
- if (pcbBoard.outline) boardProps2.outline = pcbBoard.outline;
14526
- if (pcbBoard.thickness) boardProps2.thickness = pcbBoard.thickness;
14527
- if (pcbBoard.material) boardProps2.material = pcbBoard.material;
14528
- }
14516
+ if (pcbBoard.width) boardProps2.width = pcbBoard.width;
14517
+ if (pcbBoard.height) boardProps2.height = pcbBoard.height;
14518
+ if (pcbBoard.center) {
14519
+ boardProps2.pcbX = pcbBoard.center.x;
14520
+ boardProps2.pcbY = pcbBoard.center.y;
14521
+ }
14522
+ if (pcbBoard.outline) boardProps2.outline = pcbBoard.outline;
14523
+ if (pcbBoard.thickness) boardProps2.thickness = pcbBoard.thickness;
14524
+ if (pcbBoard.material) boardProps2.material = pcbBoard.material;
14529
14525
  const board = new Board(boardProps2);
14530
- board.source_board_id = sourceBoard.source_board_id;
14531
- if (sourceBoard.source_group_id && groupsMap?.has(sourceBoard.source_group_id)) {
14532
- const parentGroup = groupsMap.get(sourceBoard.source_group_id);
14533
- parentGroup.add(board);
14534
- } else {
14535
- subcircuit.add(board);
14536
- }
14526
+ board.pcb_board_id = pcbBoard.pcb_board_id;
14527
+ subcircuit.add(board);
14537
14528
  return board;
14538
14529
  }
14539
14530
 
@@ -15401,9 +15392,9 @@ var inflateCircuitJson = (target, circuitJson, children) => {
15401
15392
  for (const sourceGroup of sourceGroups) {
15402
15393
  inflateSourceGroup(sourceGroup, inflationCtx);
15403
15394
  }
15404
- const sourceBoards = injectionDb.source_board.list();
15405
- for (const sourceBoard of sourceBoards) {
15406
- inflateSourceBoard(sourceBoard, inflationCtx);
15395
+ const pcbBoards = injectionDb.pcb_board.list();
15396
+ for (const pcbBoard of pcbBoards) {
15397
+ inflatePcbBoard(pcbBoard, inflationCtx);
15407
15398
  }
15408
15399
  const sourceComponents = injectionDb.source_component.list();
15409
15400
  for (const sourceComponent of sourceComponents) {
@@ -19274,7 +19265,7 @@ import { identity as identity6 } from "transformation-matrix";
19274
19265
  var package_default = {
19275
19266
  name: "@tscircuit/core",
19276
19267
  type: "module",
19277
- version: "0.0.897",
19268
+ version: "0.0.899",
19278
19269
  types: "dist/index.d.ts",
19279
19270
  main: "dist/index.js",
19280
19271
  module: "dist/index.js",
@@ -19307,7 +19298,7 @@ var package_default = {
19307
19298
  "@resvg/resvg-js": "^2.6.2",
19308
19299
  "@tscircuit/capacity-autorouter": "^0.0.140",
19309
19300
  "@tscircuit/checks": "^0.0.87",
19310
- "@tscircuit/circuit-json-util": "^0.0.72",
19301
+ "@tscircuit/circuit-json-util": "^0.0.73",
19311
19302
  "@tscircuit/common": "^0.0.20",
19312
19303
  "@tscircuit/copper-pour-solver": "^0.0.14",
19313
19304
  "@tscircuit/footprinter": "^0.0.236",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.898",
4
+ "version": "0.0.900",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "@resvg/resvg-js": "^2.6.2",
35
35
  "@tscircuit/capacity-autorouter": "^0.0.140",
36
36
  "@tscircuit/checks": "^0.0.87",
37
- "@tscircuit/circuit-json-util": "^0.0.72",
37
+ "@tscircuit/circuit-json-util": "^0.0.73",
38
38
  "@tscircuit/common": "^0.0.20",
39
39
  "@tscircuit/copper-pour-solver": "^0.0.14",
40
40
  "@tscircuit/footprinter": "^0.0.236",