@tscircuit/core 0.0.629 → 0.0.630

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 +7 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -9113,14 +9113,15 @@ var Group_doInitialPcbLayoutPack = (group) => {
9113
9113
  global.debugGraphics?.push(graphics);
9114
9114
  }
9115
9115
  for (const packedComponent of packOutput.components) {
9116
- const { center, componentId, ccwRotationOffset } = packedComponent;
9116
+ const { center, componentId, ccwRotationOffset, ccwRotationDegrees } = packedComponent;
9117
9117
  const pcbComponent = db.pcb_component.get(componentId);
9118
9118
  if (pcbComponent) {
9119
9119
  const originalCenter2 = pcbComponent.center;
9120
+ const rotationDegrees2 = ccwRotationDegrees ?? ccwRotationOffset ?? 0;
9120
9121
  const transformMatrix2 = compose4(
9121
9122
  group._computePcbGlobalTransformBeforeLayout(),
9122
9123
  translate6(center.x, center.y),
9123
- rotate2((ccwRotationOffset || 0) * Math.PI / 180),
9124
+ rotate2(rotationDegrees2 * Math.PI / 180),
9124
9125
  translate6(-originalCenter2.x, -originalCenter2.y)
9125
9126
  );
9126
9127
  const related = db.toArray().filter(
@@ -9132,10 +9133,11 @@ var Group_doInitialPcbLayoutPack = (group) => {
9132
9133
  const pcbGroup = db.pcb_group.list().find((g) => g.source_group_id === componentId);
9133
9134
  if (!pcbGroup) continue;
9134
9135
  const originalCenter = pcbGroup.center;
9136
+ const rotationDegrees = ccwRotationDegrees ?? ccwRotationOffset ?? 0;
9135
9137
  const transformMatrix = compose4(
9136
9138
  group._computePcbGlobalTransformBeforeLayout(),
9137
9139
  translate6(center.x, center.y),
9138
- rotate2(ccwRotationOffset || 0),
9140
+ rotate2(rotationDegrees * Math.PI / 180),
9139
9141
  translate6(-originalCenter.x, -originalCenter.y)
9140
9142
  );
9141
9143
  const subtree = buildSubtree2(db.toArray(), { source_group_id: componentId });
@@ -12511,7 +12513,7 @@ import { identity as identity5 } from "transformation-matrix";
12511
12513
  var package_default = {
12512
12514
  name: "@tscircuit/core",
12513
12515
  type: "module",
12514
- version: "0.0.628",
12516
+ version: "0.0.629",
12515
12517
  types: "dist/index.d.ts",
12516
12518
  main: "dist/index.js",
12517
12519
  module: "dist/index.js",
@@ -12598,7 +12600,7 @@ var package_default = {
12598
12600
  dependencies: {
12599
12601
  "@flatten-js/core": "^1.6.2",
12600
12602
  "@lume/kiwi": "^0.4.3",
12601
- "calculate-packing": "0.0.17",
12603
+ "calculate-packing": "0.0.19",
12602
12604
  "css-select": "5.1.0",
12603
12605
  "format-si-unit": "^0.0.3",
12604
12606
  nanoid: "^5.0.7",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.629",
4
+ "version": "0.0.630",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -88,7 +88,7 @@
88
88
  "dependencies": {
89
89
  "@flatten-js/core": "^1.6.2",
90
90
  "@lume/kiwi": "^0.4.3",
91
- "calculate-packing": "0.0.17",
91
+ "calculate-packing": "0.0.19",
92
92
  "css-select": "5.1.0",
93
93
  "format-si-unit": "^0.0.3",
94
94
  "nanoid": "^5.0.7",