schematic-symbols 0.0.107 → 0.0.108
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/index.d.ts +3 -1
 - package/dist/index.js +305 -0
 - package/dist/index.js.map +1 -1
 - package/package.json +5 -2
 - package/symbols/crystal_4pin_horz.ts +11 -0
 - package/symbols/crystal_4pin_vert.ts +10 -0
 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "schematic-symbols",
         
     | 
| 
       3 
3 
     | 
    
         
             
              "main": "./dist/index.js",
         
     | 
| 
       4 
     | 
    
         
            -
              "version": "0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              "version": "0.0.108",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "type": "module",
         
     | 
| 
       6 
6 
     | 
    
         
             
              "files": [
         
     | 
| 
       7 
7 
     | 
    
         
             
                "dist",
         
     | 
| 
         @@ -18,7 +18,9 @@ 
     | 
|
| 
       18 
18 
     | 
    
         
             
                "generate:all": "bun run scripts/generate-symbols-from-asset-svgs.ts && bun run format",
         
     | 
| 
       19 
19 
     | 
    
         
             
                "format:check": "bunx biome format",
         
     | 
| 
       20 
20 
     | 
    
         
             
                "format": "bunx biome format . --write",
         
     | 
| 
       21 
     | 
    
         
            -
                "vercel-build": "bun run build && bun run ./scripts/build.ts"
         
     | 
| 
      
 21 
     | 
    
         
            +
                "vercel-build": "bun run build && bun run ./scripts/build.ts",
         
     | 
| 
      
 22 
     | 
    
         
            +
                "prepare": "husky",
         
     | 
| 
      
 23 
     | 
    
         
            +
                "snapshot:validate": "bun run scripts/validate-snapshots.ts"
         
     | 
| 
       22 
24 
     | 
    
         
             
              },
         
     | 
| 
       23 
25 
     | 
    
         
             
              "devDependencies": {
         
     | 
| 
       24 
26 
     | 
    
         
             
                "@biomejs/biome": "^1.9.4",
         
     | 
| 
         @@ -26,6 +28,7 @@ 
     | 
|
| 
       26 
28 
     | 
    
         
             
                "@types/prompts": "^2.4.9",
         
     | 
| 
       27 
29 
     | 
    
         
             
                "@types/svg-path-parser": "^1.1.6",
         
     | 
| 
       28 
30 
     | 
    
         
             
                "bun-match-svg": "^0.0.6",
         
     | 
| 
      
 31 
     | 
    
         
            +
                "husky": "^9.1.7",
         
     | 
| 
       29 
32 
     | 
    
         
             
                "kleur": "^4.1.5",
         
     | 
| 
       30 
33 
     | 
    
         
             
                "make-vfs": "1.0.15",
         
     | 
| 
       31 
34 
     | 
    
         
             
                "prompts": "^2.4.2",
         
     | 
| 
         @@ -0,0 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import svgJson from "assets/generated/crystal_4pin.json"
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            export default modifySymbol(svgJson)
         
     | 
| 
      
 5 
     | 
    
         
            +
              .labelPort("top1", ["2", "gnd1"])
         
     | 
| 
      
 6 
     | 
    
         
            +
              .labelPort("bottom1", ["4", "gnd2"])
         
     | 
| 
      
 7 
     | 
    
         
            +
              .labelPort("left1", ["1"])
         
     | 
| 
      
 8 
     | 
    
         
            +
              .labelPort("right1", ["3"])
         
     | 
| 
      
 9 
     | 
    
         
            +
              .changeTextAnchor("{REF}", "bottom_right")
         
     | 
| 
      
 10 
     | 
    
         
            +
              .changeTextAnchor("{VAL}", "top_left")
         
     | 
| 
      
 11 
     | 
    
         
            +
              .build()
         
     | 
| 
         @@ -0,0 +1,10 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import crystal_4pin_horz from "./crystal_4pin_horz"
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { rotateRightFacingSymbol } from "drawing/rotateSymbol"
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
         
     | 
| 
      
 4 
     | 
    
         
            +
            import svgJson from "assets/generated/crystal_4pin.json"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            export default modifySymbol(crystal_4pin_horz)
         
     | 
| 
      
 7 
     | 
    
         
            +
              .rotateRightFacingSymbol("up")
         
     | 
| 
      
 8 
     | 
    
         
            +
              .changeTextAnchor("{REF}", "top_right")
         
     | 
| 
      
 9 
     | 
    
         
            +
              .changeTextAnchor("{VAL}", "bottom_left")
         
     | 
| 
      
 10 
     | 
    
         
            +
              .build()
         
     |