{"version":3,"file":"types-DBNd2FJY.cjs","names":[],"sources":["../src/registry/types.ts"],"sourcesContent":["/**\n * Machine-readable component metadata.\n *\n * Every component ships a `<Name>.meta.ts` exporting a `ComponentMeta`. A build\n * script (`scripts/build-registry.ts`) aggregates these into the JSON files in\n * this folder, which power LLM / generative-UI tooling.\n */\n\nexport type AtomicLevel =\n  | 'token'\n  | 'atom'\n  | 'molecule'\n  | 'organism'\n  | 'template'\n  | 'page';\n\n/**\n * How a component relates to MUI:\n * - themed-mui:   pure MUI component, only themed (no wrapper code)\n * - mui-overrides: MUI component with custom style/prop overrides in the theme\n * - mui-wrapper:  thin wrapper adding standard product behavior around MUI\n * - custom:       fully custom component (no direct MUI base)\n * - third-party-wrapper: wraps a heavy third-party dependency declared as a peer\n */\nexport type Classification =\n  | 'themed-mui'\n  | 'mui-overrides'\n  | 'mui-wrapper'\n  | 'custom'\n  | 'third-party-wrapper';\n\nexport interface PropMeta {\n  name: string;\n  type: string;\n  required?: boolean;\n  description?: string;\n  default?: string;\n}\n\nexport interface ComponentMeta {\n  /** PascalCase component name, e.g. \"Button\". */\n  name: string;\n  level: AtomicLevel;\n  /** Functional category, e.g. \"input\", \"feedback\", \"navigation\". */\n  category: string;\n  classification: Classification;\n  description: string;\n  /** Base library, e.g. \"@mui/material\" or \"custom\". */\n  baseLibrary: string;\n  /** Name of the equivalent MUI component, if any. */\n  muiEquivalent?: string;\n  /** Official MUI docs URL, if applicable. */\n  muiDocs?: string;\n  /** Equivalent in A2UI / other generative UI systems, if known. */\n  a2uiEquivalent?: string;\n  /** Repo-internal source path, e.g. \"@/atoms/Chip\". Not for consumers. */\n  importPath: string;\n  /**\n   * Bare-specifier import consumers must use, e.g. \"@aistrike-dev/ui\" or a\n   * subpath like \"@aistrike-dev/ui/charts\". Defaults to the package root, so\n   * only components shipped from a subpath need to set this.\n   */\n  packageImport?: string;\n  props?: PropMeta[];\n  requiredProps?: string[];\n  optionalProps?: string[];\n  /** Custom variants this component adds beyond MUI defaults. */\n  customVariants?: string[];\n  /** Interactive / visual states supported. */\n  supportedStates?: string[];\n  /** Design token groups this component consumes. */\n  designTokens?: string[];\n  accessibility?: string[];\n  usageExamples?: string[];\n  /**\n   * Positive usage and selection guidance: which variant to reach for, how to\n   * size it, when to ask. Short imperatives, one rule per entry. The negative\n   * counterpart is `antiPatterns` - never state the same rule in both.\n   */\n  rules?: string[];\n  antiPatterns?: string[];\n  /**\n   * How this component paints a surface rung of its own — either by rendering a\n   * `Surface` or by setting its own background.\n   *\n   * Nesting surfaces is capped at three levels, and that cap can only be checked\n   * statically if a tool knows which components count as a level: a `Card`\n   * inside a `Card` is two levels even though neither mentions `Surface` in the\n   * consumer's source. The build emits these into\n   * `registry/surface-mounting.json`, which the ESLint rule and the\n   * `check-surfaces` CLI both read.\n   *\n   * The two values are not a detail — they decide whether nesting in *source*\n   * means nesting on *screen*:\n   *\n   * - `inline` stays in the DOM where it is written, so JSX nesting is real\n   *   nesting and counts toward the cap.\n   * - `portal` is reparented to `document.body`, so it escapes its author's\n   *   nesting entirely. A `Dialog` written inside a `Card` is not two levels;\n   *   the dialog renders over the whole page. Counting these would flag code\n   *   that is perfectly fine, so a static check must not.\n   */\n  mountsSurface?: 'inline' | 'portal';\n  /** Whether this component is safe to use in LLM-generated UI. */\n  llmSafe: boolean;\n  whenToUse?: string[];\n  whenNotToUse?: string[];\n  /** Link back to the Figma node, if this maps to a specific design. */\n  figma?: string;\n}\n\n/** Identity helper for authoring metadata with full type-checking. */\nexport function defineMeta(meta: ComponentMeta): ComponentMeta {\n  return meta;\n}\n"],"mappings":"AAgHA,SAAgB,EAAW,EAAoC,CAC7D,OAAO,CACT"}