@j3m-quantum/ui 1.12.1 → 2.1.0
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/README.md +72 -7
- package/cursor-rules-for-consumers.md +24 -15
- package/dist/cli/index.js +670 -0
- package/dist/cli/postinstall.js +25 -0
- package/dist/index.cjs +1041 -450
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +112 -11
- package/dist/index.d.ts +112 -11
- package/dist/index.js +968 -380
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -32,6 +32,16 @@ npm install @j3m-quantum/ui tw-animate-css
|
|
|
32
32
|
|
|
33
33
|
That's it! All dependencies (Radix UI, lucide-react, etc.) are bundled with the package.
|
|
34
34
|
|
|
35
|
+
### Set Up AI Assistance (Recommended)
|
|
36
|
+
|
|
37
|
+
If you use Cursor or AI coding assistants, run this to ensure AI uses the correct components:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @j3m-quantum/ui init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This creates cursor rules so AI assistants know about all components and use them correctly instead of creating new files.
|
|
44
|
+
|
|
35
45
|
## Quick Start
|
|
36
46
|
|
|
37
47
|
### 1. Setup Vite + Tailwind
|
|
@@ -527,16 +537,71 @@ Make sure to add `glass-context` class to Cards containing interactive component
|
|
|
527
537
|
</Card>
|
|
528
538
|
```
|
|
529
539
|
|
|
530
|
-
##
|
|
540
|
+
## CLI Commands
|
|
541
|
+
|
|
542
|
+
The package includes a CLI to help with setup and discovery.
|
|
543
|
+
|
|
544
|
+
### Initialize AI Assistance (Recommended)
|
|
545
|
+
|
|
546
|
+
Run this after installing to set up Cursor/AI assistant rules:
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
npx @j3m-quantum/ui init
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
This creates `.cursor/rules/j3m-quantum.md` with:
|
|
553
|
+
- Complete component list with import statements
|
|
554
|
+
- Figma layer name → component mappings
|
|
555
|
+
- Usage guidelines and patterns
|
|
556
|
+
- Instructions for AI to use package components (not create new ones)
|
|
557
|
+
|
|
558
|
+
### List Available Components
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
npx @j3m-quantum/ui list
|
|
562
|
+
|
|
563
|
+
# Filter by category
|
|
564
|
+
npx @j3m-quantum/ui list --category blocks
|
|
565
|
+
npx @j3m-quantum/ui list --category inputs
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Check Setup
|
|
569
|
+
|
|
570
|
+
Validate your project configuration:
|
|
571
|
+
|
|
572
|
+
```bash
|
|
573
|
+
npx @j3m-quantum/ui doctor
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
This checks:
|
|
577
|
+
- Package installation
|
|
578
|
+
- CSS import order
|
|
579
|
+
- Cursor rules configuration
|
|
580
|
+
- Required dependencies
|
|
581
|
+
|
|
582
|
+
## AI Assistant Integration
|
|
583
|
+
|
|
584
|
+
If your team uses Cursor, Copilot, or other AI coding assistants:
|
|
585
|
+
|
|
586
|
+
1. **Run `npx @j3m-quantum/ui init`** - This is the most important step
|
|
587
|
+
2. The AI will now:
|
|
588
|
+
- Use components from `@j3m-quantum/ui` instead of creating new files
|
|
589
|
+
- Know all 60+ available components
|
|
590
|
+
- Map Figma layer names to correct components
|
|
591
|
+
- Follow J3M styling guidelines
|
|
592
|
+
|
|
593
|
+
### Figma MCP Integration
|
|
531
594
|
|
|
532
|
-
|
|
595
|
+
The cursor rules include a Figma layer → component mapping table. When your Figma MCP suggests a design element, the AI will automatically use the correct package component:
|
|
533
596
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
597
|
+
| Figma Layer | Package Component |
|
|
598
|
+
|-------------|------------------|
|
|
599
|
+
| "Button", "CTA" | `Button` |
|
|
600
|
+
| "Card", "Panel" | `Card` |
|
|
601
|
+
| "Planning Grid" | `PlanningTable` |
|
|
602
|
+
| "Dialog", "Modal" | `Dialog` |
|
|
538
603
|
|
|
539
|
-
|
|
604
|
+
See [`cursor-rules-for-consumers.md`](./cursor-rules-for-consumers.md) for the complete mapping.
|
|
540
605
|
|
|
541
606
|
## Version Strategy
|
|
542
607
|
|
|
@@ -205,7 +205,14 @@ npm add -D tailwindcss @tailwindcss/vite
|
|
|
205
205
|
npm install @j3m-quantum/ui tw-animate-css
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
### 3.
|
|
208
|
+
### 3. Set Up AI Assistance (Important!)
|
|
209
|
+
```bash
|
|
210
|
+
npx @j3m-quantum/ui init
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
This automatically creates the cursor rules so AI assistants use the correct components.
|
|
214
|
+
|
|
215
|
+
### 4. Configure Vite
|
|
209
216
|
```typescript
|
|
210
217
|
// vite.config.ts
|
|
211
218
|
import { defineConfig } from 'vite'
|
|
@@ -217,7 +224,7 @@ export default defineConfig({
|
|
|
217
224
|
})
|
|
218
225
|
```
|
|
219
226
|
|
|
220
|
-
###
|
|
227
|
+
### 5. Setup CSS
|
|
221
228
|
```css
|
|
222
229
|
/* src/index.css */
|
|
223
230
|
@import "tailwindcss";
|
|
@@ -225,19 +232,9 @@ export default defineConfig({
|
|
|
225
232
|
@import "@j3m-quantum/ui/styles";
|
|
226
233
|
```
|
|
227
234
|
|
|
228
|
-
###
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
### 6. Setup App Root
|
|
232
|
-
```tsx
|
|
233
|
-
// src/App.tsx
|
|
234
|
-
function App() {
|
|
235
|
-
return (
|
|
236
|
-
<div className="j3m-app-bg min-h-screen">
|
|
237
|
-
{/* Your app content */}
|
|
238
|
-
</div>
|
|
239
|
-
)
|
|
240
|
-
}
|
|
235
|
+
### 6. Verify Setup
|
|
236
|
+
```bash
|
|
237
|
+
npx @j3m-quantum/ui doctor
|
|
241
238
|
```
|
|
242
239
|
|
|
243
240
|
### 7. Use Components
|
|
@@ -271,6 +268,16 @@ function App() {
|
|
|
271
268
|
|
|
272
269
|
---
|
|
273
270
|
|
|
271
|
+
## CLI Commands
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
npx @j3m-quantum/ui init # Set up cursor rules for AI assistance
|
|
275
|
+
npx @j3m-quantum/ui list # List all available components
|
|
276
|
+
npx @j3m-quantum/ui doctor # Check if setup is correct
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
274
281
|
## Updating the Package
|
|
275
282
|
|
|
276
283
|
To get the latest components and styling:
|
|
@@ -280,3 +287,5 @@ npm update @j3m-quantum/ui
|
|
|
280
287
|
# or
|
|
281
288
|
npm install @j3m-quantum/ui@latest
|
|
282
289
|
```
|
|
290
|
+
|
|
291
|
+
After updating, you may want to re-run `npx @j3m-quantum/ui init` to get the latest cursor rules.
|