@epam/ai-dial-attachment-canvas 1.4.0-dev.6 → 1.4.0-dev.66
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/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -1
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts +3 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +3 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -1
- package/hooks/useMcpAppBridge/useMcpAppBridge.d.ts +3 -1
- package/hooks/useMcpAppBridge/useMcpAppBridge.d.ts.map +1 -1
- package/index.js +596 -584
- package/models/attachment-canvas.d.ts +12 -0
- package/models/attachment-canvas.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA8b5E,wGAAwG;AACxG,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCanvasBody.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasBody/AttachmentCanvasBody.tsx"],"names":[],"mappings":"AAuBA,OAAO,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentCanvasBody.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasBody/AttachmentCanvasBody.tsx"],"names":[],"mappings":"AAuBA,OAAO,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAmjBhF,uNAAuN;AACvN,eAAO,MAAM,oBAAoB,iEAAiC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { McpUiHostContext } from '@modelcontextprotocol/ext-apps/app-bridge';
|
|
2
3
|
import { FC, ReactNode } from 'react';
|
|
3
4
|
import { AttachmentCanvasLabels } from '../../models/attachment-canvas';
|
|
4
5
|
/** Props for the AttachmentCanvasContainer component. */
|
|
@@ -37,6 +38,8 @@ export interface AttachmentCanvasContainerProps {
|
|
|
37
38
|
configurePdfWorker?: () => void | Promise<void>;
|
|
38
39
|
/** Called with the message text when a `Visualizer` or `GroupedVisualizer` iframe posts `SEND_MESSAGE`. Forwarded to `VisualizerCanvasRenderer` as `onSendMessage`; when omitted, those messages are ignored. */
|
|
39
40
|
onVisualizerSendMessage?: (content: string) => void;
|
|
41
|
+
/** Live host context for a mounted MCP App; replaces the `hostContext` captured when the canvas opened so theme and locale changes reach the app. */
|
|
42
|
+
mcpAppHostContext?: McpUiHostContext;
|
|
40
43
|
}
|
|
41
44
|
/** Context-connected container that renders `AttachmentCanvas` with download support. */
|
|
42
45
|
export declare const AttachmentCanvasContainer: FC<AttachmentCanvasContainerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCanvasContainer.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasContainer/AttachmentCanvasContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAqB,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,gCAAgC,CAAC;AAKxC,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6FAA6F;IAC7F,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,iNAAiN;IACjN,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentCanvasContainer.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasContainer/AttachmentCanvasContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAqB,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,gCAAgC,CAAC;AAKxC,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6FAA6F;IAC7F,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,iNAAiN;IACjN,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,qJAAqJ;IACrJ,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;CACtC;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAyKtE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { McpUiHostContext } from '@modelcontextprotocol/ext-apps/app-bridge';
|
|
1
2
|
import { Implementation } from '@modelcontextprotocol/sdk/types.js';
|
|
2
3
|
import { FC } from 'react';
|
|
3
4
|
import { McpAppCanvasContent } from '../../models/attachment-canvas';
|
|
@@ -11,6 +12,8 @@ export interface McpAppCanvasRendererProps {
|
|
|
11
12
|
loadingLabel?: string;
|
|
12
13
|
/** Called once the mounted app completes its `ui/initialize` handshake, with its declared name/version. Omitted when the app didn't declare an `appInfo`. */
|
|
13
14
|
onAppInfo?: (appInfo: Implementation) => void;
|
|
15
|
+
/** Live host context pushed to the app on every change. Replaces `content.hostContext`, which is only a snapshot taken when the canvas opened. */
|
|
16
|
+
hostContext?: McpUiHostContext;
|
|
14
17
|
}
|
|
15
18
|
/** Renders an MCP app in a sandboxed iframe inside the attachment canvas. */
|
|
16
19
|
export declare const McpAppCanvasRenderer: FC<McpAppCanvasRendererProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAppCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppCanvasRenderer/McpAppCanvasRenderer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,sDAAsD;AACtD,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6JAA6J;IAC7J,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"McpAppCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppCanvasRenderer/McpAppCanvasRenderer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,sDAAsD;AACtD,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6JAA6J;IAC7J,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,kJAAkJ;IAClJ,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAgBD,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA4I9D,CAAC"}
|
|
@@ -8,6 +8,8 @@ export interface UseMcpAppBridgeResult {
|
|
|
8
8
|
appBridge: AppBridge | null;
|
|
9
9
|
/** Whether creating the bridge threw, so the caller can render its error state. */
|
|
10
10
|
hasFailed: boolean;
|
|
11
|
+
/** Pushes the latest host context to the app; call it once the app finishes initializing so a change that landed during loading is not lost. */
|
|
12
|
+
replayHostContext: () => void;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Owns one `AppBridge` for the lifetime of the component: creates it, answers
|
|
@@ -17,7 +19,7 @@ export interface UseMcpAppBridgeResult {
|
|
|
17
19
|
*
|
|
18
20
|
* @param content MCP app content whose callbacks answer the app's requests.
|
|
19
21
|
* @param containerRef Element containing the sandbox iframe `AppFrame` mounts.
|
|
20
|
-
* @param liveHostContext Host context
|
|
22
|
+
* @param liveHostContext Host context that seeds the bridge, is pushed to the app whenever it changes, and is re-sent through `replayHostContext` once the app initializes.
|
|
21
23
|
*/
|
|
22
24
|
export declare const useMcpAppBridge: (content: McpAppCanvasContent, containerRef: RefObject<HTMLDivElement | null>, liveHostContext: McpUiHostContext | undefined) => UseMcpAppBridgeResult;
|
|
23
25
|
//# sourceMappingURL=useMcpAppBridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMcpAppBridge.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMcpAppBridge/useMcpAppBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,2CAA2C,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"useMcpAppBridge.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMcpAppBridge/useMcpAppBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AAsGxC,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,6FAA6F;IAC7F,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,EAAE,OAAO,CAAC;IACnB,gJAAgJ;IAChJ,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,mBAAmB,EAC5B,cAAc,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAC9C,iBAAiB,gBAAgB,GAAG,SAAS,KAC5C,qBAgJF,CAAC"}
|