@tscircuit/props 0.0.583 → 0.0.584
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/dist/index.d.ts +6 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/lib/components/battery.ts +7 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -104772,11 +104772,14 @@ declare const symbolProps: z.ZodObject<{
|
|
|
104772
104772
|
}>;
|
|
104773
104773
|
type SymbolPropsInput = z.input<typeof symbolProps>;
|
|
104774
104774
|
|
|
104775
|
+
declare const batteryPins: readonly ["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"];
|
|
104776
|
+
type BatteryPinLabels = (typeof batteryPins)[number];
|
|
104775
104777
|
interface BatteryProps<PinLabel extends string = string> extends CommonComponentProps<PinLabel> {
|
|
104776
104778
|
capacity?: number | string;
|
|
104777
104779
|
voltage?: number | string;
|
|
104778
104780
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C";
|
|
104779
104781
|
schOrientation?: SchematicOrientation;
|
|
104782
|
+
connections?: Connections<BatteryPinLabels>;
|
|
104780
104783
|
}
|
|
104781
104784
|
declare const batteryProps: z.ZodObject<{
|
|
104782
104785
|
pcbX: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>]>>;
|
|
@@ -108142,6 +108145,7 @@ declare const batteryProps: z.ZodObject<{
|
|
|
108142
108145
|
voltage: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
108143
108146
|
standard: z.ZodOptional<z.ZodEnum<["AA", "AAA", "9V", "CR2032", "18650", "C"]>>;
|
|
108144
108147
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
108148
|
+
connections: 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">]>>>;
|
|
108145
108149
|
}, "strip", z.ZodTypeAny, {
|
|
108146
108150
|
name: string;
|
|
108147
108151
|
symbol?: SymbolProp | undefined;
|
|
@@ -108720,6 +108724,7 @@ declare const batteryProps: z.ZodObject<{
|
|
|
108720
108724
|
manufacturerPartNumber?: string | undefined;
|
|
108721
108725
|
schSectionName?: string | undefined;
|
|
108722
108726
|
schSheetName?: string | undefined;
|
|
108727
|
+
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
108723
108728
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
108724
108729
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
108725
108730
|
capacity?: number | undefined;
|
|
@@ -109304,13 +109309,12 @@ declare const batteryProps: z.ZodObject<{
|
|
|
109304
109309
|
manufacturerPartNumber?: string | undefined;
|
|
109305
109310
|
schSectionName?: string | undefined;
|
|
109306
109311
|
schSheetName?: string | undefined;
|
|
109312
|
+
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
109307
109313
|
standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C" | undefined;
|
|
109308
109314
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
109309
109315
|
capacity?: string | number | undefined;
|
|
109310
109316
|
voltage?: string | number | undefined;
|
|
109311
109317
|
}>;
|
|
109312
|
-
declare const batteryPins: readonly ["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"];
|
|
109313
|
-
type BatteryPinLabels = (typeof batteryPins)[number];
|
|
109314
109318
|
|
|
109315
109319
|
type MountedBoardChipProps = Pick<ChipPropsSU, "manufacturerPartNumber" | "pinLabels" | "showPinAliases" | "pcbPinLabels" | "schPortArrangement" | "pinCompatibleVariants" | "noSchematicRepresentation" | "internallyConnectedPins" | "externallyConnectedPins">;
|
|
109316
109320
|
interface MountedBoardProps extends SubcircuitGroupProps, MountedBoardChipProps {
|
package/dist/index.js
CHANGED
|
@@ -17390,13 +17390,14 @@ var capacity = z72.number().or(z72.string().endsWith("mAh")).transform((v) => {
|
|
|
17390
17390
|
}
|
|
17391
17391
|
return v;
|
|
17392
17392
|
}).describe("Battery capacity in mAh");
|
|
17393
|
+
var batteryPins = lrPolarPins;
|
|
17393
17394
|
var batteryProps = commonComponentProps.extend({
|
|
17394
17395
|
capacity: capacity.optional(),
|
|
17395
17396
|
voltage: voltage2.optional(),
|
|
17396
17397
|
standard: z72.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17397
|
-
schOrientation: schematicOrientation.optional()
|
|
17398
|
+
schOrientation: schematicOrientation.optional(),
|
|
17399
|
+
connections: createConnectionsProp(batteryPins).optional()
|
|
17398
17400
|
});
|
|
17399
|
-
var batteryPins = lrPolarPins;
|
|
17400
17401
|
expectTypesMatch(true);
|
|
17401
17402
|
|
|
17402
17403
|
// lib/components/mountedboard.ts
|