{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gate-wrapper",
  "title": "Gate Wrapper",
  "description": "The shared outer-positioning primitive (full-page centered vs. inline) every visible block composes on. Use it directly to build a fully custom gate layout.",
  "registryDependencies": [
    "https://knock.codes/r/react/cx-util.json"
  ],
  "files": [
    {
      "path": "packages/react/GateWrapper.tsx",
      "content": "import type { ReactNode } from \"react\";\r\nimport { cx } from \"./cx.ts\";\r\n\r\n/** Outer positioning only — \"page\" centers full-height, \"inline\" flows in place. Visual treatment (borders/padding/shadow) is each block's own concern, not this wrapper's. */\r\nexport type GateWrapperVariant = \"page\" | \"inline\";\r\n\r\nexport interface GateWrapperProps {\r\n  children: ReactNode;\r\n  /** @default \"page\" */\r\n  variant?: GateWrapperVariant;\r\n  className?: string;\r\n}\r\n\r\nconst VARIANT_CLASSES: Record<GateWrapperVariant, string> = {\r\n  page: \"flex min-h-[100dvh] w-full items-center justify-center p-6\",\r\n  inline: \"flex w-full items-start\",\r\n};\r\n\r\n/**\r\n * The shared outer-positioning primitive every visible block composes on —\r\n * a plain container, not a verification strategy. Kept separate from\r\n * `<KnockCodes>` so blocks like `<ProtectedRoute>`/`<EmbeddedGate>` can reuse\r\n * the same page-vs-inline placement without re-deriving it, while each block\r\n * still owns its own inner card/border/spacing styling.\r\n */\r\nexport function GateWrapper({ children, variant = \"page\", className }: GateWrapperProps) {\r\n  return <div className={cx(VARIANT_CLASSES[variant], className)}>{children}</div>;\r\n}\r\n",
      "type": "registry:file",
      "target": "components/knock-codes/react/GateWrapper.tsx"
    }
  ],
  "type": "registry:block"
}