@tscircuit/props 0.0.363 → 0.0.365
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 +27 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/lib/components/switch.ts +11 -0
- package/lib/platformConfig.ts +7 -0
- package/lib/projectConfig.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1365,6 +1365,11 @@ export interface SwitchProps extends CommonComponentProps {
|
|
|
1365
1365
|
spst?: boolean;
|
|
1366
1366
|
dpst?: boolean;
|
|
1367
1367
|
dpdt?: boolean;
|
|
1368
|
+
simSwitchFrequency?: number | string;
|
|
1369
|
+
simCloseAt?: number | string;
|
|
1370
|
+
simOpenAt?: number | string;
|
|
1371
|
+
simStartClosed?: boolean;
|
|
1372
|
+
simStartOpen?: boolean;
|
|
1368
1373
|
connections?: Connections<string>;
|
|
1369
1374
|
}
|
|
1370
1375
|
```
|
|
@@ -1519,6 +1524,7 @@ export interface PlatformConfig {
|
|
|
1519
1524
|
version?: string;
|
|
1520
1525
|
url?: string;
|
|
1521
1526
|
printBoardInformationToSilkscreen?: boolean;
|
|
1527
|
+
includeBoardFiles?: string[];
|
|
1522
1528
|
|
|
1523
1529
|
pcbDisabled?: boolean;
|
|
1524
1530
|
schematicDisabled?: boolean;
|
|
@@ -1558,6 +1564,7 @@ export interface ProjectConfig
|
|
|
1558
1564
|
| "version"
|
|
1559
1565
|
| "url"
|
|
1560
1566
|
| "printBoardInformationToSilkscreen"
|
|
1567
|
+
| "includeBoardFiles"
|
|
1561
1568
|
> {}
|
|
1562
1569
|
```
|
|
1563
1570
|
|
package/dist/index.d.ts
CHANGED
|
@@ -43351,6 +43351,11 @@ interface SwitchProps extends CommonComponentProps {
|
|
|
43351
43351
|
spst?: boolean;
|
|
43352
43352
|
dpst?: boolean;
|
|
43353
43353
|
dpdt?: boolean;
|
|
43354
|
+
simSwitchFrequency?: number | string;
|
|
43355
|
+
simCloseAt?: number | string;
|
|
43356
|
+
simOpenAt?: number | string;
|
|
43357
|
+
simStartClosed?: boolean;
|
|
43358
|
+
simStartOpen?: boolean;
|
|
43354
43359
|
connections?: Connections<string>;
|
|
43355
43360
|
}
|
|
43356
43361
|
declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
@@ -44012,6 +44017,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44012
44017
|
spdt: z.ZodOptional<z.ZodBoolean>;
|
|
44013
44018
|
dpst: z.ZodOptional<z.ZodBoolean>;
|
|
44014
44019
|
dpdt: z.ZodOptional<z.ZodBoolean>;
|
|
44020
|
+
simSwitchFrequency: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
44021
|
+
simCloseAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
44022
|
+
simOpenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
44023
|
+
simStartClosed: z.ZodOptional<z.ZodBoolean>;
|
|
44024
|
+
simStartOpen: z.ZodOptional<z.ZodBoolean>;
|
|
44015
44025
|
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
44026
|
}, "strip", z.ZodTypeAny, {
|
|
44017
44027
|
name: string;
|
|
@@ -44199,6 +44209,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44199
44209
|
spdt?: boolean | undefined;
|
|
44200
44210
|
dpst?: boolean | undefined;
|
|
44201
44211
|
dpdt?: boolean | undefined;
|
|
44212
|
+
simSwitchFrequency?: number | undefined;
|
|
44213
|
+
simCloseAt?: number | undefined;
|
|
44214
|
+
simOpenAt?: number | undefined;
|
|
44215
|
+
simStartClosed?: boolean | undefined;
|
|
44216
|
+
simStartOpen?: boolean | undefined;
|
|
44202
44217
|
}, {
|
|
44203
44218
|
name: string;
|
|
44204
44219
|
symbol?: SymbolProp | undefined;
|
|
@@ -44387,6 +44402,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44387
44402
|
dpst?: boolean | undefined;
|
|
44388
44403
|
dpdt?: boolean | undefined;
|
|
44389
44404
|
isNormallyClosed?: boolean | undefined;
|
|
44405
|
+
simSwitchFrequency?: string | number | undefined;
|
|
44406
|
+
simCloseAt?: string | number | undefined;
|
|
44407
|
+
simOpenAt?: string | number | undefined;
|
|
44408
|
+
simStartClosed?: boolean | undefined;
|
|
44409
|
+
simStartOpen?: boolean | undefined;
|
|
44390
44410
|
}>, SwitchProps, {
|
|
44391
44411
|
name: string;
|
|
44392
44412
|
symbol?: SymbolProp | undefined;
|
|
@@ -44575,6 +44595,11 @@ declare const switchProps: z.ZodEffects<z.ZodObject<{
|
|
|
44575
44595
|
dpst?: boolean | undefined;
|
|
44576
44596
|
dpdt?: boolean | undefined;
|
|
44577
44597
|
isNormallyClosed?: boolean | undefined;
|
|
44598
|
+
simSwitchFrequency?: string | number | undefined;
|
|
44599
|
+
simCloseAt?: string | number | undefined;
|
|
44600
|
+
simOpenAt?: string | number | undefined;
|
|
44601
|
+
simStartClosed?: boolean | undefined;
|
|
44602
|
+
simStartOpen?: boolean | undefined;
|
|
44578
44603
|
}>;
|
|
44579
44604
|
type InferredSwitchProps = z.infer<typeof switchProps>;
|
|
44580
44605
|
|
|
@@ -51802,6 +51827,7 @@ interface PlatformConfig {
|
|
|
51802
51827
|
version?: string;
|
|
51803
51828
|
url?: string;
|
|
51804
51829
|
printBoardInformationToSilkscreen?: boolean;
|
|
51830
|
+
includeBoardFiles?: string[];
|
|
51805
51831
|
pcbDisabled?: boolean;
|
|
51806
51832
|
schematicDisabled?: boolean;
|
|
51807
51833
|
partsEngineDisabled?: boolean;
|
|
@@ -51811,7 +51837,7 @@ interface PlatformConfig {
|
|
|
51811
51837
|
}
|
|
51812
51838
|
declare const platformConfig: z.ZodType<PlatformConfig>;
|
|
51813
51839
|
|
|
51814
|
-
interface ProjectConfig extends Pick<PlatformConfig, "projectName" | "projectBaseUrl" | "version" | "url" | "printBoardInformationToSilkscreen"> {
|
|
51840
|
+
interface ProjectConfig extends Pick<PlatformConfig, "projectName" | "projectBaseUrl" | "version" | "url" | "printBoardInformationToSilkscreen" | "includeBoardFiles"> {
|
|
51815
51841
|
}
|
|
51816
51842
|
declare const projectConfig: z.ZodType<ProjectConfig>;
|
|
51817
51843
|
|
package/dist/index.js
CHANGED
|
@@ -1459,6 +1459,7 @@ var ledProps = commonComponentProps.extend({
|
|
|
1459
1459
|
var ledPins = lrPolarPins;
|
|
1460
1460
|
|
|
1461
1461
|
// lib/components/switch.ts
|
|
1462
|
+
import { ms as ms2, frequency as frequency3 } from "circuit-json";
|
|
1462
1463
|
import { z as z64 } from "zod";
|
|
1463
1464
|
var switchProps = commonComponentProps.extend({
|
|
1464
1465
|
type: z64.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
@@ -1467,6 +1468,11 @@ var switchProps = commonComponentProps.extend({
|
|
|
1467
1468
|
spdt: z64.boolean().optional(),
|
|
1468
1469
|
dpst: z64.boolean().optional(),
|
|
1469
1470
|
dpdt: z64.boolean().optional(),
|
|
1471
|
+
simSwitchFrequency: frequency3.optional(),
|
|
1472
|
+
simCloseAt: ms2.optional(),
|
|
1473
|
+
simOpenAt: ms2.optional(),
|
|
1474
|
+
simStartClosed: z64.boolean().optional(),
|
|
1475
|
+
simStartOpen: z64.boolean().optional(),
|
|
1470
1476
|
connections: z64.custom().pipe(z64.record(z64.string(), connectionTarget)).optional()
|
|
1471
1477
|
}).transform((props) => {
|
|
1472
1478
|
const updatedProps = { ...props };
|
|
@@ -1674,7 +1680,7 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
1674
1680
|
});
|
|
1675
1681
|
|
|
1676
1682
|
// lib/components/voltagesource.ts
|
|
1677
|
-
import { frequency as
|
|
1683
|
+
import { frequency as frequency4, rotation as rotation4, voltage as voltage4 } from "circuit-json";
|
|
1678
1684
|
import { z as z79 } from "zod";
|
|
1679
1685
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
1680
1686
|
var percentage = z79.union([z79.string(), z79.number()]).transform((val) => {
|
|
@@ -1690,7 +1696,7 @@ var percentage = z79.union([z79.string(), z79.number()]).transform((val) => {
|
|
|
1690
1696
|
);
|
|
1691
1697
|
var voltageSourceProps = commonComponentProps.extend({
|
|
1692
1698
|
voltage: voltage4.optional(),
|
|
1693
|
-
frequency:
|
|
1699
|
+
frequency: frequency4.optional(),
|
|
1694
1700
|
peakToPeakVoltage: voltage4.optional(),
|
|
1695
1701
|
waveShape: z79.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
1696
1702
|
phase: rotation4.optional(),
|
|
@@ -2067,6 +2073,9 @@ var platformConfig = z103.object({
|
|
|
2067
2073
|
version: z103.string().optional(),
|
|
2068
2074
|
url: z103.string().optional(),
|
|
2069
2075
|
printBoardInformationToSilkscreen: z103.boolean().optional(),
|
|
2076
|
+
includeBoardFiles: z103.array(z103.string()).describe(
|
|
2077
|
+
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
2078
|
+
).optional(),
|
|
2070
2079
|
localCacheEngine: z103.any().optional(),
|
|
2071
2080
|
pcbDisabled: z103.boolean().optional(),
|
|
2072
2081
|
schematicDisabled: z103.boolean().optional(),
|
|
@@ -2094,7 +2103,8 @@ var projectConfig = platformConfigObject.pick({
|
|
|
2094
2103
|
projectBaseUrl: true,
|
|
2095
2104
|
version: true,
|
|
2096
2105
|
url: true,
|
|
2097
|
-
printBoardInformationToSilkscreen: true
|
|
2106
|
+
printBoardInformationToSilkscreen: true,
|
|
2107
|
+
includeBoardFiles: true
|
|
2098
2108
|
});
|
|
2099
2109
|
expectTypesMatch(true);
|
|
2100
2110
|
export {
|