circuit-json 0.0.524 → 0.0.525

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 CHANGED
@@ -915,6 +915,10 @@ Defines a 3D-printed part in an assembly.
915
915
  /** Defines a 3D-printed part in an assembly. */
916
916
  interface SourcePrintedPart extends SourceComponentBase {
917
917
  ftype: "printedpart"
918
+ /** Printable material, when specified by the author. */
919
+ material?: "pla" | "petg" | "nylon"
920
+ /** Author-specified print color; also carried on the CAD geometry. */
921
+ color?: string
918
922
  }
919
923
  ```
920
924
 
@@ -1489,6 +1493,7 @@ interface CadCable {
1489
1493
  CAD geometry, optionally associated with a PCB component.
1490
1494
 
1491
1495
  ```typescript
1496
+ /** CAD geometry, optionally associated with a PCB component. */
1492
1497
  interface CadComponent {
1493
1498
  type: "cad_component"
1494
1499
  cad_component_id: string
@@ -1497,6 +1502,10 @@ interface CadComponent {
1497
1502
  source_component_id: string
1498
1503
  position: Point3
1499
1504
  rotation?: Point3
1505
+ /** True for assembled folded position/rotation; false or omitted for flat.
1506
+ * PCB records stay flat. pcb_component_id identifies the mount/owning board. */
1507
+
1508
+ is_on_folded_board?: boolean
1500
1509
  size?: Point3
1501
1510
  layer?: LayerRef
1502
1511
  subcircuit_id?: string
@@ -1519,6 +1528,8 @@ interface CadComponent {
1519
1528
  | "bottom_center_of_component"
1520
1529
  model_object_fit: "contain_within_bounds" | "fill_bounds"
1521
1530
  model_jscad?: any
1531
+ /** Explicit CAD color override; omission preserves authored model materials. */
1532
+ color?: string
1522
1533
  show_as_translucent_model?: boolean
1523
1534
  show_as_bounding_box?: boolean
1524
1535
  show_hidden_edges?: boolean
package/dist/index.d.mts CHANGED
@@ -33374,12 +33374,16 @@ declare const source_printed_part: z.ZodObject<{
33374
33374
  subcircuit_id: z.ZodOptional<z.ZodString>;
33375
33375
  } & {
33376
33376
  ftype: z.ZodLiteral<"printedpart">;
33377
+ material: z.ZodOptional<z.ZodEnum<["pla", "petg", "nylon"]>>;
33378
+ color: z.ZodOptional<z.ZodString>;
33377
33379
  }, "strip", z.ZodTypeAny, {
33378
33380
  type: "source_component";
33379
33381
  name: string;
33380
33382
  source_component_id: string;
33381
33383
  ftype: "printedpart";
33382
33384
  subcircuit_id?: string | undefined;
33385
+ material?: "pla" | "petg" | "nylon" | undefined;
33386
+ color?: string | undefined;
33383
33387
  source_group_id?: string | undefined;
33384
33388
  display_name?: string | undefined;
33385
33389
  manufacturer_part_number?: string | undefined;
@@ -33393,6 +33397,8 @@ declare const source_printed_part: z.ZodObject<{
33393
33397
  source_component_id: string;
33394
33398
  ftype: "printedpart";
33395
33399
  subcircuit_id?: string | undefined;
33400
+ material?: "pla" | "petg" | "nylon" | undefined;
33401
+ color?: string | undefined;
33396
33402
  source_group_id?: string | undefined;
33397
33403
  display_name?: string | undefined;
33398
33404
  manufacturer_part_number?: string | undefined;
@@ -33405,6 +33411,10 @@ type SourcePrintedPartInput = z.input<typeof source_printed_part>;
33405
33411
  /** Defines a 3D-printed part in an assembly. */
33406
33412
  interface SourcePrintedPart extends SourceComponentBase {
33407
33413
  ftype: "printedpart";
33414
+ /** Printable material, when specified by the author. */
33415
+ material?: "pla" | "petg" | "nylon";
33416
+ /** Author-specified print color; also carried on the CAD geometry. */
33417
+ color?: string;
33408
33418
  }
33409
33419
 
33410
33420
  declare const source_subassembly: z.ZodObject<{
@@ -35780,12 +35790,16 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<{
35780
35790
  subcircuit_id: z.ZodOptional<z.ZodString>;
35781
35791
  } & {
35782
35792
  ftype: z.ZodLiteral<"printedpart">;
35793
+ material: z.ZodOptional<z.ZodEnum<["pla", "petg", "nylon"]>>;
35794
+ color: z.ZodOptional<z.ZodString>;
35783
35795
  }, "strip", z.ZodTypeAny, {
35784
35796
  type: "source_component";
35785
35797
  name: string;
35786
35798
  source_component_id: string;
35787
35799
  ftype: "printedpart";
35788
35800
  subcircuit_id?: string | undefined;
35801
+ material?: "pla" | "petg" | "nylon" | undefined;
35802
+ color?: string | undefined;
35789
35803
  source_group_id?: string | undefined;
35790
35804
  display_name?: string | undefined;
35791
35805
  manufacturer_part_number?: string | undefined;
@@ -35799,6 +35813,8 @@ declare const any_source_component: z.ZodUnion<[z.ZodObject<{
35799
35813
  source_component_id: string;
35800
35814
  ftype: "printedpart";
35801
35815
  subcircuit_id?: string | undefined;
35816
+ material?: "pla" | "petg" | "nylon" | undefined;
35817
+ color?: string | undefined;
35802
35818
  source_group_id?: string | undefined;
35803
35819
  display_name?: string | undefined;
35804
35820
  manufacturer_part_number?: string | undefined;
@@ -41025,6 +41041,7 @@ declare const cad_component: z.ZodObject<{
41025
41041
  model_origin_alignment: z.ZodOptional<z.ZodEnum<["unknown", "center", "center_of_component_on_board_surface", "bottom_center_of_component"]>>;
41026
41042
  model_object_fit: z.ZodDefault<z.ZodOptional<z.ZodEnum<["contain_within_bounds", "fill_bounds"]>>>;
41027
41043
  model_jscad: z.ZodOptional<z.ZodAny>;
41044
+ color: z.ZodOptional<z.ZodString>;
41028
41045
  show_as_translucent_model: z.ZodOptional<z.ZodBoolean>;
41029
41046
  show_as_bounding_box: z.ZodOptional<z.ZodBoolean>;
41030
41047
  show_hidden_edges: z.ZodOptional<z.ZodBoolean>;
@@ -41053,6 +41070,7 @@ declare const cad_component: z.ZodObject<{
41053
41070
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
41054
41071
  pcb_component_id?: string | undefined;
41055
41072
  subcircuit_id?: string | undefined;
41073
+ color?: string | undefined;
41056
41074
  footprinter_string?: string | undefined;
41057
41075
  is_on_folded_board?: boolean | undefined;
41058
41076
  model_obj_url?: string | undefined;
@@ -41104,6 +41122,7 @@ declare const cad_component: z.ZodObject<{
41104
41122
  pcb_component_id?: string | undefined;
41105
41123
  subcircuit_id?: string | undefined;
41106
41124
  anchor_alignment?: "center" | "center_of_component_on_board_surface" | undefined;
41125
+ color?: string | undefined;
41107
41126
  footprinter_string?: string | undefined;
41108
41127
  is_on_folded_board?: boolean | undefined;
41109
41128
  model_obj_url?: string | undefined;
@@ -41166,6 +41185,8 @@ interface CadComponent {
41166
41185
  model_origin_alignment?: "unknown" | "center" | "center_of_component_on_board_surface" | "bottom_center_of_component";
41167
41186
  model_object_fit: "contain_within_bounds" | "fill_bounds";
41168
41187
  model_jscad?: any;
41188
+ /** Explicit CAD color override; omission preserves authored model materials. */
41189
+ color?: string;
41169
41190
  show_as_translucent_model?: boolean;
41170
41191
  show_as_bounding_box?: boolean;
41171
41192
  show_hidden_edges?: boolean;
@@ -42289,12 +42310,16 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
42289
42310
  subcircuit_id: z.ZodOptional<z.ZodString>;
42290
42311
  } & {
42291
42312
  ftype: z.ZodLiteral<"printedpart">;
42313
+ material: z.ZodOptional<z.ZodEnum<["pla", "petg", "nylon"]>>;
42314
+ color: z.ZodOptional<z.ZodString>;
42292
42315
  }, "strip", z.ZodTypeAny, {
42293
42316
  type: "source_component";
42294
42317
  name: string;
42295
42318
  source_component_id: string;
42296
42319
  ftype: "printedpart";
42297
42320
  subcircuit_id?: string | undefined;
42321
+ material?: "pla" | "petg" | "nylon" | undefined;
42322
+ color?: string | undefined;
42298
42323
  source_group_id?: string | undefined;
42299
42324
  display_name?: string | undefined;
42300
42325
  manufacturer_part_number?: string | undefined;
@@ -42308,6 +42333,8 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
42308
42333
  source_component_id: string;
42309
42334
  ftype: "printedpart";
42310
42335
  subcircuit_id?: string | undefined;
42336
+ material?: "pla" | "petg" | "nylon" | undefined;
42337
+ color?: string | undefined;
42311
42338
  source_group_id?: string | undefined;
42312
42339
  display_name?: string | undefined;
42313
42340
  manufacturer_part_number?: string | undefined;
@@ -62781,6 +62808,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
62781
62808
  model_origin_alignment: z.ZodOptional<z.ZodEnum<["unknown", "center", "center_of_component_on_board_surface", "bottom_center_of_component"]>>;
62782
62809
  model_object_fit: z.ZodDefault<z.ZodOptional<z.ZodEnum<["contain_within_bounds", "fill_bounds"]>>>;
62783
62810
  model_jscad: z.ZodOptional<z.ZodAny>;
62811
+ color: z.ZodOptional<z.ZodString>;
62784
62812
  show_as_translucent_model: z.ZodOptional<z.ZodBoolean>;
62785
62813
  show_as_bounding_box: z.ZodOptional<z.ZodBoolean>;
62786
62814
  show_hidden_edges: z.ZodOptional<z.ZodBoolean>;
@@ -62809,6 +62837,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
62809
62837
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
62810
62838
  pcb_component_id?: string | undefined;
62811
62839
  subcircuit_id?: string | undefined;
62840
+ color?: string | undefined;
62812
62841
  footprinter_string?: string | undefined;
62813
62842
  is_on_folded_board?: boolean | undefined;
62814
62843
  model_obj_url?: string | undefined;
@@ -62860,6 +62889,7 @@ declare const any_circuit_element: z.ZodUnion<[z.ZodObject<{
62860
62889
  pcb_component_id?: string | undefined;
62861
62890
  subcircuit_id?: string | undefined;
62862
62891
  anchor_alignment?: "center" | "center_of_component_on_board_surface" | undefined;
62892
+ color?: string | undefined;
62863
62893
  footprinter_string?: string | undefined;
62864
62894
  is_on_folded_board?: boolean | undefined;
62865
62895
  model_obj_url?: string | undefined;
@@ -66073,12 +66103,16 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
66073
66103
  subcircuit_id: z.ZodOptional<z.ZodString>;
66074
66104
  } & {
66075
66105
  ftype: z.ZodLiteral<"printedpart">;
66106
+ material: z.ZodOptional<z.ZodEnum<["pla", "petg", "nylon"]>>;
66107
+ color: z.ZodOptional<z.ZodString>;
66076
66108
  }, "strip", z.ZodTypeAny, {
66077
66109
  type: "source_component";
66078
66110
  name: string;
66079
66111
  source_component_id: string;
66080
66112
  ftype: "printedpart";
66081
66113
  subcircuit_id?: string | undefined;
66114
+ material?: "pla" | "petg" | "nylon" | undefined;
66115
+ color?: string | undefined;
66082
66116
  source_group_id?: string | undefined;
66083
66117
  display_name?: string | undefined;
66084
66118
  manufacturer_part_number?: string | undefined;
@@ -66092,6 +66126,8 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
66092
66126
  source_component_id: string;
66093
66127
  ftype: "printedpart";
66094
66128
  subcircuit_id?: string | undefined;
66129
+ material?: "pla" | "petg" | "nylon" | undefined;
66130
+ color?: string | undefined;
66095
66131
  source_group_id?: string | undefined;
66096
66132
  display_name?: string | undefined;
66097
66133
  manufacturer_part_number?: string | undefined;
@@ -86565,6 +86601,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
86565
86601
  model_origin_alignment: z.ZodOptional<z.ZodEnum<["unknown", "center", "center_of_component_on_board_surface", "bottom_center_of_component"]>>;
86566
86602
  model_object_fit: z.ZodDefault<z.ZodOptional<z.ZodEnum<["contain_within_bounds", "fill_bounds"]>>>;
86567
86603
  model_jscad: z.ZodOptional<z.ZodAny>;
86604
+ color: z.ZodOptional<z.ZodString>;
86568
86605
  show_as_translucent_model: z.ZodOptional<z.ZodBoolean>;
86569
86606
  show_as_bounding_box: z.ZodOptional<z.ZodBoolean>;
86570
86607
  show_hidden_edges: z.ZodOptional<z.ZodBoolean>;
@@ -86593,6 +86630,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
86593
86630
  layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
86594
86631
  pcb_component_id?: string | undefined;
86595
86632
  subcircuit_id?: string | undefined;
86633
+ color?: string | undefined;
86596
86634
  footprinter_string?: string | undefined;
86597
86635
  is_on_folded_board?: boolean | undefined;
86598
86636
  model_obj_url?: string | undefined;
@@ -86644,6 +86682,7 @@ declare const any_soup_element: z.ZodUnion<[z.ZodObject<{
86644
86682
  pcb_component_id?: string | undefined;
86645
86683
  subcircuit_id?: string | undefined;
86646
86684
  anchor_alignment?: "center" | "center_of_component_on_board_surface" | undefined;
86685
+ color?: string | undefined;
86647
86686
  footprinter_string?: string | undefined;
86648
86687
  is_on_folded_board?: boolean | undefined;
86649
86688
  model_obj_url?: string | undefined;
package/dist/index.mjs CHANGED
@@ -421,7 +421,9 @@ expectTypesMatch(true);
421
421
  // src/source/source_printed_part.ts
422
422
  import { z as z22 } from "zod";
423
423
  var source_printed_part = source_component_base.extend({
424
- ftype: z22.literal("printedpart")
424
+ ftype: z22.literal("printedpart"),
425
+ material: z22.enum(["pla", "petg", "nylon"]).optional(),
426
+ color: z22.string().trim().min(1).optional()
425
427
  });
426
428
  expectTypesMatch(true);
427
429
 
@@ -4479,6 +4481,9 @@ var cad_component = z198.object({
4479
4481
  ]).optional(),
4480
4482
  model_object_fit: z198.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
4481
4483
  model_jscad: z198.any().optional(),
4484
+ color: z198.string().trim().min(1).optional().describe(
4485
+ "Explicit color override for CAD geometry, including authored JSCAD material colors. Omit to preserve model materials."
4486
+ ),
4482
4487
  show_as_translucent_model: z198.boolean().optional(),
4483
4488
  show_as_bounding_box: z198.boolean().optional(),
4484
4489
  show_hidden_edges: z198.boolean().optional(),