{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shell-status-bar",
  "type": "registry:component",
  "title": "Status bar",
  "description": "The bottom strip of the application chrome — left, centre and right groups, tones, hairline separators, truncation and a mono type scale",
  "author": "sudo-kw <https://github.com/sudo-kw>",
  "dependencies": [
    "@gpuix/native@0.11.0",
    "@gpuix/react@0.11.0",
    "effect@4.1.2",
    "react@^19.2.4"
  ],
  "registryDependencies": [
    "https://gpuixui.sudokw.com/gpuix-tokens.json",
    "https://gpuixui.sudokw.com/gpuix-tw.json"
  ],
  "files": [
    {
      "path": "packages/shell/src/recipe.ts",
      "target": "@ui/gpuixui/shell/recipe.ts",
      "type": "registry:lib",
      "content": "import type { StyleDesc } from \"@gpuix/react\";\nimport { classesToStyle } from \"../tw/index.js\";\nimport * as MutableHashMap from \"effect/MutableHashMap\";\nimport * as Option from \"effect/Option\";\nimport type { Theme } from \"./theme.js\";\n\nconst CACHE_LIMIT = 256;\n\nconst compiled = new WeakMap<\n  Theme,\n  MutableHashMap.MutableHashMap<string, StyleDesc>\n>();\n\nexport const recipeStyle = (recipe: string, theme: Theme): StyleDesc => {\n  const byRecipe = compiled.get(theme);\n  if (byRecipe !== undefined) {\n    const hit = MutableHashMap.get(byRecipe, recipe);\n    if (Option.isSome(hit)) return hit.value;\n  }\n  const style = Object.freeze(classesToStyle(recipe, theme).style);\n  if (byRecipe === undefined) {\n    compiled.set(theme, MutableHashMap.make([recipe, style]));\n  } else if (MutableHashMap.size(byRecipe) < CACHE_LIMIT) {\n    MutableHashMap.set(byRecipe, recipe, style);\n  }\n  return style;\n};\n"
    },
    {
      "path": "packages/shell/src/status-bar/logic.ts",
      "target": "@ui/gpuixui/shell/status-bar/logic.ts",
      "type": "registry:lib",
      "content": "import * as Option from \"effect/Option\";\nimport { statusTone, type StatusTone, type Theme } from \"../../tokens/index.js\";\n\nexport type StatusBarTone = \"default\" | StatusTone;\n\nexport type StatusCenterAlignment = \"flex-start\" | \"center\" | \"flex-end\";\n\nexport const centerAlignment = (\n  left: number,\n  right: number,\n): StatusCenterAlignment =>\n  left > 0 && right > 0 ? \"center\" : left > 0 ? \"flex-end\" : \"flex-start\";\n\nexport const statusToneOf = (tone: StatusBarTone): Option.Option<StatusTone> =>\n  tone === \"default\" ? Option.none() : Option.some(tone);\n\nexport const toneForeground = (theme: Theme, tone: StatusBarTone): string =>\n  Option.match(statusToneOf(tone), {\n    onNone: () => theme.colors.foreground,\n    onSome: (named) => statusTone(theme, named).foreground,\n  });\n"
    },
    {
      "path": "packages/shell/src/status-bar/status-bar.tsx",
      "target": "@ui/gpuixui/shell/status-bar/status-bar.tsx",
      "type": "registry:component",
      "content": "/** @jsxImportSource @gpuix/react */\nimport type { Props } from \"@gpuix/react\";\nimport { mergeStyles } from \"@gpuix/react/floating\";\nimport { cn } from \"../../tw/index.js\";\nimport * as Arr from \"effect/Array\";\nimport { Fragment } from \"react\";\nimport { recipeStyle } from \"../recipe.js\";\nimport { useTheme } from \"../theme.js\";\nimport {\n  centerAlignment,\n  toneForeground,\n  type StatusBarTone,\n} from \"./logic.js\";\n\nconst STATUS_BAR =\n  \"flex flex-row items-center gap-2 border-t border-border bg-muted px-3 py-1\";\nconst STATUS_ITEM = \"text-xs font-mono\";\nconst STATUS_SEPARATOR = \"h-3 w-px bg-border\";\n\nconst truncate = {\n  minWidth: 0,\n  flexShrink: 1,\n  overflow: \"hidden\",\n  whiteSpace: \"nowrap\",\n  textOverflow: \"ellipsis\",\n} as const;\n\nexport interface StatusBarItem {\n  readonly id: string;\n  readonly label: string;\n\n  readonly tone?: StatusBarTone;\n}\n\nexport interface StatusBarProps extends Omit<Props, \"children\"> {\n  readonly label?: string;\n\n  readonly left?: ReadonlyArray<StatusBarItem>;\n\n  readonly center?: ReadonlyArray<StatusBarItem>;\n\n  readonly right?: ReadonlyArray<StatusBarItem>;\n  readonly className?: string;\n}\n\nexport const StatusBar = ({\n  label,\n  left,\n  center,\n  right,\n  className,\n  style,\n  ...rest\n}: StatusBarProps) => {\n  const theme = useTheme();\n  const leading = left ?? [];\n  const middle = center ?? [];\n  const trailing = right ?? [];\n\n  const renderGroup = (items: ReadonlyArray<StatusBarItem>) =>\n    Arr.map(items, (item, index) => (\n      <Fragment key={item.id}>\n        {index === 0 ? null : (\n          <div\n            style={mergeStyles(recipeStyle(STATUS_SEPARATOR, theme), {\n              flexShrink: 0,\n            })}\n          />\n        )}\n        <text\n          style={mergeStyles(recipeStyle(STATUS_ITEM, theme), {\n            color: toneForeground(theme, item.tone ?? \"default\"),\n            ...truncate,\n          })}\n        >\n          {item.label}\n        </text>\n      </Fragment>\n    ));\n\n  const group = (items: ReadonlyArray<StatusBarItem>) => (\n    <div\n      style={{\n        display: \"flex\",\n        flexDirection: \"row\",\n        alignItems: \"center\",\n        gap: theme.spacing.sm,\n        minWidth: 0,\n        flexShrink: 1,\n      }}\n    >\n      {renderGroup(items)}\n    </div>\n  );\n\n  return (\n    <div\n      role=\"status\"\n      {...(label === undefined ? {} : { \"aria-label\": label })}\n      {...rest}\n      style={mergeStyles(recipeStyle(cn(STATUS_BAR, className), theme), style)}\n    >\n      {group(leading)}\n      <div\n        style={{\n          flexGrow: 1,\n          flexBasis: 0,\n          display: \"flex\",\n          flexDirection: \"row\",\n          alignItems: \"center\",\n          justifyContent: centerAlignment(\n            Arr.length(leading),\n            Arr.length(trailing),\n          ),\n          minWidth: 0,\n        }}\n      >\n        {renderGroup(middle)}\n      </div>\n      {group(trailing)}\n    </div>\n  );\n};\n"
    },
    {
      "path": "packages/shell/src/theme.ts",
      "target": "@ui/gpuixui/shell/theme.ts",
      "type": "registry:lib",
      "content": "import type { Theme } from \"../tokens/index.js\";\nimport { useTheme as useTokenTheme } from \"../tokens/react.js\";\n\nexport {\n  currentPlatform,\n  disabledOpacity,\n  materialFill,\n  statusTone,\n  textStyle,\n} from \"../tokens/index.js\";\nexport type {\n  PlatformName,\n  StatusTone,\n  TextRole,\n  Theme,\n} from \"../tokens/index.js\";\n\nexport const useTheme = (): Theme => useTokenTheme();\n"
    }
  ],
  "docs": "[Status bar](https://gpuixui.sudokw.com/shell/status-bar) — These are GPUix native components: the files render through GPUix's reconciler against `@gpuix/react`, not the DOM, and need the per-platform `@gpuix/native` binding. The CLI installs the `@gpuixui/*` runtime the components import as registry items, so the copied tree resolves on its own; wrap it in `ThemeProvider` before it renders.",
  "meta": {
    "url": "/shell/status-bar",
    "kind": "component",
    "runtime": "gpuix",
    "registry": "gpuixui"
  }
}