Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
9671187
docs-extractor first commit
MaxLee-dev Dec 19, 2025
a608a38
feat: Add SprinklesTypeIntrospector for dynamic CSS value extraction
MaxLee-dev Dec 22, 2025
c3cbbf3
feat: Enhance component data fetching and JSON rendering for compound…
MaxLee-dev Dec 23, 2025
83d944d
Merge branch 'main' of https://github.com/goorm-dev/vapor-ui into doc…
MaxLee-dev Jan 2, 2026
2a00a93
feat: add docs-extractor module for vanilla-extract recipes
MaxLee-dev Jan 2, 2026
d37480b
feat: add Avatar component JSON definitions and update props table to…
MaxLee-dev Jan 2, 2026
67dc61b
feat: update Avatar component JSON definitions and enhance props extr…
MaxLee-dev Jan 2, 2026
b39bf6a
feat: enhance Avatar component documentation and extraction logic
MaxLee-dev Jan 2, 2026
51f8d4d
docs: Improve avatar component description
MaxLee-dev Jan 2, 2026
e90ee9d
refactor: remove unused source detection and classification modules
MaxLee-dev Jan 2, 2026
90b8d2e
style: add background color to table header in ComponentPropsTable
MaxLee-dev Jan 2, 2026
1117efd
feat: add Avatar component JSON definitions for FallbackPrimitive, Im…
MaxLee-dev Jan 2, 2026
847edb4
feat: update Avatar component JSON structure and enhance documentatio…
MaxLee-dev Jan 2, 2026
abfbeef
feat: enhance avatar component variants with required flag and descri…
MaxLee-dev Jan 2, 2026
7f3eeda
feat: add required flag and description to variant definition in Comp…
MaxLee-dev Jan 2, 2026
5348507
feat: add eslint as a dependency and update json-renderer for improve…
MaxLee-dev Jan 5, 2026
6d9ffaa
feat: refactor type handling in PropsFilter and TypeResolver for impr…
MaxLee-dev Jan 5, 2026
56d8e14
feat: Add VariantsExtractor for extracting vanilla-extract variants f…
MaxLee-dev Jan 5, 2026
00023d0
feat: Remove descriptions from avatar component JSON files for clarity
MaxLee-dev Jan 5, 2026
21bf601
feat: cli code refactored
MaxLee-dev Jan 5, 2026
0e772ec
feat: update comments for clarity in CLI and PropsExtractor
MaxLee-dev Jan 5, 2026
0eed78c
feat: update loadFiles documentation to clarify support for glob patt…
MaxLee-dev Jan 5, 2026
1f209ac
Merge branch 'main' of https://github.com/goorm-dev/vapor-ui into doc…
MaxLee-dev Jan 9, 2026
e1f1631
feat: add TypeScript API extractor tool
MaxLee-dev Jan 9, 2026
a9a4ec4
feat: implement component file scanning and update TypeScript API ext…
MaxLee-dev Jan 9, 2026
9f688c4
feat: update TypeScript API extractor with new dependencies and CLI i…
MaxLee-dev Jan 9, 2026
2a271c6
feat: add getExportedNodes function and update tests for TypeScript A…
MaxLee-dev Jan 9, 2026
6f58d1c
feat: enhance TypeScript API extractor with new CLI options and file …
MaxLee-dev Jan 9, 2026
58eb5a7
feat: add getNamespaces function and update CLI to display namespaces
MaxLee-dev Jan 9, 2026
26d742d
feat: add component selection prompts and file lookup by component na…
MaxLee-dev Jan 9, 2026
04a62d5
feat: implement props extraction functionality and update CLI commands
MaxLee-dev Jan 12, 2026
d60fb31
feat: enhance props extraction with new filtering options and resolve…
MaxLee-dev Jan 12, 2026
6c3aec7
feat: add type cleaning functionality to simplify state callback types
MaxLee-dev Jan 12, 2026
c6ea210
feat: add type resolver module and integrate with props extraction
MaxLee-dev Jan 12, 2026
14cccc5
feat: simplify render prop types in cleanType function
MaxLee-dev Jan 12, 2026
305400b
feat: add output directory option and improve props extraction structure
MaxLee-dev Jan 12, 2026
570b18d
feat: add default variants and HTML attributes extraction, enhance pr…
MaxLee-dev Jan 12, 2026
016e3bb
feat: Refactor component documentation extraction and improve TypeScr…
MaxLee-dev Jan 12, 2026
88437bb
feat: enhance props extraction with default values and improve type c…
MaxLee-dev Jan 12, 2026
ee3fc00
feat: update Avatar documentation for clarity and consistency
MaxLee-dev Jan 12, 2026
1520c1f
refactor: remove unused type resolver, variants extractor, and relate…
MaxLee-dev Jan 12, 2026
9fe4457
fix: reorder and restore TypeScript API extractor dependencies and sc…
MaxLee-dev Jan 12, 2026
c42b5b1
refactor: remove unused Avatar component references and related utili…
MaxLee-dev Jan 12, 2026
ad2658a
refactor: remove tools/docs-extractor dependencies and devDependencie…
MaxLee-dev Jan 12, 2026
efaa831
Merge branch 'main' of https://github.com/goorm-dev/vapor-ui into doc…
MaxLee-dev Jan 12, 2026
1b29276
fix: add eslint-config dependency and update tsconfig for JSX support
MaxLee-dev Jan 12, 2026
cb68243
refactor: update TypeScript API extractor structure and CLI options
MaxLee-dev Jan 13, 2026
c8f9466
refactor: rename ignore options to exclude and update related logic
MaxLee-dev Jan 13, 2026
e3ae457
refactor: remove output option and related logic from CLI options
MaxLee-dev Jan 13, 2026
50e2def
refactor: simplify extract script by removing tsconfig option
MaxLee-dev Jan 13, 2026
664993b
feat: base-ui type-resolver
MaxLee-dev Jan 13, 2026
0c906e8
refactor: enhance type handling in props extraction and simplify node…
MaxLee-dev Jan 13, 2026
01d3071
refactor: improve type handling and enhance default variants extracti…
MaxLee-dev Jan 14, 2026
b258a43
feat: implement defaultVariants extraction for compound components an…
MaxLee-dev Jan 14, 2026
5b9b30d
feat: extract component description from JSDoc and update tests for s…
MaxLee-dev Jan 14, 2026
8a77173
feat: add shouldIncludeSymbol function to streamline symbol inclusion…
MaxLee-dev Jan 14, 2026
ef7451b
feat: add declaration source filtering module and related tests
MaxLee-dev Jan 14, 2026
036080f
feat: preserve React type aliases in props extraction and add related…
MaxLee-dev Jan 14, 2026
b86a55d
feat: update formatVaporTypePath to improve namespace path conversion…
MaxLee-dev Jan 14, 2026
91c9dcf
feat: refactor props extraction functions for improved clarity and ad…
MaxLee-dev Jan 15, 2026
887e742
feat: enhance type resolution and simplify import paths in type handling
MaxLee-dev Jan 15, 2026
7d3f2ae
feat: update package.json dependencies and refactor test imports for …
MaxLee-dev Jan 15, 2026
2a46094
feat: add Tabs components with context support for improved usability
MaxLee-dev Jan 15, 2026
38aa34a
feat: add new components and styles for Tabs and Button with TypeScri…
MaxLee-dev Jan 26, 2026
d96ca4e
feat: update props extraction logic to categorize and sort props by t…
MaxLee-dev Jan 26, 2026
94a4b5e
Merge branch 'main' of https://github.com/goorm-dev/vapor-ui into doc…
MaxLee-dev Jan 30, 2026
e588742
feat: enhance configuration system and add i18n support
MaxLee-dev Jan 30, 2026
f73e60c
Merge branch 'main' of https://github.com/goorm-dev/vapor-ui into doc…
MaxLee-dev Feb 3, 2026
5e04d0b
refactor: rename docs-extractor to ts-api-extractor in package.json a…
MaxLee-dev Feb 3, 2026
87b2694
refactor: reorganize code structure and improve formatting in various…
MaxLee-dev Feb 3, 2026
5d11cb7
refactor: rename docs-extractor to ts-api-extractor and update relate…
MaxLee-dev Feb 3, 2026
f172223
feat: enhance sprinkles metadata generation with display type names
MaxLee-dev Feb 3, 2026
87b86cc
feat: enhance props extraction with diagnostics and component hierarc…
MaxLee-dev Feb 6, 2026
2131e80
feat: implement language configuration and improve error handling in …
MaxLee-dev Feb 6, 2026
ef3c228
fix: update language codes from 'kr' to 'ko' for consistency
MaxLee-dev Feb 6, 2026
84eac6c
Add unit tests for core functionalities in docs-extractor
MaxLee-dev Feb 6, 2026
89f6eb8
fix: standardize formatting in sprinkles metadata JSON
MaxLee-dev Feb 6, 2026
7be6f6c
fix: clean up comments in vitest configuration for clarity
MaxLee-dev Feb 6, 2026
6a982c8
fix: update comments for clarity and consistency in tsup configuration
MaxLee-dev Feb 6, 2026
70b13f9
fix: update comments for clarity and consistency in props-extractor a…
MaxLee-dev Feb 6, 2026
499319e
refactor: rename DefaultVariants to DefaultValues for consistency acr…
MaxLee-dev Feb 9, 2026
19cb693
fix: update variable names for clarity in extractProps and extractDes…
MaxLee-dev Feb 9, 2026
5779bee
feat: implement style import analysis and destructuring defaults extr…
MaxLee-dev Feb 9, 2026
faf8df7
feat: add prop classification and filtering modules
MaxLee-dev Feb 9, 2026
e3267dc
refactor: remove unused functions and types from props-extractor and …
MaxLee-dev Feb 9, 2026
9fbda92
feat: Added AST-based base-ui type path extraction functionality and …
MaxLee-dev Feb 10, 2026
71b06d2
feat: add verbose output option to CLI and enhance prop extraction lo…
MaxLee-dev Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/website/content/docs/components/avatar.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Avatar'
site_name: 'Avatar - Vapor Core'
description: 'Avatar는 사용자가 설정한 프로필 이미지 혹은 텍스트를 UI상에 나타냅니다.'
description: 'Avatar는 프로필 이미지 또는 대체 텍스트를 표시합니다.'
---

<Demo name="avatar/default-avatar">
Expand All @@ -19,7 +19,7 @@ description: 'Avatar는 사용자가 설정한 프로필 이미지 혹은 텍스

### Size

Avatar의 크기를 설정합니다.
크기를 지정합니다.

<Demo name="avatar/avatar-size">
```json doc-gen:file
Expand All @@ -32,7 +32,7 @@ Avatar의 크기를 설정합니다.

### Shape

Avatar의 모양을 설정합니다.
모양을 지정합니다.

<Demo name="avatar/avatar-shape">
```json doc-gen:file
Expand All @@ -49,7 +49,7 @@ Avatar의 모양을 설정합니다.

### Composition Pattern

Avatar 컴포넌트의 다양한 구성 패턴입니다.
하위 컴포넌트를 조합하여 이미지와 대체 콘텐츠를 커스터마이징합니다.

<Demo name="avatar/flexible">
```json doc-gen:file
Expand All @@ -62,7 +62,7 @@ Avatar 컴포넌트의 다양한 구성 패턴입니다.

### Fallback Only

이미지 없이 대체 텍스트만 표시합니다.
이미지 없이 대체 콘텐츠만 표시합니다. `delay` prop으로 대체 콘텐츠의 표시 지연 시간을 설정합니다.

<Demo name="avatar/avatar-fallback-only">
```json doc-gen:file
Expand Down
2 changes: 2 additions & 0 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "next build",
"clean": "rm -rf node_modules .next .turbo .source",
"dev": "next dev --turbo",
"docs:generate": "docs-extractor --output ./public/references --cwd ../..",
"format": "prettier --write \"./src/**/*.{ts,tsx,md}\"",
"format:check": "prettier --check \"./src/**/*.{ts,tsx,md}\"",
"postinstall": "fumadocs-mdx",
Expand Down Expand Up @@ -58,6 +59,7 @@
"@types/node": "^22.15.4",
"@types/react": "^18.0.1",
"@types/react-dom": "^18.0.1",
"@vapor-ui/docs-extractor": "workspace:*",
"eslint": "^9.20.1",
"postcss": "^8.5.4",
"shiki": "^3.7.0",
Expand Down
23 changes: 23 additions & 0 deletions apps/website/public/references/avatar/fallback-primitive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "FallbackPrimitive",
"displayName": "Avatar.FallbackPrimitive",
"description": "",
"props": [
{
"name": "className",
"type": ["string", "((state: Avatar.FallbackPrimitive.State) => string)", "undefined"],
"required": false,
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
{
"name": "render",
"type": [
"((props: HTMLProps, state: Avatar.FallbackPrimitive.State) => ReactElement)",
"ReactElement",
"undefined"
],
"required": false,
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
]
}
29 changes: 29 additions & 0 deletions apps/website/public/references/avatar/image-primitive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "ImagePrimitive",
"displayName": "Avatar.ImagePrimitive",
"description": "",
"props": [
{
"name": "className",
"type": ["string", "((state: Avatar.ImagePrimitive.State) => string)", "undefined"],
"required": false,
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
{
"name": "render",
"type": [
"((props: HTMLProps, state: Avatar.ImagePrimitive.State) => ReactElement)",
"ReactElement",
"undefined"
],
"required": false,
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
},
{
"name": "onLoadingStatusChange",
"type": ["((status: ImageLoadingStatus) => void)", "undefined"],
"required": false,
"description": "Callback fired when the loading status changes."
}
]
}
57 changes: 57 additions & 0 deletions apps/website/public/references/avatar/root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "Root",
"displayName": "Avatar.Root",
"description": "",
"props": [
{
"name": "className",
"type": ["string", "((state: Avatar.Root.State) => string)", "undefined"],
"required": false,
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
{
"name": "render",
"type": [
"((props: HTMLProps, state: Avatar.Root.State) => ReactElement)",
"ReactElement",
"undefined"
],
"required": false,
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
},
{
"name": "src",
"type": ["string", "undefined"],
"required": false,
"description": ""
},
{
"name": "alt",
"type": ["string"],
"required": true,
"description": ""
},
{
"name": "delay",
"type": ["number", "undefined"],
"required": false,
"description": ""
}
],
"variants": [
{
"name": "size",
"type": ["sm", "md", "lg", "xl"],
"required": false,
"defaultValue": "md",
"description": "Sizes for the avatar component"
},
{
"name": "shape",
"type": ["square", "circle"],
"required": false,
"defaultValue": "square",
"description": "Shapes for the avatar component"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ReactMarkdown from 'react-markdown';
import { Badge, Flex, HStack, Text, VStack } from '@vapor-ui/core';

import { InfoPopover } from '~/components/info';
import { parseComponentName } from '~/utils/component-path';

interface PropDefinition {
name: string;
Expand All @@ -15,11 +16,20 @@ interface PropDefinition {
defaultValue?: string;
}

interface VariantDefinition {
name: string;
type: string[];
defaultValue?: string;
description?: string;
required: boolean;
}

interface ComponentData {
name: string;
displayName: string;
description: string;
props: PropDefinition[];
variants?: VariantDefinition[];
generatedAt: string;
sourceFile: string;
}
Expand All @@ -36,7 +46,9 @@ export const ComponentPropsTable = ({ componentName }: ComponentPropsTableProps)
React.useEffect(() => {
const loadComponentData = async () => {
try {
const response = await fetch(`/components/generated/${componentName}.json`);
const { folder, filename } = parseComponentName(componentName);

const response = await fetch(`/references/${folder}/${filename}.json`);
if (!response.ok) {
throw new Error(`Failed to load component data for ${componentName}`);
}
Expand All @@ -60,12 +72,26 @@ export const ComponentPropsTable = ({ componentName }: ComponentPropsTableProps)
return <p>Error: {error}</p>;
}

if (!componentData || componentData.props.length === 0) {
const hasProps = componentData?.props && componentData.props.length > 0;
const hasVariants = componentData?.variants && componentData.variants.length > 0;

if (!componentData || (!hasProps && !hasVariants)) {
return <p>No props available for this component.</p>;
}

// Props와 Variants를 하나의 배열로 통합
type TableRow =
| { kind: 'prop'; data: PropDefinition }
| { kind: 'variant'; data: VariantDefinition };

const tableRows: TableRow[] = [
...(componentData?.variants ?? []).map(
(variant) => ({ kind: 'variant', data: variant }) as TableRow,
),
...(componentData?.props ?? []).map((prop) => ({ kind: 'prop', data: prop }) as TableRow),
];
return (
<VStack className="w-full not-prose" alignItems="flex-start" gap="$200">
<VStack className="w-full not-prose" alignItems="flex-start" gap="$400">
<Text typography="body1" foreground="normal-200">
<ReactMarkdown
components={{
Expand All @@ -88,10 +114,10 @@ export const ComponentPropsTable = ({ componentName }: ComponentPropsTableProps)
borderRadius="$300"
>
<table
className="w-full border-separate border-spacing-0 overflow-hidden border border-[var(--vapor-color-border-normal)] rounded-[var(--vapor-size-borderRadius-300)]"
className="w-full border-separate border-spacing-0 overflow-hidden border border-[var(--vapor-color-border-normal)] rounded-[var(--vapor-size-borderRadius-300)]"
style={{ tableLayout: 'auto' }}
>
<thead className="w-full items-start self-stretch rounded-[var(--vapor-size-borderRadius-300)]">
<thead className="w-full items-start self-stretch rounded-[var(--vapor-size-borderRadius-300)] bg-v-canvas-200">
<tr className="w-full bg-[var(--vapor-color-background-surface-200)] border-b border-b-[var(--vapor-color-border-normal)]">
<th className="px-[var(--vapor-size-space-300)] h-[var(--vapor-size-dimension-500)] text-left rounded-tl-[var(--vapor-size-borderRadius-300)] min-w-[140px] w-px">
<Text typography="subtitle1" foreground="normal-100">
Expand All @@ -111,69 +137,74 @@ export const ComponentPropsTable = ({ componentName }: ComponentPropsTableProps)
</tr>
</thead>
<tbody>
{componentData.props.map((prop, index) => (
<tr key={prop.name}>
<td
className={` px-[var(--vapor-size-space-300)] py-[var(--vapor-size-space-200)] border-b border-b-[var(--vapor-color-border-normal)] min-w-[140px] w-px ${index === componentData.props.length - 1 ? 'rounded-bl-[var(--vapor-size-borderRadius-300)] border-b-0' : ''}`}
>
<HStack alignItems="center" gap="$100" width="fit-content">
<Text typography="body2" foreground="normal-200">
<span>
{prop.name}
{!prop.required && '?'}
</span>
</Text>
{prop.description && (
<InfoPopover>
<ReactMarkdown
components={{
code: ({ children }) => (
<code className="px-1 py-0.5 rounded bg-v-gray-100 text-sm">
{children}
</code>
),
}}
>
{prop.description}
</ReactMarkdown>
</InfoPopover>
)}
</HStack>
</td>
<td
className={`px-[var(--vapor-size-space-300)] py-[var(--vapor-size-space-200)] border-b border-b-[var(--vapor-color-border-normal)] min-w-[100px] w-px ${index === componentData.props.length - 1 ? 'border-b-0' : ''}`}
>
{prop.defaultValue ? (
<Badge colorPalette="hint" size="md">
{prop.defaultValue}
</Badge>
) : (
'-'
)}
</td>
<td
className={`px-[var(--vapor-size-space-300)] py-[var(--vapor-size-space-200)] border-b border-b-[var(--vapor-color-border-normal)] ${index === componentData.props.length - 1 ? 'rounded-br-[var(--vapor-size-borderRadius-300)] border-b-0' : ''}`}
>
<Flex gap="$100" className="flex-wrap">
{Array.isArray(prop.type) ? (
prop.type.map((typeValue) => (
<Badge
key={typeValue}
colorPalette="hint"
size="md"
>
{typeValue}
</Badge>
))
) : (
{tableRows.map((row, index) => {
const isLast = index === tableRows.length - 1;

const prop = row.data;
return (
<tr key={`prop-${prop.name}`}>
<td
className={`px-[var(--vapor-size-space-300)] py-[var(--vapor-size-space-200)] border-b border-b-[var(--vapor-color-border-normal)] min-w-[140px] w-px ${isLast ? 'rounded-bl-[var(--vapor-size-borderRadius-300)] border-b-0' : ''}`}
>
<HStack alignItems="center" gap="$100" width="fit-content">
<Text typography="body2" foreground="normal-200">
<span>
{prop.name}
{!prop.required && '?'}
</span>
</Text>
{prop.description && (
<InfoPopover>
<ReactMarkdown
components={{
code: ({ children }) => (
<code className="px-1 py-0.5 rounded bg-v-gray-100 text-sm">
{children}
</code>
),
}}
>
{prop.description}
</ReactMarkdown>
</InfoPopover>
)}
</HStack>
</td>
<td
className={`px-[var(--vapor-size-space-300)] py-[var(--vapor-size-space-200)] border-b border-b-[var(--vapor-color-border-normal)] min-w-[100px] w-px ${isLast ? 'border-b-0' : ''}`}
>
{prop.defaultValue ? (
<Badge colorPalette="hint" size="md">
{prop.type}
{prop.defaultValue}
</Badge>
) : (
'-'
)}
</Flex>
</td>
</tr>
))}
</td>
<td
className={`px-[var(--vapor-size-space-300)] py-[var(--vapor-size-space-200)] border-b border-b-[var(--vapor-color-border-normal)] ${isLast ? 'rounded-br-[var(--vapor-size-borderRadius-300)] border-b-0' : ''}`}
>
<Flex gap="$100" className="flex-wrap">
{Array.isArray(prop.type) ? (
prop.type.map((typeValue) => (
<Badge
key={typeValue}
colorPalette="hint"
size="md"
>
{typeValue}
</Badge>
))
) : (
<Badge colorPalette="hint" size="md">
{prop.type}
</Badge>
)}
</Flex>
</td>
</tr>
);
})}
</tbody>
</table>
</VStack>
Expand Down
Loading
Loading