@epam/ai-dial-chat-shared 1.1.0-dev.240 → 1.1.0-dev.244

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-shared",
3
3
  "description": "Shared domain models, utilities, and UI components for AI DIAL Chat libraries",
4
- "version": "1.1.0-dev.240",
4
+ "version": "1.1.0-dev.244",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "remark-math": "^6.0.0",
27
27
  "rehype-katex": "^7.0.1",
28
28
  "katex": "^0.16.22",
29
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
29
+ "@epam/ai-dial-ui-kit": "^0.14.0-dev.4"
30
30
  },
31
31
  "dependencies": {
32
32
  "classnames": "2.5.1",
@@ -1,8 +1,15 @@
1
1
  /**
2
- * Copies markdown `content` to the clipboard as rich text: pasting into a
3
- * rich-text target (Word, Gmail, Slack) preserves formatting, while
4
- * plain-text targets fall back to the raw markdown source. Falls back to
5
- * {@link copyToClipboard} when the multi-format Clipboard API isn't available.
2
+ * Renders markdown to sanitized HTML whose styling travels inline, so a
3
+ * rich-text target it is pasted into shows the tables, headings, and code
4
+ * blocks the way the conversation does.
5
+ */
6
+ export declare const markdownToRichTextHtml: (content: string) => string;
7
+ /**
8
+ * Copies markdown `content` to the clipboard as rich text, so pasting into a
9
+ * rich-text target (Word, Gmail, Slack) keeps the formatting. Only the
10
+ * `text/html` flavour is written — a plain-text target pastes nothing from
11
+ * here. Falls back to {@link copyToClipboard}, and therefore to the raw
12
+ * markdown, when the multi-format Clipboard API isn't available.
6
13
  */
7
14
  export declare const copyMarkdownAsRichText: (content: string) => Promise<boolean>;
8
15
  /** Copies `text` to the clipboard; returns `true` on success, `false` when both the Clipboard API and the `execCommand` fallback fail. */
@@ -1 +1 @@
1
- {"version":3,"file":"copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/copy-to-clipboard.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAqCvE,CAAC;AAEF,0IAA0I;AAC1I,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OAAO,CAAC,OAAO,CAY7D,CAAC"}
1
+ {"version":3,"file":"copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/copy-to-clipboard.ts"],"names":[],"mappings":"AAsGA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,MAUtD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAoCvE,CAAC;AAEF,0IAA0I;AAC1I,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OAAO,CAAC,OAAO,CAY7D,CAAC"}
@@ -1,3 +1,5 @@
1
+ /** Formats an accumulated USD cost with at most two decimals (for example, `$0.79`). */
2
+ export declare const formatCost: (value: number) => string;
1
3
  /** Formats an amount as USD, keeping up to six decimals for sub-dollar values (e.g. `$3`, `$0.3`). */
2
4
  export declare const formatPrice: (value: number) => string;
3
5
  /** Formats a per-unit price string for display, e.g. `$3/M tokens` or `$0.5/char without whitespace`. */
@@ -1 +1 @@
1
- {"version":3,"file":"format-price.d.ts","sourceRoot":"","sources":["../../src/utils/format-price.ts"],"names":[],"mappings":"AAwBA,sGAAsG;AACtG,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAK3C,CAAC;AASF,yGAAyG;AACzG,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,SAAS,EACzB,MAAM,MAAM,GAAG,SAAS,KACvB,MAAM,GAAG,SAWX,CAAC"}
1
+ {"version":3,"file":"format-price.d.ts","sourceRoot":"","sources":["../../src/utils/format-price.ts"],"names":[],"mappings":"AAwBA,wFAAwF;AACxF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,MACb,CAAC;AAE/B,sGAAsG;AACtG,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAK3C,CAAC;AASF,yGAAyG;AACzG,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,SAAS,EACzB,MAAM,MAAM,GAAG,SAAS,KACvB,MAAM,GAAG,SAWX,CAAC"}