@akropolys/kiku 1.7.16 → 1.7.20

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/package.json CHANGED
@@ -1,68 +1,67 @@
1
- {
2
- "name": "@akropolys/kiku",
3
- "version": "1.7.16",
4
- "description": "The chat and search widgets for Akropolys — the interface your users and their AI agents actually talk to.",
5
- "license": "MIT",
6
- "keywords": [
7
- "akropolys",
8
- "kiku",
9
- "ai",
10
- "chat",
11
- "search",
12
- "react",
13
- "ui",
14
- "components",
15
- "ecommerce",
16
- "shopping-assistant",
17
- "conversational-ui"
18
- ],
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/akropolys/sdk.git"
22
- },
23
- "homepage": "https://akropolys.io",
24
- "main": "dist/index.js",
25
- "module": "dist/index.mjs",
26
- "types": "dist/index.d.ts",
27
- "style": "dist/styles.css",
28
- "exports": {
29
- ".": {
30
- "types": "./dist/index.d.ts",
31
- "import": "./dist/index.mjs",
32
- "require": "./dist/index.js"
33
- },
34
- "./styles.css": "./dist/styles.css"
35
- },
36
- "files": [
37
- "dist",
38
- "README.md"
39
- ],
40
- "scripts": {
41
- "build": "tsup",
42
- "dev": "tsup --watch"
43
- },
44
- "peerDependencies": {
45
- "react": ">=17",
46
- "react-dom": ">=17",
47
- "@akropolys/sdk": "^1.8.6"
48
- },
49
- "peerDependenciesMeta": {
50
- "react": {
51
- "optional": false
52
- },
53
- "react-dom": {
54
- "optional": false
55
- }
56
- },
57
- "devDependencies": {
58
- "@akropolys/sdk": "workspace:*",
59
- "@types/react": "^18.0.0",
60
- "@types/react-dom": "^18.0.0",
61
- "tsup": "^8.0.0",
62
- "typescript": "^5.0.0"
63
- },
64
- "dependencies": {
65
- "clsx": "^2.1.1",
66
- "tailwind-merge": "^3.6.0"
67
- }
68
- }
1
+ {
2
+ "name": "@akropolys/kiku",
3
+ "version": "1.7.20",
4
+ "description": "The real-time conversational layer for the living web.",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "conversational-ai",
8
+ "realtime",
9
+ "voice-ai",
10
+ "chat",
11
+ "search",
12
+ "rag",
13
+ "react",
14
+ "nextjs",
15
+ "akropolys",
16
+ "kiku"
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/akropolys/sdk.git"
21
+ },
22
+ "homepage": "https://akropolys.io",
23
+ "main": "dist/index.js",
24
+ "module": "dist/index.mjs",
25
+ "types": "dist/index.d.ts",
26
+ "style": "dist/styles.css",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.mjs",
31
+ "require": "./dist/index.js"
32
+ },
33
+ "./styles.css": "./dist/styles.css",
34
+ "./shopify": "./dist/shopify.js",
35
+ "./kiku.iife.js": "./dist/kiku.iife.js"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "shopify",
40
+ "README.md"
41
+ ],
42
+ "scripts": {
43
+ "build": "node scripts/gen-css.mjs && tsup && node scripts/postbuild.mjs",
44
+ "dev": "node scripts/gen-css.mjs && tsup --watch"
45
+ },
46
+ "peerDependencies": {
47
+ "react": ">=17",
48
+ "react-dom": ">=17",
49
+ "@akropolys/sdk": "^1.8.10"
50
+ },
51
+ "peerDependenciesMeta": {
52
+ "react": {
53
+ "optional": false
54
+ },
55
+ "react-dom": {
56
+ "optional": false
57
+ }
58
+ },
59
+ "devDependencies": {
60
+ "@akropolys/sdk": "workspace:*",
61
+ "@types/react": "^18.0.0",
62
+ "@types/react-dom": "^18.0.0",
63
+ "clsx": "^2.1.1",
64
+ "tsup": "^8.0.0",
65
+ "typescript": "^5.0.0"
66
+ }
67
+ }
@@ -0,0 +1,71 @@
1
+ # Kiku AI Assistant for Shopify
2
+
3
+ Kiku is an intelligent shopping assistant that runs directly on Shopify storefronts with:
4
+ - **Zero theme CSS conflict** via Web Component Shadow DOM isolation
5
+ - **Automated Catalog Ingestion** on product views (`{{ product | json }}`)
6
+ - **Native Shopify Cart Integration** via AJAX `/cart/add.js` and `/cart.js`
7
+ - **Voice & Visual Search** built-in with multilingual support
8
+
9
+ ---
10
+
11
+ ## Quick Setup Options
12
+
13
+ ### Option 1: Direct Liquid Theme Embed (Fastest)
14
+
15
+ Add the snippet to your theme's `layout/theme.liquid` just before `</body>`:
16
+
17
+ ```liquid
18
+ {% render 'kiku-embed', site_id: 'YOUR_SITE_ID', api_token: 'YOUR_API_TOKEN' %}
19
+ ```
20
+
21
+ Or paste directly:
22
+ ```html
23
+ <script>
24
+ window.AkropolysConfig = {
25
+ siteId: "YOUR_SITE_ID",
26
+ apiToken: "YOUR_API_TOKEN",
27
+ {% if product %}
28
+ product: {{ product | json }},
29
+ {% endif %}
30
+ };
31
+ </script>
32
+ <script src="https://cdn.akropolys.cloud/kiku.iife.js" defer></script>
33
+ ```
34
+
35
+ ---
36
+
37
+ ### Option 2: Shopify Theme App Extension (Online Store 2.0)
38
+
39
+ If you are packaging Kiku as a Shopify App:
40
+ 1. Copy `blocks/kiku-button.liquid` into your extension's `blocks/` directory.
41
+ 2. Copy `dist/kiku.iife.global.js` (or `dist/shopify.global.js`) as `assets/kiku.iife.js`.
42
+ 3. Merchants can add the "Kiku AI Assistant" App Block directly from the Shopify Theme Customizer!
43
+
44
+ ---
45
+
46
+ ## JavaScript API (`window.Kiku`)
47
+
48
+ Once loaded, Kiku exposes `window.Kiku`:
49
+
50
+ ```javascript
51
+ // Open the chat modal
52
+ window.Kiku.open();
53
+
54
+ // Close the chat modal
55
+ window.Kiku.close();
56
+
57
+ // Toggle chat modal
58
+ window.Kiku.toggle();
59
+
60
+ // Ingest a custom product dynamically
61
+ window.Kiku.ingest({
62
+ id: "12345",
63
+ title: "Custom Hoodie",
64
+ price: "49.99",
65
+ image: "https://example.com/image.jpg",
66
+ url: "/products/custom-hoodie"
67
+ });
68
+
69
+ // Access underlying AkropolysClient instance
70
+ const client = window.Kiku.getClient();
71
+ ```
@@ -0,0 +1,121 @@
1
+ {% comment %}
2
+ Kiku AI Assistant App Block for Shopify Online Store 2.0
3
+ File: blocks/kiku-button.liquid
4
+ {% endcomment %}
5
+
6
+ <script>
7
+ window.AkropolysConfig = {
8
+ siteId: {{ block.settings.site_id | json }},
9
+ apiToken: {{ block.settings.api_token | json }},
10
+ {% if block.settings.api_url != blank %}apiUrl: {{ block.settings.api_url | json }},{% endif %}
11
+ buttonLabel: {{ block.settings.button_label | json }},
12
+ position: {{ block.settings.position | json }},
13
+ theme: {{ block.settings.theme | json }},
14
+ enableVoice: {{ block.settings.enable_voice | json }},
15
+ enableVision: {{ block.settings.enable_vision | json }},
16
+ enableAudioResponse: {{ block.settings.enable_audio | json }},
17
+ {% if product %}
18
+ product: {
19
+ id: {{ product.id | json }},
20
+ title: {{ product.title | json }},
21
+ handle: {{ product.handle | json }},
22
+ url: {{ product.url | json }},
23
+ price: {{ product.price | json }},
24
+ compare_at_price: {{ product.compare_at_price | json }},
25
+ featured_image: {{ product.featured_image | image_url: width: 800 | json }},
26
+ type: {{ product.type | json }},
27
+ vendor: {{ product.vendor | json }},
28
+ tags: {{ product.tags | json }},
29
+ description: {{ product.description | strip_html | json }},
30
+ available: {{ product.available | json }},
31
+ variants: [
32
+ {% for variant in product.variants %}
33
+ {
34
+ id: {{ variant.id | json }},
35
+ title: {{ variant.title | json }},
36
+ price: {{ variant.price | json }},
37
+ sku: {{ variant.sku | json }},
38
+ available: {{ variant.available | json }}
39
+ }{% unless forloop.last %},{% endunless %}
40
+ {% endfor %}
41
+ ]
42
+ }
43
+ {% endif %}
44
+ };
45
+ </script>
46
+
47
+ <script src="{{ 'kiku.iife.js' | asset_url }}" defer></script>
48
+
49
+ {% schema %}
50
+ {
51
+ "name": "Kiku AI Assistant",
52
+ "target": "body",
53
+ "settings": [
54
+ {
55
+ "type": "text",
56
+ "id": "site_id",
57
+ "label": "Akropolys Site ID",
58
+ "info": "Your Site ID from shell.akropolys.cloud"
59
+ },
60
+ {
61
+ "type": "text",
62
+ "id": "api_token",
63
+ "label": "Akropolys API Token",
64
+ "info": "Public client token with shopper access"
65
+ },
66
+ {
67
+ "type": "text",
68
+ "id": "api_url",
69
+ "label": "API URL Override",
70
+ "default": "https://api.akropolys.cloud/v1"
71
+ },
72
+ {
73
+ "type": "text",
74
+ "id": "button_label",
75
+ "label": "Button Label",
76
+ "default": "Ask Kiku"
77
+ },
78
+ {
79
+ "type": "select",
80
+ "id": "position",
81
+ "label": "Widget Position",
82
+ "options": [
83
+ { "value": "bottom-right", "label": "Bottom Right" },
84
+ { "value": "bottom-left", "label": "Bottom Left" },
85
+ { "value": "top-right", "label": "Top Right" },
86
+ { "value": "top-left", "label": "Top Left" },
87
+ { "value": "inline", "label": "Inline Container (#kiku-mount)" }
88
+ ],
89
+ "default": "bottom-right"
90
+ },
91
+ {
92
+ "type": "select",
93
+ "id": "theme",
94
+ "label": "Theme",
95
+ "options": [
96
+ { "value": "dark", "label": "Dark" },
97
+ { "value": "light", "label": "Light" }
98
+ ],
99
+ "default": "dark"
100
+ },
101
+ {
102
+ "type": "checkbox",
103
+ "id": "enable_voice",
104
+ "label": "Enable Voice Input & Conversation",
105
+ "default": true
106
+ },
107
+ {
108
+ "type": "checkbox",
109
+ "id": "enable_vision",
110
+ "label": "Enable Visual Photo Search",
111
+ "default": true
112
+ },
113
+ {
114
+ "type": "checkbox",
115
+ "id": "enable_audio",
116
+ "label": "Enable Audio Voice Responses",
117
+ "default": true
118
+ }
119
+ ]
120
+ }
121
+ {% endschema %}
@@ -0,0 +1,45 @@
1
+ {% comment %}
2
+ Direct Liquid snippet for Shopify themes (e.g. theme.liquid before </body>)
3
+ Usage: {% render 'kiku-embed', site_id: 'your_site_id', api_token: 'your_token' %}
4
+ {% endcomment %}
5
+
6
+ <script>
7
+ window.AkropolysConfig = {
8
+ siteId: {{ site_id | default: settings.akropolys_site_id | json }},
9
+ apiToken: {{ api_token | default: settings.akropolys_api_token | json }},
10
+ buttonLabel: {{ button_label | default: "Ask Kiku" | json }},
11
+ position: {{ position | default: "bottom-right" | json }},
12
+ theme: {{ theme | default: "dark" | json }},
13
+ enableVoice: true,
14
+ enableVision: true,
15
+ enableAudioResponse: true,
16
+ {% if product %}
17
+ product: {
18
+ id: {{ product.id | json }},
19
+ title: {{ product.title | json }},
20
+ handle: {{ product.handle | json }},
21
+ url: {{ product.url | json }},
22
+ price: {{ product.price | json }},
23
+ compare_at_price: {{ product.compare_at_price | json }},
24
+ featured_image: {{ product.featured_image | image_url: width: 800 | json }},
25
+ type: {{ product.type | json }},
26
+ vendor: {{ product.vendor | json }},
27
+ tags: {{ product.tags | json }},
28
+ description: {{ product.description | strip_html | json }},
29
+ available: {{ product.available | json }},
30
+ variants: [
31
+ {% for variant in product.variants %}
32
+ {
33
+ id: {{ variant.id | json }},
34
+ title: {{ variant.title | json }},
35
+ price: {{ variant.price | json }},
36
+ sku: {{ variant.sku | json }},
37
+ available: {{ variant.available | json }}
38
+ }{% unless forloop.last %},{% endunless %}
39
+ {% endfor %}
40
+ ]
41
+ }
42
+ {% endif %}
43
+ };
44
+ </script>
45
+ <script src="https://cdn.akropolys.cloud/kiku.iife.js" defer></script>