@modelcontextprotocol/ext-apps 1.1.2 → 1.2.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 +15 -12
- package/dist/src/app-bridge.js +8 -47
- package/dist/src/app-with-deps.js +10 -10
- package/dist/src/app.d.ts +108 -9
- package/dist/src/app.js +8 -47
- package/dist/src/generated/schema.d.ts +6 -6
- package/dist/src/generated/schema.json +5993 -0
- package/dist/src/react/index.js +8 -47
- package/dist/src/react/react-with-deps.js +29 -29
- package/dist/src/server/index.js +8 -47
- package/dist/src/spec.types.d.ts +1 -1
- package/package.json +9 -26
package/dist/src/spec.types.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type McpUiDisplayMode = "inline" | "fullscreen" | "pip";
|
|
|
28
28
|
/**
|
|
29
29
|
* @description CSS variable keys available to MCP apps for theming.
|
|
30
30
|
*/
|
|
31
|
-
export type McpUiStyleVariableKey = "--color-background-primary" | "--color-background-secondary" | "--color-background-tertiary" | "--color-background-inverse" | "--color-background-ghost" | "--color-background-info" | "--color-background-danger" | "--color-background-success" | "--color-background-warning" | "--color-background-disabled" | "--color-text-primary" | "--color-text-secondary" | "--color-text-tertiary" | "--color-text-inverse" | "--color-text-ghost" | "--color-text-info" | "--color-text-danger" | "--color-text-success" | "--color-text-warning" | "--color-text-disabled" | "--color-
|
|
31
|
+
export type McpUiStyleVariableKey = "--color-background-primary" | "--color-background-secondary" | "--color-background-tertiary" | "--color-background-inverse" | "--color-background-ghost" | "--color-background-info" | "--color-background-danger" | "--color-background-success" | "--color-background-warning" | "--color-background-disabled" | "--color-text-primary" | "--color-text-secondary" | "--color-text-tertiary" | "--color-text-inverse" | "--color-text-ghost" | "--color-text-info" | "--color-text-danger" | "--color-text-success" | "--color-text-warning" | "--color-text-disabled" | "--color-border-primary" | "--color-border-secondary" | "--color-border-tertiary" | "--color-border-inverse" | "--color-border-ghost" | "--color-border-info" | "--color-border-danger" | "--color-border-success" | "--color-border-warning" | "--color-border-disabled" | "--color-ring-primary" | "--color-ring-secondary" | "--color-ring-inverse" | "--color-ring-info" | "--color-ring-danger" | "--color-ring-success" | "--color-ring-warning" | "--font-sans" | "--font-mono" | "--font-weight-normal" | "--font-weight-medium" | "--font-weight-semibold" | "--font-weight-bold" | "--font-text-xs-size" | "--font-text-sm-size" | "--font-text-md-size" | "--font-text-lg-size" | "--font-heading-xs-size" | "--font-heading-sm-size" | "--font-heading-md-size" | "--font-heading-lg-size" | "--font-heading-xl-size" | "--font-heading-2xl-size" | "--font-heading-3xl-size" | "--font-text-xs-line-height" | "--font-text-sm-line-height" | "--font-text-md-line-height" | "--font-text-lg-line-height" | "--font-heading-xs-line-height" | "--font-heading-sm-line-height" | "--font-heading-md-line-height" | "--font-heading-lg-line-height" | "--font-heading-xl-line-height" | "--font-heading-2xl-line-height" | "--font-heading-3xl-line-height" | "--border-radius-xs" | "--border-radius-sm" | "--border-radius-md" | "--border-radius-lg" | "--border-radius-xl" | "--border-radius-full" | "--border-width-regular" | "--shadow-hairline" | "--shadow-sm" | "--shadow-md" | "--shadow-lg";
|
|
32
32
|
/**
|
|
33
33
|
* @description Style variables for theming MCP apps.
|
|
34
34
|
*
|
package/package.json
CHANGED
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
"url": "https://github.com/modelcontextprotocol/ext-apps"
|
|
6
6
|
},
|
|
7
7
|
"homepage": "https://github.com/modelcontextprotocol/ext-apps",
|
|
8
|
-
"version": "1.1
|
|
8
|
+
"version": "1.2.1",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"description": "MCP Apps SDK — Enable MCP servers to display interactive user interfaces in conversational clients.",
|
|
11
11
|
"type": "module",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20"
|
|
14
|
+
},
|
|
12
15
|
"main": "./dist/src/app.js",
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
@@ -44,14 +47,13 @@
|
|
|
44
47
|
"examples/*"
|
|
45
48
|
],
|
|
46
49
|
"scripts": {
|
|
47
|
-
"postinstall": "node scripts/setup-bun.mjs || echo 'setup-bun.mjs failed or not available'",
|
|
48
50
|
"start": "npm run examples:dev",
|
|
49
51
|
"generate:schemas": "tsx scripts/generate-schemas.ts && prettier --write \"src/generated/**/*\"",
|
|
50
52
|
"sync:snippets": "bun scripts/sync-snippets.ts",
|
|
51
53
|
"build": "npm run generate:schemas && npm run sync:snippets && node scripts/run-bun.mjs build.bun.ts && node scripts/link-self.mjs",
|
|
52
54
|
"prepack": "npm run build",
|
|
53
55
|
"build:all": "npm run examples:build",
|
|
54
|
-
"test": "bun test src",
|
|
56
|
+
"test": "bun test src examples",
|
|
55
57
|
"test:e2e": "playwright test",
|
|
56
58
|
"test:e2e:update": "playwright test --update-snapshots",
|
|
57
59
|
"test:e2e:ui": "playwright test --ui",
|
|
@@ -62,10 +64,10 @@
|
|
|
62
64
|
"examples:start": "NODE_ENV=development npm run build && bun examples/run-all.ts start",
|
|
63
65
|
"examples:dev": "NODE_ENV=development bun examples/run-all.ts dev",
|
|
64
66
|
"watch": "nodemon --watch src --ext ts,tsx --exec 'bun build.bun.ts'",
|
|
65
|
-
"prepare": "
|
|
67
|
+
"prepare": "npm run build && husky",
|
|
66
68
|
"docs": "typedoc",
|
|
67
69
|
"docs:watch": "typedoc --watch",
|
|
68
|
-
"generate:screenshots": "npm run build:all && docker run --rm -e EXAMPLE -v $(pwd):/work -w /work mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'apt-get update -qq && apt-get install -qq -y python3-venv curl > /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && npm i -g bun && npm ci && npx playwright test tests/e2e/generate-grid-screenshots.spec.ts'",
|
|
70
|
+
"generate:screenshots": "npm run build:all && docker run --rm -e EXAMPLE -e GENERATE_SCREENSHOTS=1 -v $(pwd):/work -w /work mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'apt-get update -qq && apt-get install -qq -y python3-venv curl > /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && npm i -g bun && npm ci && npx playwright test tests/e2e/generate-grid-screenshots.spec.ts'",
|
|
69
71
|
"prettier": "prettier -u \"**/*.{js,jsx,ts,tsx,mjs,json,md,yml,yaml}\" --check",
|
|
70
72
|
"prettier:fix": "prettier -u \"**/*.{js,jsx,ts,tsx,mjs,json,md,yml,yaml}\" --write",
|
|
71
73
|
"check:versions": "node scripts/check-versions.mjs",
|
|
@@ -77,9 +79,10 @@
|
|
|
77
79
|
"@modelcontextprotocol/sdk": "1.25.2",
|
|
78
80
|
"@playwright/test": "1.57.0",
|
|
79
81
|
"@types/bun": "^1.3.2",
|
|
82
|
+
"@types/node": "20.19.27",
|
|
80
83
|
"@types/react": "^19.2.2",
|
|
81
84
|
"@types/react-dom": "^19.2.2",
|
|
82
|
-
"
|
|
85
|
+
"bun": "^1.2.21",
|
|
83
86
|
"caniuse-lite": "1.0.30001763",
|
|
84
87
|
"cheerio": "1.1.2",
|
|
85
88
|
"concurrently": "^9.2.1",
|
|
@@ -117,30 +120,10 @@
|
|
|
117
120
|
"optional": true
|
|
118
121
|
}
|
|
119
122
|
},
|
|
120
|
-
"optionalDependencies": {
|
|
121
|
-
"@oven/bun-darwin-aarch64": "^1.2.21",
|
|
122
|
-
"@oven/bun-darwin-x64": "^1.2.21",
|
|
123
|
-
"@oven/bun-darwin-x64-baseline": "^1.2.21",
|
|
124
|
-
"@oven/bun-linux-aarch64": "^1.2.21",
|
|
125
|
-
"@oven/bun-linux-aarch64-musl": "^1.2.21",
|
|
126
|
-
"@oven/bun-linux-x64": "^1.2.21",
|
|
127
|
-
"@oven/bun-linux-x64-baseline": "^1.2.21",
|
|
128
|
-
"@oven/bun-linux-x64-musl": "^1.2.21",
|
|
129
|
-
"@oven/bun-linux-x64-musl-baseline": "^1.2.21",
|
|
130
|
-
"@oven/bun-windows-x64": "^1.2.21",
|
|
131
|
-
"@oven/bun-windows-x64-baseline": "^1.2.21",
|
|
132
|
-
"@rollup/rollup-darwin-arm64": "^4.53.3",
|
|
133
|
-
"@rollup/rollup-darwin-x64": "^4.53.3",
|
|
134
|
-
"@rollup/rollup-linux-arm64-gnu": "^4.53.3",
|
|
135
|
-
"@rollup/rollup-linux-x64-gnu": "^4.53.3",
|
|
136
|
-
"@rollup/rollup-win32-arm64-msvc": "^4.53.3",
|
|
137
|
-
"@rollup/rollup-win32-x64-msvc": "^4.53.3"
|
|
138
|
-
},
|
|
139
123
|
"overrides": {
|
|
140
124
|
"seroval": "1.4.1",
|
|
141
125
|
"seroval-plugins": "1.4.2",
|
|
142
126
|
"solid-js": "1.9.10",
|
|
143
|
-
"@hono/node-server": "1.19.7",
|
|
144
127
|
"@types/node": "20.19.27"
|
|
145
128
|
}
|
|
146
129
|
}
|