{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "core-stack",
  "type": "registry:lib",
  "title": "core/stack",
  "description": "Framework-free behaviour shared by the ui-* components (stack); no DOM, no lit. Copied from @purpurabog/ui 2.3.0; the package is the maintained source, this copy is yours to change. Icons from the Carbon Design System (Apache-2.0, © IBM Corp.; see THIRD-PARTY-NOTICES.md in the package).",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/core/stack.ts",
      "type": "registry:lib",
      "target": "components/ui/core/stack.ts",
      "content": "/**\n * Carbon `Stack` spacing: a step of Carbon's spacing scale or a CSS length, as the gap to draw.\n * Shared by `<ui-stack>` and the React Stack.\n */\n\n/** Carbon spacing scale: step 1–13 → 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 160 px. */\nexport const STACK_SCALE = [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 160];\n\n/** The gap for `gap`: a step 1–13 in px, any other value as given ('' when none). */\nexport function stackGap(gap: string | number | undefined): string {\n    if (gap === undefined || gap === '') return '';\n    const step = Number(gap);\n    if (Number.isInteger(step) && step > 0 && step < STACK_SCALE.length) return `${STACK_SCALE[step]}px`;\n    return String(gap);\n}\n"
    }
  ]
}
