@epam/ai-dial-conversation-input 1.3.0-dev.98 → 1.4.0-dev.5
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 +1 -1
- package/components/AddAttachmentButton/AddAttachmentButton.d.ts.map +1 -1
- package/components/ChatSettingsModal/ChatSettingsModal.d.ts +4 -7
- package/components/ChatSettingsModal/ChatSettingsModal.d.ts.map +1 -1
- package/components/ConversationInput/ConversationInput.d.ts.map +1 -1
- package/components/EditMessageInput/EditMessageInput.d.ts.map +1 -1
- package/components/Input/Input.d.ts.map +1 -1
- package/components/Input/InputAttachButton.d.ts +45 -0
- package/components/Input/InputAttachButton.d.ts.map +1 -0
- package/components/Input/InputCommandMenuArea.d.ts +48 -0
- package/components/Input/InputCommandMenuArea.d.ts.map +1 -0
- package/components/Input/InputTextareaArea.d.ts +22 -0
- package/components/Input/InputTextareaArea.d.ts.map +1 -0
- package/components/Input/ModelSelectorControl.d.ts +2 -0
- package/components/Input/ModelSelectorControl.d.ts.map +1 -1
- package/components/Input/hooks/useCommandMenuAnchor.d.ts +36 -0
- package/components/Input/hooks/useCommandMenuAnchor.d.ts.map +1 -0
- package/components/Input/hooks/useCommandMenuController.d.ts +49 -0
- package/components/Input/hooks/useCommandMenuController.d.ts.map +1 -0
- package/components/Input/hooks/useDismissibleTools.d.ts +18 -0
- package/components/Input/hooks/useDismissibleTools.d.ts.map +1 -0
- package/components/Input/hooks/usePasteHandling.d.ts +21 -0
- package/components/Input/hooks/usePasteHandling.d.ts.map +1 -0
- package/components/Input/hooks/useSendKeyboard.d.ts +41 -0
- package/components/Input/hooks/useSendKeyboard.d.ts.map +1 -0
- package/components/Input/hooks/useVoiceInput.d.ts +39 -0
- package/components/Input/hooks/useVoiceInput.d.ts.map +1 -0
- package/components/Input/input-css-vars.d.ts +8 -0
- package/components/Input/input-css-vars.d.ts.map +1 -0
- package/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.d.ts +5 -1
- package/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.d.ts.map +1 -1
- package/components/ModelSelectorSkeleton/ModelSelectorSkeleton.d.ts +6 -5
- package/components/ModelSelectorSkeleton/ModelSelectorSkeleton.d.ts.map +1 -1
- package/components/ToolsBottomSheet/ToolsBottomSheet.d.ts.map +1 -1
- package/components/ToolsChips/ToolsChips.d.ts +7 -3
- package/components/ToolsChips/ToolsChips.d.ts.map +1 -1
- package/components/UsageLimitBannerView/UsageLimitBannerView.d.ts.map +1 -1
- package/hooks/useAttachments.d.ts.map +1 -1
- package/hooks/useModelSelector.d.ts +4 -0
- package/hooks/useModelSelector.d.ts.map +1 -1
- package/hooks/useTextInsertion.d.ts +6 -0
- package/hooks/useTextInsertion.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2423 -1759
- package/models/ConversationInput.d.ts +9 -0
- package/models/ConversationInput.d.ts.map +1 -1
- package/models/Input.d.ts +17 -0
- package/models/Input.d.ts.map +1 -1
- package/models/UsageLimitBanner.d.ts +9 -0
- package/models/UsageLimitBanner.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -51,7 +51,7 @@ interface AddAttachmentButtonProps {
|
|
|
51
51
|
* "Tools" item and "Chat settings", in array order. Each item's submenu
|
|
52
52
|
* (desktop flyout / mobile stacked bottom sheet) renders the entry's
|
|
53
53
|
* host-owned overlay. On desktop this is a real nested `Dropdown` submenu
|
|
54
|
-
* (
|
|
54
|
+
* (through controlled `DropdownItem` submenus) that stays open alongside the main attachment
|
|
55
55
|
* menu, mirroring how the "Tools" item's submenu behaves. Each overlay's
|
|
56
56
|
* `renderOverlay` receives a callback to close the whole menu once
|
|
57
57
|
* selection is complete.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddAttachmentButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddAttachmentButton/AddAttachmentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"AddAttachmentButton.d.ts","sourceRoot":"","sources":["../../../src/components/AddAttachmentButton/AddAttachmentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAGlB,MAAM,2BAA2B,CAAC;AAkBnC,OAAO,EACL,aAAa,EACb,KAAK,EAAE,EACP,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAQhF,uEAAuE;AACvE,UAAU,aAAa;IACrB,+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;AAID,mDAAmD;AACnD,UAAU,wBAAwB;IAChC,+GAA+G;IAC/G,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,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,mFAAmF;IACnF,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;IACjC,+GAA+G;IAC/G,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,+DAA+D;IAC/D,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,MAAM,CAAC;IAChC,uBAAuB;IACvB,MAAM,CAAC,EAAE,yBAAyB,CAAC;CACpC;AAED,4GAA4G;AAC5G,UAAU,yBAAyB;IACjC,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,2GAA2G;AAC3G,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA8a5D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeploymentFeatures, ResponseFormat } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { ChatSettingsValues } from '../../models/Input';
|
|
3
|
+
import { ChatSettingsModalColors, ChatSettingsValues } from '../../models/Input';
|
|
4
4
|
/** Props for the ChatSettingsModal component. */
|
|
5
5
|
export interface ChatSettingsModalProps {
|
|
6
6
|
/** Feature flags for the active deployment — controls which fields are shown. */
|
|
@@ -41,13 +41,10 @@ export interface ChatSettingsModalProps {
|
|
|
41
41
|
saveLabel?: string;
|
|
42
42
|
/** Tooltip shown on the save button when it is disabled (e.g. no response format selected). */
|
|
43
43
|
saveDisabledTooltip?: string;
|
|
44
|
-
/**
|
|
45
|
-
* CSS class applied for the modal background. Defaults to a
|
|
46
|
-
* `--bg-layer-raised` background. `Popup` renders through a portal and
|
|
47
|
-
* accepts no `style`, so this class (or setting `--csm-bg` at theme level) is
|
|
48
|
-
* the only way to override the surface color — there is no `colors` prop.
|
|
49
|
-
*/
|
|
44
|
+
/** CSS class applied to the modal surface. Defaults to a class that paints `colors.background`. */
|
|
50
45
|
backgroundClassName?: string;
|
|
46
|
+
/** Color overrides, set on the popup overlay so they reach the portalled surface. */
|
|
47
|
+
colors?: ChatSettingsModalColors;
|
|
51
48
|
}
|
|
52
49
|
/** Desktop modal for chat settings (system prompt, temperature, response format). */
|
|
53
50
|
export declare const ChatSettingsModal: FC<ChatSettingsModalProps>;
|
|
@@ -1 +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,
|
|
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,EAAgB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAI5B,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,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,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;IAC7B,mGAAmG;IACnG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qFAAqF;IACrF,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC;AAED,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAkFxD,CAAC"}
|
|
@@ -1 +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,8GAA8G;AAC9G,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
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,8GAA8G;AAC9G,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAoFxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditMessageInput.d.ts","sourceRoot":"","sources":["../../../src/components/EditMessageInput/EditMessageInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAK5E,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"EditMessageInput.d.ts","sourceRoot":"","sources":["../../../src/components/EditMessageInput/EditMessageInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAK5E,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+NtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAkBlE,wIAAwI;AACxI,eAAO,MAAM,KAAK,oGAmqBjB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { CSSProperties, RefObject } from 'react';
|
|
3
|
+
import { ChatSettingsConfig, MenuOverlayConfig } from '../../models/Input';
|
|
4
|
+
import { useVoiceInput } from './hooks/useVoiceInput';
|
|
5
|
+
interface InputAttachButtonProps {
|
|
6
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
7
|
+
textareaRef: RefObject<HTMLTextAreaElement | null>;
|
|
8
|
+
message: string;
|
|
9
|
+
style: CSSProperties;
|
|
10
|
+
hideAttachFile: boolean | undefined;
|
|
11
|
+
isInputDisabled: boolean;
|
|
12
|
+
isStreaming: boolean;
|
|
13
|
+
isAttachmentsEnabled: boolean;
|
|
14
|
+
isVoiceRecordingSupported: boolean | undefined;
|
|
15
|
+
isVoiceActive: boolean;
|
|
16
|
+
startRecording: ReturnType<typeof useVoiceInput>['startRecording'];
|
|
17
|
+
isPhone: boolean;
|
|
18
|
+
canRemoveTools: boolean;
|
|
19
|
+
toolsMenuItems: ToolMenuItem[] | undefined;
|
|
20
|
+
onToolToggle: ((toolId: string) => void) | undefined;
|
|
21
|
+
chatSettings: ChatSettingsConfig | undefined;
|
|
22
|
+
menuOverlays: MenuOverlayConfig[] | undefined;
|
|
23
|
+
onDialFileSystemClick: (() => void) | undefined;
|
|
24
|
+
dialFileSystemLabel: string | undefined;
|
|
25
|
+
attachLabel: string;
|
|
26
|
+
addMenuTitle: string;
|
|
27
|
+
menuTitle: string;
|
|
28
|
+
menuCloseLabel: string;
|
|
29
|
+
recordVoiceLabel: string | undefined;
|
|
30
|
+
toolsMenuTitle: string | undefined;
|
|
31
|
+
toolsBackLabel: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The `+` attach button of `Input` with its menu: file upload, the DIAL
|
|
35
|
+
* file system entry, voice recording as an attachment, chat settings and the
|
|
36
|
+
* tools submenu. Private to `Input`.
|
|
37
|
+
*
|
|
38
|
+
* Shared between the normal footer and the voice bar's second row: same
|
|
39
|
+
* menu, same file input, only its disabled state differs. Disabled while
|
|
40
|
+
* a dictation/attachment recording is anything but actively Recording, so
|
|
41
|
+
* it cannot be used to interrupt a pending transcription.
|
|
42
|
+
*/
|
|
43
|
+
export declare const InputAttachButton: ({ fileInputRef, textareaRef, message, style, hideAttachFile, isInputDisabled, isStreaming, isAttachmentsEnabled, isVoiceRecordingSupported, isVoiceActive, startRecording, isPhone, canRemoveTools, toolsMenuItems, onToolToggle, chatSettings, menuOverlays, onDialFileSystemClick, dialFileSystemLabel, attachLabel, addMenuTitle, menuTitle, menuCloseLabel, recordVoiceLabel, toolsMenuTitle, toolsBackLabel, }: InputAttachButtonProps) => import('react').JSX.Element;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=InputAttachButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputAttachButton.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputAttachButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,UAAU,sBAAsB;IAC9B,YAAY,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACjD,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,CAAC;IACrB,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yBAAyB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACrD,YAAY,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC7C,YAAY,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAC9C,qBAAqB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAChD,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,qZA2B/B,sBAAsB,gCA8DxB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { InputProps } from '../../models/Input';
|
|
3
|
+
import { useCommandMenuAnchor } from './hooks/useCommandMenuAnchor';
|
|
4
|
+
import { useCommandMenuController } from './hooks/useCommandMenuController';
|
|
5
|
+
type CommandMenuController = ReturnType<typeof useCommandMenuController>;
|
|
6
|
+
interface InputCommandMenuAreaProps {
|
|
7
|
+
textarea: ReactNode;
|
|
8
|
+
textareaRef: RefObject<HTMLTextAreaElement | null>;
|
|
9
|
+
commandMenu: InputProps['commandMenu'];
|
|
10
|
+
caretAnchor: ReturnType<typeof useCommandMenuAnchor>['caretAnchor'];
|
|
11
|
+
fontClassName: string | undefined;
|
|
12
|
+
isMenuOpen: boolean;
|
|
13
|
+
query: CommandMenuController['query'];
|
|
14
|
+
activeWordStart: CommandMenuController['activeWordStart'];
|
|
15
|
+
listboxId: CommandMenuController['commandMenuListboxId'];
|
|
16
|
+
activeOptionId: CommandMenuController['activeCommandOptionId'];
|
|
17
|
+
overlayRef: CommandMenuController['commandMenuOverlayRef'];
|
|
18
|
+
onOutsidePress: () => void;
|
|
19
|
+
onClose: CommandMenuController['handleCloseCommandMenu'];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The command menu anchors to the trigger word's own on-screen position,
|
|
23
|
+
* not to the textarea as a whole — the kit `Dropdown` wraps its
|
|
24
|
+
* `children` in the actual floating-ui reference element, so that
|
|
25
|
+
* element has to sit at `caretAnchor` rather than the textarea itself
|
|
26
|
+
* (which, unlike the marker, sits fixed at the box's own top-left
|
|
27
|
+
* regardless of where the trigger word is). `Dropdown` takes no `style`
|
|
28
|
+
* prop, only `className`, so it cannot be positioned directly with a
|
|
29
|
+
* computed pixel value — instead, a plain `<div>` this component fully
|
|
30
|
+
* controls carries the inline `style` and is absolutely positioned at
|
|
31
|
+
* `caretAnchor`; `Dropdown`'s own internal reference span, rendered as
|
|
32
|
+
* that div's only child with no positioning of its own, lands in normal
|
|
33
|
+
* flow at the div's origin, i.e. exactly at the caret. The real textarea
|
|
34
|
+
* renders as a sibling instead of `Dropdown`'s child. `trigger={[]}`
|
|
35
|
+
* keeps the controlled `open` prop the only opener, focus stays in the
|
|
36
|
+
* textarea on open (`initialFocus={-1}`), and clicks inside the textarea
|
|
37
|
+
* count as inside the menu (`outsidePressIgnoreRef`).
|
|
38
|
+
* `matchReferenceWidth={false}` drops the kit's default min-width equal
|
|
39
|
+
* to the (now zero-size) reference, so the overlay sizes to its content.
|
|
40
|
+
*
|
|
41
|
+
* Always the same Fragment with the textarea as its first child, so toggling
|
|
42
|
+
* `commandMenu` (e.g. switching to a skills-capable model) never changes the
|
|
43
|
+
* textarea's parent type and never remounts it (focus, caret and IME state
|
|
44
|
+
* survive).
|
|
45
|
+
*/
|
|
46
|
+
export declare const InputCommandMenuArea: ({ textarea, textareaRef, commandMenu, caretAnchor, fontClassName, isMenuOpen, query, activeWordStart, listboxId, activeOptionId, overlayRef, onOutsidePress, onClose, }: InputCommandMenuAreaProps) => import('react').JSX.Element;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=InputCommandMenuArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputCommandMenuArea.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputCommandMenuArea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEzE,UAAU,yBAAyB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACnD,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACvC,WAAW,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,aAAa,CAAC,CAAC;IACpE,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACtC,eAAe,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IAC1D,SAAS,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;IACzD,cAAc,EAAE,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;IAC/D,UAAU,EAAE,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;IAC3D,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,OAAO,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,GAAI,yKAclC,yBAAyB,gCAiE3B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { HighlightedTextRange } from '../../models/Input';
|
|
3
|
+
import { MirrorInsertion } from '../../utils/highlight-mirror';
|
|
4
|
+
interface InputTextareaAreaProps {
|
|
5
|
+
areaRef: RefObject<HTMLDivElement | null>;
|
|
6
|
+
mirrorRef: RefObject<HTMLDivElement | null>;
|
|
7
|
+
isMirrorActive: boolean;
|
|
8
|
+
fontClassName: string | undefined;
|
|
9
|
+
message: string;
|
|
10
|
+
mentionRanges: HighlightedTextRange[];
|
|
11
|
+
mirrorInsertions: MirrorInsertion[];
|
|
12
|
+
selectionRects: DOMRect[];
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The textarea area of `Input`: the mention-highlight mirror with its
|
|
17
|
+
* replacement selection highlight, layered over the textarea and its
|
|
18
|
+
* command menu. Presentational and private to `Input`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const InputTextareaArea: ({ areaRef, mirrorRef, isMirrorActive, fontClassName, message, mentionRanges, mirrorInsertions, selectionRects, children, }: InputTextareaAreaProps) => import('react').JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=InputTextareaArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputTextareaArea.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputTextareaArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,8BAA8B,CAAC;AAGtC,UAAU,sBAAsB;IAE9B,OAAO,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC1C,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,cAAc,EAAE,OAAO,EAAE,CAAC;IAE1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,4HAU/B,sBAAsB,gCA+CxB,CAAC"}
|
|
@@ -8,6 +8,8 @@ interface Props {
|
|
|
8
8
|
modelSelectorLabels?: ModelSelectorLabels;
|
|
9
9
|
/** Host styling hooks for the menu panel, search row and deployment rows. */
|
|
10
10
|
menuStyles?: ModelMenuStyles;
|
|
11
|
+
nameClassName?: string;
|
|
12
|
+
versionClassName?: string;
|
|
11
13
|
isStreaming: boolean;
|
|
12
14
|
isMobile: boolean;
|
|
13
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelSelectorControl.d.ts","sourceRoot":"","sources":["../../../src/components/Input/ModelSelectorControl.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ModelSelectorControl.d.ts","sourceRoot":"","sources":["../../../src/components/Input/ModelSelectorControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAGf,MAAM,2BAA2B,CAAC;AAUnC,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAK/E,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,6EAA6E;IAC7E,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IACxD,wEAAwE;IACxE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CA8Q1C,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { InputProps } from '../../../models/Input';
|
|
3
|
+
import { MirrorInsertion } from '../../../utils/highlight-mirror';
|
|
4
|
+
interface UseCommandMenuAnchorParams {
|
|
5
|
+
commandMenu: InputProps['commandMenu'];
|
|
6
|
+
message: string;
|
|
7
|
+
textareaRef: RefObject<HTMLTextAreaElement | null>;
|
|
8
|
+
hasActiveMentions: boolean;
|
|
9
|
+
markerOffset: number | null;
|
|
10
|
+
triggerEnd: number | null;
|
|
11
|
+
hasCommandEmptyQueryHint: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Anchors `Input`'s command popup to the trigger word: splices a zero-size
|
|
15
|
+
* caret marker (and the empty-query hint) into the mention-highlight mirror,
|
|
16
|
+
* keeps the mirror in sync with the textarea, and measures the marker's
|
|
17
|
+
* position relative to the textarea area. `useMentionSelectionMirror` is
|
|
18
|
+
* called before the measuring layout effect on purpose, so the mirror has
|
|
19
|
+
* scrolled into sync before the marker inside it is measured. Private to
|
|
20
|
+
* `Input`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useCommandMenuAnchor: ({ commandMenu, message, textareaRef, hasActiveMentions, markerOffset, triggerEnd, hasCommandEmptyQueryHint, }: UseCommandMenuAnchorParams) => {
|
|
23
|
+
textareaAreaRef: RefObject<HTMLDivElement | null>;
|
|
24
|
+
caretAnchor: {
|
|
25
|
+
left: number;
|
|
26
|
+
top: number;
|
|
27
|
+
} | null;
|
|
28
|
+
mirrorInsertions: MirrorInsertion[];
|
|
29
|
+
isMirrorActive: boolean;
|
|
30
|
+
mirrorRef: RefObject<HTMLDivElement | null>;
|
|
31
|
+
selectionRects: DOMRect[];
|
|
32
|
+
updateSelectionRects: () => void;
|
|
33
|
+
handleTextareaScroll: () => void;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=useCommandMenuAnchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommandMenuAnchor.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/hooks/useCommandMenuAnchor.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE,UAAU,0BAA0B;IAClC,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACnD,iBAAiB,EAAE,OAAO,CAAC;IAE3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,wBAAwB,EAAE,OAAO,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAAI,+GAQlC,0BAA0B;;;cAYnB,MAAM;aACP,MAAM;;;;;;;;CAkHd,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
import { useInputHistoryNavigation } from '../../../hooks/useInputHistoryNavigation';
|
|
3
|
+
import { useMessageState } from '../../../hooks/useMessageState';
|
|
4
|
+
import { InputProps, SendOnEnter } from '../../../models/Input';
|
|
5
|
+
interface UseCommandMenuControllerParams {
|
|
6
|
+
commandMenu: InputProps['commandMenu'];
|
|
7
|
+
message: string;
|
|
8
|
+
setMessage: ReturnType<typeof useMessageState>['setMessage'];
|
|
9
|
+
textareaRef: ReturnType<typeof useMessageState>['textareaRef'];
|
|
10
|
+
historyNav: ReturnType<typeof useInputHistoryNavigation>;
|
|
11
|
+
onChange: ((message: string) => void) | undefined;
|
|
12
|
+
caretPositionOverride: number | undefined;
|
|
13
|
+
messageRevision: number | undefined;
|
|
14
|
+
markCaretPlaced: () => void;
|
|
15
|
+
sendOnEnter: SendOnEnter;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The `/command` menu wiring of `Input`: re-evaluates the menu when the caret
|
|
19
|
+
* moves, derives the empty-query hint and the popup's marker offset, consumes
|
|
20
|
+
* the `/query` text on selection, restores a host-driven caret, and owns the
|
|
21
|
+
* keys an open menu takes. Returns `skipFocusMenuEvaluationRef`, which
|
|
22
|
+
* `useVoiceInput` sets when it restores focus after recording. Private to
|
|
23
|
+
* `Input`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useCommandMenuController: ({ commandMenu, message, setMessage, textareaRef, historyNav, onChange, caretPositionOverride, messageRevision, markCaretPlaced, sendOnEnter, }: UseCommandMenuControllerParams) => {
|
|
26
|
+
isMenuOpen: boolean;
|
|
27
|
+
query: string;
|
|
28
|
+
activeWordStart: number | null;
|
|
29
|
+
closeOnOutsidePress: () => void;
|
|
30
|
+
handleValueChange: (nextValue: string, caretPosition: number, isComposing: boolean) => void;
|
|
31
|
+
commandMenuListboxId: string;
|
|
32
|
+
commandMenuOverlayRef: import('react').RefObject<HTMLDivElement | null>;
|
|
33
|
+
activeCommandOptionId: string | null;
|
|
34
|
+
handleTextareaClick: () => void;
|
|
35
|
+
handleTextareaFocus: () => void;
|
|
36
|
+
handleTextareaKeyUp: (e: KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
37
|
+
skipFocusMenuEvaluationRef: import('react').RefObject<boolean>;
|
|
38
|
+
triggerEnd: number | null;
|
|
39
|
+
hasCommandEmptyQueryHint: boolean;
|
|
40
|
+
markerOffset: number | null;
|
|
41
|
+
handleCloseCommandMenu: (options?: {
|
|
42
|
+
consumeQuery?: boolean;
|
|
43
|
+
returnFocus?: boolean;
|
|
44
|
+
}) => void;
|
|
45
|
+
isSendGesture: (e: KeyboardEvent<HTMLTextAreaElement>) => boolean;
|
|
46
|
+
handleCommandMenuKeyDown: (e: KeyboardEvent<HTMLTextAreaElement>) => boolean;
|
|
47
|
+
};
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=useCommandMenuController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommandMenuController.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/hooks/useCommandMenuController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkC,MAAM,OAAO,CAAC;AAK3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,UAAU,8BAA8B;IACtC,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC;IAC7D,WAAW,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,aAAa,CAAC,CAAC;IAC/D,UAAU,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;IACzD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAClD,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,gJAWtC,8BAA8B;;;;;;;;;;;6BA8DC,aAAa,CAAC,mBAAmB,CAAC;;;;;uCAoErD;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE;uBAkEpC,aAAa,CAAC,mBAAmB,CAAC;kCAoBvD,aAAa,CAAC,mBAAmB,CAAC,KACpC,OAAO;CAyDX,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
interface UseDismissibleToolsParams {
|
|
3
|
+
toolsMenuItems: ToolMenuItem[] | undefined;
|
|
4
|
+
canRemoveTools: boolean;
|
|
5
|
+
isPhone: boolean;
|
|
6
|
+
onToolToggle: ((toolId: string) => void) | undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Tool chips the composer shows and the chip × dismissal behind them. Private
|
|
10
|
+
* to `Input`: dismissal is view state of one composer, forgotten when the
|
|
11
|
+
* deployment offers a different tool list.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useDismissibleTools: ({ toolsMenuItems, canRemoveTools, isPhone, onToolToggle, }: UseDismissibleToolsParams) => {
|
|
14
|
+
visibleTools: ToolMenuItem[];
|
|
15
|
+
handleToolDismiss: (toolId: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useDismissibleTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDismissibleTools.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/hooks/useDismissibleTools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,UAAU,yBAAyB;IACjC,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,4DAKjC,yBAAyB;;gCA8Bf,MAAM;CAWlB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ClipboardEvent } from 'react';
|
|
2
|
+
import { useAttachments } from '../../../hooks/useAttachments';
|
|
3
|
+
import { InputProps } from '../../../models/Input';
|
|
4
|
+
interface UsePasteHandlingParams {
|
|
5
|
+
addAttachments: ReturnType<typeof useAttachments>['addAttachments'];
|
|
6
|
+
isAttachmentsEnabled: boolean;
|
|
7
|
+
isTextAttachmentsAllowed: boolean;
|
|
8
|
+
pasteTextThreshold: number;
|
|
9
|
+
maxMessageLength: number;
|
|
10
|
+
onMessageTooLong: InputProps['onMessageTooLong'];
|
|
11
|
+
commandMenu: InputProps['commandMenu'];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The textarea's paste handler for `Input`: turns a long plain-text paste
|
|
15
|
+
* into a `text/plain` attachment when the model accepts one, warns about a
|
|
16
|
+
* paste that alone exceeds the message cap, and reports inline pasted text
|
|
17
|
+
* to the command menu. Private to `Input`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const usePasteHandling: ({ addAttachments, isAttachmentsEnabled, isTextAttachmentsAllowed, pasteTextThreshold, maxMessageLength, onMessageTooLong, commandMenu, }: UsePasteHandlingParams) => (e: ClipboardEvent<HTMLTextAreaElement>) => void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=usePasteHandling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePasteHandling.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/hooks/usePasteHandling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,UAAU,sBAAsB;IAC9B,cAAc,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpE,oBAAoB,EAAE,OAAO,CAAC;IAC9B,wBAAwB,EAAE,OAAO,CAAC;IAClC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACjD,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CACxC;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,0IAQ9B,sBAAsB,SAiBjB,cAAc,CAAC,mBAAmB,CAAC,SAkC1C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
import { useAttachments } from '../../../hooks/useAttachments';
|
|
3
|
+
import { useInputHistoryNavigation } from '../../../hooks/useInputHistoryNavigation';
|
|
4
|
+
import { useMessageState } from '../../../hooks/useMessageState';
|
|
5
|
+
import { UseTextInsertionResult } from '../../../hooks/useTextInsertion';
|
|
6
|
+
import { InputProps } from '../../../models/Input';
|
|
7
|
+
import { useCommandMenuController } from './useCommandMenuController';
|
|
8
|
+
type Attachments = ReturnType<typeof useAttachments>;
|
|
9
|
+
type CommandMenuController = ReturnType<typeof useCommandMenuController>;
|
|
10
|
+
interface UseSendKeyboardParams {
|
|
11
|
+
message: string;
|
|
12
|
+
setMessage: ReturnType<typeof useMessageState>['setMessage'];
|
|
13
|
+
attachments: Attachments['attachments'];
|
|
14
|
+
resetAttachments: Attachments['resetAttachments'];
|
|
15
|
+
historyNav: ReturnType<typeof useInputHistoryNavigation>;
|
|
16
|
+
onSend: InputProps['onSend'];
|
|
17
|
+
onMessageTooLong: InputProps['onMessageTooLong'];
|
|
18
|
+
maxMessageLength: number;
|
|
19
|
+
isSendDisabled: boolean;
|
|
20
|
+
isVoiceActive: boolean;
|
|
21
|
+
isInputDisabled: boolean;
|
|
22
|
+
isStreaming: boolean;
|
|
23
|
+
canSend: boolean;
|
|
24
|
+
hasModelSelected: boolean;
|
|
25
|
+
handleUndoKeyDown: UseTextInsertionResult['handleUndoKeyDown'];
|
|
26
|
+
handleCommandMenuKeyDown: CommandMenuController['handleCommandMenuKeyDown'];
|
|
27
|
+
isSendGesture: CommandMenuController['isSendGesture'];
|
|
28
|
+
onBackspaceAtCaret: InputProps['onBackspaceAtCaret'];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Sending and the textarea's keyboard for `Input`: the send action with its
|
|
32
|
+
* restore-on-failure, and `handleKeyDown`, which runs in order the pending
|
|
33
|
+
* undo, the open command menu's keys, history navigation, the whole-mention
|
|
34
|
+
* Backspace, and Enter-to-send. Private to `Input`.
|
|
35
|
+
*/
|
|
36
|
+
export declare const useSendKeyboard: ({ message, setMessage, attachments, resetAttachments, historyNav, onSend, onMessageTooLong, maxMessageLength, isSendDisabled, isVoiceActive, isInputDisabled, isStreaming, canSend, hasModelSelected, handleUndoKeyDown, handleCommandMenuKeyDown, isSendGesture, onBackspaceAtCaret, }: UseSendKeyboardParams) => {
|
|
37
|
+
handleSend: () => Promise<void>;
|
|
38
|
+
handleKeyDown: (e: KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=useSendKeyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSendKeyboard.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/hooks/useSendKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAErD,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEzE,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC;IAC7D,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACxC,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAClD,UAAU,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;IACzD,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC7B,gBAAgB,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACjD,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAC/D,wBAAwB,EAAE,qBAAqB,CAAC,0BAA0B,CAAC,CAAC;IAC5E,aAAa,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACtD,kBAAkB,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAC;CACtD;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,yRAmB7B,qBAAqB;;uBAyBI,aAAa,CAAC,mBAAmB,CAAC;CAgE7D,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MutableRefObject, RefObject } from 'react';
|
|
2
|
+
import { useAttachments } from '../../../hooks/useAttachments';
|
|
3
|
+
import { useInputHistoryNavigation } from '../../../hooks/useInputHistoryNavigation';
|
|
4
|
+
import { useMessageState } from '../../../hooks/useMessageState';
|
|
5
|
+
import { VoiceRecorderState } from '../../../hooks/useVoiceRecorder';
|
|
6
|
+
import { TranscribeAudio } from '../../../models/Voice';
|
|
7
|
+
type Attachments = ReturnType<typeof useAttachments>;
|
|
8
|
+
interface UseVoiceInputParams {
|
|
9
|
+
addAttachments: Attachments['addAttachments'];
|
|
10
|
+
buildAttachments: Attachments['buildAttachments'];
|
|
11
|
+
draftRef: MutableRefObject<string>;
|
|
12
|
+
setMessage: ReturnType<typeof useMessageState>['setMessage'];
|
|
13
|
+
historyNav: ReturnType<typeof useInputHistoryNavigation>;
|
|
14
|
+
onChange: ((message: string) => void) | undefined;
|
|
15
|
+
onTranscribeAudio: TranscribeAudio | undefined;
|
|
16
|
+
voiceErrorLabel: string | undefined;
|
|
17
|
+
textareaRef: RefObject<HTMLTextAreaElement | null>;
|
|
18
|
+
skipFocusMenuEvaluationRef: MutableRefObject<boolean>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Voice recording for `Input`: attaches recorded audio or merges a transcript
|
|
22
|
+
* into the draft, and puts focus and the caret back at the end of the
|
|
23
|
+
* textarea once recording ends. Private to `Input`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useVoiceInput: ({ addAttachments, buildAttachments, draftRef, setMessage, historyNav, onChange, onTranscribeAudio, voiceErrorLabel, textareaRef, skipFocusMenuEvaluationRef, }: UseVoiceInputParams) => {
|
|
26
|
+
voiceState: VoiceRecorderState;
|
|
27
|
+
analyserNodeRef: RefObject<AnalyserNode | null>;
|
|
28
|
+
voiceError: string | null;
|
|
29
|
+
startRecording: (mode?: import('../../../hooks/useVoiceRecorder').VoiceRecordingMode) => void;
|
|
30
|
+
stopRecording: () => void;
|
|
31
|
+
discardRecording: () => void;
|
|
32
|
+
isVoiceActive: boolean;
|
|
33
|
+
latestTranscript: {
|
|
34
|
+
text: string;
|
|
35
|
+
revision: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=useVoiceInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVoiceInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/hooks/useVoiceInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAEL,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAErD,UAAU,mBAAmB;IAC3B,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAC9C,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAElD,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACnC,UAAU,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC;IAC7D,UAAU,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;IACzD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAClD,iBAAiB,EAAE,eAAe,GAAG,SAAS,CAAC;IAC/C,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IAEnD,0BAA0B,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,gKAW3B,mBAAmB;;;;;;;;;;;;CAqFrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { InputProps } from '../../models/Input';
|
|
3
|
+
/**
|
|
4
|
+
* Maps `Input`'s `colors` prop to the `--ci-*` CSS variables its stylesheet
|
|
5
|
+
* and child components read. Private to `Input`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const buildInputCssVars: (colors: InputProps["colors"]) => CSSProperties;
|
|
8
|
+
//# sourceMappingURL=input-css-vars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-css-vars.d.ts","sourceRoot":"","sources":["../../../src/components/Input/input-css-vars.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,UAAU,CAAC,QAAQ,CAAC,KAC3B,aAsBC,CAAC"}
|
|
@@ -21,6 +21,10 @@ interface ModelSelectorBottomSheetColors {
|
|
|
21
21
|
}
|
|
22
22
|
/** Props for the mobile bottom-sheet model selector. */
|
|
23
23
|
export interface ModelSelectorBottomSheetProps {
|
|
24
|
+
/** Controlled query shared with an alternate selector presentation. */
|
|
25
|
+
searchQuery?: string;
|
|
26
|
+
/** Reports query edits when controlled. */
|
|
27
|
+
onSearchQueryChange?: (query: string) => void;
|
|
24
28
|
/** Controls sheet visibility. */
|
|
25
29
|
isOpen: boolean;
|
|
26
30
|
/** Title displayed in the sheet header and used as the dialog accessible name. */
|
|
@@ -37,7 +41,7 @@ export interface ModelSelectorBottomSheetProps {
|
|
|
37
41
|
selectedDeploymentId?: string | null;
|
|
38
42
|
/** Called when the user taps a deployment; the sheet closes automatically after. */
|
|
39
43
|
onSelect: (id: string) => void;
|
|
40
|
-
/**
|
|
44
|
+
/** Text announced through the sheet's always-mounted status region while deployments load; while set, skeleton rows replace the list. */
|
|
41
45
|
loadingLabel?: string;
|
|
42
46
|
/** Label shown as a disabled item when the deployments fetch failed. */
|
|
43
47
|
errorLabel?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelSelectorBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelSelectorBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;AAWnC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,EAAE,EAIR,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAKnF,sGAAsG;AACtG,UAAU,8BAA8B;IACtC,wGAAwG;IACxG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mHAAmH;IACnH,KAAK,CAAC,EAAE,sBAAsB,CAAC;CAChC;AAkGD,wDAAwD;AACxD,MAAM,WAAW,6BAA6B;IAC5C,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,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,yIAAyI;IACzI,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,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,mFAAmF;IACnF,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAkJtE,CAAC"}
|
|
@@ -11,10 +11,11 @@ interface ModelSelectorSkeletonLabelProps {
|
|
|
11
11
|
}
|
|
12
12
|
/** Text skeleton placeholder for a deployment label. */
|
|
13
13
|
export declare const ModelSelectorSkeletonLabel: FC<ModelSelectorSkeletonLabelProps>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Stacked, `aria-hidden` skeleton rows shown while the model selector is
|
|
16
|
+
* loading. The parent announces the loading text through its own
|
|
17
|
+
* always-mounted live region.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ModelSelectorSkeletonRows: FC;
|
|
19
20
|
export {};
|
|
20
21
|
//# sourceMappingURL=ModelSelectorSkeleton.d.ts.map
|
|
@@ -1 +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,sEAAsE;AACtE,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,UAAU,8BAA8B;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,2DAA2D;AAC3D,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CASxE,CAAC;AAEF,UAAU,+BAA+B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,EAAE,EAAE,CACzC,+BAA+B,CAMhC,CAAC;AAEF
|
|
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,sEAAsE;AACtE,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,UAAU,8BAA8B;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,2DAA2D;AAC3D,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CASxE,CAAC;AAEF,UAAU,+BAA+B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,EAAE,EAAE,CACzC,+BAA+B,CAMhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,EAWvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolsBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsBottomSheet/ToolsBottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAO9D,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI/C,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oDAAoD;IACpD,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,yGAAyG;AACzG,UAAU,sBAAsB;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ToolsBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsBottomSheet/ToolsBottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAO9D,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI/C,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oDAAoD;IACpD,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,yGAAyG;AACzG,UAAU,sBAAsB;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiEtD,CAAC"}
|
|
@@ -4,6 +4,8 @@ import { FC } from 'react';
|
|
|
4
4
|
interface ToolsChipsTypography {
|
|
5
5
|
/** Typography utility class applied to the chip text. Defaults to `'dial-small-paragraph-text'`. */
|
|
6
6
|
fontClassName?: string;
|
|
7
|
+
/** Typography utility class applied to the on/off state text. Defaults to `'dial-tiny-lead-text'`. */
|
|
8
|
+
stateClassName?: string;
|
|
7
9
|
}
|
|
8
10
|
/** Color overrides for the `ToolsChips` component, applied as CSS custom properties. */
|
|
9
11
|
interface ToolsChipsColors {
|
|
@@ -19,6 +21,8 @@ interface ToolsChipsColors {
|
|
|
19
21
|
chipHoverBg?: string;
|
|
20
22
|
/** Chip background color while the tool is on. Defaults to `--bg-control-accent-alpha`. */
|
|
21
23
|
chipSelectedBg?: string;
|
|
24
|
+
/** Chip background color on hover/focus while the tool is on. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
25
|
+
chipSelectedHoverBg?: string;
|
|
22
26
|
/** Chip border color while the tool is on. Defaults to `--stroke-accent`. */
|
|
23
27
|
chipSelectedBorder?: string;
|
|
24
28
|
/** Chip leading-icon color while the tool is on. Defaults to `--text-accent`. */
|
|
@@ -27,9 +31,9 @@ interface ToolsChipsColors {
|
|
|
27
31
|
chipSelectedText?: string;
|
|
28
32
|
/** Color of the chip's ON/OFF state text while the tool is off. Defaults to `--text-secondary`; while on it follows `chipSelectedText`. */
|
|
29
33
|
chipStateText?: string;
|
|
30
|
-
/** Icon color of the chip's × button. Defaults to `--text-secondary`, or `--text-accent` while the tool is on. */
|
|
34
|
+
/** Icon color of the chip's × button. Defaults to `--text-secondary`, or `--text-accent` while the tool is on. Applies only while `canRemove` is `true`. */
|
|
31
35
|
chipClose?: string;
|
|
32
|
-
/** Icon color of the chip's × button on hover/focus. Defaults to `--text-primary`. */
|
|
36
|
+
/** Icon color of the chip's × button on hover/focus. Defaults to `--text-primary`. Applies only while `canRemove` is `true`. */
|
|
33
37
|
chipCloseHover?: string;
|
|
34
38
|
}
|
|
35
39
|
/** Props for the ToolsChips component. */
|
|
@@ -40,7 +44,7 @@ export interface ToolsChipsProps {
|
|
|
40
44
|
onToolToggle: (toolId: string) => void;
|
|
41
45
|
/** Called with the tool id when the chip's × is clicked, to drop it from the row. Ignored while `canRemove` is `false`. */
|
|
42
46
|
onToolDismiss: (toolId: string) => void;
|
|
43
|
-
/** When `false`, chips render without a × and cannot be dropped from the row. Defaults to `true`. */
|
|
47
|
+
/** When `false`, chips render as the kit `ToggleChip` without a × and cannot be dropped from the row. Defaults to `true`. */
|
|
44
48
|
canRemove?: boolean;
|
|
45
49
|
/** Returns the accessible label for a chip's × button. Defaults to `"Remove {toolLabel}"`. */
|
|
46
50
|
removeLabel?: (toolLabel: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolsChips.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsChips/ToolsChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI9D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,2DAA2D;AAC3D,UAAU,oBAAoB;IAC5B,oGAAoG;IACpG,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolsChips.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsChips/ToolsChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI9D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,2DAA2D;AAC3D,UAAU,oBAAoB;IAC5B,oGAAoG;IACpG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sGAAsG;IACtG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wFAAwF;AACxF,UAAU,gBAAgB;IACxB,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kHAAkH;IAClH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2IAA2I;IAC3I,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4JAA4J;IAC5J,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gIAAgI;IAChI,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAID,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2DAA2D;IAC3D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,2HAA2H;IAC3H,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,6HAA6H;IAC7H,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,wDAAwD;IACxD,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA6H1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsageLimitBannerView.d.ts","sourceRoot":"","sources":["../../../src/components/UsageLimitBannerView/UsageLimitBannerView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UsageLimitBannerView.d.ts","sourceRoot":"","sources":["../../../src/components/UsageLimitBannerView/UsageLimitBannerView.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,+BAA+B,CAAC;AASvC,4HAA4H;AAC5H,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAiE9D,CAAC"}
|