circuit-json 0.0.237 → 0.0.239
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 +3 -2
- package/dist/index.d.mts +37 -16
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,9 +28,9 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
28
28
|
|
|
29
29
|
- Generate [Gerber files](https://github.com/tscircuit/circuit-json-to-gerber)
|
|
30
30
|
- Generate and read [Specctra DSN Autorouting files](https://github.com/tscircuit/dsn-converter)
|
|
31
|
-
- Generate [Pick'n'Place Files](https://github.com/tscircuit/circuit-json-to-pnp)
|
|
31
|
+
- Generate [Pick'n'Place Files](https://github.com/tscircuit/circuit-json-to-pnp-csv)
|
|
32
32
|
- Generate [PCB and Schematic SVGs](https://github.com/tscircuit/circuit-to-svg)
|
|
33
|
-
- Generate [Bill of Materials](https://github.com/tscircuit/circuit-json-to-bom)
|
|
33
|
+
- Generate [Bill of Materials](https://github.com/tscircuit/circuit-json-to-bom-csv)
|
|
34
34
|
- Generate [SPICE netlists and simulations](https://github.com/tscircuit/circuit-json-to-spice)
|
|
35
35
|
- Display [PCBs on the web](https://github.com/tscircuit/pcb-viewer)
|
|
36
36
|
- Display [Schematics on the web](https://github.com/tscircuit/schematic-viewer)
|
|
@@ -301,6 +301,7 @@ interface SourceNet {
|
|
|
301
301
|
is_ground?: boolean
|
|
302
302
|
is_digital_signal?: boolean
|
|
303
303
|
is_analog_signal?: boolean
|
|
304
|
+
is_positive_voltage_source?: boolean
|
|
304
305
|
trace_width?: number
|
|
305
306
|
subcircuit_id?: string
|
|
306
307
|
subcircuit_connectivity_map_key?: string
|
package/dist/index.d.mts
CHANGED
|
@@ -4810,18 +4810,20 @@ interface SchematicTraceEdge {
|
|
|
4810
4810
|
interface SchematicTrace {
|
|
4811
4811
|
type: "schematic_trace";
|
|
4812
4812
|
schematic_trace_id: string;
|
|
4813
|
-
source_trace_id
|
|
4813
|
+
source_trace_id?: string;
|
|
4814
4814
|
junctions: {
|
|
4815
4815
|
x: number;
|
|
4816
4816
|
y: number;
|
|
4817
4817
|
}[];
|
|
4818
4818
|
edges: SchematicTraceEdge[];
|
|
4819
4819
|
subcircuit_id?: string;
|
|
4820
|
+
/** Optional for now, but will be required in a future release */
|
|
4821
|
+
subcircuit_connectivity_map_key?: string;
|
|
4820
4822
|
}
|
|
4821
4823
|
declare const schematic_trace: z.ZodObject<{
|
|
4822
4824
|
type: z.ZodLiteral<"schematic_trace">;
|
|
4823
4825
|
schematic_trace_id: z.ZodString;
|
|
4824
|
-
source_trace_id: z.ZodString
|
|
4826
|
+
source_trace_id: z.ZodOptional<z.ZodString>;
|
|
4825
4827
|
junctions: z.ZodArray<z.ZodObject<{
|
|
4826
4828
|
x: z.ZodNumber;
|
|
4827
4829
|
y: z.ZodNumber;
|
|
@@ -4882,9 +4884,9 @@ declare const schematic_trace: z.ZodObject<{
|
|
|
4882
4884
|
to_schematic_port_id?: string | undefined;
|
|
4883
4885
|
}>, "many">;
|
|
4884
4886
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
4887
|
+
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
4885
4888
|
}, "strip", z.ZodTypeAny, {
|
|
4886
4889
|
type: "schematic_trace";
|
|
4887
|
-
source_trace_id: string;
|
|
4888
4890
|
schematic_trace_id: string;
|
|
4889
4891
|
junctions: {
|
|
4890
4892
|
x: number;
|
|
@@ -4904,9 +4906,10 @@ declare const schematic_trace: z.ZodObject<{
|
|
|
4904
4906
|
to_schematic_port_id?: string | undefined;
|
|
4905
4907
|
}[];
|
|
4906
4908
|
subcircuit_id?: string | undefined;
|
|
4909
|
+
source_trace_id?: string | undefined;
|
|
4910
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
4907
4911
|
}, {
|
|
4908
4912
|
type: "schematic_trace";
|
|
4909
|
-
source_trace_id: string;
|
|
4910
4913
|
schematic_trace_id: string;
|
|
4911
4914
|
junctions: {
|
|
4912
4915
|
x: number;
|
|
@@ -4926,6 +4929,8 @@ declare const schematic_trace: z.ZodObject<{
|
|
|
4926
4929
|
to_schematic_port_id?: string | undefined;
|
|
4927
4930
|
}[];
|
|
4928
4931
|
subcircuit_id?: string | undefined;
|
|
4932
|
+
source_trace_id?: string | undefined;
|
|
4933
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
4929
4934
|
}>;
|
|
4930
4935
|
type SchematicTraceInput = z.input<typeof schematic_trace>;
|
|
4931
4936
|
|
|
@@ -8227,8 +8232,8 @@ declare const source_port: z.ZodObject<{
|
|
|
8227
8232
|
source_port_id: string;
|
|
8228
8233
|
subcircuit_id?: string | undefined;
|
|
8229
8234
|
port_hints?: string[] | undefined;
|
|
8230
|
-
pin_number?: number | undefined;
|
|
8231
8235
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
8236
|
+
pin_number?: number | undefined;
|
|
8232
8237
|
}, {
|
|
8233
8238
|
type: "source_port";
|
|
8234
8239
|
name: string;
|
|
@@ -8236,8 +8241,8 @@ declare const source_port: z.ZodObject<{
|
|
|
8236
8241
|
source_port_id: string;
|
|
8237
8242
|
subcircuit_id?: string | undefined;
|
|
8238
8243
|
port_hints?: string[] | undefined;
|
|
8239
|
-
pin_number?: number | undefined;
|
|
8240
8244
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
8245
|
+
pin_number?: number | undefined;
|
|
8241
8246
|
}>;
|
|
8242
8247
|
type SourcePortInput = z.input<typeof source_port>;
|
|
8243
8248
|
/**
|
|
@@ -8342,6 +8347,7 @@ declare const source_net: z.ZodObject<{
|
|
|
8342
8347
|
is_ground: z.ZodOptional<z.ZodBoolean>;
|
|
8343
8348
|
is_digital_signal: z.ZodOptional<z.ZodBoolean>;
|
|
8344
8349
|
is_analog_signal: z.ZodOptional<z.ZodBoolean>;
|
|
8350
|
+
is_positive_voltage_source: z.ZodOptional<z.ZodBoolean>;
|
|
8345
8351
|
trace_width: z.ZodOptional<z.ZodNumber>;
|
|
8346
8352
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
8347
8353
|
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
@@ -8357,6 +8363,7 @@ declare const source_net: z.ZodObject<{
|
|
|
8357
8363
|
is_ground?: boolean | undefined;
|
|
8358
8364
|
is_digital_signal?: boolean | undefined;
|
|
8359
8365
|
is_analog_signal?: boolean | undefined;
|
|
8366
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
8360
8367
|
}, {
|
|
8361
8368
|
type: "source_net";
|
|
8362
8369
|
name: string;
|
|
@@ -8369,6 +8376,7 @@ declare const source_net: z.ZodObject<{
|
|
|
8369
8376
|
is_ground?: boolean | undefined;
|
|
8370
8377
|
is_digital_signal?: boolean | undefined;
|
|
8371
8378
|
is_analog_signal?: boolean | undefined;
|
|
8379
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
8372
8380
|
}>;
|
|
8373
8381
|
type SourceNetInput = z.input<typeof source_net>;
|
|
8374
8382
|
interface SourceNet {
|
|
@@ -8380,6 +8388,7 @@ interface SourceNet {
|
|
|
8380
8388
|
is_ground?: boolean;
|
|
8381
8389
|
is_digital_signal?: boolean;
|
|
8382
8390
|
is_analog_signal?: boolean;
|
|
8391
|
+
is_positive_voltage_source?: boolean;
|
|
8383
8392
|
trace_width?: number;
|
|
8384
8393
|
subcircuit_id?: string;
|
|
8385
8394
|
subcircuit_connectivity_map_key?: string;
|
|
@@ -8775,8 +8784,8 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8775
8784
|
source_port_id: string;
|
|
8776
8785
|
subcircuit_id?: string | undefined;
|
|
8777
8786
|
port_hints?: string[] | undefined;
|
|
8778
|
-
pin_number?: number | undefined;
|
|
8779
8787
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
8788
|
+
pin_number?: number | undefined;
|
|
8780
8789
|
}, {
|
|
8781
8790
|
type: "source_port";
|
|
8782
8791
|
name: string;
|
|
@@ -8784,8 +8793,8 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
8784
8793
|
source_port_id: string;
|
|
8785
8794
|
subcircuit_id?: string | undefined;
|
|
8786
8795
|
port_hints?: string[] | undefined;
|
|
8787
|
-
pin_number?: number | undefined;
|
|
8788
8796
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
8797
|
+
pin_number?: number | undefined;
|
|
8789
8798
|
}>, z.ZodUnion<[z.ZodObject<{
|
|
8790
8799
|
type: z.ZodLiteral<"source_component">;
|
|
8791
8800
|
source_component_id: z.ZodString;
|
|
@@ -9808,6 +9817,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
9808
9817
|
is_ground: z.ZodOptional<z.ZodBoolean>;
|
|
9809
9818
|
is_digital_signal: z.ZodOptional<z.ZodBoolean>;
|
|
9810
9819
|
is_analog_signal: z.ZodOptional<z.ZodBoolean>;
|
|
9820
|
+
is_positive_voltage_source: z.ZodOptional<z.ZodBoolean>;
|
|
9811
9821
|
trace_width: z.ZodOptional<z.ZodNumber>;
|
|
9812
9822
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
9813
9823
|
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
@@ -9823,6 +9833,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
9823
9833
|
is_ground?: boolean | undefined;
|
|
9824
9834
|
is_digital_signal?: boolean | undefined;
|
|
9825
9835
|
is_analog_signal?: boolean | undefined;
|
|
9836
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
9826
9837
|
}, {
|
|
9827
9838
|
type: "source_net";
|
|
9828
9839
|
name: string;
|
|
@@ -9835,6 +9846,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
9835
9846
|
is_ground?: boolean | undefined;
|
|
9836
9847
|
is_digital_signal?: boolean | undefined;
|
|
9837
9848
|
is_analog_signal?: boolean | undefined;
|
|
9849
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
9838
9850
|
}>, z.ZodObject<{
|
|
9839
9851
|
type: z.ZodLiteral<"source_group">;
|
|
9840
9852
|
source_group_id: z.ZodString;
|
|
@@ -13559,7 +13571,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
13559
13571
|
}>, z.ZodObject<{
|
|
13560
13572
|
type: z.ZodLiteral<"schematic_trace">;
|
|
13561
13573
|
schematic_trace_id: z.ZodString;
|
|
13562
|
-
source_trace_id: z.ZodString
|
|
13574
|
+
source_trace_id: z.ZodOptional<z.ZodString>;
|
|
13563
13575
|
junctions: z.ZodArray<z.ZodObject<{
|
|
13564
13576
|
x: z.ZodNumber;
|
|
13565
13577
|
y: z.ZodNumber;
|
|
@@ -13620,9 +13632,9 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
13620
13632
|
to_schematic_port_id?: string | undefined;
|
|
13621
13633
|
}>, "many">;
|
|
13622
13634
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
13635
|
+
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
13623
13636
|
}, "strip", z.ZodTypeAny, {
|
|
13624
13637
|
type: "schematic_trace";
|
|
13625
|
-
source_trace_id: string;
|
|
13626
13638
|
schematic_trace_id: string;
|
|
13627
13639
|
junctions: {
|
|
13628
13640
|
x: number;
|
|
@@ -13642,9 +13654,10 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
13642
13654
|
to_schematic_port_id?: string | undefined;
|
|
13643
13655
|
}[];
|
|
13644
13656
|
subcircuit_id?: string | undefined;
|
|
13657
|
+
source_trace_id?: string | undefined;
|
|
13658
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
13645
13659
|
}, {
|
|
13646
13660
|
type: "schematic_trace";
|
|
13647
|
-
source_trace_id: string;
|
|
13648
13661
|
schematic_trace_id: string;
|
|
13649
13662
|
junctions: {
|
|
13650
13663
|
x: number;
|
|
@@ -13664,6 +13677,8 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
13664
13677
|
to_schematic_port_id?: string | undefined;
|
|
13665
13678
|
}[];
|
|
13666
13679
|
subcircuit_id?: string | undefined;
|
|
13680
|
+
source_trace_id?: string | undefined;
|
|
13681
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
13667
13682
|
}>, z.ZodObject<{
|
|
13668
13683
|
type: z.ZodLiteral<"schematic_path">;
|
|
13669
13684
|
schematic_component_id: z.ZodString;
|
|
@@ -14408,8 +14423,8 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
14408
14423
|
source_port_id: string;
|
|
14409
14424
|
subcircuit_id?: string | undefined;
|
|
14410
14425
|
port_hints?: string[] | undefined;
|
|
14411
|
-
pin_number?: number | undefined;
|
|
14412
14426
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
14427
|
+
pin_number?: number | undefined;
|
|
14413
14428
|
}, {
|
|
14414
14429
|
type: "source_port";
|
|
14415
14430
|
name: string;
|
|
@@ -14417,8 +14432,8 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
14417
14432
|
source_port_id: string;
|
|
14418
14433
|
subcircuit_id?: string | undefined;
|
|
14419
14434
|
port_hints?: string[] | undefined;
|
|
14420
|
-
pin_number?: number | undefined;
|
|
14421
14435
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
14436
|
+
pin_number?: number | undefined;
|
|
14422
14437
|
}>, z.ZodUnion<[z.ZodObject<{
|
|
14423
14438
|
type: z.ZodLiteral<"source_component">;
|
|
14424
14439
|
source_component_id: z.ZodString;
|
|
@@ -15441,6 +15456,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
15441
15456
|
is_ground: z.ZodOptional<z.ZodBoolean>;
|
|
15442
15457
|
is_digital_signal: z.ZodOptional<z.ZodBoolean>;
|
|
15443
15458
|
is_analog_signal: z.ZodOptional<z.ZodBoolean>;
|
|
15459
|
+
is_positive_voltage_source: z.ZodOptional<z.ZodBoolean>;
|
|
15444
15460
|
trace_width: z.ZodOptional<z.ZodNumber>;
|
|
15445
15461
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
15446
15462
|
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
@@ -15456,6 +15472,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
15456
15472
|
is_ground?: boolean | undefined;
|
|
15457
15473
|
is_digital_signal?: boolean | undefined;
|
|
15458
15474
|
is_analog_signal?: boolean | undefined;
|
|
15475
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
15459
15476
|
}, {
|
|
15460
15477
|
type: "source_net";
|
|
15461
15478
|
name: string;
|
|
@@ -15468,6 +15485,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
15468
15485
|
is_ground?: boolean | undefined;
|
|
15469
15486
|
is_digital_signal?: boolean | undefined;
|
|
15470
15487
|
is_analog_signal?: boolean | undefined;
|
|
15488
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
15471
15489
|
}>, z.ZodObject<{
|
|
15472
15490
|
type: z.ZodLiteral<"source_group">;
|
|
15473
15491
|
source_group_id: z.ZodString;
|
|
@@ -19192,7 +19210,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
19192
19210
|
}>, z.ZodObject<{
|
|
19193
19211
|
type: z.ZodLiteral<"schematic_trace">;
|
|
19194
19212
|
schematic_trace_id: z.ZodString;
|
|
19195
|
-
source_trace_id: z.ZodString
|
|
19213
|
+
source_trace_id: z.ZodOptional<z.ZodString>;
|
|
19196
19214
|
junctions: z.ZodArray<z.ZodObject<{
|
|
19197
19215
|
x: z.ZodNumber;
|
|
19198
19216
|
y: z.ZodNumber;
|
|
@@ -19253,9 +19271,9 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
19253
19271
|
to_schematic_port_id?: string | undefined;
|
|
19254
19272
|
}>, "many">;
|
|
19255
19273
|
subcircuit_id: z.ZodOptional<z.ZodString>;
|
|
19274
|
+
subcircuit_connectivity_map_key: z.ZodOptional<z.ZodString>;
|
|
19256
19275
|
}, "strip", z.ZodTypeAny, {
|
|
19257
19276
|
type: "schematic_trace";
|
|
19258
|
-
source_trace_id: string;
|
|
19259
19277
|
schematic_trace_id: string;
|
|
19260
19278
|
junctions: {
|
|
19261
19279
|
x: number;
|
|
@@ -19275,9 +19293,10 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
19275
19293
|
to_schematic_port_id?: string | undefined;
|
|
19276
19294
|
}[];
|
|
19277
19295
|
subcircuit_id?: string | undefined;
|
|
19296
|
+
source_trace_id?: string | undefined;
|
|
19297
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
19278
19298
|
}, {
|
|
19279
19299
|
type: "schematic_trace";
|
|
19280
|
-
source_trace_id: string;
|
|
19281
19300
|
schematic_trace_id: string;
|
|
19282
19301
|
junctions: {
|
|
19283
19302
|
x: number;
|
|
@@ -19297,6 +19316,8 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
19297
19316
|
to_schematic_port_id?: string | undefined;
|
|
19298
19317
|
}[];
|
|
19299
19318
|
subcircuit_id?: string | undefined;
|
|
19319
|
+
source_trace_id?: string | undefined;
|
|
19320
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
19300
19321
|
}>, z.ZodObject<{
|
|
19301
19322
|
type: z.ZodLiteral<"schematic_path">;
|
|
19302
19323
|
schematic_component_id: z.ZodString;
|
package/dist/index.mjs
CHANGED
|
@@ -695,6 +695,7 @@ var source_net = z39.object({
|
|
|
695
695
|
is_ground: z39.boolean().optional(),
|
|
696
696
|
is_digital_signal: z39.boolean().optional(),
|
|
697
697
|
is_analog_signal: z39.boolean().optional(),
|
|
698
|
+
is_positive_voltage_source: z39.boolean().optional(),
|
|
698
699
|
trace_width: z39.number().optional(),
|
|
699
700
|
subcircuit_id: z39.string().optional(),
|
|
700
701
|
subcircuit_connectivity_map_key: z39.string().optional()
|
|
@@ -818,7 +819,7 @@ import { z as z45 } from "zod";
|
|
|
818
819
|
var schematic_trace = z45.object({
|
|
819
820
|
type: z45.literal("schematic_trace"),
|
|
820
821
|
schematic_trace_id: z45.string(),
|
|
821
|
-
source_trace_id: z45.string(),
|
|
822
|
+
source_trace_id: z45.string().optional(),
|
|
822
823
|
junctions: z45.array(
|
|
823
824
|
z45.object({
|
|
824
825
|
x: z45.number(),
|
|
@@ -840,7 +841,9 @@ var schematic_trace = z45.object({
|
|
|
840
841
|
to_schematic_port_id: z45.string().optional()
|
|
841
842
|
})
|
|
842
843
|
),
|
|
843
|
-
subcircuit_id: z45.string().optional()
|
|
844
|
+
subcircuit_id: z45.string().optional(),
|
|
845
|
+
// TODO: make required in a future release
|
|
846
|
+
subcircuit_connectivity_map_key: z45.string().optional()
|
|
844
847
|
});
|
|
845
848
|
expectTypesMatch(true);
|
|
846
849
|
|