schematic-symbols 0.0.107 → 0.0.109
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 +358 -53
- 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/symbols/resonator_horz.ts +2 -2
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.109",
|
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()
|
@@ -14,14 +14,14 @@ export default defineSymbol({
|
|
14
14
|
text: "{REF}",
|
15
15
|
x: 0.01596175000000022,
|
16
16
|
y: -0.5308501500000009,
|
17
|
-
anchor: "
|
17
|
+
anchor: "middle_top",
|
18
18
|
},
|
19
19
|
{
|
20
20
|
type: "text",
|
21
21
|
text: "{VAL}",
|
22
22
|
x: 0.013116750000000454,
|
23
23
|
y: 0.5408501499999989,
|
24
|
-
anchor: "
|
24
|
+
anchor: "middle_bottom",
|
25
25
|
},
|
26
26
|
] as any,
|
27
27
|
ports: [
|