From 90f2f2132de3ea85f0b796929bfee3517aa63723 Mon Sep 17 00:00:00 2001 From: Rida Lamhadri <61891263+ridala@users.noreply.github.com> Date: Wed, 25 Nov 2026 18:44:32 +0000 Subject: [PATCH 1/2] feat: add a shadcn starter for Astro projects Let Stacki users create a shadcn Astro project with editable galleries, reusable components, and project settings. Use the upstream registry so generated components follow the selected base and preset. --- README.md | 2 +- electron/handlers/projectHandlers.ts | 24 +- electron/handlers/shadcnSettingsHandlers.ts | 22 + electron/main.ts | 2 + electron/preload/frameInteraction.ts | 13 +- electron/preload/preloadBridge.ts | 3 + electron/project/shadcnCreatePreview.ts | 137 ++++ .../project/shadcnCreatePreviewSources.ts | 166 +++++ .../shadcnCreateStylePreviewSources.ts | 151 +++++ electron/project/shadcnEditableGallery.ts | 108 +++ electron/project/shadcnGalleryAudits.ts | 79 +++ electron/project/shadcnSettings.ts | 391 +++++++++++ electron/project/shadcnStarter.ts | 340 ++++++++++ electron/project/shadcnStarterCatalog.ts | 223 +++++++ electron/project/shadcnStarterContent.ts | 374 +++++++++++ electron/project/shadcnStarterDirection.ts | 97 +++ electron/project/shadcnStarterExamples.ts | 616 ++++++++++++++++++ electron/project/shadcnStarterSite.ts | 82 +++ electron/project/shadcnStarterTheme.ts | 154 +++++ electron/project/starter.ts | 74 ++- shared/ipc/ipcPayloads.ts | 12 +- shared/ipc/ipcResults.ts | 5 + shared/ipc/preloadApi.ts | 3 + shared/ipc/shadcnSettings.ts | 27 + shared/ipc/shadcnStarter.ts | 136 ++++ shared/properties/i18n/messages/ar/welcome.ts | 12 + shared/properties/i18n/messages/de/welcome.ts | 12 + shared/properties/i18n/messages/en/welcome.ts | 12 + shared/properties/i18n/messages/es/welcome.ts | 12 + shared/properties/i18n/messages/fr/welcome.ts | 12 + shared/properties/i18n/messages/he/welcome.ts | 12 + shared/properties/i18n/messages/hi/welcome.ts | 12 + shared/properties/i18n/messages/id/welcome.ts | 12 + shared/properties/i18n/messages/it/welcome.ts | 12 + shared/properties/i18n/messages/ja/welcome.ts | 12 + shared/properties/i18n/messages/ko/welcome.ts | 12 + shared/properties/i18n/messages/nl/welcome.ts | 12 + shared/properties/i18n/messages/pl/welcome.ts | 12 + .../properties/i18n/messages/ptBR/welcome.ts | 12 + shared/properties/i18n/messages/ru/welcome.ts | 12 + shared/properties/i18n/messages/tr/welcome.ts | 12 + .../properties/i18n/messages/zhCN/welcome.ts | 12 + .../properties/i18n/messages/zhTW/welcome.ts | 12 + src/app/SettingsRailRows.tsx | 6 +- src/app/shell/DesktopSettings.tsx | 15 +- src/app/state/appNodeEdits.ts | 8 +- src/app/styles.css | 6 +- .../projectSettings/ShadcnSettings.tsx | 95 +++ .../projectSettings/projectSettings.css | 21 + src/features/welcome/ShadcnStarterWizard.tsx | 298 +++++++++ src/features/welcome/WelcomeScreen.tsx | 80 +-- src/features/welcome/WelcomeSplitButton.tsx | 30 +- src/features/welcome/WelcomeWizards.tsx | 56 +- src/features/welcome/shadcnStarterWizard.css | 167 +++++ src/features/welcome/welcomeBridge.ts | 16 + src/ui/ShadcnStarterLogo.tsx | 392 +++++++++++ src/ui/SplitButton.tsx | 30 +- studio/scripts/shared-source.json | 2 + test/electron/app/mainBoundaries.test.ts | 3 +- test/electron/documents/singleWriter.test.ts | 25 + test/electron/preload/canvasInteract.test.js | 12 + test/electron/project/shadcnSettings.test.ts | 80 +++ test/electron/project/shadcnStarter.test.ts | 381 +++++++++++ .../project/shadcnStarterContent.test.ts | 236 +++++++ test/renderer/app/insertSelection.test.js | 32 +- test/renderer/ui/splitButtonStyle.test.js | 3 +- test/renderer/welcome/welcome.test.js | 241 ++++++- test/renderer/welcome/welcomeBridge.test.js | 25 + test/shared/ipc/ipcPayloads.test.ts | 3 + test/shared/ipc/shadcnStarterContract.test.ts | 65 ++ 70 files changed, 5648 insertions(+), 137 deletions(-) create mode 100644 electron/handlers/shadcnSettingsHandlers.ts create mode 100644 electron/project/shadcnCreatePreview.ts create mode 100644 electron/project/shadcnCreatePreviewSources.ts create mode 100644 electron/project/shadcnCreateStylePreviewSources.ts create mode 100644 electron/project/shadcnEditableGallery.ts create mode 100644 electron/project/shadcnGalleryAudits.ts create mode 100644 electron/project/shadcnSettings.ts create mode 100644 electron/project/shadcnStarter.ts create mode 100644 electron/project/shadcnStarterCatalog.ts create mode 100644 electron/project/shadcnStarterContent.ts create mode 100644 electron/project/shadcnStarterDirection.ts create mode 100644 electron/project/shadcnStarterExamples.ts create mode 100644 electron/project/shadcnStarterSite.ts create mode 100644 electron/project/shadcnStarterTheme.ts create mode 100644 shared/ipc/shadcnSettings.ts create mode 100644 shared/ipc/shadcnStarter.ts create mode 100644 src/features/projectSettings/ShadcnSettings.tsx create mode 100644 src/features/welcome/ShadcnStarterWizard.tsx create mode 100644 src/features/welcome/shadcnStarterWizard.css create mode 100644 src/ui/ShadcnStarterLogo.tsx create mode 100644 test/electron/project/shadcnSettings.test.ts create mode 100644 test/electron/project/shadcnStarter.test.ts create mode 100644 test/electron/project/shadcnStarterContent.test.ts create mode 100644 test/shared/ipc/shadcnStarterContract.test.ts diff --git a/README.md b/README.md index f71614784..fb100d790 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ MIT licensed — fork it, build on it, ship your own version. - **Git & GitHub** — the branch chip in the title bar shows the current branch and dirty state. From its dropdown you can switch branches, create branches, commit, push, or publish a brand-new repo to GitHub (via the `gh` CLI). - **Tell an AI what's selected** — **⇧⌘C** copies whatever the canvas has selected as the trail of `file:line-range` pointers that leads to it: the page, each component drilled into on the way down, then the node itself. Paste that into Claude Code or any AI chat that can read the project and it knows exactly which markup you mean. - **Code fallback** — pages with markup too complex for the visual model open in a code editor instead, still with live preview. -- **New project** — "Start from Lumos" or "Start from Astro" creates a named site with the framework's own scaffolder and installs its dependencies for you. +- **New project.** Choose "Start from Lumos", "Start from shadcn", or "Start from Astro". Stacki creates the site and installs its dependencies. A new shadcn site opens on Style Gallery and includes a Component Gallery page. Set Astro’s `site` option to your public URL before deploying so the sitemap, canonical links, and social image URLs use that domain. ## Running in development diff --git a/electron/handlers/projectHandlers.ts b/electron/handlers/projectHandlers.ts index 8936820fa..2801dc2ba 100644 --- a/electron/handlers/projectHandlers.ts +++ b/electron/handlers/projectHandlers.ts @@ -9,6 +9,7 @@ import * as fs from 'fs'; import * as os from 'os'; import { writeNewProjectDefaults } from '../project/newProjectDefaults'; import { createStarter, newSiteDirectory, runCreateCommand, startSiteHistory, STARTERS } from '../project/starter'; +import { createShadcnStarter, inspectShadcnPreset } from '../project/shadcnStarter'; import { isWin } from '../lib/mainHelpers'; import { ensureToolPath, run } from '../lib/nodeTools'; import { isAstroProject } from '../project/projectFiles'; @@ -105,11 +106,32 @@ function registerProjectCreateAstroHandlers({ ipcMain, send, showOpenDialog }: P } function registerProjectCreateStarterHandlers({ ipcMain, send }: Pick): void { + let creatingShadcn = false; + ipcMain.handle('project:inspectShadcnPreset', (_event, { preset }) => { + ensureToolPath(); + return inspectShadcnPreset(preset); + }); // Starting from a starter. The scaffolder, the first commit and the package's // name are in ./starter.js; what is here is the install that follows and the // log the wizard reads. - ipcMain.handle('project:createStarter', async (_event, { starter = 'lumos', parentPath, name, packageManager = 'npm' }) => { + ipcMain.handle('project:createStarter', async (_event, request) => { ensureToolPath(); // npm and git are both on the PATH the Dock does not have + const { packageManager = 'npm' } = request; + if (request.starter === 'shadcn') { + // The welcome windows share create:log, so only one attempt can own this stream. + if (creatingShadcn) { + throw new Error('A shadcn site is already being created.'); + } + creatingShadcn = true; + try { + send('progress', { message: 'Creating the shadcn site…' }); + return { ok: true, ...(await createShadcnStarter(request, (text) => send('create:log', text))) }; + } finally { + send('progress', PROGRESS_CLEARED); + creatingShadcn = false; + } + } + const { starter = 'lumos', parentPath, name } = request; await requirePackageManager(packageManager); const result = await createStarter({ starter, diff --git a/electron/handlers/shadcnSettingsHandlers.ts b/electron/handlers/shadcnSettingsHandlers.ts new file mode 100644 index 000000000..1ea16712b --- /dev/null +++ b/electron/handlers/shadcnSettingsHandlers.ts @@ -0,0 +1,22 @@ +import path from 'node:path'; +import { realpathSync } from 'node:fs'; +import { err } from '../../shared/core/result'; +import type { ShadcnSettingsReply } from '../../shared/ipc/shadcnSettings'; +import { changeShadcnSetting, readShadcnSettings } from '../project/shadcnSettings'; +import type { MainHost } from './mainHost'; + +export function registerShadcnSettingsHandlers(host: Pick): void { + const withProject = async (projectPath: string, operation: (root: string) => ShadcnSettingsReply | Promise) => { + try { + const root = realpathSync(projectPath); + host.assertInProject(path.join(root, 'components.json')); + return await operation(root); + } catch (error: unknown) { + return err({ message: error instanceof Error ? error.message : String(error) }); + } + }; + host.ipcMain.handle('project:readShadcnSettings', (_event, { projectPath }) => withProject(projectPath, readShadcnSettings)); + host.ipcMain.handle('project:changeShadcnSetting', (_event, { projectPath, setting, enabled }) => + withProject(projectPath, (root) => changeShadcnSetting(root, { setting, enabled })), + ); +} diff --git a/electron/main.ts b/electron/main.ts index bb3df6b19..c783ff9a5 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -103,6 +103,7 @@ import { allowLoopbackFraming } from './app/previewFraming'; import { registerPageTemplateHandlers } from './handlers/pageTemplateHandlers'; import { registerPreviewHandlers } from './handlers/previewHandlers'; import { registerProjectHandlers } from './handlers/projectHandlers'; +import { registerShadcnSettingsHandlers } from './handlers/shadcnSettingsHandlers'; import { registerProjectScanHandlers } from './handlers/projectScanHandlers'; import { registerStyleSourceHandlers } from './handlers/styleSourceHandlers'; import { registerAppPageFilesHandlers } from './handlers/appPageFilesHandlers'; @@ -1393,6 +1394,7 @@ registerPageTemplateHandlers( ); registerPreviewHandlers(host); registerProjectHandlers(host); +registerShadcnSettingsHandlers(host); registerProjectMetadataHandlers(host); registerInstructionHandlers(host); registerAgentHandlers(host); diff --git a/electron/preload/frameInteraction.ts b/electron/preload/frameInteraction.ts index d10438abf..db281cd8a 100644 --- a/electron/preload/frameInteraction.ts +++ b/electron/preload/frameInteraction.ts @@ -56,11 +56,10 @@ export function setCanvasInteraction(next: CanvasInteraction): void { // The canvas's cursor. Select mode shows the editor's arrow everywhere. Interact // mode shows the same arrow, never the I-beam over words: it is still the editor, -// and a page's text is selected and edited as in select mode. What acts on a -// click shows the pointer, so it is plain what will navigate or run: links, -// buttons, , labels, form controls, and whatever the page itself gives a -// cursor (`cursor: pointer` on a card). Fields typed into keep their I-beam, -// since interact mode lets them take focus and keystrokes. +// and a page's text is selected and edited as in select mode. Links, summaries, +// labels and form controls get click affordances. Buttons use the site's cursor +// so a project can switch its pointer styling off. Fields typed into keep their +// I-beam because interact mode lets them take focus and keystrokes. // // Interact mode's rules have no specificity (`:where`) and no !important, so a // cursor the page sets on an element wins over them; the arrow on is @@ -74,8 +73,8 @@ export function setCanvasInteraction(next: CanvasInteraction): void { const DESIGN_CURSOR_CSS = ['*, *::before, *::after { cursor: default !important; }', 'iframe, embed, object { pointer-events: none !important; }'].join('\n'); const INTERACT_CURSOR_CSS = [ ':where(html) { cursor: default; }', - ':where(a[href], area[href], button, summary, label, select, [role="button"], [role="link"], [onclick]) { cursor: pointer; }', - ':where(input:is([type="button" i], [type="submit" i], [type="reset" i], [type="checkbox" i], [type="radio" i], [type="file" i], [type="image" i], [type="color" i], [type="range" i])) { cursor: pointer; }', + ':where(a[href], area[href], summary, label, select, [role="link"], [onclick]):where(:not(button, [role="button"])) { cursor: pointer; }', + ':where(input:is([type="button" i], [type="submit" i], [type="reset" i], [type="checkbox" i], [type="radio" i], [type="file" i], [type="image" i], [type="color" i], [type="range" i]):not([role="button"])) { cursor: pointer; }', ':where(textarea, input:not([type="button" i], [type="submit" i], [type="reset" i], [type="checkbox" i], [type="radio" i], [type="file" i], [type="image" i], [type="color" i], [type="range" i], [type="hidden" i]), [contenteditable]:not([contenteditable="false" i])) { cursor: text; }', ].join('\n'); diff --git a/electron/preload/preloadBridge.ts b/electron/preload/preloadBridge.ts index 4b5f15c80..8984086dd 100644 --- a/electron/preload/preloadBridge.ts +++ b/electron/preload/preloadBridge.ts @@ -164,6 +164,9 @@ function projectBridge() { inspectFolder: invoke('project:inspectFolder'), takeOpenedFolders: invoke('project:takeOpenedFolders'), createStarter: invoke('project:createStarter'), + readShadcnSettings: invoke('project:readShadcnSettings'), + changeShadcnSetting: invoke('project:changeShadcnSetting'), + inspectShadcnPreset: invoke('project:inspectShadcnPreset'), scanProject: invoke('project:scan'), listProjectClasses: invoke('project:classes'), watchProject: invoke('watch:start'), diff --git a/electron/project/shadcnCreatePreview.ts b/electron/project/shadcnCreatePreview.ts new file mode 100644 index 000000000..512467d08 --- /dev/null +++ b/electron/project/shadcnCreatePreview.ts @@ -0,0 +1,137 @@ +// Adapt the published Create preview to the Astro starter's local components. +import type { ShadcnBase, ShadcnIconLibrary } from '../../shared/ipc/shadcnStarter'; +import { CREATE_PREVIEW_LICENSE, createPreviewSources } from './shadcnCreatePreviewSources'; +import { createStylePreviewSources } from './shadcnCreateStylePreviewSources'; +import { shadcnEditableGallery } from './shadcnEditableGallery'; +import { shadcnGalleryAuditFixes } from './shadcnGalleryAudits'; + +const DIRECTORY = 'src/components/examples/create-preview'; +const STYLE_DIRECTORY = 'src/components/examples/create-style-preview'; + +const ICON_PACKAGES: Readonly> = { + lucide: 'lucide-react', + tabler: '@tabler/icons-react', + hugeicons: '@hugeicons/core-free-icons', + phosphor: '@phosphor-icons/react', + remixicon: '@remixicon/react', +}; + +export const SHADCN_GALLERY_TITLES = { guide: 'Style Gallery', examples: 'Component Gallery' } as const; +const GALLERY_DESCRIPTIONS = { + guide: 'Explore the typography, color tokens, and design system patterns used across this shadcn starter.', + examples: 'Browse interactive shadcn examples for forms, charts, tables, and other common interface patterns.', +} as const; +export const SHADCN_CREATE_PREVIEW_PAGE = previewPage({ page: 'examples', directory: DIRECTORY }); +export const SHADCN_CREATE_STYLE_PREVIEW_PAGE = previewPage({ page: 'guide', directory: STYLE_DIRECTORY }); + +function previewPage({ page, directory }: { readonly page: keyof typeof SHADCN_GALLERY_TITLES; readonly directory: string }): string { + const title = SHADCN_GALLERY_TITLES[page]; + return `--- +import Layout from "@/layouts/main.astro"; +import Gallery from "@/${directory.slice('src/'.length)}/Gallery.astro"; +--- + + +

${title}

+
+ +
+
+ +`; +} + +export function shadcnCreatePreviewFiles(config: { + readonly base: ShadcnBase; + readonly iconLibrary: ShadcnIconLibrary; + readonly style: string; +}): Readonly> { + const { base, iconLibrary, style } = config; + const galleries = [ + { directory: DIRECTORY, sources: createPreviewSources(base) }, + { directory: STYLE_DIRECTORY, sources: createStylePreviewSources(base) }, + ]; + return { + ...Object.fromEntries( + galleries.flatMap(({ directory, sources }) => { + const adapted = Object.fromEntries( + Object.entries(sources).map(([file, source]) => [file, withLocalIcons(withPreviewStyles(shadcnGalleryAuditFixes(file, source)), iconLibrary)]), + ); + const gallery = shadcnEditableGallery(adapted, { style, tooltip: directory === STYLE_DIRECTORY && base !== 'aria' }); + return Object.entries(gallery).map(([file, source]) => [`${directory}/${file}`, source] as const); + }), + ), + [`${DIRECTORY}/style.ts`]: styleSource(style), + [`${STYLE_DIRECTORY}/style.ts`]: STYLE_PREVIEW_TYPOGRAPHY, + [`${DIRECTORY}/LICENSE`]: CREATE_PREVIEW_LICENSE, + [`${STYLE_DIRECTORY}/LICENSE`]: CREATE_PREVIEW_LICENSE, + }; +} + +function styleSource(style: string): string { + return `// The standalone gallery uses the starter's preset instead of Create's URL state. +export function useDesignSystemSearchParams() { + return [{ style: ${JSON.stringify(style)} }] as const; +} +`; +} + +const STYLE_PREVIEW_TYPOGRAPHY = `import { useEffect, useState } from "react"; +import { useDesignSystemSearchParams } from "../create-preview/style"; + +export { useDesignSystemSearchParams }; + +export function usePreviewTypography() { + const [{ style }] = useDesignSystemSearchParams(); + const [fonts, setFonts] = useState<{ readonly body: string; readonly heading: string | undefined }>({ + body: "Default", + heading: undefined, + }); + useEffect(() => { + // Read the installed theme's actual font variables, which can differ across presets. + const theme = getComputedStyle(document.body); + const body = firstFont(theme.getPropertyValue("--font-sans")) || "Default"; + const heading = firstFont(theme.getPropertyValue("--font-heading")); + setFonts({ body, heading: heading && heading !== body ? heading : undefined }); + }, []); + return { style: style.charAt(0).toUpperCase() + style.slice(1), ...fonts }; +} + +function firstFont(value: string): string { + return (value.split(",", 1)[0] ?? "").trim().replace(/^['"]|['"]$/g, "").replace(/ Variable$/, ""); +} +`; + +function withPreviewStyles(source: string): string { + // The preset selectors compile in the site's existing Tailwind entry. + return source + .replace(/\bstyle-([a-z]+):/g, '[&:where([data-style=$1]_*)]:') + .replace(/\b3xl:/g, 'min-[1600px]:') + .replaceAll('cn-font-heading', 'font-heading'); +} + +function withLocalIcons(source: string, library: ShadcnIconLibrary): string { + const imports = new Map(); + const output = source.replace(//g, (_full, props: string) => { + const name = new RegExp(`\\b${library}="([A-Za-z][A-Za-z0-9]*)"`).exec(props)?.[1]; + if (name === undefined) { + throw new Error(`The shadcn Create preview is missing an icon for ${library}.`); + } + const local = imports.get(name) ?? `CreateIcon${imports.size}`; + imports.set(name, local); + const attributes = props.replace(/\b(?:lucide|tabler|hugeicons|phosphor|remixicon)="[^"]*"\s*/g, '').trim(); + if (library === 'hugeicons') { + return ``; + } + return `<${local} ${attributes} />`; + }); + if (imports.size === 0) { + return output; + } + const icons = [...imports].map(([name, local]) => `${name} as ${local}`).join(', '); + // Preserve React's client directive above the added imports. + const client = output.startsWith('"use client"') ? '"use client"\n' : ''; + const content = client === '' ? output : output.slice('"use client"'.length); + const hugeicons = library === 'hugeicons' ? 'import { HugeiconsIcon } from "@hugeicons/react";\n' : ''; + return `${client}${hugeicons}import { ${icons} } from "${ICON_PACKAGES[library]}";\n${content}`; +} diff --git a/electron/project/shadcnCreatePreviewSources.ts b/electron/project/shadcnCreatePreviewSources.ts new file mode 100644 index 000000000..77f01e284 --- /dev/null +++ b/electron/project/shadcnCreatePreviewSources.ts @@ -0,0 +1,166 @@ +// shadcn/ui Create preview-02, MIT, Copyright (c) 2023 shadcn. +// Source: https://github.com/shadcn-ui/ui/tree/96da9cc7f1aa10580a3741664e2a77c721206c00/apps/v4/registry/bases +// Import paths target the generated site. The card implementations are upstream. + +import type { ShadcnBase } from '../../shared/ipc/shadcnStarter'; + +export const CREATE_PREVIEW_LICENSE = + 'MIT License\n\nCopyright (c) 2023 shadcn\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n'; + +const COMMON: Readonly> = { + 'cards/card-overview.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\n\nconst activityData = [\n { month: "Jan", amount: 40 },\n { month: "Feb", amount: 55 },\n { month: "Mar", amount: 35 },\n { month: "Apr", amount: 60 },\n { month: "May", amount: 45 },\n { month: "Jun", amount: 50 },\n { month: "Jul", amount: 65 },\n { month: "Aug", amount: 40 },\n { month: "Sep", amount: 55 },\n { month: "Oct", amount: 70 },\n { month: "Nov", amount: 45 },\n { month: "Dec", amount: 80 },\n]\n\nconst chartConfig = {\n amount: {\n label: "Activity",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function CardOverview() {\n return (\n
\n \n \n Card Balance\n US$12.94\n \n US$11,337.06 Available\n \n \n \n \n \n
\n Payment Due\n 1 Apr\n
\n \n
\n
\n \n \n
\n Yearly Activity\n +US$0.25 Daily Cash\n
\n \n \n String(v).slice(0, 1)}\n className="text-[10px]"\n />\n }\n />\n \n \n \n
\n
\n
\n )\n}\n', + 'cards/claimable-balance.tsx': + 'import { Badge } from "@/components/ui/badge"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Item, ItemContent } from "@/components/ui/item"\nimport { Separator } from "@/components/ui/separator"\n\nexport function ClaimableBalance() {\n return (\n \n \n Claimable Balance\n $0.00\n \n \n Pending Setup\n \n \n \n \n \n
\n \n Net Royalties\n \n $0.00\n
\n
\n \n Processing Fee\n \n -$0.00\n
\n \n
\n \n Total Ready to Claim\n \n \n $0.00 USD\n \n
\n
\n
\n
\n \n \n Once your bank is connected, balances over $10.00 are automatically\n eligible for monthly distribution on the 15th of each month.\n \n \n
\n )\n}\n', + 'cards/empty-connect-bank.tsx': + 'import { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\n\nexport function EmptyConnectBank() {\n return (\n \n \n \n \n \n \n \n Connect Bank\n \n Link your payout method to receive monthly royalty distributions\n automatically.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/empty-distribute-track.tsx': + 'import { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\n\nexport function EmptyDistributeTrack() {\n return (\n \n \n \n \n \n \n \n Distribute Track\n \n Upload your first master to start reaching listeners on Spotify,\n Apple Music, and more.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/empty-explore-catalog.tsx': + 'import { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\n\nexport function EmptyExploreCatalog() {\n return (\n \n \n \n \n \n \n \n Explore Catalog\n \n Check your ISRC codes, metadata, and visual assets before going\n live.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/front-door.tsx': + 'import { Badge } from "@/components/ui/badge"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nexport function FrontDoor() {\n return (\n \n \n Front Door\n Smart Lock Pro\n \n
\n Locked\n \n
\n
\n
\n \n
\n \n Live\n \n
\n
\n
\n )\n}\n', + 'cards/index-investing.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nexport function IndexInvesting() {\n return (\n \n \n Dollar-Cost Averaging\n \n A strategy for building wealth over time.\n \n \n \n \n \n Over time\n \n , this smooths out the average cost of your investments. When prices\n drop, your fixed amount buys more shares. When prices rise, you buy\n fewer. The result is a lower average cost per share compared to\n lump-sum investing during volatile periods.\n \n \n \n )\n}\n', + 'cards/loading-card.tsx': + 'import { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport { Skeleton } from "@/components/ui/skeleton"\n\nexport function LoadingCard() {\n return (\n \n \n \n \n \n \n \n
\n \n \n \n
\n
\n \n \n
\n
\n
\n )\n}\n', + 'cards/new-milestone.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\n\nexport function NewMilestone() {\n return (\n \n \n Set a new milestone\n \n Define your financial target and we'll help you pace your\n savings.\n \n \n \n \n \n Goal Name\n \n \n
\n \n Target Amount\n \n \n \n Target Date\n \n \n
\n
\n
\n \n \n \n \n
\n )\n}\n', + 'cards/qr-connect.tsx': + '"use client"\n\nimport QRCode from "react-qr-code"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nexport function QrConnect() {\n return (\n \n \n
\n \n
\n
\n \n Scan to connect your mobile device\n \n Open the Ledger mobile app and scan this code to link your device.\n \n \n \n \n \n
\n )\n}\n', + 'cards/savings-progress.tsx': + '"use client"\n\nimport { Label, Pie, PieChart } from "recharts"\n\nimport { Card, CardContent, CardFooter } from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport { Separator } from "@/components/ui/separator"\n\nconst chartData = [\n { name: "saved", value: 24000, fill: "var(--color-saved)" },\n { name: "remaining", value: 6000, fill: "var(--color-remaining)" },\n]\n\nconst chartConfig = {\n saved: {\n label: "Saved",\n color: "var(--chart-2)",\n },\n remaining: {\n label: "Remaining",\n color: "var(--chart-1)",\n },\n} satisfies ChartConfig\n\nexport function SavingsProgress() {\n return (\n \n \n \n \n }\n />\n \n {\n if (viewBox && "cx" in viewBox && "cy" in viewBox) {\n return (\n \n \n $24,000\n \n \n 80% of $30,000\n \n \n )\n }\n }}\n />\n \n \n \n \n \n
\n \n Projected Finish\n \n October 2024\n
\n \n
\n Monthly Average\n $1,250\n
\n \n
\n Top Contributor\n Auto-Transfer\n
\n
\n
\n )\n}\n', + 'cards/savings-targets.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupText,\n} from "@/components/ui/input-group"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemFooter,\n ItemGroup,\n} from "@/components/ui/item"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from "@/components/ui/native-select"\nimport { Progress } from "@/components/ui/progress"\n\nexport function SavingsTargets() {\n return (\n
\n \n \n Savings Targets\n Active milestones for 2024\n \n \n \n \n \n \n \n \n \n Retirement\n \n \n $420,000\n \n \n \n \n \n 65% achieved\n \n \n $273,000\n \n \n \n \n \n \n Real Estate\n \n \n $85,000\n \n \n \n \n \n 32% achieved\n \n \n $27,200\n \n \n \n \n \n \n \n You have not met your targets for this year.\n \n \n \n \n \n Buy Investment\n \n \n \n \n Amount to Invest\n \n \n $\n \n \n \n \n \n Order Type\n \n \n Market Order\n \n \n Limit Order\n \n Stop Order\n \n \n Market orders execute at the current price.\n \n \n
\n
\n \n Estimated Shares\n \n 1.95\n
\n
\n \n Buying Power\n \n \n $12,450.00\n \n
\n
\n
\n
\n \n \n \n Trades are typically executed within minutes during market hours.\n \n \n
\n
\n )\n}\n', + 'cards/sidebar-nav.tsx': + '"use client"\n\nimport { Card } from "@/components/ui/card"\nimport {\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarSeparator,\n} from "@/components/ui/sidebar"\n\nexport function SidebarNav() {\n return (\n
\n \n \n \n \n \n Overview\n \n \n \n \n \n Dashboard\n \n \n \n \n \n Transactions\n \n \n \n \n \n Investments\n \n \n \n \n \n Accounts\n \n \n \n \n \n Spending\n \n \n \n \n \n \n \n Planning\n \n \n \n \n \n Goals\n \n \n \n \n \n Budget\n \n \n \n \n \n Reports\n \n \n \n \n \n Documents\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Account\n \n \n \n \n \n Profile\n \n \n \n \n \n Billing\n \n \n \n \n \n Notifications\n \n \n \n \n \n Security\n \n \n \n \n \n Appearance\n \n \n \n \n \n \n \n Support\n \n \n \n \n \n Help Center\n \n \n \n \n \n Contact Us\n \n \n \n \n \n Documentation\n \n \n \n \n \n Status\n \n \n \n \n \n \n \n \n \n
\n )\n}\n', + 'cards/social-links.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from "@/components/ui/input-group"\n\nexport function SocialLinks() {\n return (\n \n \n Social Links\n \n \n \n \n Spotify Artist URL\n \n \n \n \n \n \n \n \n Instagram Handle\n \n \n \n \n \n \n \n \n SoundCloud URL\n \n \n \n \n \n \n \n \n Website\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/syncing-state.tsx': + 'import { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\nimport { Spinner } from "@/components/ui/spinner"\n\nexport function SyncingState() {\n return (\n \n \n \n \n \n \n \n Syncing your accounts\n \n We're pulling in your latest transactions. This usually takes\n a few seconds.\n \n \n \n \n \n \n \n \n )\n}\n', + 'index.tsx': + 'import { AccountAccess } from "@/components/examples/create-preview/cards/account-access"\nimport { CardOverview } from "@/components/examples/create-preview/cards/card-overview"\nimport { ClaimableBalance } from "@/components/examples/create-preview/cards/claimable-balance"\nimport { ContributionHistory } from "@/components/examples/create-preview/cards/contribution-history"\nimport { CoverArt } from "@/components/examples/create-preview/cards/cover-art"\nimport { DividendIncome } from "@/components/examples/create-preview/cards/dividend-income"\nimport { EmptyConnectBank } from "@/components/examples/create-preview/cards/empty-connect-bank"\nimport { EmptyDistributeTrack } from "@/components/examples/create-preview/cards/empty-distribute-track"\nimport { EmptyExploreCatalog } from "@/components/examples/create-preview/cards/empty-explore-catalog"\nimport { Faq } from "@/components/examples/create-preview/cards/faq"\nimport { FrontDoor } from "@/components/examples/create-preview/cards/front-door"\nimport { IndexInvesting } from "@/components/examples/create-preview/cards/index-investing"\nimport { KitchenIsland } from "@/components/examples/create-preview/cards/kitchen-island"\nimport { LoadingCard } from "@/components/examples/create-preview/cards/loading-card"\nimport { NewMilestone } from "@/components/examples/create-preview/cards/new-milestone"\nimport { NotificationSettings } from "@/components/examples/create-preview/cards/notification-settings"\nimport { Payments } from "@/components/examples/create-preview/cards/payments"\nimport { PayoutThreshold } from "@/components/examples/create-preview/cards/payout-threshold"\nimport { PowerUsage } from "@/components/examples/create-preview/cards/power-usage"\nimport { Preferences } from "@/components/examples/create-preview/cards/preferences"\nimport { QrConnect } from "@/components/examples/create-preview/cards/qr-connect"\nimport { ReceivingMethod } from "@/components/examples/create-preview/cards/receiving-method"\nimport { RecentTransactions } from "@/components/examples/create-preview/cards/recent-transactions"\nimport { ReleaseCatalog } from "@/components/examples/create-preview/cards/release-catalog"\nimport { RollerShades } from "@/components/examples/create-preview/cards/roller-shades"\nimport { SavingsProgress } from "@/components/examples/create-preview/cards/savings-progress"\nimport { SavingsTargets } from "@/components/examples/create-preview/cards/savings-targets"\nimport { SidebarNav } from "@/components/examples/create-preview/cards/sidebar-nav"\nimport { SocialLinks } from "@/components/examples/create-preview/cards/social-links"\nimport { StockPerformance } from "@/components/examples/create-preview/cards/stock-performance"\nimport { SyncingState } from "@/components/examples/create-preview/cards/syncing-state"\nimport { TransferFunds } from "@/components/examples/create-preview/cards/transfer-funds"\nimport { UpcomingPayments } from "@/components/examples/create-preview/cards/upcoming-payments"\n\nexport default function Preview02Example() {\n return (\n
\n
\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n
\n
\n \n \n \n \n \n
\n
\n \n \n \n \n \n
\n
\n \n \n \n \n \n
\n
\n
\n \n )\n}\n', +}; + +const BASE: Readonly> = { + 'cards/account-access.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function AccountAccess() {\n return (\n \n \n Account Access\n \n Update your credentials or re-authenticate.\n \n \n \n \n \n Email Address\n \n \n \n
\n \n Current Password\n \n \n Forgot?\n \n
\n \n
\n
\n
\n \n \n }>\n \n \n \n \n Danger Zone\n \n Archive account and remove catalog\n \n \n \n \n \n
\n )\n}\n', + 'cards/contribution-history.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n} from "@/components/ui/item"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst chartData = [\n { month: "Dec", amount: 800 },\n { month: "Jan", amount: 1100 },\n { month: "Feb", amount: 900 },\n { month: "Mar", amount: 1300 },\n { month: "Apr", amount: 750 },\n { month: "May", amount: 1400 },\n]\n\nconst chartConfig = {\n amount: {\n label: "Contribution",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function ContributionHistory() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Contribution History\n Last 6 months of activity\n \n \n \n \n \n }\n />\n \n \n \n \n \n
\n \n \n \n Upcoming\n \n \n May 25, 2024\n \n \n $1,000 scheduled\n \n \n \n \n \n \n Auto-Save Plan\n \n \n Accelerated\n \n \n Recurring weekly\n \n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/cover-art.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n} from "@/components/ui/card"\nimport { Item } from "@/components/ui/item"\nimport { Label } from "@/components/ui/label"\n\nexport function CoverArt() {\n return (\n \n \n \n Cover Art\n \n \n \n \n \n \n \n \n \n }\n nativeButton={false}\n >\n Upload Artwork\n \n \n Minimum 3000 × 3000px\n
\n JPEG or PNG only\n
\n
\n
\n )\n}\n', + 'cards/dividend-income.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemTitle,\n} from "@/components/ui/item"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst HOLDINGS = [\n {\n name: "Vanguard VIG",\n shares: "450 Shares",\n amount: "$1,842.10",\n data: [\n { q: "Q1", value: 380 },\n { q: "Q2", value: 420 },\n { q: "Q3", value: 390 },\n { q: "Q4", value: 652 },\n ],\n },\n {\n name: "S&P 500 VOO",\n shares: "112 Shares",\n amount: "$928.40",\n data: [\n { q: "Q1", value: 180 },\n { q: "Q2", value: 210 },\n { q: "Q3", value: 320 },\n { q: "Q4", value: 218 },\n ],\n },\n {\n name: "Apple AAPL",\n shares: "85 Shares",\n amount: "$340.00",\n data: [\n { q: "Q1", value: 60 },\n { q: "Q2", value: 70 },\n { q: "Q3", value: 120 },\n { q: "Q4", value: 90 },\n ],\n },\n {\n name: "Realty Income",\n shares: "320 Shares",\n amount: "$1,139.50",\n data: [\n { q: "Q1", value: 240 },\n { q: "Q2", value: 260 },\n { q: "Q3", value: 280 },\n { q: "Q4", value: 360 },\n ],\n },\n]\n\nconst miniChartConfig = {\n value: {\n label: "Dividend",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function DividendIncome() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Q2 Dividend Income\n \n Quarterly dividend payouts across your portfolio holdings.\n \n \n \n \n \n \n \n {HOLDINGS.map((holding) => (\n \n \n {holding.name}\n {holding.shares}\n \n \n \n }\n />\n \n \n \n \n {holding.amount}\n \n \n ))}\n \n \n \n )\n}\n', + 'cards/faq.tsx': + '"use client"\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from "@/components/ui/accordion"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from "@/components/ui/tabs"\n\nconst GENERAL_QUESTIONS = [\n {\n q: "How secure is my financial data with Ledger?",\n a: "We use bank-level AES-256 encryption, SOC 2 Type II certified infrastructure, and never store your credentials. All connections use read-only access tokens. We are a SEC registered investment advisor.",\n },\n {\n q: "How do I connect my bank or investment accounts?",\n a: "Go to Settings > Linked Accounts and search for your institution. We support over 12,000 banks and brokerages via Plaid and MX.",\n },\n {\n q: "Can I export my data for tax purposes?",\n a: "Yes. Navigate to Reports > Tax Export to download a CSV or PDF summary of your transactions, dividends, and capital gains for any tax year.",\n },\n]\n\nconst BILLING_QUESTIONS = [\n {\n q: "What is the difference between Basic and Pro pricing tiers?",\n a: "Basic includes budgeting, goal tracking, and up to 3 linked accounts. Pro adds unlimited accounts, dividend tracking, portfolio analysis, and priority support.",\n },\n {\n q: "How do I cancel my subscription?",\n a: "Go to Settings > Billing > Manage Plan and click Cancel. Your access continues until the end of your current billing period.",\n },\n {\n q: "Do you offer a free trial?",\n a: "Yes. All new accounts start with a 14-day Pro trial. No credit card required.",\n },\n]\n\nconst GOALS_QUESTIONS = [\n {\n q: "How do I set up a custom financial goal?",\n a: "Click New Goal from the Savings Targets card. Choose a category, set a target amount and date, and we\'ll calculate the monthly contribution needed.",\n },\n {\n q: "Can I track multiple goals at once?",\n a: "Yes. Pro accounts can track unlimited goals. Basic accounts support up to 3 active goals.",\n },\n {\n q: "How are monthly contributions calculated?",\n a: "We divide the remaining amount by the number of months until your target date, adjusted for your current savings rate and any auto-transfer schedules.",\n },\n]\n\nfunction QuestionList({\n questions,\n}: {\n questions: { q: string; a: string }[]\n}) {\n return (\n \n {questions.map((item, index) => (\n \n {item.q}\n {item.a}\n \n ))}\n \n )\n}\n\nexport function Faq() {\n return (\n \n \n \n \n \n General\n \n \n Billing\n \n \n Goals\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/kitchen-island.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\nimport { Slider } from "@/components/ui/slider"\nimport { Switch } from "@/components/ui/switch"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nconst SCENES = {\n cooking: { brightness: [90], colorTemp: [70], volume: [30], fade: [0] },\n dining: { brightness: [50], colorTemp: [40], volume: [20], fade: [60] },\n nightlight: { brightness: [15], colorTemp: [20], volume: [0], fade: [80] },\n focus: { brightness: [100], colorTemp: [85], volume: [0], fade: [0] },\n} as const\n\nexport function KitchenIsland() {\n const [enabled, setEnabled] = React.useState(true)\n const [scene, setScene] = React.useState("cooking")\n const [brightness, setBrightness] = React.useState([90])\n const [colorTemp, setColorTemp] = React.useState([70])\n const [volume, setVolume] = React.useState([30])\n const [fade, setFade] = React.useState([0])\n\n const handleSceneChange = (value: string) => {\n if (!value) return\n setScene(value)\n const preset = SCENES[value as keyof typeof SCENES]\n setBrightness([...preset.brightness])\n setColorTemp([...preset.colorTemp])\n setVolume([...preset.volume])\n setFade([...preset.fade])\n }\n\n return (\n \n \n Kitchen Island\n Hue Color Ambient\n \n \n \n \n \n
\n Scenes\n handleSceneChange(value[0] ?? "cooking")}\n variant="outline"\n spacing={1}\n className="flex-wrap"\n >\n \n Cooking\n \n \n Dining\n \n \n Nightlight\n \n \n Focus\n \n \n
\n \n \n \n \n \n \n Brightness\n \n \n \n setBrightness(Array.isArray(value) ? [...value] : [value])\n }\n max={100}\n disabled={!enabled}\n className="w-full"\n />\n \n \n \n \n \n \n \n Color Temp\n \n \n \n setColorTemp(Array.isArray(value) ? [...value] : [value])\n }\n max={100}\n disabled={!enabled}\n />\n \n \n \n \n \n \n \n Volume\n \n \n \n setVolume(Array.isArray(value) ? [...value] : [value])\n }\n max={100}\n disabled={!enabled}\n />\n \n \n \n \n \n \n \n Fade\n \n \n \n setFade(Array.isArray(value) ? [...value] : [value])\n }\n max={100}\n disabled={!enabled}\n />\n \n \n \n
\n
\n )\n}\n', + 'cards/notification-settings.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Checkbox } from "@/components/ui/checkbox"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\n\nconst NOTIFICATIONS = [\n {\n id: "transactions",\n label: "Transaction alerts",\n description: "Deposits, withdrawals, and transfers.",\n defaultChecked: true,\n },\n {\n id: "security",\n label: "Security alerts",\n description: "Login attempts and account changes.",\n defaultChecked: true,\n },\n {\n id: "goals",\n label: "Goal milestones",\n description: "Updates at 25%, 50%, 75%, and 100%.",\n defaultChecked: false,\n },\n {\n id: "market",\n label: "Market updates",\n description: "Daily portfolio summary and price alerts.",\n defaultChecked: false,\n },\n]\n\nexport function NotificationSettings() {\n const [checked, setChecked] = React.useState>(\n Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, n.defaultChecked]))\n )\n\n const allChecked = NOTIFICATIONS.every((n) => checked[n.id])\n const someChecked = NOTIFICATIONS.some((n) => checked[n.id]) && !allChecked\n\n const handleSelectAll = (value: boolean) => {\n setChecked(Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, value])))\n }\n\n const handleToggle = (id: string, value: boolean) => {\n setChecked((prev) => ({ ...prev, [id]: value }))\n }\n\n return (\n \n \n Notifications\n \n Choose what you want to be notified about.\n \n \n \n \n \n handleSelectAll(!!v)}\n />\n \n Select all\n \n \n {NOTIFICATIONS.map((n) => (\n \n handleToggle(n.id, !!v)}\n />\n \n {n.label}\n {n.description}\n \n \n ))}\n \n \n \n \n \n \n )\n}\n', + 'cards/payments.tsx': + '"use client"\n\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from "@/components/ui/breadcrumb"\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function Payments() {\n return (\n \n \n \n \n \n Home\n \n \n \n \n }\n >\n \n Account options\n \n \n \n Profile\n Statements\n Documents\n \n \n \n \n \n \n Payments\n \n \n \n \n \n \n }>\n \n \n \n \n Change transfer limit\n \n Adjust how much you can send from your balance.\n \n \n \n \n }>\n \n \n \n \n Scheduled transfers\n \n Set up a transfer to send at a later date.\n \n \n \n \n }>\n \n \n \n \n Direct Debits\n \n Set up and manage regular payments.\n \n \n \n \n }>\n \n \n \n \n Recurring card payments\n \n Manage your repeated card transactions.\n \n \n \n \n \n \n \n )\n}\n', + 'cards/payout-threshold.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Slider } from "@/components/ui/slider"\nimport { Textarea } from "@/components/ui/textarea"\n\nconst CURRENCIES = [\n { label: "USD — United States Dollar", value: "usd" },\n { label: "EUR — Euro", value: "eur" },\n { label: "GBP — British Pound", value: "gbp" },\n { label: "JPY — Japanese Yen", value: "jpy" },\n]\n\nexport function PayoutThreshold() {\n const [amount, setAmount] = React.useState([2500])\n\n return (\n \n \n Payout Threshold\n \n Set the minimum balance required before a payout is triggered.\n \n \n \n \n \n \n \n \n \n Preferred Currency\n \n \n \n \n
\n \n Minimum Payout Amount\n \n \n ${amount[0].toFixed(2)}\n \n
\n \n setAmount(Array.isArray(value) ? [...value] : [value])\n }\n min={50}\n max={10000}\n step={50}\n />\n
\n $50 (MIN)\n $10,000 (MAX)\n
\n
\n \n Notes\n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/power-usage.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport { Progress } from "@/components/ui/progress"\nimport { Separator } from "@/components/ui/separator"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst chartData = [\n { hour: "6a", usage: 1.2 },\n { hour: "8a", usage: 2.8 },\n { hour: "10a", usage: 3.1 },\n { hour: "12p", usage: 2.4 },\n { hour: "2p", usage: 3.4 },\n { hour: "4p", usage: 2.9 },\n { hour: "6p", usage: 3.8 },\n { hour: "8p", usage: 3.2 },\n]\n\nconst chartConfig = {\n usage: {\n label: "Usage (kW)",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function PowerUsage() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Power Usage\n Whole Home\n \n \n \n \n \n }\n />\n \n \n \n \n
\n
\n \n Currently Using\n \n 3.4 kW\n
\n
\n Solar Gen\n \n +1.2 kW\n \n
\n
\n
\n \n Battery Level\n
\n \n 85%\n
\n
\n
\n )\n}\n', + 'cards/preferences.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n} from "@/components/ui/field"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Switch } from "@/components/ui/switch"\n\nconst CURRENCIES = [\n { label: "USD — United States Dollar", value: "usd" },\n { label: "EUR — Euro", value: "eur" },\n { label: "GBP — British Pound", value: "gbp" },\n { label: "JPY — Japanese Yen", value: "jpy" },\n]\n\nexport function Preferences() {\n return (\n \n \n Preferences\n \n Manage your account settings and notifications.\n \n \n \n \n \n \n \n \n Default Currency\n \n \n \n \n \n \n Public Statistics\n \n \n Allow others to see your total stream count and listening\n activity\n \n \n \n \n \n \n \n \n Email Notifications\n \n \n Monthly royalty reports and distribution updates\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/receiving-method.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from "@/components/ui/radio-group"\n\nexport function ReceivingMethod() {\n return (\n \n \n Payout Preferences\n Receiving Method\n \n \n \n \n \n \n \n \n Account Holder Name\n \n \n \n
\n Receiving Method\n \n \n \n \n \n Bank Transfer\n SWIFT / IBAN\n \n \n \n \n \n \n \n PayPal\n \n Instant Payout\n \n \n \n \n \n
\n \n IBAN / Account Number\n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/recent-transactions.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Table,\n TableBody,\n TableCell,\n TableRow,\n} from "@/components/ui/table"\n\nexport function RecentTransactions() {\n return (\n \n \n Recent Transactions\n Your latest account activity.\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n Blue Bottle Coffee\n \n Food & Drink\n \n
\n
\n \n Today, 10:24 AM\n \n \n \n -$6.50\n \n \n \n \n }\n >\n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Whole Foods Market\n \n Groceries\n \n
\n
\n \n Yesterday\n \n \n \n -$142.30\n \n \n \n \n }\n >\n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Stripe Payout\n Income\n
\n
\n \n Oct 12\n \n \n \n +$4,200.00\n \n \n \n \n }\n >\n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Uber Technologies\n \n Transport\n \n
\n
\n \n Oct 11\n \n \n \n -$24.10\n \n \n \n \n }\n >\n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Netflix Subscription\n \n Entertainment\n \n
\n
\n \n Oct 10\n \n \n \n -$19.99\n \n \n \n \n }\n >\n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n
\n
\n
\n
\n )\n}\n', + 'cards/release-catalog.tsx': + '"use client"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from "@/components/ui/input-group"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nconst HOLDINGS = [\n {\n ticker: "VOO",\n name: "Vanguard S&P 500 ETF",\n type: "ETF",\n added: "Jan 2021",\n shares: "112",\n value: "$48,230.40",\n },\n {\n ticker: "VIG",\n name: "Vanguard Dividend Appreciation",\n type: "ETF",\n added: "Mar 2022",\n shares: "450",\n value: "$26,033.79",\n },\n {\n ticker: "AAPL",\n name: "Apple Inc.",\n type: "Stock",\n added: "Nov 2020",\n shares: "85",\n value: "$18,488.90",\n },\n {\n ticker: "O",\n name: "Realty Income Corp",\n type: "REIT",\n added: "Jun 2023",\n shares: "320",\n value: "$15,136.59",\n },\n]\n\nexport function ReleaseCatalog() {\n return (\n \n \n
\n \n \n \n \n \n \n \n Stocks\n ETFs\n REITs\n \n
\n
\n \n \n {HOLDINGS.map((holding) => (\n \n \n
\n {holding.ticker}\n
\n
\n \n {holding.name}\n \n {holding.shares} Shares · {holding.added}\n \n \n
\n {holding.type}\n
\n \n Value\n \n \n {holding.value}\n \n
\n
\n
\n ))}\n
\n
\n
\n )\n}\n', + 'cards/roller-shades.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Slider } from "@/components/ui/slider"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nexport function RollerShades() {\n const [position, setPosition] = React.useState([50])\n\n const preset =\n position[0] <= 10 ? "open" : position[0] >= 90 ? "closed" : "half"\n\n return (\n \n \n Living Room\n Roller Shades\n \n \n
\n \n
\n
\n \n Open\n \n \n setPosition(Array.isArray(value) ? [...value] : [value])\n }\n max={100}\n className="flex-1"\n />\n \n Close\n \n
\n
\n \n {\n const v = value[0]\n if (v === "open") setPosition([0])\n if (v === "half") setPosition([50])\n if (v === "closed") setPosition([100])\n }}\n variant="outline"\n spacing={1}\n className="w-full"\n >\n \n Open\n \n \n Half\n \n \n Closed\n \n \n \n
\n )\n}\n', + 'cards/stock-performance.tsx': + '"use client"\n\nimport * as React from "react"\nimport { Area, AreaChart, CartesianGrid, XAxis } from "recharts"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from "@/components/ui/combobox"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Separator } from "@/components/ui/separator"\n\nconst TICKERS = ["VOO", "VIG", "AAPL", "MSFT", "GOOGL", "AMZN", "TSLA"]\n\nconst CHART_DATA: Record = {\n VOO: [\n { month: "Jan", price: 412 },\n { month: "Feb", price: 438 },\n { month: "Mar", price: 395 },\n { month: "Apr", price: 450 },\n { month: "May", price: 420 },\n { month: "Jun", price: 462 },\n ],\n AAPL: [\n { month: "Jan", price: 185 },\n { month: "Feb", price: 210 },\n { month: "Mar", price: 172 },\n { month: "Apr", price: 198 },\n { month: "May", price: 178 },\n { month: "Jun", price: 215 },\n ],\n}\n\nconst DEFAULT_DATA = [\n { month: "Jan", price: 100 },\n { month: "Feb", price: 118 },\n { month: "Mar", price: 95 },\n { month: "Apr", price: 125 },\n { month: "May", price: 108 },\n { month: "Jun", price: 130 },\n]\n\nconst chartConfig = {\n price: {\n label: "Price",\n color: "var(--chart-1)",\n },\n} satisfies ChartConfig\n\nexport function StockPerformance() {\n const [ticker, setTicker] = React.useState("VOO")\n\n const data = CHART_DATA[ticker] ?? DEFAULT_DATA\n\n return (\n \n \n Stock Performance\n 6-month price history.\n \n \n \n \n Ticker\n {\n if (value !== null) setTicker(value)\n }}\n >\n \n \n No tickers found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }\n />\n \n \n \n \n \n )\n}\n', + 'cards/transfer-funds.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupText,\n} from "@/components/ui/input-group"\nimport { Item, ItemContent } from "@/components/ui/item"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Separator } from "@/components/ui/separator"\n\nconst FROM_ACCOUNTS = [\n { label: "Main Checking (··8402) — $12,450.00", value: "checking" },\n { label: "Business (··7731) — $8,920.00", value: "business" },\n]\n\nconst TO_ACCOUNTS = [\n { label: "High Yield Savings (··1192) — $42,100.00", value: "savings" },\n { label: "Investment (··3349) — $18,200.00", value: "investment" },\n]\n\nexport function TransferFunds() {\n return (\n \n \n Transfer Funds\n \n Move money between your connected accounts.\n \n \n \n \n \n \n \n \n \n Amount to Transfer\n \n \n \n $\n \n \n \n \n \n From Account\n \n \n \n To Account\n \n \n \n \n
\n \n Estimated arrival\n \n Today, Apr 14\n
\n \n
\n \n Transaction fee\n \n $0.00\n
\n \n
\n Total amount\n \n $1,200.00\n \n
\n
\n
\n
\n
\n \n \n \n
\n )\n}\n', + 'cards/upcoming-payments.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Calendar } from "@/components/ui/calendar"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function UpcomingPayments() {\n const [date, setDate] = React.useState(new Date())\n\n return (\n \n \n Upcoming Payments\n \n Select a date to view scheduled payments.\n \n \n \n \n \n \n \n \n \n Netflix Subscription\n Apr 15, 2024\n \n $19.99\n \n \n \n Rent Payment\n Apr 1, 2024\n \n $2,400.00\n \n \n \n Auto Insurance\n Apr 22, 2024\n \n $186.00\n \n \n \n \n )\n}\n', +}; + +const RADIX: Readonly> = { + 'cards/account-access.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function AccountAccess() {\n return (\n \n \n Account Access\n \n Update your credentials or re-authenticate.\n \n \n \n \n \n Email Address\n \n \n \n
\n \n Current Password\n \n \n Forgot?\n \n
\n \n
\n
\n
\n \n \n \n \n \n \n \n \n Danger Zone\n \n Archive account and remove catalog\n \n \n \n \n \n \n
\n )\n}\n', + 'cards/contribution-history.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n} from "@/components/ui/item"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst chartData = [\n { month: "Dec", amount: 800 },\n { month: "Jan", amount: 1100 },\n { month: "Feb", amount: 900 },\n { month: "Mar", amount: 1300 },\n { month: "Apr", amount: 750 },\n { month: "May", amount: 1400 },\n]\n\nconst chartConfig = {\n amount: {\n label: "Contribution",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function ContributionHistory() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Contribution History\n Last 6 months of activity\n \n \n \n \n \n }\n />\n \n \n \n \n \n
\n \n \n \n Upcoming\n \n \n May 25, 2024\n \n \n $1,000 scheduled\n \n \n \n \n \n \n Auto-Save Plan\n \n \n Accelerated\n \n \n Recurring weekly\n \n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/cover-art.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n} from "@/components/ui/card"\nimport { Item } from "@/components/ui/item"\nimport { Label } from "@/components/ui/label"\n\nexport function CoverArt() {\n return (\n \n \n \n Cover Art\n \n \n \n \n \n \n \n \n \n \n \n Minimum 3000 × 3000px\n
\n JPEG or PNG only\n
\n
\n
\n )\n}\n', + 'cards/dividend-income.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemTitle,\n} from "@/components/ui/item"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst HOLDINGS = [\n {\n name: "Vanguard VIG",\n shares: "450 Shares",\n amount: "$1,842.10",\n data: [\n { q: "Q1", value: 380 },\n { q: "Q2", value: 420 },\n { q: "Q3", value: 390 },\n { q: "Q4", value: 652 },\n ],\n },\n {\n name: "S&P 500 VOO",\n shares: "112 Shares",\n amount: "$928.40",\n data: [\n { q: "Q1", value: 180 },\n { q: "Q2", value: 210 },\n { q: "Q3", value: 320 },\n { q: "Q4", value: 218 },\n ],\n },\n {\n name: "Apple AAPL",\n shares: "85 Shares",\n amount: "$340.00",\n data: [\n { q: "Q1", value: 60 },\n { q: "Q2", value: 70 },\n { q: "Q3", value: 120 },\n { q: "Q4", value: 90 },\n ],\n },\n {\n name: "Realty Income",\n shares: "320 Shares",\n amount: "$1,139.50",\n data: [\n { q: "Q1", value: 240 },\n { q: "Q2", value: 260 },\n { q: "Q3", value: 280 },\n { q: "Q4", value: 360 },\n ],\n },\n]\n\nconst miniChartConfig = {\n value: {\n label: "Dividend",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function DividendIncome() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Q2 Dividend Income\n \n Quarterly dividend payouts across your portfolio holdings.\n \n \n \n \n \n \n \n {HOLDINGS.map((holding) => (\n \n \n {holding.name}\n {holding.shares}\n \n \n \n }\n />\n \n \n \n \n {holding.amount}\n \n \n ))}\n \n \n \n )\n}\n', + 'cards/faq.tsx': + '"use client"\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from "@/components/ui/accordion"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from "@/components/ui/tabs"\n\nconst GENERAL_QUESTIONS = [\n {\n q: "How secure is my financial data with Ledger?",\n a: "We use bank-level AES-256 encryption, SOC 2 Type II certified infrastructure, and never store your credentials. All connections use read-only access tokens. We are a SEC registered investment advisor.",\n },\n {\n q: "How do I connect my bank or investment accounts?",\n a: "Go to Settings > Linked Accounts and search for your institution. We support over 12,000 banks and brokerages via Plaid and MX.",\n },\n {\n q: "Can I export my data for tax purposes?",\n a: "Yes. Navigate to Reports > Tax Export to download a CSV or PDF summary of your transactions, dividends, and capital gains for any tax year.",\n },\n]\n\nconst BILLING_QUESTIONS = [\n {\n q: "What is the difference between Basic and Pro pricing tiers?",\n a: "Basic includes budgeting, goal tracking, and up to 3 linked accounts. Pro adds unlimited accounts, dividend tracking, portfolio analysis, and priority support.",\n },\n {\n q: "How do I cancel my subscription?",\n a: "Go to Settings > Billing > Manage Plan and click Cancel. Your access continues until the end of your current billing period.",\n },\n {\n q: "Do you offer a free trial?",\n a: "Yes. All new accounts start with a 14-day Pro trial. No credit card required.",\n },\n]\n\nconst GOALS_QUESTIONS = [\n {\n q: "How do I set up a custom financial goal?",\n a: "Click New Goal from the Savings Targets card. Choose a category, set a target amount and date, and we\'ll calculate the monthly contribution needed.",\n },\n {\n q: "Can I track multiple goals at once?",\n a: "Yes. Pro accounts can track unlimited goals. Basic accounts support up to 3 active goals.",\n },\n {\n q: "How are monthly contributions calculated?",\n a: "We divide the remaining amount by the number of months until your target date, adjusted for your current savings rate and any auto-transfer schedules.",\n },\n]\n\nfunction QuestionList({\n questions,\n}: {\n questions: { q: string; a: string }[]\n}) {\n return (\n \n {questions.map((item, index) => (\n \n {item.q}\n {item.a}\n \n ))}\n \n )\n}\n\nexport function Faq() {\n return (\n \n \n \n \n \n General\n \n \n Billing\n \n \n Goals\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/kitchen-island.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\nimport { Slider } from "@/components/ui/slider"\nimport { Switch } from "@/components/ui/switch"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nconst SCENES = {\n cooking: { brightness: [90], colorTemp: [70], volume: [30], fade: [0] },\n dining: { brightness: [50], colorTemp: [40], volume: [20], fade: [60] },\n nightlight: { brightness: [15], colorTemp: [20], volume: [0], fade: [80] },\n focus: { brightness: [100], colorTemp: [85], volume: [0], fade: [0] },\n} as const\n\nexport function KitchenIsland() {\n const [enabled, setEnabled] = React.useState(true)\n const [scene, setScene] = React.useState("cooking")\n const [brightness, setBrightness] = React.useState([90])\n const [colorTemp, setColorTemp] = React.useState([70])\n const [volume, setVolume] = React.useState([30])\n const [fade, setFade] = React.useState([0])\n\n const handleSceneChange = (value: string) => {\n if (!value) return\n setScene(value)\n const preset = SCENES[value as keyof typeof SCENES]\n setBrightness([...preset.brightness])\n setColorTemp([...preset.colorTemp])\n setVolume([...preset.volume])\n setFade([...preset.fade])\n }\n\n return (\n \n \n Kitchen Island\n Hue Color Ambient\n \n \n \n \n \n
\n Scenes\n \n \n Cooking\n \n \n Dining\n \n \n Nightlight\n \n \n Focus\n \n \n
\n \n \n \n \n \n \n Brightness\n \n \n \n \n \n \n \n \n \n \n Color Temp\n \n \n \n \n \n \n \n \n \n \n Volume\n \n \n \n \n \n \n \n \n \n \n Fade\n \n \n \n \n \n \n
\n
\n )\n}\n', + 'cards/notification-settings.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Checkbox } from "@/components/ui/checkbox"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\n\nconst NOTIFICATIONS = [\n {\n id: "transactions",\n label: "Transaction alerts",\n description: "Deposits, withdrawals, and transfers.",\n defaultChecked: true,\n },\n {\n id: "security",\n label: "Security alerts",\n description: "Login attempts and account changes.",\n defaultChecked: true,\n },\n {\n id: "goals",\n label: "Goal milestones",\n description: "Updates at 25%, 50%, 75%, and 100%.",\n defaultChecked: false,\n },\n {\n id: "market",\n label: "Market updates",\n description: "Daily portfolio summary and price alerts.",\n defaultChecked: false,\n },\n]\n\nexport function NotificationSettings() {\n const [checked, setChecked] = React.useState>(\n Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, n.defaultChecked]))\n )\n\n const allChecked = NOTIFICATIONS.every((n) => checked[n.id])\n const someChecked = NOTIFICATIONS.some((n) => checked[n.id]) && !allChecked\n\n const handleSelectAll = (value: boolean) => {\n setChecked(Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, value])))\n }\n\n const handleToggle = (id: string, value: boolean) => {\n setChecked((prev) => ({ ...prev, [id]: value }))\n }\n\n return (\n \n \n Notifications\n \n Choose what you want to be notified about.\n \n \n \n \n \n handleSelectAll(!!v)}\n />\n \n Select all\n \n \n {NOTIFICATIONS.map((n) => (\n \n handleToggle(n.id, !!v)}\n />\n \n {n.label}\n {n.description}\n \n \n ))}\n \n \n \n \n \n \n )\n}\n', + 'cards/payments.tsx': + '"use client"\n\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from "@/components/ui/breadcrumb"\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function Payments() {\n return (\n \n \n \n \n \n Home\n \n \n \n \n \n \n \n \n \n Profile\n Statements\n Documents\n \n \n \n \n \n \n Payments\n \n \n \n \n \n \n \n \n \n \n \n \n Change transfer limit\n \n Adjust how much you can send from your balance.\n \n \n \n \n \n \n \n \n \n \n \n Scheduled transfers\n \n Set up a transfer to send at a later date.\n \n \n \n \n \n \n \n \n \n \n \n Direct Debits\n \n Set up and manage regular payments.\n \n \n \n \n \n \n \n \n \n \n \n Recurring card payments\n \n Manage your repeated card transactions.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/payout-threshold.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Slider } from "@/components/ui/slider"\nimport { Textarea } from "@/components/ui/textarea"\n\nexport function PayoutThreshold() {\n const [amount, setAmount] = React.useState([2500])\n\n return (\n \n \n Payout Threshold\n \n Set the minimum balance required before a payout is triggered.\n \n \n \n \n \n \n \n \n \n Preferred Currency\n \n \n \n \n
\n \n Minimum Payout Amount\n \n \n ${amount[0].toFixed(2)}\n \n
\n \n
\n $50 (MIN)\n $10,000 (MAX)\n
\n
\n \n Notes\n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/power-usage.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport { Progress } from "@/components/ui/progress"\nimport { Separator } from "@/components/ui/separator"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst chartData = [\n { hour: "6a", usage: 1.2 },\n { hour: "8a", usage: 2.8 },\n { hour: "10a", usage: 3.1 },\n { hour: "12p", usage: 2.4 },\n { hour: "2p", usage: 3.4 },\n { hour: "4p", usage: 2.9 },\n { hour: "6p", usage: 3.8 },\n { hour: "8p", usage: 3.2 },\n]\n\nconst chartConfig = {\n usage: {\n label: "Usage (kW)",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function PowerUsage() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Power Usage\n Whole Home\n \n \n \n \n \n }\n />\n \n \n \n \n
\n
\n \n Currently Using\n \n 3.4 kW\n
\n
\n Solar Gen\n \n +1.2 kW\n \n
\n
\n
\n \n Battery Level\n
\n \n 85%\n
\n
\n
\n )\n}\n', + 'cards/preferences.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n} from "@/components/ui/field"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Switch } from "@/components/ui/switch"\n\nexport function Preferences() {\n return (\n \n \n Preferences\n \n Manage your account settings and notifications.\n \n \n \n \n \n \n \n \n Default Currency\n \n \n \n \n \n \n Public Statistics\n \n \n Allow others to see your total stream count and listening\n activity\n \n \n \n \n \n \n \n \n Email Notifications\n \n \n Monthly royalty reports and distribution updates\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/receiving-method.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from "@/components/ui/radio-group"\n\nexport function ReceivingMethod() {\n return (\n \n \n Payout Preferences\n Receiving Method\n \n \n \n \n \n \n \n \n Account Holder Name\n \n \n \n
\n Receiving Method\n \n \n \n \n \n Bank Transfer\n SWIFT / IBAN\n \n \n \n \n \n \n \n PayPal\n \n Instant Payout\n \n \n \n \n \n
\n \n IBAN / Account Number\n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/recent-transactions.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Table,\n TableBody,\n TableCell,\n TableRow,\n} from "@/components/ui/table"\n\nexport function RecentTransactions() {\n return (\n \n \n Recent Transactions\n Your latest account activity.\n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n Blue Bottle Coffee\n \n Food & Drink\n \n
\n
\n \n Today, 10:24 AM\n \n \n \n -$6.50\n \n \n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Whole Foods Market\n \n Groceries\n \n
\n
\n \n Yesterday\n \n \n \n -$142.30\n \n \n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Stripe Payout\n Income\n
\n
\n \n Oct 12\n \n \n \n +$4,200.00\n \n \n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Uber Technologies\n \n Transport\n \n
\n
\n \n Oct 11\n \n \n \n -$24.10\n \n \n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Netflix Subscription\n \n Entertainment\n \n
\n
\n \n Oct 10\n \n \n \n -$19.99\n \n \n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n
\n
\n
\n
\n )\n}\n', + 'cards/release-catalog.tsx': + '"use client"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from "@/components/ui/input-group"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nconst HOLDINGS = [\n {\n ticker: "VOO",\n name: "Vanguard S&P 500 ETF",\n type: "ETF",\n added: "Jan 2021",\n shares: "112",\n value: "$48,230.40",\n },\n {\n ticker: "VIG",\n name: "Vanguard Dividend Appreciation",\n type: "ETF",\n added: "Mar 2022",\n shares: "450",\n value: "$26,033.79",\n },\n {\n ticker: "AAPL",\n name: "Apple Inc.",\n type: "Stock",\n added: "Nov 2020",\n shares: "85",\n value: "$18,488.90",\n },\n {\n ticker: "O",\n name: "Realty Income Corp",\n type: "REIT",\n added: "Jun 2023",\n shares: "320",\n value: "$15,136.59",\n },\n]\n\nexport function ReleaseCatalog() {\n return (\n \n \n
\n \n \n \n \n \n \n \n Stocks\n ETFs\n REITs\n \n
\n
\n \n \n {HOLDINGS.map((holding) => (\n \n \n
\n {holding.ticker}\n
\n
\n \n {holding.name}\n \n {holding.shares} Shares · {holding.added}\n \n \n
\n {holding.type}\n
\n \n Value\n \n \n {holding.value}\n \n
\n
\n
\n ))}\n
\n
\n
\n )\n}\n', + 'cards/roller-shades.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Slider } from "@/components/ui/slider"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nexport function RollerShades() {\n const [position, setPosition] = React.useState([50])\n\n const preset =\n position[0] <= 10 ? "open" : position[0] >= 90 ? "closed" : "half"\n\n return (\n \n \n Living Room\n Roller Shades\n \n \n
\n \n
\n
\n \n Open\n \n \n \n Close\n \n
\n
\n \n {\n if (value === "open") setPosition([0])\n if (value === "half") setPosition([50])\n if (value === "closed") setPosition([100])\n }}\n variant="outline"\n spacing={1}\n className="w-full"\n >\n \n Open\n \n \n Half\n \n \n Closed\n \n \n \n
\n )\n}\n', + 'cards/stock-performance.tsx': + '"use client"\n\nimport * as React from "react"\nimport { Area, AreaChart, CartesianGrid, XAxis } from "recharts"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from "@/components/ui/combobox"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Separator } from "@/components/ui/separator"\n\nconst TICKERS = ["VOO", "VIG", "AAPL", "MSFT", "GOOGL", "AMZN", "TSLA"]\n\nconst CHART_DATA: Record = {\n VOO: [\n { month: "Jan", price: 412 },\n { month: "Feb", price: 438 },\n { month: "Mar", price: 395 },\n { month: "Apr", price: 450 },\n { month: "May", price: 420 },\n { month: "Jun", price: 462 },\n ],\n AAPL: [\n { month: "Jan", price: 185 },\n { month: "Feb", price: 210 },\n { month: "Mar", price: 172 },\n { month: "Apr", price: 198 },\n { month: "May", price: 178 },\n { month: "Jun", price: 215 },\n ],\n}\n\nconst DEFAULT_DATA = [\n { month: "Jan", price: 100 },\n { month: "Feb", price: 118 },\n { month: "Mar", price: 95 },\n { month: "Apr", price: 125 },\n { month: "May", price: 108 },\n { month: "Jun", price: 130 },\n]\n\nconst chartConfig = {\n price: {\n label: "Price",\n color: "var(--chart-1)",\n },\n} satisfies ChartConfig\n\nexport function StockPerformance() {\n const [ticker, setTicker] = React.useState("VOO")\n\n const data = CHART_DATA[ticker] ?? DEFAULT_DATA\n\n return (\n \n \n Stock Performance\n 6-month price history.\n \n \n \n \n Ticker\n {\n if (value !== null) setTicker(value)\n }}\n >\n \n \n No tickers found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }\n />\n \n \n \n \n \n )\n}\n', + 'cards/transfer-funds.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupText,\n} from "@/components/ui/input-group"\nimport { Item, ItemContent } from "@/components/ui/item"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Separator } from "@/components/ui/separator"\n\nexport function TransferFunds() {\n return (\n \n \n Transfer Funds\n \n Move money between your connected accounts.\n \n \n \n \n \n \n \n \n \n Amount to Transfer\n \n \n \n $\n \n \n \n \n \n From Account\n \n \n \n To Account\n \n \n \n \n
\n \n Estimated arrival\n \n Today, Apr 14\n
\n \n
\n \n Transaction fee\n \n $0.00\n
\n \n
\n Total amount\n \n $1,200.00\n \n
\n
\n
\n
\n
\n \n \n \n
\n )\n}\n', + 'cards/upcoming-payments.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Calendar } from "@/components/ui/calendar"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function UpcomingPayments() {\n const [date, setDate] = React.useState(new Date())\n\n return (\n \n \n Upcoming Payments\n \n Select a date to view scheduled payments.\n \n \n \n \n \n \n \n \n \n Netflix Subscription\n Apr 15, 2024\n \n $19.99\n \n \n \n Rent Payment\n Apr 1, 2024\n \n $2,400.00\n \n \n \n Auto Insurance\n Apr 22, 2024\n \n $186.00\n \n \n \n \n )\n}\n', +}; + +const ARIA: Readonly> = { + 'cards/account-access.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function AccountAccess() {\n return (\n \n \n Account Access\n \n Update your credentials or re-authenticate.\n \n \n \n \n \n Email Address\n \n \n \n
\n \n Current Password\n \n \n Forgot?\n \n
\n \n
\n
\n
\n \n \n \n \n \n \n \n Danger Zone\n \n Archive account and remove catalog\n \n \n \n \n \n
\n )\n}\n', + 'cards/contribution-history.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n} from "@/components/ui/item"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst chartData = [\n { month: "Dec", amount: 800 },\n { month: "Jan", amount: 1100 },\n { month: "Feb", amount: 900 },\n { month: "Mar", amount: 1300 },\n { month: "Apr", amount: 750 },\n { month: "May", amount: 1400 },\n]\n\nconst chartConfig = {\n amount: {\n label: "Contribution",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function ContributionHistory() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n return (\n \n \n Contribution History\n Last 6 months of activity\n \n \n \n \n \n }\n />\n \n \n \n \n \n
\n \n \n \n Upcoming\n \n \n May 25, 2024\n \n \n $1,000 scheduled\n \n \n \n \n \n \n Auto-Save Plan\n \n \n Accelerated\n \n \n Recurring weekly\n \n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/cover-art.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n} from "@/components/ui/card"\nimport { Item } from "@/components/ui/item"\nimport { Label } from "@/components/ui/label"\n\nexport function CoverArt() {\n return (\n \n \n \n Cover Art\n \n \n \n \n \n \n \n \n \n \n \n Minimum 3000 × 3000px\n
\n JPEG or PNG only\n
\n
\n
\n )\n}\n', + 'cards/dividend-income.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemTitle,\n} from "@/components/ui/item"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst HOLDINGS = [\n {\n name: "Vanguard VIG",\n shares: "450 Shares",\n amount: "$1,842.10",\n data: [\n { q: "Q1", value: 380 },\n { q: "Q2", value: 420 },\n { q: "Q3", value: 390 },\n { q: "Q4", value: 652 },\n ],\n },\n {\n name: "S&P 500 VOO",\n shares: "112 Shares",\n amount: "$928.40",\n data: [\n { q: "Q1", value: 180 },\n { q: "Q2", value: 210 },\n { q: "Q3", value: 320 },\n { q: "Q4", value: 218 },\n ],\n },\n {\n name: "Apple AAPL",\n shares: "85 Shares",\n amount: "$340.00",\n data: [\n { q: "Q1", value: 60 },\n { q: "Q2", value: 70 },\n { q: "Q3", value: 120 },\n { q: "Q4", value: 90 },\n ],\n },\n {\n name: "Realty Income",\n shares: "320 Shares",\n amount: "$1,139.50",\n data: [\n { q: "Q1", value: 240 },\n { q: "Q2", value: 260 },\n { q: "Q3", value: 280 },\n { q: "Q4", value: 360 },\n ],\n },\n]\n\nconst miniChartConfig = {\n value: {\n label: "Dividend",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function DividendIncome() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n return (\n \n \n Q2 Dividend Income\n \n Quarterly dividend payouts across your portfolio holdings.\n \n \n \n \n \n \n \n {HOLDINGS.map((holding) => (\n \n \n {holding.name}\n {holding.shares}\n \n \n \n }\n />\n \n \n \n \n {holding.amount}\n \n \n ))}\n \n \n \n )\n}\n', + 'cards/faq.tsx': + '"use client"\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from "@/components/ui/accordion"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from "@/components/ui/tabs"\n\nconst GENERAL_QUESTIONS = [\n {\n q: "How secure is my financial data with Ledger?",\n a: "We use bank-level AES-256 encryption, SOC 2 Type II certified infrastructure, and never store your credentials. All connections use read-only access tokens. We are a SEC registered investment advisor.",\n },\n {\n q: "How do I connect my bank or investment accounts?",\n a: "Go to Settings > Linked Accounts and search for your institution. We support over 12,000 banks and brokerages via Plaid and MX.",\n },\n {\n q: "Can I export my data for tax purposes?",\n a: "Yes. Navigate to Reports > Tax Export to download a CSV or PDF summary of your transactions, dividends, and capital gains for any tax year.",\n },\n]\n\nconst BILLING_QUESTIONS = [\n {\n q: "What is the difference between Basic and Pro pricing tiers?",\n a: "Basic includes budgeting, goal tracking, and up to 3 linked accounts. Pro adds unlimited accounts, dividend tracking, portfolio analysis, and priority support.",\n },\n {\n q: "How do I cancel my subscription?",\n a: "Go to Settings > Billing > Manage Plan and click Cancel. Your access continues until the end of your current billing period.",\n },\n {\n q: "Do you offer a free trial?",\n a: "Yes. All new accounts start with a 14-day Pro trial. No credit card required.",\n },\n]\n\nconst GOALS_QUESTIONS = [\n {\n q: "How do I set up a custom financial goal?",\n a: "Click New Goal from the Savings Targets card. Choose a category, set a target amount and date, and we\'ll calculate the monthly contribution needed.",\n },\n {\n q: "Can I track multiple goals at once?",\n a: "Yes. Pro accounts can track unlimited goals. Basic accounts support up to 3 active goals.",\n },\n {\n q: "How are monthly contributions calculated?",\n a: "We divide the remaining amount by the number of months until your target date, adjusted for your current savings rate and any auto-transfer schedules.",\n },\n]\n\nfunction QuestionList({\n questions,\n}: {\n questions: { q: string; a: string }[]\n}) {\n return (\n \n {questions.map((item, index) => (\n \n {item.q}\n {item.a}\n \n ))}\n \n )\n}\n\nexport function Faq() {\n return (\n \n \n \n \n \n General\n \n \n Billing\n \n \n Goals\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/kitchen-island.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\nimport { Slider } from "@/components/ui/slider"\nimport { Switch } from "@/components/ui/switch"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nconst SCENES = {\n cooking: { brightness: [90], colorTemp: [70], volume: [30], fade: [0] },\n dining: { brightness: [50], colorTemp: [40], volume: [20], fade: [60] },\n nightlight: { brightness: [15], colorTemp: [20], volume: [0], fade: [80] },\n focus: { brightness: [100], colorTemp: [85], volume: [0], fade: [0] },\n} as const\n\nexport function KitchenIsland() {\n const [enabled, setEnabled] = React.useState(true)\n const [scene, setScene] = React.useState("cooking")\n const [brightness, setBrightness] = React.useState([90])\n const [colorTemp, setColorTemp] = React.useState([70])\n const [volume, setVolume] = React.useState([30])\n const [fade, setFade] = React.useState([0])\n\n const handleSceneChange = (value: string) => {\n if (!value) return\n setScene(value)\n const preset = SCENES[value as keyof typeof SCENES]\n setBrightness([...preset.brightness])\n setColorTemp([...preset.colorTemp])\n setVolume([...preset.volume])\n setFade([...preset.fade])\n }\n\n return (\n \n \n Kitchen Island\n Hue Color Ambient\n \n \n \n \n \n
\n Scenes\n \n handleSceneChange((Array.from(value)[0] as string) ?? "cooking")\n }\n variant="outline"\n spacing={1}\n className="flex-wrap"\n >\n \n Cooking\n \n \n Dining\n \n \n Nightlight\n \n \n Focus\n \n \n
\n \n \n \n \n \n \n Brightness\n \n \n \n setBrightness(Array.isArray(value) ? [...value] : [value])\n }\n maxValue={100}\n isDisabled={!enabled}\n className="w-full"\n />\n \n \n \n \n \n \n \n Color Temp\n \n \n \n setColorTemp(Array.isArray(value) ? [...value] : [value])\n }\n maxValue={100}\n isDisabled={!enabled}\n />\n \n \n \n \n \n \n \n Volume\n \n \n \n setVolume(Array.isArray(value) ? [...value] : [value])\n }\n maxValue={100}\n isDisabled={!enabled}\n />\n \n \n \n \n \n \n \n Fade\n \n \n \n setFade(Array.isArray(value) ? [...value] : [value])\n }\n maxValue={100}\n isDisabled={!enabled}\n />\n \n \n \n
\n
\n )\n}\n', + 'cards/notification-settings.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Checkbox } from "@/components/ui/checkbox"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\n\nconst NOTIFICATIONS = [\n {\n id: "transactions",\n label: "Transaction alerts",\n description: "Deposits, withdrawals, and transfers.",\n defaultChecked: true,\n },\n {\n id: "security",\n label: "Security alerts",\n description: "Login attempts and account changes.",\n defaultChecked: true,\n },\n {\n id: "goals",\n label: "Goal milestones",\n description: "Updates at 25%, 50%, 75%, and 100%.",\n defaultChecked: false,\n },\n {\n id: "market",\n label: "Market updates",\n description: "Daily portfolio summary and price alerts.",\n defaultChecked: false,\n },\n]\n\nexport function NotificationSettings() {\n const [checked, setChecked] = React.useState>(\n Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, n.defaultChecked]))\n )\n\n const allChecked = NOTIFICATIONS.every((n) => checked[n.id])\n const someChecked = NOTIFICATIONS.some((n) => checked[n.id]) && !allChecked\n\n const handleSelectAll = (value: boolean) => {\n setChecked(Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, value])))\n }\n\n const handleToggle = (id: string, value: boolean) => {\n setChecked((prev) => ({ ...prev, [id]: value }))\n }\n\n return (\n \n \n Notifications\n \n Choose what you want to be notified about.\n \n \n \n \n \n handleSelectAll(!!value)}\n />\n \n Select all\n \n \n {NOTIFICATIONS.map((n) => (\n \n handleToggle(n.id, !!value)}\n />\n \n {n.label}\n {n.description}\n \n \n ))}\n \n \n \n \n \n \n )\n}\n', + 'cards/payments.tsx': + '"use client"\n\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n} from "@/components/ui/breadcrumb"\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function Payments() {\n return (\n \n \n \n \n \n Home\n \n \n \n \n \n \n Profile\n Statements\n Documents\n \n \n \n \n \n Payments\n \n \n \n \n \n \n \n \n \n \n \n Change transfer limit\n \n Adjust how much you can send from your balance.\n \n \n \n \n \n \n \n \n \n Scheduled transfers\n \n Set up a transfer to send at a later date.\n \n \n \n \n \n \n \n \n \n Direct Debits\n \n Set up and manage regular payments.\n \n \n \n \n \n \n \n \n \n Recurring card payments\n \n Manage your repeated card transactions.\n \n \n \n \n \n \n \n )\n}\n', + 'cards/payout-threshold.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Slider } from "@/components/ui/slider"\nimport { Textarea } from "@/components/ui/textarea"\n\nconst CURRENCIES = [\n { label: "USD — United States Dollar", value: "usd" },\n { label: "EUR — Euro", value: "eur" },\n { label: "GBP — British Pound", value: "gbp" },\n { label: "JPY — Japanese Yen", value: "jpy" },\n]\n\nexport function PayoutThreshold() {\n const [amount, setAmount] = React.useState([2500])\n\n return (\n \n \n Payout Threshold\n \n Set the minimum balance required before a payout is triggered.\n \n \n \n \n \n \n \n \n \n Preferred Currency\n \n \n \n \n
\n \n Minimum Payout Amount\n \n \n ${amount[0].toFixed(2)}\n \n
\n \n setAmount(Array.isArray(value) ? [...value] : [value])\n }\n minValue={50}\n maxValue={10000}\n step={50}\n />\n
\n $50 (MIN)\n $10,000 (MAX)\n
\n
\n \n Notes\n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/power-usage.tsx': + '"use client"\n\nimport { Bar, BarChart, XAxis } from "recharts"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport { Progress } from "@/components/ui/progress"\nimport { Separator } from "@/components/ui/separator"\nimport { useDesignSystemSearchParams } from "@/components/examples/create-preview/style"\n\nconst chartData = [\n { hour: "6a", usage: 1.2 },\n { hour: "8a", usage: 2.8 },\n { hour: "10a", usage: 3.1 },\n { hour: "12p", usage: 2.4 },\n { hour: "2p", usage: 3.4 },\n { hour: "4p", usage: 2.9 },\n { hour: "6p", usage: 3.8 },\n { hour: "8p", usage: 3.2 },\n]\n\nconst chartConfig = {\n usage: {\n label: "Usage (kW)",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nexport function PowerUsage() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n return (\n \n \n Power Usage\n Whole Home\n \n \n \n \n \n }\n />\n \n \n \n \n
\n
\n \n Currently Using\n \n 3.4 kW\n
\n
\n Solar Gen\n \n +1.2 kW\n \n
\n
\n
\n \n Battery Level\n
\n \n 85%\n
\n
\n
\n )\n}\n', + 'cards/preferences.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n} from "@/components/ui/field"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Switch } from "@/components/ui/switch"\n\nconst CURRENCIES = [\n { label: "USD — United States Dollar", value: "usd" },\n { label: "EUR — Euro", value: "eur" },\n { label: "GBP — British Pound", value: "gbp" },\n { label: "JPY — Japanese Yen", value: "jpy" },\n]\n\nexport function Preferences() {\n return (\n \n \n Preferences\n \n Manage your account settings and notifications.\n \n \n \n \n \n \n \n \n Default Currency\n \n \n \n \n \n \n Public Statistics\n \n \n Allow others to see your total stream count and listening\n activity\n \n \n \n \n \n \n \n \n Email Notifications\n \n \n Monthly royalty reports and distribution updates\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/receiving-method.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from "@/components/ui/radio-group"\n\nexport function ReceivingMethod() {\n return (\n \n \n Payout Preferences\n Receiving Method\n \n \n \n \n \n \n \n \n Account Holder Name\n \n \n \n
\n Receiving Method\n \n \n \n \n \n Bank Transfer\n SWIFT / IBAN\n \n \n \n \n \n \n \n PayPal\n \n Instant Payout\n \n \n \n \n \n
\n \n IBAN / Account Number\n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/recent-transactions.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from "@/components/ui/table"\n\nexport function RecentTransactions() {\n return (\n \n \n Recent Transactions\n Your latest account activity.\n \n \n \n \n \n \n \n \n Merchant\n Date\n Amount\n \n \n \n \n \n
\n \n
\n
\n \n
\n Blue Bottle Coffee\n \n Food & Drink\n \n
\n
\n \n Today, 10:24 AM\n \n \n \n -$6.50\n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Whole Foods Market\n \n Groceries\n \n
\n
\n \n Yesterday\n \n \n \n -$142.30\n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Stripe Payout\n Income\n
\n
\n \n Oct 12\n \n \n \n +$4,200.00\n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Uber Technologies\n \n Transport\n \n
\n
\n \n Oct 11\n \n \n \n -$24.10\n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n Netflix Subscription\n \n Entertainment\n \n
\n
\n \n Oct 10\n \n \n \n -$19.99\n \n \n \n \n \n \n View details\n Add note\n Categorize\n \n Dispute\n \n \n \n
\n
\n
\n
\n
\n )\n}\n', + 'cards/release-catalog.tsx': + '"use client"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Card, CardContent, CardHeader } from "@/components/ui/card"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from "@/components/ui/input-group"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nconst HOLDINGS = [\n {\n ticker: "VOO",\n name: "Vanguard S&P 500 ETF",\n type: "ETF",\n added: "Jan 2021",\n shares: "112",\n value: "$48,230.40",\n },\n {\n ticker: "VIG",\n name: "Vanguard Dividend Appreciation",\n type: "ETF",\n added: "Mar 2022",\n shares: "450",\n value: "$26,033.79",\n },\n {\n ticker: "AAPL",\n name: "Apple Inc.",\n type: "Stock",\n added: "Nov 2020",\n shares: "85",\n value: "$18,488.90",\n },\n {\n ticker: "O",\n name: "Realty Income Corp",\n type: "REIT",\n added: "Jun 2023",\n shares: "320",\n value: "$15,136.59",\n },\n]\n\nexport function ReleaseCatalog() {\n return (\n \n \n
\n \n \n \n \n \n \n \n Stocks\n ETFs\n REITs\n \n
\n
\n \n \n {HOLDINGS.map((holding) => (\n \n \n
\n {holding.ticker}\n
\n
\n \n {holding.name}\n \n {holding.shares} Shares · {holding.added}\n \n \n
\n {holding.type}\n
\n \n Value\n \n \n {holding.value}\n \n
\n
\n
\n ))}\n
\n
\n
\n )\n}\n', + 'cards/roller-shades.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Slider } from "@/components/ui/slider"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nexport function RollerShades() {\n const [position, setPosition] = React.useState([50])\n\n const preset =\n position[0] <= 10 ? "open" : position[0] >= 90 ? "closed" : "half"\n\n return (\n \n \n Living Room\n Roller Shades\n \n \n
\n \n
\n
\n \n Open\n \n \n setPosition(Array.isArray(value) ? [...value] : [value])\n }\n maxValue={100}\n className="flex-1"\n />\n \n Close\n \n
\n
\n \n {\n const v = Array.from(value)[0]\n if (v === "open") setPosition([0])\n if (v === "half") setPosition([50])\n if (v === "closed") setPosition([100])\n }}\n variant="outline"\n spacing={1}\n className="w-full"\n >\n \n Open\n \n \n Half\n \n \n Closed\n \n \n \n
\n )\n}\n', + 'cards/stock-performance.tsx': + '"use client"\n\nimport * as React from "react"\nimport { Area, AreaChart, CartesianGrid, XAxis } from "recharts"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from "@/components/ui/combobox"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Separator } from "@/components/ui/separator"\n\nconst TICKERS = ["VOO", "VIG", "AAPL", "MSFT", "GOOGL", "AMZN", "TSLA"]\n\nconst CHART_DATA: Record = {\n VOO: [\n { month: "Jan", price: 412 },\n { month: "Feb", price: 438 },\n { month: "Mar", price: 395 },\n { month: "Apr", price: 450 },\n { month: "May", price: 420 },\n { month: "Jun", price: 462 },\n ],\n AAPL: [\n { month: "Jan", price: 185 },\n { month: "Feb", price: 210 },\n { month: "Mar", price: 172 },\n { month: "Apr", price: 198 },\n { month: "May", price: 178 },\n { month: "Jun", price: 215 },\n ],\n}\n\nconst DEFAULT_DATA = [\n { month: "Jan", price: 100 },\n { month: "Feb", price: 118 },\n { month: "Mar", price: 95 },\n { month: "Apr", price: 125 },\n { month: "May", price: 108 },\n { month: "Jun", price: 130 },\n]\n\nconst chartConfig = {\n price: {\n label: "Price",\n color: "var(--chart-1)",\n },\n} satisfies ChartConfig\n\nexport function StockPerformance() {\n const [ticker, setTicker] = React.useState("VOO")\n\n const data = CHART_DATA[ticker] ?? DEFAULT_DATA\n\n return (\n \n \n Stock Performance\n 6-month price history.\n \n \n \n \n Ticker\n {\n if (key !== null) setTicker(String(key))\n }}\n >\n \n \n No tickers found.\n \n {TICKERS.map((item) => (\n \n {item}\n \n ))}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }\n />\n \n \n \n \n \n )\n}\n', + 'cards/transfer-funds.tsx': + 'import { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupText,\n} from "@/components/ui/input-group"\nimport { Item, ItemContent } from "@/components/ui/item"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Separator } from "@/components/ui/separator"\n\nconst FROM_ACCOUNTS = [\n { label: "Main Checking (··8402) — $12,450.00", value: "checking" },\n { label: "Business (··7731) — $8,920.00", value: "business" },\n]\n\nconst TO_ACCOUNTS = [\n { label: "High Yield Savings (··1192) — $42,100.00", value: "savings" },\n { label: "Investment (··3349) — $18,200.00", value: "investment" },\n]\n\nexport function TransferFunds() {\n return (\n \n \n Transfer Funds\n \n Move money between your connected accounts.\n \n \n \n \n \n \n \n \n \n Amount to Transfer\n \n \n \n $\n \n \n \n \n \n From Account\n \n \n \n To Account\n \n \n \n \n
\n \n Estimated arrival\n \n Today, Apr 14\n
\n \n
\n \n Transaction fee\n \n $0.00\n
\n \n
\n Total amount\n \n $1,200.00\n \n
\n
\n
\n
\n
\n \n \n \n
\n )\n}\n', + 'cards/upcoming-payments.tsx': + '"use client"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Calendar } from "@/components/ui/calendar"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\nexport function UpcomingPayments() {\n return (\n \n \n Upcoming Payments\n \n Select a date to view scheduled payments.\n \n \n \n \n \n \n \n \n \n Netflix Subscription\n Apr 15, 2024\n \n $19.99\n \n \n \n Rent Payment\n Apr 1, 2024\n \n $2,400.00\n \n \n \n Auto Insurance\n Apr 22, 2024\n \n $186.00\n \n \n \n \n )\n}\n', +}; + +const VARIANTS = { base: BASE, radix: RADIX, aria: ARIA } satisfies Record>>; + +export function createPreviewSources(base: ShadcnBase): Readonly> { + return { ...COMMON, ...VARIANTS[base] }; +} diff --git a/electron/project/shadcnCreateStylePreviewSources.ts b/electron/project/shadcnCreateStylePreviewSources.ts new file mode 100644 index 000000000..e1d6579f9 --- /dev/null +++ b/electron/project/shadcnCreateStylePreviewSources.ts @@ -0,0 +1,151 @@ +// shadcn/ui Create preview, MIT, Copyright (c) 2023 shadcn. +// Source: https://github.com/shadcn-ui/ui/tree/96da9cc7f1aa10580a3741664e2a77c721206c00/apps/v4/registry/bases +// The standalone Astro site supplies its preset, local icons, and typography. + +import type { ShadcnBase } from '../../shared/ipc/shadcnStarter'; + +const COMMON: Readonly> = { + 'cards/activate-agent-dialog.tsx': + '"use client"\n\nimport { Alert, AlertDescription } from "@/components/ui/alert"\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Item,\n ItemContent,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from "@/components/ui/item"\n\n// Agent feature descriptions.\nconst agentFeatures = [\n {\n id: "code-reviews",\n content: (\n <>\n Code reviews with full codebase context to catch{" "}\n hard-to-find bugs.\n \n ),\n },\n {\n id: "code-suggestions",\n content: (\n <>\n Code suggestions validated in sandboxes before you\n merge.\n \n ),\n },\n {\n id: "root-cause",\n content: (\n <>\n Root-cause analysis for production issues with\n deployment context.{" "}\n \n Requires Observability Plus\n \n \n ),\n },\n]\n\nexport function ActivateAgentDialog() {\n return (\n \n \n Ship faster & safer with Vercel Agent\n \n Your use is subject to Vercel's{" "}\n Public Beta Agreement and{" "}\n AI Product Terms.\n \n \n \n \n {agentFeatures.map((feature) => (\n \n \n \n \n \n \n {feature.content}\n \n \n \n ))}\n \n \n \n Pro teams get $100 in Vercel Agent trial credit for 2 weeks after\n activation.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/anomaly-alert.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyTitle,\n} from "@/components/ui/empty"\n\nexport function AnomalyAlert() {\n return (\n \n \n \n \n Get alerted for anomalies\n \n Automatically monitor your projects for anomalies and get\n notified.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/contributions-activity.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Checkbox } from "@/components/ui/checkbox"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n} from "@/components/ui/field"\n\nexport function ContributionsActivity() {\n return (\n \n \n Contributions & Activity\n \n Manage your contributions and activity visibility.\n \n \n \n
\n \n
\n \n Contributions & activity\n \n \n \n \n \n \n Make profile private and hide activity\n \n \n Enabling this will hide your contributions and activity\n from your GitHub profile and from social features like\n followers, stars, feeds, leaderboards and releases.\n \n \n \n \n
\n
\n
\n
\n \n \n \n
\n )\n}\n', + 'cards/contributors.tsx': + '"use client"\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from "@/components/ui/avatar"\nimport { Badge } from "@/components/ui/badge"\nimport {\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\n// GitHub usernames displayed as contributor avatars.\nconst usernames = [\n "shadcn",\n "vercel",\n "nextjs",\n "tailwindlabs",\n "typescript-lang",\n "eslint",\n "prettier",\n "babel",\n "webpack",\n "rollup",\n "parcel",\n "vite",\n "react",\n "vue",\n "angular",\n "solid",\n]\n\nexport function Contributors() {\n return (\n \n \n \n Contributors 312\n \n \n \n
\n {usernames.map((username) => (\n \n \n {username.charAt(0)}\n \n ))}\n
\n
\n \n \n + 810 contributors\n \n \n
\n )\n}\n', + 'cards/environment-variables.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nexport function EnvironmentVariables() {\n return (\n \n \n Environment Variables\n Production · 8 variables\n \n \n {[\n { key: "DATABASE_URL", masked: true },\n { key: "NEXT_PUBLIC_API", masked: false },\n { key: "STRIPE_SECRET", masked: true },\n ].map((env) => (\n \n {env.key}\n \n {env.masked ? "••••••••" : "https://api.example.com"}\n \n \n ))}\n \n \n \n \n \n \n )\n}\n', + 'cards/feedback-form.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent, CardFooter } from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from "@/components/ui/native-select"\nimport { Textarea } from "@/components/ui/textarea"\n\nexport function FeedbackForm() {\n return (\n \n \n
\n \n \n Topic\n \n Select a topic\n AI\n \n Accounts and Access Controls\n \n Billing\n \n CDN (Firewall, Caching)\n \n \n CI/CD (Builds, Deployments, Environment Variables)\n \n \n Dashboard Interface (Navigation, UI Issues)\n \n Domains\n \n Frameworks\n \n \n Marketplace and Integrations\n \n \n Observability (Observability, Logs, Monitoring)\n \n Storage\n \n \n \n Feedback\n \n \n \n
\n
\n \n \n Submit\n \n \n
\n )\n}\n', + 'cards/file-upload.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\n\nexport function FileUpload() {\n return (\n \n \n File Upload\n Drag and drop or browse\n \n \n \n \n \n \n \n Upload files\n PNG, JPG, PDF up to 10MB\n \n \n \n \n \n \n \n )\n}\n', + 'cards/icon-preview-grid.tsx': + '"use client"\n\nimport { Card, CardContent } from "@/components/ui/card"\n\nconst PREVIEW_ICONS = [\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n]\n\nexport function IconPreviewGrid() {\n return (\n \n \n
\n {PREVIEW_ICONS.map((icon, index) => (\n \n {icon}\n
\n ))}\n \n
\n
\n )\n}\n', + 'cards/live-waveform.tsx': + '"use client"\n\nimport * as React from "react"\nimport { useEffect, useRef, useState } from "react"\nimport { cn } from "@/lib/utils"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nconst LiveWaveform = ({\n active = false,\n processing = false,\n deviceId,\n barWidth = 3,\n barGap = 1,\n barRadius = 1.5,\n barColor,\n fadeEdges = true,\n fadeWidth = 24,\n barHeight: baseBarHeight = 4,\n height = 64,\n sensitivity = 1,\n smoothingTimeConstant = 0.8,\n fftSize = 256,\n historySize = 60,\n updateRate = 30,\n mode = "static",\n onError,\n onStreamReady,\n onStreamEnd,\n className,\n ...props\n}: React.HTMLAttributes & {\n active?: boolean\n processing?: boolean\n deviceId?: string\n barWidth?: number\n barHeight?: number\n barGap?: number\n barRadius?: number\n barColor?: string\n fadeEdges?: boolean\n fadeWidth?: number\n height?: string | number\n sensitivity?: number\n smoothingTimeConstant?: number\n fftSize?: number\n historySize?: number\n updateRate?: number\n mode?: "scrolling" | "static"\n onError?: (error: Error) => void\n onStreamReady?: (stream: MediaStream) => void\n onStreamEnd?: () => void\n}) => {\n const canvasRef = useRef(null)\n const containerRef = useRef(null)\n const historyRef = useRef([])\n const analyserRef = useRef(null)\n const audioContextRef = useRef(null)\n const streamRef = useRef(null)\n const animationRef = useRef(0)\n const lastUpdateRef = useRef(0)\n const processingAnimationRef = useRef(null)\n const lastActiveDataRef = useRef([])\n const transitionProgressRef = useRef(0)\n const staticBarsRef = useRef([])\n const needsRedrawRef = useRef(true)\n const gradientCacheRef = useRef(null)\n const lastWidthRef = useRef(0)\n const heightStyle = typeof height === "number" ? `${height}px` : height\n\n // Handle canvas resizing.\n useEffect(() => {\n const canvas = canvasRef.current\n const container = containerRef.current\n if (!canvas || !container) return\n const resizeObserver = new ResizeObserver(() => {\n const rect = container.getBoundingClientRect()\n const dpr = window.devicePixelRatio || 1\n canvas.width = rect.width * dpr\n canvas.height = rect.height * dpr\n canvas.style.width = `${rect.width}px`\n canvas.style.height = `${rect.height}px`\n const ctx = canvas.getContext("2d")\n if (ctx) {\n ctx.scale(dpr, dpr)\n }\n gradientCacheRef.current = null\n lastWidthRef.current = rect.width\n needsRedrawRef.current = true\n })\n resizeObserver.observe(container)\n return () => resizeObserver.disconnect()\n }, [])\n\n useEffect(() => {\n if (processing && !active) {\n let time = 0\n transitionProgressRef.current = 0\n const animateProcessing = () => {\n time += 0.03\n transitionProgressRef.current = Math.min(\n 1,\n transitionProgressRef.current + 0.02\n )\n const processingData = []\n const barCount = Math.floor(\n (containerRef.current?.getBoundingClientRect().width || 200) /\n (barWidth + barGap)\n )\n if (mode === "static") {\n const halfCount = Math.floor(barCount / 2)\n for (let i = 0; i < barCount; i++) {\n const normalizedPosition = (i - halfCount) / halfCount\n const centerWeight = 1 - Math.abs(normalizedPosition) * 0.4\n const wave1 = Math.sin(time * 1.5 + normalizedPosition * 3) * 0.25\n const wave2 = Math.sin(time * 0.8 - normalizedPosition * 2) * 0.2\n const wave3 = Math.cos(time * 2 + normalizedPosition) * 0.15\n const combinedWave = wave1 + wave2 + wave3\n const processingValue = (0.2 + combinedWave) * centerWeight\n let finalValue = processingValue\n if (\n lastActiveDataRef.current.length > 0 &&\n transitionProgressRef.current < 1\n ) {\n const lastDataIndex = Math.min(\n i,\n lastActiveDataRef.current.length - 1\n )\n const lastValue = lastActiveDataRef.current[lastDataIndex] || 0\n finalValue =\n lastValue * (1 - transitionProgressRef.current) +\n processingValue * transitionProgressRef.current\n }\n processingData.push(Math.max(0.05, Math.min(1, finalValue)))\n }\n } else {\n for (let i = 0; i < barCount; i++) {\n const normalizedPosition = (i - barCount / 2) / (barCount / 2)\n const centerWeight = 1 - Math.abs(normalizedPosition) * 0.4\n const wave1 = Math.sin(time * 1.5 + i * 0.15) * 0.25\n const wave2 = Math.sin(time * 0.8 - i * 0.1) * 0.2\n const wave3 = Math.cos(time * 2 + i * 0.05) * 0.15\n const combinedWave = wave1 + wave2 + wave3\n const processingValue = (0.2 + combinedWave) * centerWeight\n let finalValue = processingValue\n if (\n lastActiveDataRef.current.length > 0 &&\n transitionProgressRef.current < 1\n ) {\n const lastDataIndex = Math.floor(\n (i / barCount) * lastActiveDataRef.current.length\n )\n const lastValue = lastActiveDataRef.current[lastDataIndex] || 0\n finalValue =\n lastValue * (1 - transitionProgressRef.current) +\n processingValue * transitionProgressRef.current\n }\n processingData.push(Math.max(0.05, Math.min(1, finalValue)))\n }\n }\n if (mode === "static") {\n staticBarsRef.current = processingData\n } else {\n historyRef.current = processingData\n }\n needsRedrawRef.current = true\n processingAnimationRef.current =\n requestAnimationFrame(animateProcessing)\n }\n animateProcessing()\n return () => {\n if (processingAnimationRef.current) {\n cancelAnimationFrame(processingAnimationRef.current)\n }\n }\n } else if (!active && !processing) {\n const hasData =\n mode === "static"\n ? staticBarsRef.current.length > 0\n : historyRef.current.length > 0\n if (hasData) {\n let fadeProgress = 0\n const fadeToIdle = () => {\n fadeProgress += 0.03\n if (fadeProgress < 1) {\n if (mode === "static") {\n staticBarsRef.current = staticBarsRef.current.map(\n (value) => value * (1 - fadeProgress)\n )\n } else {\n historyRef.current = historyRef.current.map(\n (value) => value * (1 - fadeProgress)\n )\n }\n needsRedrawRef.current = true\n requestAnimationFrame(fadeToIdle)\n } else {\n if (mode === "static") {\n staticBarsRef.current = []\n } else {\n historyRef.current = []\n }\n }\n }\n fadeToIdle()\n }\n }\n }, [processing, active, barWidth, barGap, mode])\n\n // Handle microphone setup and teardown.\n useEffect(() => {\n if (!active) {\n if (streamRef.current) {\n streamRef.current.getTracks().forEach((track) => track.stop())\n streamRef.current = null\n onStreamEnd?.()\n }\n if (\n audioContextRef.current &&\n audioContextRef.current.state !== "closed"\n ) {\n audioContextRef.current.close()\n audioContextRef.current = null\n }\n if (animationRef.current) {\n cancelAnimationFrame(animationRef.current)\n animationRef.current = 0\n }\n return\n }\n const setupMicrophone = async () => {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({\n audio: deviceId\n ? {\n deviceId: { exact: deviceId },\n echoCancellation: true,\n noiseSuppression: true,\n autoGainControl: true,\n }\n : {\n echoCancellation: true,\n noiseSuppression: true,\n autoGainControl: true,\n },\n })\n streamRef.current = stream\n onStreamReady?.(stream)\n const AudioContextConstructor =\n window.AudioContext ||\n (window as unknown as { webkitAudioContext: typeof AudioContext })\n .webkitAudioContext\n const audioContext = new AudioContextConstructor()\n const analyser = audioContext.createAnalyser()\n analyser.fftSize = fftSize\n analyser.smoothingTimeConstant = smoothingTimeConstant\n const source = audioContext.createMediaStreamSource(stream)\n source.connect(analyser)\n audioContextRef.current = audioContext\n analyserRef.current = analyser\n historyRef.current = []\n } catch (error) {\n onError?.(error as Error)\n }\n }\n setupMicrophone()\n return () => {\n if (streamRef.current) {\n streamRef.current.getTracks().forEach((track) => track.stop())\n streamRef.current = null\n onStreamEnd?.()\n }\n if (\n audioContextRef.current &&\n audioContextRef.current.state !== "closed"\n ) {\n audioContextRef.current.close()\n audioContextRef.current = null\n }\n if (animationRef.current) {\n cancelAnimationFrame(animationRef.current)\n animationRef.current = 0\n }\n }\n }, [\n active,\n deviceId,\n fftSize,\n smoothingTimeConstant,\n onError,\n onStreamReady,\n onStreamEnd,\n ])\n\n // Animation loop.\n useEffect(() => {\n const canvas = canvasRef.current\n if (!canvas) return\n const ctx = canvas.getContext("2d")\n if (!ctx) return\n let rafId: number\n const animate = (currentTime: number) => {\n const rect = canvas.getBoundingClientRect()\n if (active && currentTime - lastUpdateRef.current > updateRate) {\n lastUpdateRef.current = currentTime\n if (analyserRef.current) {\n const dataArray = new Uint8Array(\n analyserRef.current.frequencyBinCount\n )\n analyserRef.current.getByteFrequencyData(dataArray)\n if (mode === "static") {\n const startFreq = Math.floor(dataArray.length * 0.05)\n const endFreq = Math.floor(dataArray.length * 0.4)\n const relevantData = dataArray.slice(startFreq, endFreq)\n const barCount = Math.floor(rect.width / (barWidth + barGap))\n const halfCount = Math.floor(barCount / 2)\n const newBars: number[] = []\n for (let i = halfCount - 1; i >= 0; i--) {\n const dataIndex = Math.floor(\n (i / halfCount) * relevantData.length\n )\n const value = Math.min(\n 1,\n (relevantData[dataIndex] / 255) * sensitivity\n )\n newBars.push(Math.max(0.05, value))\n }\n for (let i = 0; i < halfCount; i++) {\n const dataIndex = Math.floor(\n (i / halfCount) * relevantData.length\n )\n const value = Math.min(\n 1,\n (relevantData[dataIndex] / 255) * sensitivity\n )\n newBars.push(Math.max(0.05, value))\n }\n staticBarsRef.current = newBars\n lastActiveDataRef.current = newBars\n } else {\n let sum = 0\n const startFreq = Math.floor(dataArray.length * 0.05)\n const endFreq = Math.floor(dataArray.length * 0.4)\n const relevantData = dataArray.slice(startFreq, endFreq)\n for (let i = 0; i < relevantData.length; i++) {\n sum += relevantData[i]\n }\n const average = (sum / relevantData.length / 255) * sensitivity\n historyRef.current.push(Math.min(1, Math.max(0.05, average)))\n lastActiveDataRef.current = [...historyRef.current]\n if (historyRef.current.length > historySize) {\n historyRef.current.shift()\n }\n }\n needsRedrawRef.current = true\n }\n }\n if (!needsRedrawRef.current && !active) {\n rafId = requestAnimationFrame(animate)\n return\n }\n needsRedrawRef.current = active\n ctx.clearRect(0, 0, rect.width, rect.height)\n const computedBarColor =\n barColor ||\n (() => {\n const style = getComputedStyle(canvas)\n const color = style.color\n return color || "#000"\n })()\n const step = barWidth + barGap\n const barCount = Math.floor(rect.width / step)\n const centerY = rect.height / 2\n if (mode === "static") {\n const dataToRender = processing\n ? staticBarsRef.current\n : active\n ? staticBarsRef.current\n : staticBarsRef.current.length > 0\n ? staticBarsRef.current\n : []\n for (let i = 0; i < barCount && i < dataToRender.length; i++) {\n const value = dataToRender[i] || 0.1\n const x = i * step\n const bh = Math.max(baseBarHeight, value * rect.height * 0.8)\n const y = centerY - bh / 2\n ctx.fillStyle = computedBarColor\n ctx.globalAlpha = 0.4 + value * 0.6\n if (barRadius > 0) {\n ctx.beginPath()\n ctx.roundRect(x, y, barWidth, bh, barRadius)\n ctx.fill()\n } else {\n ctx.fillRect(x, y, barWidth, bh)\n }\n }\n } else {\n for (let i = 0; i < barCount && i < historyRef.current.length; i++) {\n const dataIndex = historyRef.current.length - 1 - i\n const value = historyRef.current[dataIndex] || 0.1\n const x = rect.width - (i + 1) * step\n const bh = Math.max(baseBarHeight, value * rect.height * 0.8)\n const y = centerY - bh / 2\n ctx.fillStyle = computedBarColor\n ctx.globalAlpha = 0.4 + value * 0.6\n if (barRadius > 0) {\n ctx.beginPath()\n ctx.roundRect(x, y, barWidth, bh, barRadius)\n ctx.fill()\n } else {\n ctx.fillRect(x, y, barWidth, bh)\n }\n }\n }\n if (fadeEdges && fadeWidth > 0 && rect.width > 0) {\n if (!gradientCacheRef.current || lastWidthRef.current !== rect.width) {\n const gradient = ctx.createLinearGradient(0, 0, rect.width, 0)\n const fadePercent = Math.min(0.3, fadeWidth / rect.width)\n gradient.addColorStop(0, "rgba(255,255,255,1)")\n gradient.addColorStop(fadePercent, "rgba(255,255,255,0)")\n gradient.addColorStop(1 - fadePercent, "rgba(255,255,255,0)")\n gradient.addColorStop(1, "rgba(255,255,255,1)")\n gradientCacheRef.current = gradient\n lastWidthRef.current = rect.width\n }\n ctx.globalCompositeOperation = "destination-out"\n ctx.fillStyle = gradientCacheRef.current\n ctx.fillRect(0, 0, rect.width, rect.height)\n ctx.globalCompositeOperation = "source-over"\n }\n ctx.globalAlpha = 1\n rafId = requestAnimationFrame(animate)\n }\n rafId = requestAnimationFrame(animate)\n return () => {\n if (rafId) {\n cancelAnimationFrame(rafId)\n }\n }\n }, [\n active,\n processing,\n sensitivity,\n updateRate,\n historySize,\n barWidth,\n baseBarHeight,\n barGap,\n barRadius,\n barColor,\n fadeEdges,\n fadeWidth,\n mode,\n ])\n\n return (\n \n {!active && !processing && (\n
\n )}\n
\n )\n}\n\nexport function LiveWaveformCard() {\n const [active, setActive] = useState(false)\n const [processing, setProcessing] = useState(true)\n const [mode, setMode] = useState<"static" | "scrolling">("static")\n\n const handleToggleActive = () => {\n setActive(!active)\n if (!active) {\n setProcessing(false)\n }\n }\n\n const handleToggleProcessing = () => {\n setProcessing(!processing)\n if (!processing) {\n setActive(false)\n }\n }\n\n return (\n \n \n Live Audio Waveform\n \n Real-time microphone input visualization with audio reactivity\n \n \n \n \n \n \n \n {active ? "Stop" : "Start"} Listening\n \n \n {processing ? "Stop" : "Start"} Processing\n \n setMode(mode === "static" ? "scrolling" : "static")}\n >\n {mode === "static" ? "Static" : "Scrolling"}\n \n \n \n )\n}\n', + 'cards/no-team-members.tsx': + '"use client"\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarImage,\n} from "@/components/ui/avatar"\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\n\nexport function NoTeamMembers() {\n return (\n \n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n No Team Members\n \n Invite your team to collaborate on this project.\n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/not-found.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyTitle,\n} from "@/components/ui/empty"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from "@/components/ui/input-group"\nimport { Kbd } from "@/components/ui/kbd"\n\nexport function NotFound() {\n return (\n \n \n \n \n 404 - Not Found\n \n The page you're looking for doesn't exist. Try searching\n for what you need below.\n \n \n \n \n \n \n \n \n \n /\n \n \n \n \n \n \n \n )\n}\n', + 'cards/observability-card.tsx': + '"use client"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nexport function ObservabilityCard() {\n return (\n \n
\n \n \n Observability Plus is replacing Monitoring\n \n Switch to the improved way to explore your data, with natural\n language. Monitoring will no longer be available on the Pro plan in\n November, 2025\n \n \n \n \n \n Warning\n \n \n \n )\n}\n', + 'cards/pie-chart-card.tsx': + '"use client"\n\nimport { Label, Pie, PieChart } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport { Progress } from "@/components/ui/progress"\n\nconst pieChartData = [\n { browser: "chrome", visitors: 275, fill: "var(--color-chrome)" },\n { browser: "safari", visitors: 200, fill: "var(--color-safari)" },\n { browser: "firefox", visitors: 287, fill: "var(--color-firefox)" },\n { browser: "edge", visitors: 173, fill: "var(--color-edge)" },\n]\n\nconst pieChartConfig = {\n visitors: {\n label: "Visitors",\n },\n chrome: {\n label: "Chrome",\n color: "var(--chart-1)",\n },\n safari: {\n label: "Safari",\n color: "var(--chart-2)",\n },\n firefox: {\n label: "Firefox",\n color: "var(--chart-3)",\n },\n edge: {\n label: "Edge",\n color: "var(--chart-4)",\n },\n} satisfies ChartConfig\n\nexport function PieChartCard() {\n const totalVisitors = pieChartData.reduce(\n (sum, item) => sum + item.visitors,\n 0\n )\n const topBrowser = pieChartData.reduce((max, item) =>\n item.visitors > max.visitors ? item : max\n )\n const topBrowserShare = Math.round(\n (topBrowser.visitors / totalVisitors) * 100\n )\n const topBrowserLabel =\n pieChartConfig[topBrowser.browser as keyof typeof pieChartConfig]?.label ??\n "Top"\n\n return (\n \n \n Browser Share\n January - June 2026\n \n {topBrowserLabel}\n \n \n \n \n \n }\n />\n \n {\n if (viewBox && "cx" in viewBox && "cy" in viewBox) {\n return (\n \n \n {totalVisitors.toLocaleString()}\n \n \n Visitors\n \n \n )\n }\n }}\n />\n \n }\n className="translate-y-2"\n />\n \n \n \n \n
\n {topBrowserLabel}\n \n {topBrowserShare}%\n \n
\n \n
\n
\n )\n}\n', + 'cards/shortcuts.tsx': + 'import * as React from "react"\n\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n Item,\n ItemActions,\n ItemGroup,\n ItemHeader,\n ItemSeparator,\n ItemTitle,\n} from "@/components/ui/item"\nimport { Kbd } from "@/components/ui/kbd"\n\nconst shortcuts = [\n { label: "Search", keys: ["⌘", "K"] },\n { label: "Quick Actions", keys: ["⌘", "J"] },\n { label: "New File", keys: ["⌘", "N"] },\n { label: "Save", keys: ["⌘", "S"] },\n { label: "Toggle Sidebar", keys: ["⌘", "B"] },\n] as const\n\nexport function Shortcuts() {\n return (\n \n \n
\n
Shortcuts
\n \n {shortcuts.map(({ label, keys }, i) => (\n \n {i > 0 && }\n \n \n {label}\n \n
\n {keys.map((key) => (\n {key}\n ))}\n
\n
\n
\n \n
\n ))}\n
\n
\n
\n
\n )\n}\n', + 'cards/skeleton-loading.tsx': + '"use client"\n\nimport { Card, CardContent } from "@/components/ui/card"\nimport { Skeleton } from "@/components/ui/skeleton"\n\nexport function SkeletonLoading() {\n return (\n \n \n
\n \n
\n \n \n
\n
\n
\n \n \n \n
\n
\n \n \n
\n
\n
\n )\n}\n', + 'cards/sleep-report.tsx': + '"use client"\n\nimport { Bar, BarChart } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n type ChartConfig,\n} from "@/components/ui/chart"\n\nconst sleepChartData = [\n { hour: "10pm", deep: 0, light: 30, rem: 0 },\n { hour: "11pm", deep: 20, light: 10, rem: 0 },\n { hour: "12am", deep: 40, light: 0, rem: 10 },\n { hour: "1am", deep: 30, light: 5, rem: 15 },\n { hour: "2am", deep: 10, light: 20, rem: 30 },\n { hour: "3am", deep: 25, light: 10, rem: 20 },\n { hour: "4am", deep: 15, light: 25, rem: 10 },\n { hour: "5am", deep: 5, light: 35, rem: 15 },\n { hour: "6am", deep: 0, light: 20, rem: 25 },\n]\n\nconst sleepChartConfig = {\n deep: {\n label: "Deep",\n color: "var(--chart-1)",\n },\n light: {\n label: "Light",\n color: "var(--chart-2)",\n },\n rem: {\n label: "REM",\n color: "var(--chart-3)",\n },\n} satisfies ChartConfig\n\nexport function SleepReport() {\n return (\n \n \n Sleep Report\n Last night · 7h 24m\n \n \n \n \n \n \n \n \n \n
\n {[\n { label: "Deep", value: "2h 10m" },\n { label: "Light", value: "3h 48m" },\n { label: "REM", value: "1h 26m" },\n { label: "Score", value: "84" },\n ].map((s) => (\n
\n
{s.value}
\n
{s.label}
\n
\n ))}\n
\n
\n \n Good\n \n \n
\n )\n}\n', + 'cards/style-overview.tsx': + '"use client"\n\nimport { Card, CardContent } from "@/components/ui/card"\nimport { usePreviewTypography } from "../style"\n\nexport function StyleOverview() {\n const { style, body, heading } = usePreviewTypography()\n\n return (\n \n \n
\n
\n {style} - {heading ?? body}\n
\n
\n Designers love packing quirky glyphs into test phrases. This is a\n preview of the typography styles.\n
\n
\n
\n {[\n "--background",\n "--foreground",\n "--primary",\n "--secondary",\n "--muted",\n "--accent",\n "--border",\n "--chart-1",\n "--chart-2",\n "--chart-3",\n "--chart-4",\n "--chart-5",\n ].map((variant) => (\n \n \n
\n {variant}\n
\n
\n ))}\n
\n \n
\n )\n}\n', + 'cards/visitors.tsx': + '"use client"\n\nimport { Area, AreaChart, XAxis } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\n\nconst areaChartData = [\n { month: "January", desktop: 186 },\n { month: "February", desktop: 305 },\n { month: "March", desktop: 237 },\n { month: "April", desktop: 73 },\n { month: "May", desktop: 209 },\n { month: "June", desktop: 214 },\n]\n\nconst areaChartConfig = {\n desktop: {\n label: "Desktop",\n color: "var(--chart-1)",\n },\n} satisfies ChartConfig\n\nconst latestVisitors = areaChartData[areaChartData.length - 1]?.desktop ?? 0\nconst previousVisitors =\n areaChartData[areaChartData.length - 2]?.desktop ?? latestVisitors\nconst trendPercent =\n previousVisitors === 0\n ? 0\n : Math.round(((latestVisitors - previousVisitors) / previousVisitors) * 100)\nconst trendPrefix = trendPercent > 0 ? "+" : ""\n\nexport function Visitors() {\n return (\n \n \n Visitors\n Last 6 months \n \n = 0 ? "secondary" : "destructive"}>\n {trendPrefix}\n {trendPercent}% vs last month\n \n \n \n \n \n \n String(value).slice(0, 3)}\n />\n }\n />\n \n \n \n \n \n )\n}\n', + 'cards/weekly-fitness-summary.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\nconst FITNESS_WEEKLY_LOAD = [\n { day: "M", load: 84 },\n { day: "T", load: 52 },\n { day: "W", load: 73 },\n { day: "T", load: 66 },\n { day: "F", load: 91 },\n { day: "S", load: 48 },\n { day: "S", load: 61 },\n]\n\nexport function WeeklyFitnessSummary() {\n return (\n \n \n Weekly Fitness Summary\n Calories and workout load by day\n \n \n
\n {FITNESS_WEEKLY_LOAD.map((day, index) => (\n \n
{day.day}
\n
\n \n
\n
\n ))}\n \n
\n \n \n \n
\n )\n}\n', +}; + +const BASE: Readonly> = { + 'cards/analytics-card.tsx': + '"use client"\n\nimport { Area, AreaChart } from "recharts"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\n\n// Monthly visitor data for the area chart.\nconst chartData = [\n { month: "January", visitors: 186 },\n { month: "February", visitors: 305 },\n { month: "March", visitors: 237 },\n { month: "April", visitors: 73 },\n { month: "May", visitors: 209 },\n { month: "June", visitors: 214 },\n]\n\n// Chart configuration for the visitors dataset.\nconst chartConfig = {\n visitors: {\n label: "Visitors",\n color: "var(--chart-1)",\n },\n} satisfies ChartConfig\n\nexport function AnalyticsCard() {\n return (\n \n \n Analytics\n \n 418.2K Visitors +10%\n \n \n \n \n \n \n \n }\n />\n \n \n \n \n )\n}\n', + 'cards/assign-issue.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from "@/components/ui/avatar"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n useComboboxAnchor,\n} from "@/components/ui/combobox"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from "@/components/ui/tooltip"\n\n// Users available for assignment.\nconst users = [\n "shadcn",\n "maxleiter",\n "evilrabbit",\n "pranathip",\n "jorgezreik",\n "shuding",\n "rauchg",\n]\n\nexport function AssignIssue() {\n const anchor = useComboboxAnchor()\n return (\n \n \n Assign Issue\n \n Select users to assign to this issue.\n \n \n \n }\n >\n \n \n Add user\n \n \n \n \n \n \n \n {(values) => (\n \n {values.map((username: string) => (\n \n \n \n {username.charAt(0)}\n \n {username}\n \n ))}\n 0 ? undefined : "Select a item..."\n }\n />\n \n )}\n \n \n \n No users found.\n \n {(username: string) => (\n \n \n \n {username.charAt(0)}\n \n {username}\n \n )}\n \n \n \n \n \n )\n}\n', + 'cards/bar-chart-card.tsx': + '"use client"\n\nimport * as React from "react"\nimport { Bar, BarChart, CartesianGrid, XAxis } from "recharts"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from "@/components/ui/chart"\nimport { useDesignSystemSearchParams } from "../style"\n\nconst barChartData = [\n { month: "January", desktop: 186, mobile: 80 },\n { month: "February", desktop: 305, mobile: 200 },\n { month: "March", desktop: 237, mobile: 120 },\n { month: "April", desktop: 73, mobile: 190 },\n { month: "May", desktop: 209, mobile: 130 },\n { month: "June", desktop: 214, mobile: 140 },\n]\n\nconst barChartConfig = {\n desktop: {\n label: "Desktop",\n color: "var(--chart-1)",\n },\n mobile: {\n label: "Mobile",\n color: "var(--chart-2)",\n },\n} satisfies ChartConfig\n\nconst desktopTotal = barChartData.reduce((sum, item) => sum + item.desktop, 0)\nconst mobileTotal = barChartData.reduce((sum, item) => sum + item.mobile, 0)\nconst desktopDelta = Math.round(\n ((desktopTotal - mobileTotal) / mobileTotal) * 100\n)\nconst desktopDeltaPrefix = desktopDelta > 0 ? "+" : ""\n\nexport function BarChartCard() {\n const [params] = useDesignSystemSearchParams()\n const isRounded = !["lyra", "sera"].includes(params.style)\n\n return (\n \n \n Traffic channels\n \n Monthly desktop and mobile traffic for the last six months—compare\n volume and mix across platforms and devices at a glance.\n \n \n \n \n \n \n String(value).slice(0, 3)}\n />\n }\n />\n } />\n \n \n \n \n
\n
\n
\n Desktop\n
\n
\n {desktopTotal.toLocaleString()}\n
\n
\n
\n
\n Mobile\n
\n
\n {mobileTotal.toLocaleString()}\n
\n
\n
\n
\n Mix Delta\n
\n
\n {desktopDeltaPrefix}\n {desktopDelta}%\n
\n
\n
\n
\n \n \n \n
\n )\n}\n', + 'cards/bar-visualizer.tsx': + '"use client"\n\nimport * as React from "react"\nimport { cn } from "@/lib/utils"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\n\ntype AgentState =\n | "connecting"\n | "initializing"\n | "listening"\n | "speaking"\n | "thinking"\n\ntype AnimationState = AgentState | undefined\n\ninterface AudioAnalyserOptions {\n fftSize?: number\n smoothingTimeConstant?: number\n minDecibels?: number\n maxDecibels?: number\n}\n\ninterface MultiBandVolumeOptions {\n bands?: number\n loPass?: number\n hiPass?: number\n updateInterval?: number\n analyserOptions?: AudioAnalyserOptions\n}\n\nconst multibandDefaults: MultiBandVolumeOptions = {\n bands: 5,\n loPass: 100,\n hiPass: 600,\n updateInterval: 32,\n analyserOptions: { fftSize: 2048 },\n}\n\nconst normalizeDb = (value: number) => {\n if (value === -Infinity) {\n return 0\n }\n const minDb = -100\n const maxDb = -10\n const db = 1 - (Math.max(minDb, Math.min(maxDb, value)) * -1) / 100\n return Math.sqrt(db)\n}\n\nfunction createAudioAnalyser(\n mediaStream: MediaStream,\n options: AudioAnalyserOptions = {}\n) {\n const audioContext = new (window.AudioContext ||\n (window as unknown as { webkitAudioContext: typeof AudioContext })\n .webkitAudioContext)()\n const source = audioContext.createMediaStreamSource(mediaStream)\n const analyser = audioContext.createAnalyser()\n\n if (options.fftSize) {\n analyser.fftSize = options.fftSize\n }\n if (options.smoothingTimeConstant !== undefined) {\n analyser.smoothingTimeConstant = options.smoothingTimeConstant\n }\n if (options.minDecibels !== undefined) {\n analyser.minDecibels = options.minDecibels\n }\n if (options.maxDecibels !== undefined) {\n analyser.maxDecibels = options.maxDecibels\n }\n\n source.connect(analyser)\n\n const cleanup = () => {\n source.disconnect()\n audioContext.close()\n }\n\n return { analyser, audioContext, cleanup }\n}\n\nfunction useMultibandVolume(\n mediaStream?: MediaStream | null,\n options: MultiBandVolumeOptions = {}\n) {\n const bands = options.bands ?? multibandDefaults.bands ?? 5\n const loPass = options.loPass ?? multibandDefaults.loPass ?? 100\n const hiPass = options.hiPass ?? multibandDefaults.hiPass ?? 600\n const updateInterval =\n options.updateInterval ?? multibandDefaults.updateInterval ?? 32\n const fftSize =\n options.analyserOptions?.fftSize ??\n multibandDefaults.analyserOptions?.fftSize\n const smoothingTimeConstant =\n options.analyserOptions?.smoothingTimeConstant ??\n multibandDefaults.analyserOptions?.smoothingTimeConstant\n const minDecibels =\n options.analyserOptions?.minDecibels ??\n multibandDefaults.analyserOptions?.minDecibels\n const maxDecibels =\n options.analyserOptions?.maxDecibels ??\n multibandDefaults.analyserOptions?.maxDecibels\n\n const [frequencyBands, setFrequencyBands] = React.useState(() =>\n new Array(bands).fill(0)\n )\n const bandsRef = React.useRef(new Array(bands).fill(0))\n const frameId = React.useRef(undefined)\n\n React.useEffect(() => {\n if (!mediaStream) {\n const emptyBands = new Array(bands).fill(0)\n bandsRef.current = emptyBands\n setFrequencyBands(emptyBands)\n return\n }\n\n const { analyser, cleanup } = createAudioAnalyser(mediaStream, {\n fftSize,\n smoothingTimeConstant,\n minDecibels,\n maxDecibels,\n })\n\n const bufferLength = analyser.frequencyBinCount\n const dataArray = new Float32Array(bufferLength)\n const sliceStart = loPass\n const sliceEnd = hiPass\n const sliceLength = sliceEnd - sliceStart\n const chunkSize = Math.ceil(sliceLength / bands)\n\n let lastUpdate = 0\n\n const updateVolume = (timestamp: number) => {\n if (timestamp - lastUpdate >= updateInterval) {\n analyser.getFloatFrequencyData(dataArray)\n\n const chunks = new Array(bands)\n\n for (let i = 0; i < bands; i++) {\n let sum = 0\n let count = 0\n const startIdx = sliceStart + i * chunkSize\n const endIdx = Math.min(sliceStart + (i + 1) * chunkSize, sliceEnd)\n\n for (let j = startIdx; j < endIdx; j++) {\n sum += normalizeDb(dataArray[j])\n count++\n }\n\n chunks[i] = count > 0 ? sum / count : 0\n }\n\n let hasChanged = false\n for (let i = 0; i < chunks.length; i++) {\n if (Math.abs(chunks[i] - bandsRef.current[i]) > 0.01) {\n hasChanged = true\n break\n }\n }\n\n if (hasChanged) {\n bandsRef.current = chunks\n setFrequencyBands(chunks)\n }\n\n lastUpdate = timestamp\n }\n\n frameId.current = requestAnimationFrame(updateVolume)\n }\n\n frameId.current = requestAnimationFrame(updateVolume)\n\n return () => {\n cleanup()\n if (frameId.current) {\n cancelAnimationFrame(frameId.current)\n }\n }\n }, [\n bands,\n fftSize,\n hiPass,\n loPass,\n maxDecibels,\n mediaStream,\n minDecibels,\n smoothingTimeConstant,\n updateInterval,\n ])\n\n return frequencyBands\n}\n\nconst generateConnectingSequenceBar = (columns: number): number[][] => {\n const seq = []\n for (let x = 0; x < columns; x++) {\n seq.push([x, columns - 1 - x])\n }\n return seq\n}\n\nconst generateListeningSequenceBar = (columns: number): number[][] => {\n const center = Math.floor(columns / 2)\n const noIndex = -1\n return [[center], [noIndex]]\n}\n\nconst useBarAnimator = (\n state: AnimationState,\n columns: number,\n interval: number\n): number[] => {\n const indexRef = React.useRef(0)\n const [currentFrame, setCurrentFrame] = React.useState([])\n const animationFrameId = React.useRef(null)\n\n const sequence = React.useMemo(() => {\n if (state === "thinking" || state === "listening") {\n return generateListeningSequenceBar(columns)\n } else if (state === "connecting" || state === "initializing") {\n return generateConnectingSequenceBar(columns)\n } else if (state === undefined || state === "speaking") {\n return [new Array(columns).fill(0).map((_, idx) => idx)]\n } else {\n return [[]]\n }\n }, [state, columns])\n\n React.useEffect(() => {\n indexRef.current = 0\n setCurrentFrame(sequence[0] || [])\n }, [sequence])\n\n React.useEffect(() => {\n let startTime = performance.now()\n\n const animate = (time: DOMHighResTimeStamp) => {\n const timeElapsed = time - startTime\n\n if (timeElapsed >= interval) {\n indexRef.current = (indexRef.current + 1) % sequence.length\n setCurrentFrame(sequence[indexRef.current] || [])\n startTime = time\n }\n\n animationFrameId.current = requestAnimationFrame(animate)\n }\n\n animationFrameId.current = requestAnimationFrame(animate)\n\n return () => {\n if (animationFrameId.current !== null) {\n cancelAnimationFrame(animationFrameId.current)\n }\n }\n }, [interval, sequence])\n\n return currentFrame\n}\n\n// Memoized Bar component to prevent unnecessary re-renders.\nconst Bar = React.memo<{\n heightPct: number\n isHighlighted: boolean\n state?: AgentState\n}>(({ heightPct, isHighlighted, state }) => (\n \n))\n\nBar.displayName = "Bar"\n\nconst BarVisualizerComponent = React.forwardRef<\n HTMLDivElement,\n {\n state?: AgentState\n barCount?: number\n mediaStream?: MediaStream | null\n minHeight?: number\n maxHeight?: number\n demo?: boolean\n centerAlign?: boolean\n } & React.HTMLAttributes\n>(\n (\n {\n state,\n barCount = 15,\n mediaStream,\n minHeight = 20,\n maxHeight = 100,\n demo = false,\n centerAlign = false,\n className,\n style,\n ...props\n },\n ref\n ) => {\n const realVolumeBands = useMultibandVolume(mediaStream, {\n bands: barCount,\n loPass: 100,\n hiPass: 200,\n })\n\n const fakeVolumeBandsRef = React.useRef(\n new Array(barCount).fill(0.2)\n )\n const [fakeVolumeBands, setFakeVolumeBands] = React.useState(() =>\n new Array(barCount).fill(0.2)\n )\n const fakeAnimationRef = React.useRef(undefined)\n\n React.useEffect(() => {\n if (!demo) {\n return\n }\n\n if (state !== "speaking" && state !== "listening") {\n const bands = new Array(barCount).fill(0.2)\n fakeVolumeBandsRef.current = bands\n setFakeVolumeBands(bands)\n return\n }\n\n let lastUpdate = 0\n const updateInterval = 50\n const startTime = Date.now() / 1000\n\n const updateFakeVolume = (timestamp: number) => {\n if (timestamp - lastUpdate >= updateInterval) {\n const time = Date.now() / 1000 - startTime\n const newBands = new Array(barCount)\n\n for (let i = 0; i < barCount; i++) {\n const waveOffset = i * 0.5\n const baseVolume = Math.sin(time * 2 + waveOffset) * 0.3 + 0.5\n const randomNoise = Math.random() * 0.2\n newBands[i] = Math.max(0.1, Math.min(1, baseVolume + randomNoise))\n }\n\n let hasChanged = false\n for (let i = 0; i < barCount; i++) {\n if (Math.abs(newBands[i] - fakeVolumeBandsRef.current[i]) > 0.05) {\n hasChanged = true\n break\n }\n }\n\n if (hasChanged) {\n fakeVolumeBandsRef.current = newBands\n setFakeVolumeBands(newBands)\n }\n\n lastUpdate = timestamp\n }\n\n fakeAnimationRef.current = requestAnimationFrame(updateFakeVolume)\n }\n\n fakeAnimationRef.current = requestAnimationFrame(updateFakeVolume)\n\n return () => {\n if (fakeAnimationRef.current) {\n cancelAnimationFrame(fakeAnimationRef.current)\n }\n }\n }, [demo, state, barCount])\n\n const volumeBands = React.useMemo(\n () => (demo ? fakeVolumeBands : realVolumeBands),\n [demo, fakeVolumeBands, realVolumeBands]\n )\n\n const highlightedIndices = useBarAnimator(\n state,\n barCount,\n state === "connecting"\n ? 2000 / barCount\n : state === "thinking"\n ? 150\n : state === "listening"\n ? 500\n : 1000\n )\n\n return (\n \n {volumeBands.map((volume, index) => {\n const heightPct = Math.min(\n maxHeight,\n Math.max(minHeight, volume * 100 + 5)\n )\n const isHighlighted = highlightedIndices?.includes(index) ?? false\n\n return (\n \n )\n })}\n \n )\n }\n)\n\nBarVisualizerComponent.displayName = "BarVisualizerComponent"\n\nconst BarVisualizer = React.memo(\n BarVisualizerComponent,\n (prevProps, nextProps) => {\n return (\n prevProps.state === nextProps.state &&\n prevProps.barCount === nextProps.barCount &&\n prevProps.mediaStream === nextProps.mediaStream &&\n prevProps.minHeight === nextProps.minHeight &&\n prevProps.maxHeight === nextProps.maxHeight &&\n prevProps.demo === nextProps.demo &&\n prevProps.centerAlign === nextProps.centerAlign &&\n prevProps.className === nextProps.className &&\n JSON.stringify(prevProps.style) === JSON.stringify(nextProps.style)\n )\n }\n)\n\nBarVisualizer.displayName = "BarVisualizer"\n\nexport function BarVisualizerCard() {\n const [state, setState] = React.useState("speaking")\n\n return (\n \n \n Audio Frequency Visualizer\n \n Real-time frequency band visualization with animated state transitions\n \n \n \n \n \n \n setState("connecting")}\n >\n Connecting\n \n setState("listening")}\n >\n Listening\n \n setState("speaking")}\n >\n Speaking\n \n \n \n )\n}\n', + 'cards/book-appointment.tsx': + '"use client"\n\nimport {\n Alert,\n AlertDescription,\n AlertTitle,\n} from "@/components/ui/alert"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport {\n ToggleGroup,\n ToggleGroupItem,\n} from "@/components/ui/toggle-group"\n\nexport function BookAppointment() {\n return (\n \n \n Book Appointment\n Dr. Sarah Chen · Cardiology\n \n \n \n \n Available on March 18, 2026\n \n {["9:00 AM", "10:30 AM", "11:00 AM", "1:30 PM"].map(\n (time, index) => (\n \n {time}\n \n )\n )}\n \n \n \n \n New patient?\n Please arrive 15 minutes early.\n \n \n \n \n \n \n )\n}\n', + 'cards/codespaces-card.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent } from "@/components/ui/card"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from "@/components/ui/empty"\nimport {\n Field,\n FieldDescription,\n FieldLabel,\n} from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from "@/components/ui/input-group"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from "@/components/ui/item"\nimport { Separator } from "@/components/ui/separator"\nimport { Spinner } from "@/components/ui/spinner"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from "@/components/ui/tabs"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from "@/components/ui/tooltip"\n\nexport function CodespacesCard() {\n const [isCreatingCodespace, setIsCreatingCodespace] = React.useState(false)\n return (\n \n \n \n \n Codespaces\n Local\n \n \n \n \n Codespaces\n Your workspaces in the cloud\n \n \n \n }\n >\n \n \n \n Create a codespace on main\n \n \n \n }\n >\n \n \n \n \n \n \n New with options...\n \n \n \n Configure container\n \n \n \n Set up prebuilds\n \n \n \n \n \n \n Manage codespaces\n \n \n \n Share deep link\n \n \n \n What are codespaces?\n \n \n \n \n \n \n \n \n \n \n \n \n No codespaces\n \n You don't have any codespaces with this repository\n checked out\n \n \n \n {\n setIsCreatingCodespace(true)\n setTimeout(() => {\n setIsCreatingCodespace(false)\n }, 2000)\n }}\n disabled={isCreatingCodespace}\n >\n {isCreatingCodespace ? (\n \n ) : (\n ""\n )}\n Create Codespace\n \n \n Learn more about codespaces\n \n \n \n \n
\n Codespace usage for this repository is paid for by{" "}\n shadcn.\n
\n
\n \n \n \n \n \n Clone\n \n \n \n \n }\n >\n \n \n \n Which remote URL should I use?\n \n \n \n \n \n \n HTTPS\n SSH\n GitHub CLI\n \n
\n \n \n \n HTTPS URL\n \n \n \n \n \n \n \n \n \n \n Clone using the web URL.\n \n \n \n \n \n \n SSH URL\n \n \n \n \n \n \n \n \n \n \n Use a password-protected SSH key.\n \n \n \n \n \n \n CLI Command\n \n \n \n \n \n \n \n \n \n \n Work fast with our official CLI.{" "}\n Learn more\n \n \n \n
\n
\n \n
\n \n \n Open with GitHub Desktop\n \n \n \n Download ZIP\n \n
\n
\n
\n
\n
\n )\n}\n', + 'cards/github-profile.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from "@/components/ui/native-select"\nimport { Textarea } from "@/components/ui/textarea"\n\nexport function GithubProfile() {\n return (\n \n \n Profile\n Manage your profile information.\n \n \n
\n \n \n Name\n \n \n Your name may appear around GitHub where you contribute or are\n mentioned. You can remove it at any time.\n \n \n \n Public Email\n \n \n m@shadcn.com\n \n \n m@gmail.com\n \n \n \n You can manage verified email addresses in your{" "}\n email settings.\n \n \n \n Bio\n \n \n You can @mention other users and organizations to\n link to them.\n \n \n \n
\n
\n \n \n \n
\n )\n}\n', + 'cards/invite-team.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from "@/components/ui/input-group"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Separator } from "@/components/ui/separator"\n\nexport function InviteTeam() {\n return (\n \n \n Invite Team\n Add members to your workspace\n \n \n
\n {[\n { email: "alex@example.com", role: "Editor" },\n { email: "sam@example.com", role: "Viewer" },\n ].map((invite) => (\n
\n \n \n \n \n \n \n \n Admin\n Editor\n Viewer\n \n \n \n
\n ))}\n
\n \n \n \n Or share invite link\n \n \n \n \n \n \n \n \n \n
\n \n \n \n
\n )\n}\n', + 'cards/invoice.tsx': + '"use client"\n\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport {\n Table,\n TableBody,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from "@/components/ui/table"\n\nconst INVOICE_ITEMS = [\n { item: "Design System License", qty: 1, unitPrice: 499 },\n { item: "Priority Support", qty: 12, unitPrice: 99 },\n { item: "Custom Components", qty: 3, unitPrice: 250 },\n] as const\n\nconst subtotal = INVOICE_ITEMS.reduce(\n (sum, row) => sum + row.qty * row.unitPrice,\n 0\n)\nconst tax = 0\nconst totalDue = subtotal + tax\n\nfunction formatCurrency(value: number) {\n return new Intl.NumberFormat("en-US", {\n style: "currency",\n currency: "USD",\n maximumFractionDigits: 2,\n }).format(value)\n}\n\nexport function Invoice() {\n return (\n \n \n Invoice #INV-2847\n Due March 30, 2026\n \n Pending\n \n \n \n \n \n \n Item\n Qty\n Rate\n Amount\n \n \n \n {INVOICE_ITEMS.map((row) => (\n \n {row.item}\n \n {row.qty}\n \n \n {formatCurrency(row.unitPrice)}\n \n \n {formatCurrency(row.qty * row.unitPrice)}\n \n \n ))}\n \n \n Subtotal\n \n \n {formatCurrency(subtotal)}\n \n \n \n \n Tax\n \n $0.00\n \n \n \n Total Due\n \n \n {formatCurrency(totalDue)}\n \n \n \n
\n
\n \n \n \n \n
\n )\n}\n', + 'cards/report-bug.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Textarea } from "@/components/ui/textarea"\n\nexport function ReportBug() {\n return (\n \n \n Report Bug\n Help us fix issues faster.\n \n \n \n \n Title\n \n \n
\n \n Severity\n \n \n \n \n \n \n Critical\n High\n Medium\n Low\n \n \n \n \n \n Component\n \n \n \n \n \n \n Dashboard\n Auth\n API\n Billing\n \n \n \n \n
\n \n Steps to reproduce\n \n \n
\n
\n \n \n \n \n \n \n
\n )\n}\n', + 'cards/shipping-address.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from "@/components/ui/card"\nimport { Checkbox } from "@/components/ui/checkbox"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\n\nexport function ShippingAddress() {\n return (\n \n \n Shipping Address\n Where should we deliver?\n \n \n \n \n Street address\n \n \n \n Apt / Suite\n \n \n \n \n City\n \n \n \n State\n \n \n \n \n \n \n California\n New York\n Texas\n \n \n \n \n \n \n \n ZIP Code\n \n \n \n Country\n \n \n \n \n \n \n United States\n Canada\n United Kingdom\n \n \n \n \n \n \n \n \n Save as default address\n \n \n \n \n \n \n \n \n \n )\n}\n', + 'cards/typography-specimen.tsx': + '"use client"\n\nimport { Button } from "@/components/ui/button"\nimport { Card, CardContent, CardFooter } from "@/components/ui/card"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from "@/components/ui/dialog"\nimport { Field, FieldGroup, FieldLabel } from "@/components/ui/field"\nimport { Input } from "@/components/ui/input"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from "@/components/ui/select"\nimport { Textarea } from "@/components/ui/textarea"\nimport { usePreviewTypography } from "../style"\n\nexport function TypographySpecimen() {\n const { body, heading } = usePreviewTypography()\n\n return (\n \n \n
\n {heading ?? "Inherit"} - {body}\n
\n

\n Designing with rhythm and hierarchy.\n

\n

\n A strong body style keeps long-form content readable and balances the\n visual weight of headings.\n

\n

\n Thoughtful spacing and cadence help paragraphs scan quickly without\n feeling dense.\n

\n
\n \n \n }\n >\n Share Feedback\n \n \n \n Share Feedback\n \n Let us know how we can improve your experience.\n \n \n \n
\n \n Name\n \n \n \n Email\n \n \n
\n \n Category\n \n \n \n \n \n \n General\n Bug Report\n Feature Request\n Improvement\n \n \n \n \n \n Message\n \n \n
\n \n }>\n Cancel\n \n \n \n
\n
\n
\n
\n )\n}\n', + 'cards/ui-elements.tsx': + '"use client"\n\nimport * as React from "react"\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from "@/components/ui/alert-dialog"\nimport { Badge } from "@/components/ui/badge"\nimport { Button } from "@/components/ui/button"\nimport { ButtonGroup } from "@/components/ui/button-group"\nimport { Card, CardContent } from "@/components/ui/card"\nimport { Checkbox } from "@/components/ui/checkbox"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from "@/components/ui/dropdown-menu"\nimport { Field, FieldGroup } from "@/components/ui/field"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n InputGroupText,\n} from "@/components/ui/input-group"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from "@/components/ui/item"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from "@/components/ui/radio-group"\nimport { Slider } from "@/components/ui/slider"\nimport { Switch } from "@/components/ui/switch"\nimport { Textarea } from "@/components/ui/textarea"\n\nexport function UIElements() {\n const [sliderValue, setSliderValue] = React.useState([500])\n const handleSliderValueChange = React.useCallback(\n (value: number | readonly number[]) => {\n if (typeof value === "number") {\n setSliderValue([value])\n } else {\n setSliderValue([...value])\n }\n },\n []\n )\n\n return (\n \n \n
\n
\n \n \n \n \n
\n \n \n Two-factor authentication\n \n Verify via email or phone number.\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n