@hachther/akilio-widget 0.6.1 → 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 +39 -40
- 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 +4252 -3681
- package/dist/index.umd.min.cjs +29 -30
- 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 +65 -15
- package/package.json +3 -2
- package/dist/driver.js-CVJgNCO-.js +0 -534
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ styles do not leak into the surrounding page.
|
|
|
8
8
|
|
|
9
9
|
```tsx
|
|
10
10
|
<AkilioWidget
|
|
11
|
-
apiBaseUrl=
|
|
12
|
-
projectKey=
|
|
13
|
-
styleIsolation=
|
|
11
|
+
apiBaseUrl='https://app.akilio-ai.com'
|
|
12
|
+
projectKey='your-project-key'
|
|
13
|
+
styleIsolation='shadow'
|
|
14
14
|
/>
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -28,8 +28,8 @@ citations, products, and suggestions).
|
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
30
|
<AkilioWidget
|
|
31
|
-
apiBaseUrl=
|
|
32
|
-
projectKey=
|
|
31
|
+
apiBaseUrl='https://app.akilio-ai.com'
|
|
32
|
+
projectKey='your-project-key'
|
|
33
33
|
streaming
|
|
34
34
|
/>
|
|
35
35
|
```
|
|
@@ -105,6 +105,33 @@ Lifecycle events are dispatched on `window`: `akilio:ready`, `akilio:open`,
|
|
|
105
105
|
`akilio:answer-start`, `akilio:answer-delta`, `akilio:answer-complete`,
|
|
106
106
|
`akilio:error`, and `akilio:reset`.
|
|
107
107
|
|
|
108
|
+
## Launcher coachmark
|
|
109
|
+
|
|
110
|
+
The default launcher includes a dependency-free, one-time discovery coachmark.
|
|
111
|
+
It appears after a short delay, never submits or opens the widget automatically,
|
|
112
|
+
and is dismissed when the visitor closes it, opens the widget, or presses
|
|
113
|
+
Escape. Dismissal is stored per project and tour version.
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
<AkilioWidget
|
|
117
|
+
enableTour
|
|
118
|
+
tourDelayMs={3000}
|
|
119
|
+
tourVersion="v1"
|
|
120
|
+
/>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Standalone attributes are `data-enable-tour`, `data-tour-delay-ms`, and
|
|
124
|
+
`data-tour-version`. Set `enableTour={false}` to disable it. To replay the
|
|
125
|
+
coachmark programmatically, dispatch:
|
|
126
|
+
|
|
127
|
+
```js
|
|
128
|
+
window.dispatchEvent(new Event('akilio:start-tour'));
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The coachmark stays inside the widget’s style boundary, does not darken or block
|
|
132
|
+
the host page, does not steal keyboard focus, and respects reduced-motion
|
|
133
|
+
preferences.
|
|
134
|
+
|
|
108
135
|
Production React and standalone JavaScript widget for the Akilio backend.
|
|
109
136
|
|
|
110
137
|
## Included modes
|
|
@@ -365,8 +392,8 @@ When the chat API returns a `commerce` capability, the widget automatically disp
|
|
|
365
392
|
|
|
366
393
|
```tsx
|
|
367
394
|
<AkilioWidget
|
|
368
|
-
apiBaseUrl=
|
|
369
|
-
projectKey=
|
|
395
|
+
apiBaseUrl='https://api.example.com'
|
|
396
|
+
projectKey='public-project-key'
|
|
370
397
|
onProductClick={(product, variant) => {
|
|
371
398
|
console.log('Product selected', product, variant);
|
|
372
399
|
}}
|
|
@@ -381,9 +408,9 @@ Use `assistantMode` to pass the optional `assistant_mode` routing hint to the ch
|
|
|
381
408
|
|
|
382
409
|
```tsx
|
|
383
410
|
<AkilioWidget
|
|
384
|
-
apiBaseUrl=
|
|
385
|
-
projectKey=
|
|
386
|
-
assistantMode=
|
|
411
|
+
apiBaseUrl='https://api.example.com'
|
|
412
|
+
projectKey='public-project-key'
|
|
413
|
+
assistantMode='ecommerce'
|
|
387
414
|
/>
|
|
388
415
|
```
|
|
389
416
|
|
package/dist/AkilioWidget.d.ts
CHANGED