@tobisk/pcbs 1.0.0

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 (168) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +186 -0
  3. package/dist/src/cli/cli.d.ts +6 -0
  4. package/dist/src/cli/cli.js +87 -0
  5. package/dist/src/cli/cli.js.map +1 -0
  6. package/dist/src/cli/codegen.d.ts +25 -0
  7. package/dist/src/cli/codegen.js +170 -0
  8. package/dist/src/cli/codegen.js.map +1 -0
  9. package/dist/src/cli/commands/export.d.ts +13 -0
  10. package/dist/src/cli/commands/export.js +301 -0
  11. package/dist/src/cli/commands/export.js.map +1 -0
  12. package/dist/src/cli/commands/lib.d.ts +10 -0
  13. package/dist/src/cli/commands/lib.js +158 -0
  14. package/dist/src/cli/commands/lib.js.map +1 -0
  15. package/dist/src/cli/commands/parts.d.ts +4 -0
  16. package/dist/src/cli/commands/parts.js +104 -0
  17. package/dist/src/cli/commands/parts.js.map +1 -0
  18. package/dist/src/cli/commands/setup.d.ts +4 -0
  19. package/dist/src/cli/commands/setup.js +86 -0
  20. package/dist/src/cli/commands/setup.js.map +1 -0
  21. package/dist/src/cli/commands/synth.d.ts +4 -0
  22. package/dist/src/cli/commands/synth.js +75 -0
  23. package/dist/src/cli/commands/synth.js.map +1 -0
  24. package/dist/src/cli/commands/types.d.ts +1 -0
  25. package/dist/src/cli/commands/types.js +140 -0
  26. package/dist/src/cli/commands/types.js.map +1 -0
  27. package/dist/src/cli/commands/validate.d.ts +5 -0
  28. package/dist/src/cli/commands/validate.js +105 -0
  29. package/dist/src/cli/commands/validate.js.map +1 -0
  30. package/dist/src/cli/config.d.ts +9 -0
  31. package/dist/src/cli/config.js +80 -0
  32. package/dist/src/cli/config.js.map +1 -0
  33. package/dist/src/cli/env.d.ts +4 -0
  34. package/dist/src/cli/env.js +166 -0
  35. package/dist/src/cli/env.js.map +1 -0
  36. package/dist/src/cli/search-jlc.d.ts +0 -0
  37. package/dist/src/cli/search-jlc.js +23 -0
  38. package/dist/src/cli/search-jlc.js.map +1 -0
  39. package/dist/src/cli/synthesis.d.ts +11 -0
  40. package/dist/src/cli/synthesis.js +120 -0
  41. package/dist/src/cli/synthesis.js.map +1 -0
  42. package/dist/src/cli/utils/bom.d.ts +19 -0
  43. package/dist/src/cli/utils/bom.js +130 -0
  44. package/dist/src/cli/utils/bom.js.map +1 -0
  45. package/dist/src/cli/utils/cpl.d.ts +18 -0
  46. package/dist/src/cli/utils/cpl.js +101 -0
  47. package/dist/src/cli/utils/cpl.js.map +1 -0
  48. package/dist/src/cli/utils.d.ts +11 -0
  49. package/dist/src/cli/utils.js +136 -0
  50. package/dist/src/cli/utils.js.map +1 -0
  51. package/dist/src/generate-kicad-types.d.ts +1 -0
  52. package/dist/src/generate-kicad-types.js +137 -0
  53. package/dist/src/generate-kicad-types.js.map +1 -0
  54. package/dist/src/synth/3d/Kicad3DModel.d.ts +81 -0
  55. package/dist/src/synth/3d/Kicad3DModel.js +250 -0
  56. package/dist/src/synth/3d/Kicad3DModel.js.map +1 -0
  57. package/dist/src/synth/3d/booleans.d.ts +10 -0
  58. package/dist/src/synth/3d/booleans.js +30 -0
  59. package/dist/src/synth/3d/booleans.js.map +1 -0
  60. package/dist/src/synth/3d/fillet.d.ts +14 -0
  61. package/dist/src/synth/3d/fillet.js +47 -0
  62. package/dist/src/synth/3d/fillet.js.map +1 -0
  63. package/dist/src/synth/3d/index.d.ts +7 -0
  64. package/dist/src/synth/3d/index.js +14 -0
  65. package/dist/src/synth/3d/index.js.map +1 -0
  66. package/dist/src/synth/3d/occ-loader.d.ts +5 -0
  67. package/dist/src/synth/3d/occ-loader.js +77 -0
  68. package/dist/src/synth/3d/occ-loader.js.map +1 -0
  69. package/dist/src/synth/3d/occ.d.ts +3 -0
  70. package/dist/src/synth/3d/occ.js +31 -0
  71. package/dist/src/synth/3d/occ.js.map +1 -0
  72. package/dist/src/synth/3d/primitives.d.ts +38 -0
  73. package/dist/src/synth/3d/primitives.js +58 -0
  74. package/dist/src/synth/3d/primitives.js.map +1 -0
  75. package/dist/src/synth/3d/stepWriter.d.ts +7 -0
  76. package/dist/src/synth/3d/stepWriter.js +72 -0
  77. package/dist/src/synth/3d/stepWriter.js.map +1 -0
  78. package/dist/src/synth/3d/transforms.d.ts +18 -0
  79. package/dist/src/synth/3d/transforms.js +74 -0
  80. package/dist/src/synth/3d/transforms.js.map +1 -0
  81. package/dist/src/synth/3d/types.d.ts +54 -0
  82. package/dist/src/synth/3d/types.js +21 -0
  83. package/dist/src/synth/3d/types.js.map +1 -0
  84. package/dist/src/synth/3d/vrmlWriter.d.ts +5 -0
  85. package/dist/src/synth/3d/vrmlWriter.js +171 -0
  86. package/dist/src/synth/3d/vrmlWriter.js.map +1 -0
  87. package/dist/src/synth/Component.d.ts +67 -0
  88. package/dist/src/synth/Component.js +185 -0
  89. package/dist/src/synth/Component.js.map +1 -0
  90. package/dist/src/synth/Composable.d.ts +73 -0
  91. package/dist/src/synth/Composable.js +128 -0
  92. package/dist/src/synth/Composable.js.map +1 -0
  93. package/dist/src/synth/KicadFootprint.d.ts +97 -0
  94. package/dist/src/synth/KicadFootprint.js +312 -0
  95. package/dist/src/synth/KicadFootprint.js.map +1 -0
  96. package/dist/src/synth/KicadLibrary.d.ts +66 -0
  97. package/dist/src/synth/KicadLibrary.js +162 -0
  98. package/dist/src/synth/KicadLibrary.js.map +1 -0
  99. package/dist/src/synth/KicadSymbol.d.ts +71 -0
  100. package/dist/src/synth/KicadSymbol.js +190 -0
  101. package/dist/src/synth/KicadSymbol.js.map +1 -0
  102. package/dist/src/synth/Layout.d.ts +37 -0
  103. package/dist/src/synth/Layout.js +58 -0
  104. package/dist/src/synth/Layout.js.map +1 -0
  105. package/dist/src/synth/Markers.d.ts +35 -0
  106. package/dist/src/synth/Markers.js +48 -0
  107. package/dist/src/synth/Markers.js.map +1 -0
  108. package/dist/src/synth/Module.d.ts +56 -0
  109. package/dist/src/synth/Module.js +65 -0
  110. package/dist/src/synth/Module.js.map +1 -0
  111. package/dist/src/synth/Net.d.ts +23 -0
  112. package/dist/src/synth/Net.js +95 -0
  113. package/dist/src/synth/Net.js.map +1 -0
  114. package/dist/src/synth/Registry.d.ts +36 -0
  115. package/dist/src/synth/Registry.js +75 -0
  116. package/dist/src/synth/Registry.js.map +1 -0
  117. package/dist/src/synth/Schematic.d.ts +36 -0
  118. package/dist/src/synth/Schematic.js +51 -0
  119. package/dist/src/synth/Schematic.js.map +1 -0
  120. package/dist/src/synth/index.d.ts +21 -0
  121. package/dist/src/synth/index.js +46 -0
  122. package/dist/src/synth/index.js.map +1 -0
  123. package/dist/src/synth/kicad-types-placeholder.d.ts +6 -0
  124. package/dist/src/synth/kicad-types-placeholder.js +7 -0
  125. package/dist/src/synth/kicad-types-placeholder.js.map +1 -0
  126. package/dist/src/synth/types.d.ts +111 -0
  127. package/dist/src/synth/types.js +23 -0
  128. package/dist/src/synth/types.js.map +1 -0
  129. package/dist/src/tests/3d-model.test.d.ts +1 -0
  130. package/dist/src/tests/3d-model.test.js +282 -0
  131. package/dist/src/tests/3d-model.test.js.map +1 -0
  132. package/dist/src/tests/codegen.test.d.ts +1 -0
  133. package/dist/src/tests/codegen.test.js +80 -0
  134. package/dist/src/tests/codegen.test.js.map +1 -0
  135. package/dist/src/tests/dmx_node.test.d.ts +1 -0
  136. package/dist/src/tests/dmx_node.test.js +42 -0
  137. package/dist/src/tests/dmx_node.test.js.map +1 -0
  138. package/dist/src/tests/dnc.test.d.ts +1 -0
  139. package/dist/src/tests/dnc.test.js +100 -0
  140. package/dist/src/tests/dnc.test.js.map +1 -0
  141. package/dist/src/tests/kicad-lib.test.d.ts +1 -0
  142. package/dist/src/tests/kicad-lib.test.js +465 -0
  143. package/dist/src/tests/kicad-lib.test.js.map +1 -0
  144. package/dist/src/tests/layout.test.d.ts +1 -0
  145. package/dist/src/tests/layout.test.js +92 -0
  146. package/dist/src/tests/layout.test.js.map +1 -0
  147. package/dist/src/tests/migration.test.d.ts +1 -0
  148. package/dist/src/tests/migration.test.js +58 -0
  149. package/dist/src/tests/migration.test.js.map +1 -0
  150. package/dist/src/tests/net_merging.test.d.ts +1 -0
  151. package/dist/src/tests/net_merging.test.js +97 -0
  152. package/dist/src/tests/net_merging.test.js.map +1 -0
  153. package/dist/src/tests/occ-minimal.test.d.ts +1 -0
  154. package/dist/src/tests/occ-minimal.test.js +14 -0
  155. package/dist/src/tests/occ-minimal.test.js.map +1 -0
  156. package/dist/src/tests/placement.test.d.ts +1 -0
  157. package/dist/src/tests/placement.test.js +130 -0
  158. package/dist/src/tests/placement.test.js.map +1 -0
  159. package/dist/src/tests/synthesis.test.d.ts +1 -0
  160. package/dist/src/tests/synthesis.test.js +88 -0
  161. package/dist/src/tests/synthesis.test.js.map +1 -0
  162. package/dist/src/types/kicad-library.d.ts +6 -0
  163. package/dist/src/types/kicad-library.js +7 -0
  164. package/dist/src/types/kicad-library.js.map +1 -0
  165. package/dist/src/types/kicad-library.ts +61770 -0
  166. package/package.json +57 -0
  167. package/scripts/patch-opencascade.ts +18 -0
  168. package/scripts/wasm-stub.js +1 -0
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@tobisk/pcbs",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript-based PCB Design Framework",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/kellertobias/pcbs-framework.git"
11
+ },
12
+ "main": "./dist/src/synth/index.js",
13
+ "types": "./dist/src/synth/index.d.ts",
14
+ "bin": {
15
+ "pcb": "./dist/src/cli/cli.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "scripts"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsc && tsc-alias",
23
+ "test": "vitest run",
24
+ "test:watch": "vitest",
25
+ "prepublishOnly": "npm run build",
26
+ "postinstall": "ts-node scripts/patch-opencascade.ts && ts-node -P tsconfig.json ./src/cli/cli.ts setup"
27
+ },
28
+ "keywords": [
29
+ "kicad",
30
+ "typescript",
31
+ "pcb"
32
+ ],
33
+ "author": "Tobias S. Keller",
34
+ "license": "MIT",
35
+ "devDependencies": {
36
+ "@semantic-release/changelog": "^6.0.3",
37
+ "@semantic-release/commit-analyzer": "^13.0.1",
38
+ "@semantic-release/git": "^10.0.1",
39
+ "@semantic-release/github": "^11.0.6",
40
+ "@semantic-release/npm": "^12.0.2",
41
+ "@semantic-release/release-notes-generator": "^14.1.0",
42
+ "@types/node": "^25.2.3",
43
+ "biome": "^0.3.3",
44
+ "semantic-release": "^24.2.9",
45
+ "ts-node": "^10.9.2",
46
+ "tsc-alias": "^1.8.16",
47
+ "tsconfig-paths": "^4.2.0",
48
+ "typescript": "^5.9.3",
49
+ "vitest": "^4.0.18"
50
+ },
51
+ "dependencies": {
52
+ "opencascade.js": "^2.0.0-beta.b5ff984",
53
+ "ts-node": "^10.9.2",
54
+ "tsconfig-paths": "^4.2.0",
55
+ "vite-tsconfig-paths": "^6.1.1"
56
+ }
57
+ }
@@ -0,0 +1,18 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ try {
5
+ const pkgPath = require.resolve("opencascade.js/package.json");
6
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
7
+
8
+ if (pkg.type !== "module") {
9
+ pkg.type = "module";
10
+ fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
11
+ console.log("✅ Patched opencascade.js package.json with type: module");
12
+ } else {
13
+ console.log("ℹ️ opencascade.js already has type: module");
14
+ }
15
+ } catch (e) {
16
+ console.error("❌ Failed to patch opencascade.js:", e);
17
+ process.exit(1);
18
+ }
@@ -0,0 +1 @@
1
+ export default "wasm-stub";