@tscircuit/core 0.0.137 → 0.0.138
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 +5 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6220,14 +6220,15 @@ declare const useRenderedCircuit: (reactElements: React.ReactElement) => {
|
|
|
6220
6220
|
circuitJson?: AnyCircuitElement[];
|
|
6221
6221
|
};
|
|
6222
6222
|
|
|
6223
|
+
type PinLabelSpec<PinLabel extends string> = readonly PinLabel[] | readonly (readonly PinLabel[])[] | {
|
|
6224
|
+
[key: string]: readonly PinLabel[];
|
|
6225
|
+
};
|
|
6223
6226
|
type ComponentWithPins<Props, PinLabel extends string | never = never, PropsFromHook extends Omit<Props, "name"> | undefined = undefined> = React.ComponentType<(PropsFromHook extends undefined ? Omit<Props, "name"> : Omit<Partial<Props>, "name">) & {
|
|
6224
6227
|
[key in PinLabel]?: string;
|
|
6225
6228
|
}> & {
|
|
6226
6229
|
[key in PinLabel]: string;
|
|
6227
6230
|
};
|
|
6228
|
-
declare const createUseComponent: <Props, PinLabel extends string | never = never>(Component: React.ComponentType<Props>, pins:
|
|
6229
|
-
[key: string]: readonly PinLabel[];
|
|
6230
|
-
}) => (<PropsFromHook extends Omit<Props, "name"> | undefined = undefined>(name: string, props?: PropsFromHook) => ComponentWithPins<Props, PinLabel, PropsFromHook>);
|
|
6231
|
+
declare const createUseComponent: <Props, PinLabel extends string | never = never>(Component: React.ComponentType<Props>, pins: PinLabelSpec<PinLabel>) => (<PropsFromHook extends Omit<Props, "name"> | undefined = undefined>(name: string, props?: PropsFromHook) => ComponentWithPins<Props, PinLabel, PropsFromHook>);
|
|
6231
6232
|
|
|
6232
6233
|
declare global {
|
|
6233
6234
|
namespace JSX {
|
|
@@ -6276,4 +6277,4 @@ declare global {
|
|
|
6276
6277
|
}
|
|
6277
6278
|
}
|
|
6278
6279
|
|
|
6279
|
-
export { Battery, Board, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Diode, FabricationNotePath, FabricationNoteText, Footprint, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, Net, NetAlias, NormalComponent, PlatedHole, Port, PowerSource, PrimitiveComponent, Project, Renderable, Resistor, SilkscreenCircle, SilkscreenPath, SilkscreenRect, SilkscreenText, SmtPad, Trace, TraceHint, Via, createUseComponent, useRenderedCircuit };
|
|
6280
|
+
export { Battery, Board, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, Diode, FabricationNotePath, FabricationNoteText, Footprint, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, Net, NetAlias, NormalComponent, type PinLabelSpec, PlatedHole, Port, PowerSource, PrimitiveComponent, Project, Renderable, Resistor, SilkscreenCircle, SilkscreenPath, SilkscreenRect, SilkscreenText, SmtPad, Trace, TraceHint, Via, createUseComponent, useRenderedCircuit };
|