@designid/tokens 1.2.2 → 1.2.4

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 CHANGED
@@ -10,7 +10,16 @@ The tokens are defined in a JSON file according to the [Design Tokens Community
10
10
 
11
11
  The build tokens can be used in various ways, such as in CSS files, CSS-in-JS libraries, CSS preprocessors, or even directly in your JavaScript or TypeScript code.
12
12
 
13
- You can also use the tokens in your design tools, like Figma, Sketch, Adobe XD, etc., to ensure that your design system is consistent across all platforms.
13
+ You can also use the tokens in your design tools, like Figma, Sketch, Adobe XD, etc., to ensure that your design system is consistent across all platforms.
14
+
15
+ ## ✨ Features
16
+
17
+ - 🎨 **W3C Design Token Format** - Full compliance with the W3C standard
18
+ - 🔄 **Figma Plugin** - Bidirectional sync between tokens and Figma variables/styles
19
+ - 📝 **Token Editor** - Web-based editor for managing tokens with CRUD operations
20
+ - 🎯 **Multiple Outputs** - Generate CSS, TypeScript, JSON, and more
21
+ - 🔧 **Watch Mode** - Auto-rebuild on file changes
22
+ - 📦 **Type-Safe** - Full TypeScript support with comprehensive types
14
23
 
15
24
  ## Get started
16
25
 
@@ -47,6 +56,62 @@ To build the design system tokens in development mode, you can use the `tokens-w
47
56
  bun tokens-watch
48
57
  ```
49
58
 
59
+ ## Figma Plugin
60
+
61
+ Synchronize design tokens between your codebase and Figma with bidirectional sync support.
62
+
63
+ ### Quick Start
64
+
65
+ 1. **Build the plugin:**
66
+ ```bash
67
+ bun ./scripts/build-figma-plugin.ts
68
+ ```
69
+
70
+ 2. **Install in Figma:**
71
+ - Open Figma Desktop App
72
+ - Go to **Menu → Plugins → Development → Import plugin from manifest...**
73
+ - Select `dist/figma/manifest.json`
74
+
75
+ 3. **Use the plugin:**
76
+ - Open any Figma file
77
+ - Run **Plugins → Development → @DesignID/tokens - Figma Sync**
78
+ - Import JSON tokens or load from Figma
79
+ - Click "Sync to Figma" to synchronize
80
+
81
+ ### Features
82
+
83
+ - ✅ **Bidirectional Sync** - Import from Figma or export to Figma
84
+ - 🎨 **Variables** - Colors, dimensions, typography properties
85
+ - 📝 **Styles** - Paint styles, text styles, effect styles
86
+ - 🌲 **Tree View** - Hierarchical token organization
87
+ - ✏️ **Live Editing** - Edit, add, delete tokens in real-time
88
+ - 📦 **JSON Import/Export** - Work with W3C Design Token Format files
89
+
90
+ ### Supported Token Types
91
+
92
+ | Token Type | Figma Output |
93
+ |------------|--------------|
94
+ | `color` | Variable + Paint Style |
95
+ | `dimension` | Variable (FLOAT) |
96
+ | `fontFamily`, `fontWeight`, `fontSize`, `lineHeight`, `letterSpacing` | Variables |
97
+ | `typography` | Text Style |
98
+ | `shadow` | Effect Style |
99
+ | `duration` | Variable (FLOAT) |
100
+
101
+ ### Documentation
102
+
103
+ - [Quick Start Guide](docs/FIGMA_PLUGIN_QUICKSTART.md) - Get started in 5 minutes
104
+ - [Integration Guide](docs/FIGMA_PLUGIN_INTEGRATION.md) - Detailed workflows and best practices
105
+ - [Plugin README](src/figma/README.md) - Technical documentation
106
+ - [Sample Tokens](docs/sample-tokens-for-figma.json) - Example token file for testing
107
+
108
+ ### Development
109
+
110
+ ```bash
111
+ # Watch mode for plugin development
112
+ bun ./scripts/watch-figma-plugin.ts
113
+ ```
114
+
50
115
  ## Token Editor
51
116
 
52
117
  A web-based editor for managing W3C Design Tokens with full CRUD operations, token references, and mode support.
@@ -137,6 +202,61 @@ The editor will be available at `http://localhost:3002` (or your custom port).
137
202
 
138
203
  For detailed documentation, see [src/editor/README.md](src/editor/README.md).
139
204
 
205
+ ## Figma Plugin
206
+
207
+ Synchronize your design tokens with Figma variables, styles, and effects.
208
+
209
+ ### Features
210
+
211
+ - 🔄 **Bidirectional Sync** - Push tokens to Figma or pull from Figma
212
+ - 📦 **Variable Support** - Colors, dimensions, typography primitives
213
+ - 🎨 **Style Support** - Paint styles, text styles, effect styles
214
+ - 📝 **Token Editor UI** - Full CRUD operations within Figma
215
+ - 📥 **Import/Export** - Work with JSON token files
216
+ - ✅ **W3C Compliant** - Uses W3C Design Token Format standard
217
+
218
+ ### Quick Start
219
+
220
+ 1. **Build the plugin:**
221
+ ```bash
222
+ bun run build:figma
223
+ ```
224
+
225
+ 2. **Install in Figma:**
226
+ - Open Figma Desktop App
227
+ - Go to **Menu → Plugins → Development → Import plugin from manifest...**
228
+ - Select `dist/figma/manifest.json`
229
+
230
+ 3. **Use the plugin:**
231
+ - Open plugin: **Plugins → Development → @DesignID/tokens - Figma Sync**
232
+ - Import your token JSON file
233
+ - Click "Sync to Figma"
234
+
235
+ ### Watch Mode for Development
236
+
237
+ ```bash
238
+ bun run watch:figma
239
+ ```
240
+
241
+ This watches `src/figma/` for changes and automatically rebuilds the plugin.
242
+
243
+ ### Supported Token Types
244
+
245
+ | Token Type | Figma Output |
246
+ |------------|-------------|
247
+ | `color` | Variable + Paint Style |
248
+ | `dimension`, `number` | Variable (FLOAT) |
249
+ | `fontFamily` | Variable (STRING) |
250
+ | `fontWeight`, `fontSize`, `lineHeight`, `letterSpacing` | Variable (FLOAT) |
251
+ | `typography` | Text Style |
252
+ | `shadow` | Effect Style |
253
+ | `duration` | Variable (FLOAT) |
254
+
255
+ ### Documentation
256
+
257
+ - [Figma Plugin README](src/figma/README.md) - Plugin usage and features
258
+ - [Integration Guide](docs/FIGMA_PLUGIN_INTEGRATION.md) - Detailed workflow and best practices
259
+
140
260
  ### File structure
141
261
  The file structure of the design system tokens is as follows in a typical web application project:
142
262