jig-ui 0.7.0 → 0.7.1

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/package.json +1 -1
  2. package/rules/02-tokens.md +17 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jig-ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "A design system for coding agents. 104 numbered UI rules, brand x mode design tokens, and an installer for Claude Code, Codex, Cursor and opencode.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,13 +19,24 @@ tokens/
19
19
 
20
20
  A surface loads **exactly one brand file and exactly one mode file**.
21
21
 
22
- **Tokens live at `.jig/tokens/`.** That is the only location, in every scope and
23
- every project — `jig install` puts them there, `jig update` refreshes them there,
24
- and nothing relocates them. Import from that path and it stays correct.
22
+ **The token layer's location follows the project.** `init` writes it beside the
23
+ stylesheet it wires and prints the path it chose — `src/styles/jig/` where the CSS
24
+ lives in `src/styles/`, `app/assets/stylesheets/jig/` in a Rails app. Set `brand`
25
+ in `jig.config.json` to put it elsewhere. Projects set up before 0.7.0 keep their
26
+ `.jig/tokens/` layout; `update` does not move them.
25
27
 
28
+ So **never hardcode that path**. `init` writes one barrel per surface, `theme.css`,
29
+ which imports the brand and the mode in the right order — import the barrel, and
30
+ relocating the layer changes one line instead of every stylesheet:
31
+
32
+ ```css
33
+ /* src/styles/jig/theme.css — written by init */
34
+ @import "./brand.acme.css";
35
+ @import "./mode.operator.css";
36
+ ```
26
37
  ```css
27
- @import ".jig/tokens/brand.acme.css";
28
- @import ".jig/tokens/mode.operator.css";
38
+ /* your stylesheet */
39
+ @import "./jig/theme.css";
29
40
  ```
30
41
 
31
42
  Three separate mode files rather than one file with variants. The trade: a surface cannot switch modes at runtime, and shared values are duplicated across three files. In exchange each surface ships only the tokens it uses, the files are independently readable, and there is no cascade to reason about. For a system where mode is a routing decision rather than a user preference, that is the right trade.
@@ -369,8 +380,7 @@ In dark, elevated surfaces get **lighter**, not shadowed. Border-led elevation s
369
380
 
370
381
  **Plain CSS, any framework**
371
382
  ```css
372
- @import ".jig/tokens/brand.default.css";
373
- @import ".jig/tokens/mode.product.css";
383
+ @import "./jig/theme.css";
374
384
 
375
385
  .card {
376
386
  background: var(--color-bg-raised);