@opencx/widget 3.0.64 → 3.0.65

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 (48) hide show
  1. package/README.md +12 -12
  2. package/dist/designs.cjs +18 -18
  3. package/dist/designs.cjs.map +1 -1
  4. package/dist/designs.js +590 -585
  5. package/dist/designs.js.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/react.cjs +1 -1
  8. package/dist/react.cjs.map +1 -1
  9. package/dist/react.js +2 -2
  10. package/dist/react.js.map +1 -1
  11. package/dist/src/designs/react/components/PoweredByOpen.d.ts +1 -1
  12. package/dist/src/designs/react/components/lib/MotionDiv.d.ts +1 -1
  13. package/dist/src/designs/react/components/lib/avatar.d.ts +2 -2
  14. package/dist/src/designs/react/components/lib/button.d.ts +1 -1
  15. package/dist/src/designs/react/components/lib/dialog.d.ts +2 -2
  16. package/dist/src/designs/react/components/lib/dropdown-menu.d.ts +2 -2
  17. package/dist/src/designs/react/components/lib/input.d.ts +2 -3
  18. package/dist/src/designs/react/components/lib/popover.d.ts +2 -2
  19. package/dist/src/designs/react/components/lib/switch.d.ts +2 -2
  20. package/dist/src/designs/react/components/lib/tooltip.d.ts +4 -4
  21. package/dist/src/designs/react/components/lib/wobble.d.ts +4 -4
  22. package/dist/src/designs/react/constants.d.ts +10 -4
  23. package/dist/src/designs/react/hooks/useWidgetContentHeight.d.ts +2 -2
  24. package/dist/src/designs/translation/translation.types.d.ts +1 -1
  25. package/dist/src/headless/core/__tests__/test-utils.d.ts +3 -3
  26. package/dist/src/headless/core/api/api-caller.d.ts +4 -4
  27. package/dist/src/headless/core/api/client.d.ts +4 -4
  28. package/dist/src/headless/core/api/schema.d.ts +60 -60
  29. package/dist/src/headless/core/context/router.ctx.d.ts +4 -4
  30. package/dist/src/headless/core/index.d.ts +1 -1
  31. package/dist/src/headless/core/types/messages.d.ts +8 -8
  32. package/dist/src/headless/core/types/schemas.d.ts +9 -9
  33. package/dist/src/headless/core/types/widget-config.d.ts +1 -6
  34. package/dist/src/headless/react/hooks/usePreludeData.d.ts +1 -1
  35. package/dist/src/headless/react/hooks/useUploadFiles.d.ts +1 -1
  36. package/dist/{useUploadFiles-C-_5Cqif.js → useUploadFiles-BLNdq94V.js} +3 -3
  37. package/dist/useUploadFiles-BLNdq94V.js.map +1 -0
  38. package/dist/{useUploadFiles-D0XBYDzl.cjs → useUploadFiles-Dl3_5Flm.cjs} +2 -2
  39. package/dist/useUploadFiles-Dl3_5Flm.cjs.map +1 -0
  40. package/dist/{widget.ctx-_0XFPUpq.js → widget.ctx-COUAUyWX.js} +2 -4
  41. package/dist/widget.ctx-COUAUyWX.js.map +1 -0
  42. package/dist/widget.ctx-DUaeXkNb.cjs.map +1 -1
  43. package/dist-embed/script.js +45 -45
  44. package/dist-embed/script.js.map +1 -1
  45. package/package.json +18 -10
  46. package/dist/useUploadFiles-C-_5Cqif.js.map +0 -1
  47. package/dist/useUploadFiles-D0XBYDzl.cjs.map +0 -1
  48. package/dist/widget.ctx-_0XFPUpq.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as i, W as a } from "./widget.ctx-_0XFPUpq.js";
1
+ import { P as i, W as a } from "./widget.ctx-COUAUyWX.js";
2
2
  export {
3
3
  i as PrimitiveState,
4
4
  a as WidgetCtx
package/dist/react.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-D0XBYDzl.cjs");function a(t,s,u){const{widgetCtx:{api:i}}=e.useWidget();return e._default(async o=>i.vote({action:o==="up"?"upvote":"downvote",messagePublicId:t,sessionId:s}).then(u),[i,t,s,u])}exports.WidgetProvider=e.WidgetProvider;exports.useConfig=e.useConfig;exports.useContact=e.useContact;exports.useIsAwaitingBotReply=e.useIsAwaitingBotReply;exports.useMessages=e.useMessages;exports.usePreludeData=e.usePreludeData;exports.usePrimitiveState=e.usePrimitiveState;exports.useSessions=e.useSessions;exports.useUploadFiles=e.useUploadFiles;exports.useWidget=e.useWidget;exports.useWidgetRouter=e.useWidgetRouter;exports.useVote=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-Dl3_5Flm.cjs");function a(t,s,u){const{widgetCtx:{api:i}}=e.useWidget();return e._default(async o=>i.vote({action:o==="up"?"upvote":"downvote",messagePublicId:t,sessionId:s}).then(u),[i,t,s,u])}exports.WidgetProvider=e.WidgetProvider;exports.useConfig=e.useConfig;exports.useContact=e.useContact;exports.useIsAwaitingBotReply=e.useIsAwaitingBotReply;exports.useMessages=e.useMessages;exports.usePreludeData=e.usePreludeData;exports.usePrimitiveState=e.usePrimitiveState;exports.useSessions=e.useSessions;exports.useUploadFiles=e.useUploadFiles;exports.useWidget=e.useWidget;exports.useWidgetRouter=e.useWidgetRouter;exports.useVote=a;
2
2
  //# sourceMappingURL=react.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.cjs","sources":["../src/headless/react/hooks/useVote.ts"],"sourcesContent":["import useAsyncFn from \"react-use/lib/useAsyncFn\";\nimport { useWidget } from \"../WidgetProvider\";\n\n/**\n * @param id\n * @param onSuccess\n * @returns\n */\nexport function useVote(id: string, sessionId: string, onSuccess?: () => void) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async (action: \"up\" | \"down\") => {\n return api\n .vote({\n action: action === \"up\" ? \"upvote\" : \"downvote\",\n messagePublicId: id,\n sessionId,\n })\n .then(onSuccess);\n },\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useUpvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: \"upvote\", messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useDownvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: \"downvote\", messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n"],"names":["useVote","id","sessionId","onSuccess","api","useWidget","useAsyncFn","action"],"mappings":"iIAQgB,SAAAA,EAAQC,EAAYC,EAAmBC,EAAwB,CACvE,KAAA,CACJ,UAAW,CAAE,IAAAC,CAAI,GACfC,EAAU,UAAA,EACP,OAAAC,EAAA,SACL,MAAOC,GACEH,EACJ,KAAK,CACJ,OAAQG,IAAW,KAAO,SAAW,WACrC,gBAAiBN,EACjB,UAAAC,CAAA,CACD,EACA,KAAKC,CAAS,EAEnB,CAACC,EAAKH,EAAIC,EAAWC,CAAS,CAAA,CAElC"}
1
+ {"version":3,"file":"react.cjs","sources":["../src/headless/react/hooks/useVote.ts"],"sourcesContent":["import useAsyncFn from 'react-use/lib/useAsyncFn';\nimport { useWidget } from '../WidgetProvider';\n\n/**\n * @param id\n * @param onSuccess\n * @returns\n */\nexport function useVote(id: string, sessionId: string, onSuccess?: () => void) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async (action: 'up' | 'down') => {\n return api\n .vote({\n action: action === 'up' ? 'upvote' : 'downvote',\n messagePublicId: id,\n sessionId,\n })\n .then(onSuccess);\n },\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useUpvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: 'upvote', messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useDownvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: 'downvote', messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n"],"names":["useVote","id","sessionId","onSuccess","api","useWidget","useAsyncFn","action"],"mappings":"iIAQgB,SAAAA,EAAQC,EAAYC,EAAmBC,EAAwB,CACvE,KAAA,CACJ,UAAW,CAAE,IAAAC,CAAI,GACfC,EAAU,UAAA,EACP,OAAAC,EAAA,SACL,MAAOC,GACEH,EACJ,KAAK,CACJ,OAAQG,IAAW,KAAO,SAAW,WACrC,gBAAiBN,EACjB,UAAAC,CAAA,CACD,EACA,KAAKC,CAAS,EAEnB,CAACC,EAAKH,EAAIC,EAAWC,CAAS,CAAA,CAElC"}
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import { u as o, _ as i } from "./useUploadFiles-C-_5Cqif.js";
2
- import { W as p, a as f, b as l, c, d as m, e as v, f as P, g as W, i as w, h as x } from "./useUploadFiles-C-_5Cqif.js";
1
+ import { u as o, _ as i } from "./useUploadFiles-BLNdq94V.js";
2
+ import { W as p, a as f, b as l, c, d as m, e as v, f as P, g as W, i as w, h as x } from "./useUploadFiles-BLNdq94V.js";
3
3
  function n(e, s, t) {
4
4
  const {
5
5
  widgetCtx: { api: a }
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sources":["../src/headless/react/hooks/useVote.ts"],"sourcesContent":["import useAsyncFn from \"react-use/lib/useAsyncFn\";\nimport { useWidget } from \"../WidgetProvider\";\n\n/**\n * @param id\n * @param onSuccess\n * @returns\n */\nexport function useVote(id: string, sessionId: string, onSuccess?: () => void) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async (action: \"up\" | \"down\") => {\n return api\n .vote({\n action: action === \"up\" ? \"upvote\" : \"downvote\",\n messagePublicId: id,\n sessionId,\n })\n .then(onSuccess);\n },\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useUpvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: \"upvote\", messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useDownvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: \"downvote\", messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n"],"names":["useVote","id","sessionId","onSuccess","api","useWidget","useAsyncFn","action"],"mappings":";;AAQgB,SAAAA,EAAQC,GAAYC,GAAmBC,GAAwB;AACvE,QAAA;AAAA,IACJ,WAAW,EAAE,KAAAC,EAAI;AAAA,MACfC,EAAU;AACP,SAAAC;AAAAA,IACL,OAAOC,MACEH,EACJ,KAAK;AAAA,MACJ,QAAQG,MAAW,OAAO,WAAW;AAAA,MACrC,iBAAiBN;AAAA,MACjB,WAAAC;AAAA,IAAA,CACD,EACA,KAAKC,CAAS;AAAA,IAEnB,CAACC,GAAKH,GAAIC,GAAWC,CAAS;AAAA,EAAA;AAElC;"}
1
+ {"version":3,"file":"react.js","sources":["../src/headless/react/hooks/useVote.ts"],"sourcesContent":["import useAsyncFn from 'react-use/lib/useAsyncFn';\nimport { useWidget } from '../WidgetProvider';\n\n/**\n * @param id\n * @param onSuccess\n * @returns\n */\nexport function useVote(id: string, sessionId: string, onSuccess?: () => void) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async (action: 'up' | 'down') => {\n return api\n .vote({\n action: action === 'up' ? 'upvote' : 'downvote',\n messagePublicId: id,\n sessionId,\n })\n .then(onSuccess);\n },\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useUpvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: 'upvote', messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n\n/**\n * @param id\n * @param onSuccess\n * @deprecated use useVote instead\n */\nexport function useDownvote(\n id: string,\n sessionId: string,\n onSuccess?: () => void,\n) {\n const {\n widgetCtx: { api },\n } = useWidget();\n return useAsyncFn(\n async () =>\n api\n .vote({ action: 'downvote', messagePublicId: id, sessionId })\n .then(onSuccess),\n [api, id, sessionId, onSuccess],\n );\n}\n"],"names":["useVote","id","sessionId","onSuccess","api","useWidget","useAsyncFn","action"],"mappings":";;AAQgB,SAAAA,EAAQC,GAAYC,GAAmBC,GAAwB;AACvE,QAAA;AAAA,IACJ,WAAW,EAAE,KAAAC,EAAI;AAAA,MACfC,EAAU;AACP,SAAAC;AAAAA,IACL,OAAOC,MACEH,EACJ,KAAK;AAAA,MACJ,QAAQG,MAAW,OAAO,WAAW;AAAA,MACrC,iBAAiBN;AAAA,MACjB,WAAAC;AAAA,IAAA,CACD,EACA,KAAKC,CAAS;AAAA,IAEnB,CAACC,GAAKH,GAAIC,GAAWC,CAAS;AAAA,EAAA;AAElC;"}
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  export declare function PoweredByOpen({ className }: {
3
3
  className?: string;
4
4
  }): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { default as React, ComponentProps } from 'react';
2
2
  import { motion, Target } from 'framer-motion';
3
3
  type MotionProps = ComponentProps<typeof motion.div>;
4
- type AnimationDirection = "right" | "left" | "up" | "down";
4
+ type AnimationDirection = 'right' | 'left' | 'up' | 'down';
5
5
  type MotionDivProps = MotionProps & {
6
6
  fadeIn?: AnimationDirection;
7
7
  distance?: number;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
3
  declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
4
  declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
5
  declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import * as React from "react";
2
+ import * as React from 'react';
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
5
5
  size?: "default" | "icon" | "sm" | "lg" | "fit" | "free" | null | undefined;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
4
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,5 +1,5 @@
1
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2
- import * as React from "react";
1
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
+ import * as React from 'react';
3
3
  declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
4
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,4 @@
1
- import * as React from "react";
2
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
- }
1
+ import * as React from 'react';
2
+ export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
4
3
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
4
  export { Input };
@@ -1,5 +1,5 @@
1
- import * as PopoverPrimitive from "@radix-ui/react-popover";
2
- import * as React from "react";
1
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
2
+ import * as React from 'react';
3
3
  declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
4
  declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -1,4 +1,4 @@
1
- import * as React from "react";
2
- import * as SwitchPrimitives from "@radix-ui/react-switch";
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
3
3
  declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
4
  export { Switch };
@@ -1,10 +1,10 @@
1
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2
- import * as React from "react";
1
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
+ import * as React from 'react';
3
3
  declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
4
  declare function Tooltippy({ children, content, side, align, }: {
5
5
  children: React.ReactNode;
6
6
  content: React.ReactNode;
7
- side?: TooltipPrimitive.TooltipContentProps["side"];
8
- align?: TooltipPrimitive.TooltipContentProps["align"];
7
+ side?: TooltipPrimitive.TooltipContentProps['side'];
8
+ align?: TooltipPrimitive.TooltipContentProps['align'];
9
9
  }): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
10
10
  export { TooltipProvider, Tooltippy };
@@ -9,10 +9,10 @@ export declare const WOBBLE_MAX_MOVEMENT_PIXELS: {
9
9
  y: number;
10
10
  };
11
11
  declare const scaleVariants: {
12
- "1": string;
13
- "1.01": string;
14
- "1.02": string;
15
- "1.1": string;
12
+ '1': string;
13
+ '1.01': string;
14
+ '1.02': string;
15
+ '1.1': string;
16
16
  };
17
17
  export interface WobbleProps {
18
18
  children: ReactElement;
@@ -1,11 +1,17 @@
1
1
  import { CSSProperties } from 'react';
2
- export declare const WIDGET_CONTENT_WIDTH_PX = 350;
3
- export declare const WIDGET_CONTENT_MIN_HEIGHT_PX = 400;
2
+ export declare const WIDGET_CONTENT_MIN_WIDTH_PX = 400;
3
+ export declare const WIDGET_CONTENT_MAX_WIDTH_PX = 800;
4
+ export declare const WIDGET_CONTENT_MIN_HEIGHT_PX = 500;
4
5
  export declare const WIDGET_CONTENT_MAX_HEIGHT_PX = 600;
5
6
  export declare const DEFAULT_STYLES: {
6
- readonly widgetMinHeight: "min-h-[400px]";
7
+ readonly widgetMinWidth: "min-w-[400px]";
8
+ readonly widgetMaxWidth: "max-w-[800px]";
9
+ readonly widgetWidthMin: "w-[400px]";
10
+ readonly widgetWidthMax: "w-[800px]";
11
+ readonly widgetMinHeight: "min-h-[500px]";
7
12
  readonly widgetMaxHeight: "max-h-[600px]";
8
- readonly widgetHeight: "h-[600px]";
13
+ readonly widgetHeightMin: "h-[500px]";
14
+ readonly widgetHeightMax: "h-[600px]";
9
15
  };
10
16
  interface Colors {
11
17
  primary?: string;
@@ -1,9 +1,9 @@
1
- export declare function useWidgetContentHeight({ fallbackHeight, }: {
1
+ export declare function useWidgetContentHeight({ minHeight, }: {
2
2
  /**
3
3
  * unrendered elements have an offset height of 0, this is causes a weird animation when opening the widget.
4
4
  * So, a fallback value equal to the fixed height or min height of the screen's root div solves the issue.
5
5
  */
6
- fallbackHeight: number;
6
+ minHeight: number;
7
7
  }): {
8
8
  observedElementRef: import('react').RefObject<HTMLDivElement>;
9
9
  };
@@ -1,4 +1,4 @@
1
- export type TranslationKeysU = "ok" | "yes" | "no" | "agree" | "cancel" | "yes-exit" | "yes-reset" | "no-cancel" | "are-you-sure" | "recording" | "thank-you" | "sorry-try-again" | "error-occurred" | "please-try-again" | "write-a-message" | "send-message" | "connected" | "connecting" | "reconnecting" | "reconnected" | "disconnecting" | "disconnected" | "error" | "persist-session" | "settings" | "close" | "help" | "chat" | "send" | "copy" | "copied" | "sound-effects" | "language" | "select" | "agent" | "user" | "bot" | "close-widget" | "got-any-questions" | "typical-response-time" | "session-closed-lead" | "create-new-ticket" | "exit" | "reset-conversation" | "new-conversation" | "welcome-title" | "welcome-description" | "your-name" | "your-email" | "start-chat" | "starting-chat" | "hello-greeting" | "i-need-more-help" | "this-was-helpful" | "optional" | "no-conversations-yet";
1
+ export type TranslationKeysU = 'ok' | 'yes' | 'no' | 'agree' | 'cancel' | 'yes-exit' | 'yes-reset' | 'no-cancel' | 'are-you-sure' | 'recording' | 'thank-you' | 'sorry-try-again' | 'error-occurred' | 'please-try-again' | 'write-a-message' | 'send-message' | 'connected' | 'connecting' | 'reconnecting' | 'reconnected' | 'disconnecting' | 'disconnected' | 'error' | 'persist-session' | 'settings' | 'close' | 'help' | 'chat' | 'send' | 'copy' | 'copied' | 'sound-effects' | 'language' | 'select' | 'agent' | 'user' | 'bot' | 'close-widget' | 'got-any-questions' | 'typical-response-time' | 'session-closed-lead' | 'create-new-ticket' | 'exit' | 'reset-conversation' | 'new-conversation' | 'welcome-title' | 'welcome-description' | 'your-name' | 'your-email' | 'start-chat' | 'starting-chat' | 'hello-greeting' | 'i-need-more-help' | 'this-was-helpful' | 'optional' | 'no-conversations-yet';
2
2
  export type TranslationInterface = {
3
3
  [K in TranslationKeysU]: string;
4
4
  };
@@ -75,7 +75,7 @@ export declare const TestUtils: {
75
75
  }, {
76
76
  params: {
77
77
  header: {
78
- "x-bot-token": string;
78
+ 'x-bot-token': string;
79
79
  };
80
80
  };
81
81
  body: {
@@ -253,7 +253,7 @@ export declare const TestUtils: {
253
253
  }, {
254
254
  params: {
255
255
  header: {
256
- "X-Bot-Token": string;
256
+ 'X-Bot-Token': string;
257
257
  };
258
258
  };
259
259
  }, `${string}/${string}`>> | undefined): void;
@@ -288,7 +288,7 @@ export declare const TestUtils: {
288
288
  }, {
289
289
  params: {
290
290
  header: {
291
- "X-Bot-Token": string;
291
+ 'X-Bot-Token': string;
292
292
  };
293
293
  };
294
294
  }, `${string}/${string}`>> | undefined): void;
@@ -5,7 +5,7 @@ export declare class ApiCaller {
5
5
  private client;
6
6
  private config;
7
7
  private userToken;
8
- constructor({ config, }: {
8
+ constructor({ config }: {
9
9
  config: WidgetConfig;
10
10
  });
11
11
  private constructClientOptions;
@@ -42,7 +42,7 @@ export declare class ApiCaller {
42
42
  }, {
43
43
  params: {
44
44
  header: {
45
- "X-Bot-Token": string;
45
+ 'X-Bot-Token': string;
46
46
  };
47
47
  };
48
48
  }, `${string}/${string}`>>;
@@ -77,7 +77,7 @@ export declare class ApiCaller {
77
77
  }, {
78
78
  params: {
79
79
  header: {
80
- "X-Bot-Token": string;
80
+ 'X-Bot-Token': string;
81
81
  };
82
82
  };
83
83
  }, `${string}/${string}`>>;
@@ -172,7 +172,7 @@ export declare class ApiCaller {
172
172
  }, {
173
173
  params: {
174
174
  header: {
175
- "x-bot-token": string;
175
+ 'x-bot-token': string;
176
176
  };
177
177
  };
178
178
  body: {
@@ -2,11 +2,11 @@ import { Middleware } from 'openapi-fetch';
2
2
  import { paths, components } from './schema';
3
3
  type Options = {
4
4
  baseUrl: string;
5
- onRequest?: Middleware["onRequest"];
6
- onResponse?: Middleware["onResponse"];
7
- onError?: Middleware["onError"];
5
+ onRequest?: Middleware['onRequest'];
6
+ onResponse?: Middleware['onResponse'];
7
+ onError?: Middleware['onError'];
8
8
  };
9
9
  export declare const basicClient: (options: Options) => import('openapi-fetch').Client<paths, `${string}/${string}`>;
10
10
  export type Endpoint = keyof paths;
11
- export type Dto = components["schemas"];
11
+ export type Dto = components['schemas'];
12
12
  export {};