@tscircuit/props 0.0.348 → 0.0.350
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 +2 -0
- package/dist/index.d.ts +27 -31
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/lib/components/analogsimulation.ts +5 -0
- package/lib/components/schematic-rect.ts +2 -1
- package/lib/platformConfig.ts +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -29577,8 +29577,8 @@ declare const capacitorProps: z.ZodObject<{
|
|
|
29577
29577
|
connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "pin2", "pos", "neg", "anode", "cathode"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
29578
29578
|
}, "strip", z.ZodTypeAny, {
|
|
29579
29579
|
name: string;
|
|
29580
|
-
capacitance: number;
|
|
29581
29580
|
schShowRatings: boolean;
|
|
29581
|
+
capacitance: number;
|
|
29582
29582
|
polarized: boolean;
|
|
29583
29583
|
symbol?: SymbolProp | undefined;
|
|
29584
29584
|
key?: any;
|
|
@@ -32903,10 +32903,10 @@ declare const batteryProps: z.ZodObject<{
|
|
|
32903
32903
|
symbolName?: string | undefined;
|
|
32904
32904
|
doNotPlace?: boolean | undefined;
|
|
32905
32905
|
obstructsWithinBounds?: boolean | undefined;
|
|
32906
|
-
voltage?: number | undefined;
|
|
32907
|
-
capacity?: number | undefined;
|
|
32908
32906
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
32909
32907
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
32908
|
+
capacity?: number | undefined;
|
|
32909
|
+
voltage?: number | undefined;
|
|
32910
32910
|
}, {
|
|
32911
32911
|
name: string;
|
|
32912
32912
|
symbol?: SymbolProp | undefined;
|
|
@@ -33081,10 +33081,10 @@ declare const batteryProps: z.ZodObject<{
|
|
|
33081
33081
|
symbolName?: string | undefined;
|
|
33082
33082
|
doNotPlace?: boolean | undefined;
|
|
33083
33083
|
obstructsWithinBounds?: boolean | undefined;
|
|
33084
|
-
voltage?: string | number | undefined;
|
|
33085
|
-
capacity?: string | number | undefined;
|
|
33086
33084
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
33087
33085
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
33086
|
+
capacity?: string | number | undefined;
|
|
33087
|
+
voltage?: string | number | undefined;
|
|
33088
33088
|
}>;
|
|
33089
33089
|
declare const batteryPins: readonly ["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"];
|
|
33090
33090
|
type BatteryPinLabels = (typeof batteryPins)[number];
|
|
@@ -33948,8 +33948,8 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
33948
33948
|
schHeight: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
33949
33949
|
}, "strip", z.ZodTypeAny, {
|
|
33950
33950
|
name: string;
|
|
33951
|
-
gender: "male" | "female" | "unpopulated";
|
|
33952
33951
|
pinCount: number;
|
|
33952
|
+
gender: "male" | "female" | "unpopulated";
|
|
33953
33953
|
symbol?: SymbolProp | undefined;
|
|
33954
33954
|
key?: any;
|
|
33955
33955
|
pcbX?: number | undefined;
|
|
@@ -34386,12 +34386,12 @@ declare const pinHeaderProps: z.ZodObject<{
|
|
|
34386
34386
|
}> | undefined;
|
|
34387
34387
|
schWidth?: string | number | undefined;
|
|
34388
34388
|
schHeight?: string | number | undefined;
|
|
34389
|
-
gender?: "male" | "female" | "unpopulated" | undefined;
|
|
34390
34389
|
pinLabels?: string[] | Record<string, string> | undefined;
|
|
34391
34390
|
pcbPinLabels?: Record<string, string> | undefined;
|
|
34392
34391
|
holeDiameter?: string | number | undefined;
|
|
34393
34392
|
pitch?: string | number | undefined;
|
|
34394
34393
|
schFacingDirection?: "up" | "down" | "left" | "right" | undefined;
|
|
34394
|
+
gender?: "male" | "female" | "unpopulated" | undefined;
|
|
34395
34395
|
showSilkscreenPinLabels?: boolean | undefined;
|
|
34396
34396
|
doubleRow?: boolean | undefined;
|
|
34397
34397
|
rightAngle?: boolean | undefined;
|
|
@@ -37142,13 +37142,21 @@ declare const subcircuitProps: z.ZodObject<{
|
|
|
37142
37142
|
|
|
37143
37143
|
interface AnalogSimulationProps {
|
|
37144
37144
|
simulationType?: "spice_transient_analysis";
|
|
37145
|
+
duration?: number | string;
|
|
37146
|
+
timePerStep?: number | string;
|
|
37145
37147
|
}
|
|
37146
37148
|
declare const analogSimulationProps: z.ZodObject<{
|
|
37147
37149
|
simulationType: z.ZodDefault<z.ZodLiteral<"spice_transient_analysis">>;
|
|
37150
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
37151
|
+
timePerStep: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
37148
37152
|
}, "strip", z.ZodTypeAny, {
|
|
37149
37153
|
simulationType: "spice_transient_analysis";
|
|
37154
|
+
duration?: number | undefined;
|
|
37155
|
+
timePerStep?: number | undefined;
|
|
37150
37156
|
}, {
|
|
37157
|
+
duration?: string | number | undefined;
|
|
37151
37158
|
simulationType?: "spice_transient_analysis" | undefined;
|
|
37159
|
+
timePerStep?: string | number | undefined;
|
|
37152
37160
|
}>;
|
|
37153
37161
|
|
|
37154
37162
|
declare const transistorPinsLabels: readonly ["pin1", "pin2", "pin3", "emitter", "collector", "base", "gate", "source", "drain"];
|
|
@@ -42705,9 +42713,9 @@ declare const ledProps: z.ZodObject<{
|
|
|
42705
42713
|
doNotPlace?: boolean | undefined;
|
|
42706
42714
|
obstructsWithinBounds?: boolean | undefined;
|
|
42707
42715
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
42716
|
+
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
42708
42717
|
color?: string | undefined;
|
|
42709
42718
|
wavelength?: string | undefined;
|
|
42710
|
-
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
42711
42719
|
schDisplayValue?: string | undefined;
|
|
42712
42720
|
laser?: boolean | undefined;
|
|
42713
42721
|
}, {
|
|
@@ -42885,9 +42893,9 @@ declare const ledProps: z.ZodObject<{
|
|
|
42885
42893
|
doNotPlace?: boolean | undefined;
|
|
42886
42894
|
obstructsWithinBounds?: boolean | undefined;
|
|
42887
42895
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
42896
|
+
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
42888
42897
|
color?: string | undefined;
|
|
42889
42898
|
wavelength?: string | undefined;
|
|
42890
|
-
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
42891
42899
|
schDisplayValue?: string | undefined;
|
|
42892
42900
|
laser?: boolean | undefined;
|
|
42893
42901
|
}>;
|
|
@@ -47993,8 +48001,8 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
47993
48001
|
doNotPlace?: boolean | undefined;
|
|
47994
48002
|
obstructsWithinBounds?: boolean | undefined;
|
|
47995
48003
|
connections?: Partial<Record<"pin1" | "pin2" | "pos" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
47996
|
-
voltage?: number | undefined;
|
|
47997
48004
|
frequency?: number | undefined;
|
|
48005
|
+
voltage?: number | undefined;
|
|
47998
48006
|
peakToPeakVoltage?: number | undefined;
|
|
47999
48007
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
48000
48008
|
phase?: number | undefined;
|
|
@@ -48174,8 +48182,8 @@ declare const voltageSourceProps: z.ZodObject<{
|
|
|
48174
48182
|
doNotPlace?: boolean | undefined;
|
|
48175
48183
|
obstructsWithinBounds?: boolean | undefined;
|
|
48176
48184
|
connections?: Partial<Record<"pin1" | "pin2" | "pos" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
48177
|
-
voltage?: string | number | undefined;
|
|
48178
48185
|
frequency?: string | number | undefined;
|
|
48186
|
+
voltage?: string | number | undefined;
|
|
48179
48187
|
peakToPeakVoltage?: string | number | undefined;
|
|
48180
48188
|
waveShape?: "square" | "sinewave" | "triangle" | "sawtooth" | undefined;
|
|
48181
48189
|
phase?: string | number | undefined;
|
|
@@ -49193,8 +49201,8 @@ declare const schematicArcProps: z.ZodObject<{
|
|
|
49193
49201
|
x: number;
|
|
49194
49202
|
y: number;
|
|
49195
49203
|
};
|
|
49196
|
-
color: string;
|
|
49197
49204
|
radius: number;
|
|
49205
|
+
color: string;
|
|
49198
49206
|
startAngleDegrees: number;
|
|
49199
49207
|
endAngleDegrees: number;
|
|
49200
49208
|
isDashed: boolean;
|
|
@@ -49358,8 +49366,8 @@ declare const schematicCircleProps: z.ZodObject<{
|
|
|
49358
49366
|
x: number;
|
|
49359
49367
|
y: number;
|
|
49360
49368
|
};
|
|
49361
|
-
color: string;
|
|
49362
49369
|
radius: number;
|
|
49370
|
+
color: string;
|
|
49363
49371
|
isDashed: boolean;
|
|
49364
49372
|
isFilled: boolean;
|
|
49365
49373
|
strokeWidth?: number | undefined;
|
|
@@ -49379,16 +49387,8 @@ declare const schematicCircleProps: z.ZodObject<{
|
|
|
49379
49387
|
type SchematicCircleProps = z.input<typeof schematicCircleProps>;
|
|
49380
49388
|
|
|
49381
49389
|
declare const schematicRectProps: z.ZodObject<{
|
|
49382
|
-
|
|
49383
|
-
|
|
49384
|
-
y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
49385
|
-
}, "strip", z.ZodTypeAny, {
|
|
49386
|
-
x: number;
|
|
49387
|
-
y: number;
|
|
49388
|
-
}, {
|
|
49389
|
-
x: string | number;
|
|
49390
|
-
y: string | number;
|
|
49391
|
-
}>;
|
|
49390
|
+
schX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
49391
|
+
schY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
49392
49392
|
width: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
49393
49393
|
height: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
49394
49394
|
rotation: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -49398,25 +49398,21 @@ declare const schematicRectProps: z.ZodObject<{
|
|
|
49398
49398
|
fillColor: z.ZodOptional<z.ZodString>;
|
|
49399
49399
|
isDashed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
49400
49400
|
}, "strip", z.ZodTypeAny, {
|
|
49401
|
-
center: {
|
|
49402
|
-
x: number;
|
|
49403
|
-
y: number;
|
|
49404
|
-
};
|
|
49405
49401
|
width: number;
|
|
49406
49402
|
height: number;
|
|
49407
49403
|
color: string;
|
|
49408
49404
|
isDashed: boolean;
|
|
49409
49405
|
isFilled: boolean;
|
|
49410
49406
|
rotation: number;
|
|
49407
|
+
schX?: number | undefined;
|
|
49408
|
+
schY?: number | undefined;
|
|
49411
49409
|
strokeWidth?: number | undefined;
|
|
49412
49410
|
fillColor?: string | undefined;
|
|
49413
49411
|
}, {
|
|
49414
|
-
center: {
|
|
49415
|
-
x: string | number;
|
|
49416
|
-
y: string | number;
|
|
49417
|
-
};
|
|
49418
49412
|
width: string | number;
|
|
49419
49413
|
height: string | number;
|
|
49414
|
+
schX?: string | number | undefined;
|
|
49415
|
+
schY?: string | number | undefined;
|
|
49420
49416
|
strokeWidth?: string | number | undefined;
|
|
49421
49417
|
color?: string | undefined;
|
|
49422
49418
|
isDashed?: boolean | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1278,9 +1278,12 @@ var subcircuitProps = subcircuitGroupProps;
|
|
|
1278
1278
|
expectTypesMatch(true);
|
|
1279
1279
|
|
|
1280
1280
|
// lib/components/analogsimulation.ts
|
|
1281
|
+
import { ms } from "circuit-json";
|
|
1281
1282
|
import { z as z58 } from "zod";
|
|
1282
1283
|
var analogSimulationProps = z58.object({
|
|
1283
|
-
simulationType: z58.literal("spice_transient_analysis").default("spice_transient_analysis")
|
|
1284
|
+
simulationType: z58.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
1285
|
+
duration: ms.optional(),
|
|
1286
|
+
timePerStep: ms.optional()
|
|
1284
1287
|
});
|
|
1285
1288
|
expectTypesMatch(
|
|
1286
1289
|
true
|
|
@@ -1698,10 +1701,11 @@ var schematicCircleProps = z79.object({
|
|
|
1698
1701
|
});
|
|
1699
1702
|
|
|
1700
1703
|
// lib/components/schematic-rect.ts
|
|
1701
|
-
import { distance as distance22,
|
|
1704
|
+
import { distance as distance22, rotation as rotation6 } from "circuit-json";
|
|
1702
1705
|
import { z as z80 } from "zod";
|
|
1703
1706
|
var schematicRectProps = z80.object({
|
|
1704
|
-
|
|
1707
|
+
schX: distance22.optional(),
|
|
1708
|
+
schY: distance22.optional(),
|
|
1705
1709
|
width: distance22,
|
|
1706
1710
|
height: distance22,
|
|
1707
1711
|
rotation: rotation6.default(0),
|
|
@@ -1887,7 +1891,7 @@ var portProps = commonLayoutProps.extend({
|
|
|
1887
1891
|
|
|
1888
1892
|
// lib/platformConfig.ts
|
|
1889
1893
|
import { z as z94 } from "zod";
|
|
1890
|
-
import { frequency as frequency4,
|
|
1894
|
+
import { frequency as frequency4, ms as ms2 } from "circuit-json";
|
|
1891
1895
|
var unvalidatedCircuitJson = z94.array(z94.any()).describe("Circuit JSON");
|
|
1892
1896
|
var footprintLibraryResult = z94.object({
|
|
1893
1897
|
footprintCircuitJson: z94.array(z94.any()),
|
|
@@ -1935,8 +1939,8 @@ var platformConfig = z94.object({
|
|
|
1935
1939
|
).optional(),
|
|
1936
1940
|
footprintFileParserMap: z94.record(z94.string(), footprintFileParserEntry).optional(),
|
|
1937
1941
|
simSwitchFrequency: frequency4.optional(),
|
|
1938
|
-
simCloseAt:
|
|
1939
|
-
simOpenAt:
|
|
1942
|
+
simCloseAt: ms2.optional(),
|
|
1943
|
+
simOpenAt: ms2.optional(),
|
|
1940
1944
|
simStartClosed: z94.boolean().optional(),
|
|
1941
1945
|
simStartOpen: z94.boolean().optional()
|
|
1942
1946
|
});
|