{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "integration-card",
  "title": "Integration card",
  "description": "Integration card is a production-ready cards component from BJORK UI, packaged for shadcn registries.",
  "dependencies": [
    "clsx",
    "framer-motion",
    "lucide-react",
    "next-themes",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "components/bjork-ui/cards/integration-card.tsx",
      "content": "\"use client\";\n\nimport { useEffect, useId, useRef, useState, type ReactNode } from \"react\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { AlertTriangle, Check, ChevronDown, Lock, RefreshCw } from \"lucide-react\";\nimport { LiveRegion } from \"@/components/bjork-ui/_core/a11y\";\nimport { ease } from \"@/components/bjork-ui/_core/motion\";\nimport {\n  CardButton,\n  CardFrame,\n  Pill,\n  focusRing,\n  useCardTheme,\n  useClock,\n  useReducedMotionSafe,\n  type CardTheme,\n  type PillTone,\n} from \"@/components/bjork-ui/cards/card-kit\";\nimport { cn } from \"@/lib/utils\";\n\nexport type IntegrationStatus = \"disconnected\" | \"connecting\" | \"connected\" | \"error\" | \"reauth\";\n\nexport interface IntegrationScope {\n  id: string;\n  label: string;\n  description?: string;\n  /** Required scopes are always granted and cannot be unticked. */\n  required?: boolean;\n}\n\nexport interface IntegrationApp {\n  name: string;\n  publisher: string;\n  description: string;\n  /** Tile colour for the generated monogram. */\n  color: string;\n  /** Replaces the monogram, e.g. an <img> or SVG logo. */\n  logo?: ReactNode;\n}\n\nexport interface ConnectedAccount {\n  /** Who the connection authenticates as, e.g. an email or workspace. */\n  name: string;\n  /** Epoch ms. */\n  connectedAt: number;\n  /** Epoch ms. */\n  lastSyncedAt?: number;\n}\n\nexport interface IntegrationCardProps {\n  app?: IntegrationApp;\n  /** Your product, drawn on the left of the handshake. */\n  host?: { name: string; color: string; logo?: ReactNode };\n  scopes?: IntegrationScope[];\n  /** Controlled status. Omit to let the card run the flow itself. */\n  status?: IntegrationStatus;\n  defaultStatus?: IntegrationStatus;\n  account?: ConnectedAccount;\n  defaultAccount?: ConnectedAccount;\n  /** Runs the OAuth hand-off. Resolve with the account, reject to show the error state. Without it the card simulates a 1.6s handshake. */\n  onConnect?: (scopeIds: string[]) => Promise<ConnectedAccount>;\n  onDisconnect?: () => void | Promise<void>;\n  /** Resolves with the new sync time. Without it the card simulates a sync. */\n  onSync?: () => Promise<number>;\n  onAutoSyncChange?: (on: boolean) => void;\n  errorMessage?: string;\n  /** Epoch ms. Freezes the clock for previews and tests. */\n  now?: number;\n  theme?: CardTheme;\n  className?: string;\n}\n\nexport const INTEGRATION_SAMPLE = {\n  app: {\n    name: \"Ledgerline\",\n    publisher: \"Ledgerline Labs\",\n    description: \"Sync invoices, payouts and customers into your books every hour.\",\n    color: \"#2f6f5e\",\n  } satisfies IntegrationApp,\n  host: { name: \"Fieldwork\", color: \"#ec5c13\" },\n  scopes: [\n    { id: \"invoices.read\", label: \"Read invoices\", description: \"Line items, totals and status\", required: true },\n    { id: \"customers.read\", label: \"Read customers\", description: \"Names, emails and billing addresses\", required: true },\n    { id: \"payouts.read\", label: \"Read payouts\", description: \"Settlement dates and fees\" },\n    { id: \"invoices.write\", label: \"Mark invoices paid\", description: \"Write payment status back to Ledgerline\" },\n  ] satisfies IntegrationScope[],\n  account: {\n    name: \"finance@northpeak.co\",\n    connectedAt: Date.UTC(2026, 9, 6, 15),\n    lastSyncedAt: Date.UTC(2026, 9, 8, 11, 56),\n  } satisfies ConnectedAccount,\n  now: Date.UTC(2026, 9, 8, 12),\n};\n\nconst STATUS: Record<IntegrationStatus, { label: string; tone: PillTone }> = {\n  disconnected: { label: \"Not connected\", tone: \"neutral\" },\n  connecting: { label: \"Connecting\", tone: \"accent\" },\n  connected: { label: \"Connected\", tone: \"success\" },\n  error: { label: \"Failed\", tone: \"error\" },\n  reauth: { label: \"Needs attention\", tone: \"warning\" },\n};\n\nfunction relative(ms: number, now: number) {\n  const s = Math.max(0, Math.round((now - ms) / 1000));\n  if (s < 45) return \"just now\";\n  const m = Math.round(s / 60);\n  if (m < 60) return `${m} min ago`;\n  const h = Math.round(m / 60);\n  if (h < 24) return `${h} h ago`;\n  const d = Math.round(h / 24);\n  return `${d} ${d === 1 ? \"day\" : \"days\"} ago`;\n}\n\n/**\n * Connect a third-party app. Shows the permissions it asks for, walks through the OAuth hand-off and,\n * once connected, the account, sync state and a guarded disconnect.\n */\nexport function IntegrationCard({\n  app = INTEGRATION_SAMPLE.app,\n  host = INTEGRATION_SAMPLE.host,\n  scopes = INTEGRATION_SAMPLE.scopes,\n  status: statusProp,\n  defaultStatus = \"disconnected\",\n  account: accountProp,\n  defaultAccount,\n  onConnect,\n  onDisconnect,\n  onSync,\n  onAutoSyncChange,\n  errorMessage = \"The authorization window was closed before access was granted.\",\n  now,\n  theme = \"auto\",\n  className,\n}: IntegrationCardProps) {\n  const { style } = useCardTheme(theme);\n  const reduce = useReducedMotionSafe();\n  const clock = useClock(now, 30_000);\n  const titleId = useId();\n  const scopesId = useId();\n\n  const [innerStatus, setInnerStatus] = useState<IntegrationStatus>(defaultStatus);\n  const [innerAccount, setInnerAccount] = useState<ConnectedAccount | undefined>(defaultAccount);\n  const status = statusProp ?? innerStatus;\n  const account = accountProp ?? innerAccount;\n\n  const [granted, setGranted] = useState(() => new Set(scopes.map((s) => s.id)));\n  const [scopesOpen, setScopesOpen] = useState(false);\n  const [confirming, setConfirming] = useState(false);\n  const [syncing, setSyncing] = useState(false);\n  const [autoSync, setAutoSync] = useState(true);\n  const [message, setMessage] = useState(\"\");\n  const attempt = useRef(0);\n  // After a disconnect the Connect button mounts once the exit animation ends; focus it then.\n  const refocus = useRef(false);\n  const primaryRef = (el: HTMLButtonElement | null) => {\n    if (el && refocus.current) {\n      refocus.current = false;\n      el.focus();\n    }\n  };\n\n  useEffect(() => () => void (attempt.current += 1), []);\n\n  const connect = async () => {\n    const id = ++attempt.current;\n    setInnerStatus(\"connecting\");\n    setMessage(`Connecting to ${app.name}`);\n    const ids = scopes.filter((s) => s.required || granted.has(s.id)).map((s) => s.id);\n    try {\n      const acct = onConnect\n        ? await onConnect(ids)\n        : await new Promise<ConnectedAccount>((resolve) =>\n            setTimeout(\n              () => resolve({ ...INTEGRATION_SAMPLE.account, connectedAt: Date.now(), lastSyncedAt: Date.now() }),\n              1600,\n            ),\n          );\n      if (id !== attempt.current) return;\n      setInnerAccount(acct);\n      setInnerStatus(\"connected\");\n      setMessage(`Connected to ${app.name} as ${acct.name}`);\n    } catch {\n      if (id !== attempt.current) return;\n      setInnerStatus(\"error\");\n      setMessage(`Could not connect to ${app.name}`);\n    }\n  };\n\n  const cancel = () => {\n    attempt.current += 1;\n    setInnerStatus(\"disconnected\");\n    setMessage(\"Connection cancelled\");\n  };\n\n  const disconnect = async () => {\n    setConfirming(false);\n    await onDisconnect?.();\n    setInnerStatus(\"disconnected\");\n    setInnerAccount(undefined);\n    setMessage(`Disconnected ${app.name}`);\n    refocus.current = true;\n  };\n\n  const sync = async () => {\n    if (syncing) return;\n    setSyncing(true);\n    setMessage(\"Syncing\");\n    const at = onSync ? await onSync() : await new Promise<number>((r) => setTimeout(() => r(Date.now()), 1200));\n    setInnerAccount((a) => (a ? { ...a, lastSyncedAt: at } : a));\n    setSyncing(false);\n    setMessage(\"Sync complete\");\n  };\n\n  const editable = status === \"disconnected\" || status === \"error\";\n  const meta = STATUS[status];\n\n  return (\n    <CardFrame aria-labelledby={titleId} aria-busy={status === \"connecting\" || undefined} className={className} style={style}>\n      <div className=\"px-5 pt-5\">\n        <div className=\"flex items-start justify-between gap-3\">\n          <Handshake host={host} app={app} status={status} reduce={reduce} />\n          <Pill tone={meta.tone} dot pulse={status === \"connecting\"}>\n            {meta.label}\n          </Pill>\n        </div>\n\n        <h3 id={titleId} className=\"mt-4 text-[15px] font-semibold leading-5\">\n          {app.name}\n        </h3>\n        <p className=\"text-[12px] leading-4 text-[color:var(--bjork-text-muted)]\">by {app.publisher}</p>\n        <p className=\"mt-2 text-[13px] leading-5 text-[color:var(--bjork-text-medium)]\">{app.description}</p>\n      </div>\n\n      {/* Permissions */}\n      <div className=\"mt-4 border-y border-[color:var(--bjork-border)]\">\n        <button\n          type=\"button\"\n          aria-expanded={scopesOpen}\n          aria-controls={scopesId}\n          onClick={() => setScopesOpen((o) => !o)}\n          className={cn(\n            \"flex w-full cursor-pointer items-center justify-between gap-3 px-5 py-3 text-left text-[13px] transition-colors hover:bg-[color:var(--bjork-card-hover)]\",\n            focusRing,\n            \"focus-visible:ring-inset focus-visible:ring-offset-0\",\n          )}\n        >\n          <span className=\"font-medium\">\n            Permissions{\" \"}\n            <span className=\"font-normal text-[color:var(--bjork-text-muted)]\">\n              · {scopes.filter((s) => s.required || granted.has(s.id)).length} of {scopes.length}\n            </span>\n          </span>\n          <ChevronDown\n            aria-hidden=\"true\"\n            className={cn(\n              \"size-4 text-[color:var(--bjork-text-muted)] transition-transform duration-200 motion-reduce:transition-none\",\n              scopesOpen && \"rotate-180\",\n            )}\n          />\n        </button>\n        <div\n          id={scopesId}\n          className=\"grid\"\n          inert={!scopesOpen}\n          aria-hidden={!scopesOpen || undefined}\n          style={{\n            gridTemplateRows: scopesOpen ? \"1fr\" : \"0fr\",\n            transition: reduce ? \"none\" : \"grid-template-rows 260ms cubic-bezier(0.32,0.72,0,1)\",\n          }}\n        >\n          <ul className=\"min-h-0 overflow-hidden\">\n            {scopes.map((s) => {\n              const on = s.required || granted.has(s.id);\n              return (\n                <li key={s.id} className=\"px-5 pb-3 first:pt-1\">\n                  <label\n                    className={cn(\n                      \"flex items-start gap-3\",\n                      !s.required && editable ? \"cursor-pointer\" : \"cursor-default\",\n                    )}\n                  >\n                    <input\n                      type=\"checkbox\"\n                      checked={on}\n                      disabled={s.required || !editable}\n                      onChange={(e) =>\n                        setGranted((g) => {\n                          const n = new Set(g);\n                          if (e.target.checked) n.add(s.id);\n                          else n.delete(s.id);\n                          return n;\n                        })\n                      }\n                      className=\"peer sr-only\"\n                    />\n                    <span\n                      aria-hidden=\"true\"\n                      className={cn(\n                        \"mt-0.5 grid size-4 shrink-0 place-items-center rounded-[5px] border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-[color:var(--bjork-accent)] peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-[color:var(--bjork-ring-offset)]\",\n                        on\n                          ? \"border-transparent bg-[color:var(--bjork-accent-fill)] text-[color:var(--bjork-accent-foreground)]\"\n                          : \"border-[color:var(--bjork-border-strong)]\",\n                        (s.required || !editable) && \"opacity-60\",\n                      )}\n                    >\n                      {on && <Check className=\"size-3\" strokeWidth={3} />}\n                    </span>\n                    <span className=\"min-w-0 flex-1\">\n                      <span className=\"flex items-center gap-1.5 text-[13px] leading-5\">\n                        {s.label}\n                        {s.required && (\n                          <>\n                            <Lock aria-hidden=\"true\" className=\"size-3 text-[color:var(--bjork-text-soft)]\" />\n                            <span className=\"sr-only\">(required)</span>\n                          </>\n                        )}\n                      </span>\n                      {s.description && (\n                        <span className=\"block text-[12px] leading-4 text-[color:var(--bjork-text-muted)]\">{s.description}</span>\n                      )}\n                    </span>\n                  </label>\n                </li>\n              );\n            })}\n          </ul>\n        </div>\n      </div>\n\n      {/* State body */}\n      <div className=\"px-5 py-4\">\n        {(status === \"connected\" || status === \"reauth\") && account && (\n          <dl className=\"mb-4 grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-1.5 text-[12px] leading-4\">\n            <dt className=\"text-[color:var(--bjork-text-muted)]\">Account</dt>\n            <dd className=\"truncate text-right\">{account.name}</dd>\n            <dt className=\"text-[color:var(--bjork-text-muted)]\">Connected</dt>\n            <dd className=\"text-right\">{clock === null ? \"—\" : relative(account.connectedAt, clock)}</dd>\n            <dt className=\"text-[color:var(--bjork-text-muted)]\">Last sync</dt>\n            <dd className=\"text-right\">\n              {syncing ? \"Syncing…\" : account.lastSyncedAt && clock !== null ? relative(account.lastSyncedAt, Math.max(clock, account.lastSyncedAt)) : \"—\"}\n            </dd>\n          </dl>\n        )}\n\n        {status === \"connected\" && (\n          <div className=\"mb-4 flex items-center justify-between gap-3\">\n            <span id={`${titleId}-auto`} className=\"text-[13px]\">\n              Sync every hour\n            </span>\n            <button\n              type=\"button\"\n              role=\"switch\"\n              aria-checked={autoSync}\n              aria-labelledby={`${titleId}-auto`}\n              onClick={() => {\n                setAutoSync((v) => !v);\n                onAutoSyncChange?.(!autoSync);\n              }}\n              className={cn(\n                \"relative h-5 w-9 shrink-0 cursor-pointer rounded-full transition-colors duration-200 motion-reduce:transition-none\",\n                autoSync ? \"bg-[color:var(--bjork-accent-fill)]\" : \"bg-[color:var(--bjork-track)]\",\n                focusRing,\n              )}\n            >\n              <span\n                aria-hidden=\"true\"\n                className={cn(\n                  \"absolute top-0.5 left-0.5 size-4 rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,0.3)] transition-transform duration-200 motion-reduce:transition-none\",\n                  autoSync && \"translate-x-4\",\n                )}\n              />\n            </button>\n          </div>\n        )}\n\n        {status === \"error\" && (\n          <p role=\"alert\" className=\"mb-4 flex items-start gap-2 text-[12px] leading-4 text-[color:var(--bjork-error)]\">\n            <AlertTriangle aria-hidden=\"true\" className=\"mt-px size-3.5 shrink-0\" />\n            {errorMessage}\n          </p>\n        )}\n        {status === \"reauth\" && (\n          <p className=\"mb-4 flex items-start gap-2 text-[12px] leading-4 text-[color:var(--bjork-warning)]\">\n            <AlertTriangle aria-hidden=\"true\" className=\"mt-px size-3.5 shrink-0\" />\n            Access expired. Reconnect to resume syncing.\n          </p>\n        )}\n\n        <AnimatePresence initial={false} mode=\"wait\">\n          {confirming ? (\n            <motion.div\n              key=\"confirm\"\n              role=\"alertdialog\"\n              aria-label={`Disconnect ${app.name}?`}\n              initial={{ opacity: 0, y: reduce ? 0 : 4 }}\n              animate={{ opacity: 1, y: 0 }}\n              exit={{ opacity: 0 }}\n              transition={{ duration: 0.18, ease: ease.out }}\n              className=\"flex flex-wrap items-center justify-between gap-2\"\n            >\n              <p className=\"text-[12px] leading-4 text-[color:var(--bjork-text-medium)]\">Stop syncing and revoke access?</p>\n              <div className=\"flex gap-1.5\">\n                <CardButton size=\"sm\" variant=\"ghost\" onClick={() => setConfirming(false)} autoFocus>\n                  Keep\n                </CardButton>\n                <CardButton size=\"sm\" variant=\"danger\" onClick={disconnect}>\n                  Disconnect\n                </CardButton>\n              </div>\n            </motion.div>\n          ) : (\n            <motion.div\n              key={status}\n              initial={{ opacity: 0 }}\n              animate={{ opacity: 1 }}\n              exit={{ opacity: 0 }}\n              transition={{ duration: 0.15 }}\n              className=\"flex items-center gap-2\"\n            >\n              {(status === \"disconnected\" || status === \"error\" || status === \"reauth\") && (\n                <CardButton ref={primaryRef} variant=\"primary\" onClick={connect} className=\"flex-1\">\n                  {status === \"disconnected\" ? `Connect ${app.name}` : status === \"error\" ? \"Try again\" : \"Reconnect\"}\n                </CardButton>\n              )}\n              {status === \"connecting\" && (\n                <>\n                  <span className=\"flex-1 text-[12px] text-[color:var(--bjork-text-muted)]\">Waiting for {app.name} to approve…</span>\n                  <CardButton size=\"sm\" variant=\"ghost\" onClick={cancel}>\n                    Cancel\n                  </CardButton>\n                </>\n              )}\n              {status === \"connected\" && (\n                <>\n                  <CardButton\n                    onClick={sync}\n                    disabled={syncing}\n                    className=\"flex-1\"\n                    icon={\n                      <RefreshCw\n                        aria-hidden=\"true\"\n                        className={cn(\"size-3.5\", syncing && \"motion-safe:animate-spin\")}\n                      />\n                    }\n                  >\n                    {syncing ? \"Syncing\" : \"Sync now\"}\n                  </CardButton>\n                  <CardButton variant=\"ghost\" onClick={() => setConfirming(true)}>\n                    Disconnect\n                  </CardButton>\n                </>\n              )}\n            </motion.div>\n          )}\n        </AnimatePresence>\n      </div>\n      <LiveRegion message={message} />\n    </CardFrame>\n  );\n}\n\nfunction Tile({ name, color, logo }: { name: string; color: string; logo?: ReactNode }) {\n  return (\n    <span\n      aria-hidden=\"true\"\n      className=\"grid size-11 shrink-0 place-items-center overflow-hidden rounded-[12px] text-[17px] font-semibold text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.22),inset_0_0_0_1px_rgba(0,0,0,0.12),0_6px_14px_-8px_rgba(0,0,0,0.5)]\"\n      style={{ background: `linear-gradient(160deg, ${color}, color-mix(in oklab, ${color} 70%, black))` }}\n    >\n      {logo ?? name.slice(0, 1)}\n    </span>\n  );\n}\n\nfunction Handshake({\n  host,\n  app,\n  status,\n  reduce,\n}: {\n  host: { name: string; color: string; logo?: ReactNode };\n  app: IntegrationApp;\n  status: IntegrationStatus;\n  reduce: boolean;\n}) {\n  const linked = status === \"connected\";\n  const busy = status === \"connecting\";\n  const broken = status === \"error\" || status === \"reauth\";\n  const lineColor = linked\n    ? \"var(--bjork-success)\"\n    : broken\n      ? status === \"error\"\n        ? \"var(--bjork-error)\"\n        : \"var(--bjork-warning)\"\n      : \"var(--bjork-border-strong)\";\n\n  return (\n    <div className=\"flex items-center\" aria-hidden=\"true\">\n      <Tile {...host} />\n      <div className=\"relative mx-1 h-11 w-14\">\n        <svg viewBox=\"0 0 56 44\" className=\"absolute inset-0 size-full overflow-visible\">\n          <line\n            x1=\"2\"\n            y1=\"22\"\n            x2=\"54\"\n            y2=\"22\"\n            stroke={lineColor}\n            strokeWidth=\"1.5\"\n            strokeLinecap=\"round\"\n            strokeDasharray={linked ? undefined : \"2 4\"}\n            style={{ transition: \"stroke 300ms\" }}\n          />\n          {busy && !reduce && (\n            <>\n              {[0, 1, 2].map((i) => (\n                <motion.circle\n                  key={i}\n                  r=\"2\"\n                  cy=\"22\"\n                  fill=\"var(--bjork-accent)\"\n                  initial={{ cx: 2, opacity: 0 }}\n                  animate={{ cx: [2, 54], opacity: [0, 1, 1, 0] }}\n                  transition={{ duration: 1.1, repeat: Infinity, delay: i * 0.36, ease: \"easeInOut\" }}\n                />\n              ))}\n            </>\n          )}\n        </svg>\n        <span\n          className={cn(\n            \"absolute left-1/2 top-1/2 grid size-5 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full border bg-[color:var(--bjork-card)] transition-[transform,opacity] duration-300 motion-reduce:transition-none\",\n            linked || broken ? \"scale-100 opacity-100\" : \"scale-50 opacity-0\",\n          )}\n          style={{ borderColor: lineColor, color: lineColor }}\n        >\n          {broken ? <span className=\"text-[11px] font-bold leading-none\">!</span> : <Check className=\"size-3\" strokeWidth={3} />}\n        </span>\n      </div>\n      <Tile name={app.name} color={app.color} logo={app.logo} />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/cards/integration-card.tsx"
    },
    {
      "path": "components/bjork-ui/_core/a11y.tsx",
      "content": "import type { ReactNode } from \"react\";\n\n// Text for assistive tech only.\nexport function VisuallyHidden({ children }: { children: ReactNode }) {\n  return <span className=\"sr-only\">{children}</span>;\n}\n\n// Announces `message` when it changes. Same text re-rendered does not re-announce.\nexport function LiveRegion({\n  message,\n  politeness = \"polite\",\n}: {\n  message: string;\n  politeness?: \"polite\" | \"assertive\";\n}) {\n  return (\n    <span role=\"status\" aria-live={politeness} aria-atomic=\"true\" className=\"sr-only\">\n      {message}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/a11y.tsx"
    },
    {
      "path": "components/bjork-ui/_core/motion.ts",
      "content": "// Shared springs, easings and durations. Components import these instead of inventing values.\n\nexport const springs = {\n  press: { type: \"spring\", stiffness: 500, damping: 30, mass: 0.6 },\n  snappy: { type: \"spring\", stiffness: 400, damping: 25, mass: 1 },\n  standard: { type: \"spring\", stiffness: 300, damping: 30, mass: 0.8 },\n  soft: { type: \"spring\", stiffness: 200, damping: 25, mass: 1.2 },\n  settle: { type: \"spring\", stiffness: 380, damping: 30, mass: 0.8 },\n  blurIn: { type: \"spring\", stiffness: 400, damping: 28, mass: 0.6 },\n} as const;\n\nexport const ease = {\n  out: [0.23, 1, 0.32, 1],\n  inOut: [0.77, 0, 0.175, 1],\n  drawer: [0.32, 0.72, 0, 1],\n} as const;\n\nexport const easeCss = {\n  out: \"cubic-bezier(0.23,1,0.32,1)\",\n  inOut: \"cubic-bezier(0.77,0,0.175,1)\",\n  drawer: \"cubic-bezier(0.32,0.72,0,1)\",\n} as const;\n\nexport const durations = { press: 140, tooltip: 160, menu: 200, panel: 280 } as const; // ms\n\n// Cubic bezier easing for canvas and rAF code. Returns progress y for input x in [0, 1].\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number {\n  const cx = 3 * x1;\n  const bx = 3 * (x2 - x1) - cx;\n  const ax = 1 - cx - bx;\n  const cy = 3 * y1;\n  const by = 3 * (y2 - y1) - cy;\n  const ay = 1 - cy - by;\n  const sampleX = (s: number) => ((ax * s + bx) * s + cx) * s;\n  const sampleY = (s: number) => ((ay * s + by) * s + cy) * s;\n  const sampleDX = (s: number) => (3 * ax * s + 2 * bx) * s + cx;\n\n  const solveX = (x: number) => {\n    let s = x;\n    for (let i = 0; i < 8; i++) {\n      const err = sampleX(s) - x;\n      if (Math.abs(err) < 1e-6) return s;\n      const d = sampleDX(s);\n      if (Math.abs(d) < 1e-6) break;\n      s -= err / d;\n    }\n    let lo = 0;\n    let hi = 1;\n    s = x;\n    while (lo < hi) {\n      const v = sampleX(s);\n      if (Math.abs(v - x) < 1e-6) return s;\n      if (x > v) lo = s;\n      else hi = s;\n      s = (lo + hi) / 2;\n      if (hi - lo < 1e-7) break;\n    }\n    return s;\n  };\n\n  return (t: number) => {\n    if (t <= 0) return 0;\n    if (t >= 1) return 1;\n    return sampleY(solveX(t));\n  };\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/motion.ts"
    },
    {
      "path": "components/bjork-ui/cards/card-kit.tsx",
      "content": "\"use client\";\n\nimport {\n  forwardRef,\n  useSyncExternalStore,\n  type ButtonHTMLAttributes,\n  type CSSProperties,\n  type HTMLAttributes,\n  type ReactNode,\n} from \"react\";\nimport { useReducedMotion } from \"framer-motion\";\nimport type { BjorkTone } from \"@/components/bjork-ui/_core/palette\";\nimport { surfaceVars } from \"@/components/bjork-ui/_core/surface\";\nimport { useBjorkTone } from \"@/components/bjork-ui/_core/tone\";\nimport { cn } from \"@/lib/utils\";\n\n/** \"auto\" follows the site theme (next-themes). \"light\" and \"dark\" pin the card. */\nexport type CardTheme = \"light\" | \"dark\" | \"auto\";\n\n/**\n * Card tokens. They are written onto the card root as the library's `--bjork-*` custom properties,\n * so a pinned theme wins over the page theme, and the status colours the global sheet lacks\n * (success, warning, error) are always defined.\n */\nexport const CARD_TOKENS = {\n  dark: {\n    card: \"#141414\",\n    raised: \"#1b1b1b\",\n    inset: \"#0d0d0d\",\n    hover: \"#1f1f1f\",\n    border: \"#242424\",\n    borderStrong: \"#363636\",\n    hair: \"rgba(237,237,237,0.08)\",\n    text: \"#ededed\",\n    textMedium: \"rgba(237,237,237,0.74)\",\n    textMuted: \"rgba(237,237,237,0.56)\",\n    textSoft: \"rgba(237,237,237,0.4)\",\n    textFaint: \"rgba(237,237,237,0.22)\",\n    accent: \"#ec5c13\",\n    accentInk: \"#f27a3c\",\n    accentFill: \"#b84a12\",\n    accentFillHover: \"#c95517\",\n    accentFg: \"#fff2ea\",\n    accentSoft: \"rgba(236,92,19,0.13)\",\n    accentMuted: \"rgba(236,92,19,0.26)\",\n    success: \"#4cc38a\",\n    successSoft: \"rgba(76,195,138,0.13)\",\n    warning: \"#f2b544\",\n    warningSoft: \"rgba(242,181,68,0.13)\",\n    error: \"#ff6b5c\",\n    errorSoft: \"rgba(255,107,92,0.13)\",\n    track: \"#262626\",\n    shadow:\n      \"inset 0 1px 0 rgba(255,255,255,0.045), 0 1px 0 rgba(0,0,0,0.5), 0 24px 48px -28px rgba(0,0,0,0.9)\",\n    raisedShadow: \"inset 0 1px 0 rgba(255,255,255,0.04)\",\n  },\n  light: {\n    card: \"#fffcf6\",\n    raised: \"#f7f1e6\",\n    inset: \"#f1eadd\",\n    hover: \"#f3ecdf\",\n    border: \"#ebe2d4\",\n    borderStrong: \"#dbcfbd\",\n    hair: \"rgba(23,23,23,0.07)\",\n    text: \"#171717\",\n    textMedium: \"rgba(23,23,23,0.76)\",\n    textMuted: \"rgba(23,23,23,0.62)\",\n    textSoft: \"rgba(23,23,23,0.46)\",\n    textFaint: \"rgba(23,23,23,0.2)\",\n    accent: \"#ec7d43\",\n    accentInk: \"#a84a19\",\n    accentFill: \"#ec7d43\",\n    accentFillHover: \"#f0935f\",\n    accentFg: \"#3f2112\",\n    accentSoft: \"rgba(236,125,67,0.12)\",\n    accentMuted: \"rgba(236,125,67,0.24)\",\n    success: \"#1b7f4d\",\n    successSoft: \"rgba(31,138,85,0.11)\",\n    warning: \"#966000\",\n    warningSoft: \"rgba(168,107,0,0.11)\",\n    error: \"#c0331d\",\n    errorSoft: \"rgba(200,54,31,0.1)\",\n    track: \"#ebe3d6\",\n    shadow:\n      \"inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(66,52,33,0.06), 0 22px 44px -28px rgba(66,52,33,0.26)\",\n    raisedShadow: \"inset 0 1px 0 rgba(255,255,255,0.7)\",\n  },\n} as const;\n\nexport type CardTokens = (typeof CARD_TOKENS)[BjorkTone];\n\nexport function cardVars(tone: BjorkTone): CSSProperties {\n  const t = CARD_TOKENS[tone];\n  return {\n    colorScheme: tone,\n    ...surfaceVars(tone),\n    \"--bjork-card\": t.card,\n    \"--bjork-card-raised\": t.raised,\n    \"--bjork-card-inset\": t.inset,\n    \"--bjork-card-hover\": t.hover,\n    \"--bjork-border\": t.border,\n    \"--bjork-border-strong\": t.borderStrong,\n    \"--bjork-hair\": t.hair,\n    \"--bjork-text\": t.text,\n    \"--bjork-text-medium\": t.textMedium,\n    \"--bjork-text-muted\": t.textMuted,\n    \"--bjork-text-soft\": t.textSoft,\n    \"--bjork-text-faint\": t.textFaint,\n    \"--bjork-accent\": t.accent,\n    \"--bjork-accent-ink\": t.accentInk,\n    \"--bjork-accent-fill\": t.accentFill,\n    \"--bjork-accent-fill-hover\": t.accentFillHover,\n    \"--bjork-accent-foreground\": t.accentFg,\n    \"--bjork-accent-soft\": t.accentSoft,\n    \"--bjork-accent-muted\": t.accentMuted,\n    \"--bjork-success\": t.success,\n    \"--bjork-success-soft\": t.successSoft,\n    \"--bjork-warning\": t.warning,\n    \"--bjork-warning-soft\": t.warningSoft,\n    \"--bjork-error\": t.error,\n    \"--bjork-error-soft\": t.errorSoft,\n    \"--bjork-track\": t.track,\n    \"--bjork-card-shadow\": t.shadow,\n    \"--bjork-raised-shadow\": t.raisedShadow,\n    \"--bjork-ring-offset\": t.card,\n  } as CSSProperties;\n}\n\n/** Resolves the card tone and the CSS variables for it. */\nexport function useCardTheme(theme: CardTheme = \"auto\") {\n  const tone = useBjorkTone(theme === \"auto\" ? undefined : theme);\n  return { tone, tokens: CARD_TOKENS[tone], style: cardVars(tone) };\n}\n\nconst noopSubscribe = () => () => {};\n\n/** True after hydration. The server render and the first client render both see false. */\nexport function useHydrated() {\n  return useSyncExternalStore(\n    noopSubscribe,\n    () => true,\n    () => false,\n  );\n}\n\n/** Reduced-motion preference, hydration-safe: false until mounted. */\nexport function useReducedMotionSafe() {\n  const hydrated = useHydrated();\n  const reduced = useReducedMotion();\n  return hydrated && reduced === true;\n}\n\nconst clockStores = new Map<number, { subscribe: (cb: () => void) => () => void; get: () => number }>();\n\nfunction clockStore(stepMs: number) {\n  let store = clockStores.get(stepMs);\n  if (!store) {\n    store = {\n      subscribe: (cb) => {\n        const id = window.setInterval(cb, Math.min(stepMs, 1000));\n        return () => window.clearInterval(id);\n      },\n      get: () => Math.floor(Date.now() / stepMs) * stepMs,\n    };\n    clockStores.set(stepMs, store);\n  }\n  return store;\n}\n\n/**\n * Wall clock rounded to `stepMs`. A fixed `now` (previews, tests) wins. Returns null during SSR and\n * hydration so server and client text agree; callers render a neutral fallback for that frame.\n */\nexport function useClock(now: number | undefined, stepMs = 60_000): number | null {\n  const store = clockStore(stepMs);\n  const live = useSyncExternalStore(store.subscribe, store.get, () => null);\n  return now ?? live;\n}\n\nexport const focusRing =\n  \"outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--bjork-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--bjork-ring-offset)]\";\n\nexport interface CardFrameProps extends HTMLAttributes<HTMLElement> {\n  style?: CSSProperties;\n  /** Width in px, capped at the container width. Default 420. */\n  maxWidth?: number;\n  as?: \"section\" | \"article\" | \"div\";\n}\n\n/** The shared card surface: tokens, radius, border, shadow and a container query root. */\nexport const CardFrame = forwardRef<HTMLElement, CardFrameProps>(function CardFrame(\n  { as: Tag = \"section\", maxWidth = 420, className, style, children, ...rest },\n  ref,\n) {\n  return (\n    <Tag\n      ref={ref as never}\n      className={cn(\n        \"@container relative max-w-full overflow-hidden rounded-[20px] border border-[color:var(--bjork-border-muted)] bg-[color:var(--bjork-card)] font-bjork-alpha text-[color:var(--bjork-text)] shadow-[var(--bjork-shadow-surface)] [font-variant-numeric:tabular-nums]\",\n        className,\n      )}\n      // A fixed width capped at the container: fills narrow columns, and keeps its size inside\n      // shrink-to-fit parents (flex centring, popovers) where a percentage width would collapse.\n      style={{ width: maxWidth, ...style }}\n      {...rest}\n    >\n      {children}\n    </Tag>\n  );\n});\n\ntype ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n\nexport interface CardButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n  variant?: ButtonVariant;\n  size?: \"sm\" | \"md\";\n  icon?: ReactNode;\n}\n\nconst buttonVariants: Record<ButtonVariant, string> = {\n  primary:\n    \"bg-[color:var(--bjork-accent-fill)] text-[color:var(--bjork-accent-foreground)] hover:bg-[color:var(--bjork-accent-fill-hover)] shadow-[inset_0_1px_0_rgba(255,255,255,0.16)]\",\n  secondary:\n    \"border border-[color:var(--bjork-border)] bg-[color:var(--bjork-card-raised)] text-[color:var(--bjork-text)] shadow-[var(--bjork-raised-shadow)] hover:bg-[color:var(--bjork-card-hover)] hover:border-[color:var(--bjork-border-strong)]\",\n  ghost:\n    \"text-[color:var(--bjork-text-medium)] hover:bg-[color:var(--bjork-card-hover)] hover:text-[color:var(--bjork-text)]\",\n  danger:\n    \"border border-[color:var(--bjork-border)] bg-[color:var(--bjork-error-soft)] text-[color:var(--bjork-error)] hover:border-[color:var(--bjork-error)]\",\n};\n\nexport const CardButton = forwardRef<HTMLButtonElement, CardButtonProps>(function CardButton(\n  { variant = \"secondary\", size = \"md\", icon, className, children, type = \"button\", ...rest },\n  ref,\n) {\n  return (\n    <button\n      ref={ref}\n      type={type}\n      className={cn(\n        \"inline-flex shrink-0 cursor-pointer select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-[10px] font-medium transition-[background-color,border-color,color,transform,opacity] duration-150 ease-out active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-45 disabled:active:scale-100 motion-reduce:transition-none motion-reduce:active:scale-100\",\n        size === \"sm\" ? \"h-8 px-2.5 text-[12px]\" : \"h-9 px-3.5 text-[13px]\",\n        buttonVariants[variant],\n        focusRing,\n        className,\n      )}\n      {...rest}\n    >\n      {icon}\n      {children}\n    </button>\n  );\n});\n\nexport type PillTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"error\";\n\nconst pillTones: Record<PillTone, string> = {\n  neutral: \"bg-[color:var(--bjork-hair)] text-[color:var(--bjork-text-medium)]\",\n  accent: \"bg-[color:var(--bjork-accent-soft)] text-[color:var(--bjork-accent-ink)]\",\n  success: \"bg-[color:var(--bjork-success-soft)] text-[color:var(--bjork-success)]\",\n  warning: \"bg-[color:var(--bjork-warning-soft)] text-[color:var(--bjork-warning)]\",\n  error: \"bg-[color:var(--bjork-error-soft)] text-[color:var(--bjork-error)]\",\n};\n\n/** Small status label. `dot` adds a leading status dot; `pulse` animates it (not under reduced motion). */\nexport function Pill({\n  tone = \"neutral\",\n  dot = false,\n  pulse = false,\n  className,\n  children,\n}: {\n  tone?: PillTone;\n  dot?: boolean;\n  pulse?: boolean;\n  className?: string;\n  children: ReactNode;\n}) {\n  return (\n    <span\n      className={cn(\n        \"inline-flex h-[22px] shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-[11px] font-medium leading-none\",\n        pillTones[tone],\n        className,\n      )}\n    >\n      {dot && (\n        <span aria-hidden=\"true\" className=\"relative inline-flex size-1.5\">\n          {pulse && (\n            <span className=\"absolute inset-0 rounded-full bg-current opacity-60 motion-safe:animate-ping\" />\n          )}\n          <span className=\"relative inline-flex size-1.5 rounded-full bg-current\" />\n        </span>\n      )}\n      {children}\n    </span>\n  );\n}\n\n/** Loading placeholder. Shimmers unless reduced motion is on. */\nexport function Skeleton({ className, style }: { className?: string; style?: CSSProperties }) {\n  return (\n    <span\n      aria-hidden=\"true\"\n      className={cn(\"block rounded-[6px] bg-[color:var(--bjork-hair)] motion-safe:animate-pulse\", className)}\n      style={style}\n    />\n  );\n}\n\n/** Deterministic pseudo-random generator for sample data, so server and client agree. */\nexport function seeded(seed: number) {\n  let s = seed >>> 0 || 1;\n  return () => {\n    s ^= s << 13;\n    s ^= s >>> 17;\n    s ^= s << 5;\n    return ((s >>> 0) % 100_000) / 100_000;\n  };\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/cards/card-kit.tsx"
    },
    {
      "path": "components/bjork-ui/_core/palette.ts",
      "content": "export type BjorkTone = \"dark\" | \"light\";\n\n// Canvas, WebGL and SVG attribute colours. DOM code uses the CSS tokens with these as fallbacks.\nexport const BJORK_PALETTE = {\n  dark: {\n    bg: \"#050505\", stage: \"#111111\", surface: \"#121212\", raised: \"#161616\", active: \"#202020\",\n    border: \"#232323\", borderStrong: \"#343434\",\n    text: \"#ededed\", textMedium: \"rgba(237,237,237,0.72)\", textMuted: \"rgba(237,237,237,0.6)\",\n    textSoft: \"rgba(237,237,237,0.5)\", textFaint: \"rgba(237,237,237,0.22)\", hair: \"rgba(237,237,237,0.12)\",\n    accent: \"#ec5c13\", accentInk: \"#ec5c13\", accentFill: \"#b84a12\", accentSoft: \"rgba(236,92,19,0.12)\", accentMuted: \"rgba(236,92,19,0.24)\",\n    accentFg: \"#fff2ea\", success: \"#4cc38a\", warning: \"#f2b544\", error: \"#ff5c4d\",\n  },\n  light: {\n    bg: \"#f7f5ef\", stage: \"#f7f5ef\", surface: \"#fffcf6\", raised: \"#f5efe3\", active: \"#efe7d8\",\n    border: \"#eee6db\", borderStrong: \"#e1d7c8\",\n    text: \"#171717\", textMedium: \"rgba(23,23,23,0.78)\", textMuted: \"rgba(23,23,23,0.68)\",\n    textSoft: \"rgba(23,23,23,0.62)\", textFaint: \"rgba(23,23,23,0.22)\", hair: \"rgba(23,23,23,0.10)\",\n    accent: \"#ec7d43\", accentInk: \"#b4531f\", accentFill: \"#ec7d43\", accentSoft: \"rgba(236,125,67,0.10)\", accentMuted: \"rgba(236,125,67,0.20)\",\n    accentFg: \"#3f2112\", success: \"#1f8a55\", warning: \"#a86b00\", error: \"#c8361f\",\n  },\n} as const;\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/palette.ts"
    },
    {
      "path": "components/bjork-ui/_core/surface.ts",
      "content": "import type { CSSProperties } from \"react\";\nimport type { BjorkTone } from \"./palette\";\n\n// The library surface (CANON.md §1). Values mirror app/globals.css :root and .dark. Change both together.\nexport const BJORK_SURFACE = {\n  light: {\n    surface: \"#fffcf6\", surfaceMuted: \"rgba(250, 246, 237, 0.94)\", surfaceHover: \"#f5efe3\", surfaceActive: \"#efe7d8\",\n    panel: \"#f8f2e7\", menu: \"rgba(255, 252, 246, 0.98)\", field: \"rgba(255, 252, 246, 0.96)\",\n    fieldMuted: \"rgba(248, 242, 231, 0.82)\", fieldInset: \"rgba(239, 231, 216, 0.72)\",\n    border: \"#eee6db\", borderMuted: \"#f5ede2\", borderStrong: \"#e1d7c8\",\n    shadowSurface: \"inset 0 7px 14px rgba(88, 72, 49, 0.045), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.92), inset 1px 0 0 rgba(88, 72, 49, 0.026), inset -1px 0 0 rgba(255, 255, 255, 0.68), 0 14px 22px -9px rgba(66, 52, 33, 0.11)\",\n    shadowSoft: \"inset 0 1px 0 rgba(88, 72, 49, 0.045), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.86)\",\n    shadowPanel: \"inset 0 1px 0 rgba(88, 72, 49, 0.04), inset 1px 0 0 rgba(88, 72, 49, 0.024), inset -1px 0 0 rgba(255, 255, 255, 0.64), 0 18px 38px -30px rgba(66, 52, 33, 0.2)\",\n    shadowMenu: \"inset 0 1px 0 rgba(88, 72, 49, 0.04), inset 0 12px 24px rgba(88, 72, 49, 0.022), inset 1px 0 0 rgba(88, 72, 49, 0.024), inset -1px 0 0 rgba(255, 255, 255, 0.62), 0 22px 44px -26px rgba(66, 52, 33, 0.22)\",\n    shadowInset: \"inset 0 1px 10px rgba(88, 72, 49, 0.12), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.72)\",\n  },\n  dark: {\n    surface: \"#121212\", surfaceMuted: \"rgba(22, 22, 22, 0.92)\", surfaceHover: \"#161616\", surfaceActive: \"#202020\",\n    panel: \"#0d0d0d\", menu: \"rgba(18, 18, 18, 0.98)\", field: \"rgba(18, 18, 18, 0.95)\",\n    fieldMuted: \"rgba(18, 18, 18, 0.55)\", fieldInset: \"rgba(9, 9, 9, 0.75)\",\n    border: \"#232323\", borderMuted: \"#1c1c1c\", borderStrong: \"#343434\",\n    shadowSurface: \"inset 0 7px 14px rgba(255, 255, 255, 0.03), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.06), 0 14px 20px -6px rgba(0, 0, 0, 0.45)\",\n    shadowSoft: \"inset 0 1px 0 rgba(255, 255, 255, 0.045)\",\n    shadowPanel: \"inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 36px -28px rgba(0, 0, 0, 0.9)\",\n    shadowMenu: \"inset 0 1px 0 rgba(255, 255, 255, 0.055), inset 0 12px 24px rgba(255, 255, 255, 0.018), inset 0 -18px 26px rgba(0, 0, 0, 0.24), 0 22px 42px -22px rgba(0, 0, 0, 0.9)\",\n    shadowInset: \"inset 0 1px 10px rgba(0, 0, 0, 0.45)\",\n  },\n} as const;\n\n/** Writes the surface tokens for a pinned tone as --bjork-* custom properties. Spread first; kit-specific keys may override. */\nexport function surfaceVars(tone: BjorkTone): CSSProperties {\n  const s = BJORK_SURFACE[tone];\n  return {\n    \"--bjork-surface\": s.surface, \"--bjork-surface-muted\": s.surfaceMuted, \"--bjork-surface-hover\": s.surfaceHover,\n    \"--bjork-surface-active\": s.surfaceActive, \"--bjork-panel\": s.panel, \"--bjork-menu\": s.menu, \"--bjork-field\": s.field,\n    \"--bjork-field-muted\": s.fieldMuted, \"--bjork-field-inset\": s.fieldInset, \"--bjork-border\": s.border,\n    \"--bjork-border-muted\": s.borderMuted, \"--bjork-border-strong\": s.borderStrong,\n    \"--bjork-shadow-surface\": s.shadowSurface, \"--bjork-shadow-soft\": s.shadowSoft, \"--bjork-shadow-panel\": s.shadowPanel,\n    \"--bjork-shadow-menu\": s.shadowMenu, \"--bjork-shadow-inset\": s.shadowInset,\n  } as CSSProperties;\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/surface.ts"
    },
    {
      "path": "components/bjork-ui/_core/tone.ts",
      "content": "\"use client\";\n\nimport { useSyncExternalStore } from \"react\";\nimport { useTheme } from \"next-themes\";\nimport type { BjorkTone } from \"./palette\";\n\nconst subscribeNoop = () => () => {};\nconst getMounted = () => true;\nconst getServerMounted = () => false;\n\n/**\n * Resolves the tone for a component. An explicit `tone` always wins.\n * Otherwise it follows next-themes' resolved theme, but only after mount,\n * so the server render and first client render agree on dark.\n */\nexport function useBjorkTone(tone?: BjorkTone): BjorkTone {\n  const { resolvedTheme } = useTheme();\n  const mounted = useSyncExternalStore(subscribeNoop, getMounted, getServerMounted);\n  if (tone) return tone;\n  if (!mounted) return \"dark\";\n  return resolvedTheme === \"light\" ? \"light\" : \"dark\";\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/tone.ts"
    },
    {
      "path": "lib/utils.ts",
      "content": "import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n",
      "type": "registry:lib",
      "target": "@lib/utils.ts"
    }
  ],
  "cssVars": {
    "light": {
      "bjork-bg": "#f7f3ea",
      "bjork-surface": "#fffcf6",
      "bjork-surface-muted": "rgba(250, 246, 237, 0.94)",
      "bjork-surface-hover": "#f5efe3",
      "bjork-surface-active": "#efe7d8",
      "bjork-panel": "#f8f2e7",
      "bjork-menu": "rgba(255, 252, 246, 0.98)",
      "bjork-field": "rgba(255, 252, 246, 0.96)",
      "bjork-field-muted": "rgba(248, 242, 231, 0.82)",
      "bjork-field-inset": "rgba(239, 231, 216, 0.72)",
      "bjork-error-bg": "#fff0e8",
      "bjork-text": "#171717",
      "bjork-text-strong": "rgba(23, 23, 23, 0.9)",
      "bjork-text-medium": "rgba(23, 23, 23, 0.78)",
      "bjork-text-muted": "rgba(23, 23, 23, 0.68)",
      "bjork-text-soft": "rgba(23, 23, 23, 0.62)",
      "bjork-text-faint": "rgba(23, 23, 23, 0.22)",
      "bjork-inverted-text": "#fff8f0",
      "bjork-border": "#eee6db",
      "bjork-border-muted": "#f5ede2",
      "bjork-border-strong": "#e1d7c8",
      "bjork-thumb": "#a49b8e",
      "bjork-track": "#ded6ca",
      "bjork-accent": "#ec7d43",
      "bjork-accent-hover": "#f0935f",
      "bjork-accent-soft": "rgba(236, 125, 67, 0.1)",
      "bjork-accent-muted": "rgba(236, 125, 67, 0.2)",
      "bjork-accent-badge": "rgba(236, 125, 67, 0.16)",
      "bjork-accent-badge-foreground": "#8d421d",
      "bjork-accent-foreground": "#3f2112",
      "bjork-accent-fill": "#ec7d43",
      "bjork-accent-fill-hover": "#f0935f",
      "bjork-shadow-surface": "inset 0 7px 14px rgba(88, 72, 49, 0.045), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.92), inset 1px 0 0 rgba(88, 72, 49, 0.026), inset -1px 0 0 rgba(255, 255, 255, 0.68), 0 14px 22px -9px rgba(66, 52, 33, 0.11)",
      "bjork-shadow-soft": "inset 0 1px 0 rgba(88, 72, 49, 0.045), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.86)",
      "bjork-shadow-panel": "inset 0 1px 0 rgba(88, 72, 49, 0.04), inset 1px 0 0 rgba(88, 72, 49, 0.024), inset -1px 0 0 rgba(255, 255, 255, 0.64), 0 18px 38px -30px rgba(66, 52, 33, 0.2)",
      "bjork-shadow-menu": "inset 0 1px 0 rgba(88, 72, 49, 0.04), inset 0 12px 24px rgba(88, 72, 49, 0.022), inset 1px 0 0 rgba(88, 72, 49, 0.024), inset -1px 0 0 rgba(255, 255, 255, 0.62), 0 22px 44px -26px rgba(66, 52, 33, 0.22)",
      "bjork-shadow-inset": "inset 0 1px 10px rgba(88, 72, 49, 0.12), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.72)",
      "bjork-ring-offset": "#f7f3ea"
    },
    "dark": {
      "bjork-bg": "#111111",
      "bjork-surface": "#121212",
      "bjork-surface-muted": "rgba(22, 22, 22, 0.92)",
      "bjork-surface-hover": "#161616",
      "bjork-surface-active": "#202020",
      "bjork-panel": "#0d0d0d",
      "bjork-menu": "rgba(18, 18, 18, 0.98)",
      "bjork-field": "rgba(18, 18, 18, 0.95)",
      "bjork-field-muted": "rgba(18, 18, 18, 0.55)",
      "bjork-field-inset": "rgba(9, 9, 9, 0.75)",
      "bjork-error-bg": "#130d0a",
      "bjork-text": "#ededed",
      "bjork-text-strong": "rgba(237, 237, 237, 0.9)",
      "bjork-text-medium": "rgba(237, 237, 237, 0.72)",
      "bjork-text-muted": "rgba(237, 237, 237, 0.6)",
      "bjork-text-soft": "rgba(237, 237, 237, 0.5)",
      "bjork-text-faint": "rgba(237, 237, 237, 0.22)",
      "bjork-inverted-text": "#080808",
      "bjork-border": "#232323",
      "bjork-border-muted": "#1c1c1c",
      "bjork-border-strong": "#343434",
      "bjork-thumb": "#626262",
      "bjork-track": "#090909",
      "bjork-accent": "#ec5c13",
      "bjork-accent-hover": "#f07832",
      "bjork-accent-soft": "rgba(236, 92, 19, 0.12)",
      "bjork-accent-muted": "rgba(236, 92, 19, 0.24)",
      "bjork-accent-badge": "#b84a12",
      "bjork-accent-badge-foreground": "#fff2ea",
      "bjork-accent-foreground": "#fff2ea",
      "bjork-accent-fill": "#b84a12",
      "bjork-accent-fill-hover": "#a84a14",
      "bjork-shadow-surface": "inset 0 7px 14px rgba(255, 255, 255, 0.03), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.06), 0 14px 20px -6px rgba(0, 0, 0, 0.45)",
      "bjork-shadow-soft": "inset 0 1px 0 rgba(255, 255, 255, 0.045)",
      "bjork-shadow-panel": "inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 36px -28px rgba(0, 0, 0, 0.9)",
      "bjork-shadow-menu": "inset 0 1px 0 rgba(255, 255, 255, 0.055), inset 0 12px 24px rgba(255, 255, 255, 0.018), inset 0 -18px 26px rgba(0, 0, 0, 0.24), 0 22px 42px -22px rgba(0, 0, 0, 0.9)",
      "bjork-shadow-inset": "inset 0 1px 10px rgba(0, 0, 0, 0.45)",
      "bjork-ring-offset": "#080808"
    }
  },
  "css": {
    ".bjork-range": {
      "box-shadow": "inset 0 1px 1px rgba(255, 255, 255, 0.04), 0 0 14px rgba(189, 69, 20, 0.06)"
    },
    ".bjork-range::-webkit-slider-thumb": {
      "appearance": "none",
      "width": "16px",
      "height": "8px",
      "border": "0",
      "border-radius": "999px",
      "background": "var(--bjork-thumb)",
      "box-shadow": "inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.42)"
    },
    ".bjork-range::-moz-range-thumb": {
      "width": "16px",
      "height": "8px",
      "border": "0",
      "border-radius": "999px",
      "background": "var(--bjork-thumb)",
      "box-shadow": "inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.42)"
    },
    ".bjork-layered-button-accent, .bjork-layered-button-raised": {
      "position": "relative",
      "isolation": "isolate",
      "appearance": "none",
      "overflow": "hidden",
      "border": "0",
      "border-radius": "13px",
      "box-shadow": "inset 0 1px 0 #ffffff38, 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",
      "transition": "filter 150ms ease-out, box-shadow 150ms ease-out"
    },
    ".bjork-layered-button-accent::after, .bjork-layered-button-raised::after": {
      "position": "absolute",
      "inset": "0",
      "pointer-events": "none",
      "content": "\"\"",
      "border": "1.5px solid transparent",
      "border-radius": "inherit",
      "background": "linear-gradient(#ffffffb8, #0000003d 41% 75%, #ffffff47) border-box",
      "mix-blend-mode": "overlay",
      "-webkit-mask-image": "linear-gradient(#000, #000), linear-gradient(#000, #000)",
      "mask-image": "linear-gradient(#000, #000), linear-gradient(#000, #000)",
      "-webkit-mask-clip": "padding-box, border-box",
      "mask-clip": "padding-box, border-box",
      "-webkit-mask-origin": "padding-box, border-box",
      "mask-origin": "padding-box, border-box",
      "-webkit-mask-composite": "xor",
      "mask-composite": "exclude"
    },
    ".bjork-layered-button-accent": {
      "color": "oklch(100% 0 0)",
      "text-shadow": "0 -1px #00000040",
      "background": "radial-gradient(ellipse at -20px top, rgba(255, 255, 255, 0.14), transparent), linear-gradient(180deg, #ec5c13 0%, #ec5c13 62%, color-mix(in oklab, #ec5c13 84%, black 16%) 100%)"
    },
    ".bjork-layered-button-raised": {
      "color": "oklch(100% 0 0)",
      "text-shadow": "0 -1px #00000026",
      "background": "radial-gradient(ellipse at -20px top, #ffffff38, #fff0), linear-gradient(180deg, oklch(0.1881 0.006 265), oklch(0.5493 0.0081 265))"
    },
    ".dark .bjork-layered-button-raised": {
      "color": "oklch(0.2574 0.0056 265)",
      "text-shadow": "0 -1px #00000026",
      "background": "radial-gradient(ellipse at -20px top, #ffffff38, #fff0), linear-gradient(180deg, color-mix(in oklab, oklch(0.9674 0.0013 265) 80%, oklch(0.2574 0.0056 265) 20%), color-mix(in oklab, oklch(0.669 0.0107 265) 80%, oklch(0.2574 0.0056 265) 20%))"
    },
    "@media (hover: hover)": {
      ".bjork-layered-button-accent:hover": {
        "filter": "brightness(1.08) saturate(1.04)"
      },
      ".bjork-layered-button-raised:hover": {
        "filter": "brightness(1.08) contrast(0.9)"
      }
    }
  },
  "meta": {
    "collection": "Cards",
    "registryUrl": "https://ui.isaiahbjork.com/integration-card.json",
    "installCommand": "npx shadcn@latest add https://ui.isaiahbjork.com/integration-card.json"
  },
  "type": "registry:component"
}