@tscircuit/cli 0.1.2130 → 0.1.2131

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.
@@ -19056,7 +19056,7 @@ function createSvgObjectsFromPcbVia(hole, ctx) {
19056
19056
  value: "",
19057
19057
  attributes: {
19058
19058
  "data-type": "pcb_via",
19059
- "data-pcb-layer": "through"
19059
+ "data-pcb-layer": showSolderMask && isTented ? layer : "through"
19060
19060
  },
19061
19061
  children: [
19062
19062
  {
@@ -21952,7 +21952,7 @@ function getSoftwareUsedString(circuitJson) {
21952
21952
  var package_default = {
21953
21953
  name: "circuit-to-svg",
21954
21954
  type: "module",
21955
- version: "0.0.424",
21955
+ version: "0.0.429",
21956
21956
  repository: {
21957
21957
  type: "git",
21958
21958
  url: "https://github.com/tscircuit/circuit-to-svg.git"
@@ -21991,7 +21991,7 @@ var package_default = {
21991
21991
  "react-cosmos": "7.0.0",
21992
21992
  "react-cosmos-plugin-vite": "7.0.0",
21993
21993
  "react-dom": "19.1.0",
21994
- tscircuit: "^0.0.2018",
21994
+ tscircuit: "^0.0.2629",
21995
21995
  tsup: "^8.0.2",
21996
21996
  typescript: "^5.4.5",
21997
21997
  "vite-tsconfig-paths": "^5.0.1"
@@ -22107,6 +22107,63 @@ function getTypePriority(type) {
22107
22107
  return DEFAULT_TYPE_PRIORITY;
22108
22108
  return TYPE_PRIORITY[type] ?? DEFAULT_TYPE_PRIORITY;
22109
22109
  }
22110
+ function createViaTentingMask({
22111
+ objects,
22112
+ layer,
22113
+ width,
22114
+ height
22115
+ }) {
22116
+ const openings = objects.filter((object) => object.attributes["data-pcb-layer"] === layer && (object.attributes.class === "pcb-pad" || object.attributes.class === "pcb-pad-exposed" || object.attributes["data-type"] === "pcb_soldermask_opening"));
22117
+ if (openings.length === 0)
22118
+ return null;
22119
+ const tenting = objects.filter((object) => object.attributes["data-type"] === "pcb_via").flatMap((object) => object.children).filter((object) => object.attributes.class === "pcb-via-tenting");
22120
+ if (tenting.length === 0)
22121
+ return null;
22122
+ const maskId = `via-tenting-mask-${layer}`;
22123
+ for (const object of tenting) {
22124
+ object.attributes.mask = `url(#${maskId})`;
22125
+ }
22126
+ return {
22127
+ name: "defs",
22128
+ type: "element",
22129
+ value: "",
22130
+ attributes: {},
22131
+ children: [
22132
+ {
22133
+ name: "mask",
22134
+ type: "element",
22135
+ value: "",
22136
+ attributes: {
22137
+ id: maskId,
22138
+ maskUnits: "userSpaceOnUse",
22139
+ x: "0",
22140
+ y: "0",
22141
+ width: String(width),
22142
+ height: String(height)
22143
+ },
22144
+ children: [
22145
+ {
22146
+ name: "rect",
22147
+ type: "element",
22148
+ value: "",
22149
+ attributes: {
22150
+ x: "0",
22151
+ y: "0",
22152
+ width: String(width),
22153
+ height: String(height),
22154
+ fill: "white"
22155
+ },
22156
+ children: []
22157
+ },
22158
+ ...openings.map((opening) => ({
22159
+ ...opening,
22160
+ attributes: { ...opening.attributes, fill: "black" }
22161
+ }))
22162
+ ]
22163
+ }
22164
+ ]
22165
+ };
22166
+ }
22110
22167
  function createErrorTextOverlay(circuitJson, dataType = "error_text_overlay") {
22111
22168
  const errorElms = circuitJson.filter((elm) => elm.type.endsWith("_error"));
22112
22169
  if (errorElms.length === 0) {
@@ -23520,6 +23577,15 @@ function convertCircuitJsonToPcbSvg2(circuitJson, options) {
23520
23577
  if (copperPourTraceMaskDefs) {
23521
23578
  children.push(copperPourTraceMaskDefs);
23522
23579
  }
23580
+ const viaTentingMask = createViaTentingMask({
23581
+ objects: unsortedSvgObjects,
23582
+ layer: layer ?? "top",
23583
+ width: svgWidth,
23584
+ height: svgHeight
23585
+ });
23586
+ if (viaTentingMask) {
23587
+ children.push(viaTentingMask);
23588
+ }
23523
23589
  children.push({
23524
23590
  name: "rect",
23525
23591
  type: "element",
package/dist/cli/main.js CHANGED
@@ -154298,7 +154298,7 @@ var import_perfect_cli = __toESM3(require_dist3(), 1);
154298
154298
  // lib/getVersion.ts
154299
154299
  import { createRequire as createRequire2 } from "node:module";
154300
154300
  // package.json
154301
- var version = "0.1.2129";
154301
+ var version = "0.1.2130";
154302
154302
  var package_default = {
154303
154303
  name: "@tscircuit/cli",
154304
154304
  version,
@@ -154329,6 +154329,7 @@ var package_default = {
154329
154329
  "@tscircuit/props": "^0.0.657",
154330
154330
  "@tscircuit/runframe": "^0.0.2786",
154331
154331
  "@tscircuit/schematic-match-adapt": "^0.0.22",
154332
+ "@tscircuit/schematic-trace-solver": "^0.0.204",
154332
154333
  "@tscircuit/solver-utils": "0.0.16",
154333
154334
  "@types/bun": "^1.2.2",
154334
154335
  "@types/configstore": "^6.0.2",
@@ -154357,8 +154358,8 @@ var package_default = {
154357
154358
  "circuit-json-to-tscircuit": "^0.0.42",
154358
154359
  "circuit-json-trace-length-analysis": "github:tscircuit/circuit-json-trace-length-analysis#2b44792a40df0ca83b6bfb6ac95ed5e35e7168b8",
154359
154360
  "circuit-to-canvas": "^0.0.123",
154360
- "circuit-to-svg": "^0.0.393",
154361
- "circuit-to-svg-xray": "npm:circuit-to-svg@0.0.425",
154361
+ "circuit-to-svg": "^0.0.430",
154362
+ "circuit-to-svg-xray": "npm:circuit-to-svg@0.0.430",
154362
154363
  commander: "^14.0.0",
154363
154364
  conf: "^13.1.0",
154364
154365
  configstore: "^7.0.0",
@@ -154388,6 +154389,7 @@ var package_default = {
154388
154389
  prompts: "^2.4.2",
154389
154390
  "proper-lockfile": "^4.1.2",
154390
154391
  redaxios: "^0.5.1",
154392
+ "schematic-symbols": "^0.0.246",
154391
154393
  semver: "^7.6.3",
154392
154394
  spicets: "^0.0.4",
154393
154395
  stepts: "^0.0.3",
@@ -173035,7 +173037,7 @@ function createSvgObjectsFromPcbVia(hole, ctx) {
173035
173037
  value: "",
173036
173038
  attributes: {
173037
173039
  "data-type": "pcb_via",
173038
- "data-pcb-layer": "through"
173040
+ "data-pcb-layer": showSolderMask && isTented ? layer : "through"
173039
173041
  },
173040
173042
  children: [
173041
173043
  {
@@ -175931,7 +175933,7 @@ function getSoftwareUsedString(circuitJson) {
175931
175933
  var package_default2 = {
175932
175934
  name: "circuit-to-svg",
175933
175935
  type: "module",
175934
- version: "0.0.424",
175936
+ version: "0.0.429",
175935
175937
  repository: {
175936
175938
  type: "git",
175937
175939
  url: "https://github.com/tscircuit/circuit-to-svg.git"
@@ -175970,7 +175972,7 @@ var package_default2 = {
175970
175972
  "react-cosmos": "7.0.0",
175971
175973
  "react-cosmos-plugin-vite": "7.0.0",
175972
175974
  "react-dom": "19.1.0",
175973
- tscircuit: "^0.0.2018",
175975
+ tscircuit: "^0.0.2629",
175974
175976
  tsup: "^8.0.2",
175975
175977
  typescript: "^5.4.5",
175976
175978
  "vite-tsconfig-paths": "^5.0.1"
@@ -176086,6 +176088,63 @@ function getTypePriority(type) {
176086
176088
  return DEFAULT_TYPE_PRIORITY;
176087
176089
  return TYPE_PRIORITY[type] ?? DEFAULT_TYPE_PRIORITY;
176088
176090
  }
176091
+ function createViaTentingMask({
176092
+ objects,
176093
+ layer,
176094
+ width,
176095
+ height
176096
+ }) {
176097
+ const openings = objects.filter((object) => object.attributes["data-pcb-layer"] === layer && (object.attributes.class === "pcb-pad" || object.attributes.class === "pcb-pad-exposed" || object.attributes["data-type"] === "pcb_soldermask_opening"));
176098
+ if (openings.length === 0)
176099
+ return null;
176100
+ const tenting = objects.filter((object) => object.attributes["data-type"] === "pcb_via").flatMap((object) => object.children).filter((object) => object.attributes.class === "pcb-via-tenting");
176101
+ if (tenting.length === 0)
176102
+ return null;
176103
+ const maskId = `via-tenting-mask-${layer}`;
176104
+ for (const object of tenting) {
176105
+ object.attributes.mask = `url(#${maskId})`;
176106
+ }
176107
+ return {
176108
+ name: "defs",
176109
+ type: "element",
176110
+ value: "",
176111
+ attributes: {},
176112
+ children: [
176113
+ {
176114
+ name: "mask",
176115
+ type: "element",
176116
+ value: "",
176117
+ attributes: {
176118
+ id: maskId,
176119
+ maskUnits: "userSpaceOnUse",
176120
+ x: "0",
176121
+ y: "0",
176122
+ width: String(width),
176123
+ height: String(height)
176124
+ },
176125
+ children: [
176126
+ {
176127
+ name: "rect",
176128
+ type: "element",
176129
+ value: "",
176130
+ attributes: {
176131
+ x: "0",
176132
+ y: "0",
176133
+ width: String(width),
176134
+ height: String(height),
176135
+ fill: "white"
176136
+ },
176137
+ children: []
176138
+ },
176139
+ ...openings.map((opening) => ({
176140
+ ...opening,
176141
+ attributes: { ...opening.attributes, fill: "black" }
176142
+ }))
176143
+ ]
176144
+ }
176145
+ ]
176146
+ };
176147
+ }
176089
176148
  function createErrorTextOverlay(circuitJson, dataType = "error_text_overlay") {
176090
176149
  const errorElms = circuitJson.filter((elm) => elm.type.endsWith("_error"));
176091
176150
  if (errorElms.length === 0) {
@@ -177499,6 +177558,15 @@ function convertCircuitJsonToPcbSvg2(circuitJson, options) {
177499
177558
  if (copperPourTraceMaskDefs) {
177500
177559
  children.push(copperPourTraceMaskDefs);
177501
177560
  }
177561
+ const viaTentingMask = createViaTentingMask({
177562
+ objects: unsortedSvgObjects,
177563
+ layer: layer ?? "top",
177564
+ width: svgWidth,
177565
+ height: svgHeight
177566
+ });
177567
+ if (viaTentingMask) {
177568
+ children.push(viaTentingMask);
177569
+ }
177502
177570
  children.push({
177503
177571
  name: "rect",
177504
177572
  type: "element",
@@ -8139,7 +8139,7 @@ function createSvgObjectsFromPcbVia(hole, ctx) {
8139
8139
  value: "",
8140
8140
  attributes: {
8141
8141
  "data-type": "pcb_via",
8142
- "data-pcb-layer": "through"
8142
+ "data-pcb-layer": showSolderMask && isTented ? layer : "through"
8143
8143
  },
8144
8144
  children: [
8145
8145
  {
@@ -11035,7 +11035,7 @@ function getSoftwareUsedString(circuitJson) {
11035
11035
  var package_default = {
11036
11036
  name: "circuit-to-svg",
11037
11037
  type: "module",
11038
- version: "0.0.424",
11038
+ version: "0.0.429",
11039
11039
  repository: {
11040
11040
  type: "git",
11041
11041
  url: "https://github.com/tscircuit/circuit-to-svg.git"
@@ -11074,7 +11074,7 @@ var package_default = {
11074
11074
  "react-cosmos": "7.0.0",
11075
11075
  "react-cosmos-plugin-vite": "7.0.0",
11076
11076
  "react-dom": "19.1.0",
11077
- tscircuit: "^0.0.2018",
11077
+ tscircuit: "^0.0.2629",
11078
11078
  tsup: "^8.0.2",
11079
11079
  typescript: "^5.4.5",
11080
11080
  "vite-tsconfig-paths": "^5.0.1"
@@ -11190,6 +11190,63 @@ function getTypePriority(type) {
11190
11190
  return DEFAULT_TYPE_PRIORITY;
11191
11191
  return TYPE_PRIORITY[type] ?? DEFAULT_TYPE_PRIORITY;
11192
11192
  }
11193
+ function createViaTentingMask({
11194
+ objects,
11195
+ layer,
11196
+ width,
11197
+ height
11198
+ }) {
11199
+ const openings = objects.filter((object) => object.attributes["data-pcb-layer"] === layer && (object.attributes.class === "pcb-pad" || object.attributes.class === "pcb-pad-exposed" || object.attributes["data-type"] === "pcb_soldermask_opening"));
11200
+ if (openings.length === 0)
11201
+ return null;
11202
+ const tenting = objects.filter((object) => object.attributes["data-type"] === "pcb_via").flatMap((object) => object.children).filter((object) => object.attributes.class === "pcb-via-tenting");
11203
+ if (tenting.length === 0)
11204
+ return null;
11205
+ const maskId = `via-tenting-mask-${layer}`;
11206
+ for (const object of tenting) {
11207
+ object.attributes.mask = `url(#${maskId})`;
11208
+ }
11209
+ return {
11210
+ name: "defs",
11211
+ type: "element",
11212
+ value: "",
11213
+ attributes: {},
11214
+ children: [
11215
+ {
11216
+ name: "mask",
11217
+ type: "element",
11218
+ value: "",
11219
+ attributes: {
11220
+ id: maskId,
11221
+ maskUnits: "userSpaceOnUse",
11222
+ x: "0",
11223
+ y: "0",
11224
+ width: String(width),
11225
+ height: String(height)
11226
+ },
11227
+ children: [
11228
+ {
11229
+ name: "rect",
11230
+ type: "element",
11231
+ value: "",
11232
+ attributes: {
11233
+ x: "0",
11234
+ y: "0",
11235
+ width: String(width),
11236
+ height: String(height),
11237
+ fill: "white"
11238
+ },
11239
+ children: []
11240
+ },
11241
+ ...openings.map((opening) => ({
11242
+ ...opening,
11243
+ attributes: { ...opening.attributes, fill: "black" }
11244
+ }))
11245
+ ]
11246
+ }
11247
+ ]
11248
+ };
11249
+ }
11193
11250
  function createErrorTextOverlay(circuitJson, dataType = "error_text_overlay") {
11194
11251
  const errorElms = circuitJson.filter((elm) => elm.type.endsWith("_error"));
11195
11252
  if (errorElms.length === 0) {
@@ -12603,6 +12660,15 @@ function convertCircuitJsonToPcbSvg(circuitJson, options) {
12603
12660
  if (copperPourTraceMaskDefs) {
12604
12661
  children.push(copperPourTraceMaskDefs);
12605
12662
  }
12663
+ const viaTentingMask = createViaTentingMask({
12664
+ objects: unsortedSvgObjects,
12665
+ layer: layer ?? "top",
12666
+ width: svgWidth,
12667
+ height: svgHeight
12668
+ });
12669
+ if (viaTentingMask) {
12670
+ children.push(viaTentingMask);
12671
+ }
12606
12672
  children.push({
12607
12673
  name: "rect",
12608
12674
  type: "element",
package/dist/lib/index.js CHANGED
@@ -69109,7 +69109,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
69109
69109
  }));
69110
69110
  };
69111
69111
  // package.json
69112
- var version = "0.1.2129";
69112
+ var version = "0.1.2130";
69113
69113
  var package_default = {
69114
69114
  name: "@tscircuit/cli",
69115
69115
  version,
@@ -69140,6 +69140,7 @@ var package_default = {
69140
69140
  "@tscircuit/props": "^0.0.657",
69141
69141
  "@tscircuit/runframe": "^0.0.2786",
69142
69142
  "@tscircuit/schematic-match-adapt": "^0.0.22",
69143
+ "@tscircuit/schematic-trace-solver": "^0.0.204",
69143
69144
  "@tscircuit/solver-utils": "0.0.16",
69144
69145
  "@types/bun": "^1.2.2",
69145
69146
  "@types/configstore": "^6.0.2",
@@ -69168,8 +69169,8 @@ var package_default = {
69168
69169
  "circuit-json-to-tscircuit": "^0.0.42",
69169
69170
  "circuit-json-trace-length-analysis": "github:tscircuit/circuit-json-trace-length-analysis#2b44792a40df0ca83b6bfb6ac95ed5e35e7168b8",
69170
69171
  "circuit-to-canvas": "^0.0.123",
69171
- "circuit-to-svg": "^0.0.393",
69172
- "circuit-to-svg-xray": "npm:circuit-to-svg@0.0.425",
69172
+ "circuit-to-svg": "^0.0.430",
69173
+ "circuit-to-svg-xray": "npm:circuit-to-svg@0.0.430",
69173
69174
  commander: "^14.0.0",
69174
69175
  conf: "^13.1.0",
69175
69176
  configstore: "^7.0.0",
@@ -69199,6 +69200,7 @@ var package_default = {
69199
69200
  prompts: "^2.4.2",
69200
69201
  "proper-lockfile": "^4.1.2",
69201
69202
  redaxios: "^0.5.1",
69203
+ "schematic-symbols": "^0.0.246",
69202
69204
  semver: "^7.6.3",
69203
69205
  spicets: "^0.0.4",
69204
69206
  stepts: "^0.0.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.2130",
3
+ "version": "0.1.2131",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/tscircuit/cli"
@@ -28,6 +28,7 @@
28
28
  "@tscircuit/props": "^0.0.657",
29
29
  "@tscircuit/runframe": "^0.0.2786",
30
30
  "@tscircuit/schematic-match-adapt": "^0.0.22",
31
+ "@tscircuit/schematic-trace-solver": "^0.0.204",
31
32
  "@tscircuit/solver-utils": "0.0.16",
32
33
  "@types/bun": "^1.2.2",
33
34
  "@types/configstore": "^6.0.2",
@@ -56,8 +57,8 @@
56
57
  "circuit-json-to-tscircuit": "^0.0.42",
57
58
  "circuit-json-trace-length-analysis": "github:tscircuit/circuit-json-trace-length-analysis#2b44792a40df0ca83b6bfb6ac95ed5e35e7168b8",
58
59
  "circuit-to-canvas": "^0.0.123",
59
- "circuit-to-svg": "^0.0.393",
60
- "circuit-to-svg-xray": "npm:circuit-to-svg@0.0.425",
60
+ "circuit-to-svg": "^0.0.430",
61
+ "circuit-to-svg-xray": "npm:circuit-to-svg@0.0.430",
61
62
  "commander": "^14.0.0",
62
63
  "conf": "^13.1.0",
63
64
  "configstore": "^7.0.0",
@@ -87,6 +88,7 @@
87
88
  "prompts": "^2.4.2",
88
89
  "proper-lockfile": "^4.1.2",
89
90
  "redaxios": "^0.5.1",
91
+ "schematic-symbols": "^0.0.246",
90
92
  "semver": "^7.6.3",
91
93
  "spicets": "^0.0.4",
92
94
  "stepts": "^0.0.3",