@tscircuit/core 0.0.1152 → 0.0.1153
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 +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5648,7 +5648,7 @@ var CourtyardRect = class extends PrimitiveComponent2 {
|
|
|
5648
5648
|
const { db } = this.root;
|
|
5649
5649
|
const { _parsedProps: props } = this;
|
|
5650
5650
|
const position = this._getGlobalPcbPositionBeforeLayout();
|
|
5651
|
-
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
5651
|
+
const { maybeFlipLayer, isFlipped } = this._getPcbPrimitiveFlippedHelpers();
|
|
5652
5652
|
const layer = maybeFlipLayer(props.layer ?? "top");
|
|
5653
5653
|
if (layer !== "top" && layer !== "bottom") {
|
|
5654
5654
|
throw new Error(
|
|
@@ -5660,7 +5660,11 @@ var CourtyardRect = class extends PrimitiveComponent2 {
|
|
|
5660
5660
|
const decomposedTransform = decomposeTSR(
|
|
5661
5661
|
this._computePcbGlobalTransformBeforeLayout()
|
|
5662
5662
|
);
|
|
5663
|
-
const
|
|
5663
|
+
const ccwRotationDegrees = decomposedTransform.rotation.angle * 180 / Math.PI;
|
|
5664
|
+
let ccw_rotation = (ccwRotationDegrees % 360 + 360) % 360;
|
|
5665
|
+
if (isFlipped) {
|
|
5666
|
+
ccw_rotation = (180 - ccw_rotation + 360) % 360;
|
|
5667
|
+
}
|
|
5664
5668
|
const pcb_courtyard_rect = db.pcb_courtyard_rect.insert({
|
|
5665
5669
|
pcb_component_id,
|
|
5666
5670
|
layer,
|
|
@@ -19149,7 +19153,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19149
19153
|
var package_default = {
|
|
19150
19154
|
name: "@tscircuit/core",
|
|
19151
19155
|
type: "module",
|
|
19152
|
-
version: "0.0.
|
|
19156
|
+
version: "0.0.1152",
|
|
19153
19157
|
types: "dist/index.d.ts",
|
|
19154
19158
|
main: "dist/index.js",
|
|
19155
19159
|
module: "dist/index.js",
|