@tscircuit/core 0.0.1280 → 0.0.1281
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.d.ts +1 -0
- package/dist/index.js +13 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78583,6 +78583,7 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
|
|
|
78583
78583
|
doInitialPortMatching(): void;
|
|
78584
78584
|
doInitialPcbPrimitiveRender(): void;
|
|
78585
78585
|
doInitialPcbPortAttachment(): void;
|
|
78586
|
+
getAvailablePcbLayers(): string[];
|
|
78586
78587
|
_getPcbCircuitJsonBounds(): {
|
|
78587
78588
|
center: {
|
|
78588
78589
|
x: number;
|
package/dist/index.js
CHANGED
|
@@ -8191,7 +8191,10 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
8191
8191
|
const isRotated90Degrees = Math.abs(normalizedRotationDegrees - 90) < rotationTolerance || Math.abs(normalizedRotationDegrees - 270) < rotationTolerance;
|
|
8192
8192
|
let finalRotationDegrees = Math.abs(normalizedRotationDegrees - 360) < rotationTolerance ? 0 : normalizedRotationDegrees;
|
|
8193
8193
|
const transformRotationBeforeFlip = finalRotationDegrees;
|
|
8194
|
-
const { maybeFlipLayer, isFlipped } = this._getPcbPrimitiveFlippedHelpers();
|
|
8194
|
+
const { maybeFlipLayer: maybeFlipDefaultLayer, isFlipped } = this._getPcbPrimitiveFlippedHelpers();
|
|
8195
|
+
const primitiveContainer = this.getPrimitiveContainer();
|
|
8196
|
+
const primitiveContainerLayer = primitiveContainer?.props?.layer !== void 0 ? primitiveContainer?._parsedProps.layer : void 0;
|
|
8197
|
+
const maybeFlipLayer = (layer) => primitiveContainerLayer ?? maybeFlipDefaultLayer(layer);
|
|
8195
8198
|
if (isFlipped) {
|
|
8196
8199
|
finalRotationDegrees = (360 - finalRotationDegrees + 360) % 360;
|
|
8197
8200
|
}
|
|
@@ -8403,6 +8406,14 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
8403
8406
|
pcb_port_id: this.matchedPort?.pcb_port_id
|
|
8404
8407
|
});
|
|
8405
8408
|
}
|
|
8409
|
+
getAvailablePcbLayers() {
|
|
8410
|
+
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
8411
|
+
const primitiveContainer = this.getPrimitiveContainer();
|
|
8412
|
+
const primitiveContainerLayer = primitiveContainer?.props?.layer !== void 0 ? primitiveContainer?._parsedProps.layer : void 0;
|
|
8413
|
+
return [
|
|
8414
|
+
primitiveContainerLayer ?? maybeFlipLayer(this._parsedProps.layer ?? "top")
|
|
8415
|
+
];
|
|
8416
|
+
}
|
|
8406
8417
|
_getPcbCircuitJsonBounds() {
|
|
8407
8418
|
const { db } = this.root;
|
|
8408
8419
|
const smtpad = db.pcb_smtpad.get(this.pcb_smtpad_id);
|
|
@@ -21856,7 +21867,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21856
21867
|
var package_default = {
|
|
21857
21868
|
name: "@tscircuit/core",
|
|
21858
21869
|
type: "module",
|
|
21859
|
-
version: "0.0.
|
|
21870
|
+
version: "0.0.1280",
|
|
21860
21871
|
types: "dist/index.d.ts",
|
|
21861
21872
|
main: "dist/index.js",
|
|
21862
21873
|
module: "dist/index.js",
|