@epam/ai-dial-attachment-input 1.1.0-dev.99 → 1.1.0-rc.0

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