@helpai/elements 1.12.7 → 1.12.8
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/configurator.mjs +1 -1
- package/docs/options.md +16 -16
- package/elements-web-component.esm.js +26 -26
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +26 -26
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +25 -25
- package/elements.esm.js.map +3 -3
- package/elements.js +26 -26
- package/elements.js.map +3 -3
- package/index.d.ts +11 -2
- package/index.mjs +7 -7
- package/llms-full.txt +158 -158
- package/llms.txt +19 -19
- package/package.json +1 -1
- package/react.d.ts +11 -2
- package/react.mjs +2 -2
- package/schema.d.ts +6 -0
- package/schema.json +7 -1
- package/schema.mjs +1 -1
- package/web-component.d.ts +5 -2
- package/web-component.mjs +7 -7
package/llms.txt
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Help AI Elements
|
|
2
2
|
|
|
3
|
-
> Help AI's AI chat widget for any website: an AI agent that answers visitors from the customer's own help content, can hand the chat to a person, and shows Help articles and News. Install it with one script tag, the `<web-ai-chat>` element, the npm API or the React kit. These docs match @helpai/elements@1.12.
|
|
3
|
+
> Help AI's AI chat widget for any website: an AI agent that answers visitors from the customer's own help content, can hand the chat to a person, and shows Help articles and News. Install it with one script tag, the `<web-ai-chat>` element, the npm API or the React kit. These docs match @helpai/elements@1.12.8.
|
|
4
4
|
|
|
5
5
|
What a coding agent needs to install it right the first time:
|
|
6
6
|
|
|
7
7
|
- Two values come from the deployment's Install page in the Help AI dashboard: the public key (`agent_pk_…`) and the AI agent deployment id (a UUID). Both belong in browser code. The deployment's secret key never does.
|
|
8
|
-
- Plain HTML, WordPress or any CMS: `<script src="https://cdn.help.ai/sdk/js/elements/1.12.
|
|
8
|
+
- Plain HTML, WordPress or any CMS: `<script src="https://cdn.help.ai/sdk/js/elements/1.12.8/elements.js" data-public-key="agent_pk_…" data-ai-agent-deployment-id="…" defer></script>`.
|
|
9
9
|
- React, Next.js, Remix: install `@helpai/elements` and render `<HelpAI publicKey="…" aiAgentDeploymentId="…" />` from `@helpai/elements/react` once, in the root layout. `useHelpAI()` in any component returns `{ state, ask, open, close, reset }`. It is server-render safe; import everything from `@helpai/elements/react`.
|
|
10
10
|
- Vue, Svelte, Angular and other bundlers: `import '@helpai/elements/web-component'`, then `<web-ai-chat public-key="…" ai-agent-deployment-id="…"></web-ai-chat>`. JSX typings: `@helpai/elements/jsx/react`, `/jsx/vue`, `/jsx/svelte`.
|
|
11
11
|
- Site buttons need no JavaScript: `data-helpai-ask="Which plan fits a team of 10?"` puts the question in the chat, `data-helpai-open="help"` opens a tab (`home`, `chats`, `help`, `news`). In code, `ask(text)` fills the composer and sends only with `{ send: true }`.
|
|
@@ -18,23 +18,23 @@ What a coding agent needs to install it right the first time:
|
|
|
18
18
|
|
|
19
19
|
## Docs
|
|
20
20
|
|
|
21
|
-
- [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
22
|
-
- [Installation](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
23
|
-
- [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
24
|
-
- [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
25
|
-
- [Option reference](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
26
|
-
- [API reference](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
27
|
-
- [Events and hooks](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
28
|
-
- [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
29
|
-
- [Theming](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
30
|
-
- [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
31
|
-
- [Analytics](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
32
|
-
- [Security and privacy](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
33
|
-
- [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
34
|
-
- [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
35
|
-
- [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
36
|
-
- [Overview](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
21
|
+
- [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/quickstart.md): credentials, the install paths and a first check, in five minutes
|
|
22
|
+
- [Installation](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/installation.md): every install path in depth: script tag, async loader, npm, web component, CDN URLs and version pinning
|
|
23
|
+
- [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/frameworks.md): the React kit (`<HelpAI />`, `useHelpAI()`), Next.js, Remix, Vue, Nuxt, Svelte, Astro, Angular, WordPress, Shopify, Webflow
|
|
24
|
+
- [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/configuration.md): every option by group, with examples
|
|
25
|
+
- [Option reference](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/options.md): the table of every option, generated from the schemas; authoritative
|
|
26
|
+
- [API reference](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/api-reference.md): exports, instance methods (`ask`, `open`, `state`, `ready`, `reset`, …), the global API, no-script triggers, deep links, JSX typings
|
|
27
|
+
- [Events and hooks](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/events-and-hooks.md): every event and its payload, `on()` and `hook()`
|
|
28
|
+
- [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/page-tools.md): WebMCP-shaped tools the AI agent calls on your page (`registerTool`, `tools`, `useHelpAITool`, `<form toolname>`), run once in the browser
|
|
29
|
+
- [Theming](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/theming.md): colors, shapes, fonts, launcher styles, `theme: "host"` and `::part()` styling
|
|
30
|
+
- [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/recipes.md): copy-paste solutions for common integrations
|
|
31
|
+
- [Analytics](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/analytics.md): sending widget activity to Google Analytics, Segment, PostHog and other trackers
|
|
32
|
+
- [Security and privacy](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/security-privacy.md): isolation, CSP, what the widget stores and sends
|
|
33
|
+
- [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/browser-support.md): supported browsers and fallbacks
|
|
34
|
+
- [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/troubleshooting.md): an install that does not show, connect or answer
|
|
35
|
+
- [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/faq.md): short answers to common questions
|
|
36
|
+
- [Overview](https://cdn.help.ai/sdk/js/elements/1.12.8/docs/README.md): the whole SDK on one page
|
|
37
37
|
|
|
38
38
|
## Optional
|
|
39
39
|
|
|
40
|
-
- [Every doc in one file](https://cdn.help.ai/sdk/js/elements/1.12.
|
|
40
|
+
- [Every doc in one file](https://cdn.help.ai/sdk/js/elements/1.12.8/llms-full.txt): the docs above, concatenated
|
package/package.json
CHANGED
package/react.d.ts
CHANGED
|
@@ -259,8 +259,9 @@ interface FeedbackOptions {
|
|
|
259
259
|
* interfaces are what the resolver, controller, and form UI consume.
|
|
260
260
|
*
|
|
261
261
|
* A deployment declares an array of {@link FormDef}s; each is bound to trigger
|
|
262
|
-
* event(s) and shown as
|
|
263
|
-
* until submit/skip
|
|
262
|
+
* event(s) and shown as the last conversation row; a `blocking` one also locks
|
|
263
|
+
* the message box until submit/skip. Its answers are recorded via one shared
|
|
264
|
+
* submit endpoint.
|
|
264
265
|
* Generic across verticals — there is NO industry logic; a clinic intake, an
|
|
265
266
|
* insurance claim form, a CSAT survey, and a sales signal capture are all just
|
|
266
267
|
* different config.
|
|
@@ -349,6 +350,8 @@ interface FormDef {
|
|
|
349
350
|
description?: string;
|
|
350
351
|
submitLabel?: string;
|
|
351
352
|
skippable?: boolean;
|
|
353
|
+
/** Lock the message box until the visitor submits or skips. Default `false`. */
|
|
354
|
+
blocking?: boolean;
|
|
352
355
|
/** Default `once`. */
|
|
353
356
|
frequency?: FormFrequency;
|
|
354
357
|
/**
|
|
@@ -425,6 +428,8 @@ interface ResolvedForm {
|
|
|
425
428
|
description?: string;
|
|
426
429
|
submitLabel?: string;
|
|
427
430
|
skippable: boolean;
|
|
431
|
+
/** Locks the message box until submit/skip (false → the visitor keeps chatting). */
|
|
432
|
+
blocking: boolean;
|
|
428
433
|
frequency: FormFrequency;
|
|
429
434
|
/** Mirror answers into `userContext` (false → PII, endpoint only). */
|
|
430
435
|
mirrorToContext: boolean;
|
|
@@ -1459,6 +1464,7 @@ declare const widgetSettingsSchema: z.ZodObject<{
|
|
|
1459
1464
|
description: z.ZodOptional<z.ZodString>;
|
|
1460
1465
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1461
1466
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
1467
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
1462
1468
|
frequency: z.ZodDefault<z.ZodEnum<{
|
|
1463
1469
|
always: "always";
|
|
1464
1470
|
conversation: "conversation";
|
|
@@ -1801,6 +1807,7 @@ declare const widgetConfigSchema: z.ZodObject<{
|
|
|
1801
1807
|
description: z.ZodOptional<z.ZodString>;
|
|
1802
1808
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1803
1809
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
1810
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
1804
1811
|
frequency: z.ZodDefault<z.ZodEnum<{
|
|
1805
1812
|
always: "always";
|
|
1806
1813
|
conversation: "conversation";
|
|
@@ -2144,6 +2151,7 @@ declare const widgetConfigPartialSchema: z.ZodObject<{
|
|
|
2144
2151
|
description: z.ZodOptional<z.ZodString>;
|
|
2145
2152
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
2146
2153
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
2154
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
2147
2155
|
frequency: z.ZodDefault<z.ZodEnum<{
|
|
2148
2156
|
always: "always";
|
|
2149
2157
|
conversation: "conversation";
|
|
@@ -2449,6 +2457,7 @@ declare const widgetSettingsPartialSchema: z.ZodObject<{
|
|
|
2449
2457
|
description: z.ZodOptional<z.ZodString>;
|
|
2450
2458
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
2451
2459
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
2460
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
2452
2461
|
frequency: z.ZodDefault<z.ZodEnum<{
|
|
2453
2462
|
always: "always";
|
|
2454
2463
|
conversation: "conversation";
|