@tscircuit/core 0.0.897 → 0.0.898
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.
- package/dist/index.js +41 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14501,6 +14501,42 @@ 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;
|
|
14507
|
+
if (subcircuit.lowercaseComponentName === "board") {
|
|
14508
|
+
return;
|
|
14509
|
+
}
|
|
14510
|
+
if (subcircuit.parent?.lowercaseComponentName === "board") {
|
|
14511
|
+
return;
|
|
14512
|
+
}
|
|
14513
|
+
const pcbBoards = injectionDb.pcb_board.list();
|
|
14514
|
+
const pcbBoard = pcbBoards.length > 0 ? pcbBoards[0] : null;
|
|
14515
|
+
const boardProps2 = {
|
|
14516
|
+
name: sourceBoard.title || "inflated_board"
|
|
14517
|
+
};
|
|
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
|
+
}
|
|
14529
|
+
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
|
+
}
|
|
14537
|
+
return board;
|
|
14538
|
+
}
|
|
14539
|
+
|
|
14504
14540
|
// lib/components/normal-components/Capacitor.ts
|
|
14505
14541
|
import { capacitorProps } from "@tscircuit/props";
|
|
14506
14542
|
|
|
@@ -15365,6 +15401,10 @@ var inflateCircuitJson = (target, circuitJson, children) => {
|
|
|
15365
15401
|
for (const sourceGroup of sourceGroups) {
|
|
15366
15402
|
inflateSourceGroup(sourceGroup, inflationCtx);
|
|
15367
15403
|
}
|
|
15404
|
+
const sourceBoards = injectionDb.source_board.list();
|
|
15405
|
+
for (const sourceBoard of sourceBoards) {
|
|
15406
|
+
inflateSourceBoard(sourceBoard, inflationCtx);
|
|
15407
|
+
}
|
|
15368
15408
|
const sourceComponents = injectionDb.source_component.list();
|
|
15369
15409
|
for (const sourceComponent of sourceComponents) {
|
|
15370
15410
|
switch (sourceComponent.ftype) {
|
|
@@ -19234,7 +19274,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
19234
19274
|
var package_default = {
|
|
19235
19275
|
name: "@tscircuit/core",
|
|
19236
19276
|
type: "module",
|
|
19237
|
-
version: "0.0.
|
|
19277
|
+
version: "0.0.897",
|
|
19238
19278
|
types: "dist/index.d.ts",
|
|
19239
19279
|
main: "dist/index.js",
|
|
19240
19280
|
module: "dist/index.js",
|