easyeda 0.0.308 → 0.0.310

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.
@@ -9926,8 +9926,7 @@ var handleSilkscreenPath = (track, index) => {
9926
9926
  type: "pcb_silkscreen_path",
9927
9927
  pcb_silkscreen_path_id: `pcb_silkscreen_path_${index + 1}`,
9928
9928
  pcb_component_id: "pcb_component_1",
9929
- layer: "top",
9930
- // Assuming all silkscreen is on top layer
9929
+ layer: getSideFromLayer(track.layer),
9931
9930
  route: track.points.map((point2) => ({
9932
9931
  x: milx10(point2.x),
9933
9932
  y: milx10(point2.y)
@@ -10149,7 +10148,8 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
10149
10148
  pcb_plated_hole_id: platedHoleId,
10150
10149
  x: mil2mm(pad.center.x),
10151
10150
  y: mil2mm(pad.center.y),
10152
- layers: ["top"],
10151
+ // Through-hole pads are plated on both outer copper layers.
10152
+ layers: ["top", "bottom"],
10153
10153
  port_hints: pcbPortHints,
10154
10154
  pcb_component_id: "pcb_component_1",
10155
10155
  pcb_port_id: `pcb_port_${index + 1}`
@@ -12345,7 +12345,7 @@ var getGeneratedComponentType = (betterEasy, pinCount) => {
12345
12345
  if (isSwitchCategoryComponent(betterEasy)) return "switch";
12346
12346
  if (isCapacitorComponent(betterEasy)) return "capacitor";
12347
12347
  if (isResistorComponent(betterEasy) && pinCount === 2) return "resistor";
12348
- if (isInductorComponent(betterEasy)) return "inductor";
12348
+ if (isInductorComponent(betterEasy) && pinCount === 2) return "inductor";
12349
12349
  if (isCrystalComponent(betterEasy)) return "crystal";
12350
12350
  if (isMicroUsbConnectorComponent(betterEasy)) return "connector";
12351
12351
  return "chip";
@@ -12422,8 +12422,9 @@ var convertBetterEasyToTsx = async ({
12422
12422
  const crystalFrequency = componentType === "crystal" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
12423
12423
  const crystalPinVariant = componentType !== "crystal" ? void 0 : sourcePorts.length === 4 ? "four_pin" : sourcePorts.length === 2 ? "two_pin" : void 0;
12424
12424
  const isMultiPinDiode = isDiodeCategoryComponent(betterEasy) && sourcePorts.length !== 2;
12425
+ const isMultiPinInductor = isInductorComponent(betterEasy) && sourcePorts.length !== 2;
12425
12426
  const isPassiveWithCustomSymbol = componentType === "capacitor" || componentType === "resistor";
12426
- const symbolTsx = isPassiveWithCustomSymbol || componentType === "chip" && !isMultiPinDiode && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson, {
12427
+ const symbolTsx = isPassiveWithCustomSymbol || componentType === "chip" && !isMultiPinDiode && !isMultiPinInductor && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson, {
12427
12428
  alignPortsToDrawing: isPassiveWithCustomSymbol
12428
12429
  }) : void 0;
12429
12430
  return generateTypescriptComponent({