create-claude-workspace 1.1.89 → 1.1.91
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/dist/template/.claude/agents/ui-engineer.md +1 -1
- package/dist/template/.claude/profiles/angular.md +34 -17
- package/dist/template/.claude/profiles/react.md +12 -12
- package/dist/template/.claude/profiles/svelte.md +12 -12
- package/dist/template/.claude/profiles/vue.md +10 -10
- package/package.json +1 -1
|
@@ -94,7 +94,7 @@ Write clean, elegant code that is easy to test and reason about:
|
|
|
94
94
|
- If Figma MCP is available and design exists: implement from Figma with 1:1 fidelity
|
|
95
95
|
- If UX.md exists: follow its design tokens, typography, colors, breakpoints
|
|
96
96
|
- If neither: use `/frontend-design` skill for high-quality UI generation
|
|
97
|
-
- Always use @themecraft generated SCSS variables (`colors.$token`, `sizes.$token`,
|
|
97
|
+
- Always use @themecraft generated SCSS variables (`colors.$token`, `sizes.$token`, `@include typography.level-name`) — no hardcoded color/size values, no direct `color-var()`/`size-var()` calls
|
|
98
98
|
|
|
99
99
|
## Output Format
|
|
100
100
|
|
|
@@ -317,14 +317,12 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
317
317
|
@use 'theme/colors';
|
|
318
318
|
@use 'theme/sizes';
|
|
319
319
|
@use 'theme/typography';
|
|
320
|
-
@use '@themecraft/core/theming';
|
|
321
320
|
|
|
322
321
|
.card {
|
|
323
322
|
background: colors.$surface;
|
|
324
323
|
color: colors.$on-surface;
|
|
325
324
|
padding: sizes.$card-padding;
|
|
326
|
-
@include typography.body-primary
|
|
327
|
-
@include theming.theme-transition(); // smooth theme switch
|
|
325
|
+
@include typography.body-primary;
|
|
328
326
|
}
|
|
329
327
|
```
|
|
330
328
|
|
|
@@ -354,26 +352,45 @@ Then run `<PM> install` to create the link. SCSS `@use 'theme/colors'` (or `@use
|
|
|
354
352
|
**How it works:** `npx themecraft generate` runs inside the theme library (`libs/shared/ui/theme/`) and produces typed SCSS files (`src/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Because the library is linked as a package, `@use 'theme/colors'` resolves to these generated files. Components consume the generated variables — never the raw accessor functions, never `generated/` paths.
|
|
355
353
|
|
|
356
354
|
**Token source (pick one):**
|
|
357
|
-
- **With Figma:** `npx themecraft figma-
|
|
355
|
+
- **With Figma:** `npx themecraft sync --figma-file-key YOUR_FILE_KEY --token YOUR_ACCESS_TOKEN` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
358
356
|
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
359
357
|
|
|
360
358
|
Either way, the result is the same: typed SCSS files inside the theme library, importable via `@use 'theme/colors'`.
|
|
361
359
|
|
|
362
|
-
**Theme
|
|
360
|
+
**Theme values** (`themes/light-values.scss`) — define a `$theme` variable with token values:
|
|
363
361
|
```scss
|
|
364
362
|
@use '@themecraft/core/theming' as theming;
|
|
365
|
-
@use '
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
363
|
+
@use 'theme/variables/colors';
|
|
364
|
+
@use 'theme/variables/sizes';
|
|
365
|
+
@use 'theme/variables/typography';
|
|
366
|
+
@use 'theme/variables/breakpoints';
|
|
367
|
+
|
|
368
|
+
$theme: theming.define-light-theme((
|
|
369
|
+
color: theming.define-color-scheme((
|
|
370
|
+
colors.$background-body: #ffffff,
|
|
371
|
+
colors.$content-primary: #1a1a1a,
|
|
372
|
+
colors.$interactive-primary: #0066cc,
|
|
373
|
+
)),
|
|
374
|
+
size: (
|
|
375
|
+
sizes.$padding-m: theming.size(12px, 16px, 24px),
|
|
376
|
+
sizes.$corner-m: 4px,
|
|
377
|
+
),
|
|
378
|
+
typography: (
|
|
379
|
+
typography.$body-primary: theming.define-typography-level(16px, 1.5, 400, 'Inter, sans-serif'),
|
|
380
|
+
),
|
|
381
|
+
breakpoint: (
|
|
382
|
+
breakpoints.$medium: 768px,
|
|
383
|
+
breakpoints.$large: 1200px,
|
|
384
|
+
),
|
|
385
|
+
));
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Theme entry point** (`themes/light.scss`) — passes values to the engine, compiles to CSS:
|
|
389
|
+
```scss
|
|
390
|
+
@use './light-values' as light;
|
|
391
|
+
@use '@themecraft/core/themes' with ($themes: (light: light.$theme));
|
|
392
|
+
|
|
393
|
+
@include themes.variables(':root');
|
|
377
394
|
```
|
|
378
395
|
|
|
379
396
|
**Angular app config** (`app.config.ts`):
|
|
@@ -199,7 +199,7 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
199
199
|
2. `npx themecraft generate` — produces type-safe SCSS variables with IDE autocomplete
|
|
200
200
|
3. Theme files (`themes/light.scss`, `dark.scss`) — use `define-light-theme()` / `define-dark-theme()`
|
|
201
201
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
202
|
-
5. `ThemeManager` (from `@themecraft/core
|
|
202
|
+
5. `ThemeManager` (from `@themecraft/core`) — runtime theme switching, storage persistence, FOUC prevention
|
|
203
203
|
|
|
204
204
|
**Component SCSS** (`.module.scss`) — import via workspace package name, NEVER use relative paths or `generated/` paths, NEVER call `color-var()`/`size-var()` directly:
|
|
205
205
|
```scss
|
|
@@ -207,14 +207,12 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
207
207
|
@use 'theme/colors';
|
|
208
208
|
@use 'theme/sizes';
|
|
209
209
|
@use 'theme/typography';
|
|
210
|
-
@use '@themecraft/core/theming';
|
|
211
210
|
|
|
212
211
|
.card {
|
|
213
212
|
background: colors.$surface;
|
|
214
213
|
color: colors.$on-surface;
|
|
215
214
|
padding: sizes.$card-padding;
|
|
216
|
-
@include typography.body-primary
|
|
217
|
-
@include theming.theme-transition();
|
|
215
|
+
@include typography.body-primary;
|
|
218
216
|
}
|
|
219
217
|
```
|
|
220
218
|
|
|
@@ -244,27 +242,29 @@ Then run `<PM> install` to create the link. SCSS `@use 'theme/colors'` (or `@use
|
|
|
244
242
|
**How it works:** `npx themecraft generate` runs inside the theme library and produces typed SCSS files (`src/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Because the library is linked as a package, `@use 'theme/colors'` resolves to these generated files. Components consume the generated variables — never the raw accessor functions, never `generated/` paths.
|
|
245
243
|
|
|
246
244
|
**Token source (pick one):**
|
|
247
|
-
- **With Figma:** `npx themecraft figma-
|
|
245
|
+
- **With Figma:** `npx themecraft sync --figma-file-key YOUR_FILE_KEY --token YOUR_ACCESS_TOKEN` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
248
246
|
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
249
247
|
|
|
250
248
|
Either way, the result is the same: typed SCSS files inside the theme library, importable via `@use 'theme/colors'`.
|
|
251
249
|
|
|
252
250
|
**Runtime setup** (in layout or `_app.tsx`):
|
|
253
251
|
```typescript
|
|
254
|
-
import { ThemeManager } from '@themecraft/core
|
|
252
|
+
import { ThemeManager, defineConfig } from '@themecraft/core';
|
|
255
253
|
|
|
256
|
-
const
|
|
257
|
-
themes: ['light', 'dark'],
|
|
254
|
+
const config = defineConfig({
|
|
258
255
|
defaultTheme: 'light',
|
|
259
|
-
|
|
256
|
+
themes: ['light', 'dark'],
|
|
260
257
|
storage: 'localStorage',
|
|
258
|
+
basePath: '/themes/',
|
|
261
259
|
preferSystemTheme: { light: 'light', dark: 'dark' },
|
|
262
260
|
transition: { duration: '200ms' },
|
|
263
|
-
}
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
const themeManager = new ThemeManager(config, document);
|
|
264
264
|
|
|
265
265
|
// SSR FOUC prevention — add inline script to <head>:
|
|
266
|
-
// themeManager.
|
|
267
|
-
// SSR link tag:
|
|
266
|
+
// themeManager.addInlineScript()
|
|
267
|
+
// SSR link tag: themeManager.getSSRLinkTag()
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
**Styling approach** (pick one per project, set in CLAUDE.md):
|
|
@@ -197,7 +197,7 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
197
197
|
2. `npx themecraft generate` — produces type-safe SCSS variables with IDE autocomplete
|
|
198
198
|
3. Theme files (`themes/light.scss`, `dark.scss`) — use `define-light-theme()` / `define-dark-theme()`
|
|
199
199
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
200
|
-
5. `ThemeManager` (from `@themecraft/core
|
|
200
|
+
5. `ThemeManager` (from `@themecraft/core`) — runtime switching, storage, FOUC prevention
|
|
201
201
|
|
|
202
202
|
**Component SCSS** — import via workspace package name, NEVER use relative paths or `generated/` paths, NEVER call `color-var()`/`size-var()` directly:
|
|
203
203
|
```svelte
|
|
@@ -206,14 +206,12 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
206
206
|
@use 'theme/colors';
|
|
207
207
|
@use 'theme/sizes';
|
|
208
208
|
@use 'theme/typography';
|
|
209
|
-
@use '@themecraft/core/theming';
|
|
210
209
|
|
|
211
210
|
.card {
|
|
212
211
|
background: colors.$surface;
|
|
213
212
|
color: colors.$on-surface;
|
|
214
213
|
padding: sizes.$card-padding;
|
|
215
|
-
@include typography.body-primary
|
|
216
|
-
@include theming.theme-transition();
|
|
214
|
+
@include typography.body-primary;
|
|
217
215
|
}
|
|
218
216
|
</style>
|
|
219
217
|
```
|
|
@@ -244,26 +242,28 @@ Then run `<PM> install` to create the link. SCSS `@use 'theme/colors'` (or `@use
|
|
|
244
242
|
**How it works:** `npx themecraft generate` runs inside the theme library and produces typed SCSS files (`src/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Because the library is linked as a package, `@use 'theme/colors'` resolves to these generated files. Components consume the generated variables — never the raw accessor functions, never `generated/` paths.
|
|
245
243
|
|
|
246
244
|
**Token source (pick one):**
|
|
247
|
-
- **With Figma:** `npx themecraft figma-
|
|
245
|
+
- **With Figma:** `npx themecraft sync --figma-file-key YOUR_FILE_KEY --token YOUR_ACCESS_TOKEN` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
248
246
|
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
249
247
|
|
|
250
248
|
Either way, the result is the same: typed SCSS files inside the theme library, importable via `@use 'theme/colors'`.
|
|
251
249
|
|
|
252
250
|
**Runtime setup** (in `+layout.svelte` or `hooks.server.ts`):
|
|
253
251
|
```typescript
|
|
254
|
-
import { ThemeManager } from '@themecraft/core
|
|
252
|
+
import { ThemeManager, defineConfig } from '@themecraft/core';
|
|
255
253
|
|
|
256
|
-
const
|
|
257
|
-
themes: ['light', 'dark'],
|
|
254
|
+
const config = defineConfig({
|
|
258
255
|
defaultTheme: 'light',
|
|
259
|
-
|
|
256
|
+
themes: ['light', 'dark'],
|
|
260
257
|
storage: 'localStorage',
|
|
258
|
+
basePath: '/themes/',
|
|
261
259
|
preferSystemTheme: { light: 'light', dark: 'dark' },
|
|
262
260
|
transition: { duration: '200ms' },
|
|
263
|
-
}
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
const themeManager = new ThemeManager(config, document);
|
|
264
264
|
|
|
265
|
-
// SSR:
|
|
266
|
-
// FOUC prevention:
|
|
265
|
+
// SSR link tag: themeManager.getSSRLinkTag()
|
|
266
|
+
// FOUC prevention: themeManager.addInlineScript()
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
Global styles via `:global()` selector or `app.scss` — use sparingly.
|
|
@@ -225,7 +225,7 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
225
225
|
2. `npx themecraft generate` — produces type-safe SCSS variables with IDE autocomplete
|
|
226
226
|
3. Theme files (`themes/light.scss`, `dark.scss`) — use `define-light-theme()` / `define-dark-theme()`
|
|
227
227
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
228
|
-
5. `ThemeManager` (from `@themecraft/core
|
|
228
|
+
5. `ThemeManager` (from `@themecraft/core`) — runtime switching, storage, FOUC prevention
|
|
229
229
|
|
|
230
230
|
**Component SCSS** — import via workspace package name, NEVER use relative paths or `generated/` paths, NEVER call `color-var()`/`size-var()` directly:
|
|
231
231
|
```vue
|
|
@@ -234,14 +234,12 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
234
234
|
@use 'theme/colors';
|
|
235
235
|
@use 'theme/sizes';
|
|
236
236
|
@use 'theme/typography';
|
|
237
|
-
@use '@themecraft/core/theming';
|
|
238
237
|
|
|
239
238
|
.card {
|
|
240
239
|
background: colors.$surface;
|
|
241
240
|
color: colors.$on-surface;
|
|
242
241
|
padding: sizes.$card-padding;
|
|
243
|
-
@include typography.body-primary
|
|
244
|
-
@include theming.theme-transition();
|
|
242
|
+
@include typography.body-primary;
|
|
245
243
|
}
|
|
246
244
|
</style>
|
|
247
245
|
```
|
|
@@ -272,23 +270,25 @@ Then run `<PM> install` to create the link. SCSS `@use 'theme/colors'` (or `@use
|
|
|
272
270
|
**How it works:** `npx themecraft generate` runs inside the theme library and produces typed SCSS files (`src/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Because the library is linked as a package, `@use 'theme/colors'` resolves to these generated files. Components consume the generated variables — never the raw accessor functions, never `generated/` paths.
|
|
273
271
|
|
|
274
272
|
**Token source (pick one):**
|
|
275
|
-
- **With Figma:** `npx themecraft figma-
|
|
273
|
+
- **With Figma:** `npx themecraft sync --figma-file-key YOUR_FILE_KEY --token YOUR_ACCESS_TOKEN` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
276
274
|
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
277
275
|
|
|
278
276
|
Either way, the result is the same: typed SCSS files inside the theme library, importable via `@use 'theme/colors'`.
|
|
279
277
|
|
|
280
278
|
**Runtime setup** (in `App.vue` or plugin):
|
|
281
279
|
```typescript
|
|
282
|
-
import { ThemeManager } from '@themecraft/core
|
|
280
|
+
import { ThemeManager, defineConfig } from '@themecraft/core';
|
|
283
281
|
|
|
284
|
-
const
|
|
285
|
-
themes: ['light', 'dark'],
|
|
282
|
+
const config = defineConfig({
|
|
286
283
|
defaultTheme: 'light',
|
|
287
|
-
|
|
284
|
+
themes: ['light', 'dark'],
|
|
288
285
|
storage: 'localStorage',
|
|
286
|
+
basePath: '/themes/',
|
|
289
287
|
preferSystemTheme: { light: 'light', dark: 'dark' },
|
|
290
288
|
transition: { duration: '200ms' },
|
|
291
|
-
}
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
const themeManager = new ThemeManager(config, document);
|
|
292
292
|
```
|
|
293
293
|
|
|
294
294
|
**Scoped styles with `<style scoped>`:**
|