@tscircuit/props 0.0.668 → 0.0.669
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 +16 -3
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/lib/common/schematicSize.ts +3 -2
- package/lib/components/diode.ts +8 -0
- package/lib/components/led.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -902,6 +902,8 @@ export interface DiodeProps<
|
|
|
902
902
|
photo?: boolean;
|
|
903
903
|
tvs?: boolean;
|
|
904
904
|
schOrientation?: SchematicOrientation;
|
|
905
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
906
|
+
schSize?: SchematicSymbolSize;
|
|
905
907
|
}
|
|
906
908
|
```
|
|
907
909
|
|
package/dist/index.d.ts
CHANGED
|
@@ -27561,7 +27561,7 @@ declare const schematicPinStyle: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
27561
27561
|
declare const schematicPinLabel: z.ZodString;
|
|
27562
27562
|
type SchematicPinLabel = z.infer<typeof schematicPinLabel>;
|
|
27563
27563
|
|
|
27564
|
-
declare const schematicSymbolSize: z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.
|
|
27564
|
+
declare const schematicSymbolSize: z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>;
|
|
27565
27565
|
type SchematicSymbolSize = z.input<typeof schematicSymbolSize>;
|
|
27566
27566
|
|
|
27567
27567
|
declare const kicadPinElectricalType: z.ZodEnum<["input", "output", "bidirectional", "tri_state", "passive", "free", "unspecified", "power_in", "power_out", "open_collector", "open_emitter", "no_connect"]>;
|
|
@@ -92895,7 +92895,7 @@ declare const resistorProps: z.ZodObject<{
|
|
|
92895
92895
|
pulldownFor: z.ZodOptional<z.ZodString>;
|
|
92896
92896
|
pulldownTo: z.ZodOptional<z.ZodString>;
|
|
92897
92897
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
92898
|
-
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.
|
|
92898
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
92899
92899
|
connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "pin2", "pos", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
92900
92900
|
}, "strip", z.ZodTypeAny, {
|
|
92901
92901
|
name: string;
|
|
@@ -115609,7 +115609,7 @@ declare const capacitorProps: z.ZodObject<{
|
|
|
115609
115609
|
bypassTo: z.ZodOptional<z.ZodString>;
|
|
115610
115610
|
maxDecouplingTraceLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
115611
115611
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
115612
|
-
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.
|
|
115612
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
115613
115613
|
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">]>>>;
|
|
115614
115614
|
}, "strip", z.ZodTypeAny, {
|
|
115615
115615
|
name: string;
|
|
@@ -182204,6 +182204,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
182204
182204
|
photo: z.ZodOptional<z.ZodBoolean>;
|
|
182205
182205
|
tvs: z.ZodOptional<z.ZodBoolean>;
|
|
182206
182206
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
182207
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
182207
182208
|
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
182208
182209
|
}, "strip", z.ZodTypeAny, {
|
|
182209
182210
|
name: string;
|
|
@@ -182882,6 +182883,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
182882
182883
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
182883
182884
|
standard?: boolean | undefined;
|
|
182884
182885
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
182886
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
182885
182887
|
schottky?: boolean | undefined;
|
|
182886
182888
|
zener?: boolean | undefined;
|
|
182887
182889
|
avalanche?: boolean | undefined;
|
|
@@ -183565,6 +183567,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
183565
183567
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
183566
183568
|
standard?: boolean | undefined;
|
|
183567
183569
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
183570
|
+
schSize?: string | number | undefined;
|
|
183568
183571
|
schottky?: boolean | undefined;
|
|
183569
183572
|
zener?: boolean | undefined;
|
|
183570
183573
|
avalanche?: boolean | undefined;
|
|
@@ -184248,6 +184251,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
184248
184251
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
184249
184252
|
standard?: boolean | undefined;
|
|
184250
184253
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
184254
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
184251
184255
|
schottky?: boolean | undefined;
|
|
184252
184256
|
zener?: boolean | undefined;
|
|
184253
184257
|
avalanche?: boolean | undefined;
|
|
@@ -184931,6 +184935,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
184931
184935
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
184932
184936
|
standard?: boolean | undefined;
|
|
184933
184937
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
184938
|
+
schSize?: string | number | undefined;
|
|
184934
184939
|
schottky?: boolean | undefined;
|
|
184935
184940
|
zener?: boolean | undefined;
|
|
184936
184941
|
avalanche?: boolean | undefined;
|
|
@@ -185619,6 +185624,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
185619
185624
|
connections?: Partial<Record<"pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
185620
185625
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
185621
185626
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
185627
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
185622
185628
|
}, {
|
|
185623
185629
|
name: string;
|
|
185624
185630
|
symbol?: SymbolProp | undefined;
|
|
@@ -186297,6 +186303,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
186297
186303
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
186298
186304
|
standard?: boolean | undefined;
|
|
186299
186305
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
186306
|
+
schSize?: string | number | undefined;
|
|
186300
186307
|
schottky?: boolean | undefined;
|
|
186301
186308
|
zener?: boolean | undefined;
|
|
186302
186309
|
avalanche?: boolean | undefined;
|
|
@@ -186322,6 +186329,8 @@ interface DiodeProps<PinLabel extends string = string> extends CommonComponentPr
|
|
|
186322
186329
|
photo?: boolean;
|
|
186323
186330
|
tvs?: boolean;
|
|
186324
186331
|
schOrientation?: SchematicOrientation;
|
|
186332
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
186333
|
+
schSize?: SchematicSymbolSize;
|
|
186325
186334
|
}
|
|
186326
186335
|
type InferredDiodeProps = z.input<typeof diodeProps>;
|
|
186327
186336
|
|
|
@@ -190238,6 +190247,8 @@ declare const ledProps: z.ZodObject<{
|
|
|
190238
190247
|
wavelength: z.ZodOptional<z.ZodString>;
|
|
190239
190248
|
schDisplayValue: z.ZodOptional<z.ZodString>;
|
|
190240
190249
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
190250
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
190251
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
190241
190252
|
pinLabels: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodEnum<["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>, z.ZodEffects<z.ZodRecord<z.ZodEnum<["1", "2"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>, {
|
|
190242
190253
|
pin2?: string | readonly string[] | string[] | undefined;
|
|
190243
190254
|
pin1?: string | readonly string[] | string[] | undefined;
|
|
@@ -190922,6 +190933,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
190922
190933
|
pin1?: string | readonly string[] | string[] | undefined;
|
|
190923
190934
|
} | undefined;
|
|
190924
190935
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
190936
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
190925
190937
|
color?: string | undefined;
|
|
190926
190938
|
wavelength?: string | undefined;
|
|
190927
190939
|
schDisplayValue?: string | undefined;
|
|
@@ -191603,6 +191615,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
191603
191615
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
191604
191616
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | Partial<Record<"1" | "2", string | readonly string[] | string[]>> | undefined;
|
|
191605
191617
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
191618
|
+
schSize?: string | number | undefined;
|
|
191606
191619
|
color?: string | undefined;
|
|
191607
191620
|
wavelength?: string | undefined;
|
|
191608
191621
|
schDisplayValue?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -16192,7 +16192,7 @@ var schematicPinLabel = z27.string().regex(/^[A-Za-z0-9_]+$/);
|
|
|
16192
16192
|
// lib/common/schematicSize.ts
|
|
16193
16193
|
import { distance as distance10 } from "circuit-json";
|
|
16194
16194
|
import { z as z28 } from "zod";
|
|
16195
|
-
var schematicSymbolSize =
|
|
16195
|
+
var schematicSymbolSize = z28.enum(["xs", "sm", "default", "md"]).or(distance10.pipe(z28.number().finite())).describe("distance between pin1 and pin2 of the schematic symbol");
|
|
16196
16196
|
|
|
16197
16197
|
// lib/common/kicadPinMetadata.ts
|
|
16198
16198
|
import { z as z29 } from "zod";
|
|
@@ -18381,6 +18381,7 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18381
18381
|
photo: z102.boolean().optional(),
|
|
18382
18382
|
tvs: z102.boolean().optional(),
|
|
18383
18383
|
schOrientation: schematicOrientation.optional(),
|
|
18384
|
+
schSize: schematicSymbolSize.optional(),
|
|
18384
18385
|
pinLabels: diodePinLabelsProp.optional()
|
|
18385
18386
|
}).superRefine((data, ctx) => {
|
|
18386
18387
|
const enabledFlags = [
|
|
@@ -18456,6 +18457,8 @@ var ledProps = commonComponentProps.extend({
|
|
|
18456
18457
|
wavelength: z103.string().optional(),
|
|
18457
18458
|
schDisplayValue: z103.string().optional(),
|
|
18458
18459
|
schOrientation: schematicOrientation.optional(),
|
|
18460
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
18461
|
+
schSize: schematicSymbolSize.optional(),
|
|
18459
18462
|
// Numeric keys are accepted for compatibility with legacy generated LED
|
|
18460
18463
|
// wrappers, then normalized to the canonical pin1/pin2 representation.
|
|
18461
18464
|
pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
|