/** * Zod schemas for the *data props* of Grackle's built-in GenUX components (#1271). * * These zod schemas are the single source of truth for both: * - the components' prop types — `@grackle-ai/web-components` imports the inferred * `…BuiltinProps` types so a schema/component drift is a compile error, and * - the built-in catalog's JSON Schema — `builtin-components.ts` derives it via * `z.toJSONSchema()` instead of hand-authoring it (see {@link BUILTIN_COMPONENT_SCHEMAS}). * * Only *data* props are modelled: callbacks (`onClick`), `children`, refs, and * styling hooks (`className`, `data-testid`) are expressed in JSX, not as JSON * props, so the components add those on top of the inferred types. */ import { z } from "zod"; /** Visual variant shared by Button and SplitButton. */ export declare const buttonVariantSchema: z.ZodEnum<{ primary: "primary"; danger: "danger"; outline: "outline"; ghost: "ghost"; }>; /** Visual variant shared by Button and SplitButton. */ export type ButtonVariant = z.infer; /** Size shared by Button and SplitButton. */ export declare const buttonSizeSchema: z.ZodEnum<{ sm: "sm"; md: "md"; lg: "lg"; }>; /** Size shared by Button and SplitButton. */ export type ButtonSize = z.infer; /** Spinner size. */ export declare const spinnerSizeSchema: z.ZodEnum<{ sm: "sm"; md: "md"; lg: "lg"; xl: "xl"; }>; /** Spinner size. */ export type SpinnerSize = z.infer; /** Skeleton shape variant. */ export declare const skeletonVariantSchema: z.ZodEnum<{ rectangular: "rectangular"; circular: "circular"; }>; /** Skeleton shape variant. */ export type SkeletonVariant = z.infer; /** Callout severity. */ export declare const calloutVariantSchema: z.ZodEnum<{ error: "error"; success: "success"; info: "info"; warning: "warning"; }>; /** Callout severity. */ export type CalloutVariant = z.infer; /** Tooltip placement relative to its anchor. */ export declare const tooltipPlacementSchema: z.ZodEnum<{ top: "top"; bottom: "bottom"; left: "left"; right: "right"; }>; /** Tooltip placement relative to its anchor. */ export type TooltipPlacement = z.infer; /** Data props for the `Button` built-in. */ export declare const buttonPropsSchema: z.ZodObject<{ variant: z.ZodOptional>; size: z.ZodOptional>; disabled: z.ZodOptional; }, z.core.$strip>; /** Data props for the `Button` built-in. */ export type ButtonBuiltinProps = z.infer; /** A single option in a `SplitButton` dropdown (data shape; the `onClick` callback is added by the component). */ export declare const splitButtonOptionSchema: z.ZodObject<{ label: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; /** Data props for the `SplitButton` built-in. */ export declare const splitButtonPropsSchema: z.ZodObject<{ label: z.ZodString; variant: z.ZodOptional>; size: z.ZodOptional>; options: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>; /** Data props for the `SplitButton` built-in. */ export type SplitButtonBuiltinProps = z.infer; /** Data props for the `Callout` built-in. */ export declare const calloutPropsSchema: z.ZodObject<{ variant: z.ZodOptional>; dismissible: z.ZodOptional; }, z.core.$strip>; /** Data props for the `Callout` built-in. */ export type CalloutBuiltinProps = z.infer; /** Data props for the `Spinner` built-in. */ export declare const spinnerPropsSchema: z.ZodObject<{ size: z.ZodOptional>; label: z.ZodOptional; liveRegion: z.ZodOptional; }, z.core.$strip>; /** Data props for the `Spinner` built-in. */ export type SpinnerBuiltinProps = z.infer; /** Data props for the `Skeleton` built-in. */ export declare const skeletonPropsSchema: z.ZodObject<{ width: z.ZodOptional; height: z.ZodOptional; borderRadius: z.ZodOptional; variant: z.ZodOptional>; }, z.core.$strip>; /** Data props for the `Skeleton` built-in. */ export type SkeletonBuiltinProps = z.infer; /** Data props for the `SkeletonText` built-in. */ export declare const skeletonTextPropsSchema: z.ZodObject<{ lines: z.ZodOptional; lastLineWidth: z.ZodOptional; lineHeight: z.ZodOptional; gap: z.ZodOptional; }, z.core.$strip>; /** Data props for the `SkeletonText` built-in. */ export type SkeletonTextBuiltinProps = z.infer; /** Data props for the `SkeletonCard` built-in. */ export declare const skeletonCardPropsSchema: z.ZodObject<{ lines: z.ZodOptional; }, z.core.$strip>; /** Data props for the `SkeletonCard` built-in. */ export type SkeletonCardBuiltinProps = z.infer; /** Data props for the `Tooltip` built-in. */ export declare const tooltipPropsSchema: z.ZodObject<{ text: z.ZodString; placement: z.ZodOptional>; delayMs: z.ZodOptional; }, z.core.$strip>; /** Data props for the `Tooltip` built-in. */ export type TooltipBuiltinProps = z.infer; /** Data props for the `CopyButton` built-in. */ export declare const copyButtonPropsSchema: z.ZodObject<{ text: z.ZodString; }, z.core.$strip>; /** Data props for the `CopyButton` built-in. */ export type CopyButtonBuiltinProps = z.infer; /** * Built-in component name → its zod data-prop schema. The keys MUST match the * runtime component scope and the {@link BUILTIN_COMPONENTS} catalog (enforced by * tests). Reused by `builtin-components.ts` to derive the JSON Schema catalog, * and available for promote-to-tool (#1272) where a schema becomes a tool's * `inputSchema`. */ export declare const BUILTIN_COMPONENT_SCHEMAS: { readonly Button: z.ZodObject<{ variant: z.ZodOptional>; size: z.ZodOptional>; disabled: z.ZodOptional; }, z.core.$strip>; readonly SplitButton: z.ZodObject<{ label: z.ZodString; variant: z.ZodOptional>; size: z.ZodOptional>; options: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>; readonly Callout: z.ZodObject<{ variant: z.ZodOptional>; dismissible: z.ZodOptional; }, z.core.$strip>; readonly Spinner: z.ZodObject<{ size: z.ZodOptional>; label: z.ZodOptional; liveRegion: z.ZodOptional; }, z.core.$strip>; readonly Skeleton: z.ZodObject<{ width: z.ZodOptional; height: z.ZodOptional; borderRadius: z.ZodOptional; variant: z.ZodOptional>; }, z.core.$strip>; readonly SkeletonText: z.ZodObject<{ lines: z.ZodOptional; lastLineWidth: z.ZodOptional; lineHeight: z.ZodOptional; gap: z.ZodOptional; }, z.core.$strip>; readonly SkeletonCard: z.ZodObject<{ lines: z.ZodOptional; }, z.core.$strip>; readonly Tooltip: z.ZodObject<{ text: z.ZodString; placement: z.ZodOptional>; delayMs: z.ZodOptional; }, z.core.$strip>; readonly CopyButton: z.ZodObject<{ text: z.ZodString; }, z.core.$strip>; }; /** Name of a built-in component (a key of {@link BUILTIN_COMPONENT_SCHEMAS}). */ export type BuiltinComponentName = keyof typeof BUILTIN_COMPONENT_SCHEMAS; //# sourceMappingURL=builtin-component-schemas.d.ts.map