cursor-kit-cli 1.2.0-beta → 1.2.0-beta.2

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 (91) hide show
  1. package/dist/cli.cjs +333 -56
  2. package/dist/cli.cjs.map +1 -1
  3. package/dist/cli.js +334 -57
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.cjs +39 -1
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +9 -1
  8. package/dist/index.d.ts +9 -1
  9. package/dist/index.js +33 -2
  10. package/dist/index.js.map +1 -1
  11. package/package.json +1 -1
  12. package/templates/commands/docs.md +5 -3
  13. package/templates/commands/explain.md +5 -3
  14. package/templates/commands/fix.md +5 -3
  15. package/templates/commands/implement.md +5 -3
  16. package/templates/commands/refactor.md +5 -3
  17. package/templates/commands/review.md +5 -3
  18. package/templates/commands/test.md +5 -3
  19. package/templates/manifest.json +11 -8
  20. package/templates/rules/git.mdc +0 -2
  21. package/templates/rules/toc.mdc +17 -9
  22. package/templates/skills/aesthetic/SKILL.md +121 -0
  23. package/templates/skills/aesthetic/assets/design-guideline-template.md +163 -0
  24. package/templates/skills/aesthetic/assets/design-story-template.md +135 -0
  25. package/templates/skills/aesthetic/references/design-principles.md +62 -0
  26. package/templates/skills/aesthetic/references/design-resources.md +75 -0
  27. package/templates/skills/aesthetic/references/micro-interactions.md +53 -0
  28. package/templates/skills/aesthetic/references/storytelling-design.md +50 -0
  29. package/templates/skills/backend-development/SKILL.mdc +95 -0
  30. package/templates/skills/backend-development/references/backend-api-design.md +495 -0
  31. package/templates/skills/backend-development/references/backend-architecture.md +454 -0
  32. package/templates/skills/backend-development/references/backend-authentication.md +338 -0
  33. package/templates/skills/backend-development/references/backend-code-quality.md +659 -0
  34. package/templates/skills/backend-development/references/backend-debugging.md +904 -0
  35. package/templates/skills/backend-development/references/backend-devops.md +494 -0
  36. package/templates/skills/backend-development/references/backend-mindset.md +387 -0
  37. package/templates/skills/backend-development/references/backend-performance.md +397 -0
  38. package/templates/skills/backend-development/references/backend-security.md +290 -0
  39. package/templates/skills/backend-development/references/backend-technologies.md +256 -0
  40. package/templates/skills/backend-development/references/backend-testing.md +429 -0
  41. package/templates/skills/frontend-design/SKILL.mdc +41 -0
  42. package/templates/skills/frontend-design/references/animejs.md +396 -0
  43. package/templates/skills/frontend-development/SKILL.mdc +399 -0
  44. package/templates/skills/frontend-development/resources/common-patterns.md +331 -0
  45. package/templates/skills/frontend-development/resources/complete-examples.md +872 -0
  46. package/templates/skills/frontend-development/resources/component-patterns.md +502 -0
  47. package/templates/skills/frontend-development/resources/data-fetching.md +767 -0
  48. package/templates/skills/frontend-development/resources/file-organization.md +502 -0
  49. package/templates/skills/frontend-development/resources/loading-and-error-states.md +501 -0
  50. package/templates/skills/frontend-development/resources/performance.md +406 -0
  51. package/templates/skills/frontend-development/resources/routing-guide.md +364 -0
  52. package/templates/skills/frontend-development/resources/styling-guide.md +428 -0
  53. package/templates/skills/frontend-development/resources/typescript-standards.md +418 -0
  54. package/templates/skills/problem-solving/SKILL.mdc +96 -0
  55. package/templates/skills/problem-solving/references/attribution.md +69 -0
  56. package/templates/skills/problem-solving/references/collision-zone-thinking.md +79 -0
  57. package/templates/skills/problem-solving/references/inversion-exercise.md +91 -0
  58. package/templates/skills/problem-solving/references/meta-pattern-recognition.md +87 -0
  59. package/templates/skills/problem-solving/references/scale-game.md +95 -0
  60. package/templates/skills/problem-solving/references/simplification-cascades.md +80 -0
  61. package/templates/skills/problem-solving/references/when-stuck.md +72 -0
  62. package/templates/skills/research/SKILL.mdc +168 -0
  63. package/templates/skills/sequential-thinking/.env.example +8 -0
  64. package/templates/skills/sequential-thinking/README.md +183 -0
  65. package/templates/skills/sequential-thinking/SKILL.mdc +94 -0
  66. package/templates/skills/sequential-thinking/package.json +31 -0
  67. package/templates/skills/sequential-thinking/references/advanced-strategies.md +79 -0
  68. package/templates/skills/sequential-thinking/references/advanced-techniques.md +76 -0
  69. package/templates/skills/sequential-thinking/references/core-patterns.md +95 -0
  70. package/templates/skills/sequential-thinking/references/examples-api.md +88 -0
  71. package/templates/skills/sequential-thinking/references/examples-architecture.md +94 -0
  72. package/templates/skills/sequential-thinking/references/examples-debug.md +90 -0
  73. package/templates/skills/sequential-thinking/scripts/format-thought.js +159 -0
  74. package/templates/skills/sequential-thinking/scripts/process-thought.js +236 -0
  75. package/templates/skills/sequential-thinking/tests/format-thought.test.js +133 -0
  76. package/templates/skills/sequential-thinking/tests/process-thought.test.js +215 -0
  77. package/templates/skills/ui-styling/LICENSE.txt +202 -0
  78. package/templates/skills/ui-styling/SKILL.mdc +321 -0
  79. package/templates/skills/ui-styling/references/canvas-design-system.md +320 -0
  80. package/templates/skills/ui-styling/references/shadcn-accessibility.md +471 -0
  81. package/templates/skills/ui-styling/references/shadcn-components.md +424 -0
  82. package/templates/skills/ui-styling/references/shadcn-theming.md +373 -0
  83. package/templates/skills/ui-styling/references/tailwind-customization.md +483 -0
  84. package/templates/skills/ui-styling/references/tailwind-responsive.md +382 -0
  85. package/templates/skills/ui-styling/references/tailwind-utilities.md +455 -0
  86. package/templates/rules/frontend-design.mdc +0 -48
  87. package/templates/rules/performance.mdc +0 -54
  88. package/templates/rules/react.mdc +0 -58
  89. package/templates/rules/security.mdc +0 -50
  90. package/templates/rules/testing.mdc +0 -54
  91. package/templates/rules/typescript.mdc +0 -36
@@ -0,0 +1,428 @@
1
+ # Styling Guide
2
+
3
+ Modern styling patterns for using MUI v7 sx prop, inline styles, and theme integration.
4
+
5
+ ---
6
+
7
+ ## Inline vs Separate Styles
8
+
9
+ ### Decision Threshold
10
+
11
+ **<100 lines: Inline styles at top of component**
12
+
13
+ ```typescript
14
+ import type { SxProps, Theme } from '@mui/material';
15
+
16
+ const componentStyles: Record<string, SxProps<Theme>> = {
17
+ container: {
18
+ p: 2,
19
+ display: 'flex',
20
+ flexDirection: 'column',
21
+ },
22
+ header: {
23
+ mb: 2,
24
+ borderBottom: '1px solid',
25
+ borderColor: 'divider',
26
+ },
27
+ // ... more styles
28
+ };
29
+
30
+ export const MyComponent: React.FC = () => {
31
+ return (
32
+ <Box sx={componentStyles.container}>
33
+ <Box sx={componentStyles.header}>
34
+ <h2>Title</h2>
35
+ </Box>
36
+ </Box>
37
+ );
38
+ };
39
+ ```
40
+
41
+ **>100 lines: Separate `.styles.ts` file**
42
+
43
+ ```typescript
44
+ // MyComponent.styles.ts
45
+ import type { SxProps, Theme } from '@mui/material';
46
+
47
+ export const componentStyles: Record<string, SxProps<Theme>> = {
48
+ container: { ... },
49
+ header: { ... },
50
+ // ... 100+ lines of styles
51
+ };
52
+
53
+ // MyComponent.tsx
54
+ import { componentStyles } from './MyComponent.styles';
55
+
56
+ export const MyComponent: React.FC = () => {
57
+ return <Box sx={componentStyles.container}>...</Box>;
58
+ };
59
+ ```
60
+
61
+ ### Real Example: UnifiedForm.tsx
62
+
63
+ **Lines 48-126**: 78 lines of inline styles (acceptable)
64
+
65
+ ```typescript
66
+ const formStyles: Record<string, SxProps<Theme>> = {
67
+ gridContainer: {
68
+ height: '100%',
69
+ maxHeight: 'calc(100vh - 220px)',
70
+ },
71
+ section: {
72
+ height: '100%',
73
+ maxHeight: 'calc(100vh - 220px)',
74
+ overflow: 'auto',
75
+ p: 4,
76
+ },
77
+ // ... 15 more style objects
78
+ };
79
+ ```
80
+
81
+ **Guideline**: User is comfortable with ~80 lines inline. Use your judgment around 100 lines.
82
+
83
+ ---
84
+
85
+ ## sx Prop Patterns
86
+
87
+ ### Basic Usage
88
+
89
+ ```typescript
90
+ <Box sx={{ p: 2, mb: 3, display: 'flex' }}>
91
+ Content
92
+ </Box>
93
+ ```
94
+
95
+ ### With Theme Access
96
+
97
+ ```typescript
98
+ <Box
99
+ sx={{
100
+ p: 2,
101
+ backgroundColor: (theme) => theme.palette.primary.main,
102
+ color: (theme) => theme.palette.primary.contrastText,
103
+ borderRadius: (theme) => theme.shape.borderRadius,
104
+ }}
105
+ >
106
+ Themed Box
107
+ </Box>
108
+ ```
109
+
110
+ ### Responsive Styles
111
+
112
+ ```typescript
113
+ <Box
114
+ sx={{
115
+ p: { xs: 1, sm: 2, md: 3 },
116
+ width: { xs: '100%', md: '50%' },
117
+ flexDirection: { xs: 'column', md: 'row' },
118
+ }}
119
+ >
120
+ Responsive Layout
121
+ </Box>
122
+ ```
123
+
124
+ ### Pseudo-Selectors
125
+
126
+ ```typescript
127
+ <Box
128
+ sx={{
129
+ p: 2,
130
+ '&:hover': {
131
+ backgroundColor: 'rgba(0,0,0,0.05)',
132
+ },
133
+ '&:active': {
134
+ backgroundColor: 'rgba(0,0,0,0.1)',
135
+ },
136
+ '& .child-class': {
137
+ color: 'primary.main',
138
+ },
139
+ }}
140
+ >
141
+ Interactive Box
142
+ </Box>
143
+ ```
144
+
145
+ ---
146
+
147
+ ## MUI v7 Patterns
148
+
149
+ ### Grid Component (v7 Syntax)
150
+
151
+ ```typescript
152
+ import { Grid } from '@mui/material';
153
+
154
+ // ✅ CORRECT - v7 syntax with size prop
155
+ <Grid container spacing={2}>
156
+ <Grid size={{ xs: 12, md: 6 }}>
157
+ Left Column
158
+ </Grid>
159
+ <Grid size={{ xs: 12, md: 6 }}>
160
+ Right Column
161
+ </Grid>
162
+ </Grid>
163
+
164
+ // ❌ WRONG - Old v6 syntax
165
+ <Grid container spacing={2}>
166
+ <Grid xs={12} md={6}> {/* OLD - Don't use */}
167
+ Content
168
+ </Grid>
169
+ </Grid>
170
+ ```
171
+
172
+ **Key Change**: `size={{ xs: 12, md: 6 }}` instead of `xs={12} md={6}`
173
+
174
+ ### Responsive Grid
175
+
176
+ ```typescript
177
+ <Grid container spacing={3}>
178
+ <Grid size={{ xs: 12, sm: 6, md: 4, lg: 3 }}>
179
+ Responsive Column
180
+ </Grid>
181
+ </Grid>
182
+ ```
183
+
184
+ ### Nested Grids
185
+
186
+ ```typescript
187
+ <Grid container spacing={2}>
188
+ <Grid size={{ xs: 12, md: 8 }}>
189
+ <Grid container spacing={1}>
190
+ <Grid size={{ xs: 12, sm: 6 }}>
191
+ Nested 1
192
+ </Grid>
193
+ <Grid size={{ xs: 12, sm: 6 }}>
194
+ Nested 2
195
+ </Grid>
196
+ </Grid>
197
+ </Grid>
198
+
199
+ <Grid size={{ xs: 12, md: 4 }}>
200
+ Sidebar
201
+ </Grid>
202
+ </Grid>
203
+ ```
204
+
205
+ ---
206
+
207
+ ## Type-Safe Styles
208
+
209
+ ### Style Object Type
210
+
211
+ ```typescript
212
+ import type { SxProps, Theme } from '@mui/material';
213
+
214
+ // Type-safe styles
215
+ const styles: Record<string, SxProps<Theme>> = {
216
+ container: {
217
+ p: 2,
218
+ // Autocomplete and type checking work here
219
+ },
220
+ };
221
+
222
+ // Or individual style
223
+ const containerStyle: SxProps<Theme> = {
224
+ p: 2,
225
+ display: 'flex',
226
+ };
227
+ ```
228
+
229
+ ### Theme-Aware Styles
230
+
231
+ ```typescript
232
+ const styles: Record<string, SxProps<Theme>> = {
233
+ primary: {
234
+ color: (theme) => theme.palette.primary.main,
235
+ backgroundColor: (theme) => theme.palette.primary.light,
236
+ '&:hover': {
237
+ backgroundColor: (theme) => theme.palette.primary.dark,
238
+ },
239
+ },
240
+ customSpacing: {
241
+ padding: (theme) => theme.spacing(2),
242
+ margin: (theme) => theme.spacing(1, 2), // top/bottom: 1, left/right: 2
243
+ },
244
+ };
245
+ ```
246
+
247
+ ---
248
+
249
+ ## What NOT to Use
250
+
251
+ ### ❌ makeStyles (MUI v4 pattern)
252
+
253
+ ```typescript
254
+ // ❌ AVOID - Old Material-UI v4 pattern
255
+ import { makeStyles } from '@mui/styles';
256
+
257
+ const useStyles = makeStyles((theme) => ({
258
+ root: {
259
+ padding: theme.spacing(2),
260
+ },
261
+ }));
262
+ ```
263
+
264
+ **Why avoid**: Deprecated, v7 doesn't support it well
265
+
266
+ ### ❌ styled() Components
267
+
268
+ ```typescript
269
+ // ❌ AVOID - styled-components pattern
270
+ import { styled } from '@mui/material/styles';
271
+
272
+ const StyledBox = styled(Box)(({ theme }) => ({
273
+ padding: theme.spacing(2),
274
+ }));
275
+ ```
276
+
277
+ **Why avoid**: sx prop is more flexible and doesn't create new components
278
+
279
+ ### ✅ Use sx Prop Instead
280
+
281
+ ```typescript
282
+ // ✅ PREFERRED
283
+ <Box
284
+ sx={{
285
+ p: 2,
286
+ backgroundColor: 'primary.main',
287
+ }}
288
+ >
289
+ Content
290
+ </Box>
291
+ ```
292
+
293
+ ---
294
+
295
+ ## Code Style Standards
296
+
297
+ ### Indentation
298
+
299
+ **4 spaces** (not 2, not tabs)
300
+
301
+ ```typescript
302
+ const styles: Record<string, SxProps<Theme>> = {
303
+ container: {
304
+ p: 2,
305
+ display: 'flex',
306
+ flexDirection: 'column',
307
+ },
308
+ };
309
+ ```
310
+
311
+ ### Quotes
312
+
313
+ **Single quotes** for strings (project standard)
314
+
315
+ ```typescript
316
+ // ✅ CORRECT
317
+ const color = 'primary.main';
318
+ import { Box } from '@mui/material';
319
+
320
+ // ❌ WRONG
321
+ const color = "primary.main";
322
+ import { Box } from "@mui/material";
323
+ ```
324
+
325
+ ### Trailing Commas
326
+
327
+ **Always use trailing commas** in objects and arrays
328
+
329
+ ```typescript
330
+ // ✅ CORRECT
331
+ const styles = {
332
+ container: { p: 2 },
333
+ header: { mb: 1 }, // Trailing comma
334
+ };
335
+
336
+ const items = [
337
+ 'item1',
338
+ 'item2', // Trailing comma
339
+ ];
340
+
341
+ // ❌ WRONG - No trailing comma
342
+ const styles = {
343
+ container: { p: 2 },
344
+ header: { mb: 1 } // Missing comma
345
+ };
346
+ ```
347
+
348
+ ---
349
+
350
+ ## Common Style Patterns
351
+
352
+ ### Flexbox Layout
353
+
354
+ ```typescript
355
+ const styles = {
356
+ flexRow: {
357
+ display: 'flex',
358
+ flexDirection: 'row',
359
+ alignItems: 'center',
360
+ gap: 2,
361
+ },
362
+ flexColumn: {
363
+ display: 'flex',
364
+ flexDirection: 'column',
365
+ gap: 1,
366
+ },
367
+ spaceBetween: {
368
+ display: 'flex',
369
+ justifyContent: 'space-between',
370
+ alignItems: 'center',
371
+ },
372
+ };
373
+ ```
374
+
375
+ ### Spacing
376
+
377
+ ```typescript
378
+ // Padding
379
+ p: 2 // All sides
380
+ px: 2 // Horizontal (left + right)
381
+ py: 2 // Vertical (top + bottom)
382
+ pt: 2, pr: 1 // Specific sides
383
+
384
+ // Margin
385
+ m: 2, mx: 2, my: 2, mt: 2, mr: 1
386
+
387
+ // Units: 1 = 8px (theme.spacing(1))
388
+ p: 2 // = 16px
389
+ p: 0.5 // = 4px
390
+ ```
391
+
392
+ ### Positioning
393
+
394
+ ```typescript
395
+ const styles = {
396
+ relative: {
397
+ position: 'relative',
398
+ },
399
+ absolute: {
400
+ position: 'absolute',
401
+ top: 0,
402
+ right: 0,
403
+ },
404
+ sticky: {
405
+ position: 'sticky',
406
+ top: 0,
407
+ zIndex: 1000,
408
+ },
409
+ };
410
+ ```
411
+
412
+ ---
413
+
414
+ ## Summary
415
+
416
+ **Styling Checklist:**
417
+ - ✅ Use `sx` prop for MUI styling
418
+ - ✅ Type-safe with `SxProps<Theme>`
419
+ - ✅ <100 lines: inline; >100 lines: separate file
420
+ - ✅ MUI v7 Grid: `size={{ xs: 12 }}`
421
+ - ✅ 4 space indentation
422
+ - ✅ Single quotes
423
+ - ✅ Trailing commas
424
+ - ❌ No makeStyles or styled()
425
+
426
+ **See Also:**
427
+ - [component-patterns.md](component-patterns.md) - Component structure
428
+ - [complete-examples.md](complete-examples.md) - Full styling examples