@maggioli-design-system/design-tokens 15.2.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 +10 -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 +1 -1
  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 +3 -3
  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 +3 -3
  59. package/dist/playground/assets/index-BQRBZT8v.css +0 -1
  60. package/dist/playground/assets/index-CBGr93ts.js +0 -198
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ Every release of `@maggioli-design-system/design-tokens`, newest first. Each sec
4
4
  release with the same tag, written by git-cliff from the conventional commits of the
5
5
  package.
6
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
+
7
17
  ## [design-tokens@15.2.0] - 2026-10-15
8
18
 
9
19
  ### Build
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 Thu, 15 Oct 2026 16:06:42 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>