@opencx/widget-react 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +5 -0
  2. package/dist/WidgetPopoverAnchor.d.ts +2 -0
  3. package/dist/WidgetPopoverContent.d.ts +3 -0
  4. package/dist/WidgetPopoverTrigger.d.ts +3 -0
  5. package/dist/components/AgentOrBotAvatar.d.ts +6 -0
  6. package/dist/components/AttachmentPreview.d.ts +7 -0
  7. package/dist/components/BotOrAgentMessage.d.ts +7 -0
  8. package/dist/components/BotOrAgentMessageGroup.d.ts +7 -0
  9. package/dist/components/Header.d.ts +3 -0
  10. package/dist/components/MightSolveUserIssueSuggestedReplies.d.ts +2 -0
  11. package/dist/components/PoweredByOpen.d.ts +4 -0
  12. package/dist/components/SuggestedReplyButton.d.ts +5 -0
  13. package/dist/components/UserMessage.d.ts +8 -0
  14. package/dist/components/UserMessageGroup.d.ts +5 -0
  15. package/dist/components/custom-components/BotOrAgentTextResponse.component.d.ts +16 -0
  16. package/dist/components/custom-components/Fallback.component.d.ts +6 -0
  17. package/dist/components/custom-components/Handoff.component.d.ts +3 -0
  18. package/dist/components/custom-components/Loading.component.d.ts +6 -0
  19. package/dist/components/lib/DynamicIcon.d.ts +6 -0
  20. package/dist/components/lib/LoadingSpinner.d.ts +4 -0
  21. package/dist/components/lib/MotionDiv.d.ts +19 -0
  22. package/dist/components/lib/avatar.d.ts +6 -0
  23. package/dist/components/lib/button.d.ts +11 -0
  24. package/dist/components/lib/dialog.d.ts +24 -0
  25. package/dist/components/lib/dropdown-menu.d.ts +27 -0
  26. package/dist/components/lib/input.d.ts +4 -0
  27. package/dist/components/lib/popover.d.ts +8 -0
  28. package/dist/components/lib/skeleton.d.ts +3 -0
  29. package/dist/components/lib/switch.d.ts +4 -0
  30. package/dist/components/lib/tooltip.d.ts +10 -0
  31. package/dist/components/lib/utils/cn.d.ts +2 -0
  32. package/dist/components/lib/widget-portal.d.ts +9 -0
  33. package/dist/components/lib/wobble.d.ts +26 -0
  34. package/dist/components/markdown.d.ts +3 -0
  35. package/dist/components/svg/ChatBubbleSvg.d.ts +5 -0
  36. package/dist/components/svg/OpenLogoSvg.d.ts +4 -0
  37. package/dist/hooks/useCanvas.d.ts +3 -0
  38. package/dist/hooks/useIsSmallScreen.d.ts +3 -0
  39. package/dist/hooks/useLocale.d.ts +6 -0
  40. package/dist/hooks/useSetWidgetSize.d.ts +8 -0
  41. package/dist/hooks/useTheme.d.ts +62 -0
  42. package/dist/hooks/useWidgetContentHeight.d.ts +3 -0
  43. package/dist/index.cjs +51 -0
  44. package/dist/index.cjs.map +1 -0
  45. package/dist/index.d.ts +9 -0
  46. package/dist/index.js +2778 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/screens/chat/ChatCanvas.d.ts +2 -0
  49. package/dist/screens/chat/ChatFooter.d.ts +2 -0
  50. package/dist/screens/chat/ChatMain.d.ts +2 -0
  51. package/dist/screens/chat/index.d.ts +2 -0
  52. package/dist/screens/index.d.ts +2 -0
  53. package/dist/screens/sessions/index.d.ts +2 -0
  54. package/dist/screens/welcome/index.d.ts +2 -0
  55. package/dist/translation/ar.locale.d.ts +2 -0
  56. package/dist/translation/de.locale.d.ts +2 -0
  57. package/dist/translation/en.locale.d.ts +2 -0
  58. package/dist/translation/es.locale.d.ts +2 -0
  59. package/dist/translation/fr.locale.d.ts +2 -0
  60. package/dist/translation/index.d.ts +16 -0
  61. package/dist/translation/nl.locale.d.ts +2 -0
  62. package/dist/translation/pt.locale.d.ts +2 -0
  63. package/dist/translation/tr.locale.d.ts +2 -0
  64. package/dist/translation/translation.types.d.ts +4 -0
  65. package/dist/utils/data-component.d.ts +7 -0
  66. package/dist/utils/group-messages-by-type.d.ts +5 -0
  67. package/dist-embed/script.js +365 -0
  68. package/dist-embed/script.js.map +1 -0
  69. package/package.json +75 -0
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # OpenCX Widget - React
2
+
3
+ The default React widget. Usable as a React component, or embedded in HTML.
4
+
5
+ For more information, check [the documentation](https://docs.open.cx/widget/getting-started)
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function WidgetPopoverAnchor(): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare function WidgetContent(): React.JSX.Element;
3
+ export declare function WidgetPopoverContent(): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare function WidgetPopoverTrigger(): React.JSX.Element;
3
+ export { WidgetPopoverTrigger };
@@ -0,0 +1,6 @@
1
+ import { AgentOrBotType } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ import { AvatarProps } from '@radix-ui/react-avatar';
4
+ export declare function AgentOrBotAvatar({ agent, ...props }: AvatarProps & {
5
+ agent: AgentOrBotType | undefined;
6
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { MessageAttachmentType } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ type Props = {
4
+ attachment: MessageAttachmentType;
5
+ };
6
+ export declare function AttachmentPreview({ attachment }: Props): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { WidgetComponentProps } from '@opencx/widget-react-headless';
2
+ import { default as React } from 'react';
3
+ export declare function BotOrAgentMessage({ isFirstInGroup, isLastInGroup, isAloneInGroup, ...props }: WidgetComponentProps & {
4
+ isFirstInGroup: boolean;
5
+ isLastInGroup: boolean;
6
+ isAloneInGroup: boolean;
7
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { AgentMessageType, AgentOrBotType, BotMessageType } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ export declare function BotOrAgentMessageGroup({ messages, agent, suggestedReplies, }: {
4
+ messages: BotMessageType[] | AgentMessageType[];
5
+ agent: AgentOrBotType | undefined;
6
+ suggestedReplies?: string[];
7
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare function Header__Buttons(): React.JSX.Element;
3
+ export declare function Header(): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function MightSolveUserIssueSuggestedReplies(): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export declare function PoweredByOpen({ className }: {
3
+ className?: string;
4
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from './lib/button.js';
3
+ export declare function SuggestedReplyButton({ suggestion, className, ...props }: ButtonProps & {
4
+ suggestion: string;
5
+ }): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { UserMessageType } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ export declare function UserMessage({ message, isFirstInGroup, isLastInGroup, isAloneInGroup, }: {
4
+ message: UserMessageType;
5
+ isFirstInGroup: boolean;
6
+ isLastInGroup: boolean;
7
+ isAloneInGroup: boolean;
8
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { UserMessageType } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ export declare function UserMessageGroup({ messages, }: {
4
+ messages: UserMessageType[];
5
+ }): React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { OpenCxComponentNameU } from '@opencx/widget-core';
2
+ import { WidgetComponentProps } from '@opencx/widget-react-headless';
3
+ import { default as React } from 'react';
4
+ export declare function BotOrAgentResponse({ data, id, type, attachments, isFirstInGroup, isLastInGroup, isAloneInGroup, dataComponentNames, classNames, }: WidgetComponentProps & {
5
+ isFirstInGroup: boolean;
6
+ isLastInGroup: boolean;
7
+ isAloneInGroup: boolean;
8
+ dataComponentNames?: {
9
+ messageContainer?: OpenCxComponentNameU;
10
+ message?: OpenCxComponentNameU;
11
+ };
12
+ classNames?: {
13
+ messageContainer?: string;
14
+ message?: string;
15
+ };
16
+ }): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { WidgetComponentProps } from '@opencx/widget-react-headless';
2
+ import { default as React } from 'react';
3
+ /**
4
+ * The Basic Fallback component (Rendered when Debug is True and the component key is not found)
5
+ */
6
+ export declare function FallbackComponent(props: WidgetComponentProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { WidgetComponentProps } from '@opencx/widget-react-headless';
2
+ import { default as React } from 'react';
3
+ export declare function HandoffComponent({ data }: WidgetComponentProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { AgentOrBotType } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ export type LoadingComponentProps = {
4
+ agent: AgentOrBotType | undefined;
5
+ };
6
+ export declare function BotLoadingComponent({ agent }: LoadingComponentProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { IconNameU } from '@opencx/widget-core';
2
+ import { default as React } from 'react';
3
+ export declare function DynamicIcon({ name, className, }: {
4
+ name: IconNameU | undefined;
5
+ className?: string;
6
+ }): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare function LoadingSpinner({ className }: {
3
+ className?: string;
4
+ }): React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { default as React, ComponentProps } from 'react';
2
+ import { motion, Target } from 'framer-motion';
3
+ type MotionProps = ComponentProps<typeof motion.div>;
4
+ type AnimationDirection = 'right' | 'left' | 'up' | 'down';
5
+ type MotionDivProps = MotionProps & {
6
+ fadeIn?: AnimationDirection;
7
+ distance?: number;
8
+ snapExit?: boolean;
9
+ overrides?: Overrides;
10
+ delay?: number;
11
+ };
12
+ type Overrides = {
13
+ initial?: Target;
14
+ animate?: Target;
15
+ exit?: Target;
16
+ };
17
+ export declare const ANIMATION_DISTANCE_PX = 10;
18
+ declare const MotionDiv: React.ForwardRefExoticComponent<Omit<MotionDivProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ export { MotionDiv };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "icon" | "sm" | "lg" | "fit" | "free" | "selfless" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
8
+ withClose?: boolean;
9
+ } & React.RefAttributes<HTMLDivElement>>;
10
+ declare const DialogHeader: {
11
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
+ displayName: string;
13
+ };
14
+ declare const DialogBody: {
15
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
16
+ displayName: string;
17
+ };
18
+ declare const DialogFooter: {
19
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
23
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
24
+ export { Dialog, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogBody, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,27 @@
1
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
+ import * as React from 'react';
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
3
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
4
+ export { Input };
@@ -0,0 +1,8 @@
1
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
2
+ import * as React from 'react';
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
+ animate?: boolean;
7
+ } & React.RefAttributes<HTMLDivElement>>;
8
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
3
+ export { Skeleton };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
3
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
+ import * as React from 'react';
3
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
+ declare function Tooltippy({ children, content, side, align, }: {
5
+ children: React.ReactNode;
6
+ content: React.ReactNode;
7
+ side?: TooltipPrimitive.TooltipContentProps['side'];
8
+ align?: TooltipPrimitive.TooltipContentProps['align'];
9
+ }): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
10
+ export { TooltipProvider, Tooltippy };
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ declare function WidgetPortal(): null;
3
+ declare namespace WidgetPortal {
4
+ var Portal: ({ children }: {
5
+ children: React.ReactNode;
6
+ }) => React.ReactPortal | null;
7
+ var Container: () => React.JSX.Element;
8
+ }
9
+ export { WidgetPortal };
@@ -0,0 +1,26 @@
1
+ import { default as React, ReactElement } from 'react';
2
+ /**
3
+ * The maximum number of pixels the element can move in the x and y directions
4
+ *
5
+ * This would make very small elements wobble more visibly, and large elements would wobble more subtly
6
+ */
7
+ export declare const WOBBLE_MAX_MOVEMENT_PIXELS: {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ type ChildProps = {
12
+ onMouseMove?: (event: React.MouseEvent<HTMLElement>) => void;
13
+ onMouseEnter?: () => void;
14
+ onMouseLeave?: () => void;
15
+ style?: React.CSSProperties;
16
+ className?: string;
17
+ ref: React.ForwardedRef<HTMLElement>;
18
+ };
19
+ export interface WobbleProps {
20
+ children: ReactElement<ChildProps>;
21
+ className?: string;
22
+ scale?: number;
23
+ off?: boolean;
24
+ }
25
+ declare const Wobble: React.NamedExoticComponent<WobbleProps & React.RefAttributes<HTMLElement>>;
26
+ export { Wobble };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { default as ReactMarkdown } from 'react-markdown';
3
+ export declare const MemoizedReactMarkdown: React.MemoExoticComponent<typeof ReactMarkdown>;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export declare function ChatBubbleSvg({ className, style, }: {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ }): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare function OpenLogoSvg({ className }: {
3
+ className?: string;
4
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function useCanvas(): {
2
+ isCanvasOpen: boolean;
3
+ };
@@ -0,0 +1,3 @@
1
+ export declare function useIsSmallScreen(): {
2
+ isSmallScreen: boolean;
3
+ };
@@ -0,0 +1,6 @@
1
+ import { TranslationKeysU } from '../translation/translation.types';
2
+ import { Locale } from '../translation';
3
+ export declare function useLocale(): {
4
+ get: (key: TranslationKeysU) => string;
5
+ lang: Locale;
6
+ };
@@ -0,0 +1,8 @@
1
+ export declare function useSetWidgetSizeFn(): {
2
+ setWidth: (width: string) => void;
3
+ setHeight: (height: string) => void;
4
+ };
5
+ export declare function useSetWidgetSize({ width, height, }: {
6
+ width?: string;
7
+ height?: string;
8
+ }): void;
@@ -0,0 +1,62 @@
1
+ import { CSSProperties } from 'react';
2
+ /**
3
+ * @returns The widget config theme with fallback default value
4
+ */
5
+ export declare function useTheme(): {
6
+ theme: {
7
+ palette: "neutral" | "stone" | "zinc" | "slate";
8
+ primaryColor: string;
9
+ widgetTrigger: {
10
+ zIndex: number;
11
+ offset: {
12
+ bottom: number;
13
+ right: number;
14
+ };
15
+ size: {
16
+ button: number;
17
+ icon: number;
18
+ };
19
+ };
20
+ widgetContentContainer: {
21
+ borderRadius: string;
22
+ zIndex: number;
23
+ outline: string;
24
+ outlineColor: string;
25
+ boxShadow: string;
26
+ transitionProperty: string;
27
+ transitionTimingFunction: string;
28
+ transitionDuration: string;
29
+ offset: {
30
+ side: number;
31
+ align: number;
32
+ };
33
+ };
34
+ screens: {
35
+ welcome: {
36
+ width: string;
37
+ minHeight: string;
38
+ };
39
+ sessions: {
40
+ width: string;
41
+ height: string;
42
+ };
43
+ chat: {
44
+ width: string;
45
+ height: string;
46
+ withCanvas: {
47
+ width: string;
48
+ height: string;
49
+ transitionTimingFunction: string;
50
+ transitionDuration: string;
51
+ };
52
+ };
53
+ };
54
+ };
55
+ computed: {
56
+ maxHeight: string;
57
+ maxWidth: string;
58
+ minHeight: string;
59
+ minWidth: string;
60
+ };
61
+ cssVars: CSSProperties;
62
+ };
@@ -0,0 +1,3 @@
1
+ export declare function useWidgetContentHeight(): {
2
+ observedElementRef: import('react').RefObject<HTMLDivElement | null>;
3
+ };