@epam/ai-dial-chat-shared 1.1.0-dev.99 → 1.2.0-dev.1
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/CopyButton/CopyButton.js +33 -0
- package/components/DeploymentIcon/DeploymentIcon.js +62 -0
- package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -0
- package/components/EntityHeader/EntityHeader.js +48 -0
- package/components/EntityTypeLabel/EntityTypeLabel.js +10 -0
- package/components/FeaturedChip/FeaturedChip.js +18 -0
- package/components/InitialsAvatar/InitialsAvatar.js +29 -0
- package/components/InitialsAvatar/InitialsAvatar.module.scss.js +6 -0
- package/components/ItemHeader/ItemHeader.js +35 -0
- package/components/ItemHeader/ItemHeader.module.scss.js +6 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +104 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +10 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.js +69 -0
- package/components/MarkdownRenderer/MDMessageViewer.js +22 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +280 -0
- package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +11 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +24 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +6 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +77 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +15 -0
- package/components/MarkdownRenderer/Table/TableHeader.js +30 -0
- package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -0
- package/components/MarkdownRenderer/Table/table-serialization.js +6 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +66 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.js +12 -0
- package/components/MarkdownRenderer/markdown-class-names.js +23 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +18 -0
- package/components/PanelEmptyState/PanelEmptyState.js +17 -0
- package/components/PanelEmptyState/PanelEmptyState.module.scss.js +3 -0
- package/components/ResourceSummary/ResourceSummary.js +34 -0
- package/components/ResourceSummary/ResourceSummary.module.scss.js +6 -0
- package/constants/breakpoint.js +4 -0
- package/constants/dial.js +4 -0
- package/constants/entity-colors.js +17 -0
- package/constants/icon.js +13 -0
- package/constants/markdown-editor.js +4 -0
- package/constants/mime-types.js +99 -0
- package/constants/resizable-fields.js +4 -0
- package/constants/select-list.js +4 -0
- package/constants/tag-input.js +4 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +299 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +108 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +36 -0
- package/file-manager/UploadProgressModal/UploadProgressModal.js +56 -0
- package/file-manager/file-manager-variant.js +8 -0
- package/file-manager/path.js +7 -0
- package/file-manager/upload-batch.js +6 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.js +45 -0
- package/file-manager.d.ts +491 -0
- package/file-manager.js +3 -0
- package/hooks/useAvailableHeightCap.js +36 -0
- package/hooks/useCodeCopy.js +20 -0
- package/hooks/useCollapsedText.js +38 -0
- package/hooks/useHorizontalOverflow.js +25 -0
- package/hooks/useIsMobile.js +13 -0
- package/hooks/useStreamedMarkdownContent.js +32 -0
- package/index.css +1 -1
- package/index.d.ts +2505 -43
- package/index.js +64 -49151
- package/markdown.d.ts +401 -0
- package/markdown.js +11 -0
- package/models/chat.js +14 -0
- package/models/conversation-classification.js +6 -0
- package/models/conversation-transfer.js +14 -0
- package/models/deployment-features.js +6 -0
- package/package.json +43 -12
- package/types/attachment.js +8 -0
- package/types/code-editor.js +6 -0
- package/types/entity-type.js +6 -0
- package/types/mime-type.js +8 -0
- package/utils/annotation.js +120 -0
- package/utils/avatar-color.js +37 -0
- package/utils/build-css-vars.js +8 -0
- package/utils/copy-to-clipboard.js +69 -0
- package/utils/file-download.js +79 -0
- package/utils/format-file-size.js +4 -0
- package/utils/format-last-used.js +20 -0
- package/utils/format-price.js +18 -0
- package/utils/generate-uuid.js +7 -0
- package/utils/initials.js +7 -0
- package/utils/is-audio-transcription-supported.js +5 -0
- package/utils/latex.js +79 -0
- package/utils/merge-class.js +8 -0
- package/utils/message-attachment-to-display.js +31 -0
- package/utils/message.js +5 -0
- package/utils/mime-type.js +73 -0
- package/utils/prompt-variables.js +58 -0
- package/utils/string-utils.js +14 -0
- package/components/CopyButton/CopyButton.d.ts +0 -15
- package/components/CopyButton/CopyButton.d.ts.map +0 -1
- package/components/DeploymentIcon/DeploymentIcon.d.ts +0 -36
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +0 -1
- package/components/InitialsAvatar/InitialsAvatar.d.ts +0 -13
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +0 -1
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +0 -47
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +0 -1
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +0 -7
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +0 -1
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +0 -31
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +0 -1
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +0 -105
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +0 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +0 -31
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +0 -1
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +0 -9
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +0 -1
- package/components/MarkdownRenderer/markdown-class-names.d.ts +0 -4
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +0 -1
- package/components/PanelEmptyState/PanelEmptyState.d.ts +0 -20
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +0 -1
- package/constants/dial.d.ts +0 -3
- package/constants/dial.d.ts.map +0 -1
- package/constants/icon.d.ts +0 -14
- package/constants/icon.d.ts.map +0 -1
- package/constants/mime-types.d.ts +0 -7
- package/constants/mime-types.d.ts.map +0 -1
- package/hooks/useCodeCopy.d.ts +0 -6
- package/hooks/useCodeCopy.d.ts.map +0 -1
- package/hooks/useCollapsedText.d.ts +0 -27
- package/hooks/useCollapsedText.d.ts.map +0 -1
- package/hooks/useIsMobile.d.ts +0 -3
- package/hooks/useIsMobile.d.ts.map +0 -1
- package/hooks/useStreamedMarkdownContent.d.ts +0 -3
- package/hooks/useStreamedMarkdownContent.d.ts.map +0 -1
- package/hooks/useTableScroll.d.ts +0 -17
- package/hooks/useTableScroll.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/models/annotation.d.ts +0 -78
- package/models/annotation.d.ts.map +0 -1
- package/models/auth.d.ts +0 -26
- package/models/auth.d.ts.map +0 -1
- package/models/chat.d.ts +0 -276
- package/models/chat.d.ts.map +0 -1
- package/models/custom-visualizer.d.ts +0 -61
- package/models/custom-visualizer.d.ts.map +0 -1
- package/models/deployment-configuration.d.ts +0 -55
- package/models/deployment-configuration.d.ts.map +0 -1
- package/models/deployment-features.d.ts +0 -17
- package/models/deployment-features.d.ts.map +0 -1
- package/models/deployment.d.ts +0 -31
- package/models/deployment.d.ts.map +0 -1
- package/models/dial-model.d.ts +0 -19
- package/models/dial-model.d.ts.map +0 -1
- package/models/import-export.d.ts +0 -23
- package/models/import-export.d.ts.map +0 -1
- package/models/theme.d.ts +0 -36
- package/models/theme.d.ts.map +0 -1
- package/models/tool-menu-item.d.ts +0 -13
- package/models/tool-menu-item.d.ts.map +0 -1
- package/types/attachment.d.ts +0 -23
- package/types/attachment.d.ts.map +0 -1
- package/types/code-editor.d.ts +0 -8
- package/types/code-editor.d.ts.map +0 -1
- package/types/mime-type.d.ts +0 -53
- package/types/mime-type.d.ts.map +0 -1
- package/utils/avatar-color.d.ts +0 -10
- package/utils/avatar-color.d.ts.map +0 -1
- package/utils/build-css-vars.d.ts +0 -4
- package/utils/build-css-vars.d.ts.map +0 -1
- package/utils/copy-to-clipboard.d.ts +0 -3
- package/utils/copy-to-clipboard.d.ts.map +0 -1
- package/utils/file-download.d.ts +0 -9
- package/utils/file-download.d.ts.map +0 -1
- package/utils/format-file-size.d.ts +0 -3
- package/utils/format-file-size.d.ts.map +0 -1
- package/utils/format-last-used.d.ts +0 -3
- package/utils/format-last-used.d.ts.map +0 -1
- package/utils/initials.d.ts +0 -3
- package/utils/initials.d.ts.map +0 -1
- package/utils/is-audio-transcription-supported.d.ts +0 -3
- package/utils/is-audio-transcription-supported.d.ts.map +0 -1
- package/utils/latex.d.ts +0 -11
- package/utils/latex.d.ts.map +0 -1
- package/utils/merge-class.d.ts +0 -4
- package/utils/merge-class.d.ts.map +0 -1
- package/utils/message-attachment-to-display.d.ts +0 -22
- package/utils/message-attachment-to-display.d.ts.map +0 -1
- package/utils/message.d.ts +0 -4
- package/utils/message.d.ts.map +0 -1
- package/utils/string-utils.d.ts +0 -5
- package/utils/string-utils.d.ts.map +0 -1
package/types/code-editor.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../src/types/code-editor.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,oBAAY,cAAc;IACxB,sCAAsC;IACtC,IAAI,SAAS;IACb,uCAAuC;IACvC,KAAK,UAAU;CAChB"}
|
package/types/mime-type.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/** Well-known MIME type constants used in DIAL API attachments. */
|
|
2
|
-
export declare enum MIMEType {
|
|
3
|
-
/** GitHub-flavoured Markdown. */
|
|
4
|
-
Markdown = "text/markdown",
|
|
5
|
-
/** Plain unformatted text. */
|
|
6
|
-
Plain = "text/plain",
|
|
7
|
-
/** HTML markup. */
|
|
8
|
-
HTML = "text/html",
|
|
9
|
-
/** XHTML markup. */
|
|
10
|
-
XHTML = "application/xhtml+xml",
|
|
11
|
-
/** Cascading Style Sheets. */
|
|
12
|
-
CSS = "text/css",
|
|
13
|
-
/** JavaScript source. */
|
|
14
|
-
JavaScript = "text/javascript",
|
|
15
|
-
/** TypeScript source (non-standard but widely used). */
|
|
16
|
-
TypeScript = "text/typescript",
|
|
17
|
-
/** CSV spreadsheet data. */
|
|
18
|
-
CSV = "text/csv",
|
|
19
|
-
/** JSON data. */
|
|
20
|
-
JSON = "application/json",
|
|
21
|
-
/** XML document (application type). */
|
|
22
|
-
XML = "application/xml",
|
|
23
|
-
/** PDF document. */
|
|
24
|
-
PDF = "application/pdf",
|
|
25
|
-
/** ZIP archive. */
|
|
26
|
-
ZIP = "application/zip",
|
|
27
|
-
/** GZIP-compressed data. */
|
|
28
|
-
GZIP = "application/gzip",
|
|
29
|
-
/** JPEG raster image. */
|
|
30
|
-
JPEG = "image/jpeg",
|
|
31
|
-
/** PNG raster image. */
|
|
32
|
-
PNG = "image/png",
|
|
33
|
-
/** GIF image. */
|
|
34
|
-
GIF = "image/gif",
|
|
35
|
-
/** WebP image. */
|
|
36
|
-
WebP = "image/webp",
|
|
37
|
-
/** BMP bitmap image. */
|
|
38
|
-
BMP = "image/bmp",
|
|
39
|
-
/** SVG vector image. */
|
|
40
|
-
SVG = "image/svg+xml"
|
|
41
|
-
}
|
|
42
|
-
/** Well-known file extension constants used as fallback when a MIME type is unavailable. */
|
|
43
|
-
export declare enum FileExtension {
|
|
44
|
-
/** PDF document. */
|
|
45
|
-
PDF = "pdf",
|
|
46
|
-
/** Markdown document (`.md`). */
|
|
47
|
-
Markdown = "md",
|
|
48
|
-
/** Markdown document, alternate extension (`.markdown`). */
|
|
49
|
-
MarkdownAlt = "markdown",
|
|
50
|
-
/** JSON document. */
|
|
51
|
-
JSON = "json"
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=mime-type.d.ts.map
|
package/types/mime-type.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mime-type.d.ts","sourceRoot":"","sources":["../../src/types/mime-type.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,oBAAY,QAAQ;IAElB,iCAAiC;IACjC,QAAQ,kBAAkB;IAC1B,8BAA8B;IAC9B,KAAK,eAAe;IACpB,mBAAmB;IACnB,IAAI,cAAc;IAClB,oBAAoB;IACpB,KAAK,0BAA0B;IAC/B,8BAA8B;IAC9B,GAAG,aAAa;IAChB,yBAAyB;IACzB,UAAU,oBAAoB;IAC9B,wDAAwD;IACxD,UAAU,oBAAoB;IAC9B,4BAA4B;IAC5B,GAAG,aAAa;IAGhB,iBAAiB;IACjB,IAAI,qBAAqB;IACzB,uCAAuC;IACvC,GAAG,oBAAoB;IACvB,oBAAoB;IACpB,GAAG,oBAAoB;IACvB,mBAAmB;IACnB,GAAG,oBAAoB;IACvB,4BAA4B;IAC5B,IAAI,qBAAqB;IAGzB,yBAAyB;IACzB,IAAI,eAAe;IACnB,wBAAwB;IACxB,GAAG,cAAc;IACjB,iBAAiB;IACjB,GAAG,cAAc;IACjB,kBAAkB;IAClB,IAAI,eAAe;IACnB,wBAAwB;IACxB,GAAG,cAAc;IACjB,wBAAwB;IACxB,GAAG,kBAAkB;CACtB;AAED,4FAA4F;AAC5F,oBAAY,aAAa;IACvB,oBAAoB;IACpB,GAAG,QAAQ;IACX,iCAAiC;IACjC,QAAQ,OAAO;IACf,4DAA4D;IAC5D,WAAW,aAAa;IACxB,qBAAqB;IACrB,IAAI,SAAS;CACd"}
|
package/utils/avatar-color.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** A background/foreground colour pair for an initials avatar badge. */
|
|
2
|
-
export interface AvatarColorEntry {
|
|
3
|
-
/** CSS hex colour for the badge background. */
|
|
4
|
-
background: string;
|
|
5
|
-
/** CSS hex colour for the initials text. */
|
|
6
|
-
foreground: string;
|
|
7
|
-
}
|
|
8
|
-
/** Returns a deterministic colour-pair for the given display name. */
|
|
9
|
-
export declare const pickAvatarColor: (name: string) => AvatarColorEntry;
|
|
10
|
-
//# sourceMappingURL=avatar-color.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-color.d.ts","sourceRoot":"","sources":["../../src/utils/avatar-color.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;CACpB;AAcD,sEAAsE;AACtE,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,gBAM9C,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
/** Builds a `CSSProperties` object from a record of CSS custom property names to values, omitting entries with `undefined` or empty-string values. */
|
|
3
|
-
export declare const buildCssVars: (vars: Record<string, string | number | undefined>) => CSSProperties;
|
|
4
|
-
//# sourceMappingURL=build-css-vars.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-css-vars.d.ts","sourceRoot":"","sources":["../../src/utils/build-css-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,sJAAsJ;AACtJ,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,KAChD,aAQF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/copy-to-clipboard.ts"],"names":[],"mappings":"AAEA,0IAA0I;AAC1I,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OAAO,CAAC,OAAO,CAY7D,CAAC"}
|
package/utils/file-download.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
|
|
2
|
-
export declare const getFileExtensionForLanguage: (language: string) => string;
|
|
3
|
-
/** Creates a temporary anchor element and clicks it to trigger a browser download for `href`. */
|
|
4
|
-
export declare const triggerAnchorDownload: (href: string, filename: string) => void;
|
|
5
|
-
/** Triggers a browser download of `blob`, using a temporary object URL that is revoked afterward. */
|
|
6
|
-
export declare const triggerBlobDownload: (blob: Blob, filename: string) => void;
|
|
7
|
-
/** Triggers a browser download of `content` as a text file named `filename`. */
|
|
8
|
-
export declare const downloadTextFile: (content: string, filename: string) => void;
|
|
9
|
-
//# sourceMappingURL=file-download.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-download.d.ts","sourceRoot":"","sources":["../../src/utils/file-download.ts"],"names":[],"mappings":"AAyCA,2HAA2H;AAC3H,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,KAAG,MACT,CAAC;AAEvD,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAKtE,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,EAAE,UAAU,MAAM,KAAG,IAIlE,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,KAAG,IAKpE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-file-size.d.ts","sourceRoot":"","sources":["../../src/utils/format-file-size.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAQ9C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-last-used.d.ts","sourceRoot":"","sources":["../../src/utils/format-last-used.ts"],"names":[],"mappings":"AAAA,uJAAuJ;AACvJ,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MA2BnD,CAAC"}
|
package/utils/initials.d.ts
DELETED
package/utils/initials.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initials.d.ts","sourceRoot":"","sources":["../../src/utils/initials.ts"],"names":[],"mappings":"AAGA,mGAAmG;AACnG,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,MAa9C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-audio-transcription-supported.d.ts","sourceRoot":"","sources":["../../src/utils/is-audio-transcription-supported.ts"],"names":[],"mappings":"AAKA,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,GAAI,QAAQ,MAAM,EAAE,KAAG,OAGrD,CAAC"}
|
package/utils/latex.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Escapes currency-looking dollar signs and converts single-dollar LaTeX math delimiters
|
|
3
|
-
* (`$...$`) to the double-dollar form (`$$...$$`) that `remark-math`/KaTeX render, leaving
|
|
4
|
-
* code blocks and already-escaped `\$` untouched.
|
|
5
|
-
*
|
|
6
|
-
* The `\(...\)`/`\[...\]` delimiters LLMs commonly emit are deliberately left as-is: they are
|
|
7
|
-
* recognized directly by `micromark-extension-llm-math`, which the consuming app's bundler
|
|
8
|
-
* config aliases in place of the default `micromark-extension-math` used by `remark-math`.
|
|
9
|
-
*/
|
|
10
|
-
export declare const preprocessLaTeX: (content: string) => string;
|
|
11
|
-
//# sourceMappingURL=latex.d.ts.map
|
package/utils/latex.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../src/utils/latex.ts"],"names":[],"mappings":"AA8EA;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAuCjD,CAAC"}
|
package/utils/merge-class.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-class.d.ts","sourceRoot":"","sources":["../../src/utils/merge-class.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,GAAG,MAAM,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,MAAM,CAE7E"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DisplayAttachment, MessageAttachment } from '../models/chat';
|
|
2
|
-
/**
|
|
3
|
-
* Optional app-owned callbacks used to resolve display URLs for an attachment.
|
|
4
|
-
* When omitted, the mapper falls back to the attachment's own `url` (or a
|
|
5
|
-
* synthesized `data:` URL when only inline base64 `data` is present).
|
|
6
|
-
*/
|
|
7
|
-
export interface AttachmentDisplayResolvers {
|
|
8
|
-
/** Resolves the image preview URL for an attachment that has a remote `url`. */
|
|
9
|
-
resolvePreviewUrl?(dto: MessageAttachment): string | undefined;
|
|
10
|
-
/** Resolves the audio playback URL for an attachment that has a remote `url`. */
|
|
11
|
-
resolvePlayUrl?(dto: MessageAttachment): string | undefined;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Maps a {@link MessageAttachment} DTO to the display-only {@link DisplayAttachment}
|
|
15
|
-
* model used by UI components. This is a pure function: any app/host-specific URL
|
|
16
|
-
* resolution (catalog icon URLs, DIAL file download URLs, etc.) is injected through
|
|
17
|
-
* the optional `resolvers` argument rather than performed here.
|
|
18
|
-
*/
|
|
19
|
-
export declare const messageAttachmentToDisplayAttachment: (dto: MessageAttachment, resolvers?: AttachmentDisplayResolvers) => DisplayAttachment;
|
|
20
|
-
/** Maps a list of {@link MessageAttachment} DTOs to display-only attachment models. Entries with duplicate `id` values are deduplicated — first occurrence wins. */
|
|
21
|
-
export declare const messageAttachmentsToDisplayAttachments: (dtos: MessageAttachment[] | undefined, resolvers?: AttachmentDisplayResolvers) => DisplayAttachment[];
|
|
22
|
-
//# sourceMappingURL=message-attachment-to-display.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-attachment-to-display.d.ts","sourceRoot":"","sources":["../../src/utils/message-attachment-to-display.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAIxB;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,gFAAgF;IAChF,iBAAiB,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/D,iFAAiF;IACjF,cAAc,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;CAC7D;AAwCD;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,GAC/C,KAAK,iBAAiB,EACtB,YAAW,0BAA+B,KACzC,iBA6CF,CAAC;AAEF,oKAAoK;AACpK,eAAO,MAAM,sCAAsC,GACjD,MAAM,iBAAiB,EAAE,GAAG,SAAS,EACrC,YAAW,0BAA+B,KACzC,iBAAiB,EAYnB,CAAC"}
|
package/utils/message.d.ts
DELETED
package/utils/message.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/utils/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/E,sDAAsD;AACtD,eAAO,MAAM,eAAe,GAC1B,KAAK,OAAO,GAAG,aAAa,KAC3B,GAAG,IAAI,aAAgD,CAAC"}
|
package/utils/string-utils.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Returns the UTF-8 byte length of `str`. */
|
|
2
|
-
export declare const getUtf8ByteLength: (str: string) => number;
|
|
3
|
-
/** Truncates `str` to at most `maxBytes` UTF-8 bytes without splitting multi-byte characters. */
|
|
4
|
-
export declare const truncateToUtf8Bytes: (str: string, maxBytes: number) => string;
|
|
5
|
-
//# sourceMappingURL=string-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/utils/string-utils.ts"],"names":[],"mappings":"AAGA,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,MACpB,CAAC;AAE7B,iGAAiG;AACjG,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,EAAE,UAAU,MAAM,KAAG,MAanE,CAAC"}
|