repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/compare.test.ts
packages/shadcn/src/utils/compare.test.ts
import { describe, expect, it } from "vitest" import { isContentSame } from "./compare" describe("isContentSame", () => { describe("basic comparisons", () => { it("should return true for identical content", () => { const content = `const foo = "bar"` expect(isContentSame(content, content)).toBe(true...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/get-package-manager.ts
packages/shadcn/src/utils/get-package-manager.ts
import { detect } from "@antfu/ni" export async function getPackageManager( targetDir: string, { withFallback }: { withFallback?: boolean } = { withFallback: false, } ): Promise<"yarn" | "pnpm" | "bun" | "npm" | "deno"> { const packageManager = await detect({ programmatic: true, cwd: targetDir }) if (pa...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-css.ts
packages/shadcn/src/utils/updaters/update-css.ts
import { promises as fs } from "fs" import path from "path" import { registryItemCssSchema } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { highlighter } from "@/src/utils/highlighter" import { spinner } from "@/src/utils/spinner" import postcss from "postcss" import AtRule from "postcss/l...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-tailwind-content.ts
packages/shadcn/src/utils/updaters/update-tailwind-content.ts
import { promises as fs } from "fs" import path from "path" import { Config } from "@/src/utils/get-config" import { highlighter } from "@/src/utils/highlighter" import { spinner } from "@/src/utils/spinner" import { _createSourceFile, _getQuoteChar, } from "@/src/utils/updaters/update-tailwind-config" import { Obj...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-env-vars.test.ts
packages/shadcn/src/utils/updaters/update-env-vars.test.ts
import { existsSync, promises as fs } from "fs" import type { Config } from "@/src/utils/get-config" import { afterEach, beforeEach, describe, expect, test, vi } from "vitest" import { updateEnvVars } from "./update-env-vars" vi.mock("fs", () => ({ existsSync: vi.fn(), promises: { readFile: vi.fn(), write...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-files.ts
packages/shadcn/src/utils/updaters/update-files.ts
import { existsSync, promises as fs, statSync } from "fs" import { tmpdir } from "os" import path, { basename } from "path" import { getRegistryBaseColor } from "@/src/registry/api" import { RegistryItem, registryItemFileSchema } from "@/src/schema" import { isContentSame } from "@/src/utils/compare" import { findExi...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-dependencies.ts
packages/shadcn/src/utils/updaters/update-dependencies.ts
import { RegistryItem } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { getPackageInfo } from "@/src/utils/get-package-info" import { getPackageManager } from "@/src/utils/get-package-manager" import { logger } from "@/src/utils/logger" import { spinner } from "@/src/utils/spinner" import {...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-fonts.test.ts
packages/shadcn/src/utils/updaters/update-fonts.test.ts
import { describe, expect, it } from "vitest" import { transformLayoutFonts } from "./update-fonts" const mockConfig = { style: "new-york", rsc: true, tsx: true, tailwind: { config: "tailwind.config.js", css: "app/globals.css", baseColor: "neutral", cssVariables: true, }, aliases: { co...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-tailwind-config.ts
packages/shadcn/src/utils/updaters/update-tailwind-config.ts
import { promises as fs } from "fs" import { tmpdir } from "os" import path from "path" import { registryItemCssVarsSchema, registryItemTailwindSchema, } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { TailwindVersion } from "@/src/utils/get-project-info" import { highlighter } from "@/...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-fonts.ts
packages/shadcn/src/utils/updaters/update-fonts.ts
import { existsSync, promises as fs } from "fs" import path from "path" import { RegistryFontItem, registryResolvedItemsTreeSchema } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { ProjectInfo, getProjectInfo } from "@/src/utils/get-project-info" import { highlighter } from "@/src/utils/hig...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-env-vars.ts
packages/shadcn/src/utils/updaters/update-env-vars.ts
import { existsSync, promises as fs } from "fs" import path from "path" import { registryItemEnvVarsSchema } from "@/src/schema" import { findExistingEnvFile, getNewEnvKeys, mergeEnvContent, } from "@/src/utils/env-helpers" import { Config } from "@/src/utils/get-config" import { highlighter } from "@/src/utils/h...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/updaters/update-css-vars.ts
packages/shadcn/src/utils/updaters/update-css-vars.ts
import { promises as fs } from "fs" import path from "path" import { registryItemCssVarsSchema, registryItemTailwindSchema, } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { getPackageInfo } from "@/src/utils/get-package-info" import { TailwindVersion } from "@/src/utils/get-project-inf...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-next.ts
packages/shadcn/src/utils/transformers/transform-next.ts
import { Transformer } from "@/src/utils/transformers" export const transformNext: Transformer = async ({ sourceFile }) => { // export function middleware. sourceFile.getFunctions().forEach((func) => { if (func.getName() === "middleware") { func.rename("proxy") } }) // export const middleware. ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-legacy-icons.ts
packages/shadcn/src/utils/transformers/transform-legacy-icons.ts
import { getRegistryIcons } from "@/src/registry/api" import { LEGACY_ICON_LIBRARIES } from "@/src/utils/legacy-icon-libraries" import { Transformer } from "@/src/utils/transformers" import { SourceFile, SyntaxKind } from "ts-morph" // Lucide is the default icon library in the registry. const SOURCE_LIBRARY = "lucide"...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-next.test.ts
packages/shadcn/src/utils/transformers/transform-next.test.ts
import { FRAMEWORKS } from "@/src/utils/frameworks" import { type Config } from "@/src/utils/get-config" import { transformNext } from "@/src/utils/transformers/transform-next" import { describe, expect, test, vi } from "vitest" import { transform } from "../transformers" const testConfig: Config = { style: "new-yo...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-css-vars.ts
packages/shadcn/src/utils/transformers/transform-css-vars.ts
import { registryBaseColorSchema } from "@/src/schema" import { Transformer } from "@/src/utils/transformers" import { ScriptKind, SyntaxKind } from "ts-morph" import { z } from "zod" export const transformCssVars: Transformer = async ({ sourceFile, config, baseColor, }) => { // No transform if using css varia...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-import.ts
packages/shadcn/src/utils/transformers/transform-import.ts
import { Config } from "@/src/utils/get-config" import { Transformer } from "@/src/utils/transformers" import { SyntaxKind } from "ts-morph" export const transformImport: Transformer = async ({ sourceFile, config, isRemote, }) => { const utilsAlias = config.aliases?.utils const workspaceAlias = typeof ut...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-icons.test.ts
packages/shadcn/src/utils/transformers/transform-icons.test.ts
import { type Config } from "@/src/utils/get-config" import { transformIcons } from "@/src/utils/transformers/transform-icons" import { describe, expect, test } from "vitest" import { transform } from "." const testConfig: Config = { style: "new-york", tsx: true, rsc: true, tailwind: { baseColor: "neutral...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-menu.ts
packages/shadcn/src/utils/transformers/transform-menu.ts
import { Transformer } from "@/src/utils/transformers" import { SyntaxKind } from "ts-morph" // Transforms cn-menu-target class based on config.menuColor. // If menuColor is "inverted", replaces cn-menu-target with "dark". // Otherwise, removes cn-menu-target entirely. export const transformMenu: Transformer = async (...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-render.ts
packages/shadcn/src/utils/transformers/transform-render.ts
import { Transformer } from "@/src/utils/transformers" import { SyntaxKind } from "ts-morph" interface TransformInfo { elementStart: number elementEnd: number newText: string } export const transformRender: Transformer = async ({ sourceFile, config }) => { // Only run for base- styles. if (!config.style?.st...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-tw-prefix.ts
packages/shadcn/src/utils/transformers/transform-tw-prefix.ts
import { Transformer } from "@/src/utils/transformers" import { SyntaxKind } from "ts-morph" import { TailwindVersion, getProjectTailwindVersionFromConfig, } from "../get-project-info" import { splitClassName } from "./transform-css-vars" export const transformTwPrefixes: Transformer = async ({ sourceFile, co...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-legacy-icons.test.ts
packages/shadcn/src/utils/transformers/transform-legacy-icons.test.ts
import { type Config } from "@/src/utils/get-config" import { transformLegacyIcons } from "@/src/utils/transformers/transform-legacy-icons" import { describe, expect, test, vi } from "vitest" import { transform } from "../transformers" const testConfig: Config = { style: "new-york", tsx: true, rsc: true, tail...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-aschild.test.ts
packages/shadcn/src/utils/transformers/transform-aschild.test.ts
import { type Config } from "@/src/utils/get-config" import { transformAsChild } from "@/src/utils/transformers/transform-aschild" import { describe, expect, test } from "vitest" import { transform } from "." const testConfig: Config = { style: "base-default", tsx: true, rsc: true, tailwind: { baseColor: ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-jsx.ts
packages/shadcn/src/utils/transformers/transform-jsx.ts
import { type Transformer } from "@/src/utils/transformers" import { transformFromAstSync } from "@babel/core" import { ParserOptions, parse } from "@babel/parser" // @ts-ignore import transformTypescript from "@babel/plugin-transform-typescript" import * as recast from "recast" // TODO. // I'm using recast for the AS...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-rsc.ts
packages/shadcn/src/utils/transformers/transform-rsc.ts
import { Transformer } from "@/src/utils/transformers" import { SyntaxKind } from "ts-morph" const directiveRegex = /^["']use client["']$/g export const transformRsc: Transformer = async ({ sourceFile, config }) => { if (config.rsc) { return sourceFile } // Remove "use client" from the top of the file. c...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-render.test.ts
packages/shadcn/src/utils/transformers/transform-render.test.ts
import { type Config } from "@/src/utils/get-config" import { transformRender } from "@/src/utils/transformers/transform-render" import { describe, expect, test } from "vitest" import { transform } from "." const testConfig: Config = { style: "base-default", tsx: true, rsc: true, tailwind: { baseColor: "n...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/index.ts
packages/shadcn/src/utils/transformers/index.ts
import { promises as fs } from "fs" import { tmpdir } from "os" import path from "path" import { registryBaseColorSchema } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { transformCssVars } from "@/src/utils/transformers/transform-css-vars" import { transformIcons } from "@/src/utils/transf...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-icons.ts
packages/shadcn/src/utils/transformers/transform-icons.ts
import { iconLibraries, type IconLibraryName } from "@/src/icons/libraries" import { Transformer } from "@/src/utils/transformers" import { SourceFile, SyntaxKind } from "ts-morph" export const transformIcons: Transformer = async ({ sourceFile, config }) => { const iconLibrary = config.iconLibrary // Fail silentl...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-menu.test.ts
packages/shadcn/src/utils/transformers/transform-menu.test.ts
import { type Config } from "@/src/utils/get-config" import { transformMenu } from "@/src/utils/transformers/transform-menu" import { describe, expect, test } from "vitest" import { transform } from "." const testConfig: Config = { style: "new-york", tsx: true, rsc: true, tailwind: { baseColor: "neutral",...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/utils/transformers/transform-aschild.ts
packages/shadcn/src/utils/transformers/transform-aschild.ts
import { Transformer } from "@/src/utils/transformers" import { JsxElement, SyntaxKind } from "ts-morph" // Elements that require nativeButton={false} when used as render prop. // These are non-button elements that don't have native button semantics. const ELEMENTS_REQUIRING_NATIVE_BUTTON_FALSE = [ "a", "span", ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/migrations/migrate-radix.ts
packages/shadcn/src/migrations/migrate-radix.ts
import { promises as fs } from "fs" import path from "path" import { Config } from "@/src/utils/get-config" import { getPackageInfo } from "@/src/utils/get-package-info" import { highlighter } from "@/src/utils/highlighter" import { logger } from "@/src/utils/logger" import { spinner } from "@/src/utils/spinner" import...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/migrations/migrate-icons.test.ts
packages/shadcn/src/migrations/migrate-icons.test.ts
import { describe, expect, it } from "vitest" import { migrateIconsFile } from "./migrate-icons" describe("migrateIconsFile", () => { it("should replace radix icons with lucide icons", async () => { const input = ` import { CheckIcon, CloseIcon } from "@radix-ui/react-icons" import { Something } fro...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/migrations/migrate-icons.ts
packages/shadcn/src/migrations/migrate-icons.ts
import { randomBytes } from "crypto" import { promises as fs } from "fs" import { tmpdir } from "os" import path from "path" import { getRegistryIcons } from "@/src/registry/api" import { iconsSchema } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { highlighter } from "@/src/utils/highlight...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/migrations/migrate-radix.test.ts
packages/shadcn/src/migrations/migrate-radix.test.ts
import { promises as fs } from "fs" import { beforeEach, describe, expect, it, vi } from "vitest" import { migrateRadix, migrateRadixFile } from "./migrate-radix" // Mock dependencies vi.mock("fs", () => ({ promises: { readFile: vi.fn(), writeFile: vi.fn(), mkdtemp: vi.fn(), }, })) vi.mock("fast-glob...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
true
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/config.ts
packages/shadcn/src/registry/config.ts
import { BUILTIN_REGISTRIES, FALLBACK_STYLE } from "@/src/registry/constants" import { configSchema } from "@/src/schema" import { Config, DeepPartial, createConfig } from "@/src/utils/get-config" import deepmerge from "deepmerge" function resolveStyleFromConfig(config: DeepPartial<Config>) { if (!config.style) { ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/builder.ts
packages/shadcn/src/registry/builder.ts
import { BUILTIN_REGISTRIES, REGISTRY_URL } from "@/src/registry/constants" import { expandEnvVars } from "@/src/registry/env" import { RegistryNotConfiguredError } from "@/src/registry/errors" import { parseRegistryAndItemFromString } from "@/src/registry/parser" import { isLocalFile, isUrl } from "@/src/registry/util...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/namespaces.ts
packages/shadcn/src/registry/namespaces.ts
import { BUILTIN_REGISTRIES } from "@/src/registry/constants" import { RegistryNotConfiguredError } from "@/src/registry/errors" import { parseRegistryAndItemFromString } from "@/src/registry/parser" import { fetchRegistryItems } from "@/src/registry/resolver" import { Config } from "@/src/utils/get-config" // Recursi...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/builder.test.ts
packages/shadcn/src/registry/builder.test.ts
/* eslint-disable turbo/no-undeclared-env-vars */ import { REGISTRY_URL } from "@/src/registry/constants" import { afterEach, beforeEach, describe, expect, it } from "vitest" import { buildHeadersFromRegistryConfig, buildUrlAndHeadersForRegistryItem, buildUrlFromRegistryConfig, resolveRegistryUrl, } from "./b...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/validator.test.ts
packages/shadcn/src/registry/validator.test.ts
/* eslint-disable turbo/no-undeclared-env-vars */ import { afterEach, beforeEach, describe, expect, it } from "vitest" import { extractEnvVarsFromRegistryConfig, validateRegistryConfig, } from "./validator" describe("extractEnvVarsFromRegistryConfig", () => { it("should extract vars from string config", () => {...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/errors.ts
packages/shadcn/src/registry/errors.ts
import { z } from "zod" // Error codes for programmatic error handling export const RegistryErrorCode = { // Network errors NETWORK_ERROR: "NETWORK_ERROR", NOT_FOUND: "NOT_FOUND", UNAUTHORIZED: "UNAUTHORIZED", FORBIDDEN: "FORBIDDEN", FETCH_ERROR: "FETCH_ERROR", // Configuration errors NOT_CONFIGURED: ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/utils.ts
packages/shadcn/src/registry/utils.ts
import * as fs from "fs/promises" import { tmpdir } from "os" import * as path from "path" import { configSchema, registryItemFileSchema, registryItemSchema, } from "@/src/schema" import { Config } from "@/src/utils/get-config" import { ProjectInfo, getProjectInfo } from "@/src/utils/get-project-info" import { re...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/env.ts
packages/shadcn/src/registry/env.ts
export function expandEnvVars(value: string) { return value.replace(/\${(\w+)}/g, (_match, key) => process.env[key] || "") } export function extractEnvVars(value: string) { const vars: string[] = [] const regex = /\${(\w+)}/g let match: RegExpExecArray | null while ((match = regex.exec(value)) !== null) { ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/schema.ts
packages/shadcn/src/registry/schema.ts
import { z } from "zod" // Note: if you edit the schema here, you must also edit the schema in the // apps/v4/public/schema/registry-item.json file. export const registryConfigItemSchema = z.union([ // Simple string format: "https://example.com/{name}.json" z.string().refine((s) => s.includes("{name}"), { mes...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/fetcher.test.ts
packages/shadcn/src/registry/fetcher.test.ts
import { REGISTRY_URL } from "@/src/registry/constants" import { RegistryFetchError, RegistryForbiddenError, RegistryNotFoundError, RegistryUnauthorizedError, } from "@/src/registry/errors" import { HttpResponse, http } from "msw" import { setupServer } from "msw/node" import { afterAll, afterEach, beforeAll, d...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/api.ts
packages/shadcn/src/registry/api.ts
import path from "path" import { buildUrlAndHeadersForRegistryItem } from "@/src/registry/builder" import { configWithDefaults } from "@/src/registry/config" import { BASE_COLORS, BUILTIN_REGISTRIES, REGISTRY_URL, } from "@/src/registry/constants" import { clearRegistryContext, setRegistryHeaders, } from "@/s...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/utils.test.ts
packages/shadcn/src/registry/utils.test.ts
import { describe, expect, it, test, vi } from "vitest" import { z } from "zod" import { Config } from "../utils/get-config" import { registryItemFileSchema } from "./schema" import { canDeduplicateFiles, deduplicateFilesByTarget, getDependencyFromModuleSpecifier, isLocalFile, isUniversalRegistryItem, isUr...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/search.test.ts
packages/shadcn/src/registry/search.test.ts
import { describe, expect, it, vi } from "vitest" import { getRegistry } from "./api" import { buildRegistryItemNameFromRegistry, searchRegistries } from "./search" describe("searchRegistries", () => { it("should fetch and return registries in flat format", async () => { // Mock getRegistry vi.mock("./api",...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/search.ts
packages/shadcn/src/registry/search.ts
import { searchResultItemSchema, searchResultsSchema } from "@/src/schema" import { Config } from "@/src/utils/get-config" import fuzzysort from "fuzzysort" import { z } from "zod" import { getRegistry } from "./api" export async function searchRegistries( registries: string[], options?: { query?: string ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/namespaces.test.ts
packages/shadcn/src/registry/namespaces.test.ts
import { beforeEach, describe, expect, it, vi } from "vitest" import { Config } from "../utils/get-config" import { BUILTIN_REGISTRIES } from "./constants" import { RegistryNotConfiguredError } from "./errors" import { resolveRegistryNamespaces } from "./namespaces" import * as resolver from "./resolver" // Mock the ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/resolver.ts
packages/shadcn/src/registry/resolver.ts
import { createHash } from "crypto" import path from "path" import { getRegistryBaseColor, getShadcnRegistryIndex, } from "@/src/registry/api" import { buildUrlAndHeadersForRegistryItem, resolveRegistryUrl, } from "@/src/registry/builder" import { setRegistryHeaders } from "@/src/registry/context" import { Re...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/constants.ts
packages/shadcn/src/registry/constants.ts
import { registryConfigSchema } from "@/src/schema" import { z } from "zod" export const REGISTRY_URL = process.env.REGISTRY_URL ?? "https://ui.shadcn.com/r" export const FALLBACK_STYLE = "new-york-v4" export const BASE_COLORS = [ { name: "neutral", label: "Neutral", }, { name: "gray", label:...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/parser.test.ts
packages/shadcn/src/registry/parser.test.ts
import { describe, expect, it } from "vitest" import { parseRegistryAndItemFromString } from "./parser" describe("parseRegistryAndItemFromString", () => { describe("valid registry items", () => { it.each([ ["@v0/button", { registry: "@v0", item: "button" }], ["@acme/data-table", { registry: "@acme",...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/fetcher.ts
packages/shadcn/src/registry/fetcher.ts
import { promises as fs } from "fs" import { homedir } from "os" import path from "path" import { resolveRegistryUrl } from "@/src/registry/builder" import { getRegistryHeadersFromContext } from "@/src/registry/context" import { RegistryFetchError, RegistryForbiddenError, RegistryLocalFileError, RegistryNotFoun...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/context.ts
packages/shadcn/src/registry/context.ts
interface RegistryContext { headers: Record<string, Record<string, string>> } let context: RegistryContext = { headers: {}, } export function setRegistryHeaders( headers: Record<string, Record<string, string>> ) { // Merge new headers with existing ones to preserve headers for nested dependencies context.he...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/validator.ts
packages/shadcn/src/registry/validator.ts
import { buildUrlAndHeadersForRegistryItem } from "@/src/registry/builder" import { configWithDefaults } from "@/src/registry/config" import { clearRegistryContext } from "@/src/registry/context" import { extractEnvVars } from "@/src/registry/env" import { RegistryMissingEnvironmentVariablesError } from "@/src/registry...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/api.test.ts
packages/shadcn/src/registry/api.test.ts
import { promises as fs } from "fs" import { tmpdir } from "os" import path from "path" import { BUILTIN_REGISTRIES, REGISTRY_URL } from "@/src/registry/constants" import { ConfigParseError, RegistryErrorCode, RegistryFetchError, RegistryForbiddenError, RegistryInvalidNamespaceError, RegistryLocalFileError,...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
true
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/schema.test.ts
packages/shadcn/src/registry/schema.test.ts
import { describe, expect, it } from "vitest" import { registryConfigSchema } from "./schema" describe("registryConfigSchema", () => { it("should accept valid registry names starting with @", () => { const validConfig = { "@v0": "https://v0.dev/{name}.json", "@acme": { url: "https://acme.com...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/index.ts
packages/shadcn/src/registry/index.ts
export { getRegistryItems, resolveRegistryItems, getRegistry, getRegistriesIndex, } from "./api" export { searchRegistries } from "./search" export { RegistryError, RegistryNotFoundError, RegistryUnauthorizedError, RegistryForbiddenError, RegistryFetchError, RegistryNotConfiguredError, RegistryL...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/env.test.ts
packages/shadcn/src/registry/env.test.ts
/* eslint-disable turbo/no-undeclared-env-vars */ import { afterEach, beforeEach, describe, expect, it } from "vitest" import { expandEnvVars, extractEnvVars } from "./env" describe("expandEnvVars", () => { beforeEach(() => { process.env.TEST_TOKEN = "abc123" process.env.API_KEY = "secret" }) afterEach...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/resolver.test.ts
packages/shadcn/src/registry/resolver.test.ts
/* eslint-disable turbo/no-undeclared-env-vars */ import { promises as fs } from "fs" import { tmpdir } from "os" import path from "path" import { HttpResponse, http } from "msw" import { setupServer } from "msw/node" import { afterAll, beforeAll, beforeEach, describe, expect, it, test, vi, } from "vite...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
true
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/config.test.ts
packages/shadcn/src/registry/config.test.ts
import { BUILTIN_REGISTRIES, FALLBACK_STYLE } from "@/src/registry/constants" import { createConfig } from "@/src/utils/get-config" import { describe, expect, it } from "vitest" import { configWithDefaults } from "./config" describe("configWithDefaults", () => { it("should merge built-in registries with user regist...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/registry/parser.ts
packages/shadcn/src/registry/parser.ts
// Valid registry name pattern: @namespace where namespace is alphanumeric with hyphens/underscores const REGISTRY_PATTERN = /^(@[a-zA-Z0-9](?:[a-zA-Z0-9-_]*[a-zA-Z0-9])?)\/(.+)$/ export function parseRegistryAndItemFromString(name: string) { if (!name.startsWith("@")) { return { registry: null, item...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/schema/index.ts
packages/shadcn/src/schema/index.ts
export * from "../registry/schema"
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/mcp/utils.ts
packages/shadcn/src/mcp/utils.ts
import { getRegistriesConfig } from "@/src/registry/api" import { registryItemSchema, searchResultsSchema } from "@/src/schema" import { getPackageRunner } from "@/src/utils/get-package-manager" import { z } from "zod" const SHADCN_CLI_COMMAND = "shadcn@latest" export async function npxShadcn(command: string) { con...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/src/mcp/index.ts
packages/shadcn/src/mcp/index.ts
import { getRegistryItems, searchRegistries } from "@/src/registry" import { RegistryError } from "@/src/registry/errors" import { Server } from "@modelcontextprotocol/sdk/server/index.js" import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js" import dedent from "dedent"...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/config-full/tailwind.config.ts
packages/shadcn/test/fixtures/config-full/tailwind.config.ts
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/vite-with-tailwind/vite.config.ts
packages/shadcn/test/fixtures/vite-with-tailwind/vite.config.ts
import { defineConfig } from "vite" import tailwindcss from "@tailwindcss/vite" import path from "path" export default defineConfig({ plugins: [tailwindcss()], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, })
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/vite-with-tailwind/src/App.tsx
packages/shadcn/test/fixtures/vite-with-tailwind/src/App.tsx
export default function App() { return <div>Hello World</div> }
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/vite-with-tailwind/src/main.tsx
packages/shadcn/test/fixtures/vite-with-tailwind/src/main.tsx
import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( <React.StrictMode> <App /> </React.StrictMode>, )
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/vite-with-tailwind/src/vite-env.d.ts
packages/shadcn/test/fixtures/vite-with-tailwind/src/vite-env.d.ts
/// <reference types="vite/client" />
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/vite-with-tailwind/src/components/ui/button.tsx
packages/shadcn/test/fixtures/vite-with-tailwind/src/components/ui/button.tsx
export function Button() { return <button>Click me</button> }
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/vite-with-tailwind/src/lib/utils.ts
packages/shadcn/test/fixtures/vite-with-tailwind/src/lib/utils.ts
import { clsx, type ClassValue } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) }
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/config-partial/tailwind.config.ts
packages/shadcn/test/fixtures/config-partial/tailwind.config.ts
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/vite/vite.config.ts
packages/shadcn/test/fixtures/frameworks/vite/vite.config.ts
import { defineConfig } from "vite" // https://vitejs.dev/config/ export default defineConfig({ plugins: [], })
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/vite/src/App.tsx
packages/shadcn/test/fixtures/frameworks/vite/src/App.tsx
import { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' import './App.css' function App() { const [count, setCount] = useState(0) return ( <> <div> <a href="https://vitejs.dev" target="_blank"> <img src={viteLogo} className="logo" al...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/vite/src/main.tsx
packages/shadcn/test/fixtures/frameworks/vite/src/main.tsx
import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import App from './App.tsx' import './index.css' createRoot(document.getElementById('root')!).render( <StrictMode> <App /> </StrictMode>, )
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/vite/src/vite-env.d.ts
packages/shadcn/test/fixtures/frameworks/vite/src/vite-env.d.ts
/// <reference types="vite/client" />
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/t3-app/tailwind.config.ts
packages/shadcn/test/fixtures/frameworks/t3-app/tailwind.config.ts
import { type Config } from "tailwindcss"; import { fontFamily } from "tailwindcss/defaultTheme"; export default { content: ["./src/**/*.tsx"], theme: { extend: { fontFamily: { sans: ["var(--font-geist-sans)", ...fontFamily.sans], }, }, }, plugins: [], } satisfies Config;
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/t3-app/src/app/layout.tsx
packages/shadcn/test/fixtures/frameworks/t3-app/src/app/layout.tsx
import "~/styles/globals.css"; import { GeistSans } from "geist/font/sans"; import { type Metadata } from "next"; export const metadata: Metadata = { title: "Create T3 App", description: "Generated by create-t3-app", icons: [{ rel: "icon", url: "/favicon.ico" }], }; export default function RootLayout({ child...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/t3-app/src/app/page.tsx
packages/shadcn/test/fixtures/frameworks/t3-app/src/app/page.tsx
import Link from "next/link"; export default function HomePage() { return ( <main className="flex min-h-screen flex-col items-center justify-center bg-gradient-to-b from-[#2e026d] to-[#15162c] text-white"> <div className="container flex flex-col items-center justify-center gap-12 px-4 py-16"> <h1 c...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/remix/tailwind.config.ts
packages/shadcn/test/fixtures/frameworks/remix/tailwind.config.ts
import type { Config } from "tailwindcss"; export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { extend: {}, }, plugins: [], } satisfies Config;
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/remix/vite.config.ts
packages/shadcn/test/fixtures/frameworks/remix/vite.config.ts
import { defineConfig } from "vite" import tsconfigPaths from "vite-tsconfig-paths" export default defineConfig({ plugins: [tsconfigPaths()], })
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/remix/app/root.tsx
packages/shadcn/test/fixtures/frameworks/remix/app/root.tsx
import { Links, Meta, Outlet, Scripts, ScrollRestoration, } from "@remix-run/react"; import "./tailwind.css"; export function Layout({ children }: { children: React.ReactNode }) { return ( <html lang="en"> <head> <meta charSet="utf-8" /> <meta name="viewport" content="width=device...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/remix/app/entry.server.tsx
packages/shadcn/test/fixtures/frameworks/remix/app/entry.server.tsx
/** * By default, Remix will handle generating the HTTP Response for you. * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ * For more information, see https://remix.run/file-conventions/entry.server */ import { PassThrough } from "node:st...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/remix/app/entry.client.tsx
packages/shadcn/test/fixtures/frameworks/remix/app/entry.client.tsx
/** * By default, Remix will handle hydrating your app on the client for you. * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ * For more information, see https://remix.run/file-conventions/entry.client */ import { RemixBrowser } from "@r...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/remix/app/routes/_index.tsx
packages/shadcn/test/fixtures/frameworks/remix/app/routes/_index.tsx
import type { MetaFunction } from "@remix-run/node"; export const meta: MetaFunction = () => { return [ { title: "New Remix App" }, { name: "description", content: "Welcome to Remix!" }, ]; }; export default function Index() { return ( <div className="font-sans p-4"> <h1 className="text-3xl">W...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/t3-pages/tailwind.config.ts
packages/shadcn/test/fixtures/frameworks/t3-pages/tailwind.config.ts
import { type Config } from "tailwindcss"; export default { content: ["./src/**/*.{js,ts,jsx,tsx}"], theme: { extend: {}, }, plugins: [], } satisfies Config;
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/t3-pages/src/pages/_app.tsx
packages/shadcn/test/fixtures/frameworks/t3-pages/src/pages/_app.tsx
import { type AppType } from "next/dist/shared/lib/utils"; import "~/styles/globals.css"; const MyApp: AppType = ({ Component, pageProps }) => { return <Component {...pageProps} />; }; export default MyApp;
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/t3-pages/src/pages/index.tsx
packages/shadcn/test/fixtures/frameworks/t3-pages/src/pages/index.tsx
import { type NextPage } from "next"; import Head from "next/head"; import Link from "next/link"; const Home: NextPage = () => { return ( <> <Head> <title>Create T3 App</title> <meta name="description" content="Generated by create-t3-app" /> <link rel="icon" href="/favicon.ico" /> ...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app/tailwind.config.ts
packages/shadcn/test/fixtures/frameworks/next-app/tailwind.config.ts
// @ts-nocheck import type { Config } from 'tailwindcss' const config: Config = { content: [ './pages/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}' ], theme: { extend: { backgroundImage: { 'gradient-radial': 'radial-gradient(var...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app/next-env.d.ts
packages/shadcn/test/fixtures/frameworks/next-app/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app/next.config.ts
packages/shadcn/test/fixtures/frameworks/next-app/next.config.ts
/** @type {import('next').NextConfig} */ const nextConfig = {} module.exports = nextConfig
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app/app/layout.tsx
packages/shadcn/test/fixtures/frameworks/next-app/app/layout.tsx
import './globals.css' import type { Metadata } from 'next' import { Inter } from 'next/font/google' const inter = Inter({ subsets: ['latin'] }) export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', } export default function RootLayout({ children, }: { chi...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app/app/page.tsx
packages/shadcn/test/fixtures/frameworks/next-app/app/page.tsx
import Image from 'next/image' export default function Home() { return ( <main className="flex min-h-screen flex-col items-center justify-between p-24"> <div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex"> <p className="fixed left-0 top-0 flex w-full justif...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app-src/tailwind.config.ts
packages/shadcn/test/fixtures/frameworks/next-app-src/tailwind.config.ts
// @ts-nocheck import type { Config } from 'tailwindcss' const config: Config = { content: [ './src/pages/**/*.{js,ts,jsx,tsx,mdx}', './src/components/**/*.{js,ts,jsx,tsx,mdx}', './src/app/**/*.{js,ts,jsx,tsx,mdx}' ], theme: { extend: { backgroundImage: { 'gradient-radial': 'radial-...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app-src/next-env.d.ts
packages/shadcn/test/fixtures/frameworks/next-app-src/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app-src/src/app/layout.tsx
packages/shadcn/test/fixtures/frameworks/next-app-src/src/app/layout.tsx
import "./styles.css" export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <html lang="en"> <body>{children}</body> </html> ) }
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app-src/src/app/page.tsx
packages/shadcn/test/fixtures/frameworks/next-app-src/src/app/page.tsx
import Image from 'next/image' export default function Home() { return ( <main className="flex min-h-screen flex-col items-center justify-between p-24"> <div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex"> <p className="fixed left-0 top-0 flex w-full justif...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app-custom-alias/tailwind.config.ts
packages/shadcn/test/fixtures/frameworks/next-app-custom-alias/tailwind.config.ts
// @ts-nocheck import type { Config } from 'tailwindcss' const config: Config = { content: [ './pages/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}' ], theme: { extend: { backgroundImage: { 'gradient-radial': 'radial-gradient(var...
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false
shadcn-ui/ui
https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/packages/shadcn/test/fixtures/frameworks/next-app-custom-alias/next-env.d.ts
packages/shadcn/test/fixtures/frameworks/next-app-custom-alias/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
typescript
MIT
ccafdaf7c6f6747a24f54e84436b42ec42f01779
2026-01-04T15:25:31.746168Z
false