@tscircuit/props 0.0.638 → 0.0.640
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 +27 -2
- package/dist/index.d.ts +66 -9
- package/dist/index.js +182 -151
- package/dist/index.js.map +1 -1
- package/lib/components/schematic-graphic.ts +62 -0
- package/lib/components/schematic-sheet.ts +12 -4
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18827,51 +18827,81 @@ expectTypesMatch(
|
|
|
18827
18827
|
|
|
18828
18828
|
// lib/components/schematic-sheet.ts
|
|
18829
18829
|
import { z as z132 } from "zod";
|
|
18830
|
+
import { distance as distance43 } from "circuit-json";
|
|
18830
18831
|
var schematicSheetProps = z132.object({
|
|
18831
|
-
name: z132.string(),
|
|
18832
|
-
displayName: z132.string(),
|
|
18832
|
+
name: z132.string().optional(),
|
|
18833
|
+
displayName: z132.string().optional(),
|
|
18833
18834
|
sheetIndex: z132.number().optional(),
|
|
18834
18835
|
sheetSize: z132.enum(["A4", "ANSI_B"]).default("A4"),
|
|
18836
|
+
sheetWidth: distance43.pipe(z132.number().positive()).optional(),
|
|
18837
|
+
sheetHeight: distance43.pipe(z132.number().positive()).optional(),
|
|
18835
18838
|
children: z132.any().optional()
|
|
18836
18839
|
});
|
|
18837
18840
|
expectTypesMatch(true);
|
|
18838
18841
|
|
|
18842
|
+
// lib/components/schematic-graphic.ts
|
|
18843
|
+
import { z as z133 } from "zod";
|
|
18844
|
+
var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
|
|
18845
|
+
message: "imageUrl cannot be empty"
|
|
18846
|
+
});
|
|
18847
|
+
var positiveDistance = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
|
|
18848
|
+
message: `${fieldName} must be a positive finite distance`
|
|
18849
|
+
});
|
|
18850
|
+
var schematicGraphicProps = z133.object({
|
|
18851
|
+
imageUrl: nonemptyUrl.optional(),
|
|
18852
|
+
svgContent: z133.string().refine((value) => value.trim().length > 0, {
|
|
18853
|
+
message: "svgContent cannot be empty"
|
|
18854
|
+
}).optional(),
|
|
18855
|
+
width: positiveDistance("width").optional(),
|
|
18856
|
+
height: positiveDistance("height").optional()
|
|
18857
|
+
}).superRefine(({ imageUrl, svgContent }, ctx) => {
|
|
18858
|
+
if (imageUrl === void 0 && svgContent === void 0) {
|
|
18859
|
+
ctx.addIssue({
|
|
18860
|
+
code: z133.ZodIssueCode.custom,
|
|
18861
|
+
message: "At least one of imageUrl or svgContent is required"
|
|
18862
|
+
});
|
|
18863
|
+
}
|
|
18864
|
+
});
|
|
18865
|
+
expectTypesMatch(
|
|
18866
|
+
true
|
|
18867
|
+
);
|
|
18868
|
+
|
|
18839
18869
|
// lib/components/copper-text.ts
|
|
18840
18870
|
import { layer_ref as layer_ref12, length as length8 } from "circuit-json";
|
|
18841
|
-
import { z as
|
|
18871
|
+
import { z as z134 } from "zod";
|
|
18842
18872
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18843
|
-
text:
|
|
18873
|
+
text: z134.string(),
|
|
18844
18874
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18845
|
-
font:
|
|
18875
|
+
font: z134.enum(["tscircuit2024"]).optional(),
|
|
18846
18876
|
fontSize: length8.optional(),
|
|
18847
|
-
layers:
|
|
18848
|
-
knockout:
|
|
18849
|
-
mirrored:
|
|
18877
|
+
layers: z134.array(layer_ref12).optional(),
|
|
18878
|
+
knockout: z134.boolean().optional(),
|
|
18879
|
+
mirrored: z134.boolean().optional()
|
|
18850
18880
|
});
|
|
18851
18881
|
|
|
18852
18882
|
// lib/components/silkscreen-text.ts
|
|
18853
18883
|
import { layer_ref as layer_ref13, length as length9 } from "circuit-json";
|
|
18854
|
-
import { z as
|
|
18884
|
+
import { z as z135 } from "zod";
|
|
18855
18885
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18856
|
-
text:
|
|
18886
|
+
text: z135.string(),
|
|
18857
18887
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18858
|
-
font:
|
|
18888
|
+
font: z135.enum(["tscircuit2024"]).optional(),
|
|
18859
18889
|
fontSize: length9.optional(),
|
|
18860
18890
|
/**
|
|
18861
18891
|
* If true, text will knock out underlying silkscreen
|
|
18862
18892
|
*/
|
|
18863
|
-
isKnockout:
|
|
18893
|
+
isKnockout: z135.boolean().optional(),
|
|
18864
18894
|
knockoutPadding: length9.optional(),
|
|
18865
18895
|
knockoutPaddingLeft: length9.optional(),
|
|
18866
18896
|
knockoutPaddingRight: length9.optional(),
|
|
18867
18897
|
knockoutPaddingTop: length9.optional(),
|
|
18868
18898
|
knockoutPaddingBottom: length9.optional(),
|
|
18869
|
-
layers:
|
|
18899
|
+
layers: z135.array(layer_ref13).optional()
|
|
18870
18900
|
});
|
|
18871
18901
|
|
|
18872
18902
|
// lib/components/silkscreen-path.ts
|
|
18873
18903
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18874
|
-
import { z as
|
|
18904
|
+
import { z as z136 } from "zod";
|
|
18875
18905
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18876
18906
|
pcbLeftEdgeX: true,
|
|
18877
18907
|
pcbRightEdgeX: true,
|
|
@@ -18883,12 +18913,12 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18883
18913
|
pcbOffsetY: true,
|
|
18884
18914
|
pcbRotation: true
|
|
18885
18915
|
}).extend({
|
|
18886
|
-
route:
|
|
18916
|
+
route: z136.array(route_hint_point5),
|
|
18887
18917
|
strokeWidth: length10.optional()
|
|
18888
18918
|
});
|
|
18889
18919
|
|
|
18890
18920
|
// lib/components/silkscreen-line.ts
|
|
18891
|
-
import { distance as
|
|
18921
|
+
import { distance as distance44 } from "circuit-json";
|
|
18892
18922
|
var silkscreenLineProps = pcbLayoutProps.omit({
|
|
18893
18923
|
pcbX: true,
|
|
18894
18924
|
pcbY: true,
|
|
@@ -18896,33 +18926,33 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18896
18926
|
pcbOffsetY: true,
|
|
18897
18927
|
pcbRotation: true
|
|
18898
18928
|
}).extend({
|
|
18899
|
-
strokeWidth:
|
|
18900
|
-
x1:
|
|
18901
|
-
y1:
|
|
18902
|
-
x2:
|
|
18903
|
-
y2:
|
|
18929
|
+
strokeWidth: distance44,
|
|
18930
|
+
x1: distance44,
|
|
18931
|
+
y1: distance44,
|
|
18932
|
+
x2: distance44,
|
|
18933
|
+
y2: distance44
|
|
18904
18934
|
});
|
|
18905
18935
|
|
|
18906
18936
|
// lib/components/silkscreen-rect.ts
|
|
18907
|
-
import { distance as
|
|
18908
|
-
import { z as
|
|
18937
|
+
import { distance as distance45 } from "circuit-json";
|
|
18938
|
+
import { z as z137 } from "zod";
|
|
18909
18939
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18910
|
-
filled:
|
|
18911
|
-
stroke:
|
|
18912
|
-
strokeWidth:
|
|
18913
|
-
width:
|
|
18914
|
-
height:
|
|
18915
|
-
cornerRadius:
|
|
18940
|
+
filled: z137.boolean().default(true).optional(),
|
|
18941
|
+
stroke: z137.enum(["dashed", "solid", "none"]).optional(),
|
|
18942
|
+
strokeWidth: distance45.optional(),
|
|
18943
|
+
width: distance45,
|
|
18944
|
+
height: distance45,
|
|
18945
|
+
cornerRadius: distance45.optional()
|
|
18916
18946
|
});
|
|
18917
18947
|
|
|
18918
18948
|
// lib/components/silkscreen-circle.ts
|
|
18919
|
-
import { distance as
|
|
18920
|
-
import { z as
|
|
18949
|
+
import { distance as distance46 } from "circuit-json";
|
|
18950
|
+
import { z as z138 } from "zod";
|
|
18921
18951
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18922
|
-
isFilled:
|
|
18923
|
-
isOutline:
|
|
18924
|
-
strokeWidth:
|
|
18925
|
-
radius:
|
|
18952
|
+
isFilled: z138.boolean().optional(),
|
|
18953
|
+
isOutline: z138.boolean().optional(),
|
|
18954
|
+
strokeWidth: distance46.optional(),
|
|
18955
|
+
radius: distance46
|
|
18926
18956
|
});
|
|
18927
18957
|
|
|
18928
18958
|
// lib/components/silkscreen-graphic.ts
|
|
@@ -18937,71 +18967,71 @@ var silkscreenGraphicProps = pcbLayoutProps.omit({ layer: true, pcbStyle: true,
|
|
|
18937
18967
|
expectTypesMatch(true);
|
|
18938
18968
|
|
|
18939
18969
|
// lib/components/trace-hint.ts
|
|
18940
|
-
import { distance as
|
|
18941
|
-
import { z as
|
|
18942
|
-
var routeHintPointProps =
|
|
18943
|
-
x:
|
|
18944
|
-
y:
|
|
18945
|
-
via:
|
|
18970
|
+
import { distance as distance47, layer_ref as layer_ref14, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18971
|
+
import { z as z140 } from "zod";
|
|
18972
|
+
var routeHintPointProps = z140.object({
|
|
18973
|
+
x: distance47,
|
|
18974
|
+
y: distance47,
|
|
18975
|
+
via: z140.boolean().optional(),
|
|
18946
18976
|
toLayer: layer_ref14.optional()
|
|
18947
18977
|
});
|
|
18948
|
-
var traceHintProps =
|
|
18949
|
-
for:
|
|
18978
|
+
var traceHintProps = z140.object({
|
|
18979
|
+
for: z140.string().optional().describe(
|
|
18950
18980
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18951
18981
|
),
|
|
18952
|
-
order:
|
|
18982
|
+
order: z140.number().optional(),
|
|
18953
18983
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18954
|
-
offsets:
|
|
18955
|
-
traceWidth:
|
|
18984
|
+
offsets: z140.array(route_hint_point6).or(z140.array(routeHintPointProps)).optional(),
|
|
18985
|
+
traceWidth: z140.number().optional()
|
|
18956
18986
|
});
|
|
18957
18987
|
|
|
18958
18988
|
// lib/components/port.ts
|
|
18959
|
-
import { distance as
|
|
18960
|
-
import { z as
|
|
18989
|
+
import { distance as distance48 } from "circuit-json";
|
|
18990
|
+
import { z as z141 } from "zod";
|
|
18961
18991
|
var portProps = commonLayoutProps.extend({
|
|
18962
|
-
name:
|
|
18963
|
-
pinNumber:
|
|
18964
|
-
schStemLength:
|
|
18965
|
-
schPinLabelFontSize:
|
|
18966
|
-
|
|
18992
|
+
name: z141.string().optional(),
|
|
18993
|
+
pinNumber: z141.number().optional(),
|
|
18994
|
+
schStemLength: z141.number().optional(),
|
|
18995
|
+
schPinLabelFontSize: z141.enum(["default", "sm"]).or(
|
|
18996
|
+
distance48.refine((value) => Number.isFinite(value) && value > 0, {
|
|
18967
18997
|
message: "Schematic pin-label font size must be positive and finite"
|
|
18968
18998
|
})
|
|
18969
18999
|
).optional(),
|
|
18970
|
-
aliases:
|
|
18971
|
-
layer:
|
|
18972
|
-
layers:
|
|
18973
|
-
schX:
|
|
18974
|
-
schY:
|
|
19000
|
+
aliases: z141.array(z141.string()).optional(),
|
|
19001
|
+
layer: z141.string().optional(),
|
|
19002
|
+
layers: z141.array(z141.string()).optional(),
|
|
19003
|
+
schX: z141.number().optional(),
|
|
19004
|
+
schY: z141.number().optional(),
|
|
18975
19005
|
direction: direction.optional(),
|
|
18976
|
-
connectsTo:
|
|
19006
|
+
connectsTo: z141.string().or(z141.array(z141.string())).optional(),
|
|
18977
19007
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18978
|
-
hasInversionCircle:
|
|
19008
|
+
hasInversionCircle: z141.boolean().optional()
|
|
18979
19009
|
});
|
|
18980
19010
|
|
|
18981
19011
|
// lib/components/pcb-note-text.ts
|
|
18982
19012
|
import { length as length11 } from "circuit-json";
|
|
18983
|
-
import { z as
|
|
19013
|
+
import { z as z142 } from "zod";
|
|
18984
19014
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18985
|
-
text:
|
|
18986
|
-
anchorAlignment:
|
|
18987
|
-
font:
|
|
19015
|
+
text: z142.string(),
|
|
19016
|
+
anchorAlignment: z142.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
19017
|
+
font: z142.enum(["tscircuit2024"]).optional(),
|
|
18988
19018
|
fontSize: length11.optional(),
|
|
18989
|
-
color:
|
|
19019
|
+
color: z142.string().optional()
|
|
18990
19020
|
});
|
|
18991
19021
|
expectTypesMatch(true);
|
|
18992
19022
|
|
|
18993
19023
|
// lib/components/pcb-note-rect.ts
|
|
18994
|
-
import { distance as
|
|
18995
|
-
import { z as
|
|
19024
|
+
import { distance as distance49 } from "circuit-json";
|
|
19025
|
+
import { z as z143 } from "zod";
|
|
18996
19026
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18997
|
-
width:
|
|
18998
|
-
height:
|
|
18999
|
-
strokeWidth:
|
|
19000
|
-
isFilled:
|
|
19001
|
-
hasStroke:
|
|
19002
|
-
isStrokeDashed:
|
|
19003
|
-
color:
|
|
19004
|
-
cornerRadius:
|
|
19027
|
+
width: distance49,
|
|
19028
|
+
height: distance49,
|
|
19029
|
+
strokeWidth: distance49.optional(),
|
|
19030
|
+
isFilled: z143.boolean().optional(),
|
|
19031
|
+
hasStroke: z143.boolean().optional(),
|
|
19032
|
+
isStrokeDashed: z143.boolean().optional(),
|
|
19033
|
+
color: z143.string().optional(),
|
|
19034
|
+
cornerRadius: distance49.optional()
|
|
19005
19035
|
});
|
|
19006
19036
|
expectTypesMatch(true);
|
|
19007
19037
|
|
|
@@ -19010,7 +19040,7 @@ import {
|
|
|
19010
19040
|
length as length12,
|
|
19011
19041
|
route_hint_point as route_hint_point7
|
|
19012
19042
|
} from "circuit-json";
|
|
19013
|
-
import { z as
|
|
19043
|
+
import { z as z144 } from "zod";
|
|
19014
19044
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
19015
19045
|
pcbLeftEdgeX: true,
|
|
19016
19046
|
pcbRightEdgeX: true,
|
|
@@ -19022,15 +19052,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
19022
19052
|
pcbOffsetY: true,
|
|
19023
19053
|
pcbRotation: true
|
|
19024
19054
|
}).extend({
|
|
19025
|
-
route:
|
|
19055
|
+
route: z144.array(route_hint_point7),
|
|
19026
19056
|
strokeWidth: length12.optional(),
|
|
19027
|
-
color:
|
|
19057
|
+
color: z144.string().optional()
|
|
19028
19058
|
});
|
|
19029
19059
|
expectTypesMatch(true);
|
|
19030
19060
|
|
|
19031
19061
|
// lib/components/pcb-note-line.ts
|
|
19032
|
-
import { distance as
|
|
19033
|
-
import { z as
|
|
19062
|
+
import { distance as distance50 } from "circuit-json";
|
|
19063
|
+
import { z as z145 } from "zod";
|
|
19034
19064
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
19035
19065
|
pcbLeftEdgeX: true,
|
|
19036
19066
|
pcbRightEdgeX: true,
|
|
@@ -19042,20 +19072,20 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
19042
19072
|
pcbOffsetY: true,
|
|
19043
19073
|
pcbRotation: true
|
|
19044
19074
|
}).extend({
|
|
19045
|
-
x1:
|
|
19046
|
-
y1:
|
|
19047
|
-
x2:
|
|
19048
|
-
y2:
|
|
19049
|
-
strokeWidth:
|
|
19050
|
-
color:
|
|
19051
|
-
isDashed:
|
|
19075
|
+
x1: distance50,
|
|
19076
|
+
y1: distance50,
|
|
19077
|
+
x2: distance50,
|
|
19078
|
+
y2: distance50,
|
|
19079
|
+
strokeWidth: distance50.optional(),
|
|
19080
|
+
color: z145.string().optional(),
|
|
19081
|
+
isDashed: z145.boolean().optional()
|
|
19052
19082
|
});
|
|
19053
19083
|
expectTypesMatch(true);
|
|
19054
19084
|
|
|
19055
19085
|
// lib/components/pcb-note-dimension.ts
|
|
19056
|
-
import { distance as
|
|
19057
|
-
import { z as
|
|
19058
|
-
var dimensionTarget2 =
|
|
19086
|
+
import { distance as distance51, length as length13 } from "circuit-json";
|
|
19087
|
+
import { z as z146 } from "zod";
|
|
19088
|
+
var dimensionTarget2 = z146.union([z146.string(), point]);
|
|
19059
19089
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
19060
19090
|
pcbLeftEdgeX: true,
|
|
19061
19091
|
pcbRightEdgeX: true,
|
|
@@ -19069,107 +19099,107 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
19069
19099
|
}).extend({
|
|
19070
19100
|
from: dimensionTarget2,
|
|
19071
19101
|
to: dimensionTarget2,
|
|
19072
|
-
text:
|
|
19073
|
-
offset:
|
|
19074
|
-
font:
|
|
19102
|
+
text: z146.string().optional(),
|
|
19103
|
+
offset: distance51.optional(),
|
|
19104
|
+
font: z146.enum(["tscircuit2024"]).optional(),
|
|
19075
19105
|
fontSize: length13.optional(),
|
|
19076
|
-
color:
|
|
19077
|
-
arrowSize:
|
|
19078
|
-
units:
|
|
19079
|
-
outerEdgeToEdge:
|
|
19080
|
-
centerToCenter:
|
|
19081
|
-
innerEdgeToEdge:
|
|
19106
|
+
color: z146.string().optional(),
|
|
19107
|
+
arrowSize: distance51.optional(),
|
|
19108
|
+
units: z146.enum(["in", "mm"]).optional(),
|
|
19109
|
+
outerEdgeToEdge: z146.literal(true).optional(),
|
|
19110
|
+
centerToCenter: z146.literal(true).optional(),
|
|
19111
|
+
innerEdgeToEdge: z146.literal(true).optional()
|
|
19082
19112
|
});
|
|
19083
19113
|
expectTypesMatch(
|
|
19084
19114
|
true
|
|
19085
19115
|
);
|
|
19086
19116
|
|
|
19087
19117
|
// lib/platformConfig.ts
|
|
19088
|
-
import { z as
|
|
19089
|
-
var unvalidatedCircuitJson =
|
|
19090
|
-
var footprintLibraryResult =
|
|
19091
|
-
footprintCircuitJson:
|
|
19118
|
+
import { z as z147 } from "zod";
|
|
19119
|
+
var unvalidatedCircuitJson = z147.array(z147.any()).describe("Circuit JSON");
|
|
19120
|
+
var footprintLibraryResult = z147.object({
|
|
19121
|
+
footprintCircuitJson: z147.array(z147.any()),
|
|
19092
19122
|
cadModel: cadModelProp.optional()
|
|
19093
19123
|
});
|
|
19094
|
-
var pathToCircuitJsonFn =
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
).returns(
|
|
19124
|
+
var pathToCircuitJsonFn = z147.function().args(z147.string()).returns(z147.promise(footprintLibraryResult)).or(
|
|
19125
|
+
z147.function().args(
|
|
19126
|
+
z147.string(),
|
|
19127
|
+
z147.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
19128
|
+
).returns(z147.promise(footprintLibraryResult))
|
|
19099
19129
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
19100
|
-
var footprintFileParserEntry =
|
|
19101
|
-
loadFromUrl:
|
|
19130
|
+
var footprintFileParserEntry = z147.object({
|
|
19131
|
+
loadFromUrl: z147.function().args(z147.string()).returns(z147.promise(footprintLibraryResult)).describe(
|
|
19102
19132
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
19103
19133
|
)
|
|
19104
19134
|
});
|
|
19105
|
-
var spiceEngineSimulationResult =
|
|
19106
|
-
engineVersionString:
|
|
19135
|
+
var spiceEngineSimulationResult = z147.object({
|
|
19136
|
+
engineVersionString: z147.string().optional(),
|
|
19107
19137
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
19108
19138
|
});
|
|
19109
|
-
var spiceEngineZod =
|
|
19110
|
-
simulate:
|
|
19139
|
+
var spiceEngineZod = z147.object({
|
|
19140
|
+
simulate: z147.function().args(z147.string()).returns(z147.promise(spiceEngineSimulationResult)).describe(
|
|
19111
19141
|
"A function that takes a SPICE string and returns a simulation result"
|
|
19112
19142
|
)
|
|
19113
19143
|
});
|
|
19114
|
-
var defaultSpiceEngine =
|
|
19144
|
+
var defaultSpiceEngine = z147.custom(
|
|
19115
19145
|
(value) => typeof value === "string"
|
|
19116
19146
|
);
|
|
19117
|
-
var autorouterInstance =
|
|
19118
|
-
run:
|
|
19119
|
-
getOutputSimpleRouteJson:
|
|
19147
|
+
var autorouterInstance = z147.object({
|
|
19148
|
+
run: z147.function().args().returns(z147.promise(z147.unknown())).describe("Run the autorouter"),
|
|
19149
|
+
getOutputSimpleRouteJson: z147.function().args().returns(z147.promise(z147.any())).describe("Get the resulting SimpleRouteJson")
|
|
19120
19150
|
});
|
|
19121
|
-
var autorouterDefinition =
|
|
19122
|
-
createAutorouter:
|
|
19151
|
+
var autorouterDefinition = z147.object({
|
|
19152
|
+
createAutorouter: z147.function().args(z147.any(), z147.any().optional()).returns(z147.union([autorouterInstance, z147.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
19123
19153
|
});
|
|
19124
|
-
var platformFetch =
|
|
19125
|
-
var localCacheEngine =
|
|
19154
|
+
var platformFetch = z147.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
19155
|
+
var localCacheEngine = z147.custom(
|
|
19126
19156
|
(value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
|
|
19127
19157
|
);
|
|
19128
|
-
var platformConfig =
|
|
19158
|
+
var platformConfig = z147.object({
|
|
19129
19159
|
partsEngine: partsEngine.optional(),
|
|
19130
19160
|
autorouter: autorouterProp.optional(),
|
|
19131
|
-
autorouterMap:
|
|
19132
|
-
allowLegacyAutorouters:
|
|
19161
|
+
autorouterMap: z147.record(z147.string(), autorouterDefinition).optional(),
|
|
19162
|
+
allowLegacyAutorouters: z147.boolean().optional(),
|
|
19133
19163
|
registryApiUrl: url.optional(),
|
|
19134
19164
|
cloudAutorouterUrl: url.optional(),
|
|
19135
|
-
projectName:
|
|
19165
|
+
projectName: z147.string().optional(),
|
|
19136
19166
|
projectBaseUrl: url.optional(),
|
|
19137
|
-
version:
|
|
19167
|
+
version: z147.string().optional(),
|
|
19138
19168
|
url: url.optional(),
|
|
19139
|
-
printBoardInformationToSilkscreen:
|
|
19140
|
-
includeBoardFiles:
|
|
19169
|
+
printBoardInformationToSilkscreen: z147.boolean().optional(),
|
|
19170
|
+
includeBoardFiles: z147.array(z147.string()).describe(
|
|
19141
19171
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
19142
19172
|
).optional(),
|
|
19143
|
-
snapshotsDir:
|
|
19173
|
+
snapshotsDir: z147.string().describe(
|
|
19144
19174
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
19145
19175
|
).optional(),
|
|
19146
19176
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
19147
|
-
unitPreference:
|
|
19177
|
+
unitPreference: z147.enum(["mm", "in", "mil"]).optional(),
|
|
19148
19178
|
localCacheEngine: localCacheEngine.optional(),
|
|
19149
|
-
enablePartOrientationAnalysis:
|
|
19150
|
-
pcbPackSolverTimeoutMs:
|
|
19151
|
-
pcbDisabled:
|
|
19152
|
-
routingDisabled:
|
|
19153
|
-
schematicDisabled:
|
|
19154
|
-
partsEngineDisabled:
|
|
19155
|
-
drcChecksDisabled:
|
|
19156
|
-
netlistDrcChecksDisabled:
|
|
19157
|
-
routingDrcChecksDisabled:
|
|
19158
|
-
placementDrcChecksDisabled:
|
|
19159
|
-
pinSpecificationDrcChecksDisabled:
|
|
19160
|
-
spiceEngineMap:
|
|
19161
|
-
footprintLibraryMap:
|
|
19162
|
-
|
|
19163
|
-
|
|
19179
|
+
enablePartOrientationAnalysis: z147.boolean().optional(),
|
|
19180
|
+
pcbPackSolverTimeoutMs: z147.number().finite().positive().optional(),
|
|
19181
|
+
pcbDisabled: z147.boolean().optional(),
|
|
19182
|
+
routingDisabled: z147.boolean().optional(),
|
|
19183
|
+
schematicDisabled: z147.boolean().optional(),
|
|
19184
|
+
partsEngineDisabled: z147.boolean().optional(),
|
|
19185
|
+
drcChecksDisabled: z147.boolean().optional(),
|
|
19186
|
+
netlistDrcChecksDisabled: z147.boolean().optional(),
|
|
19187
|
+
routingDrcChecksDisabled: z147.boolean().optional(),
|
|
19188
|
+
placementDrcChecksDisabled: z147.boolean().optional(),
|
|
19189
|
+
pinSpecificationDrcChecksDisabled: z147.boolean().optional(),
|
|
19190
|
+
spiceEngineMap: z147.record(z147.string(), spiceEngineZod).optional(),
|
|
19191
|
+
footprintLibraryMap: z147.record(
|
|
19192
|
+
z147.string(),
|
|
19193
|
+
z147.union([
|
|
19164
19194
|
pathToCircuitJsonFn,
|
|
19165
|
-
|
|
19166
|
-
|
|
19167
|
-
|
|
19195
|
+
z147.record(
|
|
19196
|
+
z147.string(),
|
|
19197
|
+
z147.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
19168
19198
|
)
|
|
19169
19199
|
])
|
|
19170
19200
|
).optional(),
|
|
19171
|
-
footprintFileParserMap:
|
|
19172
|
-
resolveProjectStaticFileImportUrl:
|
|
19201
|
+
footprintFileParserMap: z147.record(z147.string(), footprintFileParserEntry).optional(),
|
|
19202
|
+
resolveProjectStaticFileImportUrl: z147.function().args(z147.string()).returns(z147.promise(z147.string())).describe(
|
|
19173
19203
|
"A function that returns a string URL for static files for the project"
|
|
19174
19204
|
).optional(),
|
|
19175
19205
|
platformFetch: platformFetch.optional()
|
|
@@ -19407,6 +19437,7 @@ export {
|
|
|
19407
19437
|
schematicBoxProps,
|
|
19408
19438
|
schematicCellProps,
|
|
19409
19439
|
schematicCircleProps,
|
|
19440
|
+
schematicGraphicProps,
|
|
19410
19441
|
schematicLineProps,
|
|
19411
19442
|
schematicOrientation,
|
|
19412
19443
|
schematicPathProps,
|