@tscircuit/core 0.0.897 → 0.0.899

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 +32 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14501,6 +14501,33 @@ 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/inflatePcbBoard.ts
14505
+ function inflatePcbBoard(pcbBoard, inflatorContext) {
14506
+ const { subcircuit } = inflatorContext;
14507
+ if (subcircuit.lowercaseComponentName === "board") {
14508
+ return;
14509
+ }
14510
+ if (subcircuit.parent?.lowercaseComponentName === "board") {
14511
+ return;
14512
+ }
14513
+ const boardProps2 = {
14514
+ name: "inflated_board"
14515
+ };
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;
14525
+ const board = new Board(boardProps2);
14526
+ board.pcb_board_id = pcbBoard.pcb_board_id;
14527
+ subcircuit.add(board);
14528
+ return board;
14529
+ }
14530
+
14504
14531
  // lib/components/normal-components/Capacitor.ts
14505
14532
  import { capacitorProps } from "@tscircuit/props";
14506
14533
 
@@ -15365,6 +15392,10 @@ var inflateCircuitJson = (target, circuitJson, children) => {
15365
15392
  for (const sourceGroup of sourceGroups) {
15366
15393
  inflateSourceGroup(sourceGroup, inflationCtx);
15367
15394
  }
15395
+ const pcbBoards = injectionDb.pcb_board.list();
15396
+ for (const pcbBoard of pcbBoards) {
15397
+ inflatePcbBoard(pcbBoard, inflationCtx);
15398
+ }
15368
15399
  const sourceComponents = injectionDb.source_component.list();
15369
15400
  for (const sourceComponent of sourceComponents) {
15370
15401
  switch (sourceComponent.ftype) {
@@ -19234,7 +19265,7 @@ import { identity as identity6 } from "transformation-matrix";
19234
19265
  var package_default = {
19235
19266
  name: "@tscircuit/core",
19236
19267
  type: "module",
19237
- version: "0.0.896",
19268
+ version: "0.0.898",
19238
19269
  types: "dist/index.d.ts",
19239
19270
  main: "dist/index.js",
19240
19271
  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.897",
4
+ "version": "0.0.899",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",