terrazzo-plugin-figma-json 0.1.0 → 0.1.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/README.md +13 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# terrazzo-plugin-figma-json
|
|
2
2
|
|
|
3
|
-
A [Terrazzo](https://terrazzo.app) plugin that converts W3C DTCG design tokens into Figma-compatible JSON format for import into Figma Variables.
|
|
3
|
+
A [Terrazzo](https://terrazzo.app) plugin that converts W3C DTCG design tokens into Figma-compatible JSON format for [import into Figma Variables](https://help.figma.com/hc/en-us/articles/15343816063383-Modes-for-variables#h_01KAGYPSFC984XDB4YWBCNRZJ7).
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
This plugin requires Terrazzo 2.0.0-beta.0 or later:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @terrazzo/cli@2.0.0-beta.0 @terrazzo/parser@2.0.0-beta.0
|
|
11
|
+
```
|
|
4
12
|
|
|
5
13
|
## Installation
|
|
6
14
|
|
|
@@ -49,7 +57,7 @@ npx tz build
|
|
|
49
57
|
|
|
50
58
|
## Output Structure
|
|
51
59
|
|
|
52
|
-
|
|
60
|
+
With a resolver file, the plugin splits output by resolver sets and modifier contexts:
|
|
53
61
|
|
|
54
62
|
```
|
|
55
63
|
dist/
|
|
@@ -60,7 +68,7 @@ dist/
|
|
|
60
68
|
└── breakpoint-small.figma.json
|
|
61
69
|
```
|
|
62
70
|
|
|
63
|
-
Without a resolver, all tokens are output to a single file.
|
|
71
|
+
Without a resolver, all tokens are output to a single file (`tokens.figma.json` by default).
|
|
64
72
|
|
|
65
73
|
## Supported Token Types
|
|
66
74
|
|
|
@@ -158,13 +166,7 @@ For cross-collection aliases (referencing tokens in a different output file):
|
|
|
158
166
|
|
|
159
167
|
## Color Space Conversion
|
|
160
168
|
|
|
161
|
-
Figma only supports
|
|
162
|
-
|
|
163
|
-
- Display P3, Rec2020, A98 RGB, ProPhoto RGB → sRGB
|
|
164
|
-
- OKLCH, OkLab, Lab, LCH → sRGB
|
|
165
|
-
- XYZ-D65, XYZ-D50, HWB, sRGB-linear → sRGB
|
|
166
|
-
|
|
167
|
-
Colors outside the sRGB gamut will be clipped with a warning.
|
|
169
|
+
Figma only supports sRGB and HSL color spaces. All other color spaces defined in the DTCG spec are converted to sRGB. Colors outside the sRGB gamut are clipped with a warning.
|
|
168
170
|
|
|
169
171
|
## Boolean Tokens
|
|
170
172
|
|
|
@@ -250,4 +252,4 @@ Token `c` will resolve to `b.x`, not `a.x`. This is a limitation of how the Terr
|
|
|
250
252
|
|
|
251
253
|
## License
|
|
252
254
|
|
|
253
|
-
MIT
|
|
255
|
+
[MIT](LICENSE)
|