7onic 0.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.
Files changed (3) hide show
  1. package/dist/index.js +12909 -0
  2. package/llms.txt +95 -0
  3. package/package.json +20 -0
package/llms.txt ADDED
@@ -0,0 +1,95 @@
1
+ # 7onic CLI
2
+
3
+ > CLI for adding 7onic design system components to your project
4
+ > Source: https://7onic.design
5
+ > npm: https://www.npmjs.com/package/7onic
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx 7onic init
11
+ npx 7onic add button card input
12
+ ```
13
+
14
+ ## Commands
15
+
16
+ ### init
17
+
18
+ Initialize 7onic in your project. Creates `7onic.json`, installs base dependencies, sets up CSS token imports and `cn()` utility.
19
+
20
+ ```bash
21
+ npx 7onic init
22
+ npx 7onic init --yes # Skip prompts, use defaults
23
+ ```
24
+
25
+ **What it does:**
26
+ 1. Detects Tailwind version (v3: config file exists, v4: no config)
27
+ 2. Detects package manager (npm/pnpm/yarn/bun)
28
+ 3. Installs: `@7onic-ui/tokens`, `clsx`, `tailwind-merge`, `class-variance-authority`
29
+ 4. Creates/updates CSS file with token imports
30
+ 5. Creates `cn()` utility at configured path
31
+ 6. Writes `7onic.json` config
32
+
33
+ **Requirements:**
34
+ - TypeScript project (tsconfig.json required)
35
+ - `@/` path alias configured
36
+
37
+ ### add
38
+
39
+ Add components to your project. Copies `.tsx` source files and installs required dependencies.
40
+
41
+ ```bash
42
+ npx 7onic add <component...> # Add specific components
43
+ npx 7onic add --all # Add all 35 components
44
+ npx 7onic add button --yes # Skip confirmation prompt
45
+ npx 7onic add card --overwrite # Overwrite existing files
46
+ ```
47
+
48
+ **Dependency resolution:**
49
+ - `add button` → copies button.tsx + button-group.tsx (auto-resolved)
50
+ - `add icon-button` → copies icon-button.tsx + button.tsx + button-group.tsx
51
+ - `add input` → copies input.tsx + field.tsx
52
+ - `add pie-chart` → copies chart.tsx (alias for chart)
53
+
54
+ **Chart aliases:** `bar-chart`, `line-chart`, `area-chart`, `pie-chart` all resolve to `chart`.
55
+
56
+ ## Config: 7onic.json
57
+
58
+ ```json
59
+ {
60
+ "$schema": "https://7onic.design/schema/7onic.json",
61
+ "tailwind": {
62
+ "version": 3,
63
+ "config": "tailwind.config.ts",
64
+ "css": "src/app/globals.css"
65
+ },
66
+ "aliases": {
67
+ "components": "@/components/ui",
68
+ "utils": "@/lib/utils"
69
+ }
70
+ }
71
+ ```
72
+
73
+ | Field | Description |
74
+ |-------|-------------|
75
+ | tailwind.version | 3 or 4 |
76
+ | tailwind.config | v3 only — Tailwind config file path |
77
+ | tailwind.css | Main CSS file for token imports |
78
+ | aliases.components | Where components are copied to |
79
+ | aliases.utils | Where cn() utility lives |
80
+
81
+ ## Available Components (35)
82
+
83
+ accordion, alert, avatar, badge, breadcrumb, button, button-group, card, chart, checkbox, divider, drawer, dropdown, icon-button, input, metric-card, modal, navigation-menu, pagination, popover, progress, radio-group, segmented, select, skeleton, slider, spinner, switch, table, tabs, textarea, toast, toggle, toggle-group, tooltip
84
+
85
+ ## Post-install Setup
86
+
87
+ - **toast**: Add `<Toaster />` to root layout
88
+ - **tooltip**: Wrap app with `<Tooltip.Provider>`
89
+
90
+ ## Notes
91
+
92
+ - TypeScript only (.tsx output)
93
+ - Components use `cn()` from `@/lib/utils` (configurable)
94
+ - All components are in a flat directory (no nested imports)
95
+ - Existing files are skipped by default (use `--overwrite` to replace)
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "7onic",
3
+ "version": "0.1.0",
4
+ "description": "CLI for adding 7onic design system components to your project",
5
+ "bin": {
6
+ "7onic": "./dist/index.js"
7
+ },
8
+ "files": ["dist", "llms.txt"],
9
+ "engines": { "node": ">=18" },
10
+ "author": "7onic",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "cli",
14
+ "design-system",
15
+ "react",
16
+ "components",
17
+ "tailwindcss",
18
+ "7onic"
19
+ ]
20
+ }