@nebulit/embuilder 0.1.50 → 0.1.51
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/package.json +1 -1
- package/templates/.claude/skills/ui-build-slice-ui/SKILL.md +5 -5
- package/templates/.claude/skills/ui-read-ui-prompts/SKILL.md +2 -2
- package/templates/.claude/skills/ui-scaffold-component/SKILL.md +5 -5
- package/templates/Claude.md +13 -13
- package/templates/frontend/prompt.md +7 -15
- package/templates/server.mjs +1 -1
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@ Use the **ui-scaffold-component** skill to:
|
|
|
59
59
|
- Create dialog components for STATE_CHANGE slices
|
|
60
60
|
- Create page component to compose list and dialogs
|
|
61
61
|
- Add components to `src/components/{domain}/`
|
|
62
|
-
- Apply UI prompt requirements (
|
|
62
|
+
- Apply UI prompt requirements (tailwind CSS, validation, formatting)
|
|
63
63
|
|
|
64
64
|
### 7. Verify Integration
|
|
65
65
|
- Check that all imports are correct
|
|
@@ -166,12 +166,12 @@ Before completing, verify:
|
|
|
166
166
|
- [ ] API functions handle errors appropriately
|
|
167
167
|
- [ ] Hooks are properly exported from index.ts
|
|
168
168
|
- [ ] Components import all necessary dependencies
|
|
169
|
-
- [ ]
|
|
169
|
+
- [ ] tailwind CSS classes are used correctly
|
|
170
170
|
- [ ] Form validation matches UI prompt requirements
|
|
171
171
|
- [ ] Date/time formatting matches specifications
|
|
172
172
|
- [ ] Loading and error states are handled
|
|
173
173
|
- [ ] Success/error feedback is implemented
|
|
174
|
-
- [ ] Responsive design is applied (
|
|
174
|
+
- [ ] Responsive design is applied (tailwind columns)
|
|
175
175
|
- [ ] All files follow project conventions
|
|
176
176
|
|
|
177
177
|
## Integration with Existing Code
|
|
@@ -200,7 +200,7 @@ When modifying existing files:
|
|
|
200
200
|
|
|
201
201
|
- Generate minimal, focused code (avoid over-engineering)
|
|
202
202
|
- Follow existing project patterns and conventions
|
|
203
|
-
- Use
|
|
203
|
+
- Use tailwind CSS exclusively (no custom CSS unless necessary)
|
|
204
204
|
- Include JSDoc comments for public APIs
|
|
205
205
|
- Handle edge cases (empty lists, errors, loading)
|
|
206
206
|
- Implement proper TypeScript types (no `any`)
|
|
@@ -222,7 +222,7 @@ When modifying existing files:
|
|
|
222
222
|
- This skill orchestrates all other skills in sequence
|
|
223
223
|
- Each step depends on the previous step's output
|
|
224
224
|
- If UI prompts provide specific requirements, prioritize them over defaults
|
|
225
|
-
- Always use
|
|
225
|
+
- Always use tailwind CSS components and utilities
|
|
226
226
|
- Generate clean, maintainable, production-ready code
|
|
227
227
|
- Follow TypeScript strict mode requirements
|
|
228
228
|
- Test the generated code before marking as complete
|
|
@@ -153,7 +153,7 @@ Your output would be:
|
|
|
153
153
|
- Layout: Card layout for event list with 3-column grid (desktop) / 1-column (mobile)
|
|
154
154
|
- Date Format: DD.MM.YYYY
|
|
155
155
|
- Time Format: 24-hour format (HH:mm)
|
|
156
|
-
- Component: Use
|
|
156
|
+
- Component: Use tailwind cards and columns
|
|
157
157
|
|
|
158
158
|
#### Validation Rules:
|
|
159
159
|
| Field | Rule | Message |
|
|
@@ -174,7 +174,7 @@ Your output would be:
|
|
|
174
174
|
|
|
175
175
|
### Implementation Guidance:
|
|
176
176
|
|
|
177
|
-
1. Use
|
|
177
|
+
1. Use tailwind modal with `is-active` class for dialog
|
|
178
178
|
2. Implement date formatting with `toLocaleDateString('de-DE')`
|
|
179
179
|
3. Add form validation before submit
|
|
180
180
|
4. Use `useMutation` onSuccess callback for toast and list refresh
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
skill_name: ui-scaffold-component
|
|
3
|
-
description: Scaffold React components (List, Dialog, Page) from slice definitions using
|
|
3
|
+
description: Scaffold React components (List, Dialog, Page) from slice definitions using tailwind CSS
|
|
4
4
|
version: 1.0.0
|
|
5
5
|
author: Frontend Development Team
|
|
6
|
-
tags: [ui, components, react,
|
|
6
|
+
tags: [ui, components, react, tailwind, scaffolding]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Component Scaffolder Skill
|
|
10
10
|
|
|
11
|
-
Scaffold React components (List, Dialog, Page) from slice definitions using
|
|
11
|
+
Scaffold React components (List, Dialog, Page) from slice definitions using tailwind CSS.
|
|
12
12
|
|
|
13
13
|
## Instructions
|
|
14
14
|
|
|
@@ -30,7 +30,7 @@ Your task is to:
|
|
|
30
30
|
- **Dialog Component**: For STATE_CHANGE slices (forms for create/update)
|
|
31
31
|
- **Page Component**: Combines list and dialogs into a complete page
|
|
32
32
|
|
|
33
|
-
3. **Use
|
|
33
|
+
3. **Use tailwind CSS exclusively** for all styling:
|
|
34
34
|
- Layout: `columns`, `column`, `container`, `section`
|
|
35
35
|
- Components: `card`, `button`, `modal`, `box`, `table`
|
|
36
36
|
- Form elements: `field`, `control`, `label`, `input`, `select`, `textarea`
|
|
@@ -252,7 +252,7 @@ import { EventsPage } from '@/components/events/EventsPage';
|
|
|
252
252
|
{ path: '/events', element: <EventsPage /> }
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
##
|
|
255
|
+
## tailwind CSS Guidelines
|
|
256
256
|
|
|
257
257
|
- Use `columns` and `column` for responsive grid layouts
|
|
258
258
|
- Use `card` for displaying entity items
|
package/templates/Claude.md
CHANGED
|
@@ -4,13 +4,13 @@ Read Events in src/events to understand the global structure.
|
|
|
4
4
|
|
|
5
5
|
## Framework & Styling
|
|
6
6
|
|
|
7
|
-
- **CSS Framework**: Use
|
|
8
|
-
- **Assumption**:
|
|
7
|
+
- **CSS Framework**: Use Tailwind CSS exclusively for all styling
|
|
8
|
+
- **Assumption**: Tailwind CSS is already available and imported in the project
|
|
9
9
|
- **Styling Guidelines**:
|
|
10
|
-
- Use
|
|
11
|
-
- Follow
|
|
12
|
-
- Leverage
|
|
13
|
-
- Prefer
|
|
10
|
+
- Use tailwind's utility classes and components
|
|
11
|
+
- Follow Tailwind's naming conventions and class structure
|
|
12
|
+
- Leverage Tailwind's responsive design features
|
|
13
|
+
- Prefer Tailwind components over custom CSS
|
|
14
14
|
|
|
15
15
|
## File Structure Constraints
|
|
16
16
|
|
|
@@ -26,7 +26,7 @@ Read Events in src/events to understand the global structure.
|
|
|
26
26
|
## Development Guidelines
|
|
27
27
|
|
|
28
28
|
1. Each slice should be self-contained and focused on a specific domain
|
|
29
|
-
2. Use
|
|
29
|
+
2. Use tailwind's grid system, components, and utilities for all UI-related code
|
|
30
30
|
3. Maintain clear separation of concerns within each slice
|
|
31
31
|
4. Follow TypeScript best practices for type definitions and interfaces
|
|
32
32
|
|
|
@@ -49,10 +49,10 @@ src/slices/
|
|
|
49
49
|
│ └── routes.ts
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
##
|
|
52
|
+
## tailwind Integration Notes
|
|
53
53
|
|
|
54
|
-
- Utilize
|
|
55
|
-
- Apply
|
|
56
|
-
- Use
|
|
57
|
-
- Implement responsive design with
|
|
58
|
-
- Leverage
|
|
54
|
+
- Utilize tailwind's component library: navbar, cards, buttons, forms, modals, etc.
|
|
55
|
+
- Apply tailwind's spacing utilities: `m-*`, `p-*`, `has-text-*`, `has-background-*`
|
|
56
|
+
- Use tailwind's flexbox utilities for layouts
|
|
57
|
+
- Implement responsive design with tailwind's breakpoint classes
|
|
58
|
+
- Leverage tailwind's color palette and typography classes
|
|
@@ -41,7 +41,7 @@ This project has custom skills available in `.claude/skills/` that automate comm
|
|
|
41
41
|
- **`/ui-generate-types`**: Generate TypeScript interfaces from slice field definitions
|
|
42
42
|
- **`/ui-generate-api`**: Generate API layer functions for queries (Supabase) and commands (POST)
|
|
43
43
|
- **`/ui-generate-hook`**: Generate React Query hooks for STATE_VIEW (queries) and STATE_CHANGE (mutations)
|
|
44
|
-
- **`/ui-scaffold-component`**: Scaffold React components (List, Dialog, Page) using
|
|
44
|
+
- **`/ui-scaffold-component`**: Scaffold React components (List, Dialog, Page) using Tailwind CSS
|
|
45
45
|
|
|
46
46
|
**IMPORTANT**: When asked to build UI from slices, USE the `/ui-build-slice-ui` skill first! It will orchestrate all other skills in the correct order. Only use individual skills when you need to regenerate or modify a specific part.
|
|
47
47
|
**IMPORTANT**: Unless stated in a custom prompt, components read directly from the tables provided, not from api-endpoints via HTTP
|
|
@@ -285,7 +285,7 @@ This will automatically:
|
|
|
285
285
|
- **Generate types only**: `/ui-generate-types <slice-file>` - Create TypeScript interfaces
|
|
286
286
|
- **Generate API only**: `/ui-generate-api <slice-file>` - Create Supabase queries or POST commands
|
|
287
287
|
- **Generate hook only**: `/ui-generate-hook <slice-file>` - Create React Query hooks
|
|
288
|
-
- **Generate component only**: `/ui-scaffold-component <slice-files>` - Create React components with
|
|
288
|
+
- **Generate component only**: `/ui-scaffold-component <slice-files>` - Create React components with Tailwind CSS
|
|
289
289
|
|
|
290
290
|
### Manual Workflow (If not using skills)
|
|
291
291
|
|
|
@@ -359,15 +359,7 @@ try {
|
|
|
359
359
|
|
|
360
360
|
## 9. UI Components
|
|
361
361
|
|
|
362
|
-
**NOTE**: The skills in `.claude/skills/` are configured to use **
|
|
363
|
-
|
|
364
|
-
### Bulma CSS (Used by Skills)
|
|
365
|
-
|
|
366
|
-
When using skills, components use Bulma classes:
|
|
367
|
-
- Layout: `container`, `section`, `columns`, `column`
|
|
368
|
-
- Components: `card`, `modal`, `button`, `notification`, `box`
|
|
369
|
-
- Forms: `field`, `control`, `label`, `input`, `select`, `textarea`
|
|
370
|
-
- Modifiers: `is-primary`, `is-active`, `is-fullwidth`, `has-text-centered`
|
|
362
|
+
**NOTE**: The skills in `.claude/skills/` are configured to use **Tailwind CSS** for styling. If you're using the skills (especially `/scaffold-component`), components will be generated with Tailwind classes.
|
|
371
363
|
|
|
372
364
|
### shadcn/ui (Alternative)
|
|
373
365
|
|
|
@@ -380,7 +372,7 @@ Import from `@/components/ui/*`:
|
|
|
380
372
|
- `Table`, `Tabs`, `Skeleton`
|
|
381
373
|
- `toast` from `sonner`
|
|
382
374
|
|
|
383
|
-
**Recommendation**: Use the skills with
|
|
375
|
+
**Recommendation**: Use the skills with Tailwind CSS for consistency with project configuration.
|
|
384
376
|
|
|
385
377
|
---
|
|
386
378
|
|
|
@@ -469,11 +461,11 @@ Import from `@/components/ui/*`:
|
|
|
469
461
|
|
|
470
462
|
### Example 6: Fixing Component Styling
|
|
471
463
|
|
|
472
|
-
**User Request**: "The EventList component doesn't look right, regenerate it with proper
|
|
464
|
+
**User Request**: "The EventList component doesn't look right, regenerate it with proper Tailwind styling"
|
|
473
465
|
|
|
474
466
|
**Your Response**:
|
|
475
467
|
```bash
|
|
476
|
-
# Use ui-scaffold-component to regenerate with
|
|
468
|
+
# Use ui-scaffold-component to regenerate with Tailwind CSS
|
|
477
469
|
/ui-scaffold-component src/slices/events/ViewEvents.json
|
|
478
470
|
```
|
|
479
471
|
|
|
@@ -505,7 +497,7 @@ Don't know which skill to use?
|
|
|
505
497
|
|
|
506
498
|
**ALWAYS** prefer using the skills over manual implementation! They ensure:
|
|
507
499
|
- Consistency across the codebase
|
|
508
|
-
- Proper use of
|
|
500
|
+
- Proper use of Tailwind CSS
|
|
509
501
|
- Correct CQRS patterns
|
|
510
502
|
- Proper TypeScript types
|
|
511
503
|
- React Query best practices
|
package/templates/server.mjs
CHANGED
|
@@ -275,7 +275,7 @@ const server = createServer(async (req, res) => {
|
|
|
275
275
|
const allSlices = indexData.slices.map(s => ({
|
|
276
276
|
title: s.slice,
|
|
277
277
|
status: s.status,
|
|
278
|
-
|
|
278
|
+
assigned: s.assigned,
|
|
279
279
|
id: s.id,
|
|
280
280
|
specifications: specificationsMap.get(s.id)
|
|
281
281
|
}));
|