@hachther/akilio-widget 0.6.2 → 0.6.5
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/README.md +37 -10
- package/dist/AkilioWidget.d.ts +1 -1
- package/dist/akilio-widget.min.js +36 -36
- package/dist/components/BrandLogo.d.ts +5 -1
- package/dist/components/ChatPanel.d.ts +1 -33
- package/dist/components/Composer.d.ts +24 -0
- package/dist/components/EmptyState.d.ts +9 -0
- package/dist/components/Launcher.d.ts +2 -1
- package/dist/components/LauncherCoachmark.d.ts +12 -0
- package/dist/components/MessageBubble.d.ts +1 -0
- package/dist/components/MessageList.d.ts +3 -0
- package/dist/components/ProductCard.d.ts +12 -0
- package/dist/components/StreamActivity.d.ts +7 -0
- package/dist/index.min.js +4886 -4278
- package/dist/index.umd.min.cjs +29 -29
- package/dist/lib/client.d.ts +5 -1
- package/dist/lib/detector.d.ts +16 -0
- package/dist/logos/AkilioMark.d.ts +1 -1
- package/dist/logos/AkilioWordmark.d.ts +2 -1
- package/dist/style.css +503 -100
- package/dist/types.d.ts +64 -14
- package/package.json +3 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface BrandLogoProps {
|
|
2
3
|
variant?: 'mark' | 'wordmark';
|
|
3
4
|
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
primaryColor?: string;
|
|
7
|
+
secondaryColor?: string;
|
|
4
8
|
}
|
|
5
|
-
export declare function BrandLogo({ variant, className }: BrandLogoProps):
|
|
9
|
+
export declare function BrandLogo({ variant, className, style, primaryColor, secondaryColor, }: BrandLogoProps): React.JSX.Element;
|
|
6
10
|
export {};
|
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AkilioChatMessage, AkilioChatResponse, AkilioFeedbackRating, AkilioProduct, AkilioProductVariant } from '../types';
|
|
3
|
-
interface ChatPanelProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
isDesktop: boolean;
|
|
6
|
-
inline: boolean;
|
|
7
|
-
colorMode: 'light' | 'dark';
|
|
8
|
-
allowColorModeToggle: boolean;
|
|
9
|
-
widgetAvailable: boolean;
|
|
10
|
-
showBranding: boolean;
|
|
11
|
-
showPoweredBy: boolean;
|
|
12
|
-
copy: AkilioResolvedCopy;
|
|
13
|
-
locale: string;
|
|
14
|
-
messages: AkilioChatMessage[];
|
|
15
|
-
streamingMessage?: AkilioChatMessage | null;
|
|
16
|
-
loading: boolean;
|
|
17
|
-
loadingLabel?: string;
|
|
18
|
-
consentDecision: 'pending' | 'accepted' | 'rejected';
|
|
19
|
-
consentGranted: boolean;
|
|
20
|
-
requireConsent: boolean;
|
|
21
|
-
privacyNotice: string;
|
|
22
|
-
privacyNoticeUrl?: string;
|
|
23
|
-
onConsentDecision: (decision: 'pending' | 'accepted' | 'rejected') => void;
|
|
24
|
-
onClose: () => void;
|
|
25
|
-
onToggleColorMode: () => void;
|
|
26
|
-
onClear: () => void;
|
|
27
|
-
onSubmit: (query: string) => Promise<AkilioChatResponse>;
|
|
28
|
-
onDraftChange?: (draft: string, manual: boolean) => void;
|
|
29
|
-
onFeedback: (message: AkilioChatMessage, rating: AkilioFeedbackRating) => void;
|
|
30
|
-
onSuggestion: (suggestion: string) => void;
|
|
31
|
-
onProductClick: (message: AkilioChatMessage, product: AkilioProduct, variant?: AkilioProductVariant) => void;
|
|
32
|
-
}
|
|
1
|
+
import type { AkilioChatResponse, ChatPanelProps } from '../types';
|
|
33
2
|
export interface ChatPanelHandle {
|
|
34
3
|
getDraft(): string;
|
|
35
4
|
setDraft(text: string, options?: {
|
|
@@ -41,4 +10,3 @@ export interface ChatPanelHandle {
|
|
|
41
10
|
submitDraft(): Promise<AkilioChatResponse>;
|
|
42
11
|
}
|
|
43
12
|
export declare const ChatPanel: import("react").ForwardRefExoticComponent<ChatPanelProps & import("react").RefAttributes<ChatPanelHandle>>;
|
|
44
|
-
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AkilioResolvedCopy } from '../lib/copy';
|
|
2
|
+
import type { AkilioChatResponse } from '../types';
|
|
3
|
+
export interface ComposerHandle {
|
|
4
|
+
getDraft(): string;
|
|
5
|
+
setDraft(text: string, options?: {
|
|
6
|
+
focus?: boolean;
|
|
7
|
+
clearExisting?: boolean;
|
|
8
|
+
}): void;
|
|
9
|
+
clearDraft(): void;
|
|
10
|
+
focus(): void;
|
|
11
|
+
submit(): Promise<AkilioChatResponse>;
|
|
12
|
+
}
|
|
13
|
+
interface ComposerProps {
|
|
14
|
+
loading: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
copy: AkilioResolvedCopy;
|
|
17
|
+
onSubmit: (query: string) => Promise<AkilioChatResponse>;
|
|
18
|
+
onReviewConsent?: () => void;
|
|
19
|
+
onDraftChange?: (draft: string, manual: boolean) => void;
|
|
20
|
+
disabledMessage?: string;
|
|
21
|
+
showPoweredBy?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const Composer: import("react").ForwardRefExoticComponent<ComposerProps & import("react").RefAttributes<ComposerHandle>>;
|
|
24
|
+
export default Composer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AkilioResolvedCopy } from '../lib/copy';
|
|
2
|
+
declare function EmptyState({ copy, onSuggestion, widgetAvailable, showBranding, primaryColor, }: {
|
|
3
|
+
copy: AkilioResolvedCopy;
|
|
4
|
+
onSuggestion: (suggestion: string) => void;
|
|
5
|
+
widgetAvailable: boolean;
|
|
6
|
+
showBranding: boolean;
|
|
7
|
+
primaryColor?: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export default EmptyState;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare function Launcher({ label, onClick, showBranding, }: {
|
|
1
|
+
export declare function Launcher({ label, onClick, showBranding, primaryColor, }: {
|
|
2
2
|
label: string;
|
|
3
3
|
onClick: () => void;
|
|
4
4
|
showBranding?: boolean;
|
|
5
|
+
primaryColor?: string;
|
|
5
6
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface LauncherCoachmarkProps {
|
|
2
|
+
title: string;
|
|
3
|
+
message: string;
|
|
4
|
+
actionLabel: string;
|
|
5
|
+
dismissLabel: string;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
onOpen: () => void;
|
|
8
|
+
primaryColor?: string;
|
|
9
|
+
showBranding?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function LauncherCoachmark({ title, message, actionLabel, dismissLabel, onDismiss, onOpen, primaryColor, showBranding, }: LauncherCoachmarkProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -7,6 +7,7 @@ interface MessageBubbleProps {
|
|
|
7
7
|
onFeedback?: (message: AkilioChatMessage, rating: AkilioFeedbackRating) => void;
|
|
8
8
|
onSuggestion?: (suggestion: string) => void;
|
|
9
9
|
onProductClick?: (message: AkilioChatMessage, product: AkilioProduct, variant?: AkilioProductVariant) => void;
|
|
10
|
+
primaryColor?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare const MessageBubble: import("react").NamedExoticComponent<MessageBubbleProps>;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AkilioResolvedCopy } from '../lib/copy';
|
|
2
|
+
import { AkilioProduct, type AkilioProductVariant } from '../types';
|
|
3
|
+
export type ProductCardLayout = 'vertical' | 'horizontal';
|
|
4
|
+
export interface ProductCardProps {
|
|
5
|
+
product: AkilioProduct;
|
|
6
|
+
copy: AkilioResolvedCopy;
|
|
7
|
+
locale: string;
|
|
8
|
+
layout?: ProductCardLayout;
|
|
9
|
+
onProductClick?: (product: AkilioProduct, variant?: AkilioProductVariant) => void;
|
|
10
|
+
}
|
|
11
|
+
declare function ProductCard({ product, copy, locale, layout, onProductClick, }: ProductCardProps): import("react").JSX.Element;
|
|
12
|
+
export default ProductCard;
|