circuit-json 0.0.496 → 0.0.497
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 +5 -1
- package/dist/index.d.mts +12 -10
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1330,11 +1330,14 @@ interface UnknownErrorFindingPart extends BaseCircuitJsonError {
|
|
|
1330
1330
|
|
|
1331
1331
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/cad/cad_component.ts)
|
|
1332
1332
|
|
|
1333
|
+
CAD geometry, optionally associated with a PCB component.
|
|
1334
|
+
|
|
1333
1335
|
```typescript
|
|
1334
1336
|
interface CadComponent {
|
|
1335
1337
|
type: "cad_component"
|
|
1336
1338
|
cad_component_id: string
|
|
1337
|
-
|
|
1339
|
+
/** Omit for CAD geometry that has no corresponding PCB component. */
|
|
1340
|
+
pcb_component_id?: string
|
|
1338
1341
|
source_component_id: string
|
|
1339
1342
|
position: Point3
|
|
1340
1343
|
rotation?: Point3
|
|
@@ -1362,6 +1365,7 @@ interface CadComponent {
|
|
|
1362
1365
|
model_jscad?: any
|
|
1363
1366
|
show_as_translucent_model?: boolean
|
|
1364
1367
|
show_as_bounding_box?: boolean
|
|
1368
|
+
show_hidden_edges?: boolean
|
|
1365
1369
|
anchor_alignment: CadComponentAnchorAlignment
|
|
1366
1370
|
}
|
|
1367
1371
|
```
|
package/dist/index.d.mts
CHANGED
|
@@ -36974,7 +36974,7 @@ declare const cadModelDefaultDirectionMap: {
|
|
|
36974
36974
|
declare const cad_component: z.ZodObject<{
|
|
36975
36975
|
type: z.ZodLiteral<"cad_component">;
|
|
36976
36976
|
cad_component_id: z.ZodString;
|
|
36977
|
-
pcb_component_id: z.ZodString
|
|
36977
|
+
pcb_component_id: z.ZodOptional<z.ZodString>;
|
|
36978
36978
|
source_component_id: z.ZodString;
|
|
36979
36979
|
position: z.ZodObject<{
|
|
36980
36980
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -37070,7 +37070,6 @@ declare const cad_component: z.ZodObject<{
|
|
|
37070
37070
|
anchor_alignment: z.ZodDefault<z.ZodOptional<z.ZodEnum<["center", "center_of_component_on_board_surface"]>>>;
|
|
37071
37071
|
}, "strip", z.ZodTypeAny, {
|
|
37072
37072
|
type: "cad_component";
|
|
37073
|
-
pcb_component_id: string;
|
|
37074
37073
|
source_component_id: string;
|
|
37075
37074
|
anchor_alignment: "center" | "center_of_component_on_board_surface";
|
|
37076
37075
|
position: {
|
|
@@ -37091,6 +37090,7 @@ declare const cad_component: z.ZodObject<{
|
|
|
37091
37090
|
z: number;
|
|
37092
37091
|
} | undefined;
|
|
37093
37092
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
|
|
37093
|
+
pcb_component_id?: string | undefined;
|
|
37094
37094
|
subcircuit_id?: string | undefined;
|
|
37095
37095
|
footprinter_string?: string | undefined;
|
|
37096
37096
|
model_obj_url?: string | undefined;
|
|
@@ -37119,7 +37119,6 @@ declare const cad_component: z.ZodObject<{
|
|
|
37119
37119
|
show_hidden_edges?: boolean | undefined;
|
|
37120
37120
|
}, {
|
|
37121
37121
|
type: "cad_component";
|
|
37122
|
-
pcb_component_id: string;
|
|
37123
37122
|
source_component_id: string;
|
|
37124
37123
|
position: {
|
|
37125
37124
|
x: string | number;
|
|
@@ -37140,6 +37139,7 @@ declare const cad_component: z.ZodObject<{
|
|
|
37140
37139
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
37141
37140
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
37142
37141
|
} | undefined;
|
|
37142
|
+
pcb_component_id?: string | undefined;
|
|
37143
37143
|
subcircuit_id?: string | undefined;
|
|
37144
37144
|
anchor_alignment?: "center" | "center_of_component_on_board_surface" | undefined;
|
|
37145
37145
|
footprinter_string?: string | undefined;
|
|
@@ -37172,10 +37172,12 @@ declare const cad_component: z.ZodObject<{
|
|
|
37172
37172
|
type CadComponentInput = z.input<typeof cad_component>;
|
|
37173
37173
|
type InferredCadComponent = z.infer<typeof cad_component>;
|
|
37174
37174
|
type CadComponentAnchorAlignment = NonNullable<InferredCadComponent["anchor_alignment"]>;
|
|
37175
|
+
/** CAD geometry, optionally associated with a PCB component. */
|
|
37175
37176
|
interface CadComponent {
|
|
37176
37177
|
type: "cad_component";
|
|
37177
37178
|
cad_component_id: string;
|
|
37178
|
-
|
|
37179
|
+
/** Omit for CAD geometry that has no corresponding PCB component. */
|
|
37180
|
+
pcb_component_id?: string;
|
|
37179
37181
|
source_component_id: string;
|
|
37180
37182
|
position: Point3;
|
|
37181
37183
|
rotation?: Point3;
|
|
@@ -56495,7 +56497,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
56495
56497
|
}>, z.ZodObject<{
|
|
56496
56498
|
type: z.ZodLiteral<"cad_component">;
|
|
56497
56499
|
cad_component_id: z.ZodString;
|
|
56498
|
-
pcb_component_id: z.ZodString
|
|
56500
|
+
pcb_component_id: z.ZodOptional<z.ZodString>;
|
|
56499
56501
|
source_component_id: z.ZodString;
|
|
56500
56502
|
position: z.ZodObject<{
|
|
56501
56503
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -56591,7 +56593,6 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
56591
56593
|
anchor_alignment: z.ZodDefault<z.ZodOptional<z.ZodEnum<["center", "center_of_component_on_board_surface"]>>>;
|
|
56592
56594
|
}, "strip", z.ZodTypeAny, {
|
|
56593
56595
|
type: "cad_component";
|
|
56594
|
-
pcb_component_id: string;
|
|
56595
56596
|
source_component_id: string;
|
|
56596
56597
|
anchor_alignment: "center" | "center_of_component_on_board_surface";
|
|
56597
56598
|
position: {
|
|
@@ -56612,6 +56613,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
56612
56613
|
z: number;
|
|
56613
56614
|
} | undefined;
|
|
56614
56615
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
|
|
56616
|
+
pcb_component_id?: string | undefined;
|
|
56615
56617
|
subcircuit_id?: string | undefined;
|
|
56616
56618
|
footprinter_string?: string | undefined;
|
|
56617
56619
|
model_obj_url?: string | undefined;
|
|
@@ -56640,7 +56642,6 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
56640
56642
|
show_hidden_edges?: boolean | undefined;
|
|
56641
56643
|
}, {
|
|
56642
56644
|
type: "cad_component";
|
|
56643
|
-
pcb_component_id: string;
|
|
56644
56645
|
source_component_id: string;
|
|
56645
56646
|
position: {
|
|
56646
56647
|
x: string | number;
|
|
@@ -56661,6 +56662,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
|
|
|
56661
56662
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
56662
56663
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
56663
56664
|
} | undefined;
|
|
56665
|
+
pcb_component_id?: string | undefined;
|
|
56664
56666
|
subcircuit_id?: string | undefined;
|
|
56665
56667
|
anchor_alignment?: "center" | "center_of_component_on_board_surface" | undefined;
|
|
56666
56668
|
footprinter_string?: string | undefined;
|
|
@@ -77336,7 +77338,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
77336
77338
|
}>, z.ZodObject<{
|
|
77337
77339
|
type: z.ZodLiteral<"cad_component">;
|
|
77338
77340
|
cad_component_id: z.ZodString;
|
|
77339
|
-
pcb_component_id: z.ZodString
|
|
77341
|
+
pcb_component_id: z.ZodOptional<z.ZodString>;
|
|
77340
77342
|
source_component_id: z.ZodString;
|
|
77341
77343
|
position: z.ZodObject<{
|
|
77342
77344
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -77432,7 +77434,6 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
77432
77434
|
anchor_alignment: z.ZodDefault<z.ZodOptional<z.ZodEnum<["center", "center_of_component_on_board_surface"]>>>;
|
|
77433
77435
|
}, "strip", z.ZodTypeAny, {
|
|
77434
77436
|
type: "cad_component";
|
|
77435
|
-
pcb_component_id: string;
|
|
77436
77437
|
source_component_id: string;
|
|
77437
77438
|
anchor_alignment: "center" | "center_of_component_on_board_surface";
|
|
77438
77439
|
position: {
|
|
@@ -77453,6 +77454,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
77453
77454
|
z: number;
|
|
77454
77455
|
} | undefined;
|
|
77455
77456
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
|
|
77457
|
+
pcb_component_id?: string | undefined;
|
|
77456
77458
|
subcircuit_id?: string | undefined;
|
|
77457
77459
|
footprinter_string?: string | undefined;
|
|
77458
77460
|
model_obj_url?: string | undefined;
|
|
@@ -77481,7 +77483,6 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
77481
77483
|
show_hidden_edges?: boolean | undefined;
|
|
77482
77484
|
}, {
|
|
77483
77485
|
type: "cad_component";
|
|
77484
|
-
pcb_component_id: string;
|
|
77485
77486
|
source_component_id: string;
|
|
77486
77487
|
position: {
|
|
77487
77488
|
x: string | number;
|
|
@@ -77502,6 +77503,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
|
|
|
77502
77503
|
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
77503
77504
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
77504
77505
|
} | undefined;
|
|
77506
|
+
pcb_component_id?: string | undefined;
|
|
77505
77507
|
subcircuit_id?: string | undefined;
|
|
77506
77508
|
anchor_alignment?: "center" | "center_of_component_on_board_surface" | undefined;
|
|
77507
77509
|
footprinter_string?: string | undefined;
|
package/dist/index.mjs
CHANGED
|
@@ -3979,7 +3979,9 @@ var cadModelDefaultDirectionMap = {
|
|
|
3979
3979
|
var cad_component = z185.object({
|
|
3980
3980
|
type: z185.literal("cad_component"),
|
|
3981
3981
|
cad_component_id: z185.string(),
|
|
3982
|
-
pcb_component_id: z185.string()
|
|
3982
|
+
pcb_component_id: z185.string().optional().describe(
|
|
3983
|
+
"Optional PCB component reference; omit for CAD geometry without a PCB component"
|
|
3984
|
+
),
|
|
3983
3985
|
source_component_id: z185.string(),
|
|
3984
3986
|
position: point3,
|
|
3985
3987
|
rotation: point3.optional(),
|
|
@@ -4013,7 +4015,7 @@ var cad_component = z185.object({
|
|
|
4013
4015
|
show_as_bounding_box: z185.boolean().optional(),
|
|
4014
4016
|
show_hidden_edges: z185.boolean().optional(),
|
|
4015
4017
|
anchor_alignment: z185.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
4016
|
-
}).describe("Defines
|
|
4018
|
+
}).describe("Defines CAD geometry, optionally associated with a PCB component");
|
|
4017
4019
|
expectTypesMatch(true);
|
|
4018
4020
|
|
|
4019
4021
|
// src/simulation/simulation_voltage_source.ts
|