@maggioli-design-system/design-tokens 15.1.0 → 15.2.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 (60) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/README.md +4 -2
  3. package/dist/android/colors.xml +1 -1
  4. package/dist/config/magma-design-tokensrc.schema.json +336 -144
  5. package/dist/css/colors-hex-brand-rnd.css +2 -2
  6. package/dist/css/colors-hex-brand.css +2 -2
  7. package/dist/css/colors-hex-default.css +2 -2
  8. package/dist/css/colors-hex-label.css +2 -2
  9. package/dist/css/colors-hex-status.css +2 -2
  10. package/dist/css/colors-hex-theme.css +2 -2
  11. package/dist/css/colors-hex-tones.css +2 -2
  12. package/dist/css/colors-hex.css +2 -2
  13. package/dist/css/colors-rgb-brand-rnd.css +2 -2
  14. package/dist/css/colors-rgb-brand.css +2 -2
  15. package/dist/css/colors-rgb-default.css +2 -2
  16. package/dist/css/colors-rgb-label.css +2 -2
  17. package/dist/css/colors-rgb-status.css +2 -2
  18. package/dist/css/colors-rgb-theme.css +2 -2
  19. package/dist/css/colors-rgb-tones.css +2 -2
  20. package/dist/css/colors-rgb.css +2 -2
  21. package/dist/css/tailwind-theme-color.css +2 -2
  22. package/dist/css/tailwind-theme-typography.css +3 -3
  23. package/dist/css/transitions.css +3 -3
  24. package/dist/css/typography.css +2 -2
  25. package/dist/dtcg/base.tokens.json +140 -15
  26. package/dist/dtcg/mode-dark.tokens.json +12 -0
  27. package/dist/flutter/colors-brand-rnd.dart +2 -2
  28. package/dist/flutter/colors-brand.dart +2 -2
  29. package/dist/flutter/colors-default.dart +2 -2
  30. package/dist/flutter/colors-label.dart +2 -2
  31. package/dist/flutter/colors-status.dart +2 -2
  32. package/dist/flutter/colors-theme.dart +2 -2
  33. package/dist/flutter/colors-tones.dart +2 -2
  34. package/dist/flutter/colors.dart +2 -2
  35. package/dist/flutter/fonts.dart +2 -2
  36. package/dist/ios/StyleDictionaryColor.h +1 -1
  37. package/dist/ios/StyleDictionaryColor.m +1 -1
  38. package/dist/ios-swift/StyleDictionary.swift +1 -1
  39. package/dist/ios-swift/StyleDictionaryColor.swift +1 -1
  40. package/dist/js/colors-css-vars.js +2 -2
  41. package/dist/js/tailwind-colors-css-vars.js +2 -2
  42. package/dist/js/tailwind-font-family.js +2 -2
  43. package/dist/js/tailwind-font-size.js +2 -2
  44. package/dist/js/tailwind-leading.js +2 -2
  45. package/dist/js/tailwind-props.js +3 -3
  46. package/dist/js/tailwind-screens.js +2 -2
  47. package/dist/json/coolors.json +1 -1
  48. package/dist/json/css/transitions/default.json +1 -1
  49. package/dist/package.json +5 -4
  50. package/dist/playground/assets/index-CE3EqXXu.css +1 -0
  51. package/dist/playground/assets/index-DUEFtvvD.js +198 -0
  52. package/dist/playground/index.html +2 -2
  53. package/dist/scss/variables.scss +1 -1
  54. package/dist/src/lib/contrast-gate.js +7 -1
  55. package/dist/src/lib/schema.mjs +3 -1
  56. package/dist/src/lib/ui-server.mjs +26 -3
  57. package/dist/style-dictionary/tokens/css/transitions/default.json +1 -1
  58. package/package.json +5 -4
  59. package/dist/playground/assets/index-BQRBZT8v.css +0 -1
  60. package/dist/playground/assets/index-CqMKBcLW.js +0 -198
package/CHANGELOG.md ADDED
@@ -0,0 +1,150 @@
1
+ # Changelog
2
+
3
+ Every release of `@maggioli-design-system/design-tokens`, newest first. Each section is the body of the GitHub
4
+ release with the same tag, written by git-cliff from the conventional commits of the
5
+ package.
6
+
7
+ ## [design-tokens@15.2.1] - 2026-10-20
8
+
9
+ ### Bug Fixes
10
+
11
+ - *(design-tokens)* Ui no longer overwrites a JavaScript or package.json config with JSON
12
+ - *(design-tokens)* The CLI no longer prints Ajv strict-mode warnings on every start
13
+ - *(design-tokens,styles,magma)* The shadow ink stays dark in dark mode, no more light halo
14
+ - *(design-tokens,styles)* Transition-cosmetic animates translate, scale and rotate
15
+ - *(design-tokens)* The playground draft no longer wins silently over a changed config
16
+
17
+ ## [design-tokens@15.2.0] - 2026-10-15
18
+
19
+ ### Build
20
+
21
+ - *(design-tokens,identity,styles,svg-icons,icons,magma)* Ship CHANGELOG.md in every package
22
+
23
+ ### Features
24
+
25
+ - *(design-tokens)* Describe every semantic role and group in the DTCG export
26
+
27
+ ## [design-tokens@15.1.0] - 2026-10-14
28
+
29
+ ### Documentation
30
+
31
+ - *(magma,styles,design-tokens)* Rewrite the color docs on the semantic layer
32
+ - *(magma,styles,design-tokens)* Align the styles and design-tokens docs with the build
33
+
34
+ ### Features
35
+
36
+ - *(design-tokens)* Export every global token as DTCG 2025.10 JSON
37
+
38
+ ### Refactor
39
+
40
+ - *(design-tokens,styles)* Build the semantic layer as data in design-tokens
41
+ - *(design-tokens)* Export the DTCG helpers the styles globals reuse
42
+
43
+ ## [design-tokens@15.0.1] - 2026-10-05
44
+
45
+ ### Bug Fixes
46
+
47
+ - *(design-tokens)* Import the scale helpers in the playground themes section
48
+
49
+ ## [design-tokens@15.0.0] - 2026-09-30
50
+
51
+ ### Bug Fixes
52
+
53
+ - *(design-tokens)* Stop deepMerge from mutating module-level defaults
54
+ - *(design-tokens)* Make the published cli runnable
55
+ - *(design-tokens)* Keep the new-color dialog open on outside clicks
56
+ - *(design-tokens)* Make token export deterministic and writes reliable
57
+ - *(design-tokens)* Clear error when a color references an undefined ratios scale
58
+ - *(design-tokens)* Flag only real overrides in the groups view
59
+ - *(design-tokens)* Hide the playground picker in surfaces, groups and diff
60
+ - *(design-tokens)* Preview the neutral ink on colored surfaces, not #000
61
+ - *(design-tokens)* Playground surface preview - one family at a time, step charts on top
62
+ - *(design-tokens)* Retune the text targets so no two text roles collapse onto one step
63
+ - *(design-tokens)* Spell the leonardo background color name correctly
64
+
65
+ ### Changes
66
+
67
+ - *(design-tokens)* Raise the hue shift angle limit to 180 degrees
68
+ - *(design-tokens)* Easing-based distribution modes for contrast scales
69
+ - *(design-tokens)* Name colors via color-namer in the playground
70
+ - *(design-tokens)* Restructure playground navigation around colors, scales and groups
71
+ - *(design-tokens)* Select the first involved color when switching scale
72
+ - *(design-tokens)* Tag built-in-only ratio scales in the playground selects
73
+ - *(design-tokens)* Retune the default surface, border and text ramp
74
+
75
+ ### Documentation
76
+
77
+ - *(design-tokens)* Add configuration reference and generation model to readme
78
+ - *(design-tokens)* Document the nx playground target
79
+
80
+ ### Features
81
+
82
+ - *(design-tokens)* Add GIMP palette format and update configuration for design tokens
83
+ - *(design-tokens)* Add hue shifting support to color token generation
84
+ - *(design-tokens)* Add config playground with live palette preview
85
+ - *(design-tokens)* Make hue shift inheritance explicit in the playground
86
+ - *(design-tokens)* Load and download configs from the playground
87
+ - *(design-tokens)* Manage contrast scales in the playground
88
+ - *(design-tokens)* Full easing set and free scale deletion in the playground
89
+ - *(design-tokens)* Auto-name colors from their value in the playground
90
+ - *(design-tokens)* Create colors from a picker dialog in the playground
91
+ - *(design-tokens)* Group-level ratios and formula
92
+ - *(design-tokens)* Download generated tokens as a zip from the playground
93
+ - *(design-tokens)* Download menu with per-format token exports
94
+ - *(design-tokens)* Group-level export targets
95
+ - *(design-tokens)* Diversify CSS and GIMP downloads per export group
96
+ - *(design-tokens)* Batch export editing across groups in the playground
97
+ - *(design-tokens)* Toggle to show only selected color scales in groups
98
+ - *(design-tokens)* Add `ui` command serving the playground with a config API
99
+ - *(design-tokens)* Save, persist and reset the playground config in the ui
100
+ - *(design-tokens)* Add a JSON Schema and validate configs against it
101
+ - *(design-tokens)* Add a diff view to the playground
102
+ - *(design-tokens)* Group selected colors on top in the groups view
103
+ - *(design-tokens)* Export Figma color tokens in the DTCG standard format
104
+ - *(design-tokens)* Download DTCG Figma tokens from the playground
105
+ - *(design-tokens)* Flag built-in contrast scales in the playground
106
+ - *(design-tokens)* Lightness-based surface + border token engine (#571)
107
+ - *(design-tokens)* Explicit contrast bounds + ratio validation (#578)
108
+ - *(design-tokens)* Usable-band visualization in the scales playground (#578)
109
+ - *(design-tokens)* Surface editor view in the playground (#571)
110
+ - *(design-tokens)* Explain each semantic role in the surfaces view (#571)
111
+ - *(design-tokens)* [**breaking**] Emit --tone-*-seed for the pure extreme (#572)
112
+ - *(design-tokens)* Add by-target text-role engine (#591)
113
+ - *(design-tokens)* Text roles in the playground surface view (#591)
114
+ - *(design-tokens)* Add APCA contrast gate for semantic pairs (#575)
115
+ - *(design-tokens)* Add surface preview aids to the playground
116
+ - *(design-tokens)* Pick text-role step by worst-case surface (A7)
117
+ - *(design-tokens)* Back a foreground from any surface-opted family, not just tone
118
+ - *(design-tokens)* Derive themes from the surfaces opt-in in the playground
119
+ - *(design-tokens)* Slider per i lightness levels nel playground
120
+ - *(design-tokens)* Add the themes map to the semantic config
121
+ - *(design-tokens)* Make variant reference its source via the alias field
122
+ - *(design-tokens)* Declare the accent roles and gate their contrast
123
+ - *(design-tokens)* Alias-aware colors editor in playground
124
+ - *(design-tokens)* Declare accent interaction-state steps and gate them
125
+ - *(design-tokens)* Add shared accent theme-override helper and playground accent section
126
+ - *(design-tokens,stencil,styles)* Collapse accent roles to {accent, ai}
127
+ - *(design-tokens)* Enforce variant alias-only model in playground
128
+ - *(design-tokens)* Two-column themes workbench with tabbed preview
129
+ - *(design-tokens)* Opt a whole group into surfaces, with status always on
130
+ - *(design-tokens)* Promote semantic roles under pref-contrast-more
131
+ - *(design-tokens,styles,stencil)* Publish the hue role scales and promote them under pref-contrast-more
132
+ - *(design-tokens)* Retune the border ramp and gate it in the playground
133
+ - *(design-tokens,styles,stencil)* Retint the raw ramp with the theme via --magma-scale-*
134
+ - *(design-tokens,styles,stencil)* Give the colored hues the emphasis band states
135
+ - *(design-tokens,styles)* Give the neutral pills a wash band
136
+ - *(design-tokens,styles,stencil)* A shadow ink role, the ring family back, and a guard
137
+ - *(design-tokens)* Add the radius scale tuned for the squircle
138
+ - *(design-tokens)* Take the page to the paper of the mode under contrast-more
139
+ - *(design-tokens)* Move the accent ink to step 03
140
+ - *(design-tokens)* Add the less marked level of the inverse surface
141
+
142
+ ### Refactor
143
+
144
+ - *(design-tokens)* Retune built-in wcag3 ratios within the APCA band
145
+ - *(design-tokens)* Rifinisci il layout degli slider dei lightness levels
146
+ - *(design-tokens,styles,stencil)* Name the hue background levels wash-*, not surface-*
147
+
148
+ ### Styling
149
+
150
+ - *(design-tokens)* Cap hue shift slider width in the playground
package/README.md CHANGED
@@ -352,6 +352,8 @@ The playground works with any configuration, not just the repo one: **load confi
352
352
 
353
353
  CSS and GIMP respect export diversification: they emit the whole palette and one file per export group. When that yields more than one file the download is a zip (`magma-css.zip`, `magma-gimp.zip`); a single file downloads directly. The outputs are produced in the browser from the same Handlebars templates the build uses, so they match the CLI output. Editing is in-memory only: nothing touches the repo files.
354
354
 
355
+ A reload keeps the work: the playground mirrors it to the browser's localStorage as a draft, stamped with the configuration it was made on (the bundled one, or the file the [UI command](#ui-command) serves). When that configuration changed after the draft was saved (edited, removed, or another file), a draft with no edits of its own gives way to it, and a draft with edits shows why and asks: **use the file on disk** (or **use the bundled config**) or **keep the draft**. Saving stays off until you pick, so the draft cannot overwrite the newer file by mistake.
356
+
355
357
  New colors are created from a dialog: pick the value and the name auto-completes underneath from the "Name That Color" vocabulary (via [color-namer](https://github.com/colorjs/color-namer), ~1500 names, kebab-cased: e.g. `persian-green`); choose the token group, confirm, and the playground lands on the new color already selected. Names are made unique with a numeric suffix when needed. Auto-naming keeps following the picker in the editor too, but only for names assigned by the playground itself: a name typed by the user, or any name coming from a loaded configuration, is never touched. Picking a value already used by another color raises a warning.
356
358
 
357
359
  The **groups** view manages `ratios`, `formula` and `export` per token group (writing the `groups` section of the configuration), with a compact preview of every member color; colors overriding the group individually are flagged. The per-color fields in the editor default to inheriting from the group.
@@ -375,10 +377,10 @@ npx magma-design-tokens ui --port 4000 --config ./tokens/color.json
375
377
  It starts a small server (default port `5178`) that both serves the playground and exposes a local API:
376
378
 
377
379
  - `GET /api/config` reads the configuration via the same lookup as the CLI (respecting `--config`);
378
- - `PUT /api/config` writes it back with a stable key order, ASCII-only output and a trailing newline, so saves produce clean git diffs;
380
+ - `PUT /api/config` writes it back with a stable key order, ASCII-only output and a trailing newline, so saves produce clean git diffs. It only writes JSON rc files: a configuration found in a JavaScript module (`.magma-design-tokensrc.js`, `magma-design-tokens.config.mjs`, ...) or in the `magma-design-tokens` key of `package.json` is refused with `409`, since a save would replace it with bare JSON;
379
381
  - `POST /api/build` runs the full token generation on disk, honouring the `--outDir` / `--generate` / `--export-tokens` flags passed to `ui`.
380
382
 
381
- In this mode the playground loads the on-disk configuration on start and swaps **copy JSON** for a **save** button that persists to the resolved file; a `*` marks unsaved changes. The **download** menu gains **Build tokens on disk** to trigger the build endpoint. Run standalone (`nx run design-tokens:playground` or `npm run playground -w projects/design-tokens`) the API is absent and the playground keeps its in-memory, copy/download-only behaviour.
383
+ In this mode the playground loads the on-disk configuration on start and swaps **copy JSON** for a **save** button that persists to the resolved file; a `*` marks unsaved changes. With a JavaScript or `package.json` configuration the button reads **read-only** and a notice under the toolbar says why: edit that file by hand, or take the edits out with **download > Config (json)** and move to a `.magma-design-tokensrc.json`. The **download** menu gains **Build tokens on disk** to trigger the build endpoint. Run standalone (`nx run design-tokens:playground` or `npm run playground -w projects/design-tokens`) the API is absent and the playground keeps its in-memory, copy/download-only behaviour.
382
384
 
383
385
  ### Cli example
384
386
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!--
4
4
  Do not edit directly
5
- Generated on Wed, 14 Oct 2026 12:21:44 GMT
5
+ Generated on Tue, 20 Oct 2026 14:18:29 GMT
6
6
  -->
7
7
  <resources>
8
8
  <color name="color_tone_porcelain_light_1">#ff040506</color>