@adobe/design-data-skill 2.0.3 → 2.2.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spectrum-design-data",
3
- "version": "2.0.3",
4
- "description": "Read-only Spectrum lookup: find official design tokens, inspect component options, resolve values across modes, and read design guidelines. Bundles the @adobe/design-data-mcp server.",
3
+ "version": "2.2.0",
4
+ "description": "Read-only Spectrum lookup: find official design tokens, inspect component options, resolve values across modes, read design guidelines, and render components to SVG or PNG. Bundles the @adobe/design-data-mcp server.",
5
5
  "author": {
6
6
  "name": "Adobe"
7
7
  },
package/.mcp.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "design-data": {
4
4
  "command": "npx",
5
- "args": ["-y", "@adobe/design-data-mcp@1.10.4"]
5
+ "args": ["-y", "@adobe/design-data-mcp@1.12.0"]
6
6
  }
7
7
  }
8
8
  }
package/README.md CHANGED
@@ -64,7 +64,7 @@ This installs only the skill. Add the MCP server to `.cursor/mcp.json` yourself:
64
64
  "mcpServers": {
65
65
  "design-data": {
66
66
  "command": "npx",
67
- "args": ["-y", "@adobe/design-data-mcp@1.10.4"]
67
+ "args": ["-y", "@adobe/design-data-mcp@1.12.0"]
68
68
  }
69
69
  }
70
70
  }
@@ -87,7 +87,9 @@ This installs only the skill. Add the MCP server to `.cursor/mcp.json` yourself:
87
87
  `DESIGN_DATA_SKIP_VERSION_CHECK=1` to disable it.
88
88
  * **Tools:** `design-data-primer`, `design-data-query`, `design-data-suggest`,
89
89
  `design-data-component`, `design-data-component-search`, `design-data-resolve`,
90
- `design-data-guideline-list`, `design-data-guideline`. Inputs are documented in
90
+ `design-data-guideline-list`, `design-data-guideline`,
91
+ `design-data-visual-recipe`, `design-data-render` (SVG, or PNG using Adobe Clean Spectrum VF
92
+ when it is installed, else an open fallback), `design-data-font-status`. Inputs are documented in
91
93
  [SKILL.md](https://github.com/adobe/spectrum-design-data/blob/main/tools/design-data-skill/skills/design-data/SKILL.md).
92
94
 
93
95
  ## Data and freshness
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-skill",
3
- "version": "2.0.3",
3
+ "version": "2.2.0",
4
4
  "description": "Read-only Spectrum design-data lookup plugin: a skill plus the bundled @adobe/design-data-mcp server",
5
5
  "type": "module",
6
6
  "files": [
@@ -34,7 +34,7 @@
34
34
  "design-data"
35
35
  ],
36
36
  "dependencies": {
37
- "@adobe/design-data-mcp": "1.10.4"
37
+ "@adobe/design-data-mcp": "1.12.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "ava": "^6.0.1"
@@ -8,13 +8,14 @@ description: >
8
8
  snapshot; it does not generate component code.
9
9
  metadata:
10
10
  author: adobe
11
- version: "2.0.3"
12
- designDataVersion: "3.11.4"
11
+ version: "2.2.0"
12
+ designDataVersion: "3.12.0"
13
13
  when_to_use: >
14
14
  Trigger on: token names (color, spacing, typography, dimension), "which token",
15
15
  "Spectrum component options", design-data primer, query tokens, suggest token,
16
- resolve token value, component schema, Spectrum guideline, @adobe/design-data-mcp.
17
- allowed-tools: mcp__plugin_spectrum-design-data_design-data__design-data-primer, mcp__plugin_spectrum-design-data_design-data__design-data-query, mcp__plugin_spectrum-design-data_design-data__design-data-suggest, mcp__plugin_spectrum-design-data_design-data__design-data-component, mcp__plugin_spectrum-design-data_design-data__design-data-component-search, mcp__plugin_spectrum-design-data_design-data__design-data-resolve, mcp__plugin_spectrum-design-data_design-data__design-data-guideline-list, mcp__plugin_spectrum-design-data_design-data__design-data-guideline
16
+ resolve token value, component schema, Spectrum guideline, render a component, component
17
+ preview or image (SVG or PNG), Adobe Clean font, @adobe/design-data-mcp.
18
+ allowed-tools: mcp__plugin_spectrum-design-data_design-data__design-data-primer, mcp__plugin_spectrum-design-data_design-data__design-data-query, mcp__plugin_spectrum-design-data_design-data__design-data-suggest, mcp__plugin_spectrum-design-data_design-data__design-data-component, mcp__plugin_spectrum-design-data_design-data__design-data-component-search, mcp__plugin_spectrum-design-data_design-data__design-data-resolve, mcp__plugin_spectrum-design-data_design-data__design-data-guideline-list, mcp__plugin_spectrum-design-data_design-data__design-data-guideline, mcp__plugin_spectrum-design-data_design-data__design-data-visual-recipe, mcp__plugin_spectrum-design-data_design-data__design-data-render, mcp__plugin_spectrum-design-data_design-data__design-data-font-status
18
19
  ---
19
20
 
20
21
  # Spectrum Design Data
@@ -42,7 +43,7 @@ skill was written for:
42
43
  "mcpServers": {
43
44
  "design-data": {
44
45
  "command": "npx",
45
- "args": ["-y", "@adobe/design-data-mcp@1.10.4"]
46
+ "args": ["-y", "@adobe/design-data-mcp@1.12.0"]
46
47
  }
47
48
  }
48
49
  }
@@ -103,6 +104,63 @@ when `ambiguous: true`, the `token` is only the top pick; narrow further or repo
103
104
  `designing`, `fundamentals`, `developing`, `support`). `design-data-guideline`
104
105
  returns one page by `id`, the `slug` from the list (e.g. `colors`).
105
106
 
107
+ ### `design-data-visual-recipe` and `design-data-render`
108
+
109
+ `design-data-visual-recipe` returns a component's visual recipe by `id`; only
110
+ components with a recipe are available (the error lists them). `design-data-render`
111
+ draws one. Required: `component`. Optional: `size` (default `m`), `states` (e.g.
112
+ `["hover"]`), `options` (object), `colorScheme`, `scale`, `label`, `width` (px),
113
+ `format` (`svg` by default, or `png`), `pixelRatio` (PNG only, 1 to 4, default 2) and
114
+ `fontPath` (PNG only, see Fonts).
115
+
116
+ * `svg` returns the markup as text. Its text is drawn in whatever font the viewer has.
117
+ * `png` returns an image and a JSON block `{ font, diagnostics }`. Show the image to the
118
+ user. Read `font` before describing it (see Fonts), and mention anything in
119
+ `diagnostics` that affects what they see.
120
+
121
+ PNG output and `design-data-font-status` need an `@adobe/design-data-mcp` newer than 1.11.0.
122
+ An older server ignores `format: "png"` and returns SVG text, and has no
123
+ `design-data-font-status` tool. If a `png` call returns text that starts with `<svg`, or the
124
+ status tool is missing, tell the user the MCP server is out of date and to update it (the
125
+ plugin's next release, or `npx -y @adobe/design-data-mcp` without a version pin); do not present
126
+ the SVG as a PNG.
127
+
128
+ ### `design-data-font-status`
129
+
130
+ Which font draws text in PNG renders: `{ found, fallback, using, rejected, related,
131
+ help, searched }`. Optional: `fontPath` to check a specific file. Call it before a
132
+ PNG when the user cares about typography, or any time a render's `font.fallback` is
133
+ true.
134
+
135
+ ## Fonts for PNG renders
136
+
137
+ PNG text uses **Adobe Clean Spectrum VF** when it is installed on the user's machine:
138
+ the server finds it by itself in the usual font folders and in Creative Cloud's font
139
+ cache, so there is nothing to ask the user for. When it is not installed, the server
140
+ draws text in a bundled open font (Source Sans 3) and says so.
141
+
142
+ Follow the status, not a guess:
143
+
144
+ * `font.found` is `true`: the real font was used. Do not tell the user to download or
145
+ install anything.
146
+ * `font.fallback` is `true`: say that the text is drawn in a similar open font and may
147
+ differ slightly in width, and do not call the image exact. Then pass on `font.help`.
148
+ For an Adobe employee that means: download `AdobeCleanSpectrumVF-Roman.ttf` from the
149
+ Brand Center (<https://inside.corp.adobe.com/content/inside/en/brand-center/font.html>,
150
+ employees only) and install it (double-click the file). If they are not at Adobe they
151
+ cannot get the font, so the fallback is the best this tool can do; say so plainly.
152
+ * `font.rejected` lists files that were found but cannot be used (for example the `.otf`
153
+ version: only the `.ttf` file works, and the Italic file is not used for upright
154
+ text). Tell the user which file and why.
155
+ * `font.related` lists other Adobe Clean fonts on the machine. Creative Cloud's "Adobe
156
+ Clean" is a different font from Adobe Clean Spectrum VF and is not used.
157
+ * The user says the font is installed but `found` is `false`: ask for the file's full
158
+ path and pass it as `fontPath`. To make it permanent, they set `DESIGN_DATA_FONT` to
159
+ that path in the MCP server's `env` (in the MCP configuration), or pick the file in the
160
+ extension's "Adobe Clean Spectrum VF font file" setting where the client has one.
161
+ * Never offer, attach, or paste the font file, and never describe the font as something
162
+ you can download for them.
163
+
106
164
  ## Workflow
107
165
 
108
166
  1. `design-data-primer` to see what data exists.
@@ -111,6 +169,8 @@ returns one page by `id`, the `slug` from the list (e.g. `colors`).
111
169
  4. `design-data-component-search`, then `design-data-component`, for component options.
112
170
  5. `design-data-resolve` for a concrete value in a given mode.
113
171
  6. `design-data-guideline-list`, then `design-data-guideline`, for design guidance.
172
+ 7. `design-data-render` to draw a component (SVG, or PNG with a font status to relay);
173
+ `design-data-visual-recipe` to read its recipe.
114
174
 
115
175
  ## Limits
116
176