primitiv-ui 0.1.2 → 0.1.4

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 (2) hide show
  1. package/README.md +39 -15
  2. package/package.json +23 -11
package/README.md CHANGED
@@ -4,34 +4,58 @@ The **Primitiv UI** design-system CLI. Add headless, accessible,
4
4
  fully-styled components — and their design tokens — to any Vite or
5
5
  Next.js project from the command line.
6
6
 
7
- ## Install
7
+ ## Quick start
8
+
9
+ Run inside an existing Vite or Next.js project:
8
10
 
9
11
  ```sh
10
- npm i -D primitiv-ui
11
- # or: pnpm add -D primitiv-ui
12
+ # pnpm
13
+ pnpm create primitiv-ui
14
+
15
+ # npm
16
+ npm create primitiv-ui@latest
17
+
18
+ # yarn / bun
19
+ yarn create primitiv-ui
20
+ bun create primitiv-ui
12
21
  ```
13
22
 
14
- This provides the `primitiv` command. The CLI is a small native binary
15
- (written in Rust); `primitiv-ui` is a thin launcher that pulls in the
16
- matching per-platform package via `optionalDependencies` and runs it — so
17
- you only download the one binary your machine needs.
23
+ This scaffolds `primitiv.json` and generates the token layer. Then add
24
+ components with:
25
+
26
+ ```sh
27
+ pnpm dlx primitiv-ui@latest add button
28
+ # or: npx primitiv-ui@latest add button
29
+ ```
18
30
 
19
- ## Usage
31
+ ## Commands
20
32
 
21
33
  ```sh
22
- primitiv init # scaffold primitiv.json and wire up tokens/theme
23
- primitiv add button # add a component: styled surface + headless React + contract
24
- primitiv tokens # emit design tokens (CSS / SCSS / Tailwind)
25
- primitiv theme # emit the theme overrides layer
34
+ primitiv init # scaffold primitiv.json + generate the token layer
35
+ primitiv add button # add a component: stylesheet + React surface + contract
36
+ primitiv tokens # (re)generate the design-token layer
37
+ primitiv theme # generate a brand-palette override layer
26
38
  primitiv list # list available components and what's installed
27
39
  ```
28
40
 
29
- Pass `--help` to any command for its flags (e.g. `primitiv add --help`).
41
+ ## How it works
42
+
43
+ `primitiv-ui` is a thin JS launcher. It resolves the matching native binary
44
+ for your platform via `optionalDependencies` and runs it — so you only
45
+ download the one binary your machine needs.
46
+
47
+ You don't need to install it as a project dependency. Use `npx` or your
48
+ package manager's `dlx` / `create` command to invoke it on demand:
49
+
50
+ ```sh
51
+ npx primitiv-ui@latest add switch
52
+ pnpm dlx primitiv-ui@latest add switch
53
+ ```
30
54
 
31
55
  ## Supported platforms
32
56
 
33
- macOS (arm64, x64), Linux (x64, arm64 — glibc), and Windows (x64). On any
34
- other target, install the binary from source:
57
+ macOS (arm64, x64), Linux (x64, arm64 — glibc), Windows (x64). On any
58
+ other target, install from source:
35
59
 
36
60
  ```sh
37
61
  cargo install primitiv-cli
package/package.json CHANGED
@@ -1,19 +1,29 @@
1
1
  {
2
2
  "name": "primitiv-ui",
3
- "version": "0.1.2",
4
- "description": "Primitiv UI the design system CLI. Run `primitiv add button` in any Vite or Next.js project.",
5
- "keywords": ["primitiv", "design-system", "cli", "react", "tailwind"],
3
+ "version": "0.1.4",
4
+ "description": "Primitiv UI \u2014 the design system CLI. Run `primitiv add button` in any Vite or Next.js project.",
5
+ "keywords": [
6
+ "primitiv",
7
+ "design-system",
8
+ "cli",
9
+ "react",
10
+ "tailwind"
11
+ ],
6
12
  "bin": {
7
13
  "primitiv": "./bin/primitiv.mjs"
8
14
  },
9
- "files": ["bin"],
10
- "engines": { "node": ">=18" },
15
+ "files": [
16
+ "bin"
17
+ ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
11
21
  "optionalDependencies": {
12
- "@primitiv-ui/cli-darwin-arm64": "0.1.2",
13
- "@primitiv-ui/cli-darwin-x64": "0.1.2",
14
- "@primitiv-ui/cli-linux-x64-gnu": "0.1.2",
15
- "@primitiv-ui/cli-linux-arm64-gnu": "0.1.2",
16
- "@primitiv-ui/cli-win32-x64": "0.1.2"
22
+ "@primitiv-ui/cli-darwin-arm64": "0.1.4",
23
+ "@primitiv-ui/cli-darwin-x64": "0.1.4",
24
+ "@primitiv-ui/cli-linux-x64-gnu": "0.1.4",
25
+ "@primitiv-ui/cli-linux-arm64-gnu": "0.1.4",
26
+ "@primitiv-ui/cli-win32-x64": "0.1.4"
17
27
  },
18
28
  "repository": {
19
29
  "type": "git",
@@ -21,5 +31,7 @@
21
31
  "directory": "npm/cli-wrapper"
22
32
  },
23
33
  "license": "MIT",
24
- "publishConfig": { "access": "public" }
34
+ "publishConfig": {
35
+ "access": "public"
36
+ }
25
37
  }