@hachther/akilio-widget 0.6.5 → 0.7.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.
@@ -19,6 +19,7 @@ interface ComposerProps {
19
19
  onDraftChange?: (draft: string, manual: boolean) => void;
20
20
  disabledMessage?: string;
21
21
  showPoweredBy?: boolean;
22
+ slug?: string;
22
23
  }
23
24
  declare const Composer: import("react").ForwardRefExoticComponent<ComposerProps & import("react").RefAttributes<ComposerHandle>>;
24
25
  export default Composer;
@@ -0,0 +1,8 @@
1
+ import type { AkilioResolvedCopy } from '../lib/copy';
2
+ import type { AkilioChatMessage, AkilioContactRequest, AkilioContactRequestCapability, AkilioContactRequestResponse } from '../types';
3
+ export declare function ContactActions({ message, capability, copy, onSubmit, }: {
4
+ message: AkilioChatMessage;
5
+ capability?: AkilioContactRequestCapability;
6
+ copy: AkilioResolvedCopy;
7
+ onSubmit?: (request: AkilioContactRequest) => Promise<AkilioContactRequestResponse>;
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ export declare function ContextualPrompt({ placeholder, dismissLabel, dismissible, onDismiss, onSubmit, }: {
2
+ placeholder: string;
3
+ dismissLabel: string;
4
+ dismissible: boolean;
5
+ onDismiss: () => void;
6
+ onSubmit: (question: string) => Promise<void>;
7
+ }): import("react").JSX.Element;
@@ -1,9 +1,15 @@
1
1
  import type { AkilioResolvedCopy } from '../lib/copy';
2
- declare function EmptyState({ copy, onSuggestion, widgetAvailable, showBranding, primaryColor, }: {
2
+ import type { AkilioChatIntent } from '../types';
3
+ declare function EmptyState({ copy, onSuggestion, widgetAvailable, showBranding, primaryColor, intentActions, onIntentAction, }: {
3
4
  copy: AkilioResolvedCopy;
4
5
  onSuggestion: (suggestion: string) => void;
5
6
  widgetAvailable: boolean;
6
7
  showBranding: boolean;
7
8
  primaryColor?: string;
9
+ intentActions?: Array<{
10
+ intent: AkilioChatIntent;
11
+ label: string;
12
+ }>;
13
+ onIntentAction: (intent: AkilioChatIntent, label: string) => void;
8
14
  }): import("react").JSX.Element;
9
15
  export default EmptyState;
@@ -1,6 +1,8 @@
1
- export declare function Launcher({ label, onClick, showBranding, primaryColor, }: {
1
+ export declare function Launcher({ label, onClick, showBranding, primaryColor, open, controlsId, }: {
2
2
  label: string;
3
3
  onClick: () => void;
4
4
  showBranding?: boolean;
5
5
  primaryColor?: string;
6
+ open?: boolean;
7
+ controlsId?: string;
6
8
  }): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { AkilioResolvedCopy } from '../lib/copy';
2
- import type { AkilioChatMessage, AkilioFeedbackRating, AkilioProduct, AkilioProductVariant } from '../types';
2
+ import type { AkilioChatMessage, AkilioContactRequest, AkilioContactRequestCapability, AkilioContactRequestResponse, AkilioFeedbackRating, AkilioProduct, AkilioProductVariant } from '../types';
3
3
  interface MessageBubbleProps {
4
4
  message: AkilioChatMessage;
5
5
  copy: AkilioResolvedCopy;
@@ -8,6 +8,9 @@ interface MessageBubbleProps {
8
8
  onSuggestion?: (suggestion: string) => void;
9
9
  onProductClick?: (message: AkilioChatMessage, product: AkilioProduct, variant?: AkilioProductVariant) => void;
10
10
  primaryColor?: string;
11
+ feedbackPending?: AkilioFeedbackRating;
12
+ contactRequestCapability?: AkilioContactRequestCapability;
13
+ onContactRequest?: (request: AkilioContactRequest) => Promise<AkilioContactRequestResponse>;
11
14
  }
12
15
  export declare const MessageBubble: import("react").NamedExoticComponent<MessageBubbleProps>;
13
16
  export {};
@@ -1,3 +1,3 @@
1
1
  import { ChatPanelProps } from '../types';
2
- declare const MessageList: import("react").NamedExoticComponent<Pick<ChatPanelProps, "primaryColor" | "copy" | "onSuggestion" | "locale" | "onProductClick" | "onFeedback" | "messages">>;
2
+ declare const MessageList: import("react").NamedExoticComponent<Pick<ChatPanelProps, "primaryColor" | "copy" | "onSuggestion" | "locale" | "onProductClick" | "onFeedback" | "feedbackPending" | "contactRequestCapability" | "onContactRequest" | "messages">>;
3
3
  export default MessageList;
@@ -0,0 +1 @@
1
+ export declare function useNearPageEnd(enabled: boolean, threshold: number): boolean;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generates a short notification chime without downloading an audio asset.
3
+ * prepare() should run during the user's send gesture so browser autoplay
4
+ * policies allow play() to run when the asynchronous response finishes.
5
+ */
6
+ export declare function useResponseSound(enabled: boolean, volume: number): {
7
+ prepare: () => void;
8
+ play: () => void;
9
+ };