@helpai/elements 0.12.3 → 0.13.0
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 +171 -87
- package/elements-web-component.esm.js +27 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +28 -28
- package/elements.js.map +4 -4
- package/index.d.ts +143 -2
- package/index.mjs +1470 -502
- package/package.json +1 -1
- package/schema.d.ts +127 -2
- package/schema.json +476 -3
- package/schema.mjs +178 -89
- package/style.css +1 -1
- package/web-component.mjs +1487 -523
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-BJD1aESw.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -306,6 +306,7 @@ declare const featureFlagsSchema: z.ZodObject<{
|
|
|
306
306
|
code: z.ZodString;
|
|
307
307
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
308
308
|
}, z.core.$loose>]>>>;
|
|
309
|
+
humanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
309
310
|
}, z.core.$loose>;
|
|
310
311
|
type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
311
312
|
|
|
@@ -566,6 +567,130 @@ declare const i18nSchema: z.ZodObject<{
|
|
|
566
567
|
}, z.core.$loose>;
|
|
567
568
|
type I18nOptions = z.infer<typeof i18nSchema>;
|
|
568
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Intake section — the pre-chat **lead/sales capture form**, modeled as a
|
|
572
|
+
* deterministic array of typed fields with validation. When enabled it renders
|
|
573
|
+
* as a **blocking gate**: the visitor completes (or skips, if `skippable`) the
|
|
574
|
+
* form before the composer unlocks.
|
|
575
|
+
*
|
|
576
|
+
* The same {@link formFieldSchema} shape is reused at runtime by the AI-driven
|
|
577
|
+
* **ask-input tool** (`src/ui/tool-ask-input.tsx`), so a sales/support/lead
|
|
578
|
+
* agent can both capture a lead up-front and ask for more structured info
|
|
579
|
+
* mid-conversation through one form engine.
|
|
580
|
+
*
|
|
581
|
+
* Off by default — existing deployments are unchanged. See
|
|
582
|
+
* `docs/api/hitl-and-forms.md` for the wire contract + agent presets.
|
|
583
|
+
*/
|
|
584
|
+
|
|
585
|
+
declare const fieldTypeSchema: z.ZodEnum<{
|
|
586
|
+
number: "number";
|
|
587
|
+
text: "text";
|
|
588
|
+
url: "url";
|
|
589
|
+
email: "email";
|
|
590
|
+
tel: "tel";
|
|
591
|
+
textarea: "textarea";
|
|
592
|
+
select: "select";
|
|
593
|
+
radio: "radio";
|
|
594
|
+
checkbox: "checkbox";
|
|
595
|
+
multiselect: "multiselect";
|
|
596
|
+
}>;
|
|
597
|
+
type FieldType = z.infer<typeof fieldTypeSchema>;
|
|
598
|
+
declare const fieldOptionSchema: z.ZodObject<{
|
|
599
|
+
value: z.ZodString;
|
|
600
|
+
label: z.ZodOptional<z.ZodString>;
|
|
601
|
+
description: z.ZodOptional<z.ZodString>;
|
|
602
|
+
}, z.core.$loose>;
|
|
603
|
+
type FieldOption = z.infer<typeof fieldOptionSchema>;
|
|
604
|
+
declare const fieldValidationSchema: z.ZodObject<{
|
|
605
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
606
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
607
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
608
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
609
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
610
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
611
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
612
|
+
}, z.core.$loose>;
|
|
613
|
+
type FieldValidation = z.infer<typeof fieldValidationSchema>;
|
|
614
|
+
declare const formFieldSchema: z.ZodObject<{
|
|
615
|
+
name: z.ZodString;
|
|
616
|
+
label: z.ZodString;
|
|
617
|
+
type: z.ZodEnum<{
|
|
618
|
+
number: "number";
|
|
619
|
+
text: "text";
|
|
620
|
+
url: "url";
|
|
621
|
+
email: "email";
|
|
622
|
+
tel: "tel";
|
|
623
|
+
textarea: "textarea";
|
|
624
|
+
select: "select";
|
|
625
|
+
radio: "radio";
|
|
626
|
+
checkbox: "checkbox";
|
|
627
|
+
multiselect: "multiselect";
|
|
628
|
+
}>;
|
|
629
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
630
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
631
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
632
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
633
|
+
value: z.ZodString;
|
|
634
|
+
label: z.ZodOptional<z.ZodString>;
|
|
635
|
+
description: z.ZodOptional<z.ZodString>;
|
|
636
|
+
}, z.core.$loose>>>;
|
|
637
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
638
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
639
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
644
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
645
|
+
}, z.core.$loose>>;
|
|
646
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
647
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
648
|
+
}, z.core.$loose>;
|
|
649
|
+
type FormField = z.infer<typeof formFieldSchema>;
|
|
650
|
+
declare const intakeSchema: z.ZodObject<{
|
|
651
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
652
|
+
title: z.ZodOptional<z.ZodString>;
|
|
653
|
+
description: z.ZodOptional<z.ZodString>;
|
|
654
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
655
|
+
name: z.ZodString;
|
|
656
|
+
label: z.ZodString;
|
|
657
|
+
type: z.ZodEnum<{
|
|
658
|
+
number: "number";
|
|
659
|
+
text: "text";
|
|
660
|
+
url: "url";
|
|
661
|
+
email: "email";
|
|
662
|
+
tel: "tel";
|
|
663
|
+
textarea: "textarea";
|
|
664
|
+
select: "select";
|
|
665
|
+
radio: "radio";
|
|
666
|
+
checkbox: "checkbox";
|
|
667
|
+
multiselect: "multiselect";
|
|
668
|
+
}>;
|
|
669
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
670
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
671
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
672
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
673
|
+
value: z.ZodString;
|
|
674
|
+
label: z.ZodOptional<z.ZodString>;
|
|
675
|
+
description: z.ZodOptional<z.ZodString>;
|
|
676
|
+
}, z.core.$loose>>>;
|
|
677
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
678
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
679
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
680
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
681
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
682
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
683
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
684
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
}, z.core.$loose>>;
|
|
686
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
687
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
688
|
+
}, z.core.$loose>>>;
|
|
689
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
690
|
+
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
691
|
+
}, z.core.$loose>;
|
|
692
|
+
type Intake = z.infer<typeof intakeSchema>;
|
|
693
|
+
|
|
569
694
|
/**
|
|
570
695
|
* Modules section — the Intercom-style "messenger" surface, modeled as a
|
|
571
696
|
* **data-driven, ordered list of tabs**. Each tab picks a UI `layout`, an
|
|
@@ -686,4 +811,4 @@ declare const ALL_MODES: readonly Mode[];
|
|
|
686
811
|
*/
|
|
687
812
|
declare function emitJsonSchema(): unknown;
|
|
688
813
|
|
|
689
|
-
export { ALL_MODES, type ActionName, type AttachmentLimits, type Behavior, type CalloutPosition, type CalloutShape, type ComposerOptions, type FeatureFlags, type FeedbackEvent, type FeedbackOptions, type FooterOptions, type HapticsOptions, type HeaderActions, type HeaderOptions, type I18nOptions, type LauncherCallout, type LauncherOptions, type LauncherSize, type LauncherVariant, type Mode, type ModuleLayout, type ModuleOptions, type ModulesOptions, type Position, type PoweredBy, type Presentation, type ResizeOptions, type ResponseMode, type SendButtonOptions, type SizeOptions, type SoundOptions, type StringsOverride, type ThemeOverrides, type ThemePreference, type VoiceMode, type WelcomeAnimation, type WelcomeOptions, actionNameSchema, attachmentLimitsSchema, behaviorSchema, calloutPositionSchema, calloutShapeSchema, composerOptionsSchema, emitJsonSchema, featureFlagsSchema, feedbackEventSchema, feedbackSchema, footerSchema, hapticsOptionsSchema, headerActionsSchema, headerSchema, i18nSchema, initialSizeSchema, launcherCalloutSchema, launcherOptionsSchema, launcherSizeSchema, launcherVariantSchema, modeSchema, moduleLayoutSchema, moduleSchema, modulesSchema, positionSchema, poweredBySchema, presentationSchema, resizeOptionsSchema, responseModeSchema, sendButtonIconSchema, sendButtonOptionsSchema, sendButtonShapeSchema, sendButtonVariantSchema, sizeOptionsSchema, soundOptionsSchema, stringsOverrideSchema, themeFieldSchema, themeOverridesSchema, themePreferenceSchema, toolRefSchema, voiceModeSchema, welcomeAnimationSchema, welcomeOptionsSchema, widgetSettingsSchemaForMode };
|
|
814
|
+
export { ALL_MODES, type ActionName, type AttachmentLimits, type Behavior, type CalloutPosition, type CalloutShape, type ComposerOptions, type FeatureFlags, type FeedbackEvent, type FeedbackOptions, type FieldOption, type FieldType, type FieldValidation, type FooterOptions, type FormField, type HapticsOptions, type HeaderActions, type HeaderOptions, type I18nOptions, type Intake, type LauncherCallout, type LauncherOptions, type LauncherSize, type LauncherVariant, type Mode, type ModuleLayout, type ModuleOptions, type ModulesOptions, type Position, type PoweredBy, type Presentation, type ResizeOptions, type ResponseMode, type SendButtonOptions, type SizeOptions, type SoundOptions, type StringsOverride, type ThemeOverrides, type ThemePreference, type VoiceMode, type WelcomeAnimation, type WelcomeOptions, actionNameSchema, attachmentLimitsSchema, behaviorSchema, calloutPositionSchema, calloutShapeSchema, composerOptionsSchema, emitJsonSchema, featureFlagsSchema, feedbackEventSchema, feedbackSchema, fieldOptionSchema, fieldTypeSchema, fieldValidationSchema, footerSchema, formFieldSchema, hapticsOptionsSchema, headerActionsSchema, headerSchema, i18nSchema, initialSizeSchema, intakeSchema, launcherCalloutSchema, launcherOptionsSchema, launcherSizeSchema, launcherVariantSchema, modeSchema, moduleLayoutSchema, moduleSchema, modulesSchema, positionSchema, poweredBySchema, presentationSchema, resizeOptionsSchema, responseModeSchema, sendButtonIconSchema, sendButtonOptionsSchema, sendButtonShapeSchema, sendButtonVariantSchema, sizeOptionsSchema, soundOptionsSchema, stringsOverrideSchema, themeFieldSchema, themeOverridesSchema, themePreferenceSchema, toolRefSchema, voiceModeSchema, welcomeAnimationSchema, welcomeOptionsSchema, widgetSettingsSchemaForMode };
|