{ "$schema": "https://rum.dev/schema/registry.json", "name": "svelte-registry", "items": [ { "name": "card", "type": "registry:block", "files": [ { "path": "blocks/card/Card.svelte", "content": "\n\n\n\t{@render children?.()}\n\n", "type": "registry:ui", "target": "$lib/components/card/Card.svelte" }, { "path": "blocks/card/CardContent.svelte", "content": "\n\n
\n\t{@render children?.()}\n
\n", "type": "registry:ui", "target": "$lib/components/card/CardContent.svelte" }, { "path": "blocks/card/CardDescription.svelte", "content": "\n\n

\n\t{@render children?.()}\n

\n", "type": "registry:ui", "target": "$lib/components/card/CardDescription.svelte" }, { "path": "blocks/card/CardFooter.svelte", "content": "\n\n
\n\t{@render children?.()}\n
\n", "type": "registry:ui", "target": "$lib/components/card/CardFooter.svelte" }, { "path": "blocks/card/CardHeader.svelte", "content": "\n\n
\n\t{@render children?.()}\n
\n", "type": "registry:ui", "target": "$lib/components/card/CardHeader.svelte" }, { "path": "blocks/card/CardTitle.svelte", "content": "\n\n

\n\t{@render children?.()}\n

\n", "type": "registry:ui", "target": "$lib/components/card/CardTitle.svelte" }, { "path": "blocks/card/index.ts", "content": "export { default as Card } from './Card.svelte';\nexport { default as CardHeader } from './CardHeader.svelte';\nexport { default as CardContent } from './CardContent.svelte';\nexport { default as CardTitle } from './CardTitle.svelte';\nexport { default as CardDescription } from './CardDescription.svelte';\nexport { default as CardFooter } from './CardFooter.svelte';\n", "type": "registry:lib", "target": "$lib/components/card/index.ts" } ] }, { "name": "counter", "type": "registry:block", "files": [ { "path": "hooks/counter/counter.svelte.ts", "content": "/**\n * A reactive counter hook demonstrating Svelte 5's universal reactivity pattern.\n * This hook can be used across multiple components to share reactive state.\n *\n * @example\n * ```svelte\n * \n *\n * \n * ```\n */\n\ninterface CounterOptions {\n\t/** Initial count value (default: 0) */\n\tinitial?: number;\n\t/** Minimum allowed value (default: -Infinity) */\n\tmin?: number;\n\t/** Maximum allowed value (default: Infinity) */\n\tmax?: number;\n\t/** Step value for increment/decrement (default: 1) */\n\tstep?: number;\n}\n\ninterface Counter {\n\t/** Current count value */\n\treadonly count: number;\n\t/** Increment the counter by step value */\n\tincrement: () => void;\n\t/** Decrement the counter by step value */\n\tdecrement: () => void;\n\t/** Reset the counter to initial value */\n\treset: () => void;\n\t/** Set the counter to a specific value */\n\tset: (value: number) => void;\n}\n\nexport function createCounter(options: CounterOptions = {}): Counter {\n\tconst { initial = 0, min = -Infinity, max = Infinity, step = 1 } = options;\n\n\tlet count = $state(initial);\n\n\tfunction clamp(value: number): number {\n\t\treturn Math.min(Math.max(value, min), max);\n\t}\n\n\treturn {\n\t\tget count() {\n\t\t\treturn count;\n\t\t},\n\t\tincrement: () => {\n\t\t\tcount = clamp(count + step);\n\t\t},\n\t\tdecrement: () => {\n\t\t\tcount = clamp(count - step);\n\t\t},\n\t\treset: () => {\n\t\t\tcount = initial;\n\t\t},\n\t\tset: (value: number) => {\n\t\t\tcount = clamp(value);\n\t\t}\n\t};\n}\n", "type": "registry:hook", "target": "$lib/hooks/counter/counter.svelte.ts" }, { "path": "hooks/counter/index.ts", "content": "export { createCounter } from './counter.svelte';\n", "type": "registry:lib", "target": "$lib/hooks/counter/index.ts" } ] }, { "name": "button", "type": "registry:block", "files": [ { "path": "ui/button/Button.svelte", "content": "\n\n\n", "type": "registry:ui", "target": "$lib/components/button/Button.svelte" }, { "path": "ui/button/index.ts", "content": "export { default as Button } from './Button.svelte';\n", "type": "registry:lib", "target": "$lib/components/button/index.ts" } ], "dependencies": [ "tailwind-variants" ] } ] }