Home / File/ config.ts — ui Source File

config.ts — ui Source File

Architecture documentation for config.ts, a typescript file in the ui codebase. 7 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  ad762621_6a27_5b76_c744_8ca39930b352["config.ts"]
  a9fe3d3c_59c9_c6d6_013e_80fd635d3135["icons"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> a9fe3d3c_59c9_c6d6_013e_80fd635d3135
  6802ce19_522d_e5fb_e458_8826d9f6952e["zod"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> 6802ce19_522d_e5fb_e458_8826d9f6952e
  23423e28_24a8_6786_0165_9c12fc6c0a0e["base-colors"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> 23423e28_24a8_6786_0165_9c12fc6c0a0e
  c544a3e1_3972_d827_a6cc_0c6a194dbe9e["bases"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> c544a3e1_3972_d827_a6cc_0c6a194dbe9e
  8fd19e6b_a943_3d85_462b_1c2f8a3309d4["fonts"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> 8fd19e6b_a943_3d85_462b_1c2f8a3309d4
  8a1bd351_6718_c5b7_42ab_fbe847916593["styles"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> 8a1bd351_6718_c5b7_42ab_fbe847916593
  f240661c_46c2_d55d_761a_ed956dd663f7["themes"]
  ad762621_6a27_5b76_c744_8ca39930b352 --> f240661c_46c2_d55d_761a_ed956dd663f7
  style ad762621_6a27_5b76_c744_8ca39930b352 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {
  iconLibraries,
  type IconLibrary,
  type IconLibraryName,
} from "shadcn/icons"
import { z } from "zod"

import { BASE_COLORS, type BaseColor } from "@/registry/base-colors"
import { BASES, type Base } from "@/registry/bases"
import { fonts } from "@/registry/fonts"
import { STYLES, type Style } from "@/registry/styles"
import { THEMES, type Theme } from "@/registry/themes"

const SHADCN_VERSION = "latest"

export { BASES, type Base }
export { STYLES, type Style }
export { THEMES, type Theme }
export { BASE_COLORS, type BaseColor }
export { fonts }
export { iconLibraries, type IconLibrary, type IconLibraryName }

export type BaseName = Base["name"]
export type StyleName = Style["name"]
export type ThemeName = Theme["name"]
export type BaseColorName = BaseColor["name"]

// Derive font values from registry fonts (e.g., "font-inter" -> "inter").
const fontValues = fonts.map((f) => f.name.replace("font-", "")) as [
  string,
  ...string[],
]

export type FontValue = (typeof fontValues)[number]

export const MENU_ACCENTS = [
  { value: "subtle", label: "Subtle" },
  { value: "bold", label: "Bold" },
] as const

export type MenuAccent = (typeof MENU_ACCENTS)[number]
export type MenuAccentValue = MenuAccent["value"]

export const MENU_COLORS = [
  { value: "default", label: "Default" },
  { value: "inverted", label: "Inverted" },
] as const

export type MenuColor = (typeof MENU_COLORS)[number]

export type MenuColorValue = MenuColor["value"]

export const RADII = [
  { name: "default", label: "Default", value: "" },
  { name: "none", label: "None", value: "0" },
  { name: "small", label: "Small", value: "0.45rem" },
  { name: "medium", label: "Medium", value: "0.625rem" },
  { name: "large", label: "Large", value: "0.875rem" },
] as const

// ... (380 more lines)

Subdomains

Dependencies

  • base-colors
  • bases
  • fonts
  • icons
  • styles
  • themes
  • zod

Frequently Asked Questions

What does config.ts do?
config.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in config.ts?
config.ts defines 10 function(s): buildRegistryBase, buildRegistryTheme, designSystemConfigSchema, fontValues, getBase, getBaseColor, getIconLibrary, getStyle, getTheme, getThemesForBaseColor.
What does config.ts depend on?
config.ts imports 7 module(s): base-colors, bases, fonts, icons, styles, themes, zod.
Where is config.ts in the architecture?
config.ts is located at apps/v4/registry/config.ts (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free