{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "code-block-python-demo",
  "registryDependencies": [
    "@delta/code-block"
  ],
  "files": [
    {
      "path": "examples/code-block-python-demo.tsx",
      "content": "import type { PrismTheme } from \"prism-react-renderer\"\n\nimport { CodeBlock } from \"@/components/ui/code-block\"\n\nconst draculaLight: PrismTheme = {\n  plain: {\n    color: \"#282a36\",\n    backgroundColor: \"#f8f8f2\",\n  },\n  styles: [\n    {\n      types: [\"comment\", \"prolog\", \"doctype\", \"cdata\"],\n      style: {\n        color: \"#6272a4\",\n        fontStyle: \"italic\",\n      },\n    },\n    {\n      types: [\"punctuation\"],\n      style: {\n        color: \"#282a36\",\n      },\n    },\n    {\n      types: [\"property\", \"tag\", \"constant\", \"symbol\", \"deleted\"],\n      style: {\n        color: \"#d6336c\",\n      },\n    },\n    {\n      types: [\"boolean\", \"number\"],\n      style: {\n        color: \"#7c3aed\",\n      },\n    },\n    {\n      types: [\"selector\", \"attr-name\", \"string\", \"char\", \"builtin\", \"inserted\"],\n      style: {\n        color: \"#0d9488\",\n      },\n    },\n    {\n      types: [\"operator\", \"entity\", \"url\", \"variable\"],\n      style: {\n        color: \"#282a36\",\n      },\n    },\n    {\n      types: [\"atrule\", \"attr-value\", \"function\", \"class-name\"],\n      style: {\n        color: \"#ca8a04\",\n      },\n    },\n    {\n      types: [\"keyword\"],\n      style: {\n        color: \"#d6336c\",\n      },\n    },\n    {\n      types: [\"regex\", \"important\"],\n      style: {\n        color: \"#ea580c\",\n      },\n    },\n  ],\n}\n\nconst draculaDark: PrismTheme = {\n  plain: {\n    color: \"#f8f8f2\",\n    backgroundColor: \"#282a36\",\n  },\n  styles: [\n    {\n      types: [\"comment\", \"prolog\", \"doctype\", \"cdata\"],\n      style: {\n        color: \"#6272a4\",\n        fontStyle: \"italic\",\n      },\n    },\n    {\n      types: [\"punctuation\"],\n      style: {\n        color: \"#f8f8f2\",\n      },\n    },\n    {\n      types: [\"property\", \"tag\", \"constant\", \"symbol\", \"deleted\"],\n      style: {\n        color: \"#ff79c6\",\n      },\n    },\n    {\n      types: [\"boolean\", \"number\"],\n      style: {\n        color: \"#bd93f9\",\n      },\n    },\n    {\n      types: [\"selector\", \"attr-name\", \"string\", \"char\", \"builtin\", \"inserted\"],\n      style: {\n        color: \"#50fa7b\",\n      },\n    },\n    {\n      types: [\"operator\", \"entity\", \"url\", \"variable\"],\n      style: {\n        color: \"#f8f8f2\",\n      },\n    },\n    {\n      types: [\"atrule\", \"attr-value\", \"function\", \"class-name\"],\n      style: {\n        color: \"#f1fa8c\",\n      },\n    },\n    {\n      types: [\"keyword\"],\n      style: {\n        color: \"#ff79c6\",\n      },\n    },\n    {\n      types: [\"regex\", \"important\"],\n      style: {\n        color: \"#ffb86c\",\n      },\n    },\n  ],\n}\nconst pythonCode = `def fibonacci(n: int) -> list[int]:\n    \"\"\"Generate Fibonacci sequence up to n numbers. This is a long comment to test horizontal scrolling behavior in the code block component.\"\"\"\n    if n <= 0:\n        return []\n    elif n == 1:\n        return [0]\n    \n    sequence = [0, 1]\n    while len(sequence) < n:\n        sequence.append(sequence[-1] + sequence[-2])  # Add the sum of the last two numbers to the sequence list for Fibonacci calculation\n    \n    return sequence\n\ndef fibonacci_recursive(n: int, memo: dict[int, int] | None = None) -> int:\n    \"\"\"Calculate the nth Fibonacci number using memoization for better performance in recursive calls.\"\"\"\n    if memo is None:\n        memo = {}\n    if n in memo:\n        return memo[n]\n    if n <= 1:\n        return n\n    memo[n] = fibonacci_recursive(n - 1, memo) + fibonacci_recursive(n - 2, memo)\n    return memo[n]\n\nif __name__ == \"__main__\":\n    result = fibonacci(10)\n    print(f\"Fibonacci sequence: {result}\")  # Output: Fibonacci sequence: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] for the first 10 numbers`\n\nexport default function CodeBlockPythonDemo() {\n  return (\n    <CodeBlock\n      code={pythonCode}\n      language=\"python\"\n      filename=\"fibonacci.py\"\n      adaptiveTheme={{\n        light: draculaLight,\n        dark: draculaDark,\n      }}\n      useThemeBackground\n    />\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}