@epam/ai-dial-attachment-input 1.3.0-dev.357 → 1.3.0-dev.360
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.
- package/components/AttachmentCard/Attachments/File.d.ts.map +1 -1
- package/index.js +217 -211
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAM7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAsB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA2RlD,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, RequestStatus as r, buildCssVars as i, getBaseMimeType as a, mergeClasses as o, normalizeMimeType as s } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { IconClipboard as
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
5
|
-
import { Fragment as
|
|
1
|
+
import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, RequestStatus as r, buildCssVars as i, getBaseMimeType as a, mergeClasses as o, normalizeMimeType as s, useIsVerticallyClamped as c } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { useCallback as l, useEffect as u, useId as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
3
|
+
import { IconClipboard as h, IconDownload as g, IconExternalLink as _, IconFile as v, IconFileDescription as y, IconFileTypeBmp as b, IconFileTypeCss as x, IconFileTypeCsv as S, IconFileTypeDoc as C, IconFileTypeDocx as w, IconFileTypeHtml as T, IconFileTypeJpg as E, IconFileTypeJs as D, IconFileTypeJsx as O, IconFileTypePdf as k, IconFileTypePhp as A, IconFileTypePng as j, IconFileTypePpt as M, IconFileTypeRs as N, IconFileTypeSql as P, IconFileTypeSvg as F, IconFileTypeTs as I, IconFileTypeTsx as L, IconFileTypeTxt as R, IconFileTypeVue as z, IconFileTypeXls as B, IconFileTypeXml as ee, IconFileTypeZip as te, IconFileX as ne, IconMusic as re, IconPaperclip as V, IconPhoto as H, IconReload as ie, IconTerminal2 as ae, IconVideo as oe, IconX as U } from "@tabler/icons-react";
|
|
4
|
+
import { DIAL_ICON_SIZE as W, DIAL_KIT_ICON_STROKE as G, DialItemType as se, ElementSize as ce, FileIcon as le, GhostIconButton as ue, Highlight as de, LiveRegion as fe, LiveRegionElement as pe, Skeleton as me, SkeletonVariant as he, Spinner as ge, StaticIconButton as _e, Tooltip as ve } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { Fragment as ye, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
6
6
|
//#region src/utils/attachment.ts
|
|
7
|
-
var
|
|
7
|
+
var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) => {
|
|
8
8
|
if (e == null) return "";
|
|
9
9
|
let t = e.lastIndexOf(".");
|
|
10
10
|
return t > 0 ? e.slice(0, t) : e;
|
|
@@ -39,49 +39,49 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
39
39
|
return r === s(t);
|
|
40
40
|
});
|
|
41
41
|
}, Te = (e) => {
|
|
42
|
-
if (!e) return
|
|
42
|
+
if (!e) return v;
|
|
43
43
|
let t = s(e);
|
|
44
44
|
if (t.startsWith("image/")) switch (t) {
|
|
45
|
-
case "image/jpeg": return
|
|
46
|
-
case "image/png": return
|
|
47
|
-
case "image/svg+xml": return
|
|
48
|
-
case "image/bmp": return
|
|
49
|
-
default: return
|
|
45
|
+
case "image/jpeg": return E;
|
|
46
|
+
case "image/png": return j;
|
|
47
|
+
case "image/svg+xml": return F;
|
|
48
|
+
case "image/bmp": return b;
|
|
49
|
+
default: return H;
|
|
50
50
|
}
|
|
51
51
|
if (t.startsWith("video/")) return oe;
|
|
52
52
|
if (t.startsWith("audio/")) return re;
|
|
53
53
|
switch (t) {
|
|
54
|
-
case "application/pdf": return
|
|
55
|
-
case "application/msword": return
|
|
56
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return
|
|
57
|
-
case "application/vnd.ms-powerpoint": return
|
|
58
|
-
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return
|
|
59
|
-
case "application/vnd.ms-excel": return
|
|
60
|
-
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return
|
|
54
|
+
case "application/pdf": return k;
|
|
55
|
+
case "application/msword": return C;
|
|
56
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return w;
|
|
57
|
+
case "application/vnd.ms-powerpoint": return M;
|
|
58
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return M;
|
|
59
|
+
case "application/vnd.ms-excel": return B;
|
|
60
|
+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return B;
|
|
61
61
|
case "application/zip":
|
|
62
62
|
case "application/vnd.rar":
|
|
63
63
|
case "application/x-7z-compressed":
|
|
64
64
|
case "application/gzip":
|
|
65
65
|
case "application/x-tar": return te;
|
|
66
|
-
case "text/csv": return
|
|
67
|
-
case "text/plain": return
|
|
66
|
+
case "text/csv": return S;
|
|
67
|
+
case "text/plain": return R;
|
|
68
68
|
case "text/html":
|
|
69
|
-
case "application/xhtml+xml": return
|
|
69
|
+
case "application/xhtml+xml": return T;
|
|
70
70
|
case "application/xml": return ee;
|
|
71
|
-
case "application/sql": return
|
|
72
|
-
case "text/javascript": return
|
|
73
|
-
case "text/jsx": return
|
|
74
|
-
case "text/typescript": return
|
|
75
|
-
case "text/tsx": return
|
|
76
|
-
case "text/css": return
|
|
77
|
-
case "text/x-php": return
|
|
78
|
-
case "text/x-rustsrc": return
|
|
79
|
-
case "text/x-vue": return
|
|
80
|
-
default: return
|
|
71
|
+
case "application/sql": return P;
|
|
72
|
+
case "text/javascript": return D;
|
|
73
|
+
case "text/jsx": return O;
|
|
74
|
+
case "text/typescript": return I;
|
|
75
|
+
case "text/tsx": return L;
|
|
76
|
+
case "text/css": return x;
|
|
77
|
+
case "text/x-php": return A;
|
|
78
|
+
case "text/x-rustsrc": return N;
|
|
79
|
+
case "text/x-vue": return z;
|
|
80
|
+
default: return v;
|
|
81
81
|
}
|
|
82
82
|
}, Ee = (e) => {
|
|
83
83
|
let { type: n, contentType: r } = e;
|
|
84
|
-
return n === t.Prompt ? ae : n === t.Pasted ?
|
|
84
|
+
return n === t.Prompt ? ae : n === t.Pasted ? h : n === t.Image ? H : Te(r ?? "");
|
|
85
85
|
}, De = (e) => {
|
|
86
86
|
let t = s(e), r = n[t];
|
|
87
87
|
if (r) return r;
|
|
@@ -103,7 +103,7 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
103
103
|
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
104
104
|
let a = Oe(e);
|
|
105
105
|
return a ? `.${a}` : i ?? "";
|
|
106
|
-
},
|
|
106
|
+
}, Y = (e, n = {}) => {
|
|
107
107
|
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;
|
|
108
108
|
return {
|
|
109
109
|
isLoading: c,
|
|
@@ -113,7 +113,7 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
113
113
|
BottomIcon: d ? null : Ee(e),
|
|
114
114
|
typeLabel: d ? null : Ae(e, n)
|
|
115
115
|
};
|
|
116
|
-
}, je = 5, Me = "flex size-[100px] items-center justify-center rounded-xl border", Ne = "outline-offset-1 focus-visible:outline-1",
|
|
116
|
+
}, je = 5, Me = "flex size-[100px] items-center justify-center rounded-xl border", Ne = "outline-offset-1 focus-visible:outline-1", X = {
|
|
117
117
|
tray: "dial-ai-attachment-tray",
|
|
118
118
|
trayItem: "dial-ai-attachment-tray-item",
|
|
119
119
|
tile: "dial-ai-attachment-tile",
|
|
@@ -121,7 +121,7 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
121
121
|
tileName: "dial-ai-attachment-tile-name",
|
|
122
122
|
tileType: "dial-ai-attachment-tile-type",
|
|
123
123
|
tileAction: "dial-ai-attachment-tile-action"
|
|
124
|
-
},
|
|
124
|
+
}, Z = {
|
|
125
125
|
tile: "_tile_hb2mo_12",
|
|
126
126
|
hovered: "_hovered_hb2mo_18",
|
|
127
127
|
selected: "_selected_hb2mo_28",
|
|
@@ -136,42 +136,42 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
136
136
|
imageActionButton: "_imageActionButton_hb2mo_87",
|
|
137
137
|
tileAction: "_tileAction_hb2mo_99",
|
|
138
138
|
proxyFocus: "_proxyFocus_hb2mo_108"
|
|
139
|
-
},
|
|
139
|
+
}, Q = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s, isAlwaysVisible: c }) => /* @__PURE__ */ K(_e, {
|
|
140
140
|
icon: a,
|
|
141
141
|
size: ce.Small,
|
|
142
|
-
className: o(c ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-focus-visible/attachment-tile:opacity-100",
|
|
142
|
+
className: o(c ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-focus-visible/attachment-tile:opacity-100", Z.actionButton, s, X.tileAction),
|
|
143
143
|
"aria-label": e,
|
|
144
144
|
"aria-describedby": t ? n : void 0,
|
|
145
145
|
onClick: (e) => {
|
|
146
146
|
e.stopPropagation(), r(i);
|
|
147
147
|
}
|
|
148
|
-
}), Pe = ({ ...e }) => /* @__PURE__ */
|
|
149
|
-
icon: /* @__PURE__ */
|
|
150
|
-
size:
|
|
148
|
+
}), Pe = ({ ...e }) => /* @__PURE__ */ K(Q, {
|
|
149
|
+
icon: /* @__PURE__ */ K(ie, {
|
|
150
|
+
size: W.SM,
|
|
151
151
|
"aria-hidden": !0,
|
|
152
|
-
stroke:
|
|
152
|
+
stroke: G
|
|
153
153
|
}),
|
|
154
|
-
className:
|
|
154
|
+
className: Z.retryIcon,
|
|
155
155
|
...e
|
|
156
|
-
}), Fe = ({ ...e }) => /* @__PURE__ */
|
|
157
|
-
icon: /* @__PURE__ */
|
|
158
|
-
size:
|
|
156
|
+
}), Fe = ({ ...e }) => /* @__PURE__ */ K(Q, {
|
|
157
|
+
icon: /* @__PURE__ */ K(g, {
|
|
158
|
+
size: W.SM,
|
|
159
159
|
"aria-hidden": !0,
|
|
160
|
-
stroke:
|
|
160
|
+
stroke: G
|
|
161
161
|
}),
|
|
162
162
|
...e
|
|
163
|
-
}), Ie = ({ ...e }) => /* @__PURE__ */
|
|
164
|
-
icon: /* @__PURE__ */
|
|
165
|
-
size:
|
|
163
|
+
}), Ie = ({ ...e }) => /* @__PURE__ */ K(Q, {
|
|
164
|
+
icon: /* @__PURE__ */ K(_, {
|
|
165
|
+
size: W.SM,
|
|
166
166
|
"aria-hidden": !0,
|
|
167
|
-
stroke:
|
|
167
|
+
stroke: G
|
|
168
168
|
}),
|
|
169
169
|
...e
|
|
170
|
-
}), Le = ({ className: e, ...t }) => /* @__PURE__ */
|
|
171
|
-
icon: /* @__PURE__ */
|
|
172
|
-
size:
|
|
170
|
+
}), Le = ({ className: e, ...t }) => /* @__PURE__ */ K(Q, {
|
|
171
|
+
icon: /* @__PURE__ */ K(U, {
|
|
172
|
+
size: W.SM,
|
|
173
173
|
"aria-hidden": !0,
|
|
174
|
-
stroke:
|
|
174
|
+
stroke: G
|
|
175
175
|
}),
|
|
176
176
|
className: o("mobile:opacity-100", e),
|
|
177
177
|
...t
|
|
@@ -179,113 +179,119 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
179
179
|
[e.Network]: "Upload failed · network error",
|
|
180
180
|
[e.UnsupportedType]: "Upload failed · unsupported file type",
|
|
181
181
|
[e.FileTooLarge]: "Upload failed · file too large"
|
|
182
|
-
}, ze = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: a, labels: s, styles:
|
|
183
|
-
let { clickLabel:
|
|
184
|
-
|
|
185
|
-
},
|
|
182
|
+
}, ze = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: a, labels: s, styles: u, onDownload: p, isLink: m, cssVars: h, onExpand: g, isExpandable: _, onRemove: v, isSelected: y }) => {
|
|
183
|
+
let { clickLabel: b = "Download attachment", expandLabel: x = "Expand pasted text", downloadLabel: S = "Download attachment", retryLabel: C = "Retry upload", removeLabel: w = "Remove attachment", openInNewTabLabel: T = "Open in new tab", sizeLabel: E, uploadingLabel: D = "Uploading", errorReasonLabels: O, genericErrorLabel: k = "Upload failed" } = s ?? {}, { typography: A, className: j } = u ?? {}, { id: M, name: N, status: P, errorReason: F } = t, I = P === r.Loading, L = P === r.Error, R = d(), z = L ? F && (O?.[F] ?? Re[F]) || k : "", { BottomIcon: B, typeLabel: ee } = Y(t), te = ke(t), ne = !L && !I && p && !m, re = L && !!a && F !== e.UnsupportedType && F !== e.FileTooLarge, V = !!_ && g !== void 0, H = V || i !== void 0, ie = Number(!!ne) + Number(!!re) + Number(!!m) + Number(!!v), ae = !H && ie === 1, oe = () => {
|
|
184
|
+
V ? g(M) : i?.(M);
|
|
185
|
+
}, U = f(() => be(N), [N]), { ref: ce, isClamped: ue } = c(U), me = l(() => {
|
|
186
186
|
window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
|
|
187
|
-
}, [t]),
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
}, [t]), he = o(Me, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", Z.tile, H && !L && !I && Z.hovered, I && Z.loading, y && Z.selected, L && Z.tileError, ae && Z.proxyFocus, X.tile, y && X.tileSelected), _e = /* @__PURE__ */ K("div", {
|
|
188
|
+
ref: ce,
|
|
189
|
+
title: U,
|
|
190
|
+
className: o(A?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 wrap-break-word", Z.nameText, X.tileName),
|
|
191
|
+
children: n ? /* @__PURE__ */ K(de, {
|
|
192
|
+
text: U,
|
|
192
193
|
query: n,
|
|
193
194
|
maxLines: 2
|
|
194
|
-
}) :
|
|
195
|
-
}),
|
|
196
|
-
className: o("flex w-full items-end gap-1",
|
|
197
|
-
children: [te ? /* @__PURE__ */
|
|
195
|
+
}) : U
|
|
196
|
+
}), J = B && /* @__PURE__ */ q("div", {
|
|
197
|
+
className: o("flex w-full items-end gap-1", X.tileType),
|
|
198
|
+
children: [te ? /* @__PURE__ */ K(le, {
|
|
198
199
|
type: se.File,
|
|
199
|
-
name:
|
|
200
|
+
name: N ?? "",
|
|
200
201
|
fileExtension: Oe(t),
|
|
201
|
-
size:
|
|
202
|
+
size: W.MD,
|
|
202
203
|
decorative: !0
|
|
203
|
-
}) : /* @__PURE__ */
|
|
204
|
-
size:
|
|
205
|
-
className:
|
|
206
|
-
stroke:
|
|
204
|
+
}) : /* @__PURE__ */ K(B, {
|
|
205
|
+
size: W.MD,
|
|
206
|
+
className: Z.typeText,
|
|
207
|
+
stroke: G,
|
|
207
208
|
"aria-hidden": !0
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
-
className: o(
|
|
210
|
-
children:
|
|
209
|
+
}), /* @__PURE__ */ K("span", {
|
|
210
|
+
className: o(A?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Z.typeText),
|
|
211
|
+
children: E ? `${ee} · ${E}` : ee
|
|
211
212
|
})]
|
|
212
|
-
}),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
213
|
+
}), xe = /* @__PURE__ */ q(ye, { children: [
|
|
214
|
+
_e,
|
|
215
|
+
J,
|
|
216
|
+
H && /* @__PURE__ */ K(ve, {
|
|
217
|
+
tooltip: N,
|
|
218
|
+
hideTooltip: !ue,
|
|
219
|
+
triggerClassName: "absolute inset-0",
|
|
220
|
+
children: /* @__PURE__ */ K("button", {
|
|
221
|
+
type: "button",
|
|
222
|
+
"aria-label": V ? x : b,
|
|
223
|
+
"aria-pressed": !V && i !== void 0 ? y : void 0,
|
|
224
|
+
onClick: oe,
|
|
225
|
+
className: o("absolute inset-0 cursor-pointer rounded-[11px]", Z.tileAction)
|
|
226
|
+
})
|
|
221
227
|
}),
|
|
222
|
-
|
|
228
|
+
I && /* @__PURE__ */ K("div", {
|
|
223
229
|
role: "progressbar",
|
|
224
|
-
"aria-label":
|
|
225
|
-
className: o("absolute inset-0 flex items-center justify-center rounded-[11px]",
|
|
226
|
-
children: /* @__PURE__ */
|
|
230
|
+
"aria-label": D,
|
|
231
|
+
className: o("absolute inset-0 flex items-center justify-center rounded-[11px]", Z.track),
|
|
232
|
+
children: /* @__PURE__ */ K("span", {
|
|
227
233
|
"aria-hidden": !0,
|
|
228
234
|
className: "flex",
|
|
229
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ K(ge, { size: 32 })
|
|
230
236
|
})
|
|
231
237
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ q("div", {
|
|
233
239
|
className: "absolute inset-e-1 top-1 flex",
|
|
234
240
|
children: [
|
|
235
|
-
ne && /* @__PURE__ */
|
|
236
|
-
ariaLabel: x,
|
|
237
|
-
errorTitle: R,
|
|
238
|
-
errorDescId: L,
|
|
239
|
-
onClick: f,
|
|
240
|
-
id: j
|
|
241
|
-
}),
|
|
242
|
-
re && /* @__PURE__ */ G(Pe, {
|
|
241
|
+
ne && /* @__PURE__ */ K(Fe, {
|
|
243
242
|
ariaLabel: S,
|
|
244
|
-
errorTitle:
|
|
245
|
-
errorDescId:
|
|
243
|
+
errorTitle: z,
|
|
244
|
+
errorDescId: R,
|
|
245
|
+
onClick: p,
|
|
246
|
+
id: M
|
|
247
|
+
}),
|
|
248
|
+
re && /* @__PURE__ */ K(Pe, {
|
|
249
|
+
ariaLabel: C,
|
|
250
|
+
errorTitle: z,
|
|
251
|
+
errorDescId: R,
|
|
246
252
|
onClick: a,
|
|
247
|
-
id:
|
|
253
|
+
id: M
|
|
248
254
|
}),
|
|
249
|
-
|
|
250
|
-
ariaLabel:
|
|
251
|
-
errorTitle:
|
|
252
|
-
errorDescId:
|
|
253
|
-
onClick:
|
|
255
|
+
m && /* @__PURE__ */ K(Ie, {
|
|
256
|
+
ariaLabel: T,
|
|
257
|
+
errorTitle: z,
|
|
258
|
+
errorDescId: R,
|
|
259
|
+
onClick: me
|
|
254
260
|
}),
|
|
255
|
-
|
|
256
|
-
ariaLabel:
|
|
257
|
-
errorTitle:
|
|
258
|
-
errorDescId:
|
|
259
|
-
onClick:
|
|
260
|
-
id:
|
|
261
|
-
isAlwaysVisible:
|
|
261
|
+
v && /* @__PURE__ */ K(Le, {
|
|
262
|
+
ariaLabel: w,
|
|
263
|
+
errorTitle: z,
|
|
264
|
+
errorDescId: R,
|
|
265
|
+
onClick: v,
|
|
266
|
+
id: M,
|
|
267
|
+
isAlwaysVisible: I
|
|
262
268
|
})
|
|
263
269
|
]
|
|
264
270
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
id:
|
|
271
|
+
/* @__PURE__ */ K(fe, {
|
|
272
|
+
id: R,
|
|
267
273
|
visuallyHidden: !0,
|
|
268
274
|
as: pe.Span,
|
|
269
|
-
children:
|
|
275
|
+
children: L ? z : ""
|
|
270
276
|
})
|
|
271
277
|
] });
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
-
style:
|
|
274
|
-
className: o("inline-flex",
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
-
"aria-busy":
|
|
277
|
-
style:
|
|
278
|
-
className: o(
|
|
279
|
-
children:
|
|
278
|
+
return /* @__PURE__ */ K("div", {
|
|
279
|
+
style: h,
|
|
280
|
+
className: o("inline-flex", j),
|
|
281
|
+
children: /* @__PURE__ */ K("div", {
|
|
282
|
+
"aria-busy": I,
|
|
283
|
+
style: h,
|
|
284
|
+
className: o(he, H && "cursor-pointer", Ne),
|
|
285
|
+
children: xe
|
|
280
286
|
})
|
|
281
287
|
});
|
|
282
|
-
},
|
|
288
|
+
}, Be = /* @__PURE__ */ function(e) {
|
|
283
289
|
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
284
|
-
}({}),
|
|
285
|
-
let n =
|
|
286
|
-
return
|
|
290
|
+
}({}), Ve = ({ enabled: e, src: t }) => {
|
|
291
|
+
let n = p(null), [r, i] = m("idle");
|
|
292
|
+
return u(() => {
|
|
287
293
|
i(e && t ? "loading" : "idle");
|
|
288
|
-
}, [e, t]),
|
|
294
|
+
}, [e, t]), u(() => {
|
|
289
295
|
let r = n.current;
|
|
290
296
|
if (!r || !e || !t) return;
|
|
291
297
|
let a = () => i("loaded"), o = () => i("error");
|
|
@@ -296,77 +302,77 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
296
302
|
imageRef: n,
|
|
297
303
|
imageLoadStatus: r
|
|
298
304
|
};
|
|
299
|
-
},
|
|
300
|
-
let { clickLabel:
|
|
305
|
+
}, He = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: s, onDownload: c, styles: l, isSelected: u }) => {
|
|
306
|
+
let { clickLabel: d = "Open attachment", expandLabel: p = "Expand pasted text", removeLabel: m = "Remove attachment", downloadLabel: h = "Download attachment", uploadingLabel: g = "Uploading" } = i ?? {}, { className: _ } = l ?? {}, { id: v, name: y } = e, b = e.previewUrl ?? e.url, x = e.type === t.Pasted && n !== void 0, { isLoading: S, isError: C, isImage: w } = f(() => Y(e), [e]), T = r !== void 0 && !x && !S && !C, E = x || T, D = !!c && !S, O = !E && Number(!!a) + Number(D) === 1, { imageRef: k, imageLoadStatus: A } = Ve({
|
|
301
307
|
enabled: w,
|
|
302
308
|
src: b
|
|
303
309
|
}), j = () => {
|
|
304
310
|
x && n ? n(v) : T && r && r(v);
|
|
305
|
-
}, M = o(Me, "group/attachment-tile", E && "cursor-pointer",
|
|
306
|
-
return /* @__PURE__ */
|
|
311
|
+
}, M = o(Me, "group/attachment-tile", E && "cursor-pointer", Z.tile, u && Z.selected, S && Z.loading, O && Z.proxyFocus, Ne, _, X.tile, u && X.tileSelected);
|
|
312
|
+
return /* @__PURE__ */ K("div", {
|
|
307
313
|
className: M,
|
|
308
314
|
"aria-busy": S,
|
|
309
315
|
style: s,
|
|
310
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ q("div", {
|
|
311
317
|
className: "relative h-full w-full overflow-hidden",
|
|
312
318
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ q("div", {
|
|
314
320
|
className: "absolute inset-e-1 top-1 z-10 flex",
|
|
315
|
-
children: [a && /* @__PURE__ */
|
|
321
|
+
children: [a && /* @__PURE__ */ K(Le, {
|
|
316
322
|
ariaLabel: m,
|
|
317
323
|
onClick: a,
|
|
318
324
|
id: v,
|
|
319
|
-
className:
|
|
325
|
+
className: Z.imageActionButton,
|
|
320
326
|
isAlwaysVisible: S
|
|
321
|
-
}), D && /* @__PURE__ */
|
|
327
|
+
}), D && /* @__PURE__ */ K(Fe, {
|
|
322
328
|
ariaLabel: h,
|
|
323
329
|
onClick: c,
|
|
324
330
|
id: v,
|
|
325
|
-
className:
|
|
331
|
+
className: Z.imageActionButton
|
|
326
332
|
})]
|
|
327
333
|
}),
|
|
328
|
-
A !==
|
|
334
|
+
A !== Be.Loaded && /* @__PURE__ */ K(me, {
|
|
329
335
|
variant: he.Rectangular,
|
|
330
336
|
width: "100%",
|
|
331
337
|
height: "100%",
|
|
332
|
-
active: A ===
|
|
333
|
-
overlay: /* @__PURE__ */
|
|
334
|
-
size:
|
|
335
|
-
className:
|
|
338
|
+
active: A === Be.Loading,
|
|
339
|
+
overlay: /* @__PURE__ */ K(H, {
|
|
340
|
+
size: W.LG,
|
|
341
|
+
className: Z.placeholderIcon,
|
|
336
342
|
"aria-hidden": !0,
|
|
337
|
-
stroke:
|
|
343
|
+
stroke: G
|
|
338
344
|
}),
|
|
339
345
|
className: "absolute inset-0 rounded-xl"
|
|
340
346
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ K("img", {
|
|
342
348
|
ref: k,
|
|
343
349
|
src: b,
|
|
344
350
|
alt: y,
|
|
345
351
|
loading: "lazy",
|
|
346
352
|
decoding: "async",
|
|
347
|
-
className: o("h-full w-full rounded-xl object-cover transition-opacity duration-200", A ===
|
|
353
|
+
className: o("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === Be.Loaded ? "opacity-100" : "opacity-0")
|
|
348
354
|
}),
|
|
349
|
-
E && /* @__PURE__ */
|
|
355
|
+
E && /* @__PURE__ */ K("button", {
|
|
350
356
|
type: "button",
|
|
351
|
-
"aria-label": x ? p :
|
|
357
|
+
"aria-label": x ? p : d,
|
|
352
358
|
"aria-pressed": T ? u : void 0,
|
|
353
359
|
onClick: j,
|
|
354
|
-
className: o("absolute inset-0 cursor-pointer rounded-xl",
|
|
360
|
+
className: o("absolute inset-0 cursor-pointer rounded-xl", Z.tileAction)
|
|
355
361
|
}),
|
|
356
|
-
S && /* @__PURE__ */
|
|
362
|
+
S && /* @__PURE__ */ K("div", {
|
|
357
363
|
role: "progressbar",
|
|
358
364
|
"aria-label": g,
|
|
359
|
-
className: o("absolute inset-0 flex items-center justify-center rounded-xl",
|
|
360
|
-
children: /* @__PURE__ */
|
|
365
|
+
className: o("absolute inset-0 flex items-center justify-center rounded-xl", Z.track),
|
|
366
|
+
children: /* @__PURE__ */ K("span", {
|
|
361
367
|
"aria-hidden": !0,
|
|
362
368
|
className: "flex",
|
|
363
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ K(ge, { size: 32 })
|
|
364
370
|
})
|
|
365
371
|
})
|
|
366
372
|
]
|
|
367
373
|
})
|
|
368
374
|
});
|
|
369
|
-
},
|
|
375
|
+
}, Ue = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: l, styles: u, isSelected: d }) => {
|
|
370
376
|
let { colors: p } = u ?? {}, m = e.type === t.Pasted && o !== void 0, h = i({
|
|
371
377
|
"--ai-tile-bg": p?.background,
|
|
372
378
|
"--ai-tile-border": p?.border,
|
|
@@ -384,8 +390,8 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
384
390
|
"--ai-tile-hover-icon-bg": p?.hoverIconBackground,
|
|
385
391
|
"--ai-tile-hover-icon-color": p?.hoverIconColor,
|
|
386
392
|
"--ai-tile-progress-track": p?.trackBackground
|
|
387
|
-
}), { isImage: g, isLink: _ } =
|
|
388
|
-
return g ? /* @__PURE__ */
|
|
393
|
+
}), { isImage: g, isLink: _ } = f(() => Y(e), [e]);
|
|
394
|
+
return g ? /* @__PURE__ */ K(He, {
|
|
389
395
|
attachment: e,
|
|
390
396
|
labels: l,
|
|
391
397
|
onClick: s,
|
|
@@ -394,8 +400,8 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
394
400
|
onRemove: r,
|
|
395
401
|
cssVars: h,
|
|
396
402
|
onDownload: c,
|
|
397
|
-
isSelected:
|
|
398
|
-
}) : /* @__PURE__ */
|
|
403
|
+
isSelected: d
|
|
404
|
+
}) : /* @__PURE__ */ K(ze, {
|
|
399
405
|
attachment: e,
|
|
400
406
|
searchQuery: n,
|
|
401
407
|
onClick: s,
|
|
@@ -408,18 +414,18 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
408
414
|
onExpand: o,
|
|
409
415
|
cssVars: h,
|
|
410
416
|
isExpandable: m,
|
|
411
|
-
isSelected:
|
|
417
|
+
isSelected: d
|
|
412
418
|
});
|
|
413
|
-
},
|
|
419
|
+
}, We = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: a, styles: s }) => {
|
|
414
420
|
let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d, expandLabel: f, uploadingLabel: p } = a ?? {}, { className: m, card: h } = s ?? {};
|
|
415
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
421
|
+
return e.length === 0 ? null : /* @__PURE__ */ K("div", {
|
|
416
422
|
role: "list",
|
|
417
423
|
"aria-label": c,
|
|
418
|
-
className: o("-m-0.5 box-border flex min-w-0 gap-2 overflow-x-auto p-0.5", m,
|
|
419
|
-
children: e.map((e) => /* @__PURE__ */
|
|
424
|
+
className: o("-m-0.5 box-border flex min-w-0 gap-2 overflow-x-auto p-0.5", m, X.tray),
|
|
425
|
+
children: e.map((e) => /* @__PURE__ */ K("div", {
|
|
420
426
|
role: "listitem",
|
|
421
|
-
className:
|
|
422
|
-
children: /* @__PURE__ */
|
|
427
|
+
className: X.trayItem,
|
|
428
|
+
children: /* @__PURE__ */ K(Ue, {
|
|
423
429
|
attachment: e,
|
|
424
430
|
onRemove: t,
|
|
425
431
|
onRetry: n,
|
|
@@ -436,52 +442,52 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
436
442
|
})
|
|
437
443
|
}, e.id))
|
|
438
444
|
});
|
|
439
|
-
},
|
|
445
|
+
}, Ge = {
|
|
440
446
|
headerIcon: "_headerIcon_1dmgi_1",
|
|
441
447
|
headerLabel: "_headerLabel_1dmgi_2"
|
|
442
|
-
},
|
|
443
|
-
let { ariaLabel: f = "Attachments", clickLabel: p = "Download attachment", downloadLabel: m = "Download attachment", retryLabel:
|
|
448
|
+
}, Ke = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, qe = ({ attachments: e, onAttachmentClick: n, onDownloadAll: a, isAttachmentDownloadable: s, onRetry: c, labels: l, styles: u, selectedAttachmentId: d }) => {
|
|
449
|
+
let { ariaLabel: f = "Attachments", clickLabel: p = "Download attachment", downloadLabel: m = "Download attachment", retryLabel: h = "Retry upload", downloadAllLabel: _ = "Download all", openInNewTabLabel: y, getHeaderLabel: b = (e) => Ke(e, "attachment"), promptLabel: x, pastedLabel: S, imageLabel: C } = l ?? {}, { typography: w, colors: T, className: E } = u ?? {}, D = i({ "--ai-group-text": T?.text });
|
|
444
450
|
if (e.length === 0) return null;
|
|
445
|
-
let O = e.some((e) => e.type === t.Image), k = e.some((e) => e.type !== t.Image), A = O && k, j = e.length >= 5, M = A ?
|
|
451
|
+
let O = e.some((e) => e.type === t.Image), k = e.some((e) => e.type !== t.Image), A = O && k, j = e.length >= 5, M = A ? V : O ? H : v, N = b(e.length), P = (e) => s?.(e) !== !1, F = e.filter((e) => e.status === r.Idle && P(e)), I = () => {
|
|
446
452
|
a ? a(F) : F.forEach((e) => n?.(e.id));
|
|
447
453
|
}, L = (t) => {
|
|
448
454
|
let n = e.find((e) => e.id === t);
|
|
449
455
|
n && a?.([n]);
|
|
450
456
|
};
|
|
451
|
-
return /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ q("div", {
|
|
452
458
|
role: "group",
|
|
453
459
|
"aria-label": f,
|
|
454
460
|
style: D,
|
|
455
|
-
className: o("flex flex-col gap-2", j ? "w-full max-w-[532px] min-w-0" : "max-w-[424px]",
|
|
456
|
-
children: [/* @__PURE__ */
|
|
461
|
+
className: o("flex flex-col gap-2", j ? "w-full max-w-[532px] min-w-0" : "max-w-[424px]", Ge.container, E),
|
|
462
|
+
children: [/* @__PURE__ */ q("div", {
|
|
457
463
|
className: "flex items-center justify-between",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ q("div", {
|
|
459
465
|
className: "flex items-center gap-1",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
461
|
-
size:
|
|
462
|
-
className: o("shrink-0",
|
|
466
|
+
children: [/* @__PURE__ */ K(M, {
|
|
467
|
+
size: W.SM,
|
|
468
|
+
className: o("shrink-0", Ge.headerIcon),
|
|
463
469
|
"aria-hidden": !0
|
|
464
|
-
}), /* @__PURE__ */
|
|
465
|
-
className: o(w?.headerLabelClassName ?? "dial-tiny-semi-text",
|
|
470
|
+
}), /* @__PURE__ */ K("span", {
|
|
471
|
+
className: o(w?.headerLabelClassName ?? "dial-tiny-semi-text", Ge.headerLabel),
|
|
466
472
|
children: N
|
|
467
473
|
})]
|
|
468
|
-
}), e.length >= 2 && F.length > 0 && (a || n) && /* @__PURE__ */
|
|
469
|
-
icon: /* @__PURE__ */
|
|
470
|
-
size:
|
|
474
|
+
}), e.length >= 2 && F.length > 0 && (a || n) && /* @__PURE__ */ K(ue, {
|
|
475
|
+
icon: /* @__PURE__ */ K(g, {
|
|
476
|
+
size: W.SM,
|
|
471
477
|
"aria-hidden": !0,
|
|
472
|
-
stroke:
|
|
478
|
+
stroke: G
|
|
473
479
|
}),
|
|
474
480
|
size: ce.Small,
|
|
475
|
-
"aria-label":
|
|
481
|
+
"aria-label": _,
|
|
476
482
|
onClick: I
|
|
477
483
|
})]
|
|
478
|
-
}), /* @__PURE__ */
|
|
484
|
+
}), /* @__PURE__ */ K("div", {
|
|
479
485
|
role: "list",
|
|
480
486
|
"aria-label": N,
|
|
481
487
|
className: o("gap-2", j ? "grid grid-cols-[repeat(5,100px)]" : "flex flex-wrap"),
|
|
482
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
488
|
+
children: e.map((e, t) => /* @__PURE__ */ K("div", {
|
|
483
489
|
role: "listitem",
|
|
484
|
-
children: /* @__PURE__ */
|
|
490
|
+
children: /* @__PURE__ */ K(Ue, {
|
|
485
491
|
attachment: e,
|
|
486
492
|
onClick: n,
|
|
487
493
|
onDownload: a && P(e) ? L : void 0,
|
|
@@ -489,7 +495,7 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
489
495
|
labels: {
|
|
490
496
|
clickLabel: p,
|
|
491
497
|
downloadLabel: m,
|
|
492
|
-
retryLabel:
|
|
498
|
+
retryLabel: h,
|
|
493
499
|
promptLabel: x,
|
|
494
500
|
pastedLabel: S,
|
|
495
501
|
imageLabel: C,
|
|
@@ -500,12 +506,12 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
500
506
|
}, `${e.id}-${t}`))
|
|
501
507
|
})]
|
|
502
508
|
});
|
|
503
|
-
},
|
|
509
|
+
}, Je = {
|
|
504
510
|
overlay: "_overlay_mzpdp_1",
|
|
505
511
|
icon: "_icon_mzpdp_5",
|
|
506
512
|
deniedIcon: "_deniedIcon_mzpdp_9"
|
|
507
|
-
},
|
|
508
|
-
let { title: a, subtitle: s } = n ?? {}, { colors: c, typography: l } = r ?? {}, u = a ?? (t ? "Attach files" : "No attachments allowed"), d = s ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), f = /* @__PURE__ */
|
|
513
|
+
}, Ye = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
|
|
514
|
+
let { title: a, subtitle: s } = n ?? {}, { colors: c, typography: l } = r ?? {}, u = a ?? (t ? "Attach files" : "No attachments allowed"), d = s ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), f = /* @__PURE__ */ K(fe, {
|
|
509
515
|
visuallyHidden: !0,
|
|
510
516
|
as: pe.Span,
|
|
511
517
|
children: e ? `${u}. ${d}` : ""
|
|
@@ -515,41 +521,41 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
515
521
|
"--ai-fd-bg": c?.background,
|
|
516
522
|
"--ai-fd-icon": c?.icon,
|
|
517
523
|
"--ai-fd-denied-icon": c?.deniedIcon
|
|
518
|
-
}), m = t ?
|
|
524
|
+
}), m = t ? Je.icon : Je.deniedIcon, h = (e) => {
|
|
519
525
|
e.preventDefault();
|
|
520
|
-
}, g = t ?
|
|
521
|
-
return /* @__PURE__ */
|
|
522
|
-
className: o("fixed inset-0 z-9999 flex items-center justify-center backdrop-blur-sm",
|
|
526
|
+
}, g = t ? y : ne;
|
|
527
|
+
return /* @__PURE__ */ q(ye, { children: [f, /* @__PURE__ */ K("div", {
|
|
528
|
+
className: o("fixed inset-0 z-9999 flex items-center justify-center backdrop-blur-sm", Je.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
|
|
523
529
|
onDragOver: t ? void 0 : h,
|
|
524
530
|
onDrop: t ? void 0 : h,
|
|
525
531
|
style: p,
|
|
526
|
-
children: /* @__PURE__ */
|
|
532
|
+
children: /* @__PURE__ */ q("div", {
|
|
527
533
|
"aria-hidden": !0,
|
|
528
534
|
className: "flex flex-col items-center text-center",
|
|
529
535
|
children: [
|
|
530
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ K(g, {
|
|
531
537
|
size: 100,
|
|
532
538
|
stroke: 1,
|
|
533
539
|
className: m,
|
|
534
540
|
"aria-hidden": !0
|
|
535
541
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ K("span", {
|
|
537
543
|
className: o("mt-5", l?.titleClassName ?? "dial-h3-text"),
|
|
538
544
|
children: u
|
|
539
545
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ K("span", {
|
|
541
547
|
className: o("mt-4", l?.subtitleClassName ?? "dial-small-text"),
|
|
542
548
|
children: d
|
|
543
549
|
})
|
|
544
550
|
]
|
|
545
551
|
})
|
|
546
552
|
})] });
|
|
547
|
-
}, $ = (e) => String(e).padStart(2, "0"),
|
|
553
|
+
}, $ = (e) => String(e).padStart(2, "0"), Xe = (e) => `${e.getFullYear()}-${$(e.getMonth() + 1)}-${$(e.getDate())} ${$(e.getHours())}-${$(e.getMinutes())}-${$(e.getSeconds())}`, Ze = (e, t, n) => {
|
|
548
554
|
let r = e.lastIndexOf("."), i = r > 0, a = i ? e.slice(0, r) : e, o = i ? e.slice(r) : "", s = n === 0 ? "" : ` (${n + 1})`;
|
|
549
|
-
return `${a} ${
|
|
550
|
-
},
|
|
555
|
+
return `${a} ${Xe(t)}${s}${o}`;
|
|
556
|
+
}, Qe = (e, n, i = {}) => {
|
|
551
557
|
let { screenshotName: a = "Screenshot.png", pastedTextName: o = "Pasted text" } = i;
|
|
552
|
-
return { handlePaste:
|
|
558
|
+
return { handlePaste: l((i) => {
|
|
553
559
|
if (!i.clipboardData) return;
|
|
554
560
|
let s = Array.from(i.clipboardData.items).filter((e) => e.kind === "file" && e.type.startsWith("image/")), c = i.clipboardData.getData("text/plain").length > 0;
|
|
555
561
|
if (s.length > 0 && !c) {
|
|
@@ -557,8 +563,8 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
557
563
|
for (let e of s) {
|
|
558
564
|
let i = e.getAsFile();
|
|
559
565
|
if (!i) continue;
|
|
560
|
-
let s =
|
|
561
|
-
id:
|
|
566
|
+
let s = Ze(a, o, n.length), c = new File([i], s, { type: i.type }), l = {
|
|
567
|
+
id: J(),
|
|
562
568
|
name: s,
|
|
563
569
|
contentType: i.type,
|
|
564
570
|
file: c,
|
|
@@ -573,8 +579,8 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
573
579
|
}
|
|
574
580
|
let l = i.clipboardData.getData("text/plain");
|
|
575
581
|
if (l.length > n) {
|
|
576
|
-
let n = `${o} ${
|
|
577
|
-
id:
|
|
582
|
+
let n = `${o} ${Xe(/* @__PURE__ */ new Date())}.txt`, a = new File([l], n, { type: "text/plain" }), s = {
|
|
583
|
+
id: J(),
|
|
578
584
|
name: n,
|
|
579
585
|
contentType: "text/plain",
|
|
580
586
|
file: a,
|
|
@@ -589,6 +595,6 @@ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e)
|
|
|
589
595
|
a,
|
|
590
596
|
o
|
|
591
597
|
]) };
|
|
592
|
-
},
|
|
598
|
+
}, $e = 100;
|
|
593
599
|
//#endregion
|
|
594
|
-
export { je as ATTACHMENT_COLLAPSE_THRESHOLD,
|
|
600
|
+
export { je as ATTACHMENT_COLLAPSE_THRESHOLD, X as ATTACHMENT_INPUT_CLASS, Ue as AttachmentCard, qe as AttachmentGroup, We as AttachmentTray, Ye as FileDndOverlay, Be as LazyImageLoadStatus, $e as MAX_UPLOADS_PER_MINUTE, J as generateAttachmentId, Y as getAttachmentCardState, Te as getAttachmentIcon, De as getExtFromContentType, be as getNameWithoutExtension, we as isMimeTypeAllowed, Ce as mimeTypesToExtensionLabels, Qe as useClipboardPaste, Ve as useLazyImageLoad };
|
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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.360",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@tabler/icons-react": "^3.50.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
23
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.360",
|
|
24
24
|
"react": "^19.2.8",
|
|
25
25
|
"@epam/ai-dial-ui-kit": "^0.16.0"
|
|
26
26
|
},
|