@akropolys/kiku 2.2.26 → 2.2.28

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 CHANGED
@@ -1,78 +1,89 @@
1
1
  # @akropolys/kiku
2
2
 
3
- Pre-built, blindly agnostic multi-modal conversational AI widget with duplex Live Voice, Computer Vision, and real-time comparative tables for any website or transactional platform.
3
+ Chat, search, voice, and photo input for your website. Kiku connects visitors to your content and the API actions you configure in Akropolys.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@akropolys/kiku?color=orange)](https://www.npmjs.com/package/@akropolys/kiku) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![TypeScript](https://img.shields.io/badge/types-included-blue)](https://www.typescriptlang.org/)
6
6
 
7
- ---
8
-
9
7
  ## Install
10
8
 
11
9
  ```bash
12
10
  npm install @akropolys/kiku @akropolys/sdk
13
- # or
14
- pnpm add @akropolys/kiku @akropolys/sdk
15
11
  ```
16
12
 
17
- ---
13
+ Requires React and React DOM 17 or later. For websites without React, use the [script embed](https://github.com/akropolys/sdk/blob/HEAD/packages/kiku/EMBED.md).
18
14
 
19
- ## Usage (React / Next.js)
15
+ ## React and Next.js
20
16
 
21
17
  ```tsx
18
+ 'use client';
19
+
22
20
  import { AkropolysProvider } from '@akropolys/sdk';
23
21
  import { KikuButton } from '@akropolys/kiku';
24
- import '@akropolys/kiku/styles.css'; // required: the chat window copies its rules from this sheet (serve it same-origin, or with crossorigin="anonymous")
22
+ import '@akropolys/kiku/styles.css';
25
23
 
26
- export default function App() {
24
+ export default function WebsiteAssistant() {
27
25
  return (
28
26
  <AkropolysProvider
29
27
  siteId={process.env.NEXT_PUBLIC_AKROPOLYS_SITE_ID!}
30
28
  apiUrl={process.env.NEXT_PUBLIC_AKROPOLYS_API_URL!}
31
- apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_KEY!}
29
+ apiToken={process.env.NEXT_PUBLIC_AKROPOLYS_API_TOKEN!}
32
30
  >
33
- <KikuButton
34
- label="Ask me anything"
35
- enableVoice={true}
36
- enableVision={true}
37
- theme={{
38
- borderRadius: "24px",
39
- }}
40
- />
31
+ <KikuButton label="Ask us" enableVoice enableVision />
41
32
  </AkropolysProvider>
42
33
  );
43
34
  }
44
35
  ```
45
36
 
46
- > **Next.js Note**: If running an experimental Next.js 15/16 canary with Tailwind CSS v4 on Windows, run `next dev --webpack` if Turbopack experiences resolver latency on Windows ([tracked upstream](https://github.com/vercel/next.js/issues)).
37
+ Mount the component once in your app or layout. In Next.js App Router, import the stylesheet in your root layout if that is where your project keeps global CSS.
38
+
39
+ Use your site's public browser token. Keep private keys and server credentials on your server. Enable the corresponding voice and vision features for your site in Shell.
47
40
 
48
- ---
41
+ ## What visitors can do
49
42
 
50
- ## Records and saved history
43
+ - Ask about your content and compare records in tables.
44
+ - Talk using live voice or include photos in a conversation.
45
+ - Open source records and save items for later.
46
+ - Long-press or right-click a message to access its actions.
47
+ - Use translated controls, right-to-left layouts, and chat themes.
51
48
 
52
- Ingest each catalogue record with a stable top-level `id`. Put its optional, recommended webpage link in `fields.url`. Kiku can show and save ID-only records and retains a supplied link in saved history. See the [SDK ingestion guide](../sdk/README.md#batch-ingestion-on-your-server) for examples.
49
+ ## Components
53
50
 
54
- ## Site actions
51
+ | Component | Purpose |
52
+ | --- | --- |
53
+ | `KikuButton` | A launcher that opens the chat window. |
54
+ | `SearchBar` | Inline search with streamed results. |
55
55
 
56
- Configure permitted actions and their request fields in Shell. Kiku collects the required values and explains the result returned by your backend. Cart updates, bookings, and other operations run through those endpoints; the widget does not maintain a separate cart or dispatch cart reducers.
56
+ Both components use `AkropolysProvider` from `@akropolys/sdk`.
57
57
 
58
- Remove the former action callbacks and browser action listeners when upgrading. See the [SDK action guide](../sdk/README.md#site-actions) for migration details.
58
+ ## Customize the launcher
59
59
 
60
- ## Components
60
+ ```tsx
61
+ <KikuButton
62
+ label="Ask about this property"
63
+ title="Your assistant"
64
+ placeholder="What would you like to know?"
65
+ chips={['Show available properties', 'Compare my options']}
66
+ theme="dark"
67
+ enableVoice
68
+ enableVision
69
+ />
70
+ ```
61
71
 
62
- | Component | Description |
63
- |---|---|
64
- | `<KikuButton />` | Launcher pill that opens the full-screen chat, with live voice and vision. |
65
- | `<SearchBar />` | Inline catalogue search with streamed results. |
66
- | `<ScoutRail />` | Dock for the shopper's scouts: send one out, check on it, buy time. |
67
- | `<ScoutCharacter />` | A single animated scout avatar. |
72
+ `theme` accepts `light`, `dark`, or an `AkropolysTheme` object from `@akropolys/sdk`. Use `onSelectSource` to handle a visitor selecting a source record.
68
73
 
74
+ ## Your content and actions
69
75
 
70
- ---
76
+ Give each catalogue record a stable top-level `id`. A webpage link in `fields.url` is optional; Kiku can show and save records without one. See the [SDK ingestion guide](https://github.com/akropolys/sdk/blob/HEAD/packages/sdk/README.md#batch-ingestion-on-your-server).
71
77
 
72
- ## License
78
+ Configure action endpoints, HTTP methods, and request fields in Shell. Kiku collects the required values and presents the result returned by your backend. Your endpoint validates the request and performs the operation. See the [site actions guide](https://github.com/akropolys/sdk/blob/HEAD/packages/sdk/README.md#site-actions).
73
79
 
74
- MIT © [Akropolys](https://akropolys.cloud)
80
+ ## Links
75
81
 
76
- ### Plain HTML and other frameworks
82
+ - [Akropolys](https://akropolys.cloud)
83
+ - [Source code](https://github.com/akropolys/sdk)
84
+ - [Plain HTML embed guide](https://github.com/akropolys/sdk/blob/HEAD/packages/kiku/EMBED.md)
85
+ - [Headless SDK](https://www.npmjs.com/package/@akropolys/sdk)
77
86
 
78
- Use the standalone script embed without installing React on your website. See [EMBED.md](./EMBED.md) for setup, ingestion, and identity updates.
87
+ ## License
88
+
89
+ MIT © [Akropolys](https://akropolys.cloud)