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.
@@ -5346,19 +5346,22 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
5346
5346
  type RawEasyEdaJson = z.input<typeof EasyEdaJsonSchema>;
5347
5347
  type BetterEasyEdaJson = z.infer<typeof EasyEdaJsonSchema>;
5348
5348
 
5349
- declare const convertRawEasyToTsx: ({ rawEasy, pinAttributes, }: {
5349
+ declare const convertRawEasyToTsx: ({ rawEasy, pinAttributes, internallyConnectedPins, }: {
5350
5350
  rawEasy: any;
5351
5351
  pinAttributes?: ChipProps["pinAttributes"];
5352
+ internallyConnectedPins?: ChipProps["internallyConnectedPins"];
5352
5353
  }) => Promise<string>;
5353
- declare const convertBetterEasyToTsx: ({ betterEasy, pinAttributes, }: {
5354
+ declare const convertBetterEasyToTsx: ({ betterEasy, pinAttributes, internallyConnectedPins, }: {
5354
5355
  betterEasy: BetterEasyEdaJson;
5355
5356
  pinAttributes?: ChipProps["pinAttributes"];
5357
+ internallyConnectedPins?: ChipProps["internallyConnectedPins"];
5356
5358
  }) => Promise<string>;
5357
5359
 
5358
5360
  type GeneratedComponentType = "chip" | "diode" | "led" | "pushbutton" | "switch" | "capacitor" | "resistor" | "inductor" | "crystal" | "connector";
5359
5361
  type GenerateTypescriptComponentParams = {
5360
5362
  pinLabels: ChipProps["pinLabels"];
5361
5363
  pinAttributes?: ChipProps["pinAttributes"];
5364
+ internallyConnectedPins?: ChipProps["internallyConnectedPins"];
5362
5365
  componentName: string;
5363
5366
  objUrl?: string;
5364
5367
  stepUrl?: string;
@@ -5382,7 +5385,7 @@ type GenerateTypescriptComponentParams = {
5382
5385
  footprint: string;
5383
5386
  circuitJson?: AnyCircuitElement[];
5384
5387
  });
5385
- 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;
5388
+ 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;
5386
5389
 
5387
5390
  declare function fetchEasyEDAComponent(jlcpcbPartNumber: string, { fetch, includeModelMetadata, }?: {
5388
5391
  fetch?: typeof globalThis.fetch;
@@ -21229,6 +21229,7 @@ var inferPinAttributes = (pinLabels) => {
21229
21229
  var generateTypescriptComponent = ({
21230
21230
  pinLabels,
21231
21231
  pinAttributes,
21232
+ internallyConnectedPins,
21232
21233
  componentName,
21233
21234
  objUrl,
21234
21235
  stepUrl,
@@ -21297,6 +21298,8 @@ ${pinAttributesString}
21297
21298
 
21298
21299
  ` : "";
21299
21300
  const pinAttributesProp = pinAttributesString ? ` pinAttributes={pinAttributes}
21301
+ ` : "";
21302
+ const internallyConnectedPinsProp = internallyConnectedPins !== void 0 ? ` internallyConnectedPins={${JSON.stringify(internallyConnectedPins)}}
21300
21303
  ` : "";
21301
21304
  const polarizedPinLabelsString = Object.entries(polarizedPinLabels ?? {}).map(([pin, labels]) => ` ${pin}: ${JSON.stringify(labels)}`).join(",\n");
21302
21305
  const polarizedPinLabelsBlock = polarizedPinLabels ? `const pinLabels = {
@@ -21384,7 +21387,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: PushButtonProps<typ
21384
21387
  pinLabels={pinLabels}
21385
21388
  ${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
21386
21389
  manufacturerPartNumber=${manufacturerPartNumberTsx}
21387
- ${pinAttributesProp} footprint={${footprintTsx}}
21390
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
21388
21391
  ${objUrl || stepUrl ? `cadModel={{
21389
21392
  ${cadModelLines}
21390
21393
  }}` : ""}
@@ -21411,7 +21414,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: SwitchProps) => {
21411
21414
  pinLabels={pinLabels}
21412
21415
  ${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
21413
21416
  manufacturerPartNumber=${manufacturerPartNumberTsx}
21414
- ${pinAttributesProp} footprint={${footprintTsx}}
21417
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
21415
21418
  ${objUrl || stepUrl ? `cadModel={{
21416
21419
  ${cadModelLines}
21417
21420
  }}` : ""}
@@ -21539,7 +21542,7 @@ ${pinAttributesBlock}export const ${componentName} = (props: ConnectorProps) =>
21539
21542
  pinLabels={pinLabels}
21540
21543
  supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
21541
21544
  manufacturerPartNumber=${manufacturerPartNumberTsx}
21542
- ${pinAttributesProp} footprint={${footprintTsx}}
21545
+ ${pinAttributesProp}${internallyConnectedPinsProp} footprint={${footprintTsx}}
21543
21546
  ${objUrl || stepUrl ? `cadModel={{
21544
21547
  ${cadModelLines}
21545
21548
  }}` : ""}
@@ -21559,7 +21562,7 @@ ${pinLabelsString}
21559
21562
  ${pinAttributesBlock}export const ${componentName} = (props: ChipProps<typeof pinLabels>) => {
21560
21563
  return (
21561
21564
  <chip
21562
- ${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
21565
+ ${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${internallyConnectedPinsProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
21563
21566
  manufacturerPartNumber=${manufacturerPartNumberTsx}
21564
21567
  footprint={${footprintTsx}}
21565
21568
  ${objUrl || stepUrl ? `cadModel={{
@@ -21796,18 +21799,21 @@ var getVisibleSchematicPinArrangement = (betterEasy) => {
21796
21799
  };
21797
21800
  var convertRawEasyToTsx = async ({
21798
21801
  rawEasy,
21799
- pinAttributes
21802
+ pinAttributes,
21803
+ internallyConnectedPins
21800
21804
  }) => {
21801
21805
  const betterEasy = EasyEdaJsonSchema.parse(rawEasy);
21802
21806
  const result = await convertBetterEasyToTsx({
21803
21807
  betterEasy,
21804
- pinAttributes
21808
+ pinAttributes,
21809
+ internallyConnectedPins
21805
21810
  });
21806
21811
  return result;
21807
21812
  };
21808
21813
  var convertBetterEasyToTsx = async ({
21809
21814
  betterEasy,
21810
- pinAttributes
21815
+ pinAttributes,
21816
+ internallyConnectedPins
21811
21817
  }) => {
21812
21818
  const cadPlacement = await getEasyEdaCadModelPlacement(betterEasy);
21813
21819
  const { circuitJson, resolvedPinAttributes } = convertEasyEdaJsonToCircuitJsonWithPinAttributes(betterEasy, {
@@ -21890,6 +21896,7 @@ var convertBetterEasyToTsx = async ({
21890
21896
  manufacturerPartNumber,
21891
21897
  pinLabels,
21892
21898
  pinAttributes: resolvedPinAttributes,
21899
+ internallyConnectedPins,
21893
21900
  objUrl: modelObjUrl,
21894
21901
  stepUrl: modelStepUrl,
21895
21902
  circuitJson,