@tscircuit/props 0.0.368 → 0.0.370
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/README.md +1 -0
- package/dist/index.d.ts +14 -13
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/lib/components/trace.ts +1 -1
- package/lib/platformConfig.ts +7 -0
- package/lib/projectConfig.ts +2 -0
- package/package.json +1 -1
package/lib/components/trace.ts
CHANGED
|
@@ -15,7 +15,7 @@ const baseTraceProps = z.object({
|
|
|
15
15
|
schematicRouteHints: z.array(point).optional(),
|
|
16
16
|
pcbRouteHints: z.array(route_hint_point).optional(),
|
|
17
17
|
pcbPathRelativeTo: z.string().optional(),
|
|
18
|
-
pcbPath: z.array(point).optional(),
|
|
18
|
+
pcbPath: z.array(z.union([point, z.string()])).optional(),
|
|
19
19
|
schDisplayLabel: z.string().optional(),
|
|
20
20
|
schStroke: z.string().optional(),
|
|
21
21
|
highlightColor: z.string().optional(),
|
package/lib/platformConfig.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface PlatformConfig {
|
|
|
62
62
|
url?: string
|
|
63
63
|
printBoardInformationToSilkscreen?: boolean
|
|
64
64
|
includeBoardFiles?: string[]
|
|
65
|
+
snapshotsDir?: string
|
|
65
66
|
|
|
66
67
|
pcbDisabled?: boolean
|
|
67
68
|
schematicDisabled?: boolean
|
|
@@ -155,6 +156,12 @@ export const platformConfig = z.object({
|
|
|
155
156
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs',
|
|
156
157
|
)
|
|
157
158
|
.optional(),
|
|
159
|
+
snapshotsDir: z
|
|
160
|
+
.string()
|
|
161
|
+
.describe(
|
|
162
|
+
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"',
|
|
163
|
+
)
|
|
164
|
+
.optional(),
|
|
158
165
|
localCacheEngine: z.any().optional(),
|
|
159
166
|
pcbDisabled: z.boolean().optional(),
|
|
160
167
|
schematicDisabled: z.boolean().optional(),
|
package/lib/projectConfig.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface ProjectConfig
|
|
|
11
11
|
| "url"
|
|
12
12
|
| "printBoardInformationToSilkscreen"
|
|
13
13
|
| "includeBoardFiles"
|
|
14
|
+
| "snapshotsDir"
|
|
14
15
|
> {}
|
|
15
16
|
|
|
16
17
|
const platformConfigObject = platformConfig as z.ZodObject<any>
|
|
@@ -22,6 +23,7 @@ export const projectConfig = platformConfigObject.pick({
|
|
|
22
23
|
url: true,
|
|
23
24
|
printBoardInformationToSilkscreen: true,
|
|
24
25
|
includeBoardFiles: true,
|
|
26
|
+
snapshotsDir: true,
|
|
25
27
|
}) as z.ZodType<ProjectConfig>
|
|
26
28
|
|
|
27
29
|
expectTypesMatch<ProjectConfig, z.infer<typeof projectConfig>>(true)
|