@epam/ai-dial-attachment-canvas 1.0.0-rc.7 → 1.0.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/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -1
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +12 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -0
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts +64 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.d.ts +4 -1
- package/index.d.ts.map +1 -1
- package/index.js +18484 -3335
- package/models/attachment-canvas.d.ts +24 -1
- package/models/attachment-canvas.d.ts.map +1 -1
- package/package.json +6 -4
- package/types/attachment-canvas.d.ts +1 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/utils/visualizer.d.ts +8 -0
- package/utils/visualizer.d.ts.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAyT5E,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":"AAUA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentCanvasBody.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasBody/AttachmentCanvasBody.tsx"],"names":[],"mappings":"AAUA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAwXhF,uNAAuN;AACvN,eAAO,MAAM,oBAAoB,iEAAiC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { McpAppCanvasContent } from '../../models/attachment-canvas';
|
|
3
|
+
/** Props for the `McpAppCanvasRenderer` component. */
|
|
4
|
+
export interface McpAppCanvasRendererProps {
|
|
5
|
+
/** MCP App content to render. */
|
|
6
|
+
content: McpAppCanvasContent;
|
|
7
|
+
/** Message shown when the app fails to initialize. Defaults to `'Failed to load app'`. */
|
|
8
|
+
errorLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Renders an MCP app in a sandboxed iframe inside the attachment canvas. */
|
|
11
|
+
export declare const McpAppCanvasRenderer: FC<McpAppCanvasRendererProps>;
|
|
12
|
+
//# sourceMappingURL=McpAppCanvasRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpAppCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppCanvasRenderer/McpAppCanvasRenderer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAC1C,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;CACrB;AAeD,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA+D9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfContent.d.ts","sourceRoot":"","sources":["../../../src/components/PdfContent/PdfContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PdfContent.d.ts","sourceRoot":"","sources":["../../../src/components/PdfContent/PdfContent.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EACL,KAAK,EAAE,EAQR,MAAM,OAAO,CAAC;AAwBf,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,iGAAiG;IACjG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gHAAgH;IAChH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8GAA8G;IAC9G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0HAA0H;IAC1H,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,8GAA8G;AAC9G,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgY1C,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 (Word/Excel/PowerPoint) content for the given 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;AAQnC,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;AAU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A2K;IAC3K,0BAA0B,CACxB,UAAU,EAAE,iBAAiB,GAC5B,gBAAgB,GAAG,IAAI,CAAC;IAC3B,2HAA2H;IAC3H,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;IACrE;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC;CACvD;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,8FAA8F;IAC9F,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iJAAiJ;IACjJ,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,0FAA0F;AAC1F,MAAM,MAAM,oBAAoB,GAAG,CACjC,UAAU,EAAE,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,2 @@
|
|
|
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))}._viewer_1hdux_1{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc))}._statusOverlay_1hdux_5{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc));color:var(--ac-status-text,var(--text-secondary,#454545))}._errorIcon_1hdux_10{color:var(--ac-error-icon,var(--text-error,#a30000))}._viewer_1gfxm_1 .pdf-container{min-width:max-content}._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:"…"}
|
|
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_t3d2v_1{background-color:var(--mcp-loading-bg,var(--bg-layer-1,#e0e6f0))}._statusLabel_t3d2v_5{color:var(--mcp-status-text,var(--text-primary,#161b2d))}._errorIcon_t3d2v_9{color:var(--mcp-error-icon,var(--text-error,#ae2f2f))}._viewer_1hdux_1{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc))}._statusOverlay_1hdux_5{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc));color:var(--ac-status-text,var(--text-secondary,#454545))}._errorIcon_1hdux_10{color:var(--ac-error-icon,var(--text-error,#a30000))}._viewer_1gfxm_1 .pdf-container{min-width:max-content}._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:"…"}
|
|
2
2
|
/*$vite$:1*/
|
package/index.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export { AttachmentCanvasProvider, useAttachmentCanvas, } from './context/Attach
|
|
|
8
8
|
export type { AttachmentCanvasContextValue } from './context/AttachmentCanvasContext';
|
|
9
9
|
export { downloadAttachmentContent, isDownloadable } from './utils/download';
|
|
10
10
|
export { isTextPreviewable, isHtmlPreviewable, isOoxmlPreviewable, getOoxmlFileType, extensionToLanguage, createUnsupportedCanvasContent, createLoadErrorCanvasContent, createForbiddenCanvasContent, } from './utils/content';
|
|
11
|
+
export { findVisualizerForMime } from './utils/visualizer';
|
|
12
|
+
export { useOpenAttachmentCanvas } from './hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas';
|
|
13
|
+
export type { UseOpenAttachmentCanvasResolvers, UseOpenAttachmentCanvasOptions, OpenAttachmentCanvas, } from './hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas';
|
|
11
14
|
export { AttachmentContentType, AttachmentErrorType, OoxmlFileType, } from './types/attachment-canvas';
|
|
12
|
-
export type { AttachmentCanvasContent, PlainTextCanvasContent, ImageCanvasContent, AudioCanvasContent, MarkdownCanvasContent, JsonCanvasContent, PdfCanvasContent, OoxmlCanvasContent, CodeCanvasContent, HtmlCanvasContent, VisualizerCanvasContent, UnsupportedCanvasContent, ErrorCanvasContent, AttachmentCanvasColors, AttachmentCanvasTypography, AttachmentCanvasStyles, AttachmentCanvasBodyStyles, AttachmentCanvasLabels, AttachmentCanvasBodyLabels, AttachmentCanvasProps, AttachmentCanvasBodyProps, } from './models/attachment-canvas';
|
|
15
|
+
export type { AttachmentCanvasContent, PlainTextCanvasContent, ImageCanvasContent, AudioCanvasContent, MarkdownCanvasContent, JsonCanvasContent, PdfCanvasContent, OoxmlCanvasContent, CodeCanvasContent, HtmlCanvasContent, McpAppCanvasContent, VisualizerCanvasContent, UnsupportedCanvasContent, ErrorCanvasContent, AttachmentCanvasColors, AttachmentCanvasTypography, AttachmentCanvasStyles, AttachmentCanvasBodyStyles, AttachmentCanvasLabels, AttachmentCanvasBodyLabels, AttachmentCanvasProps, AttachmentCanvasBodyProps, } from './models/attachment-canvas';
|
|
13
16
|
//# 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,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAC7G,YAAY,EAAE,8BAA8B,EAAE,MAAM,kEAAkE,CAAC;AACvH,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACr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