{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tool-strip",
  "type": "registry:ui",
  "title": "Tool strip",
  "description": "Verbs over a click selection: Surface(graphite-strip) with Button(strip) caps (Tasks, Summarise, Gather, Region, Export) and Send away as Button(strip-danger) after a Rule. Rises 4 on the part spring.",
  "dependencies": [
    "@base-ui/react@^1.8.0"
  ],
  "registryDependencies": [
    "https://metalui.dev/r/tokens.json"
  ],
  "files": [
    {
      "path": "packages/metalui/src/blocks/tool-strip/tool-strip.tsx",
      "type": "registry:ui",
      "target": "components/metalui/blocks/tool-strip/tool-strip.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { Toolbar } from '@base-ui/react/toolbar';\nimport { Surface } from '../../components/surface/surface';\nimport { Button } from '../../components/button/button';\nimport { Rule } from '../../components/rule/rule';\n\n/* ─────────────────────────────────────────────────────────\n * SELECTION TOOL STRIP (the reference design's #selTools): a composition on Base UI Toolbar\n *   Surface(graphite-strip, strip) › Button(strip) × n, Rule(graphite) + Button(strip-danger) for the one destructive verb\n *\n *   a click selection  rises 4 from the selection on the part spring (instant under Reduce Motion)\n *   hover / press      the strip cap's own: a soft light well; down 1 onto a dark well\n * Never for a selection made by finishing (quiet), never while dragging, resizing or in the past.\n * ───────────────────────────────────────────────────────── */\n\n/* Layout from the toolstrip group; it rises on the part spring (animate-toolstrip-in). */\nconst STRIP = 'mu-toolstrip inline-flex items-center gap-toolstrip-gap p-toolstrip-pad animate-toolstrip-in [&>.mu-rule]:h-toolstrip-sep-height';\n\nexport interface ToolStripItem {\n  label: string;\n  onSelect: () => void;\n  /** The one destructive verb (Send away), set apart by an engraved separator. */\n  destructive?: boolean;\n  disabled?: boolean;\n  /** The key, in the tooltip and aria-keyshortcuts. */\n  shortcut?: string;\n}\n\nexport interface ToolStripProps {\n  items: ToolStripItem[];\n  /** What the verbs act on, for assistive tech: \"3 blocks\". */\n  label: string;\n  className?: string;\n}\n\n/** Verbs over a selection. Tools compose, and never own the data before or after. */\nexport function ToolStrip({ items, label, className }: ToolStripProps) {\n  return (\n    <Toolbar.Root\n      aria-label={`Tools for ${label}`}\n      render={<Surface material=\"graphite-strip\" radius=\"strip\" className={className ? `${STRIP} ${className}` : STRIP} />}\n    >\n      {items.flatMap((it) => [\n        it.destructive ? <Toolbar.Separator key={`${it.label}-rule`} render={<Rule tone=\"graphite\" />} /> : null,\n        <Toolbar.Button\n          key={it.label}\n          render={<Button cap={it.destructive ? 'strip-danger' : 'strip'} className=\"mu-toolstrip-button\" />}\n          disabled={it.disabled}\n          aria-keyshortcuts={it.shortcut}\n          title={it.shortcut ? `${it.label} · ${it.shortcut}` : undefined}\n          onClick={it.onSelect}\n        >\n          {it.label}\n        </Toolbar.Button>,\n      ])}\n    </Toolbar.Root>\n  );\n}\n"
    }
  ],
  "docs": "Agent guide: https://metalui.dev/r/tool-strip.md. SwiftUI: MetalToolStrip in the MetalUI Swift package."
}
