@epam/ai-dial-attachment-input 1.0.0-rc.3 → 1.0.0-rc.4

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":"AttachmentCard.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCard/AttachmentCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAMxE,8GAA8G;AAC9G,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAyFlD,CAAC"}
1
+ {"version":3,"file":"AttachmentCard.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCard/AttachmentCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAKxE,8GAA8G;AAC9G,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAyElD,CAAC"}
@@ -15,8 +15,6 @@ interface ActionProps {
15
15
  /** ID of the attachment to retry. */
16
16
  id?: string;
17
17
  }
18
- /** Action button for completed uploads. */
19
- export declare const ActionButton: FC<ActionProps>;
20
18
  /** Retry button for failed uploads. */
21
19
  export declare const ReloadAction: FC<Omit<ActionProps, 'icon'>>;
22
20
  /** Download button for completed uploads. */
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Actions.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAG5D,UAAU,WAAW;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,2CAA2C;AAC3C,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,WAAW,CAyBxC,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAQtD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAOxD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAOxD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAQtD,CAAC"}
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Actions.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAG5D,UAAU,WAAW;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AA+BD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAQtD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAOxD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAOxD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAOtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAsNlD,CAAC"}
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8MlD,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._tile_1x4ax_1{background:var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--ai-tile-border,var(--stroke-secondary,#d1dbea))}._tile_1x4ax_1._hovered_1x4ax_5:hover{background:var(--ai-tile-bg-hover,var(--bg-control-neutral-hover,#e0e6f0))}._tile_1x4ax_1:focus-visible{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus,#161b2d))}._selected_1x4ax_12{background:var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f));border-color:var(--ai-tile-border-selected,var(--stroke-accent-alpha,#2764d933))}._tileError_1x4ax_17{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_1x4ax_22{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_1x4ax_26{color:var(--ai-tile-type-text,var(--text-secondary,#6b7280))}._retryIcon_1x4ax_30{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_1x4ax_34{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._imageActionButton_1x4ax_38{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#6b7280))}._headerIcon_1sgtq_1,._headerLabel_1sgtq_2{color:var(--ai-group-text,var(--text-secondary,#6b7280))}._overlay_mzpdp_1{background:var(--ai-fd-bg,var(--bg-backdrop,#161b2d4d))}._icon_mzpdp_5{color:var(--ai-fd-icon,var(--text-accent,#1d4ed8))}._deniedIcon_mzpdp_9{color:var(--ai-fd-denied-icon,var(--text-error,#ae2f2f))}
1
+ ._tile_3jao2_1{background:var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--ai-tile-border,var(--stroke-secondary,#d1dbea))}._tile_3jao2_1._hovered_3jao2_5:hover{background:var(--ai-tile-bg-hover,var(--bg-control-neutral-hover,#e0e6f0));border-color:var(--ai-tile-border-hover,var(--ai-tile-border,var(--stroke-secondary,#d1dbea)))}._tile_3jao2_1:focus-visible{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus-black,#161b2d))}._selected_3jao2_15{background:var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f));border-color:var(--ai-tile-border-selected,var(--stroke-accent-alpha,#2764d933))}._tileError_3jao2_20{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_3jao2_25{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_3jao2_29{color:var(--ai-tile-type-text,var(--text-secondary,#57647a))}._retryIcon_3jao2_33{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_3jao2_37{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._actionButton_3jao2_43{background:var(--ai-tile-hover-icon-bg,var(--bg-control-neutral-hover,#e0e6f0))}._imageActionButton_3jao2_47{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#57647a))}._headerIcon_1dmgi_1,._headerLabel_1dmgi_2{color:var(--ai-group-text,var(--text-secondary,#57647a))}._overlay_mzpdp_1{background:var(--ai-fd-bg,var(--bg-backdrop,#161b2d4d))}._icon_mzpdp_5{color:var(--ai-fd-icon,var(--text-accent,#1d4ed8))}._deniedIcon_mzpdp_9{color:var(--ai-fd-denied-icon,var(--text-error,#ae2f2f))}
2
2
  /*$vite$:1*/
package/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export type { AttachmentCardProps, AttachmentCardColors, AttachmentCardTypograph
6
6
  export type { AttachmentTrayProps, AttachmentTrayLabels, AttachmentTrayStyles, } from './models/attachment-tray';
7
7
  export { type AttachmentGroupProps, type AttachmentGroupLabels, type AttachmentGroupColors, type AttachmentGroupTypography, type AttachmentGroupStyles, } from './models/attachment-group';
8
8
  export type { FileDndOverlayProps, FileDndOverlayLabels, FileDndOverlayColors, FileDndOverlayTypography, FileDndOverlayStyles, } from './models/file-dnd-overlay';
9
+ export type { FileAttachmentLabels, FileAttachmentTypography, FileAttachmentStyles, } from './models/attachment-file-row';
9
10
  export { useClipboardPaste, type UseClipboardPasteLabels, } from './hooks/useClipboardPaste';
10
11
  export { useLazyImageLoad, LazyImageLoadStatus, } from './hooks/useLazyImageLoad';
11
12
  export { generateAttachmentId, getAttachmentCardState, getExtFromContentType, getAttachmentIcon, getNameWithoutExtension, mimeTypesToExtensionLabels, isMimeTypeAllowed, } from './utils/attachment';
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,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,E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jB,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
package/index.js CHANGED
@@ -1,33 +1,33 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, RequestStatus as r, buildCssVars as i, mergeClasses as a } from "@epam/ai-dial-chat-shared";
2
2
  import { useCallback as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { IconClipboard as f, IconDownload as p, IconExternalLink as m, IconFile as h, IconFileDescription as g, IconFileTypeBmp as _, IconFileTypeCss as v, IconFileTypeCsv as y, IconFileTypeDoc as b, IconFileTypeDocx as x, IconFileTypeHtml as S, IconFileTypeJpg as C, IconFileTypeJs as w, IconFileTypeJsx as T, IconFileTypePdf as E, IconFileTypePhp as D, IconFileTypePng as O, IconFileTypePpt as k, IconFileTypeRs as A, IconFileTypeSql as j, IconFileTypeSvg as M, IconFileTypeTs as N, IconFileTypeTsx as P, IconFileTypeTxt as F, IconFileTypeVue as I, IconFileTypeXls as L, IconFileTypeXml as R, IconFileTypeZip as z, IconFileX as B, IconMusic as ee, IconPaperclip as V, IconPhoto as H, IconReload as te, IconTerminal2 as U, IconVideo as W, IconX as ne } from "@tabler/icons-react";
4
- import { DIAL_ICON_SIZE as G, DialSkeleton as re, DialSkeletonVariant as ie, DialSpinner as ae, ElementSize as oe, GhostIconButton as se, Highlight as ce } from "@epam/ai-dial-ui-kit";
5
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
3
+ import { IconClipboard as f, IconDownload as p, IconExternalLink as m, IconFile as h, IconFileDescription as g, IconFileTypeBmp as _, IconFileTypeCss as v, IconFileTypeCsv as y, IconFileTypeDoc as b, IconFileTypeDocx as x, IconFileTypeHtml as S, IconFileTypeJpg as C, IconFileTypeJs as w, IconFileTypeJsx as T, IconFileTypePdf as E, IconFileTypePhp as D, IconFileTypePng as O, IconFileTypePpt as k, IconFileTypeRs as A, IconFileTypeSql as j, IconFileTypeSvg as M, IconFileTypeTs as N, IconFileTypeTsx as P, IconFileTypeTxt as F, IconFileTypeVue as I, IconFileTypeXls as L, IconFileTypeXml as R, IconFileTypeZip as z, IconFileX as B, IconMusic as ee, IconPaperclip as V, IconPhoto as H, IconReload as te, IconTerminal2 as ne, IconVideo as re, IconX as ie } from "@tabler/icons-react";
4
+ import { DIAL_ICON_SIZE as U, ElementSize as ae, GhostIconButton as oe, Highlight as se, Skeleton as ce, SkeletonVariant as le, Spinner as ue, StaticIconButton as de } from "@epam/ai-dial-ui-kit";
5
+ import { Fragment as fe, jsx as W, jsxs as G } from "react/jsx-runtime";
6
6
  //#region src/utils/attachment.ts
7
- var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) => {
7
+ var K = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) => {
8
8
  if (e == null) return "";
9
9
  let t = e.lastIndexOf(".");
10
10
  return t > 0 ? e.slice(0, t) : e;
11
- }, ue = {
11
+ }, me = {
12
12
  image: "Image files",
13
13
  audio: "Audio files",
14
14
  video: "Video files",
15
15
  text: "Text files"
16
- }, de = (e, t = ue) => e.map((e) => {
16
+ }, he = (e, t = me) => e.map((e) => {
17
17
  if (e.endsWith("/*")) {
18
18
  let n = e.slice(0, -2);
19
19
  return t[n] ?? `${n} files`;
20
20
  }
21
21
  let n = e.split("/")[1];
22
22
  return n == null ? e.toUpperCase() : n.toUpperCase();
23
- }).join(", "), fe = (e, t) => t.length === 0 ? !1 : t.some((t) => {
23
+ }).join(", "), ge = (e, t) => t.length === 0 ? !1 : t.some((t) => {
24
24
  if (t === "*" || t === "*/*") return !0;
25
25
  if (t.endsWith("/*")) {
26
26
  let n = t.slice(0, -2);
27
27
  return e.startsWith(`${n}/`);
28
28
  }
29
29
  return e === t;
30
- }), pe = (e) => {
30
+ }), _e = (e) => {
31
31
  if (!e) return h;
32
32
  if (e.startsWith("image/")) switch (e) {
33
33
  case "image/jpeg":
@@ -37,7 +37,7 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
37
37
  case "image/bmp": return _;
38
38
  default: return H;
39
39
  }
40
- if (e.startsWith("video/")) return W;
40
+ if (e.startsWith("video/")) return re;
41
41
  if (e.startsWith("audio/")) return ee;
42
42
  switch (e) {
43
43
  case "application/pdf": return E;
@@ -76,187 +76,149 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
76
76
  case "text/x-vue": return I;
77
77
  default: return h;
78
78
  }
79
- }, me = (e) => {
79
+ }, ve = (e) => {
80
80
  let { type: n, contentType: r } = e;
81
- return n === t.Prompt ? U : n === t.Pasted ? f : n === t.Image ? H : pe(r ?? "");
82
- }, he = (e) => {
81
+ return n === t.Prompt ? ne : n === t.Pasted ? f : n === t.Image ? H : _e(r ?? "");
82
+ }, ye = (e) => {
83
83
  let t = e.toLowerCase().split(";")[0].trim(), r = n[t];
84
84
  if (r) return r;
85
85
  let i = t.split("/")[1];
86
86
  if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
87
- }, ge = (e, n) => {
87
+ }, be = (e, n) => {
88
88
  let { type: r, name: i, contentType: a } = e;
89
89
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
90
90
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
91
91
  if (r === t.Image) return n.imageLabel ?? "Image";
92
92
  if (a) {
93
- let e = he(a);
93
+ let e = ye(a);
94
94
  if (e) return `.${e}`;
95
95
  }
96
96
  let o = i.lastIndexOf(".");
97
97
  return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
98
- }, X = (e, n = {}) => {
99
- let { type: i, status: a, previewUrl: o, url: s } = e, c = a === r.Loading, l = a === r.Error, u = i === t.Image && !!(o ?? s) && !l, d = i === t.Audio && !l, f = i === t.Link && !l;
98
+ }, q = (e, n = {}) => {
99
+ let { type: i, status: a, previewUrl: o, url: s } = e, c = a === r.Loading, l = a === r.Error, u = i === t.Image && !!(o ?? s) && !l, d = i === t.Link && !l;
100
100
  return {
101
101
  isLoading: c,
102
102
  isError: l,
103
103
  isImage: u,
104
- isAudio: d,
105
- isLink: f,
106
- BottomIcon: f ? null : me(e),
107
- typeLabel: f ? null : ge(e, n)
104
+ isLink: d,
105
+ BottomIcon: d ? null : ve(e),
106
+ typeLabel: d ? null : be(e, n)
108
107
  };
109
- }, Z = {
110
- tile: "_tile_1x4ax_1",
111
- hovered: "_hovered_1x4ax_5",
112
- selected: "_selected_1x4ax_12",
113
- tileError: "_tileError_1x4ax_17",
114
- nameText: "_nameText_1x4ax_22",
115
- typeText: "_typeText_1x4ax_26",
116
- retryIcon: "_retryIcon_1x4ax_30",
117
- track: "_track_1x4ax_34",
118
- imageActionButton: "_imageActionButton_1x4ax_38"
119
- }, Q = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: o, className: s }) => /* @__PURE__ */ q(se, {
108
+ }, xe = 5, Se = "flex size-[84px] items-center justify-center rounded-xl border", J = {
109
+ tile: "_tile_3jao2_1",
110
+ hovered: "_hovered_3jao2_5",
111
+ selected: "_selected_3jao2_15",
112
+ tileError: "_tileError_3jao2_20",
113
+ nameText: "_nameText_3jao2_25",
114
+ typeText: "_typeText_3jao2_29",
115
+ retryIcon: "_retryIcon_3jao2_33",
116
+ track: "_track_3jao2_37",
117
+ actionButton: "_actionButton_3jao2_43",
118
+ imageActionButton: "_imageActionButton_3jao2_47"
119
+ }, Y = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: o, className: s }) => /* @__PURE__ */ W(de, {
120
120
  icon: o,
121
- size: oe.Small,
122
- className: a("absolute end-1 top-1 opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", s),
121
+ size: ae.Small,
122
+ className: a("absolute end-1 top-1 opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", J.actionButton, s),
123
123
  "aria-label": e,
124
124
  "aria-describedby": t ? n : void 0,
125
125
  onClick: (e) => {
126
126
  e.stopPropagation(), r(i);
127
127
  }
128
- }), _e = ({ ...e }) => /* @__PURE__ */ q(Q, {
129
- icon: /* @__PURE__ */ q(te, {
130
- size: G.SM,
128
+ }), Ce = ({ ...e }) => /* @__PURE__ */ W(Y, {
129
+ icon: /* @__PURE__ */ W(te, {
130
+ size: U.SM,
131
131
  "aria-hidden": !0
132
132
  }),
133
- className: Z.retryIcon,
133
+ className: J.retryIcon,
134
134
  ...e
135
- }), ve = ({ ...e }) => /* @__PURE__ */ q(Q, {
136
- icon: /* @__PURE__ */ q(p, {
137
- size: G.SM,
135
+ }), we = ({ ...e }) => /* @__PURE__ */ W(Y, {
136
+ icon: /* @__PURE__ */ W(p, {
137
+ size: U.SM,
138
138
  "aria-hidden": !0
139
139
  }),
140
140
  ...e
141
- }), ye = ({ ...e }) => /* @__PURE__ */ q(Q, {
142
- icon: /* @__PURE__ */ q(m, {
143
- size: G.SM,
141
+ }), Te = ({ ...e }) => /* @__PURE__ */ W(Y, {
142
+ icon: /* @__PURE__ */ W(m, {
143
+ size: U.SM,
144
144
  "aria-hidden": !0
145
145
  }),
146
146
  ...e
147
- }), be = ({ ...e }) => /* @__PURE__ */ q(Q, {
148
- icon: /* @__PURE__ */ q(ne, {
149
- size: G.SM,
147
+ }), Ee = ({ ...e }) => /* @__PURE__ */ W(Y, {
148
+ icon: /* @__PURE__ */ W(ie, {
149
+ size: U.SM,
150
150
  "aria-hidden": !0
151
151
  }),
152
- className: Z.hoverIcon,
153
152
  ...e
154
- }), xe = ({ attachment: e, searchQuery: t = "", onClick: n, onDownload: r, onRemove: i, labels: o, styles: s, cssVars: c, isSelected: l }) => {
155
- let { clickLabel: u = "Open attachment", downloadLabel: d = "Download attachment", removeLabel: f = "Remove attachment" } = o ?? {}, { typography: p, className: m } = s ?? {}, h = () => {
156
- n?.(e.id);
157
- };
158
- return /* @__PURE__ */ J("div", {
159
- style: c,
160
- ...n == null ? {} : {
161
- role: "button",
162
- tabIndex: 0,
163
- "aria-label": u,
164
- onClick: h,
165
- onKeyDown: (e) => {
166
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), h());
167
- }
168
- },
169
- className: a("group/attachment-tile relative flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 rounded-xl border p-3", n && "cursor-pointer", (r || i) && "pe-8", l && Z.selected, m),
170
- children: [
171
- /* @__PURE__ */ q("span", {
172
- title: e.name,
173
- className: a(p?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.nameText),
174
- children: t ? /* @__PURE__ */ q(ce, {
175
- text: e.name,
176
- query: t,
177
- maxLines: 1
178
- }) : e.name
179
- }),
180
- e.playUrl && /* @__PURE__ */ q("audio", {
181
- controls: !0,
182
- src: e.playUrl,
183
- "aria-label": e.name,
184
- className: "w-full",
185
- preload: "metadata",
186
- onClick: (e) => e.stopPropagation()
187
- }),
188
- r && /* @__PURE__ */ q(ve, {
189
- ariaLabel: d,
190
- onClick: r,
191
- id: e.id
192
- }),
193
- i && /* @__PURE__ */ q(be, {
194
- ariaLabel: f,
195
- onClick: i,
196
- id: e.id
197
- })
198
- ]
199
- });
200
- }, Se = 5, Ce = "flex size-[84px] items-center justify-center rounded-xl border", we = {
153
+ }), De = {
201
154
  [e.Network]: "Upload failed · network error",
202
155
  [e.UnsupportedType]: "Upload failed · unsupported file type"
203
- }, Te = ({ attachment: n, onClick: i, onRetry: s, labels: u, styles: d, onDownload: f, isPasted: p, isLink: m, cssVars: h, onExpand: g, isExpandable: _, onRemove: v, isSelected: y }) => {
204
- let { clickLabel: b = "Download attachment", retryLabel: x = "Retry upload", sizeLabel: S, uploadingLabel: C = "Uploading", errorReasonLabels: w, genericErrorLabel: T = "Upload failed" } = u ?? {}, { typography: E, className: D } = d ?? {}, { id: O, name: k, status: A, errorReason: j } = n, M = A === r.Loading, N = A === r.Error, P = c(), F = N ? j && (w?.[j] ?? we[j]) || T : "", { BottomIcon: I, typeLabel: L } = X(n), R = !N && !M && f && !m, z = N && !!s && j !== e.UnsupportedType, B = R || z ? "pe-5" : void 0, ee = (e) => {
205
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i?.(n.id));
206
- }, V = l(() => p ? k : le(k), [p, k]), H = o(() => {
207
- window.open(n.referenceUrl, "_blank", "noopener,noreferrer");
208
- }, [n]), te = a(Ce, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Z.tile, (n.type === t.Prompt || n.type === t.Pasted) && "hovered", y && Z.selected, N && Z.tileError), U = /* @__PURE__ */ q("div", {
156
+ }, Oe = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: s, labels: u, styles: d, onDownload: f, isPasted: p, isLink: m, cssVars: h, onExpand: g, isExpandable: _, onRemove: v, isSelected: y }) => {
157
+ let { clickLabel: b = "Download attachment", retryLabel: x = "Retry upload", sizeLabel: S, uploadingLabel: C = "Uploading", errorReasonLabels: w, genericErrorLabel: T = "Upload failed" } = u ?? {}, { typography: E, className: D } = d ?? {}, { id: O, name: k, status: A, errorReason: j } = t, M = A === r.Loading, N = A === r.Error, P = c(), F = N ? j && (w?.[j] ?? De[j]) || T : "", { BottomIcon: I, typeLabel: L } = q(t), R = !N && !M && f && !m, z = N && !!s && j !== e.UnsupportedType, B = R || z ? "pe-5" : void 0, ee = (e) => {
158
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i?.(t.id));
159
+ }, V = l(() => p ? k : pe(k), [p, k]), H = o(() => {
160
+ window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
161
+ }, [t]), te = a(Se, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", J.tile, !N && J.hovered, y && J.selected, N && J.tileError), ne = /* @__PURE__ */ W("div", {
209
162
  title: V,
210
- className: a(E?.nameClassName ?? "dial-caption-text", "line-clamp-2 min-w-0 break-all", Z.nameText, !N && B),
211
- children: V
212
- }), W = I && /* @__PURE__ */ J("div", {
163
+ className: a(E?.nameClassName ?? "dial-caption-text", "line-clamp-2 min-w-0 break-all", J.nameText, !N && B),
164
+ children: n ? /* @__PURE__ */ W(se, {
165
+ text: V,
166
+ query: n,
167
+ maxLines: 2
168
+ }) : V
169
+ }), re = I && /* @__PURE__ */ G("div", {
213
170
  className: a("flex w-full items-center gap-1", N && B),
214
- children: [/* @__PURE__ */ q(I, {
171
+ children: [/* @__PURE__ */ W(I, {
215
172
  size: 16,
216
- className: Z.typeText,
173
+ className: J.typeText,
217
174
  "aria-hidden": !0
218
- }), /* @__PURE__ */ q("span", {
219
- className: a(E?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Z.typeText),
175
+ }), /* @__PURE__ */ W("span", {
176
+ className: a(E?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", J.typeText),
220
177
  children: S ? `${L} · ${S}` : L
221
178
  })]
222
- }), ne = () => {
179
+ }), ie = () => {
223
180
  _ && g ? g(O) : i && i(O);
224
- }, G = /* @__PURE__ */ J(K, { children: [
225
- N ? /* @__PURE__ */ J(K, { children: [W, U] }) : /* @__PURE__ */ J(K, { children: [U, W] }),
226
- M && /* @__PURE__ */ q("div", {
227
- role: "progressbar",
181
+ }, U = /* @__PURE__ */ G(fe, { children: [
182
+ ne,
183
+ re,
184
+ M && /* @__PURE__ */ W("div", {
228
185
  "aria-label": C,
229
- className: a("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", Z.track),
230
- children: /* @__PURE__ */ q(ae, { size: 32 })
186
+ className: a("absolute left-[-1px] top-[-1px] flex size-full items-center justify-center rounded", J.track),
187
+ children: /* @__PURE__ */ W(ue, { size: 32 })
231
188
  }),
232
- R && /* @__PURE__ */ q(ve, {
233
- ariaLabel: b,
234
- errorTitle: F,
235
- errorDescId: P,
236
- onClick: f,
237
- id: O
238
- }),
239
- z && /* @__PURE__ */ q(_e, {
240
- ariaLabel: x,
241
- errorTitle: F,
242
- errorDescId: P,
243
- onClick: s,
244
- id: O
245
- }),
246
- m && /* @__PURE__ */ q(ye, {
247
- ariaLabel: x,
248
- errorTitle: F,
249
- errorDescId: P,
250
- onClick: H
251
- }),
252
- v && /* @__PURE__ */ q(be, {
253
- ariaLabel: x,
254
- errorTitle: F,
255
- errorDescId: P,
256
- onClick: v,
257
- id: O
189
+ /* @__PURE__ */ G("div", {
190
+ className: a("absolute right-0 top-0 flex gap-1"),
191
+ children: [
192
+ R && /* @__PURE__ */ W(we, {
193
+ ariaLabel: b,
194
+ errorTitle: F,
195
+ errorDescId: P,
196
+ onClick: f,
197
+ id: O
198
+ }),
199
+ z && /* @__PURE__ */ W(Ce, {
200
+ ariaLabel: x,
201
+ errorTitle: F,
202
+ errorDescId: P,
203
+ onClick: s,
204
+ id: O
205
+ }),
206
+ m && /* @__PURE__ */ W(Te, {
207
+ ariaLabel: x,
208
+ errorTitle: F,
209
+ errorDescId: P,
210
+ onClick: H
211
+ }),
212
+ v && /* @__PURE__ */ W(Ee, {
213
+ ariaLabel: x,
214
+ errorTitle: F,
215
+ errorDescId: P,
216
+ onClick: v,
217
+ id: O
218
+ })
219
+ ]
258
220
  }),
259
- N && /* @__PURE__ */ q("span", {
221
+ N && /* @__PURE__ */ W("span", {
260
222
  id: P,
261
223
  role: "status",
262
224
  "aria-live": "polite",
@@ -264,23 +226,23 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
264
226
  children: F
265
227
  })
266
228
  ] });
267
- return /* @__PURE__ */ q("div", {
229
+ return /* @__PURE__ */ W("div", {
268
230
  style: h,
269
231
  className: a("inline-flex", D),
270
- children: /* @__PURE__ */ q("div", {
232
+ children: /* @__PURE__ */ W("div", {
271
233
  role: "button",
272
234
  tabIndex: 0,
273
235
  "aria-label": b,
274
- onClick: ne,
236
+ onClick: ie,
275
237
  onKeyDown: ee,
276
238
  style: h,
277
239
  className: a(te, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
278
- children: G
240
+ children: U
279
241
  })
280
242
  });
281
- }, $ = /* @__PURE__ */ function(e) {
243
+ }, X = /* @__PURE__ */ function(e) {
282
244
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
283
- }({}), Ee = ({ enabled: e, src: t }) => {
245
+ }({}), ke = ({ enabled: e, src: t }) => {
284
246
  let n = u(null), [r, i] = d("idle");
285
247
  return s(() => {
286
248
  i(e && t ? "loading" : "idle");
@@ -295,15 +257,15 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
295
257
  imageRef: n,
296
258
  imageLoadStatus: r
297
259
  };
298
- }, De = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: o, cssVars: s, onDownload: c, styles: u, isSelected: d }) => {
299
- let { clickLabel: f = "Open attachment", expandLabel: p = "Expand pasted text" } = i ?? {}, { className: m } = u ?? {}, { id: h, name: g } = e, _ = e.previewUrl ?? e.url, v = e.type === t.Pasted && n !== void 0, { isLoading: y, isError: b, isImage: x } = l(() => X(e), [e]), S = r !== void 0 && !v && !y && !b, { imageRef: C, imageLoadStatus: w } = Ee({
260
+ }, Ae = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: o, cssVars: s, onDownload: c, styles: u, isSelected: d }) => {
261
+ let { clickLabel: f = "Open attachment", expandLabel: p = "Expand pasted text" } = i ?? {}, { className: m } = u ?? {}, { id: h, name: g } = e, _ = e.previewUrl ?? e.url, v = e.type === t.Pasted && n !== void 0, { isLoading: y, isError: b, isImage: x } = l(() => q(e), [e]), S = r !== void 0 && !v && !y && !b, { imageRef: C, imageLoadStatus: w } = ke({
300
262
  enabled: x,
301
263
  src: _
302
264
  }), T = () => {
303
265
  v && n ? n(h) : S && r && r(h);
304
266
  };
305
- return /* @__PURE__ */ q("div", {
306
- className: a(Ce, "group/attachment-tile", S && "cursor-pointer", Z.tile, d && Z.selected, m),
267
+ return /* @__PURE__ */ W("div", {
268
+ className: a(Se, "group/attachment-tile", S && "cursor-pointer", J.tile, d && J.selected, m),
307
269
  onClick: T,
308
270
  onKeyDown: (e) => {
309
271
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T());
@@ -312,43 +274,43 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
312
274
  role: "button",
313
275
  style: s,
314
276
  "aria-label": S ? f : v ? p : void 0,
315
- children: /* @__PURE__ */ J("div", {
277
+ children: /* @__PURE__ */ G("div", {
316
278
  className: "relative h-full w-full overflow-hidden",
317
279
  children: [
318
- o && /* @__PURE__ */ q(be, {
280
+ o && /* @__PURE__ */ W(Ee, {
319
281
  onClick: o,
320
282
  id: h,
321
- className: Z.imageActionButton
283
+ className: J.imageActionButton
322
284
  }),
323
- c && /* @__PURE__ */ q(ve, {
285
+ c && /* @__PURE__ */ W(we, {
324
286
  onClick: c,
325
287
  id: h,
326
- className: Z.imageActionButton
288
+ className: J.imageActionButton
327
289
  }),
328
- w !== $.Loaded && /* @__PURE__ */ q(re, {
329
- variant: ie.Rectangular,
290
+ w !== X.Loaded && /* @__PURE__ */ W(ce, {
291
+ variant: le.Rectangular,
330
292
  width: "100%",
331
293
  height: "100%",
332
- active: w === $.Loading,
333
- overlay: /* @__PURE__ */ q(H, {
334
- size: G.LG,
335
- className: Z.typeText,
294
+ active: w === X.Loading,
295
+ overlay: /* @__PURE__ */ W(H, {
296
+ size: U.LG,
297
+ className: J.typeText,
336
298
  "aria-hidden": !0
337
299
  }),
338
300
  className: "absolute inset-0 rounded-xl"
339
301
  }),
340
- /* @__PURE__ */ q("img", {
302
+ /* @__PURE__ */ W("img", {
341
303
  ref: C,
342
304
  src: _,
343
305
  alt: g,
344
306
  loading: "lazy",
345
307
  decoding: "async",
346
- className: a("h-full w-full rounded-xl object-cover transition-opacity duration-200", w === $.Loaded ? "opacity-100" : "opacity-0")
308
+ className: a("h-full w-full rounded-xl object-cover transition-opacity duration-200", w === X.Loaded ? "opacity-100" : "opacity-0")
347
309
  })
348
310
  ]
349
311
  })
350
312
  });
351
- }, Oe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: u, styles: d, isSelected: f }) => {
313
+ }, Z = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: u, styles: d, isSelected: f }) => {
352
314
  let { colors: p } = d ?? {}, m = e.type === t.Pasted, h = m && o !== void 0, g = i({
353
315
  "--ai-tile-bg": p?.background,
354
316
  "--ai-tile-border": p?.border,
@@ -364,20 +326,9 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
364
326
  "--ai-tile-type-text": p?.typeText,
365
327
  "--ai-tile-hover-icon-bg": p?.hoverIconBackground,
366
328
  "--ai-tile-hover-icon-color": p?.hoverIconColor,
367
- "--ai-tile-progress-track": p?.trackBackground,
368
- "--ai-tile-fill-bg": p?.fillBackground
369
- }), { isImage: _, isAudio: v, isLink: y } = l(() => X(e), [e]);
370
- return v ? /* @__PURE__ */ q(xe, {
371
- attachment: e,
372
- labels: u,
373
- onClick: s,
374
- onDownload: c,
375
- onRemove: r,
376
- searchQuery: n,
377
- styles: d,
378
- cssVars: g,
379
- isSelected: f
380
- }) : _ ? /* @__PURE__ */ q(De, {
329
+ "--ai-tile-progress-track": p?.trackBackground
330
+ }), { isImage: _, isLink: v } = l(() => q(e), [e]);
331
+ return _ ? /* @__PURE__ */ W(Ae, {
381
332
  attachment: e,
382
333
  labels: u,
383
334
  onClick: s,
@@ -387,13 +338,14 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
387
338
  cssVars: g,
388
339
  onDownload: c,
389
340
  isSelected: f
390
- }) : /* @__PURE__ */ q(Te, {
341
+ }) : /* @__PURE__ */ W(Oe, {
391
342
  attachment: e,
343
+ searchQuery: n,
392
344
  onClick: s,
393
345
  onRetry: a,
394
346
  onRemove: r,
395
347
  onDownload: c,
396
- isLink: y,
348
+ isLink: v,
397
349
  isPasted: m,
398
350
  styles: d,
399
351
  labels: u,
@@ -402,15 +354,15 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
402
354
  isExpandable: h,
403
355
  isSelected: f
404
356
  });
405
- }, ke = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: o, styles: s }) => {
357
+ }, je = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: o, styles: s }) => {
406
358
  let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d } = o ?? {}, { className: f } = s ?? {};
407
- return e.length === 0 ? null : /* @__PURE__ */ q("div", {
359
+ return e.length === 0 ? null : /* @__PURE__ */ W("div", {
408
360
  role: "list",
409
361
  "aria-label": c,
410
362
  className: a("flex w-full min-w-0 gap-2 overflow-x-auto", f),
411
- children: e.map((e) => /* @__PURE__ */ q("div", {
363
+ children: e.map((e) => /* @__PURE__ */ W("div", {
412
364
  role: "listitem",
413
- children: /* @__PURE__ */ q(Oe, {
365
+ children: /* @__PURE__ */ W(Z, {
414
366
  attachment: e,
415
367
  onRemove: t,
416
368
  onRetry: n,
@@ -424,11 +376,11 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
424
376
  })
425
377
  }, e.id))
426
378
  });
427
- }, Ae = {
428
- headerIcon: "_headerIcon_1sgtq_1",
429
- headerLabel: "_headerLabel_1sgtq_2"
430
- }, je = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Me = ({ attachments: e, onAttachmentClick: n, onDownloadAll: o, onRetry: s, labels: c, styles: l, selectedAttachmentId: u }) => {
431
- let { ariaLabel: d = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: g = "Download all", openInNewTabLabel: _, getHeaderLabel: v = (e) => je(e, "attachment"), promptLabel: y, pastedLabel: b, imageLabel: x } = c ?? {}, { typography: S, colors: C, className: w } = l ?? {}, T = i({ "--ai-group-text": C?.text });
379
+ }, Q = {
380
+ headerIcon: "_headerIcon_1dmgi_1",
381
+ headerLabel: "_headerLabel_1dmgi_2"
382
+ }, Me = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ne = ({ attachments: e, onAttachmentClick: n, onDownloadAll: o, onRetry: s, labels: c, styles: l, selectedAttachmentId: u }) => {
383
+ let { ariaLabel: d = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: g = "Download all", openInNewTabLabel: _, getHeaderLabel: v = (e) => Me(e, "attachment"), promptLabel: y, pastedLabel: b, imageLabel: x } = c ?? {}, { typography: S, colors: C, className: w } = l ?? {}, T = i({ "--ai-group-text": C?.text });
432
384
  if (e.length === 0) return null;
433
385
  let E = e.some((e) => e.type === t.Image), D = e.some((e) => e.type !== t.Image), O = E && D, k = e.length >= 5, A = O ? V : E ? H : h, j = v(e.length), M = () => {
434
386
  let t = e.filter((e) => e.status === r.Idle);
@@ -437,39 +389,39 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
437
389
  let n = e.find((e) => e.id === t);
438
390
  n && o?.([n]);
439
391
  };
440
- return /* @__PURE__ */ J("div", {
392
+ return /* @__PURE__ */ G("div", {
441
393
  role: "group",
442
394
  "aria-label": d,
443
395
  style: T,
444
- className: a("flex flex-col gap-1", k ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Ae.container, w),
445
- children: [/* @__PURE__ */ J("div", {
396
+ className: a("flex flex-col gap-1", k ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Q.container, w),
397
+ children: [/* @__PURE__ */ G("div", {
446
398
  className: "flex items-center justify-between",
447
- children: [/* @__PURE__ */ J("div", {
399
+ children: [/* @__PURE__ */ G("div", {
448
400
  className: "flex items-center gap-1",
449
- children: [/* @__PURE__ */ q(A, {
450
- size: G.SM,
451
- className: a("shrink-0", Ae.headerIcon),
401
+ children: [/* @__PURE__ */ W(A, {
402
+ size: U.SM,
403
+ className: a("shrink-0", Q.headerIcon),
452
404
  "aria-hidden": !0
453
- }), /* @__PURE__ */ q("span", {
454
- className: a(S?.headerLabelClassName ?? "dial-tiny-semi-text", Ae.headerLabel),
405
+ }), /* @__PURE__ */ W("span", {
406
+ className: a(S?.headerLabelClassName ?? "dial-tiny-semi-text", Q.headerLabel),
455
407
  children: j
456
408
  })]
457
- }), e.length >= 2 && (o || n) && /* @__PURE__ */ q(se, {
458
- icon: /* @__PURE__ */ q(p, {
459
- size: G.SM,
409
+ }), e.length >= 2 && (o || n) && /* @__PURE__ */ W(oe, {
410
+ icon: /* @__PURE__ */ W(p, {
411
+ size: U.SM,
460
412
  "aria-hidden": !0
461
413
  }),
462
- size: oe.Small,
414
+ size: ae.Small,
463
415
  "aria-label": g,
464
416
  onClick: M
465
417
  })]
466
- }), /* @__PURE__ */ q("div", {
418
+ }), /* @__PURE__ */ W("div", {
467
419
  role: "list",
468
420
  "aria-label": j,
469
421
  className: a("gap-3", k ? "grid grid-cols-[repeat(5,83px)]" : "flex flex-wrap"),
470
- children: e.map((e, t) => /* @__PURE__ */ q("div", {
422
+ children: e.map((e, t) => /* @__PURE__ */ W("div", {
471
423
  role: "listitem",
472
- children: /* @__PURE__ */ q(Oe, {
424
+ children: /* @__PURE__ */ W(Z, {
473
425
  attachment: e,
474
426
  onClick: n,
475
427
  onDownload: N,
@@ -487,7 +439,7 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
487
439
  }, `${e.id}-${t}`))
488
440
  })]
489
441
  });
490
- }, Ne = {
442
+ }, $ = {
491
443
  overlay: "_overlay_mzpdp_1",
492
444
  icon: "_icon_mzpdp_5",
493
445
  deniedIcon: "_deniedIcon_mzpdp_9"
@@ -498,29 +450,29 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
498
450
  "--ai-fd-bg": c?.background,
499
451
  "--ai-fd-icon": c?.icon,
500
452
  "--ai-fd-denied-icon": c?.deniedIcon
501
- }), d = o ?? (t ? "Attach files" : "No attachments allowed"), f = s ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), p = t ? Ne.icon : Ne.deniedIcon, m = (e) => {
453
+ }), d = o ?? (t ? "Attach files" : "No attachments allowed"), f = s ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), p = t ? $.icon : $.deniedIcon, m = (e) => {
502
454
  e.preventDefault();
503
455
  }, h = t ? g : B;
504
- return /* @__PURE__ */ q("div", {
456
+ return /* @__PURE__ */ W("div", {
505
457
  role: "status",
506
458
  "aria-live": "polite",
507
- className: a("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", Ne.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
459
+ className: a("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", $.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
508
460
  onDragOver: t ? void 0 : m,
509
461
  onDrop: t ? void 0 : m,
510
462
  style: u,
511
- children: /* @__PURE__ */ J("div", {
463
+ children: /* @__PURE__ */ G("div", {
512
464
  className: "flex flex-col items-center text-center",
513
465
  children: [
514
- /* @__PURE__ */ q(h, {
466
+ /* @__PURE__ */ W(h, {
515
467
  size: 100,
516
468
  className: p,
517
469
  "aria-hidden": !0
518
470
  }),
519
- /* @__PURE__ */ q("span", {
471
+ /* @__PURE__ */ W("span", {
520
472
  className: a("mt-5", l?.titleClassName ?? "dial-h3-text"),
521
473
  children: d
522
474
  }),
523
- /* @__PURE__ */ q("span", {
475
+ /* @__PURE__ */ W("span", {
524
476
  className: a("mt-4", l?.subtitleClassName ?? "dial-small-text"),
525
477
  children: f
526
478
  })
@@ -538,7 +490,7 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
538
490
  let i = e.getAsFile();
539
491
  if (!i) continue;
540
492
  let o = new File([i], a, { type: i.type }), s = {
541
- id: Y(),
493
+ id: K(),
542
494
  name: a,
543
495
  contentType: i.type,
544
496
  file: o,
@@ -554,7 +506,7 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
554
506
  let l = i.clipboardData.getData("text/plain");
555
507
  if (l.length > n) {
556
508
  let n = l.trim(), a = (n.length > 80 ? `${n.slice(0, 80).trimEnd()}…` : n) || s, o = new File([l], a, { type: "text/plain" }), c = {
557
- id: Y(),
509
+ id: K(),
558
510
  name: a,
559
511
  contentType: "text/plain",
560
512
  file: o,
@@ -571,4 +523,4 @@ var Y = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, le = (e) =
571
523
  ]) };
572
524
  }, Ie = 100;
573
525
  //#endregion
574
- export { Se as ATTACHMENT_COLLAPSE_THRESHOLD, Oe as AttachmentCard, Me as AttachmentGroup, ke as AttachmentTray, Pe as FileDndOverlay, $ as LazyImageLoadStatus, Ie as MAX_UPLOADS_PER_MINUTE, Y as generateAttachmentId, X as getAttachmentCardState, pe as getAttachmentIcon, he as getExtFromContentType, le as getNameWithoutExtension, fe as isMimeTypeAllowed, de as mimeTypesToExtensionLabels, Fe as useClipboardPaste, Ee as useLazyImageLoad };
526
+ export { xe as ATTACHMENT_COLLAPSE_THRESHOLD, Z as AttachmentCard, Ne as AttachmentGroup, je as AttachmentTray, Pe as FileDndOverlay, X as LazyImageLoadStatus, Ie as MAX_UPLOADS_PER_MINUTE, K as generateAttachmentId, q as getAttachmentCardState, _e as getAttachmentIcon, ye as getExtFromContentType, pe as getNameWithoutExtension, ge as isMimeTypeAllowed, he as mimeTypesToExtensionLabels, Fe as useClipboardPaste, ke as useLazyImageLoad };
@@ -19,8 +19,6 @@ export interface AttachmentCardState {
19
19
  isImage: boolean;
20
20
  /** Whether the attachment should render as a link tile. */
21
21
  isLink: boolean;
22
- /** Whether the attachment should render as an audio player tile. */
23
- isAudio: boolean;
24
22
  /** Icon component representing the attachment's type. */
25
23
  BottomIcon: Icon | null;
26
24
  /** Human-readable type/status label rendered next to `BottomIcon`. */
@@ -58,8 +56,6 @@ export interface AttachmentCardColors {
58
56
  hoverIconColor?: string;
59
57
  /** Upload progress track background color. */
60
58
  trackBackground?: string;
61
- /** Upload progress indeterminate fill color. */
62
- fillBackground?: string;
63
59
  }
64
60
  /** Typography overrides for the `AttachmentCard` component. */
65
61
  export interface AttachmentCardTypography {
@@ -89,8 +85,6 @@ export interface AttachmentCardLabels extends AttachmentTypeLabels {
89
85
  expandLabel?: string;
90
86
  /** Accessible label for the loading spinner shown while the attachment is uploading. Defaults to `'Loading attachment'`. */
91
87
  loadingLabel?: string;
92
- /** Status message announced to assistive tech when the upload fails. Defaults to `'Upload failed'`. */
93
- uploadFailedStatusLabel?: string;
94
88
  /** Accessible label for the download button. Defaults to `'Download attachment'`. */
95
89
  downloadLabel?: string;
96
90
  /** Accessible label for the open-in-new-tab button. Defaults to `'Open in new tab'`. */
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-card.d.ts","sourceRoot":"","sources":["../../src/models/attachment-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,wGAAwG;AACxG,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAC;IAChB,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAA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,KAAK,IAAI,CAAC;IAClC,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"attachment-card.d.ts","sourceRoot":"","sources":["../../src/models/attachment-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,wGAAwG;AACxG,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,sEAAsE;IACtE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gCAAgC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,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;IACtC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,gGAAgG;IAChG,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,8JAA8J;IAC9J,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,wFAAwF;IACxF,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -34,6 +34,8 @@ export interface FileAttachmentStyles {
34
34
  export interface FileAttachmentProps {
35
35
  /** The non-previewable attachment this row represents. */
36
36
  attachment: DisplayAttachment;
37
+ /** Current search query — when set, matches in the file name are highlighted. Defaults to `''`. */
38
+ searchQuery?: string;
37
39
  /** Called when the user clicks the row or its download button. */
38
40
  onClick?: (id: string) => void;
39
41
  /** Called when the user retries a failed upload. */
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-file-row.d.ts","sourceRoot":"","sources":["../../src/models/attachment-file-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,2DAA2D;AAC3D,MAAM,WAAW,oBAAq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CAAC;IAC9B,mCAAmC;IACnC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iFAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"attachment-file-row.d.ts","sourceRoot":"","sources":["../../src/models/attachment-file-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,2DAA2D;AAC3D,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2KAA2K;IAC3K,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gJAAgJ;IAChJ,iBAAiB,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,oIAAoI;IACpI,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iHAAiH;IACjH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,kEAAkE;IAClE,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,UAAU,EAAE,iBAAiB,CAAC;IAC9B,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,oDAAoD;IACpD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,uDAAuD;IACvD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,qIAAqI;IACrI,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,mCAAmC;IACnC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iFAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-attachment-input",
3
3
  "description": "File attachment input components with upload validation, drag-and-drop, and progress tracking",
4
- "version": "1.0.0-rc.3",
4
+ "version": "1.0.0-rc.4",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.0.0-rc.3",
20
+ "@epam/ai-dial-chat-shared": "1.0.0-rc.4",
21
21
  "@tabler/icons-react": "^3.44.0",
22
22
  "react": "^19.0.0",
23
23
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/utils/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAMnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAgChD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAEnC,uDAAuD;AACvD,eAAO,MAAM,oBAAoB,QAAO,MACgB,CAAC;AAEzD,4GAA4G;AAC5G,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,MAItD,CAAC;AASF,uHAAuH;AACvH,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,EAAE,EACf,iBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAwB,KAC5D,MAUF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,EAChB,cAAc,MAAM,EAAE,KACrB,OAUF,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,GAAI,aAAa,MAAM,KAAG,IA0FvD,CAAC;AAUF,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,KAClB,MAAM,GAAG,SAUX,CAAC;AA0BF,qHAAqH;AACrH,eAAO,MAAM,sBAAsB,GACjC,YAAY,iBAAiB,EAC7B,aAAY,oBAAyB,KACpC,mBAmBF,CAAC"}
1
+ {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/utils/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAMnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAgChD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAEnC,uDAAuD;AACvD,eAAO,MAAM,oBAAoB,QAAO,MACgB,CAAC;AAEzD,4GAA4G;AAC5G,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,MAItD,CAAC;AASF,uHAAuH;AACvH,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,EAAE,EACf,iBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAwB,KAC5D,MAUF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,EAChB,cAAc,MAAM,EAAE,KACrB,OAUF,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,GAAI,aAAa,MAAM,KAAG,IA0FvD,CAAC;AAUF,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,KAClB,MAAM,GAAG,SAUX,CAAC;AA0BF,qHAAqH;AACrH,eAAO,MAAM,sBAAsB,GACjC,YAAY,iBAAiB,EAC7B,aAAY,oBAAyB,KACpC,mBAiBF,CAAC"}
@@ -1,22 +0,0 @@
1
- import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
2
- import { CSSProperties, FC } from 'react';
3
- import { AttachmentCardLabels, AttachmentCardStyles } from '../../../models/attachment-card';
4
- interface AudioAttachmentProps {
5
- attachment: DisplayAttachment;
6
- searchQuery?: string;
7
- /** Called when the user clicks the card body — opens the attachment canvas. */
8
- onClick?: (id: string) => void;
9
- /** Called when the user clicks the download button. */
10
- onDownload?: (id: string) => void;
11
- /** Called when the user clicks the remove button. */
12
- onRemove?: (id: string) => void;
13
- labels?: AttachmentCardLabels;
14
- styles?: AttachmentCardStyles;
15
- cssVars?: CSSProperties;
16
- /** Whether this attachment is the one currently open in the canvas panel. Renders the tile's selected visual state. */
17
- isSelected?: boolean;
18
- }
19
- /** Widescreen tile for a single audio attachment inside the composer tray. */
20
- export declare const AudioAttachment: FC<AudioAttachmentProps>;
21
- export {};
22
- //# sourceMappingURL=Audio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Audio.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Audio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgB,MAAM,2BAA2B,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AACnE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAIzC,UAAU,oBAAoB;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,uDAAuD;IACvD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,8EAA8E;AAC9E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyFpD,CAAC"}