import { z } from "zod"; import { Style } from "@react-pdf/stylesheet"; import { FC } from "react"; type ComponentGetter =

( componentDefinition: | ComponentDefinition | { name: string }, ) => FC

; export type ComponentDefinition = { name: N; overwrites?: string; schema: z.ZodType; additionalProps?: z.ZodType

; component: React.ComponentType< { spec: T; styles: S; globalStyles: any; getComponent: ComponentGetter; resolvePath: (path: string) => string; } & P >; defaultStyles: S; }; export const defineComponent = ( definition: ComponentDefinition, ): ComponentDefinition => definition;