wensity 0.1.8 → 0.1.10

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -7
  3. package/dist/index.js +1582 -202
  4. package/package.json +26 -10
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wensity Private Limited
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,9 +6,15 @@ Install open-code components and UI primitives from the Wensity registry into yo
6
6
  # Initialise (defaults: Tabler icons, medium radius)
7
7
  npx wensity@latest init
8
8
 
9
- # Or apply a shareable preset from https://ui.wensity.com/docs/primitives/setup
10
- # Preset support requires wensity 0.1.8 or later
9
+ # Or apply a shareable preset from https://ui.wensity.com/create-preset
11
10
  npx wensity@latest init --preset <wsty1-code>
11
+ npx wensity@latest init --preset <wsty1-code> --template next
12
+
13
+ # Existing project — style + CSS only
14
+ npx wensity@latest apply --preset <wsty1-code>
15
+
16
+ # Inspect a code before applying
17
+ npx wensity@latest preset inspect <wsty1-code>
12
18
 
13
19
  # Install a primitive or component
14
20
  npx wensity@latest add button
@@ -17,7 +23,7 @@ npx wensity@latest add liquid-multimodal-input
17
23
 
18
24
  ## Presets (primitives)
19
25
 
20
- Generate a preset on [`/docs/primitives/setup`](https://ui.wensity.com/docs/primitives/setup), then run the copied `init --preset` command once. Settings land in `wensity.json` (`style.iconLibrary`, radius, fonts, control-solid colors) and a delimited `--primitive-*` CSS block in your Tailwind CSS file.
26
+ Generate a preset in the [Create preset studio](https://ui.wensity.com/create-preset) (guide: [`/docs/create-preset`](https://ui.wensity.com/docs/create-preset)). Then run `init --preset` (new project) or `apply --preset` (existing). Settings land in `wensity.json` (`style.iconLibrary`, radius, fonts, control-solid colors) and a delimited `--primitive-*` CSS block in your Tailwind CSS file.
21
27
 
22
28
  Later `wensity add <primitive>` / `wensity update <primitive>` reads that style automatically:
23
29
 
@@ -25,20 +31,22 @@ Later `wensity add <primitive>` / `wensity update <primitive>` reads that style
25
31
  - Tabler ↔ Lucide icon imports transform at install time for **UI primitives only**
26
32
  - Mandatory dependency swap installs exactly one icon package when icons are used
27
33
 
28
- Plain `init` (no `--preset`) refuses to overwrite an existing `wensity.json` unless you pass `--force`. `init --preset` merges `style` (+ CSS) into an existing config without rewriting installed component source.
34
+ Plain `init` (no `--preset`) refuses to overwrite an existing `wensity.json` unless you pass `--force`. Prefer `apply --preset` for style-only updates; `init --preset` also merges `style` (+ CSS) without rewriting installed component source.
29
35
 
30
36
  ## Commands
31
37
 
32
38
  | Command | Purpose |
33
39
  |---|---|
34
- | `wensity init [--preset <code>]` | Create / merge project config |
40
+ | `wensity init [--preset <code>] [--template next\|vite\|astro\|react-router]` | Create / merge project config |
41
+ | `wensity apply --preset <code>` | Apply style + CSS to an existing project |
42
+ | `wensity preset inspect <code>` | Decode a preset code |
35
43
  | `wensity login` | Save a dashboard API token for Pro |
36
44
  | `wensity logout` | Clear credentials |
37
45
  | `wensity whoami` | Show current user / plan |
38
46
  | `wensity list` | List registry entries |
39
47
  | `wensity add <slug>` | Install source (skips existing files) |
40
48
  | `wensity update <slug>` | Re-download and overwrite local source |
41
- | `wensity version` | Print `0.1.8` |
49
+ | `wensity version` | Print `0.1.9` |
42
50
 
43
51
  Premium components and blocks require an API token from the Wensity dashboard. Tokens are stored at `~/.config/wensity/credentials.json` with `0600` permissions.
44
52
 
@@ -52,4 +60,4 @@ Premium components and blocks require an API token from the Wensity dashboard. T
52
60
  | `@wensity/ui` runtime | Never | Never |
53
61
  | Premium `/components` | Token + license | Not exported |
54
62
 
55
- Docs: [CLI reference](https://ui.wensity.com/docs/cli) · [Primitive setup](https://ui.wensity.com/docs/primitives/setup) · [Primitives](https://ui.wensity.com/docs/primitives)
63
+ Docs: [CLI reference](https://ui.wensity.com/docs/cli) · [Create preset](https://ui.wensity.com/docs/create-preset) · [Primitives](https://ui.wensity.com/docs/primitives)