@akropolys/kiku 2.2.28 → 2.2.29

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/EMBED.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # Plain HTML embed
2
2
 
3
- Build with `pnpm --filter @akropolys/kiku build`. Host `dist/kiku.js`, `dist/styles.css`, and the entire
4
- `dist/embed` directory together, preserving their relative paths. Serve JavaScript
5
- with the correct MIME type and allow CORS when hosting assets on another origin.
3
+ Add the published CDN script before your closing `</body>` tag. The loader fetches
4
+ its stylesheet and embed module automatically.
6
5
 
7
6
  ```html
8
- <script src="/kiku/kiku.js" data-site-id="YOUR_SITE_ID"
7
+ <script src="https://cdn.akropolys.cloud/kiku/2.2.29/kiku.js" data-site-id="YOUR_SITE_ID"
9
8
  data-api-token="YOUR_PUBLIC_BROWSER_TOKEN" defer></script>
10
9
  ```
11
10
 
@@ -41,4 +40,18 @@ exposes `Kiku.ready`. Repeated script tags or mount calls reuse the same widget.
41
40
 
42
41
  For a restrictive CSP, permit the script origin, existing API/voice endpoints,
43
42
  and the styles/fonts already needed by Kiku. Voice still requires HTTPS and
44
- microphone permission. No production embed URL has been published yet.
43
+ microphone permission.
44
+
45
+ ## CDN files and self-hosting
46
+
47
+ - [Loader](https://cdn.akropolys.cloud/kiku/2.2.29/kiku.js)
48
+ - [Stylesheet](https://cdn.akropolys.cloud/kiku/2.2.29/styles.css)
49
+ - [Embed module](https://cdn.akropolys.cloud/kiku/2.2.29/embed/embed.js)
50
+
51
+ To self-host, install `@akropolys/kiku@2.2.29` and copy `dist/kiku.js`,
52
+ `dist/styles.css`, and the entire `dist/embed` directory to your server. Preserve
53
+ their relative paths and use your hosted loader URL in the script tag. Serve
54
+ JavaScript with the correct MIME type and allow CORS across origins.
55
+
56
+ When building from this repository, run `pnpm --filter @akropolys/kiku build`
57
+ to generate those files.
package/README.md CHANGED
@@ -7,11 +7,27 @@ Chat, search, voice, and photo input for your website. Kiku connects visitors to
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install @akropolys/kiku @akropolys/sdk
10
+ npm install @akropolys/kiku@2.2.29 @akropolys/sdk@2.0.1
11
11
  ```
12
12
 
13
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).
14
14
 
15
+ ## JavaScript embed
16
+
17
+ Add Kiku to any website with the published CDN script:
18
+
19
+ ```html
20
+ <script
21
+ src="https://cdn.akropolys.cloud/kiku/2.2.29/kiku.js"
22
+ data-site-id="YOUR_SITE_ID"
23
+ data-api-token="YOUR_PUBLIC_BROWSER_TOKEN"
24
+ data-label="Ask Kiku"
25
+ defer
26
+ ></script>
27
+ ```
28
+
29
+ The script loads its styles and runtime automatically. See the [embed guide](https://github.com/akropolys/sdk/blob/HEAD/packages/kiku/EMBED.md) for configuration, ingestion, and self-hosting.
30
+
15
31
  ## React and Next.js
16
32
 
17
33
  ```tsx