@omkarux/vela 0.2.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,49 @@
3
3
  All notable changes to this project are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [0.3.1] — 2026-09-10
7
+
8
+ ### Fixed
9
+ - **The release workflow could never publish.** It triggered only on pushes to `main` and on pull
10
+ requests, while the publish job gated on `refs/tags/v*` — so a tag push matched no trigger and
11
+ the job never ran. Tags are now listed explicitly.
12
+ - Trusted publishing requires npm >= 11.5.1; Node 22 ships npm 10.x. The publish job now upgrades
13
+ npm first. Without it npm falls back to looking for a token and fails with `ENEEDAUTH`, which
14
+ reads like a credentials problem rather than a version one.
15
+
16
+ - **`scripts/verify-pack.mjs` crashed on `npm pack --json`.** It assumed an array and indexed
17
+ `[0].filename` directly, which threw a bare `TypeError` when npm returned a different shape from
18
+ inside a lifecycle script. It now parses defensively and reports the actual output.
19
+ - The publish job no longer re-runs the full gate. `prepublishOnly` fired inside `npm publish`,
20
+ repeating work the `verify` job had already done and putting a second failure surface inside the
21
+ publish step — which is what broke the first tagged release. The gate runs once, in `verify`.
22
+
23
+ This release exists to prove the pipeline end to end. The tarball contents are unchanged from
24
+ 0.3.0 — but this one was built and published by CI from a git tag, with a provenance attestation
25
+ tying it to the commit, rather than by hand from a laptop.
26
+
27
+ ## [0.3.0] — 2026-09-10
28
+
29
+ ### Added
30
+ - **A `## Figma mapping` section in every component spec.** The contract now works in both
31
+ directions: each spec states which Figma variant property corresponds to which code prop, and —
32
+ more usefully — which behaviour has **no Figma expression at all** (Tabs' roving tabindex,
33
+ Contextual Alert's live-region politeness, Button's `disabled` state).
34
+ - `llms.txt` now points at the companion Figma library and states the relationship plainly: the
35
+ library is *compiled from* this contract, not the source of it.
36
+
37
+ ### Companion Figma library
38
+ `Vela Design System` — 223 variables across 4 collections mirroring the CSS architecture 1:1
39
+ (Primitives / Color with Light+Dark / Sizing / Typography), 15 text styles, and 6 component sets
40
+ totalling 62 variants. Every variable carries its `var(--vela-*)` name as Dev Mode code syntax.
41
+
42
+ Three token gaps the Figma build surfaced, recorded rather than hidden:
43
+ - Toggle track and knob geometry is literal in both CSS and Figma, not tokenised.
44
+ - Status Indicator dot diameters (10px / 8px) are likewise literal.
45
+ - Code Connect could not be wired: it requires an Organization or Enterprise Figma plan. The
46
+ component API is written into each component's Figma description instead, which surfaces in
47
+ Inspect on any plan.
48
+
6
49
  ## [0.2.0] — 2026-09-09
7
50
 
8
51
  ### Changed
@@ -88,6 +88,25 @@ Label weight is **Regular 400 at every size**.
88
88
  button remains focusable while ignoring clicks. Swapping the label for a spinner would
89
89
  strip the control's accessible name mid-request; disabling it would drop focus.
90
90
 
91
+ ## Figma mapping
92
+
93
+ Library file: **Vela Design System** → page `Button`. The component set is 24 variants:
94
+ `Variant` (3) x `Appearance` (2) x `Size` (4), plus an `Icon` boolean property.
95
+
96
+ | Figma property | Code prop | Notes |
97
+ |---|---|---|
98
+ | `Variant` | `variant` | primary / standard / destructive |
99
+ | `Appearance` | `appearance` | filled / hollow |
100
+ | `Size` | `size` | tiny / regular / large / huge |
101
+ | `Icon` (boolean) | `icon` | Toggles the left icon layer. Boolean, not a variant axis — it changes visibility, not colour. |
102
+
103
+ **`disabled` has no Figma axis, on purpose.** It is a *state*, not a variant — the Props table
104
+ above says so, and adding it would push the matrix past 30 combinations for no gain.
105
+
106
+ **`appearance="text-link"` is a separate component set**, not a third value of `Appearance`.
107
+ That mirrors the type: `ButtonProps` is a discriminated union, and text-link is its own member
108
+ with a narrower `size` and `icon?: never`. One union member, one component set.
109
+
91
110
  ## Anti-patterns
92
111
 
93
112
  - ❌ Two primary filled buttons on one page.
@@ -49,6 +49,20 @@ Never mix a severity background with a risk text colour.
49
49
  - Live-region politeness is derived from severity, as above.
50
50
  - The dismiss control is a real button with an accessible name.
51
51
 
52
+ ## Figma mapping
53
+
54
+ Library file: **Vela Design System** → page `Contextual Alert`. Six variants, one per severity,
55
+ plus a `Dismissible` boolean.
56
+
57
+ | Figma property | Code prop |
58
+ |---|---|
59
+ | `Severity` | `severity` |
60
+ | `Dismissible` | `onDismiss` — presence of the handler, not a flag |
61
+
62
+ The Figma icons are **placeholder glyphs** (circle / triangle / octagon). Production swaps in the
63
+ real icons from `src/lib/icons.tsx`. The live-region politeness (`role="alert"` for major and
64
+ critical, `role="status"` otherwise) is derived from severity in code and has no Figma expression.
65
+
52
66
  ## Anti-patterns
53
67
 
54
68
  - ❌ `severity="high"` or `"error"` → not in the taxonomy (will not compile).
@@ -57,6 +57,21 @@ These are the **input family** heights and do not match Button's ramp. See
57
57
  - Error state sets `aria-invalid` and the message is announced via `role="alert"`.
58
58
  - The `*` is `aria-hidden`; `required` carries the semantics.
59
59
 
60
+ ## Figma mapping
61
+
62
+ Library file: **Vela Design System** → page `Input`. Twelve variants: `Size` (3) x `State` (4).
63
+
64
+ | Figma property | Code prop |
65
+ |---|---|
66
+ | `Size` | `size` |
67
+ | `State=default` | — |
68
+ | `State=focus` | `:focus-visible`, not a prop |
69
+ | `State=error` | `error` — a **message string**, not a boolean |
70
+ | `State=disabled` | `disabled` |
71
+
72
+ The Figma variants show the label, field and message rows together because the code component
73
+ renders all three; a field mocked without its label will not match what ships.
74
+
60
75
  ## Anti-patterns
61
76
 
62
77
  - ❌ Placeholder as the label.
@@ -39,6 +39,19 @@ components allowed to.
39
39
  In light mode `warning` binds `yellow-700` and `medium` binds `orange-600` rather than the
40
40
  500s, so both clear 3:1 against the page. See `foundations/color.md`.
41
41
 
42
+ ## Figma mapping
43
+
44
+ Library file: **Vela Design System** → page `Status Indicator`. Ten variants: `Status` (5) x
45
+ `Size` (2), plus a `Label` boolean.
46
+
47
+ | Figma property | Code prop |
48
+ |---|---|
49
+ | `Status` | `status` |
50
+ | `Size` | `size` |
51
+ | `Label` (boolean) | `label` — hiding it in Figma means the code must supply the `aria-label` fallback |
52
+
53
+ Dot diameters (10px / 8px) are **literal in both Figma and CSS**, not tokenised. Known gap.
54
+
42
55
  ## Anti-patterns
43
56
 
44
57
  - ❌ `status="critical"` → that is severity (will not compile).
@@ -61,6 +61,23 @@ This is the reason Tabs is more than a styled list:
61
61
  Home/End jump to the ends. Disabled tabs are skipped, and the list wraps.
62
62
  - The panel is focusable so keyboard users land in the content after activating a tab.
63
63
 
64
+ ## Figma mapping
65
+
66
+ Library file: **Vela Design System** → page `Tabs`. The component set is a single **Tab**, not the
67
+ whole tablist: six variants, `State` (3) x `Size` (2), plus a `Count` boolean. Compose a tablist
68
+ by placing Tab instances in a row.
69
+
70
+ | Figma property | Code equivalent |
71
+ |---|---|
72
+ | `State=selected` | the active `value` on `<Tabs>` |
73
+ | `State=disabled` | `disabled` on `<Tabs.Trigger>` |
74
+ | `Size` | `size` on `<Tabs>` |
75
+ | `Count` (boolean) | `count` on `<Tabs.Trigger>` |
76
+
77
+ **The keyboard behaviour has no Figma expression.** Roving tabindex, arrow navigation, Home/End,
78
+ and skipping disabled tabs exist only in code — which is exactly why the Figma library is not the
79
+ source of truth for this component. The spec is.
80
+
64
81
  ## Anti-patterns
65
82
 
66
83
  - ❌ Tabs for the same dataset in a different view → View Switcher.
@@ -45,6 +45,20 @@ two components allowed to use it.
45
45
  - The visible label is wired via `aria-labelledby` and is itself clickable.
46
46
  - Motion respects `prefers-reduced-motion`.
47
47
 
48
+ ## Figma mapping
49
+
50
+ Library file: **Vela Design System** → page `Toggle`. Four variants: `State` (off/on) x `Size`
51
+ (regular/tiny), plus a `Label text` text property.
52
+
53
+ | Figma property | Code prop |
54
+ |---|---|
55
+ | `State` | `checked` / `defaultChecked` |
56
+ | `Size` | `size` |
57
+ | `Label text` | `label` |
58
+
59
+ Track and knob geometry (34x20 / 26x15, knob 16 / 11) is **literal in both Figma and CSS** —
60
+ it is not tokenised. That is a known gap, recorded rather than hidden.
61
+
48
62
  ## Anti-patterns
49
63
 
50
64
  - ❌ A Toggle behind a Save button → that is a Checkbox.
@@ -14,6 +14,14 @@ most often get wrong. Then read the per-component file before generating any mar
14
14
  - Never invent a component. If nothing fits, say so and name the closest match.
15
15
  - Severity, Risk and Status are three different taxonomies. Never cross them.
16
16
 
17
+ ## Figma
18
+
19
+ A matching Figma library exists: **Vela Design System**. It is *compiled from this contract*, not
20
+ the source of it — 223 variables and 6 component sets mirroring the token architecture 1:1, with
21
+ every variable carrying its `var(--vela-*)` name for Dev Mode. Each component's per-file
22
+ `## Figma mapping` section states which Figma property corresponds to which prop, and which
23
+ behaviour has no Figma expression at all.
24
+
17
25
  ## Docs
18
26
  - [Component catalogue and disambiguations](overview.md)
19
27
  - [Install and theming](setup.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omkarux/vela",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "A token-first React component kit: two-layer color architecture, separate severity and risk taxonomies, full light and dark theming, zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "license": "MIT",