@algolia/satellite 2.3.0-rc.6 → 2.3.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +23 -4
- package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
- package/dist/{esm/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → cjs/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +12 -12
- package/dist/{esm/Layout → cjs}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
- package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
- package/dist/{esm/Layout → cjs}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +2 -2
- package/dist/cjs/Chat/ChatMessages/ChatMessages.d.ts +141 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +18 -7
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.d.ts +7 -1
- package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +6 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.d.ts +16 -2
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +32 -20
- package/dist/cjs/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +10 -3
- package/dist/cjs/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useFocusTyping.js +19 -14
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
- package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
- package/dist/cjs/Layout/index.d.ts +0 -1
- package/dist/cjs/Layout/index.js +0 -11
- package/dist/cjs/Satellite/locale.d.ts +3 -3
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/styles/helpers/tv.d.ts +5 -1
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +23 -4
- package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
- package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
- package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
- package/dist/{cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → esm/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
- package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +12 -12
- package/dist/{cjs/Layout → esm}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
- package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
- package/dist/{cjs/Layout → esm}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
- package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +2 -2
- package/dist/esm/Chat/ChatMessages/ChatMessages.d.ts +141 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +18 -7
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.d.ts +7 -1
- package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +6 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.d.ts +16 -2
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +33 -20
- package/dist/esm/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +10 -3
- package/dist/esm/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useFocusTyping.js +19 -14
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
- package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
- package/dist/esm/Layout/index.d.ts +0 -1
- package/dist/esm/Layout/index.js +0 -1
- package/dist/esm/Satellite/locale.d.ts +3 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/styles/helpers/tv.d.ts +5 -1
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +2 -2
- package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
- package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
- package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -44
- package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
- package/dist/cjs/Layout/Chat/ChatPrompt/useFocusTyping.d.ts +0 -12
- package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
- package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
- package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -44
- package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
- package/dist/esm/Layout/Chat/ChatPrompt/useFocusTyping.d.ts +0 -12
- /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/index.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/index.js +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/types.d.ts +0 -0
- /package/dist/cjs/{Layout/Chat → Chat}/types.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/index.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/index.js +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/types.d.ts +0 -0
- /package/dist/esm/{Layout/Chat → Chat}/types.js +0 -0
@@ -13,14 +13,14 @@ var _react = require("react");
|
|
13
13
|
var _useStickToBottom2 = require("use-stick-to-bottom");
|
14
14
|
var _ChatMessages = require("./ChatMessages.styles");
|
15
15
|
var _useLastMessageHeight = require("./useLastMessageHeight");
|
16
|
-
var _Actions = require("
|
17
|
-
var _Icons = require("./../../../Icons");
|
16
|
+
var _Actions = require("./../../Actions");
|
18
17
|
var _ChatMessage = require("./../ChatMessage");
|
19
18
|
var _ChatMessageError = require("./../ChatMessageError");
|
20
19
|
var _ChatMessageLoader = require("./../ChatMessageLoader");
|
21
|
-
var
|
20
|
+
var _Icons = require("./../../Icons");
|
21
|
+
var _Satellite = require("./../../Satellite");
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
23
|
-
var _excluded = ["messages", "userMessageProps", "assistantMessageProps", "loaderProps", "errorProps", "renderMessage", "renderLoader", "renderError", "status", "onReload", "hideScrollToBottom", "className", "scrollClassName", "contentClassName", "locale"];
|
23
|
+
var _excluded = ["messages", "userMessageProps", "assistantMessageProps", "loaderProps", "errorProps", "renderMessage", "renderLoader", "renderError", "status", "onReload", "hideScrollToBottom", "className", "scrollClassName", "contentClassName", "locale", "rtl"];
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
26
26
|
var DEFAULT_CHAT_MESSAGE_LOCALE = {
|
@@ -49,6 +49,8 @@ var ChatMessagesBase = function ChatMessagesBase(_ref, forwardedRef) {
|
|
49
49
|
scrollClassName = _ref.scrollClassName,
|
50
50
|
contentClassName = _ref.contentClassName,
|
51
51
|
propsLocale = _ref.locale,
|
52
|
+
_ref$rtl = _ref.rtl,
|
53
|
+
rtl = _ref$rtl === void 0 ? false : _ref$rtl,
|
52
54
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
53
55
|
var contextLocale = (0, _Satellite.useLocale)("chatMessage");
|
54
56
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_CHAT_MESSAGE_LOCALE), contextLocale), propsLocale);
|
@@ -81,7 +83,7 @@ var ChatMessagesBase = function ChatMessagesBase(_ref, forwardedRef) {
|
|
81
83
|
propsResult = resolveProps(assistantMessageProps, message);
|
82
84
|
|
83
85
|
// If the last assistant message is streaming, we don't want to render actions or footer
|
84
|
-
if (status === "streaming" && lastMessageId === message.id) {
|
86
|
+
if ((status === "streaming" || message.content.length === 0) && lastMessageId === message.id) {
|
85
87
|
propsResult = _objectSpread(_objectSpread({}, propsResult), {}, {
|
86
88
|
renderFooter: undefined,
|
87
89
|
renderActions: undefined,
|
@@ -121,9 +123,11 @@ var ChatMessagesBase = function ChatMessagesBase(_ref, forwardedRef) {
|
|
121
123
|
children: [messages.map(function (message) {
|
122
124
|
var isAssistant = message.role === "assistant";
|
123
125
|
var isLastUserMessage = (lastUserMessage === null || lastUserMessage === void 0 ? void 0 : lastUserMessage.id) === message.id;
|
126
|
+
var side = isAssistant ? "left" : "right";
|
124
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, _objectSpread(_objectSpread({
|
128
|
+
rtl: rtl,
|
125
129
|
ref: isLastUserMessage ? lastUserMessageRef : undefined,
|
126
|
-
side:
|
130
|
+
side: side,
|
127
131
|
variant: isAssistant ? "subtle" : "neutral"
|
128
132
|
}, getMessageProps(message)), {}, {
|
129
133
|
content: renderMessage ? renderMessage(message) : message.content,
|
@@ -145,8 +149,15 @@ var ChatMessagesBase = function ChatMessagesBase(_ref, forwardedRef) {
|
|
145
149
|
className: styles.scrollToBottom({
|
146
150
|
isAtBottom: isAtBottom
|
147
151
|
}),
|
148
|
-
tooltipHideDelay: 0
|
152
|
+
tooltipHideDelay: 0,
|
153
|
+
tabIndex: isAtBottom ? -1 : 0
|
149
154
|
})]
|
150
155
|
}));
|
151
156
|
};
|
157
|
+
|
158
|
+
/**
|
159
|
+
* The `ChatMessages` component provides a list of messages to display in the chat.
|
160
|
+
*
|
161
|
+
* See the [ChatMessages documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-messages) for more information.
|
162
|
+
*/
|
152
163
|
var ChatMessages = exports.ChatMessages = /*#__PURE__*/(0, _react.forwardRef)(ChatMessagesBase);
|
@@ -13,6 +13,14 @@ export declare const chatMessagesStyles: import("tailwind-variants").TVReturnTyp
|
|
13
13
|
content: string;
|
14
14
|
scrollToBottom: string;
|
15
15
|
}, undefined, {
|
16
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
17
|
+
isAtBottom?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
18
|
+
} | undefined;
|
19
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
20
|
+
twMergeConfig: {
|
21
|
+
prefix: string;
|
22
|
+
};
|
23
|
+
}, {
|
16
24
|
isAtBottom: {
|
17
25
|
true: {
|
18
26
|
scrollToBottom: string;
|
@@ -40,4 +48,22 @@ export declare const chatMessagesStyles: import("tailwind-variants").TVReturnTyp
|
|
40
48
|
scroll: string;
|
41
49
|
content: string;
|
42
50
|
scrollToBottom: string;
|
43
|
-
}, undefined,
|
51
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
52
|
+
isAtBottom: {
|
53
|
+
true: {
|
54
|
+
scrollToBottom: string;
|
55
|
+
};
|
56
|
+
false: {
|
57
|
+
scrollToBottom: string;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
}, {
|
61
|
+
isAtBottom: {
|
62
|
+
true: {
|
63
|
+
scrollToBottom: string;
|
64
|
+
};
|
65
|
+
false: {
|
66
|
+
scrollToBottom: string;
|
67
|
+
};
|
68
|
+
};
|
69
|
+
}>, unknown, unknown, undefined>>;
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.chatMessagesStyles = void 0;
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
9
|
-
var _satellitePrefixer = _interopRequireDefault(require("
|
10
|
-
var _tv = require("
|
9
|
+
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
10
|
+
var _tv = require("./../../styles/helpers/tv");
|
11
11
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
12
12
|
var chatMessagesStyles = exports.chatMessagesStyles = (0, _tv.tv)({
|
13
13
|
slots: {
|
@@ -1,8 +1,14 @@
|
|
1
1
|
import type { RefObject } from "react";
|
2
|
-
import type { ChatMessageBase } from "
|
2
|
+
import type { ChatMessageBase } from "../../Chat/types";
|
3
3
|
/**
|
4
4
|
* React hook to compute the “fill” height below the last user message,
|
5
5
|
* based on the scroll container’s height, the last user‐message element’s height,
|
6
6
|
* and any CSS gap/padding offsets.
|
7
|
+
*
|
8
|
+
* @param scrollRef - The ref to the scroll container.
|
9
|
+
* @param lastUserMessageRef - The ref to the last user message.
|
10
|
+
* @param messages - The messages to display in the chat.
|
11
|
+
* @param lastMessageSubmitted - Whether the last message has been submitted.
|
12
|
+
* @param spacingOffset - The spacing offset.
|
7
13
|
*/
|
8
14
|
export declare function useLastMessageHeight(scrollRef: RefObject<HTMLElement>, lastUserMessageRef: RefObject<HTMLDivElement | null>, messages: ChatMessageBase[], lastMessageSubmitted: boolean, spacingOffset?: number): number;
|
@@ -11,6 +11,12 @@ var _react = require("react");
|
|
11
11
|
* React hook to compute the “fill” height below the last user message,
|
12
12
|
* based on the scroll container’s height, the last user‐message element’s height,
|
13
13
|
* and any CSS gap/padding offsets.
|
14
|
+
*
|
15
|
+
* @param scrollRef - The ref to the scroll container.
|
16
|
+
* @param lastUserMessageRef - The ref to the last user message.
|
17
|
+
* @param messages - The messages to display in the chat.
|
18
|
+
* @param lastMessageSubmitted - Whether the last message has been submitted.
|
19
|
+
* @param spacingOffset - The spacing offset.
|
14
20
|
*/
|
15
21
|
function useLastMessageHeight(scrollRef, lastUserMessageRef, messages, lastMessageSubmitted) {
|
16
22
|
var spacingOffset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { FormEvent, KeyboardEvent, ReactNode } from "react";
|
2
|
-
import type {
|
3
|
-
import type {
|
2
|
+
import type { ChatStatus } from "../../Chat/types";
|
3
|
+
import type { TextAreaAutoSizeProps } from "../../Fields/TextAreaAutoSize/TextAreaAutoSize";
|
4
4
|
export declare type ChatPromptLocale = {
|
5
5
|
textareaLabel?: string;
|
6
6
|
emptyMessageTooltip?: string;
|
7
7
|
stopResponseTooltip?: string;
|
8
8
|
sendMessageTooltip?: string;
|
9
|
+
disabledTooltip?: string;
|
9
10
|
};
|
10
11
|
export declare type ChatPromptProps = Omit<TextAreaAutoSizeProps, "onSubmit"> & {
|
11
12
|
/**
|
@@ -34,6 +35,10 @@ export declare type ChatPromptProps = Omit<TextAreaAutoSizeProps, "onSubmit"> &
|
|
34
35
|
* Whether to automatically focus the textarea when the user starts typing.
|
35
36
|
*/
|
36
37
|
autoFocusOnTyping?: boolean;
|
38
|
+
/**
|
39
|
+
* Whether to enable right-to-left (RTL) layout support.
|
40
|
+
*/
|
41
|
+
rtl?: boolean;
|
37
42
|
/**
|
38
43
|
* Optional locale.
|
39
44
|
*/
|
@@ -48,6 +53,11 @@ export declare type ChatPromptProps = Omit<TextAreaAutoSizeProps, "onSubmit"> &
|
|
48
53
|
*/
|
49
54
|
onStop?: () => void;
|
50
55
|
};
|
56
|
+
/**
|
57
|
+
* The `ChatPrompt` component provides a textarea for users to type messages and a button to submit them.
|
58
|
+
*
|
59
|
+
* See the [ChatPrompt documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-prompt) for more information.
|
60
|
+
*/
|
51
61
|
export declare const ChatPrompt: import("react").ForwardRefExoticComponent<Omit<TextAreaAutoSizeProps, "onSubmit"> & {
|
52
62
|
/**
|
53
63
|
* Content to render above the textarea (e.g., a title or instructions).
|
@@ -75,6 +85,10 @@ export declare const ChatPrompt: import("react").ForwardRefExoticComponent<Omit<
|
|
75
85
|
* Whether to automatically focus the textarea when the user starts typing.
|
76
86
|
*/
|
77
87
|
autoFocusOnTyping?: boolean | undefined;
|
88
|
+
/**
|
89
|
+
* Whether to enable right-to-left (RTL) layout support.
|
90
|
+
*/
|
91
|
+
rtl?: boolean | undefined;
|
78
92
|
/**
|
79
93
|
* Optional locale.
|
80
94
|
*/
|
@@ -12,22 +12,28 @@ var _react = require("react");
|
|
12
12
|
var _ChatPrompt = require("./ChatPrompt.styles");
|
13
13
|
var _useFocusTyping = require("./useFocusTyping");
|
14
14
|
var _useTypewriter = require("./useTypewriter");
|
15
|
-
var _Actions = require("
|
16
|
-
var _TextAreaAutoSize = require("
|
17
|
-
var _Icons = require("
|
18
|
-
var _Satellite = require("
|
19
|
-
var _utils = require("
|
20
|
-
var _mergeRefs = require("
|
15
|
+
var _Actions = require("./../../Actions");
|
16
|
+
var _TextAreaAutoSize = require("./../../Fields/TextAreaAutoSize/TextAreaAutoSize");
|
17
|
+
var _Icons = require("./../../Icons");
|
18
|
+
var _Satellite = require("./../../Satellite");
|
19
|
+
var _utils = require("./../../utils");
|
20
|
+
var _mergeRefs = require("./../../utils/mergeRefs");
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
22
|
-
var _excluded = ["className", "renderHeader", "children", "renderFooter", "onSubmit", "onStop", "placeholder", "placeholders", "status", "autoFocusOnTyping", "defaultValue", "value", "locale", "id"];
|
22
|
+
var _excluded = ["className", "renderHeader", "children", "renderFooter", "onSubmit", "onStop", "placeholder", "placeholders", "status", "autoFocusOnTyping", "rtl", "defaultValue", "value", "locale", "id"];
|
23
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
25
25
|
var DEFAULT_CHAT_PROMPT_LOCALE = {
|
26
26
|
textareaLabel: "Type your message...",
|
27
27
|
emptyMessageTooltip: "Message is empty",
|
28
28
|
stopResponseTooltip: "Stop response",
|
29
|
-
sendMessageTooltip: "Send message"
|
29
|
+
sendMessageTooltip: "Send message",
|
30
|
+
disabledTooltip: "Chat prompt is disabled"
|
30
31
|
};
|
32
|
+
/**
|
33
|
+
* The `ChatPrompt` component provides a textarea for users to type messages and a button to submit them.
|
34
|
+
*
|
35
|
+
* See the [ChatPrompt documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-prompt) for more information.
|
36
|
+
*/
|
31
37
|
var ChatPrompt = exports.ChatPrompt = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, forwardedRef) {
|
32
38
|
var _ref2;
|
33
39
|
var className = _ref.className,
|
@@ -43,6 +49,8 @@ var ChatPrompt = exports.ChatPrompt = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
43
49
|
status = _ref$status === void 0 ? "ready" : _ref$status,
|
44
50
|
_ref$autoFocusOnTypin = _ref.autoFocusOnTyping,
|
45
51
|
autoFocusOnTyping = _ref$autoFocusOnTypin === void 0 ? false : _ref$autoFocusOnTypin,
|
52
|
+
_ref$rtl = _ref.rtl,
|
53
|
+
rtl = _ref$rtl === void 0 ? false : _ref$rtl,
|
46
54
|
defaultValue = _ref.defaultValue,
|
47
55
|
valueProp = _ref.value,
|
48
56
|
propsLocale = _ref.locale,
|
@@ -52,10 +60,14 @@ var ChatPrompt = exports.ChatPrompt = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
52
60
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_CHAT_PROMPT_LOCALE), contextLocale), propsLocale);
|
53
61
|
|
54
62
|
// eslint-disable-next-line @algolia/stl/prefer-stl-helper
|
55
|
-
var generatedId = (0,
|
63
|
+
var generatedId = (0, _react.useMemo)(function () {
|
64
|
+
return (0, _utils.uniqueId)("stl-chat-prompt-");
|
65
|
+
}, []);
|
56
66
|
var textareaId = propId !== null && propId !== void 0 ? propId : generatedId;
|
57
67
|
var internalRef = (0, _react.useRef)(null);
|
58
|
-
var styles = (0, _ChatPrompt.chatPromptStyles)(
|
68
|
+
var styles = (0, _ChatPrompt.chatPromptStyles)({
|
69
|
+
disabled: props.disabled
|
70
|
+
});
|
59
71
|
var _useState = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : ""),
|
60
72
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
61
73
|
internalValue = _useState2[0],
|
@@ -73,7 +85,11 @@ var ChatPrompt = exports.ChatPrompt = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
73
85
|
});
|
74
86
|
var submit = function submit(e) {
|
75
87
|
e.preventDefault();
|
76
|
-
if (
|
88
|
+
if (canStop) {
|
89
|
+
onStop === null || onStop === void 0 || onStop();
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
if (!hasValue) {
|
77
93
|
return;
|
78
94
|
}
|
79
95
|
onSubmit === null || onSubmit === void 0 || onSubmit(e);
|
@@ -81,6 +97,7 @@ var ChatPrompt = exports.ChatPrompt = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
81
97
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
82
98
|
className: styles.base(),
|
83
99
|
onSubmit: submit,
|
100
|
+
dir: rtl ? "rtl" : "ltr",
|
84
101
|
children: [!!renderHeader && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
85
102
|
className: styles.header(),
|
86
103
|
children: renderHeader
|
@@ -125,20 +142,15 @@ var ChatPrompt = exports.ChatPrompt = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
125
142
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
126
143
|
className: styles.actions(),
|
127
144
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Actions.IconButton, {
|
128
|
-
type:
|
129
|
-
onClick: function onClick(e) {
|
130
|
-
if (canStop) {
|
131
|
-
e.preventDefault();
|
132
|
-
onStop === null || onStop === void 0 || onStop();
|
133
|
-
}
|
134
|
-
},
|
145
|
+
type: "submit",
|
135
146
|
icon: canStop ? _Icons.StopCircleIcon : _Icons.ArrowUpIcon,
|
136
147
|
variant: canStop ? "neutral" : "primary",
|
137
148
|
size: "small",
|
138
|
-
title: buttonDisabled ? locale.emptyMessageTooltip : canStop ? locale.stopResponseTooltip : locale.sendMessageTooltip,
|
149
|
+
title: props.disabled ? locale.disabledTooltip : buttonDisabled ? locale.emptyMessageTooltip : canStop ? locale.stopResponseTooltip : locale.sendMessageTooltip,
|
139
150
|
tooltipSide: "top",
|
140
151
|
disabled: buttonDisabled,
|
141
|
-
className: styles.submit()
|
152
|
+
className: styles.submit(),
|
153
|
+
"data-status": status
|
142
154
|
})
|
143
155
|
})
|
144
156
|
}))
|
@@ -0,0 +1,63 @@
|
|
1
|
+
export declare const chatPromptStyles: import("tailwind-variants").TVReturnType<{
|
2
|
+
disabled: {
|
3
|
+
true: {
|
4
|
+
actions: string;
|
5
|
+
};
|
6
|
+
};
|
7
|
+
}, {
|
8
|
+
base: string;
|
9
|
+
header: string;
|
10
|
+
body: string;
|
11
|
+
textarea: string;
|
12
|
+
actions: string;
|
13
|
+
submit: string;
|
14
|
+
footer: string;
|
15
|
+
}, undefined, {
|
16
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
17
|
+
disabled?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
18
|
+
} | undefined;
|
19
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
20
|
+
twMergeConfig: {
|
21
|
+
prefix: string;
|
22
|
+
};
|
23
|
+
}, {
|
24
|
+
disabled: {
|
25
|
+
true: {
|
26
|
+
actions: string;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
}, {
|
30
|
+
base: string;
|
31
|
+
header: string;
|
32
|
+
body: string;
|
33
|
+
textarea: string;
|
34
|
+
actions: string;
|
35
|
+
submit: string;
|
36
|
+
footer: string;
|
37
|
+
}, import("tailwind-variants").TVReturnType<{
|
38
|
+
disabled: {
|
39
|
+
true: {
|
40
|
+
actions: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
}, {
|
44
|
+
base: string;
|
45
|
+
header: string;
|
46
|
+
body: string;
|
47
|
+
textarea: string;
|
48
|
+
actions: string;
|
49
|
+
submit: string;
|
50
|
+
footer: string;
|
51
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
52
|
+
disabled: {
|
53
|
+
true: {
|
54
|
+
actions: string;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
}, {
|
58
|
+
disabled: {
|
59
|
+
true: {
|
60
|
+
actions: string;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
}>, unknown, unknown, undefined>>;
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.chatPromptStyles = void 0;
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
9
|
-
var _satellitePrefixer = _interopRequireDefault(require("
|
10
|
-
var _tv = require("
|
11
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
9
|
+
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
10
|
+
var _tv = require("./../../styles/helpers/tv");
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
12
12
|
var chatPromptStyles = exports.chatPromptStyles = (0, _tv.tv)({
|
13
13
|
slots: {
|
14
14
|
base: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["relative flex flex-col items-stretch gap-2 w-full"]))),
|
@@ -18,5 +18,12 @@ var chatPromptStyles = exports.chatPromptStyles = (0, _tv.tv)({
|
|
18
18
|
actions: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["flex flex-row p-3 pt-2 justify-end cursor-text"]))),
|
19
19
|
submit: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])([""]))),
|
20
20
|
footer: (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["flex items-center justify-between gap-1.5"])))
|
21
|
+
},
|
22
|
+
variants: {
|
23
|
+
disabled: {
|
24
|
+
"true": {
|
25
|
+
actions: (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100 cursor-not-allowed"])))
|
26
|
+
}
|
27
|
+
}
|
21
28
|
}
|
22
29
|
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
/**
|
3
|
+
* Check if the element is a textual element.
|
4
|
+
* @param el - The element to check.
|
5
|
+
* @returns True if the element is a textual element, false otherwise.
|
6
|
+
*/
|
7
|
+
export declare const isTextualElement: (el: HTMLElement) => boolean;
|
8
|
+
declare type Editable = HTMLTextAreaElement | HTMLInputElement | HTMLElement;
|
9
|
+
export interface UseFocusOnTypingOptions {
|
10
|
+
/**
|
11
|
+
* Whether the hook is enabled.
|
12
|
+
* @default true
|
13
|
+
*/
|
14
|
+
enabled?: boolean;
|
15
|
+
/**
|
16
|
+
* Whether to allow punctuation, diacritics, etc.
|
17
|
+
* @default false
|
18
|
+
*/
|
19
|
+
strictChars?: boolean;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Focus `editableRef` the moment the user types anywhere on the page,
|
23
|
+
* *unless* their cursor is already inside an editable control.
|
24
|
+
* @param editableRef - The ref to the editable element.
|
25
|
+
* @param options - The options for the hook.
|
26
|
+
* @param options.enabled - Whether the hook is enabled.
|
27
|
+
* @param options.strictChars - Whether to allow punctuation, diacritics, etc.
|
28
|
+
*/
|
29
|
+
export declare function useFocusOnTyping<E extends Editable = Editable>(editableRef: React.RefObject<E>, options?: UseFocusOnTypingOptions): void;
|
30
|
+
export {};
|
@@ -3,37 +3,41 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
exports.isTextualElement = void 0;
|
6
7
|
exports.useFocusOnTyping = useFocusOnTyping;
|
7
8
|
var _react = require("react");
|
8
|
-
|
9
|
+
/**
|
10
|
+
* Check if the element is a textual element.
|
11
|
+
* @param el - The element to check.
|
12
|
+
* @returns True if the element is a textual element, false otherwise.
|
13
|
+
*/
|
14
|
+
var isTextualElement = exports.isTextualElement = function isTextualElement(el) {
|
9
15
|
if (el.isContentEditable) return true;
|
10
16
|
var tag = el.tagName.toUpperCase();
|
11
17
|
if (tag === "TEXTAREA") return true;
|
12
18
|
if (tag === "INPUT") {
|
13
|
-
|
14
|
-
var t = (el.type || "text").toLowerCase();
|
19
|
+
var t = el.type.toLowerCase();
|
15
20
|
return ["text", "search", "url", "email", "tel", "password", "number", "date", "datetime-local", "month", "week", "time"].includes(t);
|
16
21
|
}
|
17
22
|
return false;
|
18
23
|
};
|
19
|
-
var shouldFocusEditable = function shouldFocusEditable(target) {
|
20
|
-
var el = target;
|
21
|
-
if (!el) return true;
|
22
|
-
return !isTextualElement(el);
|
23
|
-
};
|
24
24
|
|
25
25
|
// e.g. <div contentEditable>
|
26
26
|
|
27
27
|
/**
|
28
28
|
* Focus `editableRef` the moment the user types anywhere on the page,
|
29
29
|
* *unless* their cursor is already inside an editable control.
|
30
|
+
* @param editableRef - The ref to the editable element.
|
31
|
+
* @param options - The options for the hook.
|
32
|
+
* @param options.enabled - Whether the hook is enabled.
|
33
|
+
* @param options.strictChars - Whether to allow punctuation, diacritics, etc.
|
30
34
|
*/
|
31
35
|
function useFocusOnTyping(editableRef) {
|
32
|
-
var
|
33
|
-
|
34
|
-
enabled =
|
35
|
-
|
36
|
-
strictChars =
|
36
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
37
|
+
var _options$enabled = options.enabled,
|
38
|
+
enabled = _options$enabled === void 0 ? true : _options$enabled,
|
39
|
+
_options$strictChars = options.strictChars,
|
40
|
+
strictChars = _options$strictChars === void 0 ? false : _options$strictChars;
|
37
41
|
var handleKeyDown = (0, _react.useCallback)(function (e) {
|
38
42
|
if (!enabled || e.ctrlKey || e.altKey || e.metaKey || e.isComposing || e.repeat || (
|
39
43
|
// Printable-character test
|
@@ -43,7 +47,8 @@ function useFocusOnTyping(editableRef) {
|
|
43
47
|
var node = editableRef.current;
|
44
48
|
if (!node) return;
|
45
49
|
if (node.contains(document.activeElement)) return;
|
46
|
-
|
50
|
+
var el = e.target;
|
51
|
+
if (!el || !isTextualElement(el)) {
|
47
52
|
node.focus();
|
48
53
|
}
|
49
54
|
}, [enabled, strictChars, editableRef]);
|
@@ -15,4 +15,13 @@ export interface UseTypewriterOptions {
|
|
15
15
|
*/
|
16
16
|
pauseDuration?: number;
|
17
17
|
}
|
18
|
+
/**
|
19
|
+
* A hook that types out a list of texts character by character.
|
20
|
+
* @param texts - The list of texts to type out.
|
21
|
+
* @param enabled - Whether the hook is enabled.
|
22
|
+
* @param options - The options for the hook.
|
23
|
+
* @param options.typingSpeed - The speed at which to type out the text.
|
24
|
+
* @param options.deletingSpeed - The speed at which to delete the text.
|
25
|
+
* @param options.pauseDuration - The duration to pause after typing a full word before deleting.
|
26
|
+
*/
|
18
27
|
export declare function useTypewriter(texts: string[], enabled?: boolean, options?: UseTypewriterOptions): string;
|
@@ -7,6 +7,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.useTypewriter = useTypewriter;
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
9
|
var _react = require("react");
|
10
|
+
/**
|
11
|
+
* A hook that types out a list of texts character by character.
|
12
|
+
* @param texts - The list of texts to type out.
|
13
|
+
* @param enabled - Whether the hook is enabled.
|
14
|
+
* @param options - The options for the hook.
|
15
|
+
* @param options.typingSpeed - The speed at which to type out the text.
|
16
|
+
* @param options.deletingSpeed - The speed at which to delete the text.
|
17
|
+
* @param options.pauseDuration - The duration to pause after typing a full word before deleting.
|
18
|
+
*/
|
10
19
|
function useTypewriter(texts) {
|
11
20
|
var enabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
12
21
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
@@ -2,17 +2,25 @@
|
|
2
2
|
import type { TextAreaProps } from "../../Fields/TextArea";
|
3
3
|
export declare type TextAreaAutoSizeProps = TextAreaProps & {
|
4
4
|
/**
|
5
|
-
* The maximum number of rows the `
|
6
|
-
* If set to 0, the `
|
5
|
+
* The maximum number of rows the `TextAreaAutoSize` can expand to when `autoResize` is enabled.
|
6
|
+
* If set to 0, the `TextAreaAutoSize` will expand indefinitely.
|
7
7
|
* @default 0
|
8
8
|
*/
|
9
9
|
maxRows?: number;
|
10
|
+
/**
|
11
|
+
* The number of rows the `TextAreaAutoSize` should start with.
|
12
|
+
*/
|
13
|
+
rows?: number;
|
10
14
|
};
|
11
15
|
export declare const TextAreaAutoSize: import("react").ForwardRefExoticComponent<TextAreaProps & {
|
12
16
|
/**
|
13
|
-
* The maximum number of rows the `
|
14
|
-
* If set to 0, the `
|
17
|
+
* The maximum number of rows the `TextAreaAutoSize` can expand to when `autoResize` is enabled.
|
18
|
+
* If set to 0, the `TextAreaAutoSize` will expand indefinitely.
|
15
19
|
* @default 0
|
16
20
|
*/
|
17
21
|
maxRows?: number | undefined;
|
22
|
+
/**
|
23
|
+
* The number of rows the `TextAreaAutoSize` should start with.
|
24
|
+
*/
|
25
|
+
rows?: number | undefined;
|
18
26
|
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
@@ -13,6 +13,12 @@ export declare const textAreaAutoSizeStyles: import("tailwind-variants").TVRetur
|
|
13
13
|
} | {}, {
|
14
14
|
base: string;
|
15
15
|
}, undefined, {
|
16
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
|
17
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
18
|
+
twMergeConfig: {
|
19
|
+
prefix: string;
|
20
|
+
};
|
21
|
+
}, {
|
16
22
|
[key: string]: {
|
17
23
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
18
24
|
base?: import("tailwind-merge").ClassNameValue;
|
@@ -22,4 +28,10 @@ export declare const textAreaAutoSizeStyles: import("tailwind-variants").TVRetur
|
|
22
28
|
base: string;
|
23
29
|
}, import("tailwind-variants").TVReturnType<unknown, {
|
24
30
|
base: string;
|
25
|
-
}, undefined, unknown,
|
31
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
32
|
+
[key: string]: {
|
33
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
34
|
+
base?: import("tailwind-merge").ClassNameValue;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
} | {}>, unknown, unknown, undefined>>;
|
package/dist/cjs/Layout/index.js
CHANGED
@@ -14,17 +14,6 @@ Object.keys(_Card).forEach(function (key) {
|
|
14
14
|
}
|
15
15
|
});
|
16
16
|
});
|
17
|
-
var _Chat = require("./Chat");
|
18
|
-
Object.keys(_Chat).forEach(function (key) {
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
20
|
-
if (key in exports && exports[key] === _Chat[key]) return;
|
21
|
-
Object.defineProperty(exports, key, {
|
22
|
-
enumerable: true,
|
23
|
-
get: function get() {
|
24
|
-
return _Chat[key];
|
25
|
-
}
|
26
|
-
});
|
27
|
-
});
|
28
17
|
var _CollapsibleCard = require("./CollapsibleCard");
|
29
18
|
Object.keys(_CollapsibleCard).forEach(function (key) {
|
30
19
|
if (key === "default" || key === "__esModule") return;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { IconButtonWithFeedbackLocale } from "../Actions";
|
2
|
+
import type { ChatMessageErrorLocale } from "../Chat/ChatMessageError";
|
3
|
+
import type { ChatMessageLocale } from "../Chat/ChatMessages";
|
4
|
+
import type { ChatPromptLocale } from "../Chat/ChatPrompt";
|
2
5
|
import type { AutoCompleteLocale, DateInputLocale, DatePickerLocale, DropzoneLocale, ExperimentalDateRangeInputLocale, ExperimentalFormLocale, FilePickerLocale, InputPropsLocale } from "../Fields";
|
3
6
|
import type { AnnouncementBadgeLocale, TagLocale, ToastLocale, ToastsLocale } from "../Indicators";
|
4
7
|
import type { UserAvatarLocale } from "../Indicators/Avatars";
|
5
8
|
import type { DataTableLocale, SidebarLocale } from "../Layout";
|
6
|
-
import type { ChatMessageErrorLocale } from "../Layout/Chat/ChatMessageError";
|
7
|
-
import type { ChatMessageLocale } from "../Layout/Chat/ChatMessages";
|
8
|
-
import type { ChatPromptLocale } from "../Layout/Chat/ChatPrompt";
|
9
9
|
import type { CompactPaginationLocale, DotPaginationLocale, PaginationLocale, StepperLocale } from "../Navigation";
|
10
10
|
import type { ModalLocale, PopoverLocale } from "../Overlay";
|
11
11
|
export declare type ComponentsLocales = {
|
package/dist/cjs/index.d.ts
CHANGED