easyeda 0.0.140 → 0.0.141

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.
@@ -2620,6 +2620,7 @@ var generateTypescriptComponent = ({
2620
2620
  manufacturerPartNumber
2621
2621
  }) => {
2622
2622
  const safePinLabels = pinLabels ?? {};
2623
+ const cadComponent = circuitJson.find((item) => item.type === "cad_component");
2623
2624
  const footprintTsx = generateFootprintTsx(circuitJson);
2624
2625
  const simplifiedPinLabels = Object.fromEntries(
2625
2626
  Object.entries(safePinLabels).map(([pin, labels]) => {
@@ -2646,7 +2647,7 @@ export const ${componentName} = (props: ChipProps<typeof pinLabels>) => {
2646
2647
  footprint={${footprintTsx}}
2647
2648
  ${objUrl ? `cadModel={{
2648
2649
  objUrl: "${objUrl}",
2649
- rotationOffset: { x: 0, y: 0, z: 0 },
2650
+ rotationOffset: { x: 0, y: 0, z: ${cadComponent?.rotation?.z ?? 0} },
2650
2651
  positionOffset: { x: 0, y: 0, z: 0 },
2651
2652
  }}` : ""}
2652
2653
  {...props}