@rulecad/pcb 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/package.json +6 -2
  2. package/pcb.mjs +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulecad/pcb",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Circuit boards from rules: parts from rule sets or any standard footprint, quarter-turn rotation, nets and autorouting; keyboards with every matrix track drawn by rule. Gerbers, KiCad files and a JLCPCB BOM. Circuit JSON written directly: no React.",
5
5
  "type": "module",
6
6
  "exports": "./pcb.mjs",
@@ -29,11 +29,15 @@
29
29
  "url": "git+https://github.com/JoniBach/rulecad.git",
30
30
  "directory": "packages/pcb"
31
31
  },
32
+ "homepage": "https://github.com/JoniBach/rulecad/tree/main/packages/pcb#readme",
33
+ "bugs": {
34
+ "url": "https://github.com/JoniBach/rulecad/issues"
35
+ },
32
36
  "dependencies": {
33
37
  "@flatten-js/core": "1.6.14",
34
38
  "@jscad/modeling": "^2.12.0",
39
+ "@rulecad/rules": "^0.3.4",
35
40
  "@resvg/resvg-js": "2.6.2",
36
- "@rulecad/cad": "^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0",
37
41
  "@rulecad/smooth": "^0.1.0",
38
42
  "@tscircuit/capacity-autorouter": "0.0.982",
39
43
  "@tscircuit/checks": "0.0.264",
package/pcb.mjs CHANGED
@@ -15,7 +15,11 @@ import fs from 'node:fs';
15
15
  import path from 'node:path';
16
16
  import { circuitJson, bounds, smtBounds, slideClear } from './circuit.mjs';
17
17
  export { bounds };
18
- import { loadRuleSet } from '@rulecad/cad/rules';
18
+ import { createRequire } from 'node:module';
19
+ // The published rule sets a footprint's pins come from (a Pico's GPIO, a XIAO's labels): read from @rulecad/rules as
20
+ // published, not through @rulecad/cad, which pcb would then depend on (and cad names pcb: a loop), and which copies a
21
+ // set into the current folder when it reads one
22
+ const loadRuleSet = (name) => createRequire(import.meta.url)(`@rulecad/rules/${name}.json`);
19
23
  import jscad from '@jscad/modeling';
20
24
 
21
25
  // A rows × cols grid of keys at the key pitch, centred on the origin: [{ r, c, x, y, n }], n counting from 1, row 0