@epam/ai-dial-attachment-input 1.0.0-dev.484 → 1.0.0-dev.489
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AttachmentCard/AttachmentCard.d.ts +2 -1
- package/components/AttachmentCard/AttachmentCard.d.ts.map +1 -1
- package/components/AttachmentFileRow/AttachmentFileRow.d.ts +1 -1
- package/components/AttachmentFileRow/AttachmentFileRow.d.ts.map +1 -1
- package/components/AttachmentGroup/AttachmentGroup.d.ts +1 -1
- package/components/AttachmentGroup/AttachmentGroup.d.ts.map +1 -1
- package/components/AttachmentMoreTile/AttachmentMoreTile.d.ts +1 -1
- package/components/AttachmentMoreTile/AttachmentMoreTile.d.ts.map +1 -1
- package/components/AttachmentTray/AttachmentTray.d.ts +2 -1
- package/components/AttachmentTray/AttachmentTray.d.ts.map +1 -1
- package/components/FileDndOverlay/FileDndOverlay.d.ts +2 -1
- package/components/FileDndOverlay/FileDndOverlay.d.ts.map +1 -1
- package/constants/attachment-group.d.ts +5 -0
- package/constants/attachment-group.d.ts.map +1 -0
- package/constants/upload.d.ts +1 -0
- package/constants/upload.d.ts.map +1 -1
- package/hooks/useClipboardPaste.d.ts +9 -1
- package/hooks/useClipboardPaste.d.ts.map +1 -1
- package/hooks/useLazyImageLoad.d.ts +5 -0
- package/hooks/useLazyImageLoad.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.d.ts +9 -15
- package/index.d.ts.map +1 -1
- package/index.js +391 -340
- package/models/attachment-card.d.ts +111 -0
- package/models/attachment-card.d.ts.map +1 -0
- package/models/attachment-file-row.d.ts +47 -0
- package/models/attachment-file-row.d.ts.map +1 -0
- package/models/{AttachmentGroup.d.ts → attachment-group.d.ts} +50 -11
- package/models/attachment-group.d.ts.map +1 -0
- package/models/{AttachmentMoreTile.d.ts → attachment-more-tile.d.ts} +3 -1
- package/models/attachment-more-tile.d.ts.map +1 -0
- package/models/{AttachmentTray.d.ts → attachment-tray.d.ts} +14 -9
- package/models/attachment-tray.d.ts.map +1 -0
- package/models/file-dnd-overlay.d.ts +41 -0
- package/models/file-dnd-overlay.d.ts.map +1 -0
- package/package.json +2 -2
- package/utils/attachment.d.ts +49 -0
- package/utils/attachment.d.ts.map +1 -0
- package/models/AttachmentCard.d.ts +0 -61
- package/models/AttachmentCard.d.ts.map +0 -1
- package/models/AttachmentFileRow.d.ts +0 -24
- package/models/AttachmentFileRow.d.ts.map +0 -1
- package/models/AttachmentGroup.d.ts.map +0 -1
- package/models/AttachmentMoreTile.d.ts.map +0 -1
- package/models/AttachmentTray.d.ts.map +0 -1
- package/models/FileDndOverlay.d.ts +0 -24
- package/models/FileDndOverlay.d.ts.map +0 -1
- package/utils/attachment-mime.d.ts +0 -20
- package/utils/attachment-mime.d.ts.map +0 -1
- package/utils/generateAttachmentId.d.ts +0 -6
- package/utils/generateAttachmentId.d.ts.map +0 -1
- package/utils/getAttachmentCardState.d.ts +0 -17
- package/utils/getAttachmentCardState.d.ts.map +0 -1
- package/utils/getAttachmentGroupLayout.d.ts +0 -23
- package/utils/getAttachmentGroupLayout.d.ts.map +0 -1
- package/utils/getAttachmentIcon.d.ts +0 -8
- package/utils/getAttachmentIcon.d.ts.map +0 -1
- package/utils/getNameWithoutExtension.d.ts +0 -5
- package/utils/getNameWithoutExtension.d.ts.map +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
import { Icon } from '@tabler/icons-react';
|
|
3
|
-
export interface AttachmentCardState {
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
isError: boolean;
|
|
6
|
-
isImage: boolean;
|
|
7
|
-
isAudio: boolean;
|
|
8
|
-
areActionsVisible: boolean;
|
|
9
|
-
BottomIcon: Icon;
|
|
10
|
-
typeLabel: string;
|
|
11
|
-
cardColorClass: string;
|
|
12
|
-
removeBtnClass: string;
|
|
13
|
-
}
|
|
14
|
-
/** Derives a bare file extension (no leading dot) from a MIME type, e.g. `'application/pdf'` -> `'pdf'`. */
|
|
15
|
-
export declare const getExtFromContentType: (contentType: string) => string | undefined;
|
|
16
|
-
export declare const getAttachmentCardState: (attachment: DisplayAttachment, isSelected: boolean, shouldAlwaysShowActions: boolean) => AttachmentCardState;
|
|
17
|
-
//# sourceMappingURL=getAttachmentCardState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAttachmentCardState.d.ts","sourceRoot":"","sources":["../../src/utils/getAttachmentCardState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAOnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKhD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAUD,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,KAClB,MAAM,GAAG,SAUX,CAAC;AAuBF,eAAO,MAAM,sBAAsB,GACjC,YAAY,iBAAiB,EAC7B,YAAY,OAAO,EACnB,yBAAyB,OAAO,KAC/B,mBAkCF,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** How the unified attachment tile grid should render for a given total attachment count. */
|
|
2
|
-
export declare enum AttachmentTilesLayout {
|
|
3
|
-
/** No attachments. */
|
|
4
|
-
None = "none",
|
|
5
|
-
/** Below the collapse threshold, or expanded: every tile shown. */
|
|
6
|
-
AllVisible = "all-visible",
|
|
7
|
-
/** At/above the collapse threshold, not yet expanded: a few tiles + a "+N" tile. */
|
|
8
|
-
Collapsed = "collapsed"
|
|
9
|
-
}
|
|
10
|
-
export interface AttachmentTilesPlan {
|
|
11
|
-
layout: AttachmentTilesLayout;
|
|
12
|
-
/** Number of tiles to actually render. */
|
|
13
|
-
visibleCount: number;
|
|
14
|
-
/** Number of attachments hidden behind the "+N" tile (0 unless `layout` is `Collapsed`). */
|
|
15
|
-
hiddenCount: number;
|
|
16
|
-
}
|
|
17
|
-
/** Total attachment count at/above which the grid collapses behind a "+N" tile by default. */
|
|
18
|
-
export declare const ATTACHMENT_COLLAPSE_THRESHOLD = 5;
|
|
19
|
-
/** Number of tiles shown before the "+N" tile while collapsed. */
|
|
20
|
-
export declare const ATTACHMENT_COLLAPSED_VISIBLE_COUNT = 4;
|
|
21
|
-
/** Decides how the unified tile grid should render for `totalCount` attachments, given whether the group is expanded. */
|
|
22
|
-
export declare const getAttachmentTilesPlan: (totalCount: number, isExpanded: boolean) => AttachmentTilesPlan;
|
|
23
|
-
//# sourceMappingURL=getAttachmentGroupLayout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAttachmentGroupLayout.d.ts","sourceRoot":"","sources":["../../src/utils/getAttachmentGroupLayout.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,oBAAY,qBAAqB;IAC/B,sBAAsB;IACtB,IAAI,SAAS;IACb,mEAAmE;IACnE,UAAU,gBAAgB;IAC1B,oFAAoF;IACpF,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,8FAA8F;AAC9F,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,kEAAkE;AAClE,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD,yHAAyH;AACzH,eAAO,MAAM,sBAAsB,GACjC,YAAY,MAAM,EAClB,YAAY,OAAO,KAClB,mBAoBF,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@tabler/icons-react';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the appropriate Tabler icon component for a given MIME content type.
|
|
4
|
-
* Broad category checks (`startsWith`) run first; then a specific MIME switch
|
|
5
|
-
* covers as many known file types as possible. Falls back to `IconFile`.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getAttachmentIcon: (contentType: string) => Icon;
|
|
8
|
-
//# sourceMappingURL=getAttachmentIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAttachmentIcon.d.ts","sourceRoot":"","sources":["../../src/utils/getAttachmentIcon.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,aAAa,MAAM,KAAG,IA0FvD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getNameWithoutExtension.d.ts","sourceRoot":"","sources":["../../src/utils/getNameWithoutExtension.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,MAGtD,CAAC"}
|