easyeda 0.0.232 → 0.0.234

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/main.cjs CHANGED
@@ -2367,6 +2367,7 @@ var init_dist = __esm({
2367
2367
  subcircuit_id: import_zod74.z.string().optional(),
2368
2368
  outer_diameter: import_zod74.z.number(),
2369
2369
  hole_diameter: import_zod74.z.number(),
2370
+ is_covered_with_solder_mask: import_zod74.z.boolean().optional(),
2370
2371
  x: distance,
2371
2372
  y: distance,
2372
2373
  layers: import_zod74.z.array(layer_ref),
@@ -96676,6 +96677,14 @@ extendCatalogue({
96676
96677
  // lib/constants.ts
96677
96678
  var DEFAULT_PCB_THICKNESS_MM = 1.6;
96678
96679
 
96680
+ // lib/utils/normalize-symbol-name.ts
96681
+ var normalizeSymbolName = (name) => {
96682
+ const trimmedName = name.trim();
96683
+ if (trimmedName === "+") return "_POS";
96684
+ if (trimmedName === "-") return "_NEG";
96685
+ return trimmedName;
96686
+ };
96687
+
96679
96688
  // lib/convert-easyeda-json-to-tscircuit-soup-json.ts
96680
96689
  var mil2mm = (mil) => {
96681
96690
  if (typeof mil === "number") return mm(`${mil}mil`);
@@ -96827,7 +96836,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, { useModelCdn, shouldRecente
96827
96836
  const labels = [];
96828
96837
  if (pad2.number) labels.push(pad2.number.toString());
96829
96838
  const pin = pins.find((p4) => p4.pinNumber === pad2.number);
96830
- if (pin) labels.push(pin.label);
96839
+ if (pin) labels.push(normalizeSymbolName(pin.label));
96831
96840
  return labels;
96832
96841
  });
96833
96842
  const normalizedPinLabels = normalizePinLabels(pinLabelSets);
@@ -96994,7 +97003,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, { useModelCdn, shouldRecente
96994
97003
  type: "pcb_silkscreen_text",
96995
97004
  pcb_silkscreen_text_id: `pcb_silkscreen_text_${index + 1}`,
96996
97005
  pcb_component_id: "pcb_component_1",
96997
- text: shape.text,
97006
+ text: normalizeSymbolName(shape.text),
96998
97007
  anchor_position: {
96999
97008
  x: mil2mm(shape.x),
97000
97009
  y: mil2mm(shape.y)
@@ -97055,10 +97064,13 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, { useModelCdn, shouldRecente
97055
97064
  if (e4.type === "pcb_cutout") {
97056
97065
  if (e4.shape === "polygon") {
97057
97066
  e4.points = e4.points.map((p4) => applyToPoint(matrix2, p4));
97058
- } else if (e4.shape === "path") {
97059
- e4.route = e4.route.map((p4) => applyToPoint(matrix2, p4));
97060
97067
  } else if (e4.shape === "circle" || e4.shape === "rect") {
97061
97068
  e4.center = applyToPoint(matrix2, e4.center);
97069
+ } else if ("route" in e4) {
97070
+ const cutoutPath = e4;
97071
+ cutoutPath.route = cutoutPath.route.map(
97072
+ (p4) => applyToPoint(matrix2, p4)
97073
+ );
97062
97074
  }
97063
97075
  } else if (e4.type === "pcb_smtpad" && e4.shape === "polygon") {
97064
97076
  e4.points = e4.points.map((p4) => applyToPoint(matrix2, p4));
@@ -97138,7 +97150,7 @@ var import_promises2 = __toESM(require("fs/promises"), 1);
97138
97150
  var package_default2 = {
97139
97151
  name: "easyeda",
97140
97152
  type: "module",
97141
- version: "0.0.231",
97153
+ version: "0.0.233",
97142
97154
  files: [
97143
97155
  "dist"
97144
97156
  ],
@@ -97175,6 +97187,7 @@ var package_default2 = {
97175
97187
  "easyeda-converter": "./dist/main.cjs",
97176
97188
  easyeda: "./dist/main.cjs"
97177
97189
  },
97190
+ dependencies: {},
97178
97191
  devDependencies: {
97179
97192
  "@biomejs/biome": "^1.9.4",
97180
97193
  "@tscircuit/circuit-json-util": "^0.0.67",
@@ -97182,6 +97195,7 @@ var package_default2 = {
97182
97195
  "@types/bun": "latest",
97183
97196
  "bun-match-svg": "^0.0.13",
97184
97197
  "circuit-json-to-gltf": "^0.0.35",
97198
+ "circuit-to-svg": "^0.0.284",
97185
97199
  "looks-same": "^9.0.1",
97186
97200
  poppygl: "^0.0.16",
97187
97201
  "transformation-matrix": "^2.16.1",