@tscircuit/props 0.0.358 → 0.0.360

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
@@ -472,6 +472,7 @@ var border = z27.object({
472
472
  dashed: z27.boolean().optional(),
473
473
  solid: z27.boolean().optional()
474
474
  });
475
+ var pcbPositionAnchorAutocomplete = z27.custom((value) => typeof value === "string");
475
476
  var autorouterConfig = z27.object({
476
477
  serverUrl: z27.string().optional(),
477
478
  inputFormat: z27.enum(["simplified", "circuit-json"]).optional(),
@@ -597,7 +598,8 @@ var baseGroupProps = commonLayoutProps.extend({
597
598
  pcbPaddingLeft: length2.optional(),
598
599
  pcbPaddingRight: length2.optional(),
599
600
  pcbPaddingTop: length2.optional(),
600
- pcbPaddingBottom: length2.optional()
601
+ pcbPaddingBottom: length2.optional(),
602
+ pcbPositionAnchor: pcbPositionAnchorAutocomplete.optional()
601
603
  });
602
604
  var partsEngine = z27.custom((v) => "findPart" in v);
603
605
  var subcircuitGroupProps = baseGroupProps.extend({
@@ -1504,6 +1506,7 @@ var fabricationNoteTextProps = pcbLayoutProps.extend({
1504
1506
  fontSize: length3.optional(),
1505
1507
  color: z65.string().optional()
1506
1508
  });
1509
+ expectTypesMatch(true);
1507
1510
 
1508
1511
  // lib/components/fabrication-note-rect.ts
1509
1512
  import { distance as distance15 } from "circuit-json";
@@ -1527,38 +1530,54 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
1527
1530
  color: z67.string().optional()
1528
1531
  });
1529
1532
 
1530
- // lib/components/pcb-trace.ts
1531
- import { distance as distance16, route_hint_point as route_hint_point4 } from "circuit-json";
1533
+ // lib/components/fabrication-note-dimension.ts
1534
+ import { distance as distance16, length as length5 } from "circuit-json";
1532
1535
  import { z as z68 } from "zod";
1533
- var pcbTraceProps = z68.object({
1534
- layer: z68.string().optional(),
1535
- thickness: distance16.optional(),
1536
- route: z68.array(route_hint_point4)
1536
+ var dimensionTarget = z68.union([z68.string(), point]);
1537
+ var fabricationNoteDimensionProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1538
+ from: dimensionTarget,
1539
+ to: dimensionTarget,
1540
+ text: z68.string().optional(),
1541
+ offset: distance16.optional(),
1542
+ font: z68.enum(["tscircuit2024"]).optional(),
1543
+ fontSize: length5.optional(),
1544
+ color: z68.string().optional(),
1545
+ arrowSize: distance16.optional()
1537
1546
  });
1547
+ expectTypesMatch(true);
1538
1548
 
1539
- // lib/components/via.ts
1540
- import { distance as distance17, layer_ref as layer_ref5 } from "circuit-json";
1549
+ // lib/components/pcb-trace.ts
1550
+ import { distance as distance17, route_hint_point as route_hint_point4 } from "circuit-json";
1541
1551
  import { z as z69 } from "zod";
1552
+ var pcbTraceProps = z69.object({
1553
+ layer: z69.string().optional(),
1554
+ thickness: distance17.optional(),
1555
+ route: z69.array(route_hint_point4)
1556
+ });
1557
+
1558
+ // lib/components/via.ts
1559
+ import { distance as distance18, layer_ref as layer_ref5 } from "circuit-json";
1560
+ import { z as z70 } from "zod";
1542
1561
  var viaProps = commonLayoutProps.extend({
1543
- name: z69.string().optional(),
1562
+ name: z70.string().optional(),
1544
1563
  fromLayer: layer_ref5,
1545
1564
  toLayer: layer_ref5,
1546
- holeDiameter: distance17,
1547
- outerDiameter: distance17,
1548
- connectsTo: z69.string().or(z69.array(z69.string())).optional()
1565
+ holeDiameter: distance18,
1566
+ outerDiameter: distance18,
1567
+ connectsTo: z70.string().or(z70.array(z70.string())).optional()
1549
1568
  });
1550
1569
  expectTypesMatch(true);
1551
1570
 
1552
1571
  // lib/components/testpoint.ts
1553
- import { distance as distance18 } from "circuit-json";
1554
- import { z as z70 } from "zod";
1572
+ import { distance as distance19 } from "circuit-json";
1573
+ import { z as z71 } from "zod";
1555
1574
  var testpointProps = commonComponentProps.extend({
1556
- footprintVariant: z70.enum(["pad", "through_hole"]).optional(),
1557
- padShape: z70.enum(["rect", "circle"]).optional().default("circle"),
1558
- padDiameter: distance18.optional(),
1559
- holeDiameter: distance18.optional(),
1560
- width: distance18.optional(),
1561
- height: distance18.optional()
1575
+ footprintVariant: z71.enum(["pad", "through_hole"]).optional(),
1576
+ padShape: z71.enum(["rect", "circle"]).optional().default("circle"),
1577
+ padDiameter: distance19.optional(),
1578
+ holeDiameter: distance19.optional(),
1579
+ width: distance19.optional(),
1580
+ height: distance19.optional()
1562
1581
  }).refine(
1563
1582
  (props) => props.footprintVariant !== "through_hole" || props.holeDiameter !== void 0,
1564
1583
  { message: "holeDiameter is required for through_hole testpoints" }
@@ -1566,58 +1585,58 @@ var testpointProps = commonComponentProps.extend({
1566
1585
  expectTypesMatch(true);
1567
1586
 
1568
1587
  // lib/components/breakoutpoint.ts
1569
- import { z as z71 } from "zod";
1588
+ import { z as z72 } from "zod";
1570
1589
  var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
1571
- connection: z71.string()
1590
+ connection: z72.string()
1572
1591
  });
1573
1592
  expectTypesMatch(true);
1574
1593
 
1575
1594
  // lib/components/pcb-keepout.ts
1576
- import { distance as distance19 } from "circuit-json";
1577
- import { z as z72 } from "zod";
1578
- var pcbKeepoutProps = z72.union([
1595
+ import { distance as distance20 } from "circuit-json";
1596
+ import { z as z73 } from "zod";
1597
+ var pcbKeepoutProps = z73.union([
1579
1598
  pcbLayoutProps.omit({ pcbRotation: true }).extend({
1580
- shape: z72.literal("circle"),
1581
- radius: distance19
1599
+ shape: z73.literal("circle"),
1600
+ radius: distance20
1582
1601
  }),
1583
1602
  pcbLayoutProps.extend({
1584
- shape: z72.literal("rect"),
1585
- width: distance19,
1586
- height: distance19
1603
+ shape: z73.literal("rect"),
1604
+ width: distance20,
1605
+ height: distance20
1587
1606
  })
1588
1607
  ]);
1589
1608
 
1590
1609
  // lib/components/courtyard-rect.ts
1591
- import { distance as distance20 } from "circuit-json";
1592
- import { z as z73 } from "zod";
1610
+ import { distance as distance21 } from "circuit-json";
1611
+ import { z as z74 } from "zod";
1593
1612
  var courtyardRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1594
- width: distance20,
1595
- height: distance20,
1596
- strokeWidth: distance20.optional(),
1597
- isFilled: z73.boolean().optional(),
1598
- hasStroke: z73.boolean().optional(),
1599
- isStrokeDashed: z73.boolean().optional(),
1600
- color: z73.string().optional()
1613
+ width: distance21,
1614
+ height: distance21,
1615
+ strokeWidth: distance21.optional(),
1616
+ isFilled: z74.boolean().optional(),
1617
+ hasStroke: z74.boolean().optional(),
1618
+ isStrokeDashed: z74.boolean().optional(),
1619
+ color: z74.string().optional()
1601
1620
  });
1602
1621
 
1603
1622
  // lib/components/courtyard-outline.ts
1604
- import { length as length5 } from "circuit-json";
1605
- import { z as z74 } from "zod";
1623
+ import { length as length6 } from "circuit-json";
1624
+ import { z as z75 } from "zod";
1606
1625
  var courtyardOutlineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1607
- outline: z74.array(point),
1608
- strokeWidth: length5.optional(),
1609
- isClosed: z74.boolean().optional(),
1610
- isStrokeDashed: z74.boolean().optional(),
1611
- color: z74.string().optional()
1626
+ outline: z75.array(point),
1627
+ strokeWidth: length6.optional(),
1628
+ isClosed: z75.boolean().optional(),
1629
+ isStrokeDashed: z75.boolean().optional(),
1630
+ color: z75.string().optional()
1612
1631
  });
1613
1632
 
1614
1633
  // lib/components/copper-pour.ts
1615
- import { z as z75 } from "zod";
1634
+ import { z as z76 } from "zod";
1616
1635
  import { layer_ref as layer_ref6 } from "circuit-json";
1617
- var copperPourProps = z75.object({
1618
- name: z75.string().optional(),
1636
+ var copperPourProps = z76.object({
1637
+ name: z76.string().optional(),
1619
1638
  layer: layer_ref6,
1620
- connectsTo: z75.string(),
1639
+ connectsTo: z76.string(),
1621
1640
  padMargin: distance.optional(),
1622
1641
  traceMargin: distance.optional()
1623
1642
  });
@@ -1625,27 +1644,27 @@ expectTypesMatch(true);
1625
1644
 
1626
1645
  // lib/components/cadassembly.ts
1627
1646
  import { layer_ref as layer_ref7 } from "circuit-json";
1628
- import { z as z76 } from "zod";
1629
- var cadassemblyProps = z76.object({
1647
+ import { z as z77 } from "zod";
1648
+ var cadassemblyProps = z77.object({
1630
1649
  originalLayer: layer_ref7.default("top").optional(),
1631
- children: z76.any().optional()
1650
+ children: z77.any().optional()
1632
1651
  });
1633
1652
  expectTypesMatch(true);
1634
1653
 
1635
1654
  // lib/components/cadmodel.ts
1636
- import { z as z77 } from "zod";
1637
- var pcbPosition = z77.object({
1655
+ import { z as z78 } from "zod";
1656
+ var pcbPosition = z78.object({
1638
1657
  pcbX: distance.optional(),
1639
1658
  pcbY: distance.optional(),
1640
1659
  pcbZ: distance.optional()
1641
1660
  });
1642
1661
  var cadModelBaseWithUrl = cadModelBase.extend({
1643
- modelUrl: z77.string(),
1644
- stepUrl: z77.string().optional()
1662
+ modelUrl: z78.string(),
1663
+ stepUrl: z78.string().optional()
1645
1664
  });
1646
1665
  var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
1647
1666
  expectTypesMatch(true);
1648
- var cadmodelProps = z77.union([z77.null(), z77.string(), cadModelObject]);
1667
+ var cadmodelProps = z78.union([z78.null(), z78.string(), cadModelObject]);
1649
1668
 
1650
1669
  // lib/components/power-source.ts
1651
1670
  import { voltage as voltage3 } from "circuit-json";
@@ -1655,9 +1674,9 @@ var powerSourceProps = commonComponentProps.extend({
1655
1674
 
1656
1675
  // lib/components/voltagesource.ts
1657
1676
  import { frequency as frequency3, rotation as rotation4, voltage as voltage4 } from "circuit-json";
1658
- import { z as z78 } from "zod";
1677
+ import { z as z79 } from "zod";
1659
1678
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
1660
- var percentage = z78.union([z78.string(), z78.number()]).transform((val) => {
1679
+ var percentage = z79.union([z79.string(), z79.number()]).transform((val) => {
1661
1680
  if (typeof val === "string") {
1662
1681
  if (val.endsWith("%")) {
1663
1682
  return parseFloat(val.slice(0, -1)) / 100;
@@ -1666,13 +1685,13 @@ var percentage = z78.union([z78.string(), z78.number()]).transform((val) => {
1666
1685
  }
1667
1686
  return val;
1668
1687
  }).pipe(
1669
- z78.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
1688
+ z79.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
1670
1689
  );
1671
1690
  var voltageSourceProps = commonComponentProps.extend({
1672
1691
  voltage: voltage4.optional(),
1673
1692
  frequency: frequency3.optional(),
1674
1693
  peakToPeakVoltage: voltage4.optional(),
1675
- waveShape: z78.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
1694
+ waveShape: z79.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
1676
1695
  phase: rotation4.optional(),
1677
1696
  dutyCycle: percentage.optional(),
1678
1697
  connections: createConnectionsProp(voltageSourcePinLabels).optional()
@@ -1681,47 +1700,47 @@ var voltageSourcePins = lrPolarPins;
1681
1700
  expectTypesMatch(true);
1682
1701
 
1683
1702
  // lib/components/voltageprobe.ts
1684
- import { z as z79 } from "zod";
1703
+ import { z as z80 } from "zod";
1685
1704
  var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
1686
- name: z79.string().optional(),
1687
- connectsTo: z79.string().or(z79.array(z79.string()))
1705
+ name: z80.string().optional(),
1706
+ connectsTo: z80.string().or(z80.array(z80.string()))
1688
1707
  });
1689
1708
  expectTypesMatch(true);
1690
1709
 
1691
1710
  // lib/components/schematic-arc.ts
1692
- import { distance as distance21, point as point5, rotation as rotation5 } from "circuit-json";
1693
- import { z as z80 } from "zod";
1694
- var schematicArcProps = z80.object({
1711
+ import { distance as distance22, point as point5, rotation as rotation5 } from "circuit-json";
1712
+ import { z as z81 } from "zod";
1713
+ var schematicArcProps = z81.object({
1695
1714
  center: point5,
1696
- radius: distance21,
1715
+ radius: distance22,
1697
1716
  startAngleDegrees: rotation5,
1698
1717
  endAngleDegrees: rotation5,
1699
- direction: z80.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
1700
- strokeWidth: distance21.optional(),
1701
- color: z80.string().optional().default("#000000"),
1702
- isDashed: z80.boolean().optional().default(false)
1718
+ direction: z81.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
1719
+ strokeWidth: distance22.optional(),
1720
+ color: z81.string().optional().default("#000000"),
1721
+ isDashed: z81.boolean().optional().default(false)
1703
1722
  });
1704
1723
 
1705
1724
  // lib/components/schematic-box.ts
1706
- import { distance as distance22 } from "circuit-json";
1707
- import { z as z81 } from "zod";
1708
- var schematicBoxProps = z81.object({
1709
- schX: distance22.optional(),
1710
- schY: distance22.optional(),
1711
- width: distance22.optional(),
1712
- height: distance22.optional(),
1713
- overlay: z81.array(z81.string()).optional(),
1714
- padding: distance22.optional(),
1715
- paddingLeft: distance22.optional(),
1716
- paddingRight: distance22.optional(),
1717
- paddingTop: distance22.optional(),
1718
- paddingBottom: distance22.optional(),
1719
- title: z81.string().optional(),
1725
+ import { distance as distance23 } from "circuit-json";
1726
+ import { z as z82 } from "zod";
1727
+ var schematicBoxProps = z82.object({
1728
+ schX: distance23.optional(),
1729
+ schY: distance23.optional(),
1730
+ width: distance23.optional(),
1731
+ height: distance23.optional(),
1732
+ overlay: z82.array(z82.string()).optional(),
1733
+ padding: distance23.optional(),
1734
+ paddingLeft: distance23.optional(),
1735
+ paddingRight: distance23.optional(),
1736
+ paddingTop: distance23.optional(),
1737
+ paddingBottom: distance23.optional(),
1738
+ title: z82.string().optional(),
1720
1739
  titleAlignment: ninePointAnchor.default("top_left"),
1721
- titleColor: z81.string().optional(),
1722
- titleFontSize: distance22.optional(),
1723
- titleInside: z81.boolean().default(false),
1724
- strokeStyle: z81.enum(["solid", "dashed"]).default("solid")
1740
+ titleColor: z82.string().optional(),
1741
+ titleFontSize: distance23.optional(),
1742
+ titleInside: z82.boolean().default(false),
1743
+ strokeStyle: z82.enum(["solid", "dashed"]).default("solid")
1725
1744
  }).refine(
1726
1745
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
1727
1746
  {
@@ -1735,27 +1754,11 @@ var schematicBoxProps = z81.object({
1735
1754
  );
1736
1755
 
1737
1756
  // lib/components/schematic-circle.ts
1738
- import { distance as distance23, point as point6 } from "circuit-json";
1739
- import { z as z82 } from "zod";
1740
- var schematicCircleProps = z82.object({
1741
- center: point6,
1742
- radius: distance23,
1743
- strokeWidth: distance23.optional(),
1744
- color: z82.string().optional().default("#000000"),
1745
- isFilled: z82.boolean().optional().default(false),
1746
- fillColor: z82.string().optional(),
1747
- isDashed: z82.boolean().optional().default(false)
1748
- });
1749
-
1750
- // lib/components/schematic-rect.ts
1751
- import { distance as distance24, rotation as rotation6 } from "circuit-json";
1757
+ import { distance as distance24, point as point6 } from "circuit-json";
1752
1758
  import { z as z83 } from "zod";
1753
- var schematicRectProps = z83.object({
1754
- schX: distance24.optional(),
1755
- schY: distance24.optional(),
1756
- width: distance24,
1757
- height: distance24,
1758
- rotation: rotation6.default(0),
1759
+ var schematicCircleProps = z83.object({
1760
+ center: point6,
1761
+ radius: distance24,
1759
1762
  strokeWidth: distance24.optional(),
1760
1763
  color: z83.string().optional().default("#000000"),
1761
1764
  isFilled: z83.boolean().optional().default(false),
@@ -1763,26 +1766,42 @@ var schematicRectProps = z83.object({
1763
1766
  isDashed: z83.boolean().optional().default(false)
1764
1767
  });
1765
1768
 
1766
- // lib/components/schematic-line.ts
1767
- import { distance as distance25 } from "circuit-json";
1769
+ // lib/components/schematic-rect.ts
1770
+ import { distance as distance25, rotation as rotation6 } from "circuit-json";
1768
1771
  import { z as z84 } from "zod";
1769
- var schematicLineProps = z84.object({
1770
- x1: distance25,
1771
- y1: distance25,
1772
- x2: distance25,
1773
- y2: distance25,
1772
+ var schematicRectProps = z84.object({
1773
+ schX: distance25.optional(),
1774
+ schY: distance25.optional(),
1775
+ width: distance25,
1776
+ height: distance25,
1777
+ rotation: rotation6.default(0),
1774
1778
  strokeWidth: distance25.optional(),
1775
1779
  color: z84.string().optional().default("#000000"),
1780
+ isFilled: z84.boolean().optional().default(false),
1781
+ fillColor: z84.string().optional(),
1776
1782
  isDashed: z84.boolean().optional().default(false)
1777
1783
  });
1778
1784
 
1785
+ // lib/components/schematic-line.ts
1786
+ import { distance as distance26 } from "circuit-json";
1787
+ import { z as z85 } from "zod";
1788
+ var schematicLineProps = z85.object({
1789
+ x1: distance26,
1790
+ y1: distance26,
1791
+ x2: distance26,
1792
+ y2: distance26,
1793
+ strokeWidth: distance26.optional(),
1794
+ color: z85.string().optional().default("#000000"),
1795
+ isDashed: z85.boolean().optional().default(false)
1796
+ });
1797
+
1779
1798
  // lib/components/schematic-text.ts
1780
- import { distance as distance26, rotation as rotation7 } from "circuit-json";
1781
- import { z as z86 } from "zod";
1799
+ import { distance as distance27, rotation as rotation7 } from "circuit-json";
1800
+ import { z as z87 } from "zod";
1782
1801
 
1783
1802
  // lib/common/fivePointAnchor.ts
1784
- import { z as z85 } from "zod";
1785
- var fivePointAnchor = z85.enum([
1803
+ import { z as z86 } from "zod";
1804
+ var fivePointAnchor = z86.enum([
1786
1805
  "center",
1787
1806
  "left",
1788
1807
  "right",
@@ -1791,213 +1810,284 @@ var fivePointAnchor = z85.enum([
1791
1810
  ]);
1792
1811
 
1793
1812
  // lib/components/schematic-text.ts
1794
- var schematicTextProps = z86.object({
1795
- schX: distance26.optional(),
1796
- schY: distance26.optional(),
1797
- text: z86.string(),
1798
- fontSize: z86.number().default(1),
1799
- anchor: z86.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
1800
- color: z86.string().default("#000000"),
1813
+ var schematicTextProps = z87.object({
1814
+ schX: distance27.optional(),
1815
+ schY: distance27.optional(),
1816
+ text: z87.string(),
1817
+ fontSize: z87.number().default(1),
1818
+ anchor: z87.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
1819
+ color: z87.string().default("#000000"),
1801
1820
  schRotation: rotation7.default(0)
1802
1821
  });
1803
1822
 
1804
1823
  // lib/components/schematic-path.ts
1805
1824
  import { point as point8 } from "circuit-json";
1806
- import { z as z87 } from "zod";
1807
- var schematicPathProps = z87.object({
1808
- points: z87.array(point8),
1809
- isFilled: z87.boolean().optional().default(false),
1810
- fillColor: z87.enum(["red", "blue"]).optional()
1825
+ import { z as z88 } from "zod";
1826
+ var schematicPathProps = z88.object({
1827
+ points: z88.array(point8),
1828
+ isFilled: z88.boolean().optional().default(false),
1829
+ fillColor: z88.enum(["red", "blue"]).optional()
1811
1830
  });
1812
1831
 
1813
1832
  // lib/components/schematic-table.ts
1814
- import { distance as distance27 } from "circuit-json";
1815
- import { z as z88 } from "zod";
1816
- var schematicTableProps = z88.object({
1817
- schX: distance27.optional(),
1818
- schY: distance27.optional(),
1819
- children: z88.any().optional(),
1820
- cellPadding: distance27.optional(),
1821
- borderWidth: distance27.optional(),
1833
+ import { distance as distance28 } from "circuit-json";
1834
+ import { z as z89 } from "zod";
1835
+ var schematicTableProps = z89.object({
1836
+ schX: distance28.optional(),
1837
+ schY: distance28.optional(),
1838
+ children: z89.any().optional(),
1839
+ cellPadding: distance28.optional(),
1840
+ borderWidth: distance28.optional(),
1822
1841
  anchor: ninePointAnchor.optional(),
1823
- fontSize: distance27.optional()
1842
+ fontSize: distance28.optional()
1824
1843
  });
1825
1844
  expectTypesMatch(true);
1826
1845
 
1827
1846
  // lib/components/schematic-row.ts
1828
- import { distance as distance28 } from "circuit-json";
1829
- import { z as z89 } from "zod";
1830
- var schematicRowProps = z89.object({
1831
- children: z89.any().optional(),
1832
- height: distance28.optional()
1847
+ import { distance as distance29 } from "circuit-json";
1848
+ import { z as z90 } from "zod";
1849
+ var schematicRowProps = z90.object({
1850
+ children: z90.any().optional(),
1851
+ height: distance29.optional()
1833
1852
  });
1834
1853
  expectTypesMatch(true);
1835
1854
 
1836
1855
  // lib/components/schematic-cell.ts
1837
- import { distance as distance29 } from "circuit-json";
1838
- import { z as z90 } from "zod";
1839
- var schematicCellProps = z90.object({
1840
- children: z90.string().optional(),
1841
- horizontalAlign: z90.enum(["left", "center", "right"]).optional(),
1842
- verticalAlign: z90.enum(["top", "middle", "bottom"]).optional(),
1843
- fontSize: distance29.optional(),
1844
- rowSpan: z90.number().optional(),
1845
- colSpan: z90.number().optional(),
1846
- width: distance29.optional(),
1847
- text: z90.string().optional()
1856
+ import { distance as distance30 } from "circuit-json";
1857
+ import { z as z91 } from "zod";
1858
+ var schematicCellProps = z91.object({
1859
+ children: z91.string().optional(),
1860
+ horizontalAlign: z91.enum(["left", "center", "right"]).optional(),
1861
+ verticalAlign: z91.enum(["top", "middle", "bottom"]).optional(),
1862
+ fontSize: distance30.optional(),
1863
+ rowSpan: z91.number().optional(),
1864
+ colSpan: z91.number().optional(),
1865
+ width: distance30.optional(),
1866
+ text: z91.string().optional()
1848
1867
  });
1849
1868
  expectTypesMatch(true);
1850
1869
 
1851
1870
  // lib/components/silkscreen-text.ts
1852
- import { layer_ref as layer_ref8, length as length6 } from "circuit-json";
1853
- import { z as z91 } from "zod";
1871
+ import { layer_ref as layer_ref8, length as length7 } from "circuit-json";
1872
+ import { z as z92 } from "zod";
1854
1873
  var silkscreenTextProps = pcbLayoutProps.extend({
1855
- text: z91.string(),
1874
+ text: z92.string(),
1856
1875
  anchorAlignment: ninePointAnchor.default("center"),
1857
- font: z91.enum(["tscircuit2024"]).optional(),
1858
- fontSize: length6.optional(),
1876
+ font: z92.enum(["tscircuit2024"]).optional(),
1877
+ fontSize: length7.optional(),
1859
1878
  /**
1860
1879
  * If true, text will knock out underlying silkscreen
1861
1880
  */
1862
- isKnockout: z91.boolean().optional(),
1863
- knockoutPadding: length6.optional(),
1864
- knockoutPaddingLeft: length6.optional(),
1865
- knockoutPaddingRight: length6.optional(),
1866
- knockoutPaddingTop: length6.optional(),
1867
- knockoutPaddingBottom: length6.optional(),
1868
- layers: z91.array(layer_ref8).optional()
1881
+ isKnockout: z92.boolean().optional(),
1882
+ knockoutPadding: length7.optional(),
1883
+ knockoutPaddingLeft: length7.optional(),
1884
+ knockoutPaddingRight: length7.optional(),
1885
+ knockoutPaddingTop: length7.optional(),
1886
+ knockoutPaddingBottom: length7.optional(),
1887
+ layers: z92.array(layer_ref8).optional()
1869
1888
  });
1870
1889
 
1871
1890
  // lib/components/silkscreen-path.ts
1872
- import { length as length7, route_hint_point as route_hint_point5 } from "circuit-json";
1873
- import { z as z92 } from "zod";
1891
+ import { length as length8, route_hint_point as route_hint_point5 } from "circuit-json";
1892
+ import { z as z93 } from "zod";
1874
1893
  var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1875
- route: z92.array(route_hint_point5),
1876
- strokeWidth: length7.optional()
1894
+ route: z93.array(route_hint_point5),
1895
+ strokeWidth: length8.optional()
1877
1896
  });
1878
1897
 
1879
1898
  // lib/components/silkscreen-line.ts
1880
- import { distance as distance30 } from "circuit-json";
1899
+ import { distance as distance31 } from "circuit-json";
1881
1900
  var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1882
- strokeWidth: distance30,
1883
- x1: distance30,
1884
- y1: distance30,
1885
- x2: distance30,
1886
- y2: distance30
1901
+ strokeWidth: distance31,
1902
+ x1: distance31,
1903
+ y1: distance31,
1904
+ x2: distance31,
1905
+ y2: distance31
1887
1906
  });
1888
1907
 
1889
1908
  // lib/components/silkscreen-rect.ts
1890
- import { distance as distance31 } from "circuit-json";
1891
- import { z as z93 } from "zod";
1909
+ import { distance as distance32 } from "circuit-json";
1910
+ import { z as z94 } from "zod";
1892
1911
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1893
- filled: z93.boolean().default(true).optional(),
1894
- stroke: z93.enum(["dashed", "solid", "none"]).optional(),
1895
- strokeWidth: distance31.optional(),
1896
- width: distance31,
1897
- height: distance31
1912
+ filled: z94.boolean().default(true).optional(),
1913
+ stroke: z94.enum(["dashed", "solid", "none"]).optional(),
1914
+ strokeWidth: distance32.optional(),
1915
+ width: distance32,
1916
+ height: distance32
1898
1917
  });
1899
1918
 
1900
1919
  // lib/components/silkscreen-circle.ts
1901
- import { distance as distance32 } from "circuit-json";
1902
- import { z as z94 } from "zod";
1920
+ import { distance as distance33 } from "circuit-json";
1921
+ import { z as z95 } from "zod";
1903
1922
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1904
- isFilled: z94.boolean().optional(),
1905
- isOutline: z94.boolean().optional(),
1906
- strokeWidth: distance32.optional(),
1907
- radius: distance32
1923
+ isFilled: z95.boolean().optional(),
1924
+ isOutline: z95.boolean().optional(),
1925
+ strokeWidth: distance33.optional(),
1926
+ radius: distance33
1908
1927
  });
1909
1928
 
1910
1929
  // lib/components/trace-hint.ts
1911
- import { distance as distance33, layer_ref as layer_ref9, route_hint_point as route_hint_point6 } from "circuit-json";
1912
- import { z as z95 } from "zod";
1913
- var routeHintPointProps = z95.object({
1914
- x: distance33,
1915
- y: distance33,
1916
- via: z95.boolean().optional(),
1930
+ import { distance as distance34, layer_ref as layer_ref9, route_hint_point as route_hint_point6 } from "circuit-json";
1931
+ import { z as z96 } from "zod";
1932
+ var routeHintPointProps = z96.object({
1933
+ x: distance34,
1934
+ y: distance34,
1935
+ via: z96.boolean().optional(),
1917
1936
  toLayer: layer_ref9.optional()
1918
1937
  });
1919
- var traceHintProps = z95.object({
1920
- for: z95.string().optional().describe(
1938
+ var traceHintProps = z96.object({
1939
+ for: z96.string().optional().describe(
1921
1940
  "Selector for the port you're targeting, not required if you're inside a trace"
1922
1941
  ),
1923
- order: z95.number().optional(),
1942
+ order: z96.number().optional(),
1924
1943
  offset: route_hint_point6.or(routeHintPointProps).optional(),
1925
- offsets: z95.array(route_hint_point6).or(z95.array(routeHintPointProps)).optional(),
1926
- traceWidth: z95.number().optional()
1944
+ offsets: z96.array(route_hint_point6).or(z96.array(routeHintPointProps)).optional(),
1945
+ traceWidth: z96.number().optional()
1927
1946
  });
1928
1947
 
1929
1948
  // lib/components/port.ts
1930
- import { z as z96 } from "zod";
1949
+ import { z as z97 } from "zod";
1931
1950
  var portProps = commonLayoutProps.extend({
1932
- name: z96.string(),
1933
- pinNumber: z96.number().optional(),
1934
- aliases: z96.array(z96.string()).optional(),
1951
+ name: z97.string(),
1952
+ pinNumber: z97.number().optional(),
1953
+ aliases: z97.array(z97.string()).optional(),
1935
1954
  direction,
1936
- connectsTo: z96.string().or(z96.array(z96.string())).optional()
1955
+ connectsTo: z97.string().or(z97.array(z97.string())).optional()
1937
1956
  });
1938
1957
 
1958
+ // lib/components/pcb-note-text.ts
1959
+ import { length as length9 } from "circuit-json";
1960
+ import { z as z98 } from "zod";
1961
+ var pcbNoteTextProps = pcbLayoutProps.extend({
1962
+ text: z98.string(),
1963
+ anchorAlignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
1964
+ font: z98.enum(["tscircuit2024"]).optional(),
1965
+ fontSize: length9.optional(),
1966
+ color: z98.string().optional()
1967
+ });
1968
+ expectTypesMatch(true);
1969
+
1970
+ // lib/components/pcb-note-rect.ts
1971
+ import { distance as distance35 } from "circuit-json";
1972
+ import { z as z99 } from "zod";
1973
+ var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1974
+ width: distance35,
1975
+ height: distance35,
1976
+ strokeWidth: distance35.optional(),
1977
+ isFilled: z99.boolean().optional(),
1978
+ hasStroke: z99.boolean().optional(),
1979
+ isStrokeDashed: z99.boolean().optional(),
1980
+ color: z99.string().optional()
1981
+ });
1982
+ expectTypesMatch(true);
1983
+
1984
+ // lib/components/pcb-note-path.ts
1985
+ import {
1986
+ length as length10,
1987
+ route_hint_point as route_hint_point7
1988
+ } from "circuit-json";
1989
+ import { z as z100 } from "zod";
1990
+ var pcbNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1991
+ route: z100.array(route_hint_point7),
1992
+ strokeWidth: length10.optional(),
1993
+ color: z100.string().optional()
1994
+ });
1995
+ expectTypesMatch(true);
1996
+
1997
+ // lib/components/pcb-note-line.ts
1998
+ import { distance as distance36 } from "circuit-json";
1999
+ import { z as z101 } from "zod";
2000
+ var pcbNoteLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
2001
+ x1: distance36,
2002
+ y1: distance36,
2003
+ x2: distance36,
2004
+ y2: distance36,
2005
+ strokeWidth: distance36.optional(),
2006
+ color: z101.string().optional(),
2007
+ isDashed: z101.boolean().optional()
2008
+ });
2009
+ expectTypesMatch(true);
2010
+
2011
+ // lib/components/pcb-note-dimension.ts
2012
+ import { distance as distance37, length as length11 } from "circuit-json";
2013
+ import { z as z102 } from "zod";
2014
+ var dimensionTarget2 = z102.union([z102.string(), point]);
2015
+ var pcbNoteDimensionProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
2016
+ from: dimensionTarget2,
2017
+ to: dimensionTarget2,
2018
+ text: z102.string().optional(),
2019
+ offset: distance37.optional(),
2020
+ font: z102.enum(["tscircuit2024"]).optional(),
2021
+ fontSize: length11.optional(),
2022
+ color: z102.string().optional(),
2023
+ arrowSize: distance37.optional()
2024
+ });
2025
+ expectTypesMatch(
2026
+ true
2027
+ );
2028
+
1939
2029
  // lib/platformConfig.ts
1940
- import { z as z97 } from "zod";
2030
+ import { z as z103 } from "zod";
1941
2031
  import { frequency as frequency4, ms as ms2 } from "circuit-json";
1942
- var unvalidatedCircuitJson = z97.array(z97.any()).describe("Circuit JSON");
1943
- var footprintLibraryResult = z97.object({
1944
- footprintCircuitJson: z97.array(z97.any()),
2032
+ var unvalidatedCircuitJson = z103.array(z103.any()).describe("Circuit JSON");
2033
+ var footprintLibraryResult = z103.object({
2034
+ footprintCircuitJson: z103.array(z103.any()),
1945
2035
  cadModel: cadModelProp.optional()
1946
2036
  });
1947
- var pathToCircuitJsonFn = z97.function().args(z97.string()).returns(z97.promise(footprintLibraryResult)).describe("A function that takes a path and returns Circuit JSON");
1948
- var footprintFileParserEntry = z97.object({
1949
- loadFromUrl: z97.function().args(z97.string()).returns(z97.promise(footprintLibraryResult)).describe(
2037
+ var pathToCircuitJsonFn = z103.function().args(z103.string()).returns(z103.promise(footprintLibraryResult)).describe("A function that takes a path and returns Circuit JSON");
2038
+ var footprintFileParserEntry = z103.object({
2039
+ loadFromUrl: z103.function().args(z103.string()).returns(z103.promise(footprintLibraryResult)).describe(
1950
2040
  "A function that takes a footprint file URL and returns Circuit JSON"
1951
2041
  )
1952
2042
  });
1953
- var spiceEngineSimulationResult = z97.object({
1954
- engineVersionString: z97.string().optional(),
2043
+ var spiceEngineSimulationResult = z103.object({
2044
+ engineVersionString: z103.string().optional(),
1955
2045
  simulationResultCircuitJson: unvalidatedCircuitJson
1956
2046
  });
1957
- var spiceEngineZod = z97.object({
1958
- simulate: z97.function().args(z97.string()).returns(z97.promise(spiceEngineSimulationResult)).describe(
2047
+ var spiceEngineZod = z103.object({
2048
+ simulate: z103.function().args(z103.string()).returns(z103.promise(spiceEngineSimulationResult)).describe(
1959
2049
  "A function that takes a SPICE string and returns a simulation result"
1960
2050
  )
1961
2051
  });
1962
- var autorouterInstance = z97.object({
1963
- run: z97.function().args().returns(z97.promise(z97.unknown())).describe("Run the autorouter"),
1964
- getOutputSimpleRouteJson: z97.function().args().returns(z97.promise(z97.any())).describe("Get the resulting SimpleRouteJson")
2052
+ var autorouterInstance = z103.object({
2053
+ run: z103.function().args().returns(z103.promise(z103.unknown())).describe("Run the autorouter"),
2054
+ getOutputSimpleRouteJson: z103.function().args().returns(z103.promise(z103.any())).describe("Get the resulting SimpleRouteJson")
1965
2055
  });
1966
- var autorouterDefinition = z97.object({
1967
- createAutorouter: z97.function().args(z97.any(), z97.any().optional()).returns(z97.union([autorouterInstance, z97.promise(autorouterInstance)])).describe("Create an autorouter instance")
2056
+ var autorouterDefinition = z103.object({
2057
+ createAutorouter: z103.function().args(z103.any(), z103.any().optional()).returns(z103.union([autorouterInstance, z103.promise(autorouterInstance)])).describe("Create an autorouter instance")
1968
2058
  });
1969
- var platformConfig = z97.object({
2059
+ var platformConfig = z103.object({
1970
2060
  partsEngine: partsEngine.optional(),
1971
2061
  autorouter: autorouterProp.optional(),
1972
- autorouterMap: z97.record(z97.string(), autorouterDefinition).optional(),
1973
- registryApiUrl: z97.string().optional(),
1974
- cloudAutorouterUrl: z97.string().optional(),
1975
- projectName: z97.string().optional(),
1976
- projectBaseUrl: z97.string().optional(),
1977
- version: z97.string().optional(),
1978
- url: z97.string().optional(),
1979
- printBoardInformationToSilkscreen: z97.boolean().optional(),
1980
- localCacheEngine: z97.any().optional(),
1981
- pcbDisabled: z97.boolean().optional(),
1982
- schematicDisabled: z97.boolean().optional(),
1983
- partsEngineDisabled: z97.boolean().optional(),
1984
- spiceEngineMap: z97.record(z97.string(), spiceEngineZod).optional(),
1985
- footprintLibraryMap: z97.record(
1986
- z97.string(),
1987
- z97.union([
2062
+ autorouterMap: z103.record(z103.string(), autorouterDefinition).optional(),
2063
+ registryApiUrl: z103.string().optional(),
2064
+ cloudAutorouterUrl: z103.string().optional(),
2065
+ projectName: z103.string().optional(),
2066
+ projectBaseUrl: z103.string().optional(),
2067
+ version: z103.string().optional(),
2068
+ url: z103.string().optional(),
2069
+ printBoardInformationToSilkscreen: z103.boolean().optional(),
2070
+ localCacheEngine: z103.any().optional(),
2071
+ pcbDisabled: z103.boolean().optional(),
2072
+ schematicDisabled: z103.boolean().optional(),
2073
+ partsEngineDisabled: z103.boolean().optional(),
2074
+ spiceEngineMap: z103.record(z103.string(), spiceEngineZod).optional(),
2075
+ footprintLibraryMap: z103.record(
2076
+ z103.string(),
2077
+ z103.union([
1988
2078
  pathToCircuitJsonFn,
1989
- z97.record(
1990
- z97.string(),
1991
- z97.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
2079
+ z103.record(
2080
+ z103.string(),
2081
+ z103.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
1992
2082
  )
1993
2083
  ])
1994
2084
  ).optional(),
1995
- footprintFileParserMap: z97.record(z97.string(), footprintFileParserEntry).optional(),
2085
+ footprintFileParserMap: z103.record(z103.string(), footprintFileParserEntry).optional(),
1996
2086
  simSwitchFrequency: frequency4.optional(),
1997
2087
  simCloseAt: ms2.optional(),
1998
2088
  simOpenAt: ms2.optional(),
1999
- simStartClosed: z97.boolean().optional(),
2000
- simStartOpen: z97.boolean().optional()
2089
+ simStartClosed: z103.boolean().optional(),
2090
+ simStartOpen: z103.boolean().optional()
2001
2091
  });
2002
2092
  expectTypesMatch(true);
2003
2093
 
@@ -2068,6 +2158,7 @@ export {
2068
2158
  edit_schematic_group_location_event,
2069
2159
  edit_trace_hint_event,
2070
2160
  explicitPinSideDefinition,
2161
+ fabricationNoteDimensionProps,
2071
2162
  fabricationNotePathProps,
2072
2163
  fabricationNoteRectProps,
2073
2164
  fabricationNoteTextProps,
@@ -2099,6 +2190,11 @@ export {
2099
2190
  partsEngine,
2100
2191
  pcbKeepoutProps,
2101
2192
  pcbLayoutProps,
2193
+ pcbNoteDimensionProps,
2194
+ pcbNoteLineProps,
2195
+ pcbNotePathProps,
2196
+ pcbNoteRectProps,
2197
+ pcbNoteTextProps,
2102
2198
  pcbSameXConstraintProps,
2103
2199
  pcbSameYConstraintProps,
2104
2200
  pcbTraceProps,