@epam/ai-dial-attachment-input 1.1.0-dev.44 → 1.1.0-dev.49

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,12 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { FileAttachmentProps } from '../../../models/attachment-file-row';
3
- /**
4
- * Non-previewable attachment tile: a uniform neutral square holding the
5
- * glyph, extension label, and filename together (no external caption, no
6
- * per-type color). Type is communicated by glyph + extension text only;
7
- * color is reserved for upload state (failed = red tile + icon-only retry,
8
- * uploading = progress bar). Download/retry are icon-only, matching the
9
- * rest of the app.
10
- */
3
+ /** Non-previewable attachment tile showing a file type glyph, extension label, and filename with upload-state feedback. */
11
4
  export declare const FileAttachment: FC<FileAttachmentProps>;
12
5
  //# sourceMappingURL=File.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA6NlD,CAAC"}
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAKA,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,CA6NlD,CAAC"}
@@ -1,12 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { AttachmentGroupProps } from '../../models/attachment-group';
3
- /**
4
- * Adaptive attachment group for an already-sent message: every attachment —
5
- * image or file — renders as one uniform 84x84 rounded-square tile, wrapped
6
- * in a single grid. 5+ attachments collapse behind a "+N" tile; expanding
7
- * reveals a same-shaped collapse tile to show less again. Type is
8
- * communicated by glyph + extension text only; color is reserved for
9
- * upload state. Download actions are icon-only, matching the rest of the app.
10
- */
3
+ /** Adaptive grid of attachment tiles for a sent message; collapses behind a "+N" tile when 5 or more attachments are present. */
11
4
  export declare const AttachmentGroup: FC<AttachmentGroupProps>;
12
5
  //# sourceMappingURL=AttachmentGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentGroup/AttachmentGroup.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AASvC;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsKpD,CAAC"}
1
+ {"version":3,"file":"AttachmentGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentGroup/AttachmentGroup.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AASvC,iIAAiI;AACjI,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsKpD,CAAC"}
@@ -1,9 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { AttachmentMoreTileProps } from '../../models/attachment-more-tile';
3
- /**
4
- * Square placeholder tile shown in the attachment grid: a "+N" tile when
5
- * collapsed (activating it expands the group), or — via `children` — a
6
- * collapse-icon tile in the same tile form for "show less".
7
- */
3
+ /** Square placeholder tile shown in the attachment grid: a "+N" overflow tile when collapsed, or a collapse-icon tile when expanded. */
8
4
  export declare const AttachmentMoreTile: FC<AttachmentMoreTileProps>;
9
5
  //# sourceMappingURL=AttachmentMoreTile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentMoreTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentMoreTile/AttachmentMoreTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGjF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAuC1D,CAAC"}
1
+ {"version":3,"file":"AttachmentMoreTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentMoreTile/AttachmentMoreTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGjF,wIAAwI;AACxI,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAuC1D,CAAC"}
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.44",
4
+ "version": "1.1.0-dev.49",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.1.0-dev.44",
20
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.49",
21
21
  "@tabler/icons-react": "^3.44.0",
22
22
  "react": "^19.0.0",
23
23
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.12"
@@ -2,27 +2,11 @@ import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
2
2
  import { Icon } from '@tabler/icons-react';
3
3
  import { AttachmentCardState, AttachmentTypeLabels } from '../models/attachment-card';
4
4
  import { AttachmentTilesPlan } from '../models/attachment-group';
5
- /**
6
- * Generates a unique identifier for an attachment, combining the current
7
- * timestamp with a random alphanumeric suffix.
8
- */
5
+ /** Generates a unique identifier for an attachment. */
9
6
  export declare const generateAttachmentId: () => string;
10
- /**
11
- * Returns the provided name without its trailing file extension.
12
- */
7
+ /** Returns the name without its trailing file extension. */
13
8
  export declare const getNameWithoutExtension: (name: string) => string;
14
- /**
15
- * Converts an array of MIME type strings (including wildcards) into a
16
- * comma-separated human-readable label string.
17
- *
18
- * Examples:
19
- * `['application/pdf', 'image/jpeg']` → `'PDF, JPEG'`
20
- * `['image/*', 'text/csv']` → `'Image files, CSV'`
21
- *
22
- * @param wildcardLabels - Optional overrides for the wildcard category labels
23
- * (`image`, `audio`, `video`, `text`), keyed by MIME major type. Defaults
24
- * to the built-in English labels.
25
- */
9
+ /** Converts an array of MIME type strings (including wildcards) into a comma-separated human-readable label string. */
26
10
  export declare const mimeTypesToExtensionLabels: (types: string[], wildcardLabels?: Record<string, string>) => string;
27
11
  /**
28
12
  * Returns `true` when `mimeType` matches at least one entry in `allowedTypes`.
@@ -34,11 +18,7 @@ export declare const mimeTypesToExtensionLabels: (types: string[], wildcardLabel
34
18
  * Returns `false` when `allowedTypes` is empty (no attachment types allowed).
35
19
  */
36
20
  export declare const isMimeTypeAllowed: (mimeType: string, allowedTypes: string[]) => boolean;
37
- /**
38
- * Returns the appropriate Tabler icon component for a given MIME content type.
39
- * Broad category checks (`startsWith`) run first; then a specific MIME switch
40
- * covers as many known file types as possible. Falls back to `IconFile`.
41
- */
21
+ /** Returns the Tabler icon component for a given MIME content type, or `IconFile` for unknown types. */
42
22
  export declare const getAttachmentIcon: (contentType: string) => Icon;
43
23
  /** Derives a bare file extension (no leading dot) from a MIME type, e.g. `'application/pdf'` -> `'pdf'`. */
44
24
  export declare const getExtFromContentType: (contentType: string) => string | undefined;
@@ -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;AAoChD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,MACgB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,MAGtD,CAAC;AASF;;;;;;;;;;;GAWG;AACH,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;;;;GAIG;AACH,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;AAEF,yHAAyH;AACzH,eAAO,MAAM,sBAAsB,GACjC,YAAY,MAAM,EAClB,YAAY,OAAO,KAClB,mBAoBF,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;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