@tscircuit/props 0.0.369 → 0.0.371
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 +21 -5
- package/dist/index.d.ts +843 -17
- package/dist/index.js +79 -9
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +35 -0
- package/lib/components/cadmodel.ts +4 -0
- package/lib/components/courtyard-outline.ts +7 -1
- package/lib/components/fabrication-note-dimension.ts +11 -2
- package/lib/components/fabrication-note-path.ts +7 -1
- package/lib/components/group.ts +1 -1
- package/lib/components/pcb-note-dimension.ts +11 -2
- package/lib/components/pcb-note-line.ts +11 -2
- package/lib/components/pcb-note-path.ts +11 -2
- package/lib/components/silkscreen-line.ts +7 -1
- package/lib/components/silkscreen-path.ts +7 -1
- package/lib/platformConfig.ts +7 -0
- package/lib/projectConfig.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112,8 +112,16 @@ var symbolProp = z7.custom((v) => true);
|
|
|
112
112
|
var pcbLayoutProps = z8.object({
|
|
113
113
|
pcbX: distance3.optional(),
|
|
114
114
|
pcbY: distance3.optional(),
|
|
115
|
+
pcbOffsetX: distance3.optional(),
|
|
116
|
+
pcbOffsetY: distance3.optional(),
|
|
115
117
|
pcbRotation: rotation.optional(),
|
|
116
118
|
pcbPositionAnchor: z8.string().optional(),
|
|
119
|
+
pcbPositionMode: z8.enum([
|
|
120
|
+
"relative_to_group_anchor",
|
|
121
|
+
"auto",
|
|
122
|
+
"relative_to_board_anchor",
|
|
123
|
+
"relative_to_component_anchor"
|
|
124
|
+
]).optional(),
|
|
117
125
|
layer: layer_ref.optional(),
|
|
118
126
|
pcbMarginTop: distance3.optional(),
|
|
119
127
|
pcbMarginRight: distance3.optional(),
|
|
@@ -128,8 +136,16 @@ expectTypesMatch(true);
|
|
|
128
136
|
var commonLayoutProps = z8.object({
|
|
129
137
|
pcbX: distance3.optional(),
|
|
130
138
|
pcbY: distance3.optional(),
|
|
139
|
+
pcbOffsetX: distance3.optional(),
|
|
140
|
+
pcbOffsetY: distance3.optional(),
|
|
131
141
|
pcbRotation: rotation.optional(),
|
|
132
142
|
pcbPositionAnchor: z8.string().optional(),
|
|
143
|
+
pcbPositionMode: z8.enum([
|
|
144
|
+
"relative_to_group_anchor",
|
|
145
|
+
"auto",
|
|
146
|
+
"relative_to_board_anchor",
|
|
147
|
+
"relative_to_component_anchor"
|
|
148
|
+
]).optional(),
|
|
133
149
|
pcbMarginTop: distance3.optional(),
|
|
134
150
|
pcbMarginRight: distance3.optional(),
|
|
135
151
|
pcbMarginBottom: distance3.optional(),
|
|
@@ -1548,7 +1564,13 @@ var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend
|
|
|
1548
1564
|
// lib/components/fabrication-note-path.ts
|
|
1549
1565
|
import { length as length4, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
1550
1566
|
import { z as z68 } from "zod";
|
|
1551
|
-
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
1567
|
+
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
1568
|
+
pcbX: true,
|
|
1569
|
+
pcbY: true,
|
|
1570
|
+
pcbOffsetX: true,
|
|
1571
|
+
pcbOffsetY: true,
|
|
1572
|
+
pcbRotation: true
|
|
1573
|
+
}).extend({
|
|
1552
1574
|
route: z68.array(route_hint_point3),
|
|
1553
1575
|
strokeWidth: length4.optional(),
|
|
1554
1576
|
color: z68.string().optional()
|
|
@@ -1558,7 +1580,13 @@ var fabricationNotePathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcb
|
|
|
1558
1580
|
import { distance as distance16, length as length5 } from "circuit-json";
|
|
1559
1581
|
import { z as z69 } from "zod";
|
|
1560
1582
|
var dimensionTarget = z69.union([z69.string(), point]);
|
|
1561
|
-
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
1583
|
+
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
1584
|
+
pcbX: true,
|
|
1585
|
+
pcbY: true,
|
|
1586
|
+
pcbOffsetX: true,
|
|
1587
|
+
pcbOffsetY: true,
|
|
1588
|
+
pcbRotation: true
|
|
1589
|
+
}).extend({
|
|
1562
1590
|
from: dimensionTarget,
|
|
1563
1591
|
to: dimensionTarget,
|
|
1564
1592
|
text: z69.string().optional(),
|
|
@@ -1646,7 +1674,13 @@ var courtyardRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
1646
1674
|
// lib/components/courtyard-outline.ts
|
|
1647
1675
|
import { length as length6 } from "circuit-json";
|
|
1648
1676
|
import { z as z76 } from "zod";
|
|
1649
|
-
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
1677
|
+
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
1678
|
+
pcbX: true,
|
|
1679
|
+
pcbY: true,
|
|
1680
|
+
pcbOffsetX: true,
|
|
1681
|
+
pcbOffsetY: true,
|
|
1682
|
+
pcbRotation: true
|
|
1683
|
+
}).extend({
|
|
1650
1684
|
outline: z76.array(point),
|
|
1651
1685
|
strokeWidth: length6.optional(),
|
|
1652
1686
|
isClosed: z76.boolean().optional(),
|
|
@@ -1680,6 +1714,8 @@ import { z as z79 } from "zod";
|
|
|
1680
1714
|
var pcbPosition = z79.object({
|
|
1681
1715
|
pcbX: distance.optional(),
|
|
1682
1716
|
pcbY: distance.optional(),
|
|
1717
|
+
pcbOffsetX: distance.optional(),
|
|
1718
|
+
pcbOffsetY: distance.optional(),
|
|
1683
1719
|
pcbZ: distance.optional()
|
|
1684
1720
|
});
|
|
1685
1721
|
var cadModelBaseWithUrl = cadModelBase.extend({
|
|
@@ -1914,14 +1950,26 @@ var silkscreenTextProps = pcbLayoutProps.extend({
|
|
|
1914
1950
|
// lib/components/silkscreen-path.ts
|
|
1915
1951
|
import { length as length8, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
1916
1952
|
import { z as z94 } from "zod";
|
|
1917
|
-
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
1953
|
+
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
1954
|
+
pcbX: true,
|
|
1955
|
+
pcbY: true,
|
|
1956
|
+
pcbOffsetX: true,
|
|
1957
|
+
pcbOffsetY: true,
|
|
1958
|
+
pcbRotation: true
|
|
1959
|
+
}).extend({
|
|
1918
1960
|
route: z94.array(route_hint_point5),
|
|
1919
1961
|
strokeWidth: length8.optional()
|
|
1920
1962
|
});
|
|
1921
1963
|
|
|
1922
1964
|
// lib/components/silkscreen-line.ts
|
|
1923
1965
|
import { distance as distance31 } from "circuit-json";
|
|
1924
|
-
var silkscreenLineProps = pcbLayoutProps.omit({
|
|
1966
|
+
var silkscreenLineProps = pcbLayoutProps.omit({
|
|
1967
|
+
pcbX: true,
|
|
1968
|
+
pcbY: true,
|
|
1969
|
+
pcbOffsetX: true,
|
|
1970
|
+
pcbOffsetY: true,
|
|
1971
|
+
pcbRotation: true
|
|
1972
|
+
}).extend({
|
|
1925
1973
|
strokeWidth: distance31,
|
|
1926
1974
|
x1: distance31,
|
|
1927
1975
|
y1: distance31,
|
|
@@ -2011,7 +2059,13 @@ import {
|
|
|
2011
2059
|
route_hint_point as route_hint_point7
|
|
2012
2060
|
} from "circuit-json";
|
|
2013
2061
|
import { z as z101 } from "zod";
|
|
2014
|
-
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
2062
|
+
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
2063
|
+
pcbX: true,
|
|
2064
|
+
pcbY: true,
|
|
2065
|
+
pcbOffsetX: true,
|
|
2066
|
+
pcbOffsetY: true,
|
|
2067
|
+
pcbRotation: true
|
|
2068
|
+
}).extend({
|
|
2015
2069
|
route: z101.array(route_hint_point7),
|
|
2016
2070
|
strokeWidth: length10.optional(),
|
|
2017
2071
|
color: z101.string().optional()
|
|
@@ -2021,7 +2075,13 @@ expectTypesMatch(true);
|
|
|
2021
2075
|
// lib/components/pcb-note-line.ts
|
|
2022
2076
|
import { distance as distance36 } from "circuit-json";
|
|
2023
2077
|
import { z as z102 } from "zod";
|
|
2024
|
-
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
2078
|
+
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
2079
|
+
pcbX: true,
|
|
2080
|
+
pcbY: true,
|
|
2081
|
+
pcbOffsetX: true,
|
|
2082
|
+
pcbOffsetY: true,
|
|
2083
|
+
pcbRotation: true
|
|
2084
|
+
}).extend({
|
|
2025
2085
|
x1: distance36,
|
|
2026
2086
|
y1: distance36,
|
|
2027
2087
|
x2: distance36,
|
|
@@ -2036,7 +2096,13 @@ expectTypesMatch(true);
|
|
|
2036
2096
|
import { distance as distance37, length as length11 } from "circuit-json";
|
|
2037
2097
|
import { z as z103 } from "zod";
|
|
2038
2098
|
var dimensionTarget2 = z103.union([z103.string(), point]);
|
|
2039
|
-
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
2099
|
+
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
2100
|
+
pcbX: true,
|
|
2101
|
+
pcbY: true,
|
|
2102
|
+
pcbOffsetX: true,
|
|
2103
|
+
pcbOffsetY: true,
|
|
2104
|
+
pcbRotation: true
|
|
2105
|
+
}).extend({
|
|
2040
2106
|
from: dimensionTarget2,
|
|
2041
2107
|
to: dimensionTarget2,
|
|
2042
2108
|
text: z103.string().optional(),
|
|
@@ -2093,6 +2159,9 @@ var platformConfig = z104.object({
|
|
|
2093
2159
|
includeBoardFiles: z104.array(z104.string()).describe(
|
|
2094
2160
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
2095
2161
|
).optional(),
|
|
2162
|
+
snapshotsDir: z104.string().describe(
|
|
2163
|
+
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
2164
|
+
).optional(),
|
|
2096
2165
|
localCacheEngine: z104.any().optional(),
|
|
2097
2166
|
pcbDisabled: z104.boolean().optional(),
|
|
2098
2167
|
schematicDisabled: z104.boolean().optional(),
|
|
@@ -2121,7 +2190,8 @@ var projectConfig = platformConfigObject.pick({
|
|
|
2121
2190
|
version: true,
|
|
2122
2191
|
url: true,
|
|
2123
2192
|
printBoardInformationToSilkscreen: true,
|
|
2124
|
-
includeBoardFiles: true
|
|
2193
|
+
includeBoardFiles: true,
|
|
2194
|
+
snapshotsDir: true
|
|
2125
2195
|
});
|
|
2126
2196
|
expectTypesMatch(true);
|
|
2127
2197
|
export {
|