@algolia/satellite 2.3.0-rc.6 → 2.3.0-rc.9
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 +20 -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 +20 -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
@@ -0,0 +1,253 @@
|
|
1
|
+
export declare const chatMessageErrorStyles: import("tailwind-variants").TVReturnType<{
|
2
|
+
[key: string]: {
|
3
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
4
|
+
content?: import("tailwind-merge").ClassNameValue;
|
5
|
+
};
|
6
|
+
};
|
7
|
+
} | {
|
8
|
+
variant: {
|
9
|
+
neutral: import("tailwind-merge").ClassNameValue | {
|
10
|
+
content?: import("tailwind-merge").ClassNameValue;
|
11
|
+
};
|
12
|
+
subtle: import("tailwind-merge").ClassNameValue | {
|
13
|
+
content?: import("tailwind-merge").ClassNameValue;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
side: {
|
17
|
+
left: import("tailwind-merge").ClassNameValue | {
|
18
|
+
content?: import("tailwind-merge").ClassNameValue;
|
19
|
+
};
|
20
|
+
right: import("tailwind-merge").ClassNameValue | {
|
21
|
+
content?: import("tailwind-merge").ClassNameValue;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
leading: {
|
25
|
+
true: import("tailwind-merge").ClassNameValue | {
|
26
|
+
content?: import("tailwind-merge").ClassNameValue;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
actions: {
|
30
|
+
true: import("tailwind-merge").ClassNameValue | {
|
31
|
+
content?: import("tailwind-merge").ClassNameValue;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
autoHideActions: {
|
35
|
+
true: import("tailwind-merge").ClassNameValue | {
|
36
|
+
content?: import("tailwind-merge").ClassNameValue;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
}, {
|
40
|
+
content: string;
|
41
|
+
}, undefined, {
|
42
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
43
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
44
|
+
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
45
|
+
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
46
|
+
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
47
|
+
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
48
|
+
} | undefined;
|
49
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
50
|
+
twMergeConfig: {
|
51
|
+
prefix: string;
|
52
|
+
};
|
53
|
+
}, {
|
54
|
+
variant: {
|
55
|
+
neutral: {
|
56
|
+
message: string;
|
57
|
+
};
|
58
|
+
subtle: {
|
59
|
+
message: string;
|
60
|
+
};
|
61
|
+
};
|
62
|
+
side: {
|
63
|
+
left: {
|
64
|
+
container: string;
|
65
|
+
};
|
66
|
+
right: {
|
67
|
+
container: string;
|
68
|
+
};
|
69
|
+
};
|
70
|
+
leading: {
|
71
|
+
true: string;
|
72
|
+
};
|
73
|
+
actions: {
|
74
|
+
true: string;
|
75
|
+
};
|
76
|
+
autoHideActions: {
|
77
|
+
true: string;
|
78
|
+
};
|
79
|
+
}, {
|
80
|
+
base: string;
|
81
|
+
container: string;
|
82
|
+
leading: string;
|
83
|
+
content: string;
|
84
|
+
message: string;
|
85
|
+
actions: string;
|
86
|
+
footer: string;
|
87
|
+
}, import("tailwind-variants").TVReturnType<{
|
88
|
+
variant: {
|
89
|
+
neutral: {
|
90
|
+
message: string;
|
91
|
+
};
|
92
|
+
subtle: {
|
93
|
+
message: string;
|
94
|
+
};
|
95
|
+
};
|
96
|
+
side: {
|
97
|
+
left: {
|
98
|
+
container: string;
|
99
|
+
};
|
100
|
+
right: {
|
101
|
+
container: string;
|
102
|
+
};
|
103
|
+
};
|
104
|
+
leading: {
|
105
|
+
true: string;
|
106
|
+
};
|
107
|
+
actions: {
|
108
|
+
true: string;
|
109
|
+
};
|
110
|
+
autoHideActions: {
|
111
|
+
true: string;
|
112
|
+
};
|
113
|
+
}, {
|
114
|
+
base: string;
|
115
|
+
container: string;
|
116
|
+
leading: string;
|
117
|
+
content: string;
|
118
|
+
message: string;
|
119
|
+
actions: string;
|
120
|
+
footer: string;
|
121
|
+
}, undefined, {
|
122
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
123
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
124
|
+
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
125
|
+
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
126
|
+
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
127
|
+
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
128
|
+
} | undefined;
|
129
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
130
|
+
twMergeConfig: {
|
131
|
+
prefix: string;
|
132
|
+
};
|
133
|
+
}, {
|
134
|
+
variant: {
|
135
|
+
neutral: {
|
136
|
+
message: string;
|
137
|
+
};
|
138
|
+
subtle: {
|
139
|
+
message: string;
|
140
|
+
};
|
141
|
+
};
|
142
|
+
side: {
|
143
|
+
left: {
|
144
|
+
container: string;
|
145
|
+
};
|
146
|
+
right: {
|
147
|
+
container: string;
|
148
|
+
};
|
149
|
+
};
|
150
|
+
leading: {
|
151
|
+
true: string;
|
152
|
+
};
|
153
|
+
actions: {
|
154
|
+
true: string;
|
155
|
+
};
|
156
|
+
autoHideActions: {
|
157
|
+
true: string;
|
158
|
+
};
|
159
|
+
}, {
|
160
|
+
base: string;
|
161
|
+
container: string;
|
162
|
+
leading: string;
|
163
|
+
content: string;
|
164
|
+
message: string;
|
165
|
+
actions: string;
|
166
|
+
footer: string;
|
167
|
+
}, import("tailwind-variants").TVReturnType<{
|
168
|
+
variant: {
|
169
|
+
neutral: {
|
170
|
+
message: string;
|
171
|
+
};
|
172
|
+
subtle: {
|
173
|
+
message: string;
|
174
|
+
};
|
175
|
+
};
|
176
|
+
side: {
|
177
|
+
left: {
|
178
|
+
container: string;
|
179
|
+
};
|
180
|
+
right: {
|
181
|
+
container: string;
|
182
|
+
};
|
183
|
+
};
|
184
|
+
leading: {
|
185
|
+
true: string;
|
186
|
+
};
|
187
|
+
actions: {
|
188
|
+
true: string;
|
189
|
+
};
|
190
|
+
autoHideActions: {
|
191
|
+
true: string;
|
192
|
+
};
|
193
|
+
}, {
|
194
|
+
base: string;
|
195
|
+
container: string;
|
196
|
+
leading: string;
|
197
|
+
content: string;
|
198
|
+
message: string;
|
199
|
+
actions: string;
|
200
|
+
footer: string;
|
201
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
202
|
+
variant: {
|
203
|
+
neutral: {
|
204
|
+
message: string;
|
205
|
+
};
|
206
|
+
subtle: {
|
207
|
+
message: string;
|
208
|
+
};
|
209
|
+
};
|
210
|
+
side: {
|
211
|
+
left: {
|
212
|
+
container: string;
|
213
|
+
};
|
214
|
+
right: {
|
215
|
+
container: string;
|
216
|
+
};
|
217
|
+
};
|
218
|
+
leading: {
|
219
|
+
true: string;
|
220
|
+
};
|
221
|
+
actions: {
|
222
|
+
true: string;
|
223
|
+
};
|
224
|
+
autoHideActions: {
|
225
|
+
true: string;
|
226
|
+
};
|
227
|
+
}, {
|
228
|
+
variant: {
|
229
|
+
neutral: {
|
230
|
+
message: string;
|
231
|
+
};
|
232
|
+
subtle: {
|
233
|
+
message: string;
|
234
|
+
};
|
235
|
+
};
|
236
|
+
side: {
|
237
|
+
left: {
|
238
|
+
container: string;
|
239
|
+
};
|
240
|
+
right: {
|
241
|
+
container: string;
|
242
|
+
};
|
243
|
+
};
|
244
|
+
leading: {
|
245
|
+
true: string;
|
246
|
+
};
|
247
|
+
actions: {
|
248
|
+
true: string;
|
249
|
+
};
|
250
|
+
autoHideActions: {
|
251
|
+
true: string;
|
252
|
+
};
|
253
|
+
}>, unknown, unknown, undefined>>>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
var _templateObject;
|
3
3
|
import { chatMessageStyles } from "./../ChatMessage/ChatMessage.styles";
|
4
|
-
import stl from "
|
5
|
-
import { tv } from "
|
4
|
+
import stl from "./../../styles/helpers/satellitePrefixer";
|
5
|
+
import { tv } from "./../../styles/helpers/tv";
|
6
6
|
export var chatMessageErrorStyles = tv({
|
7
7
|
extend: chatMessageStyles,
|
8
8
|
slots: {
|
@@ -1,18 +1,21 @@
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from "react";
|
2
|
-
import type { ChatMessageProps } from "
|
2
|
+
import type { ChatMessageProps } from "../../Chat/ChatMessage";
|
3
3
|
export declare type ChatMessageLoaderProps = Omit<HTMLAttributes<HTMLElement>, "children"> & Pick<ChatMessageProps, "rtl"> & {
|
4
4
|
/**
|
5
5
|
* Message to display in the loader.
|
6
6
|
* If not provided, no message will be shown.
|
7
|
-
* @default undefined
|
8
7
|
*/
|
9
8
|
message?: ReactNode;
|
10
9
|
};
|
10
|
+
/**
|
11
|
+
* The `ChatMessageLoader` component provides a message to display when a response is being generated.
|
12
|
+
*
|
13
|
+
* See the [ChatMessageLoader documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-message-loader) for more information.
|
14
|
+
*/
|
11
15
|
export declare const ChatMessageLoader: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & Pick<ChatMessageProps<Record<string, any>>, "rtl"> & {
|
12
16
|
/**
|
13
17
|
* Message to display in the loader.
|
14
18
|
* If not provided, no message will be shown.
|
15
|
-
* @default undefined
|
16
19
|
*/
|
17
20
|
message?: ReactNode;
|
18
21
|
} & import("react").RefAttributes<HTMLElement>>;
|
@@ -7,10 +7,15 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
7
7
|
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) { _defineProperty(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; }
|
8
8
|
import { forwardRef } from "react";
|
9
9
|
import { chatMessageLoaderStyles } from "./ChatMessageLoader.styles";
|
10
|
-
import { ShimmerText } from "
|
11
|
-
import { ProgressSpinner, Skeleton } from "
|
12
|
-
import stl from "
|
10
|
+
import { ShimmerText } from "./../../Helpers/ShimmerText/ShimmerText";
|
11
|
+
import { ProgressSpinner, Skeleton } from "./../../Indicators";
|
12
|
+
import stl from "./../../styles/helpers/satellitePrefixer";
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
14
|
+
/**
|
15
|
+
* The `ChatMessageLoader` component provides a message to display when a response is being generated.
|
16
|
+
*
|
17
|
+
* See the [ChatMessageLoader documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-message-loader) for more information.
|
18
|
+
*/
|
14
19
|
export var ChatMessageLoader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
15
20
|
var message = _ref.message,
|
16
21
|
rtl = _ref.rtl,
|
@@ -36,7 +41,7 @@ export var ChatMessageLoader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
36
41
|
className: styles.content(),
|
37
42
|
children: /*#__PURE__*/_jsxs("div", {
|
38
43
|
className: styles.message(),
|
39
|
-
children: [/*#__PURE__*/_jsx(ShimmerText, {
|
44
|
+
children: [!!message && /*#__PURE__*/_jsx(ShimmerText, {
|
40
45
|
children: message
|
41
46
|
}), /*#__PURE__*/_jsxs("div", {
|
42
47
|
className: styles.skeletonWrapper(),
|
@@ -2,62 +2,62 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
2
2
|
[key: string]: {
|
3
3
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
4
4
|
content?: import("tailwind-merge").ClassNameValue;
|
5
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
5
6
|
message?: import("tailwind-merge").ClassNameValue;
|
6
7
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
7
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
8
8
|
};
|
9
9
|
};
|
10
10
|
} | {
|
11
11
|
variant: {
|
12
12
|
neutral: import("tailwind-merge").ClassNameValue | {
|
13
13
|
content?: import("tailwind-merge").ClassNameValue;
|
14
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
14
15
|
message?: import("tailwind-merge").ClassNameValue;
|
15
16
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
16
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
17
17
|
};
|
18
18
|
subtle: import("tailwind-merge").ClassNameValue | {
|
19
19
|
content?: import("tailwind-merge").ClassNameValue;
|
20
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
20
21
|
message?: import("tailwind-merge").ClassNameValue;
|
21
22
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
22
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
23
23
|
};
|
24
24
|
};
|
25
25
|
side: {
|
26
26
|
left: import("tailwind-merge").ClassNameValue | {
|
27
27
|
content?: import("tailwind-merge").ClassNameValue;
|
28
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
28
29
|
message?: import("tailwind-merge").ClassNameValue;
|
29
30
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
30
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
31
31
|
};
|
32
32
|
right: import("tailwind-merge").ClassNameValue | {
|
33
33
|
content?: import("tailwind-merge").ClassNameValue;
|
34
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
34
35
|
message?: import("tailwind-merge").ClassNameValue;
|
35
36
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
36
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
37
37
|
};
|
38
38
|
};
|
39
39
|
leading: {
|
40
40
|
true: import("tailwind-merge").ClassNameValue | {
|
41
41
|
content?: import("tailwind-merge").ClassNameValue;
|
42
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
42
43
|
message?: import("tailwind-merge").ClassNameValue;
|
43
44
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
44
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
45
45
|
};
|
46
46
|
};
|
47
47
|
actions: {
|
48
48
|
true: import("tailwind-merge").ClassNameValue | {
|
49
49
|
content?: import("tailwind-merge").ClassNameValue;
|
50
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
50
51
|
message?: import("tailwind-merge").ClassNameValue;
|
51
52
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
52
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
53
53
|
};
|
54
54
|
};
|
55
55
|
autoHideActions: {
|
56
56
|
true: import("tailwind-merge").ClassNameValue | {
|
57
57
|
content?: import("tailwind-merge").ClassNameValue;
|
58
|
+
skeleton?: import("tailwind-merge").ClassNameValue;
|
58
59
|
message?: import("tailwind-merge").ClassNameValue;
|
59
60
|
skeletonWrapper?: import("tailwind-merge").ClassNameValue;
|
60
|
-
skeleton?: import("tailwind-merge").ClassNameValue;
|
61
61
|
};
|
62
62
|
};
|
63
63
|
}, {
|
@@ -66,6 +66,18 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
66
66
|
skeletonWrapper: string;
|
67
67
|
skeleton: string;
|
68
68
|
}, undefined, {
|
69
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
70
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
71
|
+
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
72
|
+
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
73
|
+
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
74
|
+
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
75
|
+
} | undefined;
|
76
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
77
|
+
twMergeConfig: {
|
78
|
+
prefix: string;
|
79
|
+
};
|
80
|
+
}, {
|
69
81
|
variant: {
|
70
82
|
neutral: {
|
71
83
|
message: string;
|
@@ -98,6 +110,7 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
98
110
|
content: string;
|
99
111
|
message: string;
|
100
112
|
actions: string;
|
113
|
+
footer: string;
|
101
114
|
}, import("tailwind-variants").TVReturnType<{
|
102
115
|
variant: {
|
103
116
|
neutral: {
|
@@ -131,7 +144,20 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
131
144
|
content: string;
|
132
145
|
message: string;
|
133
146
|
actions: string;
|
147
|
+
footer: string;
|
134
148
|
}, undefined, {
|
149
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
150
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
151
|
+
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
152
|
+
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
153
|
+
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
154
|
+
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
155
|
+
} | undefined;
|
156
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
157
|
+
twMergeConfig: {
|
158
|
+
prefix: string;
|
159
|
+
};
|
160
|
+
}, {
|
135
161
|
variant: {
|
136
162
|
neutral: {
|
137
163
|
message: string;
|
@@ -164,6 +190,7 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
164
190
|
content: string;
|
165
191
|
message: string;
|
166
192
|
actions: string;
|
193
|
+
footer: string;
|
167
194
|
}, import("tailwind-variants").TVReturnType<{
|
168
195
|
variant: {
|
169
196
|
neutral: {
|
@@ -197,4 +224,57 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
197
224
|
content: string;
|
198
225
|
message: string;
|
199
226
|
actions: string;
|
200
|
-
|
227
|
+
footer: string;
|
228
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
229
|
+
variant: {
|
230
|
+
neutral: {
|
231
|
+
message: string;
|
232
|
+
};
|
233
|
+
subtle: {
|
234
|
+
message: string;
|
235
|
+
};
|
236
|
+
};
|
237
|
+
side: {
|
238
|
+
left: {
|
239
|
+
container: string;
|
240
|
+
};
|
241
|
+
right: {
|
242
|
+
container: string;
|
243
|
+
};
|
244
|
+
};
|
245
|
+
leading: {
|
246
|
+
true: string;
|
247
|
+
};
|
248
|
+
actions: {
|
249
|
+
true: string;
|
250
|
+
};
|
251
|
+
autoHideActions: {
|
252
|
+
true: string;
|
253
|
+
};
|
254
|
+
}, {
|
255
|
+
variant: {
|
256
|
+
neutral: {
|
257
|
+
message: string;
|
258
|
+
};
|
259
|
+
subtle: {
|
260
|
+
message: string;
|
261
|
+
};
|
262
|
+
};
|
263
|
+
side: {
|
264
|
+
left: {
|
265
|
+
container: string;
|
266
|
+
};
|
267
|
+
right: {
|
268
|
+
container: string;
|
269
|
+
};
|
270
|
+
};
|
271
|
+
leading: {
|
272
|
+
true: string;
|
273
|
+
};
|
274
|
+
actions: {
|
275
|
+
true: string;
|
276
|
+
};
|
277
|
+
autoHideActions: {
|
278
|
+
true: string;
|
279
|
+
};
|
280
|
+
}>, unknown, unknown, undefined>>>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
3
3
|
import { chatMessageStyles } from "./../ChatMessage/ChatMessage.styles";
|
4
|
-
import stl from "
|
5
|
-
import { tv } from "
|
4
|
+
import stl from "./../../styles/helpers/satellitePrefixer";
|
5
|
+
import { tv } from "./../../styles/helpers/tv";
|
6
6
|
export var chatMessageLoaderStyles = tv({
|
7
7
|
extend: chatMessageStyles,
|
8
8
|
slots: {
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import type { HTMLAttributes, ReactElement, ReactNode, Ref } from "react";
|
2
|
+
import type { ChatMessageProps } from "../../Chat/ChatMessage";
|
3
|
+
import type { ChatMessageErrorProps } from "../../Chat/ChatMessageError";
|
4
|
+
import type { ChatMessageLoaderProps } from "../../Chat/ChatMessageLoader";
|
5
|
+
import type { ChatMessageBase, ChatStatus } from "../../Chat/types";
|
6
|
+
export declare type ChatMessageLocale = {
|
7
|
+
scrollToBottomText?: string;
|
8
|
+
};
|
9
|
+
declare type ChatMessageWithoutContent<Message extends ChatMessageBase> = Omit<ChatMessageProps<Message>, "content">;
|
10
|
+
export declare type ChatMessagesProps<Message extends ChatMessageBase = ChatMessageBase> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
11
|
+
/**
|
12
|
+
* The messages to display in the chat.
|
13
|
+
*/
|
14
|
+
messages: Message[];
|
15
|
+
/**
|
16
|
+
* The props for the user message.
|
17
|
+
*/
|
18
|
+
userMessageProps?: ChatMessageWithoutContent<Message> | ((message: Message) => ChatMessageWithoutContent<Message>);
|
19
|
+
/**
|
20
|
+
* The props for the assistant message.
|
21
|
+
*/
|
22
|
+
assistantMessageProps?: ChatMessageWithoutContent<Message> | ((message: Message) => ChatMessageWithoutContent<Message>);
|
23
|
+
/**
|
24
|
+
* The props for the loader message.
|
25
|
+
*/
|
26
|
+
loaderProps?: ChatMessageLoaderProps;
|
27
|
+
/**
|
28
|
+
* The props for the error message.
|
29
|
+
*/
|
30
|
+
errorProps?: Omit<ChatMessageErrorProps, "onReload">;
|
31
|
+
/**
|
32
|
+
* The function to render the message.
|
33
|
+
*/
|
34
|
+
renderMessage?: (message: Message) => ReactNode;
|
35
|
+
/**
|
36
|
+
* The function to render the loader message.
|
37
|
+
*/
|
38
|
+
renderLoader?: ReactNode;
|
39
|
+
/**
|
40
|
+
* The function to render the error message.
|
41
|
+
*/
|
42
|
+
renderError?: ReactNode;
|
43
|
+
/**
|
44
|
+
* The status of the chat.
|
45
|
+
*/
|
46
|
+
status?: ChatStatus;
|
47
|
+
/**
|
48
|
+
* The function to reload the chat.
|
49
|
+
*/
|
50
|
+
onReload?: () => void;
|
51
|
+
/**
|
52
|
+
* Whether to hide the scroll to bottom button.
|
53
|
+
*/
|
54
|
+
hideScrollToBottom?: boolean;
|
55
|
+
/**
|
56
|
+
* The class name for the scroll container.
|
57
|
+
*/
|
58
|
+
scrollClassName?: string;
|
59
|
+
/**
|
60
|
+
* The class name for the content container.
|
61
|
+
*/
|
62
|
+
contentClassName?: string;
|
63
|
+
/**
|
64
|
+
* The locale for the chat messages.
|
65
|
+
*/
|
66
|
+
locale?: ChatMessageLocale;
|
67
|
+
/**
|
68
|
+
* Whether to enable right-to-left text direction.
|
69
|
+
*/
|
70
|
+
rtl?: boolean;
|
71
|
+
};
|
72
|
+
/**
|
73
|
+
* The `ChatMessages` component provides a list of messages to display in the chat.
|
74
|
+
*
|
75
|
+
* See the [ChatMessages documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-messages) for more information.
|
76
|
+
*/
|
77
|
+
export declare const ChatMessages: <Message extends ChatMessageBase = ChatMessageBase>(props: Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
78
|
+
/**
|
79
|
+
* The messages to display in the chat.
|
80
|
+
*/
|
81
|
+
messages: Message[];
|
82
|
+
/**
|
83
|
+
* The props for the user message.
|
84
|
+
*/
|
85
|
+
userMessageProps?: ChatMessageWithoutContent<Message> | ((message: Message) => ChatMessageWithoutContent<Message>) | undefined;
|
86
|
+
/**
|
87
|
+
* The props for the assistant message.
|
88
|
+
*/
|
89
|
+
assistantMessageProps?: ChatMessageWithoutContent<Message> | ((message: Message) => ChatMessageWithoutContent<Message>) | undefined;
|
90
|
+
/**
|
91
|
+
* The props for the loader message.
|
92
|
+
*/
|
93
|
+
loaderProps?: ChatMessageLoaderProps | undefined;
|
94
|
+
/**
|
95
|
+
* The props for the error message.
|
96
|
+
*/
|
97
|
+
errorProps?: Omit<ChatMessageErrorProps, "onReload"> | undefined;
|
98
|
+
/**
|
99
|
+
* The function to render the message.
|
100
|
+
*/
|
101
|
+
renderMessage?: ((message: Message) => ReactNode) | undefined;
|
102
|
+
/**
|
103
|
+
* The function to render the loader message.
|
104
|
+
*/
|
105
|
+
renderLoader?: ReactNode;
|
106
|
+
/**
|
107
|
+
* The function to render the error message.
|
108
|
+
*/
|
109
|
+
renderError?: ReactNode;
|
110
|
+
/**
|
111
|
+
* The status of the chat.
|
112
|
+
*/
|
113
|
+
status?: ChatStatus | undefined;
|
114
|
+
/**
|
115
|
+
* The function to reload the chat.
|
116
|
+
*/
|
117
|
+
onReload?: (() => void) | undefined;
|
118
|
+
/**
|
119
|
+
* Whether to hide the scroll to bottom button.
|
120
|
+
*/
|
121
|
+
hideScrollToBottom?: boolean | undefined;
|
122
|
+
/**
|
123
|
+
* The class name for the scroll container.
|
124
|
+
*/
|
125
|
+
scrollClassName?: string | undefined;
|
126
|
+
/**
|
127
|
+
* The class name for the content container.
|
128
|
+
*/
|
129
|
+
contentClassName?: string | undefined;
|
130
|
+
/**
|
131
|
+
* The locale for the chat messages.
|
132
|
+
*/
|
133
|
+
locale?: ChatMessageLocale | undefined;
|
134
|
+
/**
|
135
|
+
* Whether to enable right-to-left text direction.
|
136
|
+
*/
|
137
|
+
rtl?: boolean | undefined;
|
138
|
+
} & {
|
139
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
140
|
+
}) => ReactElement | null;
|
141
|
+
export {};
|