@tscircuit/fake-snippets 0.0.203 → 0.0.205

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
@@ -1623,8 +1623,17 @@ Added value prop support.`,
1623
1623
  content_text: `import { formatResistance, DEFAULT_RESISTANCE } from "./utils"
1624
1624
  import type { ComponentProps } from "./types"
1625
1625
 
1626
- export const TestComponent = ({ name, value = DEFAULT_RESISTANCE }: ComponentProps) => (
1627
- <resistor name={name} resistance={formatResistance(value)} />
1626
+ export const TestComponent = ({
1627
+ name,
1628
+ value = DEFAULT_RESISTANCE,
1629
+ }: ComponentProps) => (
1630
+ <board width="10mm" height="10mm">
1631
+ <resistor
1632
+ footprint="0402"
1633
+ name={name}
1634
+ resistance={formatResistance(value)}
1635
+ />
1636
+ </board>
1628
1637
  )`,
1629
1638
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1630
1639
  is_text: true
@@ -1663,6 +1672,261 @@ import { TestComponent } from "@tsci/testuser.test2-package"
1663
1672
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1664
1673
  is_text: true
1665
1674
  });
1675
+ db.addPackageFile({
1676
+ package_release_id: test2PackageReleaseId4,
1677
+ file_path: "dist/index/circuit.json",
1678
+ content_text: JSON.stringify([
1679
+ {
1680
+ type: "source_project_metadata",
1681
+ source_project_metadata_id: "source_project_metadata_0",
1682
+ software_used_string: "@tscircuit/core@0.0.1065"
1683
+ },
1684
+ {
1685
+ type: "source_group",
1686
+ source_group_id: "source_group_0",
1687
+ is_subcircuit: true,
1688
+ was_automatically_named: true,
1689
+ subcircuit_id: "subcircuit_source_group_0"
1690
+ },
1691
+ {
1692
+ type: "source_port",
1693
+ source_port_id: "source_port_0",
1694
+ name: "pin1",
1695
+ pin_number: 1,
1696
+ port_hints: ["pin1", "anode", "pos", "left", "1"],
1697
+ source_component_id: "source_component_0",
1698
+ subcircuit_id: "subcircuit_source_group_0"
1699
+ },
1700
+ {
1701
+ type: "source_port",
1702
+ source_port_id: "source_port_1",
1703
+ name: "pin2",
1704
+ pin_number: 2,
1705
+ port_hints: ["pin2", "cathode", "neg", "right", "2"],
1706
+ source_component_id: "source_component_0",
1707
+ subcircuit_id: "subcircuit_source_group_0"
1708
+ },
1709
+ {
1710
+ type: "source_component",
1711
+ source_component_id: "source_component_0",
1712
+ ftype: "simple_resistor",
1713
+ name: "unnamed_resistor1",
1714
+ supplier_part_numbers: { jlcpcb: [] },
1715
+ resistance: 4e4,
1716
+ display_resistance: "40k\u03A9",
1717
+ are_pins_interchangeable: true,
1718
+ source_group_id: "source_group_0"
1719
+ },
1720
+ {
1721
+ type: "source_board",
1722
+ source_board_id: "source_board_0",
1723
+ source_group_id: "source_group_0"
1724
+ },
1725
+ {
1726
+ type: "source_pin_missing_trace_warning",
1727
+ source_pin_missing_trace_warning_id: "source_pin_missing_trace_warning_0",
1728
+ message: "Port pin1 on undefined is missing a trace",
1729
+ source_component_id: "source_component_0",
1730
+ source_port_id: "source_port_0",
1731
+ subcircuit_id: "subcircuit_source_group_0",
1732
+ warning_type: "source_pin_missing_trace_warning"
1733
+ },
1734
+ {
1735
+ type: "source_pin_missing_trace_warning",
1736
+ source_pin_missing_trace_warning_id: "source_pin_missing_trace_warning_1",
1737
+ message: "Port pin2 on undefined is missing a trace",
1738
+ source_component_id: "source_component_0",
1739
+ source_port_id: "source_port_1",
1740
+ subcircuit_id: "subcircuit_source_group_0",
1741
+ warning_type: "source_pin_missing_trace_warning"
1742
+ },
1743
+ {
1744
+ type: "schematic_component",
1745
+ schematic_component_id: "schematic_component_0",
1746
+ center: { x: 0, y: 0 },
1747
+ size: { width: 1.1, height: 0.388910699999999 },
1748
+ source_component_id: "source_component_0",
1749
+ is_box_with_pins: true,
1750
+ symbol_name: "boxresistor_right",
1751
+ symbol_display_value: "40k\u03A9",
1752
+ schematic_group_id: "schematic_group_0"
1753
+ },
1754
+ {
1755
+ type: "schematic_group",
1756
+ schematic_group_id: "schematic_group_0",
1757
+ is_subcircuit: true,
1758
+ subcircuit_id: "subcircuit_source_group_0",
1759
+ name: "unnamed_board1",
1760
+ center: { x: 0, y: 0 },
1761
+ width: 0,
1762
+ height: 0,
1763
+ schematic_component_ids: [],
1764
+ source_group_id: "source_group_0"
1765
+ },
1766
+ {
1767
+ type: "schematic_port",
1768
+ schematic_port_id: "schematic_port_0",
1769
+ schematic_component_id: "schematic_component_0",
1770
+ center: { x: -0.55, y: 0 },
1771
+ source_port_id: "source_port_0",
1772
+ facing_direction: "left",
1773
+ distance_from_component_edge: 0.4,
1774
+ pin_number: 1,
1775
+ display_pin_label: "anode",
1776
+ is_connected: false
1777
+ },
1778
+ {
1779
+ type: "schematic_port",
1780
+ schematic_port_id: "schematic_port_1",
1781
+ schematic_component_id: "schematic_component_0",
1782
+ center: { x: 0.55, y: 0 },
1783
+ source_port_id: "source_port_1",
1784
+ facing_direction: "right",
1785
+ distance_from_component_edge: 0.4,
1786
+ pin_number: 2,
1787
+ display_pin_label: "cathode",
1788
+ is_connected: false
1789
+ },
1790
+ {
1791
+ type: "pcb_component",
1792
+ pcb_component_id: "pcb_component_0",
1793
+ center: { x: 0, y: 0 },
1794
+ width: 1.56,
1795
+ height: 0.64,
1796
+ layer: "top",
1797
+ rotation: 0,
1798
+ source_component_id: "source_component_0",
1799
+ subcircuit_id: "subcircuit_source_group_0",
1800
+ do_not_place: false,
1801
+ obstructs_within_bounds: true
1802
+ },
1803
+ {
1804
+ type: "pcb_board",
1805
+ pcb_board_id: "pcb_board_0",
1806
+ source_board_id: "source_board_0",
1807
+ center: { x: 0, y: 0 },
1808
+ thickness: 1.4,
1809
+ num_layers: 2,
1810
+ width: 10,
1811
+ height: 10,
1812
+ material: "fr4"
1813
+ },
1814
+ {
1815
+ type: "pcb_smtpad",
1816
+ pcb_smtpad_id: "pcb_smtpad_0",
1817
+ pcb_component_id: "pcb_component_0",
1818
+ pcb_port_id: "pcb_port_0",
1819
+ layer: "top",
1820
+ shape: "rect",
1821
+ width: 0.54,
1822
+ height: 0.64,
1823
+ port_hints: ["1", "left"],
1824
+ is_covered_with_solder_mask: false,
1825
+ x: -0.51,
1826
+ y: 0,
1827
+ subcircuit_id: "subcircuit_source_group_0"
1828
+ },
1829
+ {
1830
+ type: "pcb_solder_paste",
1831
+ pcb_solder_paste_id: "pcb_solder_paste_0",
1832
+ layer: "top",
1833
+ shape: "rect",
1834
+ width: 0.378,
1835
+ height: 0.44799999999999995,
1836
+ x: -0.51,
1837
+ y: 0,
1838
+ pcb_component_id: "pcb_component_0",
1839
+ pcb_smtpad_id: "pcb_smtpad_0",
1840
+ subcircuit_id: "subcircuit_source_group_0"
1841
+ },
1842
+ {
1843
+ type: "pcb_smtpad",
1844
+ pcb_smtpad_id: "pcb_smtpad_1",
1845
+ pcb_component_id: "pcb_component_0",
1846
+ pcb_port_id: "pcb_port_1",
1847
+ layer: "top",
1848
+ shape: "rect",
1849
+ width: 0.54,
1850
+ height: 0.64,
1851
+ port_hints: ["2", "right"],
1852
+ is_covered_with_solder_mask: false,
1853
+ x: 0.51,
1854
+ y: 0,
1855
+ subcircuit_id: "subcircuit_source_group_0"
1856
+ },
1857
+ {
1858
+ type: "pcb_solder_paste",
1859
+ pcb_solder_paste_id: "pcb_solder_paste_1",
1860
+ layer: "top",
1861
+ shape: "rect",
1862
+ width: 0.378,
1863
+ height: 0.44799999999999995,
1864
+ x: 0.51,
1865
+ y: 0,
1866
+ pcb_component_id: "pcb_component_0",
1867
+ pcb_smtpad_id: "pcb_smtpad_1",
1868
+ subcircuit_id: "subcircuit_source_group_0"
1869
+ },
1870
+ {
1871
+ type: "pcb_silkscreen_path",
1872
+ pcb_silkscreen_path_id: "pcb_silkscreen_path_0",
1873
+ pcb_component_id: "pcb_component_0",
1874
+ layer: "top",
1875
+ route: [
1876
+ { x: 0.51, y: 0.72 },
1877
+ { x: -0.98, y: 0.72 },
1878
+ { x: -0.98, y: -0.72 },
1879
+ { x: 0.51, y: -0.72 }
1880
+ ],
1881
+ stroke_width: 0.1,
1882
+ subcircuit_id: "subcircuit_source_group_0"
1883
+ },
1884
+ {
1885
+ type: "pcb_silkscreen_text",
1886
+ pcb_silkscreen_text_id: "pcb_silkscreen_text_0",
1887
+ anchor_alignment: "center",
1888
+ anchor_position: { x: 0, y: 1.22 },
1889
+ font: "tscircuit2024",
1890
+ font_size: 0.4,
1891
+ layer: "top",
1892
+ text: "Resistor",
1893
+ ccw_rotation: 0,
1894
+ pcb_component_id: "pcb_component_0",
1895
+ subcircuit_id: "subcircuit_source_group_0"
1896
+ },
1897
+ {
1898
+ type: "pcb_port",
1899
+ pcb_port_id: "pcb_port_0",
1900
+ pcb_component_id: "pcb_component_0",
1901
+ layers: ["top"],
1902
+ subcircuit_id: "subcircuit_source_group_0",
1903
+ x: -0.51,
1904
+ y: 0,
1905
+ source_port_id: "source_port_0"
1906
+ },
1907
+ {
1908
+ type: "pcb_port",
1909
+ pcb_port_id: "pcb_port_1",
1910
+ pcb_component_id: "pcb_component_0",
1911
+ layers: ["top"],
1912
+ subcircuit_id: "subcircuit_source_group_0",
1913
+ x: 0.51,
1914
+ y: 0,
1915
+ source_port_id: "source_port_1"
1916
+ },
1917
+ {
1918
+ type: "cad_component",
1919
+ cad_component_id: "cad_component_0",
1920
+ position: { x: 0, y: 0, z: 0.7 },
1921
+ rotation: { x: 0, y: 0, z: 0 },
1922
+ pcb_component_id: "pcb_component_0",
1923
+ source_component_id: "source_component_0",
1924
+ footprinter_string: "0402"
1925
+ }
1926
+ ]),
1927
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
1928
+ is_text: true
1929
+ });
1666
1930
  db.addPackageFile({
1667
1931
  package_release_id: test2PackageReleaseIdPr1,
1668
1932
  file_path: "index.tsx",
@@ -1708,8 +1972,17 @@ export const DEFAULT_RESISTANCE = 50`,
1708
1972
  content_text: `import { formatResistance, DEFAULT_RESISTANCE } from "./utils"
1709
1973
  import type { ComponentProps } from "./types"
1710
1974
 
1711
- export const TestComponent = ({ name, value = DEFAULT_RESISTANCE }: ComponentProps) => (
1712
- <resistor name={name} resistance={formatResistance(value)} />
1975
+ export const TestComponent = ({
1976
+ name,
1977
+ value = DEFAULT_RESISTANCE,
1978
+ }: ComponentProps) => (
1979
+ <board width="10mm" height="10mm">
1980
+ <resistor
1981
+ footprint="0402"
1982
+ name={name}
1983
+ resistance={formatResistance(value)}
1984
+ />
1985
+ </board>
1713
1986
  )`,
1714
1987
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1715
1988
  is_text: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/fake-snippets",
3
- "version": "0.0.203",
3
+ "version": "0.0.205",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",