@epam/ai-dial-conversation-input 0.0.0-dev.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/components/AddAttachmentButton/AddAttachmentButton.d.ts +39 -0
- package/components/AddAttachmentButton/AddAttachmentButton.d.ts.map +1 -0
- package/components/BottomSheet/BottomSheet.d.ts +45 -0
- package/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/components/BottomSheetShell/BottomSheetShell.d.ts +39 -0
- package/components/BottomSheetShell/BottomSheetShell.d.ts.map +1 -0
- package/components/ChatSettingsBottomSheet/ChatSettingsBottomSheet.d.ts +58 -0
- package/components/ChatSettingsBottomSheet/ChatSettingsBottomSheet.d.ts.map +1 -0
- package/components/ChatSettingsFields/ChatSettingsFields.d.ts +40 -0
- package/components/ChatSettingsFields/ChatSettingsFields.d.ts.map +1 -0
- package/components/ChatSettingsModal/ChatSettingsModal.d.ts +46 -0
- package/components/ChatSettingsModal/ChatSettingsModal.d.ts.map +1 -0
- package/components/ConversationInput/ConversationInput.d.ts +4 -0
- package/components/ConversationInput/ConversationInput.d.ts.map +1 -0
- package/components/EditMessageInput/EditMessageInput.d.ts +4 -0
- package/components/EditMessageInput/EditMessageInput.d.ts.map +1 -0
- package/components/Input/Buttons/SendButton.d.ts +12 -0
- package/components/Input/Buttons/SendButton.d.ts.map +1 -0
- package/components/Input/Buttons/StopButton.d.ts +9 -0
- package/components/Input/Buttons/StopButton.d.ts.map +1 -0
- package/components/Input/Input.d.ts +4 -0
- package/components/Input/Input.d.ts.map +1 -0
- package/components/Input/ModelSelectorControl.d.ts +25 -0
- package/components/Input/ModelSelectorControl.d.ts.map +1 -0
- package/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.d.ts +40 -0
- package/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.d.ts.map +1 -0
- package/components/ModelSelectorSkeleton/ModelSelectorSkeleton.d.ts +16 -0
- package/components/ModelSelectorSkeleton/ModelSelectorSkeleton.d.ts.map +1 -0
- package/components/VoiceBar/VoiceBar.d.ts +36 -0
- package/components/VoiceBar/VoiceBar.d.ts.map +1 -0
- package/hooks/useAttachments.d.ts +55 -0
- package/hooks/useAttachments.d.ts.map +1 -0
- package/hooks/useBottomSheet.d.ts +6 -0
- package/hooks/useBottomSheet.d.ts.map +1 -0
- package/hooks/useChatSettingsForm.d.ts +30 -0
- package/hooks/useChatSettingsForm.d.ts.map +1 -0
- package/hooks/useInputHistoryNavigation.d.ts +18 -0
- package/hooks/useInputHistoryNavigation.d.ts.map +1 -0
- package/hooks/useMessageState.d.ts +24 -0
- package/hooks/useMessageState.d.ts.map +1 -0
- package/hooks/useModelSelector.d.ts +35 -0
- package/hooks/useModelSelector.d.ts.map +1 -0
- package/hooks/useVoiceRecorder.d.ts +48 -0
- package/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/index.css +2 -0
- package/index.d.ts +12 -0
- package/index.d.ts.map +1 -0
- package/index.js +83660 -0
- package/models/ConversationInput.d.ts +204 -0
- package/models/ConversationInput.d.ts.map +1 -0
- package/models/Input.d.ts +283 -0
- package/models/Input.d.ts.map +1 -0
- package/package.json +30 -0
- package/test-setup.d.ts +6 -0
- package/test-setup.d.ts.map +1 -0
- package/utils/concurrency.d.ts +17 -0
- package/utils/concurrency.d.ts.map +1 -0
- package/utils/deployment.d.ts +15 -0
- package/utils/deployment.d.ts.map +1 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
import { ChatSettingsConfig } from '../../models/Input';
|
|
3
|
+
/** A single item injected into the attachment menu by the host app. */
|
|
4
|
+
export interface ExtraMenuItem {
|
|
5
|
+
/** Unique key for the item. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Display label. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Icon node rendered to the left of the label. */
|
|
10
|
+
icon: ReactNode;
|
|
11
|
+
/** Callback when the item is selected. */
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** Props for the AddAttachmentButton component. */
|
|
15
|
+
interface AddAttachmentButtonProps {
|
|
16
|
+
/** Callback invoked when the user picks "Attach file". When absent, the "Attach file" item is not rendered. */
|
|
17
|
+
onAttachClick?: () => void;
|
|
18
|
+
/** Label for the "Attach file" menu item. */
|
|
19
|
+
attachLabel: string;
|
|
20
|
+
/** Aria-label for the + trigger button. */
|
|
21
|
+
addMenuTitle: string;
|
|
22
|
+
/** Title shown in the mobile bottom sheet. */
|
|
23
|
+
menuTitle: string;
|
|
24
|
+
/** Close label for the mobile bottom sheet. */
|
|
25
|
+
menuCloseLabel: string;
|
|
26
|
+
/** CSS custom-property overrides forwarded to the mobile BottomSheet. */
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
/** Width class applied to the desktop dropdown list. Defaults to `'!w-[240px]'`. */
|
|
29
|
+
listClassName?: string;
|
|
30
|
+
/** When `true`, the trigger button is disabled and the menu cannot open. */
|
|
31
|
+
isDisabled?: boolean;
|
|
32
|
+
/** When provided, adds a "Chat settings" item that opens the settings modal on desktop and a stacked bottom sheet on mobile. */
|
|
33
|
+
chatSettings?: ChatSettingsConfig;
|
|
34
|
+
/** Additional menu items appended after "Attach file". */
|
|
35
|
+
extraMenuItems?: ExtraMenuItem[];
|
|
36
|
+
}
|
|
37
|
+
export declare const AddAttachmentButton: FC<AddAttachmentButtonProps>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=AddAttachmentButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddAttachmentButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddAttachmentButton/AddAttachmentButton.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,aAAa,EACb,KAAK,EAAE,EACP,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,IAAI,EAAE,SAAS,CAAC;IAChB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,mDAAmD;AACnD,UAAU,wBAAwB;IAChC,+GAA+G;IAC/G,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gIAAgI;IAChI,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,0DAA0D;IAC1D,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAmK5D,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
/** A single action entry in the bottom-sheet menu. */
|
|
3
|
+
export interface BottomSheetItem {
|
|
4
|
+
/** Unique identifier for the item. */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Display label. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Leading icon element. */
|
|
9
|
+
icon: ReactNode;
|
|
10
|
+
/** Optional trailing icon element. */
|
|
11
|
+
iconAfter?: ReactNode;
|
|
12
|
+
/** CSS class applied to the item button text. Defaults to empty string */
|
|
13
|
+
textClassName?: string;
|
|
14
|
+
/** Invoked when the item is tapped; the sheet closes automatically after. */
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
}
|
|
17
|
+
/** Props for the generic mobile bottom-sheet menu. */
|
|
18
|
+
export interface BottomSheetProps {
|
|
19
|
+
/** Controls sheet visibility. */
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
/** Heading text rendered in the sheet header. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** Accessible label for the close (×) button. */
|
|
24
|
+
closeLabel: string;
|
|
25
|
+
/** Called when the sheet should close (backdrop tap, close button, or Escape). */
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
/** Inline CSS custom properties forwarded to the sheet root for theming. */
|
|
28
|
+
style?: CSSProperties;
|
|
29
|
+
/** Actions displayed in the sheet body. */
|
|
30
|
+
items: BottomSheetItem[];
|
|
31
|
+
/** Extra classes appended to the sheet container (e.g. a max-height constraint). */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** CSS class applied to the sheet title. Defaults to `'dial-body-semi-bold-text'`. */
|
|
34
|
+
titleClassName?: string;
|
|
35
|
+
/** CSS class applied to each item label. Defaults to `'dial-small-text'`. */
|
|
36
|
+
itemLabelClassName?: string;
|
|
37
|
+
/** CSS class applied to each item button text. Defaults to empty string */
|
|
38
|
+
btnTextClassName?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A generic bottom-sheet overlay for mobile viewports.
|
|
42
|
+
* Renders the shared {@link BottomSheetShell} with a list of tappable actions.
|
|
43
|
+
*/
|
|
44
|
+
export declare const BottomSheet: FC<BottomSheetProps>;
|
|
45
|
+
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI1D,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,sCAAsC;IACtC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,2CAA2C;IAC3C,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAiD5C,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
/** Props for the shared bottom-sheet overlay shell. */
|
|
3
|
+
export interface BottomSheetShellProps {
|
|
4
|
+
/** Controls sheet visibility. */
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Heading text rendered in the sheet header and used as the dialog
|
|
8
|
+
* accessible name. When omitted the header is hidden entirely.
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Accessible label for the close (×) button. Required when `title` is provided. */
|
|
12
|
+
closeLabel?: string;
|
|
13
|
+
/** Called when the sheet should close (backdrop tap, close button, or Escape). */
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
/** When provided, a back-arrow button is shown at the start of the header. */
|
|
16
|
+
onBack?: () => void;
|
|
17
|
+
/** Accessible label for the back button. Required when `onBack` is provided. */
|
|
18
|
+
backLabel?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Accessible name for the dialog when no `title` is shown.
|
|
21
|
+
* Ignored when `title` is present (title doubles as the accessible name).
|
|
22
|
+
*/
|
|
23
|
+
'aria-label'?: string;
|
|
24
|
+
/** Inline CSS custom properties forwarded to the sheet root for theming. */
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
/** CSS class applied to the sheet title. Defaults to `'dial-body-semi-bold-text'`. */
|
|
27
|
+
titleClassName?: string;
|
|
28
|
+
/** Extra classes appended to the sheet container (e.g. a max-height constraint). */
|
|
29
|
+
className?: string;
|
|
30
|
+
/** Sheet body rendered below the header divider. */
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Generic mobile bottom-sheet shell: renders a portal with a backdrop, a fixed
|
|
35
|
+
* bottom-anchored panel, and an optional header. Handles Escape-to-close and
|
|
36
|
+
* body scroll locking. Consumers supply the body.
|
|
37
|
+
*/
|
|
38
|
+
export declare const BottomSheetShell: FC<BottomSheetShellProps>;
|
|
39
|
+
//# sourceMappingURL=BottomSheetShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetShell.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheetShell/BottomSheetShell.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA4EtD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DeploymentFeatures, ResponseFormat } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { CSSProperties, FC } from 'react';
|
|
3
|
+
import { ChatSettingsValues } from '../../models/Input';
|
|
4
|
+
/** Props for the ChatSettingsBottomSheet component. */
|
|
5
|
+
export interface ChatSettingsBottomSheetProps {
|
|
6
|
+
/** Controls sheet visibility. */
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
/** Called when the back arrow is tapped — returns to the previous sheet. */
|
|
9
|
+
onBack: () => void;
|
|
10
|
+
/** Accessible label for the back arrow button. */
|
|
11
|
+
backLabel: string;
|
|
12
|
+
/** Called when the close (×) button is tapped — dismisses the sheet entirely. */
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
/** Accessible label for the close (×) button. */
|
|
15
|
+
closeLabel: string;
|
|
16
|
+
/** Inline CSS custom properties forwarded to the sheet root for theming. */
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
/** Feature flags for the active deployment — controls which fields are shown. */
|
|
19
|
+
features: DeploymentFeatures;
|
|
20
|
+
/** Current response format value pre-selected in the radio group. */
|
|
21
|
+
initialResponseFormat: ResponseFormat;
|
|
22
|
+
/** Current system prompt value pre-populated in the textarea. */
|
|
23
|
+
initialSystemPrompt: string;
|
|
24
|
+
/** Current temperature value pre-populated in the slider. */
|
|
25
|
+
initialTemperature: number;
|
|
26
|
+
/** Called with the updated values when the user saves. */
|
|
27
|
+
onSave: (values: ChatSettingsValues) => void;
|
|
28
|
+
/** Sheet title. Defaults to `'Chat settings'`. */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** Label for the response format field. Defaults to `'Response format'`. */
|
|
31
|
+
responseFormatLabel?: string;
|
|
32
|
+
/** Helper text shown below the response format field. Defaults to `'Applies to new and existing messages'`. */
|
|
33
|
+
responseFormatHint?: string;
|
|
34
|
+
/** Label for the Markdown radio option. Defaults to `'Markdown'`. */
|
|
35
|
+
responseFormatMarkdownLabel?: string;
|
|
36
|
+
/** Label for the Plain text radio option. Defaults to `'Plain text'`. */
|
|
37
|
+
responseFormatPlainTextLabel?: string;
|
|
38
|
+
/** Label for the system prompt field. Defaults to `'System prompt'`. */
|
|
39
|
+
systemPromptLabel?: string;
|
|
40
|
+
/** Placeholder shown in the system prompt textarea. Defaults to `'Enter a prompt'`. */
|
|
41
|
+
systemPromptTooltip?: string;
|
|
42
|
+
/** Label for the temperature field. Defaults to `'Temperature'`. */
|
|
43
|
+
temperatureLabel?: string;
|
|
44
|
+
/** Labels rendered below the temperature slider track: [start, middle, end]. Defaults to `['Precise', 'Neutral', 'Creative']`. */
|
|
45
|
+
temperatureLabels?: [string, string, string];
|
|
46
|
+
/** Helper text shown below the temperature field. */
|
|
47
|
+
temperatureHint?: string;
|
|
48
|
+
/** Label for the save button. Defaults to `'Apply changes'`. */
|
|
49
|
+
saveLabel?: string;
|
|
50
|
+
/** Tooltip shown on the save button when it is disabled (e.g. no response format selected). */
|
|
51
|
+
saveDisabledTooltip?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Mobile bottom sheet that renders the chat-settings form inline with a back
|
|
55
|
+
* arrow to return to the preceding sheet.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ChatSettingsBottomSheet: FC<ChatSettingsBottomSheetProps>;
|
|
58
|
+
//# sourceMappingURL=ChatSettingsBottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatSettingsBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSettingsBottomSheet/ChatSettingsBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAgB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAI7D,uDAAuD;AACvD,MAAM,WAAW,4BAA4B;IAC3C,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iFAAiF;IACjF,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,qEAAqE;IACrE,qBAAqB,EAAE,cAAc,CAAC;IACtC,iEAAiE;IACjE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+GAA+G;IAC/G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kIAAkI;IAClI,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAwFpE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DeploymentFeatures, ResponseFormat } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
/** Props for the shared chat-settings form fields. */
|
|
4
|
+
export interface ChatSettingsFieldsProps {
|
|
5
|
+
/** Feature flags controlling which fields are rendered. */
|
|
6
|
+
features: DeploymentFeatures;
|
|
7
|
+
/** Current response format value. `undefined` when no option is selected. */
|
|
8
|
+
responseFormat: ResponseFormat | undefined;
|
|
9
|
+
/** Current system prompt value. */
|
|
10
|
+
systemPrompt: string;
|
|
11
|
+
/** Current temperature value. */
|
|
12
|
+
temperature: number;
|
|
13
|
+
/** Called when the response format radio selection changes. */
|
|
14
|
+
onResponseFormatChange: (v: ResponseFormat) => void;
|
|
15
|
+
/** Called when the system prompt textarea value changes. */
|
|
16
|
+
onSystemPromptChange: (v: string) => void;
|
|
17
|
+
/** Called when the temperature slider value changes. */
|
|
18
|
+
onTemperatureChange: (v: number) => void;
|
|
19
|
+
/** Label for the response format field. Defaults to `'Response format'`. */
|
|
20
|
+
responseFormatLabel?: string;
|
|
21
|
+
/** Helper text shown below the response format field. Defaults to `'Applies to new and existing messages'`. */
|
|
22
|
+
responseFormatHint?: string;
|
|
23
|
+
/** Label for the Markdown radio option. Defaults to `'Markdown'`. */
|
|
24
|
+
responseFormatMarkdownLabel?: string;
|
|
25
|
+
/** Label for the Plain text radio option. Defaults to `'Plain text'`. */
|
|
26
|
+
responseFormatPlainTextLabel?: string;
|
|
27
|
+
/** Label for the system prompt field. Defaults to `'System prompt'`. */
|
|
28
|
+
systemPromptLabel?: string;
|
|
29
|
+
/** Placeholder shown in the system prompt textarea. Defaults to `'Enter a prompt'`. */
|
|
30
|
+
systemPromptTooltip?: string;
|
|
31
|
+
/** Label for the temperature field. Defaults to `'Temperature'`. */
|
|
32
|
+
temperatureLabel?: string;
|
|
33
|
+
/** Labels rendered below the temperature slider track: [start, middle, end]. Defaults to `['Precise', 'Neutral', 'Creative']`. */
|
|
34
|
+
temperatureLabels?: [string, string, string];
|
|
35
|
+
/** Helper text shown below the temperature field. */
|
|
36
|
+
temperatureHint?: string;
|
|
37
|
+
}
|
|
38
|
+
/** Shared form fields for the chat-settings UI, used by both the desktop modal and mobile bottom sheet. */
|
|
39
|
+
export declare const ChatSettingsFields: FC<ChatSettingsFieldsProps>;
|
|
40
|
+
//# sourceMappingURL=ChatSettingsFields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatSettingsFields.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSettingsFields/ChatSettingsFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAO3D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,sDAAsD;AACtD,MAAM,WAAW,uBAAuB;IACtC,2DAA2D;IAC3D,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,6EAA6E;IAC7E,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,sBAAsB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACpD,4DAA4D;IAC5D,oBAAoB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wDAAwD;IACxD,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+GAA+G;IAC/G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kIAAkI;IAClI,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAqE1D,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DeploymentFeatures, ResponseFormat } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { ChatSettingsValues } from '../../models/Input';
|
|
4
|
+
/** Props for the ChatSettingsModal component. */
|
|
5
|
+
export interface ChatSettingsModalProps {
|
|
6
|
+
/** Feature flags for the active deployment — controls which fields are shown. */
|
|
7
|
+
features: DeploymentFeatures;
|
|
8
|
+
/** Current response format value pre-selected in the radio group. */
|
|
9
|
+
initialResponseFormat: ResponseFormat;
|
|
10
|
+
/** Current system prompt value pre-populated in the textarea. */
|
|
11
|
+
initialSystemPrompt: string;
|
|
12
|
+
/** Current temperature value pre-populated in the slider. */
|
|
13
|
+
initialTemperature: number;
|
|
14
|
+
/** Called with the updated values when the modal closes. */
|
|
15
|
+
onSave: (values: ChatSettingsValues) => void;
|
|
16
|
+
/** Called when the modal should close. */
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
/** Modal title. Defaults to `'Chat settings'`. */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** Label for the response format field. Defaults to `'Response format'`. */
|
|
21
|
+
responseFormatLabel?: string;
|
|
22
|
+
/** Helper text shown below the response format field. Defaults to `'Applies to new and existing messages'`. */
|
|
23
|
+
responseFormatHint?: string;
|
|
24
|
+
/** Label for the Markdown radio option. Defaults to `'Markdown'`. */
|
|
25
|
+
responseFormatMarkdownLabel?: string;
|
|
26
|
+
/** Label for the Plain text radio option. Defaults to `'Plain text'`. */
|
|
27
|
+
responseFormatPlainTextLabel?: string;
|
|
28
|
+
/** Label for the system prompt field. Defaults to `'System prompt'`. */
|
|
29
|
+
systemPromptLabel?: string;
|
|
30
|
+
/** Tooltip shown on the system prompt input. Defaults to `'Enter a prompt'`. */
|
|
31
|
+
systemPromptTooltip?: string;
|
|
32
|
+
/** Label for the temperature field. Defaults to `'Temperature'`. */
|
|
33
|
+
temperatureLabel?: string;
|
|
34
|
+
/** Labels rendered below the temperature slider track: [start, middle, end]. Defaults to `['Precise', 'Neutral', 'Creative']`. */
|
|
35
|
+
temperatureLabels?: [string, string, string];
|
|
36
|
+
/** Helper text shown below the temperature field. */
|
|
37
|
+
temperatureHint?: string;
|
|
38
|
+
/** Label for the save button. Defaults to `'Apply changes'`. */
|
|
39
|
+
saveLabel?: string;
|
|
40
|
+
/** Tooltip shown on the save button when it is disabled (e.g. no response format selected). */
|
|
41
|
+
saveDisabledTooltip?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const ChatSettingsModal: FC<ChatSettingsModalProps>;
|
|
44
|
+
declare const _default: import('react').NamedExoticComponent<ChatSettingsModalProps>;
|
|
45
|
+
export default _default;
|
|
46
|
+
//# sourceMappingURL=ChatSettingsModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatSettingsModal.d.ts","sourceRoot":"","sources":["../../../src/components/ChatSettingsModal/ChatSettingsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,iDAAiD;AACjD,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,qEAAqE;IACrE,qBAAqB,EAAE,cAAc,CAAC;IACtC,iEAAiE;IACjE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+GAA+G;IAC/G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kIAAkI;IAClI,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAgFxD,CAAC;;AAEF,wBAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationInput.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationInput/ConversationInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAI7E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA+CxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditMessageInput.d.ts","sourceRoot":"","sources":["../../../src/components/EditMessageInput/EditMessageInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAI5E,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAuItD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for the {@link SendButton} component. */
|
|
3
|
+
export interface SendButtonProps {
|
|
4
|
+
onSend?: () => void;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
/** Accessible label for the send button. */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/** Tooltip shown on hover. */
|
|
9
|
+
title?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const SendButton: FC<SendButtonProps>;
|
|
12
|
+
//# sourceMappingURL=SendButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Buttons/SendButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsB1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Buttons/StopButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CAmBhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAeA,OAAO,EAEL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAyZhC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { InputProps } from '../../models/Input';
|
|
3
|
+
interface Props {
|
|
4
|
+
deployments: InputProps['deployments'];
|
|
5
|
+
selectedDeploymentId: InputProps['selectedDeploymentId'];
|
|
6
|
+
onDeploymentChange: InputProps['onDeploymentChange'];
|
|
7
|
+
modelSelectorLabels: InputProps['modelSelectorLabels'];
|
|
8
|
+
isStreaming: boolean;
|
|
9
|
+
isMobile: boolean;
|
|
10
|
+
isInputDisabled?: boolean;
|
|
11
|
+
style: CSSProperties;
|
|
12
|
+
modelPickerOverlay: InputProps['modelPickerOverlay'];
|
|
13
|
+
/** Whether the model picker popover is open (controlled from Input). */
|
|
14
|
+
isPickerOpen?: boolean;
|
|
15
|
+
/** Toggles the model picker popover open/closed. */
|
|
16
|
+
onPickerToggle?: () => void;
|
|
17
|
+
/** Called by DialDropdown when open state changes (e.g. outside click). */
|
|
18
|
+
onPickerOpenChange?: (open: boolean) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Renders model selection control as a dropdown on desktop and as a bottom sheet on mobile.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ModelSelectorControl: FC<Props>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=ModelSelectorControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelSelectorControl.d.ts","sourceRoot":"","sources":["../../../src/components/Input/ModelSelectorControl.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,UAAU,KAAK;IACb,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACvC,oBAAoB,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;IACzD,kBAAkB,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACrD,mBAAmB,EAAE,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,aAAa,CAAC;IACrB,kBAAkB,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACrD,wEAAwE;IACxE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CA+I1C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DeploymentItem } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { CSSProperties, FC } from 'react';
|
|
3
|
+
/** Props for the mobile bottom-sheet model selector. */
|
|
4
|
+
export interface ModelSelectorBottomSheetProps {
|
|
5
|
+
/** Controls sheet visibility. */
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
/** Title displayed in the sheet header and used as the dialog accessible name. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Accessible label for the close (×) button. */
|
|
10
|
+
closeLabel: string;
|
|
11
|
+
/** Placeholder text for the search input. Defaults to `'Search'`. */
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
/** Called when the sheet should close (backdrop tap, close button, or Escape). */
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
/** Full list of deployments to display. When `undefined` or empty, a state label is shown. `iconUrl` must already be resolved by the host app. */
|
|
16
|
+
deployments?: DeploymentItem[];
|
|
17
|
+
/** ID of the currently selected deployment. Shown with a checkmark. */
|
|
18
|
+
selectedDeploymentId?: string | null;
|
|
19
|
+
/** Called when the user taps a deployment; the sheet closes automatically after. */
|
|
20
|
+
onSelect: (id: string) => void;
|
|
21
|
+
/** Label shown as a disabled item while deployments are loading. */
|
|
22
|
+
loadingLabel?: string;
|
|
23
|
+
/** Label shown as a disabled item when the deployments fetch failed. */
|
|
24
|
+
errorLabel?: string;
|
|
25
|
+
/** Label shown as a disabled item when the deployments list is empty. */
|
|
26
|
+
emptyLabel?: string;
|
|
27
|
+
/** Inline CSS custom properties forwarded to the sheet root for theming. */
|
|
28
|
+
style?: CSSProperties;
|
|
29
|
+
/** CSS class applied to the sheet title. Defaults to `'dial-body-semi-bold-text'`. */
|
|
30
|
+
titleClassName?: string;
|
|
31
|
+
/** CSS class applied to each item label and the state label. Defaults to `'dial-small-text'`. */
|
|
32
|
+
labelClassName?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A bottom-sheet overlay for the model/deployment selector on mobile viewports.
|
|
36
|
+
* Renders the shared {@link BottomSheetShell} with a search input that filters
|
|
37
|
+
* the deployment list (virtualized for large lists) as the user types.
|
|
38
|
+
*/
|
|
39
|
+
export declare const ModelSelectorBottomSheet: FC<ModelSelectorBottomSheetProps>;
|
|
40
|
+
//# sourceMappingURL=ModelSelectorBottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelSelectorBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,2BAA2B,CAAC;AAS9E,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AA4EzE,wDAAwD;AACxD,MAAM,WAAW,6BAA6B;IAC5C,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kJAAkJ;IAClJ,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CA+FtE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare const MODEL_SELECTOR_SKELETON_ROW_COUNT = 7;
|
|
3
|
+
interface ModelSelectorSkeletonIconProps {
|
|
4
|
+
size?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const ModelSelectorSkeletonIcon: FC<ModelSelectorSkeletonIconProps>;
|
|
7
|
+
interface ModelSelectorSkeletonLabelProps {
|
|
8
|
+
loadingLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ModelSelectorSkeletonLabel: FC<ModelSelectorSkeletonLabelProps>;
|
|
11
|
+
interface ModelSelectorSkeletonRowsProps {
|
|
12
|
+
loadingLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ModelSelectorSkeletonRows: FC<ModelSelectorSkeletonRowsProps>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ModelSelectorSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelSelectorSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/ModelSelectorSkeleton/ModelSelectorSkeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,UAAU,8BAA8B;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CASxE,CAAC;AAEF,UAAU,+BAA+B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,EAAE,EAAE,CACzC,+BAA+B,CAWhC,CAAC;AAEF,UAAU,8BAA8B;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAiBxE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { VoiceRecorderState } from '../../hooks/useVoiceRecorder';
|
|
3
|
+
/** Props accepted by the `VoiceBar` component. */
|
|
4
|
+
export interface VoiceBarProps {
|
|
5
|
+
/** Current recorder state — must not be `'idle'` when this component is rendered. */
|
|
6
|
+
state: VoiceRecorderState;
|
|
7
|
+
/** Accumulated RMS amplitude history. `null` before recording starts. */
|
|
8
|
+
waveformData: Float32Array | null;
|
|
9
|
+
/** Error message in `error` state; `null` otherwise. */
|
|
10
|
+
errorMessage: string | null;
|
|
11
|
+
/** Called when the user clicks the red mic button to stop recording. */
|
|
12
|
+
onStop: () => void;
|
|
13
|
+
/** Called when the user clicks the checkmark to confirm, or retry after an error. */
|
|
14
|
+
onConfirm: () => void;
|
|
15
|
+
/** Called when the user clicks the X to discard the recording or cancel uploading. */
|
|
16
|
+
onDiscard: () => void;
|
|
17
|
+
/** Accessible label for the stop-recording mic button. Defaults to `'Stop recording'`. */
|
|
18
|
+
stopLabel?: string;
|
|
19
|
+
/** Accessible label for the confirm / retry button. Defaults to `'Send voice message'`. */
|
|
20
|
+
confirmLabel?: string;
|
|
21
|
+
/** Accessible label for the discard / cancel button. Defaults to `'Discard recording'`. */
|
|
22
|
+
discardLabel?: string;
|
|
23
|
+
/** Accessible label for the uploading progress indicator. Defaults to `'Uploading…'`. */
|
|
24
|
+
uploadingLabel?: string;
|
|
25
|
+
/** CSS custom properties forwarded from the parent (e.g. `--ci-bg`, `--ci-border`). */
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
/** Extra class names applied to the root element. */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Renders the voice recording bar: waveform canvas, state-based controls,
|
|
32
|
+
* and an error text for the `error` state. Replaces the `Input` component
|
|
33
|
+
* while voice state is not `idle`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const VoiceBar: FC<VoiceBarProps>;
|
|
36
|
+
//# sourceMappingURL=VoiceBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceBar.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceBar/VoiceBar.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,EAAE,EAIR,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AASlE,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,qFAAqF;IACrF,KAAK,EAAE,kBAAkB,CAAC;IAC1B,yEAAyE;IACzE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,wDAAwD;IACxD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,wEAAwE;IACxE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,qFAAqF;IACrF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,sFAAsF;IACtF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uFAAuF;IACvF,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAyNtC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Attachment, AttachmentErrorReason } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/** Parameters for the {@link useAttachments} hook. */
|
|
3
|
+
interface UseAttachmentsParams {
|
|
4
|
+
/** Attachments pre-populated in the tray on mount. */
|
|
5
|
+
initialAttachments: Attachment[];
|
|
6
|
+
/** Called immediately after an attachment is added. Resolves with the uploaded URL. */
|
|
7
|
+
onUploadAttachment?: (attachment: Attachment) => Promise<string>;
|
|
8
|
+
/** Called whenever the attachment list changes. */
|
|
9
|
+
onAttachmentsChange?: (attachments: Attachment[]) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Called synchronously for each new attachment before upload begins.
|
|
12
|
+
* Return an `AttachmentErrorReason` to reject; return `undefined` to allow.
|
|
13
|
+
*/
|
|
14
|
+
validateAttachment?: (attachment: Attachment) => AttachmentErrorReason | undefined;
|
|
15
|
+
/** Files dropped onto the parent awaiting processing. */
|
|
16
|
+
pendingDropFiles: File[];
|
|
17
|
+
/** Called after `pendingDropFiles` have been consumed. */
|
|
18
|
+
onDropFilesConsumed?: () => void;
|
|
19
|
+
/** Already-uploaded attachments supplied by the host awaiting insertion. */
|
|
20
|
+
pendingAttachments: Attachment[];
|
|
21
|
+
/** Called after `pendingAttachments` have been inserted. */
|
|
22
|
+
onPendingAttachmentsConsumed?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Called when a pasted-text attachment is expanded back into the textarea.
|
|
25
|
+
* Receives the plain-text content of the attachment.
|
|
26
|
+
*/
|
|
27
|
+
onExpandPastedText?: (text: string) => void;
|
|
28
|
+
}
|
|
29
|
+
/** Return value of the {@link useAttachments} hook. */
|
|
30
|
+
export interface UseAttachmentsResult {
|
|
31
|
+
/** Current attachment list. */
|
|
32
|
+
attachments: Attachment[];
|
|
33
|
+
/** Build `Attachment` objects from raw `File` instances (without uploading). */
|
|
34
|
+
buildAttachments: (files: File[]) => Attachment[];
|
|
35
|
+
/** Add attachments to the tray, uploading each one unless `upload` is `false`. */
|
|
36
|
+
addAttachments: (newAttachments: Attachment[], upload?: boolean) => void;
|
|
37
|
+
/** Override the attachment list entirely (used after send success/failure). */
|
|
38
|
+
resetAttachments: (items: Attachment[]) => void;
|
|
39
|
+
/** Remove a single attachment by id, revoking its preview URL if present. */
|
|
40
|
+
handleRemove: (id: string) => void;
|
|
41
|
+
/** Retry uploading a previously failed attachment. */
|
|
42
|
+
handleRetry: (id: string) => void;
|
|
43
|
+
/** Expand a pasted-text attachment back into the textarea. */
|
|
44
|
+
handleExpand: (id: string) => Promise<void>;
|
|
45
|
+
/** `true` when any attachment is still uploading or in an error state. */
|
|
46
|
+
hasBlockedAttachments: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Manages all attachment state and side-effects for the `Input` component:
|
|
50
|
+
* building, uploading, adding, removing, retrying, expanding, and consuming
|
|
51
|
+
* pending drop/attachment queues.
|
|
52
|
+
*/
|
|
53
|
+
export declare const useAttachments: ({ initialAttachments, onUploadAttachment, onAttachmentsChange, validateAttachment, pendingDropFiles, onDropFilesConsumed, pendingAttachments, onPendingAttachmentsConsumed, onExpandPastedText, }: UseAttachmentsParams) => UseAttachmentsResult;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=useAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttachments.d.ts","sourceRoot":"","sources":["../../src/hooks/useAttachments.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,qBAAqB,EAGtB,MAAM,2BAA2B,CAAC;AAInC,sDAAsD;AACtD,UAAU,oBAAoB;IAC5B,sDAAsD;IACtD,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,mDAAmD;IACnD,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAC1D;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CACnB,UAAU,EAAE,UAAU,KACnB,qBAAqB,GAAG,SAAS,CAAC;IACvC,yDAAyD;IACzD,gBAAgB,EAAE,IAAI,EAAE,CAAC;IACzB,0DAA0D;IAC1D,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,4EAA4E;IAC5E,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,4DAA4D;IAC5D,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1C;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,uDAAuD;AACvD,MAAM,WAAW,oBAAoB;IACnC,+BAA+B;IAC/B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,gFAAgF;IAChF,gBAAgB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,CAAC;IAClD,kFAAkF;IAClF,cAAc,EAAE,CAAC,cAAc,EAAE,UAAU,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,+EAA+E;IAC/E,gBAAgB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAChD,6EAA6E;IAC7E,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,sDAAsD;IACtD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,8DAA8D;IAC9D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,0EAA0E;IAC1E,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,mMAU5B,oBAAoB,KAAG,oBA4LzB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared behavior for bottom-sheet overlays: closes the sheet on `Escape`
|
|
3
|
+
* and locks body scrolling while the sheet is open. No-op while closed.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useBottomSheet: (isOpen: boolean, onClose: () => void) => void;
|
|
6
|
+
//# sourceMappingURL=useBottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBottomSheet.d.ts","sourceRoot":"","sources":["../../src/hooks/useBottomSheet.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,OAAO,EAAE,SAAS,MAAM,IAAI,KAAG,IAiBrE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ResponseFormat, DeploymentFeatures } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { ChatSettingsValues } from '../models/Input';
|
|
3
|
+
interface UseChatSettingsFormParams {
|
|
4
|
+
/** Feature flags controlling which fields are included on submit. */
|
|
5
|
+
features: DeploymentFeatures;
|
|
6
|
+
initialResponseFormat: ResponseFormat;
|
|
7
|
+
initialSystemPrompt: string;
|
|
8
|
+
initialTemperature: number;
|
|
9
|
+
onSave: (values: ChatSettingsValues) => void;
|
|
10
|
+
/** Called after a successful save. */
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* When provided, the form resets to initial values whenever this transitions
|
|
14
|
+
* from `false` to `true` — i.e. when a persistent sheet re-opens.
|
|
15
|
+
*/
|
|
16
|
+
isOpen?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Manages form state and the submit handler for chat settings. */
|
|
19
|
+
export declare const useChatSettingsForm: ({ features, initialResponseFormat, initialSystemPrompt, initialTemperature, onSave, onClose, isOpen, }: UseChatSettingsFormParams) => {
|
|
20
|
+
responseFormat: ResponseFormat | undefined;
|
|
21
|
+
systemPrompt: string;
|
|
22
|
+
temperature: number;
|
|
23
|
+
canSubmit: boolean;
|
|
24
|
+
setResponseFormat: import('react').Dispatch<import('react').SetStateAction<ResponseFormat | undefined>>;
|
|
25
|
+
setSystemPrompt: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
26
|
+
setTemperature: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
27
|
+
handleSubmit: () => void;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=useChatSettingsForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChatSettingsForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatSettingsForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,UAAU,yBAAyB;IACjC,qEAAqE;IACrE,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,qBAAqB,EAAE,cAAc,CAAC;IACtC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,GAAI,wGAQjC,yBAAyB;;;;;;;;;CAgD3B,CAAC"}
|