@@ -6,7 +6,6 @@ const postcss = require('postcss')
66
77// Paths
88const UTILITIES_CSS = path . join ( __dirname , '../src/utilities.css' )
9- const BASE_CSS = path . join ( __dirname , '../src/base.css' )
109const CLAUDE_MD = path . join ( __dirname , '../CLAUDE.md' )
1110const TYPES_DIR = path . join ( __dirname , '../types' )
1211const UTILITIES_TYPES = path . join ( TYPES_DIR , 'utilities.d.ts' )
@@ -115,30 +114,30 @@ function generateTypeDefinitions(utilities, themeColors) {
115114 * DO NOT EDIT THIS FILE DIRECTLY
116115 * Run 'pnpm generate:docs' to update
117116 */
118-
117+ /* eslint-disable */
118+ /* prettier-ignore */
119119/**
120120 * Custom utility classes defined in utilities.css
121121 */
122122export type MoonshineUtilities =
123- ${ utilityTypes } ;
123+ ${ utilityTypes }
124124
125125/**
126126 * Semantic color utilities available from theme
127127 * These are auto-generated from theme colors with standard prefixes
128128 */
129129export type MoonshineColorUtilities =
130- ${ colorUtilities } ;
130+ ${ colorUtilities }
131131
132132/**
133133 * All available Moonshine utility classes
134134 */
135- export type MoonshineClasses = MoonshineUtilities | MoonshineColorUtilities;
135+ export type MoonshineClasses = MoonshineUtilities | MoonshineColorUtilities
136136
137137/**
138138 * Helper type for className props
139139 */
140- export type MoonshineClassName = MoonshineClasses | MoonshineClasses[] | undefined | null | false;
141- `
140+ export type MoonshineClassName = MoonshineClasses | MoonshineClasses[] | undefined | null | false`
142141}
143142
144143// Generate documentation section for CLAUDE.md
@@ -147,14 +146,13 @@ function generateDocSection(utilities) {
147146
148147 // Group utilities by type
149148 const typography = utilities . filter (
150- ( u ) => u . name . startsWith ( 'text-' ) || u . name . startsWith ( 'typography -')
149+ ( u ) => u . name . startsWith ( 'text-' )
151150 )
152151 const backgrounds = utilities . filter ( ( u ) => u . name . startsWith ( 'bg-' ) )
153152 const borders = utilities . filter ( ( u ) => u . name . startsWith ( 'border-' ) )
154153 const other = utilities . filter (
155154 ( u ) =>
156155 ! u . name . startsWith ( 'text-' ) &&
157- ! u . name . startsWith ( 'typography-' ) &&
158156 ! u . name . startsWith ( 'bg-' ) &&
159157 ! u . name . startsWith ( 'border-' )
160158 )
@@ -171,18 +169,10 @@ function generateDocSection(utilities) {
171169 sections . push ( '### Typography Utilities\n' )
172170 typography . forEach ( ( u ) => {
173171 sections . push ( `#### \`${ u . name } \`\n` )
174- sections . push ( '```css' )
175- sections . push ( `.${ u . name } {` )
176- sections . push ( u . properties . join ( '\n' ) )
177-
178- if ( u . variants . length > 0 ) {
179- u . variants . forEach ( ( v ) => {
180- sections . push ( `\n /* ${ v . name } variant */` )
181- sections . push ( v . properties . join ( '\n' ) )
182- } )
183- }
184-
185- sections . push ( '}' )
172+ sections . push ( '```tsx' )
173+ sections . push ( `<p className={cn('${ u . name } ')}>` )
174+ sections . push ( `Hello world` )
175+ sections . push ( `</p>` )
186176 sections . push ( '```\n' )
187177 } )
188178 }
@@ -192,18 +182,10 @@ function generateDocSection(utilities) {
192182 sections . push ( '### Background Utilities\n' )
193183 backgrounds . forEach ( ( u ) => {
194184 sections . push ( `#### \`${ u . name } \`\n` )
195- sections . push ( '```css' )
196- sections . push ( `.${ u . name } {` )
197- sections . push ( u . properties . join ( '\n' ) )
198-
199- if ( u . variants . length > 0 ) {
200- u . variants . forEach ( ( v ) => {
201- sections . push ( `\n /* ${ v . name } variant */` )
202- sections . push ( v . properties . join ( '\n' ) )
203- } )
204- }
205-
206- sections . push ( '}' )
185+ sections . push ( '```tsx' )
186+ sections . push ( `<div className={cn('${ u . name } ')}>` )
187+ sections . push ( `Hello world` )
188+ sections . push ( `</div>` )
207189 sections . push ( '```\n' )
208190 } )
209191 }
@@ -213,10 +195,10 @@ function generateDocSection(utilities) {
213195 sections . push ( '### Border Utilities\n' )
214196 borders . forEach ( ( u ) => {
215197 sections . push ( `#### \`${ u . name } \`\n` )
216- sections . push ( '```css ' )
217- sections . push ( `. ${ u . name } { ` )
218- sections . push ( u . properties . join ( '\n' ) )
219- sections . push ( '}' )
198+ sections . push ( '```tsx ' )
199+ sections . push ( `<div className={cn(' ${ u . name } ')}> ` )
200+ sections . push ( `Hello world` )
201+ sections . push ( `</div>` )
220202 sections . push ( '```\n' )
221203 } )
222204 }
@@ -226,10 +208,10 @@ function generateDocSection(utilities) {
226208 sections . push ( '### Other Utilities\n' )
227209 other . forEach ( ( u ) => {
228210 sections . push ( `#### \`${ u . name } \`\n` )
229- sections . push ( '```css ' )
230- sections . push ( `. ${ u . name } { ` )
231- sections . push ( u . properties . join ( '\n' ) )
232- sections . push ( '}' )
211+ sections . push ( '```tsx ' )
212+ sections . push ( `<div className={cn(' ${ u . name } ')}> ` )
213+ sections . push ( `Hello world` )
214+ sections . push ( `</div>` )
233215 sections . push ( '```\n' )
234216 } )
235217 }
0 commit comments