@tscircuit/core 0.0.152 → 0.0.153
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.d.ts +62 -59
- package/dist/index.js +21 -2
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -730,6 +730,7 @@ declare class NormalComponent<ZodProps extends ZodType = any, PortNames extends
|
|
|
730
730
|
* You can override this method to do more complicated things.
|
|
731
731
|
*/
|
|
732
732
|
doInitialSchematicComponentRender(): void;
|
|
733
|
+
_getSchematicSymbolDisplayValue(): string | undefined;
|
|
733
734
|
_doInitialSchematicComponentRenderWithSymbol(): void;
|
|
734
735
|
_doInitialSchematicComponentRenderWithSchematicBoxDimensions(): void;
|
|
735
736
|
doInitialPcbComponentRender(): void;
|
|
@@ -1343,6 +1344,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePo
|
|
|
1343
1344
|
sourceFtype: "simple_capacitor";
|
|
1344
1345
|
};
|
|
1345
1346
|
initPorts(): void;
|
|
1347
|
+
_getSchematicSymbolDisplayValue(): string | undefined;
|
|
1346
1348
|
doInitialCreateNetsFromProps(): void;
|
|
1347
1349
|
doInitialCreateTracesFromProps(): void;
|
|
1348
1350
|
doInitialSourceRender(): void;
|
|
@@ -1610,7 +1612,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1610
1612
|
symbolName: zod.ZodOptional<zod.ZodString>;
|
|
1611
1613
|
}>, {
|
|
1612
1614
|
manufacturerPartNumber: zod.ZodOptional<zod.ZodString>;
|
|
1613
|
-
pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many"
|
|
1615
|
+
pinLabels: zod.ZodOptional<zod.ZodRecord<zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>, zod.ZodUnion<[zod.ZodString, zod.ZodReadonly<zod.ZodArray<zod.ZodString, "many">>]>>>;
|
|
1614
1616
|
schPortArrangement: zod.ZodOptional<zod.ZodObject<{
|
|
1615
1617
|
leftSize: zod.ZodOptional<zod.ZodNumber>;
|
|
1616
1618
|
topSize: zod.ZodOptional<zod.ZodNumber>;
|
|
@@ -1621,44 +1623,44 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1621
1623
|
topPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
1622
1624
|
bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
1623
1625
|
leftSide: zod.ZodOptional<zod.ZodObject<{
|
|
1624
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
1626
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
1625
1627
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
1626
1628
|
}, "strip", zod.ZodTypeAny, {
|
|
1627
1629
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1628
|
-
pins: number[];
|
|
1630
|
+
pins: string[] | number[];
|
|
1629
1631
|
}, {
|
|
1630
1632
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1631
|
-
pins: number[];
|
|
1633
|
+
pins: string[] | number[];
|
|
1632
1634
|
}>>;
|
|
1633
1635
|
rightSide: zod.ZodOptional<zod.ZodObject<{
|
|
1634
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
1636
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
1635
1637
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
1636
1638
|
}, "strip", zod.ZodTypeAny, {
|
|
1637
1639
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1638
|
-
pins: number[];
|
|
1640
|
+
pins: string[] | number[];
|
|
1639
1641
|
}, {
|
|
1640
1642
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1641
|
-
pins: number[];
|
|
1643
|
+
pins: string[] | number[];
|
|
1642
1644
|
}>>;
|
|
1643
1645
|
topSide: zod.ZodOptional<zod.ZodObject<{
|
|
1644
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
1646
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
1645
1647
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
1646
1648
|
}, "strip", zod.ZodTypeAny, {
|
|
1647
1649
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1648
|
-
pins: number[];
|
|
1650
|
+
pins: string[] | number[];
|
|
1649
1651
|
}, {
|
|
1650
1652
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1651
|
-
pins: number[];
|
|
1653
|
+
pins: string[] | number[];
|
|
1652
1654
|
}>>;
|
|
1653
1655
|
bottomSide: zod.ZodOptional<zod.ZodObject<{
|
|
1654
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
1656
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
1655
1657
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
1656
1658
|
}, "strip", zod.ZodTypeAny, {
|
|
1657
1659
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1658
|
-
pins: number[];
|
|
1660
|
+
pins: string[] | number[];
|
|
1659
1661
|
}, {
|
|
1660
1662
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1661
|
-
pins: number[];
|
|
1663
|
+
pins: string[] | number[];
|
|
1662
1664
|
}>>;
|
|
1663
1665
|
}, "strip", zod.ZodTypeAny, {
|
|
1664
1666
|
leftSize?: number | undefined;
|
|
@@ -1667,19 +1669,19 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1667
1669
|
bottomSize?: number | undefined;
|
|
1668
1670
|
leftSide?: {
|
|
1669
1671
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1670
|
-
pins: number[];
|
|
1672
|
+
pins: string[] | number[];
|
|
1671
1673
|
} | undefined;
|
|
1672
1674
|
topSide?: {
|
|
1673
1675
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1674
|
-
pins: number[];
|
|
1676
|
+
pins: string[] | number[];
|
|
1675
1677
|
} | undefined;
|
|
1676
1678
|
rightSide?: {
|
|
1677
1679
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1678
|
-
pins: number[];
|
|
1680
|
+
pins: string[] | number[];
|
|
1679
1681
|
} | undefined;
|
|
1680
1682
|
bottomSide?: {
|
|
1681
1683
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1682
|
-
pins: number[];
|
|
1684
|
+
pins: string[] | number[];
|
|
1683
1685
|
} | undefined;
|
|
1684
1686
|
leftPinCount?: number | undefined;
|
|
1685
1687
|
rightPinCount?: number | undefined;
|
|
@@ -1692,19 +1694,19 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1692
1694
|
bottomSize?: number | undefined;
|
|
1693
1695
|
leftSide?: {
|
|
1694
1696
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1695
|
-
pins: number[];
|
|
1697
|
+
pins: string[] | number[];
|
|
1696
1698
|
} | undefined;
|
|
1697
1699
|
topSide?: {
|
|
1698
1700
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1699
|
-
pins: number[];
|
|
1701
|
+
pins: string[] | number[];
|
|
1700
1702
|
} | undefined;
|
|
1701
1703
|
rightSide?: {
|
|
1702
1704
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1703
|
-
pins: number[];
|
|
1705
|
+
pins: string[] | number[];
|
|
1704
1706
|
} | undefined;
|
|
1705
1707
|
bottomSide?: {
|
|
1706
1708
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1707
|
-
pins: number[];
|
|
1709
|
+
pins: string[] | number[];
|
|
1708
1710
|
} | undefined;
|
|
1709
1711
|
leftPinCount?: number | undefined;
|
|
1710
1712
|
rightPinCount?: number | undefined;
|
|
@@ -1798,7 +1800,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1798
1800
|
children?: any;
|
|
1799
1801
|
symbolName?: string | undefined;
|
|
1800
1802
|
manufacturerPartNumber?: string | undefined;
|
|
1801
|
-
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
1803
|
+
pinLabels?: Record<string | number, string | readonly string[]> | undefined;
|
|
1802
1804
|
schPortArrangement?: {
|
|
1803
1805
|
leftSize?: number | undefined;
|
|
1804
1806
|
topSize?: number | undefined;
|
|
@@ -1806,19 +1808,19 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1806
1808
|
bottomSize?: number | undefined;
|
|
1807
1809
|
leftSide?: {
|
|
1808
1810
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1809
|
-
pins: number[];
|
|
1811
|
+
pins: string[] | number[];
|
|
1810
1812
|
} | undefined;
|
|
1811
1813
|
topSide?: {
|
|
1812
1814
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1813
|
-
pins: number[];
|
|
1815
|
+
pins: string[] | number[];
|
|
1814
1816
|
} | undefined;
|
|
1815
1817
|
rightSide?: {
|
|
1816
1818
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1817
|
-
pins: number[];
|
|
1819
|
+
pins: string[] | number[];
|
|
1818
1820
|
} | undefined;
|
|
1819
1821
|
bottomSide?: {
|
|
1820
1822
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1821
|
-
pins: number[];
|
|
1823
|
+
pins: string[] | number[];
|
|
1822
1824
|
} | undefined;
|
|
1823
1825
|
leftPinCount?: number | undefined;
|
|
1824
1826
|
rightPinCount?: number | undefined;
|
|
@@ -1904,7 +1906,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1904
1906
|
children?: any;
|
|
1905
1907
|
symbolName?: string | undefined;
|
|
1906
1908
|
manufacturerPartNumber?: string | undefined;
|
|
1907
|
-
pinLabels?: Record<string | number, string | string[]> | undefined;
|
|
1909
|
+
pinLabels?: Record<string | number, string | readonly string[]> | undefined;
|
|
1908
1910
|
schPortArrangement?: {
|
|
1909
1911
|
leftSize?: number | undefined;
|
|
1910
1912
|
topSize?: number | undefined;
|
|
@@ -1912,19 +1914,19 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
|
|
|
1912
1914
|
bottomSize?: number | undefined;
|
|
1913
1915
|
leftSide?: {
|
|
1914
1916
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1915
|
-
pins: number[];
|
|
1917
|
+
pins: string[] | number[];
|
|
1916
1918
|
} | undefined;
|
|
1917
1919
|
topSide?: {
|
|
1918
1920
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1919
|
-
pins: number[];
|
|
1921
|
+
pins: string[] | number[];
|
|
1920
1922
|
} | undefined;
|
|
1921
1923
|
rightSide?: {
|
|
1922
1924
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1923
|
-
pins: number[];
|
|
1925
|
+
pins: string[] | number[];
|
|
1924
1926
|
} | undefined;
|
|
1925
1927
|
bottomSide?: {
|
|
1926
1928
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
1927
|
-
pins: number[];
|
|
1929
|
+
pins: string[] | number[];
|
|
1928
1930
|
} | undefined;
|
|
1929
1931
|
leftPinCount?: number | undefined;
|
|
1930
1932
|
rightPinCount?: number | undefined;
|
|
@@ -2646,44 +2648,44 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2646
2648
|
topPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
2647
2649
|
bottomPinCount: zod.ZodOptional<zod.ZodNumber>;
|
|
2648
2650
|
leftSide: zod.ZodOptional<zod.ZodObject<{
|
|
2649
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
2651
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
2650
2652
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2651
2653
|
}, "strip", zod.ZodTypeAny, {
|
|
2652
2654
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2653
|
-
pins: number[];
|
|
2655
|
+
pins: string[] | number[];
|
|
2654
2656
|
}, {
|
|
2655
2657
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2656
|
-
pins: number[];
|
|
2658
|
+
pins: string[] | number[];
|
|
2657
2659
|
}>>;
|
|
2658
2660
|
rightSide: zod.ZodOptional<zod.ZodObject<{
|
|
2659
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
2661
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
2660
2662
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2661
2663
|
}, "strip", zod.ZodTypeAny, {
|
|
2662
2664
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2663
|
-
pins: number[];
|
|
2665
|
+
pins: string[] | number[];
|
|
2664
2666
|
}, {
|
|
2665
2667
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2666
|
-
pins: number[];
|
|
2668
|
+
pins: string[] | number[];
|
|
2667
2669
|
}>>;
|
|
2668
2670
|
topSide: zod.ZodOptional<zod.ZodObject<{
|
|
2669
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
2671
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
2670
2672
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2671
2673
|
}, "strip", zod.ZodTypeAny, {
|
|
2672
2674
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2673
|
-
pins: number[];
|
|
2675
|
+
pins: string[] | number[];
|
|
2674
2676
|
}, {
|
|
2675
2677
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2676
|
-
pins: number[];
|
|
2678
|
+
pins: string[] | number[];
|
|
2677
2679
|
}>>;
|
|
2678
2680
|
bottomSide: zod.ZodOptional<zod.ZodObject<{
|
|
2679
|
-
pins: zod.ZodArray<zod.ZodNumber, "many">;
|
|
2681
|
+
pins: zod.ZodUnion<[zod.ZodArray<zod.ZodNumber, "many">, zod.ZodArray<zod.ZodString, "many">]>;
|
|
2680
2682
|
direction: zod.ZodUnion<[zod.ZodLiteral<"top-to-bottom">, zod.ZodLiteral<"left-to-right">, zod.ZodLiteral<"bottom-to-top">, zod.ZodLiteral<"right-to-left">]>;
|
|
2681
2683
|
}, "strip", zod.ZodTypeAny, {
|
|
2682
2684
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2683
|
-
pins: number[];
|
|
2685
|
+
pins: string[] | number[];
|
|
2684
2686
|
}, {
|
|
2685
2687
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2686
|
-
pins: number[];
|
|
2688
|
+
pins: string[] | number[];
|
|
2687
2689
|
}>>;
|
|
2688
2690
|
}, "strip", zod.ZodTypeAny, {
|
|
2689
2691
|
leftSize?: number | undefined;
|
|
@@ -2692,19 +2694,19 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2692
2694
|
bottomSize?: number | undefined;
|
|
2693
2695
|
leftSide?: {
|
|
2694
2696
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2695
|
-
pins: number[];
|
|
2697
|
+
pins: string[] | number[];
|
|
2696
2698
|
} | undefined;
|
|
2697
2699
|
topSide?: {
|
|
2698
2700
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2699
|
-
pins: number[];
|
|
2701
|
+
pins: string[] | number[];
|
|
2700
2702
|
} | undefined;
|
|
2701
2703
|
rightSide?: {
|
|
2702
2704
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2703
|
-
pins: number[];
|
|
2705
|
+
pins: string[] | number[];
|
|
2704
2706
|
} | undefined;
|
|
2705
2707
|
bottomSide?: {
|
|
2706
2708
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2707
|
-
pins: number[];
|
|
2709
|
+
pins: string[] | number[];
|
|
2708
2710
|
} | undefined;
|
|
2709
2711
|
leftPinCount?: number | undefined;
|
|
2710
2712
|
rightPinCount?: number | undefined;
|
|
@@ -2717,19 +2719,19 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2717
2719
|
bottomSize?: number | undefined;
|
|
2718
2720
|
leftSide?: {
|
|
2719
2721
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2720
|
-
pins: number[];
|
|
2722
|
+
pins: string[] | number[];
|
|
2721
2723
|
} | undefined;
|
|
2722
2724
|
topSide?: {
|
|
2723
2725
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2724
|
-
pins: number[];
|
|
2726
|
+
pins: string[] | number[];
|
|
2725
2727
|
} | undefined;
|
|
2726
2728
|
rightSide?: {
|
|
2727
2729
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2728
|
-
pins: number[];
|
|
2730
|
+
pins: string[] | number[];
|
|
2729
2731
|
} | undefined;
|
|
2730
2732
|
bottomSide?: {
|
|
2731
2733
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2732
|
-
pins: number[];
|
|
2734
|
+
pins: string[] | number[];
|
|
2733
2735
|
} | undefined;
|
|
2734
2736
|
leftPinCount?: number | undefined;
|
|
2735
2737
|
rightPinCount?: number | undefined;
|
|
@@ -2812,19 +2814,19 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2812
2814
|
bottomSize?: number | undefined;
|
|
2813
2815
|
leftSide?: {
|
|
2814
2816
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2815
|
-
pins: number[];
|
|
2817
|
+
pins: string[] | number[];
|
|
2816
2818
|
} | undefined;
|
|
2817
2819
|
topSide?: {
|
|
2818
2820
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2819
|
-
pins: number[];
|
|
2821
|
+
pins: string[] | number[];
|
|
2820
2822
|
} | undefined;
|
|
2821
2823
|
rightSide?: {
|
|
2822
2824
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2823
|
-
pins: number[];
|
|
2825
|
+
pins: string[] | number[];
|
|
2824
2826
|
} | undefined;
|
|
2825
2827
|
bottomSide?: {
|
|
2826
2828
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2827
|
-
pins: number[];
|
|
2829
|
+
pins: string[] | number[];
|
|
2828
2830
|
} | undefined;
|
|
2829
2831
|
leftPinCount?: number | undefined;
|
|
2830
2832
|
rightPinCount?: number | undefined;
|
|
@@ -2919,19 +2921,19 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
2919
2921
|
bottomSize?: number | undefined;
|
|
2920
2922
|
leftSide?: {
|
|
2921
2923
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2922
|
-
pins: number[];
|
|
2924
|
+
pins: string[] | number[];
|
|
2923
2925
|
} | undefined;
|
|
2924
2926
|
topSide?: {
|
|
2925
2927
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2926
|
-
pins: number[];
|
|
2928
|
+
pins: string[] | number[];
|
|
2927
2929
|
} | undefined;
|
|
2928
2930
|
rightSide?: {
|
|
2929
2931
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2930
|
-
pins: number[];
|
|
2932
|
+
pins: string[] | number[];
|
|
2931
2933
|
} | undefined;
|
|
2932
2934
|
bottomSide?: {
|
|
2933
2935
|
direction: "top-to-bottom" | "left-to-right" | "bottom-to-top" | "right-to-left";
|
|
2934
|
-
pins: number[];
|
|
2936
|
+
pins: string[] | number[];
|
|
2935
2937
|
} | undefined;
|
|
2936
2938
|
leftPinCount?: number | undefined;
|
|
2937
2939
|
rightPinCount?: number | undefined;
|
|
@@ -4191,6 +4193,7 @@ declare class Resistor extends NormalComponent<typeof resistorProps, PassivePort
|
|
|
4191
4193
|
sourceFtype: Ftype;
|
|
4192
4194
|
};
|
|
4193
4195
|
initPorts(): void;
|
|
4196
|
+
_getSchematicSymbolDisplayValue(): string | undefined;
|
|
4194
4197
|
doInitialCreateNetsFromProps(): void;
|
|
4195
4198
|
doInitialCreateTracesFromProps(): void;
|
|
4196
4199
|
doInitialSourceRender(): void;
|
package/dist/index.js
CHANGED
|
@@ -1833,6 +1833,12 @@ var Port = class extends PrimitiveComponent {
|
|
|
1833
1833
|
});
|
|
1834
1834
|
}
|
|
1835
1835
|
this.facingDirection = getRelativeDirection(containerCenter, portCenter);
|
|
1836
|
+
const sourcePort = db.source_port.get(this.source_port_id);
|
|
1837
|
+
let bestDisplayPinLabel = void 0;
|
|
1838
|
+
for (const portHint of sourcePort?.port_hints ?? []) {
|
|
1839
|
+
if (portHint.match(/^(pin)?\d+$/)) continue;
|
|
1840
|
+
bestDisplayPinLabel = portHint;
|
|
1841
|
+
}
|
|
1836
1842
|
const schematic_port = db.schematic_port.insert({
|
|
1837
1843
|
schematic_component_id: this.parent?.schematic_component_id,
|
|
1838
1844
|
center: portCenter,
|
|
@@ -1841,7 +1847,8 @@ var Port = class extends PrimitiveComponent {
|
|
|
1841
1847
|
distance_from_component_edge: 0.4,
|
|
1842
1848
|
side_of_component: localPortInfo?.side,
|
|
1843
1849
|
pin_number: props.pinNumber,
|
|
1844
|
-
true_ccw_index: localPortInfo?.trueIndex
|
|
1850
|
+
true_ccw_index: localPortInfo?.trueIndex,
|
|
1851
|
+
display_pin_label: bestDisplayPinLabel
|
|
1845
1852
|
});
|
|
1846
1853
|
this.schematic_port_id = schematic_port.schematic_port_id;
|
|
1847
1854
|
}
|
|
@@ -2511,6 +2518,9 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2511
2518
|
return this._doInitialSchematicComponentRenderWithSchematicBoxDimensions();
|
|
2512
2519
|
}
|
|
2513
2520
|
}
|
|
2521
|
+
_getSchematicSymbolDisplayValue() {
|
|
2522
|
+
return void 0;
|
|
2523
|
+
}
|
|
2514
2524
|
_doInitialSchematicComponentRenderWithSymbol() {
|
|
2515
2525
|
const { db } = this.root;
|
|
2516
2526
|
const base_symbol_name = this.config.schematicSymbolName;
|
|
@@ -2535,7 +2545,8 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2535
2545
|
rotation: this.props.schRotation ?? 0,
|
|
2536
2546
|
size: symbol.size,
|
|
2537
2547
|
source_component_id: this.source_component_id,
|
|
2538
|
-
symbol_name
|
|
2548
|
+
symbol_name,
|
|
2549
|
+
symbol_display_value: this._getSchematicSymbolDisplayValue()
|
|
2539
2550
|
});
|
|
2540
2551
|
this.schematic_component_id = schematic_component2.schematic_component_id;
|
|
2541
2552
|
}
|
|
@@ -3863,6 +3874,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
3863
3874
|
};
|
|
3864
3875
|
|
|
3865
3876
|
// lib/components/normal-components/Capacitor.ts
|
|
3877
|
+
import { formatSiUnit } from "format-si-unit";
|
|
3866
3878
|
var Capacitor = class extends NormalComponent {
|
|
3867
3879
|
// @ts-ignore (cause the symbolName is string and not fixed)
|
|
3868
3880
|
get config() {
|
|
@@ -3889,6 +3901,9 @@ var Capacitor = class extends NormalComponent {
|
|
|
3889
3901
|
})
|
|
3890
3902
|
);
|
|
3891
3903
|
}
|
|
3904
|
+
_getSchematicSymbolDisplayValue() {
|
|
3905
|
+
return `${formatSiUnit(this._parsedProps.capacitance)}F`;
|
|
3906
|
+
}
|
|
3892
3907
|
doInitialCreateNetsFromProps() {
|
|
3893
3908
|
this._createNetsFromProps([
|
|
3894
3909
|
this.props.decouplingFor,
|
|
@@ -4102,6 +4117,7 @@ var PowerSource = class extends NormalComponent {
|
|
|
4102
4117
|
|
|
4103
4118
|
// lib/components/normal-components/Resistor.ts
|
|
4104
4119
|
import { resistorProps } from "@tscircuit/props";
|
|
4120
|
+
import { formatSiUnit as formatSiUnit2 } from "format-si-unit";
|
|
4105
4121
|
var Resistor = class extends NormalComponent {
|
|
4106
4122
|
get config() {
|
|
4107
4123
|
return {
|
|
@@ -4127,6 +4143,9 @@ var Resistor = class extends NormalComponent {
|
|
|
4127
4143
|
})
|
|
4128
4144
|
);
|
|
4129
4145
|
}
|
|
4146
|
+
_getSchematicSymbolDisplayValue() {
|
|
4147
|
+
return `${formatSiUnit2(this._parsedProps.resistance)}\u03A9`;
|
|
4148
|
+
}
|
|
4130
4149
|
doInitialCreateNetsFromProps() {
|
|
4131
4150
|
this._createNetsFromProps([this.props.pullupFor, this.props.pullupTo]);
|
|
4132
4151
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.153",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
"@tscircuit/footprinter": "^0.0.77",
|
|
41
41
|
"@tscircuit/infgrid-ijump-astar": "^0.0.24",
|
|
42
42
|
"@tscircuit/math-utils": "^0.0.4",
|
|
43
|
-
"@tscircuit/props": "^0.0.
|
|
43
|
+
"@tscircuit/props": "^0.0.86",
|
|
44
44
|
"@tscircuit/schematic-autolayout": "^0.0.5",
|
|
45
45
|
"@tscircuit/soup-util": "^0.0.33",
|
|
46
|
-
"circuit-json": "^0.0.
|
|
46
|
+
"circuit-json": "^0.0.96",
|
|
47
47
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
48
|
-
"circuit-to-svg": "^0.0.
|
|
48
|
+
"circuit-to-svg": "^0.0.62",
|
|
49
|
+
"format-si-unit": "^0.0.2",
|
|
49
50
|
"nanoid": "^5.0.7",
|
|
50
51
|
"performance-now": "^2.1.0",
|
|
51
52
|
"react": "^18.3.1",
|