@algolia/satellite 2.2.3 → 2.3.0-rc.1
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/Actions/Accordion/Accordion.d.ts +8 -0
- package/dist/cjs/Actions/Accordion/Accordion.js +5 -3
- package/dist/cjs/Fields/TextArea/TextArea.d.ts +5 -1
- package/dist/cjs/Fields/TextArea/TextArea.js +3 -2
- package/dist/cjs/Fields/TextArea/TextArea.tailwind.js +1 -1
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +18 -0
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.js +82 -0
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +25 -0
- package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.js +16 -0
- package/dist/cjs/Fields/TextAreaAutoSize/index.d.ts +2 -0
- package/dist/cjs/Fields/TextAreaAutoSize/index.js +12 -0
- package/dist/cjs/Fields/index.d.ts +2 -1
- package/dist/cjs/Fields/index.js +15 -4
- package/dist/cjs/Helpers/ShimmerText/ShimmerText.d.ts +3 -0
- package/dist/cjs/Helpers/ShimmerText/ShimmerText.js +28 -0
- package/dist/cjs/Helpers/ShimmerText/ShimmerText.tailwind.d.ts +5 -0
- package/dist/cjs/Helpers/ShimmerText/ShimmerText.tailwind.js +37 -0
- package/dist/cjs/Helpers/ShimmerText/index.d.ts +2 -0
- package/dist/cjs/Helpers/ShimmerText/index.js +12 -0
- package/dist/cjs/Helpers/index.d.ts +1 -0
- package/dist/cjs/Helpers/index.js +11 -0
- package/dist/cjs/Helpers/utilities/utilities.tailwind.js +6 -1
- package/dist/cjs/Indicators/Skeleton/Skeleton.d.ts +2 -2
- package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +8 -0
- package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.js +44 -0
- package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +67 -0
- package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.styles.js +23 -0
- package/dist/cjs/Layout/Chat/ChatContextAccordion/index.d.ts +1 -0
- package/dist/cjs/Layout/Chat/ChatContextAccordion/index.js +16 -0
- package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.d.ts +40 -0
- package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.js +83 -0
- package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +100 -0
- package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.js +71 -0
- package/dist/cjs/Layout/Chat/ChatMessage/index.d.ts +1 -0
- package/dist/cjs/Layout/Chat/ChatMessage/index.js +16 -0
- package/dist/cjs/Layout/Chat/ChatMessageError/ChatMessageError.d.ts +57 -0
- package/dist/cjs/Layout/Chat/ChatMessageError/ChatMessageError.js +68 -0
- package/dist/cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts +173 -0
- package/dist/cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.js +18 -0
- package/dist/cjs/Layout/Chat/ChatMessageError/index.d.ts +1 -0
- package/dist/cjs/Layout/Chat/ChatMessageError/index.js +16 -0
- package/dist/cjs/Layout/Chat/ChatMessageLoader/ChatMessageLoader.d.ts +18 -0
- package/dist/cjs/Layout/Chat/ChatMessageLoader/ChatMessageLoader.js +63 -0
- package/dist/cjs/Layout/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +200 -0
- package/dist/cjs/Layout/Chat/ChatMessageLoader/ChatMessageLoader.styles.js +21 -0
- package/dist/cjs/Layout/Chat/ChatMessageLoader/index.d.ts +1 -0
- package/dist/cjs/Layout/Chat/ChatMessageLoader/index.js +16 -0
- package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.d.ts +42 -0
- package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.js +124 -0
- package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.styles.d.ts +43 -0
- package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.styles.js +29 -0
- package/dist/cjs/Layout/Chat/ChatMessages/index.d.ts +1 -0
- package/dist/cjs/Layout/Chat/ChatMessages/index.js +16 -0
- package/dist/cjs/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +10 -0
- package/dist/cjs/Layout/Chat/ChatMessages/useLastMessageHeight.js +47 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.d.ts +83 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.js +136 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +61 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.js +22 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/index.d.ts +1 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/index.js +16 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/useTypewriter.d.ts +18 -0
- package/dist/cjs/Layout/Chat/ChatPrompt/useTypewriter.js +78 -0
- package/dist/cjs/Layout/Chat/index.d.ts +15 -0
- package/dist/cjs/Layout/Chat/index.js +47 -0
- package/dist/cjs/Layout/Chat/types.d.ts +7 -0
- package/dist/cjs/Layout/Chat/types.js +5 -0
- package/dist/cjs/Layout/index.d.ts +1 -0
- package/dist/cjs/Layout/index.js +11 -0
- package/dist/cjs/Satellite/locale.d.ts +7 -1
- package/dist/cjs/styles/helpers/tv.d.ts +1 -0
- package/dist/cjs/styles/helpers/tv.js +13 -0
- package/dist/cjs/styles/tailwind.config.js +1 -1
- package/dist/cjs/utils/getTextFromReactNode.d.ts +2 -1
- package/dist/cjs/utils/getTextFromReactNode.js +12 -7
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/Actions/Accordion/Accordion.d.ts +8 -0
- package/dist/esm/Actions/Accordion/Accordion.js +5 -3
- package/dist/esm/Fields/TextArea/TextArea.d.ts +5 -1
- package/dist/esm/Fields/TextArea/TextArea.js +3 -2
- package/dist/esm/Fields/TextArea/TextArea.tailwind.js +1 -1
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +18 -0
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.js +75 -0
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +25 -0
- package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.js +9 -0
- package/dist/esm/Fields/TextAreaAutoSize/index.d.ts +2 -0
- package/dist/esm/Fields/TextAreaAutoSize/index.js +1 -0
- package/dist/esm/Fields/index.d.ts +2 -1
- package/dist/esm/Fields/index.js +2 -1
- package/dist/esm/Helpers/ShimmerText/ShimmerText.d.ts +3 -0
- package/dist/esm/Helpers/ShimmerText/ShimmerText.js +21 -0
- package/dist/esm/Helpers/ShimmerText/ShimmerText.tailwind.d.ts +5 -0
- package/dist/esm/Helpers/ShimmerText/ShimmerText.tailwind.js +36 -0
- package/dist/esm/Helpers/ShimmerText/index.d.ts +2 -0
- package/dist/esm/Helpers/ShimmerText/index.js +1 -0
- package/dist/esm/Helpers/index.d.ts +1 -0
- package/dist/esm/Helpers/index.js +2 -1
- package/dist/esm/Helpers/utilities/utilities.tailwind.js +6 -1
- package/dist/esm/Indicators/Skeleton/Skeleton.d.ts +2 -2
- package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +8 -0
- package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.js +37 -0
- package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +67 -0
- package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.styles.js +16 -0
- package/dist/esm/Layout/Chat/ChatContextAccordion/index.d.ts +1 -0
- package/dist/esm/Layout/Chat/ChatContextAccordion/index.js +1 -0
- package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.d.ts +40 -0
- package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.js +77 -0
- package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +100 -0
- package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.js +64 -0
- package/dist/esm/Layout/Chat/ChatMessage/index.d.ts +1 -0
- package/dist/esm/Layout/Chat/ChatMessage/index.js +1 -0
- package/dist/esm/Layout/Chat/ChatMessageError/ChatMessageError.d.ts +57 -0
- package/dist/esm/Layout/Chat/ChatMessageError/ChatMessageError.js +61 -0
- package/dist/esm/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts +173 -0
- package/dist/esm/Layout/Chat/ChatMessageError/ChatMessageError.styles.js +11 -0
- package/dist/esm/Layout/Chat/ChatMessageError/index.d.ts +1 -0
- package/dist/esm/Layout/Chat/ChatMessageError/index.js +1 -0
- package/dist/esm/Layout/Chat/ChatMessageLoader/ChatMessageLoader.d.ts +18 -0
- package/dist/esm/Layout/Chat/ChatMessageLoader/ChatMessageLoader.js +56 -0
- package/dist/esm/Layout/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +200 -0
- package/dist/esm/Layout/Chat/ChatMessageLoader/ChatMessageLoader.styles.js +14 -0
- package/dist/esm/Layout/Chat/ChatMessageLoader/index.d.ts +1 -0
- package/dist/esm/Layout/Chat/ChatMessageLoader/index.js +1 -0
- package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.d.ts +42 -0
- package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.js +119 -0
- package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.styles.d.ts +43 -0
- package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.styles.js +22 -0
- package/dist/esm/Layout/Chat/ChatMessages/index.d.ts +1 -0
- package/dist/esm/Layout/Chat/ChatMessages/index.js +1 -0
- package/dist/esm/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +10 -0
- package/dist/esm/Layout/Chat/ChatMessages/useLastMessageHeight.js +41 -0
- package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.d.ts +83 -0
- package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.js +131 -0
- package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +61 -0
- package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.js +15 -0
- package/dist/esm/Layout/Chat/ChatPrompt/index.d.ts +1 -0
- package/dist/esm/Layout/Chat/ChatPrompt/index.js +1 -0
- package/dist/esm/Layout/Chat/ChatPrompt/useTypewriter.d.ts +18 -0
- package/dist/esm/Layout/Chat/ChatPrompt/useTypewriter.js +71 -0
- package/dist/esm/Layout/Chat/index.d.ts +15 -0
- package/dist/esm/Layout/Chat/index.js +6 -0
- package/dist/esm/Layout/Chat/types.d.ts +7 -0
- package/dist/esm/Layout/Chat/types.js +1 -0
- package/dist/esm/Layout/index.d.ts +1 -0
- package/dist/esm/Layout/index.js +1 -0
- package/dist/esm/Satellite/locale.d.ts +7 -1
- package/dist/esm/styles/helpers/tv.d.ts +1 -0
- package/dist/esm/styles/helpers/tv.js +7 -0
- package/dist/esm/styles/tailwind.config.js +1 -1
- package/dist/esm/utils/getTextFromReactNode.d.ts +2 -1
- package/dist/esm/utils/getTextFromReactNode.js +13 -8
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +12 -3
@@ -0,0 +1,40 @@
|
|
1
|
+
import type { HTMLAttributes, MouseEvent, ReactElement, ReactNode, Ref } from "react";
|
2
|
+
import type { VariantProps } from "tailwind-variants";
|
3
|
+
import { chatMessageStyles } from "./ChatMessage.styles";
|
4
|
+
import type { IconButtonWithFeedbackProps } from "../../../Actions";
|
5
|
+
import type { UserAvatarProps } from "../../../Indicators";
|
6
|
+
declare type ChatMessageVariants = VariantProps<typeof chatMessageStyles>;
|
7
|
+
declare type Actions<ActionsExtraData extends Record<string, any> = Record<string, any>> = Array<Omit<IconButtonWithFeedbackProps, "onClick" | "tooltipDelay" | "tooltipHideDelay"> & {
|
8
|
+
onClick?: (e: MouseEvent<HTMLButtonElement>, actionsExtraData?: ActionsExtraData) => Promise<void> | void;
|
9
|
+
}>;
|
10
|
+
export declare type ChatMessageProps<ActionsExtraData extends Record<string, any> = Record<string, any>> = Omit<HTMLAttributes<HTMLElement>, "children" | "content"> & {
|
11
|
+
content: ReactNode;
|
12
|
+
avatar?: UserAvatarProps["user"];
|
13
|
+
avatarSize?: UserAvatarProps["size"];
|
14
|
+
side?: ChatMessageVariants["side"];
|
15
|
+
variant?: ChatMessageVariants["variant"];
|
16
|
+
actions?: Actions<ActionsExtraData>;
|
17
|
+
autoHideActions?: boolean;
|
18
|
+
renderLeading?: ReactNode;
|
19
|
+
renderActions?: (actions?: Actions<ActionsExtraData>) => ReactNode;
|
20
|
+
renderFooter?: ReactNode;
|
21
|
+
actionsExtraData?: ActionsExtraData;
|
22
|
+
rtl?: boolean;
|
23
|
+
};
|
24
|
+
export declare const ChatMessage: <ActionsExtraData extends Record<string, any> = Record<string, any>>(props: Omit<HTMLAttributes<HTMLElement>, "children" | "content"> & {
|
25
|
+
content: ReactNode;
|
26
|
+
avatar?: import("../../../Indicators/Avatars/types").MinimalUser | undefined;
|
27
|
+
avatarSize?: UserAvatarProps["size"];
|
28
|
+
side?: ChatMessageVariants["side"];
|
29
|
+
variant?: ChatMessageVariants["variant"];
|
30
|
+
actions?: Actions<ActionsExtraData> | undefined;
|
31
|
+
autoHideActions?: boolean | undefined;
|
32
|
+
renderLeading?: ReactNode;
|
33
|
+
renderActions?: ((actions?: Actions<ActionsExtraData> | undefined) => ReactNode) | undefined;
|
34
|
+
renderFooter?: ReactNode;
|
35
|
+
actionsExtraData?: ActionsExtraData | undefined;
|
36
|
+
rtl?: boolean | undefined;
|
37
|
+
} & {
|
38
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
39
|
+
}) => ReactElement | null;
|
40
|
+
export {};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.ChatMessage = void 0;
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
10
|
+
var _react = require("react");
|
11
|
+
var _ChatMessage = require("./ChatMessage.styles");
|
12
|
+
var _Actions = require("./../../../Actions");
|
13
|
+
var _Indicators = require("./../../../Indicators");
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
15
|
+
var _excluded = ["content", "avatar", "avatarSize", "side", "variant", "actions", "autoHideActions", "renderLeading", "renderActions", "renderFooter", "actionsExtraData", "rtl", "className"];
|
16
|
+
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; }
|
17
|
+
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; }
|
18
|
+
var ChatMessageBase = function ChatMessageBase(_ref, ref) {
|
19
|
+
var content = _ref.content,
|
20
|
+
avatar = _ref.avatar,
|
21
|
+
_ref$avatarSize = _ref.avatarSize,
|
22
|
+
avatarSize = _ref$avatarSize === void 0 ? "medium" : _ref$avatarSize,
|
23
|
+
side = _ref.side,
|
24
|
+
variant = _ref.variant,
|
25
|
+
actions = _ref.actions,
|
26
|
+
_ref$autoHideActions = _ref.autoHideActions,
|
27
|
+
autoHideActions = _ref$autoHideActions === void 0 ? false : _ref$autoHideActions,
|
28
|
+
renderLeading = _ref.renderLeading,
|
29
|
+
renderActions = _ref.renderActions,
|
30
|
+
renderFooter = _ref.renderFooter,
|
31
|
+
actionsExtraData = _ref.actionsExtraData,
|
32
|
+
_ref$rtl = _ref.rtl,
|
33
|
+
rtl = _ref$rtl === void 0 ? false : _ref$rtl,
|
34
|
+
className = _ref.className,
|
35
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
36
|
+
var styles = (0, _ChatMessage.chatMessageStyles)({
|
37
|
+
side: side,
|
38
|
+
variant: variant,
|
39
|
+
leading: !!avatar,
|
40
|
+
actions: !!actions,
|
41
|
+
autoHideActions: autoHideActions
|
42
|
+
});
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("article", _objectSpread(_objectSpread({}, props), {}, {
|
44
|
+
ref: ref,
|
45
|
+
className: styles.base({
|
46
|
+
className: className
|
47
|
+
}),
|
48
|
+
dir: rtl ? "rtl" : "ltr",
|
49
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
50
|
+
className: styles.container(),
|
51
|
+
children: [(!!avatar || !!renderLeading) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
52
|
+
className: styles.leading(),
|
53
|
+
children: avatar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Indicators.UserAvatar, {
|
54
|
+
user: avatar,
|
55
|
+
size: avatarSize
|
56
|
+
}) : renderLeading
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
58
|
+
className: styles.content(),
|
59
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
60
|
+
className: styles.message(),
|
61
|
+
children: content
|
62
|
+
}), (!!actions || !!renderActions) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
63
|
+
className: styles.actions(),
|
64
|
+
children: (renderActions === null || renderActions === void 0 ? void 0 : renderActions(actions)) || (actions === null || actions === void 0 ? void 0 : actions.map(function (actionProps, index) {
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Actions.IconButtonWithFeedback, _objectSpread(_objectSpread({
|
66
|
+
size: "small",
|
67
|
+
variant: "subtle",
|
68
|
+
tooltipSide: "bottom"
|
69
|
+
}, actionProps), {}, {
|
70
|
+
onClick: function onClick(e) {
|
71
|
+
var _actionProps$onClick;
|
72
|
+
return (_actionProps$onClick = actionProps.onClick) === null || _actionProps$onClick === void 0 ? void 0 : _actionProps$onClick.call(actionProps, e, actionsExtraData);
|
73
|
+
},
|
74
|
+
tooltipDelay: 0,
|
75
|
+
tooltipHideDelay: 0
|
76
|
+
}), index);
|
77
|
+
}))
|
78
|
+
}), renderFooter]
|
79
|
+
})]
|
80
|
+
})
|
81
|
+
}));
|
82
|
+
};
|
83
|
+
var ChatMessage = exports.ChatMessage = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(ChatMessageBase));
|
@@ -0,0 +1,100 @@
|
|
1
|
+
export declare const chatMessageStyles: import("tailwind-variants").TVReturnType<{
|
2
|
+
variant: {
|
3
|
+
neutral: {
|
4
|
+
message: string;
|
5
|
+
};
|
6
|
+
subtle: {
|
7
|
+
message: string;
|
8
|
+
};
|
9
|
+
};
|
10
|
+
side: {
|
11
|
+
left: {
|
12
|
+
container: string;
|
13
|
+
};
|
14
|
+
right: {
|
15
|
+
container: string;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
leading: {
|
19
|
+
true: string;
|
20
|
+
};
|
21
|
+
actions: {
|
22
|
+
true: string;
|
23
|
+
};
|
24
|
+
autoHideActions: {
|
25
|
+
true: string;
|
26
|
+
};
|
27
|
+
}, {
|
28
|
+
base: string;
|
29
|
+
container: string;
|
30
|
+
leading: string;
|
31
|
+
content: string;
|
32
|
+
message: string;
|
33
|
+
actions: string;
|
34
|
+
}, undefined, {
|
35
|
+
variant: {
|
36
|
+
neutral: {
|
37
|
+
message: string;
|
38
|
+
};
|
39
|
+
subtle: {
|
40
|
+
message: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
side: {
|
44
|
+
left: {
|
45
|
+
container: string;
|
46
|
+
};
|
47
|
+
right: {
|
48
|
+
container: string;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
leading: {
|
52
|
+
true: string;
|
53
|
+
};
|
54
|
+
actions: {
|
55
|
+
true: string;
|
56
|
+
};
|
57
|
+
autoHideActions: {
|
58
|
+
true: string;
|
59
|
+
};
|
60
|
+
}, {
|
61
|
+
base: string;
|
62
|
+
container: string;
|
63
|
+
leading: string;
|
64
|
+
content: string;
|
65
|
+
message: string;
|
66
|
+
actions: string;
|
67
|
+
}, import("tailwind-variants").TVReturnType<{
|
68
|
+
variant: {
|
69
|
+
neutral: {
|
70
|
+
message: string;
|
71
|
+
};
|
72
|
+
subtle: {
|
73
|
+
message: string;
|
74
|
+
};
|
75
|
+
};
|
76
|
+
side: {
|
77
|
+
left: {
|
78
|
+
container: string;
|
79
|
+
};
|
80
|
+
right: {
|
81
|
+
container: string;
|
82
|
+
};
|
83
|
+
};
|
84
|
+
leading: {
|
85
|
+
true: string;
|
86
|
+
};
|
87
|
+
actions: {
|
88
|
+
true: string;
|
89
|
+
};
|
90
|
+
autoHideActions: {
|
91
|
+
true: string;
|
92
|
+
};
|
93
|
+
}, {
|
94
|
+
base: string;
|
95
|
+
container: string;
|
96
|
+
leading: string;
|
97
|
+
content: string;
|
98
|
+
message: string;
|
99
|
+
actions: string;
|
100
|
+
}, undefined, unknown, unknown, undefined>>;
|
@@ -0,0 +1,71 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.chatMessageStyles = void 0;
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
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, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
12
|
+
var chatMessageStyles = exports.chatMessageStyles = (0, _tv.tv)({
|
13
|
+
slots: {
|
14
|
+
base: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["relative w-full scroll-mt-4 group/message"]))),
|
15
|
+
container: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["relative flex items-start group-data-[role=user]/message:max-w-[70%] gap-3"]))),
|
16
|
+
leading: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["inline-flex items-center justify-center"]))),
|
17
|
+
content: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["flex flex-col gap-3 group-data-[role=assistant]/message:grow overflow-x-auto"]))),
|
18
|
+
message: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["relative text-pretty typo-display-body"]))),
|
19
|
+
actions: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["flex items-center gap-1"])))
|
20
|
+
},
|
21
|
+
variants: {
|
22
|
+
variant: {
|
23
|
+
neutral: {
|
24
|
+
message: (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100"])))
|
25
|
+
},
|
26
|
+
subtle: {
|
27
|
+
message: (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])([""])))
|
28
|
+
}
|
29
|
+
},
|
30
|
+
side: {
|
31
|
+
left: {
|
32
|
+
container: (0, _satellitePrefixer["default"])(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["rtl:justify-end"])))
|
33
|
+
},
|
34
|
+
right: {
|
35
|
+
container: (0, _satellitePrefixer["default"])(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["ltr:justify-end ms-auto"])))
|
36
|
+
}
|
37
|
+
},
|
38
|
+
leading: {
|
39
|
+
"true": (0, _satellitePrefixer["default"])(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])([""])))
|
40
|
+
},
|
41
|
+
actions: {
|
42
|
+
"true": (0, _satellitePrefixer["default"])(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])([""])))
|
43
|
+
},
|
44
|
+
autoHideActions: {
|
45
|
+
"true": (0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])([""])))
|
46
|
+
}
|
47
|
+
},
|
48
|
+
compoundVariants: [{
|
49
|
+
variant: "neutral",
|
50
|
+
className: {
|
51
|
+
message: (0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["p-3 rounded-[8px]"]))),
|
52
|
+
leading: (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["mt-3"])))
|
53
|
+
}
|
54
|
+
}, {
|
55
|
+
leading: true,
|
56
|
+
side: "left",
|
57
|
+
className: {
|
58
|
+
actions: (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["left-11"])))
|
59
|
+
}
|
60
|
+
}, {
|
61
|
+
actions: true,
|
62
|
+
autoHideActions: true,
|
63
|
+
className: {
|
64
|
+
actions: (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["opacity-0 group-hover/message:opacity-100 transition-opacity"])))
|
65
|
+
}
|
66
|
+
}],
|
67
|
+
defaultVariants: {
|
68
|
+
variant: "subtle",
|
69
|
+
side: "left"
|
70
|
+
}
|
71
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./ChatMessage";
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
var _ChatMessage = require("./ChatMessage");
|
7
|
+
Object.keys(_ChatMessage).forEach(function (key) {
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
9
|
+
if (key in exports && exports[key] === _ChatMessage[key]) return;
|
10
|
+
Object.defineProperty(exports, key, {
|
11
|
+
enumerable: true,
|
12
|
+
get: function get() {
|
13
|
+
return _ChatMessage[key];
|
14
|
+
}
|
15
|
+
});
|
16
|
+
});
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
2
|
+
import type { ButtonProps } from "../../../Actions";
|
3
|
+
import type { ChatMessageProps } from "../../../Layout/Chat/ChatMessage";
|
4
|
+
export declare type ChatMessageErrorLocale = {
|
5
|
+
error?: string;
|
6
|
+
retry?: string;
|
7
|
+
};
|
8
|
+
export declare type ChatMessageErrorProps = Omit<HTMLAttributes<HTMLElement>, "children"> & Pick<ChatMessageProps, "rtl"> & {
|
9
|
+
/**
|
10
|
+
* Content to render as the error message.
|
11
|
+
* If not provided, a default error message will be shown.
|
12
|
+
*/
|
13
|
+
renderError?: ReactNode;
|
14
|
+
/**
|
15
|
+
* Content to render below the error message.
|
16
|
+
*/
|
17
|
+
renderFooter?: ReactNode;
|
18
|
+
/**
|
19
|
+
* Optional actions to display below the error message.
|
20
|
+
* If not provided, a default retry button will be shown.
|
21
|
+
*/
|
22
|
+
actions?: ButtonProps[];
|
23
|
+
/**
|
24
|
+
* Callback function to be called when the retry button is clicked.
|
25
|
+
* If not provided, the default retry button will not have any action.
|
26
|
+
*/
|
27
|
+
onReload?: () => void;
|
28
|
+
/**
|
29
|
+
* Optional locale.
|
30
|
+
*/
|
31
|
+
locale?: ChatMessageErrorLocale;
|
32
|
+
};
|
33
|
+
export declare const ChatMessageError: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & Pick<ChatMessageProps<Record<string, any>>, "rtl"> & {
|
34
|
+
/**
|
35
|
+
* Content to render as the error message.
|
36
|
+
* If not provided, a default error message will be shown.
|
37
|
+
*/
|
38
|
+
renderError?: ReactNode;
|
39
|
+
/**
|
40
|
+
* Content to render below the error message.
|
41
|
+
*/
|
42
|
+
renderFooter?: ReactNode;
|
43
|
+
/**
|
44
|
+
* Optional actions to display below the error message.
|
45
|
+
* If not provided, a default retry button will be shown.
|
46
|
+
*/
|
47
|
+
actions?: ButtonProps[] | undefined;
|
48
|
+
/**
|
49
|
+
* Callback function to be called when the retry button is clicked.
|
50
|
+
* If not provided, the default retry button will not have any action.
|
51
|
+
*/
|
52
|
+
onReload?: (() => void) | undefined;
|
53
|
+
/**
|
54
|
+
* Optional locale.
|
55
|
+
*/
|
56
|
+
locale?: ChatMessageErrorLocale | undefined;
|
57
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.ChatMessageError = void 0;
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
10
|
+
var _lucideReact = require("lucide-react");
|
11
|
+
var _react = require("react");
|
12
|
+
var _ChatMessageError = require("./ChatMessageError.styles");
|
13
|
+
var _Actions = require("./../../../Actions");
|
14
|
+
var _Satellite = require("./../../../Satellite");
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
16
|
+
var _excluded = ["renderError", "actions", "renderFooter", "locale", "onReload", "rtl", "className"];
|
17
|
+
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; }
|
18
|
+
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; }
|
19
|
+
var DEFAULT_CHAT_MESSAGE_ERROR_LOCALE = {
|
20
|
+
error: "Sorry, we are not able to generate a response at the moment. Please retry or contact support.",
|
21
|
+
retry: "Retry"
|
22
|
+
};
|
23
|
+
var ChatMessageError = exports.ChatMessageError = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
24
|
+
var renderError = _ref.renderError,
|
25
|
+
actions = _ref.actions,
|
26
|
+
renderFooter = _ref.renderFooter,
|
27
|
+
propsLocale = _ref.locale,
|
28
|
+
onReload = _ref.onReload,
|
29
|
+
rtl = _ref.rtl,
|
30
|
+
className = _ref.className,
|
31
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
32
|
+
var contextLocale = (0, _Satellite.useLocale)("chatMessageError");
|
33
|
+
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_CHAT_MESSAGE_ERROR_LOCALE), contextLocale), propsLocale);
|
34
|
+
var styles = (0, _ChatMessageError.chatMessageErrorStyles)({
|
35
|
+
side: "left",
|
36
|
+
variant: "subtle"
|
37
|
+
});
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("article", _objectSpread(_objectSpread({}, props), {}, {
|
39
|
+
ref: ref,
|
40
|
+
className: styles.base({
|
41
|
+
className: className
|
42
|
+
}),
|
43
|
+
dir: rtl ? "rtl" : "ltr",
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
45
|
+
className: styles.container(),
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
47
|
+
className: styles.content(),
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
49
|
+
className: styles.message(),
|
50
|
+
children: renderError !== null && renderError !== void 0 ? renderError : locale.error
|
51
|
+
}), actions ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
52
|
+
className: styles.actions(),
|
53
|
+
children: actions.map(function (action, index) {
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Actions.Button, _objectSpread(_objectSpread({}, action), {}, {
|
55
|
+
children: action.children
|
56
|
+
}), index);
|
57
|
+
})
|
58
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Actions.Button, {
|
59
|
+
variant: "primary",
|
60
|
+
startIcon: _lucideReact.RotateCwIcon,
|
61
|
+
onClick: onReload,
|
62
|
+
children: locale.retry
|
63
|
+
}), renderFooter]
|
64
|
+
})
|
65
|
+
})
|
66
|
+
}));
|
67
|
+
});
|
68
|
+
ChatMessageError.displayName = "ChatMessageError";
|
@@ -0,0 +1,173 @@
|
|
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
|
+
variant: {
|
43
|
+
neutral: {
|
44
|
+
message: string;
|
45
|
+
};
|
46
|
+
subtle: {
|
47
|
+
message: string;
|
48
|
+
};
|
49
|
+
};
|
50
|
+
side: {
|
51
|
+
left: {
|
52
|
+
container: string;
|
53
|
+
};
|
54
|
+
right: {
|
55
|
+
container: string;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
leading: {
|
59
|
+
true: string;
|
60
|
+
};
|
61
|
+
actions: {
|
62
|
+
true: string;
|
63
|
+
};
|
64
|
+
autoHideActions: {
|
65
|
+
true: string;
|
66
|
+
};
|
67
|
+
}, {
|
68
|
+
base: string;
|
69
|
+
container: string;
|
70
|
+
leading: string;
|
71
|
+
content: string;
|
72
|
+
message: string;
|
73
|
+
actions: string;
|
74
|
+
}, import("tailwind-variants").TVReturnType<{
|
75
|
+
variant: {
|
76
|
+
neutral: {
|
77
|
+
message: string;
|
78
|
+
};
|
79
|
+
subtle: {
|
80
|
+
message: string;
|
81
|
+
};
|
82
|
+
};
|
83
|
+
side: {
|
84
|
+
left: {
|
85
|
+
container: string;
|
86
|
+
};
|
87
|
+
right: {
|
88
|
+
container: string;
|
89
|
+
};
|
90
|
+
};
|
91
|
+
leading: {
|
92
|
+
true: string;
|
93
|
+
};
|
94
|
+
actions: {
|
95
|
+
true: string;
|
96
|
+
};
|
97
|
+
autoHideActions: {
|
98
|
+
true: string;
|
99
|
+
};
|
100
|
+
}, {
|
101
|
+
base: string;
|
102
|
+
container: string;
|
103
|
+
leading: string;
|
104
|
+
content: string;
|
105
|
+
message: string;
|
106
|
+
actions: string;
|
107
|
+
}, undefined, {
|
108
|
+
variant: {
|
109
|
+
neutral: {
|
110
|
+
message: string;
|
111
|
+
};
|
112
|
+
subtle: {
|
113
|
+
message: string;
|
114
|
+
};
|
115
|
+
};
|
116
|
+
side: {
|
117
|
+
left: {
|
118
|
+
container: string;
|
119
|
+
};
|
120
|
+
right: {
|
121
|
+
container: string;
|
122
|
+
};
|
123
|
+
};
|
124
|
+
leading: {
|
125
|
+
true: string;
|
126
|
+
};
|
127
|
+
actions: {
|
128
|
+
true: string;
|
129
|
+
};
|
130
|
+
autoHideActions: {
|
131
|
+
true: string;
|
132
|
+
};
|
133
|
+
}, {
|
134
|
+
base: string;
|
135
|
+
container: string;
|
136
|
+
leading: string;
|
137
|
+
content: string;
|
138
|
+
message: string;
|
139
|
+
actions: string;
|
140
|
+
}, import("tailwind-variants").TVReturnType<{
|
141
|
+
variant: {
|
142
|
+
neutral: {
|
143
|
+
message: string;
|
144
|
+
};
|
145
|
+
subtle: {
|
146
|
+
message: string;
|
147
|
+
};
|
148
|
+
};
|
149
|
+
side: {
|
150
|
+
left: {
|
151
|
+
container: string;
|
152
|
+
};
|
153
|
+
right: {
|
154
|
+
container: string;
|
155
|
+
};
|
156
|
+
};
|
157
|
+
leading: {
|
158
|
+
true: string;
|
159
|
+
};
|
160
|
+
actions: {
|
161
|
+
true: string;
|
162
|
+
};
|
163
|
+
autoHideActions: {
|
164
|
+
true: string;
|
165
|
+
};
|
166
|
+
}, {
|
167
|
+
base: string;
|
168
|
+
container: string;
|
169
|
+
leading: string;
|
170
|
+
content: string;
|
171
|
+
message: string;
|
172
|
+
actions: string;
|
173
|
+
}, undefined, unknown, unknown, undefined>>>;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.chatMessageErrorStyles = void 0;
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
9
|
+
var _ChatMessage = require("./../ChatMessage/ChatMessage.styles");
|
10
|
+
var _satellitePrefixer = _interopRequireDefault(require("./../../../styles/helpers/satellitePrefixer"));
|
11
|
+
var _tv = require("./../../../styles/helpers/tv");
|
12
|
+
var _templateObject;
|
13
|
+
var chatMessageErrorStyles = exports.chatMessageErrorStyles = (0, _tv.tv)({
|
14
|
+
extend: _ChatMessage.chatMessageStyles,
|
15
|
+
slots: {
|
16
|
+
content: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["w-full items-start"])))
|
17
|
+
}
|
18
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./ChatMessageError";
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
var _ChatMessageError = require("./ChatMessageError");
|
7
|
+
Object.keys(_ChatMessageError).forEach(function (key) {
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
9
|
+
if (key in exports && exports[key] === _ChatMessageError[key]) return;
|
10
|
+
Object.defineProperty(exports, key, {
|
11
|
+
enumerable: true,
|
12
|
+
get: function get() {
|
13
|
+
return _ChatMessageError[key];
|
14
|
+
}
|
15
|
+
});
|
16
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
2
|
+
import type { ChatMessageProps } from "../../../Layout/Chat/ChatMessage";
|
3
|
+
export declare type ChatMessageLoaderProps = Omit<HTMLAttributes<HTMLElement>, "children"> & Pick<ChatMessageProps, "rtl"> & {
|
4
|
+
/**
|
5
|
+
* Message to display in the loader.
|
6
|
+
* If not provided, no message will be shown.
|
7
|
+
* @default undefined
|
8
|
+
*/
|
9
|
+
message?: ReactNode;
|
10
|
+
};
|
11
|
+
export declare const ChatMessageLoader: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & Pick<ChatMessageProps<Record<string, any>>, "rtl"> & {
|
12
|
+
/**
|
13
|
+
* Message to display in the loader.
|
14
|
+
* If not provided, no message will be shown.
|
15
|
+
* @default undefined
|
16
|
+
*/
|
17
|
+
message?: ReactNode;
|
18
|
+
} & import("react").RefAttributes<HTMLElement>>;
|