@akropolys/kiku 1.5.19 → 1.6.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.
- package/README.md +11 -13
- package/dist/index.d.mts +1 -18
- package/dist/index.d.ts +1 -18
- package/dist/index.js +7 -535
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -525
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## The pre-built UI for a smarter search bar.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`@akropolys/kiku` is the ready-made front end for [`@akropolys/sdk`](https://www.npmjs.com/package/@akropolys/sdk) — a chat button, a search bar, a per-product "ask about this" prompt — so you don't have to design a search experience from scratch. Drop one in and it's already wired up to plain-language search.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Want to build your own UI instead? Use `@akropolys/sdk` directly and skip this package.
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
16
|
import { AkropolysProvider } from '@akropolys/sdk';
|
|
@@ -21,7 +21,6 @@ export default function App() {
|
|
|
21
21
|
return (
|
|
22
22
|
<AkropolysProvider
|
|
23
23
|
siteId={process.env.NEXT_PUBLIC_AKROPOLYS_SITE_ID}
|
|
24
|
-
apiUrl={process.env.NEXT_PUBLIC_AKROPOLYS_API_URL}
|
|
25
24
|
apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_TOKEN}
|
|
26
25
|
>
|
|
27
26
|
<KikuButton />
|
|
@@ -32,18 +31,17 @@ export default function App() {
|
|
|
32
31
|
|
|
33
32
|
## Components
|
|
34
33
|
|
|
35
|
-
| Component |
|
|
34
|
+
| Component | What it does |
|
|
36
35
|
|---|---|
|
|
37
|
-
| `<KikuButton />` | Floating
|
|
38
|
-
| `<KikuChat />` |
|
|
39
|
-
| `<SearchBar />` |
|
|
40
|
-
| `<Sparkle />` |
|
|
36
|
+
| `<KikuButton />` | Floating chat assistant |
|
|
37
|
+
| `<KikuChat />` | Chat widget embedded inline on the page |
|
|
38
|
+
| `<SearchBar />` | Search box with a live results dropdown |
|
|
39
|
+
| `<Sparkle />` | Small "ask about this" button next to a product |
|
|
41
40
|
| `<ComparisonMatrix />` | Side-by-side product comparison |
|
|
42
|
-
| `<
|
|
43
|
-
| `<
|
|
44
|
-
| `<CheckoutModal />` | Checkout modal |
|
|
41
|
+
| `<VoiceButton />` | Speak a query instead of typing it |
|
|
42
|
+
| `<VisualSearch />` | Search by uploading a photo |
|
|
45
43
|
|
|
46
|
-
##
|
|
44
|
+
## Install
|
|
47
45
|
|
|
48
46
|
```bash
|
|
49
47
|
npm install @akropolys/kiku @akropolys/sdk
|
package/dist/index.d.mts
CHANGED
|
@@ -96,23 +96,6 @@ interface SparkleProps {
|
|
|
96
96
|
}
|
|
97
97
|
declare function Sparkle({ productName, limit, onResult, backdropColor, backdropBlur, className, onNavigate, theme, classNames, product, children, }: SparkleProps): React.JSX.Element;
|
|
98
98
|
|
|
99
|
-
declare function CartBadge({ className }: {
|
|
100
|
-
className?: string;
|
|
101
|
-
}): React.JSX.Element | null;
|
|
102
|
-
|
|
103
|
-
declare function CartDrawer({ trigger, className, theme }: {
|
|
104
|
-
trigger?: React.ReactNode;
|
|
105
|
-
className?: string;
|
|
106
|
-
theme?: 'light' | 'dark' | AkropolysTheme;
|
|
107
|
-
}): React.JSX.Element;
|
|
108
|
-
|
|
109
|
-
declare function CheckoutModal({ onClose, theme, customStyles, hskThemeAttr }: {
|
|
110
|
-
onClose: () => void;
|
|
111
|
-
theme?: string;
|
|
112
|
-
customStyles?: React.CSSProperties;
|
|
113
|
-
hskThemeAttr?: string;
|
|
114
|
-
}): React.ReactPortal;
|
|
115
|
-
|
|
116
99
|
interface ComparisonMatrixProps {
|
|
117
100
|
sources: ChatSource[];
|
|
118
101
|
defaultCurrency?: string;
|
|
@@ -163,4 +146,4 @@ interface VisualSearchProps {
|
|
|
163
146
|
*/
|
|
164
147
|
declare function VisualSearch({ onResults, onError, categoryHint, className, disabled, }: VisualSearchProps): React.JSX.Element;
|
|
165
148
|
|
|
166
|
-
export {
|
|
149
|
+
export { ChatWidget, type ChatWidgetProps, ComparisonMatrix, KikuButton, type KikuButtonProps, ChatWidget as KikuChat, type ChatWidgetProps as KikuChatProps, SearchBar, type SearchBarProps, Sparkle, VisualSearch, type VisualSearchProps, VoiceButton, type VoiceButtonProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -96,23 +96,6 @@ interface SparkleProps {
|
|
|
96
96
|
}
|
|
97
97
|
declare function Sparkle({ productName, limit, onResult, backdropColor, backdropBlur, className, onNavigate, theme, classNames, product, children, }: SparkleProps): React.JSX.Element;
|
|
98
98
|
|
|
99
|
-
declare function CartBadge({ className }: {
|
|
100
|
-
className?: string;
|
|
101
|
-
}): React.JSX.Element | null;
|
|
102
|
-
|
|
103
|
-
declare function CartDrawer({ trigger, className, theme }: {
|
|
104
|
-
trigger?: React.ReactNode;
|
|
105
|
-
className?: string;
|
|
106
|
-
theme?: 'light' | 'dark' | AkropolysTheme;
|
|
107
|
-
}): React.JSX.Element;
|
|
108
|
-
|
|
109
|
-
declare function CheckoutModal({ onClose, theme, customStyles, hskThemeAttr }: {
|
|
110
|
-
onClose: () => void;
|
|
111
|
-
theme?: string;
|
|
112
|
-
customStyles?: React.CSSProperties;
|
|
113
|
-
hskThemeAttr?: string;
|
|
114
|
-
}): React.ReactPortal;
|
|
115
|
-
|
|
116
99
|
interface ComparisonMatrixProps {
|
|
117
100
|
sources: ChatSource[];
|
|
118
101
|
defaultCurrency?: string;
|
|
@@ -163,4 +146,4 @@ interface VisualSearchProps {
|
|
|
163
146
|
*/
|
|
164
147
|
declare function VisualSearch({ onResults, onError, categoryHint, className, disabled, }: VisualSearchProps): React.JSX.Element;
|
|
165
148
|
|
|
166
|
-
export {
|
|
149
|
+
export { ChatWidget, type ChatWidgetProps, ComparisonMatrix, KikuButton, type KikuButtonProps, ChatWidget as KikuChat, type ChatWidgetProps as KikuChatProps, SearchBar, type SearchBarProps, Sparkle, VisualSearch, type VisualSearchProps, VoiceButton, type VoiceButtonProps };
|