@tscircuit/props 0.0.549 → 0.0.551
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 +16 -1
- package/dist/index.d.ts +4586 -5
- package/dist/index.js +204 -177
- package/dist/index.js.map +1 -1
- package/lib/components/ammeter.ts +55 -0
- package/lib/components/fiducial.ts +2 -2
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16938,7 +16938,7 @@ expectTypesMatch(true);
|
|
|
16938
16938
|
import "zod";
|
|
16939
16939
|
var fiducialProps = commonComponentProps.extend({
|
|
16940
16940
|
soldermaskPullback: distance.optional(),
|
|
16941
|
-
padDiameter: distance
|
|
16941
|
+
padDiameter: distance
|
|
16942
16942
|
});
|
|
16943
16943
|
expectTypesMatch(true);
|
|
16944
16944
|
|
|
@@ -17986,48 +17986,71 @@ var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
|
17986
17986
|
});
|
|
17987
17987
|
expectTypesMatch(true);
|
|
17988
17988
|
|
|
17989
|
+
// lib/components/ammeter.ts
|
|
17990
|
+
import { z as z103 } from "zod";
|
|
17991
|
+
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17992
|
+
var hasAmmeterConnectionPair = (connections) => {
|
|
17993
|
+
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
17994
|
+
};
|
|
17995
|
+
var ammeterDisplayOptions = z103.object({
|
|
17996
|
+
label: z103.string().optional(),
|
|
17997
|
+
center: z103.number().optional(),
|
|
17998
|
+
offsetDivs: z103.number().optional(),
|
|
17999
|
+
unitsPerDiv: z103.number().optional()
|
|
18000
|
+
});
|
|
18001
|
+
var ammeterProps = commonComponentProps.extend({
|
|
18002
|
+
connections: createConnectionsProp(ammeterPinLabels).refine(
|
|
18003
|
+
hasAmmeterConnectionPair,
|
|
18004
|
+
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18005
|
+
),
|
|
18006
|
+
color: z103.string().optional(),
|
|
18007
|
+
display: ammeterDisplayOptions.optional()
|
|
18008
|
+
});
|
|
18009
|
+
var ammeterPins = ammeterPinLabels;
|
|
18010
|
+
expectTypesMatch(true);
|
|
18011
|
+
|
|
17989
18012
|
// lib/components/schematic-arc.ts
|
|
17990
18013
|
import { distance as distance29, point as point5, rotation as rotation7 } from "circuit-json";
|
|
17991
|
-
import { z as
|
|
17992
|
-
var schematicArcProps =
|
|
18014
|
+
import { z as z104 } from "zod";
|
|
18015
|
+
var schematicArcProps = z104.object({
|
|
17993
18016
|
center: point5,
|
|
17994
18017
|
radius: distance29,
|
|
17995
18018
|
startAngleDegrees: rotation7,
|
|
17996
18019
|
endAngleDegrees: rotation7,
|
|
17997
|
-
direction:
|
|
18020
|
+
direction: z104.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
17998
18021
|
strokeWidth: distance29.optional(),
|
|
17999
|
-
color:
|
|
18000
|
-
isDashed:
|
|
18022
|
+
color: z104.string().optional(),
|
|
18023
|
+
isDashed: z104.boolean().optional().default(false)
|
|
18001
18024
|
});
|
|
18002
18025
|
expectTypesMatch(true);
|
|
18003
18026
|
|
|
18004
18027
|
// lib/components/toolingrail.ts
|
|
18005
|
-
import { z as
|
|
18006
|
-
var toolingrailProps =
|
|
18007
|
-
children:
|
|
18028
|
+
import { z as z105 } from "zod";
|
|
18029
|
+
var toolingrailProps = z105.object({
|
|
18030
|
+
children: z105.any().optional()
|
|
18008
18031
|
});
|
|
18009
18032
|
expectTypesMatch(true);
|
|
18010
18033
|
|
|
18011
18034
|
// lib/components/schematic-box.ts
|
|
18012
18035
|
import { distance as distance30 } from "circuit-json";
|
|
18013
|
-
import { z as
|
|
18014
|
-
var schematicBoxProps =
|
|
18036
|
+
import { z as z106 } from "zod";
|
|
18037
|
+
var schematicBoxProps = z106.object({
|
|
18015
18038
|
schX: distance30.optional(),
|
|
18016
18039
|
schY: distance30.optional(),
|
|
18017
18040
|
width: distance30.optional(),
|
|
18018
18041
|
height: distance30.optional(),
|
|
18019
|
-
overlay:
|
|
18042
|
+
overlay: z106.array(z106.string()).optional(),
|
|
18020
18043
|
padding: distance30.optional(),
|
|
18021
18044
|
paddingLeft: distance30.optional(),
|
|
18022
18045
|
paddingRight: distance30.optional(),
|
|
18023
18046
|
paddingTop: distance30.optional(),
|
|
18024
18047
|
paddingBottom: distance30.optional(),
|
|
18025
|
-
title:
|
|
18048
|
+
title: z106.string().optional(),
|
|
18026
18049
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18027
|
-
titleColor:
|
|
18050
|
+
titleColor: z106.string().optional(),
|
|
18028
18051
|
titleFontSize: distance30.optional(),
|
|
18029
|
-
titleInside:
|
|
18030
|
-
strokeStyle:
|
|
18052
|
+
titleInside: z106.boolean().default(false),
|
|
18053
|
+
strokeStyle: z106.enum(["solid", "dashed"]).default("solid")
|
|
18031
18054
|
}).refine(
|
|
18032
18055
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
18033
18056
|
{
|
|
@@ -18043,15 +18066,15 @@ expectTypesMatch(true);
|
|
|
18043
18066
|
|
|
18044
18067
|
// lib/components/schematic-circle.ts
|
|
18045
18068
|
import { distance as distance31, point as point6 } from "circuit-json";
|
|
18046
|
-
import { z as
|
|
18047
|
-
var schematicCircleProps =
|
|
18069
|
+
import { z as z107 } from "zod";
|
|
18070
|
+
var schematicCircleProps = z107.object({
|
|
18048
18071
|
center: point6,
|
|
18049
18072
|
radius: distance31,
|
|
18050
18073
|
strokeWidth: distance31.optional(),
|
|
18051
|
-
color:
|
|
18052
|
-
isFilled:
|
|
18053
|
-
fillColor:
|
|
18054
|
-
isDashed:
|
|
18074
|
+
color: z107.string().optional(),
|
|
18075
|
+
isFilled: z107.boolean().optional().default(false),
|
|
18076
|
+
fillColor: z107.string().optional(),
|
|
18077
|
+
isDashed: z107.boolean().optional().default(false)
|
|
18055
18078
|
});
|
|
18056
18079
|
expectTypesMatch(
|
|
18057
18080
|
true
|
|
@@ -18059,32 +18082,32 @@ expectTypesMatch(
|
|
|
18059
18082
|
|
|
18060
18083
|
// lib/components/schematic-rect.ts
|
|
18061
18084
|
import { distance as distance32, rotation as rotation8 } from "circuit-json";
|
|
18062
|
-
import { z as
|
|
18063
|
-
var schematicRectProps =
|
|
18085
|
+
import { z as z108 } from "zod";
|
|
18086
|
+
var schematicRectProps = z108.object({
|
|
18064
18087
|
schX: distance32.optional(),
|
|
18065
18088
|
schY: distance32.optional(),
|
|
18066
18089
|
width: distance32,
|
|
18067
18090
|
height: distance32,
|
|
18068
18091
|
rotation: rotation8.default(0),
|
|
18069
18092
|
strokeWidth: distance32.optional(),
|
|
18070
|
-
color:
|
|
18071
|
-
isFilled:
|
|
18072
|
-
fillColor:
|
|
18073
|
-
isDashed:
|
|
18093
|
+
color: z108.string().optional(),
|
|
18094
|
+
isFilled: z108.boolean().optional().default(false),
|
|
18095
|
+
fillColor: z108.string().optional(),
|
|
18096
|
+
isDashed: z108.boolean().optional().default(false)
|
|
18074
18097
|
});
|
|
18075
18098
|
expectTypesMatch(true);
|
|
18076
18099
|
|
|
18077
18100
|
// lib/components/schematic-line.ts
|
|
18078
18101
|
import { distance as distance33 } from "circuit-json";
|
|
18079
|
-
import { z as
|
|
18080
|
-
var schematicLineProps =
|
|
18102
|
+
import { z as z109 } from "zod";
|
|
18103
|
+
var schematicLineProps = z109.object({
|
|
18081
18104
|
x1: distance33,
|
|
18082
18105
|
y1: distance33,
|
|
18083
18106
|
x2: distance33,
|
|
18084
18107
|
y2: distance33,
|
|
18085
18108
|
strokeWidth: distance33.optional(),
|
|
18086
|
-
color:
|
|
18087
|
-
isDashed:
|
|
18109
|
+
color: z109.string().optional(),
|
|
18110
|
+
isDashed: z109.boolean().optional().default(false),
|
|
18088
18111
|
dashLength: distance33.optional(),
|
|
18089
18112
|
dashGap: distance33.optional()
|
|
18090
18113
|
});
|
|
@@ -18092,11 +18115,11 @@ expectTypesMatch(true);
|
|
|
18092
18115
|
|
|
18093
18116
|
// lib/components/schematic-text.ts
|
|
18094
18117
|
import { distance as distance34, rotation as rotation9 } from "circuit-json";
|
|
18095
|
-
import { z as
|
|
18118
|
+
import { z as z111 } from "zod";
|
|
18096
18119
|
|
|
18097
18120
|
// lib/common/fivePointAnchor.ts
|
|
18098
|
-
import { z as
|
|
18099
|
-
var fivePointAnchor =
|
|
18121
|
+
import { z as z110 } from "zod";
|
|
18122
|
+
var fivePointAnchor = z110.enum([
|
|
18100
18123
|
"center",
|
|
18101
18124
|
"left",
|
|
18102
18125
|
"right",
|
|
@@ -18105,39 +18128,39 @@ var fivePointAnchor = z109.enum([
|
|
|
18105
18128
|
]);
|
|
18106
18129
|
|
|
18107
18130
|
// lib/components/schematic-text.ts
|
|
18108
|
-
var schematicTextProps =
|
|
18131
|
+
var schematicTextProps = z111.object({
|
|
18109
18132
|
schX: distance34.optional(),
|
|
18110
18133
|
schY: distance34.optional(),
|
|
18111
|
-
text:
|
|
18112
|
-
fontSize:
|
|
18113
|
-
anchor:
|
|
18114
|
-
color:
|
|
18134
|
+
text: z111.string(),
|
|
18135
|
+
fontSize: z111.number().default(1),
|
|
18136
|
+
anchor: z111.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18137
|
+
color: z111.string().default("#000000"),
|
|
18115
18138
|
schRotation: rotation9.default(0)
|
|
18116
18139
|
});
|
|
18117
18140
|
expectTypesMatch(true);
|
|
18118
18141
|
|
|
18119
18142
|
// lib/components/schematic-path.ts
|
|
18120
18143
|
import { distance as distance35, point as point7 } from "circuit-json";
|
|
18121
|
-
import { z as
|
|
18122
|
-
var schematicPathProps =
|
|
18123
|
-
points:
|
|
18124
|
-
svgPath:
|
|
18144
|
+
import { z as z112 } from "zod";
|
|
18145
|
+
var schematicPathProps = z112.object({
|
|
18146
|
+
points: z112.array(point7).optional(),
|
|
18147
|
+
svgPath: z112.string().optional(),
|
|
18125
18148
|
strokeWidth: distance35.optional(),
|
|
18126
|
-
strokeColor:
|
|
18149
|
+
strokeColor: z112.string().optional(),
|
|
18127
18150
|
dashLength: distance35.optional(),
|
|
18128
18151
|
dashGap: distance35.optional(),
|
|
18129
|
-
isFilled:
|
|
18130
|
-
fillColor:
|
|
18152
|
+
isFilled: z112.boolean().optional().default(false),
|
|
18153
|
+
fillColor: z112.string().optional()
|
|
18131
18154
|
});
|
|
18132
18155
|
expectTypesMatch(true);
|
|
18133
18156
|
|
|
18134
18157
|
// lib/components/schematic-table.ts
|
|
18135
18158
|
import { distance as distance36 } from "circuit-json";
|
|
18136
|
-
import { z as
|
|
18137
|
-
var schematicTableProps =
|
|
18159
|
+
import { z as z113 } from "zod";
|
|
18160
|
+
var schematicTableProps = z113.object({
|
|
18138
18161
|
schX: distance36.optional(),
|
|
18139
18162
|
schY: distance36.optional(),
|
|
18140
|
-
children:
|
|
18163
|
+
children: z113.any().optional(),
|
|
18141
18164
|
cellPadding: distance36.optional(),
|
|
18142
18165
|
borderWidth: distance36.optional(),
|
|
18143
18166
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18147,34 +18170,34 @@ expectTypesMatch(true);
|
|
|
18147
18170
|
|
|
18148
18171
|
// lib/components/schematic-row.ts
|
|
18149
18172
|
import { distance as distance37 } from "circuit-json";
|
|
18150
|
-
import { z as
|
|
18151
|
-
var schematicRowProps =
|
|
18152
|
-
children:
|
|
18173
|
+
import { z as z114 } from "zod";
|
|
18174
|
+
var schematicRowProps = z114.object({
|
|
18175
|
+
children: z114.any().optional(),
|
|
18153
18176
|
height: distance37.optional()
|
|
18154
18177
|
});
|
|
18155
18178
|
expectTypesMatch(true);
|
|
18156
18179
|
|
|
18157
18180
|
// lib/components/schematic-cell.ts
|
|
18158
18181
|
import { distance as distance38 } from "circuit-json";
|
|
18159
|
-
import { z as
|
|
18160
|
-
var schematicCellProps =
|
|
18161
|
-
children:
|
|
18162
|
-
horizontalAlign:
|
|
18163
|
-
verticalAlign:
|
|
18182
|
+
import { z as z115 } from "zod";
|
|
18183
|
+
var schematicCellProps = z115.object({
|
|
18184
|
+
children: z115.string().optional(),
|
|
18185
|
+
horizontalAlign: z115.enum(["left", "center", "right"]).optional(),
|
|
18186
|
+
verticalAlign: z115.enum(["top", "middle", "bottom"]).optional(),
|
|
18164
18187
|
fontSize: distance38.optional(),
|
|
18165
|
-
rowSpan:
|
|
18166
|
-
colSpan:
|
|
18188
|
+
rowSpan: z115.number().optional(),
|
|
18189
|
+
colSpan: z115.number().optional(),
|
|
18167
18190
|
width: distance38.optional(),
|
|
18168
|
-
text:
|
|
18191
|
+
text: z115.string().optional()
|
|
18169
18192
|
});
|
|
18170
18193
|
expectTypesMatch(true);
|
|
18171
18194
|
|
|
18172
18195
|
// lib/components/schematic-section.ts
|
|
18173
18196
|
import { distance as distance39 } from "circuit-json";
|
|
18174
|
-
import { z as
|
|
18175
|
-
var schematicSectionProps =
|
|
18176
|
-
displayName:
|
|
18177
|
-
name:
|
|
18197
|
+
import { z as z116 } from "zod";
|
|
18198
|
+
var schematicSectionProps = z116.object({
|
|
18199
|
+
displayName: z116.string().optional(),
|
|
18200
|
+
name: z116.string(),
|
|
18178
18201
|
sectionTitleFontSize: distance39.optional()
|
|
18179
18202
|
});
|
|
18180
18203
|
expectTypesMatch(
|
|
@@ -18183,40 +18206,40 @@ expectTypesMatch(
|
|
|
18183
18206
|
|
|
18184
18207
|
// lib/components/copper-text.ts
|
|
18185
18208
|
import { layer_ref as layer_ref10, length as length8 } from "circuit-json";
|
|
18186
|
-
import { z as
|
|
18209
|
+
import { z as z117 } from "zod";
|
|
18187
18210
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18188
|
-
text:
|
|
18211
|
+
text: z117.string(),
|
|
18189
18212
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18190
|
-
font:
|
|
18213
|
+
font: z117.enum(["tscircuit2024"]).optional(),
|
|
18191
18214
|
fontSize: length8.optional(),
|
|
18192
|
-
layers:
|
|
18193
|
-
knockout:
|
|
18194
|
-
mirrored:
|
|
18215
|
+
layers: z117.array(layer_ref10).optional(),
|
|
18216
|
+
knockout: z117.boolean().optional(),
|
|
18217
|
+
mirrored: z117.boolean().optional()
|
|
18195
18218
|
});
|
|
18196
18219
|
|
|
18197
18220
|
// lib/components/silkscreen-text.ts
|
|
18198
18221
|
import { layer_ref as layer_ref11, length as length9 } from "circuit-json";
|
|
18199
|
-
import { z as
|
|
18222
|
+
import { z as z118 } from "zod";
|
|
18200
18223
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18201
|
-
text:
|
|
18224
|
+
text: z118.string(),
|
|
18202
18225
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18203
|
-
font:
|
|
18226
|
+
font: z118.enum(["tscircuit2024"]).optional(),
|
|
18204
18227
|
fontSize: length9.optional(),
|
|
18205
18228
|
/**
|
|
18206
18229
|
* If true, text will knock out underlying silkscreen
|
|
18207
18230
|
*/
|
|
18208
|
-
isKnockout:
|
|
18231
|
+
isKnockout: z118.boolean().optional(),
|
|
18209
18232
|
knockoutPadding: length9.optional(),
|
|
18210
18233
|
knockoutPaddingLeft: length9.optional(),
|
|
18211
18234
|
knockoutPaddingRight: length9.optional(),
|
|
18212
18235
|
knockoutPaddingTop: length9.optional(),
|
|
18213
18236
|
knockoutPaddingBottom: length9.optional(),
|
|
18214
|
-
layers:
|
|
18237
|
+
layers: z118.array(layer_ref11).optional()
|
|
18215
18238
|
});
|
|
18216
18239
|
|
|
18217
18240
|
// lib/components/silkscreen-path.ts
|
|
18218
18241
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18219
|
-
import { z as
|
|
18242
|
+
import { z as z119 } from "zod";
|
|
18220
18243
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18221
18244
|
pcbLeftEdgeX: true,
|
|
18222
18245
|
pcbRightEdgeX: true,
|
|
@@ -18228,7 +18251,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18228
18251
|
pcbOffsetY: true,
|
|
18229
18252
|
pcbRotation: true
|
|
18230
18253
|
}).extend({
|
|
18231
|
-
route:
|
|
18254
|
+
route: z119.array(route_hint_point5),
|
|
18232
18255
|
strokeWidth: length10.optional()
|
|
18233
18256
|
});
|
|
18234
18257
|
|
|
@@ -18250,10 +18273,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18250
18273
|
|
|
18251
18274
|
// lib/components/silkscreen-rect.ts
|
|
18252
18275
|
import { distance as distance41 } from "circuit-json";
|
|
18253
|
-
import { z as
|
|
18276
|
+
import { z as z120 } from "zod";
|
|
18254
18277
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18255
|
-
filled:
|
|
18256
|
-
stroke:
|
|
18278
|
+
filled: z120.boolean().default(true).optional(),
|
|
18279
|
+
stroke: z120.enum(["dashed", "solid", "none"]).optional(),
|
|
18257
18280
|
strokeWidth: distance41.optional(),
|
|
18258
18281
|
width: distance41,
|
|
18259
18282
|
height: distance41,
|
|
@@ -18262,10 +18285,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18262
18285
|
|
|
18263
18286
|
// lib/components/silkscreen-circle.ts
|
|
18264
18287
|
import { distance as distance42 } from "circuit-json";
|
|
18265
|
-
import { z as
|
|
18288
|
+
import { z as z121 } from "zod";
|
|
18266
18289
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18267
|
-
isFilled:
|
|
18268
|
-
isOutline:
|
|
18290
|
+
isFilled: z121.boolean().optional(),
|
|
18291
|
+
isOutline: z121.boolean().optional(),
|
|
18269
18292
|
strokeWidth: distance42.optional(),
|
|
18270
18293
|
radius: distance42
|
|
18271
18294
|
});
|
|
@@ -18283,63 +18306,63 @@ expectTypesMatch(true);
|
|
|
18283
18306
|
|
|
18284
18307
|
// lib/components/trace-hint.ts
|
|
18285
18308
|
import { distance as distance43, layer_ref as layer_ref12, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18286
|
-
import { z as
|
|
18287
|
-
var routeHintPointProps =
|
|
18309
|
+
import { z as z123 } from "zod";
|
|
18310
|
+
var routeHintPointProps = z123.object({
|
|
18288
18311
|
x: distance43,
|
|
18289
18312
|
y: distance43,
|
|
18290
|
-
via:
|
|
18313
|
+
via: z123.boolean().optional(),
|
|
18291
18314
|
toLayer: layer_ref12.optional()
|
|
18292
18315
|
});
|
|
18293
|
-
var traceHintProps =
|
|
18294
|
-
for:
|
|
18316
|
+
var traceHintProps = z123.object({
|
|
18317
|
+
for: z123.string().optional().describe(
|
|
18295
18318
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18296
18319
|
),
|
|
18297
|
-
order:
|
|
18320
|
+
order: z123.number().optional(),
|
|
18298
18321
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18299
|
-
offsets:
|
|
18300
|
-
traceWidth:
|
|
18322
|
+
offsets: z123.array(route_hint_point6).or(z123.array(routeHintPointProps)).optional(),
|
|
18323
|
+
traceWidth: z123.number().optional()
|
|
18301
18324
|
});
|
|
18302
18325
|
|
|
18303
18326
|
// lib/components/port.ts
|
|
18304
|
-
import { z as
|
|
18327
|
+
import { z as z124 } from "zod";
|
|
18305
18328
|
var portProps = commonLayoutProps.extend({
|
|
18306
|
-
name:
|
|
18307
|
-
pinNumber:
|
|
18308
|
-
schStemLength:
|
|
18309
|
-
aliases:
|
|
18310
|
-
layer:
|
|
18311
|
-
layers:
|
|
18312
|
-
schX:
|
|
18313
|
-
schY:
|
|
18329
|
+
name: z124.string().optional(),
|
|
18330
|
+
pinNumber: z124.number().optional(),
|
|
18331
|
+
schStemLength: z124.number().optional(),
|
|
18332
|
+
aliases: z124.array(z124.string()).optional(),
|
|
18333
|
+
layer: z124.string().optional(),
|
|
18334
|
+
layers: z124.array(z124.string()).optional(),
|
|
18335
|
+
schX: z124.number().optional(),
|
|
18336
|
+
schY: z124.number().optional(),
|
|
18314
18337
|
direction: direction.optional(),
|
|
18315
|
-
connectsTo:
|
|
18338
|
+
connectsTo: z124.string().or(z124.array(z124.string())).optional(),
|
|
18316
18339
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
18317
|
-
hasInversionCircle:
|
|
18340
|
+
hasInversionCircle: z124.boolean().optional()
|
|
18318
18341
|
});
|
|
18319
18342
|
|
|
18320
18343
|
// lib/components/pcb-note-text.ts
|
|
18321
18344
|
import { length as length11 } from "circuit-json";
|
|
18322
|
-
import { z as
|
|
18345
|
+
import { z as z125 } from "zod";
|
|
18323
18346
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
18324
|
-
text:
|
|
18325
|
-
anchorAlignment:
|
|
18326
|
-
font:
|
|
18347
|
+
text: z125.string(),
|
|
18348
|
+
anchorAlignment: z125.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18349
|
+
font: z125.enum(["tscircuit2024"]).optional(),
|
|
18327
18350
|
fontSize: length11.optional(),
|
|
18328
|
-
color:
|
|
18351
|
+
color: z125.string().optional()
|
|
18329
18352
|
});
|
|
18330
18353
|
expectTypesMatch(true);
|
|
18331
18354
|
|
|
18332
18355
|
// lib/components/pcb-note-rect.ts
|
|
18333
18356
|
import { distance as distance44 } from "circuit-json";
|
|
18334
|
-
import { z as
|
|
18357
|
+
import { z as z126 } from "zod";
|
|
18335
18358
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18336
18359
|
width: distance44,
|
|
18337
18360
|
height: distance44,
|
|
18338
18361
|
strokeWidth: distance44.optional(),
|
|
18339
|
-
isFilled:
|
|
18340
|
-
hasStroke:
|
|
18341
|
-
isStrokeDashed:
|
|
18342
|
-
color:
|
|
18362
|
+
isFilled: z126.boolean().optional(),
|
|
18363
|
+
hasStroke: z126.boolean().optional(),
|
|
18364
|
+
isStrokeDashed: z126.boolean().optional(),
|
|
18365
|
+
color: z126.string().optional(),
|
|
18343
18366
|
cornerRadius: distance44.optional()
|
|
18344
18367
|
});
|
|
18345
18368
|
expectTypesMatch(true);
|
|
@@ -18349,7 +18372,7 @@ import {
|
|
|
18349
18372
|
length as length12,
|
|
18350
18373
|
route_hint_point as route_hint_point7
|
|
18351
18374
|
} from "circuit-json";
|
|
18352
|
-
import { z as
|
|
18375
|
+
import { z as z127 } from "zod";
|
|
18353
18376
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
18354
18377
|
pcbLeftEdgeX: true,
|
|
18355
18378
|
pcbRightEdgeX: true,
|
|
@@ -18361,15 +18384,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
18361
18384
|
pcbOffsetY: true,
|
|
18362
18385
|
pcbRotation: true
|
|
18363
18386
|
}).extend({
|
|
18364
|
-
route:
|
|
18387
|
+
route: z127.array(route_hint_point7),
|
|
18365
18388
|
strokeWidth: length12.optional(),
|
|
18366
|
-
color:
|
|
18389
|
+
color: z127.string().optional()
|
|
18367
18390
|
});
|
|
18368
18391
|
expectTypesMatch(true);
|
|
18369
18392
|
|
|
18370
18393
|
// lib/components/pcb-note-line.ts
|
|
18371
18394
|
import { distance as distance45 } from "circuit-json";
|
|
18372
|
-
import { z as
|
|
18395
|
+
import { z as z128 } from "zod";
|
|
18373
18396
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
18374
18397
|
pcbLeftEdgeX: true,
|
|
18375
18398
|
pcbRightEdgeX: true,
|
|
@@ -18386,15 +18409,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
18386
18409
|
x2: distance45,
|
|
18387
18410
|
y2: distance45,
|
|
18388
18411
|
strokeWidth: distance45.optional(),
|
|
18389
|
-
color:
|
|
18390
|
-
isDashed:
|
|
18412
|
+
color: z128.string().optional(),
|
|
18413
|
+
isDashed: z128.boolean().optional()
|
|
18391
18414
|
});
|
|
18392
18415
|
expectTypesMatch(true);
|
|
18393
18416
|
|
|
18394
18417
|
// lib/components/pcb-note-dimension.ts
|
|
18395
18418
|
import { distance as distance46, length as length13 } from "circuit-json";
|
|
18396
|
-
import { z as
|
|
18397
|
-
var dimensionTarget2 =
|
|
18419
|
+
import { z as z129 } from "zod";
|
|
18420
|
+
var dimensionTarget2 = z129.union([z129.string(), point]);
|
|
18398
18421
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
18399
18422
|
pcbLeftEdgeX: true,
|
|
18400
18423
|
pcbRightEdgeX: true,
|
|
@@ -18408,101 +18431,101 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18408
18431
|
}).extend({
|
|
18409
18432
|
from: dimensionTarget2,
|
|
18410
18433
|
to: dimensionTarget2,
|
|
18411
|
-
text:
|
|
18434
|
+
text: z129.string().optional(),
|
|
18412
18435
|
offset: distance46.optional(),
|
|
18413
|
-
font:
|
|
18436
|
+
font: z129.enum(["tscircuit2024"]).optional(),
|
|
18414
18437
|
fontSize: length13.optional(),
|
|
18415
|
-
color:
|
|
18438
|
+
color: z129.string().optional(),
|
|
18416
18439
|
arrowSize: distance46.optional(),
|
|
18417
|
-
units:
|
|
18418
|
-
outerEdgeToEdge:
|
|
18419
|
-
centerToCenter:
|
|
18420
|
-
innerEdgeToEdge:
|
|
18440
|
+
units: z129.enum(["in", "mm"]).optional(),
|
|
18441
|
+
outerEdgeToEdge: z129.literal(true).optional(),
|
|
18442
|
+
centerToCenter: z129.literal(true).optional(),
|
|
18443
|
+
innerEdgeToEdge: z129.literal(true).optional()
|
|
18421
18444
|
});
|
|
18422
18445
|
expectTypesMatch(
|
|
18423
18446
|
true
|
|
18424
18447
|
);
|
|
18425
18448
|
|
|
18426
18449
|
// lib/platformConfig.ts
|
|
18427
|
-
import { z as
|
|
18428
|
-
var unvalidatedCircuitJson =
|
|
18429
|
-
var footprintLibraryResult =
|
|
18430
|
-
footprintCircuitJson:
|
|
18450
|
+
import { z as z130 } from "zod";
|
|
18451
|
+
var unvalidatedCircuitJson = z130.array(z130.any()).describe("Circuit JSON");
|
|
18452
|
+
var footprintLibraryResult = z130.object({
|
|
18453
|
+
footprintCircuitJson: z130.array(z130.any()),
|
|
18431
18454
|
cadModel: cadModelProp.optional()
|
|
18432
18455
|
});
|
|
18433
|
-
var pathToCircuitJsonFn =
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
).returns(
|
|
18456
|
+
var pathToCircuitJsonFn = z130.function().args(z130.string()).returns(z130.promise(footprintLibraryResult)).or(
|
|
18457
|
+
z130.function().args(
|
|
18458
|
+
z130.string(),
|
|
18459
|
+
z130.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
18460
|
+
).returns(z130.promise(footprintLibraryResult))
|
|
18438
18461
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
18439
|
-
var footprintFileParserEntry =
|
|
18440
|
-
loadFromUrl:
|
|
18462
|
+
var footprintFileParserEntry = z130.object({
|
|
18463
|
+
loadFromUrl: z130.function().args(z130.string()).returns(z130.promise(footprintLibraryResult)).describe(
|
|
18441
18464
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
18442
18465
|
)
|
|
18443
18466
|
});
|
|
18444
|
-
var spiceEngineSimulationResult =
|
|
18445
|
-
engineVersionString:
|
|
18467
|
+
var spiceEngineSimulationResult = z130.object({
|
|
18468
|
+
engineVersionString: z130.string().optional(),
|
|
18446
18469
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
18447
18470
|
});
|
|
18448
|
-
var spiceEngineZod =
|
|
18449
|
-
simulate:
|
|
18471
|
+
var spiceEngineZod = z130.object({
|
|
18472
|
+
simulate: z130.function().args(z130.string()).returns(z130.promise(spiceEngineSimulationResult)).describe(
|
|
18450
18473
|
"A function that takes a SPICE string and returns a simulation result"
|
|
18451
18474
|
)
|
|
18452
18475
|
});
|
|
18453
|
-
var defaultSpiceEngine =
|
|
18476
|
+
var defaultSpiceEngine = z130.custom(
|
|
18454
18477
|
(value) => typeof value === "string"
|
|
18455
18478
|
);
|
|
18456
|
-
var autorouterInstance =
|
|
18457
|
-
run:
|
|
18458
|
-
getOutputSimpleRouteJson:
|
|
18479
|
+
var autorouterInstance = z130.object({
|
|
18480
|
+
run: z130.function().args().returns(z130.promise(z130.unknown())).describe("Run the autorouter"),
|
|
18481
|
+
getOutputSimpleRouteJson: z130.function().args().returns(z130.promise(z130.any())).describe("Get the resulting SimpleRouteJson")
|
|
18459
18482
|
});
|
|
18460
|
-
var autorouterDefinition =
|
|
18461
|
-
createAutorouter:
|
|
18483
|
+
var autorouterDefinition = z130.object({
|
|
18484
|
+
createAutorouter: z130.function().args(z130.any(), z130.any().optional()).returns(z130.union([autorouterInstance, z130.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
18462
18485
|
});
|
|
18463
|
-
var platformFetch =
|
|
18464
|
-
var platformConfig =
|
|
18486
|
+
var platformFetch = z130.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
18487
|
+
var platformConfig = z130.object({
|
|
18465
18488
|
partsEngine: partsEngine.optional(),
|
|
18466
18489
|
autorouter: autorouterProp.optional(),
|
|
18467
|
-
autorouterMap:
|
|
18490
|
+
autorouterMap: z130.record(z130.string(), autorouterDefinition).optional(),
|
|
18468
18491
|
registryApiUrl: url.optional(),
|
|
18469
18492
|
cloudAutorouterUrl: url.optional(),
|
|
18470
|
-
projectName:
|
|
18493
|
+
projectName: z130.string().optional(),
|
|
18471
18494
|
projectBaseUrl: url.optional(),
|
|
18472
|
-
version:
|
|
18495
|
+
version: z130.string().optional(),
|
|
18473
18496
|
url: url.optional(),
|
|
18474
|
-
printBoardInformationToSilkscreen:
|
|
18475
|
-
includeBoardFiles:
|
|
18497
|
+
printBoardInformationToSilkscreen: z130.boolean().optional(),
|
|
18498
|
+
includeBoardFiles: z130.array(z130.string()).describe(
|
|
18476
18499
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
18477
18500
|
).optional(),
|
|
18478
|
-
snapshotsDir:
|
|
18501
|
+
snapshotsDir: z130.string().describe(
|
|
18479
18502
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
18480
18503
|
).optional(),
|
|
18481
18504
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
18482
|
-
unitPreference:
|
|
18483
|
-
localCacheEngine:
|
|
18484
|
-
pcbDisabled:
|
|
18485
|
-
routingDisabled:
|
|
18486
|
-
schematicDisabled:
|
|
18487
|
-
partsEngineDisabled:
|
|
18488
|
-
drcChecksDisabled:
|
|
18489
|
-
netlistDrcChecksDisabled:
|
|
18490
|
-
routingDrcChecksDisabled:
|
|
18491
|
-
placementDrcChecksDisabled:
|
|
18492
|
-
pinSpecificationDrcChecksDisabled:
|
|
18493
|
-
spiceEngineMap:
|
|
18494
|
-
footprintLibraryMap:
|
|
18495
|
-
|
|
18496
|
-
|
|
18505
|
+
unitPreference: z130.enum(["mm", "in", "mil"]).optional(),
|
|
18506
|
+
localCacheEngine: z130.any().optional(),
|
|
18507
|
+
pcbDisabled: z130.boolean().optional(),
|
|
18508
|
+
routingDisabled: z130.boolean().optional(),
|
|
18509
|
+
schematicDisabled: z130.boolean().optional(),
|
|
18510
|
+
partsEngineDisabled: z130.boolean().optional(),
|
|
18511
|
+
drcChecksDisabled: z130.boolean().optional(),
|
|
18512
|
+
netlistDrcChecksDisabled: z130.boolean().optional(),
|
|
18513
|
+
routingDrcChecksDisabled: z130.boolean().optional(),
|
|
18514
|
+
placementDrcChecksDisabled: z130.boolean().optional(),
|
|
18515
|
+
pinSpecificationDrcChecksDisabled: z130.boolean().optional(),
|
|
18516
|
+
spiceEngineMap: z130.record(z130.string(), spiceEngineZod).optional(),
|
|
18517
|
+
footprintLibraryMap: z130.record(
|
|
18518
|
+
z130.string(),
|
|
18519
|
+
z130.union([
|
|
18497
18520
|
pathToCircuitJsonFn,
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18521
|
+
z130.record(
|
|
18522
|
+
z130.string(),
|
|
18523
|
+
z130.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
18501
18524
|
)
|
|
18502
18525
|
])
|
|
18503
18526
|
).optional(),
|
|
18504
|
-
footprintFileParserMap:
|
|
18505
|
-
resolveProjectStaticFileImportUrl:
|
|
18527
|
+
footprintFileParserMap: z130.record(z130.string(), footprintFileParserEntry).optional(),
|
|
18528
|
+
resolveProjectStaticFileImportUrl: z130.function().args(z130.string()).returns(z130.promise(z130.string())).describe(
|
|
18506
18529
|
"A function that returns a string URL for static files for the project"
|
|
18507
18530
|
).optional(),
|
|
18508
18531
|
platformFetch: platformFetch.optional()
|
|
@@ -18524,6 +18547,10 @@ var projectConfig = platformConfigObject.pick({
|
|
|
18524
18547
|
});
|
|
18525
18548
|
expectTypesMatch(true);
|
|
18526
18549
|
export {
|
|
18550
|
+
ammeterDisplayOptions,
|
|
18551
|
+
ammeterPinLabels,
|
|
18552
|
+
ammeterPins,
|
|
18553
|
+
ammeterProps,
|
|
18527
18554
|
analogSimulationProps,
|
|
18528
18555
|
autorouterConfig,
|
|
18529
18556
|
autorouterEffortLevel,
|