create-claude-workspace 1.1.33 → 1.1.35

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.
@@ -101,7 +101,7 @@ Write clean, elegant code that is easy to test and reason about:
101
101
  - If Figma MCP is available and design exists: implement from Figma with 1:1 fidelity
102
102
  - If UX.md exists: follow its design tokens, typography, colors, breakpoints
103
103
  - If neither: use `/frontend-design` skill for high-quality UI generation
104
- - Always use @themecraft theme system (`color-var()`, `size-var()`, `typography-level-var()`) — no hardcoded color/size values
104
+ - Always use @themecraft generated SCSS variables (`colors.$token`, `sizes.$token`, `typo.level()`) — no hardcoded color/size values, no direct `color-var()`/`size-var()` calls
105
105
 
106
106
  ## Output Format
107
107
 
@@ -157,25 +157,29 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
157
157
  4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
158
158
  5. `@themecraft/angular` → `provideTheme()` for runtime switching, `provideThemeServer()` for SSR (no FOUC)
159
159
 
160
- **SCSS imports** (in component `.scss` files):
160
+ **Component SCSS** import generated variables, NEVER call `color-var()`/`size-var()` directly:
161
161
  ```scss
162
+ @use 'generated/theme/colors' as colors;
163
+ @use 'generated/theme/sizes' as sizes;
164
+ @use 'generated/theme/typography' as typo;
162
165
  @use '@themecraft/core/theming' as theming;
163
166
 
164
167
  .card {
165
- background: theming.color-var('surface');
166
- color: theming.color-var('on-surface');
167
- padding: theming.size-var('card-padding');
168
- @include theming.typography-level-var('body-primary');
168
+ background: colors.$surface;
169
+ color: colors.$on-surface;
170
+ padding: sizes.$card-padding;
171
+ @include typo.body-primary();
169
172
  @include theming.theme-transition(); // smooth theme switch
170
173
  }
171
174
  ```
172
175
 
173
- **Token accessors** (always use these, NEVER hardcode colors/sizes):
174
- - `theming.color-var($name)` → `var(--color-#{$name})`
175
- - `theming.size-var($name)` → `var(--size-#{$name})`
176
- - `theming.breakpoints-var($name)` `var(--breakpoint-#{$name})`
177
- - `@include theming.typography-level-var($level)` → all typography properties
178
- - `theming.size($small, $medium, $large)` → responsive size map (auto breakpoint media queries)
176
+ **How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
177
+
178
+ **Token source (pick one):**
179
+ - **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
180
+ - **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
181
+
182
+ Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
179
183
 
180
184
  **Theme definition** (`themes/light.scss`):
181
185
  ```scss
@@ -226,8 +230,6 @@ switchTheme(name: string) { this.#theme.load(name); }
226
230
 
227
231
  **PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations from compiled CSS.
228
232
 
229
- **Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
230
-
231
233
  ## Atomic UI Component Library
232
234
 
233
235
  Atomic design: atoms -> molecules -> organisms -> templates -> pages.
@@ -298,7 +300,7 @@ When reviewing Angular code, check:
298
300
  - Subscription cleanup (DestroyRef/takeUntilDestroyed)
299
301
  - Resource disposal (ImageBitmap.close(), stream.stop(), BroadcastChannel.close())
300
302
  - No memory leaks in effects or event listeners
301
- - Theme compliance: color-var(), size-var(), breakpoint mixins — no hardcoded colors/sizes
303
+ - Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
302
304
  - Lazy loading via loadComponent/loadChildren, no eager page imports
303
305
  - @defer for heavy below-fold components
304
306
  - Naming: PascalCase components, lib- selectors, kebab-case files
@@ -167,24 +167,29 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
167
167
  4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
168
168
  5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime theme switching, storage persistence, FOUC prevention
169
169
 
170
- **SCSS imports** (in component `.module.scss` or global styles):
170
+ **Component SCSS** (`.module.scss`) import generated variables, NEVER call `color-var()`/`size-var()` directly:
171
171
  ```scss
172
+ @use 'generated/theme/colors' as colors;
173
+ @use 'generated/theme/sizes' as sizes;
174
+ @use 'generated/theme/typography' as typo;
172
175
  @use '@themecraft/core/theming' as theming;
173
176
 
174
177
  .card {
175
- background: theming.color-var('surface');
176
- color: theming.color-var('on-surface');
177
- padding: theming.size-var('card-padding');
178
- @include theming.typography-level-var('body-primary');
178
+ background: colors.$surface;
179
+ color: colors.$on-surface;
180
+ padding: sizes.$card-padding;
181
+ @include typo.body-primary();
179
182
  @include theming.theme-transition();
180
183
  }
181
184
  ```
182
185
 
183
- **Token accessors** (always use these, NEVER hardcode colors/sizes):
184
- - `theming.color-var($name)` → `var(--color-#{$name})`
185
- - `theming.size-var($name)` → `var(--size-#{$name})`
186
- - `@include theming.typography-level-var($level)` all typography properties
187
- - `theming.size($small, $medium, $large)`responsive size map
186
+ **How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
187
+
188
+ **Token source (pick one):**
189
+ - **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
190
+ - **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
191
+
192
+ Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
188
193
 
189
194
  **Runtime setup** (in layout or `_app.tsx`):
190
195
  ```typescript
@@ -211,12 +216,10 @@ const themeManager = new ThemeManager({
211
216
 
212
217
  **PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations.
213
218
 
214
- **Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
215
-
216
219
  Component style usage:
217
220
  ```tsx
218
221
  import styles from './user-card.module.scss';
219
- // tokens available via CSS custom properties in SCSS
222
+ // generated SCSS variables compile to CSS custom properties
220
223
  ```
221
224
 
222
225
  ## Atomic UI Component Library
@@ -290,7 +293,7 @@ When reviewing React code, check:
290
293
  - SSR safety: no direct `window`/`document`/`navigator` access in Server Components, correct `'use client'` boundaries
291
294
  - Server/client separation: Flag WARN if a module mixes server and browser logic without clear boundaries
292
295
  - No memory leaks in effects, event listeners, or subscriptions
293
- - Theme compliance: CSS custom properties for colors/sizes/spacing no hardcoded values
296
+ - Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
294
297
  - Code splitting: `React.lazy` + `Suspense` for heavy routes/components, no eager imports of page-level components
295
298
  - Dynamic imports for heavy third-party libraries
296
299
  - Naming: PascalCase components, camelCase hooks, kebab-case files
@@ -168,26 +168,31 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
168
168
  4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
169
169
  5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime switching, storage, FOUC prevention
170
170
 
171
- **SCSS in scoped styles** (`<style lang="scss">`):
171
+ **Component SCSS** import generated variables, NEVER call `color-var()`/`size-var()` directly:
172
172
  ```svelte
173
173
  <style lang="scss">
174
+ @use 'generated/theme/colors' as colors;
175
+ @use 'generated/theme/sizes' as sizes;
176
+ @use 'generated/theme/typography' as typo;
174
177
  @use '@themecraft/core/theming' as theming;
175
178
 
176
179
  .card {
177
- background: theming.color-var('surface');
178
- color: theming.color-var('on-surface');
179
- padding: theming.size-var('card-padding');
180
- @include theming.typography-level-var('body-primary');
180
+ background: colors.$surface;
181
+ color: colors.$on-surface;
182
+ padding: sizes.$card-padding;
183
+ @include typo.body-primary();
181
184
  @include theming.theme-transition();
182
185
  }
183
186
  </style>
184
187
  ```
185
188
 
186
- **Token accessors** (always use these, NEVER hardcode colors/sizes):
187
- - `theming.color-var($name)` → `var(--color-#{$name})`
188
- - `theming.size-var($name)` → `var(--size-#{$name})`
189
- - `@include theming.typography-level-var($level)` all typography properties
190
- - `theming.size($small, $medium, $large)`responsive size map
189
+ **How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
190
+
191
+ **Token source (pick one):**
192
+ - **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
193
+ - **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
194
+
195
+ Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
191
196
 
192
197
  **Runtime setup** (in `+layout.svelte` or `hooks.server.ts`):
193
198
  ```typescript
@@ -211,8 +216,6 @@ Component-scoped styles are the default and preferred approach.
211
216
 
212
217
  **PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations.
213
218
 
214
- **Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
215
-
216
219
  ## Atomic UI Component Library
217
220
 
218
221
  Atomic design: atoms -> molecules -> organisms -> templates -> pages.
@@ -294,7 +297,7 @@ When reviewing Svelte code, check:
294
297
  - Server/client separation: secrets and DB in `+page.server.ts`, not `+page.ts`
295
298
  - `$lib/` imports — no deep relative paths (`../../../`)
296
299
  - `$lib/server/` for server-only modules — enforced by SvelteKit
297
- - Theme compliance: CSS custom properties (`var(--*)`) — no hardcoded colors/sizes
300
+ - Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
298
301
  - Lazy loading: routes auto-split, dynamic `import()` for heavy non-route components
299
302
  - Accessibility: all Svelte compiler a11y warnings resolved (not suppressed)
300
303
  - No `{@html}` without sanitization
@@ -193,26 +193,31 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
193
193
  4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
194
194
  5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime switching, storage, FOUC prevention
195
195
 
196
- **SCSS in scoped styles** (`<style scoped lang="scss">`):
196
+ **Component SCSS** import generated variables, NEVER call `color-var()`/`size-var()` directly:
197
197
  ```vue
198
198
  <style scoped lang="scss">
199
+ @use 'generated/theme/colors' as colors;
200
+ @use 'generated/theme/sizes' as sizes;
201
+ @use 'generated/theme/typography' as typo;
199
202
  @use '@themecraft/core/theming' as theming;
200
203
 
201
204
  .card {
202
- background: theming.color-var('surface');
203
- color: theming.color-var('on-surface');
204
- padding: theming.size-var('card-padding');
205
- @include theming.typography-level-var('body-primary');
205
+ background: colors.$surface;
206
+ color: colors.$on-surface;
207
+ padding: sizes.$card-padding;
208
+ @include typo.body-primary();
206
209
  @include theming.theme-transition();
207
210
  }
208
211
  </style>
209
212
  ```
210
213
 
211
- **Token accessors** (always use these, NEVER hardcode colors/sizes):
212
- - `theming.color-var($name)` → `var(--color-#{$name})`
213
- - `theming.size-var($name)` → `var(--size-#{$name})`
214
- - `@include theming.typography-level-var($level)` all typography properties
215
- - `theming.size($small, $medium, $large)`responsive size map
214
+ **How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
215
+
216
+ **Token source (pick one):**
217
+ - **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
218
+ - **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
219
+
220
+ Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
216
221
 
217
222
  **Runtime setup** (in `App.vue` or plugin):
218
223
  ```typescript
@@ -238,8 +243,6 @@ const themeManager = new ThemeManager({
238
243
 
239
244
  **PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations.
240
245
 
241
- **Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
242
-
243
246
  ## Atomic UI Component Library
244
247
 
245
248
  Atomic design: atoms -> molecules -> organisms -> templates -> pages.
@@ -320,7 +323,7 @@ When reviewing Vue code, check:
320
323
  - SSR safety: no direct `window`/`document`/`navigator` access outside `onMounted` or client guards
321
324
  - SSR/Client separation: Flag WARN if a composable mixes server and browser logic
322
325
  - `<style scoped>` on all components — no unscoped styles leaking globally
323
- - Theme compliance: CSS custom properties (`var(--token)`) — no hardcoded colors/sizes
326
+ - Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
324
327
  - Lazy loading: `defineAsyncComponent` for heavy components, dynamic imports for routes
325
328
  - No `v-html` without sanitization (XSS risk)
326
329
  - Props defined with TypeScript types via `defineProps<{ ... }>()` — not runtime-only validation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {