easyeda 0.0.233 → 0.0.235

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.
@@ -14,7 +14,7 @@ import {
14
14
  toSVG,
15
15
  toString,
16
16
  translate
17
- } from "./chunk-CGLWJURY.js";
17
+ } from "./chunk-3LTFTYMU.js";
18
18
 
19
19
  // node_modules/circuit-to-svg/dist/index.js
20
20
  var import_svgson = __toESM(require_svgson_umd(), 1);
@@ -12379,4 +12379,4 @@ export {
12379
12379
  isSimulationTransientVoltageGraph,
12380
12380
  isSimulationVoltageProbe
12381
12381
  };
12382
- //# sourceMappingURL=dist-B53E6C7Z.js.map
12382
+ //# sourceMappingURL=dist-52OJ7NI2.js.map
@@ -162,7 +162,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
162
162
  y: number;
163
163
  id: string;
164
164
  rotation: number;
165
- visibility: "show" | "hide";
165
+ visibility: "show" | "hide" | "none";
166
166
  pinNumber: string | number;
167
167
  label: string;
168
168
  labelColor: string;
@@ -290,7 +290,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
290
290
  color: string;
291
291
  }>, z.ZodObject<{
292
292
  type: z.ZodLiteral<"PIN">;
293
- visibility: z.ZodEnum<["show", "hide"]>;
293
+ visibility: z.ZodEnum<["show", "hide", "none"]>;
294
294
  pinNumber: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
295
295
  x: z.ZodNumber;
296
296
  y: z.ZodNumber;
@@ -307,7 +307,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
307
307
  y: number;
308
308
  id: string;
309
309
  rotation: number;
310
- visibility: "show" | "hide";
310
+ visibility: "show" | "hide" | "none";
311
311
  pinNumber: string | number;
312
312
  label: string;
313
313
  labelColor: string;
@@ -319,7 +319,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
319
319
  y: number;
320
320
  id: string;
321
321
  rotation: number;
322
- visibility: "show" | "hide";
322
+ visibility: "show" | "hide" | "none";
323
323
  pinNumber: string | number;
324
324
  label: string;
325
325
  labelColor: string;
@@ -585,7 +585,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
585
585
  y: number;
586
586
  id: string;
587
587
  rotation: number;
588
- visibility: "show" | "hide";
588
+ visibility: "show" | "hide" | "none";
589
589
  pinNumber: string | number;
590
590
  label: string;
591
591
  labelColor: string;
@@ -1763,7 +1763,7 @@ declare const EasyEdaJsonSchema: z.ZodObject<{
1763
1763
  y: number;
1764
1764
  id: string;
1765
1765
  rotation: number;
1766
- visibility: "show" | "hide";
1766
+ visibility: "show" | "hide" | "none";
1767
1767
  pinNumber: string | number;
1768
1768
  label: string;
1769
1769
  labelColor: string;
@@ -68,7 +68,7 @@ import {
68
68
  translate,
69
69
  unknown_error_finding_part,
70
70
  voltage
71
- } from "./chunk-CGLWJURY.js";
71
+ } from "./chunk-3LTFTYMU.js";
72
72
 
73
73
  // node_modules/ms/index.js
74
74
  var require_ms = __commonJS({
@@ -19679,7 +19679,7 @@ var parseArc = (str) => {
19679
19679
  var ArcShapeSchema = z2.string().startsWith("A~").transform(parseArc).pipe(ArcShapeOutputSchema);
19680
19680
  var PinShapeOutputSchema = z2.object({
19681
19681
  type: z2.literal("PIN"),
19682
- visibility: z2.enum(["show", "hide"]),
19682
+ visibility: z2.enum(["show", "hide", "none"]),
19683
19683
  pinNumber: z2.union([z2.string(), z2.number()]),
19684
19684
  x: z2.number(),
19685
19685
  y: z2.number(),
@@ -80251,6 +80251,14 @@ extendCatalogue({
80251
80251
  // lib/constants.ts
80252
80252
  var DEFAULT_PCB_THICKNESS_MM = 1.6;
80253
80253
 
80254
+ // lib/utils/normalize-symbol-name.ts
80255
+ var normalizeSymbolName = (name) => {
80256
+ const trimmedName = name.trim();
80257
+ if (trimmedName === "+") return "_POS";
80258
+ if (trimmedName === "-") return "_NEG";
80259
+ return trimmedName;
80260
+ };
80261
+
80254
80262
  // lib/convert-easyeda-json-to-tscircuit-soup-json.ts
80255
80263
  var mil2mm = (mil) => {
80256
80264
  if (typeof mil === "number") return mm(`${mil}mil`);
@@ -80402,7 +80410,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, { useModelCdn, shouldRecente
80402
80410
  const labels = [];
80403
80411
  if (pad2.number) labels.push(pad2.number.toString());
80404
80412
  const pin = pins.find((p2) => p2.pinNumber === pad2.number);
80405
- if (pin) labels.push(pin.label);
80413
+ if (pin) labels.push(normalizeSymbolName(pin.label));
80406
80414
  return labels;
80407
80415
  });
80408
80416
  const normalizedPinLabels = normalizePinLabels(pinLabelSets);
@@ -80569,7 +80577,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, { useModelCdn, shouldRecente
80569
80577
  type: "pcb_silkscreen_text",
80570
80578
  pcb_silkscreen_text_id: `pcb_silkscreen_text_${index + 1}`,
80571
80579
  pcb_component_id: "pcb_component_1",
80572
- text: shape.text,
80580
+ text: normalizeSymbolName(shape.text),
80573
80581
  anchor_position: {
80574
80582
  x: mil2mm(shape.x),
80575
80583
  y: mil2mm(shape.y)