circuit-json 0.0.179 → 0.0.180

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.mjs CHANGED
@@ -1522,88 +1522,122 @@ var pcb_keepout = z74.object({
1522
1522
  })
1523
1523
  );
1524
1524
 
1525
- // src/pcb/pcb_missing_footprint_error.ts
1525
+ // src/pcb/pcb_cutout.ts
1526
1526
  import { z as z75 } from "zod";
1527
- var pcb_missing_footprint_error = z75.object({
1528
- type: z75.literal("pcb_missing_footprint_error"),
1527
+ var pcb_cutout_base = z75.object({
1528
+ type: z75.literal("pcb_cutout"),
1529
+ pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
1530
+ pcb_group_id: z75.string().optional(),
1531
+ subcircuit_id: z75.string().optional()
1532
+ });
1533
+ var pcb_cutout_rect = pcb_cutout_base.extend({
1534
+ shape: z75.literal("rect"),
1535
+ center: point,
1536
+ width: length,
1537
+ height: length,
1538
+ rotation: rotation.optional()
1539
+ });
1540
+ expectTypesMatch(true);
1541
+ var pcb_cutout_circle = pcb_cutout_base.extend({
1542
+ shape: z75.literal("circle"),
1543
+ center: point,
1544
+ radius: length
1545
+ });
1546
+ expectTypesMatch(true);
1547
+ var pcb_cutout_polygon = pcb_cutout_base.extend({
1548
+ shape: z75.literal("polygon"),
1549
+ points: z75.array(point)
1550
+ });
1551
+ expectTypesMatch(true);
1552
+ var pcb_cutout = z75.discriminatedUnion("shape", [
1553
+ pcb_cutout_rect,
1554
+ pcb_cutout_circle,
1555
+ pcb_cutout_polygon
1556
+ ]).describe("Defines a cutout on the PCB, removing board material.");
1557
+ expectTypesMatch(true);
1558
+
1559
+ // src/pcb/pcb_missing_footprint_error.ts
1560
+ import { z as z76 } from "zod";
1561
+ var pcb_missing_footprint_error = z76.object({
1562
+ type: z76.literal("pcb_missing_footprint_error"),
1529
1563
  pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
1530
1564
  "pcb_missing_footprint_error"
1531
1565
  ),
1532
- pcb_group_id: z75.string().optional(),
1533
- subcircuit_id: z75.string().optional(),
1534
- error_type: z75.literal("pcb_missing_footprint_error"),
1535
- source_component_id: z75.string(),
1536
- message: z75.string()
1566
+ pcb_group_id: z76.string().optional(),
1567
+ subcircuit_id: z76.string().optional(),
1568
+ error_type: z76.literal("pcb_missing_footprint_error"),
1569
+ source_component_id: z76.string(),
1570
+ message: z76.string()
1537
1571
  }).describe("Defines a missing footprint error on the PCB");
1538
1572
  expectTypesMatch(
1539
1573
  true
1540
1574
  );
1541
1575
 
1542
1576
  // src/pcb/pcb_group.ts
1543
- import { z as z76 } from "zod";
1544
- var pcb_group = z76.object({
1545
- type: z76.literal("pcb_group"),
1577
+ import { z as z77 } from "zod";
1578
+ var pcb_group = z77.object({
1579
+ type: z77.literal("pcb_group"),
1546
1580
  pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
1547
- source_group_id: z76.string(),
1548
- is_subcircuit: z76.boolean().optional(),
1549
- subcircuit_id: z76.string().optional(),
1581
+ source_group_id: z77.string(),
1582
+ is_subcircuit: z77.boolean().optional(),
1583
+ subcircuit_id: z77.string().optional(),
1550
1584
  width: length,
1551
1585
  height: length,
1552
1586
  center: point,
1553
- pcb_component_ids: z76.array(z76.string()),
1554
- name: z76.string().optional(),
1555
- description: z76.string().optional()
1587
+ pcb_component_ids: z77.array(z77.string()),
1588
+ name: z77.string().optional(),
1589
+ description: z77.string().optional()
1556
1590
  }).describe("Defines a group of components on the PCB");
1557
1591
  expectTypesMatch(true);
1558
1592
 
1559
1593
  // src/pcb/pcb_autorouting_error.ts
1560
- import { z as z77 } from "zod";
1561
- var pcb_autorouting_error = z77.object({
1562
- type: z77.literal("pcb_autorouting_error"),
1594
+ import { z as z78 } from "zod";
1595
+ var pcb_autorouting_error = z78.object({
1596
+ type: z78.literal("pcb_autorouting_error"),
1563
1597
  pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
1564
- message: z77.string()
1598
+ message: z78.string()
1565
1599
  }).describe("The autorouting has failed to route a portion of the board");
1566
1600
  expectTypesMatch(true);
1567
1601
 
1568
1602
  // src/pcb/pcb_manual_edit_conflict_warning.ts
1569
- import { z as z78 } from "zod";
1570
- var pcb_manual_edit_conflict_warning = z78.object({
1571
- type: z78.literal("pcb_manual_edit_conflict_warning"),
1603
+ import { z as z79 } from "zod";
1604
+ var pcb_manual_edit_conflict_warning = z79.object({
1605
+ type: z79.literal("pcb_manual_edit_conflict_warning"),
1572
1606
  pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
1573
1607
  "pcb_manual_edit_conflict_warning"
1574
1608
  ),
1575
- message: z78.string(),
1576
- pcb_component_id: z78.string(),
1577
- pcb_group_id: z78.string().optional(),
1578
- subcircuit_id: z78.string().optional(),
1579
- source_component_id: z78.string()
1609
+ message: z79.string(),
1610
+ pcb_component_id: z79.string(),
1611
+ pcb_group_id: z79.string().optional(),
1612
+ subcircuit_id: z79.string().optional(),
1613
+ source_component_id: z79.string()
1580
1614
  }).describe(
1581
1615
  "Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
1582
1616
  );
1583
1617
  expectTypesMatch(true);
1584
1618
 
1585
1619
  // src/cad/cad_component.ts
1586
- import { z as z79 } from "zod";
1587
- var cad_component = z79.object({
1588
- type: z79.literal("cad_component"),
1589
- cad_component_id: z79.string(),
1590
- pcb_component_id: z79.string(),
1591
- source_component_id: z79.string(),
1620
+ import { z as z80 } from "zod";
1621
+ var cad_component = z80.object({
1622
+ type: z80.literal("cad_component"),
1623
+ cad_component_id: z80.string(),
1624
+ pcb_component_id: z80.string(),
1625
+ source_component_id: z80.string(),
1592
1626
  position: point3,
1593
1627
  rotation: point3.optional(),
1594
1628
  size: point3.optional(),
1595
1629
  layer: layer_ref.optional(),
1596
1630
  // These are all ways to generate/load the 3d model
1597
- footprinter_string: z79.string().optional(),
1598
- model_obj_url: z79.string().optional(),
1599
- model_stl_url: z79.string().optional(),
1600
- model_3mf_url: z79.string().optional(),
1601
- model_jscad: z79.any().optional()
1631
+ footprinter_string: z80.string().optional(),
1632
+ model_obj_url: z80.string().optional(),
1633
+ model_stl_url: z80.string().optional(),
1634
+ model_3mf_url: z80.string().optional(),
1635
+ model_jscad: z80.any().optional()
1602
1636
  }).describe("Defines a component on the PCB");
1603
1637
 
1604
1638
  // src/any_circuit_element.ts
1605
- import { z as z80 } from "zod";
1606
- var any_circuit_element = z80.union([
1639
+ import { z as z81 } from "zod";
1640
+ var any_circuit_element = z81.union([
1607
1641
  source_trace,
1608
1642
  source_port,
1609
1643
  any_source_component,
@@ -1653,6 +1687,7 @@ var any_circuit_element = z80.union([
1653
1687
  pcb_fabrication_note_path,
1654
1688
  pcb_fabrication_note_text,
1655
1689
  pcb_autorouting_error,
1690
+ pcb_cutout,
1656
1691
  schematic_box,
1657
1692
  schematic_text,
1658
1693
  schematic_line,
@@ -1690,6 +1725,10 @@ export {
1690
1725
  pcb_autorouting_error,
1691
1726
  pcb_board,
1692
1727
  pcb_component,
1728
+ pcb_cutout,
1729
+ pcb_cutout_circle,
1730
+ pcb_cutout_polygon,
1731
+ pcb_cutout_rect,
1693
1732
  pcb_fabrication_note_path,
1694
1733
  pcb_fabrication_note_text,
1695
1734
  pcb_group,