easyeda 0.0.377 → 0.0.379

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.
package/dist/main.cjs CHANGED
@@ -1078,7 +1078,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
1078
1078
  var package_default = {
1079
1079
  name: "easyeda",
1080
1080
  type: "module",
1081
- version: "0.0.376",
1081
+ version: "0.0.378",
1082
1082
  files: [
1083
1083
  "dist"
1084
1084
  ],
@@ -16470,15 +16470,6 @@ var handleHole = (hole, index) => {
16470
16470
  pcb_hole_id: `pcb_hole_${index + 1}`
16471
16471
  });
16472
16472
  };
16473
- var handleHoleCutout = (hole, index) => {
16474
- return pcb_cutout.parse({
16475
- type: "pcb_cutout",
16476
- pcb_cutout_id: `pcb_cutout_from_hole_${index + 1}`,
16477
- shape: "circle",
16478
- center: { x: milx10(hole.center.x), y: milx10(hole.center.y) },
16479
- radius: milx10(hole.radius)
16480
- });
16481
- };
16482
16473
  var handleVia = (via, index) => {
16483
16474
  const holeDiameter = via.holeRadius * 2;
16484
16475
  return pcb_via.parse({
@@ -16693,7 +16684,6 @@ var convertEasyEdaJsonToCircuitJsonWithPinAttributes = (easyEdaJson, {
16693
16684
  (shape) => shape.type === "HOLE"
16694
16685
  ).forEach((h, index) => {
16695
16686
  circuitElements.push(handleHole(h, index));
16696
- circuitElements.push(handleHoleCutout(h, index));
16697
16687
  });
16698
16688
  easyEdaJson.packageDetail.dataStr.shape.filter((shape) => shape.type === "VIA").forEach((v, index) => {
16699
16689
  circuitElements.push(handleVia(v, index));
@@ -18545,6 +18535,7 @@ var inferPinAttributes = (pinLabels) => {
18545
18535
  var generateTypescriptComponent = ({
18546
18536
  pinLabels,
18547
18537
  pinAttributes,
18538
+ internallyConnectedPins,
18548
18539
  componentName,
18549
18540
  objUrl,
18550
18541
  stepUrl,
@@ -18613,6 +18604,8 @@ ${pinAttributesString}
18613
18604
 
18614
18605
  ` : "";
18615
18606
  const pinAttributesProp = pinAttributesString ? ` pinAttributes={pinAttributes}
18607
+ ` : "";
18608
+ const internallyConnectedPinsProp = internallyConnectedPins !== void 0 ? ` internallyConnectedPins={${JSON.stringify(internallyConnectedPins)}}
18616
18609
  ` : "";
18617
18610
  const polarizedPinLabelsString = Object.entries(polarizedPinLabels ?? {}).map(([pin, labels]) => ` ${pin}: ${JSON.stringify(labels)}`).join(",\n");
18618
18611
  const polarizedPinLabelsBlock = polarizedPinLabels ? `const pinLabels = {
@@ -18700,7 +18693,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: PushButtonProps<typ
18700
18693
  pinLabels={pinLabels}
18701
18694
  ${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
18702
18695
  manufacturerPartNumber=${manufacturerPartNumberTsx}
18703
- ${pinAttributesProp} footprint={${footprintTsx}}
18696
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
18704
18697
  ${objUrl || stepUrl ? `cadModel={{
18705
18698
  ${cadModelLines}
18706
18699
  }}` : ""}
@@ -18727,7 +18720,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: SwitchProps) => {
18727
18720
  pinLabels={pinLabels}
18728
18721
  ${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
18729
18722
  manufacturerPartNumber=${manufacturerPartNumberTsx}
18730
- ${pinAttributesProp} footprint={${footprintTsx}}
18723
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
18731
18724
  ${objUrl || stepUrl ? `cadModel={{
18732
18725
  ${cadModelLines}
18733
18726
  }}` : ""}
@@ -18855,7 +18848,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: ConnectorProps) =>
18855
18848
  pinLabels={pinLabels}
18856
18849
  supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
18857
18850
  manufacturerPartNumber=${manufacturerPartNumberTsx}
18858
- ${pinAttributesProp} footprint={${footprintTsx}}
18851
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
18859
18852
  ${objUrl || stepUrl ? `cadModel={{
18860
18853
  ${cadModelLines}
18861
18854
  }}` : ""}
@@ -18875,7 +18868,7 @@ ${pinLabelsString}
18875
18868
  ${pinAttributesBlock}export const ${componentName} = (props: ChipProps<typeof pinLabels>) => {
18876
18869
  return (
18877
18870
  <chip
18878
- ${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
18871
+ ${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${internallyConnectedPinsProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
18879
18872
  manufacturerPartNumber=${manufacturerPartNumberTsx}
18880
18873
  footprint={${footprintTsx}}
18881
18874
  ${objUrl || stepUrl ? `cadModel={{
@@ -19112,18 +19105,21 @@ var getVisibleSchematicPinArrangement = (betterEasy) => {
19112
19105
  };
19113
19106
  var convertRawEasyToTsx = async ({
19114
19107
  rawEasy,
19115
- pinAttributes
19108
+ pinAttributes,
19109
+ internallyConnectedPins
19116
19110
  }) => {
19117
19111
  const betterEasy = EasyEdaJsonSchema.parse(rawEasy);
19118
19112
  const result = await convertBetterEasyToTsx({
19119
19113
  betterEasy,
19120
- pinAttributes
19114
+ pinAttributes,
19115
+ internallyConnectedPins
19121
19116
  });
19122
19117
  return result;
19123
19118
  };
19124
19119
  var convertBetterEasyToTsx = async ({
19125
19120
  betterEasy,
19126
- pinAttributes
19121
+ pinAttributes,
19122
+ internallyConnectedPins
19127
19123
  }) => {
19128
19124
  const cadPlacement = await getEasyEdaCadModelPlacement(betterEasy);
19129
19125
  const { circuitJson, resolvedPinAttributes } = convertEasyEdaJsonToCircuitJsonWithPinAttributes(betterEasy, {
@@ -19206,6 +19202,7 @@ var convertBetterEasyToTsx = async ({
19206
19202
  manufacturerPartNumber,
19207
19203
  pinLabels,
19208
19204
  pinAttributes: resolvedPinAttributes,
19205
+ internallyConnectedPins,
19209
19206
  objUrl: modelObjUrl,
19210
19207
  stepUrl: modelStepUrl,
19211
19208
  circuitJson,