@epam/ai-dial-attachment-canvas 1.1.0-dev.30 → 1.1.0-dev.300

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.
Files changed (46) hide show
  1. package/components/AttachmentCanvas/AttachmentCanvas.d.ts +1 -0
  2. package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
  3. package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts +4 -0
  4. package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -0
  5. package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
  6. package/components/CodeContent/CodeContent.d.ts +13 -0
  7. package/components/CodeContent/CodeContent.d.ts.map +1 -0
  8. package/components/HtmlContent/HtmlContent.d.ts +21 -0
  9. package/components/HtmlContent/HtmlContent.d.ts.map +1 -0
  10. package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +12 -0
  11. package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -0
  12. package/components/OoxmlContent/OoxmlContent.d.ts +14 -0
  13. package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -0
  14. package/components/PdfContent/PdfContent.d.ts +31 -0
  15. package/components/PdfContent/PdfContent.d.ts.map +1 -1
  16. package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts +25 -0
  17. package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts.map +1 -0
  18. package/constants/file.d.ts +8 -0
  19. package/constants/file.d.ts.map +1 -1
  20. package/context/AttachmentCanvasContext.d.ts +4 -2
  21. package/context/AttachmentCanvasContext.d.ts.map +1 -1
  22. package/docx-TK1kGI6t.js +27179 -0
  23. package/highlight-rect-BuX5rWP4-BMOCuZYw.js +1037 -0
  24. package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts +64 -0
  25. package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts.map +1 -0
  26. package/index.css +1 -1
  27. package/index.d.ts +9 -3
  28. package/index.d.ts.map +1 -1
  29. package/index.js +34896 -1760
  30. package/models/attachment-canvas.d.ts +170 -11
  31. package/models/attachment-canvas.d.ts.map +1 -1
  32. package/package.json +14 -7
  33. package/pptx-DfVqSUxc.js +7410 -0
  34. package/render-worker-host-Br7ZDyGE-ByESfBjH.js +7 -0
  35. package/render-worker-host-CM1JXVqg-DGwZpsUd.js +7 -0
  36. package/render-worker-host-DFtd9Z-J-DU7fugLI.js +7 -0
  37. package/renderer-module-contract-BNGz8HvO-BmSLiM0k.js +44363 -0
  38. package/types/attachment-canvas.d.ts +11 -0
  39. package/types/attachment-canvas.d.ts.map +1 -1
  40. package/utils/content.d.ts +9 -0
  41. package/utils/content.d.ts.map +1 -1
  42. package/utils/download.d.ts.map +1 -1
  43. package/utils/visualizer.d.ts +8 -0
  44. package/utils/visualizer.d.ts.map +1 -0
  45. package/visible-index-BjesVGhg-DvGeguMs.js +133 -0
  46. package/xlsx-44AZTEry.js +7800 -0
@@ -1,3 +1,4 @@
1
1
  import { AttachmentCanvasProps } from '../../models/attachment-canvas';
2
+ /** Sidebar canvas panel for previewing attachment content (text, image, audio, PDF, markdown, JSON). */
2
3
  export declare const AttachmentCanvas: import('react').NamedExoticComponent<AttachmentCanvasProps>;
3
4
  //# sourceMappingURL=AttachmentCanvas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AA8BA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA2a5E,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
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"}
@@ -0,0 +1,4 @@
1
+ import { AttachmentCanvasBodyProps } from '../../models/attachment-canvas';
2
+ /** Content-only renderer for attachment previews (text, image, audio, PDF, markdown, JSON, code, HTML, visualizer). Shared by the sidebar `AttachmentCanvas` and any host that mounts the preview inline elsewhere. */
3
+ export declare const AttachmentCanvasBody: import('react').NamedExoticComponent<AttachmentCanvasBodyProps>;
4
+ //# sourceMappingURL=AttachmentCanvasBody.d.ts.map
@@ -0,0 +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;AAwXhF,uNAAuN;AACvN,eAAO,MAAM,oBAAoB,iEAAiC,CAAC"}
@@ -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,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EACV,sBAAsB,EAIvB,MAAM,gCAAgC,CAAC;AAKxC,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAyFtE,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,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,gCAAgC,CAAC;AAKxC,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CA4GtE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
2
+ import { FC } from 'react';
3
+ import { CodeCanvasContent } from '../../models/attachment-canvas';
4
+ /** Props for {@link CodeContent}. */
5
+ export interface CodeContentProps {
6
+ /** The code/text content to render. */
7
+ content: CodeCanvasContent;
8
+ /** Syntax-highlight color theme. Defaults to `CodeBlockTheme.Light`. */
9
+ codeBlockTheme?: CodeBlockTheme;
10
+ }
11
+ /** Renders syntax-highlighted source code or plain text for a `CodeCanvasContent` payload. */
12
+ export declare const CodeContent: FC<CodeContentProps>;
13
+ //# sourceMappingURL=CodeContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeContent.d.ts","sourceRoot":"","sources":["../../../src/components/CodeContent/CodeContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAQxE,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,wEAAwE;IACxE,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,8FAA8F;AAC9F,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAuC5C,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
2
+ import { FC } from 'react';
3
+ import { AttachmentCanvasLabels, HtmlCanvasContent } from '../../models/attachment-canvas';
4
+ /** Props for {@link HtmlContent}. */
5
+ export interface HtmlContentProps {
6
+ /** The HTML content to render. */
7
+ content: HtmlCanvasContent;
8
+ /** Labels used inside the HTML viewer. */
9
+ labels: Pick<AttachmentCanvasLabels, 'htmlFrameBlockedLabel' | 'htmlOpenInNewTabLabel'>;
10
+ /** When `true`, displays the highlighted HTML source instead of the rendered iframe. */
11
+ isSourceView: boolean;
12
+ /** Accessible title forwarded to the iframe element. */
13
+ title?: string;
14
+ /** Syntax-highlight color theme forwarded to the source-view `CodeContent`. When omitted, `CodeContent` falls back to `CodeBlockTheme.Light`. */
15
+ codeBlockTheme?: CodeBlockTheme;
16
+ /** Typography class applied to the "Open in new tab" link in the blocked-state panel. Defaults to `'dial-body-semi-text'`. */
17
+ openInNewTabButtonTypographyClassName?: string;
18
+ }
19
+ /** Renders HTML content inside a sandboxed iframe, or as highlighted source when `isSourceView` is true. */
20
+ export declare const HtmlContent: FC<HtmlContentProps>;
21
+ //# sourceMappingURL=HtmlContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/HtmlContent/HtmlContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EACL,KAAK,EAAE,EAOR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AAKxC,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,0CAA0C;IAC1C,MAAM,EAAE,IAAI,CACV,sBAAsB,EACtB,uBAAuB,GAAG,uBAAuB,CAClD,CAAC;IACF,wFAAwF;IACxF,YAAY,EAAE,OAAO,CAAC;IACtB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8HAA8H;IAC9H,qCAAqC,CAAC,EAAE,MAAM,CAAC;CAChD;AAED,4GAA4G;AAC5G,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6G5C,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"}
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { OoxmlCanvasContent } from '../../models/attachment-canvas';
3
+ interface OoxmlContentProps {
4
+ /** OOXML source and format to render. */
5
+ content: OoxmlCanvasContent;
6
+ /** File name used as the viewer's accessible name. */
7
+ fileName?: string;
8
+ /** Message shown when the OOXML parser or renderer fails. */
9
+ loadErrorLabel: string;
10
+ }
11
+ /** Renders DOCX, XLSX, and PPTX attachments with `@silurus/ooxml`. */
12
+ export declare const OoxmlContent: FC<OoxmlContentProps>;
13
+ export {};
14
+ //# sourceMappingURL=OoxmlContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OoxmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/OoxmlContent/OoxmlContent.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AASzE,UAAU,iBAAiB;IACzB,yCAAyC;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;CACxB;AA+BD,sEAAsE;AACtE,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA6F9C,CAAC"}
@@ -1,11 +1,42 @@
1
1
  import { InputHighlightData } from '@epam/pdf-highlighter-kit';
2
2
  import { FC } from 'react';
3
+ /** User-visible strings for the collapsible thumbnails section. */
4
+ export interface PdfContentLabels {
5
+ /** Accessible name for the thumbnails region — not shown visibly. Defaults to `'Thumbnails'`. */
6
+ thumbnailsLabel?: string;
7
+ /** Accessible label for the FAB button when the thumbnails panel is closed. Defaults to `'Show thumbnails'`. */
8
+ showThumbnailsLabel?: string;
9
+ /** Accessible label for the FAB button when the thumbnails panel is open. Defaults to `'Hide thumbnails'`. */
10
+ hideThumbnailsLabel?: string;
11
+ /** Accessible label for the current-page number input at the top of the thumbnails panel. Defaults to `'Page number'`. */
12
+ pageNumberLabel?: string;
13
+ }
14
+ /** Props for the `PdfContent` component. */
3
15
  export interface PdfContentProps {
16
+ /** URL of the PDF file to display. */
4
17
  url: string;
18
+ /** Highlight annotations to overlay on the document. */
5
19
  highlights: InputHighlightData[];
20
+ /** ID of the highlight that should be scrolled into view on mount. */
6
21
  selectedHighlightId?: string;
22
+ /** Custom fetcher for the PDF blob; falls back to a plain `fetch` wrapper. */
7
23
  loadPdf?: (url: string) => Promise<Blob>;
24
+ /** File name shown in the canvas header. */
8
25
  fileName?: string;
26
+ /**
27
+ * Hides the underlying `DocumentPreview`'s own title/zoom toolbar row —
28
+ * for hosts that render their own header and don't want it duplicated.
29
+ * `DocumentPreview` (`@epam/ai-dial-react-pdf-highlighter`) has no public
30
+ * prop for this, so it is done via `containerClassName` targeting that
31
+ * row's structural position; this only holds while `PdfContent` itself
32
+ * never passes `title`/`fileName` through to `DocumentPreview` (it
33
+ * currently doesn't — see the unused `fileName` prop above). Defaults to
34
+ * `false`, preserving the existing chat sidebar canvas's appearance.
35
+ */
36
+ hideHeader?: boolean;
37
+ /** User-visible strings for the thumbnails section. All fields have English defaults. */
38
+ labels?: PdfContentLabels;
9
39
  }
40
+ /** Renders a PDF with highlight annotations, a floating collapsible thumbnails panel, and page navigation. */
10
41
  export declare const PdfContent: FC<PdfContentProps>;
11
42
  //# sourceMappingURL=PdfContent.d.ts.map
@@ -1 +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"}
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,25 @@
1
+ import { FC } from 'react';
2
+ import { VisualizerCanvasContent } from '../../models/attachment-canvas';
3
+ /** Props for the `VisualizerCanvasRenderer` component. */
4
+ export interface VisualizerCanvasRendererProps {
5
+ /** Visualizer content to render. */
6
+ content: VisualizerCanvasContent;
7
+ /** Text shown alongside the spinner while the handshake/data delivery is pending. Omitted by default (spinner only). */
8
+ loadingLabel?: string;
9
+ /** Message shown when the visualizer fails to receive its data. Defaults to `'Failed to load visualizer'`. */
10
+ errorLabel?: string;
11
+ /** Color overrides applied as CSS custom properties. */
12
+ colors?: VisualizerCanvasRendererColors;
13
+ }
14
+ /** Color overrides for `VisualizerCanvasRenderer`, applied as CSS custom properties. */
15
+ export interface VisualizerCanvasRendererColors {
16
+ /** Background of the loading overlay. Defaults to `--bg-layer-sunken`. */
17
+ loadingBackground?: string;
18
+ /** Loading/error message text color. Defaults to `--text-primary`. */
19
+ statusText?: string;
20
+ /** Error icon color. Defaults to `--text-error`. */
21
+ errorIcon?: string;
22
+ }
23
+ /** Mounts a sandboxed visualizer iframe, drives the handshake, and delivers visualize data. */
24
+ export declare const VisualizerCanvasRenderer: FC<VisualizerCanvasRendererProps>;
25
+ //# sourceMappingURL=VisualizerCanvasRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VisualizerCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,0DAA0D;AAC1D,MAAM,WAAW,6BAA6B;IAC5C,oCAAoC;IACpC,OAAO,EAAE,uBAAuB,CAAC;IACjC,wHAAwH;IACxH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8GAA8G;IAC9G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;CACzC;AAED,wFAAwF;AACxF,MAAM,WAAW,8BAA8B;IAC7C,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,+FAA+F;AAC/F,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAmHtE,CAAC"}
@@ -1,3 +1,11 @@
1
+ /** File extensions that are rendered as HTML in a sandboxed iframe. */
2
+ export declare const HTML_EXTENSIONS: Set<string>;
3
+ /** MIME types for the supported Office Open XML formats. */
4
+ export declare const OOXML_MIME_TYPES: {
5
+ readonly docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
6
+ readonly xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
7
+ readonly pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
8
+ };
1
9
  /** File extensions that are known to be previewable as plain text. */
2
10
  export declare const TEXT_EXTENSIONS: Set<string>;
3
11
  //# sourceMappingURL=file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/constants/file.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,eAAO,MAAM,eAAe,aAoD1B,CAAC"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/constants/file.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,eAAO,MAAM,eAAe,aAA2B,CAAC;AAExD,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,sEAAsE;AACtE,eAAO,MAAM,eAAe,aAkD1B,CAAC"}
@@ -10,10 +10,12 @@ export interface AttachmentCanvasContextValue {
10
10
  content: AttachmentCanvasContent;
11
11
  /** File name shown in the canvas header. */
12
12
  fileName: string | undefined;
13
+ /** ID of the attachment currently displayed in the canvas, if any. */
14
+ attachmentId: string | undefined;
13
15
  /** Open the canvas immediately in a loading state before content has resolved. */
14
- openCanvasLoading: (fileName?: string) => void;
16
+ openCanvasLoading: (fileName?: string, attachmentId?: string) => void;
15
17
  /** Open the canvas with the given content and optional file name. */
16
- openCanvas: (content: AttachmentCanvasContent, fileName?: string) => void;
18
+ openCanvas: (content: AttachmentCanvasContent, fileName?: string, attachmentId?: string) => void;
17
19
  /** Close the canvas. */
18
20
  closeCanvas: () => void;
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentCanvasContext.d.ts","sourceRoot":"","sources":["../../src/context/AttachmentCanvasContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AA2B3E,sDAAsD;AACtD,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAChB,uFAAuF;IACvF,SAAS,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,EAAE,uBAAuB,CAAC;IACjC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,kFAAkF;IAClF,iBAAiB,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,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,4CAgEA,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,QAAO,4BAQtC,CAAC"}
1
+ {"version":3,"file":"AttachmentCanvasContext.d.ts","sourceRoot":"","sources":["../../src/context/AttachmentCanvasContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AA4B3E,sDAAsD;AACtD,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAChB,uFAAuF;IACvF,SAAS,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,EAAE,uBAAuB,CAAC;IACjC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,sEAAsE;IACtE,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,kFAAkF;IAClF,iBAAiB,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,qEAAqE;IACrE,UAAU,EAAE,CACV,OAAO,EAAE,uBAAuB,EAChC,QAAQ,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,KAClB,IAAI,CAAC;IACV,wBAAwB;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAOD,2DAA2D;AAC3D,eAAO,MAAM,wBAAwB,GAAI,eAEtC;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,4CAgFA,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,QAAO,4BAQtC,CAAC"}