@tscircuit/core 0.0.894 → 0.0.895
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 +16 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14598,13 +14598,17 @@ var inflatePcbComponent = (pcbElm, inflatorContext) => {
|
|
|
14598
14598
|
const relativeElements = injectionDb.toArray().filter(
|
|
14599
14599
|
(elm) => "pcb_component_id" in elm && elm.pcb_component_id === pcbElm.pcb_component_id
|
|
14600
14600
|
);
|
|
14601
|
-
|
|
14601
|
+
const clonedRelativeElements = structuredClone(relativeElements);
|
|
14602
|
+
transformPCBElements2(
|
|
14603
|
+
clonedRelativeElements,
|
|
14604
|
+
absoluteToComponentRelativeTransform
|
|
14605
|
+
);
|
|
14602
14606
|
const components = createComponentsFromCircuitJson(
|
|
14603
14607
|
{
|
|
14604
14608
|
componentName: normalComponent.name,
|
|
14605
14609
|
componentRotation: "0deg"
|
|
14606
14610
|
},
|
|
14607
|
-
|
|
14611
|
+
clonedRelativeElements
|
|
14608
14612
|
);
|
|
14609
14613
|
normalComponent.addAll(components);
|
|
14610
14614
|
};
|
|
@@ -15534,7 +15538,9 @@ var Board = class extends Group6 {
|
|
|
15534
15538
|
const pcbY = this._resolvePcbCoordinate(props.pcbY, "pcbY", {
|
|
15535
15539
|
allowBoardVariables: false
|
|
15536
15540
|
});
|
|
15537
|
-
|
|
15541
|
+
const pcbBoard = db.pcb_board.get(this.pcb_board_id);
|
|
15542
|
+
if (pcbBoard?.width && pcbBoard?.height || pcbBoard?.outline && pcbBoard.outline.length > 0)
|
|
15543
|
+
return;
|
|
15538
15544
|
let minX = Infinity;
|
|
15539
15545
|
let minY = Infinity;
|
|
15540
15546
|
let maxX = -Infinity;
|
|
@@ -15661,8 +15667,12 @@ var Board = class extends Group6 {
|
|
|
15661
15667
|
if (this.root?.pcbDisabled) return;
|
|
15662
15668
|
const { db } = this.root;
|
|
15663
15669
|
const { _parsedProps: props } = this;
|
|
15664
|
-
|
|
15665
|
-
|
|
15670
|
+
const circuitJsonElements = props.circuitJson;
|
|
15671
|
+
const pcbBoardFromCircuitJson = circuitJsonElements?.find(
|
|
15672
|
+
(elm) => elm.type === "pcb_board"
|
|
15673
|
+
);
|
|
15674
|
+
let computedWidth = props.width ?? pcbBoardFromCircuitJson?.width ?? 0;
|
|
15675
|
+
let computedHeight = props.height ?? pcbBoardFromCircuitJson?.height ?? 0;
|
|
15666
15676
|
const { pcbX, pcbY } = this.getResolvedPcbPositionProp();
|
|
15667
15677
|
let center = {
|
|
15668
15678
|
x: pcbX + (props.outlineOffsetX ?? 0),
|
|
@@ -19214,7 +19224,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
19214
19224
|
var package_default = {
|
|
19215
19225
|
name: "@tscircuit/core",
|
|
19216
19226
|
type: "module",
|
|
19217
|
-
version: "0.0.
|
|
19227
|
+
version: "0.0.894",
|
|
19218
19228
|
types: "dist/index.d.ts",
|
|
19219
19229
|
main: "dist/index.js",
|
|
19220
19230
|
module: "dist/index.js",
|