@omkarux/vela 0.7.1 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
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.8.0] — 2026-09-12
7
+
8
+ ### Added
9
+ - **Flutter target.** `npm run tokens` now also emits `flutter/lib/vela_tokens.dart` from the same
10
+ `tokens/vela.tokens.json`: primitives as `Color`s, every semantic as a field of a `VelaColors`
11
+ `ThemeExtension` with `light` and `dark` instances, the sizing scale as logical pixels, the type
12
+ ramp as `TextStyle`s (line-height ÷ size, which is what Flutter's `height` takes) and
13
+ `velaThemeData(Brightness)` to seed a `ThemeData`. Ships as `@omkarux/vela/tokens.dart` and as a
14
+ path-installable Dart package in `flutter/`. Tests hold it to the CSS's discipline: every token
15
+ present, every value identical to the JSON, regeneration a no-op; the file is syntax-checked
16
+ whenever a Dart SDK is on the machine. Nothing in the widget layer is generated — the tokens
17
+ travel, the components are built per stack against the same specs.
18
+
19
+ ## [0.7.1] — 2026-09-11
20
+
21
+ ### Fixed
22
+ - 46 numeric tokens carried Figma names the library does not use (`text/h1-size` where the library
23
+ has `size/h1`, and the like). Found by the new read-back; corrected in the JSON, and a test now
24
+ holds every collection to its naming convention so the drift check can trust the names.
25
+
26
+ ## [0.7.0] — 2026-09-11
27
+
28
+ ### Added
29
+ - **Read-back drift check.** `npm run tokens:figma:read` prints a script that reads every variable
30
+ out of the library, resolved per mode; `npm run tokens:figma:check <file>` diffs the result
31
+ against the JSON and exits 1 on any mismatch. Closes the half of the loop that only pushed.
32
+ - Figma component builders live in source (`scripts/figma/components/*.figma.js`, run by
33
+ `npm run figma:build`), version stamps on every generated description, and a spec lint that
34
+ fails the build when a component spec loses a section the sync compiles.
35
+
6
36
  ## [0.6.0] — 2026-09-11
7
37
 
8
38
  ### Added
package/README.md CHANGED
@@ -101,14 +101,14 @@ npm run contrast # WCAG report for both themes
101
101
  npm run verify # typecheck + tests + build + pack-and-consume gate
102
102
  ```
103
103
 
104
- ## Editing tokens — one source, three targets
104
+ ## Editing tokens — one source, four targets
105
105
 
106
106
  `tokens/vela.tokens.json` is the only place a value is written. It uses the W3C Design Tokens
107
107
  format (2025.10), ships inside the package as `@omkarux/vela/tokens.json`, and everything else is
108
108
  generated from it:
109
109
 
110
110
  ```bash
111
- npm run tokens # → src/styles/tokens.light.css + tokens.dark.body.css
111
+ npm run tokens # → src/styles/tokens.*.css + flutter/lib/vela_tokens.dart (a Flutter theme)
112
112
  npm run tokens:figma # → a Plugin API script that creates-or-updates every Figma variable
113
113
  npm run tokens:check # fails if the CSS was hand-edited instead of the JSON (runs in CI)
114
114
  npm run guidelines:figma # → a script that writes each spec's summary into its Figma description
@@ -130,7 +130,8 @@ Worth being precise about what travels and what doesn't:
130
130
 
131
131
  | Layer | Ports? |
132
132
  |---|---|
133
- | **Tokens** (`dist/tokens.css`) | **Entirely.** Plain CSS custom properties — Angular, Vue, Svelte, Rails, plain HTML. From the same source you could emit Swift, Kotlin or XML for native. |
133
+ | **Tokens** (`dist/tokens.css`) | **Entirely.** Plain CSS custom properties — Angular, Vue, Svelte, Rails, plain HTML. |
134
+ | **Tokens for Flutter** (`tokens.dart`) | **Entirely.** Generated from the same JSON: the primitives, a `VelaColors` `ThemeExtension` with `light` and `dark`, the sizing scale in logical pixels, the type ramp as `TextStyle`s and `velaThemeData(Brightness)`. Swift, Kotlin or XML would be the same kind of script. Widgets are not generated — they are built against `guidelines/`. |
134
135
  | **The contract** (`guidelines/`) | **Entirely.** Intent, closed prop sets, token bindings, accessibility, anti-patterns. Only the code samples are React-shaped. |
135
136
  | **Components** (`dist/index.js`) | **No.** One implementation per framework, by definition. |
136
137
  | **The contrast audit** (`npm run contrast`) | **Entirely.** It parses CSS and knows nothing about React. |
@@ -0,0 +1,16 @@
1
+ # vela_tokens
2
+
3
+ Vela's design tokens for Flutter. **Generated** — do not edit `lib/vela_tokens.dart` or `pubspec.yaml`.
4
+ Edit `../tokens/vela.tokens.json` and run `npm run tokens`; the same file generates the CSS and the
5
+ Figma library, so one token edit lands in all three.
6
+
7
+ | Symbol | What it is |
8
+ |---|---|
9
+ | `VelaPrimitives` | The raw palette. Alias only — never bind in a widget. |
10
+ | `VelaColors` | Every semantic colour as a field; a `ThemeExtension` with `light` and `dark` instances. |
11
+ | `VelaSizing` | Spacing, icon, control-height, radius and focus scales in logical pixels, plus motion. |
12
+ | `VelaTypography` | Font families, weights, sizes, and the ramp composed as `TextStyle`s. |
13
+ | `velaThemeData(Brightness)` | A `ThemeData` seeded from the semantics, with `VelaColors` installed as an extension. |
14
+
15
+ Use it as a path dependency (`vela_tokens: { path: ../vela/flutter }`) or vendor the one file.
16
+ Widgets are not generated: build them against `../guidelines/`, which is implementation-independent.