@epam/ai-dial-attachment-canvas 1.0.0-dev.503 → 1.0.0-dev.509

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":"AAkBA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA+V5E,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
1
+ {"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AAkBA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAiW5E,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
@@ -1,31 +1,10 @@
1
1
  import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
2
2
  import { FC } from 'react';
3
+ import { AttachmentCanvasLabels } from '../../models/attachment-canvas';
3
4
  /** Props for the AttachmentCanvasContainer component. */
4
5
  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
- /** Message shown when content type is `Error` with `errorType: LoadFailed`. Defaults to `'Failed to load file'`. */
14
- loadErrorLabel?: string;
15
- /** Message shown when content type is `Error` with `errorType: Forbidden`. Defaults to `"You don't have permission to access this file"`. */
16
- forbiddenErrorLabel?: string;
17
- /** Tooltip and aria-label for the copy-text button in its default state. Defaults to `'Copy text'`. */
18
- copyTextLabel?: string;
19
- /** Tooltip and aria-label for the copy-text button after a successful copy. Defaults to `'Copied!'`. */
20
- copiedTextLabel?: string;
21
- /** Tooltip and aria-label for the copy-as-markdown button in its default state. Defaults to `'Copy as Markdown'`. */
22
- copyMarkdownLabel?: string;
23
- /** Tooltip and aria-label for the copy-as-markdown button after a successful copy. Defaults to `'Copied!'`. */
24
- copiedMarkdownLabel?: string;
25
- /** Tooltip and aria-label for the copy-JSON button in its default state. Defaults to `'Copy as JSON'`. */
26
- copyJsonLabel?: string;
27
- /** Tooltip and aria-label for the copy-JSON button after a successful copy. Defaults to `'Copied!'`. */
28
- copiedJsonLabel?: string;
6
+ /** User-visible strings. All fields have English defaults. */
7
+ labels?: AttachmentCanvasLabels;
29
8
  /** Whether the viewport is in mobile breakpoint — disables drag-to-resize. Defaults to `false`. */
30
9
  isMobile?: boolean;
31
10
  /** Initial panel width in pixels. When omitted, SidebarPanel uses its own default. */
@@ -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;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,oHAAoH;IACpH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6IAA6I;IAC7I,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,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,CAqFtE,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,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,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAoFrE,CAAC"}
package/index.d.ts CHANGED
@@ -6,5 +6,5 @@ export type { AttachmentCanvasContextValue } from './context/AttachmentCanvasCon
6
6
  export { downloadAttachmentContent, isDownloadable } from './utils/download';
7
7
  export { isTextPreviewable, createUnsupportedCanvasContent, createLoadErrorCanvasContent, createForbiddenCanvasContent, } from './utils/content';
8
8
  export { AttachmentContentType, AttachmentErrorType, } from './types/attachment-canvas';
9
- export type { AttachmentCanvasContent, PlainTextCanvasContent, ImageCanvasContent, MarkdownCanvasContent, JsonCanvasContent, PdfCanvasContent, UnsupportedCanvasContent, ErrorCanvasContent, AttachmentCanvasColors, AttachmentCanvasTypography, AttachmentCanvasStyles, AttachmentCanvasProps, } from './models/attachment-canvas';
9
+ export type { AttachmentCanvasContent, PlainTextCanvasContent, ImageCanvasContent, MarkdownCanvasContent, JsonCanvasContent, PdfCanvasContent, UnsupportedCanvasContent, ErrorCanvasContent, AttachmentCanvasColors, AttachmentCanvasTypography, AttachmentCanvasStyles, AttachmentCanvasLabels, AttachmentCanvasProps, } from './models/attachment-canvas';
10
10
  //# 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,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,8BAA8B,EAC9B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}
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,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}
package/index.js CHANGED
@@ -68,14 +68,14 @@ ge.d = (e, t) => {
68
68
  get: t[n]
69
69
  });
70
70
  }, ge.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
71
- var _e = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), ve = [
71
+ var F = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), _e = [
72
72
  .001,
73
73
  0,
74
74
  0,
75
75
  .001,
76
76
  0,
77
77
  0
78
- ], ye = 1.35, F = {
78
+ ], ve = 1.35, ye = {
79
79
  ANY: 1,
80
80
  DISPLAY: 2,
81
81
  PRINT: 4,
@@ -3697,7 +3697,7 @@ var kt = class {
3697
3697
  return U(this, "isFontLoadingAPISupported", e);
3698
3698
  }
3699
3699
  get isSyncFontLoadingSupported() {
3700
- return U(this, "isSyncFontLoadingSupported", _e || W.platform.isFirefox);
3700
+ return U(this, "isSyncFontLoadingSupported", F || W.platform.isFirefox);
3701
3701
  }
3702
3702
  _queueLoadingCallback(e) {
3703
3703
  function t() {
@@ -3797,14 +3797,14 @@ var kt = class {
3797
3797
  function Jt(e) {
3798
3798
  if (e instanceof URL) return e.href;
3799
3799
  if (typeof e == "string") {
3800
- if (_e) return e;
3800
+ if (F) return e;
3801
3801
  let t = URL.parse(e, window.location);
3802
3802
  if (t) return t.href;
3803
3803
  }
3804
3804
  throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
3805
3805
  }
3806
3806
  function Yt(e) {
3807
- if (_e && typeof Buffer < "u" && e instanceof Buffer) throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
3807
+ if (F && typeof Buffer < "u" && e instanceof Buffer) throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
3808
3808
  if (e instanceof Uint8Array && e.byteLength === e.buffer.byteLength) return e;
3809
3809
  if (typeof e == "string") return We(e);
3810
3810
  if (e instanceof ArrayBuffer || ArrayBuffer.isView(e) || typeof e == "object" && !isNaN(e?.length)) return new Uint8Array(e);
@@ -4409,7 +4409,7 @@ var rn = class {
4409
4409
  return new Uint8Array(t);
4410
4410
  }
4411
4411
  };
4412
- _e && B("Please use the `legacy` build in Node.js environments.");
4412
+ F && B("Please use the `legacy` build in Node.js environments.");
4413
4413
  async function hn(e) {
4414
4414
  let t = await process.getBuiltinModule("fs").promises.readFile(e);
4415
4415
  return new Uint8Array(t);
@@ -5130,7 +5130,7 @@ var qn = class {
5130
5130
  fontSizeScale = 1;
5131
5131
  textMatrix = null;
5132
5132
  textMatrixScale = 1;
5133
- fontMatrix = ve;
5133
+ fontMatrix = _e;
5134
5134
  leading = 0;
5135
5135
  x = 0;
5136
5136
  y = 0;
@@ -5639,7 +5639,7 @@ var $n = [
5639
5639
  this.dependencyTracker?.recordSimpleData("font", e).recordNamedDependency(e, t);
5640
5640
  let r = this.commonObjs.get(t), i = this.current;
5641
5641
  if (!r) throw Error(`Can't find font for ${t}`);
5642
- if (i.fontMatrix = r.fontMatrix || ve, (i.fontMatrix[0] === 0 || i.fontMatrix[3] === 0) && B("Invalid font matrix for font " + t), n < 0 ? (n = -n, i.fontDirection = -1) : i.fontDirection = 1, this.current.font = r, this.current.fontSize = n, r.isType3Font) return;
5642
+ if (i.fontMatrix = r.fontMatrix || _e, (i.fontMatrix[0] === 0 || i.fontMatrix[3] === 0) && B("Invalid font matrix for font " + t), n < 0 ? (n = -n, i.fontDirection = -1) : i.fontDirection = 1, this.current.font = r, this.current.fontSize = n, r.isType3Font) return;
5643
5643
  let a = r.loadedName || "sans-serif", o = r.systemFontInfo?.css || `"${a}", ${r.fallbackName}`, s = "normal";
5644
5644
  r.black ? s = "900" : r.bold && (s = "bold");
5645
5645
  let c = r.italic ? "italic" : "normal", l = n;
@@ -5786,7 +5786,7 @@ var $n = [
5786
5786
  f ? n.y -= x : n.x += x * u, a.restore(), this.compose(), this.dependencyTracker?.recordOperation(e).recordIncrementalData("sameLineText", e);
5787
5787
  }
5788
5788
  showType3Text(e, t) {
5789
- let n = this.ctx, r = this.current, i = r.font, a = r.fontSize, o = r.fontDirection, s = i.vertical ? 1 : -1, c = r.charSpacing, l = r.wordSpacing, u = r.textHScale * o, d = r.fontMatrix || ve, f = t.length, p = r.textRenderingMode === R.INVISIBLE, m, h, g, _;
5789
+ let n = this.ctx, r = this.current, i = r.font, a = r.fontSize, o = r.fontDirection, s = i.vertical ? 1 : -1, c = r.charSpacing, l = r.wordSpacing, u = r.textHScale * o, d = r.fontMatrix || _e, f = t.length, p = r.textRenderingMode === R.INVISIBLE, m, h, g, _;
5790
5790
  if (p || a === 0) return;
5791
5791
  this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null, n.save(), r.textMatrix && n.transform(...r.textMatrix), n.translate(r.x, r.y + r.textRise), n.scale(u, o);
5792
5792
  let v = this.dependencyTracker;
@@ -6195,7 +6195,7 @@ var ir = class {
6195
6195
  #n = !1;
6196
6196
  #r = !0;
6197
6197
  constructor(e, { name: t, intent: n, usage: r, rbGroups: i }) {
6198
- this.#e = !!(e & F.DISPLAY), this.#t = !!(e & F.PRINT), this.name = t, this.intent = n, this.usage = r, this.rbGroups = i;
6198
+ this.#e = !!(e & ye.DISPLAY), this.#t = !!(e & ye.PRINT), this.name = t, this.intent = n, this.usage = r, this.rbGroups = i;
6199
6199
  }
6200
6200
  get visible() {
6201
6201
  if (this.#n) return this.#r;
@@ -6211,7 +6211,7 @@ var ir = class {
6211
6211
  #t = /* @__PURE__ */ new Map();
6212
6212
  #n = null;
6213
6213
  #r = null;
6214
- constructor(e, t = F.DISPLAY) {
6214
+ constructor(e, t = ye.DISPLAY) {
6215
6215
  if (this.renderingIntent = t, this.name = null, this.creator = null, e !== null) {
6216
6216
  this.name = e.name, this.creator = e.creator, this.#r = e.order;
6217
6217
  for (let n of e.groups) this.#t.set(n.id, new sr(t, n));
@@ -7315,7 +7315,7 @@ var Nr = class {
7315
7315
  }, Hr = 100;
7316
7316
  function Ur(e = {}) {
7317
7317
  typeof e == "string" || e instanceof URL ? e = { url: e } : (e instanceof ArrayBuffer || ArrayBuffer.isView(e)) && (e = { data: e });
7318
- let t = new Wr(), { docId: n } = t, r = e.url ? Jt(e.url) : null, i = e.data ? Yt(e.data) : null, a = e.httpHeaders || null, o = e.withCredentials === !0, s = e.password ?? null, c = e.range instanceof Gr ? e.range : null, l = Number.isInteger(e.rangeChunkSize) && e.rangeChunkSize > 0 ? e.rangeChunkSize : 2 ** 16, u = e.worker instanceof Jr ? e.worker : null, d = e.verbosity, f = typeof e.docBaseUrl == "string" && !ut(e.docBaseUrl) ? e.docBaseUrl : null, p = Xt(e.cMapUrl), m = e.cMapPacked !== !1, h = e.CMapReaderFactory || (_e ? vn : cn), g = Xt(e.iccUrl), _ = Xt(e.standardFontDataUrl), v = e.StandardFontDataFactory || (_e ? yn : fn), y = Xt(e.wasmUrl), b = e.WasmFactory || (_e ? bn : mn), x = e.stopAtErrors !== !0, S = Number.isInteger(e.maxImageSize) && e.maxImageSize > -1 ? e.maxImageSize : -1, C = e.isEvalSupported !== !1, w = typeof e.isOffscreenCanvasSupported == "boolean" ? e.isOffscreenCanvasSupported : !_e, T = typeof e.isImageDecoderSupported == "boolean" ? e.isImageDecoderSupported : !_e && (W.platform.isFirefox || !globalThis.chrome), E = Number.isInteger(e.canvasMaxAreaInBytes) ? e.canvasMaxAreaInBytes : -1, ee = typeof e.disableFontFace == "boolean" ? e.disableFontFace : _e, te = e.fontExtraProperties === !0, ne = e.enableXfa === !0, re = e.ownerDocument || globalThis.document, D = e.disableRange === !0, O = e.disableStream === !0, k = e.disableAutoFetch === !0, ie = e.pdfBug === !0, A = e.CanvasFactory || (_e ? _n : on), ae = e.FilterFactory || (_e ? gn : un), oe = e.enableHWA === !0, j = e.useWasm !== !1, se = c ? c.length : e.length ?? NaN, ce = typeof e.useSystemFonts == "boolean" ? e.useSystemFonts : !_e && !ee, le = typeof e.useWorkerFetch == "boolean" ? e.useWorkerFetch : !!(h === cn && v === fn && b === mn && p && _ && y && ht(p, document.baseURI) && ht(_, document.baseURI) && ht(y, document.baseURI));
7318
+ let t = new Wr(), { docId: n } = t, r = e.url ? Jt(e.url) : null, i = e.data ? Yt(e.data) : null, a = e.httpHeaders || null, o = e.withCredentials === !0, s = e.password ?? null, c = e.range instanceof Gr ? e.range : null, l = Number.isInteger(e.rangeChunkSize) && e.rangeChunkSize > 0 ? e.rangeChunkSize : 2 ** 16, u = e.worker instanceof Jr ? e.worker : null, d = e.verbosity, f = typeof e.docBaseUrl == "string" && !ut(e.docBaseUrl) ? e.docBaseUrl : null, p = Xt(e.cMapUrl), m = e.cMapPacked !== !1, h = e.CMapReaderFactory || (F ? vn : cn), g = Xt(e.iccUrl), _ = Xt(e.standardFontDataUrl), v = e.StandardFontDataFactory || (F ? yn : fn), y = Xt(e.wasmUrl), b = e.WasmFactory || (F ? bn : mn), x = e.stopAtErrors !== !0, S = Number.isInteger(e.maxImageSize) && e.maxImageSize > -1 ? e.maxImageSize : -1, C = e.isEvalSupported !== !1, w = typeof e.isOffscreenCanvasSupported == "boolean" ? e.isOffscreenCanvasSupported : !F, T = typeof e.isImageDecoderSupported == "boolean" ? e.isImageDecoderSupported : !F && (W.platform.isFirefox || !globalThis.chrome), E = Number.isInteger(e.canvasMaxAreaInBytes) ? e.canvasMaxAreaInBytes : -1, ee = typeof e.disableFontFace == "boolean" ? e.disableFontFace : F, te = e.fontExtraProperties === !0, ne = e.enableXfa === !0, re = e.ownerDocument || globalThis.document, D = e.disableRange === !0, O = e.disableStream === !0, k = e.disableAutoFetch === !0, ie = e.pdfBug === !0, A = e.CanvasFactory || (F ? _n : on), ae = e.FilterFactory || (F ? gn : un), oe = e.enableHWA === !0, j = e.useWasm !== !1, se = c ? c.length : e.length ?? NaN, ce = typeof e.useSystemFonts == "boolean" ? e.useSystemFonts : !F && !ee, le = typeof e.useWorkerFetch == "boolean" ? e.useWorkerFetch : !!(h === cn && v === fn && b === mn && p && _ && y && ht(p, document.baseURI) && ht(_, document.baseURI) && ht(y, document.baseURI));
7319
7319
  Ae(d);
7320
7320
  let M = {
7321
7321
  canvasFactory: new A({
@@ -7383,7 +7383,7 @@ function Ur(e = {}) {
7383
7383
  });
7384
7384
  else if (!i) {
7385
7385
  if (!r) throw Error("getDocument - no `url` parameter provided.");
7386
- s = new (ht(r) ? xr : _e ? Nr : Or)({
7386
+ s = new (ht(r) ? xr : F ? Nr : Or)({
7387
7387
  url: r,
7388
7388
  length: se,
7389
7389
  httpHeaders: a,
@@ -7634,7 +7634,7 @@ var Wr = class e {
7634
7634
  this.#e = !1, s ||= this._transport.getOptionalContentConfig(h);
7635
7635
  let _ = this._intentStates.get(g);
7636
7636
  _ || (_ = Object.create(null), this._intentStates.set(g, _)), _.streamReaderCancelTimeout && (clearTimeout(_.streamReaderCancelTimeout), _.streamReaderCancelTimeout = null);
7637
- let v = !!(h & F.PRINT);
7637
+ let v = !!(h & ye.PRINT);
7638
7638
  _.displayReadyCapability || (_.displayReadyCapability = Promise.withResolvers(), _.operatorList = {
7639
7639
  fnArray: [],
7640
7640
  argsArray: [],
@@ -7835,7 +7835,7 @@ var Wr = class e {
7835
7835
  static #a = !1;
7836
7836
  static #o = /* @__PURE__ */ new WeakMap();
7837
7837
  static {
7838
- _e && (this.#a = !0, ir.workerSrc ||= "./pdf.worker.mjs"), this._isSameOrigin = (e, t) => {
7838
+ F && (this.#a = !0, ir.workerSrc ||= "./pdf.worker.mjs"), this._isSameOrigin = (e, t) => {
7839
7839
  let n = URL.parse(e);
7840
7840
  if (!n?.origin || n.origin === "null") return !1;
7841
7841
  let r = new URL(t, n);
@@ -7975,32 +7975,32 @@ var Wr = class e {
7975
7975
  return U(this, "annotationStorage", new Wt());
7976
7976
  }
7977
7977
  getRenderingIntent(e, t = be.ENABLE, n = null, r = !1, i = !1) {
7978
- let a = F.DISPLAY, o = Ut;
7978
+ let a = ye.DISPLAY, o = Ut;
7979
7979
  switch (e) {
7980
7980
  case "any":
7981
- a = F.ANY;
7981
+ a = ye.ANY;
7982
7982
  break;
7983
7983
  case "display": break;
7984
7984
  case "print":
7985
- a = F.PRINT;
7985
+ a = ye.PRINT;
7986
7986
  break;
7987
7987
  default: B(`getRenderingIntent - invalid intent: ${e}`);
7988
7988
  }
7989
- let s = a & F.PRINT && n instanceof Gt ? n : this.annotationStorage;
7989
+ let s = a & ye.PRINT && n instanceof Gt ? n : this.annotationStorage;
7990
7990
  switch (t) {
7991
7991
  case be.DISABLE:
7992
- a += F.ANNOTATIONS_DISABLE;
7992
+ a += ye.ANNOTATIONS_DISABLE;
7993
7993
  break;
7994
7994
  case be.ENABLE: break;
7995
7995
  case be.ENABLE_FORMS:
7996
- a += F.ANNOTATIONS_FORMS;
7996
+ a += ye.ANNOTATIONS_FORMS;
7997
7997
  break;
7998
7998
  case be.ENABLE_STORAGE:
7999
- a += F.ANNOTATIONS_STORAGE, o = s.serializable;
7999
+ a += ye.ANNOTATIONS_STORAGE, o = s.serializable;
8000
8000
  break;
8001
8001
  default: B(`getRenderingIntent - invalid annotationMode: ${t}`);
8002
8002
  }
8003
- r && (a += F.IS_EDITING), i && (a += F.OPLIST);
8003
+ r && (a += ye.IS_EDITING), i && (a += ye.OPLIST);
8004
8004
  let { ids: c, hash: l } = s.modifiedIds, u = [
8005
8005
  a,
8006
8006
  o.hash,
@@ -9254,11 +9254,11 @@ var ii = class {
9254
9254
  "right"
9255
9255
  ], { fontColor: n } = this.data.defaultAppearanceData, r = this.data.defaultAppearanceData.fontSize || ci, i = e.style, a, o = (e) => Math.round(10 * e) / 10;
9256
9256
  if (this.data.multiLine) {
9257
- let e = Math.abs(this.data.rect[3] - this.data.rect[1] - 2), t = e / (Math.round(e / (ye * r)) || 1);
9258
- a = Math.min(r, o(t / ye));
9257
+ let e = Math.abs(this.data.rect[3] - this.data.rect[1] - 2), t = e / (Math.round(e / (ve * r)) || 1);
9258
+ a = Math.min(r, o(t / ve));
9259
9259
  } else {
9260
9260
  let e = Math.abs(this.data.rect[3] - this.data.rect[1] - 2);
9261
- a = Math.min(r, o(e / ye));
9261
+ a = Math.min(r, o(e / ve));
9262
9262
  }
9263
9263
  i.fontSize = `calc(${a}px * var(--total-scale-factor))`, i.color = G.makeHexColor(n[0], n[1], n[2]), this.data.textAlignment !== null && (i.textAlign = t[this.data.textAlignment]);
9264
9264
  }
@@ -17073,17 +17073,17 @@ var To = fo.map((e) => ({
17073
17073
  jsonExpandIcon: "_jsonExpandIcon_kzbno_53",
17074
17074
  jsonCollapseIcon: "_jsonCollapseIcon_kzbno_65",
17075
17075
  jsonCollapsedContent: "_jsonCollapsedContent_kzbno_81"
17076
- }, Ao = 2e3, jo = O(({ isOpen: t, onClose: i, content: o, fileName: s, ariaLabel: c, closeLabel: f = "Close", onDownload: p, onCopyText: m, onCopyMarkdown: g, onCopyJson: _, downloadLabel: v = "Download", copyTextLabel: y = "Copy text", copiedTextLabel: b = "Copied!", copyMarkdownLabel: C = "Copy as Markdown", copiedMarkdownLabel: w = "Copied!", copyJsonLabel: ne = "Copy as JSON", copiedJsonLabel: re = "Copied!", unsupportedLabel: D = "Preview is not supported for this file", loadErrorLabel: O = "Failed to load file", forbiddenErrorLabel: ie = "You don't have permission to access this file", isMobile: A = !1, defaultWidth: fe, minWidth: pe = 320, maxWidth: me = 1500, onResizeStop: he, styles: ge, className: _e, codeBlockTheme: ve, loadPdf: ye }) => {
17077
- let [F, be] = j(!1), [xe, I] = j(!1), [L, Se] = j(!1), R = oe(null), Ce = oe(null), z = oe(null), we = k(() => {
17078
- m?.(), R.current != null && clearTimeout(R.current), be(!0), R.current = setTimeout(() => be(!1), Ao);
17079
- }, [m]), Te = k(() => {
17080
- g?.(), Ce.current != null && clearTimeout(Ce.current), I(!0), Ce.current = setTimeout(() => I(!1), Ao);
17081
- }, [g]), Ee = k(() => {
17082
- _?.(), z.current != null && clearTimeout(z.current), Se(!0), z.current = setTimeout(() => Se(!1), Ao);
17083
- }, [_]), { colors: De, typography: Oe, bodyClassName: ke, cssVars: Ae, panelStyles: je } = ge ?? {}, Me = ae(() => ({
17084
- ...r({ "--ac-text": De?.text }),
17076
+ }, Ao = 2e3, jo = O(({ isOpen: t, onClose: i, content: o, fileName: s, labels: { ariaLabel: c, closeLabel: f = "Close", downloadLabel: p = "Download", copyTextLabel: m = "Copy text", copiedTextLabel: g = "Copied!", copyMarkdownLabel: _ = "Copy as Markdown", copiedMarkdownLabel: v = "Copied!", copyJsonLabel: y = "Copy as JSON", copiedJsonLabel: b = "Copied!", unsupportedLabel: C = "Preview is not supported for this file", loadErrorLabel: w = "Failed to load file", forbiddenErrorLabel: ne = "You don't have permission to access this file" }, onDownload: re, onCopyText: D, onCopyMarkdown: O, onCopyJson: ie, isMobile: A = !1, defaultWidth: fe, minWidth: pe = 320, maxWidth: me = 1500, onResizeStop: he, styles: ge, codeBlockTheme: F, loadPdf: _e }) => {
17077
+ let [ve, ye] = j(!1), [be, xe] = j(!1), [I, L] = j(!1), Se = oe(null), R = oe(null), Ce = oe(null), z = k(() => {
17078
+ D?.(), Se.current != null && clearTimeout(Se.current), ye(!0), Se.current = setTimeout(() => ye(!1), Ao);
17079
+ }, [D]), we = k(() => {
17080
+ O?.(), R.current != null && clearTimeout(R.current), xe(!0), R.current = setTimeout(() => xe(!1), Ao);
17081
+ }, [O]), Te = k(() => {
17082
+ ie?.(), Ce.current != null && clearTimeout(Ce.current), L(!0), Ce.current = setTimeout(() => L(!1), Ao);
17083
+ }, [ie]), { colors: Ee, typography: De, bodyClassName: Oe, className: ke, cssVars: Ae, panelStyles: je } = ge ?? {}, Me = ae(() => ({
17084
+ ...r({ "--ac-text": Ee?.text }),
17085
17085
  ...Ae
17086
- }), [ge]), B = m != null && o.type === P.PlainText, V = g != null && o.type === P.Markdown, H = _ != null && o.type === P.Json, Ne = p != null && de(o), Pe = ae(() => {
17086
+ }), [ge]), B = D != null && o.type === P.PlainText, V = O != null && o.type === P.Markdown, H = ie != null && o.type === P.Json, Ne = re != null && de(o), Pe = ae(() => {
17087
17087
  switch (o.type) {
17088
17088
  case P.Image:
17089
17089
  case P.Unsupported:
@@ -17095,7 +17095,7 @@ var To = fo.map((e) => ({
17095
17095
  }, [o.type]), Fe = ae(() => {
17096
17096
  switch (o.type) {
17097
17097
  case P.PlainText: return /* @__PURE__ */ M("pre", {
17098
- className: a("whitespace-pre-wrap break-words", $.body, Oe?.fontClassName),
17098
+ className: a("whitespace-pre-wrap break-words", $.body, De?.fontClassName),
17099
17099
  children: o.text
17100
17100
  });
17101
17101
  case P.Image: return /* @__PURE__ */ M("img", {
@@ -17106,7 +17106,7 @@ var To = fo.map((e) => ({
17106
17106
  case P.Markdown: return /* @__PURE__ */ M(n, {
17107
17107
  content: o.text,
17108
17108
  isStreaming: !1,
17109
- codeBlockTheme: ve,
17109
+ codeBlockTheme: F,
17110
17110
  classNames: e
17111
17111
  });
17112
17112
  case P.Json: return /* @__PURE__ */ M("div", {
@@ -17141,11 +17141,11 @@ var To = fo.map((e) => ({
17141
17141
  url: o.url,
17142
17142
  highlights: o.highlights ?? [],
17143
17143
  selectedHighlightId: o.selectedHighlightId,
17144
- loadPdf: ye
17144
+ loadPdf: _e
17145
17145
  }, o.url);
17146
17146
  case P.Unsupported: return /* @__PURE__ */ M("p", {
17147
17147
  className: a("text-center", $.statusLabel),
17148
- children: D
17148
+ children: C
17149
17149
  });
17150
17150
  case P.Error: {
17151
17151
  let e = o.errorType === ue.Forbidden;
@@ -17157,20 +17157,20 @@ var To = fo.map((e) => ({
17157
17157
  className: $.errorIcon
17158
17158
  }), /* @__PURE__ */ M("p", {
17159
17159
  className: a("text-center", $.statusLabel),
17160
- children: e ? ie : O
17160
+ children: e ? ne : w
17161
17161
  })]
17162
17162
  });
17163
17163
  }
17164
17164
  }
17165
17165
  }, [
17166
17166
  o,
17167
- Oe?.fontClassName,
17167
+ De?.fontClassName,
17168
17168
  s,
17169
- ve,
17170
- D,
17171
- O,
17172
- ie,
17173
- ye
17169
+ F,
17170
+ C,
17171
+ w,
17172
+ ne,
17173
+ _e
17174
17174
  ]);
17175
17175
  return /* @__PURE__ */ M(u, {
17176
17176
  isOpen: t,
@@ -17188,49 +17188,49 @@ var To = fo.map((e) => ({
17188
17188
  onResizeStop: he,
17189
17189
  styles: {
17190
17190
  ...je,
17191
- className: a(t ? "mobile:w-full mobile:max-w-full" : "w-0", _e, je?.className)
17191
+ className: a(t ? "mobile:w-full mobile:max-w-full" : "w-0", ke, je?.className)
17192
17192
  },
17193
17193
  rightActions: B || V || H || Ne ? /* @__PURE__ */ N(le, { children: [
17194
17194
  B && /* @__PURE__ */ M(h, {
17195
- icon: M(F ? S : T, {
17195
+ icon: M(ve ? S : T, {
17196
17196
  size: d.LG,
17197
17197
  stroke: 1.5
17198
17198
  }),
17199
- "aria-label": F ? b : y,
17200
- tooltipProps: { tooltip: F ? b : y },
17201
- onClick: we
17199
+ "aria-label": ve ? g : m,
17200
+ tooltipProps: { tooltip: ve ? g : m },
17201
+ onClick: z
17202
17202
  }),
17203
17203
  V && /* @__PURE__ */ M(h, {
17204
- icon: M(xe ? S : te, {
17204
+ icon: M(be ? S : te, {
17205
17205
  size: d.LG,
17206
17206
  stroke: 1.5
17207
17207
  }),
17208
- "aria-label": xe ? w : C,
17209
- tooltipProps: { tooltip: xe ? w : C },
17210
- onClick: Te
17208
+ "aria-label": be ? v : _,
17209
+ tooltipProps: { tooltip: be ? v : _ },
17210
+ onClick: we
17211
17211
  }),
17212
17212
  H && /* @__PURE__ */ M(h, {
17213
- icon: M(L ? S : T, {
17213
+ icon: M(I ? S : T, {
17214
17214
  size: d.LG,
17215
17215
  stroke: 1.5
17216
17216
  }),
17217
- "aria-label": L ? re : ne,
17218
- tooltipProps: { tooltip: L ? re : ne },
17219
- onClick: Ee
17217
+ "aria-label": I ? b : y,
17218
+ tooltipProps: { tooltip: I ? b : y },
17219
+ onClick: Te
17220
17220
  }),
17221
17221
  Ne && /* @__PURE__ */ M(h, {
17222
17222
  icon: /* @__PURE__ */ M(E, {
17223
17223
  size: d.LG,
17224
17224
  stroke: 1.5
17225
17225
  }),
17226
- "aria-label": v,
17227
- tooltipProps: { tooltip: v },
17228
- onClick: p
17226
+ "aria-label": p,
17227
+ tooltipProps: { tooltip: p },
17228
+ onClick: re
17229
17229
  })
17230
17230
  ] }) : null,
17231
17231
  children: /* @__PURE__ */ M("div", {
17232
17232
  style: o.type === P.PlainText ? Me : void 0,
17233
- className: a(Pe, ke),
17233
+ className: a(Pe, Oe),
17234
17234
  children: Fe
17235
17235
  })
17236
17236
  });
@@ -17268,40 +17268,42 @@ var Fo = ({ children: e }) => {
17268
17268
  let e = ie(Po);
17269
17269
  if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
17270
17270
  return e;
17271
- }, Lo = O(({ ariaLabel: e = "Attachment preview", closeLabel: t = "Close", downloadLabel: n = "Download", unsupportedLabel: r = "Preview is not supported for this file", loadErrorLabel: a = "Failed to load file", forbiddenErrorLabel: o = "You don't have permission to access this file", copyTextLabel: s, copiedTextLabel: c, copyMarkdownLabel: l, copiedMarkdownLabel: u, copyJsonLabel: d, copiedJsonLabel: f, isMobile: p = !1, defaultWidth: m, codeBlockTheme: h }) => {
17272
- let { isOpen: g, content: _, fileName: v, closeCanvas: y } = Io(), b = k(() => {
17273
- pe(_, v);
17274
- }, [_, v]), x = k(() => {
17275
- _.type === P.PlainText && i(_.text);
17276
- }, [_]), S = k(() => {
17277
- _.type === P.Markdown && i(_.text);
17278
- }, [_]), C = k(() => {
17279
- _.type === P.Json && i(JSON.stringify(_.value, null, 2));
17280
- }, [_]);
17271
+ }, Lo = O(({ labels: e, isMobile: t = !1, defaultWidth: n, codeBlockTheme: r }) => {
17272
+ let { ariaLabel: a = "Attachment preview", closeLabel: o = "Close", downloadLabel: s = "Download", unsupportedLabel: c = "Preview is not supported for this file", loadErrorLabel: l = "Failed to load file", forbiddenErrorLabel: u = "You don't have permission to access this file", copyTextLabel: d, copiedTextLabel: f, copyMarkdownLabel: p, copiedMarkdownLabel: m, copyJsonLabel: h, copiedJsonLabel: g } = e ?? {}, { isOpen: _, content: v, fileName: y, closeCanvas: b } = Io(), x = k(() => {
17273
+ pe(v, y);
17274
+ }, [v, y]), S = k(() => {
17275
+ v.type === P.PlainText && i(v.text);
17276
+ }, [v]), C = k(() => {
17277
+ v.type === P.Markdown && i(v.text);
17278
+ }, [v]), w = k(() => {
17279
+ v.type === P.Json && i(JSON.stringify(v.value, null, 2));
17280
+ }, [v]);
17281
17281
  return /* @__PURE__ */ M(jo, {
17282
- isOpen: g,
17283
- onClose: y,
17284
- content: _,
17285
- fileName: v,
17286
- ariaLabel: e,
17287
- closeLabel: t,
17288
- onDownload: b,
17289
- downloadLabel: n,
17290
- onCopyText: _.type === P.PlainText ? x : void 0,
17291
- copyTextLabel: s,
17292
- copiedTextLabel: c,
17293
- onCopyMarkdown: _.type === P.Markdown ? S : void 0,
17294
- copyMarkdownLabel: l,
17295
- copiedMarkdownLabel: u,
17296
- onCopyJson: _.type === P.Json ? C : void 0,
17297
- copyJsonLabel: d,
17298
- copiedJsonLabel: f,
17299
- unsupportedLabel: r,
17300
- loadErrorLabel: a,
17301
- forbiddenErrorLabel: o,
17302
- isMobile: p,
17303
- defaultWidth: m,
17304
- codeBlockTheme: h
17282
+ isOpen: _,
17283
+ onClose: b,
17284
+ content: v,
17285
+ fileName: y,
17286
+ labels: {
17287
+ ariaLabel: a,
17288
+ closeLabel: o,
17289
+ downloadLabel: s,
17290
+ copyTextLabel: d,
17291
+ copiedTextLabel: f,
17292
+ copyMarkdownLabel: p,
17293
+ copiedMarkdownLabel: m,
17294
+ copyJsonLabel: h,
17295
+ copiedJsonLabel: g,
17296
+ unsupportedLabel: c,
17297
+ loadErrorLabel: l,
17298
+ forbiddenErrorLabel: u
17299
+ },
17300
+ onDownload: x,
17301
+ onCopyText: v.type === P.PlainText ? S : void 0,
17302
+ onCopyMarkdown: v.type === P.Markdown ? C : void 0,
17303
+ onCopyJson: v.type === P.Json ? w : void 0,
17304
+ isMobile: t,
17305
+ defaultWidth: n,
17306
+ codeBlockTheme: r
17305
17307
  });
17306
17308
  }), Ro = new Set(/* @__PURE__ */ "txt.md.markdown.json.jsonl.ndjson.xml.csv.tsv.yaml.yml.toml.ini.conf.cfg.html.htm.css.scss.sass.less.js.jsx.ts.tsx.mjs.cjs.mts.cts.py.rb.go.rs.java.kt.swift.c.h.cpp.cs.sh.bash.zsh.fish.ps1.log.env.gitignore.dockerfile.makefile.sql".split(".")), zo = (e) => {
17307
17309
  let t = e.lastIndexOf(".");
@@ -92,6 +92,8 @@ export interface AttachmentCanvasStyles {
92
92
  typography?: AttachmentCanvasTypography;
93
93
  /** Extra class name(s) merged onto the scrollable content body element. */
94
94
  bodyClassName?: string;
95
+ /** Extra class name(s) merged onto the panel width wrapper. */
96
+ className?: string;
95
97
  /**
96
98
  * Arbitrary CSS custom properties applied inline to the content body.
97
99
  * Merged after the typed color/typography vars, so they can override them.
@@ -100,28 +102,12 @@ export interface AttachmentCanvasStyles {
100
102
  /** Style overrides forwarded to the underlying SidebarPanel (panel chrome). */
101
103
  panelStyles?: SidebarPanelStyles;
102
104
  }
103
- /** Props for the AttachmentCanvas component. */
104
- export interface AttachmentCanvasProps {
105
- /** Controls visibility of the side panel. */
106
- isOpen: boolean;
107
- /** Called when the user activates the built-in close button. */
108
- onClose: () => void;
109
- /** The attachment content to render inside the canvas. */
110
- content: AttachmentCanvasContent;
111
- /** File name displayed as the panel title. */
112
- fileName?: string;
105
+ /** User-visible strings for the `AttachmentCanvas` component. */
106
+ export interface AttachmentCanvasLabels {
113
107
  /** Accessible label for the panel region. */
114
108
  ariaLabel: string;
115
109
  /** Accessible label for the close button. Defaults to `'Close'`. */
116
110
  closeLabel?: string;
117
- /** Called when the user activates the download button. When omitted the download button is hidden. Hidden automatically when content type is `Unsupported`. */
118
- onDownload?: () => void;
119
- /** Called when the user activates the copy-text button. When omitted the button is hidden. Only relevant when content type is `PlainText`. */
120
- onCopyText?: () => void;
121
- /** Called when the user activates the copy-as-markdown button. When omitted the button is hidden. Only relevant when content type is `Markdown`. */
122
- onCopyMarkdown?: () => void;
123
- /** Called when the user activates the copy-JSON button. When omitted the button is hidden. Only relevant when content type is `Json`. */
124
- onCopyJson?: () => void;
125
111
  /** Message shown in the canvas body when the content type is `Unsupported`. Defaults to `'Preview is not supported for this file'`. */
126
112
  unsupportedLabel?: string;
127
113
  /** Message shown in the canvas body when content type is `Error` with `errorType: LoadFailed`. Defaults to `'Failed to load file'`. */
@@ -142,6 +128,27 @@ export interface AttachmentCanvasProps {
142
128
  copyJsonLabel?: string;
143
129
  /** Tooltip and accessible label for the copy-JSON button after a successful copy. Defaults to `'Copied!'`. */
144
130
  copiedJsonLabel?: string;
131
+ }
132
+ /** Props for the AttachmentCanvas component. */
133
+ export interface AttachmentCanvasProps {
134
+ /** Controls visibility of the side panel. */
135
+ isOpen: boolean;
136
+ /** Called when the user activates the built-in close button. */
137
+ onClose: () => void;
138
+ /** The attachment content to render inside the canvas. */
139
+ content: AttachmentCanvasContent;
140
+ /** File name displayed as the panel title. */
141
+ fileName?: string;
142
+ /** User-visible strings. */
143
+ labels: AttachmentCanvasLabels;
144
+ /** Called when the user activates the download button. When omitted the download button is hidden. Hidden automatically when content type is `Unsupported`. */
145
+ onDownload?: () => void;
146
+ /** Called when the user activates the copy-text button. When omitted the button is hidden. Only relevant when content type is `PlainText`. */
147
+ onCopyText?: () => void;
148
+ /** Called when the user activates the copy-as-markdown button. When omitted the button is hidden. Only relevant when content type is `Markdown`. */
149
+ onCopyMarkdown?: () => void;
150
+ /** Called when the user activates the copy-JSON button. When omitted the button is hidden. Only relevant when content type is `Json`. */
151
+ onCopyJson?: () => void;
145
152
  /** Whether the viewport is in mobile breakpoint — disables drag-to-resize. */
146
153
  isMobile?: boolean;
147
154
  /** Initial panel width in pixels (when resizable). Defaults to `min(maxWidth, 2/3 of viewport width)`. */
@@ -154,8 +161,6 @@ export interface AttachmentCanvasProps {
154
161
  onResizeStop?: (width: number) => void;
155
162
  /** Style overrides for the content body and the underlying SidebarPanel chrome. */
156
163
  styles?: AttachmentCanvasStyles;
157
- /** Extra class name(s) merged onto the panel width wrapper. */
158
- className?: string;
159
164
  /** Syntax highlight color theme forwarded to MarkdownRenderer code blocks. */
160
165
  codeBlockTheme?: CodeBlockTheme;
161
166
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-canvas.d.ts","sourceRoot":"","sources":["../../src/models/attachment-canvas.ts"],"names":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,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0DAA0D;IAC1D,OAAO,EAAE,uBAAuB,CAAC;IACjC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,+JAA+J;IAC/J,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,8IAA8I;IAC9I,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,oJAAoJ;IACpJ,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,yIAAyI;IACzI,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0GAA0G;IAC1G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,mFAAmF;IACnF,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C"}
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.0.0-dev.503",
4
+ "version": "1.0.0-dev.509",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,8 +17,8 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.0.0-dev.503",
21
- "@epam/ai-dial-sidebar": "1.0.0-dev.503",
20
+ "@epam/ai-dial-chat-shared": "1.0.0-dev.509",
21
+ "@epam/ai-dial-sidebar": "1.0.0-dev.509",
22
22
  "@epam/ai-dial-ui-kit": "0.12.0-dev.28",
23
23
  "@epam/pdf-highlighter-kit": ">=0.0.14",
24
24
  "@tabler/icons-react": "^3.44.0",