schematic-symbols 0.0.90 → 0.0.91
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 +470 -297
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/ground_horz.ts +37 -0
- package/symbols/ground_vert.ts +34 -0
package/package.json
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
import { defineSymbol } from "drawing/defineSymbol"
|
2
|
+
import svgJson from "assets/generated/ground.json"
|
3
|
+
import { Primitive } from "drawing/types"
|
4
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
5
|
+
|
6
|
+
// Extract paths, bounds, etc.
|
7
|
+
const { paths, circles, bounds, refblocks } = svgJson
|
8
|
+
|
9
|
+
// Horizontal orientation symbol
|
10
|
+
export const horizontalSymbol = defineSymbol({
|
11
|
+
primitives: [
|
12
|
+
...Object.values(paths),
|
13
|
+
...Object.values(circles),
|
14
|
+
{
|
15
|
+
type: "text",
|
16
|
+
text: "{REF}", // REF label for horizontal
|
17
|
+
x: -0.1, // Adjust this for the horizontal positioning of REF
|
18
|
+
y: -0.8, // Adjust this for the vertical positioning of REF
|
19
|
+
anchor: "middle_bottom", // Horizontal anchor for REF
|
20
|
+
},
|
21
|
+
{
|
22
|
+
type: "text",
|
23
|
+
text: "{VAL}", // VAL label for horizontal
|
24
|
+
x: -0.1, // Adjust for horizontal positioning of VAL
|
25
|
+
y: -0.1, // Adjust for vertical positioning of VAL
|
26
|
+
anchor: "middle_top", // Horizontal anchor for VAL
|
27
|
+
},
|
28
|
+
] as Primitive[],
|
29
|
+
ports: [{ ...refblocks.top1, labels: ["1"] }],
|
30
|
+
size: { width: bounds.width, height: bounds.height },
|
31
|
+
center: { x: bounds.centerX - 0.09, y: bounds.centerY - 0.45 },
|
32
|
+
})
|
33
|
+
|
34
|
+
// Vertical orientation symbol
|
35
|
+
|
36
|
+
// Export vertical symbol (rotated 90 degrees from original)
|
37
|
+
export default horizontalSymbol
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { defineSymbol } from "drawing/defineSymbol"
|
2
|
+
import svgJson from "assets/generated/ground.json"
|
3
|
+
import { Primitive } from "drawing/types"
|
4
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
5
|
+
|
6
|
+
// Extract paths, bounds, etc.
|
7
|
+
const { paths, circles, bounds, refblocks } = svgJson
|
8
|
+
|
9
|
+
export const verticalSymbol = defineSymbol({
|
10
|
+
primitives: [
|
11
|
+
...Object.values(paths),
|
12
|
+
...Object.values(circles),
|
13
|
+
{
|
14
|
+
type: "text",
|
15
|
+
text: "{REF}", // REF label for vertical
|
16
|
+
x: -0.015, // Adjust this for the horizontal positioning of REF
|
17
|
+
y: -0.75, // Adjust this for the vertical positioning of REF
|
18
|
+
anchor: "middle_bottom", // Vertical anchor for REF
|
19
|
+
},
|
20
|
+
{
|
21
|
+
type: "text",
|
22
|
+
text: "{VAL}", // VAL label for vertical
|
23
|
+
x: -0.015, // Adjust for horizontal positioning of VAL
|
24
|
+
y: -0.12, // Adjust for vertical positioning of VAL
|
25
|
+
anchor: "middle_top", // Vertical anchor for VAL
|
26
|
+
},
|
27
|
+
] as Primitive[],
|
28
|
+
ports: [{ ...refblocks.top1, labels: ["1"] }],
|
29
|
+
size: { width: bounds.width, height: bounds.height },
|
30
|
+
center: { x: bounds.centerX, y: bounds.centerY - 0.45 },
|
31
|
+
})
|
32
|
+
|
33
|
+
// Export vertical symbol (rotated 90 degrees from original)
|
34
|
+
export default rotateSymbol(verticalSymbol)
|