/** * story-meta.ts * * Shared metadata contract between EDS components and Storybook. * * Each component declares a static `storyMeta` property that fully describes * its public API (props, variants, sizes, …). Storybook stories import this * metadata and use `buildArgTypes` / `buildStories` to avoid duplicating * anything. */ export type PropControl = { type: "select"; options: string[]; } | { type: "boolean"; } | { type: "number"; min?: number; max?: number; step?: number; } | { type: "object"; } | { type: "text"; }; export interface PropMeta { /** Human-readable description shown in the Storybook Controls panel. */ description: string; /** Which Storybook control widget to use. */ control: PropControl; /** Default value to pre-fill in Controls. */ defaultValue?: unknown; } export interface StoryMeta { /** Storybook title path, e.g. "Components/Button". */ title: string; /** Custom-element tag name, e.g. "eds-button". */ tag: string; /** Full props API. Keys must match the LitElement @property names. */ props: Record; /** * Optional per-story overrides. * Each entry becomes a named export in the story file. */ stories?: StoryEntry[]; cssProperties?: { [key: string]: string | { description: string; default: string; }; }; cssParts?: { [key: string]: string | { description: string; }; }; slots?: { [key: string]: string | { description: string; }; }; events?: { [key: string]: string | { description: string; }; }; } export interface StoryEntry { /** Export name used by Storybook, e.g. "Primary". */ name: string; /** Human-readable display name shown in the sidebar (optional). */ displayName?: string; /** Default arg values for this story. */ args?: Record; /** Raw HTML template. Use {{propName}} as placeholders. */ template?: string; } /** * Convert a component's `storyMeta.props` into the `argTypes` object that * Storybook's `Meta` expects. */ export declare function buildArgTypes(props: Record): Record; //# sourceMappingURL=story-meta.d.ts.map