@tscircuit/core 0.0.1055 → 0.0.1057

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 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10161,7 +10161,7 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
10161
10161
  if (symbol) {
10162
10162
  const schematic_component2 = db.schematic_component.insert({
10163
10163
  center,
10164
- size: symbol.size,
10164
+ size: { ...symbol.size },
10165
10165
  source_component_id: this.source_component_id,
10166
10166
  is_box_with_pins: true,
10167
10167
  symbol_name,
@@ -14457,6 +14457,12 @@ function Group_doInitialSchematicLayoutMatchPack(group) {
14457
14457
  debug6(
14458
14458
  `Component ${chipId} has rotation: ${placement.ccwRotationDegrees}\xB0`
14459
14459
  );
14460
+ const normalizedRotation = (Math.round(placement.ccwRotationDegrees) % 360 + 360) % 360;
14461
+ if ((normalizedRotation === 90 || normalizedRotation === 270) && schematicComponent.size) {
14462
+ const prevWidth = schematicComponent.size.width;
14463
+ schematicComponent.size.width = schematicComponent.size.height;
14464
+ schematicComponent.size.height = prevWidth;
14465
+ }
14460
14466
  const angleRad = placement.ccwRotationDegrees * Math.PI / 180;
14461
14467
  const cos = Math.cos(angleRad);
14462
14468
  const sin = Math.sin(angleRad);
@@ -18079,7 +18085,7 @@ import { identity as identity4 } from "transformation-matrix";
18079
18085
  var package_default = {
18080
18086
  name: "@tscircuit/core",
18081
18087
  type: "module",
18082
- version: "0.0.1054",
18088
+ version: "0.0.1056",
18083
18089
  types: "dist/index.d.ts",
18084
18090
  main: "dist/index.js",
18085
18091
  module: "dist/index.js",
@@ -18143,7 +18149,7 @@ var package_default = {
18143
18149
  "circuit-json-to-gltf": "^0.0.73",
18144
18150
  "circuit-json-to-simple-3d": "^0.0.9",
18145
18151
  "circuit-json-to-spice": "^0.0.34",
18146
- "circuit-to-svg": "^0.0.330",
18152
+ "circuit-to-svg": "^0.0.331",
18147
18153
  concurrently: "^9.1.2",
18148
18154
  "connectivity-map": "^1.0.0",
18149
18155
  debug: "^4.3.6",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1055",
4
+ "version": "0.0.1057",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "circuit-json-to-gltf": "^0.0.73",
66
66
  "circuit-json-to-simple-3d": "^0.0.9",
67
67
  "circuit-json-to-spice": "^0.0.34",
68
- "circuit-to-svg": "^0.0.330",
68
+ "circuit-to-svg": "^0.0.331",
69
69
  "concurrently": "^9.1.2",
70
70
  "connectivity-map": "^1.0.0",
71
71
  "debug": "^4.3.6",