easyeda 0.0.378 → 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/index.d.ts CHANGED
@@ -5374,15 +5374,17 @@ declare function fetchEasyEDAComponent(jlcpcbPartNumber: string, { fetch, includ
5374
5374
  includeModelMetadata?: boolean;
5375
5375
  }): Promise<RawEasyEdaJson>;
5376
5376
 
5377
- declare const convertRawEasyToTsx: ({ rawEasy, pinAttributes, }: {
5377
+ declare const convertRawEasyToTsx: ({ rawEasy, pinAttributes, internallyConnectedPins, }: {
5378
5378
  rawEasy: any;
5379
5379
  pinAttributes?: ChipProps["pinAttributes"];
5380
+ internallyConnectedPins?: ChipProps["internallyConnectedPins"];
5380
5381
  }) => Promise<string>;
5381
5382
 
5382
5383
  type GeneratedComponentType = "chip" | "diode" | "led" | "pushbutton" | "switch" | "capacitor" | "resistor" | "inductor" | "crystal" | "connector";
5383
5384
  type GenerateTypescriptComponentParams = {
5384
5385
  pinLabels: ChipProps["pinLabels"];
5385
5386
  pinAttributes?: ChipProps["pinAttributes"];
5387
+ internallyConnectedPins?: ChipProps["internallyConnectedPins"];
5386
5388
  componentName: string;
5387
5389
  objUrl?: string;
5388
5390
  stepUrl?: string;
@@ -5406,7 +5408,7 @@ type GenerateTypescriptComponentParams = {
5406
5408
  footprint: string;
5407
5409
  circuitJson?: AnyCircuitElement[];
5408
5410
  });
5409
- declare const generateTypescriptComponent: ({ pinLabels, pinAttributes, componentName, objUrl, stepUrl, circuitJson, footprint, supplierPartNumbers, manufacturerPartNumber, componentType, isPolarizedCapacitor, capacitance, resistance, inductance, crystalFrequency, crystalPinVariant, symbolTsx, schPinArrangement, useSymbolPortsOnly, inferPinAttributes, }: GenerateTypescriptComponentParams) => string;
5411
+ declare const generateTypescriptComponent: ({ pinLabels, pinAttributes, internallyConnectedPins, componentName, objUrl, stepUrl, circuitJson, footprint, supplierPartNumbers, manufacturerPartNumber, componentType, isPolarizedCapacitor, capacitance, resistance, inductance, crystalFrequency, crystalPinVariant, symbolTsx, schPinArrangement, useSymbolPortsOnly, inferPinAttributes, }: GenerateTypescriptComponentParams) => string;
5410
5412
 
5411
5413
  declare function normalizeManufacturerPartNumber(partNumber: string): string;
5412
5414
 
package/dist/index.js CHANGED
@@ -17624,6 +17624,7 @@ var inferPinAttributes = (pinLabels) => {
17624
17624
  var generateTypescriptComponent = ({
17625
17625
  pinLabels,
17626
17626
  pinAttributes,
17627
+ internallyConnectedPins,
17627
17628
  componentName,
17628
17629
  objUrl,
17629
17630
  stepUrl,
@@ -17692,6 +17693,8 @@ ${pinAttributesString}
17692
17693
 
17693
17694
  ` : "";
17694
17695
  const pinAttributesProp = pinAttributesString ? ` pinAttributes={pinAttributes}
17696
+ ` : "";
17697
+ const internallyConnectedPinsProp = internallyConnectedPins !== void 0 ? ` internallyConnectedPins={${JSON.stringify(internallyConnectedPins)}}
17695
17698
  ` : "";
17696
17699
  const polarizedPinLabelsString = Object.entries(polarizedPinLabels ?? {}).map(([pin, labels]) => ` ${pin}: ${JSON.stringify(labels)}`).join(",\n");
17697
17700
  const polarizedPinLabelsBlock = polarizedPinLabels ? `const pinLabels = {
@@ -17779,7 +17782,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: PushButtonProps<typ
17779
17782
  pinLabels={pinLabels}
17780
17783
  ${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
17781
17784
  manufacturerPartNumber=${manufacturerPartNumberTsx}
17782
- ${pinAttributesProp} footprint={${footprintTsx}}
17785
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
17783
17786
  ${objUrl || stepUrl ? `cadModel={{
17784
17787
  ${cadModelLines}
17785
17788
  }}` : ""}
@@ -17806,7 +17809,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: SwitchProps) => {
17806
17809
  pinLabels={pinLabels}
17807
17810
  ${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
17808
17811
  manufacturerPartNumber=${manufacturerPartNumberTsx}
17809
- ${pinAttributesProp} footprint={${footprintTsx}}
17812
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
17810
17813
  ${objUrl || stepUrl ? `cadModel={{
17811
17814
  ${cadModelLines}
17812
17815
  }}` : ""}
@@ -17934,7 +17937,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: ConnectorProps) =>
17934
17937
  pinLabels={pinLabels}
17935
17938
  supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
17936
17939
  manufacturerPartNumber=${manufacturerPartNumberTsx}
17937
- ${pinAttributesProp} footprint={${footprintTsx}}
17940
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
17938
17941
  ${objUrl || stepUrl ? `cadModel={{
17939
17942
  ${cadModelLines}
17940
17943
  }}` : ""}
@@ -17954,7 +17957,7 @@ ${pinLabelsString}
17954
17957
  ${pinAttributesBlock}export const ${componentName} = (props: ChipProps<typeof pinLabels>) => {
17955
17958
  return (
17956
17959
  <chip
17957
- ${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
17960
+ ${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${internallyConnectedPinsProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
17958
17961
  manufacturerPartNumber=${manufacturerPartNumberTsx}
17959
17962
  footprint={${footprintTsx}}
17960
17963
  ${objUrl || stepUrl ? `cadModel={{
@@ -18191,18 +18194,21 @@ var getVisibleSchematicPinArrangement = (betterEasy) => {
18191
18194
  };
18192
18195
  var convertRawEasyToTsx = async ({
18193
18196
  rawEasy,
18194
- pinAttributes
18197
+ pinAttributes,
18198
+ internallyConnectedPins
18195
18199
  }) => {
18196
18200
  const betterEasy = EasyEdaJsonSchema.parse(rawEasy);
18197
18201
  const result = await convertBetterEasyToTsx({
18198
18202
  betterEasy,
18199
- pinAttributes
18203
+ pinAttributes,
18204
+ internallyConnectedPins
18200
18205
  });
18201
18206
  return result;
18202
18207
  };
18203
18208
  var convertBetterEasyToTsx = async ({
18204
18209
  betterEasy,
18205
- pinAttributes
18210
+ pinAttributes,
18211
+ internallyConnectedPins
18206
18212
  }) => {
18207
18213
  const cadPlacement = await getEasyEdaCadModelPlacement(betterEasy);
18208
18214
  const { circuitJson, resolvedPinAttributes } = convertEasyEdaJsonToCircuitJsonWithPinAttributes(betterEasy, {
@@ -18285,6 +18291,7 @@ var convertBetterEasyToTsx = async ({
18285
18291
  manufacturerPartNumber,
18286
18292
  pinLabels,
18287
18293
  pinAttributes: resolvedPinAttributes,
18294
+ internallyConnectedPins,
18288
18295
  objUrl: modelObjUrl,
18289
18296
  stepUrl: modelStepUrl,
18290
18297
  circuitJson,