{"version":3,"file":"index.cjs","names":[],"sources":["../src/theme/palette.ts","../src/theme/typography.ts","../src/theme/variants.ts","../src/theme/components.ts","../src/theme/index.ts","../src/atoms/Button/Button.meta.ts","../src/atoms/Checkbox/Checkbox.meta.ts","../src/atoms/Radio/Radio.meta.ts","../src/atoms/Switch/Switch.meta.ts","../src/atoms/TextField/TextField.meta.ts","../src/atoms/Select/Select.meta.ts","../src/atoms/Avatar/Avatar.meta.ts","../src/atoms/Chip/Chip.meta.ts","../src/atoms/Divider/Divider.meta.ts","../src/atoms/Surface/surfaceContext.ts","../src/atoms/Surface/Surface.tsx","../src/atoms/Surface/Surface.meta.ts","../src/atoms/Icon/Icon.tsx","../src/atoms/Icon/Icon.meta.ts","../src/atoms/Typography/Typography.meta.ts","../src/atoms/Tooltip/Tooltip.meta.ts","../src/atoms/Badge/Badge.meta.ts","../src/atoms/Skeleton/Skeleton.meta.ts","../src/atoms/Slider/Slider.meta.ts","../src/atoms/Rating/Rating.meta.ts","../src/atoms/FAB/FAB.meta.ts","../src/atoms/ToggleButton/ToggleButton.meta.ts","../src/atoms/IconButton/IconButton.tsx","../src/atoms/IconButton/IconButton.meta.ts","../src/atoms/Sparkline/Sparkline.meta.ts","../src/molecules/Search/Search.tsx","../src/molecules/Search/Search.meta.ts","../src/molecules/Autocomplete/Autocomplete.meta.ts","../src/molecules/Breadcrumbs/Breadcrumbs.meta.ts","../src/molecules/Menu/Menu.meta.ts","../src/molecules/ButtonGroup/ButtonGroup.meta.ts","../src/molecules/FormField/FormField.tsx","../src/molecules/FormField/FormField.meta.ts","../src/molecules/DatePicker/DatePicker.meta.ts","../src/molecules/DateRangePicker/DateRangePicker.tsx","../src/molecules/DateRangePicker/DateRangePicker.meta.ts","../src/molecules/TimePicker/TimePicker.meta.ts","../src/molecules/Snackbar/Snackbar.meta.ts","../src/molecules/Alert/Alert.meta.ts","../src/molecules/Progress/Progress.meta.ts","../src/molecules/Pagination/Pagination.meta.ts","../src/molecules/Tabs/Tabs.meta.ts","../src/molecules/Popover/Popover.meta.ts","../src/molecules/Meter/meterGeometry.ts","../src/molecules/Meter/Meter.tsx","../src/molecules/Meter/Meter.meta.ts","../src/molecules/ChipGroup/ChipGroup.tsx","../src/molecules/ChipGroup/ChipGroup.meta.ts","../src/molecules/EntityMenu/EntityMenu.meta.ts","../src/molecules/FilterMenu/FilterMenu.tsx","../src/molecules/FilterMenu/FilterMenu.meta.ts","../src/molecules/SplitBar/SplitBar.tsx","../src/molecules/SplitBar/SplitBar.meta.ts","../src/molecules/StatTile/StatTile.meta.ts","../src/organisms/Card/Card.tsx","../src/organisms/Card/Card.meta.ts","../src/organisms/Dialog/Dialog.tsx","../src/organisms/Dialog/Dialog.meta.ts","../src/organisms/Modal/Modal.meta.ts","../src/organisms/Accordion/Accordion.meta.ts","../src/organisms/AppBar/AppBar.meta.ts","../src/organisms/Drawer/Drawer.meta.ts","../src/organisms/LeftNavigation/LeftNavigation.tsx","../src/organisms/LeftNavigation/LeftNavigation.meta.ts","../src/organisms/Stepper/Stepper.meta.ts","../src/organisms/TransferList/TransferList.tsx","../src/organisms/TransferList/TransferList.meta.ts","../src/organisms/ImageList/ImageList.meta.ts","../src/organisms/SpeedDial/SpeedDial.meta.ts","../src/organisms/FormSection/FormSection.tsx","../src/organisms/FormSection/FormSection.meta.ts","../src/organisms/FilterPanel/FilterPanel.tsx","../src/organisms/FilterPanel/FilterPanel.meta.ts","../src/organisms/FilterPopover/FilterPopover.tsx","../src/organisms/FilterPopover/FilterPopover.meta.ts","../src/organisms/EmptyState/EmptyState.meta.ts","../src/organisms/AttackPathLegend/AttackPathLegend.tsx","../src/organisms/AttackPathLegend/AttackPathLegend.meta.ts","../src/organisms/Table/Table.tsx","../src/organisms/Table/cells/TableCells.tsx","../src/organisms/Table/Table.meta.ts","../src/organisms/Table/cells/TableCells.meta.ts","../src/templates/DashboardLayout/DashboardLayout.tsx","../src/templates/DashboardLayout/DashboardLayout.meta.ts","../src/templates/TablePageLayout/TablePageLayout.tsx","../src/templates/TablePageLayout/TablePageLayout.meta.ts","../src/templates/SettingsLayout/SettingsLayout.tsx","../src/templates/SettingsLayout/SettingsLayout.meta.ts","../src/templates/FormPageLayout/FormPageLayout.tsx","../src/templates/FormPageLayout/FormPageLayout.meta.ts","../src/templates/DetailsPageLayout/DetailsPageLayout.tsx","../src/templates/DetailsPageLayout/DetailsPageLayout.meta.ts","../src/templates/InvestigationLayout/InvestigationLayout.tsx","../src/templates/InvestigationLayout/InvestigationLayout.meta.ts","../src/pages/DashboardExample/DashboardExample.tsx","../src/pages/DashboardExample/DashboardExample.meta.ts","../src/pages/TableExample/TableExample.tsx","../src/pages/TableExample/TableExample.meta.ts","../src/pages/InventoryExample/InventoryExample.tsx","../src/pages/InventoryExample/InventoryExample.meta.ts","../src/pages/ThreatsExample/ThreatsExample.tsx","../src/pages/ThreatsExample/ThreatsExample.meta.ts","../src/pages/ThreatsListExample/ThreatsListExample.tsx","../src/pages/ThreatsListExample/ThreatsListExample.meta.ts","../src/pages/AlertsExample/AlertsExample.tsx","../src/pages/AlertsExample/AlertsExample.meta.ts","../src/pages/SettingsExample/SettingsExample.tsx","../src/pages/SettingsExample/SettingsExample.meta.ts","../src/pages/FormExample/FormExample.tsx","../src/pages/FormExample/FormExample.meta.ts"],"sourcesContent":["import type { PaletteOptions } from '@mui/material/styles';\nimport {\n  backgroundColors,\n  lightBackgroundColors,\n  lightInputColors,\n  lightTextColors,\n  statusColors,\n  severityColors,\n  neutral,\n  textColors,\n  brand,\n} from '@/tokens/colors';\n\n/**\n * Severity palette shared by both modes. These map to the security-specific\n * semantic colors from Figma and are exposed as a custom `severity` palette\n * key (see theme augmentation).\n */\nexport const severityPalette = {\n  critical: { main: severityColors.critical, contrastText: '#FFFFFF' },\n  high: { main: severityColors.high, contrastText: '#FFFFFF' },\n  medium: { main: severityColors.medium, contrastText: '#1A1A1A' },\n  low: { main: severityColors.low, contrastText: '#1A1A1A' },\n  info: { main: severityColors.info, contrastText: '#FFFFFF' },\n  untriaged: { main: severityColors.untriaged, contrastText: '#1A1A1A' },\n} as const;\n\n/** Dark palette - the primary, Figma-accurate theme. */\nexport const darkPalette: PaletteOptions = {\n  mode: 'dark',\n  primary: {\n    main: brand.main,\n    contrastText: '#06201C',\n  },\n  /**\n   * The system has one accent, so `secondary` is the brand rather than a second\n   * hue. It used to be `brand.link`, which meant any component rendered with\n   * `color=\"secondary\"` — a Pagination item, a Badge, a Switch — painted link\n   * ink as a background fill.\n   *\n   * MUI requires the slot, so it cannot simply be dropped: omitting it falls\n   * back to MUI's default purple, which is further off-system than what it\n   * replaced. Aliasing it to the brand makes `color=\"secondary\"` a harmless\n   * synonym for `color=\"primary\"` instead of a way to introduce a colour the\n   * design system does not have.\n   *\n   * `contrastText` matches `primary` for the same reason it is dark there:\n   * white on brand teal is 2.2:1.\n   */\n  secondary: {\n    main: brand.main,\n    contrastText: '#06201C',\n  },\n  error: { main: statusColors.failure, contrastText: '#FFFFFF' },\n  warning: { main: statusColors.warning, contrastText: '#1A1A1A' },\n  info: { main: statusColors.info, contrastText: '#FFFFFF' },\n  success: { main: statusColors.success, contrastText: '#FFFFFF' },\n  background: {\n    default: backgroundColors.primary,\n    paper: backgroundColors.widget,\n  },\n  text: {\n    primary: textColors.primary,\n    secondary: textColors.secondary,\n    disabled: textColors.disabled,\n  },\n  divider: backgroundColors.border,\n  grey: {\n    50: neutral[50],\n    100: neutral[100],\n    200: neutral[200],\n    300: neutral[300],\n    400: neutral[400],\n    500: neutral[500],\n    600: neutral[600],\n    700: neutral[700],\n    800: neutral[800],\n    900: neutral[900],\n  },\n  severity: severityPalette,\n  action: {\n    hover: 'rgba(255, 255, 255, 0.06)',\n    selected: 'rgba(0, 196, 172, 0.16)',\n    disabled: textColors.disabled,\n    disabledBackground: 'rgba(255, 255, 255, 0.08)',\n  },\n};\n\n/** Light palette - derived for completeness; dark remains the default. */\nexport const lightPalette: PaletteOptions = {\n  mode: 'light',\n  primary: {\n    main: '#00897B',\n    contrastText: '#FFFFFF',\n  },\n  /** Brand rather than a second hue, for the reasons on the dark palette. */\n  secondary: {\n    main: '#00897B',\n    contrastText: '#FFFFFF',\n  },\n  // Option A Light §03: field error outline darkened to clear 3:1 on white.\n  error: { main: lightInputColors.errorBorder, contrastText: '#FFFFFF' },\n  warning: { main: statusColors.warning, contrastText: '#1A1A1A' },\n  info: { main: statusColors.info, contrastText: '#FFFFFF' },\n  success: { main: statusColors.success, contrastText: '#FFFFFF' },\n  background: {\n    // Same rung mapping as dark: body is `primary`, paper is `widget`.\n    default: lightBackgroundColors.primary,\n    paper: lightBackgroundColors.widget,\n  },\n  text: {\n    primary: lightTextColors.primary,\n    secondary: lightTextColors.secondary,\n    disabled: lightTextColors.disabled,\n  },\n  divider: lightBackgroundColors.border,\n  severity: severityPalette,\n};\n","import type { TypographyVariantsOptions } from '@mui/material/styles';\nimport { fontFamily, fontWeight, fontSize, lineHeight } from '@/tokens/typography';\n\n/**\n * Typography configuration mapping our type tokens to MUI's variant system.\n * The system-native sans-serif stack is the primary font for all variants.\n *\n * @see https://mui.com/material-ui/react-typography/\n */\nexport const typography: TypographyVariantsOptions = {\n  fontFamily: fontFamily.primary,\n  fontWeightLight: fontWeight.regular,\n  fontWeightRegular: fontWeight.regular,\n  fontWeightMedium: fontWeight.medium,\n  fontWeightBold: fontWeight.bold,\n  htmlFontSize: 16,\n  fontSize: fontSize.md,\n  h1: {\n    fontSize: fontSize['5xl'],\n    fontWeight: fontWeight.bold,\n    lineHeight: lineHeight.tight,\n  },\n  h2: {\n    fontSize: fontSize['4xl'],\n    fontWeight: fontWeight.bold,\n    lineHeight: lineHeight.tight,\n  },\n  h3: {\n    fontSize: fontSize['3xl'],\n    fontWeight: fontWeight.semibold,\n    lineHeight: lineHeight.tight,\n  },\n  h4: {\n    fontSize: fontSize['2xl'],\n    fontWeight: fontWeight.semibold,\n    lineHeight: lineHeight.normal,\n  },\n  h5: {\n    fontSize: fontSize.xl,\n    fontWeight: fontWeight.semibold,\n    lineHeight: lineHeight.normal,\n  },\n  h6: {\n    fontSize: fontSize.lg,\n    fontWeight: fontWeight.semibold,\n    lineHeight: lineHeight.normal,\n  },\n  subtitle1: {\n    fontSize: fontSize.lg,\n    fontWeight: fontWeight.medium,\n    lineHeight: lineHeight.normal,\n  },\n  subtitle2: {\n    fontSize: fontSize.md,\n    fontWeight: fontWeight.medium,\n    lineHeight: lineHeight.normal,\n  },\n  body1: {\n    fontSize: fontSize.md,\n    fontWeight: fontWeight.regular,\n    lineHeight: lineHeight.relaxed,\n  },\n  body2: {\n    fontSize: fontSize.sm,\n    fontWeight: fontWeight.regular,\n    lineHeight: lineHeight.relaxed,\n  },\n  button: {\n    fontSize: fontSize.md,\n    fontWeight: fontWeight.semibold,\n    textTransform: 'none',\n    letterSpacing: 0,\n  },\n  caption: {\n    fontSize: fontSize.xs,\n    fontWeight: fontWeight.regular,\n    lineHeight: lineHeight.normal,\n  },\n  overline: {\n    fontSize: fontSize.xs,\n    fontWeight: fontWeight.semibold,\n    lineHeight: lineHeight.normal,\n    textTransform: 'uppercase',\n    letterSpacing: '0.08em',\n  },\n};\n","import { alpha, darken, lighten, type Theme } from '@mui/material/styles';\nimport {\n  severityColors,\n  statusColors,\n  iconColors,\n  textColors,\n  brand,\n  inputColors,\n  lightInputColors,\n} from '@/tokens/colors';\nimport { dsVar } from '@/tokens/surfaceScopes';\nimport { controlHeights, chipHeights } from '@/tokens/sizes';\nimport { spacing } from '@/tokens/spacing';\nimport { fontSize, lineHeight } from '@/tokens/typography';\n\n/**\n * Custom component variants layered on top of MUI's defaults.\n *\n * These are referenced from `components.ts` and surfaced to consumers through\n * theme augmentation, so `<Button variant=\"primary\" />` is fully typed.\n *\n * The chip variants below are the styling layer that `Chip`'s `purpose` prop\n * selects from -- they are no longer something a caller picks directly.\n */\n\n/* ------------------------------------------------------------------ */\n/* Chip color map                                                      */\n/* ------------------------------------------------------------------ */\n\n/**\n * The canonical chip color palette. Two orthogonal axes:\n *   variant (filled | subtle | outlined | dot) x color (10 keys below).\n *\n * This cross-product is the palette `Chip` derives from, not a menu for\n * callers: `purpose` picks the legitimate pairs. See `src/atoms/Chip/Chip.tsx`.\n *\n * MUI already handles filled/outlined for palette-native colors (primary,\n * info, success, warning, error). We generate custom theme variants for\n * the five non-palette colors (neutral, critical, high, medium, low) on\n * filled/outlined, and for ALL colors on the two new custom variants\n * (subtle, dot).\n */\nexport const chipColorMap = {\n  neutral: textColors.secondary,\n  info: statusColors.info,\n  success: statusColors.success,\n  warning: statusColors.warning,\n  error: statusColors.failure,\n  critical: severityColors.critical,\n  high: iconColors.vulnerability,\n  medium: severityColors.medium,\n  low: severityColors.low,\n  primary: brand.main,\n} as const;\n\nexport type ChipColorKey = keyof typeof chipColorMap;\nconst chipColorKeys = Object.keys(chipColorMap) as ChipColorKey[];\n\n/**\n * Colors that MUI's palette already supports for filled/outlined --\n * we skip generating custom theme variants for these on those two variants.\n */\nconst muiPaletteColors = new Set<string>([\n  'primary',\n  'info',\n  'success',\n  'warning',\n  'error',\n]);\n\nconst customColorKeys = chipColorKeys.filter((k) => !muiPaletteColors.has(k));\n\n/* ------------------------------------------------------------------ */\n/* Luminance helper                                                    */\n/* ------------------------------------------------------------------ */\n\n/**\n * Relative luminance (WCAG) of a hex color. Used to pick white or dark\n * label text so the chip meets contrast requirements.\n */\nfunction relativeLuminance(hex: string): number {\n  const value = hex.replace('#', '');\n  const channels = [0, 2, 4].map((i) => {\n    const c = parseInt(value.slice(i, i + 2), 16) / 255;\n    return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n  });\n  return 0.2126 * channels[0] + 0.7152 * channels[1] + 0.0722 * channels[2];\n}\n\nconst LIGHT_TEXT_LUMINANCE_THRESHOLD = 0.3;\n\n/** WCAG contrast of a hex colour against white. Chip labels sit on paper. */\nfunction contrastAgainstWhite(hex: string): number {\n  return 1.05 / (relativeLuminance(hex) + 0.05);\n}\n\n/**\n * Channel-multiply darken that stays in 6-digit hex, so the result can go\n * back through `relativeLuminance`. MUI's `darken` returns `rgb(...)`, which\n * our luminance helper rejects.\n */\nfunction darkenHex(hex: string, amount: number): string {\n  const value = hex.replace('#', '');\n  const channels = [0, 2, 4].map((i) =>\n    Math.round(parseInt(value.slice(i, i + 2), 16) * (1 - amount)),\n  );\n  return `#${channels.map((c) => c.toString(16).padStart(2, '0')).join('')}`;\n}\n\n/**\n * Text color for the subtle variant on the *dark* surface. Dark colors (low\n * luminance) are lightened so they read clearly. Unlike a filled chip this\n * never falls back to white — the point of subtle is that the text carries\n * the hue.\n */\nfunction subtleTextColor(hex: string): string {\n  const lum = relativeLuminance(hex);\n  if (lum < 0.08) return lighten(hex, 0.45);\n  if (lum < 0.15) return lighten(hex, 0.25);\n  return hex;\n}\n\n/**\n * Label (and matching border) ink for outlined and subtle chips.\n *\n * Dark theme keeps the historical lightening of very dark hues so they read\n * on `#141414`. Light theme must never lighten: that correction drops reds\n * and yellows below AA on white (Low was 1.76:1, a lightened Critical 3.03:1).\n * Pale hues are darkened until the 12px label clears 4.5:1 against white.\n *\n * Neutral is overridden separately via `theme.palette.text.secondary` so it\n * tracks the body secondary ink in both modes rather than darkening the\n * dark-theme `#AEAEAE` token into an ad-hoc grey.\n */\nfunction chipLabelInk(hex: string, mode: 'light' | 'dark'): string {\n  if (mode === 'dark') return subtleTextColor(hex);\n  if (contrastAgainstWhite(hex) >= 4.5) return hex;\n  for (let amount = 0.05; amount <= 0.65; amount += 0.05) {\n    const candidate = darkenHex(hex, amount);\n    if (contrastAgainstWhite(candidate) >= 4.5) return candidate;\n  }\n  return darkenHex(hex, 0.65);\n}\n\n/* ------------------------------------------------------------------ */\n/* Chip variant: subtle                                                */\n/* ------------------------------------------------------------------ */\n\n/**\n * Tinted background (~12% opacity), colored text, subtle border (~25%\n * opacity). Equivalent to Astryx Badge `appearance=\"subtle\"`.\n *\n * The tint is what lifts a chip off the surface, so this is for pills that\n * should catch the eye in their own colour: severities, statuses, verdicts, and\n * the unselected half of `purpose=\"select\"`, where a toggleable option needs to\n * look unlike the static tags around it. The neutral pills that are meant to be\n * read past -- `category`, `metric`, `filter` -- use `fieldChipVariants`.\n *\n * Ink is mode-aware: see `chipLabelInk`. The tint keeps the original hue so a\n * darkened light-mode label still sits in a recognisably coloured pill.\n */\nexport const subtleChipVariants = chipColorKeys.map((key) => {\n  const hex = chipColorMap[key];\n  const bgOpacity = relativeLuminance(hex) < 0.08 ? 0.18 : 0.12;\n  return {\n    props: { variant: 'subtle' as const, color: key },\n    style: ({ theme }: { theme: Theme }) => {\n      const text = chipLabelInk(hex, theme.palette.mode);\n      return {\n        backgroundColor: alpha(hex, bgOpacity),\n        color: text,\n        border: `1px solid ${alpha(hex, 0.25)}`,\n        '&:hover': { backgroundColor: alpha(hex, bgOpacity + 0.06) },\n        '& .MuiChip-deleteIcon': { color: alpha(text, 0.6), '&:hover': { color: text } },\n      };\n    },\n  };\n});\n\n/**\n * Subtle + neutral.\n *\n * `chipColorMap.neutral` is the dark-theme `#AEAEAE`, and on white that is\n * 2.22:1 — the washed-out Cloud / unknown-entity look. Deriving from\n * `theme.palette.text.secondary` gives the same ink field chips and body\n * secondary already use (7.73:1 on white; `#AEAEAE` unchanged in dark).\n *\n * Registered after `subtleChipVariants` so this pair wins.\n */\nexport const neutralSubtleChipVariants = [\n  {\n    props: { variant: 'subtle' as const, color: 'neutral' as const },\n    style: ({ theme }: { theme: Theme }) => {\n      const ink = theme.palette.text.secondary;\n      const fill =\n        theme.palette.mode === 'light' ? theme.palette.text.primary : ink;\n      const bgOpacity = theme.palette.mode === 'light' ? 0.06 : 0.12;\n      return {\n        backgroundColor: alpha(fill, bgOpacity),\n        color: ink,\n        border: `1px solid ${alpha(ink, 0.25)}`,\n        '&:hover': { backgroundColor: alpha(fill, bgOpacity + 0.06) },\n        '& .MuiChip-deleteIcon': { color: alpha(ink, 0.6), '&:hover': { color: ink } },\n      };\n    },\n  },\n];\n\n/* ------------------------------------------------------------------ */\n/* Chip variant: field                                                 */\n/* ------------------------------------------------------------------ */\n\n/**\n * The chrome of an outlined input, worn by a chip: an `inputColors.background`\n * fill inside an `inputColors.border` outline, both deliberately quiet.\n *\n * This is what `category`, `metric`, `filter`, `picker` and `overflow` render\n * as -- every neutral pill, static or operable. The point is that a filter bar\n * is a row of form controls, so the pills in it should match the TextField and\n * the secondary Button beside them rather than announcing themselves as their\n * own kind of object. Sharing `inputColors` with `MuiOutlinedInput` means they\n * match by token, not by a coincidental hex that a later restyle would break.\n *\n * Interactivity is carried by affordances rather than by the border: a picker\n * has a chevron, an overflow chip reads `+N more`, a filter chip has an X. An\n * earlier draft gave the operable ones a brighter outline, which made a filter\n * chip and the picker beside it look like different species of pill when all\n * that differs is what you can do to them.\n *\n * `subtleChipVariants` tints with translucent white, which lifts a chip *off*\n * the surface -- correct for a status or severity pill that should catch the\n * eye, wrong for a tag the user is meant to read past.\n *\n * Both modes share `--ds-field` / `--ds-field-border` with OutlinedInput and\n * the secondary Button. Light falls back to `lightInputColors`, not the dark\n * `inputColors` hexes — those painted near-black pills on a light canvas.\n *\n * Note the trade-off this buys. The fill is close enough to the host that on\n * some rungs the border does nearly all the work of drawing the pill. The label\n * carries the AA obligation, so what stays quiet is the boundary, not the\n * content -- but that means these chips identify themselves by their text and\n * their X rather than by a crisp edge. Do not reach for this variant where the\n * outline is the only thing distinguishing two states.\n */\nexport const fieldChipVariants = [\n  {\n    props: { variant: 'field' as const },\n    style: ({ theme }: { theme: Theme }) => {\n      // Tracks the surface scope for the same reason as the secondary Button:\n      // these pills are supposed to sit at the level of the form controls beside\n      // them, and that is only true on every rung if the fill recesses with the\n      // field rather than staying at one fixed token.\n      const dark = theme.palette.mode === 'dark';\n      const chrome = dark ? inputColors : lightInputColors;\n      const fill = dsVar('field', chrome.background);\n      const border = dsVar('fieldBorder', chrome.border);\n      const ink = theme.palette.text.secondary;\n      return {\n        backgroundColor: fill,\n        color: ink,\n        border: `1px solid ${border}`,\n        // Scoped to the interactive cases. `subtle` lightens on any hover, so a\n        // static category tag shimmers under the pointer as though it were a\n        // target; a tag that cannot be clicked should not answer the mouse.\n        '&.MuiChip-clickable:hover, &.MuiChip-deletable:hover': {\n          backgroundImage: `linear-gradient(${dsVar('hover', dark ? 'rgba(255,255,255,0.06)' : 'rgba(0,0,0,0.04)')}, ${dsVar('hover', dark ? 'rgba(255,255,255,0.06)' : 'rgba(0,0,0,0.04)')})`,\n        },\n        '& .MuiChip-deleteIcon': {\n          color: alpha(ink, 0.6),\n          '&:hover': { color: theme.palette.text.primary },\n        },\n      };\n    },\n  },\n];\n\n/* ------------------------------------------------------------------ */\n/* Chip variant: dot                                                   */\n/* ------------------------------------------------------------------ */\n\n/**\n * No background or border. A leading colored dot + neutral label text.\n * Pure status indicator. The dot is rendered via a `::before` pseudo-element\n * on the chip root so callers don't need to pass an icon prop.\n * Equivalent to Astryx Badge `appearance=\"dot\"`.\n *\n * The label uses `theme.palette.text.secondary`, not the flat dark-theme\n * `textColors.secondary` token: on white that token is 2.22:1, which is what\n * made the whole status row in the purpose ladder unreadable in light mode.\n */\nexport const dotChipVariants = chipColorKeys.map((key) => {\n  const hex = chipColorMap[key];\n  return {\n    props: { variant: 'dot' as const, color: key },\n    style: ({ theme }: { theme: Theme }) => ({\n      backgroundColor: 'transparent',\n      color: theme.palette.text.secondary,\n      border: 'none',\n      paddingLeft: '4px',\n      '&::before': {\n        content: '\"\"',\n        display: 'inline-block',\n        width: 8,\n        height: 8,\n        borderRadius: '50%',\n        backgroundColor: hex,\n        marginRight: 6,\n        marginLeft: 4,\n        flexShrink: 0,\n      },\n      // The dot's own margin is not the whole gap: MUI pads the label by 12px\n      // (8px when small) to hold text off a pill's edge. This variant has no\n      // pill -- no background, no border -- so that padding was stacking on the\n      // margin and reading as a 18px gulf between the dot and its word. Zeroing\n      // the leading side leaves the 6px above as the actual gap.\n      '& .MuiChip-label': { paddingLeft: 0 },\n      '&:hover': { backgroundColor: 'transparent' },\n    }),\n  };\n});\n\n/* ------------------------------------------------------------------ */\n/* Chip colors: filled + outlined for non-palette colors               */\n/* ------------------------------------------------------------------ */\n\n/**\n * Filled chip styles for colors that MUI's palette doesn't cover\n * (neutral, critical, high, medium, low). Solid background, high-contrast\n * text — use sparingly for the most prominent states.\n */\nexport const filledChipColorVariants = customColorKeys.map((key) => {\n  const hex = chipColorMap[key];\n  const bg = relativeLuminance(hex) < 0.08 ? lighten(hex, 0.35) : hex;\n  const bgLum = relativeLuminance(bg);\n  const isDark = bgLum < LIGHT_TEXT_LUMINANCE_THRESHOLD;\n  const text = isDark ? '#FFFFFF' : '#1A1A1A';\n  return {\n    props: { variant: 'filled' as const, color: key },\n    style: {\n      backgroundColor: bg,\n      color: text,\n      '&:hover': { backgroundColor: lighten(bg, 0.1) },\n      '& .MuiChip-deleteIcon': {\n        color: isDark ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.5)',\n        '&:hover': { color: text },\n      },\n    },\n  };\n});\n\n/**\n * Outlined chip styles for non-palette colors. Transparent background,\n * 1px color border, colored text. Ink is mode-aware via `chipLabelInk` so\n * Low / Medium yellows clear AA on white instead of shipping the dark-theme\n * tokens flat (1.76:1 / 2.27:1), and so Critical is not lightened into a\n * pink that fails on the light surface.\n */\nexport const outlinedChipColorVariants = customColorKeys.map((key) => {\n  const hex = chipColorMap[key];\n  return {\n    props: { variant: 'outlined' as const, color: key },\n    style: ({ theme }: { theme: Theme }) => {\n      const text = chipLabelInk(hex, theme.palette.mode);\n      return {\n        backgroundColor: 'transparent',\n        color: text,\n        border: `1px solid ${text}`,\n        '&:hover': { backgroundColor: alpha(hex, 0.08) },\n        '& .MuiChip-deleteIcon': { color: alpha(text, 0.6), '&:hover': { color: text } },\n      };\n    },\n  };\n});\n\n/**\n * Outlined + neutral.\n *\n * No `purpose` renders as this any more -- `picker` and `overflow` moved to\n * `fieldChipVariants` so the whole filter family shares one chrome. It stays for\n * the legacy `variant`/`color` API, which consumers can still pass directly, and\n * because the contrast fix below is the reason it exists at all.\n *\n * `chipColorMap.neutral` is `textColors.secondary` (`#AEAEAE`), a dark-theme\n * token, and `outlinedChipColorVariants` applies it as a flat value in both\n * modes. On the light theme's white paper that is **2.22:1** for the label and\n * the same for the border -- under the 4.5:1 AA floor for text and under the\n * 3:1 floor for a non-text boundary. The overflow chip has shipped with this;\n * the picker chip is the one whose entire label is drawn in it, which is what\n * made it worth fixing rather than recording.\n *\n * Deriving from `theme.palette.text.secondary` gives 7.73:1 on white, and in\n * dark mode that palette entry *is* `#AEAEAE`, so the dark theme is unchanged\n * to the pixel. Same technique as `lifecycleChipVariants` below, and the same\n * reason: a flat token cannot be correct in two modes.\n *\n * Registered after `outlinedChipColorVariants` in `components.ts`, since both\n * match this pair and the later variant wins.\n */\nexport const neutralOutlinedChipVariants = [\n  {\n    props: { variant: 'outlined' as const, color: 'neutral' as const },\n    style: ({ theme }: { theme: Theme }) => {\n      const ink = theme.palette.text.secondary;\n      return {\n        backgroundColor: 'transparent',\n        color: ink,\n        border: `1px solid ${ink}`,\n        '&:hover': { backgroundColor: alpha(ink, 0.08) },\n        '& .MuiChip-deleteIcon': { color: alpha(ink, 0.6), '&:hover': { color: ink } },\n      };\n    },\n  },\n];\n\n/**\n * Outlined + primary, the appearance behind `Chip purpose=\"lifecycle\"`.\n *\n * MUI already styles this pair, but its label takes `primary.main` unmodified,\n * and in the light theme that teal on white is 4.32:1 -- under the 4.5:1 AA\n * floor for text this size. Darkening it 10% there brings it to 5.17:1 while\n * the dark theme keeps the brighter token at ~8:1. Deriving from the palette\n * rather than the `brand` token is what makes that per-mode difference\n * possible at all.\n *\n * No hover style: every lifecycle stage is static, and a hover response on a\n * chip that cannot be clicked is a promise the component does not keep.\n */\nexport const lifecycleChipVariants = [\n  {\n    props: { variant: 'outlined' as const, color: 'primary' as const },\n    style: ({ theme }: { theme: Theme }) => {\n      const ink =\n        theme.palette.mode === 'light'\n          ? darken(theme.palette.primary.main, 0.1)\n          : theme.palette.primary.main;\n      return {\n        backgroundColor: 'transparent',\n        color: ink,\n        border: `1px solid ${ink}`,\n      };\n    },\n  },\n];\n\n/**\n * Button variants - the design system's canonical emphasis ladder:\n *\n * - `primary` - the single most important action in a view (solid brand accent).\n * - `secondary` - the default; a bordered, neutral, low-chrome action. Reads as\n *   a sibling of a text field or select at the same height, so it is the right\n *   choice for toolbars and inline groups of actions.\n * - `ghost` - lowest emphasis; transparent until hovered.\n * - `destructive` - irreversible/dangerous actions (delete, isolate, simulate);\n *   always pair with a confirmation step.\n *\n * These are custom variants, so each fully specifies its own background, text,\n * border, hover and disabled styling (MUI's built-in variant styles do not\n * apply). `borderRadius`/`textTransform`/`fontWeight` come from the shared\n * `MuiButton.root` override in `components.ts`.\n */\nexport const buttonVariants = [\n  {\n    props: { variant: 'primary' as const },\n    style: ({ theme }: { theme: Theme }) => ({\n      backgroundColor: theme.palette.primary.main,\n      color: theme.palette.primary.contrastText,\n      border: '1px solid transparent',\n      '&:hover': {\n        backgroundColor: theme.palette.primary.dark,\n      },\n      '&.Mui-disabled': {\n        backgroundColor: theme.palette.action.disabledBackground,\n        color: theme.palette.action.disabled,\n      },\n    }),\n  },\n  {\n    props: { variant: 'secondary' as const },\n    style: ({ theme }: { theme: Theme }) => {\n      // Neutral, not brand-tinted. This is the default variant, so it sits in\n      // toolbars beside text fields and selects far more often than it sits\n      // beside a primary action -- a turquoise-on-green button next to a\n      // neutral outlined input read as the loudest thing in the row, and it\n      // also spent the brand accent on the most ordinary control in the system.\n      //\n      // Shares `--ds-field` / `--ds-field-border` with OutlinedInput so a\n      // secondary Button and a TextField of the same height match by token in\n      // both modes. Light falls back to `lightInputColors`; the dark\n      // `inputColors` hexes must never paint a light canvas.\n      //\n      // Hover cannot use `lighten()` any more, because the fill is a `var()`\n      // and `lighten()` needs a resolved colour. Layering `--ds-hover` as a\n      // gradient over the background achieves the same one-step lift, works on\n      // whatever the variable resolved to, and — unlike `filter` or `opacity` —\n      // does not touch the label.\n      const dark = theme.palette.mode === 'dark';\n      const chrome = dark ? inputColors : lightInputColors;\n      // Same `--ds-field` / `--ds-field-border` as OutlinedInput, so a secondary\n      // Button and a TextField of the same height match by token in both modes.\n      const fill = dsVar('field', chrome.background);\n      const border = dsVar('fieldBorder', chrome.border);\n      return {\n        backgroundColor: fill,\n        color: theme.palette.text.primary,\n        border: `1px solid ${border}`,\n        '&:hover': {\n          ...(dark\n            ? {\n                backgroundImage: `linear-gradient(${dsVar('hover', 'rgba(255,255,255,0.06)')}, ${dsVar('hover', 'rgba(255,255,255,0.06)')})`,\n              }\n            : {\n                backgroundImage: `linear-gradient(${dsVar('hover', 'rgba(0,0,0,0.04)')}, ${dsVar('hover', 'rgba(0,0,0,0.04)')})`,\n              }),\n          borderColor: chrome.borderHover,\n        },\n        '&.Mui-disabled': {\n          backgroundColor: theme.palette.action.disabledBackground,\n          color: theme.palette.action.disabled,\n          borderColor: theme.palette.action.disabledBackground,\n        },\n      };\n    },\n  },\n  {\n    props: { variant: 'ghost' as const },\n    style: ({ theme }: { theme: Theme }) => ({\n      backgroundColor: 'transparent',\n      color: theme.palette.text.primary,\n      border: '1px solid transparent',\n      '&:hover': {\n        backgroundColor: theme.palette.action.hover,\n      },\n      '&.Mui-disabled': {\n        backgroundColor: 'transparent',\n        color: theme.palette.action.disabled,\n      },\n    }),\n  },\n  {\n    props: { variant: 'destructive' as const },\n    style: ({ theme }: { theme: Theme }) => ({\n      backgroundColor: severityColors.high,\n      color: '#FFFFFF',\n      border: '1px solid transparent',\n      '&:hover': {\n        backgroundColor: severityColors.critical,\n      },\n      '&.Mui-disabled': {\n        backgroundColor: theme.palette.action.disabledBackground,\n        color: theme.palette.action.disabled,\n      },\n    }),\n  },\n];\n\n/**\n * Button size scale.\n *\n * `minHeight` is the lever that fixes the control height: the padding below is\n * deliberately smaller than the height implies, so the box lands on exactly\n * `controlHeights` (28/36/44) for single-line labels but still breathes if a\n * label wraps. This also keeps the sizes correct whether or not\n * `box-sizing: border-box` is in effect, since the 1px border every variant\n * carries is never subtracted from a padding value.\n *\n * The same `controlHeights` tokens size OutlinedInput / TextField / Select, so\n * a Button and a field of the same `size` match by token rather than by tuning\n * two independent padding recipes until they happen to agree.\n */\nconst buttonSizes = {\n  small: {\n    minHeight: controlHeights.small,\n    fontSize: fontSize.sm,\n    padding: `${spacing.xs}px ${spacing.sm + spacing.xs}px`,\n  },\n  medium: {\n    minHeight: controlHeights.medium,\n    fontSize: fontSize.md,\n    padding: `${spacing.xs}px ${spacing.md}px`,\n  },\n  large: {\n    minHeight: controlHeights.large,\n    fontSize: fontSize.lg,\n    padding: `${spacing.sm}px ${spacing.lg}px`,\n  },\n} as const;\n\nconst buttonSizeNames = Object.keys(buttonSizes) as (keyof typeof buttonSizes)[];\n\n/**\n * Size styles for the custom button variants.\n *\n * MUI ships its own size padding, but every one of those rules is matched\n * against `variant: 'text' | 'outlined' | 'contained'`. The emphasis ladder\n * above replaces those variants entirely, so without this cross-product a\n * `small` and a `large` Button render at identical dimensions. Scoping to the\n * custom variants leaves MUI's built-in variants on their stock sizing.\n */\nexport const buttonSizeVariants = buttonVariants.flatMap(({ props: { variant } }) =>\n  buttonSizeNames.map((size) => ({\n    props: { variant, size },\n    style: { ...buttonSizes[size], lineHeight: lineHeight.normal },\n  })),\n);\n\n/**\n * Chip rungs that MUI does not ship (`large` / `extraLarge`).\n *\n * `small` and `medium` stay on `MuiChip` styleOverrides so existing\n * call sites do not move. These variants are keyed only on `size`.\n */\nexport const chipSizeVariants = [\n  {\n    props: { size: 'large' as const },\n    style: {\n      height: chipHeights.large,\n      fontSize: fontSize.md,\n    },\n  },\n  {\n    props: { size: 'extraLarge' as const },\n    style: {\n      height: chipHeights.extraLarge,\n      fontSize: fontSize.lg,\n    },\n  },\n];\n","import type { Components, Theme } from '@mui/material/styles';\nimport { radius } from '@/tokens/radius';\nimport { chipHeights, controlHeights } from '@/tokens/sizes';\nimport { shadows } from '@/tokens/shadows';\nimport { spacing } from '@/tokens/spacing';\nimport { compactGlyphScale, fontSize, lineHeight } from '@/tokens/typography';\nimport {\n  SURFACE_LADDER,\n  backgroundColors,\n  borderByRung,\n  inputColors,\n  lightBackgroundColors,\n  lightInputColors,\n  lightTextColors,\n  scrim,\n  separatorByRung,\n  tableHeaderByRung,\n  textColors,\n} from '@/tokens/colors';\nimport { dsVar, scopeToCssVars, surfaceScopes } from '@/tokens/surfaceScopes';\nimport {\n  buttonVariants,\n  buttonSizeVariants,\n  chipSizeVariants,\n  subtleChipVariants,\n  neutralSubtleChipVariants,\n  fieldChipVariants,\n  dotChipVariants,\n  filledChipColorVariants,\n  outlinedChipColorVariants,\n  neutralOutlinedChipVariants,\n  lifecycleChipVariants,\n} from './variants';\n\n/**\n * The paper of a portalled floating element — a menu, a popover, a picker.\n *\n * These all obey `max(raised, host + 1)`, and this covers the `raised` floor of\n * that rule. It cannot cover the `host + 1` half, because a portalled element is\n * reparented to `document.body`: it has no DOM ancestor to inherit `--ds-raised`\n * from, and `styleOverrides` cannot read React context to find out what opened\n * it. So a menu opened from a dialog currently sits at `raised` rather than\n * climbing above the dialog's `surface`. `raised` is one rung above `surface`,\n * so the common case still separates correctly; the case this misses is a menu\n * inside something already at `raised` or higher. `usePortalRung` is the hook\n * that closes it, and it needs component wrappers rather than theme overrides.\n *\n * Light mode has no separate overlay rung, so paper (white) is the correct lift\n * off the page there and the ladder collapses to two surfaces by design.\n */\nfunction floatingPaper(corner: 'md' | 'lg') {\n  return ({ theme }: { theme: Theme }) => ({\n    borderRadius: radius[corner],\n    border: `1px solid ${theme.palette.mode === 'dark' ? borderByRung.raised : theme.palette.divider}`,\n    backgroundColor:\n      theme.palette.mode === 'dark' ? backgroundColors.raised : theme.palette.background.paper,\n    backgroundImage: 'none',\n    boxShadow: shadows.md,\n    ...scopeToCssVars(surfaceScopes[theme.palette.mode].raised),\n  });\n}\n\n/**\n * MUI component overrides + defaultProps.\n *\n * This is where the design system applies its opinions on top of MUI without\n * forking component implementations - the core of \"theme layer over MUI\".\n */\nexport const components: Components<Theme> = {\n  MuiCssBaseline: {\n    styleOverrides: (theme) => {\n      const dark = theme.palette.mode === 'dark';\n      const scopes = surfaceScopes[theme.palette.mode];\n      const scrollThumb = dark ? backgroundColors.border : lightBackgroundColors.border;\n      return {\n        // Declare the mode to the browser so *native* widget chrome follows the\n        // theme: date/time picker indicators, native <select> popups and\n        // scrollbars otherwise render their light-mode (black-on-dark) glyphs\n        // regardless of what the surrounding UI looks like.\n        html: { colorScheme: theme.palette.mode },\n        body: {\n          scrollbarColor: `${scrollThumb} transparent`,\n          '&::-webkit-scrollbar-thumb': {\n            backgroundColor: scrollThumb,\n            borderRadius: radius.pill,\n          },\n          // Unscoped fields/buttons inherit the `primary` scope — the same rung\n          // as `palette.background.default` — so a bare TextField in Storybook\n          // or a page root recesses onto `page` instead of falling back to the\n          // dark `inputColors.background` hex.\n          ...scopeToCssVars(scopes.primary),\n        },\n        // `data-surface` opens a scope on any element, not just `Surface`.\n        //\n        // Declaring the six scopes once here rather than inlining ten custom\n        // properties per instance is what lets a *themed MUI* component join the\n        // ladder: a Drawer paper or a Dialog paper can set one attribute through\n        // `defaultProps` and pick up the whole scope, which it could not do from\n        // `styleOverrides` alone. It also means a plain `<div data-surface=\"widget\">`\n        // works in a story or a consumer's app with no import.\n        //\n        // Both these rules and `Surface`'s inline properties are generated from\n        // `surfaceScopes`, so the two cannot disagree.\n        ...Object.fromEntries(\n          SURFACE_LADDER.map((rung) => [`[data-surface=\"${rung}\"]`, scopeToCssVars(scopes[rung])]),\n        ),\n      };\n    },\n  },\n  MuiButton: {\n    defaultProps: {\n      disableElevation: true,\n      variant: 'secondary',\n    },\n    styleOverrides: {\n      root: {\n        borderRadius: radius.sm,\n        textTransform: 'none',\n        fontWeight: 600,\n      },\n    },\n    variants: [...buttonVariants, ...buttonSizeVariants],\n  },\n  MuiIconButton: {\n    styleOverrides: {\n      root: { borderRadius: radius.sm },\n    },\n  },\n  MuiPaper: {\n    styleOverrides: {\n      /**\n       * `elevation` selects a rung, not a shadow.\n       *\n       * On a dark, dense UI a drop shadow has almost nothing to fall on — the\n       * separation has to come from tone. So MUI's 25-step elevation scale is\n       * collapsed onto the ladder (Component System §08). The practical effect\n       * on consumers: passing `elevation` now changes the background rather\n       * than the shadow.\n       *\n       * Values are read as `var(--ds-*)` so the same `elevation` lands on a\n       * different absolute colour depending on where the Paper is mounted,\n       * which is the point of the ladder. The fallbacks cover a Paper rendered\n       * outside any surface scope.\n       */\n      root: ({ ownerState }) => {\n        const elevation = Number(ownerState.elevation ?? 1);\n        const background =\n          elevation === 0\n            ? // Not a surface of its own: sits flush on whatever hosts it.\n              dsVar('bg', backgroundColors.widget)\n            : elevation <= 3\n              ? // A contained surface: one rung above its host.\n                dsVar('child', backgroundColors.widget)\n              : elevation <= 8\n                ? // Floating: the portal rung, so it clears its host.\n                  dsVar('raised', backgroundColors.raised)\n                : // The ceiling.\n                  backgroundColors.overlay;\n        return { backgroundImage: 'none', backgroundColor: background };\n      },\n      rounded: { borderRadius: radius.md },\n    },\n  },\n  MuiCard: {\n    // Elevation 1 rather than 0: a card *is* a contained surface, so it should\n    // step one rung above its host. At 0 it would paint flush and disappear.\n    defaultProps: { elevation: 1 },\n    styleOverrides: {\n      root: {\n        borderRadius: radius.md,\n        // No border. The rung step above the host is what separates a card now;\n        // keeping the 1px edge as well reads as a double boundary (§01 rule 1).\n        // A card that genuinely needs an edge — selected, dragged — should set\n        // one explicitly from `outlineByRung`.\n        border: 'none',\n        // Background comes from MuiPaper's elevation mapping above.\n      },\n    },\n  },\n  MuiAccordion: {\n    // Same reasoning as Card: the accordion is the surface, and MUI's default\n    // dividers plus its own border would triple up with the rung step.\n    defaultProps: { elevation: 1, disableGutters: true },\n    styleOverrides: {\n      root: {\n        borderRadius: radius.md,\n        border: 'none',\n        '&::before': { display: 'none' },\n        '&:first-of-type, &:last-of-type': { borderRadius: radius.md },\n      },\n    },\n  },\n  MuiAvatar: {\n    styleOverrides: {\n      root: {\n        // Spec §08: an avatar is a control-weight fill at host +2 carrying\n        // `text.primary`, not a palette colour.\n        //\n        // Untouched, MUI resolves a dark avatar to `palette.grey[600]` for the\n        // fill and `palette.background.default` for the initials. Both were\n        // wrong here, and the second was the more serious: `#1F1F1F` ink on a\n        // `#2B2B33` fill is 1.15:1, so the initials were effectively invisible.\n        // The fill was also the one blue-tinted entry in the neutral scale.\n        backgroundColor: dsVar('control', backgroundColors.surface),\n        color: dsVar('text', textColors.primary),\n        '& .MuiSvgIcon-root': { color: 'inherit' },\n        // A photo avatar paints its own pixels, so the fill above never shows.\n        // The inset hairline keeps a light-edged photo from bleeding into the\n        // surface, which is the one thing a tonal step cannot do for it.\n        '&:has(> img)': {\n          boxShadow: 'inset 0 0 0 1px rgba(255, 255, 255, 0.10)',\n        },\n      },\n    },\n  },\n  MuiAvatarGroup: {\n    styleOverrides: {\n      // The overlap gap reads as a gap only if it matches what is behind it, so\n      // it takes the host rung rather than a fixed colour.\n      avatar: {\n        borderWidth: 2,\n        borderStyle: 'solid',\n        borderColor: dsVar('bg', backgroundColors.primary),\n      },\n    },\n  },\n  MuiBadge: {\n    styleOverrides: {\n      // Spec §08: a badge is portable — a fixed severity fill with fixed ink,\n      // identical on all six rungs — with one exception. The halo separating it\n      // from whatever it is pinned to has to match the host, because its whole\n      // job is to read as a gap. That makes it the one badge property that\n      // scopes.\n      badge: {\n        boxShadow: `0 0 0 2px ${dsVar('bg', backgroundColors.primary)}`,\n      },\n    },\n  },\n  MuiDivider: {\n    styleOverrides: {\n      // Repointed off `palette.divider`, which is a single rung-agnostic value\n      // and therefore wrong on most of the ladder: the flat `border` token is\n      // 1.13:1 on `widget` and near-invisible on `surface`. `--ds-border`\n      // resolves to the host rung's entry in `borderByRung`, holding ~1.35:1\n      // everywhere — the weight MUI's own dark divider ships at.\n      root: {\n        borderColor: dsVar('border', borderByRung.widget),\n      },\n    },\n  },\n  MuiChip: {\n    styleOverrides: {\n      root: {\n        borderRadius: radius.pill,\n        fontWeight: 500,\n        letterSpacing: '0.02em',\n        fontSize: fontSize.sm,\n        height: chipHeights.medium,\n        // Deliberately no textTransform. Chips carry values as often as words --\n        // hostnames, usernames, filenames, tenant slugs -- and capitalising\n        // those corrupts them: `svc-backup` became \"Svc-Backup\". Callers pass\n        // the casing they want, and `purpose=\"severity\"` derives its own word.\n      },\n      sizeSmall: {\n        height: chipHeights.small,\n        fontSize: fontSize.xs,\n        // The delete target, narrowed to what a 22px pill can hold. This lives\n        // here rather than on the `deleteIcon` slot below for two reasons: this\n        // MUI major exposes no `deleteIconSmall` slot, and a rule written from\n        // the root outranks the single-class slot rule it has to override.\n        // Small chips carry narrower margins than medium ones (-4/4), so the\n        // padding is taken back out of those numbers instead.\n        '& .MuiChip-deleteIcon': {\n          padding: 3,\n          marginLeft: -7,\n          marginRight: 1,\n        },\n      },\n      /**\n       * MUI sizes the leading icon only for `size=\"small\"`; the medium case is\n       * left unstyled and falls back to the `SvgIcon` default of 24px. That is\n       * survivable at MUI's own 32px chip, but this theme runs a 28px pill with\n       * a 12px label, so the icon arrived at twice the text size and 86% of the\n       * pill height. The delete glyph was MUI's 22px. Neither was related to\n       * the label, so a single medium chip rendered four sizes: 12, 18, 22, 24.\n       *\n       * `em` ties every glyph to the label beside it. The small chip then\n       * scales for free (11px -> ~14.7px), and the ratio survives any later\n       * change to either font size instead of silently drifting.\n       */\n      icon: { fontSize: compactGlyphScale },\n      /**\n       * The glyph shrinks from 22px; the pointer target must not shrink with\n       * it. MUI's delete icon is not separately focusable -- keyboard removal\n       * is Backspace on the focused chip -- so clicking it is the only pointer\n       * route to removing a chip.\n       *\n       * Padding grows the box to 24px (WCAG 2.5.8, and up from the 22px this\n       * had), then the padding is taken back out of MUI's own asymmetric\n       * margins so the glyph lands exactly where it did before. A centred\n       * `::after` would read more cleanly but does nothing here: generated\n       * content is not rendered on SVG elements, and `getComputedStyle` will\n       * cheerfully report the box it never painted.\n       */\n      deleteIcon: {\n        fontSize: compactGlyphScale,\n        boxSizing: 'content-box',\n        padding: 4,\n        marginLeft: -10, // MUI's -6, less the 4px of padding added above\n        marginRight: 1, // MUI's 5, less the same\n      },\n    },\n    variants: [\n      ...chipSizeVariants,\n      ...subtleChipVariants,\n      // Must follow the generic subtle variants: both match subtle+neutral\n      // and the later variant wins.\n      ...neutralSubtleChipVariants,\n      ...fieldChipVariants,\n      ...dotChipVariants,\n      ...filledChipColorVariants,\n      ...outlinedChipColorVariants,\n      // Must follow the generic outlined variants: both match outlined+neutral\n      // and the later variant wins.\n      ...neutralOutlinedChipVariants,\n      ...lifecycleChipVariants,\n    ],\n  },\n  MuiTextField: {\n    defaultProps: {\n      variant: 'outlined',\n      // `medium` matches Button's default height via `controlHeights.medium`.\n      // Use `size=\"small\"` only in dense toolbars and tables.\n      size: 'medium',\n      fullWidth: true,\n    },\n  },\n  MuiOutlinedInput: {\n    styleOverrides: {\n      /**\n       * A field recesses one rung *below* its host, which is what makes it read\n       * as inset rather than as a differently-coloured box sitting on top.\n       * `--ds-field` resolves that from the surface scope, so the same field is\n       * `#1F1F1F` inside a card and `#262626` inside a dialog (dark), or\n       * `#E9E9E9` / `#F1F1F1` / `#F8F8F8` on the light ladder.\n       *\n       * Fallbacks are mode-aware: the dark `inputColors.background` (`#191919`)\n       * must never paint a light canvas, or labels and placeholders vanish on a\n       * black bar.\n       *\n       * Height comes from `controlHeights`, the same ladder Button uses.\n       */\n      root: ({ theme, ownerState }) => {\n        const height =\n          ownerState.size === 'small' ? controlHeights.small : controlHeights.medium;\n        const chrome = theme.palette.mode === 'dark' ? inputColors : lightInputColors;\n        return {\n          borderRadius: radius.sm,\n          backgroundColor: dsVar('field', chrome.background),\n          color: theme.palette.text.primary,\n          // Fixed height (not only minHeight): the input uses content-box, so\n          // padding + line-box can overshoot `minHeight` by a fraction of a\n          // pixel and disagree with a Button on the same rung.\n          ...(!ownerState.multiline && { height, minHeight: height }),\n          // Beat MUI's hover (`text.primary`) and color-variant focus\n          // (`primary.main` = teal). `:not(.Mui-error)` keeps validation red.\n          '&:hover:not(.Mui-disabled):not(.Mui-error) .MuiOutlinedInput-notchedOutline': {\n            borderColor: chrome.borderHover,\n          },\n          '@media (hover: none)': {\n            '&:hover:not(.Mui-error) .MuiOutlinedInput-notchedOutline': {\n              borderColor: dsVar('fieldBorder', chrome.border),\n            },\n          },\n          /**\n           * Dark: `focusRing` equals `border`, so focus is currently off.\n           * Light: `lightInputColors.focusRing` is `#1A1A1A`, so the outline\n           * darkens on focus per Option A Light §03.\n           */\n          '&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline': {\n            borderColor: chrome.focusRing,\n          },\n          '&.Mui-error .MuiOutlinedInput-notchedOutline': {\n            borderColor: chrome.errorBorder,\n          },\n        };\n      },\n      /**\n       * Padding is deliberately lighter than MUI's 16.5/8.5 so the content fits\n       * inside `controlHeights`. Size branches live here rather than on an\n       * `inputSizeSmall` key: MUI 9's `inputOverridesResolver` only forwards\n       * `styles.input`, so a separate small slot is a no-op.\n       */\n      input: ({ theme, ownerState }) => {\n        const small = ownerState.size === 'small';\n        const placeholder =\n          theme.palette.mode === 'dark' ? textColors.muted : lightTextColors.muted;\n        return {\n          fontSize: small ? fontSize.sm : fontSize.md,\n          lineHeight: lineHeight.normal,\n          padding: small ? `${spacing.xxs}px 12px` : `${spacing.xs}px 14px`,\n          boxSizing: 'border-box',\n          ...(!ownerState.multiline && {\n            height: small ? controlHeights.small : controlHeights.medium,\n          }),\n          '&::placeholder': {\n            color: placeholder,\n            opacity: 1,\n          },\n        };\n      },\n      notchedOutline: ({ theme }) => {\n        const chrome = theme.palette.mode === 'dark' ? inputColors : lightInputColors;\n        return {\n          borderColor: dsVar('fieldBorder', chrome.border),\n        };\n      },\n    },\n  },\n  MuiInputLabel: {\n    styleOverrides: {\n      /**\n       * MUI's outlined label transforms are calibrated for 56px / 40px fields.\n       * Ours are `controlHeights` 36 / 28, so the resting label has to be\n       * recentred or it sits too low inside the box.\n       */\n      outlined: ({ ownerState }) => {\n        const small = ownerState.size === 'small';\n        return {\n          // Horizontal inset matches the input padding (12 small / 14 medium).\n          transform: small\n            ? 'translate(12px, 6px) scale(1)'\n            : 'translate(14px, 10px) scale(1)',\n          '&.MuiInputLabel-shrink': {\n            transform: small\n              ? 'translate(12px, -9px) scale(0.75)'\n              : 'translate(14px, -9px) scale(0.75)',\n          },\n        };\n      },\n      root: ({ theme }) => {\n        const quiet =\n          theme.palette.mode === 'dark' ? textColors.subtle : lightTextColors.subtle;\n        return {\n          color: quiet,\n          // MUI paints focused labels with `primary.main` (teal). Keep the\n          // resting quiet colour so an active field is not brand-tinted.\n          '&.Mui-focused:not(.Mui-error)': {\n            color: quiet,\n          },\n        };\n      },\n    },\n  },\n  MuiFormLabel: {\n    styleOverrides: {\n      root: ({ theme }) => {\n        const quiet =\n          theme.palette.mode === 'dark' ? textColors.subtle : lightTextColors.subtle;\n        return {\n          // MUI paints focused labels with `primary.main` (teal). Keep the\n          // resting quiet colour so an active field is not brand-tinted.\n          '&.Mui-focused:not(.Mui-error)': {\n            color: quiet,\n          },\n        };\n      },\n    },\n  },\n  MuiTooltip: {\n    defaultProps: { arrow: true },\n    styleOverrides: {\n      /**\n       * `raised`, not black. A pure-black tooltip was off the ladder entirely,\n       * and once `page` stopped being black it read as a hole punched through\n       * the app rather than as something floating above it. `raised` is the rung\n       * reserved for tooltips and snackbars, and its ink is `text.tooltip`,\n       * which was a near-black that only ever made sense on a light tooltip.\n       *\n       * A tooltip is portalled to `document.body`, so it cannot inherit\n       * `--ds-raised` from whatever triggered it. That makes `raised` the floor\n       * of `max(raised, host + 1)` rather than the full rule — a tooltip fired\n       * from inside a dialog does not yet climb above it. See the note in the\n       * commit; that half needs the context path, not `styleOverrides`.\n       */\n      tooltip: ({ theme }) => {\n        const dark = theme.palette.mode === 'dark';\n        // Light tooltips invert (dark fill + light ink) — a white tooltip on a\n        // white ladder has no presence at any shadow strength (Option A Light §02).\n        const fill = dark ? backgroundColors.raised : lightTextColors.primary;\n        const ink = dark ? textColors.tooltip : lightTextColors.tooltip;\n        const edge = dark ? borderByRung.raised : '#2F2F2F';\n        return {\n          ...theme.typography.caption,\n          backgroundColor: fill,\n          color: ink,\n          borderRadius: radius.sm,\n          border: `1px solid ${edge}`,\n          boxShadow: shadows.md,\n          // The tooltip is a surface in its own right, so it declares a scope for\n          // anything rendered inside it. Dark keeps the raised scope; light's\n          // inverted fill is off-ladder by design.\n          ...(dark ? scopeToCssVars(surfaceScopes.dark.raised) : null),\n        };\n      },\n      arrow: ({ theme }) => ({\n        color:\n          theme.palette.mode === 'dark' ? backgroundColors.raised : lightTextColors.primary,\n      }),\n    },\n  },\n  MuiDialogTitle: {\n    defaultProps: { variant: 'subtitle1', component: 'h2' },\n  },\n  MuiDialogContentText: {\n    defaultProps: { variant: 'body1' },\n  },\n  MuiAlert: {\n    styleOverrides: {\n      message: ({ theme }) => theme.typography.body1,\n    },\n  },\n  MuiAlertTitle: {\n    defaultProps: { variant: 'subtitle2' },\n  },\n  MuiCardHeader: {\n    defaultProps: {\n      slotProps: {\n        title: { variant: 'subtitle1' },\n        subheader: { variant: 'body1' },\n      },\n    },\n  },\n  MuiBreadcrumbs: {\n    styleOverrides: {\n      li: ({ theme }) => theme.typography.body1,\n    },\n  },\n  MuiFormHelperText: {\n    styleOverrides: {\n      root: ({ theme }) => theme.typography.caption,\n    },\n  },\n  MuiDialog: {\n    styleOverrides: {\n      paper: ({ theme }) => ({\n        borderRadius: radius.lg,\n        border: `1px solid ${borderByRung.surface}`,\n        backgroundColor: backgroundColors.surface,\n        backgroundImage: 'none',\n        boxShadow: shadows.lg,\n        // A dialog is the canonical `surface` and hosts a whole layout, so it\n        // must open a scope: fields inside it recess to `widget`, a nested table\n        // takes dialog-relative bands, and a menu opened from it climbs above it.\n        ...scopeToCssVars(surfaceScopes[theme.palette.mode].surface),\n      }),\n    },\n  },\n  MuiDialogActions: {\n    styleOverrides: {\n      // MUI's bare default (8px all round) leaves the buttons hugging the\n      // paper edge. Match the title/content gutter and give the row breathing\n      // room at the bottom; `gap` owns the space between actions, so the\n      // margin MUI would add per-child is neutralized (and `disableSpacing`\n      // keeps meaning \"no space between actions\").\n      root: ({ ownerState }) => ({\n        padding: `${spacing.sm}px ${spacing.lg}px ${spacing.md}px`,\n        gap: ownerState.disableSpacing ? 0 : spacing.sm,\n        '& > :not(style) ~ :not(style)': { marginLeft: 0 },\n      }),\n    },\n  },\n  MuiDrawer: {\n    // A drawer is dismissible and leaves most of the page visible, so it takes\n    // the middle scrim weight rather than a dialog's. Set through `slotProps`\n    // because the backdrop is a sibling of the paper, not reachable from the\n    // drawer's own `styleOverrides`.\n    defaultProps: {\n      slotProps: {\n        backdrop: { sx: { backgroundColor: `rgba(0, 0, 0, ${scrim.drawer})` } },\n      },\n    },\n    styleOverrides: {\n      // A drawer is portalled, so it cannot inherit a rung through the DOM and\n      // has to declare one. Inlining the scope rather than setting\n      // `data-surface` also opens it for the drawer's contents, which is what\n      // lets a field inside a drawer recess to the correct rung.\n      paper: ({ theme }) => ({\n        ...scopeToCssVars(surfaceScopes[theme.palette.mode].surface),\n        backgroundColor: 'var(--ds-bg)',\n        borderColor: 'var(--ds-border)',\n        backgroundImage: 'none',\n      }),\n    },\n  },\n  MuiAppBar: {\n    defaultProps: { elevation: 0, color: 'default' },\n    styleOverrides: {\n      // The app bar is the shell, so it takes the bottom rung rather than\n      // floating above the content. Opening the scope here is what makes a\n      // field on the app bar hit the `page` exception: there is no rung below\n      // it to recess into, so the field goes transparent and its outline\n      // carries the affordance instead.\n      root: ({ theme }) => ({\n        ...scopeToCssVars(surfaceScopes[theme.palette.mode].page),\n        backgroundColor: 'var(--ds-bg)',\n        borderBottom: `1px solid var(--ds-border)`,\n        backgroundImage: 'none',\n        boxShadow: shadows.none,\n      }),\n    },\n  },\n  MuiTable: {\n    styleOverrides: {\n      root: {\n        // The body is the host fill. At the host rung this is the same colour\n        // as a dedicated row token would have been — but naming the host gives\n        // hover and selection a defined base to sit on instead of each tinting\n        // whatever happens to be behind the table.\n        backgroundColor: dsVar('bg', backgroundColors.primary),\n      },\n    },\n  },\n  MuiTableCell: {\n    styleOverrides: {\n      root: ({ theme }) => ({\n        // Row rhythm at ~1.12:1 via `--ds-separator`. Heavier `--ds-border` is\n        // reserved for container outlines. A filled header has no underline.\n        borderBottom: `1px solid ${dsVar('separator', separatorByRung.primary)}`,\n        // Roomy default: 16px vertical / 24px horizontal breathing room.\n        padding: `${spacing.md}px ${spacing.lg}px`,\n        fontSize: '0.875rem', // 14px — matches the `md` type token\n        lineHeight: 1.45,\n        color: theme.palette.text.primary,\n      }),\n      head: {\n        color: dsVar('tableHeaderLabel', textColors.tertiary),\n        fontWeight: 600,\n        fontSize: '0.875rem', // 14px — matches the `md` type token\n        letterSpacing: '0.02em',\n        lineHeight: 1.5,\n        padding: `${spacing.md}px ${spacing.lg}px`,\n        verticalAlign: 'middle',\n        /**\n         * ~1.08:1 recessed fill keyed to the host, moving away from elevation\n         * (lighter in dark). Fill or underline, not both — sticky DataTables\n         * add the separator as a bottom rule; raw MUI tables stay fill-only.\n         */\n        backgroundColor: dsVar('tableHeader', tableHeaderByRung.primary),\n        borderBottom: 'none',\n        whiteSpace: 'nowrap',\n      },\n      // Compact/dense tables tighten the vertical rhythm without losing the\n      // horizontal breathing room.\n      sizeSmall: {\n        padding: `${spacing.sm + spacing.xs}px ${spacing.lg}px`,\n      },\n    },\n  },\n  MuiTableRow: {\n    styleOverrides: {\n      root: {\n        transition: 'background-color 120ms ease',\n        // No trailing separator on the final row for a clean bottom edge.\n        '&:last-of-type > .MuiTableCell-root': {\n          borderBottom: 'none',\n        },\n        // A concrete band, not `action.hover`'s translucent white. An alpha\n        // hover compounded into a colour nobody picked, and it got weaker the\n        // higher the table sat.\n        '&.MuiTableRow-hover:hover': {\n          backgroundColor: dsVar('tableRowHover', backgroundColors.surface),\n        },\n      },\n      head: {\n        '&.MuiTableRow-hover:hover': {\n          backgroundColor: 'transparent',\n        },\n      },\n    },\n  },\n  MuiMenu: {\n    styleOverrides: {\n      paper: floatingPaper('md'),\n    },\n  },\n  MuiPopover: {\n    styleOverrides: {\n      paper: floatingPaper('md'),\n    },\n  },\n  MuiSnackbarContent: {\n    styleOverrides: {\n      // A snackbar shares the tooltip's rung: it floats over everything,\n      // including an open dialog.\n      root: ({ theme }) => ({\n        backgroundColor: backgroundColors.raised,\n        color: textColors.primary,\n        borderRadius: radius.md,\n        border: `1px solid ${borderByRung.raised}`,\n        boxShadow: shadows.lg,\n        backgroundImage: 'none',\n        ...scopeToCssVars(surfaceScopes[theme.palette.mode].raised),\n      }),\n    },\n  },\n  MuiBackdrop: {\n    styleOverrides: {\n      /**\n       * One scrim weight for everything was the wrong call in both directions:\n       * heavy enough for a dialog made a menu feel like a mode change, and light\n       * enough for a menu let a dialog's own scrim fail to separate it.\n       *\n       * `dialog` is the default because `MuiBackdrop` cannot see what opened it.\n       * The lighter weights are opted into by the components that know — a menu\n       * or popover only needs a scrim at all to catch the outside click.\n       *\n       * Opacities over black rather than colours: the scrim always sits on\n       * black, whatever rung it is covering.\n       */\n      root: {\n        backgroundColor: `rgba(0, 0, 0, ${scrim.dialog})`,\n      },\n      invisible: {\n        backgroundColor: 'transparent',\n      },\n    },\n  },\n  MuiTab: {\n    styleOverrides: {\n      root: { textTransform: 'none', fontWeight: 600, minHeight: 44 },\n    },\n  },\n};\n","import { createTheme, responsiveFontSizes, type Theme } from '@mui/material/styles';\nimport { baseRadius } from '@/tokens/radius';\nimport { spacingUnit } from '@/tokens/spacing';\nimport { darkPalette, lightPalette } from './palette';\nimport { typography } from './typography';\nimport { components } from './components';\n\nconst baseOptions = {\n  spacing: spacingUnit,\n  shape: { borderRadius: baseRadius },\n  typography,\n  components,\n} as const;\n\n/** Dark theme - the primary, Figma-accurate theme. */\nexport const darkTheme: Theme = responsiveFontSizes(\n  createTheme({ ...baseOptions, palette: darkPalette }),\n);\n\n/** Light theme - derived for completeness. */\nexport const lightTheme: Theme = responsiveFontSizes(\n  createTheme({ ...baseOptions, palette: lightPalette }),\n);\n\n/** Default export is the dark theme (dark-first design system). */\nexport const theme = darkTheme;\n\nexport const themes = { dark: darkTheme, light: lightTheme } as const;\nexport type ThemeMode = keyof typeof themes;\n\nexport { darkPalette, lightPalette, severityPalette } from './palette';\nexport { typography } from './typography';\nexport { components } from './components';\n\n/**\n * Theming surface. Consuming apps get `ThemeProvider`, `CssBaseline`, `useTheme`\n * and the theme types from this package - there is no need to import them from\n * MUI directly.\n */\nexport * from './provider';\nexport { useTheme } from '@mui/material/styles';\nexport type { Theme, SxProps } from '@mui/material/styles';\n","import { defineMeta } from '@/registry/types';\n\nexport const buttonMeta = defineMeta({\n  name: 'Button',\n  level: 'atom',\n  category: 'input',\n  classification: 'mui-overrides',\n  description:\n    'Primary interactive control for actions. Themed MUI Button with an emphasis ladder of variants: `primary` (one per view), `secondary` (default), `ghost`, and `destructive`.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Button',\n  muiDocs: 'https://mui.com/material-ui/react-button/',\n  a2uiEquivalent: 'Button',\n  importPath: '@/atoms/Button',\n  requiredProps: [],\n  optionalProps: ['variant', 'size', 'startIcon', 'endIcon', 'disabled', 'onClick'],\n  props: [\n    {\n      name: 'variant',\n      type: \"'primary' | 'secondary' | 'ghost' | 'destructive'\",\n      default: 'secondary',\n    },\n    { name: 'size', type: \"'small' | 'medium' | 'large'\", default: 'medium' },\n    { name: 'disabled', type: 'boolean', default: 'false' },\n    { name: 'onClick', type: '(e: MouseEvent) => void' },\n  ],\n  customVariants: ['primary', 'secondary', 'ghost', 'destructive'],\n  supportedStates: ['default', 'hover', 'focus', 'active', 'disabled'],\n  designTokens: ['colors', 'radius', 'typography', 'controlHeights'],\n  accessibility: [\n    'Renders a native <button>; keyboard operable (Enter/Space) by default.',\n    'Provide descriptive text or aria-label for icon-only usage (prefer IconButton).',\n    'Focus ring is visible via Mui-focusVisible.',\n  ],\n  usageExamples: [\n    '<Button variant=\"primary\">Save changes</Button>',\n    '<Button variant=\"destructive\">Delete account</Button>',\n  ],\n  rules: [\n    'Every action control is the design-system Button; never a raw <button>, a directly-imported MUI Button, or a custom-styled clickable element.',\n    'Pick the variant from the emphasis ladder: `primary` for the single most important action in a view, `secondary` (the default) for ordinary actions, `ghost` for tertiary ones such as Cancel, `destructive` for irreversible ones.',\n    'When several buttons sit inline, make them all `secondary` and promote at most one to `primary`. If you cannot confidently judge which should be primary, ask.',\n    'Write labels that name the action (\"Save changes\", \"Send invite\"), not \"OK\" or \"Click here\".',\n    'Show a loading state for actions that take time, so the user knows it is working.',\n    'For a dedicated icon-only control use IconButton with an accessible label and a tooltip, not Button.',\n    'Pick `size` from context: `small` in dense toolbars and tables, `medium` in standard forms, `large` for prominent CTAs. If you are not sure, ask.',\n  ],\n  antiPatterns: [\n    'Do not place more than one primary button in the same view; it dilutes the visual hierarchy.',\n    'Do not use the destructive variant without a confirmation step for irreversible actions.',\n    'Do not use Button for navigation between pages; use a link.',\n    'Do not put long sentences inside a Button.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Triggering an action', 'Submitting a form', 'Confirming a dialog'],\n  whenNotToUse: ['Navigating to another page (use a link)', 'Toggling a setting (use Switch/ToggleButton)'],\n});\n\nexport default buttonMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const checkboxMeta = defineMeta({\n  name: 'Checkbox',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Boolean / multi-select control. Themed MUI Checkbox.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Checkbox',\n  muiDocs: 'https://mui.com/material-ui/react-checkbox/',\n  a2uiEquivalent: 'Checkbox',\n  importPath: '@/atoms/Checkbox',\n  optionalProps: ['checked', 'defaultChecked', 'indeterminate', 'disabled', 'size', 'onChange'],\n  supportedStates: ['default', 'checked', 'indeterminate', 'disabled', 'focus'],\n  designTokens: ['colors'],\n  accessibility: [\n    'Wrap with FormControlLabel to provide an accessible label.',\n    'Keyboard: Space toggles. Group related checkboxes in a FormGroup.',\n  ],\n  usageExamples: ['<FormControlLabel control={<Checkbox />} label=\"Enable\" />'],\n  antiPatterns: ['Do not use a single Checkbox where a Switch (on/off setting) is more appropriate.'],\n  llmSafe: true,\n  whenToUse: ['Selecting multiple options', 'Opt-in / consent toggles in forms'],\n  whenNotToUse: ['Mutually exclusive choices (use Radio)'],\n});\n\nexport default checkboxMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const radioMeta = defineMeta({\n  name: 'Radio',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Single-select control for mutually-exclusive options. Themed MUI Radio + RadioGroup.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Radio',\n  muiDocs: 'https://mui.com/material-ui/react-radio-button/',\n  a2uiEquivalent: 'RadioGroup',\n  importPath: '@/atoms/Radio',\n  optionalProps: ['checked', 'value', 'disabled', 'size', 'onChange'],\n  supportedStates: ['default', 'selected', 'disabled', 'focus'],\n  designTokens: ['colors'],\n  accessibility: [\n    'Always group Radios in a RadioGroup with an associated FormLabel.',\n    'Keyboard: arrow keys move selection within the group.',\n  ],\n  usageExamples: ['<RadioGroup><FormControlLabel value=\"a\" control={<Radio />} label=\"A\" /></RadioGroup>'],\n  antiPatterns: ['Do not use a single Radio in isolation.', 'Do not use Radio for on/off (use Switch).'],\n  llmSafe: true,\n  whenToUse: ['Choosing one option from a small set (2-6)'],\n  whenNotToUse: ['Many options (use Select)', 'Multiple selections (use Checkbox)'],\n});\n\nexport default radioMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const switchMeta = defineMeta({\n  name: 'Switch',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Instant on/off setting control. Themed MUI Switch.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Switch',\n  muiDocs: 'https://mui.com/material-ui/react-switch/',\n  a2uiEquivalent: 'Switch',\n  importPath: '@/atoms/Switch',\n  optionalProps: ['checked', 'defaultChecked', 'disabled', 'size', 'onChange'],\n  supportedStates: ['on', 'off', 'disabled', 'focus'],\n  designTokens: ['colors'],\n  accessibility: [\n    'Wrap with FormControlLabel for an accessible label.',\n    'Represents an immediate state change (no Save needed).',\n  ],\n  usageExamples: ['<FormControlLabel control={<Switch />} label=\"Notifications\" />'],\n  antiPatterns: ['Do not use a Switch when a form submit is required to apply the change (use Checkbox).'],\n  llmSafe: true,\n  whenToUse: ['Toggling a setting that applies immediately'],\n  whenNotToUse: ['Form fields requiring submit', 'Selecting from options'],\n});\n\nexport default switchMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const textFieldMeta = defineMeta({\n  name: 'TextField',\n  level: 'atom',\n  category: 'input',\n  classification: 'mui-overrides',\n  description: 'Single/multi-line text input with label, helper text and error states.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'TextField',\n  muiDocs: 'https://mui.com/material-ui/react-text-field/',\n  a2uiEquivalent: 'TextInput',\n  importPath: '@/atoms/TextField',\n  optionalProps: [\n    'label',\n    'placeholder',\n    'helperText',\n    'error',\n    'required',\n    'disabled',\n    'multiline',\n    'value',\n    'onChange',\n    'size',\n  ],\n  props: [\n    {\n      name: 'size',\n      type: \"'small' | 'medium'\",\n      default: 'medium',\n      description:\n        'Outer height from `controlHeights`: small=28 (Button small), medium=36 (Button medium). Same `size` name as a sibling Button so an inline row matches.',\n    },\n  ],\n  supportedStates: ['default', 'focus', 'filled', 'error', 'disabled', 'required'],\n  designTokens: ['colors', 'radius', 'typography', 'controlHeights'],\n  accessibility: [\n    'label is associated automatically; avoid placeholder-only labeling.',\n    'Use helperText + error to convey validation; consider aria-describedby.',\n  ],\n  usageExamples: ['<TextField label=\"Email\" helperText=\"Required\" />'],\n  rules: [\n    'The fill recesses one rung below whatever surface hosts the field, which is what makes it read as inset rather than as a box laid on top. It resolves from the surface scope, so the same field is correct in a page form, a card and a dialog without being told where it is.',\n    'On `page` there is no rung below to recess into, so the field is transparent and a heavier outline carries the affordance instead. That is the intended appearance on that one rung, not a missing background.',\n    'Pick `size` from context the same way as Button: default `medium` (36px) in forms and toolbars beside medium buttons; `small` (28px) only in dense toolbars and tables beside small buttons. There is no `large` — MUI TextField does not expose one.',\n  ],\n  antiPatterns: [\n    'Do not rely on placeholder as the only label.',\n    'Do not set a background on a field. It defeats the recession and pins the field to one context, so it will be wrong the first time it is used on another surface.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Collecting free-form text', 'Numbers, emails, search terms'],\n  whenNotToUse: ['Choosing from known options (use Select/Autocomplete)'],\n});\n\nexport default textFieldMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const selectMeta = defineMeta({\n  name: 'Select',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Dropdown for choosing one (or many) option(s) from a list. Themed MUI Select.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Select',\n  muiDocs: 'https://mui.com/material-ui/react-select/',\n  a2uiEquivalent: 'Dropdown',\n  importPath: '@/atoms/Select',\n  optionalProps: ['value', 'multiple', 'label', 'disabled', 'onChange', 'size'],\n  props: [\n    {\n      name: 'size',\n      type: \"'small' | 'medium'\",\n      default: 'medium',\n      description:\n        'Outer height from `controlHeights` (small=28, medium=36), matching Button and TextField of the same size.',\n    },\n  ],\n  supportedStates: ['default', 'open', 'selected', 'disabled', 'error'],\n  designTokens: ['colors', 'radius', 'controlHeights'],\n  accessibility: [\n    'Pair with InputLabel via labelId for an accessible name.',\n    'Keyboard: Enter/Space opens; arrows navigate; Esc closes.',\n  ],\n  usageExamples: ['<Select label=\"Region\"><MenuItem value=\"a\">A</MenuItem></Select>'],\n  rules: [\n    'Pick `size` from context the same way as Button and TextField: default `medium` (36px) beside medium buttons; `small` (28px) in dense toolbars and tables.',\n  ],\n  antiPatterns: ['Do not use Select for fewer than 3 options (use Radio).', 'Avoid for searchable lists (use Autocomplete).'],\n  llmSafe: true,\n  whenToUse: ['Choosing from a medium/large set of known options'],\n  whenNotToUse: ['Free-text entry', 'Very small option sets'],\n});\n\nexport default selectMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const avatarMeta = defineMeta({\n  name: 'Avatar',\n  level: 'atom',\n  category: 'data-display',\n  classification: 'themed-mui',\n  description: 'Represents a user or entity via image, initials or icon. Themed MUI Avatar.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Avatar',\n  muiDocs: 'https://mui.com/material-ui/react-avatar/',\n  a2uiEquivalent: 'Avatar',\n  importPath: '@/atoms/Avatar',\n  optionalProps: ['src', 'alt', 'variant', 'children', 'sx'],\n  supportedStates: ['image', 'initials', 'icon', 'fallback'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Always set alt for image avatars; initials should reflect the entity name.'],\n  usageExamples: ['<Avatar src=\"/u.png\" alt=\"Jane\" />', '<Avatar>JS</Avatar>'],\n  rules: [\n    'An avatar is a neutral control fill two rungs above its host, carrying primary text. It reads its own colour from the surface it is on, so there is nothing to pass in.',\n    'Two rungs, not one, because one rung up is what a nested card takes - an avatar there would read as a small panel rather than as an identity mark.',\n    'If you override bgcolor with a saturated colour, set color as well. The default ink is light, and light ink on brand teal is 1.89:1. Pair the fill with its own contrastText.',\n  ],\n  antiPatterns: [\n    'Do not omit alt on image avatars.',\n    'Do not set bgcolor from the brand to make an avatar stand out. Brand marks the primary action and the current selection; an identity mark is neither.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Showing user/entity identity'],\n  whenNotToUse: ['Decorative icons (use Icon)'],\n});\n\nexport default avatarMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const chipMeta = defineMeta({\n  name: 'Chip',\n  level: 'atom',\n  category: 'data-display',\n  classification: 'mui-overrides',\n  description:\n    'The single compact-label primitive: severity, status, category, metric, lifecycle, filter, select, entity, overflow and picker. Pick a `purpose` from meaning and the appearance, rendered semantics and keyboard contract are derived from it. The older variant/color API still works but is deprecated.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Chip',\n  muiDocs: 'https://mui.com/material-ui/react-chip/',\n  a2uiEquivalent: 'Badge',\n  importPath: '@/atoms/Chip',\n  requiredProps: ['purpose'],\n  optionalProps: ['size', 'icon', 'disabled'],\n  customVariants: ['subtle', 'dot'],\n  supportedStates: ['static', 'clickable', 'removable', 'selected', 'expanded', 'disabled'],\n  designTokens: ['colors', 'severity', 'status', 'radius', 'typography', 'sizes'],\n  accessibility: [\n    'Static purposes (severity, status, category, metric, lifecycle) render no tab stop and no click handler.',\n    'Interactive purposes carry the right ARIA state automatically: select sets aria-pressed (including inside an exclusive group — exclusivity is parent state, not a radio), entity sets aria-haspopup, overflow sets aria-expanded, picker sets aria-haspopup=\"dialog\" plus aria-expanded.',\n    'Filter chips are removed by pointer on the delete icon or by Backspace/Delete on the focused chip, which is MUI behaviour; the chip is named as a filter so the target is unambiguous. A picker chip removes the same way — its X removes the whole filter rather than emptying it.',\n    'The delete X keeps a pointer target larger than the glyph it draws — 24px against the 16px medium glyph, meeting WCAG 2.5.8, and the same 24px at `large` and `extraLarge`. At `size=\"small\"` it is ~21px, which is as much as a 22px pill can hold. The glyph is not separately focusable, so clicking it is the only pointer route to removing a chip.',\n    'Entity chips put the full canonical value and the verdict in the accessible name, because the visible text may be truncated and the tint is not perceivable to everyone.',\n    'Picker chips spell the whole selection out in the accessible name, because the visible text shows only the first value and counts the rest. Past five it counts the remainder rather than reciting them.',\n    'Never encode meaning through colour alone — every purpose renders a visible text label.',\n  ],\n  usageExamples: [\n    '<Chip purpose=\"severity\" level=\"critical\" />',\n    '<Chip purpose=\"status\" tone=\"warning\" label=\"Investigating\" />',\n    '<Chip purpose=\"category\" label=\"Credential Access\" size=\"small\" />',\n    '<Chip purpose=\"metric\" label=\"12 related\" size=\"small\" />',\n    '<Chip purpose=\"lifecycle\" stage=\"beta\" size=\"small\" />',\n    '<Chip purpose=\"filter\" field=\"Severity\" label=\"Critical\" onRemove={clear} />',\n    '<Chip purpose=\"select\" label=\"EDR\" selected={on} onToggle={setOn} />',\n    '<Chip purpose=\"select\" label=\"EDR\" selected={source === \"EDR\"} onToggle={(on) => on && setSource(\"EDR\")} />',\n    '<Chip purpose=\"entity\" kind=\"ip\" value=\"203.0.113.47\" verdict=\"malicious\" onOpen={openMenu} />',\n    '<Chip purpose=\"overflow\" count={3} onDisclose={showAll} />',\n    '<Chip purpose=\"picker\" field=\"Severity\" values={[\"Critical\", \"High\"]} expanded={open} onOpen={openPanel} onRemove={dropField} />',\n  ],\n  rules: [\n    'Every tag, filter, status and risk pill is the design-system Chip. Pick `purpose` from what the value means, never from how it should look.',\n    '`purpose=\"severity\"` for risk. Pass `level` from critical|high|medium|low|info|untriaged; the canonical word is derived, so do not also pass a label.',\n    '`purpose=\"status\"` for workflow or health state. Pass a semantic `tone` plus the product word as `label`, e.g. tone=\"warning\" label=\"Investigating\".',\n    '`purpose=\"category\"` for classification metadata: MITRE tactics, data sources, environments, asset classes. Always neutral, because colour is reserved for severity.',\n    '`purpose=\"metric\"` for a measured value such as `PDF 262 KB` or `12 related`. Use this rather than Badge when nothing anchors the count.',\n    '`purpose=\"lifecycle\"` for how mature a feature is: pass `stage` from new|beta|alpha|preview|deprecated and the word is derived. This is the one chip that carries the brand accent, on the outline rather than a fill, so a release marker is never mistaken for a data pill.',\n    'A lifecycle chip marks the product surface — a nav item, a page title, a settings row — so put one on the name of the thing that is new, and only one. If a user could filter a list by the word, it is data about a record and belongs in `purpose=\"category\"`: `Built-in` on a workflow row is a property of that workflow, not a release stage.',\n    '`purpose=\"filter\"` for an applied criterion. `onRemove` is required, and `field` keeps the criterion readable out of context.',\n    '`purpose=\"select\"` for a toggleable option. `selected` and `onToggle` are both required so the state is always controlled. Each chip toggles itself — clicking it does not change its neighbours. For a mutually exclusive group, keep one selected value in the parent and pass `selected={value === option}` / `onToggle={(on) => on && setValue(option)}`; the chip does not own exclusivity.',\n    '`purpose=\"entity\"` for an entity value in prose or a dense cell. It renders monospace at the surrounding text size and opens a detail menu via `onOpen`.',\n    '`purpose=\"overflow\"` is the `+N more` disclosure for a capped group — prefer ChipGroup, which manages it for you.',\n    '`purpose=\"picker\"` is the trigger for a multi-select filter panel — prefer FilterMenu, which owns the chip, the panel and the open state. Reach for the bare chip only when you are supplying your own surface.',\n    'A picker chip is the one chip that both shows a value and changes it, and the exception is narrow: it changes which values are filtered on, never the record underneath. Pass `values` as the labels a user reads, not raw option values.',\n    'Every neutral pill — `category`, `metric`, `filter`, `picker` and `overflow` — shares the chrome of an outlined TextField: a quiet fill inside a quiet border, from the same `inputColors` tokens as the inputs and the secondary Button. A filter bar is a row of form controls, so its pills should sit at the same visual level as the controls beside them rather than compete with the severity chips in the table below.',\n    'Interactivity is carried by the affordance, not the outline: an X on `filter`, a chevron on `picker`, `+N more` on `overflow`, plus the focus ring and hover response. Do not read border weight as \"clickable\" — most neutral pills draw one either way.',\n    '`filter` and `picker` render the field name in muted ink and the value promoted, so two chips in a bar differ where they actually differ. Pass `field` on a filter chip to get it; without one, the whole label is treated as the value.',\n    'Use `size=\"small\"` (22px) in tables and dense cells. Default `medium` (28px) matches Button `small`; `large` (36px) matches Button `medium`; `extraLarge` (44px) matches Button `large`. Same size name on Chip vs Button does not mean the same height. `purpose=\"entity\"` does not accept `size` — change the surrounding Typography instead.',\n    'Badge is only a count or dot anchored to another element; a standalone pill is always a Chip.',\n    'Inside a Table, workflow state is TableStatusCell rather than purpose=\"status\" — a row already carries enough pill shapes.',\n  ],\n  antiPatterns: [\n    'Do not pass `variant` or `color`; they are the deprecated API and warn in development. Use `purpose`.',\n    'Do not pass Chip `size=\"small\"` next to Button `size=\"small\"` expecting them to line up — Chip `small` is the 22px table rung; use Chip `medium` beside Button `small`.',\n    \"Do not import Chip from @mui/material; import { Chip } from '@aistrike-dev/ui'.\",\n    'Do not hand-roll pill or tag elements from span/div/Box; use Chip.',\n    'Do not hardcode severity hex values; pass `level`.',\n    'Do not set `fontSize` on an icon passed to `icon`, and do not pre-size the SVG. The theme scales every glyph in a chip — leading icon, delete X, picker chevron — to a fixed ratio of that chip\\'s label, so it stays right at every size and inside an entity chip that sizes itself to the surrounding prose. A fixed px value is what made these render at 24px against a 12px label.',\n    'Do not use the severity scale for verdict, confidence, health or chart series.',\n    'Do not colour-code categories; colour is committed to severity.',\n    'Do not use a Chip as an action trigger; use Button. A chip carries a value — `Isolate host` is a verb and belongs on a Button.',\n    'Do not put an interactive purpose inside a MenuItem, a table row link or any other click target.',\n    'Do not wire select chips so that clicking one inverts a shared boolean across the group. That only works for two options and breaks as soon as a third appears. Exclusive grouping is one parent value, each chip reflecting whether it is that value.',\n    'Do not give one chip two functions, with the single exception of `purpose=\"picker\"`, where the body opens the panel and the X removes the filter. Both operate on the same filter, and the pattern is worth the second target only there — anywhere else, a body that edits beside a corner that removes is two controls wearing one pill.',\n    'Do not make the X on a picker chip clear the selection instead of removing the filter. It is the same glyph in the same corner as on `purpose=\"filter\"`, so it has to mean the same thing; emptying the selection while keeping the field is the panel\\'s `Reset`.',\n    'Do not pass `onRemove` unless the user can add the filter back, through an `Add filter` menu or similar. A removable chip with no way to return it is a dead end — for a bar of fixed fields, omit it and let `Reset` empty the selection.',\n    'Do not use a picker chip to change a record. Picking which severities a table shows is a filter; setting an alert to `Contained` is a Menu behind a Button.',\n    'Do not leave a lifecycle chip on a feature after it ships; a permanent `New` marker teaches users to ignore the treatment. Removing it is part of the launch, not a follow-up.',\n    'Do not invent stage words by passing `label` for something outside the vocabulary — \"Coming soon\" is a roadmap claim, not a state the UI is in.',\n    'Do not put a lifecycle chip on a record, a row of data or a chart series; it describes the product, not the content.',\n  ],\n  llmSafe: true,\n  whenToUse: [\n    'Severity and risk labels',\n    'Workflow and health status',\n    'Category and classification metadata',\n    'Applied filters and toggleable options',\n    'A filter bar where each field is a chip that opens its own value panel (via FilterMenu)',\n    'Entity values inside prose',\n    'Release stage markers on features (New, Beta, Deprecated)',\n  ],\n  whenNotToUse: [\n    'Primary actions (use Button)',\n    'Changing a status in place (use a Menu-backed trigger, not a Chip)',\n    'Notification counts anchored to an icon (use Badge)',\n    'Long technical identifiers outside the entity purpose (use monospace Typography)',\n    'Several filter fields committed together (use FilterPopover)',\n  ],\n});\n\nexport default chipMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const dividerMeta = defineMeta({\n  name: 'Divider',\n  level: 'atom',\n  category: 'layout',\n  classification: 'themed-mui',\n  description: 'Thin rule to separate content or groups. Themed MUI Divider.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Divider',\n  muiDocs: 'https://mui.com/material-ui/react-divider/',\n  a2uiEquivalent: 'Separator',\n  importPath: '@/atoms/Divider',\n  optionalProps: ['orientation', 'flexItem', 'textAlign', 'variant', 'children'],\n  supportedStates: ['horizontal', 'vertical', 'with-text'],\n  designTokens: ['colors'],\n  accessibility: ['Decorative dividers are role=\"separator\"; avoid relying on them to convey meaning.'],\n  usageExamples: ['<Divider />', '<Divider orientation=\"vertical\" flexItem />'],\n  antiPatterns: ['Do not overuse dividers; prefer spacing for grouping.'],\n  llmSafe: true,\n  whenToUse: ['Separating list items or sections'],\n  whenNotToUse: ['Creating layout columns (use Grid/Stack)'],\n});\n\nexport default dividerMeta;\n","import { createContext, useContext } from 'react';\nimport type { SurfaceRung } from '@/tokens/colors';\nimport { portalRung } from '@/tokens/surfaceScopes';\n\n/**\n * What a `Surface` publishes to its descendants.\n *\n * This travels through React context, which — unlike the CSS custom properties\n * the same component emits — crosses portals. That difference is the whole\n * reason portalled overlays need to re-declare a rung: they can still *read*\n * where they came from, but the browser will not inherit the variables to them.\n *\n * Kept in its own module so `Surface.tsx` exports only a component and stays\n * eligible for fast refresh.\n */\nexport interface SurfaceContextValue {\n  /** How many surfaces deep, counting this one. The app shell is 0. */\n  depth: number;\n  /** The rung this surface resolved to. */\n  rung: SurfaceRung;\n}\n\nexport const SurfaceContext = createContext<SurfaceContextValue | null>(null);\n\n/** The root defaults, used when a component is rendered outside any `Surface`. */\nexport const ROOT_SURFACE: SurfaceContextValue = { depth: 0, rung: 'page' };\n\n/**\n * The rung of the nearest enclosing `Surface`, and how deep it is.\n *\n * Returns the root defaults outside any surface, so a component can call this\n * unconditionally.\n */\nexport function useSurface(): SurfaceContextValue {\n  return useContext(SurfaceContext) ?? ROOT_SURFACE;\n}\n\n/**\n * The rung a portalled child of the current surface should render on.\n *\n * For overlay components that MUI reparents to `document.body`. See\n * `portalRung` for why it is `max(raised, host + 1)` rather than `host + 1`.\n */\nexport function usePortalRung(): SurfaceRung {\n  return portalRung(useSurface().rung);\n}\n","import { useContext, useEffect, useMemo, useRef } from 'react';\nimport type { ElementType, ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport type { BoxProps } from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\nimport { MAX_SURFACE_DEPTH, type SurfaceRung } from '@/tokens/colors';\nimport { nextRung, scopeToCssVars, surfaceScopes } from '@/tokens/surfaceScopes';\nimport { SurfaceContext, type SurfaceContextValue } from './surfaceContext';\n\nexport interface SurfaceProps extends Omit<BoxProps, 'component'> {\n  /**\n   * Force a rung instead of deriving one from the parent.\n   *\n   * Needed for portalled content, which cannot inherit through the DOM. Prefer\n   * letting the rung derive: an explicit value is a claim about where this\n   * element sits that the component tree can no longer keep honest.\n   */\n  rung?: SurfaceRung;\n  /** Render a different element. Defaults to `div`. */\n  component?: ElementType;\n  children?: ReactNode;\n}\n\n/**\n * A background that knows where it is.\n *\n * Wrapping content in a `Surface` does two things: it paints the correct rung\n * for its nesting depth, and it declares the `--ds-*` custom properties that\n * descendants read to stay consistent with it — an input recesses one rung\n * below, quiet text picks a tier that still clears contrast, a border picks a\n * value that is legible against this specific background.\n *\n * Nesting is capped at three levels (`MAX_SURFACE_DEPTH`). A fourth is painted\n * at its parent's rung rather than continuing up the ladder, and logs an error\n * in development. The cap exists because the rungs are 2–3 L\\* apart: past three\n * steps the steps stop reading as hierarchy and start reading as noise, and the\n * text ramp runs out of contrast headroom. If you need a fourth level, the\n * answer is almost always that one of the outer three should not be a surface.\n */\nexport function Surface({ rung: explicitRung, sx, style, children, ...rest }: SurfaceProps) {\n  const parent = useContext(SurfaceContext);\n  const mode = useTheme().palette.mode;\n\n  const depth = parent ? parent.depth + 1 : 0;\n  const exceedsCeiling = depth > MAX_SURFACE_DEPTH;\n\n  const rung: SurfaceRung = explicitRung\n    ? explicitRung\n    : !parent\n      ? 'page'\n      : exceedsCeiling\n        ? // Clamp rather than saturate at `overlay`: repainting at the parent's\n          // rung makes the nesting visually invisible, which is a truer signal\n          // that the level is not carrying its weight.\n          parent.rung\n        : nextRung(parent.rung);\n\n  const warned = useRef(false);\n  useEffect(() => {\n    if (process.env.NODE_ENV === 'production' || !exceedsCeiling || warned.current) return;\n    warned.current = true;\n    console.error(\n      `[octopus-ui] Surface nested ${depth} levels deep, past the ceiling of ${MAX_SURFACE_DEPTH}. ` +\n        `Painted at \"${rung}\" (its parent's rung) instead of stepping up, so this level is ` +\n        `invisible. Flatten the hierarchy: one of the enclosing surfaces is probably a plain ` +\n        `container rather than a surface. See the Surface Ladder docs.`,\n    );\n  }, [depth, exceedsCeiling, rung]);\n\n  const value = useMemo<SurfaceContextValue>(() => ({ depth, rung }), [depth, rung]);\n  const scope = surfaceScopes[mode][rung];\n\n  return (\n    <SurfaceContext.Provider value={value}>\n      <Box\n        data-surface={rung}\n        data-surface-depth={depth}\n        // Hex values in `sx` get concatenated into Emotion class names; a `#`\n        // there is parsed as an ID selector and the whole rule is dropped.\n        style={{ ...scopeToCssVars(scope), ...style }}\n        sx={[\n          {\n            backgroundColor: 'var(--ds-bg)',\n            color: 'var(--ds-text)',\n          },\n          ...(Array.isArray(sx) ? sx : [sx]),\n        ]}\n        {...rest}\n      >\n        {children}\n      </Box>\n    </SurfaceContext.Provider>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const surfaceMeta = defineMeta({\n  name: 'Surface',\n  level: 'atom',\n  category: 'layout',\n  classification: 'custom',\n  description:\n    'A background that resolves its own colour from how deeply it is nested, and publishes --ds-* custom properties so descendants stay consistent with it.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'Container',\n  importPath: '@/atoms/Surface',\n  mountsSurface: 'inline',\n  optionalProps: ['rung', 'component', 'sx', 'children'],\n  supportedStates: ['page', 'primary', 'widget', 'surface', 'raised', 'overlay'],\n  designTokens: ['colors', 'surfaceScopes'],\n  accessibility: [\n    'Purely presentational: renders a div with no role, so it does not affect the accessibility tree.',\n    'Quiet text switches from `text.subtle` to `text.tertiary` above `widget`, which is what keeps de-emphasised text at 4.5:1 on higher rungs.',\n  ],\n  usageExamples: [\n    '<Surface>{/* app shell — resolves to page */}</Surface>',\n    '<Surface><Surface>{/* a card on the page body — resolves to widget */}</Surface></Surface>',\n    '<Surface rung=\"raised\">{/* portalled tooltip, cannot inherit */}</Surface>',\n  ],\n  rules: [\n    'Let the rung derive from nesting. Wrap content and the correct colour follows.',\n    'Set `rung` explicitly only for portalled content — tooltips, menus, dialogs — which is reparented to document.body and cannot inherit CSS variables. Use `usePortalRung()` to compute the value.',\n    'Read `var(--ds-field)` for an input background so it recesses one rung below its host, and `var(--ds-text-quiet)` for de-emphasised text so it stays legible as the ladder lightens.',\n    'Three levels of nesting is the maximum. If you need a fourth, one of the outer three should be a plain container instead.',\n  ],\n  antiPatterns: [\n    'Do not hardcode a background hex on a container; that is the drift this component exists to remove.',\n    'Do not nest more than three deep. A fourth level is painted at its parent rung and logs an error in development, so the nesting has no visual effect.',\n    'Do not use `rung` to skip up the ladder for emphasis. Rungs encode containment, not importance.',\n  ],\n  llmSafe: true,\n  whenToUse: [\n    'Any container that needs a background: a card, a panel, a dialog body, a side drawer',\n    'Wrapping portalled overlay content so it declares a rung the DOM cannot give it',\n  ],\n  whenNotToUse: [\n    'A container that needs no background of its own — use Box or Stack, and let the surface show through',\n    'Conveying emphasis or severity, which is what Chip, Alert and the severity tokens are for',\n  ],\n});\n\nexport default surfaceMeta;\n","import type { ComponentType } from 'react';\nimport MuiSvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon';\nimport { iconColors } from '@/tokens/colors';\n\n/**\n * Icon\n * Classification: mui-wrapper\n * MUI base: https://mui.com/material-ui/icons/\n *\n * Thin wrapper around MUI's SvgIcon that standardizes semantic icon colors via\n * design tokens. Pass any `@mui/icons-material` icon as `icon`.\n */\n\nexport type IconTone = keyof typeof iconColors;\n\nexport interface IconProps extends Omit<SvgIconProps, 'color'> {\n  /** The icon component, e.g. from `@mui/icons-material`. */\n  icon: ComponentType<SvgIconProps>;\n  /** Semantic color from the icon token set. Defaults to `inherit`. */\n  tone?: IconTone;\n}\n\nexport function Icon({ icon: IconComponent, tone, sx, ...rest }: IconProps) {\n  return (\n    <IconComponent\n      sx={{ color: tone ? iconColors[tone] : 'inherit', ...sx }}\n      {...rest}\n    />\n  );\n}\n\n/** Re-export SvgIcon for building fully-custom icons. */\nexport { MuiSvgIcon as SvgIcon };\nexport type { SvgIconProps };\n","import { defineMeta } from '@/registry/types';\n\nexport const iconMeta = defineMeta({\n  name: 'Icon',\n  level: 'atom',\n  category: 'data-display',\n  classification: 'mui-wrapper',\n  description: 'Wrapper over MUI SvgIcon that applies semantic icon-color tokens via `tone`.',\n  baseLibrary: '@mui/icons-material',\n  muiEquivalent: 'SvgIcon',\n  muiDocs: 'https://mui.com/material-ui/icons/',\n  a2uiEquivalent: 'Icon',\n  importPath: '@/atoms/Icon',\n  requiredProps: ['icon'],\n  optionalProps: ['tone', 'fontSize', 'sx'],\n  props: [\n    { name: 'icon', type: 'ComponentType<SvgIconProps>', required: true, description: 'Icon component, e.g. from @mui/icons-material' },\n    { name: 'tone', type: 'IconTone', description: 'Semantic color token' },\n    { name: 'fontSize', type: \"'small' | 'medium' | 'large' | 'inherit'\" },\n  ],\n  supportedStates: ['default', 'toned'],\n  designTokens: ['icon-colors'],\n  accessibility: [\n    'Icons are decorative by default; provide titleAccess for meaningful icons.',\n    'Do not convey state via color alone.',\n  ],\n  usageExamples: ['<Icon icon={WarningIcon} tone=\"warning\" />'],\n  antiPatterns: ['Do not hardcode hex colors; use the tone prop.'],\n  llmSafe: true,\n  whenToUse: ['Status indicators, decorative glyphs, button icons'],\n  whenNotToUse: ['User identity (use Avatar)'],\n});\n\nexport default iconMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const typographyMeta = defineMeta({\n  name: 'Typography',\n  level: 'atom',\n  category: 'data-display',\n  classification: 'themed-mui',\n  description:\n    'Text primitive with the design system type scale and system-native font stack. Themed MUI Typography with no external font loading required.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Typography',\n  muiDocs: 'https://mui.com/material-ui/react-typography/',\n  a2uiEquivalent: 'Text',\n  importPath: '@/atoms/Typography',\n  optionalProps: ['variant', 'color', 'align', 'noWrap', 'gutterBottom', 'component'],\n  supportedStates: ['default'],\n  designTokens: ['typography', 'colors'],\n  accessibility: [\n    'Use semantic variants and the `component` prop to keep heading order correct.',\n    'Avoid skipping heading levels for styling reasons.',\n  ],\n  usageExamples: [\n    '<Typography variant=\"h4\">Security overview</Typography>',\n    '<Typography variant=\"body1\" color=\"text.secondary\">Supporting copy</Typography>',\n    '<Typography variant=\"caption\">Last seen 10h ago</Typography>',\n  ],\n  rules: [\n    'Always set `variant` explicitly — do not rely on the body1 default.',\n    'Pick the variant for the role: h4 page title, h6 drawer/empty-state heading, subtitle1 card or accordion title, subtitle2 compact heading, body1 for default reading text (14px), body2 only for dense annotations (12px), caption metadata, overline labels.',\n    'A container that may hold non-text children applies the variant via `sx={{ typography: \"body1\" }}` on a Box, so it does not wrap a table in a `<p>`.',\n  ],\n  antiPatterns: [\n    'Do not use h1-h6 purely for size; pick the right semantic level.',\n    'Do not style a Box or span with a font-size literal when a Typography variant exists.',\n    'Do not omit `variant` and then override fontSize in sx.',\n  ],\n  llmSafe: true,\n  whenToUse: ['All text content that is not already owned by another component slot'],\n  whenNotToUse: [\n    'Interactive labels handled by their own components (Button, Chip, FormField, EmptyState title/description, DialogTitle, AlertTitle)',\n  ],\n});\n\nexport default typographyMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const tooltipMeta = defineMeta({\n  name: 'Tooltip',\n  level: 'atom',\n  category: 'feedback',\n  classification: 'mui-overrides',\n  description: 'Contextual hint on hover/focus. Themed MUI Tooltip with arrow by default.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Tooltip',\n  muiDocs: 'https://mui.com/material-ui/react-tooltip/',\n  a2uiEquivalent: 'Tooltip',\n  importPath: '@/atoms/Tooltip',\n  requiredProps: ['title', 'children'],\n  optionalProps: ['placement', 'arrow', 'enterDelay'],\n  supportedStates: ['hidden', 'visible'],\n  designTokens: ['colors', 'radius'],\n  accessibility: [\n    'Child must be focusable so keyboard users can trigger the tooltip.',\n    'Do not put essential information only in a tooltip.',\n  ],\n  usageExamples: ['<Tooltip title=\"Refresh\"><IconButton>...</IconButton></Tooltip>'],\n  antiPatterns: ['Do not wrap disabled elements directly (wrap in a span).'],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Explaining icon buttons or truncated text'],\n  whenNotToUse: ['Critical content that must always be visible'],\n});\n\nexport default tooltipMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const badgeMeta = defineMeta({\n  name: 'Badge',\n  level: 'atom',\n  category: 'data-display',\n  classification: 'themed-mui',\n  description: 'Small count or status indicator anchored to another element. Themed MUI Badge.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Badge',\n  muiDocs: 'https://mui.com/material-ui/react-badge/',\n  a2uiEquivalent: 'Badge',\n  importPath: '@/atoms/Badge',\n  optionalProps: ['badgeContent', 'color', 'variant', 'max', 'showZero', 'overlap'],\n  supportedStates: ['count', 'dot', 'zero', 'max'],\n  designTokens: ['colors'],\n  accessibility: ['Ensure the count is conveyed to screen readers via the wrapped control label.'],\n  usageExamples: ['<Badge badgeContent={4} color=\"error\"><NotificationsIcon /></Badge>'],\n  antiPatterns: ['Do not place long text in a Badge (use Chip).'],\n  llmSafe: true,\n  whenToUse: ['Unread counts, notification dots, status'],\n  whenNotToUse: ['Standalone labels (use Chip)'],\n});\n\nexport default badgeMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const skeletonMeta = defineMeta({\n  name: 'Skeleton',\n  level: 'atom',\n  category: 'feedback',\n  classification: 'themed-mui',\n  description: 'Loading placeholder that mimics content shape. Themed MUI Skeleton.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Skeleton',\n  muiDocs: 'https://mui.com/material-ui/react-skeleton/',\n  a2uiEquivalent: 'Skeleton',\n  importPath: '@/atoms/Skeleton',\n  optionalProps: ['variant', 'width', 'height', 'animation'],\n  supportedStates: ['pulse', 'wave', 'loading'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Mark loading regions with aria-busy; announce when content loads.'],\n  usageExamples: ['<Skeleton variant=\"rectangular\" height={120} />'],\n  antiPatterns: ['Do not leave skeletons visible after data has loaded.'],\n  llmSafe: true,\n  whenToUse: ['Initial data loading states'],\n  whenNotToUse: ['Empty states (use EmptyState)'],\n});\n\nexport default skeletonMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const sliderMeta = defineMeta({\n  name: 'Slider',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Selects a numeric value or range along a track. Themed MUI Slider.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Slider',\n  muiDocs: 'https://mui.com/material-ui/react-slider/',\n  a2uiEquivalent: 'Slider',\n  importPath: '@/atoms/Slider',\n  optionalProps: ['value', 'defaultValue', 'min', 'max', 'step', 'marks', 'disabled', 'valueLabelDisplay'],\n  supportedStates: ['default', 'focus', 'dragging', 'disabled', 'range'],\n  designTokens: ['colors'],\n  accessibility: ['Provide aria-label or aria-labelledby; keyboard arrows adjust value.'],\n  usageExamples: ['<Slider defaultValue={50} aria-label=\"Threshold\" />'],\n  antiPatterns: ['Do not use sliders for precise numeric entry (use TextField).'],\n  llmSafe: true,\n  whenToUse: ['Approximate value selection, ranges, thresholds'],\n  whenNotToUse: ['Exact values requiring precision'],\n});\n\nexport default sliderMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const ratingMeta = defineMeta({\n  name: 'Rating',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Star-based rating input/display. Themed MUI Rating.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Rating',\n  muiDocs: 'https://mui.com/material-ui/react-rating/',\n  a2uiEquivalent: 'Rating',\n  importPath: '@/atoms/Rating',\n  optionalProps: ['value', 'defaultValue', 'precision', 'readOnly', 'disabled', 'max'],\n  supportedStates: ['default', 'hover', 'readOnly', 'disabled', 'half'],\n  designTokens: ['colors'],\n  accessibility: ['Rating is a radio group; provide a name and label for forms.'],\n  usageExamples: ['<Rating defaultValue={4} precision={0.5} />'],\n  antiPatterns: ['Do not use Rating for non-rating numeric input.'],\n  llmSafe: true,\n  whenToUse: ['Collecting/displaying subjective scores'],\n  whenNotToUse: ['Severity (use severity Chip)'],\n});\n\nexport default ratingMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const fabMeta = defineMeta({\n  name: 'FAB',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Floating action button for the primary, most-common screen action. Themed MUI Fab.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Fab',\n  muiDocs: 'https://mui.com/material-ui/react-floating-action-button/',\n  a2uiEquivalent: 'FloatingActionButton',\n  importPath: '@/atoms/FAB',\n  optionalProps: ['color', 'size', 'variant', 'disabled', 'onClick'],\n  supportedStates: ['default', 'hover', 'extended', 'disabled'],\n  designTokens: ['colors', 'shadows'],\n  accessibility: ['Always provide aria-label for icon-only FABs.'],\n  usageExamples: ['<Fab color=\"primary\" aria-label=\"add\"><AddIcon /></Fab>'],\n  antiPatterns: ['Do not use more than one FAB per screen.'],\n  llmSafe: true,\n  whenToUse: ['Single primary action on mobile/dense screens'],\n  whenNotToUse: ['Multiple equal actions (use Button)'],\n});\n\nexport default fabMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const toggleButtonMeta = defineMeta({\n  name: 'ToggleButton',\n  level: 'atom',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Selectable button for segmented / exclusive controls. Themed MUI ToggleButton(Group).',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'ToggleButton',\n  muiDocs: 'https://mui.com/material-ui/react-toggle-button/',\n  a2uiEquivalent: 'SegmentedControl',\n  importPath: '@/atoms/ToggleButton',\n  optionalProps: ['value', 'selected', 'disabled', 'size', 'exclusive (group)'],\n  supportedStates: ['default', 'selected', 'disabled', 'focus'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Group with ToggleButtonGroup and provide aria-label; icon-only buttons need aria-label.'],\n  usageExamples: ['<ToggleButtonGroup exclusive><ToggleButton value=\"a\">A</ToggleButton></ToggleButtonGroup>'],\n  antiPatterns: ['Do not use a single ToggleButton where a Switch is clearer.'],\n  llmSafe: true,\n  whenToUse: ['View switches, formatting toolbars, exclusive options'],\n  whenNotToUse: ['Submitting actions (use Button)'],\n});\n\nexport default toggleButtonMeta;\n","import { forwardRef, type ReactNode } from 'react';\nimport MuiIconButton, { type IconButtonProps as MuiIconButtonProps } from '@mui/material/IconButton';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Tooltip, { type TooltipProps } from '@mui/material/Tooltip';\n\n/**\n * IconButton\n * Classification: mui-wrapper (themed MUI IconButton + a11y + tooltip + loading)\n * MUI base: https://mui.com/material-ui/react-button/#icon-button\n *\n * A compact, icon-only action. Unlike raw MUI, this enforces an accessible\n * `label` (rendered as `aria-label`), adds an optional `tooltip`, semantic\n * `variant` colors, and a `loading` spinner.\n */\nexport interface IconButtonProps\n  extends Omit<MuiIconButtonProps, 'children' | 'color'> {\n  /** The icon to render (e.g. a `@mui/icons-material` element). */\n  icon: ReactNode;\n  /** Accessible name for the button. Required for a11y since there is no text. */\n  label: string;\n  /** Visual emphasis. Maps to a themed color. */\n  variant?: 'default' | 'primary' | 'danger';\n  /** Optional tooltip. Defaults to `label` when omitted and `showTooltip` is set. */\n  tooltip?: ReactNode;\n  /** Placement for the tooltip when `tooltip` is provided. */\n  tooltipPlacement?: TooltipProps['placement'];\n  /** Show a spinner and disable interaction. */\n  loading?: boolean;\n}\n\nconst variantColor: Record<\n  NonNullable<IconButtonProps['variant']>,\n  MuiIconButtonProps['color']\n> = {\n  default: 'default',\n  primary: 'primary',\n  danger: 'error',\n};\n\nconst spinnerSize: Record<NonNullable<MuiIconButtonProps['size']>, number> = {\n  small: 16,\n  medium: 20,\n  large: 24,\n};\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n  function IconButton(\n    {\n      icon,\n      label,\n      variant = 'default',\n      tooltip,\n      tooltipPlacement,\n      loading = false,\n      disabled,\n      size = 'medium',\n      ...rest\n    },\n    ref,\n  ) {\n    const button = (\n      <MuiIconButton\n        ref={ref}\n        aria-label={label}\n        aria-busy={loading || undefined}\n        color={variantColor[variant]}\n        size={size}\n        disabled={disabled || loading}\n        {...rest}\n      >\n        {loading ? (\n          <CircularProgress size={spinnerSize[size]} color=\"inherit\" thickness={5} />\n        ) : (\n          icon\n        )}\n      </MuiIconButton>\n    );\n\n    if (!tooltip) return button;\n\n    // Wrap in a span so the tooltip still shows when the button is disabled.\n    return (\n      <Tooltip title={tooltip} placement={tooltipPlacement}>\n        <span style={{ display: 'inline-flex' }}>{button}</span>\n      </Tooltip>\n    );\n  },\n);\n","import { defineMeta } from '@/registry/types';\n\nexport const iconButtonMeta = defineMeta({\n  name: 'IconButton',\n  level: 'atom',\n  category: 'input',\n  classification: 'mui-wrapper',\n  description:\n    'Icon-only action with an enforced accessible label, optional tooltip, semantic variants and a loading state.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'IconButton',\n  muiDocs: 'https://mui.com/material-ui/react-button/#icon-button',\n  a2uiEquivalent: 'IconButton',\n  importPath: '@/atoms/IconButton',\n  requiredProps: ['icon', 'label'],\n  optionalProps: [\n    'variant',\n    'tooltip',\n    'tooltipPlacement',\n    'loading',\n    'size',\n    'disabled',\n    'onClick',\n  ],\n  props: [\n    { name: 'icon', type: 'ReactNode', required: true, description: 'Icon element to render' },\n    { name: 'label', type: 'string', required: true, description: 'Accessible name (aria-label)' },\n    { name: 'variant', type: \"'default' | 'primary' | 'danger'\", default: \"'default'\" },\n    { name: 'loading', type: 'boolean', default: 'false' },\n  ],\n  customVariants: ['default', 'primary', 'danger'],\n  supportedStates: ['default', 'hover', 'disabled', 'loading'],\n  designTokens: ['colors', 'radius'],\n  accessibility: [\n    'A `label` is required and rendered as `aria-label`.',\n    'Loading sets `aria-busy` and disables interaction.',\n    'Disabled buttons remain tooltip-hoverable via a span wrapper.',\n  ],\n  usageExamples: [\n    '<IconButton icon={<DeleteIcon />} label=\"Delete\" variant=\"danger\" onClick={remove} />',\n    '<IconButton icon={<RefreshIcon />} label=\"Refresh\" tooltip=\"Refresh data\" loading={busy} />',\n  ],\n  antiPatterns: [\n    'Do not omit `label` - the button would be unreadable to screen readers.',\n    'Do not use for text actions (use Button).',\n  ],\n  llmSafe: true,\n  whenToUse: ['Toolbar actions', 'Row actions', 'Compact icon-only controls'],\n  whenNotToUse: ['Primary labelled actions (use Button)', 'Floating primary action (use FAB)'],\n});\n\nexport default iconButtonMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const sparklineMeta = defineMeta({\n  name: 'Sparkline',\n  level: 'atom',\n  category: 'data-display',\n  classification: 'custom',\n  description:\n    'Dependency-free trend line for dense contexts such as table cells and stat tiles. Consolidates six divergent hand-rolled implementations; normalisation and decoration are explicit props.',\n  baseLibrary: 'custom',\n  importPath: '@/atoms/Sparkline',\n  requiredProps: ['data', 'label'],\n  optionalProps: [\n    'variant',\n    'normalize',\n    'tone',\n    'showEndPoint',\n    'width',\n    'height',\n    'strokeWidth',\n  ],\n  customVariants: ['line', 'area'],\n  supportedStates: ['default', 'flat', 'empty'],\n  designTokens: ['chart', 'severity'],\n  accessibility: [\n    'Renders role=\"img\" with a required aria-label; a sparkline carries information and must not be hidden from assistive technology.',\n    'Never the sole carrier of a value — pair with the numeric value in the surrounding cell or tile.',\n  ],\n  usageExamples: [\n    '<Sparkline data={[3, 5, 4, 9]} label=\"Alert volume, last 4 weeks\" />',\n    '<Sparkline data={counts} variant=\"area\" tone=\"high\" showEndPoint label=\"High severity trend\" />',\n  ],\n  antiPatterns: [\n    'Do not use minMax normalisation when absolute magnitude matters — it exaggerates small movements.',\n    'Do not use for more than one series; use LineChart from @aistrike-dev/ui/charts.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Compact trend inside a table row, stat tile or list item'],\n  whenNotToUse: ['Anything needing axes, a legend or multiple series'],\n});\n\nexport default sparklineMeta;\n","import { useEffect, useRef, useState } from 'react';\nimport TextField, { type TextFieldProps } from '@mui/material/TextField';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport IconButton from '@mui/material/IconButton';\nimport SearchIcon from '@mui/icons-material/Search';\nimport ClearIcon from '@mui/icons-material/Close';\n\n/**\n * Search\n * Classification: custom (composes MUI TextField + adornments)\n *\n * A controlled/uncontrolled search input with a leading search icon, a clear\n * button, and debounced change notifications - a standard product pattern not\n * provided directly by MUI.\n */\nexport interface SearchProps\n  extends Omit<TextFieldProps, 'onChange' | 'value' | 'defaultValue'> {\n  value?: string;\n  defaultValue?: string;\n  /** Debounced value change (ms set by `debounceMs`). */\n  onSearch?: (value: string) => void;\n  /** Immediate change on each keystroke. */\n  onChange?: (value: string) => void;\n  debounceMs?: number;\n}\n\nexport function Search({\n  value,\n  defaultValue = '',\n  onSearch,\n  onChange,\n  debounceMs = 300,\n  placeholder = 'Search...',\n  ...rest\n}: SearchProps) {\n  const isControlled = value !== undefined;\n  const [internal, setInternal] = useState(defaultValue);\n  const current = isControlled ? value : internal;\n  const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n  useEffect(() => () => clearTimeout(timer.current), []);\n\n  const update = (next: string) => {\n    if (!isControlled) setInternal(next);\n    onChange?.(next);\n    clearTimeout(timer.current);\n    timer.current = setTimeout(() => onSearch?.(next), debounceMs);\n  };\n\n  return (\n    <TextField\n      {...rest}\n      value={current}\n      placeholder={placeholder}\n      onChange={(e) => update(e.target.value)}\n      slotProps={{\n        input: {\n          startAdornment: (\n            <InputAdornment position=\"start\">\n              <SearchIcon fontSize=\"small\" />\n            </InputAdornment>\n          ),\n          endAdornment: current ? (\n            <InputAdornment position=\"end\">\n              <IconButton\n                aria-label=\"clear search\"\n                size=\"small\"\n                edge=\"end\"\n                onClick={() => update('')}\n              >\n                <ClearIcon fontSize=\"small\" />\n              </IconButton>\n            </InputAdornment>\n          ) : undefined,\n        },\n      }}\n    />\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const searchMeta = defineMeta({\n  name: 'Search',\n  level: 'molecule',\n  category: 'input',\n  classification: 'custom',\n  description: 'Search field with leading icon, clear button and debounced change events.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'TextField (composed)',\n  muiDocs: 'https://mui.com/material-ui/react-text-field/',\n  a2uiEquivalent: 'SearchBox',\n  importPath: '@/molecules/Search',\n  optionalProps: ['value', 'defaultValue', 'onSearch', 'onChange', 'debounceMs', 'placeholder'],\n  props: [\n    { name: 'onSearch', type: '(value: string) => void', description: 'Debounced search callback' },\n    { name: 'debounceMs', type: 'number', default: '300' },\n  ],\n  customVariants: [],\n  supportedStates: ['empty', 'typing', 'has-value', 'disabled'],\n  designTokens: ['colors', 'radius'],\n  accessibility: [\n    'Clear button has an aria-label.',\n    'Provide an associated label or aria-label for the field when no visible label.',\n  ],\n  usageExamples: ['<Search onSearch={(q) => fetch(q)} placeholder=\"Search assets...\" />'],\n  rules: [\n    'Every search or filter input is the design-system Search - in new UI, and in any UI you revamp or refactor. Never a TextField with a magnifier InputAdornment, an OutlinedInput, or a raw <input>.',\n    'When refactoring, replace existing hand-rolled search inputs with Search rather than leaving them in place.',\n    'Use `onSearch` for anything expensive (network requests, large filters); it is debounced via `debounceMs` (default 300). Use `onChange` only when you need every keystroke.',\n    'Give it a placeholder that names what is being searched (\"Search assets...\", \"Search findings...\"), and an aria-label when there is no visible label.',\n  ],\n  antiPatterns: ['Do not trigger expensive queries on every keystroke; rely on onSearch debounce.'],\n  llmSafe: true,\n  whenToUse: ['Filtering lists/tables', 'Global search bars'],\n  whenNotToUse: ['Selecting from a fixed known set (use Select/Autocomplete)'],\n});\n\nexport default searchMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const autocompleteMeta = defineMeta({\n  name: 'Autocomplete',\n  level: 'molecule',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Searchable combobox for selecting from many options. Themed MUI Autocomplete.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Autocomplete',\n  muiDocs: 'https://mui.com/material-ui/react-autocomplete/',\n  a2uiEquivalent: 'Combobox',\n  importPath: '@/molecules/Autocomplete',\n  requiredProps: ['options', 'renderInput'],\n  optionalProps: ['multiple', 'value', 'onChange', 'freeSolo', 'groupBy', 'loading', 'disabled'],\n  supportedStates: ['default', 'open', 'loading', 'multiple', 'disabled'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Renders an ARIA combobox; ensure renderInput uses a labeled TextField.'],\n  usageExamples: ['<Autocomplete options={opts} renderInput={(p) => <TextField {...p} label=\"Region\" />} />'],\n  antiPatterns: ['Do not use for very small static lists (use Select/Radio).'],\n  llmSafe: true,\n  whenToUse: ['Searchable selection, tagging, async options'],\n  whenNotToUse: ['Few fixed options'],\n});\n\nexport default autocompleteMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const breadcrumbsMeta = defineMeta({\n  name: 'Breadcrumbs',\n  level: 'molecule',\n  category: 'navigation',\n  classification: 'themed-mui',\n  description: 'Shows the user location within a hierarchy. Themed MUI Breadcrumbs.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Breadcrumbs',\n  muiDocs: 'https://mui.com/material-ui/react-breadcrumbs/',\n  a2uiEquivalent: 'Breadcrumbs',\n  importPath: '@/molecules/Breadcrumbs',\n  optionalProps: ['separator', 'maxItems'],\n  supportedStates: ['default', 'collapsed'],\n  designTokens: ['colors', 'typography'],\n  accessibility: [\n    'Set aria-label=\"breadcrumb\"; mark the current page as Typography (not a link) so it is not announced as a destination.',\n  ],\n  usageExamples: [\n    '<Breadcrumbs aria-label=\"breadcrumb\"><Link href=\"/assets\">Assets</Link><Typography variant=\"body1\">Finding 4821</Typography></Breadcrumbs>',\n  ],\n  rules: ['The current page is `Typography variant=\"body1\"`, never a `Link`.'],\n  antiPatterns: ['Do not use for primary navigation.'],\n  llmSafe: true,\n  whenToUse: ['Deep hierarchical pages (detail views)'],\n  whenNotToUse: ['Flat apps with shallow navigation'],\n});\n\nexport default breadcrumbsMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const menuMeta = defineMeta({\n  name: 'Menu',\n  level: 'molecule',\n  category: 'navigation',\n  classification: 'themed-mui',\n  description: 'Popover list of actions anchored to a trigger. Themed MUI Menu.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Menu',\n  muiDocs: 'https://mui.com/material-ui/react-menu/',\n  a2uiEquivalent: 'Menu',\n  importPath: '@/molecules/Menu',\n  requiredProps: ['open', 'anchorEl', 'onClose'],\n  optionalProps: ['anchorOrigin', 'transformOrigin'],\n  supportedStates: ['open', 'closed', 'item-selected', 'disabled-item'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Keyboard: arrows navigate, Esc closes; focus returns to trigger.'],\n  usageExamples: ['<Menu anchorEl={el} open={open} onClose={close}><MenuItem>...</MenuItem></Menu>'],\n  antiPatterns: ['Do not use Menu for primary navigation.'],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Row/overflow action lists', 'Context menus'],\n  whenNotToUse: ['Selecting form values (use Select)'],\n});\n\nexport default menuMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const buttonGroupMeta = defineMeta({\n  name: 'ButtonGroup',\n  level: 'molecule',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Groups related buttons into a single visual unit. Themed MUI ButtonGroup.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'ButtonGroup',\n  muiDocs: 'https://mui.com/material-ui/react-button-group/',\n  a2uiEquivalent: 'ButtonGroup',\n  importPath: '@/molecules/ButtonGroup',\n  optionalProps: ['variant', 'orientation', 'size', 'disabled'],\n  supportedStates: ['default', 'disabled'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Each button remains independently focusable.'],\n  usageExamples: ['<ButtonGroup><Button>Day</Button><Button>Week</Button></ButtonGroup>'],\n  antiPatterns: ['Do not use for mutually-exclusive selection (use ToggleButtonGroup).'],\n  llmSafe: true,\n  whenToUse: ['Related action clusters'],\n  whenNotToUse: ['Single selection toggles'],\n});\n\nexport default buttonGroupMeta;\n","import type { ReactNode } from 'react';\nimport FormControl from '@mui/material/FormControl';\nimport FormLabel from '@mui/material/FormLabel';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport Box from '@mui/material/Box';\n\n/**\n * FormField\n * Classification: mui-wrapper\n *\n * Standardizes the label + control + helper/error layout used across product\n * forms, so any control (TextField, Select, Search, Slider...) gets consistent\n * spacing, required markers and error messaging.\n */\nexport interface FormFieldProps {\n  label: string;\n  /** The input control. */\n  children: ReactNode;\n  helperText?: string;\n  error?: boolean;\n  required?: boolean;\n  /** Associates the label with the control. */\n  htmlFor?: string;\n  fullWidth?: boolean;\n}\n\nexport function FormField({\n  label,\n  children,\n  helperText,\n  error = false,\n  required = false,\n  htmlFor,\n  fullWidth = true,\n}: FormFieldProps) {\n  return (\n    <FormControl error={error} required={required} fullWidth={fullWidth} sx={{ gap: 0.5 }}>\n      <FormLabel htmlFor={htmlFor} sx={{ typography: 'caption', fontWeight: 600 }}>\n        {label}\n      </FormLabel>\n      <Box>{children}</Box>\n      {helperText ? <FormHelperText sx={{ mx: 0 }}>{helperText}</FormHelperText> : null}\n    </FormControl>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const formFieldMeta = defineMeta({\n  name: 'FormField',\n  level: 'molecule',\n  category: 'input',\n  classification: 'mui-wrapper',\n  description: 'Consistent label + control + helper/error wrapper for any form input.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'FormControl (composed)',\n  muiDocs: 'https://mui.com/material-ui/api/form-control/',\n  a2uiEquivalent: 'FormField',\n  importPath: '@/molecules/FormField',\n  requiredProps: ['label', 'children'],\n  optionalProps: ['helperText', 'error', 'required', 'htmlFor', 'fullWidth'],\n  supportedStates: ['default', 'required', 'error'],\n  designTokens: ['typography', 'spacing'],\n  accessibility: ['Use htmlFor + control id to associate the label with the input.'],\n  usageExamples: ['<FormField label=\"Email\" htmlFor=\"email\" helperText=\"Shown throughout the console.\"><TextField id=\"email\" /></FormField>'],\n  rules: [\n    'The label is the caption variant and helper text is caption. Pass them as props — do not wrap the label in Typography.',\n  ],\n  antiPatterns: ['Do not nest multiple unrelated controls in one FormField.'],\n  llmSafe: true,\n  whenToUse: ['Any labeled form input', 'Composite filter/form sections'],\n  whenNotToUse: ['Standalone controls without labels'],\n});\n\nexport default formFieldMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const datePickerMeta = defineMeta({\n  name: 'DatePicker',\n  level: 'molecule',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Calendar-based date selection. Themed MUI X DatePicker (dayjs).',\n  baseLibrary: '@mui/x-date-pickers',\n  muiEquivalent: 'DatePicker',\n  muiDocs: 'https://mui.com/x/react-date-pickers/date-picker/',\n  a2uiEquivalent: 'DatePicker',\n  importPath: '@/molecules/DatePicker',\n  optionalProps: ['value', 'defaultValue', 'minDate', 'maxDate', 'disabled', 'onChange'],\n  supportedStates: ['default', 'open', 'disabled', 'error'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Keyboard operable; ensure a visible label is set.'],\n  usageExamples: ['<DatePicker label=\"Detected on\" value={d} onChange={set} />'],\n  antiPatterns: ['Do not use for free-text date entry without validation.'],\n  llmSafe: true,\n  whenToUse: ['Selecting a single calendar date'],\n  whenNotToUse: ['Date ranges (use a range picker)', 'Times only (use TimePicker)'],\n});\n\nexport default datePickerMeta;\n","import { useMemo, type ReactNode } from 'react';\nimport dayjs, { type Dayjs } from 'dayjs';\nimport { format as formatDate } from 'date-fns';\nimport Box from '@mui/material/Box';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport Typography from '@mui/material/Typography';\nimport { alpha, type Theme } from '@mui/material/styles';\nimport { DateRangePicker as RsDateRangePicker } from 'rsuite';\n\n/**\n * Custom class applied to the rsuite popup so the layout overrides below stay\n * scoped to this component (rsuite CSS is global). Ships with the component via\n * MUI `GlobalStyles`, so consumers get the layout without extra setup.\n */\nconst POPUP_CLASS = 'octopus-daterange-popup';\n\n/**\n * Re-flows rsuite's stacked panel (header on top, shortcuts + OK in a bottom\n * toolbar) into the product layout: a vertical preset rail on the left,\n * separated by a full-height divider from the calendar section on the right.\n * The calendar section's footer bar carries the selected range at its far-left\n * edge and the Apply button at its far-right edge.\n *\n * `display: contents` flattens rsuite's `content`/`toolbar` wrappers so their\n * children (header, calendars, ranges, ok button) become grid items of\n * `.rs-picker-box` and can be placed into named areas.\n */\nconst popupLayoutStyles = (theme: Theme) => {\n  // `theme.palette.divider` is too faint against rsuite's dark popup, so use a\n  // higher-contrast, theme-adaptive line for the section separators.\n  const separator = `1px solid ${alpha(theme.palette.text.primary, 0.16)}`;\n  return {\n  [`.${POPUP_CLASS} .rs-picker-box`]: {\n    display: 'grid',\n    gridTemplateColumns: '168px minmax(0, 1fr)',\n    gridTemplateRows: 'auto auto',\n    // Rail spans both rows so its divider runs the full height; the calendar\n    // section stacks the calendars above a full-width footer bar.\n    gridTemplateAreas: '\"rail calendars\" \"rail footer\"',\n  },\n  [`.${POPUP_CLASS} .rs-picker-daterange-content`]: { display: 'contents' },\n  [`.${POPUP_CLASS} .rs-picker-toolbar`]: { display: 'contents' },\n  [`.${POPUP_CLASS} .rs-picker-daterange-calendar-group`]: { gridArea: 'calendars' },\n  [`.${POPUP_CLASS} .rs-picker-toolbar-ranges`]: {\n    gridArea: 'rail',\n    display: 'flex',\n    flexDirection: 'column',\n    alignItems: 'stretch',\n    gap: 2,\n    margin: 0,\n    padding: 8,\n    borderRight: separator,\n    overflowY: 'auto',\n  },\n  [`.${POPUP_CLASS} .rs-picker-toolbar-ranges .rs-btn`]: {\n    display: 'block',\n    width: '100%',\n    textAlign: 'left',\n    padding: '6px 12px',\n    borderRadius: theme.shape.borderRadius,\n  },\n  // Apply pinned to the far-right edge of the calendar section's footer.\n  [`.${POPUP_CLASS} .rs-picker-toolbar-right`]: {\n    gridArea: 'footer',\n    justifySelf: 'end',\n    alignSelf: 'center',\n    display: 'flex',\n    alignItems: 'center',\n    margin: 0,\n    padding: '10px 12px',\n  },\n  // Match the Button atom (contained/primary): same tokens as the MUI theme\n  // `MuiButton` override so the Apply action is visually consistent.\n  [`.${POPUP_CLASS} .rs-picker-toolbar-right .rs-btn`]: {\n    minWidth: 64,\n    padding: '6px 16px',\n    borderRadius: theme.shape.borderRadius,\n    border: 'none',\n    fontFamily: theme.typography.fontFamily,\n    fontSize: '0.875rem',\n    fontWeight: 600,\n    lineHeight: 1.75,\n    textTransform: 'none' as const,\n    boxShadow: 'none',\n    color: theme.palette.primary.contrastText,\n    backgroundColor: theme.palette.primary.main,\n    transition: theme.transitions.create(['background-color', 'box-shadow']),\n    '&:hover, &:focus-visible': {\n      color: theme.palette.primary.contrastText,\n      backgroundColor: theme.palette.primary.dark,\n      boxShadow: 'none',\n    },\n    '&:active': { backgroundColor: theme.palette.primary.dark },\n    '&:disabled, &.rs-btn-disabled': {\n      color: theme.palette.action.disabled,\n      backgroundColor: theme.palette.action.disabledBackground,\n    },\n  },\n  // Selected range at the far-left edge of the calendar section's footer. It\n  // stretches across the footer so its top border forms the full-width divider;\n  // the Apply button sits in the same cell, pinned right.\n  [`.${POPUP_CLASS} .rs-picker-daterange-header`]: {\n    gridArea: 'footer',\n    justifySelf: 'stretch',\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'flex-start',\n    margin: 0,\n    padding: '10px 12px',\n    borderTop: separator,\n    borderBottom: 'none',\n  },\n  };\n};\n\n/**\n * DateRangePicker\n * Classification: custom (wraps rsuite `DateRangePicker`)\n * rsuite base: https://rsuitejs.com/components/date-range-picker/\n *\n * A start/end date range picker built on rsuite's `DateRangePicker` (the same\n * control used in the product app), so the calendars, preset rail, time panel\n * with the \"Now\" shortcut and AM/PM toggle come straight from rsuite. This\n * wrapper keeps the ergonomic `@aistrike-dev/ui` surface: dayjs-friendly presets and\n * `valueType` conversion for `value`/`onChange`.\n *\n * Layout: preset shortcuts are arranged in a left rail; the footer bar carries\n * an Apply button (styled to match the Button atom) pinned to the left edge and\n * the selected range aligned to the right edge.\n *\n * Full-day default: the working times default to 12:00:00 AM (start) and\n * 11:59:59 PM (end), so picking the same day twice yields a range that spans the\n * whole day (00:00:00 → 23:59:59). Times set explicitly in the time panel are\n * preserved.\n *\n * rsuite is themed by the consumer (via `<CustomProvider>` / its CSS). Import\n * `rsuite/dist/rsuite-no-reset.min.css` once at the app root; Storybook does\n * this in `.storybook/preview.tsx`.\n */\nexport type DateRangeValueType = 'dayjs' | 'date' | 'string';\n\nexport type RangeBound = Dayjs | Date | string | null;\n\nexport interface DateRange<T = RangeBound> {\n  start: T;\n  end: T;\n}\n\nexport interface DateRangePreset {\n  label: string;\n  getRange: () => { start: Dayjs | null; end: Dayjs | null };\n}\n\nexport interface DateRangePickerProps {\n  /** Controlled value. */\n  value?: DateRange;\n  /** Uncontrolled initial value. */\n  defaultValue?: DateRange;\n  /** Called with the committed range (converted to `valueType`). */\n  onChange?: (range: DateRange) => void;\n  /** Preset shortcuts. Defaults to a canonical list. */\n  presets?: DateRangePreset[];\n  /** Label of the preset to select initially. */\n  defaultPreset?: string;\n  /** Allow clearing the range (emits `{ start: null, end: null }`). */\n  allowAllTime?: boolean;\n  /** Bias default presets toward future dates. */\n  futureMode?: boolean;\n  minDate?: RangeBound;\n  maxDate?: RangeBound;\n  /** Output value type for `onChange`/`value`. Default `'dayjs'`. */\n  valueType?: DateRangeValueType;\n  /** Display + string-value format (date-fns tokens). Default `'MMM d, yyyy'`. */\n  format?: string;\n  /** Show the time panel (hh:mm:ss + Now). Default `true`. */\n  showTime?: boolean;\n  /** 12-hour clock with an AM/PM toggle in the time panel. Default `true`. */\n  showMeridian?: boolean;\n  /** `standalone` renders an inline trigger; `embedded` renders a full-width block with a label. */\n  variant?: 'standalone' | 'embedded';\n  disabled?: boolean;\n  label?: string;\n  /** Overlay placement (rsuite). */\n  placement?: React.ComponentProps<typeof RsDateRangePicker>['placement'];\n}\n\ntype RsRange = [Date, Date];\n\nconst toDate = (v: RangeBound): Date | null => {\n  if (v === null || v === undefined) return null;\n  const d = dayjs(v as dayjs.ConfigType);\n  return d.isValid() ? d.toDate() : null;\n};\n\nconst toRsRange = (range: DateRange | undefined): RsRange | null => {\n  if (!range) return null;\n  const start = toDate(range.start);\n  const end = toDate(range.end);\n  return start && end ? [start, end] : null;\n};\n\nfunction fromDate(d: Date | null, valueType: DateRangeValueType, fmt: string): RangeBound {\n  if (!d) return null;\n  switch (valueType) {\n    case 'date':\n      return d;\n    case 'string':\n      return formatDate(d, fmt);\n    default:\n      return dayjs(d);\n  }\n}\n\nfunction buildDefaultPresets(futureMode: boolean): DateRangePreset[] {\n  const today = () => dayjs().startOf('day');\n  return futureMode\n    ? [\n        { label: 'Today', getRange: () => ({ start: today(), end: dayjs().endOf('day') }) },\n        { label: 'Next 7 days', getRange: () => ({ start: today(), end: today().add(6, 'day').endOf('day') }) },\n        { label: 'Next 30 days', getRange: () => ({ start: today(), end: today().add(29, 'day').endOf('day') }) },\n        { label: 'Next 90 days', getRange: () => ({ start: today(), end: today().add(89, 'day').endOf('day') }) },\n        { label: 'This month', getRange: () => ({ start: dayjs().startOf('month'), end: dayjs().endOf('month') }) },\n      ]\n    : [\n        { label: 'Today', getRange: () => ({ start: today(), end: dayjs().endOf('day') }) },\n        { label: 'Last 7 days', getRange: () => ({ start: today().subtract(6, 'day'), end: dayjs().endOf('day') }) },\n        { label: 'Last 30 days', getRange: () => ({ start: today().subtract(29, 'day'), end: dayjs().endOf('day') }) },\n        { label: 'Last 90 days', getRange: () => ({ start: today().subtract(89, 'day'), end: dayjs().endOf('day') }) },\n        { label: 'This month', getRange: () => ({ start: dayjs().startOf('month'), end: dayjs().endOf('month') }) },\n      ];\n}\n\nexport function DateRangePicker({\n  value,\n  defaultValue,\n  onChange,\n  presets,\n  defaultPreset,\n  allowAllTime = false,\n  futureMode = false,\n  minDate,\n  maxDate,\n  valueType = 'dayjs',\n  format = 'MMM d, yyyy',\n  showTime = true,\n  showMeridian = true,\n  variant = 'standalone',\n  disabled = false,\n  label,\n  placement = 'bottomStart',\n}: DateRangePickerProps) {\n  const resolvedPresets = useMemo(\n    () => presets ?? buildDefaultPresets(futureMode),\n    [presets, futureMode],\n  );\n\n  // rsuite renders the time panel only when the format carries time tokens.\n  const displayFormat = useMemo(() => {\n    if (!showTime) return format;\n    return `${format} ${showMeridian ? 'hh:mm:ss aa' : 'HH:mm:ss'}`;\n  }, [format, showTime, showMeridian]);\n\n  const ranges = useMemo(\n    () =>\n      resolvedPresets\n        .map((preset) => {\n          const range = preset.getRange();\n          const start = range.start?.toDate();\n          const end = range.end?.toDate();\n          return start && end ? { label: preset.label, value: [start, end] as RsRange } : null;\n        })\n        .filter((r): r is { label: string; value: RsRange } => r !== null),\n    [resolvedPresets],\n  );\n\n  const shouldDisableDate = useMemo(() => {\n    const minD = toDate(minDate ?? null);\n    const maxD = toDate(maxDate ?? null);\n    const predicates = [\n      minD ? RsDateRangePicker.before(minD) : null,\n      maxD ? RsDateRangePicker.after(maxD) : null,\n    ].filter((p): p is NonNullable<typeof p> => p !== null);\n    if (predicates.length === 0) return undefined;\n    return RsDateRangePicker.combine(...predicates);\n  }, [minDate, maxDate]);\n\n  const isControlled = value !== undefined;\n\n  const controlledValue = useMemo(() => (isControlled ? toRsRange(value) : undefined), [isControlled, value]);\n\n  const defaultRsValue = useMemo(() => {\n    if (defaultValue) return toRsRange(defaultValue);\n    if (defaultPreset) {\n      const preset = resolvedPresets.find((p) => p.label === defaultPreset);\n      if (preset) {\n        const range = preset.getRange();\n        const start = range.start?.toDate();\n        const end = range.end?.toDate();\n        if (start && end) return [start, end] as RsRange;\n      }\n    }\n    return null;\n  }, [defaultValue, defaultPreset, resolvedPresets]);\n\n  // Default the working times so a start defaults to 00:00:00 and an end to\n  // 23:59:59 — picking the same day twice then covers the whole day. The dates\n  // here only seed the two visible months (this month + next); the day is\n  // replaced on click, only the time-of-day is carried over.\n  const defaultCalendarValue = useMemo<RsRange>(() => {\n    const base = dayjs();\n    return [base.startOf('day').toDate(), base.add(1, 'month').endOf('day').toDate()];\n  }, []);\n\n  const handleChange = (next: RsRange | null) => {\n    if (!next) {\n      onChange?.({ start: null, end: null });\n      return;\n    }\n    let start = dayjs(next[0]);\n    let end = dayjs(next[1]);\n    // Same-day selection with default (equal) times: cover the whole day so a\n    // \"same day twice\" pick spans 00:00:00 → 23:59:59. Distinct times set via\n    // the time panel are preserved.\n    if (start.isSame(end, 'day') && start.format('HH:mm:ss') === end.format('HH:mm:ss')) {\n      start = start.startOf('day');\n      end = end.endOf('day');\n    }\n    onChange?.({\n      start: fromDate(start.toDate(), valueType, displayFormat),\n      end: fromDate(end.toDate(), valueType, displayFormat),\n    });\n  };\n\n  const picker: ReactNode = (\n    <RsDateRangePicker\n      value={controlledValue}\n      defaultValue={defaultRsValue}\n      defaultCalendarValue={defaultCalendarValue}\n      onChange={handleChange}\n      ranges={ranges}\n      format={displayFormat}\n      showMeridiem={showMeridian}\n      shouldDisableDate={shouldDisableDate}\n      disabled={disabled}\n      cleanable={allowAllTime}\n      placeholder={label ?? 'Select range'}\n      placement={placement}\n      character=\" – \"\n      popupClassName={POPUP_CLASS}\n      locale={{ ok: 'Apply' }}\n      block={variant === 'embedded'}\n    />\n  );\n\n  if (variant === 'embedded') {\n    return (\n      <Box>\n        <GlobalStyles styles={popupLayoutStyles} />\n        {label ? (\n          <Typography variant=\"subtitle2\" sx={{ mb: 1 }}>\n            {label}\n          </Typography>\n        ) : null}\n        {picker}\n      </Box>\n    );\n  }\n\n  return (\n    <>\n      <GlobalStyles styles={popupLayoutStyles} />\n      {picker}\n    </>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const dateRangePickerMeta = defineMeta({\n  name: 'DateRangePicker',\n  level: 'molecule',\n  category: 'input',\n  classification: 'custom',\n  description:\n    'Start/end date range picker wrapping rsuite DateRangePicker (same control as the app), with canonical presets, a time panel + Now/AM-PM, dayjs-friendly presets and valueType conversion. Presets sit in a left rail; the footer shows an Apply button (left) with the selected range (right). Times default to 12:00:00 AM–11:59:59 PM, so selecting the same day twice covers the full day automatically.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'rsuite DateRangePicker (wrapped)',\n  muiDocs: 'https://rsuitejs.com/components/date-range-picker/',\n  a2uiEquivalent: 'DateRangePicker',\n  importPath: '@/molecules/DateRangePicker',\n  optionalProps: [\n    'value',\n    'defaultValue',\n    'onChange',\n    'presets',\n    'defaultPreset',\n    'allowAllTime',\n    'futureMode',\n    'minDate',\n    'maxDate',\n    'valueType',\n    'format',\n    'showTime',\n    'showMeridian',\n    'variant',\n    'disabled',\n    'label',\n    'placement',\n  ],\n  props: [\n    { name: 'value', type: '{ start, end }', description: 'Controlled range in the chosen valueType' },\n    { name: 'valueType', type: \"'dayjs' | 'date' | 'string'\", default: \"'dayjs'\" },\n    { name: 'format', type: 'string (date-fns tokens)', default: \"'MMM d, yyyy'\" },\n    { name: 'showTime', type: 'boolean', default: 'true' },\n    { name: 'showMeridian', type: 'boolean', default: 'true' },\n    { name: 'variant', type: \"'standalone' | 'embedded'\", default: \"'standalone'\" },\n  ],\n  customVariants: ['standalone', 'embedded'],\n  supportedStates: ['default', 'open', 'disabled'],\n  designTokens: ['colors', 'radius', 'spacing'],\n  accessibility: [\n    'Trigger exposes an aria-label; calendars are keyboard operable.',\n    'Provide a `label` when there is no adjacent visible label.',\n  ],\n  usageExamples: [\n    '<DateRangePicker value={range} onChange={setRange} allowAllTime />',\n    '<DateRangePicker variant=\"embedded\" valueType=\"string\" format=\"YYYY-MM-DD\" />',\n  ],\n  antiPatterns: [\n    'Do not use for a single date (use DatePicker).',\n    'Do not mix value types across reads/writes; set one `valueType`.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Filtering by a time window', 'Report/date-range editors'],\n  whenNotToUse: ['A single calendar date (use DatePicker)', 'Times only (use TimePicker)'],\n});\n\nexport default dateRangePickerMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const timePickerMeta = defineMeta({\n  name: 'TimePicker',\n  level: 'molecule',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Clock-based time selection. Themed MUI X TimePicker (dayjs).',\n  baseLibrary: '@mui/x-date-pickers',\n  muiEquivalent: 'TimePicker',\n  muiDocs: 'https://mui.com/x/react-date-pickers/time-picker/',\n  a2uiEquivalent: 'TimePicker',\n  importPath: '@/molecules/TimePicker',\n  optionalProps: ['value', 'defaultValue', 'disabled', 'ampm', 'onChange'],\n  supportedStates: ['default', 'open', 'disabled'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Provide a visible label; keyboard operable.'],\n  usageExamples: ['<TimePicker label=\"Start\" value={t} onChange={set} />'],\n  antiPatterns: ['Do not use for durations (use a duration input).'],\n  llmSafe: true,\n  whenToUse: ['Selecting a time of day'],\n  whenNotToUse: ['Dates (use DatePicker)'],\n});\n\nexport default timePickerMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const snackbarMeta = defineMeta({\n  name: 'Snackbar',\n  level: 'molecule',\n  category: 'feedback',\n  classification: 'themed-mui',\n  description: 'Transient, auto-dismissing notification (toast). Themed MUI Snackbar.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Snackbar',\n  muiDocs: 'https://mui.com/material-ui/react-snackbar/',\n  a2uiEquivalent: 'Toast',\n  importPath: '@/molecules/Snackbar',\n  requiredProps: ['open'],\n  optionalProps: ['autoHideDuration', 'onClose', 'anchorOrigin', 'message', 'action'],\n  supportedStates: ['open', 'closing', 'with-action'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Use role=\"alert\" content (e.g. Alert child) for screen reader announcement.'],\n  usageExamples: ['<Snackbar open autoHideDuration={3000} onClose={close}><Alert>...</Alert></Snackbar>'],\n  antiPatterns: ['Do not use for persistent or critical messages (use Alert/Dialog).'],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Brief confirmations, undo prompts'],\n  whenNotToUse: ['Errors that need acknowledgement'],\n});\n\nexport default snackbarMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const alertMeta = defineMeta({\n  name: 'Alert',\n  level: 'molecule',\n  category: 'feedback',\n  classification: 'themed-mui',\n  description: 'Inline contextual feedback message with severity. Themed MUI Alert.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Alert',\n  muiDocs: 'https://mui.com/material-ui/react-alert/',\n  a2uiEquivalent: 'Alert',\n  importPath: '@/molecules/Alert',\n  optionalProps: ['severity', 'variant', 'onClose', 'icon', 'action'],\n  supportedStates: ['success', 'info', 'warning', 'error', 'dismissible'],\n  designTokens: ['colors', 'radius', 'typography'],\n  accessibility: ['Alerts use role=\"alert\"; place near the related content.'],\n  usageExamples: [\n    '<Alert severity=\"error\"><AlertTitle>Could not load findings</AlertTitle>The scanner is unreachable.</Alert>',\n  ],\n  rules: [\n    'Use `AlertTitle` for the heading (themed as subtitle2). The message body uses the Alert body1 slot — do not wrap it in another heading variant.',\n  ],\n  antiPatterns: ['Do not use Alert for transient notifications (use Snackbar).'],\n  llmSafe: true,\n  whenToUse: ['Persistent inline status/validation messages'],\n  whenNotToUse: ['Auto-dismissing toasts (use Snackbar)'],\n});\n\nexport default alertMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const progressMeta = defineMeta({\n  name: 'Progress',\n  level: 'molecule',\n  category: 'feedback',\n  classification: 'themed-mui',\n  description: 'Linear and circular progress indicators. Themed MUI Progress.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'LinearProgress / CircularProgress',\n  muiDocs: 'https://mui.com/material-ui/react-progress/',\n  a2uiEquivalent: 'ProgressBar / Spinner',\n  importPath: '@/molecules/Progress',\n  optionalProps: ['variant', 'value', 'color', 'size'],\n  supportedStates: ['indeterminate', 'determinate'],\n  designTokens: ['colors'],\n  accessibility: ['Determinate progress exposes aria-valuenow; provide a label for context.'],\n  usageExamples: ['<LinearProgress variant=\"determinate\" value={64} />'],\n  antiPatterns: ['Do not use indeterminate progress when percentage is known.'],\n  llmSafe: true,\n  whenToUse: ['Loading, uploads, scans in progress'],\n  whenNotToUse: ['Skeleton content (use Skeleton)'],\n});\n\nexport default progressMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const paginationMeta = defineMeta({\n  name: 'Pagination',\n  level: 'molecule',\n  category: 'navigation',\n  classification: 'themed-mui',\n  description: 'Page navigation for long lists and tables. Themed MUI Pagination.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Pagination',\n  muiDocs: 'https://mui.com/material-ui/react-pagination/',\n  a2uiEquivalent: 'Pagination',\n  importPath: '@/molecules/Pagination',\n  requiredProps: ['count'],\n  optionalProps: ['page', 'onChange', 'variant', 'shape', 'color', 'siblingCount'],\n  supportedStates: ['default', 'selected', 'disabled'],\n  designTokens: ['colors', 'radius'],\n  accessibility: ['Renders nav with aria-labels per page; keyboard operable.'],\n  usageExamples: ['<Pagination count={10} page={p} onChange={set} />'],\n  antiPatterns: ['Do not use for infinite scroll patterns.'],\n  llmSafe: true,\n  whenToUse: ['Paged tables/lists with known total pages'],\n  whenNotToUse: ['Continuous feeds'],\n});\n\nexport default paginationMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const tabsMeta = defineMeta({\n  name: 'Tabs',\n  level: 'molecule',\n  category: 'navigation',\n  classification: 'themed-mui',\n  description: 'Switch between related views within the same context. Themed MUI Tabs/Tab.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Tabs',\n  muiDocs: 'https://mui.com/material-ui/react-tabs/',\n  a2uiEquivalent: 'Tabs',\n  importPath: '@/molecules/Tabs',\n  requiredProps: ['value', 'onChange'],\n  optionalProps: ['variant', 'orientation', 'scrollButtons'],\n  supportedStates: ['default', 'selected', 'disabled', 'scrollable'],\n  designTokens: ['colors', 'typography'],\n  accessibility: [\n    'Provide aria-label on Tabs; use tabpanel roles for content if needed.',\n    'Keyboard: arrows move focus, Enter/Space selects.',\n  ],\n  usageExamples: [\n    '<Tabs value={tab} onChange={(_, next) => setTab(next)} aria-label=\"asset detail tabs\"><Tab label=\"Overview\" /></Tabs>',\n  ],\n  rules: [\n    'The strip ships its own type. Panel content you render underneath is `Typography variant=\"body1\"` (or a layout that already applies a variant).',\n  ],\n  antiPatterns: ['Do not use tabs for sequential steps (use Stepper).'],\n  llmSafe: true,\n  whenToUse: ['Peer views within one screen'],\n  whenNotToUse: ['Primary navigation (use LeftNavigation)', 'Wizards (use Stepper)'],\n});\n\nexport default tabsMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const popoverMeta = defineMeta({\n  name: 'Popover',\n  level: 'molecule',\n  category: 'feedback',\n  classification: 'themed-mui',\n  description: 'Contextual overlay anchored to an element for rich content. Themed MUI Popover.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Popover',\n  muiDocs: 'https://mui.com/material-ui/react-popover/',\n  a2uiEquivalent: 'Popover',\n  importPath: '@/molecules/Popover',\n  requiredProps: ['open', 'anchorEl'],\n  optionalProps: ['onClose', 'anchorOrigin', 'transformOrigin'],\n  supportedStates: ['open', 'closed'],\n  designTokens: ['colors', 'radius', 'shadows', 'typography'],\n  accessibility: ['Manages focus trapping; Esc closes; returns focus to anchor.'],\n  usageExamples: [\n    '<Popover open anchorEl={el} onClose={close}><Typography variant=\"subtitle2\">prod-db-01</Typography><Typography variant=\"body1\">Keep this short.</Typography></Popover>',\n  ],\n  rules: ['Heading is `subtitle2`; supporting copy is `body1`. Do not drop unstyled text into the popover.'],\n  antiPatterns: ['Do not put long forms in a Popover (use Dialog/Drawer).'],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Rich hover/click detail cards', 'Color pickers, mini-forms'],\n  whenNotToUse: ['Simple text hints (use Tooltip)'],\n});\n\nexport default popoverMeta;\n","/**\n * Radial meter arc maths, separated from the component for node-project testing.\n */\n\nexport interface MeterArcOptions {\n  radius: number;\n  strokeWidth: number;\n}\n\nexport interface MeterArc {\n  circumference: number;\n  /** `stroke-dashoffset` for the progress ring. */\n  offset: number;\n}\n\nexport function describeMeterArc(value: number, { radius }: MeterArcOptions): MeterArc {\n  const circumference = 2 * Math.PI * radius;\n  // A NaN or Infinity here would reach the DOM as `stroke-dashoffset=\"NaN\"` and\n  // silently blank the ring, so it is normalised to an empty meter instead.\n  const safe = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;\n  return { circumference, offset: circumference * (1 - safe / 100) };\n}\n","/**\n * Meter\n * Classification: custom\n *\n * Radial progress ring for scores and grades. Replaces three divergent gauge\n * implementations. No ECharts dependency.\n */\nimport { useTheme } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { chartTokens } from '@/tokens/chart';\nimport { severityColorsByMode, type SeverityKey } from '@/tokens/colors';\nimport { describeMeterArc } from './meterGeometry';\n\nexport interface MeterProps {\n  /** Percentage, 0-100. Out-of-range and non-finite values are clamped. */\n  value: number;\n  /** Text rendered inside the ring. Defaults to the rounded value. */\n  displayValue?: string;\n  /** Accessible name, e.g. \"Detection coverage\". */\n  label: string;\n  /** A categorical series slot index (0-6), or a severity key. */\n  tone?: number | SeverityKey;\n  size?: number;\n  strokeWidth?: number;\n}\n\nconst VIEWBOX = 80;\nconst RADIUS = 28;\n\nexport function Meter({\n  value,\n  displayValue,\n  label,\n  tone = 0,\n  size = 80,\n  strokeWidth = 4,\n}: MeterProps) {\n  const theme = useTheme();\n  const mode = theme.palette.mode === 'light' ? 'light' : 'dark';\n  const tokens = chartTokens[mode];\n\n  const color =\n    typeof tone === 'number'\n      ? tokens.series[tone % tokens.series.length]\n      : severityColorsByMode[mode][tone];\n\n  const { circumference, offset } = describeMeterArc(value, { radius: RADIUS, strokeWidth });\n  const safe = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;\n\n  return (\n    <Box\n      sx={{ width: size, height: size, position: 'relative' }}\n      role=\"meter\"\n      aria-valuenow={safe}\n      aria-valuemin={0}\n      aria-valuemax={100}\n      aria-label={label}\n    >\n      <svg viewBox={`0 0 ${VIEWBOX} ${VIEWBOX}`} width=\"100%\" height=\"100%\" aria-hidden=\"true\">\n        <circle\n          cx={VIEWBOX / 2}\n          cy={VIEWBOX / 2}\n          r={RADIUS}\n          fill=\"none\"\n          stroke={tokens.ink.grid}\n          strokeWidth={strokeWidth}\n        />\n        <circle\n          cx={VIEWBOX / 2}\n          cy={VIEWBOX / 2}\n          r={RADIUS}\n          fill=\"none\"\n          stroke={color}\n          strokeWidth={strokeWidth}\n          strokeDasharray={circumference}\n          strokeDashoffset={offset}\n          strokeLinecap=\"round\"\n          transform={`rotate(-90 ${VIEWBOX / 2} ${VIEWBOX / 2})`}\n        />\n      </svg>\n      <Typography\n        variant=\"h6\"\n        component=\"span\"\n        sx={{\n          position: 'absolute',\n          inset: 0,\n          display: 'grid',\n          placeItems: 'center',\n          color: 'text.primary',\n          fontSize: size / 3.5,\n          lineHeight: 1,\n        }}\n      >\n        {displayValue ?? Math.round(safe)}\n      </Typography>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const meterMeta = defineMeta({\n  name: 'Meter',\n  level: 'molecule',\n  category: 'data-display',\n  classification: 'custom',\n  description:\n    'Radial progress ring for a single bounded score or grade. Replaces three divergent gauge implementations.',\n  baseLibrary: 'custom',\n  importPath: '@/molecules/Meter',\n  requiredProps: ['value', 'label'],\n  optionalProps: ['displayValue', 'tone', 'size', 'strokeWidth'],\n  supportedStates: ['default', 'empty', 'full'],\n  designTokens: ['chart', 'severity'],\n  accessibility: [\n    'Exposes role=\"meter\" with aria-valuenow/min/max and a required aria-label.',\n    'The numeric value is always rendered as text inside the ring, never conveyed by arc length alone.',\n  ],\n  usageExamples: [\n    '<Meter value={72} label=\"Detection coverage\" />',\n    '<Meter value={31} tone=\"critical\" label=\"Risk score\" displayValue=\"31%\" />',\n  ],\n  antiPatterns: ['Do not use for unbounded quantities — a meter implies a 0-100 range.'],\n  llmSafe: true,\n  whenToUse: ['A single bounded score, grade or percentage'],\n  whenNotToUse: ['Multiple values or a trend over time'],\n});\n\nexport default meterMeta;\n","/**\n * ChipGroup\n * Classification: custom\n *\n * Layout and overflow for a collection of chips. Generalises the capping logic\n * that was inlined in `TableChipsCell` so a filter bar, a card body and a table\n * cell all wrap, space and truncate a group the same way.\n *\n * The numbers below come from Carbon's tag group guidance, which is the most\n * specific published advice on the subject: 8px between chips, six or fewer on\n * one line, and wrapping to at most five lines before the pattern is wrong and\n * the content wants a multi-select or a table instead.\n */\nimport { useState } from 'react';\nimport Box from '@mui/material/Box';\nimport { Chip, type ChipSize } from '@/atoms/Chip';\n\nexport interface ChipGroupProps {\n  /** The chips. Anything falsy is dropped so conditional children are safe. */\n  children: React.ReactNode;\n  /**\n   * Maximum chips shown before the rest collapse behind a `+N more` control.\n   * Omit to show every chip.\n   */\n  max?: number;\n  /** Spacing between chips, in 8px grid units. */\n  spacing?: number;\n  /** Prevent wrapping and keep the group on one line. */\n  noWrap?: boolean;\n  /**\n   * Called instead of expanding in place, for when the remainder belongs in a\n   * popover or a detail view rather than inline.\n   */\n  onOverflow?: () => void;\n  /** Accessible name for the group, e.g. \"MITRE techniques\". */\n  label?: string;\n  /**\n   * Size of the overflow `+N more` chip. Children keep their own `size`;\n   * pass the same value on both when the group should share a height.\n   * @default 'small'\n   */\n  size?: ChipSize;\n}\n\n/**\n * @example\n * <ChipGroup label=\"Techniques\" max={3}>\n *   {techniques.map((t) => <Chip key={t} purpose=\"category\" label={t} size=\"small\" />)}\n * </ChipGroup>\n */\nexport function ChipGroup({\n  children,\n  max,\n  spacing = 1,\n  noWrap = false,\n  onOverflow,\n  label,\n  size = 'small',\n}: ChipGroupProps) {\n  const [expanded, setExpanded] = useState(false);\n\n  // Flatten so `{cond && <Chip/>}` and arrays both count correctly, otherwise a\n  // conditional child would consume a slot in the cap while rendering nothing.\n  const items = (Array.isArray(children) ? children.flat(Infinity) : [children]).filter(Boolean);\n\n  const capped = max !== undefined && !expanded && items.length > max;\n  const visible = capped ? items.slice(0, max) : items;\n  const hidden = items.length - visible.length;\n\n  return (\n    <Box\n      role={label ? 'group' : undefined}\n      aria-label={label}\n      sx={{\n        display: 'flex',\n        flexWrap: noWrap ? 'nowrap' : 'wrap',\n        alignItems: 'center',\n        gap: spacing,\n        minWidth: 0,\n      }}\n    >\n      {visible}\n      {hidden > 0 && (\n        <Chip\n          purpose=\"overflow\"\n          count={hidden}\n          size={size}\n          expanded={expanded}\n          onDisclose={() => (onOverflow ? onOverflow() : setExpanded(true))}\n        />\n      )}\n    </Box>\n  );\n}\n\nexport default ChipGroup;\n","import { defineMeta } from '@/registry/types';\n\nexport const chipGroupMeta = defineMeta({\n  name: 'ChipGroup',\n  level: 'molecule',\n  category: 'data-display',\n  classification: 'custom',\n  description:\n    'Layout and overflow for a collection of Chips. Wraps on the 8px grid, caps the visible count and discloses the remainder through a single `+N more` control.',\n  baseLibrary: 'react',\n  importPath: '@/molecules/ChipGroup',\n  requiredProps: ['children'],\n  optionalProps: ['max', 'spacing', 'noWrap', 'onOverflow', 'label', 'size'],\n  supportedStates: ['default', 'capped', 'expanded'],\n  designTokens: ['spacing'],\n  accessibility: [\n    'Pass `label` to expose the group as a named `group` landmark; without it the group is presentational.',\n    'The overflow control is a button carrying aria-expanded, so keyboard users can reveal the remainder.',\n  ],\n  usageExamples: [\n    '<ChipGroup label=\"Techniques\" max={3}>{items.map((t) => <Chip key={t} purpose=\"category\" label={t} size=\"small\" />)}</ChipGroup>',\n    '<ChipGroup max={2} onOverflow={openDetailPanel}>{chips}</ChipGroup>',\n  ],\n  rules: [\n    'Use ChipGroup whenever more than two chips sit together; it owns the spacing so children never set their own margins.',\n    'Set `max` in tables and dense cells so a long list cannot change row height; leave it unset in detail views where wrapping is fine.',\n    'Keep groups to six chips on one line, and wrapping to at most five lines. Past that use a multi-select or a table instead.',\n    'Pass `onOverflow` when the remainder belongs in a popover or detail view; the default expands in place.',\n    'Give the group a `label` when the chips share a dimension, so assistive technology can announce what the collection is.',\n    'Pass `size` so the overflow `+N more` chip matches the group. Children keep their own `size` — set the same value on both.',\n    'A ChipGroup of `purpose=\"select\"` chips is layout, not a selection model. Each child stays independently controlled; exclusive grouping lives in the parent.',\n  ],\n  antiPatterns: [\n    'Do not set margins on the chips themselves; the group owns spacing via `gap`.',\n    'Do not mix chip purposes in one group — severity beside category reads as one dimension.',\n    'Do not render your own `+N more` element; use `max` so the count and the aria-expanded state stay correct.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Collections of tags, techniques, data sources, applied filters, or toggleable options'],\n  whenNotToUse: [\n    'A single chip (render it directly)',\n    'Selecting from many options (use Autocomplete or FilterPanel)',\n  ],\n});\n\nexport default chipGroupMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const entityMenuMeta = defineMeta({\n  name: 'EntityMenu',\n  level: 'molecule',\n  category: 'navigation',\n  classification: 'custom',\n  description:\n    'The detail and pivot menu opened by an entity Chip. Three fixed regions -- identity, attributes, actions -- with built-in copy and defanged-copy actions that always yield the canonical value.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Menu (composed)',\n  muiDocs: 'https://mui.com/material-ui/react-menu/',\n  importPath: '@/molecules/EntityMenu',\n  requiredProps: ['entity', 'anchorEl', 'open', 'onClose'],\n  optionalProps: ['actions', 'onAction', 'disableCopyFeedback'],\n  supportedStates: ['closed', 'open', 'action-unavailable', 'copied', 'copy-failed'],\n  designTokens: ['typography', 'spacing'],\n  accessibility: [\n    'The menu list is named with the kind and value, so a user who opened one of several chips in a paragraph knows which.',\n    'Escape closes the menu and returns focus to the chip that opened it, which MUI Menu handles.',\n    'Unavailable actions stay focusable and state their reason as text, so keyboard and screen-reader users can find out why rather than retrying.',\n  ],\n  usageExamples: [\n    '<EntityMenu entity={{ kind: \"ip\", value: \"203.0.113.47\", verdict: \"malicious\" }} anchorEl={anchor} open={Boolean(anchor)} onClose={close} />',\n    '<EntityMenu entity={entity} anchorEl={anchor} open={open} onClose={close} actions={[{ id: \"pivot\", label: \"Pivot to search\" }]} onAction={run} />',\n  ],\n  rules: [\n    'Open it from a Chip with purpose=\"entity\"; pass the click event\\'s currentTarget as anchorEl.',\n    'Pass the canonical full value as `entity.value` and the shortened form as `entity.display`. Copy actions read `value`, so a truncated hash still copies in full.',\n    'Copy value and Copy defanged are built in. Defanged copy appears only for network kinds (ip, domain, url, email), where it is meaningful.',\n    'Keep `actions` to about three: pivot to search, add to current filter, open entity page.',\n    'Put a reason on any action the user cannot run; never pass a bare disabled action.',\n    'Give attributes short labels and let the menu lay them out; two to five is the useful range.',\n  ],\n  antiPatterns: [\n    'Do not put destructive or privileged response actions here (isolate host, disable account). This menu opens from a word in a paragraph and is far too easy to trigger by accident; those belong on the entity page behind confirmation and permission checks.',\n    'Do not pass a truncated display string as `entity.value`; the copy actions would then yield the wrong thing.',\n    'Do not attach a verdict to a value that was never resolved. Omit it, which reads as \"we did not look this up\" rather than as \"unknown\".',\n    'Do not reimplement the copy actions at the call site; they exist here so the canonical-value and defanging rules hold everywhere.',\n  ],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: [\n    'An analyst needs to copy, look up, or pivot on an entity value shown inline',\n    'Showing verdict and enrichment attributes for an indicator without leaving the page',\n  ],\n  whenNotToUse: [\n    'Response actions that change state (use the entity page)',\n    'A generic action menu on a row or toolbar (use Menu)',\n    'Non-interactive entity values in card copy (use CardDataTag)',\n  ],\n});\n\nexport default entityMenuMeta;\n","/**\n * FilterMenu\n * Classification: custom (composes Chip + Popover + Search + Checkbox list)\n *\n * One filter field behind a chip: the chip names the field and its selection,\n * the panel is a list of checkboxes. This is the third member of the filter\n * family and the smallest -- `FilterPanel` is an always-visible sidebar,\n * `FilterPopover` puts several fields behind one button, and this puts one field\n * behind one chip, so a filter bar can show what is applied and let the user\n * change it in the same place.\n *\n * The surface is a Popover holding real `Checkbox` inputs, not a Menu of\n * `menuitemcheckbox` rows. A menu's role cannot legally contain the search\n * field or the Apply button this panel needs, and native checkboxes come with\n * the announcement and keyboard behaviour that a menu would have to reimplement.\n */\nimport { useId, useMemo, useState } from 'react';\nimport Box from '@mui/material/Box';\nimport Checkbox from '@mui/material/Checkbox';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Divider from '@mui/material/Divider';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Popover from '@mui/material/Popover';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { Button } from '@/atoms/Button';\nimport { Chip, type ChipSize, type PickerSummary } from '@/atoms/Chip';\nimport { Search } from '@/molecules/Search';\nimport { backgroundColors, scrim } from '@/tokens/colors';\nimport type { FilterOption } from './types';\n\nexport interface FilterMenuProps {\n  /** The field's name, e.g. `Severity`. Shown on the chip and names the panel. */\n  field: string;\n  options: FilterOption[];\n  /** Controlled selection. Omit for uncontrolled. */\n  value?: string[];\n  defaultValue?: string[];\n  /**\n   * Called with the new selection. Under `commit=\"immediate\"` this fires on\n   * every toggle; under `\"apply\"` only when the user presses Apply.\n   */\n  onChange: (values: string[]) => void;\n  /**\n   * When the selection takes effect.\n   *\n   * `immediate` is the default because a chip is a cheap, reversible control\n   * and live results are the faster loop. Use `apply` when each change costs a\n   * query the user should not pay for mid-thought, or when partial selections\n   * would show a misleading result.\n   */\n  commit?: 'immediate' | 'apply';\n  /** Adds a filter field above the options. Worth it past about ten options. */\n  searchable?: boolean;\n  /** Adds an `All` row that toggles everything currently visible. */\n  showSelectAll?: boolean;\n  /** How the chip summarises the selection. `count` for values too long to show. */\n  summary?: PickerSummary;\n  /**\n   * Removes the whole filter, which is what the X on the chip means -- the same\n   * thing it means on `Chip purpose=\"filter\"`. Drop the field from your list of\n   * active filters here; this component cannot do it, since the list is yours.\n   *\n   * Omit it for a bar of fixed fields. Pass it only if the user has some way to\n   * add the filter back, such as an `Add filter` menu, or removing it is a dead\n   * end.\n   *\n   * Emptying the selection while keeping the chip is the panel's `Reset`, and\n   * needs no prop.\n   */\n  onRemove?: () => void;\n  /**\n   * Fires when the panel opens. For lazily loading options, or analytics.\n   */\n  onOpen?: () => void;\n  /**\n   * Fires when the panel closes, with the selection as applied at that moment\n   * -- so under `commit=\"apply\"` a panel dismissed without Apply reports the\n   * old values, not the abandoned draft.\n   *\n   * This is the hook for running one query per visit rather than one per tick:\n   * keep `commit=\"immediate\"` so the checkboxes and the chip stay live, drive\n   * local state from `onChange`, and refetch here.\n   */\n  onClose?: (values: string[]) => void;\n  loading?: boolean;\n  /** A leading icon on the chip, e.g. the kind of thing being filtered. */\n  icon?: React.ReactElement;\n  /** Shown when a search matches nothing. */\n  emptyText?: string;\n  /**\n   * Size of the picker trigger chip. Panel internals stay small.\n   * @default 'medium'\n   */\n  size?: ChipSize;\n}\n\n/** Options in the order given, grouped under their headings. */\ninterface OptionGroup {\n  heading?: string;\n  options: FilterOption[];\n}\n\n/**\n * @example\n * <FilterMenu\n *   field=\"Severity\"\n *   options={[{ label: 'Critical', value: 'critical' }, { label: 'High', value: 'high' }]}\n *   value={severities}\n *   onChange={setSeverities}\n *   onRemove={() => dropFilter('severity')}\n * />\n */\nexport function FilterMenu({\n  field,\n  options,\n  value,\n  defaultValue,\n  onChange,\n  commit = 'immediate',\n  searchable = false,\n  showSelectAll = false,\n  summary = 'value',\n  onRemove,\n  onOpen,\n  onClose,\n  loading = false,\n  icon,\n  emptyText = 'No matches',\n  size = 'medium',\n}: FilterMenuProps) {\n  const isControlled = value !== undefined;\n  const isApply = commit === 'apply';\n\n  const [internal, setInternal] = useState<string[]>(defaultValue ?? []);\n  const applied = isControlled ? value : internal;\n\n  const [draft, setDraft] = useState<string[]>(applied);\n  const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n  const [query, setQuery] = useState('');\n  const panelId = useId();\n\n  const open = Boolean(anchorEl);\n\n  /**\n   * What the checkboxes reflect. Under `apply` that is the uncommitted draft,\n   * which is also why the chip keeps showing `applied` while the panel is open:\n   * the two are genuinely different states and conflating them would tell the\n   * user a filter is active before it is.\n   */\n  const working = isApply ? draft : applied;\n\n  /**\n   * Selections are held in the order the options were declared, not the order\n   * they were clicked. The chip shows the first one, so click order would make\n   * the same two severities read as `Critical +1` or `High +1` depending on\n   * which was ticked first. Values no longer in `options` sort last rather than\n   * being dropped, so a stale saved filter is visible instead of silently gone.\n   */\n  const order = useMemo(\n    () => new Map(options.map((option, index) => [option.value, index])),\n    [options],\n  );\n  const inOptionOrder = (values: string[]) =>\n    [...values].sort(\n      (a, b) =>\n        (order.get(a) ?? Number.MAX_SAFE_INTEGER) - (order.get(b) ?? Number.MAX_SAFE_INTEGER),\n    );\n\n  const visible = useMemo(() => {\n    const q = query.trim().toLowerCase();\n    if (!q) return options;\n    return options.filter((option) => option.label.toLowerCase().includes(q));\n  }, [options, query]);\n\n  /** A Map keeps first-appearance order, so interleaved groups still merge. */\n  const groups = useMemo<OptionGroup[]>(() => {\n    const byHeading = new Map<string | undefined, FilterOption[]>();\n    for (const option of visible) {\n      const existing = byHeading.get(option.group);\n      if (existing) existing.push(option);\n      else byHeading.set(option.group, [option]);\n    }\n    return [...byHeading].map(([heading, opts]) => ({ heading, options: opts }));\n  }, [visible]);\n\n  const emit = (next: string[]) => {\n    if (!isControlled) setInternal(next);\n    onChange(next);\n  };\n\n  /** Under `apply` a change is a draft edit; otherwise it is the change itself. */\n  const put = (next: string[]) => (isApply ? setDraft(next) : emit(next));\n\n  const openPanel = (event: React.MouseEvent<HTMLElement>) => {\n    // Re-seed the draft on every open so a panel abandoned without Apply does\n    // not reopen holding the changes the user walked away from.\n    setDraft(applied);\n    setQuery('');\n    setAnchorEl(event.currentTarget);\n    onOpen?.();\n  };\n\n  /**\n   * `committed` lets `apply` report the values it just emitted rather than the\n   * `applied` of this render, which React has not updated yet -- otherwise\n   * Apply-then-close would announce the previous selection.\n   */\n  const closePanel = (committed?: string[]) => {\n    setAnchorEl(null);\n    onClose?.(committed ?? applied);\n  };\n\n  const toggle = (optionValue: string) => {\n    put(\n      inOptionOrder(\n        working.includes(optionValue)\n          ? working.filter((v) => v !== optionValue)\n          : [...working, optionValue],\n      ),\n    );\n  };\n\n  // Select-all acts on what is on screen, not on every option. With a search\n  // active, \"All\" meaning \"all 400, including the 397 you filtered out\" is a\n  // trap; meaning \"these three\" is what the user sees and expects.\n  const allVisibleSelected =\n    visible.length > 0 && visible.every((option) => working.includes(option.value));\n  const someVisibleSelected =\n    !allVisibleSelected && visible.some((option) => working.includes(option.value));\n\n  const toggleAllVisible = () => {\n    put(\n      inOptionOrder(\n        allVisibleSelected\n          ? working.filter((v) => !visible.some((option) => option.value === v))\n          : [...new Set([...working, ...visible.map((option) => option.value)])],\n      ),\n    );\n  };\n\n  const reset = () => put([]);\n\n  const apply = () => {\n    emit(draft);\n    closePanel(draft);\n  };\n\n  const labelFor = (optionValue: string) =>\n    options.find((option) => option.value === optionValue)?.label ?? optionValue;\n\n  return (\n    <>\n      <Chip\n        purpose=\"picker\"\n        field={field}\n        // The chip speaks labels, never raw option values.\n        values={inOptionOrder(applied).map(labelFor)}\n        summary={summary}\n        expanded={open}\n        panelId={panelId}\n        onOpen={openPanel}\n        onRemove={onRemove}\n        icon={icon}\n        size={size}\n      />\n\n      <Popover\n        open={open}\n        anchorEl={anchorEl}\n        onClose={() => closePanel()}\n        anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}\n        transformOrigin={{ vertical: 'top', horizontal: 'left' }}\n        slotProps={{\n          paper: {\n            id: panelId,\n            // Named so a user who opened one of several chips in a filter bar\n            // knows which panel they are in.\n            role: 'dialog',\n            'aria-label': `${field} filter`,\n            // Match EntityMenu / MuiMenu: `surface` in dark, paper (white) in light.\n            sx: (theme) => ({\n              width: 300,\n              mt: 0.5,\n              backgroundColor:\n                theme.palette.mode === 'dark'\n                  ? backgroundColors.surface\n                  : theme.palette.background.paper,\n              backgroundImage: 'none',\n            }),\n          },\n        }}\n      >\n        <Box sx={{ position: 'relative' }}>\n          {loading && (\n            <Box\n              sx={{\n                position: 'absolute',\n                inset: 0,\n                zIndex: 1,\n                display: 'flex',\n                alignItems: 'center',\n                justifyContent: 'center',\n                bgcolor: `rgba(0, 0, 0, ${scrim.loading})`,\n              }}\n            >\n              <CircularProgress size={24} />\n            </Box>\n          )}\n\n          {/* The header names the panel and holds Reset. It renders whether or\n              not Reset is showing, so ticking the first option does not shove\n              the list down by a row. */}\n          <Stack\n            direction=\"row\"\n            sx={{ alignItems: 'center', justifyContent: 'space-between', px: 2, pt: 1.5, pb: 1 }}\n          >\n            <Typography variant=\"subtitle2\">{field}</Typography>\n            {working.length > 0 && (\n              <Button variant=\"ghost\" size=\"small\" onClick={reset}>\n                Reset\n              </Button>\n            )}\n          </Stack>\n\n          <Box sx={{ px: 2, pb: 1, maxHeight: 320, overflowY: 'auto' }}>\n            {searchable && (\n              <Box sx={{ pb: 1 }}>\n                <Search\n                  size=\"small\"\n                  fullWidth\n                  autoFocus\n                  placeholder={`Filter ${field.toLowerCase()}...`}\n                  onChange={setQuery}\n                  aria-label={`Filter ${field} options`}\n                />\n              </Box>\n            )}\n\n            {showSelectAll && visible.length > 0 && (\n              <FormControlLabel\n                control={\n                  <Checkbox\n                    size=\"small\"\n                    checked={allVisibleSelected}\n                    indeterminate={someVisibleSelected}\n                    onChange={toggleAllVisible}\n                  />\n                }\n                label={<Typography variant=\"body1\">All</Typography>}\n              />\n            )}\n\n            {visible.length === 0 && (\n              <Typography variant=\"body2\" sx={{ color: 'text.secondary', py: 1 }}>\n                {emptyText}\n              </Typography>\n            )}\n\n            {groups.map((group) => (\n              <Box key={group.heading ?? '__ungrouped__'}>\n                {group.heading && (\n                  <Typography\n                    variant=\"caption\"\n                    sx={{\n                      display: 'block',\n                      color: 'text.secondary',\n                      textTransform: 'uppercase',\n                      letterSpacing: '0.06em',\n                      pt: 1,\n                    }}\n                  >\n                    {group.heading}\n                  </Typography>\n                )}\n                <Stack>\n                  {group.options.map((option) => (\n                    <FormControlLabel\n                      key={option.value}\n                      control={\n                        <Checkbox\n                          size=\"small\"\n                          checked={working.includes(option.value)}\n                          onChange={() => toggle(option.value)}\n                        />\n                      }\n                      label={<Typography variant=\"body1\">{option.label}</Typography>}\n                    />\n                  ))}\n                </Stack>\n              </Box>\n            ))}\n          </Box>\n\n          {isApply && (\n            <>\n              <Divider />\n              <Stack direction=\"row\" sx={{ justifyContent: 'flex-end', p: 1.5 }}>\n                <Button variant=\"primary\" size=\"small\" onClick={apply} disabled={loading}>\n                  Apply\n                </Button>\n              </Stack>\n            </>\n          )}\n        </Box>\n      </Popover>\n    </>\n  );\n}\n\nexport default FilterMenu;\n","import { defineMeta } from '@/registry/types';\n\nexport const filterMenuMeta = defineMeta({\n  name: 'FilterMenu',\n  level: 'molecule',\n  category: 'inputs',\n  classification: 'custom',\n  description:\n    'One filter field behind a chip. The chip names the field and its current selection; the panel is a checkbox list with optional search, select-all and grouping. Selections apply live by default, or behind an Apply button.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Popover + Checkbox (composed)',\n  muiDocs: 'https://mui.com/material-ui/react-popover/',\n  importPath: '@/molecules/FilterMenu',\n  requiredProps: ['field', 'options', 'onChange'],\n  optionalProps: [\n    'value',\n    'defaultValue',\n    'commit',\n    'searchable',\n    'showSelectAll',\n    'summary',\n    'onRemove',\n    'onOpen',\n    'onClose',\n    'loading',\n    'icon',\n    'emptyText',\n    'size',\n  ],\n  supportedStates: ['closed', 'open', 'empty', 'one selected', 'many selected', 'no matches', 'loading'],\n  designTokens: ['colors', 'spacing', 'typography'],\n  accessibility: [\n    'The chip exposes aria-haspopup=\"dialog\" and aria-expanded, and its accessible name spells out the whole selection, because the visible text elides the rest behind the +N counter.',\n    'The panel is a named dialog, so a user who opened one of several chips in a filter bar knows which one they are in.',\n    'Options are real checkboxes rather than menu rows, so selected state is announced natively and the panel can legally hold the search field and the Apply button.',\n    'Escape closes the panel and returns focus to the chip; with `searchable`, focus lands in the filter field on open.',\n  ],\n  usageExamples: [\n    '<FilterMenu field=\"Severity\" options={severityOptions} value={severities} onChange={setSeverities} onRemove={() => dropFilter(\"severity\")} />',\n    '<FilterMenu field=\"Datasources\" options={sources} value={picked} onChange={setPicked} summary=\"count\" searchable showSelectAll />',\n    '<FilterMenu field=\"Severity\" options={severityOptions} value={severities} onChange={setSeverities} commit=\"apply\" />',\n    '<FilterMenu field=\"Severity\" options={severityOptions} value={severities} onChange={setSeverities} onClose={(applied) => refetch(applied)} />',\n  ],\n  rules: [\n    'Reach for this before a bare Chip with purpose=\"picker\" — it owns the chip, the panel and the open state, and a picker chip on its own opens nothing.',\n    'Keep `commit=\"immediate\"` (the default) unless each change costs a query the user should not pay for mid-thought, or a partial selection would show a misleading result. Then use `commit=\"apply\"`.',\n    'Use `summary=\"count\"` when option labels are too long to sit in a chip, such as datastore index names; the default names the first selection and counts the rest.',\n    'Pass `searchable` past about ten options, and `showSelectAll` when picking most of them is a normal thing to do.',\n    'Group options with `option.group` when the same name can come from more than one source, so the origin of a value is visible.',\n    'When those sources can be enabled independently, pair the menu with a `Chip purpose=\"select\"` per source and pass the filtered `options`. Each chip is a standalone on/off; turning one off removes that source\\'s values from the panel.',\n    'Pass `onRemove` to take the whole field out of the bar, which is what the X on the chip means — the same thing it means on `Chip purpose=\"filter\"`. Pair it with an `Add filter` menu, and omit it for a bar of fixed fields, where the panel `Reset` is how a user empties the selection.',\n    'Use `onClose` to run one query per visit instead of one per checkbox: keep `commit=\"immediate\"` so the panel and chip stay live, track the selection from `onChange`, and refetch on close. Prefer this over `commit=\"apply\"` when the only problem is query cost rather than a misleading partial result.',\n    'Order `options` the way you want them read: the chip names the first selected option, and selections are held in option order rather than click order.',\n    'Pass `size` to size the picker trigger only. Panel search, checkboxes and Apply/Reset stay `small`.',\n  ],\n  antiPatterns: [\n    'Do not use this to change a record — it picks which values are filtered on, not the state of the thing underneath. Changing an alert status is a Menu behind a Button.',\n    'Do not put a second FilterMenu inside the panel; nested popovers cannot be dismissed predictably.',\n    'Do not pass raw option values as labels. The chip shows what you give it, so `sev_1` reaches the user.',\n    'Do not use it for a single yes/no option; that is one Chip with purpose=\"select\".',\n    'Do not use it for many fields at once — that is FilterPopover, which commits them together.',\n  ],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: [\n    'A filter bar above a table or list, where each field is one chip',\n    'Picking several values from a closed set, such as severities or data sources',\n    'Anywhere the applied filter and the control that changes it should be the same element',\n  ],\n  whenNotToUse: [\n    'Several filter fields committed together (use FilterPopover)',\n    'An always-visible filter sidebar (use FilterPanel)',\n    'A free-text or open-ended value (use Autocomplete)',\n    'Displaying an applied criterion the user can only remove (use Chip purpose=\"filter\")',\n  ],\n});\n\nexport default filterMenuMeta;\n","/**\n * SplitBar\n * Classification: custom\n *\n * A single proportional bar split into labelled segments — the compact\n * \"12 critical / 30 high / 8 low\" summary used in tables and cards.\n *\n * Segment counts are always rendered as text. Severity `medium` and `low` sit in\n * the contrast relief band against a light surface, which obliges a visible\n * label rather than colour alone.\n */\nimport { useTheme } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport { chartTokens } from '@/tokens/chart';\nimport { fillInk, severityColorsByMode, type SeverityKey } from '@/tokens/colors';\n\nexport interface SplitBarSegment {\n  key: SeverityKey | string;\n  value: number;\n  /** Overrides the scale colour. Use sparingly. */\n  color?: string;\n}\n\nexport interface SplitBarProps {\n  segments: readonly SplitBarSegment[];\n  /** `severity` colours by severity key; `series` colours by slot order. */\n  scale?: 'severity' | 'series';\n  /** Accessible name for the whole bar, e.g. \"Findings by severity\". */\n  label: string;\n  height?: number;\n  /** Hides the per-segment counts. Only legal when values appear adjacent. */\n  hideValues?: boolean;\n}\n\nexport function SplitBar({\n  segments,\n  scale = 'severity',\n  label,\n  height = 20,\n  hideValues = false,\n}: SplitBarProps) {\n  const theme = useTheme();\n  const mode = theme.palette.mode === 'light' ? 'light' : 'dark';\n  const tokens = chartTokens[mode];\n  const severity = severityColorsByMode[mode];\n\n  const visible = segments.filter((segment) => segment.value > 0);\n  const total = visible.reduce((sum, segment) => sum + segment.value, 0);\n  if (total <= 0) return null;\n\n  const colorFor = (segment: SplitBarSegment, index: number): string => {\n    if (segment.color) return segment.color;\n    if (scale === 'severity' && segment.key in severity) {\n      return severity[segment.key as SeverityKey];\n    }\n    return tokens.series[index % tokens.series.length];\n  };\n\n  return (\n    <Box\n      role=\"img\"\n      aria-label={`${label}: ${visible.map((s) => `${s.value} ${s.key}`).join(', ')}`}\n      sx={{\n        display: 'flex',\n        width: '100%',\n        height,\n        borderRadius: 0.5,\n        overflow: 'hidden',\n        // The 2px surface gap between adjacent fills is the mandated secondary\n        // encoding that makes an adjacent CVD separation in the relief band legal.\n        gap: '2px',\n      }}\n    >\n      {visible.map((segment, index) => (\n        <Box\n          key={segment.key}\n          sx={{\n            flexGrow: segment.value,\n            flexBasis: 0,\n            minWidth: 0,\n            backgroundColor: colorFor(segment, index),\n            display: 'grid',\n            placeItems: 'center',\n            fontSize: Math.max(10, height * 0.55),\n            fontWeight: 600,\n            // Text sits on a saturated fill, so it takes a fixed high-contrast\n            // ink rather than a theme token that could invert underneath it.\n            color: mode === 'dark' ? fillInk.onLight : fillInk.onDark,\n            overflow: 'hidden',\n          }}\n        >\n          {!hideValues && segment.value}\n        </Box>\n      ))}\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const splitBarMeta = defineMeta({\n  name: 'SplitBar',\n  level: 'molecule',\n  category: 'data-display',\n  classification: 'custom',\n  description:\n    'Proportional bar split into labelled segments — the compact severity or priority breakdown used in tables and cards.',\n  baseLibrary: 'custom',\n  importPath: '@/molecules/SplitBar',\n  requiredProps: ['segments', 'label'],\n  optionalProps: ['scale', 'height', 'hideValues'],\n  supportedStates: ['default', 'empty'],\n  designTokens: ['severity', 'chart'],\n  accessibility: [\n    'Renders role=\"img\" with an aria-label enumerating every segment and its count.',\n    'Segment counts are rendered as visible text; severity medium and low fall in the contrast relief band on light surfaces and must not rely on colour.',\n    'A 2px surface gap separates adjacent fills, providing the secondary encoding colour-vision separation requires.',\n  ],\n  usageExamples: [\n    '<SplitBar label=\"Findings by severity\" segments={[{ key: \"critical\", value: 3 }, { key: \"high\", value: 12 }]} />',\n  ],\n  antiPatterns: [\n    'Do not set hideValues unless the same counts appear immediately adjacent.',\n    'Do not use for more than about six segments — use a stacked BarChart.',\n  ],\n  llmSafe: true,\n  whenToUse: ['A one-line part-to-whole breakdown inside a row or card'],\n  whenNotToUse: ['Trends over time, or many categories'],\n});\n\nexport default splitBarMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const statTileMeta = defineMeta({\n  name: 'StatTile',\n  level: 'molecule',\n  category: 'data-display',\n  classification: 'custom',\n  description:\n    'Headline figure with optional delta and trend. Renders the `kpi` chart type without instantiating a chart.',\n  baseLibrary: 'custom',\n  importPath: '@/molecules/StatTile',\n  requiredProps: ['value', 'label'],\n  optionalProps: ['caption', 'delta', 'deltaPolarity', 'trend'],\n  supportedStates: ['default', 'with-delta', 'with-trend'],\n  designTokens: ['chart', 'severity', 'typography'],\n  accessibility: [\n    'Delta direction is carried by an arrow glyph and sign, not by colour alone.',\n    'The embedded Sparkline receives a derived aria-label naming the metric.',\n  ],\n  usageExamples: [\n    '<StatTile value=\"1,284\" label=\"Open alerts\" delta={-12.4} deltaPolarity=\"lowerIsBetter\" />',\n    '<StatTile value=\"98.2%\" label=\"Detection coverage\" trend={[91, 93, 96, 98]} />',\n  ],\n  rules: [\n    'The label is body1, the figure is h3, the delta is body2, the caption is caption. Pass them as props — do not wrap the value in Typography.',\n  ],\n  antiPatterns: ['Do not use for more than one measure — use a chart.'],\n  mountsSurface: 'inline',\n  llmSafe: true,\n  whenToUse: ['A single headline number on a dashboard or report'],\n  whenNotToUse: ['Comparisons across categories or time series detail'],\n});\n\nexport default statTileMeta;\n","import { useMemo, useState, type ReactNode } from 'react';\nimport MuiCard, { type CardProps as MuiCardProps } from '@mui/material/Card';\nimport Box from '@mui/material/Box';\nimport Collapse from '@mui/material/Collapse';\nimport Typography from '@mui/material/Typography';\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';\nimport { useTheme } from '@mui/material/styles';\nimport { SurfaceContext, useSurface } from '@/atoms/Surface/surfaceContext';\nimport { backgroundColors, MAX_SURFACE_DEPTH } from '@/tokens/colors';\nimport { dsVar, nextRung, scopeToCssVars, surfaceScopes } from '@/tokens/surfaceScopes';\nimport { fontFamily } from '@/tokens/typography';\nimport { radius } from '@/tokens/radius';\n\n/**\n * Card\n * Classification: mui-overrides (bordered, flat surface via theme)\n * MUI base: https://mui.com/material-ui/react-card/\n *\n * The default `Card` is the themed MUI Card. Two custom layout variants are\n * provided via the `variant` prop:\n * - `variant=\"info\"` - static summary card (32px vertical / 24px horizontal padding).\n * - `variant=\"data\"` - collapsible card for structured data (text, tables, lists).\n *\n * A Card opens a surface scope one rung above its host so nested tables pick up\n * that rung's header fill and row separators (Table Separators spec). Tables\n * inside a data card should use `bordered={false} surface=\"transparent\"`; the\n * card lets them span its full width so the header fill is not inset like a chip.\n *\n * NOTE ON SPACING: MUI's `sx` spacing shorthands (`p`, `py`, `padding`, ...)\n * multiply numeric values by the 8px spacing unit, so paddings here are passed\n * as explicit px strings to render the exact Figma values.\n */\n\nexport { default as CardHeader } from '@mui/material/CardHeader';\nexport { default as CardContent } from '@mui/material/CardContent';\nexport { default as CardActions } from '@mui/material/CardActions';\nexport { default as CardMedia } from '@mui/material/CardMedia';\n\n/** Info card: 32px top/bottom, 24px left/right. */\nconst INFO_PADDING = { pt: '32px', pb: '32px', px: '24px' } as const;\n/** Data card vertical padding. Horizontal padding is applied to the title and\n *  to non-table body content; nested tables span the full card width so the\n *  header fill isn't inset (cell padding carries the 24px alignment). */\nconst DATA_PADDING_Y = { pt: '16px', pb: '16px' } as const;\nconst DATA_PADDING_X = '24px';\n/** Gap between a card title and its body content. */\nconst TITLE_GAP = '16px';\n\nexport interface InfoCardProps {\n  variant: 'info';\n  title: string;\n  children: ReactNode;\n}\n\nexport interface DataCardProps {\n  variant: 'data';\n  title: string;\n  children?: ReactNode;\n  /** Shown when expanded and `children` is empty. */\n  emptyText?: string;\n  defaultExpanded?: boolean;\n  expanded?: boolean;\n  onChange?: (expanded: boolean) => void;\n}\n\n/** Props for the default (themed MUI) Card. */\nexport type PlainCardProps = MuiCardProps;\n\nexport type CardProps = PlainCardProps | InfoCardProps | DataCardProps;\n\n/** Inline monospace pill for entities (users, hosts, IPs) inside card body copy. */\nexport function CardDataTag({ children }: { children: ReactNode }) {\n  return (\n    <Typography\n      component=\"span\"\n      variant=\"caption\"\n      sx={{\n        fontFamily: fontFamily.mono,\n        color: 'text.secondary',\n        bgcolor: dsVar('child', backgroundColors.surface),\n        border: `1px solid ${dsVar('border', backgroundColors.border)}`,\n        borderRadius: `${radius.sm}px`,\n        px: '6px',\n        py: '2px',\n        mx: '2px',\n        display: 'inline',\n        verticalAlign: 'baseline',\n        whiteSpace: 'nowrap',\n      }}\n    >\n      {children}\n    </Typography>\n  );\n}\n\nfunction isEmptyChildren(children: ReactNode): boolean {\n  if (children == null || children === false) return true;\n  if (typeof children === 'string') return children.trim().length === 0;\n  return false;\n}\n\n/**\n * Opens a host+1 surface scope on the card paper so nested tables/inputs read\n * the card's rung, not the page's. Paper elevation is forced to 0: the scope\n * already stepped, and elevation 1 would paint `--ds-child` on top of that.\n */\nfunction CardSurface({ children, sx, style, ...cardProps }: MuiCardProps) {\n  const host = useSurface();\n  const mode = useTheme().palette.mode;\n  const depth = host.depth + 1;\n  const rung = depth > MAX_SURFACE_DEPTH ? host.rung : nextRung(host.rung);\n  const scope = surfaceScopes[mode][rung];\n  const value = useMemo(() => ({ depth, rung }), [depth, rung]);\n\n  return (\n    <SurfaceContext.Provider value={value}>\n      <MuiCard\n        {...cardProps}\n        elevation={0}\n        data-surface={rung}\n        data-surface-depth={depth}\n        style={{ ...scopeToCssVars(scope), ...style }}\n        sx={[\n          ...(Array.isArray(sx) ? sx : [sx]),\n          {\n            backgroundColor: 'var(--ds-bg)',\n            color: 'var(--ds-text)',\n            border: 'none',\n          },\n        ]}\n      >\n        {children}\n      </MuiCard>\n    </SurfaceContext.Provider>\n  );\n}\n\nfunction InfoVariant({ title, children }: Omit<InfoCardProps, 'variant'>) {\n  return (\n    <CardSurface>\n      <Box sx={INFO_PADDING}>\n        <Typography variant=\"subtitle1\" component=\"h3\" sx={{ color: 'text.primary', mb: TITLE_GAP }}>\n          {title}\n        </Typography>\n        <Box sx={{ color: 'var(--ds-text)', typography: 'body1' }}>{children}</Box>\n      </Box>\n    </CardSurface>\n  );\n}\n\nfunction DataVariant({\n  title,\n  children,\n  emptyText = 'No records available',\n  defaultExpanded = true,\n  expanded: expandedProp,\n  onChange,\n}: Omit<DataCardProps, 'variant'>) {\n  const [expandedInternal, setExpandedInternal] = useState(defaultExpanded);\n  const isControlled = expandedProp !== undefined;\n  const expanded = expandedProp ?? expandedInternal;\n\n  const handleToggle = () => {\n    const next = !expanded;\n    if (!isControlled) setExpandedInternal(next);\n    onChange?.(next);\n  };\n\n  const showEmpty = expanded && isEmptyChildren(children);\n\n  return (\n    <CardSurface sx={{ overflow: 'hidden' }}>\n      <Box sx={DATA_PADDING_Y}>\n        <Box\n          component=\"button\"\n          type=\"button\"\n          onClick={handleToggle}\n          aria-expanded={expanded}\n          sx={{\n            display: 'inline-flex',\n            alignItems: 'center',\n            gap: '4px',\n            border: 0,\n            background: 'none',\n            p: 0,\n            m: 0,\n            mx: DATA_PADDING_X,\n            cursor: 'pointer',\n            color: 'text.primary',\n            font: 'inherit',\n            textAlign: 'left',\n          }}\n        >\n          <Typography component=\"span\" variant=\"subtitle1\">\n            {title}\n          </Typography>\n          <KeyboardArrowDownIcon\n            aria-hidden\n            sx={{\n              fontSize: 20,\n              // Fixed box so rotating the chevron doesn't nudge the title.\n              width: 20,\n              height: 20,\n              flexShrink: 0,\n              transition: 'transform 0.2s ease',\n              transform: expanded ? 'rotate(180deg)' : 'rotate(0deg)',\n            }}\n          />\n        </Box>\n        <Collapse in={expanded} unmountOnExit={false}>\n          <Box\n            sx={{\n              mt: TITLE_GAP,\n              px: DATA_PADDING_X,\n              color: 'var(--ds-text)',\n              typography: 'body1',\n              // Tables span the card edge so the header fill isn't inset like a\n              // chip. Cell padding (24px when borderless) keeps columns aligned\n              // with the title — no negative-margin bleed that shifts during\n              // Collapse's overflow clipping.\n              '&:has(table)': { px: 0 },\n            }}\n          >\n            {showEmpty ? (\n              <Typography variant=\"body1\" color=\"text.secondary\">\n                {emptyText}\n              </Typography>\n            ) : (\n              children\n            )}\n          </Box>\n        </Collapse>\n      </Box>\n    </CardSurface>\n  );\n}\n\nexport function Card(props: CardProps) {\n  if (props.variant === 'info') {\n    const { title, children } = props;\n    return <InfoVariant title={title} children={children} />;\n  }\n  if (props.variant === 'data') {\n    // Disable eslint as this is the cleanest way of dropping a property without modifying the DataVariant constructor.\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { variant: _variant, ...rest } = props;\n    return <DataVariant {...rest} />;\n  }\n  return <CardSurface {...props} />;\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const cardMeta = defineMeta({\n  name: 'Card',\n  level: 'organism',\n  category: 'surface',\n  classification: 'mui-overrides',\n  description:\n    'Bordered surface grouping related content. Default is themed MUI Card; variant=\"info\" is a static summary card (32px vertical / 24px horizontal padding) and variant=\"data\" is a collapsible card for text, tables or lists. Use CardDataTag for inline entity pills.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Card',\n  muiDocs: 'https://mui.com/material-ui/react-card/',\n  a2uiEquivalent: 'Card',\n  importPath: '@/organisms/Card',\n  optionalProps: ['elevation', 'variant', 'title', 'emptyText', 'defaultExpanded', 'expanded', 'onChange'],\n  customVariants: ['info', 'data'],\n  supportedStates: ['default', 'hover', 'selected', 'expanded', 'collapsed', 'empty'],\n  designTokens: ['colors', 'radius', 'shadows', 'spacing', 'typography'],\n  accessibility: [\n    'Use semantic headings inside CardHeader; make whole-card click targets accessible.',\n    'The data variant header is a button with aria-expanded.',\n  ],\n  usageExamples: [\n    '<Card><CardHeader title=\"prod-db-01\" subheader=\"EC2 instance\" /><CardContent><Typography variant=\"body1\">...</Typography></CardContent></Card>',\n    '<Card variant=\"info\" title=\"Overview\"><Typography variant=\"body1\">...<CardDataTag>10.0.0.42</CardDataTag></Typography></Card>',\n    '<Card variant=\"data\" title=\"Historical Cases\"><DataTable columns={columns} data={rows} bordered={false} surface=\"transparent\" /></Card>',\n  ],\n  rules: [\n    'CardHeader title is subtitle1 and the subheader is body1 (theme defaults). Body copy is `Typography variant=\"body1\"`.',\n    'Info/data titles are subtitle1; the body slot applies body1 via `sx.typography` so tables are not wrapped in a `<p>`.',\n    'A card is separated from its host by the tonal step of the surface ladder, not by a border. It takes the next rung up from whatever contains it, so it does not need to be told which background to use.',\n    'A card opens a surface scope at that next rung, so nested tables inherit widget header fills and row separators rather than the page\\'s. Put a table inside a data card with `bordered={false} surface=\"transparent\"`.',\n  ],\n  antiPatterns: [\n    'Do not put a card inside a card inside a card. Three levels of containment is the ceiling; a fourth paints identically to the third and logs an error, so the nesting buys nothing. If you need a fourth, flatten the structure or move the deepest content to its own route.',\n    'Do not add a border to a card. The tonal step already separates it, and a border on top of it reads as a second, competing edge.',\n    'Do not use variant=\"info\" for collapsible sections (use variant=\"data\").',\n  ],\n  mountsSurface: 'inline',\n  llmSafe: true,\n  whenToUse: ['Summaries, entity tiles, dashboards', 'Investigation overviews (info)', 'Optional detail sections (data)'],\n  whenNotToUse: ['Full-page layout (use templates)'],\n});\n\nexport default cardMeta;\n","/**\n * Dialog\n * Classification: mui-overrides (themed surface + radius)\n * MUI base: https://mui.com/material-ui/react-dialog/\n *\n * The action row is positioned by the theme (`MuiDialogActions`): gutters that\n * match the title/content, breathing room at the bottom, and a token gap\n * between buttons — no per-usage `sx` needed. `DialogActions` here is a thin\n * wrapper exposing the common adjustments as props: `align` and `dense`.\n */\nimport MuiDialogActions from '@mui/material/DialogActions';\nimport type { DialogActionsProps as MuiDialogActionsProps } from '@mui/material/DialogActions';\nimport { spacing } from '@/tokens/spacing';\n\nexport { default as Dialog } from '@mui/material/Dialog';\nexport type { DialogProps } from '@mui/material/Dialog';\nexport { default as DialogTitle } from '@mui/material/DialogTitle';\nexport { default as DialogContent } from '@mui/material/DialogContent';\nexport { default as DialogContentText } from '@mui/material/DialogContentText';\n\n/** Where the action buttons sit within the dialog's footer row. */\nexport type DialogActionsAlign = 'start' | 'center' | 'end' | 'stretch';\n\nexport interface DialogActionsProps extends MuiDialogActionsProps {\n  /**\n   * Button placement. Defaults to `end` (right-aligned); `stretch` shares the\n   * full row width between the actions.\n   */\n  align?: DialogActionsAlign;\n  /** Tighter gutters for compact confirmation dialogs. */\n  dense?: boolean;\n}\n\nconst justifyByAlign: Record<DialogActionsAlign, string> = {\n  start: 'flex-start',\n  center: 'center',\n  end: 'flex-end',\n  stretch: 'flex-end',\n};\n\nexport function DialogActions({ align = 'end', dense = false, sx, ...rest }: DialogActionsProps) {\n  return (\n    <MuiDialogActions\n      {...rest}\n      sx={[\n        {\n          justifyContent: justifyByAlign[align],\n          ...(align === 'stretch' ? { '& > *': { flexGrow: 1 } } : null),\n          ...(dense\n            ? { padding: `${spacing.sm}px ${spacing.md}px ${spacing.md}px` }\n            : null),\n        },\n        ...(Array.isArray(sx) ? sx : [sx]),\n      ]}\n    />\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const dialogMeta = defineMeta({\n  name: 'Dialog',\n  level: 'organism',\n  category: 'feedback',\n  classification: 'mui-overrides',\n  description:\n    'Modal surface for focused tasks and confirmations. Themed MUI Dialog; the action row is ' +\n    'padded and right-aligned by the theme, with `align` / `dense` props on DialogActions for ' +\n    'adjustments.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Dialog',\n  muiDocs: 'https://mui.com/material-ui/react-dialog/',\n  a2uiEquivalent: 'Dialog',\n  importPath: '@/organisms/Dialog',\n  requiredProps: ['open'],\n  optionalProps: ['onClose', 'maxWidth', 'fullWidth', 'fullScreen', 'align (DialogActions)', 'dense (DialogActions)'],\n  supportedStates: ['open', 'closed'],\n  designTokens: ['colors', 'radius', 'shadows', 'spacing', 'typography'],\n  accessibility: ['Traps focus; Esc/backdrop close; labelled by DialogTitle.'],\n  usageExamples: [\n    '<Dialog open={open} onClose={close}><DialogTitle>Isolate host?</DialogTitle><DialogContent><DialogContentText>This cuts network access until you restore it.</DialogContentText></DialogContent></Dialog>',\n    '<DialogActions align=\"stretch\" dense><Button>Cancel</Button><Button>OK</Button></DialogActions>',\n  ],\n  rules: [\n    'Body copy goes in `DialogContentText` (themed as `body1`). Do not drop a raw string into `DialogContent`.',\n  ],\n  antiPatterns: [\n    'Do not stack multiple dialogs.',\n    'Do not use for non-blocking info (use Snackbar).',\n    'Do not pad DialogActions with sx — the theme owns it; use `align`/`dense`.',\n  ],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Confirmations, short focused forms'],\n  whenNotToUse: ['Large multi-step flows (use a page/Drawer)'],\n});\n\nexport default dialogMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const modalMeta = defineMeta({\n  name: 'Modal',\n  level: 'organism',\n  category: 'feedback',\n  classification: 'themed-mui',\n  description: 'Low-level overlay primitive for fully custom modal content. Themed MUI Modal.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Modal',\n  muiDocs: 'https://mui.com/material-ui/react-modal/',\n  a2uiEquivalent: 'Modal',\n  importPath: '@/organisms/Modal',\n  requiredProps: ['open', 'children'],\n  optionalProps: ['onClose', 'keepMounted'],\n  supportedStates: ['open', 'closed'],\n  designTokens: ['colors', 'radius', 'shadows'],\n  accessibility: ['Provide aria-labelledby/aria-describedby on the content.'],\n  usageExamples: ['<Modal open={open} onClose={close}><Box>...</Box></Modal>'],\n  antiPatterns: ['Prefer Dialog for standard confirmations/forms.'],\n  mountsSurface: 'portal',\n  llmSafe: false,\n  whenToUse: ['Custom overlays not covered by Dialog'],\n  whenNotToUse: ['Standard confirmations (use Dialog)'],\n});\n\nexport default modalMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const accordionMeta = defineMeta({\n  name: 'Accordion',\n  level: 'organism',\n  category: 'surface',\n  classification: 'themed-mui',\n  description: 'Expandable sections for progressive disclosure. Themed MUI Accordion.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Accordion',\n  muiDocs: 'https://mui.com/material-ui/react-accordion/',\n  a2uiEquivalent: 'Accordion',\n  importPath: '@/organisms/Accordion',\n  optionalProps: ['expanded', 'defaultExpanded', 'disabled', 'onChange'],\n  supportedStates: ['collapsed', 'expanded', 'disabled'],\n  designTokens: ['colors', 'radius', 'typography'],\n  accessibility: ['Summary is a button controlling the region; keyboard operable.'],\n  usageExamples: [\n    '<Accordion><AccordionSummary><Typography variant=\"subtitle1\">Evidence</Typography></AccordionSummary><AccordionDetails><Typography variant=\"body1\">...</Typography></AccordionDetails></Accordion>',\n  ],\n  rules: [\n    'Summary text is `Typography variant=\"subtitle1\"`; detail copy is `variant=\"body1\"`.',\n  ],\n  antiPatterns: ['Do not hide critical content behind accordions by default.'],\n  mountsSurface: 'inline',\n  llmSafe: true,\n  whenToUse: ['Long detail pages, grouped settings'],\n  whenNotToUse: ['Primary navigation'],\n});\n\nexport default accordionMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const appBarMeta = defineMeta({\n  name: 'AppBar',\n  level: 'organism',\n  category: 'navigation',\n  classification: 'mui-overrides',\n  description: 'Top application bar for branding, search and global actions. Themed MUI AppBar.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'AppBar',\n  muiDocs: 'https://mui.com/material-ui/react-app-bar/',\n  a2uiEquivalent: 'Header',\n  importPath: '@/organisms/AppBar',\n  optionalProps: ['position', 'color', 'elevation'],\n  supportedStates: ['static', 'sticky', 'fixed'],\n  designTokens: ['colors', 'shadows', 'typography'],\n  accessibility: ['Use a single banner landmark; provide aria-labels for icon buttons.'],\n  usageExamples: [\n    '<AppBar position=\"static\"><Toolbar><Typography variant=\"h6\">Octopus</Typography></Toolbar></AppBar>',\n  ],\n  rules: ['The product name in the bar is `Typography variant=\"h6\"` (or subtitle1 on a compact bar).'],\n  antiPatterns: ['Do not stuff primary navigation into the AppBar (use LeftNavigation).'],\n  llmSafe: true,\n  whenToUse: ['Global top bar', 'Branding + search + user menu'],\n  whenNotToUse: ['Section headers (use Typography/Toolbar)'],\n});\n\nexport default appBarMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const drawerMeta = defineMeta({\n  name: 'Drawer',\n  level: 'organism',\n  category: 'navigation',\n  classification: 'mui-overrides',\n  description: 'Side panel sliding in from an edge for navigation, details or filters. Themed MUI Drawer.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Drawer',\n  muiDocs: 'https://mui.com/material-ui/react-drawer/',\n  a2uiEquivalent: 'Drawer',\n  importPath: '@/organisms/Drawer',\n  requiredProps: ['open'],\n  optionalProps: ['anchor', 'variant', 'onClose'],\n  supportedStates: ['temporary', 'persistent', 'permanent'],\n  designTokens: ['colors', 'shadows', 'typography'],\n  accessibility: ['Temporary drawers trap focus; Esc closes; provide a heading.'],\n  usageExamples: [\n    '<Drawer anchor=\"right\" open={open} onClose={close}><Typography variant=\"h6\">prod-db-01</Typography><Typography variant=\"body1\">Finding detail</Typography></Drawer>',\n  ],\n  rules: [\n    'Give every drawer a `Typography variant=\"h6\"` heading and `body1` supporting copy. It is a landmark, not a floating box.',\n  ],\n  antiPatterns: ['Do not use a temporary drawer for permanent primary navigation.'],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Detail panels, filter panels, mobile navigation'],\n  whenNotToUse: ['Short confirmations (use Dialog)'],\n});\n\nexport default drawerMeta;\n","import type { ElementType, MouseEvent, ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport List from '@mui/material/List';\nimport ListItemButton from '@mui/material/ListItemButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport Tooltip from '@mui/material/Tooltip';\n\n/**\n * LeftNavigation\n * Classification: custom\n *\n * Domain-specific primary side navigation. Built on MUI List primitives but\n * encapsulates product behavior (selected state, collapsed/icon-only mode,\n * grouping) that MUI does not provide out of the box.\n */\nexport interface NavItem {\n  id: string;\n  label: string;\n  icon?: ReactNode;\n  /**\n   * Destination. When set, the item renders as a link (an `<a>`, or whatever\n   * `linkComponent` is) rather than a button, so the browser's link\n   * affordances - new-tab clicks, the context menu, prefetch - all work.\n   */\n  href?: string;\n  /** Forwarded to the rendered element, e.g. `target=\"_blank\"` for an external item. */\n  target?: string;\n  rel?: string;\n}\n\nexport interface LeftNavigationProps {\n  items: NavItem[];\n  selectedId?: string;\n  /**\n   * Notified when an item is activated. With `href` set this is a\n   * notification only (analytics, closing a mobile drawer) - the link performs\n   * the navigation - and it does not fire on modified clicks.\n   */\n  onSelect?: (id: string) => void;\n  collapsed?: boolean;\n  /** Optional brand / header slot shown above the items. */\n  header?: ReactNode;\n  width?: number;\n  collapsedWidth?: number;\n  /**\n   * Component used to render items that have an `href`. Defaults to `'a'`.\n   * Router-aware apps pass their own link (`next/link`, react-router's `Link`)\n   * so client-side navigation and prefetch apply.\n   */\n  linkComponent?: ElementType;\n}\n\nexport function LeftNavigation({\n  items,\n  selectedId,\n  onSelect,\n  collapsed = false,\n  header,\n  width = 248,\n  collapsedWidth = 64,\n  linkComponent = 'a',\n}: LeftNavigationProps) {\n  return (\n    <Box\n      component=\"nav\"\n      aria-label=\"Primary\"\n      sx={{\n        width: collapsed ? collapsedWidth : width,\n        flexShrink: 0,\n        height: '100%',\n        bgcolor: 'background.default',\n        borderRight: 1,\n        borderColor: 'divider',\n        transition: 'width 200ms ease',\n        overflowX: 'hidden',\n      }}\n    >\n      {header ? <Box sx={{ p: collapsed ? 1 : 2 }}>{header}</Box> : null}\n      <List disablePadding sx={{ px: 1, py: 1 }}>\n        {items.map((item) => {\n          const selected = item.id === selectedId;\n          const isLink = item.href !== undefined;\n          const row = (\n            <ListItemButton\n              key={item.id}\n              selected={selected}\n              {...(isLink\n                ? {\n                    component: linkComponent,\n                    href: item.href,\n                    target: item.target,\n                    rel: item.rel,\n                    'aria-current': selected ? ('page' as const) : undefined,\n                  }\n                : {})}\n              onClick={(event: MouseEvent<HTMLElement>) => {\n                // A modified click belongs to the browser: calling back here\n                // would navigate this tab as well as opening the new one.\n                if (isLink && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {\n                  return;\n                }\n                onSelect?.(item.id);\n              }}\n              sx={{\n                borderRadius: 1,\n                mb: 0.5,\n                minHeight: 44,\n                justifyContent: collapsed ? 'center' : 'flex-start',\n                '&.Mui-selected': {\n                  bgcolor: 'action.selected',\n                  color: 'primary.main',\n                  '& .MuiListItemIcon-root': { color: 'primary.main' },\n                },\n              }}\n            >\n              {item.icon ? (\n                <ListItemIcon sx={{ minWidth: collapsed ? 0 : 36, justifyContent: 'center' }}>\n                  {item.icon}\n                </ListItemIcon>\n              ) : null}\n              {!collapsed ? <ListItemText primary={item.label} /> : null}\n            </ListItemButton>\n          );\n          return collapsed ? (\n            <Tooltip key={item.id} title={item.label} placement=\"right\">\n              {row}\n            </Tooltip>\n          ) : (\n            row\n          );\n        })}\n      </List>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const leftNavigationMeta = defineMeta({\n  name: 'LeftNavigation',\n  level: 'organism',\n  category: 'navigation',\n  classification: 'custom',\n  description: 'Primary vertical app navigation with selected state and collapsed icon-only mode.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'List + ListItemButton (composed)',\n  muiDocs: 'https://mui.com/material-ui/react-list/',\n  a2uiEquivalent: 'Sidebar / NavRail',\n  importPath: '@/organisms/LeftNavigation',\n  requiredProps: ['items'],\n  optionalProps: [\n    'selectedId',\n    'onSelect',\n    'collapsed',\n    'header',\n    'width',\n    'collapsedWidth',\n    'linkComponent',\n  ],\n  supportedStates: ['default', 'selected', 'collapsed', 'hover'],\n  designTokens: ['colors', 'radius', 'spacing'],\n  accessibility: [\n    'Renders a nav landmark with aria-label=\"Primary\".',\n    'Collapsed items expose labels via tooltips.',\n    'Items with an href render as links and carry aria-current=\"page\" when selected.',\n  ],\n  usageExamples: [\n    '<LeftNavigation items={items} selectedId={id} onSelect={setId} />',\n    \"<LeftNavigation linkComponent={Link} selectedId={pathname} items={nav.map(({ to, label, icon }) => ({ id: to, label, icon, href: to }))} />\",\n  ],\n  rules: [\n    'Give each item an href when it maps to a route, so the rail renders links and keeps new-tab clicks, the link context menu and route prefetch.',\n    'Pass linkComponent for a router-aware app (next/link, react-router Link) to keep navigation client-side; it defaults to a plain anchor.',\n    'With href set, treat onSelect as a notification (analytics, closing a mobile drawer) - the link performs the navigation, and onSelect does not fire on modified clicks.',\n    'Use per-item target and rel only for destinations outside the app.',\n  ],\n  antiPatterns: [\n    'Do not duplicate global actions already in the AppBar.',\n    'Do not navigate from onSelect when the item has an href; that double-navigates a cmd-clicked item.',\n    'Do not omit href and route through onSelect alone for real destinations; middle-click and cmd-click cannot work on a button.',\n  ],\n  llmSafe: true,\n  whenToUse: ['App shell primary navigation'],\n  whenNotToUse: ['In-page view switching (use Tabs)'],\n});\n\nexport default leftNavigationMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const stepperMeta = defineMeta({\n  name: 'Stepper',\n  level: 'organism',\n  category: 'navigation',\n  classification: 'themed-mui',\n  description: 'Shows progress through a sequential multi-step process. Themed MUI Stepper.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'Stepper',\n  muiDocs: 'https://mui.com/material-ui/react-stepper/',\n  a2uiEquivalent: 'Stepper / Wizard',\n  importPath: '@/organisms/Stepper',\n  requiredProps: ['activeStep'],\n  optionalProps: ['orientation', 'alternativeLabel', 'nonLinear'],\n  supportedStates: ['active', 'completed', 'disabled', 'error'],\n  designTokens: ['colors', 'typography'],\n  accessibility: ['Convey current step; ensure step labels are descriptive.'],\n  usageExamples: ['<Stepper activeStep={1}><Step><StepLabel>...</StepLabel></Step></Stepper>'],\n  antiPatterns: ['Do not use for peer views (use Tabs).'],\n  llmSafe: true,\n  whenToUse: ['Wizards, onboarding, multi-step forms'],\n  whenNotToUse: ['Non-sequential navigation'],\n});\n\nexport default stepperMeta;\n","import { useMemo, useState } from 'react';\nimport Box from '@mui/material/Box';\nimport Paper from '@mui/material/Paper';\nimport List from '@mui/material/List';\nimport ListItemButton from '@mui/material/ListItemButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport Checkbox from '@mui/material/Checkbox';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\n\n/**\n * TransferList\n * Classification: custom\n *\n * Two-list picker for moving items between an \"available\" and \"selected\" set.\n * Composes MUI List + Checkbox; encapsulates the selection/move logic MUI does\n * not provide.\n */\nexport interface TransferListProps {\n  /** All available item ids/labels. */\n  items: string[];\n  /** Initially selected (right-side) items. */\n  defaultSelected?: string[];\n  onChange?: (selected: string[]) => void;\n  leftTitle?: string;\n  rightTitle?: string;\n}\n\nexport function TransferList({\n  items,\n  defaultSelected = [],\n  onChange,\n  leftTitle = 'Available',\n  rightTitle = 'Selected',\n}: TransferListProps) {\n  const [selected, setSelected] = useState<string[]>(defaultSelected);\n  const [checked, setChecked] = useState<string[]>([]);\n\n  const left = useMemo(() => items.filter((i) => !selected.includes(i)), [items, selected]);\n  const right = selected;\n\n  const toggleCheck = (item: string) =>\n    setChecked((prev) => (prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]));\n\n  const commit = (next: string[]) => {\n    setSelected(next);\n    setChecked([]);\n    onChange?.(next);\n  };\n\n  const moveRight = () => commit([...selected, ...left.filter((i) => checked.includes(i))]);\n  const moveLeft = () => commit(selected.filter((i) => !checked.includes(i)));\n\n  const renderList = (title: string, listItems: string[]) => (\n    <Paper variant=\"outlined\" sx={{ width: 200 }}>\n      <Typography variant=\"subtitle2\" sx={{ p: 1.5, pb: 0.5 }}>\n        {title}\n      </Typography>\n      <List dense sx={{ height: 200, overflow: 'auto' }}>\n        {listItems.map((item) => (\n          <ListItemButton key={item} onClick={() => toggleCheck(item)}>\n            <ListItemIcon sx={{ minWidth: 32 }}>\n              <Checkbox edge=\"start\" size=\"small\" checked={checked.includes(item)} tabIndex={-1} disableRipple />\n            </ListItemIcon>\n            <ListItemText primary={item} />\n          </ListItemButton>\n        ))}\n      </List>\n    </Paper>\n  );\n\n  return (\n    <Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>\n      {renderList(leftTitle, left)}\n      <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>\n        <Button size=\"small\" variant=\"secondary\" onClick={moveRight} disabled={!left.some((i) => checked.includes(i))}>\n          &gt;\n        </Button>\n        <Button size=\"small\" variant=\"secondary\" onClick={moveLeft} disabled={!right.some((i) => checked.includes(i))}>\n          &lt;\n        </Button>\n      </Box>\n      {renderList(rightTitle, right)}\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const transferListMeta = defineMeta({\n  name: 'TransferList',\n  level: 'organism',\n  category: 'input',\n  classification: 'custom',\n  description: 'Two-list picker for moving items between available and selected sets.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'List + Checkbox (composed)',\n  muiDocs: 'https://mui.com/material-ui/react-transfer-list/',\n  a2uiEquivalent: 'DualListBox',\n  importPath: '@/organisms/TransferList',\n  requiredProps: ['items'],\n  optionalProps: ['defaultSelected', 'onChange', 'leftTitle', 'rightTitle'],\n  supportedStates: ['default', 'checked', 'empty'],\n  designTokens: ['colors', 'spacing'],\n  accessibility: ['Items are toggle buttons with checkboxes; move buttons disable when nothing is checked.'],\n  usageExamples: ['<TransferList items={items} defaultSelected={[\"IAM\"]} onChange={set} />'],\n  antiPatterns: ['Do not use for very large lists (use Autocomplete multiple).'],\n  llmSafe: true,\n  whenToUse: ['Assigning items to groups/roles/scopes'],\n  whenNotToUse: ['Single or few selections (use Checkbox/Autocomplete)'],\n});\n\nexport default transferListMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const imageListMeta = defineMeta({\n  name: 'ImageList',\n  level: 'organism',\n  category: 'data-display',\n  classification: 'themed-mui',\n  description: 'Responsive grid of images/thumbnails. Themed MUI ImageList.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'ImageList',\n  muiDocs: 'https://mui.com/material-ui/react-image-list/',\n  a2uiEquivalent: 'Gallery',\n  importPath: '@/organisms/ImageList',\n  optionalProps: ['cols', 'gap', 'rowHeight', 'variant'],\n  supportedStates: ['standard', 'quilted', 'masonry', 'woven'],\n  designTokens: ['radius', 'spacing'],\n  accessibility: ['Provide alt text for each image.'],\n  usageExamples: ['<ImageList cols={3}><ImageListItem>...</ImageListItem></ImageList>'],\n  antiPatterns: ['Do not use for tabular data (use Table).'],\n  llmSafe: true,\n  whenToUse: ['Screenshot/evidence galleries, thumbnails'],\n  whenNotToUse: ['Text-heavy lists'],\n});\n\nexport default imageListMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const speedDialMeta = defineMeta({\n  name: 'SpeedDial',\n  level: 'organism',\n  category: 'input',\n  classification: 'themed-mui',\n  description: 'Floating button revealing a cluster of related actions. Themed MUI SpeedDial.',\n  baseLibrary: '@mui/material',\n  muiEquivalent: 'SpeedDial',\n  muiDocs: 'https://mui.com/material-ui/react-speed-dial/',\n  a2uiEquivalent: 'SpeedDial',\n  importPath: '@/organisms/SpeedDial',\n  requiredProps: ['ariaLabel'],\n  optionalProps: ['direction', 'icon', 'open', 'onOpen', 'onClose'],\n  supportedStates: ['closed', 'open'],\n  designTokens: ['colors', 'shadows'],\n  accessibility: ['ariaLabel required; each action exposes a tooltip title.'],\n  usageExamples: ['<SpeedDial ariaLabel=\"actions\" icon={<SpeedDialIcon />}>...</SpeedDial>'],\n  antiPatterns: ['Do not use for primary navigation.'],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Compact action clusters on dense screens'],\n  whenNotToUse: ['Single action (use FAB)'],\n});\n\nexport default speedDialMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Divider from '@mui/material/Divider';\n\n/**\n * FormSection\n * Classification: custom\n *\n * Groups related form fields under a titled, described section with consistent\n * spacing - the building block for composite forms (Settings, create flows).\n */\nexport interface FormSectionProps {\n  title: string;\n  description?: string;\n  children: ReactNode;\n  /** Renders a divider above the section. */\n  divider?: boolean;\n}\n\nexport function FormSection({ title, description, children, divider = false }: FormSectionProps) {\n  return (\n    <Box component=\"section\" sx={{ py: 2 }}>\n      {divider ? <Divider sx={{ mb: 3 }} /> : null}\n      <Box sx={{ mb: 2 }}>\n        <Typography variant=\"subtitle1\">{title}</Typography>\n        {description ? (\n          <Typography variant=\"body1\" color=\"text.secondary\">\n            {description}\n          </Typography>\n        ) : null}\n      </Box>\n      <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, maxWidth: 520 }}>{children}</Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const formSectionMeta = defineMeta({\n  name: 'FormSection',\n  level: 'organism',\n  category: 'input',\n  classification: 'custom',\n  description: 'Titled, described grouping of related form fields with consistent spacing.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'Box + Typography (composed)',\n  a2uiEquivalent: 'FormSection / Fieldset',\n  importPath: '@/organisms/FormSection',\n  requiredProps: ['title', 'children'],\n  optionalProps: ['description', 'divider'],\n  supportedStates: ['default', 'with-divider'],\n  designTokens: ['typography', 'spacing'],\n  accessibility: ['Renders a section element; title gives the group context.'],\n  usageExamples: [\n    '<FormSection title=\"Notifications\" description=\"How we reach you.\"><FormField label=\"Email\" htmlFor=\"email\"><TextField id=\"email\" /></FormField></FormSection>',\n  ],\n  rules: [\n    'The section title is subtitle1 and the description is body1. Pass them as props — do not rebuild the heading from Typography.',\n  ],\n  antiPatterns: ['Do not nest FormSections more than one level.'],\n  mountsSurface: 'inline',\n  llmSafe: true,\n  whenToUse: ['Composite forms (settings, create/edit flows)'],\n  whenNotToUse: ['Single isolated field'],\n});\n\nexport default formSectionMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Button from '@mui/material/Button';\nimport FilterListIcon from '@mui/icons-material/FilterList';\nimport { backgroundColors } from '@/tokens/colors';\n\n/**\n * FilterPanel\n * Classification: custom\n *\n * A container for filter controls (Search, Select, severity Chips...) with a\n * consistent header and apply/clear footer. Compose filter inputs as children.\n */\nexport interface FilterPanelProps {\n  children: ReactNode;\n  title?: string;\n  onApply?: () => void;\n  onClear?: () => void;\n  /** Active filter count shown in the header. */\n  activeCount?: number;\n}\n\nexport function FilterPanel({\n  children,\n  title = 'Filters',\n  onApply,\n  onClear,\n  activeCount = 0,\n}: FilterPanelProps) {\n  return (\n    <Box\n      sx={{\n        width: 280,\n        bgcolor: backgroundColors.surface,\n        border: 1,\n        borderColor: 'divider',\n        borderRadius: 2,\n        p: 2,\n        display: 'flex',\n        flexDirection: 'column',\n        gap: 2,\n      }}\n    >\n      <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n        <FilterListIcon fontSize=\"small\" />\n        <Typography variant=\"subtitle2\" sx={{ flex: 1 }}>\n          {title}\n        </Typography>\n        {activeCount > 0 ? (\n          <Typography variant=\"caption\" color=\"primary\">\n            {activeCount} active\n          </Typography>\n        ) : null}\n      </Box>\n      <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>{children}</Box>\n      <Box sx={{ display: 'flex', gap: 1, justifyContent: 'flex-end' }}>\n        <Button variant=\"ghost\" size=\"small\" onClick={onClear}>\n          Clear\n        </Button>\n        <Button variant=\"primary\" size=\"small\" onClick={onApply}>\n          Apply\n        </Button>\n      </Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const filterPanelMeta = defineMeta({\n  name: 'FilterPanel',\n  level: 'organism',\n  category: 'input',\n  classification: 'custom',\n  description: 'Container for filter controls with header and apply/clear actions.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'Box (composed)',\n  a2uiEquivalent: 'FilterPanel',\n  importPath: '@/organisms/FilterPanel',\n  requiredProps: ['children'],\n  optionalProps: ['title', 'onApply', 'onClear', 'activeCount'],\n  supportedStates: ['default', 'has-active-filters'],\n  designTokens: ['colors', 'radius', 'spacing', 'typography'],\n  accessibility: ['Group related controls with FormField labels.'],\n  usageExamples: ['<FilterPanel title=\"Filters\" onApply={apply} onClear={clear}><Search/></FilterPanel>'],\n  rules: [\n    'The header title is subtitle2 and the active-count is caption. Pass `title` — do not rebuild the header from Typography.',\n  ],\n  antiPatterns: ['Do not place unrelated actions in the footer.'],\n  mountsSurface: 'inline',\n  llmSafe: true,\n  whenToUse: ['Table/list filtering sidebars and popovers'],\n  whenNotToUse: ['Single search field (use Search)'],\n});\n\nexport default filterPanelMeta;\n","import { useMemo, useState } from 'react';\nimport Badge from '@mui/material/Badge';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Checkbox from '@mui/material/Checkbox';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Divider from '@mui/material/Divider';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Popover from '@mui/material/Popover';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport FilterListIcon from '@mui/icons-material/FilterList';\nimport { Search } from '@/molecules/Search';\nimport { scrim } from '@/tokens/colors';\nimport type {\n  FilterDef,\n  FilterOption,\n  FilterSelection,\n  FilterValue,\n} from '@/molecules/FilterMenu/types';\n\n/**\n * FilterPopover\n * Classification: custom (composes Button + Popover + Search + Checkbox list)\n *\n * A popover-triggered filter editor built from a `filters` config. Supports\n * per-filter search, select-all, single/multi selection, apply/reset, a loading\n * state, optional async hooks, and `persistKey` (localStorage) persistence.\n *\n * Use this when several filter fields live behind one trigger and the user\n * should commit them together. For a single field behind a chip, use\n * `FilterMenu`; for an always-visible sidebar, `FilterPanel`.\n */\n\n/**\n * The selection model is defined in `FilterMenu` and re-exported here, so this\n * organism's public API is unchanged by the move. See that file for why it\n * lives there.\n */\nexport type {\n  FilterOption,\n  FilterDef,\n  FilterSelection,\n  FilterValue,\n} from '@/molecules/FilterMenu/types';\n\nexport interface FilterAsyncConfig {\n  onSearch?: (key: string, query: string) => void;\n  onLoadMore?: (key: string) => void;\n  hasMore?: boolean;\n}\n\nexport interface FilterPopoverProps {\n  filters: FilterDef[];\n  value?: FilterValue;\n  defaultValue?: FilterValue;\n  onApply?: (value: FilterValue) => void;\n  onReset?: () => void;\n  loading?: boolean;\n  searchable?: boolean;\n  showSelectAll?: boolean;\n  /** localStorage key to persist the applied selection. */\n  persistKey?: string;\n  triggerLabel?: string;\n  async?: FilterAsyncConfig;\n}\n\nconst readPersisted = (key?: string): FilterValue | undefined => {\n  if (!key || typeof window === 'undefined') return undefined;\n  try {\n    const raw = window.localStorage.getItem(`ds:filter:${key}`);\n    return raw ? (JSON.parse(raw) as FilterValue) : undefined;\n  } catch {\n    return undefined;\n  }\n};\n\nconst writePersisted = (key: string | undefined, value: FilterValue) => {\n  if (!key || typeof window === 'undefined') return;\n  try {\n    window.localStorage.setItem(`ds:filter:${key}`, JSON.stringify(value));\n  } catch {\n    /* ignore quota / serialization errors */\n  }\n};\n\nconst countActive = (value: FilterValue): number =>\n  Object.values(value).filter((s) => s.values.length > 0).length;\n\nexport function FilterPopover({\n  filters,\n  value,\n  defaultValue,\n  onApply,\n  onReset,\n  loading = false,\n  searchable = false,\n  showSelectAll = false,\n  persistKey,\n  triggerLabel = 'Filters',\n  async,\n}: FilterPopoverProps) {\n  const isControlled = value !== undefined;\n\n  const initial = useMemo<FilterValue>(\n    () => value ?? defaultValue ?? readPersisted(persistKey) ?? {},\n    [value, defaultValue, persistKey],\n  );\n\n  const [applied, setApplied] = useState<FilterValue>(initial);\n  const currentApplied = isControlled ? value! : applied;\n\n  const [draft, setDraft] = useState<FilterValue>(initial);\n  const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n  const [queries, setQueries] = useState<Record<string, string>>({});\n\n  const activeCount = countActive(currentApplied);\n\n  const open = (e: React.MouseEvent<HTMLElement>) => {\n    setDraft(currentApplied);\n    setAnchorEl(e.currentTarget);\n  };\n  const close = () => setAnchorEl(null);\n\n  const getSelection = (key: string): FilterSelection => draft[key] ?? { operator: 'in', values: [] };\n\n  const setSelection = (key: string, values: string[]) => {\n    setDraft((prev) => ({ ...prev, [key]: { operator: prev[key]?.operator ?? 'in', values } }));\n  };\n\n  const toggleValue = (def: FilterDef, optionValue: string) => {\n    const selected = getSelection(def.key).values;\n    if (def.type === 'select') {\n      setSelection(def.key, selected.includes(optionValue) ? [] : [optionValue]);\n      return;\n    }\n    setSelection(\n      def.key,\n      selected.includes(optionValue)\n        ? selected.filter((v) => v !== optionValue)\n        : [...selected, optionValue],\n    );\n  };\n\n  const toggleSelectAll = (def: FilterDef, visible: FilterOption[]) => {\n    const selected = getSelection(def.key).values;\n    const allSelected = visible.every((o) => selected.includes(o.value));\n    setSelection(\n      def.key,\n      allSelected\n        ? selected.filter((v) => !visible.some((o) => o.value === v))\n        : Array.from(new Set([...selected, ...visible.map((o) => o.value)])),\n    );\n  };\n\n  const apply = () => {\n    if (!isControlled) setApplied(draft);\n    writePersisted(persistKey, draft);\n    onApply?.(draft);\n    close();\n  };\n\n  const reset = () => {\n    const empty: FilterValue = {};\n    setDraft(empty);\n    if (!isControlled) setApplied(empty);\n    writePersisted(persistKey, empty);\n    onReset?.();\n  };\n\n  const visibleOptions = (def: FilterDef): FilterOption[] => {\n    const q = (queries[def.key] ?? '').trim().toLowerCase();\n    if (!q) return def.options;\n    return def.options.filter((o) => o.label.toLowerCase().includes(q));\n  };\n\n  return (\n    <>\n      <Badge badgeContent={activeCount} color=\"primary\" invisible={activeCount === 0}>\n        <Button\n          variant=\"secondary\"\n          color=\"inherit\"\n          startIcon={<FilterListIcon fontSize=\"small\" />}\n          onClick={open}\n          sx={{ textTransform: 'none' }}\n        >\n          {triggerLabel}\n        </Button>\n      </Badge>\n\n      <Popover\n        open={Boolean(anchorEl)}\n        anchorEl={anchorEl}\n        onClose={close}\n        anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}\n        slotProps={{ paper: { sx: { width: 320 } } }}\n      >\n        <Box sx={{ position: 'relative' }}>\n          {loading ? (\n            <Box\n              sx={{\n                position: 'absolute',\n                inset: 0,\n                display: 'flex',\n                alignItems: 'center',\n                justifyContent: 'center',\n                bgcolor: `rgba(0, 0, 0, ${scrim.loading})`,\n                zIndex: 1,\n              }}\n            >\n              <CircularProgress size={24} />\n            </Box>\n          ) : null}\n\n          <Box sx={{ p: 2, maxHeight: 420, overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: 2 }}>\n            {filters.map((def) => {\n              const options = visibleOptions(def);\n              const selected = getSelection(def.key).values;\n              const allVisibleSelected = options.length > 0 && options.every((o) => selected.includes(o.value));\n              return (\n                <Box key={def.key}>\n                  <Typography variant=\"subtitle2\" sx={{ mb: 1 }}>\n                    {def.label}\n                  </Typography>\n                  {searchable ? (\n                    <Box sx={{ mb: 1 }}>\n                      <Search\n                        placeholder={`Search ${def.label.toLowerCase()}...`}\n                        onChange={(q) => {\n                          setQueries((prev) => ({ ...prev, [def.key]: q }));\n                          async?.onSearch?.(def.key, q);\n                        }}\n                      />\n                    </Box>\n                  ) : null}\n                  {showSelectAll && def.type !== 'select' ? (\n                    <FormControlLabel\n                      control={\n                        <Checkbox\n                          size=\"small\"\n                          checked={allVisibleSelected}\n                          indeterminate={!allVisibleSelected && options.some((o) => selected.includes(o.value))}\n                          onChange={() => toggleSelectAll(def, options)}\n                        />\n                      }\n                      label={<Typography variant=\"body1\">Select all</Typography>}\n                    />\n                  ) : null}\n                  <Stack>\n                    {options.map((option) => (\n                      <FormControlLabel\n                        key={option.value}\n                        control={\n                          <Checkbox\n                            size=\"small\"\n                            checked={selected.includes(option.value)}\n                            onChange={() => toggleValue(def, option.value)}\n                          />\n                        }\n                        label={<Typography variant=\"body1\">{option.label}</Typography>}\n                      />\n                    ))}\n                  </Stack>\n                  {async?.hasMore ? (\n                    <Button size=\"small\" variant=\"ghost\" onClick={() => async.onLoadMore?.(def.key)}>\n                      Load more\n                    </Button>\n                  ) : null}\n                </Box>\n              );\n            })}\n          </Box>\n\n          <Divider />\n          <Stack direction=\"row\" spacing={1} sx={{ justifyContent: 'flex-end', p: 1.5 }}>\n            <Button variant=\"ghost\" size=\"small\" onClick={reset}>\n              Reset\n            </Button>\n            <Button variant=\"primary\" size=\"small\" onClick={apply} disabled={loading}>\n              Apply\n            </Button>\n          </Stack>\n        </Box>\n      </Popover>\n    </>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const filterPopoverMeta = defineMeta({\n  name: 'FilterPopover',\n  level: 'organism',\n  category: 'input',\n  classification: 'custom',\n  description:\n    'Popover-triggered filter editor built from a filters config. Supports per-filter search, select-all, single/multi selection, apply/reset, loading, async hooks and localStorage persistence.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'Popover (composed)',\n  a2uiEquivalent: 'FilterPopover',\n  importPath: '@/organisms/FilterPopover',\n  requiredProps: ['filters'],\n  optionalProps: [\n    'value',\n    'defaultValue',\n    'onApply',\n    'onReset',\n    'loading',\n    'searchable',\n    'showSelectAll',\n    'persistKey',\n    'triggerLabel',\n    'async',\n  ],\n  props: [\n    { name: 'filters', type: 'FilterDef[]', required: true, description: 'Filter definitions with options' },\n    { name: 'value', type: 'Record<string, { operator, values }>', description: 'Controlled selection' },\n    { name: 'persistKey', type: 'string', description: 'localStorage key to persist the applied selection' },\n  ],\n  supportedStates: ['default', 'open', 'loading', 'has-active-filters'],\n  designTokens: ['colors', 'radius', 'spacing'],\n  accessibility: [\n    'Trigger is a real button; options are labelled checkboxes.',\n    'Active filter count is surfaced via a Badge on the trigger.',\n  ],\n  usageExamples: [\n    '<FilterPopover filters={defs} onApply={setFilters} searchable showSelectAll />',\n    '<FilterPopover filters={defs} value={value} onApply={apply} persistKey=\"alerts\" />',\n  ],\n  antiPatterns: [\n    'Do not use for an always-visible sidebar (use FilterPanel).',\n    'Do not put unrelated actions in the footer.',\n  ],\n  mountsSurface: 'portal',\n  llmSafe: true,\n  whenToUse: ['Table/list filter triggers', 'Compact filter menus'],\n  whenNotToUse: ['Persistent filter sidebars (use FilterPanel)', 'A single search field (use Search)'],\n});\n\nexport default filterPopoverMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const emptyStateMeta = defineMeta({\n  name: 'EmptyState',\n  level: 'organism',\n  category: 'feedback',\n  classification: 'custom',\n  description: 'Zero-data / no-results placeholder with illustration, copy and optional action.',\n  baseLibrary: 'custom',\n  muiEquivalent: 'Box + Typography (composed)',\n  a2uiEquivalent: 'EmptyState',\n  importPath: '@/organisms/EmptyState',\n  requiredProps: ['title'],\n  optionalProps: ['description', 'icon', 'action', 'dense'],\n  supportedStates: ['default', 'dense', 'with-action'],\n  designTokens: ['colors', 'typography', 'spacing'],\n  accessibility: ['Uses role=\"status\" so the empty message is announced.'],\n  usageExamples: [\n    '<EmptyState title=\"No findings match these filters\" description=\"Try widening the severity range.\" action={<Button>Clear filters</Button>} />',\n  ],\n  rules: [\n    'Pass copy through `title` (h6, or subtitle1 when dense) and `description` (body1). Do not nest a second Typography for the same text.',\n  ],\n  antiPatterns: ['Do not use EmptyState to mask loading (use Skeleton).'],\n  llmSafe: true,\n  whenToUse: ['Empty tables/lists, no search results, first-run'],\n  whenNotToUse: ['Loading states', 'Errors needing remediation (use Alert)'],\n});\n\nexport default emptyStateMeta;\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { attackPathNodes, attackPathOrder, type AttackPathNodeType } from '@/tokens/attackPath';\n\n/**\n * AttackPathLegend\n * Classification: custom\n *\n * Domain-specific legend that documents the attack-path node color system\n * (stroke + fill per node type) directly from design tokens. Used alongside\n * attack-path graphs and investigation views.\n */\nexport interface AttackPathLegendProps {\n  /** Restrict to a subset of node types (defaults to all, in canonical order). */\n  types?: AttackPathNodeType[];\n  orientation?: 'horizontal' | 'vertical';\n}\n\nexport function AttackPathLegend({\n  types = attackPathOrder,\n  orientation = 'horizontal',\n}: AttackPathLegendProps) {\n  return (\n    <Box\n      role=\"list\"\n      aria-label=\"Attack path legend\"\n      sx={{\n        display: 'flex',\n        flexDirection: orientation === 'horizontal' ? 'row' : 'column',\n        flexWrap: 'wrap',\n        gap: 2,\n      }}\n    >\n      {types.map((type) => {\n        const node = attackPathNodes[type];\n        return (\n          <Box key={type} role=\"listitem\" sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n            <Box\n              aria-hidden\n              sx={{\n                width: 20,\n                height: 20,\n                borderRadius: 1,\n                backgroundColor: node.fill,\n                border: `2px solid ${node.stroke}`,\n                flexShrink: 0,\n              }}\n            />\n            <Typography variant=\"body1\">{node.label}</Typography>\n          </Box>\n        );\n      })}\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const attackPathLegendMeta = defineMeta({\n  name: 'AttackPathLegend',\n  level: 'organism',\n  category: 'data-display',\n  classification: 'custom',\n  description: 'Legend mapping attack-path node types to their stroke/fill colors, from design tokens.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'Legend',\n  importPath: '@/organisms/AttackPathLegend',\n  optionalProps: ['types', 'orientation'],\n  supportedStates: ['horizontal', 'vertical'],\n  designTokens: ['attackPath', 'typography'],\n  accessibility: ['Rendered as a labelled list; swatches are aria-hidden with text labels.'],\n  usageExamples: ['<AttackPathLegend />', '<AttackPathLegend types={[\"host\",\"role\"]} />'],\n  antiPatterns: ['Do not hardcode attack-path colors; always source from tokens.'],\n  llmSafe: true,\n  whenToUse: ['Alongside attack-path graphs/diagrams', 'Investigation layouts'],\n  whenNotToUse: ['Generic status legends (use Chips)'],\n  figma: 'https://www.figma.com/design/LJdrBxmaROpXg0hLW3GKe6/AiStrike-Complete-Design-System?node-id=23-476',\n});\n\nexport default attackPathLegendMeta;\n","import type { ReactNode } from 'react';\nimport {\n  MaterialReactTable,\n  useMaterialReactTable,\n  type MRT_ColumnDef,\n  type MRT_RowData,\n  type MRT_TableOptions,\n} from 'material-react-table';\nimport {\n  backgroundColors,\n  brand,\n  separatorByRung,\n  tableHeaderByRung,\n  textColors,\n  type SurfaceRung,\n} from '@/tokens/colors';\nimport { radius } from '@/tokens/radius';\nimport { dsVar } from '@/tokens/surfaceScopes';\nimport { spacing } from '@/tokens/spacing';\nimport { fontSize, fontWeight } from '@/tokens/typography';\n\n/**\n * Table (DataTable)\n * Classification: mui-wrapper (wraps material-react-table)\n * Base: https://www.material-react-table.com/\n *\n * The product's standard list view. With nothing but `columns` and `data` it\n * renders the shape every AiStrike surface actually wants: a bordered table, a\n * recessed uppercase header, comfortable rows with a hairline rule between\n * them, and hover feedback. Spreadsheet behaviour — toolbar, pagination,\n * sorting, column menus — is off until you ask for it.\n *\n * Compose rows out of the exported cell primitives (`TableTitleCell`,\n * `TableStatusCell`, `TableMetricCell`, `TableMetaCell`, `TableChipsCell`,\n * `TableActionsCell`) rather than hand-building cells from Box/Typography.\n *\n * Do not restyle this component through `muiTablePaperProps` descendant\n * selectors or hardcoded hex — every value it uses is a token, and the props\n * below cover the cases that used to require an override.\n */\n\n/** Background rung the table paints onto, or `transparent` to inherit. */\nexport type TableSurface = SurfaceRung | 'transparent';\n\n/** Row rhythm. `compact` is for sub-tables, drawers and dialogs. */\nexport type TableDensity = 'comfortable' | 'compact';\n\nconst ROW_PAD: Record<TableDensity, { y: string; x: string }> = {\n  comfortable: { y: '14px', x: `${spacing.md}px` },\n  compact: { y: `${spacing.sm}px`, x: `${spacing.sm + spacing.xs}px` },\n};\n\nexport interface DataTableProps<T extends MRT_RowData>\n  extends Omit<MRT_TableOptions<T>, 'columns' | 'data'> {\n  columns: MRT_ColumnDef<T>[];\n  data: T[];\n\n  /**\n   * Makes the whole row activate. Wires click, Enter/Space, `tabIndex`,\n   * `aria-selected` and the pointer cursor — you do not need to add any of it.\n   */\n  onRowClick?: (row: T) => void;\n  /**\n   * Marks a row as the current one. Matched against the row's id, which is\n   * `row.id` on your data unless you pass your own `getRowId`.\n   */\n  selectedRowId?: string | number;\n  /** Rows this returns true for render at 72% opacity (drafts, disabled records). */\n  isRowDimmed?: (row: T) => boolean;\n\n  /** Show skeleton rows in place of content. */\n  loading?: boolean;\n  /**\n   * What to show when there are no rows. Distinguish \"nothing exists yet\" from\n   * \"nothing matched the filter\" — they need different words.\n   */\n  empty?: ReactNode;\n\n  /** Pin the header while the body scrolls. Pair with `maxHeight`. */\n  sticky?: boolean;\n  /** Cap the body height and scroll inside the card. */\n  maxHeight?: number | string;\n  /** Row rhythm. Defaults to `comfortable`. */\n  density?: TableDensity;\n\n  /** Show the top toolbar (global search, filter and density controls). */\n  toolbar?: boolean;\n  /** Show the pagination footer. */\n  pagination?: boolean;\n  /** Allow sorting from the column headers. */\n  sortable?: boolean;\n  /** Show the per-column action menu (hide, group, filter). */\n  columnActions?: boolean;\n\n  /**\n   * Which background the table paints. Defaults to the host rung via\n   * `--ds-bg`, so a table in a dialog does not paint app-shell colours. Pass a\n   * ladder rung to pin an absolute fill, or `'transparent'` to dissolve into a\n   * container that already provides its own surface and border.\n   */\n  surface?: TableSurface;\n  /** Draw the rounded outline. On by default; turn off inside a Card. */\n  bordered?: boolean;\n}\n\nexport function DataTable<T extends MRT_RowData>({\n  columns,\n  data,\n  onRowClick,\n  selectedRowId,\n  isRowDimmed,\n  loading = false,\n  empty,\n  sticky = false,\n  maxHeight,\n  density = 'comfortable',\n  toolbar = false,\n  pagination = false,\n  sortable = false,\n  columnActions = false,\n  surface,\n  bordered = true,\n  ...rest\n}: DataTableProps<T>) {\n  // No `surface` resolves through the scope so the body matches whatever hosts\n  // the table. An explicit rung stays absolute: asking for `widget` is asking\n  // for that colour.\n  const base =\n    surface === 'transparent'\n      ? 'transparent'\n      : surface\n        ? backgroundColors[surface]\n        : dsVar('bg', backgroundColors.primary);\n  // Borderless tables sit edge-to-edge in a Card; match the card's 24px title\n  // gutter so the first column lines up with the heading.\n  const pad = {\n    y: ROW_PAD[density].y,\n    x: bordered ? ROW_PAD[density].x : `${spacing.lg}px`,\n  };\n  const interactive = Boolean(onRowClick);\n\n  const table = useMaterialReactTable({\n    columns,\n    data,\n\n    // Default row identity to the record's own `id` so `selectedRowId` works\n    // without every call site declaring a `getRowId`.\n    getRowId: (row: T, index: number) =>\n      (row as { id?: string | number }).id != null\n        ? String((row as { id?: string | number }).id)\n        : String(index),\n\n    enableTopToolbar: toolbar,\n    enableBottomToolbar: pagination,\n    enablePagination: pagination,\n    enableSorting: sortable,\n    enableColumnActions: columnActions,\n    enableColumnFilters: false,\n    enableDensityToggle: false,\n    enableStickyHeader: sticky,\n    // Honours the widths declared on columns instead of letting content decide.\n    layoutMode: 'grid',\n\n    ...(empty ? { renderEmptyRowsFallback: () => <>{empty}</> } : {}),\n\n    /**\n     * All cell styling lives here, as descendant selectors on the paper.\n     *\n     * It must NOT go in `muiTableHeadCellProps` / `muiTableBodyCellProps`:\n     * material-react-table replaces table-level cell props wholesale for any\n     * column that declares its own, which silently drops the styling under\n     * some columns and not others — most visibly as row rules that stop\n     * partway across the table.\n     */\n    muiTablePaperProps: {\n      elevation: 0,\n      sx: {\n        backgroundColor: base,\n        backgroundImage: 'none',\n        boxShadow: 'none',\n        border: bordered ? `1px solid ${dsVar('border', backgroundColors.border)}` : 'none',\n        borderRadius: bordered ? `${radius.md}px` : 0,\n        overflow: 'hidden',\n\n        '& thead th': {\n          // ~1.08:1 recessed fill keyed to the host. Lighter in dark / darker in\n          // light — away from the elevation direction.\n          backgroundColor: dsVar('tableHeader', tableHeaderByRung.primary),\n          backgroundImage: 'none',\n          // A filled header eats the margin `subtle` was tuned for; labels step\n          // up to tertiary (secondary at overlay). Unfilled headers would keep\n          // `--ds-text-quiet` instead.\n          color: dsVar('tableHeaderLabel', textColors.tertiary),\n          fontSize: `${fontSize.xs}px`,\n          fontWeight: fontWeight.semibold,\n          letterSpacing: '0.05em',\n          textTransform: 'uppercase',\n          lineHeight: 1.4,\n          paddingTop: `${spacing.sm + spacing.xxs}px`,\n          paddingBottom: `${spacing.sm + spacing.xxs}px`,\n          paddingLeft: pad.x,\n          paddingRight: pad.x,\n          // MRT defaults head cells to `vertical-align: top`, which floats short\n          // labels above taller select checkboxes.\n          verticalAlign: 'middle',\n        },\n        // `.MuiTableCell-head` is required so this beats the theme's fill-only\n        // `borderBottom: none` (two classes). Fill or underline, not both —\n        // sticky is the exception: at 1.08 the fill can lose its edge while\n        // rows scroll under it, so it also takes the separator as a bottom rule.\n        '& thead .MuiTableCell-head, & thead .MuiTableCell-head.MuiTableCell-stickyHeader': {\n          borderBottom: sticky\n            ? `1px solid ${dsVar('separator', separatorByRung.primary)}`\n            : 'none',\n        },\n        '& thead th .Mui-TableHeadCell-Content': { alignItems: 'center' },\n        '& thead th .Mui-TableHeadCell-Content-Labels': { alignItems: 'center' },\n        '& thead th .Mui-TableHeadCell-Content-Actions': {\n          display: 'flex',\n          alignItems: 'center',\n        },\n\n        '& tbody td': {\n          backgroundColor: 'transparent',\n          // Host-aware: dark tokens are near-white and wash out on light paper.\n          color: dsVar('text', textColors.primary),\n          fontSize: `${fontSize.md}px`,\n          lineHeight: 1.45,\n          paddingTop: pad.y,\n          paddingBottom: pad.y,\n          paddingLeft: pad.x,\n          paddingRight: pad.x,\n          // Row rhythm at ~1.12:1. The container outline stays on the heavier\n          // `--ds-border` so the edge still reads as structure.\n          borderBottom: `1px solid ${dsVar('separator', separatorByRung.primary)}`,\n        },\n        // The container already draws the outline; a rule under the final row\n        // doubles up against it.\n        '& tbody tr:last-of-type td': { borderBottom: 'none' },\n      },\n    },\n\n    muiTableContainerProps: {\n      sx: {\n        backgroundColor: 'transparent',\n        ...(maxHeight ? { maxHeight } : {}),\n      },\n    },\n    muiTopToolbarProps: { sx: { backgroundColor: 'transparent' } },\n    muiBottomToolbarProps: {\n      sx: { backgroundColor: 'transparent', boxShadow: 'none' },\n    },\n\n    muiTableBodyRowProps: ({ row }) => {\n      const original = row.original as T;\n      const selected = selectedRowId != null && String(selectedRowId) === row.id;\n      const dimmed = isRowDimmed?.(original) ?? false;\n\n      return {\n        hover: false,\n        selected,\n        ...(interactive\n          ? {\n              onClick: () => onRowClick?.(original),\n              onKeyDown: (event: React.KeyboardEvent) => {\n                if (event.key === 'Enter' || event.key === ' ') {\n                  event.preventDefault();\n                  onRowClick?.(original);\n                }\n              },\n              tabIndex: 0,\n              'aria-selected': selected,\n            }\n          : {}),\n        sx: {\n          backgroundColor: base,\n          opacity: dimmed ? 0.72 : 1,\n          transition: 'background-color .12s ease',\n          ...(interactive ? { cursor: 'pointer' } : {}),\n          // MUI paints `.Mui-selected` with a translucent primary wash, which\n          // on a teal-accented dark theme floods the whole row. Selection here\n          // is a rail plus the hover surface, so the wash is overridden rather\n          // than composited with.\n          ...(selected\n            ? {\n                '&.Mui-selected, &.Mui-selected:hover': {\n                  backgroundColor: dsVar('tableRowHover', backgroundColors.surface),\n                  // Brand, read from `brand` rather than from a `text.highlight`\n                  // alias of it: marking the current selection is one of the\n                  // three jobs the spec reserves brand for.\n                  boxShadow: `inset 3px 0 0 ${brand.main}`,\n                },\n              }\n            : {}),\n          ...(interactive\n            ? {\n                '&:hover': {\n                  backgroundColor: dsVar('tableRowHover', backgroundColors.surface),\n                },\n                '&:focus-visible': {\n                  outline: `2px solid ${brand.main}`,\n                  outlineOffset: '-2px',\n                },\n              }\n            : {}),\n        },\n      };\n    },\n\n    ...rest,\n\n    state: { isLoading: loading, ...(rest.state ?? {}) },\n    initialState: { density: 'compact', ...(rest.initialState ?? {}) },\n  });\n\n  return <MaterialReactTable table={table} />;\n}\n\nexport type { MRT_ColumnDef };\n","import type { ReactElement, ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport { Chip } from '@/atoms/Chip';\nimport { Sparkline } from '@/atoms/Sparkline';\nimport { backgroundColors, statusColors } from '@/tokens/colors';\nimport { radius } from '@/tokens/radius';\nimport { dsVar } from '@/tokens/surfaceScopes';\nimport { fontSize, fontWeight } from '@/tokens/typography';\n\n/**\n * Table cell primitives.\n * Classification: custom\n *\n * The row anatomy of an AiStrike list view. A table's quality lives mostly\n * inside its cells, so these ship as components: reach for them from a column's\n * `Cell` renderer instead of assembling Box + Typography and picking colours by\n * hand. Every value here comes from a token.\n */\n\n/* ------------------------------------------------------------------ */\n/* TableTitleCell                                                      */\n/* ------------------------------------------------------------------ */\n\nexport interface TableTitleCellProps {\n  /** The record's name. Truncates rather than wrapping. */\n  title: string;\n  /** Supporting line under the title — a summary, a type, a path. Truncates. */\n  description?: string;\n  /** Leading glyph, avatar or status icon. Keep it 24-28px. */\n  icon?: ReactNode;\n  /** Small dim text beside the title, e.g. a version. */\n  meta?: string;\n  /** Short uppercase tag beside the title, e.g. \"Built-in\". */\n  badge?: string;\n}\n\n/**\n * The identity of a row. Use it in the first column of every list view — it is\n * what makes a table scannable, and the single most-reinvented cell in the\n * product.\n */\nexport function TableTitleCell({ title, description, icon, meta, badge }: TableTitleCellProps) {\n  return (\n    <Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, minWidth: 0 }}>\n      {icon ? (\n        <Box\n          sx={{\n            flexShrink: 0,\n            display: 'grid',\n            placeItems: 'center',\n            width: 26,\n            height: 26,\n            borderRadius: `${radius.sm + 2}px`,\n            backgroundColor: dsVar('tableRowHover', backgroundColors.surface),\n            border: `1px solid ${backgroundColors.border}`,\n            color: 'text.secondary',\n            fontSize: `${fontSize.sm}px`,\n            lineHeight: 0,\n          }}\n        >\n          {icon}\n        </Box>\n      ) : null}\n\n      <Box sx={{ minWidth: 0 }}>\n        <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, minWidth: 0 }}>\n          <Typography variant=\"subtitle2\" component=\"span\" noWrap sx={{ color: 'text.primary' }}>\n            {title}\n          </Typography>\n          {meta ? (\n            <Typography\n              variant=\"caption\"\n              component=\"span\"\n              sx={{ color: 'text.disabled', flexShrink: 0 }}\n            >\n              {meta}\n            </Typography>\n          ) : null}\n          {badge ? (\n            <Chip purpose=\"category\" size=\"small\" label={badge} sx={{ flexShrink: 0 }} />\n          ) : null}\n        </Box>\n\n        {description ? (\n          <Typography\n            variant=\"body1\"\n            component=\"span\"\n            noWrap\n            sx={{ display: 'block', color: 'text.secondary' }}\n          >\n            {description}\n          </Typography>\n        ) : null}\n      </Box>\n    </Box>\n  );\n}\n\n/* ------------------------------------------------------------------ */\n/* TableStatusCell                                                     */\n/* ------------------------------------------------------------------ */\n\nexport type TableStatusTone = 'active' | 'warning' | 'error' | 'info' | 'neutral';\n\nconst TONE_COLOR: Record<TableStatusTone, string> = {\n  active: statusColors.general,\n  warning: statusColors.warning,\n  error: statusColors.failure,\n  info: statusColors.info,\n  // Resolved via the theme so light mode does not inherit the dark subtle grey.\n  neutral: 'text.secondary',\n};\n\nexport interface TableStatusCellProps {\n  label: string;\n  /** Which semantic hue the dot and label take. */\n  tone?: TableStatusTone;\n}\n\n/**\n * Lifecycle or health state, as a dot and a label.\n *\n * Use this for state (enabled, healthy, failing) and a `Chip` for facets\n * (tags, sources, severity). Mixing them makes a table read as noise.\n */\nexport function TableStatusCell({ label, tone = 'neutral' }: TableStatusCellProps) {\n  const color = TONE_COLOR[tone];\n  const lit = tone !== 'neutral';\n  return (\n    <Typography\n      variant=\"body1\"\n      component=\"span\"\n      noWrap\n      sx={{\n        display: 'inline-flex',\n        alignItems: 'center',\n        gap: '6px',\n        fontWeight: fontWeight.medium,\n        color,\n      }}\n    >\n      <Box\n        component=\"span\"\n        aria-hidden\n        sx={{\n          width: 7,\n          height: 7,\n          borderRadius: '50%',\n          backgroundColor: color,\n          boxShadow: lit ? `0 0 6px ${color}` : 'none',\n        }}\n      />\n      {label}\n    </Typography>\n  );\n}\n\n/* ------------------------------------------------------------------ */\n/* TableMetricCell                                                     */\n/* ------------------------------------------------------------------ */\n\nexport interface TableMetricCellProps {\n  /** The headline figure, already formatted (e.g. \"8.9k\"). */\n  value: ReactNode;\n  /** Optional trend series drawn to the left of the value. */\n  trend?: readonly number[];\n  /** Accessible description of the trend. Required when `trend` is given. */\n  trendLabel?: string;\n  /** Full-precision figure shown on hover. */\n  tooltip?: string;\n  /** Dim the whole cell — for a zero or inactive measure. */\n  muted?: boolean;\n  /** Right-align, the default for numbers in a column. */\n  align?: 'left' | 'right';\n}\n\n/** A number that carries a trend. Uses tabular figures so columns line up. */\nexport function TableMetricCell({\n  value,\n  trend,\n  trendLabel,\n  tooltip,\n  muted = false,\n  align = 'right',\n}: TableMetricCellProps) {\n  const body = (\n    <Box\n      sx={{\n        display: 'flex',\n        alignItems: 'center',\n        gap: 1,\n        justifyContent: align === 'right' ? 'flex-end' : 'flex-start',\n        ...(muted ? { filter: 'grayscale(1)', opacity: 0.6 } : {}),\n      }}\n    >\n      {trend ? (\n        <Sparkline\n          data={trend}\n          variant=\"area\"\n          tone=\"accent\"\n          showEndPoint\n          width={78}\n          height={24}\n          label={trendLabel ?? 'Trend'}\n        />\n      ) : null}\n      <Typography\n        variant=\"subtitle2\"\n        component=\"span\"\n        sx={{\n          color: muted ? 'text.secondary' : 'text.primary',\n          fontVariantNumeric: 'tabular-nums',\n        }}\n      >\n        {value}\n      </Typography>\n    </Box>\n  );\n\n  return tooltip ? (\n    <Tooltip arrow placement=\"top\" title={tooltip}>\n      {body}\n    </Tooltip>\n  ) : (\n    body\n  );\n}\n\n/* ------------------------------------------------------------------ */\n/* TableMetaCell                                                       */\n/* ------------------------------------------------------------------ */\n\nexport interface TableMetaCellProps {\n  /** The fact — \"10h ago\", \"Jun 27, 2026\". */\n  primary: ReactNode;\n  /** Who or what it belongs to — an actor, a source, an id. */\n  secondary?: ReactNode;\n}\n\n/** Incidental metadata on two lines: the fact, then whose it is. */\nexport function TableMetaCell({ primary, secondary }: TableMetaCellProps) {\n  return (\n    <Box sx={{ minWidth: 0 }}>\n      <Typography\n        variant=\"body1\"\n        component=\"span\"\n        noWrap\n        sx={{ display: 'block', color: 'text.secondary' }}\n      >\n        {primary}\n      </Typography>\n      {secondary ? (\n        <Typography\n          variant=\"caption\"\n          component=\"span\"\n          noWrap\n          sx={{ display: 'block', color: 'text.disabled' }}\n        >\n          {secondary}\n        </Typography>\n      ) : null}\n    </Box>\n  );\n}\n\n/* ------------------------------------------------------------------ */\n/* TableChipsCell                                                      */\n/* ------------------------------------------------------------------ */\n\nexport interface TableChipsCellProps {\n  items: readonly string[];\n  /** How many to show before collapsing the rest into a \"+N\". */\n  max?: number;\n  /** Leading glyph repeated on every chip. */\n  icon?: ReactNode;\n}\n\n/** A set of facets that may overflow. Caps at `max` and counts the remainder. */\nexport function TableChipsCell({ items, max = 3, icon }: TableChipsCellProps) {\n  const shown = items.slice(0, max);\n  const rest = items.length - shown.length;\n\n  return (\n    <Box sx={{ display: 'flex', gap: 0.5, flexWrap: 'wrap', minWidth: 0 }}>\n      {shown.map((item) => (\n        <Chip\n          key={item}\n          purpose=\"category\"\n          size=\"small\"\n          label={item}\n          icon={icon as ReactElement | undefined}\n        />\n      ))}\n      {rest > 0 ? (\n        // The remainder is disclosed on hover and focus rather than by expanding\n        // in place, so a long facet list cannot change the row height. tabIndex\n        // is what makes the tooltip reachable without a pointer.\n        <Tooltip arrow placement=\"top\" title={items.slice(max).join(', ')}>\n          <Chip purpose=\"metric\" size=\"small\" label={`+${rest}`} tabIndex={0} />\n        </Tooltip>\n      ) : null}\n    </Box>\n  );\n}\n\n/* ------------------------------------------------------------------ */\n/* TableActionsCell                                                    */\n/* ------------------------------------------------------------------ */\n\nexport interface TableActionsCellProps {\n  /** IconButtons, usually. Keep it to three or fewer. */\n  children: ReactNode;\n  /**\n   * Fade the actions in on row hover. They stay reachable by keyboard, so this\n   * hides visual noise without hiding function.\n   */\n  revealOnHover?: boolean;\n}\n\n/** Right-aligned row actions. */\nexport function TableActionsCell({ children, revealOnHover = true }: TableActionsCellProps) {\n  return (\n    <Box\n      sx={{\n        display: 'flex',\n        gap: 0.5,\n        justifyContent: 'flex-end',\n        ...(revealOnHover\n          ? {\n              opacity: 0,\n              transition: 'opacity .12s ease',\n              'tr:hover &, tr:focus-within &, &:focus-within': { opacity: 1 },\n            }\n          : {}),\n      }}\n    >\n      {children}\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const tableMeta = defineMeta({\n  name: 'Table',\n  level: 'organism',\n  category: 'data-display',\n  classification: 'mui-wrapper',\n  description:\n    'The standard list view. With only `columns` and `data` it renders a bordered card with a recessed uppercase header, comfortable rows and hover feedback. Toolbar, pagination, sorting and column menus are off unless asked for.',\n  baseLibrary: 'material-react-table',\n  muiEquivalent: 'Table (enhanced)',\n  muiDocs: 'https://www.material-react-table.com/',\n  a2uiEquivalent: 'DataTable',\n  importPath: '@/organisms/Table',\n  requiredProps: ['columns', 'data'],\n  optionalProps: [\n    'onRowClick',\n    'selectedRowId',\n    'isRowDimmed',\n    'loading',\n    'empty',\n    'sticky',\n    'maxHeight',\n    'density',\n    'toolbar',\n    'pagination',\n    'sortable',\n    'columnActions',\n    'surface',\n    'bordered',\n  ],\n  supportedStates: [\n    'default',\n    'hover',\n    'selected',\n    'dimmed',\n    'loading',\n    'empty',\n    'sorted',\n    'paginated',\n    'sticky',\n  ],\n  designTokens: ['colors', 'radius', 'spacing', 'typography'],\n  accessibility: [\n    'Renders a semantic table; write column headers that describe the data, not the widget.',\n    '`onRowClick` wires Enter/Space, tabIndex and aria-selected - do not hand-roll row interaction.',\n    'When a row is the only way to reach a record, the row must be clickable, not just an icon inside it.',\n  ],\n  usageExamples: [\n    '<DataTable columns={columns} data={rows} />',\n    '<DataTable columns={columns} data={rows} onRowClick={(row) => open(row.id)} selectedRowId={selectedId} />',\n    '<DataTable columns={columns} data={rows} loading={isFetching} empty={<EmptyState title=\"No detection rules yet\" description=\"Import a pack or write your first rule.\" />} />',\n    '<DataTable columns={columns} data={rows} toolbar pagination sortable sticky maxHeight={420} />',\n    '<Card variant=\"data\" title=\"Historical Cases\"><DataTable columns={columns} data={rows} bordered={false} surface=\"transparent\" /></Card>',\n  ],\n  rules: [\n    'On a surface (page body, panel, dialog) keep the default bordered table so the outline is the structural edge. Header fill (~1.08:1, no underline unless `sticky`) and row rules (`--ds-separator`, ~1.12:1) track the host.',\n    'Inside a Card pass `bordered={false} surface=\"transparent\"`. The card opens the next rung and the table spans its width so the header fill is not inset; 24px cell padding keeps columns aligned with the title.',\n  ],\n  antiPatterns: [\n    'Do not restyle through `muiTablePaperProps` / `muiTableHeadCellProps` descendant selectors - the props above cover it, and column-level cell props silently clobber table-level ones.',\n    'Do not wrap the table in a Box to get a border or radius - it is bordered by default, and `bordered={false}` turns it off.',\n    'Do not leave the table outlined inside a Card - that double-codes the edge the card already provides.',\n    'Do not hardcode hex for surfaces or rules - the table inherits its host rung (`--ds-bg`); header and hover are derived from it; outline uses `--ds-border`, row rules use `--ds-separator`.',\n    'Do not pass `enableTopToolbar={false} enablePagination={false} enableSorting={false} enableColumnActions={false}` - those are already the defaults.',\n    'Do not build a list view out of a CSS grid of Boxes because the table \"felt heavy\" - it is a table, and grids lose semantics, sorting and keyboard support.',\n    'Do not use for a handful of static key/value pairs (use a definition list or Card).',\n  ],\n  llmSafe: true,\n  whenToUse: ['Any list of records the user scans, filters or opens'],\n  whenNotToUse: ['A handful of static rows with no interaction'],\n});\n\nexport default tableMeta;\n","import { defineMeta } from '@/registry/types';\n\nexport const tableCellsMeta = defineMeta({\n  name: 'TableCells',\n  level: 'molecule',\n  category: 'data-display',\n  classification: 'custom',\n  description:\n    'Row anatomy for DataTable: title, status, metric, meta, chips and actions cells. Use these inside a column `Cell` renderer instead of building cells from Box + Typography.',\n  baseLibrary: 'custom',\n  importPath: '@/organisms/Table',\n  requiredProps: [],\n  optionalProps: ['title', 'description', 'icon', 'meta', 'badge', 'label', 'tone', 'value', 'trend', 'items', 'max'],\n  supportedStates: ['default', 'truncated', 'overflowing', 'muted', 'hover-revealed'],\n  designTokens: ['colors', 'radius', 'spacing', 'typography'],\n  accessibility: [\n    'TableStatusCell conveys state by colour AND text - never drop the label.',\n    'TableMetricCell requires `trendLabel` whenever `trend` is supplied.',\n    'TableActionsCell stays keyboard-reachable when visually hidden until hover.',\n  ],\n  usageExamples: [\n    \"{ accessorKey: 'name', header: 'Workflow', size: 280, Cell: ({ row }) => <TableTitleCell icon={<BoltIcon />} title={row.original.name} meta={row.original.version} badge={row.original.builtIn ? 'Built-in' : undefined} description={row.original.summary} /> }\",\n    \"{ accessorKey: 'status', header: 'Status', size: 120, Cell: ({ row }) => <TableStatusCell tone={row.original.enabled ? 'active' : 'neutral'} label={row.original.enabled ? 'Active' : 'Disabled'} /> }\",\n    \"{ accessorKey: 'volume', header: 'Volume 24h', size: 150, Cell: ({ row }) => <TableMetricCell trend={row.original.volume24h} trendLabel=\\\"Executions, last 24 hours\\\" value={formatCompact(total)} /> }\",\n  ],\n  rules: [\n    'Each cell applies its own variant: title subtitle2, description body1, meta/badge uses Chip variant=\"subtle\" color=\"primary\", status body1, metric subtitle2, chips use Chip variant=\"subtle\" color=\"neutral\".',\n    'TableChipsCell and the TableTitleCell badge both use the design-system Chip atom internally — never hand-roll pill elements in a table cell.',\n  ],\n  antiPatterns: [\n    'Do not rebuild the two-line title cell from Box + Typography - use TableTitleCell.',\n    'Do not use a filled Chip for lifecycle state; state is a dot + label (TableStatusCell), chips are for facets.',\n    'Do not hardcode hex for row text - `textColors.subtle` and `textColors.muted` exist for the secondary lines.',\n    'Do not build tag chips from Typography + inline sx — use the Chip atom with the appropriate variant and color.',\n  ],\n  llmSafe: true,\n  whenToUse: ['Any column in a DataTable that shows more than a bare string'],\n  whenNotToUse: ['Outside a table - these are tuned to row rhythm, not general layout'],\n});\n\nexport default tableCellsMeta;\n","import type { ElementType, ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Toolbar from '@mui/material/Toolbar';\nimport Typography from '@mui/material/Typography';\nimport IconButton from '@mui/material/IconButton';\nimport MenuIcon from '@mui/icons-material/Menu';\nimport { AppBar } from '@/organisms/AppBar';\nimport { LeftNavigation, type NavItem } from '@/organisms/LeftNavigation';\n\n/**\n * DashboardLayout\n * Classification: custom (template composing AppBar + LeftNavigation)\n *\n * The standard application shell: a top AppBar, a collapsible primary side\n * navigation, and a scrollable content region. Compose pages inside `children`.\n */\nexport interface DashboardLayoutProps {\n  children: ReactNode;\n  navItems: NavItem[];\n  selectedNavId?: string;\n  onNavSelect?: (id: string) => void;\n  /** Brand text shown in the AppBar. */\n  brand?: ReactNode;\n  /** Right-aligned AppBar content (search, notifications, avatar). */\n  toolbar?: ReactNode;\n  collapsed?: boolean;\n  onToggleNav?: () => void;\n  /**\n   * Link component used for `navItems` that carry an `href`. Pass a router link\n   * (`next/link`, react-router's `Link`) for client-side navigation.\n   */\n  navLinkComponent?: ElementType;\n}\n\nexport function DashboardLayout({\n  children,\n  navItems,\n  selectedNavId,\n  onNavSelect,\n  brand = 'AiStrike',\n  toolbar,\n  collapsed = false,\n  onToggleNav,\n  navLinkComponent,\n}: DashboardLayoutProps) {\n  return (\n    <Box sx={{ display: 'flex', flexDirection: 'column', height: '100vh', bgcolor: 'background.default' }}>\n      <AppBar position=\"static\">\n        <Toolbar sx={{ gap: 2 }}>\n          <IconButton edge=\"start\" aria-label=\"toggle navigation\" onClick={onToggleNav}>\n            <MenuIcon />\n          </IconButton>\n          <Typography variant=\"h6\" sx={{ fontFamily: 'inherit' }}>\n            {brand}\n          </Typography>\n          <Box sx={{ flex: 1 }} />\n          {toolbar}\n        </Toolbar>\n      </AppBar>\n      <Box sx={{ display: 'flex', flex: 1, minHeight: 0 }}>\n        <LeftNavigation\n          items={navItems}\n          selectedId={selectedNavId}\n          onSelect={onNavSelect}\n          collapsed={collapsed}\n          linkComponent={navLinkComponent}\n        />\n        <Box component=\"main\" sx={{ flex: 1, minWidth: 0, overflow: 'auto', p: 3 }}>\n          {children}\n        </Box>\n      </Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const dashboardLayoutMeta = defineMeta({\n  name: 'DashboardLayout',\n  level: 'template',\n  category: 'layout',\n  classification: 'custom',\n  description: 'Application shell with AppBar, collapsible LeftNavigation and a scrollable content region.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'AppShell',\n  importPath: '@/templates/DashboardLayout',\n  requiredProps: ['children', 'navItems'],\n  optionalProps: [\n    'selectedNavId',\n    'onNavSelect',\n    'brand',\n    'toolbar',\n    'collapsed',\n    'onToggleNav',\n    'navLinkComponent',\n  ],\n  supportedStates: ['default', 'collapsed-nav'],\n  designTokens: ['colors', 'spacing'],\n  accessibility: ['Provides banner, navigation and main landmarks.'],\n  usageExamples: ['<DashboardLayout navItems={items} selectedNavId={id} onNavSelect={set}>...</DashboardLayout>'],\n  rules: [\n    'Give navItems an href and pass navLinkComponent (next/link, react-router Link) when the nav moves between routes, so the rail renders links rather than buttons.',\n  ],\n  antiPatterns: ['Do not nest DashboardLayouts.'],\n  llmSafe: true,\n  whenToUse: ['Top-level app pages requiring the standard shell'],\n  whenNotToUse: ['Auth/marketing pages without navigation'],\n});\n\nexport default dashboardLayoutMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\n\n/**\n * TablePageLayout\n * Classification: custom (template)\n *\n * Standard list/table page: a header (title, description, primary actions), an\n * optional toolbar (search/filters) and a content region for the table.\n */\nexport interface TablePageLayoutProps {\n  title: string;\n  description?: string;\n  /** Primary actions, right-aligned in the header. */\n  actions?: ReactNode;\n  /** Toolbar row above the table (search, filters, view toggles). */\n  toolbar?: ReactNode;\n  children: ReactNode;\n}\n\nexport function TablePageLayout({\n  title,\n  description,\n  actions,\n  toolbar,\n  children,\n}: TablePageLayoutProps) {\n  return (\n    <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n      <Box sx={{ display: 'flex', alignItems: 'flex-start', gap: 2 }}>\n        <Box sx={{ flex: 1, minWidth: 0 }}>\n          <Typography variant=\"h4\" sx={{ fontFamily: 'inherit' }}>\n            {title}\n          </Typography>\n          {description ? (\n            <Typography variant=\"body1\" color=\"text.secondary\" sx={{ mt: 0.5 }}>\n              {description}\n            </Typography>\n          ) : null}\n        </Box>\n        {actions ? <Box sx={{ display: 'flex', gap: 1 }}>{actions}</Box> : null}\n      </Box>\n      {toolbar ? (\n        <Box sx={{ display: 'flex', alignItems: 'center', gap: 2, flexWrap: 'wrap' }}>{toolbar}</Box>\n      ) : null}\n      <Box sx={{ minWidth: 0 }}>{children}</Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const tablePageLayoutMeta = defineMeta({\n  name: 'TablePageLayout',\n  level: 'template',\n  category: 'layout',\n  classification: 'custom',\n  description: 'List/table page with header (title, actions), toolbar (search/filters) and table content.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'ListPage',\n  importPath: '@/templates/TablePageLayout',\n  requiredProps: ['title', 'children'],\n  optionalProps: ['description', 'actions', 'toolbar'],\n  supportedStates: ['default'],\n  designTokens: ['typography', 'spacing'],\n  accessibility: ['Title is the page heading; place the table in the content region.'],\n  usageExamples: ['<TablePageLayout title=\"Inventory\" toolbar={<Search/>}><DataTable .../></TablePageLayout>'],\n  antiPatterns: ['Do not embed unrelated dashboards here (use DashboardLayout content).'],\n  llmSafe: true,\n  whenToUse: ['Any list/table screen'],\n  whenNotToUse: ['Dashboards (use DashboardLayout / DashboardExample)'],\n});\n\nexport default tablePageLayoutMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport List from '@mui/material/List';\nimport ListItemButton from '@mui/material/ListItemButton';\nimport ListItemText from '@mui/material/ListItemText';\n\n/**\n * SettingsLayout\n * Classification: custom (template)\n *\n * Two-column settings page: a section navigation list on the left and the\n * active section's content on the right.\n */\nexport interface SettingsSection {\n  id: string;\n  label: string;\n}\n\nexport interface SettingsLayoutProps {\n  title?: string;\n  sections: SettingsSection[];\n  activeId?: string;\n  onSelect?: (id: string) => void;\n  children: ReactNode;\n}\n\nexport function SettingsLayout({\n  title = 'Settings',\n  sections,\n  activeId,\n  onSelect,\n  children,\n}: SettingsLayoutProps) {\n  return (\n    <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n      <Typography variant=\"h4\" sx={{ fontFamily: 'inherit' }}>\n        {title}\n      </Typography>\n      <Box sx={{ display: 'flex', gap: 4 }}>\n        <Box sx={{ width: 220, flexShrink: 0 }}>\n          <List disablePadding>\n            {sections.map((s) => (\n              <ListItemButton\n                key={s.id}\n                selected={s.id === activeId}\n                onClick={() => onSelect?.(s.id)}\n                sx={{ borderRadius: 1, mb: 0.5 }}\n              >\n                <ListItemText primary={s.label} />\n              </ListItemButton>\n            ))}\n          </List>\n        </Box>\n        <Box sx={{ flex: 1, minWidth: 0 }}>{children}</Box>\n      </Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const settingsLayoutMeta = defineMeta({\n  name: 'SettingsLayout',\n  level: 'template',\n  category: 'layout',\n  classification: 'custom',\n  description: 'Two-column settings page with section navigation and content area.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'SettingsPage',\n  importPath: '@/templates/SettingsLayout',\n  requiredProps: ['sections', 'children'],\n  optionalProps: ['title', 'activeId', 'onSelect'],\n  supportedStates: ['default'],\n  designTokens: ['spacing', 'radius'],\n  accessibility: ['Section list items reflect selection; content updates accordingly.'],\n  usageExamples: ['<SettingsLayout sections={s} activeId={id} onSelect={set}>...</SettingsLayout>'],\n  antiPatterns: ['Do not use for non-settings content.'],\n  llmSafe: true,\n  whenToUse: ['Settings / preferences screens'],\n  whenNotToUse: ['Tables (use TablePageLayout)'],\n});\n\nexport default settingsLayoutMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\n\n/**\n * FormPageLayout\n * Classification: custom (template)\n *\n * Centered single-column form page with a header and a sticky footer action\n * bar (submit / cancel).\n */\nexport interface FormPageLayoutProps {\n  title: string;\n  description?: string;\n  children: ReactNode;\n  /** Footer actions (submit / cancel). */\n  actions?: ReactNode;\n  maxWidth?: number;\n}\n\nexport function FormPageLayout({\n  title,\n  description,\n  children,\n  actions,\n  maxWidth = 640,\n}: FormPageLayoutProps) {\n  return (\n    <Box sx={{ maxWidth, mx: 'auto', display: 'flex', flexDirection: 'column', gap: 3 }}>\n      <Box>\n        <Typography variant=\"h4\" sx={{ fontFamily: 'inherit' }}>\n          {title}\n        </Typography>\n        {description ? (\n          <Typography variant=\"body1\" color=\"text.secondary\" sx={{ mt: 0.5 }}>\n            {description}\n          </Typography>\n        ) : null}\n      </Box>\n      <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>{children}</Box>\n      {actions ? (\n        <Box\n          sx={{\n            display: 'flex',\n            justifyContent: 'flex-end',\n            gap: 1,\n            pt: 2,\n            borderTop: 1,\n            borderColor: 'divider',\n          }}\n        >\n          {actions}\n        </Box>\n      ) : null}\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const formPageLayoutMeta = defineMeta({\n  name: 'FormPageLayout',\n  level: 'template',\n  category: 'layout',\n  classification: 'custom',\n  description: 'Centered single-column form page with header and footer action bar.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'FormPage',\n  importPath: '@/templates/FormPageLayout',\n  requiredProps: ['title', 'children'],\n  optionalProps: ['description', 'actions', 'maxWidth'],\n  supportedStates: ['default'],\n  designTokens: ['spacing', 'typography'],\n  accessibility: ['Title is the page heading; group fields with FormSection/FormField.'],\n  usageExamples: ['<FormPageLayout title=\"Connect\" actions={<Button>Save</Button>}>...</FormPageLayout>'],\n  antiPatterns: ['Do not use for multi-step wizards (add a Stepper).'],\n  llmSafe: true,\n  whenToUse: ['Create/edit single-entity forms'],\n  whenNotToUse: ['Tables/dashboards'],\n});\n\nexport default formPageLayoutMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\n\n/**\n * DetailsPageLayout\n * Classification: custom (template)\n *\n * Entity detail page: a header slot (breadcrumbs/title/actions), a primary\n * content column and a secondary side panel (metadata, related items).\n */\nexport interface DetailsPageLayoutProps {\n  title: string;\n  /** Breadcrumbs or back link rendered above the title. */\n  breadcrumbs?: ReactNode;\n  actions?: ReactNode;\n  /** Right-hand metadata / related panel. */\n  aside?: ReactNode;\n  children: ReactNode;\n}\n\nexport function DetailsPageLayout({\n  title,\n  breadcrumbs,\n  actions,\n  aside,\n  children,\n}: DetailsPageLayoutProps) {\n  return (\n    <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n      {breadcrumbs}\n      <Box sx={{ display: 'flex', alignItems: 'flex-start', gap: 2 }}>\n        <Typography variant=\"h4\" sx={{ flex: 1, fontFamily: 'inherit' }}>\n          {title}\n        </Typography>\n        {actions ? <Box sx={{ display: 'flex', gap: 1 }}>{actions}</Box> : null}\n      </Box>\n      <Box sx={{ display: 'flex', gap: 3, alignItems: 'flex-start' }}>\n        <Box sx={{ flex: 1, minWidth: 0 }}>{children}</Box>\n        {aside ? <Box sx={{ width: 320, flexShrink: 0 }}>{aside}</Box> : null}\n      </Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const detailsPageLayoutMeta = defineMeta({\n  name: 'DetailsPageLayout',\n  level: 'template',\n  category: 'layout',\n  classification: 'custom',\n  description: 'Entity detail page with header (breadcrumbs/title/actions), content column and side panel.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'DetailPage',\n  importPath: '@/templates/DetailsPageLayout',\n  requiredProps: ['title', 'children'],\n  optionalProps: ['breadcrumbs', 'actions', 'aside'],\n  supportedStates: ['default', 'with-aside'],\n  designTokens: ['spacing', 'typography'],\n  accessibility: ['Breadcrumbs convey location; title is the page heading.'],\n  usageExamples: ['<DetailsPageLayout title=\"prod-db-01\" aside={<Card/>}>...</DetailsPageLayout>'],\n  antiPatterns: ['Do not overload the aside with primary content.'],\n  llmSafe: true,\n  whenToUse: ['Asset/finding/entity detail screens'],\n  whenNotToUse: ['Lists (use TablePageLayout)'],\n});\n\nexport default detailsPageLayoutMeta;\n","import type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { AttackPathLegend } from '@/organisms/AttackPathLegend';\n\n/**\n * InvestigationLayout\n * Classification: custom (template)\n *\n * Split investigation view: a large canvas area (attack-path graph / timeline)\n * with a docked side panel for details and the AttackPathLegend.\n */\nexport interface InvestigationLayoutProps {\n  title?: string;\n  /** Main canvas content (graph, map, timeline). */\n  canvas: ReactNode;\n  /** Side panel content (selected node details). */\n  panel?: ReactNode;\n  /** Show the attack-path legend in the panel. */\n  showLegend?: boolean;\n}\n\nexport function InvestigationLayout({\n  title = 'Investigation',\n  canvas,\n  panel,\n  showLegend = true,\n}: InvestigationLayoutProps) {\n  return (\n    <Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', gap: 2 }}>\n      <Typography variant=\"h5\" sx={{ fontFamily: 'inherit' }}>\n        {title}\n      </Typography>\n      <Box sx={{ display: 'flex', gap: 2, flex: 1, minHeight: 0 }}>\n        <Box\n          sx={{\n            flex: 1,\n            minWidth: 0,\n            bgcolor: 'background.paper',\n            border: 1,\n            borderColor: 'divider',\n            borderRadius: 2,\n            position: 'relative',\n            overflow: 'hidden',\n          }}\n        >\n          {canvas}\n        </Box>\n        <Box\n          sx={{\n            width: 320,\n            flexShrink: 0,\n            display: 'flex',\n            flexDirection: 'column',\n            gap: 2,\n          }}\n        >\n          {panel}\n          {showLegend ? (\n            <Box sx={{ p: 2, border: 1, borderColor: 'divider', borderRadius: 2 }}>\n              <Typography variant=\"subtitle2\" gutterBottom>\n                Legend\n              </Typography>\n              <AttackPathLegend orientation=\"vertical\" />\n            </Box>\n          ) : null}\n        </Box>\n      </Box>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const investigationLayoutMeta = defineMeta({\n  name: 'InvestigationLayout',\n  level: 'template',\n  category: 'layout',\n  classification: 'custom',\n  description: 'Split investigation view with a canvas (graph/timeline) and a docked details + legend panel.',\n  baseLibrary: 'custom',\n  a2uiEquivalent: 'SplitView',\n  importPath: '@/templates/InvestigationLayout',\n  requiredProps: ['canvas'],\n  optionalProps: ['title', 'panel', 'showLegend'],\n  supportedStates: ['default', 'with-panel'],\n  designTokens: ['colors', 'spacing', 'attackPath'],\n  accessibility: ['Provide accessible descriptions for graph content in the panel.'],\n  usageExamples: ['<InvestigationLayout canvas={<Graph/>} panel={<Details/>} />'],\n  antiPatterns: ['Do not hide the legend when showing attack-path colors.'],\n  llmSafe: true,\n  whenToUse: ['Attack-path / graph investigation screens'],\n  whenNotToUse: ['Simple detail pages (use DetailsPageLayout)'],\n});\n\nexport default investigationLayoutMeta;\n","import { useMemo, useState } from 'react';\nimport Box from '@mui/material/Box';\nimport DashboardIcon from '@mui/icons-material/Dashboard';\nimport InventoryIcon from '@mui/icons-material/Inventory2';\nimport SecurityIcon from '@mui/icons-material/Security';\nimport WarningIcon from '@mui/icons-material/WarningAmber';\nimport SettingsIcon from '@mui/icons-material/Settings';\nimport NotificationsIcon from '@mui/icons-material/Notifications';\nimport { Avatar } from '@/atoms/Avatar';\nimport { Badge } from '@/atoms/Badge';\nimport { Chip } from '@/atoms/Chip';\nimport { IconButton } from '@/atoms/IconButton';\nimport { Typography } from '@/atoms/Typography';\nimport { Search } from '@/molecules/Search';\nimport { Card, CardHeader, CardContent } from '@/organisms/Card';\nimport { DataTable, type MRT_ColumnDef } from '@/organisms/Table';\nimport { DashboardLayout } from '@/templates/DashboardLayout';\nimport type { NavItem } from '@/organisms/LeftNavigation';\n\n/**\n * DashboardExample\n * Example page showing how to assemble a security dashboard from the design\n * system: DashboardLayout shell + a recent-findings Table.\n */\ninterface Finding {\n  asset: string;\n  severity: 'critical' | 'high' | 'medium' | 'low';\n  rule: string;\n  age: string;\n}\n\nconst navItems: NavItem[] = [\n  { id: 'dashboard', label: 'Dashboard', icon: <DashboardIcon /> },\n  { id: 'inventory', label: 'Inventory', icon: <InventoryIcon /> },\n  { id: 'threats', label: 'Threats', icon: <SecurityIcon /> },\n  { id: 'alerts', label: 'Alerts', icon: <WarningIcon /> },\n  { id: 'settings', label: 'Settings', icon: <SettingsIcon /> },\n];\n\nconst findings: Finding[] = [\n  { asset: 'prod-db-01', severity: 'critical', rule: 'Public RDS snapshot', age: '2m' },\n  { asset: 'api-gateway', severity: 'high', rule: 'Overly permissive SG', age: '14m' },\n  { asset: 's3-backups', severity: 'medium', rule: 'Unencrypted bucket', age: '1h' },\n  { asset: 'iam-role-ci', severity: 'low', rule: 'Unused access key', age: '3h' },\n];\n\nexport function DashboardExample() {\n  const [selected, setSelected] = useState('dashboard');\n  const columns = useMemo<MRT_ColumnDef<Finding>[]>(\n    () => [\n      { accessorKey: 'asset', header: 'Asset' },\n      {\n        accessorKey: 'severity',\n        header: 'Severity',\n        Cell: ({ cell }) => (\n          <Chip purpose=\"severity\" level={cell.getValue<Finding['severity']>()} size=\"small\" />\n        ),\n      },\n      { accessorKey: 'rule', header: 'Rule' },\n      { accessorKey: 'age', header: 'Age' },\n    ],\n    [],\n  );\n\n  return (\n    <DashboardLayout\n      navItems={navItems}\n      selectedNavId={selected}\n      onNavSelect={setSelected}\n      toolbar={\n        <>\n          <Box sx={{ width: 320 }}>\n            <Search placeholder=\"Search assets, findings...\" />\n          </Box>\n          <Badge badgeContent={5} color=\"error\">\n            <IconButton label=\"notifications\" icon={<NotificationsIcon />} />\n          </Badge>\n          <Avatar sx={{ width: 32, height: 32 }}>AS</Avatar>\n        </>\n      }\n    >\n      <Typography variant=\"h4\" gutterBottom sx={{ fontFamily: 'inherit' }}>\n        Security overview\n      </Typography>\n      <Card>\n        <CardHeader title=\"Recent findings\" />\n        <CardContent sx={{ p: 0 }}>\n          <DataTable columns={columns} data={findings} />\n        </CardContent>\n      </Card>\n    </DashboardLayout>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const dashboardExampleMeta = defineMeta({\n  name: 'DashboardExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference security dashboard page composed entirely from design-system components.',\n  baseLibrary: 'custom',\n  importPath: '@/pages/DashboardExample',\n  supportedStates: ['default'],\n  designTokens: ['colors', 'spacing', 'severity'],\n  accessibility: ['Demonstrates landmark structure via DashboardLayout.'],\n  usageExamples: ['<DashboardExample />'],\n  antiPatterns: ['This is an example; copy patterns rather than importing into production as-is.'],\n  llmSafe: false,\n  whenToUse: ['Reference for building dashboards'],\n  whenNotToUse: ['Directly in production without adapting data'],\n});\n\nexport default dashboardExampleMeta;\n","import { useMemo, useState } from 'react';\nimport Box from '@mui/material/Box';\nimport AddIcon from '@mui/icons-material/Add';\nimport { Button } from '@/atoms/Button';\nimport { Chip } from '@/atoms/Chip';\nimport { Search } from '@/molecules/Search';\nimport { DataTable, type MRT_ColumnDef } from '@/organisms/Table';\nimport { EmptyState } from '@/organisms/EmptyState';\nimport { TablePageLayout } from '@/templates/TablePageLayout';\nimport SearchOffIcon from '@mui/icons-material/SearchOff';\n\n/**\n * TableExample\n * Example list page: TablePageLayout + Search toolbar + filterable DataTable,\n * with an EmptyState when the query matches nothing.\n */\ninterface Asset {\n  name: string;\n  type: string;\n  severity: 'critical' | 'high' | 'medium' | 'low';\n  region: string;\n  owner: string;\n}\n\nconst allAssets: Asset[] = [\n  { name: 'prod-db-01', type: 'RDS', severity: 'critical', region: 'us-east-1', owner: 'platform' },\n  { name: 'api-gateway', type: 'ALB', severity: 'high', region: 'us-east-1', owner: 'api' },\n  { name: 's3-backups', type: 'S3', severity: 'medium', region: 'us-west-2', owner: 'data' },\n  { name: 'iam-role-ci', type: 'IAM', severity: 'low', region: 'global', owner: 'devops' },\n  { name: 'eks-cluster', type: 'EKS', severity: 'high', region: 'eu-west-1', owner: 'platform' },\n];\n\nexport function TableExample() {\n  const [query, setQuery] = useState('');\n  const data = useMemo(\n    () => allAssets.filter((a) => a.name.toLowerCase().includes(query.toLowerCase())),\n    [query],\n  );\n  const columns = useMemo<MRT_ColumnDef<Asset>[]>(\n    () => [\n      { accessorKey: 'name', header: 'Asset' },\n      { accessorKey: 'type', header: 'Type' },\n      {\n        accessorKey: 'severity',\n        header: 'Severity',\n        Cell: ({ cell }) => (\n          <Chip purpose=\"severity\" level={cell.getValue<Asset['severity']>()} size=\"small\" />\n        ),\n      },\n      { accessorKey: 'region', header: 'Region' },\n      { accessorKey: 'owner', header: 'Owner' },\n    ],\n    [],\n  );\n\n  return (\n    <Box sx={{ p: 3 }}>\n      <TablePageLayout\n        title=\"Inventory\"\n        description=\"All cloud assets discovered across connected accounts.\"\n        actions={<Button startIcon={<AddIcon />}>Add account</Button>}\n        toolbar={\n          <Box sx={{ width: 320 }}>\n            <Search placeholder=\"Search assets...\" onSearch={setQuery} />\n          </Box>\n        }\n      >\n        {data.length > 0 ? (\n          <DataTable columns={columns} data={data} enableRowSelection />\n        ) : (\n          <EmptyState\n            icon={<SearchOffIcon fontSize=\"inherit\" />}\n            title=\"No assets match your search\"\n            description={`Nothing found for \"${query}\". Try a different term.`}\n            action={<Button variant=\"secondary\" onClick={() => setQuery('')}>Clear search</Button>}\n          />\n        )}\n      </TablePageLayout>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const tableExampleMeta = defineMeta({\n  name: 'TableExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference inventory list page with search-driven filtering and an empty state.',\n  baseLibrary: 'custom',\n  importPath: '@/pages/TableExample',\n  supportedStates: ['default', 'empty'],\n  designTokens: ['colors', 'spacing', 'severity'],\n  accessibility: ['Demonstrates TablePageLayout heading + table semantics.'],\n  usageExamples: ['<TableExample />'],\n  antiPatterns: ['Example only; adapt data wiring for production.'],\n  llmSafe: false,\n  whenToUse: ['Reference for building list/table pages'],\n  whenNotToUse: ['Directly in production without adapting data'],\n});\n\nexport default tableExampleMeta;\n","import { useMemo } from 'react';\nimport Box from '@mui/material/Box';\nimport { Chip } from '@/atoms/Chip';\nimport { DataTable, type MRT_ColumnDef } from '@/organisms/Table';\nimport { TablePageLayout } from '@/templates/TablePageLayout';\n\n/**\n * InventoryExample\n * Example asset inventory page built on TablePageLayout + DataTable.\n */\ninterface Asset {\n  name: string;\n  type: string;\n  severity: 'critical' | 'high' | 'medium' | 'low';\n  region: string;\n}\n\nconst data: Asset[] = [\n  { name: 'prod-db-01', type: 'RDS', severity: 'critical', region: 'us-east-1' },\n  { name: 'eks-cluster', type: 'EKS', severity: 'high', region: 'eu-west-1' },\n  { name: 's3-backups', type: 'S3', severity: 'medium', region: 'us-west-2' },\n  { name: 'vpc-shared', type: 'VPC', severity: 'low', region: 'us-east-1' },\n];\n\nexport function InventoryExample() {\n  const columns = useMemo<MRT_ColumnDef<Asset>[]>(\n    () => [\n      { accessorKey: 'name', header: 'Asset' },\n      { accessorKey: 'type', header: 'Type' },\n      {\n        accessorKey: 'severity',\n        header: 'Severity',\n        Cell: ({ cell }) => (\n          <Chip purpose=\"severity\" level={cell.getValue<Asset['severity']>()} size=\"small\" />\n        ),\n      },\n      { accessorKey: 'region', header: 'Region' },\n    ],\n    [],\n  );\n  return (\n    <Box sx={{ p: 3 }}>\n      <TablePageLayout title=\"Inventory\" description=\"Cloud assets across all accounts.\">\n        <DataTable columns={columns} data={data} />\n      </TablePageLayout>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const inventoryExampleMeta = defineMeta({\n  name: 'InventoryExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference asset inventory page (TablePageLayout + DataTable).',\n  baseLibrary: 'custom',\n  importPath: '@/pages/InventoryExample',\n  supportedStates: ['default'],\n  designTokens: ['colors', 'severity'],\n  usageExamples: ['<InventoryExample />'],\n  llmSafe: false,\n  whenToUse: ['Reference for inventory screens'],\n  whenNotToUse: ['Production without data wiring'],\n});\n\nexport default inventoryExampleMeta;\n","import { useMemo } from 'react';\nimport Box from '@mui/material/Box';\nimport { Chip } from '@/atoms/Chip';\nimport { Button } from '@/atoms/Button';\nimport { DataTable, type MRT_ColumnDef } from '@/organisms/Table';\nimport { TablePageLayout } from '@/templates/TablePageLayout';\n\n/**\n * ThreatsExample\n * Example threats page listing active attack paths by severity.\n */\ninterface Threat {\n  path: string;\n  severity: 'critical' | 'high' | 'medium' | 'low';\n  entry: string;\n  target: string;\n}\n\nconst data: Threat[] = [\n  { path: 'Internet -> ALB -> EC2 -> RDS', severity: 'critical', entry: 'Public ALB', target: 'prod-db-01' },\n  { path: 'IAM user -> AssumeRole -> Admin', severity: 'high', entry: 'Leaked key', target: 'admin-role' },\n  { path: 'S3 public -> data exfil', severity: 'medium', entry: 's3-backups', target: 'PII bucket' },\n];\n\nexport function ThreatsExample() {\n  const columns = useMemo<MRT_ColumnDef<Threat>[]>(\n    () => [\n      {\n        accessorKey: 'severity',\n        header: 'Severity',\n        Cell: ({ cell }) => (\n          <Chip purpose=\"severity\" level={cell.getValue<Threat['severity']>()} size=\"small\" />\n        ),\n      },\n      { accessorKey: 'path', header: 'Attack path' },\n      { accessorKey: 'entry', header: 'Entry point' },\n      { accessorKey: 'target', header: 'Target' },\n    ],\n    [],\n  );\n  return (\n    <Box sx={{ p: 3 }}>\n      <TablePageLayout\n        title=\"Threats\"\n        description=\"Active attack paths ranked by exploitability.\"\n        actions={<Button variant=\"destructive\">Simulate</Button>}\n      >\n        <DataTable columns={columns} data={data} />\n      </TablePageLayout>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const threatsExampleMeta = defineMeta({\n  name: 'ThreatsExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference threats page listing active attack paths by severity.',\n  baseLibrary: 'custom',\n  importPath: '@/pages/ThreatsExample',\n  supportedStates: ['default'],\n  designTokens: ['colors', 'severity', 'attackPath'],\n  usageExamples: ['<ThreatsExample />'],\n  llmSafe: false,\n  whenToUse: ['Reference for threat/attack-path lists'],\n  whenNotToUse: ['Production without data wiring'],\n});\n\nexport default threatsExampleMeta;\n","import { useMemo, useState } from 'react';\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport RefreshIcon from '@mui/icons-material/Refresh';\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\nimport VisibilityIcon from '@mui/icons-material/Visibility';\nimport PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck';\nimport BlockIcon from '@mui/icons-material/Block';\nimport TravelExploreIcon from '@mui/icons-material/TravelExplore';\n\nimport { Button } from '@/atoms/Button';\nimport { Chip, type ChipStatusTone } from '@/atoms/Chip';\nimport { IconButton } from '@/atoms/IconButton';\nimport { Search } from '@/molecules/Search';\nimport { Menu, MenuItem, ListItemIcon, ListItemText } from '@/molecules/Menu';\nimport { DataTable, type MRT_ColumnDef } from '@/organisms/Table';\nimport { EmptyState } from '@/organisms/EmptyState';\nimport { FilterPopover, type FilterValue } from '@/organisms/FilterPopover';\nimport { TablePageLayout } from '@/templates/TablePageLayout';\n\n/**\n * ThreatsListExample\n * A full threats list page composed entirely of Octopus UI components:\n * TablePageLayout + Search/FilterPopover toolbar + DataTable\n * with severity/status chips, a per-row action Menu, and an EmptyState when the\n * active search/filters match nothing.\n */\ntype Severity = 'critical' | 'high' | 'medium' | 'low';\ntype Status = 'active' | 'investigating' | 'contained';\n\ninterface Threat {\n  id: string;\n  name: string;\n  path: string;\n  entry: string;\n  target: string;\n  severity: Severity;\n  status: Status;\n  lastSeen: string;\n}\n\nconst STATUS_LABEL: Record<Status, string> = {\n  active: 'Active',\n  investigating: 'Investigating',\n  contained: 'Contained',\n};\n\nconst STATUS_TONE: Record<Status, ChipStatusTone> = {\n  active: 'error',\n  investigating: 'warning',\n  contained: 'success',\n};\n\nconst ALL_THREATS: Threat[] = [\n  {\n    id: 'TP-1042',\n    name: 'Public ALB to production database',\n    path: 'Internet -> ALB -> EC2 -> RDS',\n    entry: 'Public ALB',\n    target: 'prod-db-01',\n    severity: 'critical',\n    status: 'active',\n    lastSeen: '2m ago',\n  },\n  {\n    id: 'TP-1038',\n    name: 'Leaked key privilege escalation',\n    path: 'IAM user -> AssumeRole -> Admin',\n    entry: 'Leaked access key',\n    target: 'admin-role',\n    severity: 'critical',\n    status: 'investigating',\n    lastSeen: '14m ago',\n  },\n  {\n    id: 'TP-1031',\n    name: 'S3 public bucket data exfiltration',\n    path: 'S3 public -> data exfil',\n    entry: 's3-backups',\n    target: 'PII bucket',\n    severity: 'high',\n    status: 'active',\n    lastSeen: '1h ago',\n  },\n  {\n    id: 'TP-1024',\n    name: 'Exposed Kubernetes dashboard',\n    path: 'Internet -> Ingress -> EKS dashboard',\n    entry: 'Public ingress',\n    target: 'eks-cluster',\n    severity: 'high',\n    status: 'investigating',\n    lastSeen: '3h ago',\n  },\n  {\n    id: 'TP-1019',\n    name: 'Over-permissioned CI role',\n    path: 'CI runner -> IAM -> S3 write',\n    entry: 'CI pipeline',\n    target: 'iam-role-ci',\n    severity: 'medium',\n    status: 'contained',\n    lastSeen: '1d ago',\n  },\n  {\n    id: 'TP-1007',\n    name: 'Stale security group rule',\n    path: 'SG 0.0.0.0/0 -> EC2 :22',\n    entry: 'Open SSH',\n    target: 'bastion-legacy',\n    severity: 'low',\n    status: 'contained',\n    lastSeen: '3d ago',\n  },\n];\n\nconst SEVERITY_FILTER = {\n  key: 'severity',\n  label: 'Severity',\n  type: 'multiselect' as const,\n  options: [\n    { label: 'Critical', value: 'critical' },\n    { label: 'High', value: 'high' },\n    { label: 'Medium', value: 'medium' },\n    { label: 'Low', value: 'low' },\n  ],\n};\n\nconst STATUS_FILTER = {\n  key: 'status',\n  label: 'Status',\n  type: 'multiselect' as const,\n  options: [\n    { label: 'Active', value: 'active' },\n    { label: 'Investigating', value: 'investigating' },\n    { label: 'Contained', value: 'contained' },\n  ],\n};\n\nexport function ThreatsListExample() {\n  const [query, setQuery] = useState('');\n  const [filters, setFilters] = useState<FilterValue>({});\n  const [menuAnchor, setMenuAnchor] = useState<HTMLElement | null>(null);\n  const [activeThreat, setActiveThreat] = useState<Threat | null>(null);\n\n  const data = useMemo(() => {\n    const q = query.trim().toLowerCase();\n    const severityValues = filters.severity?.values ?? [];\n    const statusValues = filters.status?.values ?? [];\n    return ALL_THREATS.filter((t) => {\n      const matchesQuery =\n        !q ||\n        [t.id, t.name, t.path, t.entry, t.target].some((f) => f.toLowerCase().includes(q));\n      const matchesSeverity = severityValues.length === 0 || severityValues.includes(t.severity);\n      const matchesStatus = statusValues.length === 0 || statusValues.includes(t.status);\n      return matchesQuery && matchesSeverity && matchesStatus;\n    });\n  }, [query, filters]);\n\n  const openRowMenu = (event: React.MouseEvent<HTMLElement>, threat: Threat) => {\n    setMenuAnchor(event.currentTarget);\n    setActiveThreat(threat);\n  };\n  const closeRowMenu = () => {\n    setMenuAnchor(null);\n    setActiveThreat(null);\n  };\n\n  const columns = useMemo<MRT_ColumnDef<Threat>[]>(\n    () => [\n      {\n        accessorKey: 'severity',\n        header: 'Severity',\n        size: 120,\n        Cell: ({ cell }) => {\n          const value = cell.getValue<Severity>();\n          return <Chip purpose=\"severity\" level={value} size=\"small\" />;\n        },\n      },\n      { accessorKey: 'id', header: 'ID', size: 100 },\n      { accessorKey: 'name', header: 'Threat' },\n      { accessorKey: 'path', header: 'Attack path' },\n      { accessorKey: 'target', header: 'Target', size: 140 },\n      {\n        accessorKey: 'status',\n        header: 'Status',\n        size: 140,\n        Cell: ({ cell }) => {\n          const value = cell.getValue<Status>();\n          return (\n            <Chip purpose=\"status\" tone={STATUS_TONE[value]} label={STATUS_LABEL[value]} size=\"small\" />\n          );\n        },\n      },\n      { accessorKey: 'lastSeen', header: 'Last seen', size: 110 },\n      {\n        id: 'actions',\n        header: 'Actions',\n        size: 90,\n        enableSorting: false,\n        enableColumnFilter: false,\n        Cell: ({ row }) => (\n          <IconButton\n            icon={<MoreVertIcon fontSize=\"small\" />}\n            label={`Actions for ${row.original.name}`}\n            size=\"small\"\n            onClick={(event) => openRowMenu(event, row.original)}\n          />\n        ),\n      },\n    ],\n    [],\n  );\n\n  return (\n    <Box sx={{ p: 3 }}>\n      <TablePageLayout\n        title=\"Threats\"\n        description=\"Active attack paths ranked by exploitability across connected cloud accounts.\"\n        actions={\n          <>\n            <IconButton\n              icon={<RefreshIcon fontSize=\"small\" />}\n              label=\"Refresh threats\"\n              tooltip=\"Refresh\"\n            />\n            <IconButton\n              icon={<FileDownloadIcon fontSize=\"small\" />}\n              label=\"Export threats\"\n              tooltip=\"Export\"\n            />\n            <Button variant=\"destructive\" startIcon={<TravelExploreIcon />}>\n              Simulate attack\n            </Button>\n          </>\n        }\n        toolbar={\n          <>\n            <Box sx={{ width: 320 }}>\n              <Search\n                placeholder=\"Search threats, paths, targets...\"\n                onChange={setQuery}\n              />\n            </Box>\n            <FilterPopover\n              filters={[SEVERITY_FILTER, STATUS_FILTER]}\n              onApply={setFilters}\n              onReset={() => setFilters({})}\n              showSelectAll\n            />\n          </>\n        }\n      >\n        <Stack spacing={2}>\n          {data.length > 0 ? (\n            <DataTable columns={columns} data={data} enableRowSelection />\n          ) : (\n            <EmptyState\n              icon={<TravelExploreIcon fontSize=\"inherit\" />}\n              title=\"No threats match your filters\"\n              description=\"Try clearing the search or resetting severity and status filters.\"\n              action={\n                <Button\n                  variant=\"secondary\"\n                  onClick={() => {\n                    setQuery('');\n                    setFilters({});\n                  }}\n                >\n                  Clear filters\n                </Button>\n              }\n            />\n          )}\n        </Stack>\n      </TablePageLayout>\n\n      <Menu anchorEl={menuAnchor} open={Boolean(menuAnchor)} onClose={closeRowMenu}>\n        {activeThreat ? (\n          <MenuItem disabled divider>\n            <ListItemText\n              primary={activeThreat.id}\n              secondary={activeThreat.name}\n            />\n          </MenuItem>\n        ) : null}\n        <MenuItem onClick={closeRowMenu}>\n          <ListItemIcon>\n            <VisibilityIcon fontSize=\"small\" />\n          </ListItemIcon>\n          <ListItemText>View details</ListItemText>\n        </MenuItem>\n        <MenuItem onClick={closeRowMenu}>\n          <ListItemIcon>\n            <PlaylistAddCheckIcon fontSize=\"small\" />\n          </ListItemIcon>\n          <ListItemText>Assign to me</ListItemText>\n        </MenuItem>\n        <MenuItem onClick={closeRowMenu}>\n          <ListItemIcon>\n            <BlockIcon fontSize=\"small\" />\n          </ListItemIcon>\n          <ListItemText>Mark as contained</ListItemText>\n        </MenuItem>\n      </Menu>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const threatsListExampleMeta = defineMeta({\n  name: 'ThreatsListExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description:\n    'Reference threats list page: TablePageLayout + search/filter toolbar + DataTable with severity/status chips, row-action Menu, and an empty state.',\n  baseLibrary: 'custom',\n  importPath: '@/pages/ThreatsListExample',\n  supportedStates: ['default', 'filtered', 'empty'],\n  designTokens: ['colors', 'spacing', 'severity', 'attackPath'],\n  accessibility: [\n    'TablePageLayout heading + table semantics.',\n    'Row actions use IconButton with an accessible label.',\n  ],\n  usageExamples: ['<ThreatsListExample />'],\n  antiPatterns: ['Example only; adapt data wiring for production.'],\n  llmSafe: false,\n  whenToUse: ['Reference for threat/attack-path list screens with filtering'],\n  whenNotToUse: ['Production without data wiring'],\n});\n\nexport default threatsListExampleMeta;\n","import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport { Alert, AlertTitle } from '@/molecules/Alert';\nimport { TablePageLayout } from '@/templates/TablePageLayout';\n\n/**\n * AlertsExample\n * Example alerts feed page using the Alert molecule for inline notifications.\n */\nexport function AlertsExample() {\n  return (\n    <Box sx={{ p: 3 }}>\n      <TablePageLayout title=\"Alerts\" description=\"Recent system and security alerts.\">\n        <Stack spacing={2} sx={{ maxWidth: 720 }}>\n          <Alert severity=\"error\">\n            <AlertTitle>Critical attack path detected</AlertTitle>\n            Internet-facing ALB has a direct path to prod-db-01.\n          </Alert>\n          <Alert severity=\"warning\">3 assets are missing the AiStrike agent.</Alert>\n          <Alert severity=\"info\">Weekly posture report is ready.</Alert>\n          <Alert severity=\"success\">12 findings were auto-remediated overnight.</Alert>\n        </Stack>\n      </TablePageLayout>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const alertsExampleMeta = defineMeta({\n  name: 'AlertsExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference alerts feed page using the Alert molecule.',\n  baseLibrary: 'custom',\n  importPath: '@/pages/AlertsExample',\n  supportedStates: ['default'],\n  designTokens: ['colors'],\n  usageExamples: ['<AlertsExample />'],\n  llmSafe: false,\n  whenToUse: ['Reference for alert/notification feeds'],\n  whenNotToUse: ['Production without data wiring'],\n});\n\nexport default alertsExampleMeta;\n","import { useState } from 'react';\nimport Box from '@mui/material/Box';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport { Switch } from '@/atoms/Switch';\nimport { TextField } from '@/atoms/TextField';\nimport { FormField } from '@/molecules/FormField';\nimport { FormSection } from '@/organisms/FormSection';\nimport { Button } from '@/atoms/Button';\nimport { SettingsLayout, type SettingsSection } from '@/templates/SettingsLayout';\n\n/**\n * SettingsExample\n * Example settings page using SettingsLayout + FormSection + FormField.\n */\nconst sections: SettingsSection[] = [\n  { id: 'general', label: 'General' },\n  { id: 'notifications', label: 'Notifications' },\n  { id: 'integrations', label: 'Integrations' },\n];\n\nexport function SettingsExample() {\n  const [active, setActive] = useState('general');\n  return (\n    <Box sx={{ p: 3 }}>\n      <SettingsLayout sections={sections} activeId={active} onSelect={setActive}>\n        <FormSection title=\"Organization\" description=\"Basic account details.\">\n          <FormField label=\"Organization name\" htmlFor=\"org\">\n            <TextField id=\"org\" defaultValue=\"AiStrike\" />\n          </FormField>\n          <FormField label=\"Primary contact\" htmlFor=\"contact\">\n            <TextField id=\"contact\" defaultValue=\"security@example.com\" />\n          </FormField>\n        </FormSection>\n        <FormSection title=\"Preferences\" divider>\n          <FormControlLabel control={<Switch defaultChecked />} label=\"Email me weekly posture reports\" />\n          <FormControlLabel control={<Switch />} label=\"Auto-remediate low severity findings\" />\n        </FormSection>\n        <Box sx={{ display: 'flex', justifyContent: 'flex-end', gap: 1 }}>\n          <Button variant=\"ghost\">Cancel</Button>\n          <Button variant=\"primary\">Save changes</Button>\n        </Box>\n      </SettingsLayout>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const settingsExampleMeta = defineMeta({\n  name: 'SettingsExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference settings page (SettingsLayout + FormSection + FormField).',\n  baseLibrary: 'custom',\n  importPath: '@/pages/SettingsExample',\n  supportedStates: ['default'],\n  designTokens: ['spacing', 'typography'],\n  usageExamples: ['<SettingsExample />'],\n  llmSafe: false,\n  whenToUse: ['Reference for settings screens'],\n  whenNotToUse: ['Production without data wiring'],\n});\n\nexport default settingsExampleMeta;\n","import Box from '@mui/material/Box';\nimport { TextField } from '@/atoms/TextField';\nimport { Select, MenuItem } from '@/atoms/Select';\nimport { FormField } from '@/molecules/FormField';\nimport { Button } from '@/atoms/Button';\nimport { FormPageLayout } from '@/templates/FormPageLayout';\n\n/**\n * FormExample\n * Example create-entity form built on FormPageLayout + FormField.\n */\nexport function FormExample() {\n  return (\n    <Box sx={{ p: 3 }}>\n      <FormPageLayout\n        title=\"Connect cloud account\"\n        description=\"Provide read-only credentials so AiStrike can begin scanning.\"\n        actions={\n          <>\n            <Button variant=\"ghost\">Cancel</Button>\n            <Button variant=\"primary\">Connect</Button>\n          </>\n        }\n      >\n        <FormField label=\"Provider\" htmlFor=\"provider\">\n          <Select id=\"provider\" defaultValue=\"aws\" fullWidth size=\"small\">\n            <MenuItem value=\"aws\">AWS</MenuItem>\n            <MenuItem value=\"gcp\">Google Cloud</MenuItem>\n            <MenuItem value=\"azure\">Azure</MenuItem>\n          </Select>\n        </FormField>\n        <FormField label=\"Account ID\" htmlFor=\"acct\" helperText=\"12-digit AWS account ID.\">\n          <TextField id=\"acct\" placeholder=\"123456789012\" />\n        </FormField>\n        <FormField label=\"Role ARN\" htmlFor=\"arn\">\n          <TextField id=\"arn\" placeholder=\"arn:aws:iam::123456789012:role/AiStrike\" />\n        </FormField>\n      </FormPageLayout>\n    </Box>\n  );\n}\n","import { defineMeta } from '@/registry/types';\n\nexport const formExampleMeta = defineMeta({\n  name: 'FormExample',\n  level: 'page',\n  category: 'example',\n  classification: 'custom',\n  description: 'Reference create-entity form page (FormPageLayout + FormField).',\n  baseLibrary: 'custom',\n  importPath: '@/pages/FormExample',\n  supportedStates: ['default'],\n  designTokens: ['spacing', 'typography'],\n  usageExamples: ['<FormExample />'],\n  llmSafe: false,\n  whenToUse: ['Reference for create/edit form pages'],\n  whenNotToUse: ['Production without validation/data wiring'],\n});\n\nexport default formExampleMeta;\n"],"mappings":"ooKAkBA,IAAa,GAAkB,CAC7B,SAAU,CAAE,KAAM,EAAA,EAAe,SAAU,aAAc,SAAU,EACnE,KAAM,CAAE,KAAM,EAAA,EAAe,KAAM,aAAc,SAAU,EAC3D,OAAQ,CAAE,KAAM,EAAA,EAAe,OAAQ,aAAc,SAAU,EAC/D,IAAK,CAAE,KAAM,EAAA,EAAe,IAAK,aAAc,SAAU,EACzD,KAAM,CAAE,KAAM,EAAA,EAAe,KAAM,aAAc,SAAU,EAC3D,UAAW,CAAE,KAAM,EAAA,EAAe,UAAW,aAAc,SAAU,CACvE,EAGa,GAA8B,CACzC,KAAM,OACN,QAAS,CACP,KAAM,EAAA,EAAM,KACZ,aAAc,SAChB,EAgBA,UAAW,CACT,KAAM,EAAA,EAAM,KACZ,aAAc,SAChB,EACA,MAAO,CAAE,KAAM,EAAA,EAAa,QAAS,aAAc,SAAU,EAC7D,QAAS,CAAE,KAAM,EAAA,EAAa,QAAS,aAAc,SAAU,EAC/D,KAAM,CAAE,KAAM,EAAA,EAAa,KAAM,aAAc,SAAU,EACzD,QAAS,CAAE,KAAM,EAAA,EAAa,QAAS,aAAc,SAAU,EAC/D,WAAY,CACV,QAAS,EAAA,EAAiB,QAC1B,MAAO,EAAA,EAAiB,MAC1B,EACA,KAAM,CACJ,QAAS,EAAA,EAAW,QACpB,UAAW,EAAA,EAAW,UACtB,SAAU,EAAA,EAAW,QACvB,EACA,QAAS,EAAA,EAAiB,OAC1B,KAAM,CACJ,GAAI,EAAA,EAAQ,IACZ,IAAK,EAAA,EAAQ,KACb,IAAK,EAAA,EAAQ,KACb,IAAK,EAAA,EAAQ,KACb,IAAK,EAAA,EAAQ,KACb,IAAK,EAAA,EAAQ,KACb,IAAK,EAAA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,CACF,QAAS,OACT,IAAK,GACL,eAAgB,WAChB,GAAI,EACA,CACE,QAAS,EACT,WAAY,oBACZ,gDAAiD,CAAE,QAAS,CAAE,CAChE,EACA,CAAC,CACP,EAEC,UACE,CAAA,CAET,CCnVA,IAAa,GAAY,EAAA,EAAW,CAClC,KAAM,QACN,MAAO,WACP,SAAU,eACV,eAAgB,cAChB,YACE,mOACF,YAAa,uBACb,cAAe,mBACf,QAAS,wCACT,eAAgB,YAChB,WAAY,oBACZ,cAAe,CAAC,UAAW,MAAM,EACjC,cAAe,CACb,aACA,gBACA,cACA,UACA,QACA,SACA,YACA,UACA,UACA,aACA,WACA,gBACA,UACA,UACF,EACA,gBAAiB,CACf,UACA,QACA,WACA,SACA,UACA,QACA,SACA,YACA,QACF,EACA,aAAc,CAAC,SAAU,SAAU,UAAW,YAAY,EAC1D,cAAe,CACb,yFACA,iGACA,sGACF,EACA,cAAe,CACb,8CACA,4GACA,+KACA,iGACA,yIACF,EACA,MAAO,CACL,+NACA,kNACF,EACA,aAAc,CACZ,wLACA,6HACA,wGACA,8LACA,sJACA,8JACA,qFACF,EACA,QAAS,GACT,UAAW,CAAC,sDAAsD,EAClE,aAAc,CAAC,8CAA8C,CAC/D,CAAC,ECrEY,GAAiB,EAAA,EAAW,CACvC,KAAM,aACN,MAAO,WACP,SAAU,eACV,eAAgB,SAChB,YACE,8KACF,YAAa,SACb,WAAY,oBACZ,cAAe,CAAC,EAChB,cAAe,CAAC,QAAS,cAAe,OAAQ,OAAQ,QAAS,QAAS,OAAQ,QAAS,QAAS,QAAS,KAAK,EAClH,gBAAiB,CAAC,UAAW,YAAa,cAAe,QAAS,gBAAgB,EAClF,aAAc,CAAC,SAAU,SAAU,UAAW,YAAY,EAC1D,cAAe,CACb,2EACA,sEACA,6EACF,EACA,cAAe,CACb,mQACA,yMACA,uMACF,EACA,MAAO,CACL,iNACA,8IACF,EACA,aAAc,CACZ,qFACA,gHACA,+GACA,gHACF,EACA,QAAS,GACT,UAAW,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