@tscircuit/pcb-viewer 1.11.216 → 1.11.218

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/index.js CHANGED
@@ -10045,6 +10045,7 @@ var source_group = z.object({
10045
10045
  parent_subcircuit_id: z.string().optional(),
10046
10046
  parent_source_group_id: z.string().optional(),
10047
10047
  is_subcircuit: z.boolean().optional(),
10048
+ show_as_schematic_box: z.boolean().optional(),
10048
10049
  name: z.string().optional()
10049
10050
  });
10050
10051
  expectTypesMatch(true);
@@ -10169,7 +10170,7 @@ var schematic_component = z.object({
10169
10170
  type: z.literal("schematic_component"),
10170
10171
  size,
10171
10172
  center: point,
10172
- source_component_id: z.string(),
10173
+ source_component_id: z.string().optional(),
10173
10174
  schematic_component_id: z.string(),
10174
10175
  pin_spacing: length.optional(),
10175
10176
  pin_styles: schematic_pin_styles.optional(),
@@ -10179,7 +10180,9 @@ var schematic_component = z.object({
10179
10180
  port_labels: z.record(z.string()).optional(),
10180
10181
  symbol_display_value: z.string().optional(),
10181
10182
  subcircuit_id: z.string().optional(),
10182
- schematic_group_id: z.string().optional()
10183
+ schematic_group_id: z.string().optional(),
10184
+ is_schematic_group: z.boolean().optional(),
10185
+ source_group_id: z.string().optional()
10183
10186
  });
10184
10187
  expectTypesMatch(true);
10185
10188
  var schematic_line = z.object({
@@ -10359,6 +10362,7 @@ var schematic_group = z.object({
10359
10362
  height: length,
10360
10363
  center: point,
10361
10364
  schematic_component_ids: z.array(z.string()),
10365
+ show_as_schematic_box: z.boolean().optional(),
10362
10366
  name: z.string().optional(),
10363
10367
  description: z.string().optional()
10364
10368
  }).describe("Defines a group of components on the schematic");
@@ -10497,6 +10501,7 @@ var pcb_plated_hole_oval = z.object({
10497
10501
  hole_height: z.number(),
10498
10502
  x: distance,
10499
10503
  y: distance,
10504
+ ccw_rotation: rotation,
10500
10505
  layers: z.array(layer_ref),
10501
10506
  port_hints: z.array(z.string()).optional(),
10502
10507
  pcb_component_id: z.string().optional(),
@@ -10589,7 +10594,8 @@ var pcb_port = z.object({
10589
10594
  pcb_component_id: z.string(),
10590
10595
  x: distance,
10591
10596
  y: distance,
10592
- layers: z.array(layer_ref)
10597
+ layers: z.array(layer_ref),
10598
+ is_board_pinout: z.boolean().optional()
10593
10599
  }).describe("Defines a port on the PCB");
10594
10600
  expectTypesMatch(true);
10595
10601
  var pcb_smtpad_circle = z.object({
@@ -10604,7 +10610,8 @@ var pcb_smtpad_circle = z.object({
10604
10610
  layer: layer_ref,
10605
10611
  port_hints: z.array(z.string()).optional(),
10606
10612
  pcb_component_id: z.string().optional(),
10607
- pcb_port_id: z.string().optional()
10613
+ pcb_port_id: z.string().optional(),
10614
+ is_covered_with_solder_mask: z.boolean().optional()
10608
10615
  });
10609
10616
  var pcb_smtpad_rect = z.object({
10610
10617
  type: z.literal("pcb_smtpad"),
@@ -10620,7 +10627,8 @@ var pcb_smtpad_rect = z.object({
10620
10627
  layer: layer_ref,
10621
10628
  port_hints: z.array(z.string()).optional(),
10622
10629
  pcb_component_id: z.string().optional(),
10623
- pcb_port_id: z.string().optional()
10630
+ pcb_port_id: z.string().optional(),
10631
+ is_covered_with_solder_mask: z.boolean().optional()
10624
10632
  });
10625
10633
  var pcb_smtpad_rotated_rect = z.object({
10626
10634
  type: z.literal("pcb_smtpad"),
@@ -10637,7 +10645,8 @@ var pcb_smtpad_rotated_rect = z.object({
10637
10645
  layer: layer_ref,
10638
10646
  port_hints: z.array(z.string()).optional(),
10639
10647
  pcb_component_id: z.string().optional(),
10640
- pcb_port_id: z.string().optional()
10648
+ pcb_port_id: z.string().optional(),
10649
+ is_covered_with_solder_mask: z.boolean().optional()
10641
10650
  });
10642
10651
  var pcb_smtpad_pill = z.object({
10643
10652
  type: z.literal("pcb_smtpad"),
@@ -10653,7 +10662,8 @@ var pcb_smtpad_pill = z.object({
10653
10662
  layer: layer_ref,
10654
10663
  port_hints: z.array(z.string()).optional(),
10655
10664
  pcb_component_id: z.string().optional(),
10656
- pcb_port_id: z.string().optional()
10665
+ pcb_port_id: z.string().optional(),
10666
+ is_covered_with_solder_mask: z.boolean().optional()
10657
10667
  });
10658
10668
  var pcb_smtpad_rotated_pill = z.object({
10659
10669
  type: z.literal("pcb_smtpad"),
@@ -10670,7 +10680,8 @@ var pcb_smtpad_rotated_pill = z.object({
10670
10680
  layer: layer_ref,
10671
10681
  port_hints: z.array(z.string()).optional(),
10672
10682
  pcb_component_id: z.string().optional(),
10673
- pcb_port_id: z.string().optional()
10683
+ pcb_port_id: z.string().optional(),
10684
+ is_covered_with_solder_mask: z.boolean().optional()
10674
10685
  });
10675
10686
  var pcb_smtpad_polygon = z.object({
10676
10687
  type: z.literal("pcb_smtpad"),
@@ -10682,7 +10693,8 @@ var pcb_smtpad_polygon = z.object({
10682
10693
  layer: layer_ref,
10683
10694
  port_hints: z.array(z.string()).optional(),
10684
10695
  pcb_component_id: z.string().optional(),
10685
- pcb_port_id: z.string().optional()
10696
+ pcb_port_id: z.string().optional(),
10697
+ is_covered_with_solder_mask: z.boolean().optional()
10686
10698
  });
10687
10699
  var pcb_smtpad = z.discriminatedUnion("shape", [
10688
10700
  pcb_smtpad_circle,
@@ -12713,6 +12725,24 @@ var convertElementToPrimitives = (element, allElements) => {
12713
12725
  _source_port
12714
12726
  }
12715
12727
  ];
12728
+ } else if (element.shape === "pill" || element.shape === "rotated_pill") {
12729
+ const { x, y, width, height, layer } = element;
12730
+ return [
12731
+ {
12732
+ _pcb_drawing_object_id: `pill_${globalPcbDrawingObjectCount++}`,
12733
+ pcb_drawing_type: "pill",
12734
+ x,
12735
+ y,
12736
+ w: width,
12737
+ h: height,
12738
+ layer: layer || "top",
12739
+ _element: element,
12740
+ _parent_pcb_component,
12741
+ _parent_source_component,
12742
+ _source_port,
12743
+ ccw_rotation: element.ccw_rotation
12744
+ }
12745
+ ];
12716
12746
  }
12717
12747
  return [];
12718
12748
  }
@@ -12808,7 +12838,8 @@ var convertElementToPrimitives = (element, allElements) => {
12808
12838
  _element: element,
12809
12839
  _parent_pcb_component,
12810
12840
  _parent_source_component,
12811
- _source_port
12841
+ _source_port,
12842
+ ccw_rotation: element.ccw_rotation
12812
12843
  },
12813
12844
  {
12814
12845
  _pcb_drawing_object_id: `pill_${globalPcbDrawingObjectCount++}`,
@@ -12818,7 +12849,8 @@ var convertElementToPrimitives = (element, allElements) => {
12818
12849
  y,
12819
12850
  w: hole_width,
12820
12851
  h: hole_height,
12821
- layer: "drill"
12852
+ layer: "drill",
12853
+ ccw_rotation: element.ccw_rotation
12822
12854
  }
12823
12855
  ];
12824
12856
  } else if (element.shape === "circular_hole_with_rect_pad") {
@@ -16345,7 +16377,7 @@ var HighlightedPrimitiveBoxWithText = ({
16345
16377
  setFinalState(true);
16346
16378
  }, 100);
16347
16379
  }, []);
16348
- let [x, y, w, h] = [
16380
+ const [x, y, w, h] = [
16349
16381
  primitive.screen_x,
16350
16382
  primitive.screen_y,
16351
16383
  primitive.screen_w,
@@ -16356,7 +16388,11 @@ var HighlightedPrimitiveBoxWithText = ({
16356
16388
  const color2 = layerColorHightlightMap[primitive?._element?.layer] ?? "red";
16357
16389
  let rotation2 = 0;
16358
16390
  if (primitiveElement.type === "pcb_smtpad" && primitiveElement?.shape === "rotated_rect") {
16359
- rotation2 = primitiveElement?.ccw_rotation;
16391
+ rotation2 = primitiveElement?.ccw_rotation ?? 0;
16392
+ } else if (primitiveElement.type === "pcb_smtpad" && (primitiveElement?.shape === "pill" || primitiveElement?.shape === "rotated_pill") && "ccw_rotation" in primitive) {
16393
+ rotation2 = primitiveElement.ccw_rotation ?? 0;
16394
+ } else if (primitiveElement.type === "pcb_plated_hole" && (primitiveElement?.shape === "pill" || primitiveElement?.shape === "oval") && "ccw_rotation" in primitive) {
16395
+ rotation2 = primitiveElement.ccw_rotation ?? 0;
16360
16396
  }
16361
16397
  if (primitiveElement.type === "pcb_trace") {
16362
16398
  const traceTextContext = { primitiveElement, elements };
@@ -16947,7 +16983,7 @@ import { css as css3 } from "@emotion/css";
16947
16983
  // package.json
16948
16984
  var package_default = {
16949
16985
  name: "@tscircuit/pcb-viewer",
16950
- version: "1.11.215",
16986
+ version: "1.11.217",
16951
16987
  main: "dist/index.js",
16952
16988
  type: "module",
16953
16989
  repository: "tscircuit/pcb-viewer",
@@ -16983,7 +17019,7 @@ var package_default = {
16983
17019
  "react-cosmos-plugin-vite": "7.0.0-beta.0",
16984
17020
  "react-dom": "19.1.0",
16985
17021
  "react-use": "^17.4.0",
16986
- tscircuit: "^0.0.642",
17022
+ tscircuit: "^0.0.649",
16987
17023
  tsup: "^8.0.2",
16988
17024
  "type-fest": "^3.0.0",
16989
17025
  typescript: "^5.4.4",