easyeda 0.0.62 → 0.0.64

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.
@@ -2603,7 +2603,6 @@ import { createUseComponent } from "@tscircuit/core"
2603
2603
  import type { CommonLayoutProps } from "@tscircuit/props"
2604
2604
 
2605
2605
  const pinLabels = ${JSON.stringify(pinLabels, null, " ")} as const
2606
- const pinNames = Object.values(pinLabels)
2607
2606
 
2608
2607
  interface Props extends CommonLayoutProps {
2609
2608
  name: string
@@ -2626,7 +2625,7 @@ export const ${componentName} = (props: Props) => {
2626
2625
  )
2627
2626
  }
2628
2627
 
2629
- export const use${componentName} = createUseComponent(${componentName}, pinNames)
2628
+ export const use${componentName} = createUseComponent(${componentName}, pinLabels)
2630
2629
 
2631
2630
  `.trim();
2632
2631
  };
@@ -2660,8 +2659,16 @@ var convertBetterEasyToTsx = async ({
2660
2659
  const [cad_component2] = su_default(circuitJson).cad_component.list();
2661
2660
  const sourcePorts = su_default(circuitJson).source_port.list();
2662
2661
  const pinLabels = {};
2663
- for (const sourcePort of sourcePorts) {
2664
- pinLabels[sourcePort.name] = sourcePort.port_hints ?? [];
2662
+ const sortedPorts = sourcePorts.sort((a, b) => {
2663
+ const aNum = parseInt(a.name.replace("pin", ""));
2664
+ const bNum = parseInt(b.name.replace("pin", ""));
2665
+ return aNum - bNum;
2666
+ });
2667
+ for (const sourcePort of sortedPorts) {
2668
+ pinLabels[sourcePort.name] = [
2669
+ sourcePort.name,
2670
+ ...sourcePort.port_hints ?? []
2671
+ ];
2665
2672
  }
2666
2673
  let modelObjUrl;
2667
2674
  if (cad_component2.model_obj_url) {
@@ -2784,4 +2791,4 @@ export {
2784
2791
  convertRawEasyToTsx,
2785
2792
  convertEasyEdaJsonToVariousFormats
2786
2793
  };
2787
- //# sourceMappingURL=chunk-H6ZXXBFR.js.map
2794
+ //# sourceMappingURL=chunk-O4FU4IHE.js.map