@epam/ai-dial-attachment-canvas 0.0.0-dev.0

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.
@@ -0,0 +1,3 @@
1
+ import { AttachmentCanvasProps } from '../../models/attachment-canvas';
2
+ export declare const AttachmentCanvas: import('react').NamedExoticComponent<AttachmentCanvasProps>;
3
+ //# sourceMappingURL=AttachmentCanvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AAgBA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA+T5E,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
2
+ import { FC } from 'react';
3
+ /** Props for the AttachmentCanvasContainer component. */
4
+ export interface AttachmentCanvasContainerProps {
5
+ /** Accessible label for the panel region. Defaults to `'Attachment preview'`. */
6
+ ariaLabel?: string;
7
+ /** Accessible label for the close button. Defaults to `'Close'`. */
8
+ closeLabel?: string;
9
+ /** Accessible label for the download button. Defaults to `'Download'`. */
10
+ downloadLabel?: string;
11
+ /** Message shown when the content type is `Unsupported`. Defaults to `'Preview is not supported for this file'`. */
12
+ unsupportedLabel?: string;
13
+ /** Tooltip and aria-label for the copy-text button in its default state. Defaults to `'Copy text'`. */
14
+ copyTextLabel?: string;
15
+ /** Tooltip and aria-label for the copy-text button after a successful copy. Defaults to `'Copied!'`. */
16
+ copiedTextLabel?: string;
17
+ /** Tooltip and aria-label for the copy-as-markdown button in its default state. Defaults to `'Copy as Markdown'`. */
18
+ copyMarkdownLabel?: string;
19
+ /** Tooltip and aria-label for the copy-as-markdown button after a successful copy. Defaults to `'Copied!'`. */
20
+ copiedMarkdownLabel?: string;
21
+ /** Tooltip and aria-label for the copy-JSON button in its default state. Defaults to `'Copy as JSON'`. */
22
+ copyJsonLabel?: string;
23
+ /** Tooltip and aria-label for the copy-JSON button after a successful copy. Defaults to `'Copied!'`. */
24
+ copiedJsonLabel?: string;
25
+ /** Whether the viewport is in mobile breakpoint — disables drag-to-resize. Defaults to `false`. */
26
+ isMobile?: boolean;
27
+ /** Initial panel width in pixels. When omitted, SidebarPanel uses its own default. */
28
+ defaultWidth?: number;
29
+ /** Syntax highlight color theme forwarded to MarkdownRenderer code blocks. */
30
+ codeBlockTheme?: CodeBlockTheme;
31
+ }
32
+ /** Context-connected container that renders `AttachmentCanvas` with download support. */
33
+ export declare const AttachmentCanvasContainer: FC<AttachmentCanvasContainerProps>;
34
+ //# sourceMappingURL=AttachmentCanvasContainer.d.ts.map
@@ -0,0 +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,MAAM,OAAO,CAAC;AAWnD,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oHAAoH;IACpH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wGAAwG;IACxG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+GAA+G;IAC/G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0GAA0G;IAC1G,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wGAAwG;IACxG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAiFtE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { InputHighlightData } from '@epam/pdf-highlighter-kit';
2
+ import { FC } from 'react';
3
+ export interface PdfContentProps {
4
+ url: string;
5
+ highlights: InputHighlightData[];
6
+ selectedHighlightId?: string;
7
+ loadPdf?: (url: string) => Promise<Blob>;
8
+ fileName?: string;
9
+ }
10
+ export declare const PdfContent: FC<PdfContentProps>;
11
+ //# sourceMappingURL=PdfContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdfContent.d.ts","sourceRoot":"","sources":["../../../src/components/PdfContent/PdfContent.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAuF1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** File extensions that are known to be previewable as plain text. */
2
+ export declare const TEXT_EXTENSIONS: Set<string>;
3
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/constants/file.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,eAAO,MAAM,eAAe,aAoD1B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ import { AttachmentCanvasContent } from '../models/attachment-canvas';
3
+ /** Value exposed by the attachment canvas context. */
4
+ export interface AttachmentCanvasContextValue {
5
+ /** Whether the canvas panel is currently open. */
6
+ isOpen: boolean;
7
+ /** Content currently displayed in the canvas. */
8
+ content: AttachmentCanvasContent;
9
+ /** File name shown in the canvas header. */
10
+ fileName: string | undefined;
11
+ /** Open the canvas with the given content and optional file name. */
12
+ openCanvas: (content: AttachmentCanvasContent, fileName?: string) => void;
13
+ /** Close the canvas. */
14
+ closeCanvas: () => void;
15
+ }
16
+ /** Provides attachment canvas state to all descendants. */
17
+ export declare const AttachmentCanvasProvider: ({ children, }: {
18
+ children: ReactNode;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ /** Consumes the attachment canvas context. Must be used inside `AttachmentCanvasProvider`. */
21
+ export declare const useAttachmentCanvas: () => AttachmentCanvasContextValue;
22
+ //# sourceMappingURL=AttachmentCanvasContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentCanvasContext.d.ts","sourceRoot":"","sources":["../../src/context/AttachmentCanvasContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAQ3E,sDAAsD;AACtD,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAChB,iDAAiD;IACjD,OAAO,EAAE,uBAAuB,CAAC;IACjC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,qEAAqE;IACrE,UAAU,EAAE,CAAC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E,wBAAwB;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAOD,2DAA2D;AAC3D,eAAO,MAAM,wBAAwB,GAAI,eAEtC;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,4CA2BA,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,QAAO,4BAQtC,CAAC"}
package/index.css ADDED
@@ -0,0 +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}._body_1h1fc_2{color:var(--ac-text,var(--text-primary,#161b2d))}._unsupportedLabel_1h1fc_6{color:var(--text-secondary,#575f73)}._jsonWrapper_1h1fc_10{border-color:var(--stroke-secondary,#d1dbea);background-color:var(--bg-layer-1,#e0e6f0)}._jsonContainer_1h1fc_15{font-family:ui-monospace,Cascadia Code,Source Code Pro,Menlo,Consolas,DejaVu Sans Mono,monospace;font-size:.8125rem;line-height:1.6}._jsonLabel_1h1fc_21,._jsonClickableLabel_1h1fc_25{color:var(--text-primary,#161b2d)}._jsonPunctuation_1h1fc_29{color:var(--text-secondary,#575f73)}._jsonStringValue_1h1fc_33{color:var(--text-accent-secondary,#007274)}._jsonNumberValue_1h1fc_37{color:var(--text-accent-primary,#124ace)}._jsonBooleanValue_1h1fc_41{color:var(--text-warning,#7f6300)}._jsonNullValue_1h1fc_45,._jsonExpandIcon_1h1fc_49{color:var(--text-secondary,#575f73)}._jsonExpandIcon_1h1fc_49:hover{color:var(--text-primary,#161b2d)}._jsonExpandIcon_1h1fc_49:after{content:"▶";vertical-align:middle;font-size:.6em}._jsonCollapseIcon_1h1fc_61{color:var(--text-secondary,#575f73)}._jsonCollapseIcon_1h1fc_61:hover{color:var(--text-primary,#161b2d)}._jsonCollapseIcon_1h1fc_61:after{content:"▼";vertical-align:middle;font-size:.6em}.pdf-container:has(+.pdf-container){padding:0}._jsonCollapsedContent_1h1fc_77{color:var(--text-secondary,#575f73);background-color:var(--bg-layer-3,#fcfcfc);font-size:.75em}._jsonCollapsedContent_1h1fc_77:after{content:"…"}
2
+ /*$vite$:1*/
package/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export { AttachmentCanvas } from './components/AttachmentCanvas/AttachmentCanvas';
2
+ export { AttachmentCanvasContainer } from './components/AttachmentCanvasContainer/AttachmentCanvasContainer';
3
+ export type { AttachmentCanvasContainerProps } from './components/AttachmentCanvasContainer/AttachmentCanvasContainer';
4
+ export { AttachmentCanvasProvider, useAttachmentCanvas, } from './context/AttachmentCanvasContext';
5
+ export type { AttachmentCanvasContextValue } from './context/AttachmentCanvasContext';
6
+ export { downloadAttachmentContent } from './utils/download';
7
+ export { isTextPreviewable, createUnsupportedCanvasContent, } from './utils/content';
8
+ export { AttachmentContentType } from './types/attachment-canvas';
9
+ export type { AttachmentCanvasContent, PlainTextCanvasContent, ImageCanvasContent, MarkdownCanvasContent, JsonCanvasContent, PdfCanvasContent, UnsupportedCanvasContent, AttachmentCanvasColors, AttachmentCanvasTypography, AttachmentCanvasStyles, AttachmentCanvasProps, } from './models/attachment-canvas';
10
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +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,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,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}