tokens-bruecke 3.18.0 → 3.20.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
@@ -1,3 +1,15 @@
1
+ ## [3.19.0](https://github.com/tokens-bruecke/figma-plugin/compare/v3.18.0...v3.19.0) (2026-10-14)
2
+
3
+ ### Features
4
+
5
+ - export FONT_FAMILY-scoped string variables as fontFamily tokens ([78f5d2b](https://github.com/tokens-bruecke/figma-plugin/commit/78f5d2bc37e785b9e64cab3384516e9d27c136e2)), closes [#118](https://github.com/tokens-bruecke/figma-plugin/issues/118)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **cli:** export REST layout grids like the plugin does ([dda46ff](https://github.com/tokens-bruecke/figma-plugin/commit/dda46ffc8b077b9bcf443887f7dd9005d68f5353))
10
+ - **import:** default font scopes only on new variables ([0ae37ed](https://github.com/tokens-bruecke/figma-plugin/commit/0ae37ed626c1308b5f9c96ac2c8cb114a1fee646))
11
+ - preserve exact font weight in text styles ([4a63036](https://github.com/tokens-bruecke/figma-plugin/commit/4a63036cfbb4664775c862d9bd6756aea8d5fd75))
12
+
1
13
  ## [3.18.0](https://github.com/tokens-bruecke/figma-plugin/compare/v3.17.1...v3.18.0) (2026-10-09)
2
14
 
3
15
  ### Bug Fixes
package/README.md CHANGED
@@ -40,6 +40,7 @@ TokensBruecke exports Figma variables and styles as design tokens JSON compatibl
40
40
  - [Options](#options)
41
41
  - [Snapshot input](#snapshot-input)
42
42
  - [CLI Configuration File](#cli-configuration-file)
43
+ - [Update notice](#update-notice)
43
44
  - [For AI agents](#for-ai-agents)
44
45
  - [Agentic usage without the REST API](#agentic-usage-without-the-rest-api)
45
46
  - [Use as a library](#use-as-a-library)
@@ -111,6 +112,7 @@ The plugin supports both **exporting** and **importing** design tokens:
111
112
  - ✅ Supports these color formats: HEX, RGBA CSS, RGBA Object, DTCG color objects (`srgb-dtcg`, `hsl-dtcg`, `oklch-dtcg`, through their `hex` fallback) and [color aliases with opacity](#color-aliases-with-opacity). HSLA CSS and HSLA Object can't be imported yet
112
113
  - ✅ Imports variable descriptions and `scopes`. Invalid scopes are reported, and scopes are skipped on `duration` and `cubicBezier` tokens. `$extensions.figma` (code syntax, variable IDs) is ignored
113
114
  - ✅ Imports `duration` and `cubicBezier` tokens as Figma motion variables (see [Motion variables](#motion-variables))
115
+ - ✅ Imports `fontFamily` and `fontWeight` tokens without `scopes` as new variables scoped to "Font family" and "Font weight", so they keep their type on the next export. Existing variables keep their scopes. A `fontFamily` list keeps only its first family, since a string variable holds one
114
116
 
115
117
  **What to know before importing:**
116
118
 
@@ -645,6 +647,16 @@ Save this JSON file and pass it to the CLI using the `--config` option. A JSON s
645
647
 
646
648
  Each style type in `includedStyles` is merged with its default, so `"text": { "isIncluded": true }` is enough: the group keeps its default name (`Typography-styles`) and the other style types stay excluded.
647
649
 
650
+ ### Update notice
651
+
652
+ The CLI checks npm at most once a day for a newer version. When there is one, it prints a single line to stderr after the export, even with `--quiet`:
653
+
654
+ ```
655
+ ℹ️ tokens-bruecke 3.20.0 is available (you ran 3.19.0). Use the latest version with: npx tokens-bruecke@latest
656
+ ```
657
+
658
+ It only asks npm for the version number — no tokens, file keys or config are sent — and it never installs anything. The check runs alongside the export with a 1.5s timeout, says nothing when offline, and caches the result in `~/.cache/tokens-bruecke` (or `$XDG_CACHE_HOME`). It is skipped when `CI` is set; set `TOKENS_BRUECKE_NO_UPDATE_CHECK=1` or `NO_UPDATE_NOTIFIER=1` to turn it off elsewhere.
659
+
648
660
  ### For AI agents
649
661
 
650
662
  This repository and the npm package ship agent-friendly docs:
@@ -654,7 +666,7 @@ This repository and the npm package ship agent-friendly docs:
654
666
  - [schemas/cli-options.schema.json](schemas/cli-options.schema.json) — machine-readable config schema
655
667
  - [schemas/tokens-snapshot.schema.json](schemas/tokens-snapshot.schema.json) — machine-readable input schema for `--input`
656
668
 
657
- For scripted/agent usage prefer `--stdout --quiet` (pure JSON on stdout, logs on stderr) and pass tokens via environment variables.
669
+ For scripted/agent usage prefer `--stdout --quiet` (pure JSON on stdout, logs on stderr) and pass tokens via environment variables. Run it as `npx tokens-bruecke@latest` so the agent always gets the newest release: plain `npx tokens-bruecke` can reuse an old cached copy. See [Update notice](#update-notice).
658
670
 
659
671
  #### Agentic usage without the REST API
660
672
 
@@ -665,7 +677,7 @@ If your agent can run code inside Figma — a Figma agent, an MCP server with `e
665
677
  | Figma Enterprise plan | Required | Not required |
666
678
  | Personal access / OAuth token | Required | Not required |
667
679
  | File must be published / shared with the token | Yes | No — works on whatever file is open |
668
- | Network calls | Several per export | None |
680
+ | Network calls to Figma | Several per export | None |
669
681
 
670
682
  The agent's job is only to dump data; the CLI still owns every transform, so aliases, modes, scopes and DTCG formatting behave exactly as they do in REST mode.
671
683
 
@@ -720,13 +732,13 @@ Text, effect and grid styles follow the same pattern — see [schemas/tokens-sna
720
732
 
721
733
  ```bash
722
734
  # From a file the agent wrote
723
- npx tokens-bruecke --input snapshot.json --output tokens.json
735
+ npx tokens-bruecke@latest --input snapshot.json --output tokens.json
724
736
 
725
737
  # Or straight from stdin, no temp file
726
- my-figma-agent dump-tokens | npx tokens-bruecke --input - --stdout --quiet > tokens.json
738
+ my-figma-agent dump-tokens | npx tokens-bruecke@latest --input - --stdout --quiet > tokens.json
727
739
 
728
740
  # All the usual options still apply
729
- npx tokens-bruecke --input snapshot.json --config config.json --split-by-mode --output ./tokens
741
+ npx tokens-bruecke@latest --input snapshot.json --config config.json --split-by-mode --output ./tokens
730
742
  ```
731
743
 
732
744
  Snapshot mode ignores `FIGMA_API_KEY` / `FIGMA_FILE_KEY`, so a token exported in the environment won't get in the way. Passing `--api-key`, `--oauth-token` or `--file-key` explicitly alongside `--input` is rejected as a conflict.
@@ -1261,6 +1273,7 @@ Unlike design tokens, Figma variables [support only 6 types](https://www.figma.c
1261
1273
  | FLOAT | opacity scopes (with %) | _string_ (e.g. `"10%"`) \* |
1262
1274
  | FLOAT | all other scopes | [dimension](https://www.designtokens.org/tr/2025.10/format/#dimension) \*\* |
1263
1275
  | STRING | only `FONT_WEIGHT` | [fontWeight](https://www.designtokens.org/tr/2025.10/format/#font-weight) |
1276
+ | STRING | only `FONT_FAMILY` | [fontFamily](https://www.designtokens.org/tr/2025.10/format/#font-family) |
1264
1277
  | STRING | all other scopes | _string_ \* |
1265
1278
  | TIMING | — | [duration](https://www.designtokens.org/tr/2025.10/format/#duration) \*\*\* |
1266
1279
  | EASING | — | [cubicBezier](https://www.designtokens.org/tr/2025.10/format/#cubic-bezier) or _string_ \*\*\*\* |
@@ -1305,9 +1318,10 @@ In order to validate types, the plugin uses the [Design Tokens types](https://gi
1305
1318
 
1306
1319
  ## Scopes limitations
1307
1320
 
1308
- Figma variables have no font weight or opacity type, so the plugin reads the variable's scopes to pick the token type:
1321
+ Figma variables have no font weight, font family or opacity type, so the plugin reads the variable's scopes to pick the token type:
1309
1322
 
1310
1323
  - A number or string variable whose only scope is `FONT_WEIGHT` becomes a `fontWeight` token. With any other scope next to it, it stays a `dimension` or `string`.
1324
+ - A string variable whose only scope is `FONT_FAMILY` becomes a `fontFamily` token. With any other scope next to it, it stays a `string`.
1311
1325
  - A number variable whose scopes are all `OPACITY` or `COLOR_OPACITY` (the opacity of a color variable) becomes a `number` token, or a `string` with `%` if [Use percentage for opacity](#use-percentage-for-opacity) is enabled. With any other scope next to them, it is exported as a `dimension`.
1312
1326
 
1313
1327
  ---