@tscircuit/core 0.0.599 → 0.0.600

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 +9 -6
  2. package/package.json +3 -4
package/dist/index.js CHANGED
@@ -2493,13 +2493,17 @@ var Cutout = class extends PrimitiveComponent2 {
2493
2493
  const subcircuit = this.getSubcircuit();
2494
2494
  const pcb_group_id = this.getGroup()?.pcb_group_id ?? void 0;
2495
2495
  const globalPosition = this._getGlobalPcbPositionBeforeLayout();
2496
+ const container = this.getPrimitiveContainer();
2497
+ const parentRotation = container?._parsedProps.pcbRotation ?? 0;
2496
2498
  let inserted_pcb_cutout = void 0;
2497
2499
  if (props.shape === "rect") {
2500
+ const rotationDeg = typeof parentRotation === "string" ? parseInt(parentRotation.replace("deg", ""), 10) : parentRotation;
2501
+ const isRotated90 = Math.abs(rotationDeg % 180) === 90;
2498
2502
  const rectData = {
2499
2503
  shape: "rect",
2500
2504
  center: globalPosition,
2501
- width: props.width,
2502
- height: props.height,
2505
+ width: isRotated90 ? props.height : props.width,
2506
+ height: isRotated90 ? props.width : props.height,
2503
2507
  subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
2504
2508
  pcb_group_id
2505
2509
  };
@@ -11264,7 +11268,7 @@ import { identity as identity5 } from "transformation-matrix";
11264
11268
  var package_default = {
11265
11269
  name: "@tscircuit/core",
11266
11270
  type: "module",
11267
- version: "0.0.598",
11271
+ version: "0.0.599",
11268
11272
  types: "dist/index.d.ts",
11269
11273
  main: "dist/index.js",
11270
11274
  module: "dist/index.js",
@@ -11288,8 +11292,7 @@ var package_default = {
11288
11292
  devDependencies: {
11289
11293
  "@biomejs/biome": "^1.8.3",
11290
11294
  "@tscircuit/capacity-autorouter": "^0.0.100",
11291
- "@tscircuit/checks": "^0.0.56",
11292
- "@tscircuit/circuit-json-flex": "^0.0.2",
11295
+ "@tscircuit/checks": "^0.0.64",
11293
11296
  "@tscircuit/circuit-json-util": "^0.0.61",
11294
11297
  "@tscircuit/footprinter": "^0.0.204",
11295
11298
  "@tscircuit/import-snippet": "^0.0.4",
@@ -11298,7 +11301,7 @@ var package_default = {
11298
11301
  "@tscircuit/math-utils": "^0.0.18",
11299
11302
  "@tscircuit/props": "^0.0.271",
11300
11303
  "@tscircuit/schematic-autolayout": "^0.0.6",
11301
- "@tscircuit/schematic-corpus": "^0.0.52",
11304
+ "@tscircuit/schematic-corpus": "^0.0.110",
11302
11305
  "@tscircuit/schematic-match-adapt": "^0.0.16",
11303
11306
  "@tscircuit/simple-3d-svg": "^0.0.6",
11304
11307
  "@types/bun": "^1.2.16",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.599",
4
+ "version": "0.0.600",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -25,8 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@biomejs/biome": "^1.8.3",
27
27
  "@tscircuit/capacity-autorouter": "^0.0.100",
28
- "@tscircuit/checks": "^0.0.56",
29
- "@tscircuit/circuit-json-flex": "^0.0.2",
28
+ "@tscircuit/checks": "^0.0.64",
30
29
  "@tscircuit/circuit-json-util": "^0.0.61",
31
30
  "@tscircuit/footprinter": "^0.0.204",
32
31
  "@tscircuit/import-snippet": "^0.0.4",
@@ -35,7 +34,7 @@
35
34
  "@tscircuit/math-utils": "^0.0.18",
36
35
  "@tscircuit/props": "^0.0.271",
37
36
  "@tscircuit/schematic-autolayout": "^0.0.6",
38
- "@tscircuit/schematic-corpus": "^0.0.52",
37
+ "@tscircuit/schematic-corpus": "^0.0.110",
39
38
  "@tscircuit/schematic-match-adapt": "^0.0.16",
40
39
  "@tscircuit/simple-3d-svg": "^0.0.6",
41
40
  "@types/bun": "^1.2.16",