@epam/ai-dial-attachment-input 1.3.0-rc.0 → 1.4.0-dev.5
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/index.css +1 -1
- package/index.js +293 -298
- package/package.json +2 -2
- package/utils/attachment.d.ts.map +1 -1
package/index.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
._tile_hb2mo_12{box-sizing:border-box;background:var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc));border-style:solid;border-color:var(--ai-tile-border,var(--stroke-secondary,#d1dbea))}._tile_hb2mo_12._hovered_hb2mo_18:hover{background:var(--ai-tile-bg-hover,var(--bg-control-neutral-hover-muted,#e0e6f0));border-color:var(--ai-tile-border-hover,var(--ai-tile-border,var(--stroke-secondary,#d1dbea)))}._tile_hb2mo_12{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus,#161b2d))}._selected_hb2mo_28{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_hb2mo_33{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_hb2mo_38{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_hb2mo_42{color:var(--ai-tile-type-text,var(--text-primary,#161b2d))}._placeholderIcon_hb2mo_46{color:var(--ai-tile-placeholder-icon,var(--text-secondary,#57647a))}._retryIcon_hb2mo_50{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_hb2mo_54{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._tile_hb2mo_12 ._actionButton_hb2mo_65{background:var(--ai-tile-hover-icon-bg,var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc)))}._tile_hb2mo_12._hovered_hb2mo_18:hover ._actionButton_hb2mo_65{background:var(--ai-tile-hover-icon-bg,var(--ai-tile-bg-hover,var(--bg-control-neutral-hover-muted,#e0e6f0)))}._tile_hb2mo_12._selected_hb2mo_28 ._actionButton_hb2mo_65{background:var(--ai-tile-hover-icon-bg,linear-gradient(var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f)), var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f))), var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc)))}._tile_hb2mo_12._tileError_hb2mo_33 ._actionButton_hb2mo_65{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._tile_hb2mo_12._loading_hb2mo_86 ._actionButton_hb2mo_65,._tile_hb2mo_12 ._imageActionButton_hb2mo_87,._tile_hb2mo_12._selected_hb2mo_28 ._imageActionButton_hb2mo_87{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#57647a))}._tile_hb2mo_12:has(._tileAction_hb2mo_99:focus-visible){outline-width:1px;outline-style:solid}._tileAction_hb2mo_99:focus-visible{outline:none}._tile_hb2mo_12._proxyFocus_hb2mo_108:has(:focus-visible){outline-width:1px;outline-style:solid}._tile_hb2mo_12._proxyFocus_hb2mo_108 ._actionButton_hb2mo_65:focus-visible{outline:none}._loading_hb2mo_86{cursor:progress}._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*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-e-1{inset-inline-end:.25rem}.top-1{top:.25rem}.z-10{z-index:10}.z-9999{z-index:9999}.-m-0\.5{margin:-.125rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.size-\[100px\]{width:100px;height:100px}.h-full{height:100%}.w-full{width:100%}.max-w-\[424px\]{max-width:424px}.max-w-\[532px\]{max-width:532px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(5\,100px\)\]{grid-template-columns:repeat(5,100px)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-\[11px\]{border-radius:11px}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.object-cover{object-fit:cover}.p-0\.5{padding:.125rem}.p-3{padding:.75rem}.text-center{text-align:center}.break-words,.wrap-break-word{overflow-wrap:break-word}.opacity-0{opacity:0}.opacity-100{opacity:1}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.outline-offset-1{outline-offset:1px}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media (hover:hover){.group-hover\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):hover *){opacity:1}}.group-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):focus-visible *),.group-has-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):has(:focus-visible) *){opacity:1}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}@media (max-width:1279px){.mobile\:opacity-100{opacity:1}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}
|
|
3
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-e-1{inset-inline-end:.25rem}.top-1{top:.25rem}.z-10{z-index:10}.z-9999{z-index:9999}.-m-0\.5{margin:-.125rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.table{display:table}.size-\[100px\]{width:100px;height:100px}.h-full{height:100%}.w-full{width:100%}.max-w-\[424px\]{max-width:424px}.max-w-\[532px\]{max-width:532px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(5\,100px\)\]{grid-template-columns:repeat(5,100px)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-\[11px\]{border-radius:11px}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.object-cover{object-fit:cover}.p-0\.5{padding:.125rem}.p-3{padding:.75rem}.text-center{text-align:center}.break-words,.wrap-break-word{overflow-wrap:break-word}.opacity-0{opacity:0}.opacity-100{opacity:1}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.outline-offset-1{outline-offset:1px}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media (hover:hover){.group-hover\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):hover *){opacity:1}}.group-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):focus-visible *),.group-has-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):has(:focus-visible) *){opacity:1}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}@media (max-width:1279px){.mobile\:opacity-100{opacity:1}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AttachmentErrorReason as e, AttachmentType as t,
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { IconClipboard as
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
5
|
-
import { Fragment as ye, jsx as
|
|
1
|
+
import { AttachmentErrorReason as e, AttachmentType as t, MIMEType as n, MIME_TYPE_EXT_MAP as r, RequestStatus as i, buildCssVars as a, getBaseMimeType as o, mergeClasses as s, normalizeMimeType as c, useIsVerticallyClamped as l } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { useCallback as u, useEffect as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
3
|
+
import { IconClipboard as g, IconDownload as _, IconExternalLink as v, IconFile as y, IconFileDescription as b, IconFileTypeBmp as x, IconFileTypeCss as S, IconFileTypeCsv as ee, 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 te, IconFileTypeXls as z, IconFileTypeXml as ne, IconFileTypeZip as B, IconFileX as re, IconMusic as V, IconPaperclip as H, IconPhoto as U, IconReload as ie, IconTerminal2 as ae, IconVideo as W, IconX as oe } from "@tabler/icons-react";
|
|
4
|
+
import { DIAL_ICON_SIZE as G, DIAL_KIT_ICON_STROKE as K, 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 q, jsxs as J } from "react/jsx-runtime";
|
|
6
6
|
//#region src/utils/attachment.ts
|
|
7
|
-
var
|
|
7
|
+
var Y = () => `${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;
|
|
@@ -15,105 +15,100 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
15
15
|
text: "Text files",
|
|
16
16
|
"*": "All files"
|
|
17
17
|
}, Se = { "image/jpeg": "JPEG" }, Ce = (e, t = xe) => e.map((e) => {
|
|
18
|
-
let
|
|
19
|
-
if (
|
|
20
|
-
let e =
|
|
18
|
+
let n = o(e);
|
|
19
|
+
if (n.endsWith("/*")) {
|
|
20
|
+
let e = n.slice(0, -2);
|
|
21
21
|
return t[e] ?? `${e} files`;
|
|
22
22
|
}
|
|
23
|
-
let i =
|
|
24
|
-
if (
|
|
25
|
-
let
|
|
26
|
-
if (
|
|
23
|
+
let i = c(n), a = Se[i];
|
|
24
|
+
if (a) return a;
|
|
25
|
+
let s = r[i];
|
|
26
|
+
if (s) return s.toUpperCase();
|
|
27
27
|
let l = i.split("/")[1];
|
|
28
28
|
return l == null ? e.toUpperCase() : l.toUpperCase();
|
|
29
29
|
}).join(", "), we = (e, t) => {
|
|
30
30
|
if (t.length === 0) return !1;
|
|
31
|
-
let n =
|
|
31
|
+
let n = o(e), r = c(n);
|
|
32
32
|
return t.some((e) => {
|
|
33
|
-
let t =
|
|
33
|
+
let t = o(e);
|
|
34
34
|
if (t === "*" || t === "*/*") return !0;
|
|
35
35
|
if (t.endsWith("/*")) {
|
|
36
36
|
let e = t.slice(0, -2);
|
|
37
37
|
return n.startsWith(`${e}/`) || r.startsWith(`${e}/`);
|
|
38
38
|
}
|
|
39
|
-
return r ===
|
|
39
|
+
return r === c(t);
|
|
40
40
|
});
|
|
41
|
-
}, Te = (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
case "text/x-rustsrc": return N;
|
|
79
|
-
case "text/x-vue": return z;
|
|
80
|
-
default: return v;
|
|
81
|
-
}
|
|
82
|
-
}, Ee = (e) => {
|
|
41
|
+
}, Te = () => ({
|
|
42
|
+
[n.JPEG]: E,
|
|
43
|
+
[n.PNG]: j,
|
|
44
|
+
[n.SVG]: F,
|
|
45
|
+
[n.BMP]: x
|
|
46
|
+
}), Ee = () => ({
|
|
47
|
+
[n.PDF]: k,
|
|
48
|
+
[n.DOC]: C,
|
|
49
|
+
[n.DOCX]: w,
|
|
50
|
+
[n.PPT]: M,
|
|
51
|
+
[n.PPTX]: M,
|
|
52
|
+
[n.XLS]: z,
|
|
53
|
+
[n.XLSX]: z,
|
|
54
|
+
[n.ZIP]: B,
|
|
55
|
+
[n.RAR]: B,
|
|
56
|
+
[n.SevenZip]: B,
|
|
57
|
+
[n.GZIP]: B,
|
|
58
|
+
[n.TAR]: B,
|
|
59
|
+
[n.CSV]: ee,
|
|
60
|
+
[n.Plain]: R,
|
|
61
|
+
[n.HTML]: T,
|
|
62
|
+
[n.XHTML]: T,
|
|
63
|
+
[n.XML]: ne,
|
|
64
|
+
[n.SQL]: P,
|
|
65
|
+
[n.JavaScript]: D,
|
|
66
|
+
[n.JSX]: O,
|
|
67
|
+
[n.TypeScript]: I,
|
|
68
|
+
[n.TSX]: L,
|
|
69
|
+
[n.CSS]: S,
|
|
70
|
+
[n.PHP]: A,
|
|
71
|
+
[n.Rust]: N,
|
|
72
|
+
[n.Vue]: te
|
|
73
|
+
}), De, Oe, ke = (e) => {
|
|
74
|
+
if (!e) return y;
|
|
75
|
+
let t = c(e);
|
|
76
|
+
return t.startsWith("image/") ? (De ??= Te(), De[t] ?? U) : t.startsWith("video/") ? W : t.startsWith("audio/") ? V : (Oe ??= Ee(), Oe[t] ?? y);
|
|
77
|
+
}, Ae = (e) => {
|
|
83
78
|
let { type: n, contentType: r } = e;
|
|
84
|
-
return n === t.Prompt ? ae : n === t.Pasted ?
|
|
85
|
-
},
|
|
86
|
-
let t =
|
|
87
|
-
if (
|
|
79
|
+
return n === t.Prompt ? ae : n === t.Pasted ? g : n === t.Image ? U : ke(r ?? "");
|
|
80
|
+
}, je = (e) => {
|
|
81
|
+
let t = c(e), n = r[t];
|
|
82
|
+
if (n) return n;
|
|
88
83
|
let i = t.split("/")[1];
|
|
89
84
|
if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
|
|
90
|
-
},
|
|
85
|
+
}, Me = (e) => {
|
|
91
86
|
let { name: t, contentType: n } = e;
|
|
92
87
|
if (n) {
|
|
93
|
-
let e =
|
|
88
|
+
let e = je(n);
|
|
94
89
|
if (e) return e;
|
|
95
90
|
}
|
|
96
91
|
if (t == null) return;
|
|
97
92
|
let r = t.lastIndexOf(".");
|
|
98
93
|
if (r > 0 && r < t.length - 1) return t.slice(r + 1).toLowerCase();
|
|
99
|
-
},
|
|
94
|
+
}, Ne = (e) => e.type !== t.Prompt && e.type !== t.Pasted, Pe = (e, n) => {
|
|
100
95
|
let { type: r, name: i } = e;
|
|
101
96
|
if (r === t.Prompt) return n.promptLabel ?? "Prompt";
|
|
102
97
|
if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
|
|
103
98
|
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
104
|
-
let a =
|
|
99
|
+
let a = Me(e);
|
|
105
100
|
return a ? `.${a}` : i ?? "";
|
|
106
|
-
},
|
|
107
|
-
let { type:
|
|
101
|
+
}, X = (e, n = {}) => {
|
|
102
|
+
let { type: r, status: a, previewUrl: o, url: s } = e, c = a === i.Loading, l = a === i.Error, u = r === t.Image && !!(o ?? s) && !l, d = r === t.Link && !l;
|
|
108
103
|
return {
|
|
109
104
|
isLoading: c,
|
|
110
105
|
isError: l,
|
|
111
106
|
isImage: u,
|
|
112
107
|
isLink: d,
|
|
113
|
-
BottomIcon: d ? null :
|
|
114
|
-
typeLabel: d ? null :
|
|
108
|
+
BottomIcon: d ? null : Ae(e),
|
|
109
|
+
typeLabel: d ? null : Pe(e, n)
|
|
115
110
|
};
|
|
116
|
-
},
|
|
111
|
+
}, Fe = 5, Ie = "flex size-[100px] items-center justify-center rounded-xl border", Le = "outline-offset-1 focus-visible:outline-1", Z = {
|
|
117
112
|
tray: "dial-ai-attachment-tray",
|
|
118
113
|
trayItem: "dial-ai-attachment-tray-item",
|
|
119
114
|
tile: "dial-ai-attachment-tile",
|
|
@@ -121,7 +116,7 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
121
116
|
tileName: "dial-ai-attachment-tile-name",
|
|
122
117
|
tileType: "dial-ai-attachment-tile-type",
|
|
123
118
|
tileAction: "dial-ai-attachment-tile-action"
|
|
124
|
-
},
|
|
119
|
+
}, Q = {
|
|
125
120
|
tile: "_tile_hb2mo_12",
|
|
126
121
|
hovered: "_hovered_hb2mo_18",
|
|
127
122
|
selected: "_selected_hb2mo_28",
|
|
@@ -136,162 +131,162 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
136
131
|
imageActionButton: "_imageActionButton_hb2mo_87",
|
|
137
132
|
tileAction: "_tileAction_hb2mo_99",
|
|
138
133
|
proxyFocus: "_proxyFocus_hb2mo_108"
|
|
139
|
-
},
|
|
134
|
+
}, Re = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o, isAlwaysVisible: c }) => /* @__PURE__ */ q(_e, {
|
|
140
135
|
icon: a,
|
|
141
136
|
size: ce.Small,
|
|
142
|
-
className:
|
|
137
|
+
className: s(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", Q.actionButton, o, Z.tileAction),
|
|
143
138
|
"aria-label": e,
|
|
144
139
|
"aria-describedby": t ? n : void 0,
|
|
145
140
|
onClick: (e) => {
|
|
146
141
|
e.stopPropagation(), r(i);
|
|
147
142
|
}
|
|
148
|
-
}),
|
|
149
|
-
icon: /* @__PURE__ */
|
|
150
|
-
size:
|
|
143
|
+
}), ze = ({ ...e }) => /* @__PURE__ */ q(Re, {
|
|
144
|
+
icon: /* @__PURE__ */ q(ie, {
|
|
145
|
+
size: G.SM,
|
|
151
146
|
"aria-hidden": !0,
|
|
152
|
-
stroke:
|
|
147
|
+
stroke: K
|
|
153
148
|
}),
|
|
154
|
-
className:
|
|
149
|
+
className: Q.retryIcon,
|
|
155
150
|
...e
|
|
156
|
-
}),
|
|
157
|
-
icon: /* @__PURE__ */
|
|
158
|
-
size:
|
|
151
|
+
}), Be = ({ ...e }) => /* @__PURE__ */ q(Re, {
|
|
152
|
+
icon: /* @__PURE__ */ q(_, {
|
|
153
|
+
size: G.SM,
|
|
159
154
|
"aria-hidden": !0,
|
|
160
|
-
stroke:
|
|
155
|
+
stroke: K
|
|
161
156
|
}),
|
|
162
157
|
...e
|
|
163
|
-
}),
|
|
164
|
-
icon: /* @__PURE__ */
|
|
165
|
-
size:
|
|
158
|
+
}), Ve = ({ ...e }) => /* @__PURE__ */ q(Re, {
|
|
159
|
+
icon: /* @__PURE__ */ q(v, {
|
|
160
|
+
size: G.SM,
|
|
166
161
|
"aria-hidden": !0,
|
|
167
|
-
stroke:
|
|
162
|
+
stroke: K
|
|
168
163
|
}),
|
|
169
164
|
...e
|
|
170
|
-
}),
|
|
171
|
-
icon: /* @__PURE__ */
|
|
172
|
-
size:
|
|
165
|
+
}), He = ({ className: e, ...t }) => /* @__PURE__ */ q(Re, {
|
|
166
|
+
icon: /* @__PURE__ */ q(oe, {
|
|
167
|
+
size: G.SM,
|
|
173
168
|
"aria-hidden": !0,
|
|
174
|
-
stroke:
|
|
169
|
+
stroke: K
|
|
175
170
|
}),
|
|
176
|
-
className:
|
|
171
|
+
className: s("mobile:opacity-100", e),
|
|
177
172
|
...t
|
|
178
|
-
}),
|
|
173
|
+
}), Ue = {
|
|
179
174
|
[e.Network]: "Upload failed · network error",
|
|
180
175
|
[e.UnsupportedType]: "Upload failed · unsupported file type",
|
|
181
176
|
[e.FileTooLarge]: "Upload failed · file too large"
|
|
182
|
-
},
|
|
183
|
-
let { clickLabel: b = "Download attachment", expandLabel: x = "Expand pasted text", downloadLabel: S = "Download attachment", retryLabel:
|
|
184
|
-
V ? g(
|
|
185
|
-
},
|
|
177
|
+
}, We = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: a, labels: o, styles: c, onDownload: d, isLink: m, cssVars: h, onExpand: g, isExpandable: _, onRemove: v, isSelected: y }) => {
|
|
178
|
+
let { clickLabel: b = "Download attachment", expandLabel: x = "Expand pasted text", downloadLabel: S = "Download attachment", retryLabel: ee = "Retry upload", removeLabel: C = "Remove attachment", openInNewTabLabel: w = "Open in new tab", sizeLabel: T, uploadingLabel: E = "Uploading", errorReasonLabels: D, genericErrorLabel: O = "Upload failed" } = o ?? {}, { typography: k, className: A } = c ?? {}, { id: j, name: M, status: N, errorReason: P } = t, F = N === i.Loading, I = N === i.Error, L = f(), R = I ? P && (D?.[P] ?? Ue[P]) || O : "", { BottomIcon: te, typeLabel: z } = X(t), ne = Ne(t), B = !I && !F && d && !m, re = I && !!a && P !== e.UnsupportedType && P !== e.FileTooLarge, V = !!_ && g !== void 0, H = V || r !== void 0, U = Number(!!B) + Number(!!re) + Number(!!m) + Number(!!v), ie = !H && U === 1, ae = () => {
|
|
179
|
+
V ? g(j) : r?.(j);
|
|
180
|
+
}, W = p(() => be(M), [M]), { ref: oe, isClamped: ce } = l(W), ue = u(() => {
|
|
186
181
|
window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
|
|
187
|
-
}, [t]),
|
|
188
|
-
ref:
|
|
189
|
-
title:
|
|
190
|
-
className:
|
|
191
|
-
children: n ? /* @__PURE__ */
|
|
192
|
-
text:
|
|
182
|
+
}, [t]), me = s(Ie, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", Q.tile, H && !I && !F && Q.hovered, F && Q.loading, y && Q.selected, I && Q.tileError, ie && Q.proxyFocus, Z.tile, y && Z.tileSelected), he = /* @__PURE__ */ q("div", {
|
|
183
|
+
ref: oe,
|
|
184
|
+
title: W,
|
|
185
|
+
className: s(k?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 wrap-break-word", Q.nameText, Z.tileName),
|
|
186
|
+
children: n ? /* @__PURE__ */ q(de, {
|
|
187
|
+
text: W,
|
|
193
188
|
query: n,
|
|
194
189
|
maxLines: 2
|
|
195
|
-
}) :
|
|
196
|
-
}),
|
|
197
|
-
className:
|
|
198
|
-
children: [
|
|
190
|
+
}) : W
|
|
191
|
+
}), _e = te && /* @__PURE__ */ J("div", {
|
|
192
|
+
className: s("flex w-full items-end gap-1", Z.tileType),
|
|
193
|
+
children: [ne ? /* @__PURE__ */ q(le, {
|
|
199
194
|
type: se.File,
|
|
200
|
-
name:
|
|
201
|
-
fileExtension:
|
|
202
|
-
size:
|
|
195
|
+
name: M ?? "",
|
|
196
|
+
fileExtension: Me(t),
|
|
197
|
+
size: G.MD,
|
|
203
198
|
decorative: !0
|
|
204
|
-
}) : /* @__PURE__ */
|
|
205
|
-
size:
|
|
206
|
-
className:
|
|
207
|
-
stroke:
|
|
199
|
+
}) : /* @__PURE__ */ q(te, {
|
|
200
|
+
size: G.MD,
|
|
201
|
+
className: Q.typeText,
|
|
202
|
+
stroke: K,
|
|
208
203
|
"aria-hidden": !0
|
|
209
|
-
}), /* @__PURE__ */
|
|
210
|
-
className:
|
|
211
|
-
children:
|
|
204
|
+
}), /* @__PURE__ */ q("span", {
|
|
205
|
+
className: s(k?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Q.typeText),
|
|
206
|
+
children: T ? `${z} · ${T}` : z
|
|
212
207
|
})]
|
|
213
|
-
}),
|
|
208
|
+
}), Y = /* @__PURE__ */ J(ye, { children: [
|
|
209
|
+
he,
|
|
214
210
|
_e,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
hideTooltip: !ue,
|
|
211
|
+
H && /* @__PURE__ */ q(ve, {
|
|
212
|
+
tooltip: M,
|
|
213
|
+
hideTooltip: !ce,
|
|
219
214
|
triggerClassName: "absolute inset-0",
|
|
220
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ q("button", {
|
|
221
216
|
type: "button",
|
|
222
217
|
"aria-label": V ? x : b,
|
|
223
|
-
"aria-pressed": !V &&
|
|
224
|
-
onClick:
|
|
225
|
-
className:
|
|
218
|
+
"aria-pressed": !V && r !== void 0 ? y : void 0,
|
|
219
|
+
onClick: ae,
|
|
220
|
+
className: s("absolute inset-0 cursor-pointer rounded-[11px]", Q.tileAction)
|
|
226
221
|
})
|
|
227
222
|
}),
|
|
228
|
-
|
|
223
|
+
F && /* @__PURE__ */ q("div", {
|
|
229
224
|
role: "progressbar",
|
|
230
|
-
"aria-label":
|
|
231
|
-
className:
|
|
232
|
-
children: /* @__PURE__ */
|
|
225
|
+
"aria-label": E,
|
|
226
|
+
className: s("absolute inset-0 flex items-center justify-center rounded-[11px]", Q.track),
|
|
227
|
+
children: /* @__PURE__ */ q("span", {
|
|
233
228
|
"aria-hidden": !0,
|
|
234
229
|
className: "flex",
|
|
235
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ q(ge, { size: 32 })
|
|
236
231
|
})
|
|
237
232
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ J("div", {
|
|
239
234
|
className: "absolute inset-e-1 top-1 flex",
|
|
240
235
|
children: [
|
|
241
|
-
|
|
236
|
+
B && /* @__PURE__ */ q(Be, {
|
|
242
237
|
ariaLabel: S,
|
|
243
|
-
errorTitle:
|
|
244
|
-
errorDescId:
|
|
245
|
-
onClick:
|
|
246
|
-
id:
|
|
238
|
+
errorTitle: R,
|
|
239
|
+
errorDescId: L,
|
|
240
|
+
onClick: d,
|
|
241
|
+
id: j
|
|
247
242
|
}),
|
|
248
|
-
re && /* @__PURE__ */
|
|
249
|
-
ariaLabel:
|
|
250
|
-
errorTitle:
|
|
251
|
-
errorDescId:
|
|
243
|
+
re && /* @__PURE__ */ q(ze, {
|
|
244
|
+
ariaLabel: ee,
|
|
245
|
+
errorTitle: R,
|
|
246
|
+
errorDescId: L,
|
|
252
247
|
onClick: a,
|
|
253
|
-
id:
|
|
248
|
+
id: j
|
|
254
249
|
}),
|
|
255
|
-
m && /* @__PURE__ */
|
|
256
|
-
ariaLabel: T,
|
|
257
|
-
errorTitle: z,
|
|
258
|
-
errorDescId: R,
|
|
259
|
-
onClick: me
|
|
260
|
-
}),
|
|
261
|
-
v && /* @__PURE__ */ K(Le, {
|
|
250
|
+
m && /* @__PURE__ */ q(Ve, {
|
|
262
251
|
ariaLabel: w,
|
|
263
|
-
errorTitle:
|
|
264
|
-
errorDescId:
|
|
252
|
+
errorTitle: R,
|
|
253
|
+
errorDescId: L,
|
|
254
|
+
onClick: ue
|
|
255
|
+
}),
|
|
256
|
+
v && /* @__PURE__ */ q(He, {
|
|
257
|
+
ariaLabel: C,
|
|
258
|
+
errorTitle: R,
|
|
259
|
+
errorDescId: L,
|
|
265
260
|
onClick: v,
|
|
266
|
-
id:
|
|
267
|
-
isAlwaysVisible:
|
|
261
|
+
id: j,
|
|
262
|
+
isAlwaysVisible: F
|
|
268
263
|
})
|
|
269
264
|
]
|
|
270
265
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
id:
|
|
266
|
+
/* @__PURE__ */ q(fe, {
|
|
267
|
+
id: L,
|
|
273
268
|
visuallyHidden: !0,
|
|
274
269
|
as: pe.Span,
|
|
275
|
-
children:
|
|
270
|
+
children: I ? R : ""
|
|
276
271
|
})
|
|
277
272
|
] });
|
|
278
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ q("div", {
|
|
279
274
|
style: h,
|
|
280
|
-
className:
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
-
"aria-busy":
|
|
275
|
+
className: s("inline-flex", A),
|
|
276
|
+
children: /* @__PURE__ */ q("div", {
|
|
277
|
+
"aria-busy": F,
|
|
283
278
|
style: h,
|
|
284
|
-
className:
|
|
285
|
-
children:
|
|
279
|
+
className: s(me, H && "cursor-pointer", Le),
|
|
280
|
+
children: Y
|
|
286
281
|
})
|
|
287
282
|
});
|
|
288
|
-
},
|
|
283
|
+
}, Ge = /* @__PURE__ */ function(e) {
|
|
289
284
|
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
290
|
-
}({}),
|
|
291
|
-
let n =
|
|
292
|
-
return
|
|
285
|
+
}({}), Ke = ({ enabled: e, src: t }) => {
|
|
286
|
+
let n = m(null), [r, i] = h("idle");
|
|
287
|
+
return d(() => {
|
|
293
288
|
i(e && t ? "loading" : "idle");
|
|
294
|
-
}, [e, t]),
|
|
289
|
+
}, [e, t]), d(() => {
|
|
295
290
|
let r = n.current;
|
|
296
291
|
if (!r || !e || !t) return;
|
|
297
292
|
let a = () => i("loaded"), o = () => i("error");
|
|
@@ -302,96 +297,96 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
302
297
|
imageRef: n,
|
|
303
298
|
imageLoadStatus: r
|
|
304
299
|
};
|
|
305
|
-
},
|
|
306
|
-
let { clickLabel: d = "Open attachment", expandLabel:
|
|
307
|
-
enabled:
|
|
300
|
+
}, qe = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: c, styles: l, isSelected: u }) => {
|
|
301
|
+
let { clickLabel: d = "Open attachment", expandLabel: f = "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: ee, isImage: C } = p(() => X(e), [e]), w = r !== void 0 && !x && !S && !ee, T = x || w, E = !!c && !S, D = !T && Number(!!a) + Number(E) === 1, { imageRef: O, imageLoadStatus: k } = Ke({
|
|
302
|
+
enabled: C,
|
|
308
303
|
src: b
|
|
309
|
-
}),
|
|
310
|
-
x && n ? n(v) :
|
|
311
|
-
},
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
className:
|
|
304
|
+
}), A = () => {
|
|
305
|
+
x && n ? n(v) : w && r && r(v);
|
|
306
|
+
}, j = s(Ie, "group/attachment-tile", T && "cursor-pointer", Q.tile, u && Q.selected, S && Q.loading, D && Q.proxyFocus, Le, _, Z.tile, u && Z.tileSelected);
|
|
307
|
+
return /* @__PURE__ */ q("div", {
|
|
308
|
+
className: j,
|
|
314
309
|
"aria-busy": S,
|
|
315
|
-
style:
|
|
316
|
-
children: /* @__PURE__ */
|
|
310
|
+
style: o,
|
|
311
|
+
children: /* @__PURE__ */ J("div", {
|
|
317
312
|
className: "relative h-full w-full overflow-hidden",
|
|
318
313
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ J("div", {
|
|
320
315
|
className: "absolute inset-e-1 top-1 z-10 flex",
|
|
321
|
-
children: [a && /* @__PURE__ */
|
|
316
|
+
children: [a && /* @__PURE__ */ q(He, {
|
|
322
317
|
ariaLabel: m,
|
|
323
318
|
onClick: a,
|
|
324
319
|
id: v,
|
|
325
|
-
className:
|
|
320
|
+
className: Q.imageActionButton,
|
|
326
321
|
isAlwaysVisible: S
|
|
327
|
-
}),
|
|
322
|
+
}), E && /* @__PURE__ */ q(Be, {
|
|
328
323
|
ariaLabel: h,
|
|
329
324
|
onClick: c,
|
|
330
325
|
id: v,
|
|
331
|
-
className:
|
|
326
|
+
className: Q.imageActionButton
|
|
332
327
|
})]
|
|
333
328
|
}),
|
|
334
|
-
|
|
329
|
+
k !== Ge.Loaded && /* @__PURE__ */ q(me, {
|
|
335
330
|
variant: he.Rectangular,
|
|
336
331
|
width: "100%",
|
|
337
332
|
height: "100%",
|
|
338
|
-
active:
|
|
339
|
-
overlay: /* @__PURE__ */
|
|
340
|
-
size:
|
|
341
|
-
className:
|
|
333
|
+
active: k === Ge.Loading,
|
|
334
|
+
overlay: /* @__PURE__ */ q(U, {
|
|
335
|
+
size: G.LG,
|
|
336
|
+
className: Q.placeholderIcon,
|
|
342
337
|
"aria-hidden": !0,
|
|
343
|
-
stroke:
|
|
338
|
+
stroke: K
|
|
344
339
|
}),
|
|
345
340
|
className: "absolute inset-0 rounded-xl"
|
|
346
341
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
ref:
|
|
342
|
+
/* @__PURE__ */ q("img", {
|
|
343
|
+
ref: O,
|
|
349
344
|
src: b,
|
|
350
345
|
alt: y,
|
|
351
346
|
loading: "lazy",
|
|
352
347
|
decoding: "async",
|
|
353
|
-
className:
|
|
348
|
+
className: s("h-full w-full rounded-xl object-cover transition-opacity duration-200", k === Ge.Loaded ? "opacity-100" : "opacity-0")
|
|
354
349
|
}),
|
|
355
|
-
|
|
350
|
+
T && /* @__PURE__ */ q("button", {
|
|
356
351
|
type: "button",
|
|
357
|
-
"aria-label": x ?
|
|
358
|
-
"aria-pressed":
|
|
359
|
-
onClick:
|
|
360
|
-
className:
|
|
352
|
+
"aria-label": x ? f : d,
|
|
353
|
+
"aria-pressed": w ? u : void 0,
|
|
354
|
+
onClick: A,
|
|
355
|
+
className: s("absolute inset-0 cursor-pointer rounded-xl", Q.tileAction)
|
|
361
356
|
}),
|
|
362
|
-
S && /* @__PURE__ */
|
|
357
|
+
S && /* @__PURE__ */ q("div", {
|
|
363
358
|
role: "progressbar",
|
|
364
359
|
"aria-label": g,
|
|
365
|
-
className:
|
|
366
|
-
children: /* @__PURE__ */
|
|
360
|
+
className: s("absolute inset-0 flex items-center justify-center rounded-xl", Q.track),
|
|
361
|
+
children: /* @__PURE__ */ q("span", {
|
|
367
362
|
"aria-hidden": !0,
|
|
368
363
|
className: "flex",
|
|
369
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ q(ge, { size: 32 })
|
|
370
365
|
})
|
|
371
366
|
})
|
|
372
367
|
]
|
|
373
368
|
})
|
|
374
369
|
});
|
|
375
|
-
},
|
|
376
|
-
let { colors:
|
|
377
|
-
"--ai-tile-bg":
|
|
378
|
-
"--ai-tile-border":
|
|
379
|
-
"--ai-tile-bg-hover":
|
|
380
|
-
"--ai-tile-border-hover":
|
|
381
|
-
"--ai-tile-bg-selected":
|
|
382
|
-
"--ai-tile-border-selected":
|
|
383
|
-
"--ai-tile-focus-outline":
|
|
384
|
-
"--ai-tile-bg-error":
|
|
385
|
-
"--ai-tile-border-error":
|
|
386
|
-
"--ai-tile-error-text":
|
|
387
|
-
"--ai-tile-name-text":
|
|
388
|
-
"--ai-tile-type-text":
|
|
389
|
-
"--ai-tile-placeholder-icon":
|
|
390
|
-
"--ai-tile-hover-icon-bg":
|
|
391
|
-
"--ai-tile-hover-icon-color":
|
|
392
|
-
"--ai-tile-progress-track":
|
|
393
|
-
}), { isImage: g, isLink: _ } =
|
|
394
|
-
return g ? /* @__PURE__ */
|
|
370
|
+
}, Je = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: o, onClick: s, onDownload: c, labels: l, styles: u, isSelected: d }) => {
|
|
371
|
+
let { colors: f } = u ?? {}, m = e.type === t.Pasted && o !== void 0, h = a({
|
|
372
|
+
"--ai-tile-bg": f?.background,
|
|
373
|
+
"--ai-tile-border": f?.border,
|
|
374
|
+
"--ai-tile-bg-hover": f?.backgroundHover,
|
|
375
|
+
"--ai-tile-border-hover": f?.borderHover,
|
|
376
|
+
"--ai-tile-bg-selected": f?.backgroundSelected,
|
|
377
|
+
"--ai-tile-border-selected": f?.borderSelected,
|
|
378
|
+
"--ai-tile-focus-outline": f?.focusOutline,
|
|
379
|
+
"--ai-tile-bg-error": f?.backgroundError,
|
|
380
|
+
"--ai-tile-border-error": f?.borderError,
|
|
381
|
+
"--ai-tile-error-text": f?.errorText,
|
|
382
|
+
"--ai-tile-name-text": f?.nameText,
|
|
383
|
+
"--ai-tile-type-text": f?.typeText,
|
|
384
|
+
"--ai-tile-placeholder-icon": f?.placeholderIcon,
|
|
385
|
+
"--ai-tile-hover-icon-bg": f?.hoverIconBackground,
|
|
386
|
+
"--ai-tile-hover-icon-color": f?.hoverIconColor,
|
|
387
|
+
"--ai-tile-progress-track": f?.trackBackground
|
|
388
|
+
}), { isImage: g, isLink: _ } = p(() => X(e), [e]);
|
|
389
|
+
return g ? /* @__PURE__ */ q(qe, {
|
|
395
390
|
attachment: e,
|
|
396
391
|
labels: l,
|
|
397
392
|
onClick: s,
|
|
@@ -401,11 +396,11 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
401
396
|
cssVars: h,
|
|
402
397
|
onDownload: c,
|
|
403
398
|
isSelected: d
|
|
404
|
-
}) : /* @__PURE__ */
|
|
399
|
+
}) : /* @__PURE__ */ q(We, {
|
|
405
400
|
attachment: e,
|
|
406
401
|
searchQuery: n,
|
|
407
402
|
onClick: s,
|
|
408
|
-
onRetry:
|
|
403
|
+
onRetry: i,
|
|
409
404
|
onRemove: r,
|
|
410
405
|
onDownload: c,
|
|
411
406
|
isLink: _,
|
|
@@ -416,16 +411,16 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
416
411
|
isExpandable: m,
|
|
417
412
|
isSelected: d
|
|
418
413
|
});
|
|
419
|
-
},
|
|
420
|
-
let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d, expandLabel: f, uploadingLabel: p } = a ?? {}, { className: m, card: h } =
|
|
421
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
414
|
+
}, Ye = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: a, styles: o }) => {
|
|
415
|
+
let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d, expandLabel: f, uploadingLabel: p } = a ?? {}, { className: m, card: h } = o ?? {};
|
|
416
|
+
return e.length === 0 ? null : /* @__PURE__ */ q("div", {
|
|
422
417
|
role: "list",
|
|
423
418
|
"aria-label": c,
|
|
424
|
-
className:
|
|
425
|
-
children: e.map((e) => /* @__PURE__ */
|
|
419
|
+
className: s("-m-0.5 box-border flex min-w-0 gap-2 overflow-x-auto p-0.5", m, Z.tray),
|
|
420
|
+
children: e.map((e) => /* @__PURE__ */ q("div", {
|
|
426
421
|
role: "listitem",
|
|
427
|
-
className:
|
|
428
|
-
children: /* @__PURE__ */
|
|
422
|
+
className: Z.trayItem,
|
|
423
|
+
children: /* @__PURE__ */ q(Je, {
|
|
429
424
|
attachment: e,
|
|
430
425
|
onRemove: t,
|
|
431
426
|
onRetry: n,
|
|
@@ -442,57 +437,57 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
442
437
|
})
|
|
443
438
|
}, e.id))
|
|
444
439
|
});
|
|
445
|
-
},
|
|
440
|
+
}, Xe = {
|
|
446
441
|
headerIcon: "_headerIcon_1dmgi_1",
|
|
447
442
|
headerLabel: "_headerLabel_1dmgi_2"
|
|
448
|
-
},
|
|
449
|
-
let { ariaLabel: f = "Attachments", clickLabel: p = "Download attachment", downloadLabel: m = "Download attachment", retryLabel: h = "Retry upload", downloadAllLabel:
|
|
443
|
+
}, Ze = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Qe = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, isAttachmentDownloadable: o, onRetry: c, labels: l, styles: u, selectedAttachmentId: d }) => {
|
|
444
|
+
let { ariaLabel: f = "Attachments", clickLabel: p = "Download attachment", downloadLabel: m = "Download attachment", retryLabel: h = "Retry upload", downloadAllLabel: g = "Download all", openInNewTabLabel: v, getHeaderLabel: b = (e) => Ze(e, "attachment"), promptLabel: x, pastedLabel: S, imageLabel: ee } = l ?? {}, { typography: C, colors: w, className: T } = u ?? {}, E = a({ "--ai-group-text": w?.text });
|
|
450
445
|
if (e.length === 0) return null;
|
|
451
|
-
let
|
|
452
|
-
|
|
453
|
-
let
|
|
454
|
-
|
|
455
|
-
},
|
|
446
|
+
let D = e.some((e) => e.type === t.Image), O = e.some((e) => e.type !== t.Image), k = D && O, A = e.length >= 5, j = y;
|
|
447
|
+
k ? j = H : D && (j = U);
|
|
448
|
+
let M = b(e.length), N = (e) => o?.(e) !== !1, P = e.filter((e) => e.status === i.Idle && N(e)), F = () => {
|
|
449
|
+
r ? r(P) : P.forEach((e) => n?.(e.id));
|
|
450
|
+
}, I = (t) => {
|
|
456
451
|
let n = e.find((e) => e.id === t);
|
|
457
|
-
n &&
|
|
452
|
+
n && r?.([n]);
|
|
458
453
|
};
|
|
459
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ J("div", {
|
|
460
455
|
role: "group",
|
|
461
456
|
"aria-label": f,
|
|
462
|
-
style:
|
|
463
|
-
className:
|
|
464
|
-
children: [/* @__PURE__ */
|
|
457
|
+
style: E,
|
|
458
|
+
className: s("flex flex-col gap-2", A ? "w-full max-w-[532px] min-w-0" : "max-w-[424px]", Xe.container, T),
|
|
459
|
+
children: [/* @__PURE__ */ J("div", {
|
|
465
460
|
className: "flex items-center justify-between",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
461
|
+
children: [/* @__PURE__ */ J("div", {
|
|
467
462
|
className: "flex items-center gap-1",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
469
|
-
size:
|
|
470
|
-
className:
|
|
463
|
+
children: [/* @__PURE__ */ q(j, {
|
|
464
|
+
size: G.SM,
|
|
465
|
+
className: s("shrink-0", Xe.headerIcon),
|
|
471
466
|
"aria-hidden": !0
|
|
472
|
-
}), /* @__PURE__ */
|
|
473
|
-
className:
|
|
474
|
-
children:
|
|
467
|
+
}), /* @__PURE__ */ q("span", {
|
|
468
|
+
className: s(C?.headerLabelClassName ?? "dial-tiny-semi-text", Xe.headerLabel),
|
|
469
|
+
children: M
|
|
475
470
|
})]
|
|
476
|
-
}), e.length >= 2 &&
|
|
477
|
-
icon: /* @__PURE__ */
|
|
478
|
-
size:
|
|
471
|
+
}), e.length >= 2 && P.length > 0 && (r || n) && /* @__PURE__ */ q(ue, {
|
|
472
|
+
icon: /* @__PURE__ */ q(_, {
|
|
473
|
+
size: G.SM,
|
|
479
474
|
"aria-hidden": !0,
|
|
480
|
-
stroke:
|
|
475
|
+
stroke: K
|
|
481
476
|
}),
|
|
482
477
|
size: ce.Small,
|
|
483
|
-
"aria-label":
|
|
484
|
-
onClick:
|
|
478
|
+
"aria-label": g,
|
|
479
|
+
onClick: F
|
|
485
480
|
})]
|
|
486
|
-
}), /* @__PURE__ */
|
|
481
|
+
}), /* @__PURE__ */ q("div", {
|
|
487
482
|
role: "list",
|
|
488
|
-
"aria-label":
|
|
489
|
-
className:
|
|
490
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
483
|
+
"aria-label": M,
|
|
484
|
+
className: s("gap-2", A ? "grid grid-cols-[repeat(5,100px)]" : "flex flex-wrap"),
|
|
485
|
+
children: e.map((e, t) => /* @__PURE__ */ q("div", {
|
|
491
486
|
role: "listitem",
|
|
492
|
-
children: /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ q(Je, {
|
|
493
488
|
attachment: e,
|
|
494
489
|
onClick: n,
|
|
495
|
-
onDownload:
|
|
490
|
+
onDownload: r && N(e) ? I : void 0,
|
|
496
491
|
onRetry: c,
|
|
497
492
|
labels: {
|
|
498
493
|
clickLabel: p,
|
|
@@ -500,96 +495,96 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
500
495
|
retryLabel: h,
|
|
501
496
|
promptLabel: x,
|
|
502
497
|
pastedLabel: S,
|
|
503
|
-
imageLabel:
|
|
504
|
-
openInNewTabLabel:
|
|
498
|
+
imageLabel: ee,
|
|
499
|
+
openInNewTabLabel: v
|
|
505
500
|
},
|
|
506
501
|
isSelected: e.id === d
|
|
507
502
|
})
|
|
508
503
|
}, `${e.id}-${t}`))
|
|
509
504
|
})]
|
|
510
505
|
});
|
|
511
|
-
},
|
|
506
|
+
}, $e = {
|
|
512
507
|
overlay: "_overlay_mzpdp_1",
|
|
513
508
|
icon: "_icon_mzpdp_5",
|
|
514
509
|
deniedIcon: "_deniedIcon_mzpdp_9"
|
|
515
|
-
},
|
|
516
|
-
let { title:
|
|
510
|
+
}, et = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
|
|
511
|
+
let { title: i, subtitle: o } = n ?? {}, { colors: c, typography: l } = r ?? {}, u = i ?? (t ? "Attach files" : "No attachments allowed"), d = o ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), f = /* @__PURE__ */ q(fe, {
|
|
517
512
|
visuallyHidden: !0,
|
|
518
513
|
as: pe.Span,
|
|
519
514
|
children: e ? `${u}. ${d}` : ""
|
|
520
515
|
});
|
|
521
516
|
if (!e) return f;
|
|
522
|
-
let p =
|
|
517
|
+
let p = a({
|
|
523
518
|
"--ai-fd-bg": c?.background,
|
|
524
519
|
"--ai-fd-icon": c?.icon,
|
|
525
520
|
"--ai-fd-denied-icon": c?.deniedIcon
|
|
526
|
-
}), m = t ?
|
|
521
|
+
}), m = t ? $e.icon : $e.deniedIcon, h = (e) => {
|
|
527
522
|
e.preventDefault();
|
|
528
|
-
}, g = t ?
|
|
529
|
-
return /* @__PURE__ */
|
|
530
|
-
className:
|
|
523
|
+
}, g = t ? b : re;
|
|
524
|
+
return /* @__PURE__ */ J(ye, { children: [f, /* @__PURE__ */ q("div", {
|
|
525
|
+
className: s("fixed inset-0 z-9999 flex items-center justify-center backdrop-blur-sm", $e.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
|
|
531
526
|
onDragOver: t ? void 0 : h,
|
|
532
527
|
onDrop: t ? void 0 : h,
|
|
533
528
|
style: p,
|
|
534
|
-
children: /* @__PURE__ */
|
|
529
|
+
children: /* @__PURE__ */ J("div", {
|
|
535
530
|
"aria-hidden": !0,
|
|
536
531
|
className: "flex flex-col items-center text-center",
|
|
537
532
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ q(g, {
|
|
539
534
|
size: 100,
|
|
540
535
|
stroke: 1,
|
|
541
536
|
className: m,
|
|
542
537
|
"aria-hidden": !0
|
|
543
538
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
className:
|
|
539
|
+
/* @__PURE__ */ q("span", {
|
|
540
|
+
className: s("mt-5", l?.titleClassName ?? "dial-h3-text"),
|
|
546
541
|
children: u
|
|
547
542
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
className:
|
|
543
|
+
/* @__PURE__ */ q("span", {
|
|
544
|
+
className: s("mt-4", l?.subtitleClassName ?? "dial-small-text"),
|
|
550
545
|
children: d
|
|
551
546
|
})
|
|
552
547
|
]
|
|
553
548
|
})
|
|
554
549
|
})] });
|
|
555
|
-
}, $ = (e) => String(e).padStart(2, "0"),
|
|
550
|
+
}, $ = (e) => String(e).padStart(2, "0"), tt = (e) => `${e.getFullYear()}-${$(e.getMonth() + 1)}-${$(e.getDate())} ${$(e.getHours())}-${$(e.getMinutes())}-${$(e.getSeconds())}`, nt = (e, t, n) => {
|
|
556
551
|
let r = e.lastIndexOf("."), i = r > 0, a = i ? e.slice(0, r) : e, o = i ? e.slice(r) : "", s = n === 0 ? "" : ` (${n + 1})`;
|
|
557
|
-
return `${a} ${
|
|
558
|
-
},
|
|
559
|
-
let { screenshotName: a = "Screenshot.png", pastedTextName: o = "Pasted text" } =
|
|
560
|
-
return { handlePaste:
|
|
561
|
-
if (!
|
|
562
|
-
let s = Array.from(
|
|
552
|
+
return `${a} ${tt(t)}${s}${o}`;
|
|
553
|
+
}, rt = (e, n, r = {}) => {
|
|
554
|
+
let { screenshotName: a = "Screenshot.png", pastedTextName: o = "Pasted text" } = r;
|
|
555
|
+
return { handlePaste: u((r) => {
|
|
556
|
+
if (!r.clipboardData) return;
|
|
557
|
+
let s = Array.from(r.clipboardData.items).filter((e) => e.kind === "file" && e.type.startsWith("image/")), c = r.clipboardData.getData("text/plain").length > 0;
|
|
563
558
|
if (s.length > 0 && !c) {
|
|
564
559
|
let n = [], o = /* @__PURE__ */ new Date();
|
|
565
560
|
for (let e of s) {
|
|
566
|
-
let
|
|
567
|
-
if (!
|
|
568
|
-
let s =
|
|
569
|
-
id:
|
|
561
|
+
let r = e.getAsFile();
|
|
562
|
+
if (!r) continue;
|
|
563
|
+
let s = nt(a, o, n.length), c = new File([r], s, { type: r.type }), l = {
|
|
564
|
+
id: Y(),
|
|
570
565
|
name: s,
|
|
571
|
-
contentType:
|
|
566
|
+
contentType: r.type,
|
|
572
567
|
file: c,
|
|
573
568
|
type: t.Image,
|
|
574
|
-
status:
|
|
569
|
+
status: i.Idle,
|
|
575
570
|
previewUrl: URL.createObjectURL(c)
|
|
576
571
|
};
|
|
577
572
|
n.push(l);
|
|
578
573
|
}
|
|
579
|
-
|
|
574
|
+
r.preventDefault(), e(n);
|
|
580
575
|
return;
|
|
581
576
|
}
|
|
582
|
-
let l =
|
|
577
|
+
let l = r.clipboardData.getData("text/plain");
|
|
583
578
|
if (l.length > n) {
|
|
584
|
-
let n = `${o} ${
|
|
585
|
-
id:
|
|
579
|
+
let n = `${o} ${tt(/* @__PURE__ */ new Date())}.txt`, a = new File([l], n, { type: "text/plain" }), s = {
|
|
580
|
+
id: Y(),
|
|
586
581
|
name: n,
|
|
587
582
|
contentType: "text/plain",
|
|
588
583
|
file: a,
|
|
589
584
|
type: t.Pasted,
|
|
590
|
-
status:
|
|
585
|
+
status: i.Idle
|
|
591
586
|
};
|
|
592
|
-
|
|
587
|
+
r.preventDefault(), e([s]);
|
|
593
588
|
}
|
|
594
589
|
}, [
|
|
595
590
|
e,
|
|
@@ -597,6 +592,6 @@ var J = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) =
|
|
|
597
592
|
a,
|
|
598
593
|
o
|
|
599
594
|
]) };
|
|
600
|
-
},
|
|
595
|
+
}, it = 100;
|
|
601
596
|
//#endregion
|
|
602
|
-
export {
|
|
597
|
+
export { Fe as ATTACHMENT_COLLAPSE_THRESHOLD, Z as ATTACHMENT_INPUT_CLASS, Je as AttachmentCard, Qe as AttachmentGroup, Ye as AttachmentTray, et as FileDndOverlay, Ge as LazyImageLoadStatus, it as MAX_UPLOADS_PER_MINUTE, Y as generateAttachmentId, X as getAttachmentCardState, ke as getAttachmentIcon, je as getExtFromContentType, be as getNameWithoutExtension, we as isMimeTypeAllowed, Ce as mimeTypesToExtensionLabels, rt as useClipboardPaste, Ke 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.
|
|
4
|
+
"version": "1.4.0-dev.5",
|
|
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.
|
|
23
|
+
"@epam/ai-dial-chat-shared": "1.4.0-dev.5",
|
|
24
24
|
"react": "^19.2.8",
|
|
25
25
|
"@epam/ai-dial-ui-kit": "^0.16.0"
|
|
26
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;
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/utils/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AASnE,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;AAcF,uHAAuH;AACvH,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,EAAE,EACf,iBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAwB,KAC5D,MAoBF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,EAChB,cAAc,MAAM,EAAE,KACrB,OAsBF,CAAC;AAkDF,uJAAuJ;AACvJ,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,MAAM,KAAG,IAY1D,CAAC;AAUF,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,KAClB,MAAM,GAAG,SAUX,CAAC;AAEF,8JAA8J;AAC9J,eAAO,MAAM,sBAAsB,GACjC,YAAY,iBAAiB,KAC5B,MAAM,GAAG,SAcX,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,gBAAgB,GAAI,YAAY,iBAAiB,KAAG,OAEtB,CAAC;AAkB5C,qHAAqH;AACrH,eAAO,MAAM,sBAAsB,GACjC,YAAY,iBAAiB,EAC7B,aAAY,oBAAyB,KACpC,mBAiBF,CAAC"}
|