@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 CHANGED
@@ -8,9 +8,9 @@ styles do not leak into the surrounding page.
8
8
 
9
9
  ```tsx
10
10
  <AkilioWidget
11
- apiBaseUrl="https://app.akilio-ai.com"
12
- projectKey="your-project-key"
13
- styleIsolation="shadow"
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="https://app.akilio-ai.com"
32
- projectKey="your-project-key"
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="https://api.example.com"
369
- projectKey="public-project-key"
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="https://api.example.com"
385
- projectKey="public-project-key"
386
- assistantMode="ecommerce"
411
+ apiBaseUrl='https://api.example.com'
412
+ projectKey='public-project-key'
413
+ assistantMode='ecommerce'
387
414
  />
388
415
  ```
389
416
 
@@ -1,4 +1,4 @@
1
- import type { AkilioWidgetProps } from './types';
1
+ import { AkilioWidgetProps } from './types';
2
2
  /**
3
3
  * Public widget boundary. By default the application and its stylesheet are
4
4
  * rendered into a ShadowRoot, preventing CSS resets and component rules from