shadcn-glass-ui 2.0.12 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +218 -5
  2. package/README.md +132 -43
  3. package/context7.json +2 -1
  4. package/dist/cli/index.cjs +1 -1
  5. package/dist/components.cjs +4 -4
  6. package/dist/components.d.ts +103 -29
  7. package/dist/components.js +1 -1
  8. package/dist/demo-screenshot-aurora.png +0 -0
  9. package/dist/demo-screenshot.png +0 -0
  10. package/dist/demo-screenshot.png.zip +0 -0
  11. package/dist/hooks.cjs +2 -2
  12. package/dist/index.cjs +5 -5
  13. package/dist/index.js +28 -28
  14. package/dist/index.js.map +1 -1
  15. package/dist/r/ai-card-glass.json +1 -1
  16. package/dist/r/avatar-glass.json +1 -1
  17. package/dist/r/badge-glass.json +1 -1
  18. package/dist/r/button-glass.json +1 -1
  19. package/dist/r/combobox-glass.json +1 -1
  20. package/dist/r/registry.json +2 -2
  21. package/dist/r/repository-card-glass.json +2 -1
  22. package/dist/r/slider-glass.json +4 -5
  23. package/dist/r/toggle-glass.json +2 -2
  24. package/dist/r/year-card-glass.json +1 -1
  25. package/dist/shadcn-glass-ui.css +1 -1
  26. package/dist/{theme-context-DNe_2vWJ.cjs → theme-context-BHXYJ4RE.cjs} +2 -2
  27. package/dist/{theme-context-DNe_2vWJ.cjs.map → theme-context-BHXYJ4RE.cjs.map} +1 -1
  28. package/dist/themes.cjs +1 -1
  29. package/dist/{trust-score-card-glass-Dgu46oWI.cjs → trust-score-card-glass-CGXmOIfq.cjs} +850 -150
  30. package/dist/trust-score-card-glass-CGXmOIfq.cjs.map +1 -0
  31. package/dist/{trust-score-card-glass-A7kas5OS.js → trust-score-card-glass-L9g0qamo.js} +1182 -482
  32. package/dist/trust-score-card-glass-L9g0qamo.js.map +1 -0
  33. package/dist/{use-focus-BRkQtQCj.cjs → use-focus-CeNHOiBa.cjs} +2 -2
  34. package/dist/{use-focus-BRkQtQCj.cjs.map → use-focus-CeNHOiBa.cjs.map} +1 -1
  35. package/dist/{use-wallpaper-tint-CfShPBo2.cjs → use-wallpaper-tint-Bt2G3g1v.cjs} +2 -2
  36. package/dist/{use-wallpaper-tint-CfShPBo2.cjs.map → use-wallpaper-tint-Bt2G3g1v.cjs.map} +1 -1
  37. package/dist/{utils-BXN7AcRu.cjs → utils-LYxxWvUn.cjs} +2 -2
  38. package/dist/{utils-BXN7AcRu.cjs.map → utils-LYxxWvUn.cjs.map} +1 -1
  39. package/dist/utils.cjs +1 -1
  40. package/docs/ADVANCED_PATTERNS.md +584 -0
  41. package/docs/AI_USAGE.md +135 -611
  42. package/docs/BEST_PRACTICES.md +2 -2
  43. package/docs/BREAKING_CHANGES.md +242 -0
  44. package/docs/COMPONENTS_CATALOG.md +8 -8
  45. package/docs/EXPORTS_STRUCTURE.md +3 -3
  46. package/docs/GETTING_STARTED.md +13 -8
  47. package/docs/PUBLISHING.md +1 -1
  48. package/docs/REGISTRY_SUMMARY.md +2 -2
  49. package/docs/REGISTRY_USAGE.md +1 -1
  50. package/docs/api/README.md +11 -11
  51. package/docs/api/interfaces/BadgeGlassProps.md +21 -14
  52. package/docs/api/interfaces/ButtonGlassProps.md +37 -30
  53. package/package.json +4 -3
  54. package/dist/trust-score-card-glass-A7kas5OS.js.map +0 -1
  55. package/dist/trust-score-card-glass-Dgu46oWI.cjs.map +0 -1
  56. package/dist/vite.svg +0 -1
  57. package/docs/migration/modal-glass-compound-api.md +0 -458
  58. package/docs/migration/select-to-combobox.md +0 -386
  59. package/docs/migration/tabs-glass-compound-api.md +0 -579
package/CHANGELOG.md CHANGED
@@ -5,7 +5,200 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
6
6
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [2.0.0] - 2025-12-11
8
+ ## [2.1.0] - 2025-12-14
9
+
10
+ ### 🎉 Complete v2.0.0 Migration Applied
11
+
12
+ This release applies all v2.0.0 API changes across the entire codebase, ensuring consistency and
13
+ completing the migration roadmap.
14
+
15
+ ### ✨ Features
16
+
17
+ #### Component Implementations Updated
18
+
19
+ - **ButtonGlass** - All instances migrated to v2.0.0 API (`variant="default"`, `variant="link"`,
20
+ `size="default"`)
21
+ - **ToggleGlass** - All instances migrated to v2.0.0 API (`pressed`, `onPressedChange`)
22
+ - **SliderGlass** - All instances migrated to v2.0.0 API (`value: number[]`, `onValueChange`)
23
+ - **ComboBoxGlass** - All instances migrated to v2.0.0 API (`onValueChange`)
24
+
25
+ #### Demo Screenshots Added
26
+
27
+ - 📸 **GitHub Pages screenshots** - Added demo-screenshot.png and demo-screenshot-aurora.png to
28
+ public directory
29
+ - 🎨 **Visual documentation** - Both Glass and Aurora theme screenshots in README
30
+
31
+ ### 📚 Documentation
32
+
33
+ #### Comprehensive Documentation Audit
34
+
35
+ - **Removed v1.x legacy content** (-875 lines total):
36
+ - Deleted 3 outdated migration guides (select-to-combobox.md, modal-glass-compound-api.md,
37
+ tabs-glass-compound-api.md)
38
+ - Streamlined AI_USAGE.md: 1,463 → 855 lines (-42%)
39
+ - Streamlined BREAKING_CHANGES.md: 585 → 238 lines (-59%)
40
+ - Updated CLAUDE.md: removed v1.0.0 legacy examples
41
+ - **Fixed all code examples** to use v2.0.0+ API patterns
42
+ - **Fixed broken documentation links** across 16 files
43
+ - **Updated component catalog** with correct API references
44
+ - **Enhanced README** with v2.0.0 API compatibility badge
45
+
46
+ #### Files Updated (Documentation)
47
+
48
+ - README.md - Updated Quick Start examples with v2.0.0 API
49
+ - CHANGELOG.md - Added complete v2.0.0 breaking changes
50
+ - CONTRIBUTING.md - Fixed email placeholder
51
+ - docs/AI_USAGE.md - Removed legacy content, focused on v2.0.0+
52
+ - docs/BREAKING_CHANGES.md - Streamlined to v2.0.0 only
53
+ - docs/COMPONENTS_CATALOG.md - Updated component references
54
+ - docs/GETTING_STARTED.md - Fixed CLI command naming
55
+ - docs/BEST_PRACTICES.md - Updated Tailwind version requirement (4.1+)
56
+ - docs/api/README.md - Updated API documentation paths
57
+ - docs/api/interfaces/ - Updated BadgeGlassProps, ButtonGlassProps
58
+
59
+ ### 🔧 Fixes
60
+
61
+ - **Bundle size badge** - Replaced bundlephobia badge with static size badge (fixes dynamic loading
62
+ issues)
63
+
64
+ ### 📦 Internal Changes
65
+
66
+ #### Test Coverage Maintained
67
+
68
+ - **138/138 tests passing** ✅
69
+ - All Storybook stories updated (.stories.tsx)
70
+ - All unit tests updated (**tests**/)
71
+ - All visual regression tests updated (**visual**/)
72
+ - Compliance tests updated (accessibility, tokens, glassmorphism)
73
+
74
+ #### Registry Updates
75
+
76
+ Auto-updated component registry files:
77
+
78
+ - button-glass.json, toggle-glass.json, slider-glass.json
79
+ - combobox-glass.json, ai-card-glass.json, repository-card-glass.json
80
+ - avatar-glass.json, badge-glass.json, year-card-glass.json
81
+
82
+ #### Theme Files Updated
83
+
84
+ Added component-specific CSS variables to all themes:
85
+
86
+ - glass.css - Updated with semantic token mappings
87
+ - light.css - Updated with semantic token mappings
88
+ - aurora.css - Updated with semantic token mappings
89
+
90
+ #### Files Changed
91
+
92
+ - **90 files changed**: 2,556 insertions(+), 3,051 deletions(-)
93
+ - Component implementations: 22 files
94
+ - Storybook stories: 25+ files
95
+ - Tests: 20+ files
96
+ - Documentation: 16 files
97
+ - Registry: 10 files
98
+ - Demos: 6 files
99
+
100
+ ### 🎯 Impact
101
+
102
+ - **100% codebase consistency** - All code now uses v2.0.0 API
103
+ - **Cleaner documentation** - Removed 875 lines of outdated content
104
+ - **Better DX** - All examples and documentation aligned with current API
105
+ - **Zero tech debt** - No legacy API references remaining
106
+
107
+ ### 📖 Migration Guide
108
+
109
+ All v2.0.0 migrations are now complete. For reference, see:
110
+
111
+ - [BREAKING_CHANGES.md](docs/BREAKING_CHANGES.md) - Complete v2.0.0 migration guide
112
+ - [API_PATTERNS_COMPARISON.md](docs/API_PATTERNS_COMPARISON.md) - Component API consistency
113
+ reference
114
+
115
+ ---
116
+
117
+ ## [2.0.0] - 2025-12-14
118
+
119
+ ### 🎉 MAJOR MILESTONE: 100% shadcn/ui API Compatibility
120
+
121
+ All 20 core components now follow shadcn/ui naming conventions and API patterns.
122
+
123
+ ### 💥 BREAKING CHANGES
124
+
125
+ #### ButtonGlass
126
+
127
+ - **`variant="default"`** → **`variant="default"`** (shadcn/ui standard)
128
+ - **`variant="link"`** → **`variant="link"`** (shadcn/ui standard)
129
+ - **`size="default"`** → **`size="default"`** (shadcn/ui standard)
130
+ - **Added**: `variant="outline"` with full theme support
131
+
132
+ **Migration:**
133
+
134
+ ```tsx
135
+ // Before v2.0
136
+ <ButtonGlass variant="default" size="default">Click me</ButtonGlass>
137
+ <ButtonGlass variant="link">Link</ButtonGlass>
138
+
139
+ // After v2.0
140
+ <ButtonGlass variant="default" size="default">Click me</ButtonGlass>
141
+ <ButtonGlass variant="link">Link</ButtonGlass>
142
+ ```
143
+
144
+ #### ToggleGlass
145
+
146
+ - **`checked`** → **`pressed`** (shadcn/ui Toggle API)
147
+ - **`onChange`** → **`onPressedChange`** (shadcn/ui convention)
148
+ - **`size="default"`** → **`size="default"`**
149
+ - **Added**: `defaultPressed` prop for uncontrolled mode
150
+ - **Added**: `variant` prop ('default' | 'outline')
151
+ - **ARIA**: `aria-checked` → `aria-pressed` (correct semantics for toggle switches)
152
+
153
+ **Migration:**
154
+
155
+ ```tsx
156
+ // Before v2.0
157
+ <ToggleGlass checked={isOn} onChange={setIsOn} size="default" />
158
+
159
+ // After v2.0 - Controlled
160
+ <ToggleGlass pressed={isOn} onPressedChange={setIsOn} size="default" />
161
+
162
+ // After v2.0 - Uncontrolled
163
+ <ToggleGlass defaultPressed={true} variant="outline" />
164
+ ```
165
+
166
+ #### SliderGlass
167
+
168
+ - **Full migration to Radix UI primitives** (`@radix-ui/react-slider`)
169
+ - **`value: number`** → **`value: number[]`** (range slider support)
170
+ - **`onChange`** → **`onValueChange`** (shadcn/ui Slider API)
171
+ - **Added**: `defaultValue: number[]` for uncontrolled mode
172
+ - **Added**: `onValueCommit` callback (fires on mouse up / touch end)
173
+ - **Added**: `orientation` prop ('horizontal' | 'vertical')
174
+ - **Added**: Multiple thumbs support for range sliders
175
+
176
+ **Migration:**
177
+
178
+ ```tsx
179
+ // Before v2.0 - Single value
180
+ <SliderGlass value={50} onChange={setValue} />
181
+
182
+ // After v2.0 - Single value
183
+ <SliderGlass value={[50]} onValueChange={setValue} />
184
+
185
+ // After v2.0 - Range slider (NEW!)
186
+ <SliderGlass defaultValue={[25, 75]} onValueChange={setRange} />
187
+ ```
188
+
189
+ #### ComboBoxGlass
190
+
191
+ - **`onChange`** → **`onValueChange`** (shadcn/ui convention)
192
+
193
+ **Migration:**
194
+
195
+ ```tsx
196
+ // Before v2.0
197
+ <ComboBoxGlass options={options} value={value} onChange={setValue} />
198
+
199
+ // After v2.0
200
+ <ComboBoxGlass options={options} value={value} onValueChange={setValue} />
201
+ ```
9
202
 
10
203
  ### ✨ Added
11
204
 
@@ -124,13 +317,33 @@ find src/ -type f \( -name "*.tsx" -o -name "*.css" \) -exec sed -i '' \
124
317
  {} +
125
318
  ```
126
319
 
320
+ ### 🧪 Testing & Quality
321
+
322
+ **Migration Test Coverage:**
323
+
324
+ - **ButtonGlass**: 24/24 tests pass ✅
325
+ - **ToggleGlass**: 36/36 tests pass ✅
326
+ - **SliderGlass**: 34/34 tests pass ✅
327
+ - **ComboBoxGlass**: 44/44 tests pass ✅
328
+ - **Total migrated tests**: 138/138 pass (100%) ✅
329
+
330
+ **Quality Checks:**
331
+
332
+ - ✅ TypeScript: `tsc --noEmit` - No errors
333
+ - ✅ Linting: `npm run lint` - No errors
334
+ - ✅ Build: Production build successful (902ms)
335
+ - ✅ All unit tests pass
336
+ - ✅ All Storybook stories functional
337
+
127
338
  ### 📊 Statistics
128
339
 
129
- - **Components**: 57 **58** (added StepperGlass)
340
+ - **shadcn/ui API Compatibility**: **100%** (20/20 components)
341
+ - **Components Migrated**: 4 (ButtonGlass, ToggleGlass, SliderGlass, ComboBoxGlass)
342
+ - **Total Components**: 57 → **58** (added StepperGlass)
130
343
  - **Tests**: 1,355+ → **~1,570+**
131
344
  - Visual: 582 → **802** (+220 screenshots from StepperGlass variants)
132
345
  - Compliance: ~650
133
- - Unit: ~125
346
+ - Unit: ~125 → **~138** (migrated components)
134
347
  - **Primitive Tokens**: **207** OKLCH color primitives
135
348
  - **CSS Variables**: **296+** per theme (glass, light, aurora)
136
349
  - **Hardcoded OKLCH**: **0** (was 98 in glass.css)
@@ -477,7 +690,7 @@ import { ButtonGlass, InputGlass } from 'shadcn-glass-ui';
477
690
  - **Old API:** `isOpen`, `onClose`, `title` props
478
691
  - **New API:** Compound API only (`ModalGlass.Root`, `.Overlay`, `.Content`, `.Header`, `.Body`,
479
692
  `.Footer`, `.Title`, `.Description`, `.Close`)
480
- - **Migration:** See [ModalGlass Compound API guide](docs/migration/modal-glass-compound-api.md)
693
+ - **Migration:** See [Compound Components guide](docs/migration/compound-components-v2.md)
481
694
  - **Key Changes:**
482
695
  - `isOpen` → `open` (on ModalGlass.Root)
483
696
  - `onClose` → `onOpenChange` with new signature: `(open: boolean) => void`
@@ -487,7 +700,7 @@ import { ButtonGlass, InputGlass } from 'shadcn-glass-ui';
487
700
  - **TabsGlass:** Legacy props API completely removed
488
701
  - **Old API:** `tabs`, `activeTab`, `onChange` props
489
702
  - **New API:** Compound API only (`TabsGlass.Root`, `.List`, `.Trigger`, `.Content`)
490
- - **Migration:** See [TabsGlass Compound API guide](docs/migration/tabs-glass-compound-api.md)
703
+ - **Migration:** See [Compound Components guide](docs/migration/compound-components-v2.md)
491
704
  - **Key Changes:**
492
705
  - `tabs` array prop removed → use individual `<TabsGlass.Trigger>` components
493
706
  - `activeTab` → `value` (on TabsGlass.Root)
package/README.md CHANGED
@@ -4,15 +4,20 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/shadcn-glass-ui.svg)](https://www.npmjs.com/package/shadcn-glass-ui)
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue)](https://www.typescriptlang.org/)
6
6
  [![AI-Friendly](https://img.shields.io/badge/AI-Optimized-blueviolet)](docs/AI_USAGE.md)
7
- [![Bundle Size](https://img.shields.io/bundlephobia/minzip/shadcn-glass-ui)](https://bundlephobia.com/package/shadcn-glass-ui)
7
+ [![Bundle Size](https://img.shields.io/bundlephobia/minzip/shadcn-glass-ui?cacheSeconds=86400)](https://bundlephobia.com/package/shadcn-glass-ui)
8
8
 
9
- **Glassmorphism UI components for React** — beautiful frosted glass effects, 58 production-ready
9
+ **Glassmorphism UI components for React** — beautiful frosted glass effects, 57 production-ready
10
10
  components, 3 themes, drop-in compatible with shadcn/ui.
11
11
 
12
12
  **[Live Demo](https://yhooi2.github.io/shadcn-glass-ui-library/)** |
13
13
  **[Interactive Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/)** |
14
14
  **[npm Package](https://www.npmjs.com/package/shadcn-glass-ui)**
15
15
 
16
+ <div align="center">
17
+ <img src="https://yhooi2.github.io/shadcn-glass-ui-library/demo-screenshot.png" alt="shadcn-glass-ui Demo - Glass Theme" width="100%" />
18
+ <p><em>Glass theme showcase with glassmorphism effects</em></p>
19
+ </div>
20
+
16
21
  ---
17
22
 
18
23
  ## Why shadcn-glass-ui?
@@ -22,16 +27,16 @@ components, 3 themes, drop-in compatible with shadcn/ui.
22
27
  | **Themes** | 3 built-in (Glass/Light/Aurora) | 1 base theme |
23
28
  | **Glass Effects** | Native blur, glow, transparency | Manual CSS required |
24
29
  | **AI Documentation** | Optimized for Claude, Copilot, GPT | Basic docs |
25
- | **Components** | 58 specialized glassmorphism | ~40 base components |
26
- | **Token System** | 207 OKLCH primitives, zero hardcoded | CSS variables |
30
+ | **Components** | 57 specialized glassmorphism | ~40 base components |
31
+ | **Token System** | 225 OKLCH primitives, zero hardcoded | CSS variables |
27
32
  | **Accessibility** | WCAG 2.1 AA + 44px touch targets | Basic a11y |
28
33
 
29
34
  **Key advantages:**
30
35
 
31
36
  - Works alongside existing shadcn/ui components — same patterns, same CLI
32
37
  - AI-first documentation with decision trees and Context7 integration
33
- - 1,570+ tests (visual regression, compliance, unit)
34
- - Create custom themes in 15 minutes with 3-layer token system
38
+ - 1,500+ tests (visual regression, compliance, unit)
39
+ - 3-layer token system with zero hardcoded values
35
40
 
36
41
  ---
37
42
 
@@ -55,7 +60,7 @@ function App() {
55
60
  return (
56
61
  <ThemeProvider defaultTheme="glass">
57
62
  <div className="p-8 space-y-4">
58
- <ButtonGlass variant="primary" size="lg">
63
+ <ButtonGlass variant="default" size="lg">
59
64
  Click me
60
65
  </ButtonGlass>
61
66
  <InputGlass placeholder="Enter text..." />
@@ -181,21 +186,131 @@ function ThemeSwitcher() {
181
186
  }
182
187
  ```
183
188
 
184
- **[Theme Creation Guide →](docs/THEME_CREATION_GUIDE.md)** — Create custom themes in 15 minutes
189
+ **[Theme Creation Guide →](docs/THEME_CREATION_GUIDE.md)**
190
+
191
+ ---
192
+
193
+ ## 3-Layer Token System
194
+
195
+ Centralized color management with **zero hardcoded values**.
196
+
197
+ ```
198
+ ┌─────────────────────────────────────────────────────────────┐
199
+ │ Component Tokens --btn-primary-bg, --modal-surface │
200
+ │ ↓ │
201
+ │ Semantic Tokens --semantic-primary, --semantic-surface │
202
+ │ ↓ │
203
+ │ Primitive Tokens --oklch-purple-500 (225 OKLCH colors) │
204
+ └─────────────────────────────────────────────────────────────┘
205
+ ```
206
+
207
+ | Metric | Before (v1.x) | After (v2.0) |
208
+ | ----------------------- | -------------- | -------------------- |
209
+ | Hardcoded OKLCH values | ~280 per theme | **0** |
210
+ | CSS variables per theme | ~85 | **296+ (inherited)** |
211
+
212
+ **How it works:**
213
+
214
+ 1. Define ~15 semantic tokens for your theme
215
+ 2. 280+ component tokens are inherited automatically
216
+ 3. All 57 components update instantly
217
+
218
+ ```css
219
+ /* Create a "neon" theme */
220
+ [data-theme='neon'] {
221
+ --semantic-primary: var(--oklch-cyan-400);
222
+ --semantic-surface: var(--oklch-slate-950);
223
+ --semantic-text: var(--oklch-white-95);
224
+ /* ... ~12 more tokens */
225
+ }
226
+ ```
227
+
228
+ **[Token Architecture Guide →](docs/TOKEN_ARCHITECTURE.md)** |
229
+ **[Theme Creation Guide →](docs/THEME_CREATION_GUIDE.md)**
230
+
231
+ ---
232
+
233
+ ## Full shadcn/ui Compatibility
234
+
235
+ ### 🎉 v2.0.0: 100% API Compatible
236
+
237
+ **Install on top of existing shadcn/ui projects** — no migration required!
238
+
239
+ All components now follow **exact shadcn/ui API conventions**:
240
+
241
+ | Component | shadcn/ui API | shadcn-glass-ui v2.0+ | Status |
242
+ | ----------------- | ---------------------------------- | --------------------- | ------ |
243
+ | **ButtonGlass** | `variant="default"` | ✅ Same | 100% |
244
+ | **ToggleGlass** | `pressed`, `onPressedChange` | ✅ Same | 100% |
245
+ | **SliderGlass** | `value: number[]`, `onValueChange` | ✅ Same | 100% |
246
+ | **ComboBoxGlass** | `value`, `onValueChange` | ✅ Same | 100% |
247
+
248
+ **Key improvements in v2.0:**
249
+
250
+ - `onChange` → `onValueChange` (Select, ComboBox, Slider)
251
+ - `checked` → `pressed` (Toggle components)
252
+ - `variant="default"` → `variant="default"` (Button)
253
+ - Array-based values for Slider (`number[]` instead of `number`)
254
+
255
+ | Feature | shadcn-glass-ui | Standard shadcn/ui |
256
+ | ----------------- | ----------------------------------------------- | ----------------------- |
257
+ | CLI installation | `npx shadcn add @shadcn-glass-ui/button-glass` | `npx shadcn add button` |
258
+ | Core props | `variant`, `size`, `className` | Same |
259
+ | Callback names | `onValueChange`, `onPressedChange` | Same |
260
+ | asChild pattern | Full support | Full support |
261
+ | TypeScript | Strict mode | Same |
262
+ | Extended features | `loading`, `icon`, compound APIs, glassmorphism | — |
263
+
264
+ **Mix and match freely:**
265
+
266
+ ```tsx
267
+ import { Button } from '@/components/ui/button'; // Standard shadcn/ui
268
+ import { ButtonGlass } from '@/components/glass/ui/button-glass'; // Glass variant
269
+
270
+ function App() {
271
+ return (
272
+ <>
273
+ <Button variant="outline">Standard</Button>
274
+ <ButtonGlass variant="default">Glassmorphism</ButtonGlass>
275
+ </>
276
+ );
277
+ }
278
+ ```
279
+
280
+ **Add to existing project:**
281
+
282
+ ```bash
283
+ # No migration needed - just add to components.json
284
+ npx shadcn@latest add @shadcn-glass-ui/button-glass
285
+ ```
286
+
287
+ **[Registry Documentation →](docs/REGISTRY_USAGE.md)**
185
288
 
186
289
  ---
187
290
 
188
- ## AI Support
291
+ ## AI-First Documentation
292
+
293
+ Built for AI coding assistants — Claude, Copilot, GPT understand this library perfectly.
189
294
 
190
- This library is optimized for AI coding assistants:
295
+ | AI Tool | Integration | What it provides |
296
+ | ------------------ | -------------------------------------------------------------- | ------------------------------------------ |
297
+ | **Claude Code** | [CLAUDE.md](CLAUDE.md) | 365-line project context, all patterns |
298
+ | **Context7 MCP** | [Indexed](https://context7.com/yhooi2/shadcn-glass-ui-library) | 41 rules, auto-fetched docs, version-aware |
299
+ | **GitHub Copilot** | TypeScript strict + JSDoc | Accurate completions, type inference |
300
+ | **ChatGPT/GPT-4** | [EXPORTS_MAP.json](docs/EXPORTS_MAP.json) | Machine-readable component registry |
191
301
 
192
- - **Claude Code** — Project-specific instructions in [CLAUDE.md](CLAUDE.md)
193
- - **Context7** — [Indexed](https://context7.com/yhooi2/shadcn-glass-ui-library) with 59 AI-specific
194
- rules
195
- - **GitHub Copilot** TypeScript strict mode + comprehensive JSDoc
196
- - **ChatGPT/GPT-4** — Machine-readable [EXPORTS_MAP.json](docs/EXPORTS_MAP.json)
302
+ **Context7 MCP enables:**
303
+
304
+ ```
305
+ AI: "Add a stepper component to my checkout flow"
306
+
307
+ → Context7 fetches StepperGlass docs automatically
308
+ → AI reads: "compound API, linear mode for wizards"
309
+ → AI generates correct code with all props
310
+ ```
197
311
 
198
- **[AI Usage Guide →](docs/AI_USAGE.md)**
312
+ **[AI Usage Guide →](docs/AI_USAGE.md)** — Decision trees, migration scripts, component
313
+ recommendations
199
314
 
200
315
  ---
201
316
 
@@ -228,14 +343,6 @@ find src/ -type f \( -name "*.tsx" -o -name "*.css" \) -exec sed -i '' \
228
343
 
229
344
  </details>
230
345
 
231
- <details>
232
- <summary><strong>Does it work with existing shadcn/ui components?</strong></summary>
233
-
234
- Yes! Glass components use the same patterns and can coexist with standard shadcn/ui components. Same
235
- CLI, same structure.
236
-
237
- </details>
238
-
239
346
  <details>
240
347
  <summary><strong>What are the requirements?</strong></summary>
241
348
 
@@ -255,24 +362,6 @@ CLI, same structure.
255
362
 
256
363
  </details>
257
364
 
258
- <details>
259
- <summary><strong>How do I create a custom theme?</strong></summary>
260
-
261
- Use the 3-layer token system. Define ~15 semantic tokens and component tokens are inherited
262
- automatically.
263
-
264
- ```css
265
- [data-theme='custom'] {
266
- --semantic-primary: var(--oklch-cyan-400);
267
- --semantic-surface: var(--oklch-slate-900);
268
- /* ... */
269
- }
270
- ```
271
-
272
- **[Theme Creation Guide →](docs/THEME_CREATION_GUIDE.md)**
273
-
274
- </details>
275
-
276
365
  <details>
277
366
  <summary><strong>How do I use Compound Components (Modal, Tabs, Stepper)?</strong></summary>
278
367
 
@@ -301,7 +390,7 @@ automatically.
301
390
  | ------------------------------------------------------------------ | --------------------------- |
302
391
  | **[Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/)** | Interactive component demos |
303
392
  | **[Getting Started](docs/GETTING_STARTED.md)** | Setup tutorial |
304
- | **[Component Catalog](docs/COMPONENTS_CATALOG.md)** | All 58 components |
393
+ | **[Component Catalog](docs/COMPONENTS_CATALOG.md)** | All 57 components |
305
394
  | **[AI Usage Guide](docs/AI_USAGE.md)** | For Claude, Copilot, GPT |
306
395
  | **[Theme Guide](docs/THEME_CREATION_GUIDE.md)** | Create custom themes |
307
396
  | **[Token Architecture](docs/TOKEN_ARCHITECTURE.md)** | 3-layer CSS token system |
package/context7.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "$schema": "https://context7.com/schema/context7.json",
3
3
  "projectTitle": "shadcn-glass-ui",
4
- "description": "Glassmorphism UI library for React - AI-friendly with 58 components, strict TypeScript, and comprehensive docs",
4
+ "description": "Glassmorphism UI library for React - AI-friendly with 57 components, strict TypeScript, and comprehensive docs",
5
5
  "branch": "main",
6
6
  "folders": ["docs"],
7
+ "includeFiles": ["README.md", "CLAUDE.md", "CHANGELOG.md"],
7
8
  "excludeFolders": ["src", "node_modules", "dist", ".storybook", ".github", "public", "coverage"],
8
9
  "excludeFiles": ["package-lock.json", ".DS_Store"],
9
10
  "rules": [
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_trust_score_card_glass = require("../trust-score-card-glass-Dgu46oWI.cjs");
2
+ const require_trust_score_card_glass = require("../trust-score-card-glass-CGXmOIfq.cjs");
3
3
  let node_util = require("node:util");
4
4
  let node_fs = require("node:fs");
5
5
  let node_path = require("node:path");
@@ -1,7 +1,7 @@
1
- const require_trust_score_card_glass = require("./trust-score-card-glass-Dgu46oWI.cjs");
2
- require("./utils-BXN7AcRu.cjs");
3
- require("./use-focus-BRkQtQCj.cjs");
4
- require("./theme-context-DNe_2vWJ.cjs");
1
+ const require_trust_score_card_glass = require("./trust-score-card-glass-CGXmOIfq.cjs");
2
+ require("./utils-LYxxWvUn.cjs");
3
+ require("./use-focus-CeNHOiBa.cjs");
4
+ require("./theme-context-BHXYJ4RE.cjs");
5
5
  exports.AICardGlass = require_trust_score_card_glass.AICardGlass;
6
6
  exports.AlertGlass = require_trust_score_card_glass.AlertGlass;
7
7
  exports.AvatarGlass = require_trust_score_card_glass.AvatarGlass;