circuit-json 0.0.228 → 0.0.230
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 +20 -0
- package/dist/index.d.mts +89 -2
- package/dist/index.mjs +230 -211
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1526,13 +1526,30 @@ var pcb_port_not_matched_error = z68.object({
|
|
|
1526
1526
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1527
1527
|
expectTypesMatch(true);
|
|
1528
1528
|
|
|
1529
|
-
// src/pcb/
|
|
1529
|
+
// src/pcb/pcb_port_not_connected_error.ts
|
|
1530
1530
|
import { z as z69 } from "zod";
|
|
1531
|
-
var
|
|
1532
|
-
type: z69.literal("
|
|
1531
|
+
var pcb_port_not_connected_error = z69.object({
|
|
1532
|
+
type: z69.literal("pcb_port_not_connected_error"),
|
|
1533
|
+
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1534
|
+
"pcb_port_not_connected_error"
|
|
1535
|
+
),
|
|
1536
|
+
error_type: z69.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1537
|
+
message: z69.string(),
|
|
1538
|
+
pcb_port_ids: z69.array(z69.string()),
|
|
1539
|
+
pcb_component_ids: z69.array(z69.string()),
|
|
1540
|
+
subcircuit_id: z69.string().optional()
|
|
1541
|
+
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1542
|
+
expectTypesMatch(
|
|
1543
|
+
true
|
|
1544
|
+
);
|
|
1545
|
+
|
|
1546
|
+
// src/pcb/pcb_via.ts
|
|
1547
|
+
import { z as z70 } from "zod";
|
|
1548
|
+
var pcb_via = z70.object({
|
|
1549
|
+
type: z70.literal("pcb_via"),
|
|
1533
1550
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1534
|
-
pcb_group_id:
|
|
1535
|
-
subcircuit_id:
|
|
1551
|
+
pcb_group_id: z70.string().optional(),
|
|
1552
|
+
subcircuit_id: z70.string().optional(),
|
|
1536
1553
|
x: distance,
|
|
1537
1554
|
y: distance,
|
|
1538
1555
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1541,59 +1558,59 @@ var pcb_via = z69.object({
|
|
|
1541
1558
|
from_layer: layer_ref.optional(),
|
|
1542
1559
|
/** @deprecated */
|
|
1543
1560
|
to_layer: layer_ref.optional(),
|
|
1544
|
-
layers:
|
|
1545
|
-
pcb_trace_id:
|
|
1561
|
+
layers: z70.array(layer_ref),
|
|
1562
|
+
pcb_trace_id: z70.string().optional()
|
|
1546
1563
|
}).describe("Defines a via on the PCB");
|
|
1547
1564
|
expectTypesMatch(true);
|
|
1548
1565
|
|
|
1549
1566
|
// src/pcb/pcb_board.ts
|
|
1550
|
-
import { z as
|
|
1551
|
-
var pcb_board =
|
|
1552
|
-
type:
|
|
1567
|
+
import { z as z71 } from "zod";
|
|
1568
|
+
var pcb_board = z71.object({
|
|
1569
|
+
type: z71.literal("pcb_board"),
|
|
1553
1570
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1554
|
-
is_subcircuit:
|
|
1555
|
-
subcircuit_id:
|
|
1571
|
+
is_subcircuit: z71.boolean().optional(),
|
|
1572
|
+
subcircuit_id: z71.string().optional(),
|
|
1556
1573
|
width: length,
|
|
1557
1574
|
height: length,
|
|
1558
1575
|
center: point,
|
|
1559
1576
|
thickness: length.optional().default(1.4),
|
|
1560
|
-
num_layers:
|
|
1561
|
-
outline:
|
|
1562
|
-
material:
|
|
1577
|
+
num_layers: z71.number().optional().default(4),
|
|
1578
|
+
outline: z71.array(point).optional(),
|
|
1579
|
+
material: z71.enum(["fr4", "fr1"]).default("fr4")
|
|
1563
1580
|
}).describe("Defines the board outline of the PCB");
|
|
1564
1581
|
expectTypesMatch(true);
|
|
1565
1582
|
|
|
1566
1583
|
// src/pcb/pcb_placement_error.ts
|
|
1567
|
-
import { z as
|
|
1568
|
-
var pcb_placement_error =
|
|
1569
|
-
type:
|
|
1584
|
+
import { z as z72 } from "zod";
|
|
1585
|
+
var pcb_placement_error = z72.object({
|
|
1586
|
+
type: z72.literal("pcb_placement_error"),
|
|
1570
1587
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1571
|
-
error_type:
|
|
1572
|
-
message:
|
|
1573
|
-
subcircuit_id:
|
|
1588
|
+
error_type: z72.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1589
|
+
message: z72.string(),
|
|
1590
|
+
subcircuit_id: z72.string().optional()
|
|
1574
1591
|
}).describe("Defines a placement error on the PCB");
|
|
1575
1592
|
expectTypesMatch(true);
|
|
1576
1593
|
|
|
1577
1594
|
// src/pcb/pcb_trace_hint.ts
|
|
1578
|
-
import { z as
|
|
1579
|
-
var pcb_trace_hint =
|
|
1580
|
-
type:
|
|
1595
|
+
import { z as z73 } from "zod";
|
|
1596
|
+
var pcb_trace_hint = z73.object({
|
|
1597
|
+
type: z73.literal("pcb_trace_hint"),
|
|
1581
1598
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1582
|
-
pcb_port_id:
|
|
1583
|
-
pcb_component_id:
|
|
1584
|
-
route:
|
|
1585
|
-
subcircuit_id:
|
|
1599
|
+
pcb_port_id: z73.string(),
|
|
1600
|
+
pcb_component_id: z73.string(),
|
|
1601
|
+
route: z73.array(route_hint_point),
|
|
1602
|
+
subcircuit_id: z73.string().optional()
|
|
1586
1603
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1587
1604
|
expectTypesMatch(true);
|
|
1588
1605
|
|
|
1589
1606
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1590
|
-
import { z as
|
|
1591
|
-
var pcb_silkscreen_line =
|
|
1592
|
-
type:
|
|
1607
|
+
import { z as z74 } from "zod";
|
|
1608
|
+
var pcb_silkscreen_line = z74.object({
|
|
1609
|
+
type: z74.literal("pcb_silkscreen_line"),
|
|
1593
1610
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1594
|
-
pcb_component_id:
|
|
1595
|
-
pcb_group_id:
|
|
1596
|
-
subcircuit_id:
|
|
1611
|
+
pcb_component_id: z74.string(),
|
|
1612
|
+
pcb_group_id: z74.string().optional(),
|
|
1613
|
+
subcircuit_id: z74.string().optional(),
|
|
1597
1614
|
stroke_width: distance.default("0.1mm"),
|
|
1598
1615
|
x1: distance,
|
|
1599
1616
|
y1: distance,
|
|
@@ -1604,67 +1621,67 @@ var pcb_silkscreen_line = z73.object({
|
|
|
1604
1621
|
expectTypesMatch(true);
|
|
1605
1622
|
|
|
1606
1623
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1607
|
-
import { z as
|
|
1608
|
-
var pcb_silkscreen_path =
|
|
1609
|
-
type:
|
|
1624
|
+
import { z as z75 } from "zod";
|
|
1625
|
+
var pcb_silkscreen_path = z75.object({
|
|
1626
|
+
type: z75.literal("pcb_silkscreen_path"),
|
|
1610
1627
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1611
|
-
pcb_component_id:
|
|
1612
|
-
pcb_group_id:
|
|
1613
|
-
subcircuit_id:
|
|
1628
|
+
pcb_component_id: z75.string(),
|
|
1629
|
+
pcb_group_id: z75.string().optional(),
|
|
1630
|
+
subcircuit_id: z75.string().optional(),
|
|
1614
1631
|
layer: visible_layer,
|
|
1615
|
-
route:
|
|
1632
|
+
route: z75.array(point),
|
|
1616
1633
|
stroke_width: length
|
|
1617
1634
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1618
1635
|
expectTypesMatch(true);
|
|
1619
1636
|
|
|
1620
1637
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1621
|
-
import { z as
|
|
1622
|
-
var pcb_silkscreen_text =
|
|
1623
|
-
type:
|
|
1638
|
+
import { z as z76 } from "zod";
|
|
1639
|
+
var pcb_silkscreen_text = z76.object({
|
|
1640
|
+
type: z76.literal("pcb_silkscreen_text"),
|
|
1624
1641
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1625
|
-
pcb_group_id:
|
|
1626
|
-
subcircuit_id:
|
|
1627
|
-
font:
|
|
1642
|
+
pcb_group_id: z76.string().optional(),
|
|
1643
|
+
subcircuit_id: z76.string().optional(),
|
|
1644
|
+
font: z76.literal("tscircuit2024").default("tscircuit2024"),
|
|
1628
1645
|
font_size: distance.default("0.2mm"),
|
|
1629
|
-
pcb_component_id:
|
|
1630
|
-
text:
|
|
1631
|
-
ccw_rotation:
|
|
1646
|
+
pcb_component_id: z76.string(),
|
|
1647
|
+
text: z76.string(),
|
|
1648
|
+
ccw_rotation: z76.number().optional(),
|
|
1632
1649
|
layer: layer_ref,
|
|
1633
|
-
is_mirrored:
|
|
1650
|
+
is_mirrored: z76.boolean().default(false).optional(),
|
|
1634
1651
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1635
1652
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1636
1653
|
}).describe("Defines silkscreen text on the PCB");
|
|
1637
1654
|
expectTypesMatch(true);
|
|
1638
1655
|
|
|
1639
1656
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1640
|
-
import { z as
|
|
1641
|
-
var pcb_silkscreen_rect =
|
|
1642
|
-
type:
|
|
1657
|
+
import { z as z77 } from "zod";
|
|
1658
|
+
var pcb_silkscreen_rect = z77.object({
|
|
1659
|
+
type: z77.literal("pcb_silkscreen_rect"),
|
|
1643
1660
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1644
|
-
pcb_component_id:
|
|
1645
|
-
pcb_group_id:
|
|
1646
|
-
subcircuit_id:
|
|
1661
|
+
pcb_component_id: z77.string(),
|
|
1662
|
+
pcb_group_id: z77.string().optional(),
|
|
1663
|
+
subcircuit_id: z77.string().optional(),
|
|
1647
1664
|
center: point,
|
|
1648
1665
|
width: length,
|
|
1649
1666
|
height: length,
|
|
1650
1667
|
layer: layer_ref,
|
|
1651
1668
|
stroke_width: length.default("1mm"),
|
|
1652
|
-
is_filled:
|
|
1653
|
-
has_stroke:
|
|
1654
|
-
is_stroke_dashed:
|
|
1669
|
+
is_filled: z77.boolean().default(true).optional(),
|
|
1670
|
+
has_stroke: z77.boolean().optional(),
|
|
1671
|
+
is_stroke_dashed: z77.boolean().optional()
|
|
1655
1672
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1656
1673
|
expectTypesMatch(true);
|
|
1657
1674
|
|
|
1658
1675
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1659
|
-
import { z as
|
|
1660
|
-
var pcb_silkscreen_circle =
|
|
1661
|
-
type:
|
|
1676
|
+
import { z as z78 } from "zod";
|
|
1677
|
+
var pcb_silkscreen_circle = z78.object({
|
|
1678
|
+
type: z78.literal("pcb_silkscreen_circle"),
|
|
1662
1679
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1663
1680
|
"pcb_silkscreen_circle"
|
|
1664
1681
|
),
|
|
1665
|
-
pcb_component_id:
|
|
1666
|
-
pcb_group_id:
|
|
1667
|
-
subcircuit_id:
|
|
1682
|
+
pcb_component_id: z78.string(),
|
|
1683
|
+
pcb_group_id: z78.string().optional(),
|
|
1684
|
+
subcircuit_id: z78.string().optional(),
|
|
1668
1685
|
center: point,
|
|
1669
1686
|
radius: length,
|
|
1670
1687
|
layer: visible_layer,
|
|
@@ -1673,13 +1690,13 @@ var pcb_silkscreen_circle = z77.object({
|
|
|
1673
1690
|
expectTypesMatch(true);
|
|
1674
1691
|
|
|
1675
1692
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1676
|
-
import { z as
|
|
1677
|
-
var pcb_silkscreen_oval =
|
|
1678
|
-
type:
|
|
1693
|
+
import { z as z79 } from "zod";
|
|
1694
|
+
var pcb_silkscreen_oval = z79.object({
|
|
1695
|
+
type: z79.literal("pcb_silkscreen_oval"),
|
|
1679
1696
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1680
|
-
pcb_component_id:
|
|
1681
|
-
pcb_group_id:
|
|
1682
|
-
subcircuit_id:
|
|
1697
|
+
pcb_component_id: z79.string(),
|
|
1698
|
+
pcb_group_id: z79.string().optional(),
|
|
1699
|
+
subcircuit_id: z79.string().optional(),
|
|
1683
1700
|
center: point,
|
|
1684
1701
|
radius_x: distance,
|
|
1685
1702
|
radius_y: distance,
|
|
@@ -1688,103 +1705,103 @@ var pcb_silkscreen_oval = z78.object({
|
|
|
1688
1705
|
expectTypesMatch(true);
|
|
1689
1706
|
|
|
1690
1707
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1691
|
-
import { z as
|
|
1692
|
-
var pcb_fabrication_note_text =
|
|
1693
|
-
type:
|
|
1708
|
+
import { z as z80 } from "zod";
|
|
1709
|
+
var pcb_fabrication_note_text = z80.object({
|
|
1710
|
+
type: z80.literal("pcb_fabrication_note_text"),
|
|
1694
1711
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1695
1712
|
"pcb_fabrication_note_text"
|
|
1696
1713
|
),
|
|
1697
|
-
subcircuit_id:
|
|
1698
|
-
pcb_group_id:
|
|
1699
|
-
font:
|
|
1714
|
+
subcircuit_id: z80.string().optional(),
|
|
1715
|
+
pcb_group_id: z80.string().optional(),
|
|
1716
|
+
font: z80.literal("tscircuit2024").default("tscircuit2024"),
|
|
1700
1717
|
font_size: distance.default("1mm"),
|
|
1701
|
-
pcb_component_id:
|
|
1702
|
-
text:
|
|
1718
|
+
pcb_component_id: z80.string(),
|
|
1719
|
+
text: z80.string(),
|
|
1703
1720
|
layer: visible_layer,
|
|
1704
1721
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1705
|
-
anchor_alignment:
|
|
1706
|
-
color:
|
|
1722
|
+
anchor_alignment: z80.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
1723
|
+
color: z80.string().optional()
|
|
1707
1724
|
}).describe(
|
|
1708
1725
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
1709
1726
|
);
|
|
1710
1727
|
expectTypesMatch(true);
|
|
1711
1728
|
|
|
1712
1729
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
1713
|
-
import { z as
|
|
1714
|
-
var pcb_fabrication_note_path =
|
|
1715
|
-
type:
|
|
1730
|
+
import { z as z81 } from "zod";
|
|
1731
|
+
var pcb_fabrication_note_path = z81.object({
|
|
1732
|
+
type: z81.literal("pcb_fabrication_note_path"),
|
|
1716
1733
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
1717
1734
|
"pcb_fabrication_note_path"
|
|
1718
1735
|
),
|
|
1719
|
-
pcb_component_id:
|
|
1720
|
-
subcircuit_id:
|
|
1736
|
+
pcb_component_id: z81.string(),
|
|
1737
|
+
subcircuit_id: z81.string().optional(),
|
|
1721
1738
|
layer: layer_ref,
|
|
1722
|
-
route:
|
|
1739
|
+
route: z81.array(point),
|
|
1723
1740
|
stroke_width: length,
|
|
1724
|
-
color:
|
|
1741
|
+
color: z81.string().optional()
|
|
1725
1742
|
}).describe(
|
|
1726
1743
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
1727
1744
|
);
|
|
1728
1745
|
expectTypesMatch(true);
|
|
1729
1746
|
|
|
1730
1747
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
1731
|
-
import { z as
|
|
1732
|
-
var pcb_footprint_overlap_error =
|
|
1733
|
-
type:
|
|
1748
|
+
import { z as z82 } from "zod";
|
|
1749
|
+
var pcb_footprint_overlap_error = z82.object({
|
|
1750
|
+
type: z82.literal("pcb_footprint_overlap_error"),
|
|
1734
1751
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1735
|
-
error_type:
|
|
1736
|
-
message:
|
|
1737
|
-
pcb_smtpad_ids:
|
|
1738
|
-
pcb_plated_hole_ids:
|
|
1739
|
-
pcb_hole_ids:
|
|
1740
|
-
pcb_keepout_ids:
|
|
1752
|
+
error_type: z82.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
1753
|
+
message: z82.string(),
|
|
1754
|
+
pcb_smtpad_ids: z82.array(z82.string()).optional(),
|
|
1755
|
+
pcb_plated_hole_ids: z82.array(z82.string()).optional(),
|
|
1756
|
+
pcb_hole_ids: z82.array(z82.string()).optional(),
|
|
1757
|
+
pcb_keepout_ids: z82.array(z82.string()).optional()
|
|
1741
1758
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
1742
1759
|
expectTypesMatch(
|
|
1743
1760
|
true
|
|
1744
1761
|
);
|
|
1745
1762
|
|
|
1746
1763
|
// src/pcb/pcb_keepout.ts
|
|
1747
|
-
import { z as
|
|
1748
|
-
var pcb_keepout =
|
|
1749
|
-
type:
|
|
1750
|
-
shape:
|
|
1751
|
-
pcb_group_id:
|
|
1752
|
-
subcircuit_id:
|
|
1764
|
+
import { z as z83 } from "zod";
|
|
1765
|
+
var pcb_keepout = z83.object({
|
|
1766
|
+
type: z83.literal("pcb_keepout"),
|
|
1767
|
+
shape: z83.literal("rect"),
|
|
1768
|
+
pcb_group_id: z83.string().optional(),
|
|
1769
|
+
subcircuit_id: z83.string().optional(),
|
|
1753
1770
|
center: point,
|
|
1754
1771
|
width: distance,
|
|
1755
1772
|
height: distance,
|
|
1756
|
-
pcb_keepout_id:
|
|
1757
|
-
layers:
|
|
1773
|
+
pcb_keepout_id: z83.string(),
|
|
1774
|
+
layers: z83.array(z83.string()),
|
|
1758
1775
|
// Specify layers where the keepout applies
|
|
1759
|
-
description:
|
|
1776
|
+
description: z83.string().optional()
|
|
1760
1777
|
// Optional description of the keepout
|
|
1761
1778
|
}).or(
|
|
1762
|
-
|
|
1763
|
-
type:
|
|
1764
|
-
shape:
|
|
1765
|
-
pcb_group_id:
|
|
1766
|
-
subcircuit_id:
|
|
1779
|
+
z83.object({
|
|
1780
|
+
type: z83.literal("pcb_keepout"),
|
|
1781
|
+
shape: z83.literal("circle"),
|
|
1782
|
+
pcb_group_id: z83.string().optional(),
|
|
1783
|
+
subcircuit_id: z83.string().optional(),
|
|
1767
1784
|
center: point,
|
|
1768
1785
|
radius: distance,
|
|
1769
|
-
pcb_keepout_id:
|
|
1770
|
-
layers:
|
|
1786
|
+
pcb_keepout_id: z83.string(),
|
|
1787
|
+
layers: z83.array(z83.string()),
|
|
1771
1788
|
// Specify layers where the keepout applies
|
|
1772
|
-
description:
|
|
1789
|
+
description: z83.string().optional()
|
|
1773
1790
|
// Optional description of the keepout
|
|
1774
1791
|
})
|
|
1775
1792
|
);
|
|
1776
1793
|
expectTypesMatch(true);
|
|
1777
1794
|
|
|
1778
1795
|
// src/pcb/pcb_cutout.ts
|
|
1779
|
-
import { z as
|
|
1780
|
-
var pcb_cutout_base =
|
|
1781
|
-
type:
|
|
1796
|
+
import { z as z84 } from "zod";
|
|
1797
|
+
var pcb_cutout_base = z84.object({
|
|
1798
|
+
type: z84.literal("pcb_cutout"),
|
|
1782
1799
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
1783
|
-
pcb_group_id:
|
|
1784
|
-
subcircuit_id:
|
|
1800
|
+
pcb_group_id: z84.string().optional(),
|
|
1801
|
+
subcircuit_id: z84.string().optional()
|
|
1785
1802
|
});
|
|
1786
1803
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
1787
|
-
shape:
|
|
1804
|
+
shape: z84.literal("rect"),
|
|
1788
1805
|
center: point,
|
|
1789
1806
|
width: length,
|
|
1790
1807
|
height: length,
|
|
@@ -1792,17 +1809,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
1792
1809
|
});
|
|
1793
1810
|
expectTypesMatch(true);
|
|
1794
1811
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
1795
|
-
shape:
|
|
1812
|
+
shape: z84.literal("circle"),
|
|
1796
1813
|
center: point,
|
|
1797
1814
|
radius: length
|
|
1798
1815
|
});
|
|
1799
1816
|
expectTypesMatch(true);
|
|
1800
1817
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
1801
|
-
shape:
|
|
1802
|
-
points:
|
|
1818
|
+
shape: z84.literal("polygon"),
|
|
1819
|
+
points: z84.array(point)
|
|
1803
1820
|
});
|
|
1804
1821
|
expectTypesMatch(true);
|
|
1805
|
-
var pcb_cutout =
|
|
1822
|
+
var pcb_cutout = z84.discriminatedUnion("shape", [
|
|
1806
1823
|
pcb_cutout_rect,
|
|
1807
1824
|
pcb_cutout_circle,
|
|
1808
1825
|
pcb_cutout_polygon
|
|
@@ -1810,83 +1827,83 @@ var pcb_cutout = z83.discriminatedUnion("shape", [
|
|
|
1810
1827
|
expectTypesMatch(true);
|
|
1811
1828
|
|
|
1812
1829
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
1813
|
-
import { z as
|
|
1814
|
-
var pcb_missing_footprint_error =
|
|
1815
|
-
type:
|
|
1830
|
+
import { z as z85 } from "zod";
|
|
1831
|
+
var pcb_missing_footprint_error = z85.object({
|
|
1832
|
+
type: z85.literal("pcb_missing_footprint_error"),
|
|
1816
1833
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
1817
1834
|
"pcb_missing_footprint_error"
|
|
1818
1835
|
),
|
|
1819
|
-
pcb_group_id:
|
|
1820
|
-
subcircuit_id:
|
|
1821
|
-
error_type:
|
|
1822
|
-
source_component_id:
|
|
1823
|
-
message:
|
|
1836
|
+
pcb_group_id: z85.string().optional(),
|
|
1837
|
+
subcircuit_id: z85.string().optional(),
|
|
1838
|
+
error_type: z85.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
1839
|
+
source_component_id: z85.string(),
|
|
1840
|
+
message: z85.string()
|
|
1824
1841
|
}).describe("Defines a missing footprint error on the PCB");
|
|
1825
1842
|
expectTypesMatch(
|
|
1826
1843
|
true
|
|
1827
1844
|
);
|
|
1828
1845
|
|
|
1829
1846
|
// src/pcb/pcb_group.ts
|
|
1830
|
-
import { z as
|
|
1831
|
-
var pcb_group =
|
|
1832
|
-
type:
|
|
1847
|
+
import { z as z86 } from "zod";
|
|
1848
|
+
var pcb_group = z86.object({
|
|
1849
|
+
type: z86.literal("pcb_group"),
|
|
1833
1850
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
1834
|
-
source_group_id:
|
|
1835
|
-
is_subcircuit:
|
|
1836
|
-
subcircuit_id:
|
|
1851
|
+
source_group_id: z86.string(),
|
|
1852
|
+
is_subcircuit: z86.boolean().optional(),
|
|
1853
|
+
subcircuit_id: z86.string().optional(),
|
|
1837
1854
|
width: length,
|
|
1838
1855
|
height: length,
|
|
1839
1856
|
center: point,
|
|
1840
|
-
pcb_component_ids:
|
|
1841
|
-
name:
|
|
1842
|
-
description:
|
|
1843
|
-
layout_mode:
|
|
1844
|
-
autorouter_configuration:
|
|
1857
|
+
pcb_component_ids: z86.array(z86.string()),
|
|
1858
|
+
name: z86.string().optional(),
|
|
1859
|
+
description: z86.string().optional(),
|
|
1860
|
+
layout_mode: z86.string().optional(),
|
|
1861
|
+
autorouter_configuration: z86.object({
|
|
1845
1862
|
trace_clearance: length
|
|
1846
1863
|
}).optional(),
|
|
1847
|
-
autorouter_used_string:
|
|
1864
|
+
autorouter_used_string: z86.string().optional()
|
|
1848
1865
|
}).describe("Defines a group of components on the PCB");
|
|
1849
1866
|
expectTypesMatch(true);
|
|
1850
1867
|
|
|
1851
1868
|
// src/pcb/pcb_autorouting_error.ts
|
|
1852
|
-
import { z as
|
|
1853
|
-
var pcb_autorouting_error =
|
|
1854
|
-
type:
|
|
1869
|
+
import { z as z87 } from "zod";
|
|
1870
|
+
var pcb_autorouting_error = z87.object({
|
|
1871
|
+
type: z87.literal("pcb_autorouting_error"),
|
|
1855
1872
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1856
|
-
error_type:
|
|
1857
|
-
message:
|
|
1858
|
-
subcircuit_id:
|
|
1873
|
+
error_type: z87.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
1874
|
+
message: z87.string(),
|
|
1875
|
+
subcircuit_id: z87.string().optional()
|
|
1859
1876
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1860
1877
|
expectTypesMatch(true);
|
|
1861
1878
|
|
|
1862
1879
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
1863
|
-
import { z as
|
|
1864
|
-
var pcb_manual_edit_conflict_warning =
|
|
1865
|
-
type:
|
|
1880
|
+
import { z as z88 } from "zod";
|
|
1881
|
+
var pcb_manual_edit_conflict_warning = z88.object({
|
|
1882
|
+
type: z88.literal("pcb_manual_edit_conflict_warning"),
|
|
1866
1883
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1867
1884
|
"pcb_manual_edit_conflict_warning"
|
|
1868
1885
|
),
|
|
1869
|
-
warning_type:
|
|
1870
|
-
message:
|
|
1871
|
-
pcb_component_id:
|
|
1872
|
-
pcb_group_id:
|
|
1873
|
-
subcircuit_id:
|
|
1874
|
-
source_component_id:
|
|
1886
|
+
warning_type: z88.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
1887
|
+
message: z88.string(),
|
|
1888
|
+
pcb_component_id: z88.string(),
|
|
1889
|
+
pcb_group_id: z88.string().optional(),
|
|
1890
|
+
subcircuit_id: z88.string().optional(),
|
|
1891
|
+
source_component_id: z88.string()
|
|
1875
1892
|
}).describe(
|
|
1876
1893
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
1877
1894
|
);
|
|
1878
1895
|
expectTypesMatch(true);
|
|
1879
1896
|
|
|
1880
1897
|
// src/pcb/pcb_breakout_point.ts
|
|
1881
|
-
import { z as
|
|
1882
|
-
var pcb_breakout_point =
|
|
1883
|
-
type:
|
|
1898
|
+
import { z as z89 } from "zod";
|
|
1899
|
+
var pcb_breakout_point = z89.object({
|
|
1900
|
+
type: z89.literal("pcb_breakout_point"),
|
|
1884
1901
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
1885
|
-
pcb_group_id:
|
|
1886
|
-
subcircuit_id:
|
|
1887
|
-
source_trace_id:
|
|
1888
|
-
source_port_id:
|
|
1889
|
-
source_net_id:
|
|
1902
|
+
pcb_group_id: z89.string(),
|
|
1903
|
+
subcircuit_id: z89.string().optional(),
|
|
1904
|
+
source_trace_id: z89.string().optional(),
|
|
1905
|
+
source_port_id: z89.string().optional(),
|
|
1906
|
+
source_net_id: z89.string().optional(),
|
|
1890
1907
|
x: distance,
|
|
1891
1908
|
y: distance
|
|
1892
1909
|
}).describe(
|
|
@@ -1895,87 +1912,87 @@ var pcb_breakout_point = z88.object({
|
|
|
1895
1912
|
expectTypesMatch(true);
|
|
1896
1913
|
|
|
1897
1914
|
// src/pcb/pcb_ground_plane.ts
|
|
1898
|
-
import { z as
|
|
1899
|
-
var pcb_ground_plane =
|
|
1900
|
-
type:
|
|
1915
|
+
import { z as z90 } from "zod";
|
|
1916
|
+
var pcb_ground_plane = z90.object({
|
|
1917
|
+
type: z90.literal("pcb_ground_plane"),
|
|
1901
1918
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
1902
|
-
source_pcb_ground_plane_id:
|
|
1903
|
-
source_net_id:
|
|
1904
|
-
pcb_group_id:
|
|
1905
|
-
subcircuit_id:
|
|
1919
|
+
source_pcb_ground_plane_id: z90.string(),
|
|
1920
|
+
source_net_id: z90.string(),
|
|
1921
|
+
pcb_group_id: z90.string().optional(),
|
|
1922
|
+
subcircuit_id: z90.string().optional()
|
|
1906
1923
|
}).describe("Defines a ground plane on the PCB");
|
|
1907
1924
|
expectTypesMatch(true);
|
|
1908
1925
|
|
|
1909
1926
|
// src/pcb/pcb_ground_plane_region.ts
|
|
1910
|
-
import { z as
|
|
1911
|
-
var pcb_ground_plane_region =
|
|
1912
|
-
type:
|
|
1927
|
+
import { z as z91 } from "zod";
|
|
1928
|
+
var pcb_ground_plane_region = z91.object({
|
|
1929
|
+
type: z91.literal("pcb_ground_plane_region"),
|
|
1913
1930
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
1914
1931
|
"pcb_ground_plane_region"
|
|
1915
1932
|
),
|
|
1916
|
-
pcb_ground_plane_id:
|
|
1917
|
-
pcb_group_id:
|
|
1918
|
-
subcircuit_id:
|
|
1933
|
+
pcb_ground_plane_id: z91.string(),
|
|
1934
|
+
pcb_group_id: z91.string().optional(),
|
|
1935
|
+
subcircuit_id: z91.string().optional(),
|
|
1919
1936
|
layer: layer_ref,
|
|
1920
|
-
points:
|
|
1937
|
+
points: z91.array(point)
|
|
1921
1938
|
}).describe("Defines a polygon region of a ground plane");
|
|
1922
1939
|
expectTypesMatch(true);
|
|
1923
1940
|
|
|
1924
1941
|
// src/pcb/pcb_thermal_spoke.ts
|
|
1925
|
-
import { z as
|
|
1926
|
-
var pcb_thermal_spoke =
|
|
1927
|
-
type:
|
|
1942
|
+
import { z as z92 } from "zod";
|
|
1943
|
+
var pcb_thermal_spoke = z92.object({
|
|
1944
|
+
type: z92.literal("pcb_thermal_spoke"),
|
|
1928
1945
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
1929
|
-
pcb_ground_plane_id:
|
|
1930
|
-
shape:
|
|
1931
|
-
spoke_count:
|
|
1946
|
+
pcb_ground_plane_id: z92.string(),
|
|
1947
|
+
shape: z92.string(),
|
|
1948
|
+
spoke_count: z92.number(),
|
|
1932
1949
|
spoke_thickness: distance,
|
|
1933
1950
|
spoke_inner_diameter: distance,
|
|
1934
1951
|
spoke_outer_diameter: distance,
|
|
1935
|
-
pcb_plated_hole_id:
|
|
1936
|
-
subcircuit_id:
|
|
1952
|
+
pcb_plated_hole_id: z92.string().optional(),
|
|
1953
|
+
subcircuit_id: z92.string().optional()
|
|
1937
1954
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
1938
1955
|
expectTypesMatch(true);
|
|
1939
1956
|
|
|
1940
1957
|
// src/cad/cad_component.ts
|
|
1941
|
-
import { z as
|
|
1942
|
-
var cad_component =
|
|
1943
|
-
type:
|
|
1944
|
-
cad_component_id:
|
|
1945
|
-
pcb_component_id:
|
|
1946
|
-
source_component_id:
|
|
1958
|
+
import { z as z93 } from "zod";
|
|
1959
|
+
var cad_component = z93.object({
|
|
1960
|
+
type: z93.literal("cad_component"),
|
|
1961
|
+
cad_component_id: z93.string(),
|
|
1962
|
+
pcb_component_id: z93.string(),
|
|
1963
|
+
source_component_id: z93.string(),
|
|
1947
1964
|
position: point3,
|
|
1948
1965
|
rotation: point3.optional(),
|
|
1949
1966
|
size: point3.optional(),
|
|
1950
1967
|
layer: layer_ref.optional(),
|
|
1951
|
-
subcircuit_id:
|
|
1968
|
+
subcircuit_id: z93.string().optional(),
|
|
1952
1969
|
// These are all ways to generate/load the 3d model
|
|
1953
|
-
footprinter_string:
|
|
1954
|
-
model_obj_url:
|
|
1955
|
-
model_stl_url:
|
|
1956
|
-
model_3mf_url:
|
|
1957
|
-
model_jscad:
|
|
1970
|
+
footprinter_string: z93.string().optional(),
|
|
1971
|
+
model_obj_url: z93.string().optional(),
|
|
1972
|
+
model_stl_url: z93.string().optional(),
|
|
1973
|
+
model_3mf_url: z93.string().optional(),
|
|
1974
|
+
model_jscad: z93.any().optional()
|
|
1958
1975
|
}).describe("Defines a component on the PCB");
|
|
1959
1976
|
expectTypesMatch(true);
|
|
1960
1977
|
|
|
1961
1978
|
// src/simulation/simulation_voltage_source.ts
|
|
1962
|
-
import { z as
|
|
1963
|
-
var simulation_voltage_source =
|
|
1964
|
-
type:
|
|
1979
|
+
import { z as z94 } from "zod";
|
|
1980
|
+
var simulation_voltage_source = z94.object({
|
|
1981
|
+
type: z94.literal("simulation_voltage_source"),
|
|
1965
1982
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
1966
1983
|
"simulation_voltage_source"
|
|
1967
1984
|
),
|
|
1968
|
-
positive_source_port_id:
|
|
1969
|
-
negative_source_port_id:
|
|
1970
|
-
positive_source_net_id:
|
|
1971
|
-
negative_source_net_id:
|
|
1985
|
+
positive_source_port_id: z94.string(),
|
|
1986
|
+
negative_source_port_id: z94.string(),
|
|
1987
|
+
positive_source_net_id: z94.string(),
|
|
1988
|
+
negative_source_net_id: z94.string(),
|
|
1972
1989
|
voltage
|
|
1973
1990
|
}).describe("Defines a voltage source for simulation");
|
|
1974
1991
|
expectTypesMatch(true);
|
|
1975
1992
|
|
|
1976
1993
|
// src/any_circuit_element.ts
|
|
1977
|
-
import { z as
|
|
1978
|
-
var any_circuit_element =
|
|
1994
|
+
import { z as z95 } from "zod";
|
|
1995
|
+
var any_circuit_element = z95.union([
|
|
1979
1996
|
source_trace,
|
|
1980
1997
|
source_port,
|
|
1981
1998
|
any_source_component,
|
|
@@ -2025,6 +2042,7 @@ var any_circuit_element = z94.union([
|
|
|
2025
2042
|
pcb_trace_missing_error,
|
|
2026
2043
|
pcb_placement_error,
|
|
2027
2044
|
pcb_port_not_matched_error,
|
|
2045
|
+
pcb_port_not_connected_error,
|
|
2028
2046
|
pcb_fabrication_note_path,
|
|
2029
2047
|
pcb_fabrication_note_text,
|
|
2030
2048
|
pcb_autorouting_error,
|
|
@@ -2096,6 +2114,7 @@ export {
|
|
|
2096
2114
|
pcb_placement_error,
|
|
2097
2115
|
pcb_plated_hole,
|
|
2098
2116
|
pcb_port,
|
|
2117
|
+
pcb_port_not_connected_error,
|
|
2099
2118
|
pcb_port_not_matched_error,
|
|
2100
2119
|
pcb_route_hint,
|
|
2101
2120
|
pcb_route_hints,
|