@adobe/spectrum-design-data-mcp 1.1.80 → 1.1.81
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 +14 -0
- package/README.md +5 -0
- package/package.json +2 -2
- package/src/data/tokens.js +33 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# [**@adobe/spectrum-design-data-mcp**](https://github.com/adobe/spectrum-design-data-mcp)
|
|
2
2
|
|
|
3
|
+
## 1.1.81
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1539](https://github.com/adobe/spectrum-design-data/pull/1539) [`da64677`](https://github.com/adobe/spectrum-design-data/commit/da6467789ff0277102c4972703842fc0112e73eb) Thanks [@GarthDB](https://github.com/GarthDB)! - <!-- Copyright 2026 Adobe. All rights reserved. -->
|
|
8
|
+
|
|
9
|
+
Project canonical tokens into legacy maps for deprecated MCP compatibility.
|
|
10
|
+
- **sdk/wasm**: Add `Dataset.legacyOutput()` with embedded relationship records.
|
|
11
|
+
- **tools/spectrum-design-data-mcp**: Load tokens through wasm; keep existing tool APIs.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`da64677`](https://github.com/adobe/spectrum-design-data/commit/da6467789ff0277102c4972703842fc0112e73eb)]:
|
|
14
|
+
- @adobe/design-data-wasm@0.11.0
|
|
15
|
+
- @adobe/spectrum-component-api-schemas@6.1.63
|
|
16
|
+
|
|
3
17
|
## 1.1.80
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -22,6 +22,11 @@ This MCP server enables AI assistants to query and interact with Spectrum design
|
|
|
22
22
|
|
|
23
23
|
* **Node.js 20+**
|
|
24
24
|
|
|
25
|
+
For compatibility, token tools project the canonical embedded dataset through
|
|
26
|
+
`@adobe/design-data-wasm` instead of reading generated legacy token files.
|
|
27
|
+
Tool names and response shapes are unchanged. This package remains deprecated.
|
|
28
|
+
Workspace development requires `moon run sdk-wasm:build` before running its tests.
|
|
29
|
+
|
|
25
30
|
## Installation
|
|
26
31
|
|
|
27
32
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spectrum-design-data-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.81",
|
|
4
4
|
"description": "DEPRECATED — use @adobe/design-data-mcp (in-process wasm) instead. Model Context Protocol server for Spectrum design data including tokens, schemas, and component anatomy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
50
50
|
"commander": "^13.1.0",
|
|
51
|
-
"@adobe/
|
|
51
|
+
"@adobe/design-data-wasm": "0.11.0",
|
|
52
52
|
"@adobe/spectrum-component-api-schemas": "6.1.63"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
package/src/data/tokens.js
CHANGED
|
@@ -10,12 +10,42 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
let projection;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
async function loadProjection() {
|
|
16
|
+
if (!projection) {
|
|
17
|
+
projection = (async () => {
|
|
18
|
+
const { Dataset } = await import("@adobe/design-data-wasm");
|
|
19
|
+
const dataset = Dataset.embedded();
|
|
20
|
+
try {
|
|
21
|
+
const byFile = dataset.legacyOutput();
|
|
22
|
+
const flat = Object.assign({}, ...Object.values(byFile));
|
|
23
|
+
return { byFile, flat };
|
|
24
|
+
} finally {
|
|
25
|
+
dataset.free();
|
|
26
|
+
}
|
|
27
|
+
})();
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
return await projection;
|
|
31
|
+
} catch (cause) {
|
|
32
|
+
projection = undefined;
|
|
33
|
+
throw new Error(
|
|
34
|
+
"Unable to load canonical Spectrum tokens from @adobe/design-data-wasm. " +
|
|
35
|
+
"Ensure its Node package is installed and built with embedded data and legacyOutput().",
|
|
36
|
+
{ cause },
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function getTokenData() {
|
|
42
|
+
return (await loadProjection()).byFile;
|
|
43
|
+
}
|
|
16
44
|
|
|
17
45
|
/** Flat { tokenName: tokenData } map — used for alias resolution */
|
|
18
|
-
export
|
|
46
|
+
export async function getFlatTokenMap() {
|
|
47
|
+
return (await loadProjection()).flat;
|
|
48
|
+
}
|
|
19
49
|
|
|
20
50
|
/**
|
|
21
51
|
* Get available token categories (filenames without .json)
|