@epam/ai-dial-attachment-input 1.3.0-dev.35 → 1.3.0-dev.354

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;AAKxE,8GAA8G;AAC9G,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwElD,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"}
@@ -14,6 +14,8 @@ interface ActionProps {
14
14
  onClick: (id: string) => void;
15
15
  /** ID of the attachment the action applies to. */
16
16
  id?: string;
17
+ /** Whether the button stays visible without hover or keyboard focus on the tile. */
18
+ isAlwaysVisible?: boolean;
17
19
  }
18
20
  /** Retry button for failed uploads. */
19
21
  export declare const ReloadAction: FC<Omit<ActionProps, 'icon'>>;
@@ -21,7 +23,7 @@ export declare const ReloadAction: FC<Omit<ActionProps, 'icon'>>;
21
23
  export declare const DownloadAction: FC<Omit<ActionProps, 'icon'>>;
22
24
  /** Open-in-new-tab button for link attachments. */
23
25
  export declare const OpenLinkAction: FC<Omit<ActionProps, 'icon'>>;
24
- /** Remove button for attachments. */
26
+ /** Remove button for attachments; always visible below the desktop breakpoint, where there is no hover to reveal it. */
25
27
  export declare const RemoveAction: FC<Omit<ActionProps, 'icon'>>;
26
28
  export {};
27
29
  //# sourceMappingURL=Actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Actions.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAI5D,UAAU,WAAW;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAgCD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CActD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAatD,CAAC"}
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Actions.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAI5D,UAAU,WAAW;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oFAAoF;IACpF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAmCD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CActD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,wHAAwH;AACxH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAiBtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAoB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAyQlD,CAAC"}
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAeA,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,CA4QlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EACL,aAAa,EACb,KAAK,EAAE,EAIR,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAKzC,UAAU,oBAAoB;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA6IpD,CAAC"}
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,2BAA2B,CAAC;AASnC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAUxD,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAKzC,UAAU,oBAAoB;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2JpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentGroup/AttachmentGroup.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAO1E,kIAAkI;AAClI,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2IpD,CAAC"}
1
+ {"version":3,"file":"AttachmentGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentGroup/AttachmentGroup.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAO1E,kIAAkI;AAClI,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsJpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileDndOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FileDndOverlay/FileDndOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAa,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,uGAAuG;AACvG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4ElD,CAAC"}
1
+ {"version":3,"file":"FileDndOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FileDndOverlay/FileDndOverlay.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAa,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,uGAAuG;AACvG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAuFlD,CAAC"}
@@ -1,5 +1,7 @@
1
1
  /** Total attachment count at/above which the tile list switches from a wrapping flex row to a fixed 5-column grid. */
2
2
  export declare const ATTACHMENT_COLLAPSE_THRESHOLD = 5;
3
- /** Base Tailwind classes shared by every square attachment tile (84 × 84 px). */
4
- export declare const ATTACHMENT_TILE_BASE_CLASS = "flex size-[84px] items-center justify-center rounded-xl border";
3
+ /** Base Tailwind classes shared by every square attachment tile (100 × 100 px). */
4
+ export declare const ATTACHMENT_TILE_BASE_CLASS = "flex size-[100px] items-center justify-center rounded-xl border";
5
+ /** Tailwind classes drawing the 1px tile focus ring, 1px clear of the border, on keyboard focus of the tile itself. */
6
+ export declare const ATTACHMENT_TILE_FOCUS_RING_CLASS = "outline-offset-1 focus-visible:outline-1";
5
7
  //# sourceMappingURL=attachment-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-group.d.ts","sourceRoot":"","sources":["../../src/constants/attachment-group.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,mEAC2B,CAAC"}
1
+ {"version":3,"file":"attachment-group.d.ts","sourceRoot":"","sources":["../../src/constants/attachment-group.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,mFAAmF;AACnF,eAAO,MAAM,0BAA0B,oEAC4B,CAAC;AAMpE,uHAAuH;AACvH,eAAO,MAAM,gCAAgC,6CACD,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,3 @@
1
- ._tile_1tdbq_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_1tdbq_12._hovered_1tdbq_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_1tdbq_12:focus-visible{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus,#161b2d))}._selected_1tdbq_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_1tdbq_33{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_1tdbq_38{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_1tdbq_42{color:var(--ai-tile-type-text,var(--text-secondary,#57647a))}._retryIcon_1tdbq_46{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_1tdbq_50{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._actionButton_1tdbq_56{background:var(--ai-tile-hover-icon-bg,var(--bg-control-neutral-hover-muted,#e0e6f0))}._imageActionButton_1tdbq_60{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
- /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.end-1{inset-inline-end:.25rem}.start-\[-1px\]{inset-inline-start:-1px}.top-1{top:.25rem}.top-\[-1px\]{top:-1px}.z-10{z-index:10}.z-\[9999\]{z-index:9999}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.line-clamp-2{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.size-\[84px\]{height:84px;width:84px}.size-full{width:100%}.h-full,.size-full{height:100%}.w-full{width:100%}.min-w-0{min-width:0}.max-w-\[420px\]{max-width:420px}.max-w-\[492px\]{max-width:492px}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(5\2c 83px\)\]{grid-template-columns:repeat(5,83px)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:4px}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1\.5{padding:.375rem}.pe-11{padding-inline-end:2.75rem}.pe-5{padding-inline-end:1.25rem}.text-center{text-align:center}.opacity-0{opacity:0}.opacity-100{opacity:1}.outline{outline-style:solid;outline-width:1px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);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-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.focus-within\:outline:focus-within{outline-style:solid;outline-width:1px}.focus-within\:outline-1:focus-within{outline-width:1px}.focus-within\:outline-offset-1:focus-within{outline-offset:1px}.focus-visible\:opacity-100:focus-visible{opacity:1}.group\/attachment-tile:focus-within .group-focus-within\/attachment-tile\:opacity-100{opacity:1}.group\/attachment-tile:hover .group-hover\/attachment-tile\:opacity-100{opacity: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
+ /*$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}
package/index.js CHANGED
@@ -1,32 +1,32 @@
1
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
2
  import { useCallback as c, useEffect as l, useId as u, useMemo as d, useRef as f, useState as p } from "react";
3
- import { IconClipboard as m, IconDownload as h, IconExternalLink as g, IconFile as _, IconFileDescription as v, IconFileTypeBmp as y, IconFileTypeCss as b, IconFileTypeCsv as x, IconFileTypeDoc as S, IconFileTypeDocx as C, IconFileTypeHtml as w, IconFileTypeJpg as T, IconFileTypeJs as E, IconFileTypeJsx as D, IconFileTypePdf as O, IconFileTypePhp as k, IconFileTypePng as A, IconFileTypePpt as j, IconFileTypeRs as M, IconFileTypeSql as N, IconFileTypeSvg as P, IconFileTypeTs as F, IconFileTypeTsx as I, IconFileTypeTxt as L, IconFileTypeVue as R, IconFileTypeXls as z, IconFileTypeXml as B, IconFileTypeZip as V, IconFileX as ee, IconMusic as te, IconPaperclip as ne, IconPhoto as H, IconReload as re, IconTerminal2 as ie, IconVideo as ae, IconX as U } from "@tabler/icons-react";
4
- import { DIAL_ICON_SIZE as W, DIAL_KIT_ICON_STROKE as G, ElementSize as oe, GhostIconButton as se, Highlight as ce, Skeleton as le, SkeletonVariant as ue, Spinner as de, StaticIconButton as fe } from "@epam/ai-dial-ui-kit";
5
- import { Fragment as pe, jsx as K, jsxs as q } from "react/jsx-runtime";
3
+ import { IconClipboard as m, IconDownload as h, IconExternalLink as g, IconFile as _, IconFileDescription as v, IconFileTypeBmp as y, IconFileTypeCss as b, IconFileTypeCsv as x, IconFileTypeDoc as S, IconFileTypeDocx as C, IconFileTypeHtml as w, IconFileTypeJpg as T, IconFileTypeJs as E, IconFileTypeJsx as D, IconFileTypePdf as O, IconFileTypePhp as k, IconFileTypePng as A, IconFileTypePpt as j, IconFileTypeRs as M, IconFileTypeSql as N, IconFileTypeSvg as P, IconFileTypeTs as F, IconFileTypeTsx as I, IconFileTypeTxt as L, IconFileTypeVue as R, IconFileTypeXls as z, IconFileTypeXml as ee, IconFileTypeZip as te, IconFileX as ne, IconMusic as re, IconPaperclip as B, IconPhoto as V, IconReload as ie, IconTerminal2 as ae, IconVideo as oe, IconX as H } from "@tabler/icons-react";
4
+ import { DIAL_ICON_SIZE as U, DIAL_KIT_ICON_STROKE as W, 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 } from "@epam/ai-dial-ui-kit";
5
+ import { Fragment as ve, jsx as G, jsxs as K } from "react/jsx-runtime";
6
6
  //#region src/utils/attachment.ts
7
- var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e) => {
7
+ var ye = () => `${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;
11
- }, ge = {
11
+ }, xe = {
12
12
  image: "Image files",
13
13
  audio: "Audio files",
14
14
  video: "Video files",
15
15
  text: "Text files",
16
16
  "*": "All files"
17
- }, _e = { "image/jpeg": "JPEG" }, ve = (e, t = ge) => e.map((e) => {
17
+ }, Se = { "image/jpeg": "JPEG" }, Ce = (e, t = xe) => e.map((e) => {
18
18
  let r = a(e);
19
19
  if (r.endsWith("/*")) {
20
20
  let e = r.slice(0, -2);
21
21
  return t[e] ?? `${e} files`;
22
22
  }
23
- let i = s(r), o = _e[i];
23
+ let i = s(r), o = Se[i];
24
24
  if (o) return o;
25
25
  let c = n[i];
26
26
  if (c) return c.toUpperCase();
27
27
  let l = i.split("/")[1];
28
28
  return l == null ? e.toUpperCase() : l.toUpperCase();
29
- }).join(", "), ye = (e, t) => {
29
+ }).join(", "), we = (e, t) => {
30
30
  if (t.length === 0) return !1;
31
31
  let n = a(e), r = s(n);
32
32
  return t.some((e) => {
@@ -38,7 +38,7 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
38
38
  }
39
39
  return r === s(t);
40
40
  });
41
- }, be = (e) => {
41
+ }, Te = (e) => {
42
42
  if (!e) return _;
43
43
  let t = s(e);
44
44
  if (t.startsWith("image/")) switch (t) {
@@ -46,10 +46,10 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
46
46
  case "image/png": return A;
47
47
  case "image/svg+xml": return P;
48
48
  case "image/bmp": return y;
49
- default: return H;
49
+ default: return V;
50
50
  }
51
- if (t.startsWith("video/")) return ae;
52
- if (t.startsWith("audio/")) return te;
51
+ if (t.startsWith("video/")) return oe;
52
+ if (t.startsWith("audio/")) return re;
53
53
  switch (t) {
54
54
  case "application/pdf": return O;
55
55
  case "application/msword": return S;
@@ -62,12 +62,12 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
62
62
  case "application/vnd.rar":
63
63
  case "application/x-7z-compressed":
64
64
  case "application/gzip":
65
- case "application/x-tar": return V;
65
+ case "application/x-tar": return te;
66
66
  case "text/csv": return x;
67
67
  case "text/plain": return L;
68
68
  case "text/html":
69
69
  case "application/xhtml+xml": return w;
70
- case "application/xml": return B;
70
+ case "application/xml": return ee;
71
71
  case "application/sql": return N;
72
72
  case "text/javascript": return E;
73
73
  case "text/jsx": return D;
@@ -79,37 +79,41 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
79
79
  case "text/x-vue": return R;
80
80
  default: return _;
81
81
  }
82
- }, xe = (e) => {
82
+ }, Ee = (e) => {
83
83
  let { type: n, contentType: r } = e;
84
- return n === t.Prompt ? ie : n === t.Pasted ? m : n === t.Image ? H : be(r ?? "");
85
- }, Se = (e) => {
84
+ return n === t.Prompt ? ae : n === t.Pasted ? m : n === t.Image ? V : Te(r ?? "");
85
+ }, De = (e) => {
86
86
  let t = s(e), r = n[t];
87
87
  if (r) return r;
88
88
  let i = t.split("/")[1];
89
89
  if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
90
- }, Ce = (e, n) => {
91
- let { type: r, name: i, contentType: a } = e;
90
+ }, Oe = (e) => {
91
+ let { name: t, contentType: n } = e;
92
+ if (n) {
93
+ let e = De(n);
94
+ if (e) return e;
95
+ }
96
+ if (t == null) return;
97
+ let r = t.lastIndexOf(".");
98
+ if (r > 0 && r < t.length - 1) return t.slice(r + 1).toLowerCase();
99
+ }, ke = (e) => e.type !== t.Prompt && e.type !== t.Pasted, Ae = (e, n) => {
100
+ let { type: r, name: i } = e;
92
101
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
93
102
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
94
103
  if (r === t.Image) return n.imageLabel ?? "Image";
95
- if (a) {
96
- let e = Se(a);
97
- if (e) return `.${e}`;
98
- }
99
- if (i == null) return "";
100
- let o = i.lastIndexOf(".");
101
- return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
102
- }, J = (e, n = {}) => {
104
+ let a = Oe(e);
105
+ return a ? `.${a}` : i ?? "";
106
+ }, q = (e, n = {}) => {
103
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;
104
108
  return {
105
109
  isLoading: c,
106
110
  isError: l,
107
111
  isImage: u,
108
112
  isLink: d,
109
- BottomIcon: d ? null : xe(e),
110
- typeLabel: d ? null : Ce(e, n)
113
+ BottomIcon: d ? null : Ee(e),
114
+ typeLabel: d ? null : Ae(e, n)
111
115
  };
112
- }, we = 5, Te = "flex size-[84px] items-center justify-center rounded-xl border", Y = {
116
+ }, je = 5, Me = "flex size-[100px] items-center justify-center rounded-xl border", Ne = "outline-offset-1 focus-visible:outline-1", J = {
113
117
  tray: "dial-ai-attachment-tray",
114
118
  trayItem: "dial-ai-attachment-tray-item",
115
119
  tile: "dial-ai-attachment-tile",
@@ -117,153 +121,167 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
117
121
  tileName: "dial-ai-attachment-tile-name",
118
122
  tileType: "dial-ai-attachment-tile-type",
119
123
  tileAction: "dial-ai-attachment-tile-action"
120
- }, X = {
121
- tile: "_tile_1tdbq_12",
122
- hovered: "_hovered_1tdbq_18",
123
- selected: "_selected_1tdbq_28",
124
- tileError: "_tileError_1tdbq_33",
125
- nameText: "_nameText_1tdbq_38",
126
- typeText: "_typeText_1tdbq_42",
127
- retryIcon: "_retryIcon_1tdbq_46",
128
- track: "_track_1tdbq_50",
129
- actionButton: "_actionButton_1tdbq_56",
130
- imageActionButton: "_imageActionButton_1tdbq_60"
131
- }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s }) => /* @__PURE__ */ K(fe, {
124
+ }, Y = {
125
+ tile: "_tile_hb2mo_12",
126
+ hovered: "_hovered_hb2mo_18",
127
+ selected: "_selected_hb2mo_28",
128
+ tileError: "_tileError_hb2mo_33",
129
+ nameText: "_nameText_hb2mo_38",
130
+ typeText: "_typeText_hb2mo_42",
131
+ placeholderIcon: "_placeholderIcon_hb2mo_46",
132
+ retryIcon: "_retryIcon_hb2mo_50",
133
+ track: "_track_hb2mo_54",
134
+ actionButton: "_actionButton_hb2mo_65",
135
+ loading: "_loading_hb2mo_86",
136
+ imageActionButton: "_imageActionButton_hb2mo_87",
137
+ tileAction: "_tileAction_hb2mo_99",
138
+ proxyFocus: "_proxyFocus_hb2mo_108"
139
+ }, X = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s, isAlwaysVisible: c }) => /* @__PURE__ */ G(_e, {
132
140
  icon: a,
133
- size: oe.Small,
134
- className: o("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", X.actionButton, s, Y.tileAction),
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", Y.actionButton, s, J.tileAction),
135
143
  "aria-label": e,
136
144
  "aria-describedby": t ? n : void 0,
137
145
  onClick: (e) => {
138
146
  e.stopPropagation(), r(i);
139
147
  }
140
- }), Ee = ({ ...e }) => /* @__PURE__ */ K(Z, {
141
- icon: /* @__PURE__ */ K(re, {
142
- size: W.SM,
148
+ }), Pe = ({ ...e }) => /* @__PURE__ */ G(X, {
149
+ icon: /* @__PURE__ */ G(ie, {
150
+ size: U.SM,
143
151
  "aria-hidden": !0,
144
- stroke: G
152
+ stroke: W
145
153
  }),
146
- className: X.retryIcon,
154
+ className: Y.retryIcon,
147
155
  ...e
148
- }), De = ({ ...e }) => /* @__PURE__ */ K(Z, {
149
- icon: /* @__PURE__ */ K(h, {
150
- size: W.SM,
156
+ }), Fe = ({ ...e }) => /* @__PURE__ */ G(X, {
157
+ icon: /* @__PURE__ */ G(h, {
158
+ size: U.SM,
151
159
  "aria-hidden": !0,
152
- stroke: G
160
+ stroke: W
153
161
  }),
154
162
  ...e
155
- }), Oe = ({ ...e }) => /* @__PURE__ */ K(Z, {
156
- icon: /* @__PURE__ */ K(g, {
157
- size: W.SM,
163
+ }), Ie = ({ ...e }) => /* @__PURE__ */ G(X, {
164
+ icon: /* @__PURE__ */ G(g, {
165
+ size: U.SM,
158
166
  "aria-hidden": !0,
159
- stroke: G
167
+ stroke: W
160
168
  }),
161
169
  ...e
162
- }), ke = ({ ...e }) => /* @__PURE__ */ K(Z, {
163
- icon: /* @__PURE__ */ K(U, {
164
- size: W.SM,
170
+ }), Le = ({ className: e, ...t }) => /* @__PURE__ */ G(X, {
171
+ icon: /* @__PURE__ */ G(H, {
172
+ size: U.SM,
165
173
  "aria-hidden": !0,
166
- stroke: G
174
+ stroke: W
167
175
  }),
168
- ...e
169
- }), Ae = {
176
+ className: o("mobile:opacity-100", e),
177
+ ...t
178
+ }), Re = {
170
179
  [e.Network]: "Upload failed · network error",
171
180
  [e.UnsupportedType]: "Upload failed · unsupported file type",
172
181
  [e.FileTooLarge]: "Upload failed · file too large"
173
- }, je = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: a, labels: s, styles: l, onDownload: f, isLink: p, cssVars: m, onExpand: h, isExpandable: g, onRemove: _, isSelected: v }) => {
174
- let { clickLabel: y = "Download attachment", expandLabel: b = "Expand pasted text", downloadLabel: x = "Download attachment", retryLabel: S = "Retry upload", removeLabel: C = "Remove attachment", openInNewTabLabel: w = "Open in new tab", sizeLabel: T, uploadingLabel: E = "Uploading", errorReasonLabels: D, genericErrorLabel: O = "Upload failed" } = s ?? {}, { typography: k, className: A } = l ?? {}, { id: j, name: M, status: N, errorReason: P } = t, F = N === r.Loading, I = N === r.Error, L = u(), R = I ? P && (D?.[P] ?? Ae[P]) || O : "", { BottomIcon: z, typeLabel: B } = J(t), V = !I && !F && f && !p, ee = I && !!a && P !== e.UnsupportedType && P !== e.FileTooLarge, te = Number(!!V) + Number(!!ee) + Number(!!p) + Number(!!_), ne = te > 1 ? "pe-11" : te === 1 ? "pe-5" : void 0, H = !!g && h !== void 0, re = H || i !== void 0, ie = () => {
175
- H ? h(j) : i?.(j);
176
- }, ae = (e) => {
177
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ie());
178
- }, U = d(() => he(M), [M]), W = c(() => {
182
+ }, ze = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: a, labels: s, styles: l, onDownload: f, isLink: p, cssVars: m, onExpand: h, isExpandable: g, onRemove: _, isSelected: v }) => {
183
+ let { clickLabel: y = "Download attachment", expandLabel: b = "Expand pasted text", downloadLabel: x = "Download attachment", retryLabel: S = "Retry upload", removeLabel: C = "Remove attachment", openInNewTabLabel: w = "Open in new tab", sizeLabel: T, uploadingLabel: E = "Uploading", errorReasonLabels: D, genericErrorLabel: O = "Upload failed" } = s ?? {}, { typography: k, className: A } = l ?? {}, { id: j, name: M, status: N, errorReason: P } = t, F = N === r.Loading, I = N === r.Error, L = u(), R = I ? P && (D?.[P] ?? Re[P]) || O : "", { BottomIcon: z, typeLabel: ee } = q(t), te = ke(t), ne = !I && !F && f && !p, re = I && !!a && P !== e.UnsupportedType && P !== e.FileTooLarge, B = !!g && h !== void 0, V = B || i !== void 0, ie = Number(!!ne) + Number(!!re) + Number(!!p) + Number(!!_), ae = !V && ie === 1, oe = () => {
184
+ B ? h(j) : i?.(j);
185
+ }, H = d(() => be(M), [M]), ce = c(() => {
179
186
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
180
- }, [t]), G = o(Te, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, !I && X.hovered, v && X.selected, I && X.tileError, Y.tile, v && Y.tileSelected), oe = /* @__PURE__ */ K("div", {
181
- title: U,
182
- className: o(k?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", X.nameText, !I && ne, Y.tileName),
183
- children: n ? /* @__PURE__ */ K(ce, {
184
- text: U,
187
+ }, [t]), ue = o(Me, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", Y.tile, V && !I && !F && Y.hovered, F && Y.loading, v && Y.selected, I && Y.tileError, ae && Y.proxyFocus, J.tile, v && J.tileSelected), me = /* @__PURE__ */ G("div", {
188
+ title: H,
189
+ className: o(k?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 wrap-break-word", Y.nameText, J.tileName),
190
+ children: n ? /* @__PURE__ */ G(de, {
191
+ text: H,
185
192
  query: n,
186
193
  maxLines: 2
187
- }) : U
188
- }), se = z && /* @__PURE__ */ q("div", {
189
- className: o("flex w-full items-center gap-1", I && ne, Y.tileType),
190
- children: [/* @__PURE__ */ K(z, {
191
- size: 16,
192
- className: X.typeText,
194
+ }) : H
195
+ }), he = z && /* @__PURE__ */ K("div", {
196
+ className: o("flex w-full items-end gap-1", J.tileType),
197
+ children: [te ? /* @__PURE__ */ G(le, {
198
+ type: se.File,
199
+ name: M ?? "",
200
+ fileExtension: Oe(t),
201
+ size: U.MD,
202
+ decorative: !0
203
+ }) : /* @__PURE__ */ G(z, {
204
+ size: U.MD,
205
+ className: Y.typeText,
206
+ stroke: W,
193
207
  "aria-hidden": !0
194
- }), /* @__PURE__ */ K("span", {
195
- className: o(k?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", X.typeText),
196
- children: T ? `${B} · ${T}` : B
208
+ }), /* @__PURE__ */ G("span", {
209
+ className: o(k?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Y.typeText),
210
+ children: T ? `${ee} · ${T}` : ee
197
211
  })]
198
- }), le = re ? {
199
- role: "button",
200
- tabIndex: 0,
201
- "aria-label": H ? b : y,
202
- onClick: ie,
203
- onKeyDown: ae
204
- } : {}, ue = /* @__PURE__ */ q(pe, { children: [
205
- oe,
206
- se,
207
- F && /* @__PURE__ */ K("div", {
212
+ }), _e = /* @__PURE__ */ K(ve, { children: [
213
+ me,
214
+ he,
215
+ V && /* @__PURE__ */ G("button", {
216
+ type: "button",
217
+ "aria-label": B ? b : y,
218
+ "aria-pressed": !B && i !== void 0 ? v : void 0,
219
+ onClick: oe,
220
+ className: o("absolute inset-0 cursor-pointer rounded-[11px]", Y.tileAction)
221
+ }),
222
+ F && /* @__PURE__ */ G("div", {
208
223
  role: "progressbar",
209
224
  "aria-label": E,
210
- className: o("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", X.track),
211
- children: /* @__PURE__ */ K(de, { size: 32 })
225
+ className: o("absolute inset-0 flex items-center justify-center rounded-[11px]", Y.track),
226
+ children: /* @__PURE__ */ G("span", {
227
+ "aria-hidden": !0,
228
+ className: "flex",
229
+ children: /* @__PURE__ */ G(ge, { size: 32 })
230
+ })
212
231
  }),
213
- /* @__PURE__ */ q("div", {
214
- className: "absolute end-1 top-1 flex gap-1",
232
+ /* @__PURE__ */ K("div", {
233
+ className: "absolute inset-e-1 top-1 flex",
215
234
  children: [
216
- V && /* @__PURE__ */ K(De, {
235
+ ne && /* @__PURE__ */ G(Fe, {
217
236
  ariaLabel: x,
218
237
  errorTitle: R,
219
238
  errorDescId: L,
220
239
  onClick: f,
221
240
  id: j
222
241
  }),
223
- ee && /* @__PURE__ */ K(Ee, {
242
+ re && /* @__PURE__ */ G(Pe, {
224
243
  ariaLabel: S,
225
244
  errorTitle: R,
226
245
  errorDescId: L,
227
246
  onClick: a,
228
247
  id: j
229
248
  }),
230
- p && /* @__PURE__ */ K(Oe, {
249
+ p && /* @__PURE__ */ G(Ie, {
231
250
  ariaLabel: w,
232
251
  errorTitle: R,
233
252
  errorDescId: L,
234
- onClick: W
253
+ onClick: ce
235
254
  }),
236
- _ && /* @__PURE__ */ K(ke, {
255
+ _ && /* @__PURE__ */ G(Le, {
237
256
  ariaLabel: C,
238
257
  errorTitle: R,
239
258
  errorDescId: L,
240
259
  onClick: _,
241
- id: j
260
+ id: j,
261
+ isAlwaysVisible: F
242
262
  })
243
263
  ]
244
264
  }),
245
- I && /* @__PURE__ */ K("span", {
265
+ /* @__PURE__ */ G(fe, {
246
266
  id: L,
247
- role: "status",
248
- "aria-live": "polite",
249
- className: "sr-only",
250
- children: R
267
+ visuallyHidden: !0,
268
+ as: pe.Span,
269
+ children: I ? R : ""
251
270
  })
252
271
  ] });
253
- return /* @__PURE__ */ K("div", {
272
+ return /* @__PURE__ */ G("div", {
254
273
  style: m,
255
274
  className: o("inline-flex", A),
256
- children: /* @__PURE__ */ K("div", {
257
- ...le,
275
+ children: /* @__PURE__ */ G("div", {
258
276
  "aria-busy": F,
259
277
  style: m,
260
- className: o(G, re && "cursor-pointer", "focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
261
- children: ue
278
+ className: o(ue, V && "cursor-pointer", Ne),
279
+ children: _e
262
280
  })
263
281
  });
264
- }, Q = /* @__PURE__ */ function(e) {
282
+ }, Z = /* @__PURE__ */ function(e) {
265
283
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
266
- }({}), Me = ({ enabled: e, src: t }) => {
284
+ }({}), Be = ({ enabled: e, src: t }) => {
267
285
  let n = f(null), [r, i] = p("idle");
268
286
  return l(() => {
269
287
  i(e && t ? "loading" : "idle");
@@ -278,67 +296,77 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
278
296
  imageRef: n,
279
297
  imageLoadStatus: r
280
298
  };
281
- }, Ne = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: s, onDownload: c, styles: l, isSelected: u }) => {
282
- let { clickLabel: f = "Open attachment", expandLabel: p = "Expand pasted text", removeLabel: m = "Remove attachment", downloadLabel: h = "Download attachment" } = i ?? {}, { className: g } = l ?? {}, { id: _, name: v } = e, y = e.previewUrl ?? e.url, b = e.type === t.Pasted && n !== void 0, { isLoading: x, isError: S, isImage: C } = d(() => J(e), [e]), w = r !== void 0 && !b && !x && !S, T = b || w, { imageRef: E, imageLoadStatus: D } = Me({
283
- enabled: C,
284
- src: y
285
- }), O = () => {
286
- b && n ? n(_) : w && r && r(_);
287
- }, k = T ? {
288
- role: "button",
289
- tabIndex: 0,
290
- "aria-label": b ? p : f,
291
- onClick: O,
292
- onKeyDown: (e) => {
293
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
294
- }
295
- } : {};
296
- return /* @__PURE__ */ K("div", {
297
- className: o(Te, "group/attachment-tile", T && "cursor-pointer", X.tile, u && X.selected, g, Y.tile, u && Y.tileSelected),
298
- ...k,
299
+ }, Ve = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: s, onDownload: c, styles: l, isSelected: u }) => {
300
+ let { clickLabel: f = "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 } = d(() => q(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 } = Be({
301
+ enabled: w,
302
+ src: b
303
+ }), j = () => {
304
+ x && n ? n(v) : T && r && r(v);
305
+ }, M = o(Me, "group/attachment-tile", E && "cursor-pointer", Y.tile, u && Y.selected, S && Y.loading, O && Y.proxyFocus, Ne, _, J.tile, u && J.tileSelected);
306
+ return /* @__PURE__ */ G("div", {
307
+ className: M,
308
+ "aria-busy": S,
299
309
  style: s,
300
- children: /* @__PURE__ */ q("div", {
310
+ children: /* @__PURE__ */ K("div", {
301
311
  className: "relative h-full w-full overflow-hidden",
302
312
  children: [
303
- /* @__PURE__ */ q("div", {
304
- className: "absolute end-1 top-1 z-10 flex gap-1",
305
- children: [a && /* @__PURE__ */ K(ke, {
313
+ /* @__PURE__ */ K("div", {
314
+ className: "absolute inset-e-1 top-1 z-10 flex",
315
+ children: [a && /* @__PURE__ */ G(Le, {
306
316
  ariaLabel: m,
307
317
  onClick: a,
308
- id: _,
309
- className: X.imageActionButton
310
- }), c && /* @__PURE__ */ K(De, {
318
+ id: v,
319
+ className: Y.imageActionButton,
320
+ isAlwaysVisible: S
321
+ }), D && /* @__PURE__ */ G(Fe, {
311
322
  ariaLabel: h,
312
323
  onClick: c,
313
- id: _,
314
- className: X.imageActionButton
324
+ id: v,
325
+ className: Y.imageActionButton
315
326
  })]
316
327
  }),
317
- D !== Q.Loaded && /* @__PURE__ */ K(le, {
318
- variant: ue.Rectangular,
328
+ A !== Z.Loaded && /* @__PURE__ */ G(me, {
329
+ variant: he.Rectangular,
319
330
  width: "100%",
320
331
  height: "100%",
321
- active: D === Q.Loading,
322
- overlay: /* @__PURE__ */ K(H, {
323
- size: W.LG,
324
- className: X.typeText,
332
+ active: A === Z.Loading,
333
+ overlay: /* @__PURE__ */ G(V, {
334
+ size: U.LG,
335
+ className: Y.placeholderIcon,
325
336
  "aria-hidden": !0,
326
- stroke: G
337
+ stroke: W
327
338
  }),
328
339
  className: "absolute inset-0 rounded-xl"
329
340
  }),
330
- /* @__PURE__ */ K("img", {
331
- ref: E,
332
- src: y,
333
- alt: v,
341
+ /* @__PURE__ */ G("img", {
342
+ ref: k,
343
+ src: b,
344
+ alt: y,
334
345
  loading: "lazy",
335
346
  decoding: "async",
336
- className: o("h-full w-full rounded-xl object-cover transition-opacity duration-200", D === Q.Loaded ? "opacity-100" : "opacity-0")
347
+ className: o("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === Z.Loaded ? "opacity-100" : "opacity-0")
348
+ }),
349
+ E && /* @__PURE__ */ G("button", {
350
+ type: "button",
351
+ "aria-label": x ? p : f,
352
+ "aria-pressed": T ? u : void 0,
353
+ onClick: j,
354
+ className: o("absolute inset-0 cursor-pointer rounded-xl", Y.tileAction)
355
+ }),
356
+ S && /* @__PURE__ */ G("div", {
357
+ role: "progressbar",
358
+ "aria-label": g,
359
+ className: o("absolute inset-0 flex items-center justify-center rounded-xl", Y.track),
360
+ children: /* @__PURE__ */ G("span", {
361
+ "aria-hidden": !0,
362
+ className: "flex",
363
+ children: /* @__PURE__ */ G(ge, { size: 32 })
364
+ })
337
365
  })
338
366
  ]
339
367
  })
340
368
  });
341
- }, Pe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: l, styles: u, isSelected: f }) => {
369
+ }, Q = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: l, styles: u, isSelected: f }) => {
342
370
  let { colors: p } = u ?? {}, m = e.type === t.Pasted && o !== void 0, h = i({
343
371
  "--ai-tile-bg": p?.background,
344
372
  "--ai-tile-border": p?.border,
@@ -352,11 +380,12 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
352
380
  "--ai-tile-error-text": p?.errorText,
353
381
  "--ai-tile-name-text": p?.nameText,
354
382
  "--ai-tile-type-text": p?.typeText,
383
+ "--ai-tile-placeholder-icon": p?.placeholderIcon,
355
384
  "--ai-tile-hover-icon-bg": p?.hoverIconBackground,
356
385
  "--ai-tile-hover-icon-color": p?.hoverIconColor,
357
386
  "--ai-tile-progress-track": p?.trackBackground
358
- }), { isImage: g, isLink: _ } = d(() => J(e), [e]);
359
- return g ? /* @__PURE__ */ K(Ne, {
387
+ }), { isImage: g, isLink: _ } = d(() => q(e), [e]);
388
+ return g ? /* @__PURE__ */ G(Ve, {
360
389
  attachment: e,
361
390
  labels: l,
362
391
  onClick: s,
@@ -366,7 +395,7 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
366
395
  cssVars: h,
367
396
  onDownload: c,
368
397
  isSelected: f
369
- }) : /* @__PURE__ */ K(je, {
398
+ }) : /* @__PURE__ */ G(ze, {
370
399
  attachment: e,
371
400
  searchQuery: n,
372
401
  onClick: s,
@@ -381,16 +410,16 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
381
410
  isExpandable: m,
382
411
  isSelected: f
383
412
  });
384
- }, Fe = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: a, styles: s }) => {
413
+ }, He = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: a, styles: s }) => {
385
414
  let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d, expandLabel: f, uploadingLabel: p } = a ?? {}, { className: m, card: h } = s ?? {};
386
- return e.length === 0 ? null : /* @__PURE__ */ K("div", {
415
+ return e.length === 0 ? null : /* @__PURE__ */ G("div", {
387
416
  role: "list",
388
417
  "aria-label": c,
389
- className: o("flex w-full min-w-0 gap-2 overflow-x-auto", m, Y.tray),
390
- children: e.map((e) => /* @__PURE__ */ K("div", {
418
+ className: o("-m-0.5 box-border flex min-w-0 gap-2 overflow-x-auto p-0.5", m, J.tray),
419
+ children: e.map((e) => /* @__PURE__ */ G("div", {
391
420
  role: "listitem",
392
- className: Y.trayItem,
393
- children: /* @__PURE__ */ K(Pe, {
421
+ className: J.trayItem,
422
+ children: /* @__PURE__ */ G(Q, {
394
423
  attachment: e,
395
424
  onRemove: t,
396
425
  onRetry: n,
@@ -407,116 +436,118 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
407
436
  })
408
437
  }, e.id))
409
438
  });
410
- }, Ie = {
439
+ }, Ue = {
411
440
  headerIcon: "_headerIcon_1dmgi_1",
412
441
  headerLabel: "_headerLabel_1dmgi_2"
413
- }, Le = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Re = ({ attachments: e, onAttachmentClick: n, onDownloadAll: a, onRetry: s, labels: c, styles: l, selectedAttachmentId: u }) => {
414
- let { ariaLabel: d = "Attachments", clickLabel: f = "Download attachment", downloadLabel: p = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: g = "Download all", openInNewTabLabel: v, getHeaderLabel: y = (e) => Le(e, "attachment"), promptLabel: b, pastedLabel: x, imageLabel: S } = c ?? {}, { typography: C, colors: w, className: T } = l ?? {}, E = i({ "--ai-group-text": w?.text });
442
+ }, We = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ge = ({ attachments: e, onAttachmentClick: n, onDownloadAll: a, isAttachmentDownloadable: s, onRetry: c, labels: l, styles: u, selectedAttachmentId: d }) => {
443
+ let { ariaLabel: f = "Attachments", clickLabel: p = "Download attachment", downloadLabel: m = "Download attachment", retryLabel: g = "Retry upload", downloadAllLabel: v = "Download all", openInNewTabLabel: y, getHeaderLabel: b = (e) => We(e, "attachment"), promptLabel: x, pastedLabel: S, imageLabel: C } = l ?? {}, { typography: w, colors: T, className: E } = u ?? {}, D = i({ "--ai-group-text": T?.text });
415
444
  if (e.length === 0) return null;
416
- 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 = k ? ne : D ? H : _, M = y(e.length), N = () => {
417
- let t = e.filter((e) => e.status === r.Idle);
418
- a ? a(t) : t.forEach((e) => n?.(e.id));
419
- }, P = (t) => {
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 ? B : O ? V : _, N = b(e.length), P = (e) => s?.(e) !== !1, F = e.filter((e) => e.status === r.Idle && P(e)), I = () => {
446
+ a ? a(F) : F.forEach((e) => n?.(e.id));
447
+ }, L = (t) => {
420
448
  let n = e.find((e) => e.id === t);
421
449
  n && a?.([n]);
422
450
  };
423
- return /* @__PURE__ */ q("div", {
451
+ return /* @__PURE__ */ K("div", {
424
452
  role: "group",
425
- "aria-label": d,
426
- style: E,
427
- className: o("flex flex-col gap-1", A ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Ie.container, T),
428
- children: [/* @__PURE__ */ q("div", {
453
+ "aria-label": f,
454
+ style: D,
455
+ className: o("flex flex-col gap-2", j ? "w-full max-w-[532px] min-w-0" : "max-w-[424px]", Ue.container, E),
456
+ children: [/* @__PURE__ */ K("div", {
429
457
  className: "flex items-center justify-between",
430
- children: [/* @__PURE__ */ q("div", {
458
+ children: [/* @__PURE__ */ K("div", {
431
459
  className: "flex items-center gap-1",
432
- children: [/* @__PURE__ */ K(j, {
433
- size: W.SM,
434
- className: o("shrink-0", Ie.headerIcon),
460
+ children: [/* @__PURE__ */ G(M, {
461
+ size: U.SM,
462
+ className: o("shrink-0", Ue.headerIcon),
435
463
  "aria-hidden": !0
436
- }), /* @__PURE__ */ K("span", {
437
- className: o(C?.headerLabelClassName ?? "dial-tiny-semi-text", Ie.headerLabel),
438
- children: M
464
+ }), /* @__PURE__ */ G("span", {
465
+ className: o(w?.headerLabelClassName ?? "dial-tiny-semi-text", Ue.headerLabel),
466
+ children: N
439
467
  })]
440
- }), e.length >= 2 && (a || n) && /* @__PURE__ */ K(se, {
441
- icon: /* @__PURE__ */ K(h, {
442
- size: W.SM,
468
+ }), e.length >= 2 && F.length > 0 && (a || n) && /* @__PURE__ */ G(ue, {
469
+ icon: /* @__PURE__ */ G(h, {
470
+ size: U.SM,
443
471
  "aria-hidden": !0,
444
- stroke: G
472
+ stroke: W
445
473
  }),
446
- size: oe.Small,
447
- "aria-label": g,
448
- onClick: N
474
+ size: ce.Small,
475
+ "aria-label": v,
476
+ onClick: I
449
477
  })]
450
- }), /* @__PURE__ */ K("div", {
478
+ }), /* @__PURE__ */ G("div", {
451
479
  role: "list",
452
- "aria-label": M,
453
- className: o("gap-3", A ? "grid grid-cols-[repeat(5,83px)]" : "flex flex-wrap"),
454
- children: e.map((e, t) => /* @__PURE__ */ K("div", {
480
+ "aria-label": N,
481
+ className: o("gap-2", j ? "grid grid-cols-[repeat(5,100px)]" : "flex flex-wrap"),
482
+ children: e.map((e, t) => /* @__PURE__ */ G("div", {
455
483
  role: "listitem",
456
- children: /* @__PURE__ */ K(Pe, {
484
+ children: /* @__PURE__ */ G(Q, {
457
485
  attachment: e,
458
486
  onClick: n,
459
- onDownload: a ? P : void 0,
460
- onRetry: s,
487
+ onDownload: a && P(e) ? L : void 0,
488
+ onRetry: c,
461
489
  labels: {
462
- clickLabel: f,
463
- downloadLabel: p,
464
- retryLabel: m,
465
- promptLabel: b,
466
- pastedLabel: x,
467
- imageLabel: S,
468
- openInNewTabLabel: v
490
+ clickLabel: p,
491
+ downloadLabel: m,
492
+ retryLabel: g,
493
+ promptLabel: x,
494
+ pastedLabel: S,
495
+ imageLabel: C,
496
+ openInNewTabLabel: y
469
497
  },
470
- isSelected: e.id === u
498
+ isSelected: e.id === d
471
499
  })
472
500
  }, `${e.id}-${t}`))
473
501
  })]
474
502
  });
475
- }, ze = {
503
+ }, Ke = {
476
504
  overlay: "_overlay_mzpdp_1",
477
505
  icon: "_icon_mzpdp_5",
478
506
  deniedIcon: "_deniedIcon_mzpdp_9"
479
- }, Be = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
480
- let { title: a, subtitle: s } = n ?? {}, { colors: c, typography: l } = r ?? {};
481
- if (!e) return null;
482
- let u = i({
507
+ }, qe = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
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__ */ G(fe, {
509
+ visuallyHidden: !0,
510
+ as: pe.Span,
511
+ children: e ? `${u}. ${d}` : ""
512
+ });
513
+ if (!e) return f;
514
+ let p = i({
483
515
  "--ai-fd-bg": c?.background,
484
516
  "--ai-fd-icon": c?.icon,
485
517
  "--ai-fd-denied-icon": c?.deniedIcon
486
- }), d = a ?? (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 ? ze.icon : ze.deniedIcon, m = (e) => {
518
+ }), m = t ? Ke.icon : Ke.deniedIcon, h = (e) => {
487
519
  e.preventDefault();
488
- }, h = t ? v : ee;
489
- return /* @__PURE__ */ K("div", {
490
- role: "status",
491
- "aria-live": "polite",
492
- className: o("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", ze.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
493
- onDragOver: t ? void 0 : m,
494
- onDrop: t ? void 0 : m,
495
- style: u,
496
- children: /* @__PURE__ */ q("div", {
520
+ }, g = t ? v : ne;
521
+ return /* @__PURE__ */ K(ve, { children: [f, /* @__PURE__ */ G("div", {
522
+ className: o("fixed inset-0 z-9999 flex items-center justify-center backdrop-blur-sm", Ke.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
523
+ onDragOver: t ? void 0 : h,
524
+ onDrop: t ? void 0 : h,
525
+ style: p,
526
+ children: /* @__PURE__ */ K("div", {
527
+ "aria-hidden": !0,
497
528
  className: "flex flex-col items-center text-center",
498
529
  children: [
499
- /* @__PURE__ */ K(h, {
530
+ /* @__PURE__ */ G(g, {
500
531
  size: 100,
501
532
  stroke: 1,
502
- className: p,
533
+ className: m,
503
534
  "aria-hidden": !0
504
535
  }),
505
- /* @__PURE__ */ K("span", {
536
+ /* @__PURE__ */ G("span", {
506
537
  className: o("mt-5", l?.titleClassName ?? "dial-h3-text"),
507
- children: d
538
+ children: u
508
539
  }),
509
- /* @__PURE__ */ K("span", {
540
+ /* @__PURE__ */ G("span", {
510
541
  className: o("mt-4", l?.subtitleClassName ?? "dial-small-text"),
511
- children: f
542
+ children: d
512
543
  })
513
544
  ]
514
545
  })
515
- });
516
- }, $ = (e) => String(e).padStart(2, "0"), Ve = (e) => `${e.getFullYear()}-${$(e.getMonth() + 1)}-${$(e.getDate())} ${$(e.getHours())}-${$(e.getMinutes())}-${$(e.getSeconds())}`, He = (e, t, n) => {
546
+ })] });
547
+ }, $ = (e) => String(e).padStart(2, "0"), Je = (e) => `${e.getFullYear()}-${$(e.getMonth() + 1)}-${$(e.getDate())} ${$(e.getHours())}-${$(e.getMinutes())}-${$(e.getSeconds())}`, Ye = (e, t, n) => {
517
548
  let r = e.lastIndexOf("."), i = r > 0, a = i ? e.slice(0, r) : e, o = i ? e.slice(r) : "", s = n === 0 ? "" : ` (${n + 1})`;
518
- return `${a} ${Ve(t)}${s}${o}`;
519
- }, Ue = (e, n, i = {}) => {
549
+ return `${a} ${Je(t)}${s}${o}`;
550
+ }, Xe = (e, n, i = {}) => {
520
551
  let { screenshotName: a = "Screenshot.png", pastedTextName: o = "Pasted text" } = i;
521
552
  return { handlePaste: c((i) => {
522
553
  if (!i.clipboardData) return;
@@ -526,8 +557,8 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
526
557
  for (let e of s) {
527
558
  let i = e.getAsFile();
528
559
  if (!i) continue;
529
- let s = He(a, o, n.length), c = new File([i], s, { type: i.type }), l = {
530
- id: me(),
560
+ let s = Ye(a, o, n.length), c = new File([i], s, { type: i.type }), l = {
561
+ id: ye(),
531
562
  name: s,
532
563
  contentType: i.type,
533
564
  file: c,
@@ -542,8 +573,8 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
542
573
  }
543
574
  let l = i.clipboardData.getData("text/plain");
544
575
  if (l.length > n) {
545
- let n = `${o} ${Ve(/* @__PURE__ */ new Date())}.txt`, a = new File([l], n, { type: "text/plain" }), s = {
546
- id: me(),
576
+ let n = `${o} ${Je(/* @__PURE__ */ new Date())}.txt`, a = new File([l], n, { type: "text/plain" }), s = {
577
+ id: ye(),
547
578
  name: n,
548
579
  contentType: "text/plain",
549
580
  file: a,
@@ -558,6 +589,6 @@ var me = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, he = (e)
558
589
  a,
559
590
  o
560
591
  ]) };
561
- }, We = 100;
592
+ }, Ze = 100;
562
593
  //#endregion
563
- export { we as ATTACHMENT_COLLAPSE_THRESHOLD, Y as ATTACHMENT_INPUT_CLASS, Pe as AttachmentCard, Re as AttachmentGroup, Fe as AttachmentTray, Be as FileDndOverlay, Q as LazyImageLoadStatus, We as MAX_UPLOADS_PER_MINUTE, me as generateAttachmentId, J as getAttachmentCardState, be as getAttachmentIcon, Se as getExtFromContentType, he as getNameWithoutExtension, ye as isMimeTypeAllowed, ve as mimeTypesToExtensionLabels, Ue as useClipboardPaste, Me as useLazyImageLoad };
594
+ export { je as ATTACHMENT_COLLAPSE_THRESHOLD, J as ATTACHMENT_INPUT_CLASS, Q as AttachmentCard, Ge as AttachmentGroup, He as AttachmentTray, qe as FileDndOverlay, Z as LazyImageLoadStatus, Ze as MAX_UPLOADS_PER_MINUTE, ye as generateAttachmentId, q as getAttachmentCardState, Te as getAttachmentIcon, De as getExtFromContentType, be as getNameWithoutExtension, we as isMimeTypeAllowed, Ce as mimeTypesToExtensionLabels, Xe as useClipboardPaste, Be as useLazyImageLoad };
@@ -38,21 +38,23 @@ export interface AttachmentCardColors {
38
38
  backgroundSelected?: string;
39
39
  /** Tile border color in the selected state. */
40
40
  borderSelected?: string;
41
- /** Tile focus outline color. */
41
+ /** Tile focus ring color. Defaults to `--stroke-focus`. */
42
42
  focusOutline?: string;
43
43
  /** Tile background color in the error state. */
44
44
  backgroundError?: string;
45
45
  /** Tile border color in the error state. */
46
46
  borderError?: string;
47
- /** File name/type text color in the error state. */
47
+ /** Corner action icon color in the error state. Defaults to `--text-error`. */
48
48
  errorText?: string;
49
49
  /** File name text color. */
50
50
  nameText?: string;
51
51
  /** Type/meta text color. */
52
52
  typeText?: string;
53
- /** Hover download icon background color. */
53
+ /** Image placeholder icon color while the preview loads. Defaults to `--text-secondary`. */
54
+ placeholderIcon?: string;
55
+ /** Corner action button background, overriding the default of matching the tile's current background (not applied in the error state). */
54
56
  hoverIconBackground?: string;
55
- /** Hover download icon color. */
57
+ /** Corner action icon color on image tiles and during upload. Defaults to `--text-secondary`. */
56
58
  hoverIconColor?: string;
57
59
  /** Upload progress track background color. */
58
60
  trackBackground?: string;
@@ -61,7 +63,7 @@ export interface AttachmentCardColors {
61
63
  export interface AttachmentCardTypography {
62
64
  /** Utility class applied to the file name text. Defaults to `'dial-tiny-text'`. */
63
65
  fontClassName?: string;
64
- /** Utility class applied to the bottom meta label (file type / status). Defaults to `'dial-caption-text'`. */
66
+ /** Utility class applied to the bottom meta label (file type / status). Defaults to `'dial-tiny-text'`. */
65
67
  metaClassName?: string;
66
68
  }
67
69
  /** Combined style overrides (colors, typography, and shape) for the `AttachmentCard` component. */
@@ -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,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;IA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EAA0E;IAC1E,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,0LAA0L;IAC1L,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,wPAAwP;IACxP,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"}
@@ -26,9 +26,9 @@ export interface FileAttachmentLabels extends AttachmentTypeLabels {
26
26
  }
27
27
  /** Typography overrides for the `FileAttachment` component. */
28
28
  export interface FileAttachmentTypography {
29
- /** Typography class applied to the file name text. Defaults to `'dial-caption-text'`. */
29
+ /** Typography class applied to the file name text. Defaults to `'dial-tiny-text'`. */
30
30
  nameClassName?: string;
31
- /** Typography class applied to the bottom meta label (file type / status). Defaults to `'dial-caption-text'`. */
31
+ /** Typography class applied to the bottom meta label (file type / status). Defaults to `'dial-tiny-text'`. */
32
32
  metaClassName?: string;
33
33
  }
34
34
  /** Style overrides for the `FileAttachment` component. */
@@ -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,oBAAqB,SAAQ,oBAAoB;IAChE,6GAA6G;I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FAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -52,6 +52,8 @@ export interface AttachmentGroupProps {
52
52
  * `onAttachmentClick` once per downloadable attachment when omitted.
53
53
  */
54
54
  onDownloadAll?: (attachments: DisplayAttachment[]) => void;
55
+ /** Whether an attachment can be downloaded; `false` hides its tile's download button and leaves it out of "download all". Defaults to every attachment being downloadable. */
56
+ isAttachmentDownloadable?: (attachment: DisplayAttachment) => boolean;
55
57
  /** Called when the user retries a failed upload. */
56
58
  onRetry?: (id: string) => void;
57
59
  /** Localised accessible labels for the group region, its actions, and the non-extension attachment type names (prompt/pasted/image), forwarded to each tile. */
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-group.d.ts","sourceRoot":"","sources":["../../src/models/attachment-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,uEAAuE;AACvE,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0IAA0I;IAC1I,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6HAA6H;IAC7H,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gGAAgG;IAChG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,g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,CAAC;CAC/B"}
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.35",
4
+ "version": "1.3.0-dev.354",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,12 +17,12 @@
17
17
  }
18
18
  },
19
19
  "dependencies": {
20
- "@tabler/icons-react": "^3.44.0"
20
+ "@tabler/icons-react": "^3.50.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@epam/ai-dial-chat-shared": "1.3.0-dev.35",
23
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.354",
24
24
  "react": "^19.2.8",
25
- "@epam/ai-dial-ui-kit": "^0.15.3"
25
+ "@epam/ai-dial-ui-kit": "^0.16.0"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
@@ -24,6 +24,10 @@ export declare const isMimeTypeAllowed: (mimeType: string, allowedTypes: string[
24
24
  export declare const getAttachmentIcon: (rawContentType: string) => Icon;
25
25
  /** Derives a bare file extension (no leading dot) from a MIME type, e.g. `'application/pdf'` -> `'pdf'`. */
26
26
  export declare const getExtFromContentType: (contentType: string) => string | undefined;
27
+ /** Returns the attachment's bare file extension (no leading dot), from its content type first and its name second, or `undefined` when neither yields one. */
28
+ export declare const getAttachmentExtension: (attachment: DisplayAttachment) => string | undefined;
29
+ /** Returns `true` when the attachment's type glyph is a file-type icon rather than a prompt or pasted-text glyph. */
30
+ export declare const hasFileTypeGlyph: (attachment: DisplayAttachment) => boolean;
27
31
  /** Derives the display state (icons, labels, color classes) an AttachmentCard needs to render a given attachment. */
28
32
  export declare const getAttachmentCardState: (attachment: DisplayAttachment, typeLabels?: AttachmentTypeLabels) => AttachmentCardState;
29
33
  //# sourceMappingURL=attachment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/utils/attachment.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