@epam/ai-dial-mcp-apps 1.3.0-dev.331 → 1.3.0-dev.342
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.
|
@@ -21,6 +21,8 @@ export interface McpAppInlinePreviewProps {
|
|
|
21
21
|
actionsGroupAriaLabel?: string;
|
|
22
22
|
/** Message shown when the resource fails to load or the app fails to initialize. */
|
|
23
23
|
loadErrorLabel: string;
|
|
24
|
+
/** Accessible label of the spinner shown while the app loads. Defaults to `'Loading app'`. */
|
|
25
|
+
loadingAriaLabel?: string;
|
|
24
26
|
/**
|
|
25
27
|
* Whether this message's MCP App is currently open in the full-width
|
|
26
28
|
* canvas. When `true`, the header stays (so the tool/app identity is still
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAppInlinePreview.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppInlinePreview/McpAppInlinePreview.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAG/B,qDAAqD;AACrD,MAAM,WAAW,wBAAwB;IACvC,uCAAuC;IACvC,KAAK,EAAE,aAAa,CAAC;IACrB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,uIAAuI;IACvI,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,6GAA6G;IAC7G,WAAW,EAAE,iBAAiB,CAAC;IAC/B,kEAAkE;IAClE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,eAAe,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oFAAoF;IACpF,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,sEAAsE;IACtE,UAAU,CAAC,EAAE,6BAA6B,CAAC;CAC5C;
|
|
1
|
+
{"version":3,"file":"McpAppInlinePreview.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppInlinePreview/McpAppInlinePreview.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAG/B,qDAAqD;AACrD,MAAM,WAAW,wBAAwB;IACvC,uCAAuC;IACvC,KAAK,EAAE,aAAa,CAAC;IACrB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,uIAAuI;IACvI,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,6GAA6G;IAC7G,WAAW,EAAE,iBAAiB,CAAC;IAC/B,kEAAkE;IAClE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,eAAe,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oFAAoF;IACpF,cAAc,EAAE,MAAM,CAAC;IACvB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,sEAAsE;IACtE,UAAU,CAAC,EAAE,6BAA6B,CAAC;CAC5C;AA0MD,iHAAiH;AACjH,eAAO,MAAM,mBAAmB,gEAAgC,CAAC"}
|
package/index.js
CHANGED
|
@@ -151,34 +151,34 @@ var T = {
|
|
|
151
151
|
placeholderText: "_placeholderText_1xqr3_30",
|
|
152
152
|
errorIcon: "_errorIcon_1xqr3_34",
|
|
153
153
|
errorText: "_errorText_1xqr3_38"
|
|
154
|
-
}, U = g(({ match: e, toolCall: n, cache: g, cacheKey: y, hostAdapter: b, onExpand: D, expandAriaLabel: O, reloadAriaLabel: k, actionsGroupAriaLabel: A = "MCP app actions", loadErrorLabel: j,
|
|
155
|
-
let { headerNameClassName:
|
|
154
|
+
}, U = g(({ match: e, toolCall: n, cache: g, cacheKey: y, hostAdapter: b, onExpand: D, expandAriaLabel: O, reloadAriaLabel: k, actionsGroupAriaLabel: A = "MCP app actions", loadErrorLabel: j, loadingAriaLabel: M = "Loading app", isOpenedInCanvas: N = !1, openedInCanvasLabel: P, colors: F, typography: I }) => {
|
|
155
|
+
let { headerNameClassName: L = "dial-tiny-lead-semi-text", messageClassName: R = "dial-body-text" } = I ?? {}, [z, B] = x(void 0);
|
|
156
156
|
v(() => {
|
|
157
|
-
|
|
157
|
+
B(void 0);
|
|
158
158
|
}, [y]);
|
|
159
|
-
let
|
|
160
|
-
"--mcpapp-preview-bg":
|
|
161
|
-
"--mcpapp-preview-border":
|
|
162
|
-
"--mcpapp-preview-header-border":
|
|
163
|
-
"--mcpapp-header-text":
|
|
164
|
-
"--mcpapp-placeholder-text":
|
|
165
|
-
"--mcpapp-error-icon":
|
|
166
|
-
"--mcpapp-error-text":
|
|
167
|
-
}), { status:
|
|
168
|
-
if (
|
|
169
|
-
let
|
|
170
|
-
return
|
|
171
|
-
style:
|
|
159
|
+
let U = _((e) => e === "fullscreen" ? (D(), "fullscreen") : "inline", [D]), W = r({
|
|
160
|
+
"--mcpapp-preview-bg": F?.previewBackground,
|
|
161
|
+
"--mcpapp-preview-border": F?.previewBorder,
|
|
162
|
+
"--mcpapp-preview-header-border": F?.previewHeaderBorder,
|
|
163
|
+
"--mcpapp-header-text": F?.headerText,
|
|
164
|
+
"--mcpapp-placeholder-text": F?.placeholderText,
|
|
165
|
+
"--mcpapp-error-icon": F?.errorIcon,
|
|
166
|
+
"--mcpapp-error-text": F?.errorText
|
|
167
|
+
}), { status: G, content: K, reload: q, attemptId: J } = V(e, n, g, y, b, U);
|
|
168
|
+
if (G === E.Unavailable) return null;
|
|
169
|
+
let Y = "";
|
|
170
|
+
return N ? Y = P : G === E.Error && (Y = j), /* @__PURE__ */ w("div", {
|
|
171
|
+
style: W,
|
|
172
172
|
className: f(H.preview, "flex w-full min-w-0 flex-col overflow-hidden rounded-xl border", T.preview),
|
|
173
173
|
children: [/* @__PURE__ */ w("div", {
|
|
174
174
|
className: f(H.previewHeader, "flex min-h-10 items-center justify-between gap-2 border-b px-4 py-2", T.previewHeader),
|
|
175
175
|
children: [/* @__PURE__ */ C(s, {
|
|
176
|
-
text:
|
|
177
|
-
className:
|
|
176
|
+
text: z == null ? /* @__PURE__ */ C("span", {
|
|
177
|
+
className: L,
|
|
178
178
|
children: e.mcpToolName
|
|
179
179
|
}) : /* @__PURE__ */ w(S, { children: [
|
|
180
180
|
/* @__PURE__ */ C("span", {
|
|
181
|
-
className:
|
|
181
|
+
className: L,
|
|
182
182
|
children: e.mcpToolName
|
|
183
183
|
}),
|
|
184
184
|
/* @__PURE__ */ C("span", {
|
|
@@ -186,8 +186,8 @@ var T = {
|
|
|
186
186
|
className: "mx-1.5 inline-block h-3 w-0 border-s border-current align-middle"
|
|
187
187
|
}),
|
|
188
188
|
/* @__PURE__ */ C("span", {
|
|
189
|
-
className:
|
|
190
|
-
children:
|
|
189
|
+
className: L,
|
|
190
|
+
children: z.name
|
|
191
191
|
})
|
|
192
192
|
] }),
|
|
193
193
|
className: H.headerText
|
|
@@ -203,7 +203,7 @@ var T = {
|
|
|
203
203
|
}),
|
|
204
204
|
"aria-label": k,
|
|
205
205
|
size: o.Small,
|
|
206
|
-
onClick:
|
|
206
|
+
onClick: q
|
|
207
207
|
}), /* @__PURE__ */ C(c, {
|
|
208
208
|
icon: /* @__PURE__ */ C(m, {
|
|
209
209
|
size: i.SM,
|
|
@@ -220,20 +220,20 @@ var T = {
|
|
|
220
220
|
children: [/* @__PURE__ */ C(l, {
|
|
221
221
|
visuallyHidden: !0,
|
|
222
222
|
as: u.Span,
|
|
223
|
-
children:
|
|
224
|
-
}),
|
|
223
|
+
children: Y
|
|
224
|
+
}), N ? /* @__PURE__ */ C("div", {
|
|
225
225
|
"aria-hidden": !0,
|
|
226
226
|
className: "absolute inset-0 flex items-center justify-center p-4",
|
|
227
227
|
children: /* @__PURE__ */ C("span", {
|
|
228
|
-
className: f(
|
|
229
|
-
children:
|
|
228
|
+
className: f(R, "text-center", H.placeholderText),
|
|
229
|
+
children: P
|
|
230
230
|
})
|
|
231
231
|
}) : /* @__PURE__ */ w(S, { children: [
|
|
232
|
-
|
|
232
|
+
G === E.Loading && /* @__PURE__ */ C("div", {
|
|
233
233
|
className: "absolute inset-0 flex items-center justify-center",
|
|
234
|
-
children: /* @__PURE__ */ C(d, {})
|
|
234
|
+
children: /* @__PURE__ */ C(d, { ariaLabel: M })
|
|
235
235
|
}),
|
|
236
|
-
|
|
236
|
+
G === E.Error && /* @__PURE__ */ w("div", {
|
|
237
237
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
|
|
238
238
|
children: [/* @__PURE__ */ C(p, {
|
|
239
239
|
size: 40,
|
|
@@ -242,15 +242,15 @@ var T = {
|
|
|
242
242
|
className: H.errorIcon
|
|
243
243
|
}), /* @__PURE__ */ C("p", {
|
|
244
244
|
"aria-hidden": !0,
|
|
245
|
-
className: f(
|
|
245
|
+
className: f(R, "text-center", H.errorText),
|
|
246
246
|
children: j
|
|
247
247
|
})]
|
|
248
248
|
}),
|
|
249
|
-
|
|
250
|
-
content:
|
|
249
|
+
G === E.Ready && K && /* @__PURE__ */ C(t, {
|
|
250
|
+
content: K,
|
|
251
251
|
errorLabel: j,
|
|
252
|
-
onAppInfo:
|
|
253
|
-
},
|
|
252
|
+
onAppInfo: B
|
|
253
|
+
}, J)
|
|
254
254
|
] })]
|
|
255
255
|
})]
|
|
256
256
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-mcp-apps",
|
|
3
3
|
"description": "Host-agnostic MCP Apps building blocks — tool-call/message matching, the response cache, and the inline preview hook/component shared by the full-width canvas and inline surfaces",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.342",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.50.0",
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
22
|
-
"@epam/ai-dial-attachment-canvas": "1.3.0-dev.
|
|
22
|
+
"@epam/ai-dial-attachment-canvas": "1.3.0-dev.342"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
26
|
-
"@epam/ai-dial-ui-kit": "^0.16.0
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.342",
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
27
27
|
"react": "^19.2.8"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|