@epam/ai-dial-attachment-canvas 1.1.0-dev.99 → 1.2.0-dev.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/LazyContentBoundary-CL7J_W9c.js +166 -0
- package/PdfContent-DhfjgYL-.js +260 -0
- package/PdfContent.css +1 -0
- package/attachment-canvas-Bp6WeQws.js +12 -0
- package/bounded-raw-part-cache-BfbSxRIL-DD07NKh9.js +37832 -0
- package/chart-ex-B0DgG3Dt.js +1009 -0
- package/comment-occurrence-CqejEuts-7SeKCBXk.js +6 -0
- package/comment-ui-runtime-DEtgcmj7-B1G7PH4z.js +170 -0
- package/comment-ui-runtime-TLHustXJ-DWCXG2mL.js +2 -0
- package/comment-ui-runtime-lXwVOgjW-Be4RALsI.js +112 -0
- package/comments-CAn2A_Xh-CdgNAj0h.js +282 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts +4 -0
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts +14 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/CodeContent/CodeContent.d.ts +11 -0
- package/components/CodeContent/CodeContent.d.ts.map +1 -1
- package/components/HtmlContent/HtmlContent.d.ts +1 -3
- package/components/HtmlContent/HtmlContent.d.ts.map +1 -1
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts +73 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts.map +1 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +12 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -0
- package/components/OoxmlContent/OoxmlContent.d.ts +22 -0
- package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -0
- package/components/PdfContent/PdfContent.d.ts +50 -1
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts +12 -0
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts.map +1 -1
- package/constants/file.d.ts +6 -0
- package/constants/file.d.ts.map +1 -1
- package/context/AttachmentCanvasContext.d.ts +1 -1
- package/context/AttachmentCanvasContext.d.ts.map +1 -1
- package/delimited-text-worker-host-DcHj_JZt-DWJmaPag.js +25 -0
- package/docx-B9qBTEkj.js +29822 -0
- package/hooks/useMcpAppBridge/useMcpAppBridge.d.ts +23 -0
- package/hooks/useMcpAppBridge/useMcpAppBridge.d.ts.map +1 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts +64 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts.map +1 -0
- package/index.css +1 -2
- package/index.d.ts +11 -5
- package/index.d.ts.map +1 -1
- package/index.js +1072 -34844
- package/line-distribute-IsUGfHXm-DeITjLzJ.js +1234 -0
- package/line-metrics-CBbw80Ko-DoOuwYxZ.js +60 -0
- package/models/attachment-canvas.d.ts +272 -10
- package/models/attachment-canvas.d.ts.map +1 -1
- package/ooxml-highlight-surfaces-DhK1KJcR.js +294 -0
- package/package.json +19 -13
- package/pptx-dkJw0-Vx.js +9179 -0
- package/read-only-comment-decoration-BTnWEeo5-BNhbteYc.js +94 -0
- package/read-only-comment-margin-plStyGfE-mggNAMB_.js +189 -0
- package/render-worker-host-BEfLZvSL-COy91Rd8.js +7 -0
- package/render-worker-host-Ba6Fchqr-DZeKpMWD.js +7 -0
- package/render-worker-host-C3xwtHnv-BBGHFdo9.js +7 -0
- package/renderer-module-contract-Cu-GKuPd-Bt0YZuzB.js +10063 -0
- package/types/attachment-canvas.d.ts +19 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/content.d.ts +7 -0
- package/utils/content.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/utils/ooxml-highlight-geometry.d.ts +157 -0
- package/utils/ooxml-highlight-geometry.d.ts.map +1 -0
- package/utils/ooxml-highlight-surfaces.d.ts +42 -0
- package/utils/ooxml-highlight-surfaces.d.ts.map +1 -0
- package/utils/visualizer.d.ts +8 -0
- package/utils/visualizer.d.ts.map +1 -0
- package/utils/vite-external-matcher.d.ts +18 -0
- package/utils/vite-external-matcher.d.ts.map +1 -0
- package/visible-index-DPoQYSDt-9lRc-2Ik.js +162 -0
- package/xlsx-BAXMTJTG.js +8585 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AppBridge } from '@mcp-ui/client';
|
|
2
|
+
import { McpUiHostContext } from '@modelcontextprotocol/ext-apps/app-bridge';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
|
+
import { McpAppCanvasContent } from '../../models/attachment-canvas';
|
|
5
|
+
/** Outcome of the bridge's mount attempt. */
|
|
6
|
+
export interface UseMcpAppBridgeResult {
|
|
7
|
+
/** Connected bridge to hand to `AppFrame`, or `null` before it mounts or after it failed. */
|
|
8
|
+
appBridge: AppBridge | null;
|
|
9
|
+
/** Whether creating the bridge threw, so the caller can render its error state. */
|
|
10
|
+
hasFailed: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Owns one `AppBridge` for the lifetime of the component: creates it, answers
|
|
14
|
+
* the app's `ui/open-link`, `ui/request-display-mode`, `tools/call` and
|
|
15
|
+
* container-dimension requests from the latest `content`, pushes host-context
|
|
16
|
+
* changes to the app, and closes it on unmount.
|
|
17
|
+
*
|
|
18
|
+
* @param content MCP app content whose callbacks answer the app's requests.
|
|
19
|
+
* @param containerRef Element containing the sandbox iframe `AppFrame` mounts.
|
|
20
|
+
* @param liveHostContext Host context to push to the app whenever it changes.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useMcpAppBridge: (content: McpAppCanvasContent, containerRef: RefObject<HTMLDivElement | null>, liveHostContext: McpUiHostContext | undefined) => UseMcpAppBridgeResult;
|
|
23
|
+
//# sourceMappingURL=useMcpAppBridge.d.ts.map
|
|
@@ -0,0 +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,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AAoGxC,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,6FAA6F;IAC7F,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,mBAAmB,EAC5B,cAAc,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAC9C,iBAAiB,gBAAgB,GAAG,SAAS,KAC5C,qBA0FF,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CustomVisualizer, DisplayAttachment } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { CodeCanvasContent, ErrorCanvasContent, HtmlCanvasContent, ImageCanvasContent, JsonCanvasContent, MarkdownCanvasContent, OoxmlCanvasContent, PdfCanvasContent, PlainTextCanvasContent, VisualizerCanvasContent } from '../../models/attachment-canvas';
|
|
3
|
+
import { OoxmlFileType } from '../../types/attachment-canvas';
|
|
4
|
+
/**
|
|
5
|
+
* Content resolvers `useOpenAttachmentCanvas` calls to turn a
|
|
6
|
+
* `DisplayAttachment` into an `AttachmentCanvasContent` payload. The host
|
|
7
|
+
* implements every resolver — the hook itself never fetches or decodes
|
|
8
|
+
* attachment bytes, only decides which resolver to call and how to interpret
|
|
9
|
+
* a `null`/rejected result.
|
|
10
|
+
*/
|
|
11
|
+
export interface UseOpenAttachmentCanvasResolvers {
|
|
12
|
+
/** Resolves an image attachment's displayable URL. Returns `null` if unavailable. */
|
|
13
|
+
resolveImageContent(attachment: DisplayAttachment): ImageCanvasContent | null;
|
|
14
|
+
/** Resolves an attachment's plain-text content. Returns `null` if unavailable. */
|
|
15
|
+
resolveTextContent(attachment: DisplayAttachment): Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
16
|
+
/** Resolves an attachment's Markdown content. Returns `null` if unavailable. */
|
|
17
|
+
resolveMarkdownContent(attachment: DisplayAttachment): Promise<MarkdownCanvasContent | ErrorCanvasContent | null>;
|
|
18
|
+
/** Resolves an attachment's syntax-highlighted code content, given an optional language hint. Returns `null` if unavailable. */
|
|
19
|
+
resolveCodeContent(attachment: DisplayAttachment, language?: string): Promise<CodeCanvasContent | ErrorCanvasContent | null>;
|
|
20
|
+
/** Resolves an attachment's HTML content. Returns `null` if unavailable or rejected (e.g. exceeded a size limit). */
|
|
21
|
+
resolveHtmlContent(attachment: DisplayAttachment): Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
|
|
22
|
+
/** Resolves an attachment's PDF content. Returns `null` if unavailable. */
|
|
23
|
+
resolvePdfContent(attachment: DisplayAttachment): Promise<PdfCanvasContent | ErrorCanvasContent | null>;
|
|
24
|
+
/** Resolves an attachment's OOXML or CSV content for the given `@silurus/ooxml` format. Returns `null` if unavailable. */
|
|
25
|
+
resolveOoxmlContent(attachment: DisplayAttachment, format: OoxmlFileType): Promise<OoxmlCanvasContent | ErrorCanvasContent | null>;
|
|
26
|
+
/** Resolves an attachment's JSON content, falling back to plain text when the payload is not valid JSON. Returns `null` if unavailable. */
|
|
27
|
+
resolveJsonContent(attachment: DisplayAttachment): Promise<JsonCanvasContent | PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
28
|
+
/** Resolves an attachment against a matched custom-visualizer registry entry. Returns `null` when the payload cannot be fetched. */
|
|
29
|
+
resolveVisualizerContent(attachment: DisplayAttachment, visualizer: CustomVisualizer, themeId?: string): Promise<VisualizerCanvasContent | null>;
|
|
30
|
+
/** Resolves a reference-only attachment's `referenceUrl` (optionally carrying a page anchor) into PDF content. Returns `null` when the reference does not target a PDF. */
|
|
31
|
+
resolveReferencePdfContent(attachment: DisplayAttachment): PdfCanvasContent | null;
|
|
32
|
+
/** Resolves the attachment's downloadable URL, used for `Unsupported` content and as the HTML content's fallback `url`. */
|
|
33
|
+
resolveContentUrl(attachment: DisplayAttachment): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the attachment carries a text source `resolveHtmlContent`/
|
|
36
|
+
* `resolveTextContent` etc. can fetch from (inline data, a host-resolved
|
|
37
|
+
* download URL, or a locally-picked file). Used to distinguish "nothing to
|
|
38
|
+
* fetch" from "fetched and rejected" when an HTML resolver returns `null`.
|
|
39
|
+
*/
|
|
40
|
+
hasTextSource(attachment: DisplayAttachment): boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Options controlling `useOpenAttachmentCanvas`'s dispatch behavior beyond the
|
|
44
|
+
* content resolvers.
|
|
45
|
+
*/
|
|
46
|
+
export interface UseOpenAttachmentCanvasOptions {
|
|
47
|
+
/** Registry of custom visualizers matched by MIME type ahead of PDF/Markdown/JSON routing. */
|
|
48
|
+
customVisualizers: CustomVisualizer[];
|
|
49
|
+
/** Active theme id forwarded to a matched custom visualizer's layout. */
|
|
50
|
+
themeId?: string;
|
|
51
|
+
/** Called before the canvas opens for an image, file, pasted, or prompt attachment — never for audio. Lets the host close other panels first. */
|
|
52
|
+
onBeforeOpen?: () => void;
|
|
53
|
+
}
|
|
54
|
+
/** Signature of the `openAttachmentCanvas` function `useOpenAttachmentCanvas` returns. */
|
|
55
|
+
export type OpenAttachmentCanvas = (attachment: DisplayAttachment, canvasAttachmentId?: string) => Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Decides whether and how to open the attachment canvas for a given
|
|
58
|
+
* attachment, dispatching on its type and content, using only injected
|
|
59
|
+
* resolvers and callbacks — never an application React context.
|
|
60
|
+
*/
|
|
61
|
+
export declare const useOpenAttachmentCanvas: (resolvers: UseOpenAttachmentCanvasResolvers, options: UseOpenAttachmentCanvasOptions) => {
|
|
62
|
+
openAttachmentCanvas: OpenAttachmentCanvas;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=useOpenAttachmentCanvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOpenAttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AASnC,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AAUvC;;;;;;GAMG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qFAAqF;IACrF,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,IAAI,CAAC;IAC9E,kFAAkF;IAClF,kBAAkB,CAChB,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,sBAAsB,GAAG,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAC/D,gFAAgF;IAChF,sBAAsB,CACpB,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,qBAAqB,GAAG,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAC9D,gIAAgI;IAChI,kBAAkB,CAChB,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,iBAAiB,GAAG,kBAAkB,GAAG,IAAI,CAAC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E,iBAAiB,EAC7B,kBAAkB,CAAC,EAAE,MAAM,KACxB,OAAO,CAAC,OAAO,CAAC,CAAC;AA6BtB;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAClC,WAAW,gCAAgC,EAC3C,SAAS,8BAA8B,KACtC;IAAE,oBAAoB,EAAE,oBAAoB,CAAA;CAuR9C,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
._GzYRV{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;line-height:1.2}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{-webkit-user-select:none;user-select:none;margin-right:5px;font-size:1.2em}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{color:#000;margin-right:5px;font-weight:600}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{color:#fdf6e3;margin-right:5px;font-weight:bolder}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}.
|
|
2
|
-
/*$vite$:1*/
|
|
1
|
+
._GzYRV{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;line-height:1.2}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{-webkit-user-select:none;user-select:none;margin-right:5px;font-size:1.2em}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{color:#000;margin-right:5px;font-weight:600}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{color:#fdf6e3;margin-right:5px;font-weight:bolder}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}._container_1nhig_1{background:var(--cc-bg,var(--bg-layer-raised,#fcfcfc))}._containerLight_1nhig_5{background:var(--cc-bg,var(--bg-layer-base,#f5f7fa))}._openInNewTabButton_c1arc_1{color:var(--ac-open-in-new-tab-text,var(--text-accent,#1d4ed8))}._loadingOverlay_1aric_1{background-color:var(--mcp-loading-bg,var(--bg-layer-1,#e0e6f0))}._fullscreenFrame_1aric_20 iframe{width:100%!important;max-width:none!important;height:100%!important;max-height:none!important}._statusLabel_1aric_27{color:var(--mcp-status-text,var(--text-primary,#161b2d))}._errorIcon_1aric_31{color:var(--mcp-error-icon,var(--text-error,#ae2f2f))}._viewer_1w97n_2{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc))}._spreadsheetCanvas_1w97n_6{width:100%;height:100%;display:block}._formulaPanel_1w97n_12{border-color:var(--ac-ooxml-formula-border,var(--stroke-secondary,#d1dbea));background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc));color:var(--ac-ooxml-formula-text,var(--text-primary,#161b2d))}._formulaValue_1w97n_18{border-color:var(--ac-ooxml-formula-border,var(--stroke-secondary,#d1dbea));background:var(--ac-ooxml-formula-bg,var(--bg-layer-base,#f5f7fa));color:var(--ac-ooxml-formula-text,var(--text-primary,#161b2d))}._statusOverlay_1w97n_24{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc));color:var(--ac-status-text,var(--text-secondary,#57647a))}._errorIcon_1w97n_29{color:var(--ac-error-icon,var(--text-error,#ae2f2f))}._highlight_1w97n_37{border:1px solid var(--ac-ooxml-highlight-border,var(--stroke-accent,#5c8dea));background:var(--ac-ooxml-highlight-bg,transparent);opacity:.55;border-radius:2px}._highlight_1w97n_37[data-selected=true]{opacity:1;border-width:2px}._highlight_1w97n_37[data-clipped=true]{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}._loadingOverlay_12637_1{background-color:var(--vs-loading-bg,var(--bg-layer-sunken,#eef1f7))}._statusLabel_12637_5{color:var(--vs-status-text,var(--text-primary,#161b2d))}._errorIcon_12637_9{color:var(--vs-error-icon,var(--text-error,#ae2f2f))}._body_13ogb_4{color:var(--ac-text,var(--text-primary,#161b2d));font-family:var(--ac-font-family);font-size:var(--ac-font-size);font-weight:var(--ac-font-weight);line-height:var(--ac-line-height);letter-spacing:var(--ac-letter-spacing)}._statusLabel_13ogb_13{color:var(--ac-status-text,var(--text-secondary,#57647a))}._errorIcon_13ogb_17{color:var(--ac-error-icon,var(--text-error,#ae2f2f))}._jsonWrapper_13ogb_21{border-color:var(--ac-json-border,var(--stroke-secondary,#d1dbea));background-color:var(--ac-json-bg,var(--bg-layer-base,#f5f7fa))}._jsonLabel_13ogb_26{color:var(--ac-json-label,var(--text-primary,#161b2d))}._jsonClickableLabel_13ogb_30{color:var(--ac-json-clickable-label,var(--text-primary,#161b2d))}._jsonPunctuation_13ogb_34{color:var(--ac-json-punctuation,var(--text-secondary,#57647a))}._jsonStringValue_13ogb_38{color:var(--ac-json-string,var(--text-success,#007274))}._jsonNumberValue_13ogb_42{color:var(--ac-json-number,var(--text-accent,#1d4ed8))}._jsonBooleanValue_13ogb_46{color:var(--ac-json-boolean,var(--text-warning,#7f6300))}._jsonNullValue_13ogb_50{color:var(--ac-json-null,var(--text-secondary,#57647a))}._jsonExpandIcon_13ogb_54{color:var(--ac-json-toggle-icon,var(--text-secondary,#57647a))}._jsonExpandIcon_13ogb_54:hover{color:var(--ac-json-toggle-icon-hover,var(--text-primary,#161b2d))}._jsonExpandIcon_13ogb_54:after{content:"▶";vertical-align:middle;font-size:.6em}._jsonCollapseIcon_13ogb_67{color:var(--ac-json-toggle-icon,var(--text-secondary,#57647a))}._jsonCollapseIcon_13ogb_67:hover{color:var(--ac-json-toggle-icon-hover,var(--text-primary,#161b2d))}._jsonCollapseIcon_13ogb_67:after{content:"▼";vertical-align:middle;font-size:.6em}.pdf-container:has(+.pdf-container){padding:0}._jsonCollapsedContent_13ogb_84{color:var(--ac-json-collapsed-text,var(--text-secondary,#57647a));background-color:var(--ac-json-collapsed-bg,var(--bg-layer-raised,#fcfcfc));font-size:.75em}._jsonCollapsedContent_13ogb_84:after{content:"…"}
|
package/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
export { AttachmentCanvas } from './components/AttachmentCanvas/AttachmentCanvas';
|
|
2
|
-
export {
|
|
3
|
-
export type { CodeContentProps } from './components/CodeContent/CodeContent';
|
|
2
|
+
export { AttachmentCanvasBody } from './components/AttachmentCanvasBody/AttachmentCanvasBody';
|
|
4
3
|
export { AttachmentCanvasContainer } from './components/AttachmentCanvasContainer/AttachmentCanvasContainer';
|
|
5
4
|
export type { AttachmentCanvasContainerProps } from './components/AttachmentCanvasContainer/AttachmentCanvasContainer';
|
|
5
|
+
export { CodeContent } from './components/CodeContent/CodeContent';
|
|
6
|
+
export type { CodeContentLabels, CodeContentProps, } from './components/CodeContent/CodeContent';
|
|
7
|
+
export { McpAppCanvasRenderer } from './components/McpAppCanvasRenderer/McpAppCanvasRenderer';
|
|
8
|
+
export type { McpAppCanvasRendererProps } from './components/McpAppCanvasRenderer/McpAppCanvasRenderer';
|
|
6
9
|
export { AttachmentCanvasProvider, useAttachmentCanvas, } from './context/AttachmentCanvasContext';
|
|
7
10
|
export type { AttachmentCanvasContextValue } from './context/AttachmentCanvasContext';
|
|
11
|
+
export { useOpenAttachmentCanvas } from './hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas';
|
|
12
|
+
export type { OpenAttachmentCanvas, UseOpenAttachmentCanvasOptions, UseOpenAttachmentCanvasResolvers, } from './hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas';
|
|
13
|
+
export type { AttachmentCanvasBodyLabels, AttachmentCanvasBodyProps, AttachmentCanvasBodyStyles, AttachmentCanvasColors, AttachmentCanvasContent, AttachmentCanvasLabels, AttachmentCanvasProps, AttachmentCanvasStyles, AttachmentCanvasTypography, AudioCanvasContent, CodeCanvasContent, ErrorCanvasContent, HtmlCanvasContent, ImageCanvasContent, JsonCanvasContent, MarkdownCanvasContent, MarkdownTableCanvasContent, McpAppCanvasContent, McpAppDisplayMode, OoxmlCanvasContent, OoxmlCellAddress, OoxmlDocxHighlightLocation, OoxmlHighlight, OoxmlHighlightLocation, OoxmlPptxHighlightLocation, OoxmlXlsxHighlightLocation, PdfCanvasContent, PlainTextCanvasContent, UnsupportedCanvasContent, VisualizerCanvasContent, } from './models/attachment-canvas';
|
|
14
|
+
export { AttachmentContentType, AttachmentErrorType, OoxmlFileType, OoxmlHighlightKind, } from './types/attachment-canvas';
|
|
15
|
+
export { createForbiddenCanvasContent, createLoadErrorCanvasContent, createUnsupportedCanvasContent, extensionToLanguage, getOoxmlFileType, getOoxmlMimeType, isHtmlPreviewable, isOoxmlPreviewable, isTextPreviewable, } from './utils/content';
|
|
8
16
|
export { downloadAttachmentContent, isDownloadable } from './utils/download';
|
|
9
|
-
export {
|
|
10
|
-
export { AttachmentContentType, AttachmentErrorType, } from './types/attachment-canvas';
|
|
11
|
-
export type { AttachmentCanvasContent, PlainTextCanvasContent, ImageCanvasContent, AudioCanvasContent, MarkdownCanvasContent, JsonCanvasContent, PdfCanvasContent, CodeCanvasContent, HtmlCanvasContent, VisualizerCanvasContent, UnsupportedCanvasContent, ErrorCanvasContent, AttachmentCanvasColors, AttachmentCanvasTypography, AttachmentCanvasStyles, AttachmentCanvasLabels, AttachmentCanvasProps, } from './models/attachment-canvas';
|
|
17
|
+
export { findVisualizerForMime } from './utils/visualizer';
|
|
12
18
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAC7G,YAAY,EAAE,8BAA8B,EAAE,MAAM,kEAAkE,CAAC;AACvH,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EAAE,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AACxG,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,YAAY,EACV,oBAAoB,EACpB,8BAA8B,EA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