@epam/ai-dial-attachment-canvas 1.1.0-dev.78 → 1.1.0-dev.87

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.
@@ -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;AAic5E,wGAAwG;AACxG,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
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;AAyd5E,wGAAwG;AACxG,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_MARKDOWN_CLASS_NAMES as e, MIMEType as t, MarkdownRenderer as n, buildCssVars as r, copyToClipboard as i, mergeClasses as a, triggerAnchorDownload as o, triggerBlobDownload as s, useIsMobile as c } from "@epam/ai-dial-chat-shared";
2
2
  import { SidebarOrientation as l, SidebarPanel as u } from "@epam/ai-dial-sidebar";
3
- import { DIAL_ICON_SIZE as d, DialButton as f, DialCheckbox as p, DialEllipsisTooltip as m, DialGhostIconButton as h, DialLoader as g, DialSelect as _, DialSpinner as v, ElementSize as y, SelectSize as b, mergeClasses as x } from "@epam/ai-dial-ui-kit";
3
+ import { DIAL_ICON_SIZE as d, DialButton as f, DialCheckbox as p, DialEllipsisTooltip as m, DialLoader as h, DialSelect as g, DialSpinner as _, ElementSize as v, GhostIconButton as y, SelectSize as b, mergeClasses as x } from "@epam/ai-dial-ui-kit";
4
4
  import { IconAlertTriangle as S, IconCheck as C, IconChevronDown as w, IconChevronUp as T, IconCopy as E, IconDownload as ee, IconLock as te, IconMarkdown as ne, IconMinus as D, IconPlus as O } from "@tabler/icons-react";
5
5
  import { createContext as k, memo as re, useCallback as A, useContext as ie, useEffect as j, useMemo as ae, useRef as M, useState as N } from "react";
6
6
  import { JsonView as oe, defaultStyles as se } from "react-json-view-lite";
@@ -16853,7 +16853,7 @@ var Oo = ho.map((e) => ({
16853
16853
  handleZoomChange: ee,
16854
16854
  handleViewerReady: ne
16855
16855
  };
16856
- }, Ao = ({ fileUrl: e, fileName: t, errorLabel: n, occurrencesLabel: r, unsupportedLabel: i, highlights: a, loadFileCb: o, showOccurrences: s = !0, selectedPageNumber: c, containerClassName: l, pdfViewerClassName: u, onTotalPagesChange: d, title: p, thumbnailPageNumbers: h, onThumbnailsLoaded: g, onViewerReady: v, showLoaderOverlay: C = !1, selectedPages: E, selectedHighlightId: ee, viewerOptions: te }) => {
16856
+ }, Ao = ({ fileUrl: e, fileName: t, errorLabel: n, occurrencesLabel: r, unsupportedLabel: i, highlights: a, loadFileCb: o, showOccurrences: s = !0, selectedPageNumber: c, containerClassName: l, pdfViewerClassName: u, onTotalPagesChange: d, title: p, thumbnailPageNumbers: h, onThumbnailsLoaded: _, onViewerReady: y, showLoaderOverlay: C = !1, selectedPages: E, selectedHighlightId: ee, viewerOptions: te }) => {
16857
16857
  let { file: ne, isError: k, isSupportedFile: re, activeHighlightIndex: A, zoom: ie, setZoom: j, zoomSelectOptions: ae, showLoader: M, changeIndex: N, handleZoomChange: oe, handleViewerReady: se } = ko({
16858
16858
  fileUrl: e,
16859
16859
  fileName: t,
@@ -16862,8 +16862,8 @@ var Oo = ho.map((e) => ({
16862
16862
  selectedPageNumber: c,
16863
16863
  onTotalPagesChange: d,
16864
16864
  thumbnailPageNumbers: h,
16865
- onThumbnailsLoaded: g,
16866
- onViewerReady: v,
16865
+ onThumbnailsLoaded: _,
16866
+ onViewerReady: y,
16867
16867
  showLoaderOverlay: C,
16868
16868
  selectedPages: E
16869
16869
  });
@@ -16893,13 +16893,13 @@ var Oo = ho.map((e) => ({
16893
16893
  ]
16894
16894
  }), a.length > 0 && /* @__PURE__ */ F(ce, { children: [/* @__PURE__ */ P(f, {
16895
16895
  className: "p-0 text-primary !h-6.5",
16896
- size: y.Small,
16896
+ size: v.Small,
16897
16897
  iconAfter: /* @__PURE__ */ P(w, { size: 16 }),
16898
16898
  "aria-label": "Next occurrence",
16899
16899
  onClick: () => N(1)
16900
16900
  }), /* @__PURE__ */ P(f, {
16901
16901
  className: "p-0 text-primary !h-6.5",
16902
- size: y.Small,
16902
+ size: v.Small,
16903
16903
  iconAfter: /* @__PURE__ */ P(T, { size: 16 }),
16904
16904
  "aria-label": "Previous occurrence",
16905
16905
  onClick: () => N(-1)
@@ -16914,7 +16914,7 @@ var Oo = ho.map((e) => ({
16914
16914
  children: [
16915
16915
  /* @__PURE__ */ P("div", {
16916
16916
  className: "h-6",
16917
- children: /* @__PURE__ */ P(_, {
16917
+ children: /* @__PURE__ */ P(g, {
16918
16918
  size: b.Sm,
16919
16919
  className: "bg-layer-4 !py-0 h-6 min-h-6 dial-small-text max-h-full border-transparent hover:border-hover rounded",
16920
16920
  options: ae,
@@ -16926,14 +16926,14 @@ var Oo = ho.map((e) => ({
16926
16926
  className: "py-0 flex items-center justify-center rounded text-primary bg-layer-4 border border-transparent hover:border-hover",
16927
16927
  iconAfter: /* @__PURE__ */ P(D, { size: 16 }),
16928
16928
  "aria-label": "Zoom out",
16929
- size: y.Small,
16929
+ size: v.Small,
16930
16930
  onClick: () => oe(-1)
16931
16931
  }),
16932
16932
  /* @__PURE__ */ P(f, {
16933
16933
  className: "py-0 flex items-center justify-center rounded text-primary bg-layer-4 border border-transparent hover:border-hover",
16934
16934
  iconAfter: /* @__PURE__ */ P(O, { size: 16 }),
16935
16935
  "aria-label": "Zoom in",
16936
- size: y.Small,
16936
+ size: v.Small,
16937
16937
  onClick: () => oe(1)
16938
16938
  })
16939
16939
  ]
@@ -17002,7 +17002,7 @@ var Oo = ho.map((e) => ({
17002
17002
  }),
17003
17003
  r && /* @__PURE__ */ P("div", {
17004
17004
  className: "absolute inset-0 flex items-center justify-center bg-blackout rounded-sm",
17005
- children: /* @__PURE__ */ P(g, {
17005
+ children: /* @__PURE__ */ P(h, {
17006
17006
  size: 24,
17007
17007
  fullWidth: !1,
17008
17008
  ariaLabel: `Loading page ${e}`
@@ -17149,7 +17149,7 @@ var Oo = ho.map((e) => ({
17149
17149
  }),
17150
17150
  i === "loading" && /* @__PURE__ */ F("div", {
17151
17151
  className: a("absolute inset-0 flex flex-col items-center justify-center gap-2", Io.loadingOverlay),
17152
- children: [/* @__PURE__ */ P(v, {}), t && /* @__PURE__ */ P("p", {
17152
+ children: [/* @__PURE__ */ P(_, {}), t && /* @__PURE__ */ P("p", {
17153
17153
  className: a("text-center", Io.statusLabel),
17154
17154
  children: t
17155
17155
  })]
@@ -17205,7 +17205,7 @@ var Oo = ho.map((e) => ({
17205
17205
  className: "max-h-full max-w-full object-contain",
17206
17206
  onError: () => i(!0)
17207
17207
  });
17208
- }, Bo = re(({ isOpen: t, isLoading: i = !1, onClose: o, content: s, fileName: c, labels: { ariaLabel: f, closeLabel: p = "Close", downloadLabel: m = "Download", copyTextLabel: g = "Copy text", copiedTextLabel: _ = "Copied!", copyMarkdownLabel: y = "Copy as Markdown", copiedMarkdownLabel: b = "Copied!", copyJsonLabel: x = "Copy as JSON", copiedJsonLabel: w = "Copied!", visualizerErrorLabel: T, unsupportedLabel: D = "Preview is not supported for this file", loadErrorLabel: O = "Failed to load file", forbiddenErrorLabel: k = "You don't have permission to access this file" }, onDownload: re, onCopyText: ie, onCopyMarkdown: le, onCopyJson: ue, isMobile: pe = !1, defaultWidth: me, minWidth: he = 600, maxWidth: ge = 1500, onResizeStop: _e, styles: ve, codeBlockTheme: ye, loadPdf: be }) => {
17208
+ }, Bo = re(({ isOpen: t, isLoading: i = !1, onClose: o, content: s, fileName: c, labels: { ariaLabel: f, closeLabel: p = "Close", downloadLabel: m = "Download", copyTextLabel: h = "Copy text", copiedTextLabel: g = "Copied!", copyMarkdownLabel: v = "Copy as Markdown", copiedMarkdownLabel: b = "Copied!", copyJsonLabel: x = "Copy as JSON", copiedJsonLabel: w = "Copied!", visualizerErrorLabel: T, unsupportedLabel: D = "Preview is not supported for this file", loadErrorLabel: O = "Failed to load file", forbiddenErrorLabel: k = "You don't have permission to access this file" }, onDownload: re, onCopyText: ie, onCopyMarkdown: le, onCopyJson: ue, isMobile: pe = !1, defaultWidth: me, minWidth: he = 600, maxWidth: ge = 1500, onResizeStop: _e, styles: ve, codeBlockTheme: ye, loadPdf: be }) => {
17209
17209
  let [xe, Se] = N(!1), [Ce, L] = N(!1), [R, we] = N(!1), z = M(null), Te = M(null), B = M(null), Ee = A(() => {
17210
17210
  ie?.(), z.current != null && clearTimeout(z.current), Se(!0), z.current = setTimeout(() => Se(!1), Ro);
17211
17211
  }, [ie]), De = A(() => {
@@ -17345,34 +17345,37 @@ var Oo = ho.map((e) => ({
17345
17345
  className: a(t ? "mobile:w-full mobile:max-w-full" : "w-0", Me, Pe?.className)
17346
17346
  },
17347
17347
  rightActions: H || U || Fe || Ie ? /* @__PURE__ */ F(ce, { children: [
17348
- H && /* @__PURE__ */ P(h, {
17348
+ H && /* @__PURE__ */ P(y, {
17349
17349
  icon: P(xe ? C : E, {
17350
17350
  size: d.LG,
17351
- stroke: 1.5
17351
+ stroke: 1.5,
17352
+ "aria-hidden": !0
17352
17353
  }),
17353
- "aria-label": xe ? _ : g,
17354
- tooltipProps: { tooltip: xe ? _ : g },
17354
+ "aria-label": xe ? g : h,
17355
+ tooltipProps: { tooltip: xe ? g : h },
17355
17356
  onClick: Ee
17356
17357
  }),
17357
- U && /* @__PURE__ */ P(h, {
17358
+ U && /* @__PURE__ */ P(y, {
17358
17359
  icon: P(Ce ? C : ne, {
17359
17360
  size: d.LG,
17360
- stroke: 1.5
17361
+ stroke: 1.5,
17362
+ "aria-hidden": !0
17361
17363
  }),
17362
- "aria-label": Ce ? b : y,
17363
- tooltipProps: { tooltip: Ce ? b : y },
17364
+ "aria-label": Ce ? b : v,
17365
+ tooltipProps: { tooltip: Ce ? b : v },
17364
17366
  onClick: De
17365
17367
  }),
17366
- Fe && /* @__PURE__ */ P(h, {
17368
+ Fe && /* @__PURE__ */ P(y, {
17367
17369
  icon: P(R ? C : E, {
17368
17370
  size: d.LG,
17369
- stroke: 1.5
17371
+ stroke: 1.5,
17372
+ "aria-hidden": !0
17370
17373
  }),
17371
17374
  "aria-label": R ? w : x,
17372
17375
  tooltipProps: { tooltip: R ? w : x },
17373
17376
  onClick: Oe
17374
17377
  }),
17375
- Ie && /* @__PURE__ */ P(h, {
17378
+ Ie && /* @__PURE__ */ P(y, {
17376
17379
  icon: /* @__PURE__ */ P(ee, {
17377
17380
  size: d.LG,
17378
17381
  stroke: 1.5
@@ -17385,7 +17388,7 @@ var Oo = ho.map((e) => ({
17385
17388
  children: /* @__PURE__ */ P("div", {
17386
17389
  style: !i && s.type === I.PlainText ? V : void 0,
17387
17390
  className: a(i ? "flex h-full items-center justify-center" : Le, je),
17388
- children: i ? /* @__PURE__ */ P(v, {}) : W
17391
+ children: i ? /* @__PURE__ */ P(_, {}) : W
17389
17392
  })
17390
17393
  });
17391
17394
  }), Vo = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-attachment-canvas",
3
3
  "description": "Canvas viewer for rendering attachment content — images, PDFs, JSON, markdown, and plain text",
4
- "version": "1.1.0-dev.78",
4
+ "version": "1.1.0-dev.87",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,11 +17,11 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.1.0-dev.78",
20
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.87",
21
21
  "@epam/ai-dial-shared": "0.48.0",
22
- "@epam/ai-dial-sidebar": "1.1.0-dev.78",
22
+ "@epam/ai-dial-sidebar": "1.1.0-dev.87",
23
23
  "@epam/ai-dial-visualizer-connector": "0.48.0",
24
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.25",
24
+ "@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
25
25
  "@epam/pdf-highlighter-kit": ">=0.0.14",
26
26
  "@tabler/icons-react": "^3.44.0",
27
27
  "react": "^19.0.0",