schematic-symbols 0.0.3 → 0.0.5
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/.github/workflows/bun-pver-release.yml +2 -0
- package/index.ts +15 -1
- package/package.json +1 -1
package/index.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import symbols from "./symbols"
|
2
2
|
export type {
|
3
3
|
SchSymbol,
|
4
4
|
BoxPrimitive,
|
@@ -6,3 +6,17 @@ export type {
|
|
6
6
|
PathPrimitive,
|
7
7
|
TextPrimitive,
|
8
8
|
} from "./drawing/types"
|
9
|
+
|
10
|
+
export type BaseSymbolName =
|
11
|
+
keyof typeof symbols extends `${infer T}_${infer U}` ? `${T}` : never
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Utility for easier autocomplete:
|
15
|
+
*
|
16
|
+
* BASE_SYMBOLS.boxresistor
|
17
|
+
* // "boxresistor"
|
18
|
+
*/
|
19
|
+
export const BASE_SYMBOLS: Record<BaseSymbolName, BaseSymbolName> =
|
20
|
+
Object.fromEntries(Object.keys(symbols).map((k) => [k, k])) as any
|
21
|
+
|
22
|
+
export { symbols }
|