@epam/ai-dial-chat-shared 1.0.0 → 1.0.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.
@@ -0,0 +1,9 @@
1
+ /** Filter tab identifier; also used as conversation source and group key. */
2
+ export declare enum FilterTab {
3
+ All = "all",
4
+ Pinned = "pinned",
5
+ MyChats = "my-chats",
6
+ Shared = "shared",
7
+ Organization = "organization"
8
+ }
9
+ //# sourceMappingURL=conversation-classification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-classification.d.ts","sourceRoot":"","sources":["../../src/models/conversation-classification.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,OAAO,aAAa;IACpB,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B"}
@@ -0,0 +1,28 @@
1
+ /** Lifecycle status of a queued export/import job. */
2
+ export declare enum ConversationTransferJobStatus {
3
+ InProgress = "inProgress",
4
+ Success = "success",
5
+ Failed = "failed"
6
+ }
7
+ /** Whether a transfer job's subject is a single named conversation or the whole history. */
8
+ export declare enum ConversationTransferSubjectKind {
9
+ Single = "single",
10
+ All = "all"
11
+ }
12
+ /** What a transfer job operates on — structured data, never pre-rendered translated text. */
13
+ export type ConversationTransferSubject = {
14
+ kind: ConversationTransferSubjectKind.Single;
15
+ /** The conversation's own name. */
16
+ title: string;
17
+ /** Folder breadcrumb the conversation originated from, if nested. */
18
+ sourceBreadcrumb?: string;
19
+ } | {
20
+ kind: ConversationTransferSubjectKind.All;
21
+ };
22
+ /** A queued export or import job. */
23
+ export interface ConversationTransferJob {
24
+ id: string;
25
+ subject: ConversationTransferSubject;
26
+ status: ConversationTransferJobStatus;
27
+ }
28
+ //# sourceMappingURL=conversation-transfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-transfer.d.ts","sourceRoot":"","sources":["../../src/models/conversation-transfer.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,oBAAY,6BAA6B;IACvC,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,4FAA4F;AAC5F,oBAAY,+BAA+B;IACzC,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,6FAA6F;AAC7F,MAAM,MAAM,2BAA2B,GACnC;IACE,IAAI,EAAE,+BAA+B,CAAC,MAAM,CAAC;IAC7C,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GACD;IAAE,IAAI,EAAE,+BAA+B,CAAC,GAAG,CAAA;CAAE,CAAC;AAElD,qCAAqC;AACrC,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,2BAA2B,CAAC;IACrC,MAAM,EAAE,6BAA6B,CAAC;CACvC"}
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.0.0",
4
+ "version": "1.0.1",
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.14.0-dev.6"
29
+ "@epam/ai-dial-ui-kit": "^0.14.0-dev.15"
30
30
  },
31
31
  "dependencies": {
32
32
  "classnames": "2.5.1",
@@ -6,9 +6,10 @@
6
6
  export declare const markdownToRichTextHtml: (content: string) => string;
7
7
  /**
8
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
9
+ * rich-text target (Word, Gmail, Slack) keeps the formatting. Both the
10
+ * `text/html` and the `text/plain` flavour are written, so a plain-text
11
+ * target (Notepad, a terminal, a code editor) pastes the raw markdown instead
12
+ * of nothing. Falls back to {@link copyToClipboard}, and therefore to the raw
12
13
  * markdown, when the multi-format Clipboard API isn't available.
13
14
  */
14
15
  export declare const copyMarkdownAsRichText: (content: string) => Promise<boolean>;
@@ -1 +1 @@
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
+ {"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;;;;;;;GAOG;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,8 @@
1
+ /**
2
+ * Returns `name` with a file extension appended when it lacks one.
3
+ * Priority: extension already present → extension from the last segment of `url` → extension from `contentType` via `MIME_TYPE_EXT_MAP`.
4
+ */
5
+ export declare const ensureDownloadFilename: (name: string, url: string | undefined, contentType: string | undefined) => string;
1
6
  /** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
2
7
  export declare const getFileExtensionForLanguage: (language: string) => string;
3
8
  /** Creates a temporary anchor element and clicks it to trigger a browser download for `href`. */
@@ -1 +1 @@
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;AASvD,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAWtE,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,EAAE,UAAU,MAAM,KAAG,IAIlE,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,UAAU,GAAG,SAW9D,CAAC;AAEF,wIAAwI;AACxI,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAG7D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,KAAG,IAKpE,CAAC"}
1
+ {"version":3,"file":"file-download.d.ts","sourceRoot":"","sources":["../../src/utils/file-download.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,MAAM,EACZ,KAAK,MAAM,GAAG,SAAS,EACvB,aAAa,MAAM,GAAG,SAAS,KAC9B,MAkBF,CAAC;AA2CF,2HAA2H;AAC3H,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,KAAG,MACT,CAAC;AASvD,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAWtE,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,EAAE,UAAU,MAAM,KAAG,IAIlE,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,UAAU,GAAG,SAW9D,CAAC;AAEF,wIAAwI;AACxI,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAG7D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,KAAG,IAKpE,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Returns a UUID v4 string, with a fallback for non-secure browser contexts (HTTP deployments). */
2
+ export declare const generateUUID: () => string;
3
+ //# sourceMappingURL=generate-uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-uuid.d.ts","sourceRoot":"","sources":["../../src/utils/generate-uuid.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,eAAO,MAAM,YAAY,QAAO,MAY/B,CAAC"}
@@ -1,3 +1,9 @@
1
+ /** Characters prohibited in conversation names: tab, ", :, ;, /, \, ,, =, {, }, %, & */
2
+ export declare const PROHIBITED_CONVERSATION_NAME_CHARS_RE: RegExp;
3
+ /** Strips characters DIAL Core rejects in a conversation name. */
4
+ export declare const sanitizeConversationName: (name: string) => string;
5
+ /** Strips trailing `.` characters from a name. */
6
+ export declare const stripTrailingDots: (name: string) => string;
1
7
  /** Returns the UTF-8 byte length of `str`. */
2
8
  export declare const getUtf8ByteLength: (str: string) => number;
3
9
  /** Truncates `str` to at most `maxBytes` UTF-8 bytes without splitting multi-byte characters. */
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/utils/string-utils.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,eAAO,MAAM,qCAAqC,QAAsB,CAAC;AAEzE,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,KAAG,MACC,CAAC;AAE1D,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAQhD,CAAC;AAKF,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"}