claudius-chat-widget 1.16.0 → 1.17.0
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/dist/claudius.cjs +16 -6
- package/dist/claudius.css +1 -1
- package/dist/claudius.iife.js +26 -16
- package/dist/claudius.js +1692 -1153
- package/dist/index.d.cts +38 -1
- package/dist/index.d.ts +38 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -282,6 +282,11 @@ export declare class ChatApiClient {
|
|
|
282
282
|
attachments?: ChatAttachment[];
|
|
283
283
|
/** Tools the assistant called while producing this message, when any. */
|
|
284
284
|
toolUses?: ToolUse[];
|
|
285
|
+
/**
|
|
286
|
+
* ISO 8601 time the message was added to the conversation. Absent on
|
|
287
|
+
* messages persisted by widget versions that predate conversation export.
|
|
288
|
+
*/
|
|
289
|
+
createdAt?: string;
|
|
285
290
|
}
|
|
286
291
|
|
|
287
292
|
/**
|
|
@@ -347,7 +352,7 @@ export declare class ChatApiClient {
|
|
|
347
352
|
* <ChatWidget apiUrl="https://api.example.com" title="Support" />
|
|
348
353
|
* ```
|
|
349
354
|
*/
|
|
350
|
-
export declare function ChatWidget({ apiUrl, title, subtitle, welcomeMessage, placeholder, persistMessages, storageKeyPrefix, requestTimeoutMs, theme, accentColor, position, locale, translations: translationOverrides, triggers, plugins, streaming, attachments, voice, }: ChatWidgetProps): JSX_2.Element;
|
|
355
|
+
export declare function ChatWidget({ apiUrl, title, subtitle, welcomeMessage, placeholder, persistMessages, storageKeyPrefix, requestTimeoutMs, theme, accentColor, position, locale, translations: translationOverrides, triggers, plugins, streaming, attachments, voice, conversationExport, }: ChatWidgetProps): JSX_2.Element;
|
|
351
356
|
|
|
352
357
|
/**
|
|
353
358
|
* Props for the {@link ChatWidget} component.
|
|
@@ -425,6 +430,14 @@ export declare class ChatApiClient {
|
|
|
425
430
|
* @defaultValue `false`
|
|
426
431
|
*/
|
|
427
432
|
voice?: boolean | VoiceOptions;
|
|
433
|
+
/**
|
|
434
|
+
* Let visitors copy the conversation as Markdown, or download it as
|
|
435
|
+
* Markdown or JSON, from a menu in the chat header. Everything happens in
|
|
436
|
+
* the browser and nothing is sent to the Worker. Only the literal `true`
|
|
437
|
+
* enables it. See the Conversation export guide.
|
|
438
|
+
* @defaultValue `false`
|
|
439
|
+
*/
|
|
440
|
+
conversationExport?: boolean;
|
|
428
441
|
}
|
|
429
442
|
|
|
430
443
|
/** An analytics event emitted by {@link pluginAnalytics}. */
|
|
@@ -604,6 +617,30 @@ export declare class ChatApiClient {
|
|
|
604
617
|
resumeReading: string;
|
|
605
618
|
/** Accessible label for stopping read-aloud playback. */
|
|
606
619
|
stopReading: string;
|
|
620
|
+
/** Accessible label for the header's overflow menu button. */
|
|
621
|
+
moreOptions: string;
|
|
622
|
+
/** Menu item that copies the conversation to the clipboard as Markdown. */
|
|
623
|
+
copyAsMarkdown: string;
|
|
624
|
+
/** Menu item that downloads the conversation as a Markdown file. */
|
|
625
|
+
downloadAsMarkdown: string;
|
|
626
|
+
/** Menu item that downloads the conversation as a JSON file. */
|
|
627
|
+
downloadAsJson: string;
|
|
628
|
+
/** Status shown after the conversation was copied. */
|
|
629
|
+
copiedToClipboard: string;
|
|
630
|
+
/** Status shown when the conversation could not be copied. */
|
|
631
|
+
copyFailed: string;
|
|
632
|
+
/** Title of an exported transcript. */
|
|
633
|
+
transcriptTitle: string;
|
|
634
|
+
/** Line under the transcript title; supports `{date}`. */
|
|
635
|
+
transcriptExported: string;
|
|
636
|
+
/** Transcript heading for a visitor message. */
|
|
637
|
+
transcriptUser: string;
|
|
638
|
+
/** Transcript heading for an assistant message. */
|
|
639
|
+
transcriptAssistant: string;
|
|
640
|
+
/** Transcript label above a message's attachment list, including its colon. */
|
|
641
|
+
transcriptAttachments: string;
|
|
642
|
+
/** Transcript label above a message's citation list, including its colon. */
|
|
643
|
+
transcriptSources: string;
|
|
607
644
|
/** Generic fallback error message. */
|
|
608
645
|
errorGeneric: string;
|
|
609
646
|
/** Error shown when the network request fails. */
|
package/dist/index.d.ts
CHANGED
|
@@ -282,6 +282,11 @@ export declare class ChatApiClient {
|
|
|
282
282
|
attachments?: ChatAttachment[];
|
|
283
283
|
/** Tools the assistant called while producing this message, when any. */
|
|
284
284
|
toolUses?: ToolUse[];
|
|
285
|
+
/**
|
|
286
|
+
* ISO 8601 time the message was added to the conversation. Absent on
|
|
287
|
+
* messages persisted by widget versions that predate conversation export.
|
|
288
|
+
*/
|
|
289
|
+
createdAt?: string;
|
|
285
290
|
}
|
|
286
291
|
|
|
287
292
|
/**
|
|
@@ -347,7 +352,7 @@ export declare class ChatApiClient {
|
|
|
347
352
|
* <ChatWidget apiUrl="https://api.example.com" title="Support" />
|
|
348
353
|
* ```
|
|
349
354
|
*/
|
|
350
|
-
export declare function ChatWidget({ apiUrl, title, subtitle, welcomeMessage, placeholder, persistMessages, storageKeyPrefix, requestTimeoutMs, theme, accentColor, position, locale, translations: translationOverrides, triggers, plugins, streaming, attachments, voice, }: ChatWidgetProps): JSX_2.Element;
|
|
355
|
+
export declare function ChatWidget({ apiUrl, title, subtitle, welcomeMessage, placeholder, persistMessages, storageKeyPrefix, requestTimeoutMs, theme, accentColor, position, locale, translations: translationOverrides, triggers, plugins, streaming, attachments, voice, conversationExport, }: ChatWidgetProps): JSX_2.Element;
|
|
351
356
|
|
|
352
357
|
/**
|
|
353
358
|
* Props for the {@link ChatWidget} component.
|
|
@@ -425,6 +430,14 @@ export declare class ChatApiClient {
|
|
|
425
430
|
* @defaultValue `false`
|
|
426
431
|
*/
|
|
427
432
|
voice?: boolean | VoiceOptions;
|
|
433
|
+
/**
|
|
434
|
+
* Let visitors copy the conversation as Markdown, or download it as
|
|
435
|
+
* Markdown or JSON, from a menu in the chat header. Everything happens in
|
|
436
|
+
* the browser and nothing is sent to the Worker. Only the literal `true`
|
|
437
|
+
* enables it. See the Conversation export guide.
|
|
438
|
+
* @defaultValue `false`
|
|
439
|
+
*/
|
|
440
|
+
conversationExport?: boolean;
|
|
428
441
|
}
|
|
429
442
|
|
|
430
443
|
/** An analytics event emitted by {@link pluginAnalytics}. */
|
|
@@ -604,6 +617,30 @@ export declare class ChatApiClient {
|
|
|
604
617
|
resumeReading: string;
|
|
605
618
|
/** Accessible label for stopping read-aloud playback. */
|
|
606
619
|
stopReading: string;
|
|
620
|
+
/** Accessible label for the header's overflow menu button. */
|
|
621
|
+
moreOptions: string;
|
|
622
|
+
/** Menu item that copies the conversation to the clipboard as Markdown. */
|
|
623
|
+
copyAsMarkdown: string;
|
|
624
|
+
/** Menu item that downloads the conversation as a Markdown file. */
|
|
625
|
+
downloadAsMarkdown: string;
|
|
626
|
+
/** Menu item that downloads the conversation as a JSON file. */
|
|
627
|
+
downloadAsJson: string;
|
|
628
|
+
/** Status shown after the conversation was copied. */
|
|
629
|
+
copiedToClipboard: string;
|
|
630
|
+
/** Status shown when the conversation could not be copied. */
|
|
631
|
+
copyFailed: string;
|
|
632
|
+
/** Title of an exported transcript. */
|
|
633
|
+
transcriptTitle: string;
|
|
634
|
+
/** Line under the transcript title; supports `{date}`. */
|
|
635
|
+
transcriptExported: string;
|
|
636
|
+
/** Transcript heading for a visitor message. */
|
|
637
|
+
transcriptUser: string;
|
|
638
|
+
/** Transcript heading for an assistant message. */
|
|
639
|
+
transcriptAssistant: string;
|
|
640
|
+
/** Transcript label above a message's attachment list, including its colon. */
|
|
641
|
+
transcriptAttachments: string;
|
|
642
|
+
/** Transcript label above a message's citation list, including its colon. */
|
|
643
|
+
transcriptSources: string;
|
|
607
644
|
/** Generic fallback error message. */
|
|
608
645
|
errorGeneric: string;
|
|
609
646
|
/** Error shown when the network request fails. */
|
package/package.json
CHANGED