@tscircuit/eval 0.0.298 → 0.0.300
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/dist/blob-url.js +1 -1
- package/dist/eval/index.d.ts +178 -4
- package/dist/eval/index.js +9 -2
- package/dist/lib/index.d.ts +178 -4
- package/dist/lib/index.js +9 -2
- package/dist/webworker/entrypoint.js +381 -472
- package/lib/runner/resolveFilePath.ts +1 -1
- package/package.json +11 -10
- package/tests/features/import-obj-file.test.tsx +49 -0
- package/webworker/import-local-file.ts +7 -0
package/dist/lib/index.d.ts
CHANGED
|
@@ -119,8 +119,8 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
119
119
|
source_port_id: string;
|
|
120
120
|
subcircuit_id?: string | undefined;
|
|
121
121
|
port_hints?: string[] | undefined;
|
|
122
|
-
pin_number?: number | undefined;
|
|
123
122
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
123
|
+
pin_number?: number | undefined;
|
|
124
124
|
} | {
|
|
125
125
|
type: "source_component";
|
|
126
126
|
name: string;
|
|
@@ -294,6 +294,18 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
294
294
|
display_value?: string | undefined;
|
|
295
295
|
are_pins_interchangeable?: boolean | undefined;
|
|
296
296
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
297
|
+
} | {
|
|
298
|
+
type: "source_component";
|
|
299
|
+
name: string;
|
|
300
|
+
source_component_id: string;
|
|
301
|
+
ftype: "simple_pinout";
|
|
302
|
+
subcircuit_id?: string | undefined;
|
|
303
|
+
source_group_id?: string | undefined;
|
|
304
|
+
manufacturer_part_number?: string | undefined;
|
|
305
|
+
supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
306
|
+
display_value?: string | undefined;
|
|
307
|
+
are_pins_interchangeable?: boolean | undefined;
|
|
308
|
+
internally_connected_source_port_ids?: string[][] | undefined;
|
|
297
309
|
} | {
|
|
298
310
|
type: "source_component";
|
|
299
311
|
name: string;
|
|
@@ -448,6 +460,7 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
448
460
|
is_ground?: boolean | undefined;
|
|
449
461
|
is_digital_signal?: boolean | undefined;
|
|
450
462
|
is_analog_signal?: boolean | undefined;
|
|
463
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
451
464
|
} | {
|
|
452
465
|
type: "source_group";
|
|
453
466
|
source_group_id: string;
|
|
@@ -578,6 +591,18 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
578
591
|
display_value?: string | undefined;
|
|
579
592
|
are_pins_interchangeable?: boolean | undefined;
|
|
580
593
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
594
|
+
} | {
|
|
595
|
+
type: "source_component";
|
|
596
|
+
name: string;
|
|
597
|
+
source_component_id: string;
|
|
598
|
+
ftype: "simple_pinout";
|
|
599
|
+
subcircuit_id?: string | undefined;
|
|
600
|
+
source_group_id?: string | undefined;
|
|
601
|
+
manufacturer_part_number?: string | undefined;
|
|
602
|
+
supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
603
|
+
display_value?: string | undefined;
|
|
604
|
+
are_pins_interchangeable?: boolean | undefined;
|
|
605
|
+
internally_connected_source_port_ids?: string[][] | undefined;
|
|
581
606
|
} | {
|
|
582
607
|
type: "source_component";
|
|
583
608
|
name: string;
|
|
@@ -681,6 +706,13 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
681
706
|
source_net_id: string;
|
|
682
707
|
source_pcb_ground_plane_id: string;
|
|
683
708
|
subcircuit_id?: string | undefined;
|
|
709
|
+
} | {
|
|
710
|
+
type: "source_manually_placed_via";
|
|
711
|
+
source_group_id: string;
|
|
712
|
+
source_net_id: string;
|
|
713
|
+
source_manually_placed_via_id: string;
|
|
714
|
+
subcircuit_id?: string | undefined;
|
|
715
|
+
source_trace_id?: string | undefined;
|
|
684
716
|
} | {
|
|
685
717
|
type: "source_project_metadata";
|
|
686
718
|
name?: string | undefined;
|
|
@@ -1385,6 +1417,57 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
1385
1417
|
spoke_outer_diameter: number;
|
|
1386
1418
|
subcircuit_id?: string | undefined;
|
|
1387
1419
|
pcb_plated_hole_id?: string | undefined;
|
|
1420
|
+
} | {
|
|
1421
|
+
type: "pcb_copper_pour";
|
|
1422
|
+
width: number;
|
|
1423
|
+
height: number;
|
|
1424
|
+
center: {
|
|
1425
|
+
x: number;
|
|
1426
|
+
y: number;
|
|
1427
|
+
};
|
|
1428
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1429
|
+
shape: "rect";
|
|
1430
|
+
pcb_copper_pour_id: string;
|
|
1431
|
+
rotation?: number | undefined;
|
|
1432
|
+
subcircuit_id?: string | undefined;
|
|
1433
|
+
pcb_group_id?: string | undefined;
|
|
1434
|
+
source_net_id?: string | undefined;
|
|
1435
|
+
} | {
|
|
1436
|
+
type: "pcb_copper_pour";
|
|
1437
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1438
|
+
shape: "brep";
|
|
1439
|
+
pcb_copper_pour_id: string;
|
|
1440
|
+
brep_shape: {
|
|
1441
|
+
outer_ring: {
|
|
1442
|
+
vertices: {
|
|
1443
|
+
x: number;
|
|
1444
|
+
y: number;
|
|
1445
|
+
bulge?: number | undefined;
|
|
1446
|
+
}[];
|
|
1447
|
+
};
|
|
1448
|
+
inner_rings: {
|
|
1449
|
+
vertices: {
|
|
1450
|
+
x: number;
|
|
1451
|
+
y: number;
|
|
1452
|
+
bulge?: number | undefined;
|
|
1453
|
+
}[];
|
|
1454
|
+
}[];
|
|
1455
|
+
};
|
|
1456
|
+
subcircuit_id?: string | undefined;
|
|
1457
|
+
pcb_group_id?: string | undefined;
|
|
1458
|
+
source_net_id?: string | undefined;
|
|
1459
|
+
} | {
|
|
1460
|
+
type: "pcb_copper_pour";
|
|
1461
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
1462
|
+
shape: "polygon";
|
|
1463
|
+
points: {
|
|
1464
|
+
x: number;
|
|
1465
|
+
y: number;
|
|
1466
|
+
}[];
|
|
1467
|
+
pcb_copper_pour_id: string;
|
|
1468
|
+
subcircuit_id?: string | undefined;
|
|
1469
|
+
pcb_group_id?: string | undefined;
|
|
1470
|
+
source_net_id?: string | undefined;
|
|
1388
1471
|
} | {
|
|
1389
1472
|
x: number;
|
|
1390
1473
|
y: number;
|
|
@@ -1485,7 +1568,6 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
1485
1568
|
has_output_arrow?: boolean | undefined;
|
|
1486
1569
|
} | {
|
|
1487
1570
|
type: "schematic_trace";
|
|
1488
|
-
source_trace_id: string;
|
|
1489
1571
|
schematic_trace_id: string;
|
|
1490
1572
|
junctions: {
|
|
1491
1573
|
x: number;
|
|
@@ -1505,6 +1587,8 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
1505
1587
|
to_schematic_port_id?: string | undefined;
|
|
1506
1588
|
}[];
|
|
1507
1589
|
subcircuit_id?: string | undefined;
|
|
1590
|
+
source_trace_id?: string | undefined;
|
|
1591
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
1508
1592
|
} | {
|
|
1509
1593
|
type: "schematic_path";
|
|
1510
1594
|
points: {
|
|
@@ -1676,6 +1760,9 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
|
|
|
1676
1760
|
model_obj_url?: string | undefined;
|
|
1677
1761
|
model_stl_url?: string | undefined;
|
|
1678
1762
|
model_3mf_url?: string | undefined;
|
|
1763
|
+
model_gltf_url?: string | undefined;
|
|
1764
|
+
model_glb_url?: string | undefined;
|
|
1765
|
+
model_step_url?: string | undefined;
|
|
1679
1766
|
model_jscad?: any;
|
|
1680
1767
|
} | {
|
|
1681
1768
|
type: "simulation_voltage_source";
|
|
@@ -1722,8 +1809,8 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
1722
1809
|
source_port_id: string;
|
|
1723
1810
|
subcircuit_id?: string | undefined;
|
|
1724
1811
|
port_hints?: string[] | undefined;
|
|
1725
|
-
pin_number?: number | undefined;
|
|
1726
1812
|
subcircuit_connectivity_map_key?: string | undefined;
|
|
1813
|
+
pin_number?: number | undefined;
|
|
1727
1814
|
} | {
|
|
1728
1815
|
type: "source_component";
|
|
1729
1816
|
name: string;
|
|
@@ -1897,6 +1984,18 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
1897
1984
|
display_value?: string | undefined;
|
|
1898
1985
|
are_pins_interchangeable?: boolean | undefined;
|
|
1899
1986
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
1987
|
+
} | {
|
|
1988
|
+
type: "source_component";
|
|
1989
|
+
name: string;
|
|
1990
|
+
source_component_id: string;
|
|
1991
|
+
ftype: "simple_pinout";
|
|
1992
|
+
subcircuit_id?: string | undefined;
|
|
1993
|
+
source_group_id?: string | undefined;
|
|
1994
|
+
manufacturer_part_number?: string | undefined;
|
|
1995
|
+
supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
1996
|
+
display_value?: string | undefined;
|
|
1997
|
+
are_pins_interchangeable?: boolean | undefined;
|
|
1998
|
+
internally_connected_source_port_ids?: string[][] | undefined;
|
|
1900
1999
|
} | {
|
|
1901
2000
|
type: "source_component";
|
|
1902
2001
|
name: string;
|
|
@@ -2051,6 +2150,7 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
2051
2150
|
is_ground?: boolean | undefined;
|
|
2052
2151
|
is_digital_signal?: boolean | undefined;
|
|
2053
2152
|
is_analog_signal?: boolean | undefined;
|
|
2153
|
+
is_positive_voltage_source?: boolean | undefined;
|
|
2054
2154
|
} | {
|
|
2055
2155
|
type: "source_group";
|
|
2056
2156
|
source_group_id: string;
|
|
@@ -2181,6 +2281,18 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
2181
2281
|
display_value?: string | undefined;
|
|
2182
2282
|
are_pins_interchangeable?: boolean | undefined;
|
|
2183
2283
|
internally_connected_source_port_ids?: string[][] | undefined;
|
|
2284
|
+
} | {
|
|
2285
|
+
type: "source_component";
|
|
2286
|
+
name: string;
|
|
2287
|
+
source_component_id: string;
|
|
2288
|
+
ftype: "simple_pinout";
|
|
2289
|
+
subcircuit_id?: string | undefined;
|
|
2290
|
+
source_group_id?: string | undefined;
|
|
2291
|
+
manufacturer_part_number?: string | undefined;
|
|
2292
|
+
supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
|
|
2293
|
+
display_value?: string | undefined;
|
|
2294
|
+
are_pins_interchangeable?: boolean | undefined;
|
|
2295
|
+
internally_connected_source_port_ids?: string[][] | undefined;
|
|
2184
2296
|
} | {
|
|
2185
2297
|
type: "source_component";
|
|
2186
2298
|
name: string;
|
|
@@ -2284,6 +2396,13 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
2284
2396
|
source_net_id: string;
|
|
2285
2397
|
source_pcb_ground_plane_id: string;
|
|
2286
2398
|
subcircuit_id?: string | undefined;
|
|
2399
|
+
} | {
|
|
2400
|
+
type: "source_manually_placed_via";
|
|
2401
|
+
source_group_id: string;
|
|
2402
|
+
source_net_id: string;
|
|
2403
|
+
source_manually_placed_via_id: string;
|
|
2404
|
+
subcircuit_id?: string | undefined;
|
|
2405
|
+
source_trace_id?: string | undefined;
|
|
2287
2406
|
} | {
|
|
2288
2407
|
type: "source_project_metadata";
|
|
2289
2408
|
name?: string | undefined;
|
|
@@ -2988,6 +3107,57 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
2988
3107
|
spoke_outer_diameter: number;
|
|
2989
3108
|
subcircuit_id?: string | undefined;
|
|
2990
3109
|
pcb_plated_hole_id?: string | undefined;
|
|
3110
|
+
} | {
|
|
3111
|
+
type: "pcb_copper_pour";
|
|
3112
|
+
width: number;
|
|
3113
|
+
height: number;
|
|
3114
|
+
center: {
|
|
3115
|
+
x: number;
|
|
3116
|
+
y: number;
|
|
3117
|
+
};
|
|
3118
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3119
|
+
shape: "rect";
|
|
3120
|
+
pcb_copper_pour_id: string;
|
|
3121
|
+
rotation?: number | undefined;
|
|
3122
|
+
subcircuit_id?: string | undefined;
|
|
3123
|
+
pcb_group_id?: string | undefined;
|
|
3124
|
+
source_net_id?: string | undefined;
|
|
3125
|
+
} | {
|
|
3126
|
+
type: "pcb_copper_pour";
|
|
3127
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3128
|
+
shape: "brep";
|
|
3129
|
+
pcb_copper_pour_id: string;
|
|
3130
|
+
brep_shape: {
|
|
3131
|
+
outer_ring: {
|
|
3132
|
+
vertices: {
|
|
3133
|
+
x: number;
|
|
3134
|
+
y: number;
|
|
3135
|
+
bulge?: number | undefined;
|
|
3136
|
+
}[];
|
|
3137
|
+
};
|
|
3138
|
+
inner_rings: {
|
|
3139
|
+
vertices: {
|
|
3140
|
+
x: number;
|
|
3141
|
+
y: number;
|
|
3142
|
+
bulge?: number | undefined;
|
|
3143
|
+
}[];
|
|
3144
|
+
}[];
|
|
3145
|
+
};
|
|
3146
|
+
subcircuit_id?: string | undefined;
|
|
3147
|
+
pcb_group_id?: string | undefined;
|
|
3148
|
+
source_net_id?: string | undefined;
|
|
3149
|
+
} | {
|
|
3150
|
+
type: "pcb_copper_pour";
|
|
3151
|
+
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
3152
|
+
shape: "polygon";
|
|
3153
|
+
points: {
|
|
3154
|
+
x: number;
|
|
3155
|
+
y: number;
|
|
3156
|
+
}[];
|
|
3157
|
+
pcb_copper_pour_id: string;
|
|
3158
|
+
subcircuit_id?: string | undefined;
|
|
3159
|
+
pcb_group_id?: string | undefined;
|
|
3160
|
+
source_net_id?: string | undefined;
|
|
2991
3161
|
} | {
|
|
2992
3162
|
x: number;
|
|
2993
3163
|
y: number;
|
|
@@ -3088,7 +3258,6 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
3088
3258
|
has_output_arrow?: boolean | undefined;
|
|
3089
3259
|
} | {
|
|
3090
3260
|
type: "schematic_trace";
|
|
3091
|
-
source_trace_id: string;
|
|
3092
3261
|
schematic_trace_id: string;
|
|
3093
3262
|
junctions: {
|
|
3094
3263
|
x: number;
|
|
@@ -3108,6 +3277,8 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
3108
3277
|
to_schematic_port_id?: string | undefined;
|
|
3109
3278
|
}[];
|
|
3110
3279
|
subcircuit_id?: string | undefined;
|
|
3280
|
+
source_trace_id?: string | undefined;
|
|
3281
|
+
subcircuit_connectivity_map_key?: string | undefined;
|
|
3111
3282
|
} | {
|
|
3112
3283
|
type: "schematic_path";
|
|
3113
3284
|
points: {
|
|
@@ -3279,6 +3450,9 @@ declare const runTscircuitModule: (module: string, opts?: {
|
|
|
3279
3450
|
model_obj_url?: string | undefined;
|
|
3280
3451
|
model_stl_url?: string | undefined;
|
|
3281
3452
|
model_3mf_url?: string | undefined;
|
|
3453
|
+
model_gltf_url?: string | undefined;
|
|
3454
|
+
model_glb_url?: string | undefined;
|
|
3455
|
+
model_step_url?: string | undefined;
|
|
3282
3456
|
model_jscad?: any;
|
|
3283
3457
|
} | {
|
|
3284
3458
|
type: "simulation_voltage_source";
|