@tscircuit/props 0.0.287 → 0.0.289
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 +5 -2
- package/dist/index.d.ts +31 -4
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/lib/components/group.ts +4 -0
- package/lib/components/pin-header.ts +5 -2
- package/lib/components/voltagesource.ts +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,7 +109,6 @@ export interface CommonComponentProps extends CommonLayoutProps {
|
|
|
109
109
|
|
|
110
110
|
```ts
|
|
111
111
|
export interface SubcircuitGroupProps extends BaseGroupProps {
|
|
112
|
-
layout?: LayoutBuilder;
|
|
113
112
|
manualEdits?: ManualEditsFileInput;
|
|
114
113
|
routingDisabled?: boolean;
|
|
115
114
|
defaultTraceWidth?: Distance;
|
|
@@ -130,6 +129,9 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
|
|
|
130
129
|
*/
|
|
131
130
|
schTraceAutoLabelEnabled?: boolean;
|
|
132
131
|
|
|
132
|
+
/** Maximum length a trace can span on the schematic */
|
|
133
|
+
schMaxTraceDistance?: Distance;
|
|
134
|
+
|
|
133
135
|
partsEngine?: PartsEngine;
|
|
134
136
|
}
|
|
135
137
|
```
|
|
@@ -664,7 +666,7 @@ export interface PinHeaderProps extends CommonComponentProps {
|
|
|
664
666
|
/**
|
|
665
667
|
* Labels for each pin
|
|
666
668
|
*/
|
|
667
|
-
pinLabels?: SchematicPinLabel[];
|
|
669
|
+
pinLabels?: Record<string, SchematicPinLabel> | SchematicPinLabel[];
|
|
668
670
|
|
|
669
671
|
/**
|
|
670
672
|
* Connections to other components
|
|
@@ -952,6 +954,7 @@ export interface VoltageSourceProps extends CommonComponentProps {
|
|
|
952
954
|
peakToPeakVoltage?: number | string;
|
|
953
955
|
waveShape?: WaveShape;
|
|
954
956
|
phase?: number | string;
|
|
957
|
+
dutyCycle?: number | string;
|
|
955
958
|
}
|
|
956
959
|
```
|
|
957
960
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3217,6 +3217,8 @@ interface SubcircuitGroupProps extends BaseGroupProps {
|
|
|
3217
3217
|
* If true, net labels will automatically be created for complex traces
|
|
3218
3218
|
*/
|
|
3219
3219
|
schTraceAutoLabelEnabled?: boolean;
|
|
3220
|
+
/** Maximum length a trace can span on the schematic */
|
|
3221
|
+
schMaxTraceDistance?: Distance;
|
|
3220
3222
|
partsEngine?: PartsEngine;
|
|
3221
3223
|
/** When autosizing, the board will be made square */
|
|
3222
3224
|
square?: boolean;
|
|
@@ -4429,6 +4431,7 @@ declare const subcircuitGroupProps: z.ZodObject<{
|
|
|
4429
4431
|
}>>;
|
|
4430
4432
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
4431
4433
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
4434
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
4432
4435
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
4433
4436
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
4434
4437
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -4708,6 +4711,7 @@ declare const subcircuitGroupProps: z.ZodObject<{
|
|
|
4708
4711
|
} | undefined;
|
|
4709
4712
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
4710
4713
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
4714
|
+
schMaxTraceDistance?: number | undefined;
|
|
4711
4715
|
partsEngine?: PartsEngine | undefined;
|
|
4712
4716
|
square?: boolean | undefined;
|
|
4713
4717
|
emptyArea?: string | undefined;
|
|
@@ -4945,6 +4949,7 @@ declare const subcircuitGroupProps: z.ZodObject<{
|
|
|
4945
4949
|
} | undefined;
|
|
4946
4950
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
4947
4951
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
4952
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
4948
4953
|
partsEngine?: PartsEngine | undefined;
|
|
4949
4954
|
square?: boolean | undefined;
|
|
4950
4955
|
emptyArea?: string | undefined;
|
|
@@ -5456,6 +5461,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<{
|
|
|
5456
5461
|
}>>;
|
|
5457
5462
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
5458
5463
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
5464
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5459
5465
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
5460
5466
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
5461
5467
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -5738,6 +5744,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<{
|
|
|
5738
5744
|
} | undefined;
|
|
5739
5745
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
5740
5746
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
5747
|
+
schMaxTraceDistance?: number | undefined;
|
|
5741
5748
|
partsEngine?: PartsEngine | undefined;
|
|
5742
5749
|
square?: boolean | undefined;
|
|
5743
5750
|
emptyArea?: string | undefined;
|
|
@@ -5976,6 +5983,7 @@ declare const subcircuitGroupPropsWithBool: z.ZodObject<{
|
|
|
5976
5983
|
} | undefined;
|
|
5977
5984
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
5978
5985
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
5986
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
5979
5987
|
partsEngine?: PartsEngine | undefined;
|
|
5980
5988
|
square?: boolean | undefined;
|
|
5981
5989
|
emptyArea?: string | undefined;
|
|
@@ -7181,6 +7189,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
|
|
|
7181
7189
|
}>>;
|
|
7182
7190
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
7183
7191
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
7192
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
7184
7193
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
7185
7194
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
7186
7195
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -7463,6 +7472,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
|
|
|
7463
7472
|
} | undefined;
|
|
7464
7473
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
7465
7474
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
7475
|
+
schMaxTraceDistance?: number | undefined;
|
|
7466
7476
|
partsEngine?: PartsEngine | undefined;
|
|
7467
7477
|
square?: boolean | undefined;
|
|
7468
7478
|
emptyArea?: string | undefined;
|
|
@@ -7701,6 +7711,7 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
|
|
|
7701
7711
|
} | undefined;
|
|
7702
7712
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
7703
7713
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
7714
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
7704
7715
|
partsEngine?: PartsEngine | undefined;
|
|
7705
7716
|
square?: boolean | undefined;
|
|
7706
7717
|
emptyArea?: string | undefined;
|
|
@@ -8218,6 +8229,7 @@ declare const boardProps: z.ZodObject<{
|
|
|
8218
8229
|
}>>;
|
|
8219
8230
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
8220
8231
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
8232
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
8221
8233
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
8222
8234
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
8223
8235
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -8502,6 +8514,7 @@ declare const boardProps: z.ZodObject<{
|
|
|
8502
8514
|
} | undefined;
|
|
8503
8515
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
8504
8516
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
8517
|
+
schMaxTraceDistance?: number | undefined;
|
|
8505
8518
|
partsEngine?: PartsEngine | undefined;
|
|
8506
8519
|
square?: boolean | undefined;
|
|
8507
8520
|
emptyArea?: string | undefined;
|
|
@@ -8739,6 +8752,7 @@ declare const boardProps: z.ZodObject<{
|
|
|
8739
8752
|
} | undefined;
|
|
8740
8753
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
8741
8754
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
8755
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
8742
8756
|
partsEngine?: PartsEngine | undefined;
|
|
8743
8757
|
square?: boolean | undefined;
|
|
8744
8758
|
emptyArea?: string | undefined;
|
|
@@ -9254,6 +9268,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
9254
9268
|
}>>;
|
|
9255
9269
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
9256
9270
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
9271
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
9257
9272
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
9258
9273
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
9259
9274
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -9539,6 +9554,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
9539
9554
|
} | undefined;
|
|
9540
9555
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
9541
9556
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
9557
|
+
schMaxTraceDistance?: number | undefined;
|
|
9542
9558
|
partsEngine?: PartsEngine | undefined;
|
|
9543
9559
|
square?: boolean | undefined;
|
|
9544
9560
|
emptyArea?: string | undefined;
|
|
@@ -9776,6 +9792,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
9776
9792
|
} | undefined;
|
|
9777
9793
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
9778
9794
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
9795
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
9779
9796
|
partsEngine?: PartsEngine | undefined;
|
|
9780
9797
|
square?: boolean | undefined;
|
|
9781
9798
|
emptyArea?: string | undefined;
|
|
@@ -17369,6 +17386,7 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
17369
17386
|
}>>;
|
|
17370
17387
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
17371
17388
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
17389
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
17372
17390
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
17373
17391
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
17374
17392
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -17668,6 +17686,7 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
17668
17686
|
} | undefined;
|
|
17669
17687
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
17670
17688
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
17689
|
+
schMaxTraceDistance?: number | undefined;
|
|
17671
17690
|
partsEngine?: PartsEngine | undefined;
|
|
17672
17691
|
square?: boolean | undefined;
|
|
17673
17692
|
emptyArea?: string | undefined;
|
|
@@ -17915,6 +17934,7 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
17915
17934
|
} | undefined;
|
|
17916
17935
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
17917
17936
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
17937
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
17918
17938
|
partsEngine?: PartsEngine | undefined;
|
|
17919
17939
|
square?: boolean | undefined;
|
|
17920
17940
|
emptyArea?: string | undefined;
|
|
@@ -20466,7 +20486,7 @@ interface PinHeaderProps extends CommonComponentProps {
|
|
|
20466
20486
|
/**
|
|
20467
20487
|
* Labels for each pin
|
|
20468
20488
|
*/
|
|
20469
|
-
pinLabels?: SchematicPinLabel[];
|
|
20489
|
+
pinLabels?: Record<string, SchematicPinLabel> | SchematicPinLabel[];
|
|
20470
20490
|
/**
|
|
20471
20491
|
* Connections to other components
|
|
20472
20492
|
*/
|
|
@@ -20789,7 +20809,7 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
20789
20809
|
rightAngle: z.ZodOptional<z.ZodBoolean>;
|
|
20790
20810
|
holeDiameter: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
20791
20811
|
platedDiameter: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
20792
|
-
pinLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20812
|
+
pinLabels: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
|
|
20793
20813
|
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">]>>>>;
|
|
20794
20814
|
facingDirection: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
|
|
20795
20815
|
schPinArrangement: z.ZodOptional<z.ZodObject<{
|
|
@@ -21006,7 +21026,7 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
21006
21026
|
doNotPlace?: boolean | undefined;
|
|
21007
21027
|
schWidth?: number | undefined;
|
|
21008
21028
|
schHeight?: number | undefined;
|
|
21009
|
-
pinLabels?: string[] | undefined;
|
|
21029
|
+
pinLabels?: string[] | Record<string, string> | undefined;
|
|
21010
21030
|
pcbPinLabels?: Record<string, string> | undefined;
|
|
21011
21031
|
schPinArrangement?: {
|
|
21012
21032
|
leftSize?: number | undefined;
|
|
@@ -21139,7 +21159,7 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
21139
21159
|
schWidth?: string | number | undefined;
|
|
21140
21160
|
schHeight?: string | number | undefined;
|
|
21141
21161
|
gender?: "male" | "female" | "unpopulated" | undefined;
|
|
21142
|
-
pinLabels?: string[] | undefined;
|
|
21162
|
+
pinLabels?: string[] | Record<string, string> | undefined;
|
|
21143
21163
|
pcbPinLabels?: Record<string, string> | undefined;
|
|
21144
21164
|
schPinArrangement?: {
|
|
21145
21165
|
leftSize?: number | undefined;
|
|
@@ -22609,6 +22629,7 @@ declare const subcircuitProps: z.ZodObject<{
|
|
|
22609
22629
|
}>>;
|
|
22610
22630
|
schAutoLayoutEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
22611
22631
|
schTraceAutoLabelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
22632
|
+
schMaxTraceDistance: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22612
22633
|
routingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
22613
22634
|
defaultTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
22614
22635
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -22888,6 +22909,7 @@ declare const subcircuitProps: z.ZodObject<{
|
|
|
22888
22909
|
} | undefined;
|
|
22889
22910
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
22890
22911
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
22912
|
+
schMaxTraceDistance?: number | undefined;
|
|
22891
22913
|
partsEngine?: PartsEngine | undefined;
|
|
22892
22914
|
square?: boolean | undefined;
|
|
22893
22915
|
emptyArea?: string | undefined;
|
|
@@ -23125,6 +23147,7 @@ declare const subcircuitProps: z.ZodObject<{
|
|
|
23125
23147
|
} | undefined;
|
|
23126
23148
|
schAutoLayoutEnabled?: boolean | undefined;
|
|
23127
23149
|
schTraceAutoLabelEnabled?: boolean | undefined;
|
|
23150
|
+
schMaxTraceDistance?: string | number | undefined;
|
|
23128
23151
|
partsEngine?: PartsEngine | undefined;
|
|
23129
23152
|
square?: boolean | undefined;
|
|
23130
23153
|
emptyArea?: string | undefined;
|
|
@@ -27903,6 +27926,7 @@ interface VoltageSourceProps extends CommonComponentProps {
|
|
|
27903
27926
|
peakToPeakVoltage?: number | string;
|
|
27904
27927
|
waveShape?: WaveShape;
|
|
27905
27928
|
phase?: number | string;
|
|
27929
|
+
dutyCycle?: number | string;
|
|
27906
27930
|
}
|
|
27907
27931
|
declare const voltageSourceProps: z.ZodObject<{
|
|
27908
27932
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -28192,6 +28216,7 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
28192
28216
|
peakToPeakVoltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
28193
28217
|
waveShape: z.ZodOptional<z.ZodEnum<["sinewave", "square", "triangle", "sawtooth"]>>;
|
|
28194
28218
|
phase: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
28219
|
+
dutyCycle: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>>;
|
|
28195
28220
|
}, "strip", z.ZodTypeAny, {
|
|
28196
28221
|
name: string;
|
|
28197
28222
|
pcbX?: number | undefined;
|
|
@@ -28276,6 +28301,7 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
28276
28301
|
peakToPeakVoltage?: number | undefined;
|
|
28277
28302
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
28278
28303
|
phase?: number | undefined;
|
|
28304
|
+
dutyCycle?: number | undefined;
|
|
28279
28305
|
}, {
|
|
28280
28306
|
name: string;
|
|
28281
28307
|
pcbX?: string | number | undefined;
|
|
@@ -28362,6 +28388,7 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
28362
28388
|
peakToPeakVoltage?: string | number | undefined;
|
|
28363
28389
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
28364
28390
|
phase?: string | number | undefined;
|
|
28391
|
+
dutyCycle?: string | number | undefined;
|
|
28365
28392
|
}>;
|
|
28366
28393
|
|
|
28367
28394
|
declare const schematicBoxProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -511,6 +511,7 @@ var subcircuitGroupProps = baseGroupProps.extend({
|
|
|
511
511
|
manualEdits: manual_edits_file.optional(),
|
|
512
512
|
schAutoLayoutEnabled: z23.boolean().optional(),
|
|
513
513
|
schTraceAutoLabelEnabled: z23.boolean().optional(),
|
|
514
|
+
schMaxTraceDistance: distance5.optional(),
|
|
514
515
|
routingDisabled: z23.boolean().optional(),
|
|
515
516
|
defaultTraceWidth: length.optional(),
|
|
516
517
|
minTraceWidth: length.optional(),
|
|
@@ -1097,7 +1098,7 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
1097
1098
|
rightAngle: z50.boolean().optional(),
|
|
1098
1099
|
holeDiameter: distance14.optional(),
|
|
1099
1100
|
platedDiameter: distance14.optional(),
|
|
1100
|
-
pinLabels: z50.array(schematicPinLabel).optional(),
|
|
1101
|
+
pinLabels: z50.record(z50.string(), schematicPinLabel).or(z50.array(schematicPinLabel)).optional(),
|
|
1101
1102
|
connections: z50.custom().pipe(z50.record(z50.string(), connectionTarget2)).optional(),
|
|
1102
1103
|
facingDirection: z50.enum(["left", "right"]).optional(),
|
|
1103
1104
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
@@ -1428,12 +1429,24 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
1428
1429
|
// lib/components/voltagesource.ts
|
|
1429
1430
|
import { frequency as frequency3, rotation as rotation4, voltage as voltage3 } from "circuit-json";
|
|
1430
1431
|
import { z as z67 } from "zod";
|
|
1432
|
+
var percentage = z67.union([z67.string(), z67.number()]).transform((val) => {
|
|
1433
|
+
if (typeof val === "string") {
|
|
1434
|
+
if (val.endsWith("%")) {
|
|
1435
|
+
return parseFloat(val.slice(0, -1)) / 100;
|
|
1436
|
+
}
|
|
1437
|
+
return parseFloat(val);
|
|
1438
|
+
}
|
|
1439
|
+
return val;
|
|
1440
|
+
}).pipe(
|
|
1441
|
+
z67.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
1442
|
+
);
|
|
1431
1443
|
var voltageSourceProps = commonComponentProps.extend({
|
|
1432
1444
|
voltage: voltage3.optional(),
|
|
1433
1445
|
frequency: frequency3.optional(),
|
|
1434
1446
|
peakToPeakVoltage: voltage3.optional(),
|
|
1435
1447
|
waveShape: z67.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
1436
|
-
phase: rotation4.optional()
|
|
1448
|
+
phase: rotation4.optional(),
|
|
1449
|
+
dutyCycle: percentage.optional()
|
|
1437
1450
|
});
|
|
1438
1451
|
expectTypesMatch(true);
|
|
1439
1452
|
|