shadcn-glass-ui 1.0.11 → 2.0.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.
- package/CHANGELOG.md +213 -0
- package/README.md +174 -17
- package/context7.json +58 -0
- package/dist/cli/index.cjs +470 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.ts +18 -0
- package/dist/cli/index.js +469 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/components.cjs +4 -4
- package/dist/components.d.ts +153 -22
- package/dist/components.js +2 -2
- package/dist/hooks.cjs +2 -2
- package/dist/index.cjs +872 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -2390
- package/dist/index.js +844 -3
- package/dist/index.js.map +1 -1
- package/dist/r/ai-card-glass.json +1 -1
- package/dist/r/avatar-glass.json +1 -1
- package/dist/r/circular-metric-glass.json +1 -1
- package/dist/r/circular-progress-glass.json +1 -1
- package/dist/r/combobox-glass.json +1 -1
- package/dist/r/flag-alert-glass.json +1 -1
- package/dist/r/flags-section-glass.json +1 -1
- package/dist/r/insight-card-glass.json +26 -0
- package/dist/r/interactive-card.json +1 -1
- package/dist/r/language-bar-glass.json +1 -1
- package/dist/r/metric-card-glass.json +3 -2
- package/dist/r/metrics-grid-glass.json +1 -1
- package/dist/r/modal-glass.json +1 -1
- package/dist/r/progress-glass.json +1 -1
- package/dist/r/registry.json +19 -1
- package/dist/r/segmented-control-glass.json +1 -1
- package/dist/r/sparkline-glass.json +26 -0
- package/dist/r/stepper-glass.json +41 -0
- package/dist/r/tabs-glass.json +1 -1
- package/dist/r/trust-score-card-glass.json +1 -1
- package/dist/r/year-card-glass.json +1 -1
- package/dist/shadcn-glass-ui.css +1 -1
- package/dist/{theme-context-XtasSxRT.cjs → theme-context-CVW50BKW.cjs} +2 -2
- package/dist/{theme-context-XtasSxRT.cjs.map → theme-context-CVW50BKW.cjs.map} +1 -1
- package/dist/themes.cjs +1 -1
- package/dist/trust-score-card-glass-BcZbul0P.js +26895 -0
- package/dist/trust-score-card-glass-BcZbul0P.js.map +1 -0
- package/dist/trust-score-card-glass-r3qM09Jp.cjs +27689 -0
- package/dist/trust-score-card-glass-r3qM09Jp.cjs.map +1 -0
- package/dist/{use-focus-BbpE2qGq.cjs → use-focus-ZE8ozmZE.cjs} +2 -2
- package/dist/{use-focus-BbpE2qGq.cjs.map → use-focus-ZE8ozmZE.cjs.map} +1 -1
- package/dist/{use-wallpaper-tint-CIqtoETa.cjs → use-wallpaper-tint-BuS80tbN.cjs} +2 -2
- package/dist/{use-wallpaper-tint-CIqtoETa.cjs.map → use-wallpaper-tint-BuS80tbN.cjs.map} +1 -1
- package/dist/{utils-CGCOTvxT.js → utils-CcyeqpKQ.js} +1 -1
- package/dist/{utils-CGCOTvxT.js.map → utils-CcyeqpKQ.js.map} +1 -1
- package/dist/{utils-CriE74ig.cjs → utils-DLXayspX.cjs} +2 -2
- package/dist/{utils-CriE74ig.cjs.map → utils-DLXayspX.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/docs/AI_IMPROVEMENTS_COMPLETE.md +574 -0
- package/docs/AI_USAGE.md +1328 -0
- package/docs/API_PATTERNS_COMPARISON.md +418 -0
- package/docs/BEST_PRACTICES.md +800 -0
- package/docs/COMPLIANCE_CHECKLIST.md +307 -0
- package/docs/COMPLIANCE_TESTING.md +436 -0
- package/docs/COMPONENTS_CATALOG.md +1076 -0
- package/docs/CSS_VARIABLES_AUDIT.md +306 -0
- package/docs/CSS_VARIABLES_REFACTORING_PLAN.md +330 -0
- package/docs/EXPORTS_MAP.json +875 -0
- package/docs/EXPORTS_STRUCTURE.md +729 -0
- package/docs/GETTING_STARTED.md +655 -0
- package/docs/METRIC_CARD_API_REDESIGN.md +354 -0
- package/docs/PRIMITIVE_MAPPING.md +404 -0
- package/docs/PUBLISHING.md +593 -0
- package/docs/REGISTRY_SUMMARY.md +96 -0
- package/docs/REGISTRY_USAGE.md +339 -0
- package/docs/SECURITY.md +117 -0
- package/docs/THEME_CREATION_GUIDE.md +455 -0
- package/docs/TOKEN_ARCHITECTURE.md +365 -0
- package/docs/announcements/v1.0.5-devto.md +363 -0
- package/docs/announcements/v1.0.5-reddit.md +115 -0
- package/docs/announcements/v1.0.5-twitter.md +70 -0
- package/docs/api/README.md +725 -0
- package/docs/api/functions/ThemeProvider.md +21 -0
- package/docs/api/functions/cn.md +27 -0
- package/docs/api/functions/getNextTheme.md +21 -0
- package/docs/api/functions/getThemeConfig.md +21 -0
- package/docs/api/functions/useFocus.md +53 -0
- package/docs/api/functions/useHover.md +47 -0
- package/docs/api/functions/useResponsive.md +31 -0
- package/docs/api/functions/useTheme.md +15 -0
- package/docs/api/functions/useWallpaperTint.md +36 -0
- package/docs/api/globals.md +139 -0
- package/docs/api/interfaces/AlertGlassProps.md +131 -0
- package/docs/api/interfaces/AvatarGlassProps.md +114 -0
- package/docs/api/interfaces/BadgeGlassProps.md +118 -0
- package/docs/api/interfaces/ButtonGlassProps.md +179 -0
- package/docs/api/interfaces/CheckboxGlassProps.md +125 -0
- package/docs/api/interfaces/DropdownGlassProps.md +123 -0
- package/docs/api/interfaces/DropdownItem.md +53 -0
- package/docs/api/interfaces/GlassCardProps.md +151 -0
- package/docs/api/interfaces/InputGlassProps.md +169 -0
- package/docs/api/interfaces/NotificationGlassProps.md +67 -0
- package/docs/api/interfaces/ProgressGlassProps.md +49 -0
- package/docs/api/interfaces/SkeletonGlassProps.md +41 -0
- package/docs/api/interfaces/SliderGlassProps.md +107 -0
- package/docs/api/interfaces/TabItem.md +25 -0
- package/docs/api/interfaces/ThemeConfig.md +25 -0
- package/docs/api/interfaces/ThemeContextValue.md +47 -0
- package/docs/api/interfaces/ToggleGlassProps.md +59 -0
- package/docs/api/interfaces/TooltipGlassProps.md +119 -0
- package/docs/api/type-aliases/AlertType.md +11 -0
- package/docs/api/type-aliases/AlertVariant.md +11 -0
- package/docs/api/type-aliases/AvatarSize.md +11 -0
- package/docs/api/type-aliases/AvatarStatus.md +13 -0
- package/docs/api/type-aliases/BadgeSize.md +11 -0
- package/docs/api/type-aliases/BadgeVariant.md +11 -0
- package/docs/api/type-aliases/ButtonGlassSize.md +11 -0
- package/docs/api/type-aliases/ButtonGlassVariant.md +11 -0
- package/docs/api/type-aliases/DropdownAlign.md +11 -0
- package/docs/api/type-aliases/GlowType.md +11 -0
- package/docs/api/type-aliases/InputGlassSize.md +11 -0
- package/docs/api/type-aliases/IntensityType.md +11 -0
- package/docs/api/type-aliases/ModalSize.md +11 -0
- package/docs/api/type-aliases/NotificationType.md +11 -0
- package/docs/api/type-aliases/PaddingType.md +11 -0
- package/docs/api/type-aliases/ProgressGradient.md +11 -0
- package/docs/api/type-aliases/ProgressSize.md +11 -0
- package/docs/api/type-aliases/SkeletonVariant.md +11 -0
- package/docs/api/type-aliases/Theme.md +11 -0
- package/docs/api/type-aliases/ToggleGlassSize.md +11 -0
- package/docs/api/type-aliases/TooltipPosition.md +11 -0
- package/docs/api/variables/AICardGlass.md +11 -0
- package/docs/api/variables/AlertGlass.md +11 -0
- package/docs/api/variables/AvatarGlass.md +11 -0
- package/docs/api/variables/BadgeGlass.md +11 -0
- package/docs/api/variables/BaseProgressGlass.md +11 -0
- package/docs/api/variables/ButtonGlass.md +11 -0
- package/docs/api/variables/CareerStatsGlass.md +11 -0
- package/docs/api/variables/CareerStatsHeaderGlass.md +11 -0
- package/docs/api/variables/CheckboxGlass.md +11 -0
- package/docs/api/variables/CircularMetricGlass.md +22 -0
- package/docs/api/variables/CircularProgressGlass.md +11 -0
- package/docs/api/variables/ComboBoxGlass.md +27 -0
- package/docs/api/variables/ContributionMetricsGlass.md +11 -0
- package/docs/api/variables/DropdownGlass.md +11 -0
- package/docs/api/variables/ExpandableHeaderGlass.md +11 -0
- package/docs/api/variables/FlagAlertGlass.md +11 -0
- package/docs/api/variables/FlagsSectionGlass.md +11 -0
- package/docs/api/variables/FormFieldWrapper.md +44 -0
- package/docs/api/variables/GlassCard.md +11 -0
- package/docs/api/variables/HeaderBrandingGlass.md +11 -0
- package/docs/api/variables/HeaderNavGlass.md +11 -0
- package/docs/api/variables/IconButtonGlass.md +11 -0
- package/docs/api/variables/InputGlass.md +11 -0
- package/docs/api/variables/InteractiveCard.md +45 -0
- package/docs/api/variables/LanguageBarGlass.md +11 -0
- package/docs/api/variables/MetricCardGlass.md +11 -0
- package/docs/api/variables/MetricsGridGlass.md +11 -0
- package/docs/api/variables/ModalGlass.md +72 -0
- package/docs/api/variables/NotificationGlass.md +11 -0
- package/docs/api/variables/PopoverGlass.md +11 -0
- package/docs/api/variables/ProfileAvatarGlass.md +11 -0
- package/docs/api/variables/ProfileHeaderGlass.md +11 -0
- package/docs/api/variables/ProgressGlass.md +11 -0
- package/docs/api/variables/ProjectsListGlass.md +11 -0
- package/docs/api/variables/RainbowProgressGlass.md +11 -0
- package/docs/api/variables/RepositoryCardGlass.md +11 -0
- package/docs/api/variables/RepositoryHeaderGlass.md +11 -0
- package/docs/api/variables/RepositoryMetadataGlass.md +11 -0
- package/docs/api/variables/SearchBoxGlass.md +11 -0
- package/docs/api/variables/SegmentedControlGlass.md +11 -0
- package/docs/api/variables/SkeletonGlass.md +11 -0
- package/docs/api/variables/SliderGlass.md +11 -0
- package/docs/api/variables/SortDropdownGlass.md +11 -0
- package/docs/api/variables/StatItemGlass.md +11 -0
- package/docs/api/variables/StatusIndicatorGlass.md +11 -0
- package/docs/api/variables/THEMES.md +11 -0
- package/docs/api/variables/THEME_CONFIG.md +11 -0
- package/docs/api/variables/TabsGlass.md +52 -0
- package/docs/api/variables/ThemeToggleGlass.md +11 -0
- package/docs/api/variables/ToggleGlass.md +11 -0
- package/docs/api/variables/TooltipGlass.md +11 -0
- package/docs/api/variables/TouchTarget.md +35 -0
- package/docs/api/variables/TrustScoreCardGlass.md +11 -0
- package/docs/api/variables/TrustScoreDisplayGlass.md +11 -0
- package/docs/api/variables/UserInfoGlass.md +11 -0
- package/docs/api/variables/UserStatsLineGlass.md +11 -0
- package/docs/api/variables/YearCardGlass.md +11 -0
- package/docs/api/variables/alertVariants.md +21 -0
- package/docs/api/variables/avatarSizes.md +21 -0
- package/docs/api/variables/badgeVariants.md +21 -0
- package/docs/api/variables/buttonGlassVariants.md +21 -0
- package/docs/api/variables/cardIntensity.md +21 -0
- package/docs/api/variables/dropdownAlign.md +21 -0
- package/docs/api/variables/inputVariants.md +21 -0
- package/docs/api/variables/modalSizes.md +21 -0
- package/docs/api/variables/notificationVariants.md +21 -0
- package/docs/api/variables/progressSizes.md +21 -0
- package/docs/api/variables/shadcnAlertVariants.md +21 -0
- package/docs/api/variables/shadcnBadgeVariants.md +21 -0
- package/docs/api/variables/shadcnButtonVariants.md +21 -0
- package/docs/api/variables/skeletonVariants.md +21 -0
- package/docs/api/variables/statusSizes.md +21 -0
- package/docs/api/variables/toggleSizes.md +21 -0
- package/docs/api/variables/tooltipPositions.md +21 -0
- package/docs/design-system/UI_DESIGN.md +628 -0
- package/docs/migration/CSS_VARIABLES_MIGRATION_2.0.md +325 -0
- package/docs/migration/modal-glass-compound-api.md +458 -0
- package/docs/migration/select-to-combobox.md +386 -0
- package/docs/migration/tabs-glass-compound-api.md +579 -0
- package/docs/technical/DEPENDENCIES.md +291 -0
- package/docs/visual-testing-guide.md +324 -0
- package/package.json +20 -3
- package/dist/trust-score-card-glass-CNcQveNY.cjs +0 -8231
- package/dist/trust-score-card-glass-CNcQveNY.cjs.map +0 -1
- package/dist/trust-score-card-glass-CowcDyxH.js +0 -7795
- package/dist/trust-score-card-glass-CowcDyxH.js.map +0 -1
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
# Publishing Guide
|
|
2
|
+
|
|
3
|
+
Complete guide for building and publishing the shadcn-glass-ui library with TypeScript declarations.
|
|
4
|
+
|
|
5
|
+
## 📋 Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Build Process](#build-process)
|
|
8
|
+
- [Type Declarations](#type-declarations)
|
|
9
|
+
- [Package Configuration](#package-configuration)
|
|
10
|
+
- [Publishing Checklist](#publishing-checklist)
|
|
11
|
+
- [NPM Publishing](#npm-publishing)
|
|
12
|
+
|
|
13
|
+
## Build Process
|
|
14
|
+
|
|
15
|
+
### 1. Build Library Bundle
|
|
16
|
+
|
|
17
|
+
Build the production JavaScript bundle:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This command runs:
|
|
24
|
+
|
|
25
|
+
- TypeScript compilation (`tsc -b`)
|
|
26
|
+
- Vite production build
|
|
27
|
+
- Output: `dist/` directory with bundled JavaScript
|
|
28
|
+
|
|
29
|
+
### 2. Generate Type Declarations
|
|
30
|
+
|
|
31
|
+
Generate TypeScript declaration files (`.d.ts`):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run build:types
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This command:
|
|
38
|
+
|
|
39
|
+
- Uses `tsc --project tsconfig.build.json`
|
|
40
|
+
- Generates `.d.ts` files for all exported types (136 files)
|
|
41
|
+
- Outputs to `dist/` directory alongside JavaScript files
|
|
42
|
+
- Preserves JSDoc comments in declarations
|
|
43
|
+
- Includes declaration maps for better IDE support
|
|
44
|
+
|
|
45
|
+
**Example output:**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
dist/
|
|
49
|
+
├── index.js # Main bundle
|
|
50
|
+
├── index.d.ts # Main type declarations
|
|
51
|
+
├── components/
|
|
52
|
+
│ └── glass/
|
|
53
|
+
│ └── ui/
|
|
54
|
+
│ ├── button-glass.d.ts
|
|
55
|
+
│ └── ...
|
|
56
|
+
└── lib/
|
|
57
|
+
├── types.d.ts
|
|
58
|
+
└── variants/
|
|
59
|
+
└── ...
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Full Production Build
|
|
63
|
+
|
|
64
|
+
For publishing, run both commands:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm run build && npm run build:types
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or create a combined script in `package.json`:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"scripts": {
|
|
75
|
+
"prepublishOnly": "npm run build && npm run build:types"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Type Declarations
|
|
81
|
+
|
|
82
|
+
### Main Entry Point
|
|
83
|
+
|
|
84
|
+
The library exports all types from a single entry point: `src/index.ts`
|
|
85
|
+
|
|
86
|
+
**Import examples:**
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
// Components with types
|
|
90
|
+
import { ButtonGlass, type ButtonGlassProps } from 'shadcn-glass-ui';
|
|
91
|
+
|
|
92
|
+
// Variant types
|
|
93
|
+
import { type ButtonGlassVariant } from 'shadcn-glass-ui';
|
|
94
|
+
|
|
95
|
+
// Theme system
|
|
96
|
+
import { ThemeProvider, useTheme, type Theme } from 'shadcn-glass-ui';
|
|
97
|
+
|
|
98
|
+
// Utilities
|
|
99
|
+
import { cn } from 'shadcn-glass-ui';
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### JSDoc Documentation
|
|
103
|
+
|
|
104
|
+
All exported types include comprehensive JSDoc comments:
|
|
105
|
+
|
|
106
|
+
````typescript
|
|
107
|
+
/**
|
|
108
|
+
* Props for ButtonGlass component
|
|
109
|
+
*
|
|
110
|
+
* @description Glass-themed button with multiple variants, sizes, and states.
|
|
111
|
+
* Supports polymorphic rendering via asChild prop.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```tsx
|
|
115
|
+
* <ButtonGlass variant="primary" size="md">
|
|
116
|
+
* Click me
|
|
117
|
+
* </ButtonGlass>
|
|
118
|
+
*
|
|
119
|
+
* // Polymorphic usage
|
|
120
|
+
* <ButtonGlass asChild>
|
|
121
|
+
* <Link to="/home">Home</Link>
|
|
122
|
+
* </ButtonGlass>
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @see {@link ButtonGlassVariant} for available variants
|
|
126
|
+
*/
|
|
127
|
+
export type ButtonGlassProps = { ... }
|
|
128
|
+
````
|
|
129
|
+
|
|
130
|
+
**Benefits:**
|
|
131
|
+
|
|
132
|
+
- ✅ VSCode IntelliSense shows examples
|
|
133
|
+
- ✅ AI assistants (Copilot, Claude) get full context
|
|
134
|
+
- ✅ API documentation can be auto-generated
|
|
135
|
+
- ✅ Type safety with usage guidance
|
|
136
|
+
|
|
137
|
+
### Type Coverage
|
|
138
|
+
|
|
139
|
+
**Statistics:**
|
|
140
|
+
|
|
141
|
+
- 59 exported types
|
|
142
|
+
- 60 exported components/functions
|
|
143
|
+
- 64 JSDoc code examples
|
|
144
|
+
- 50+ documented components
|
|
145
|
+
|
|
146
|
+
**Categories:**
|
|
147
|
+
|
|
148
|
+
1. **Theme System** - Theme, ThemeConfig, ThemeProvider
|
|
149
|
+
2. **Core UI Components** - ButtonGlass, InputGlass, ModalGlass, etc.
|
|
150
|
+
3. **Specialized Components** - ProgressGlass, StatusIndicatorGlass, etc.
|
|
151
|
+
4. **Atomic Components** - ThemeToggleGlass, IconButtonGlass, etc.
|
|
152
|
+
5. **Composite Components** - MetricCardGlass, YearCardGlass, etc.
|
|
153
|
+
6. **Section Components** - HeaderNavGlass, ProfileHeaderGlass, etc.
|
|
154
|
+
7. **Primitive Components** - TouchTarget, FormFieldWrapper, etc.
|
|
155
|
+
8. **Variant Types** - All CVA variant types and enums
|
|
156
|
+
9. **Utilities** - `cn()`, design tokens, constants
|
|
157
|
+
|
|
158
|
+
## Package Configuration
|
|
159
|
+
|
|
160
|
+
### package.json Setup
|
|
161
|
+
|
|
162
|
+
The library is configured for proper TypeScript support:
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"name": "shadcn-glass-ui",
|
|
167
|
+
"version": "1.0.0",
|
|
168
|
+
"type": "module",
|
|
169
|
+
"main": "./dist/index.js",
|
|
170
|
+
"types": "./dist/index.d.ts",
|
|
171
|
+
"exports": {
|
|
172
|
+
".": {
|
|
173
|
+
"types": "./dist/index.d.ts",
|
|
174
|
+
"import": "./dist/index.js"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"files": ["dist", "src"]
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Key fields:**
|
|
182
|
+
|
|
183
|
+
- **`main`** - Entry point for Node.js/CommonJS (fallback)
|
|
184
|
+
- **`types`** - TypeScript declaration entry point
|
|
185
|
+
- **`exports`** - Modern exports map (ESM + TypeScript)
|
|
186
|
+
- `types` - Points to `.d.ts` files
|
|
187
|
+
- `import` - Points to ESM JavaScript
|
|
188
|
+
- **`files`** - Which files to include in npm package
|
|
189
|
+
- `dist/` - Built JavaScript + declarations
|
|
190
|
+
- `src/` - Source files (optional, for source maps)
|
|
191
|
+
|
|
192
|
+
### TypeScript Configuration
|
|
193
|
+
|
|
194
|
+
The library uses strict TypeScript configuration:
|
|
195
|
+
|
|
196
|
+
**tsconfig.json:**
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"compilerOptions": {
|
|
201
|
+
"strict": true,
|
|
202
|
+
"declaration": true,
|
|
203
|
+
"declarationMap": true,
|
|
204
|
+
"esModuleInterop": true,
|
|
205
|
+
"skipLibCheck": true,
|
|
206
|
+
"moduleResolution": "bundler",
|
|
207
|
+
"resolveJsonModule": true,
|
|
208
|
+
"allowImportingTsExtensions": false,
|
|
209
|
+
"isolatedModules": true,
|
|
210
|
+
"noEmit": false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**For publishing, use:**
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
tsc --declaration --emitDeclarationOnly --outDir dist
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Flags explained:**
|
|
222
|
+
|
|
223
|
+
- `--declaration` - Generate `.d.ts` files
|
|
224
|
+
- `--emitDeclarationOnly` - Only output declarations (no JS)
|
|
225
|
+
- `--outDir dist` - Output to dist directory
|
|
226
|
+
|
|
227
|
+
## Publishing Checklist
|
|
228
|
+
|
|
229
|
+
Before publishing to npm, verify:
|
|
230
|
+
|
|
231
|
+
### 1. Build Verification
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Clean previous build
|
|
235
|
+
rm -rf dist/
|
|
236
|
+
|
|
237
|
+
# Build JavaScript bundle
|
|
238
|
+
npm run build
|
|
239
|
+
|
|
240
|
+
# Build type declarations
|
|
241
|
+
npm run build:types
|
|
242
|
+
|
|
243
|
+
# Verify outputs
|
|
244
|
+
ls -la dist/
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Expected files:**
|
|
248
|
+
|
|
249
|
+
- ✅ `dist/index.js` - Main JavaScript bundle
|
|
250
|
+
- ✅ `dist/index.d.ts` - Main type declarations
|
|
251
|
+
- ✅ `dist/**/*.d.ts` - Component type declarations
|
|
252
|
+
|
|
253
|
+
### 2. Type Checking
|
|
254
|
+
|
|
255
|
+
Verify all types are correct:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
npm run lint
|
|
259
|
+
tsc --noEmit
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### 3. Test Coverage
|
|
263
|
+
|
|
264
|
+
Run all tests before publishing:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# Unit tests
|
|
268
|
+
npm run test:unit
|
|
269
|
+
|
|
270
|
+
# Visual regression tests
|
|
271
|
+
npm run test:visual:ci
|
|
272
|
+
|
|
273
|
+
# Design system compliance
|
|
274
|
+
npm run test:compliance:run
|
|
275
|
+
|
|
276
|
+
# All tests
|
|
277
|
+
npm run test:all
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 4. Version Bump
|
|
281
|
+
|
|
282
|
+
Update version in `package.json`:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
npm version patch # 1.0.0 → 1.0.1 (bug fixes)
|
|
286
|
+
npm version minor # 1.0.0 → 1.1.0 (new features)
|
|
287
|
+
npm version major # 1.0.0 → 2.0.0 (breaking changes)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Version Guidance:**
|
|
291
|
+
|
|
292
|
+
- **Patch (1.0.x)** - Bug fixes, documentation updates, internal refactoring
|
|
293
|
+
- **Minor (1.x.0)** - New components, new features, backward-compatible changes
|
|
294
|
+
- **Major (x.0.0)** - Breaking changes, removed APIs, renamed props
|
|
295
|
+
|
|
296
|
+
**v2.0.0 Example (Breaking Changes):**
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# Version 2.0.0 introduced breaking changes:
|
|
300
|
+
# - Removed deprecated CSS variables (--metric-emerald-* → --metric-success-*)
|
|
301
|
+
# - Introduced 3-layer token architecture
|
|
302
|
+
# - Zero hardcoded OKLCH values
|
|
303
|
+
|
|
304
|
+
npm version major # 1.0.11 → 2.0.0
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**Breaking Changes Checklist:**
|
|
308
|
+
|
|
309
|
+
If releasing a major version with breaking changes:
|
|
310
|
+
|
|
311
|
+
- [ ] Update [CHANGELOG.md](../CHANGELOG.md) with "⚠️ BREAKING CHANGES" section
|
|
312
|
+
- [ ] Create migration guide in `docs/migration/` (e.g., CSS_VARIABLES_MIGRATION_2.0.md)
|
|
313
|
+
- [ ] Update [README.md](../README.md) with breaking changes warning
|
|
314
|
+
- [ ] Update [CLAUDE.md](../CLAUDE.md) with new patterns/APIs
|
|
315
|
+
- [ ] Add deprecation warnings in previous minor version (if possible)
|
|
316
|
+
- [ ] Test migration path with real-world projects
|
|
317
|
+
- [ ] Document all removed/renamed APIs with replacements
|
|
318
|
+
- [ ] Update Context7 rules in [context7.json](../context7.json)
|
|
319
|
+
|
|
320
|
+
### 5. Documentation Check
|
|
321
|
+
|
|
322
|
+
Ensure documentation is up to date:
|
|
323
|
+
|
|
324
|
+
- ✅ `README.md` - Updated examples and version badges
|
|
325
|
+
- ✅ `CHANGELOG.md` - New version entry with all changes
|
|
326
|
+
- ✅ `CLAUDE.md` - Architecture notes and breaking changes
|
|
327
|
+
- ✅ JSDoc comments - All types documented
|
|
328
|
+
- ✅ Migration guides - Created for breaking changes (if applicable)
|
|
329
|
+
- ✅ `context7.json` - Version and rules updated for AI assistants
|
|
330
|
+
|
|
331
|
+
### 6. Package Dry Run
|
|
332
|
+
|
|
333
|
+
Test package before publishing:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
# Pack locally
|
|
337
|
+
npm pack
|
|
338
|
+
|
|
339
|
+
# This creates shadcn-glass-ui-1.0.0.tgz
|
|
340
|
+
# Install in test project:
|
|
341
|
+
cd /path/to/test-project
|
|
342
|
+
npm install /path/to/shadcn-glass-ui-1.0.0.tgz
|
|
343
|
+
|
|
344
|
+
# Verify imports work
|
|
345
|
+
import { ButtonGlass, type ButtonGlassProps } from 'shadcn-glass-ui';
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## NPM Publishing
|
|
349
|
+
|
|
350
|
+
### First-Time Setup
|
|
351
|
+
|
|
352
|
+
1. **Create npm account** at https://www.npmjs.com/signup
|
|
353
|
+
|
|
354
|
+
2. **Login to npm:**
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
npm login
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
3. **Update package.json:**
|
|
361
|
+
```json
|
|
362
|
+
{
|
|
363
|
+
"name": "@yourusername/shadcn-glass-ui",
|
|
364
|
+
"private": false,
|
|
365
|
+
"publishConfig": {
|
|
366
|
+
"access": "public"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Publishing Process
|
|
372
|
+
|
|
373
|
+
1. **Prepare release:**
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# Clean install
|
|
377
|
+
rm -rf node_modules package-lock.json
|
|
378
|
+
npm install
|
|
379
|
+
|
|
380
|
+
# Run tests
|
|
381
|
+
npm run test:all
|
|
382
|
+
|
|
383
|
+
# Build for production
|
|
384
|
+
npm run build
|
|
385
|
+
npm run build:types
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
2. **Publish to npm:**
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
npm publish
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Or for scoped package:
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
npm publish --access public
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
3. **Verify publication:**
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
# Check on npm
|
|
404
|
+
npm view @yourusername/shadcn-glass-ui
|
|
405
|
+
|
|
406
|
+
# Install in test project
|
|
407
|
+
npm install @yourusername/shadcn-glass-ui
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Automated Publishing with GitHub Actions
|
|
411
|
+
|
|
412
|
+
The repository includes automated npm publishing workflow in `.github/workflows/publish.yml`.
|
|
413
|
+
|
|
414
|
+
**Features:**
|
|
415
|
+
|
|
416
|
+
- ✅ Publishes on GitHub release creation
|
|
417
|
+
- ✅ Manual trigger with specific tag (workflow_dispatch)
|
|
418
|
+
- ✅ Version verification (tag vs package.json)
|
|
419
|
+
- ✅ Dry-run validation before publish
|
|
420
|
+
- ✅ npm provenance for supply chain security
|
|
421
|
+
- ✅ Automatic GitHub deployment tracking
|
|
422
|
+
|
|
423
|
+
**Setup NPM Token:**
|
|
424
|
+
|
|
425
|
+
1. **Create npm access token:**
|
|
426
|
+
- Go to https://www.npmjs.com/settings/tokens
|
|
427
|
+
- Click "Generate New Token" → "Classic Token"
|
|
428
|
+
- Select "Automation" type (for CI/CD)
|
|
429
|
+
- Copy the token
|
|
430
|
+
|
|
431
|
+
2. **Add to GitHub Secrets:**
|
|
432
|
+
- Go to repository Settings → Secrets and variables → Actions
|
|
433
|
+
- Click "New repository secret"
|
|
434
|
+
- Name: `NPM_TOKEN`
|
|
435
|
+
- Value: paste your npm token
|
|
436
|
+
- Click "Add secret"
|
|
437
|
+
|
|
438
|
+
**Publishing via GitHub Release:**
|
|
439
|
+
|
|
440
|
+
1. **Create git tag:**
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
git tag v1.0.0
|
|
444
|
+
git push origin v1.0.0
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
2. **Create GitHub Release:**
|
|
448
|
+
- Go to repository → Releases → "Create a new release"
|
|
449
|
+
- Choose tag: `v1.0.0`
|
|
450
|
+
- Fill in release notes (use CHANGELOG.md)
|
|
451
|
+
- Click "Publish release"
|
|
452
|
+
|
|
453
|
+
3. **Monitor workflow:**
|
|
454
|
+
```bash
|
|
455
|
+
gh run list --workflow=publish.yml --limit 1
|
|
456
|
+
gh run watch
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Manual Trigger:**
|
|
460
|
+
|
|
461
|
+
Publish specific tag without creating a release:
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
gh workflow run publish.yml -f tag=v1.0.0
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**Important Notes:**
|
|
468
|
+
|
|
469
|
+
- Tag version MUST match package.json version (e.g., `v1.0.0` → `1.0.0`)
|
|
470
|
+
- Workflow includes provenance for supply chain security
|
|
471
|
+
- Public access is automatic (configured in workflow)
|
|
472
|
+
- Build runs via `prepublishOnly` hook in package.json
|
|
473
|
+
|
|
474
|
+
## Troubleshooting
|
|
475
|
+
|
|
476
|
+
### Types Not Found
|
|
477
|
+
|
|
478
|
+
**Issue:** TypeScript can't find types after installation
|
|
479
|
+
|
|
480
|
+
**Solution:**
|
|
481
|
+
|
|
482
|
+
```json
|
|
483
|
+
// Verify package.json exports
|
|
484
|
+
{
|
|
485
|
+
"types": "./dist/index.d.ts",
|
|
486
|
+
"exports": {
|
|
487
|
+
".": {
|
|
488
|
+
"types": "./dist/index.d.ts"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Module Resolution Errors
|
|
495
|
+
|
|
496
|
+
**Issue:** Import errors in consuming projects
|
|
497
|
+
|
|
498
|
+
**Solution:**
|
|
499
|
+
|
|
500
|
+
```json
|
|
501
|
+
// Consumer's tsconfig.json
|
|
502
|
+
{
|
|
503
|
+
"compilerOptions": {
|
|
504
|
+
"moduleResolution": "bundler", // or "node"
|
|
505
|
+
"esModuleInterop": true
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### Missing JSDoc in IDE
|
|
511
|
+
|
|
512
|
+
**Issue:** JSDoc comments not showing in autocomplete
|
|
513
|
+
|
|
514
|
+
**Solution:**
|
|
515
|
+
|
|
516
|
+
- Ensure `--declaration` preserves comments
|
|
517
|
+
- Verify `.d.ts` files contain `/** */` comments
|
|
518
|
+
- Reload VSCode TypeScript server
|
|
519
|
+
|
|
520
|
+
### Build Failures
|
|
521
|
+
|
|
522
|
+
**Issue:** TypeScript compilation fails
|
|
523
|
+
|
|
524
|
+
**Solution:**
|
|
525
|
+
|
|
526
|
+
```bash
|
|
527
|
+
# Check for type errors
|
|
528
|
+
tsc --noEmit
|
|
529
|
+
|
|
530
|
+
# Clean and rebuild
|
|
531
|
+
rm -rf dist/ node_modules/
|
|
532
|
+
npm install
|
|
533
|
+
npm run build:types
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
## Best Practices
|
|
537
|
+
|
|
538
|
+
### 1. Semantic Versioning
|
|
539
|
+
|
|
540
|
+
Follow [semver](https://semver.org/) strictly:
|
|
541
|
+
|
|
542
|
+
- **Patch** (1.0.x) - Bug fixes, no API changes
|
|
543
|
+
- **Minor** (1.x.0) - New features, backward compatible
|
|
544
|
+
- **Major** (x.0.0) - Breaking changes
|
|
545
|
+
|
|
546
|
+
### 2. Changelog Maintenance
|
|
547
|
+
|
|
548
|
+
Update `CHANGELOG.md` for every release:
|
|
549
|
+
|
|
550
|
+
```markdown
|
|
551
|
+
## [1.1.0] - 2025-01-15
|
|
552
|
+
|
|
553
|
+
### Added
|
|
554
|
+
|
|
555
|
+
- New component: DatePickerGlass
|
|
556
|
+
- ComboBoxGlass: Multi-select support
|
|
557
|
+
|
|
558
|
+
### Fixed
|
|
559
|
+
|
|
560
|
+
- ButtonGlass: Focus ring visibility in Aurora theme
|
|
561
|
+
|
|
562
|
+
### Changed
|
|
563
|
+
|
|
564
|
+
- InputGlass: Improved error state styling
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### 3. Type Documentation
|
|
568
|
+
|
|
569
|
+
Always include JSDoc for public APIs:
|
|
570
|
+
|
|
571
|
+
- Component props
|
|
572
|
+
- Variant types
|
|
573
|
+
- Utility functions
|
|
574
|
+
- Theme configuration
|
|
575
|
+
|
|
576
|
+
### 4. Testing Before Publish
|
|
577
|
+
|
|
578
|
+
Never skip tests before publishing:
|
|
579
|
+
|
|
580
|
+
```bash
|
|
581
|
+
npm run test:all && npm run build && npm run build:types && npm publish
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
## Resources
|
|
585
|
+
|
|
586
|
+
- **NPM Documentation**: https://docs.npmjs.com/
|
|
587
|
+
- **TypeScript Handbook**: https://www.typescriptlang.org/docs/handbook/
|
|
588
|
+
- **Semantic Versioning**: https://semver.org/
|
|
589
|
+
- **JSDoc Reference**: https://jsdoc.app/
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
**Happy publishing!** 🚀
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# shadcn-glass-ui Registry Summary
|
|
2
|
+
|
|
3
|
+
## ✅ Registry Status
|
|
4
|
+
|
|
5
|
+
- **Status**: Merged and Live
|
|
6
|
+
- **Merge Date**: December 8, 2025
|
|
7
|
+
- **PR**: [shadcn-ui/ui#7543](https://github.com/shadcn-ui/ui/pull/7543)
|
|
8
|
+
- **Registry URL**: `https://raw.githubusercontent.com/Yhooi2/shadcn-glass-ui-library/main/public/r`
|
|
9
|
+
- **Public Listing**: [registry.directory](https://registry.directory)
|
|
10
|
+
|
|
11
|
+
## 📦 Registry Details
|
|
12
|
+
|
|
13
|
+
### Components Available
|
|
14
|
+
|
|
15
|
+
- **Total**: 58 components
|
|
16
|
+
- **Categories**:
|
|
17
|
+
- Core UI (18)
|
|
18
|
+
- Atomic (7)
|
|
19
|
+
- Composite (13)
|
|
20
|
+
- Sections (7)
|
|
21
|
+
- Specialized (10)
|
|
22
|
+
- Primitives (3)
|
|
23
|
+
|
|
24
|
+
### Installation Namespace
|
|
25
|
+
|
|
26
|
+
All components use the `@shadcn-glass-ui/` namespace:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx shadcn@latest add @shadcn-glass-ui/button-glass
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 🔗 Important Links
|
|
33
|
+
|
|
34
|
+
- **Registry Documentation**: [REGISTRY_USAGE.md](./REGISTRY_USAGE.md)
|
|
35
|
+
- **Live Demo**: https://yhooi2.github.io/shadcn-glass-ui-library/
|
|
36
|
+
- **GitHub Repository**: https://github.com/Yhooi2/shadcn-glass-ui-library
|
|
37
|
+
- **npm Package**: https://www.npmjs.com/package/shadcn-glass-ui
|
|
38
|
+
|
|
39
|
+
## 📊 Registry Metrics
|
|
40
|
+
|
|
41
|
+
| Metric | Value |
|
|
42
|
+
| --------------- | ------------------------ |
|
|
43
|
+
| Components | 58 |
|
|
44
|
+
| Registry Schema | v4.0 |
|
|
45
|
+
| TypeScript | ✅ Full support |
|
|
46
|
+
| Dependencies | Auto-installed |
|
|
47
|
+
| Themes | 3 (glass, light, aurora) |
|
|
48
|
+
|
|
49
|
+
## 🎯 Key Features
|
|
50
|
+
|
|
51
|
+
1. **shadcn CLI Compatible** - Install with official CLI
|
|
52
|
+
2. **Automatic Dependencies** - No manual dependency management
|
|
53
|
+
3. **Type Safe** - Full TypeScript support
|
|
54
|
+
4. **Tree Shakeable** - Only bundle what you use
|
|
55
|
+
5. **Theme System** - 3 built-in themes
|
|
56
|
+
|
|
57
|
+
## 📖 Usage Examples
|
|
58
|
+
|
|
59
|
+
### Basic Installation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Configure registry in components.json
|
|
63
|
+
npx shadcn@latest add @shadcn-glass-ui/button-glass
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Multiple Components
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx shadcn@latest add @shadcn-glass-ui/button-glass @shadcn-glass-ui/input-glass
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### With Dependencies
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npx shadcn@latest add @shadcn-glass-ui/button-glass --deps
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 🚀 Next Steps
|
|
79
|
+
|
|
80
|
+
1. ✅ Registry merged on registry.directory
|
|
81
|
+
2. ✅ Documentation updated
|
|
82
|
+
3. ⏳ Update README.md with registry information
|
|
83
|
+
4. ⏳ Announce on social media / dev.to
|
|
84
|
+
|
|
85
|
+
## 📝 Changelog
|
|
86
|
+
|
|
87
|
+
### v1.0.0 (December 2025)
|
|
88
|
+
|
|
89
|
+
- ✅ Initial registry submission
|
|
90
|
+
- ✅ Merged into shadcn-ui/ui registry
|
|
91
|
+
- ✅ Listed on registry.directory
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
**Last Updated**: December 8, 2025
|
|
96
|
+
**Maintainer**: @Yhooi2
|