circuit-json 0.0.221 → 0.0.223
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 +42 -0
- package/dist/index.d.mts +496 -3
- package/dist/index.mjs +61 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1157,11 +1157,33 @@ var pcb_pill_hole_with_rect_pad = z59.object({
|
|
|
1157
1157
|
pcb_port_id: z59.string().optional(),
|
|
1158
1158
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1159
1159
|
});
|
|
1160
|
+
var pcb_rotated_pill_hole_with_rect_pad = z59.object({
|
|
1161
|
+
type: z59.literal("pcb_plated_hole"),
|
|
1162
|
+
shape: z59.literal("rotated_pill_hole_with_rect_pad"),
|
|
1163
|
+
pcb_group_id: z59.string().optional(),
|
|
1164
|
+
subcircuit_id: z59.string().optional(),
|
|
1165
|
+
hole_shape: z59.literal("rotated_pill"),
|
|
1166
|
+
pad_shape: z59.literal("rect"),
|
|
1167
|
+
hole_width: z59.number(),
|
|
1168
|
+
hole_height: z59.number(),
|
|
1169
|
+
hole_ccw_rotation: rotation,
|
|
1170
|
+
rect_pad_width: z59.number(),
|
|
1171
|
+
rect_pad_height: z59.number(),
|
|
1172
|
+
rect_ccw_rotation: rotation,
|
|
1173
|
+
x: distance,
|
|
1174
|
+
y: distance,
|
|
1175
|
+
layers: z59.array(layer_ref),
|
|
1176
|
+
port_hints: z59.array(z59.string()).optional(),
|
|
1177
|
+
pcb_component_id: z59.string().optional(),
|
|
1178
|
+
pcb_port_id: z59.string().optional(),
|
|
1179
|
+
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1180
|
+
});
|
|
1160
1181
|
var pcb_plated_hole = z59.union([
|
|
1161
1182
|
pcb_plated_hole_circle,
|
|
1162
1183
|
pcb_plated_hole_oval,
|
|
1163
1184
|
pcb_circular_hole_with_rect_pad,
|
|
1164
|
-
pcb_pill_hole_with_rect_pad
|
|
1185
|
+
pcb_pill_hole_with_rect_pad,
|
|
1186
|
+
pcb_rotated_pill_hole_with_rect_pad
|
|
1165
1187
|
]);
|
|
1166
1188
|
expectTypesMatch(
|
|
1167
1189
|
true
|
|
@@ -1169,6 +1191,7 @@ expectTypesMatch(
|
|
|
1169
1191
|
expectTypesMatch(true);
|
|
1170
1192
|
expectTypesMatch(true);
|
|
1171
1193
|
expectTypesMatch(true);
|
|
1194
|
+
expectTypesMatch(true);
|
|
1172
1195
|
|
|
1173
1196
|
// src/pcb/pcb_port.ts
|
|
1174
1197
|
import { z as z60 } from "zod";
|
|
@@ -1248,6 +1271,23 @@ var pcb_smtpad_pill = z61.object({
|
|
|
1248
1271
|
pcb_component_id: z61.string().optional(),
|
|
1249
1272
|
pcb_port_id: z61.string().optional()
|
|
1250
1273
|
});
|
|
1274
|
+
var pcb_smtpad_rotated_pill = z61.object({
|
|
1275
|
+
type: z61.literal("pcb_smtpad"),
|
|
1276
|
+
shape: z61.literal("rotated_pill"),
|
|
1277
|
+
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1278
|
+
pcb_group_id: z61.string().optional(),
|
|
1279
|
+
subcircuit_id: z61.string().optional(),
|
|
1280
|
+
x: distance,
|
|
1281
|
+
y: distance,
|
|
1282
|
+
width: z61.number(),
|
|
1283
|
+
height: z61.number(),
|
|
1284
|
+
radius: z61.number(),
|
|
1285
|
+
ccw_rotation: rotation,
|
|
1286
|
+
layer: layer_ref,
|
|
1287
|
+
port_hints: z61.array(z61.string()).optional(),
|
|
1288
|
+
pcb_component_id: z61.string().optional(),
|
|
1289
|
+
pcb_port_id: z61.string().optional()
|
|
1290
|
+
});
|
|
1251
1291
|
var pcb_smtpad_polygon = z61.object({
|
|
1252
1292
|
type: z61.literal("pcb_smtpad"),
|
|
1253
1293
|
shape: z61.literal("polygon"),
|
|
@@ -1264,6 +1304,7 @@ var pcb_smtpad = z61.discriminatedUnion("shape", [
|
|
|
1264
1304
|
pcb_smtpad_circle,
|
|
1265
1305
|
pcb_smtpad_rect,
|
|
1266
1306
|
pcb_smtpad_rotated_rect,
|
|
1307
|
+
pcb_smtpad_rotated_pill,
|
|
1267
1308
|
pcb_smtpad_pill,
|
|
1268
1309
|
pcb_smtpad_polygon
|
|
1269
1310
|
]).describe("Defines an SMT pad on the PCB");
|
|
@@ -1272,6 +1313,7 @@ expectTypesMatch(true);
|
|
|
1272
1313
|
expectTypesMatch(true);
|
|
1273
1314
|
expectTypesMatch(true);
|
|
1274
1315
|
expectTypesMatch(true);
|
|
1316
|
+
expectTypesMatch(true);
|
|
1275
1317
|
|
|
1276
1318
|
// src/pcb/pcb_solder_paste.ts
|
|
1277
1319
|
import { z as z62 } from "zod";
|
|
@@ -1878,9 +1920,22 @@ var cad_component = z90.object({
|
|
|
1878
1920
|
}).describe("Defines a component on the PCB");
|
|
1879
1921
|
expectTypesMatch(true);
|
|
1880
1922
|
|
|
1881
|
-
// src/
|
|
1923
|
+
// src/simulation/simulation_voltage_source.ts
|
|
1882
1924
|
import { z as z91 } from "zod";
|
|
1883
|
-
var
|
|
1925
|
+
var simulation_voltage_source = z91.object({
|
|
1926
|
+
type: z91.literal("simulation_voltage_source"),
|
|
1927
|
+
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
1928
|
+
"simulation_voltage_source"
|
|
1929
|
+
),
|
|
1930
|
+
positive_source_port_id: z91.string(),
|
|
1931
|
+
negative_source_port_id: z91.string(),
|
|
1932
|
+
voltage
|
|
1933
|
+
}).describe("Defines a voltage source for simulation");
|
|
1934
|
+
expectTypesMatch(true);
|
|
1935
|
+
|
|
1936
|
+
// src/any_circuit_element.ts
|
|
1937
|
+
import { z as z92 } from "zod";
|
|
1938
|
+
var any_circuit_element = z92.union([
|
|
1884
1939
|
source_trace,
|
|
1885
1940
|
source_port,
|
|
1886
1941
|
any_source_component,
|
|
@@ -1953,7 +2008,8 @@ var any_circuit_element = z91.union([
|
|
|
1953
2008
|
schematic_group,
|
|
1954
2009
|
schematic_table,
|
|
1955
2010
|
schematic_table_cell,
|
|
1956
|
-
cad_component
|
|
2011
|
+
cad_component,
|
|
2012
|
+
simulation_voltage_source
|
|
1957
2013
|
]);
|
|
1958
2014
|
var any_soup_element = any_circuit_element;
|
|
1959
2015
|
expectTypesMatch(true);
|
|
@@ -2050,6 +2106,7 @@ export {
|
|
|
2050
2106
|
schematic_text,
|
|
2051
2107
|
schematic_trace,
|
|
2052
2108
|
schematic_voltage_probe,
|
|
2109
|
+
simulation_voltage_source,
|
|
2053
2110
|
size,
|
|
2054
2111
|
source_component_base,
|
|
2055
2112
|
source_failed_to_create_component_error,
|