@tscircuit/props 0.0.364 → 0.0.366
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 +7 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/lib/components/board.ts +3 -0
- package/lib/components/switch.ts +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,6 +231,8 @@ export interface BoardProps
|
|
|
231
231
|
topSilkscreenColor?: BoardColor;
|
|
232
232
|
/** Color of the bottom silkscreen */
|
|
233
233
|
bottomSilkscreenColor?: BoardColor;
|
|
234
|
+
/** Whether the board should be assembled on both sides */
|
|
235
|
+
doubleSidedAssembly?: boolean;
|
|
234
236
|
}
|
|
235
237
|
```
|
|
236
238
|
|
|
@@ -1365,6 +1367,11 @@ export interface SwitchProps extends CommonComponentProps {
|
|
|
1365
1367
|
spst?: boolean;
|
|
1366
1368
|
dpst?: boolean;
|
|
1367
1369
|
dpdt?: boolean;
|
|
1370
|
+
simSwitchFrequency?: number | string;
|
|
1371
|
+
simCloseAt?: number | string;
|
|
1372
|
+
simOpenAt?: number | string;
|
|
1373
|
+
simStartClosed?: boolean;
|
|
1374
|
+
simStartOpen?: boolean;
|
|
1368
1375
|
connections?: Connections<string>;
|
|
1369
1376
|
}
|
|
1370
1377
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -10886,6 +10886,8 @@ interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit" | "connecti
|
|
|
10886
10886
|
topSilkscreenColor?: BoardColor;
|
|
10887
10887
|
/** Color of the bottom silkscreen */
|
|
10888
10888
|
bottomSilkscreenColor?: BoardColor;
|
|
10889
|
+
/** Whether the board should be assembled on both sides */
|
|
10890
|
+
doubleSidedAssembly?: boolean;
|
|
10889
10891
|
}
|
|
10890
10892
|
declare const boardProps: z.ZodObject<Omit<{
|
|
10891
10893
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -11580,9 +11582,11 @@ declare const boardProps: z.ZodObject<Omit<{
|
|
|
11580
11582
|
silkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11581
11583
|
topSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11582
11584
|
bottomSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11585
|
+
doubleSidedAssembly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
11583
11586
|
}, "strip", z.ZodTypeAny, {
|
|
11584
11587
|
material: "fr4" | "fr1";
|
|
11585
11588
|
layers: 2 | 4;
|
|
11589
|
+
doubleSidedAssembly: boolean;
|
|
11586
11590
|
symbol?: SymbolProp | undefined;
|
|
11587
11591
|
key?: any;
|
|
11588
11592
|
pcbX?: number | undefined;
|
|
@@ -12168,6 +12172,7 @@ declare const boardProps: z.ZodObject<Omit<{
|
|
|
12168
12172
|
silkscreenColor?: BoardColor | undefined;
|
|
12169
12173
|
topSilkscreenColor?: BoardColor | undefined;
|
|
12170
12174
|
bottomSilkscreenColor?: BoardColor | undefined;
|
|
12175
|
+
doubleSidedAssembly?: boolean | undefined;
|
|
12171
12176
|
}>;
|
|
12172
12177
|
|
|
12173
12178
|
interface BreakoutProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
@@ -28450,6 +28455,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
|
|
|
28450
28455
|
silkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28451
28456
|
topSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28452
28457
|
bottomSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28458
|
+
doubleSidedAssembly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28453
28459
|
} & {
|
|
28454
28460
|
leftPinCount: z.ZodOptional<z.ZodNumber>;
|
|
28455
28461
|
rightPinCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -28464,6 +28470,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
|
|
|
28464
28470
|
}, "strip", z.ZodTypeAny, {
|
|
28465
28471
|
material: "fr4" | "fr1";
|
|
28466
28472
|
layers: 2 | 4;
|
|
28473
|
+
doubleSidedAssembly: boolean;
|
|
28467
28474
|
symbol?: SymbolProp | undefined;
|
|
28468
28475
|
key?: any;
|
|
28469
28476
|
pcbX?: number | undefined;
|
|
@@ -29063,6 +29070,7 @@ declare const stampboardProps: z.ZodObject<Omit<{
|
|
|
29063
29070
|
silkscreenColor?: BoardColor | undefined;
|
|
29064
29071
|
topSilkscreenColor?: BoardColor | undefined;
|
|
29065
29072
|
bottomSilkscreenColor?: BoardColor | undefined;
|
|
29073
|
+
doubleSidedAssembly?: boolean | undefined;
|
|
29066
29074
|
leftPins?: string[] | undefined;
|
|
29067
29075
|
rightPins?: string[] | undefined;
|
|
29068
29076
|
topPins?: string[] | undefined;
|
|
@@ -43351,6 +43359,11 @@ interface SwitchProps extends CommonComponentProps {
|
|
|
43351
43359
|
spst?: boolean;
|
|
43352
43360
|
dpst?: boolean;
|
|
43353
43361
|
dpdt?: boolean;
|
|
43362
|
+
simSwitchFrequency?: number | string;
|
|
43363
|
+
simCloseAt?: number | string;
|
|
43364
|
+
simOpenAt?: number | string;
|
|
43365
|
+
simStartClosed?: boolean;
|
|
43366
|
+
simStartOpen?: boolean;
|
|
43354
43367
|
connections?: Connections<string>;
|
|
43355
43368
|
}
|
|
43356
43369
|
declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
@@ -44012,6 +44025,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44012
44025
|
spdt: z.ZodOptional<z.ZodBoolean>;
|
|
44013
44026
|
dpst: z.ZodOptional<z.ZodBoolean>;
|
|
44014
44027
|
dpdt: z.ZodOptional<z.ZodBoolean>;
|
|
44028
|
+
simSwitchFrequency: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
44029
|
+
simCloseAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
44030
|
+
simOpenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
44031
|
+
simStartClosed: z.ZodOptional<z.ZodBoolean>;
|
|
44032
|
+
simStartOpen: z.ZodOptional<z.ZodBoolean>;
|
|
44015
44033
|
connections: z.ZodOptional<z.ZodPipeline<z.ZodType<Partial<Record<string, string | string[] | readonly string[]>>, z.ZodTypeDef, Partial<Record<string, string | string[] | readonly string[]>>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>>;
|
|
44016
44034
|
}, "strip", z.ZodTypeAny, {
|
|
44017
44035
|
name: string;
|
|
@@ -44199,6 +44217,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44199
44217
|
spdt?: boolean | undefined;
|
|
44200
44218
|
dpst?: boolean | undefined;
|
|
44201
44219
|
dpdt?: boolean | undefined;
|
|
44220
|
+
simSwitchFrequency?: number | undefined;
|
|
44221
|
+
simCloseAt?: number | undefined;
|
|
44222
|
+
simOpenAt?: number | undefined;
|
|
44223
|
+
simStartClosed?: boolean | undefined;
|
|
44224
|
+
simStartOpen?: boolean | undefined;
|
|
44202
44225
|
}, {
|
|
44203
44226
|
name: string;
|
|
44204
44227
|
symbol?: SymbolProp | undefined;
|
|
@@ -44387,6 +44410,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44387
44410
|
dpst?: boolean | undefined;
|
|
44388
44411
|
dpdt?: boolean | undefined;
|
|
44389
44412
|
isNormallyClosed?: boolean | undefined;
|
|
44413
|
+
simSwitchFrequency?: string | number | undefined;
|
|
44414
|
+
simCloseAt?: string | number | undefined;
|
|
44415
|
+
simOpenAt?: string | number | undefined;
|
|
44416
|
+
simStartClosed?: boolean | undefined;
|
|
44417
|
+
simStartOpen?: boolean | undefined;
|
|
44390
44418
|
}>, SwitchProps, {
|
|
44391
44419
|
name: string;
|
|
44392
44420
|
symbol?: SymbolProp | undefined;
|
|
@@ -44575,6 +44603,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44575
44603
|
dpst?: boolean | undefined;
|
|
44576
44604
|
dpdt?: boolean | undefined;
|
|
44577
44605
|
isNormallyClosed?: boolean | undefined;
|
|
44606
|
+
simSwitchFrequency?: string | number | undefined;
|
|
44607
|
+
simCloseAt?: string | number | undefined;
|
|
44608
|
+
simOpenAt?: string | number | undefined;
|
|
44609
|
+
simStartClosed?: boolean | undefined;
|
|
44610
|
+
simStartOpen?: boolean | undefined;
|
|
44578
44611
|
}>;
|
|
44579
44612
|
type InferredSwitchProps = z.infer<typeof switchProps>;
|
|
44580
44613
|
|
package/dist/index.js
CHANGED
|
@@ -650,7 +650,8 @@ var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
|
650
650
|
bottomSolderMaskColor: boardColor.optional(),
|
|
651
651
|
silkscreenColor: boardColor.optional(),
|
|
652
652
|
topSilkscreenColor: boardColor.optional(),
|
|
653
|
-
bottomSilkscreenColor: boardColor.optional()
|
|
653
|
+
bottomSilkscreenColor: boardColor.optional(),
|
|
654
|
+
doubleSidedAssembly: z28.boolean().optional().default(false)
|
|
654
655
|
});
|
|
655
656
|
expectTypesMatch(true);
|
|
656
657
|
|
|
@@ -1459,6 +1460,7 @@ var ledProps = commonComponentProps.extend({
|
|
|
1459
1460
|
var ledPins = lrPolarPins;
|
|
1460
1461
|
|
|
1461
1462
|
// lib/components/switch.ts
|
|
1463
|
+
import { ms as ms2, frequency as frequency3 } from "circuit-json";
|
|
1462
1464
|
import { z as z64 } from "zod";
|
|
1463
1465
|
var switchProps = commonComponentProps.extend({
|
|
1464
1466
|
type: z64.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
@@ -1467,6 +1469,11 @@ var switchProps = commonComponentProps.extend({
|
|
|
1467
1469
|
spdt: z64.boolean().optional(),
|
|
1468
1470
|
dpst: z64.boolean().optional(),
|
|
1469
1471
|
dpdt: z64.boolean().optional(),
|
|
1472
|
+
simSwitchFrequency: frequency3.optional(),
|
|
1473
|
+
simCloseAt: ms2.optional(),
|
|
1474
|
+
simOpenAt: ms2.optional(),
|
|
1475
|
+
simStartClosed: z64.boolean().optional(),
|
|
1476
|
+
simStartOpen: z64.boolean().optional(),
|
|
1470
1477
|
connections: z64.custom().pipe(z64.record(z64.string(), connectionTarget)).optional()
|
|
1471
1478
|
}).transform((props) => {
|
|
1472
1479
|
const updatedProps = { ...props };
|
|
@@ -1674,7 +1681,7 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
1674
1681
|
});
|
|
1675
1682
|
|
|
1676
1683
|
// lib/components/voltagesource.ts
|
|
1677
|
-
import { frequency as
|
|
1684
|
+
import { frequency as frequency4, rotation as rotation4, voltage as voltage4 } from "circuit-json";
|
|
1678
1685
|
import { z as z79 } from "zod";
|
|
1679
1686
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
1680
1687
|
var percentage = z79.union([z79.string(), z79.number()]).transform((val) => {
|
|
@@ -1690,7 +1697,7 @@ var percentage = z79.union([z79.string(), z79.number()]).transform((val) => {
|
|
|
1690
1697
|
);
|
|
1691
1698
|
var voltageSourceProps = commonComponentProps.extend({
|
|
1692
1699
|
voltage: voltage4.optional(),
|
|
1693
|
-
frequency:
|
|
1700
|
+
frequency: frequency4.optional(),
|
|
1694
1701
|
peakToPeakVoltage: voltage4.optional(),
|
|
1695
1702
|
waveShape: z79.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
1696
1703
|
phase: rotation4.optional(),
|