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.
package/dist/index.js CHANGED
@@ -6063,8 +6063,7 @@ var handleSilkscreenPath = (track, index) => {
6063
6063
  type: "pcb_silkscreen_path",
6064
6064
  pcb_silkscreen_path_id: `pcb_silkscreen_path_${index + 1}`,
6065
6065
  pcb_component_id: "pcb_component_1",
6066
- layer: "top",
6067
- // Assuming all silkscreen is on top layer
6066
+ layer: getSideFromLayer(track.layer),
6068
6067
  route: track.points.map((point2) => ({
6069
6068
  x: milx10(point2.x),
6070
6069
  y: milx10(point2.y)
@@ -6286,7 +6285,8 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
6286
6285
  pcb_plated_hole_id: platedHoleId,
6287
6286
  x: mil2mm(pad.center.x),
6288
6287
  y: mil2mm(pad.center.y),
6289
- layers: ["top"],
6288
+ // Through-hole pads are plated on both outer copper layers.
6289
+ layers: ["top", "bottom"],
6290
6290
  port_hints: pcbPortHints,
6291
6291
  pcb_component_id: "pcb_component_1",
6292
6292
  pcb_port_id: `pcb_port_${index + 1}`
@@ -8646,7 +8646,7 @@ var getGeneratedComponentType = (betterEasy, pinCount) => {
8646
8646
  if (isSwitchCategoryComponent(betterEasy)) return "switch";
8647
8647
  if (isCapacitorComponent(betterEasy)) return "capacitor";
8648
8648
  if (isResistorComponent(betterEasy) && pinCount === 2) return "resistor";
8649
- if (isInductorComponent(betterEasy)) return "inductor";
8649
+ if (isInductorComponent(betterEasy) && pinCount === 2) return "inductor";
8650
8650
  if (isCrystalComponent(betterEasy)) return "crystal";
8651
8651
  if (isMicroUsbConnectorComponent(betterEasy)) return "connector";
8652
8652
  return "chip";
@@ -8723,8 +8723,9 @@ var convertBetterEasyToTsx = async ({
8723
8723
  const crystalFrequency = componentType === "crystal" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
8724
8724
  const crystalPinVariant = componentType !== "crystal" ? void 0 : sourcePorts.length === 4 ? "four_pin" : sourcePorts.length === 2 ? "two_pin" : void 0;
8725
8725
  const isMultiPinDiode = isDiodeCategoryComponent(betterEasy) && sourcePorts.length !== 2;
8726
+ const isMultiPinInductor = isInductorComponent(betterEasy) && sourcePorts.length !== 2;
8726
8727
  const isPassiveWithCustomSymbol = componentType === "capacitor" || componentType === "resistor";
8727
- const symbolTsx = isPassiveWithCustomSymbol || componentType === "chip" && !isMultiPinDiode && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson, {
8728
+ const symbolTsx = isPassiveWithCustomSymbol || componentType === "chip" && !isMultiPinDiode && !isMultiPinInductor && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson, {
8728
8729
  alignPortsToDrawing: isPassiveWithCustomSymbol
8729
8730
  }) : void 0;
8730
8731
  return generateTypescriptComponent({