@evelan/jexity-widget 0.22.0 → 0.26.0-canary.60
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/dist/index.mjs +2297 -2221
- package/dist/index.mjs.map +1 -1
- package/dist/loader.js +17 -0
- package/dist/loader.js.map +1 -0
- package/dist/react.mjs +3726 -3638
- package/dist/react.mjs.map +1 -1
- package/dist/types/entries/react.d.ts.map +1 -1
- package/dist/types/features/chat/components/ChatScreen.d.ts.map +1 -1
- package/dist/types/features/chat/components/MessageList.d.ts.map +1 -1
- package/dist/types/features/chat/components/magicline/ContractCreationForm.d.ts.map +1 -1
- package/dist/types/features/chat/components/magicline/magiclineConstants.d.ts +1 -1
- package/dist/types/features/chat/components/magicline/magiclineConstants.d.ts.map +1 -1
- package/dist/types/features/chat/components/magicline/useContractCreationState.d.ts +5 -0
- package/dist/types/features/chat/components/magicline/useContractCreationState.d.ts.map +1 -1
- package/dist/types/features/chat/components/magicline/useTrialBookingState.d.ts.map +1 -1
- package/dist/types/features/chat/composer/components/ChatInput.d.ts +2 -1
- package/dist/types/features/chat/composer/components/ChatInput.d.ts.map +1 -1
- package/dist/types/features/chat/composer/hooks/useComposerInput.d.ts +3 -3
- package/dist/types/features/chat/composer/hooks/useComposerInput.d.ts.map +1 -1
- package/dist/types/features/chat/composer/hooks/useSendMessage.d.ts.map +1 -1
- package/dist/types/features/chat/hooks/useConversation.d.ts +1 -1
- package/dist/types/features/chat/hooks/useConversation.d.ts.map +1 -1
- package/dist/types/features/chat/hooks/useConvexSession.d.ts.map +1 -1
- package/dist/types/features/chat/hooks/useEnterWaiting.d.ts.map +1 -1
- package/dist/types/features/chat/hooks/useEscalation.d.ts +4 -4
- package/dist/types/features/chat/hooks/useHandoff.d.ts +4 -4
- package/dist/types/features/chat/hooks/useMagicline.d.ts +3 -3
- package/dist/types/features/chat/hooks/useUnreadTitleFlash.d.ts.map +1 -1
- package/dist/types/features/chat/hooks/useVisitorHeartbeat.d.ts.map +1 -1
- package/dist/types/features/home/components/HomeScreen.d.ts.map +1 -1
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/i18n/locales/de.d.ts +237 -237
- package/dist/types/i18n/locales/de.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts +232 -232
- package/dist/types/i18n/locales/en.d.ts.map +1 -1
- package/dist/types/lib/convex-provider.d.ts +19 -0
- package/dist/types/lib/convex-provider.d.ts.map +1 -0
- package/dist/types/lib/logger.d.ts.map +1 -1
- package/dist/types/lib/widget-config.d.ts +3 -1
- package/dist/types/lib/widget-config.d.ts.map +1 -1
- package/dist/types/lib/widgetBootstrap.d.ts +2 -0
- package/dist/types/lib/widgetBootstrap.d.ts.map +1 -1
- package/dist/types/module/screens/ScreenRouter.d.ts +1 -0
- package/dist/types/module/screens/ScreenRouter.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/usePathGuard.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/useRemoteConfig.d.ts +4 -1
- package/dist/types/module/shell/hooks/useRemoteConfig.d.ts.map +1 -1
- package/dist/types/module/shell/mount.d.ts.map +1 -1
- package/dist/types/module/visitor/visitor.state.d.ts +1 -1
- package/dist/types/module/visitor/visitor.state.d.ts.map +1 -1
- package/dist/types/shared/hooks/useEffectEvent.d.ts +24 -0
- package/dist/types/shared/hooks/useEffectEvent.d.ts.map +1 -0
- package/dist/types/shared/theme/build-theme.d.ts.map +1 -1
- package/dist/types/types.d.ts +31 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/widget.js +33 -29
- package/dist/widget.js.map +1 -1
- package/package.json +9 -6
|
@@ -8,6 +8,8 @@ type BootstrapOk = {
|
|
|
8
8
|
token: string;
|
|
9
9
|
excludePaths: string[];
|
|
10
10
|
allowedUrls: string[];
|
|
11
|
+
/** Rollback lever for loader.js. Absent on older cached responses → treat as 'live'. */
|
|
12
|
+
widgetLazyLoadMode?: 'live' | 'eager' | 'disabled';
|
|
11
13
|
};
|
|
12
14
|
type BootstrapErr = {
|
|
13
15
|
ok: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetBootstrap.d.ts","sourceRoot":"","sources":["../../../src/lib/widgetBootstrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,WAAW,GAAG;
|
|
1
|
+
{"version":3,"file":"widgetBootstrap.d.ts","sourceRoot":"","sources":["../../../src/lib/widgetBootstrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,IAAI,CAAA;IACR,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;CACnD,CAAA;AACD,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE,cAAc,GAAG,WAAW,GAAG,SAAS,GAAG,cAAc,CAAA;IAChE,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AACD,KAAK,eAAe,GAAG,WAAW,GAAG,YAAY,CAAA;AAEjD,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,eAAe,CAAC,CA2C1B;AAGD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAKhF;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAY5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenRouter.d.ts","sourceRoot":"","sources":["../../../../src/module/screens/ScreenRouter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScreenRouter.d.ts","sourceRoot":"","sources":["../../../../src/module/screens/ScreenRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2CAA2C,CAAA;AAMnE,OAAO,EAAoC,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAM7G,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IAGjB,YAAY,CAAC,EAAE,YAAY,CAAA;IAE3B,SAAS,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAA;IACvC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,OAAO,CAAA;IACxB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IAClD,UAAU,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IAC/C,YAAY,EAAE,MAAM,IAAI,CAAA;CACzB;AAED,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,iBAAiB,gCA0D3O"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/useBootstrap.ts"],"names":[],"mappings":"AAMA,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,cAAc,EACd,gBAAgB,GACjB,EAAE,mBAAmB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"useBootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/useBootstrap.ts"],"names":[],"mappings":"AAMA,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,cAAc,EACd,gBAAgB,GACjB,EAAE,mBAAmB,GAAG,IAAI,CA2D5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePathGuard.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/usePathGuard.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"usePathGuard.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/usePathGuard.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAoCtC"}
|
|
@@ -13,7 +13,10 @@ type RemoteConfigState = {
|
|
|
13
13
|
* - Aborts the in-flight request if orgSlug changes or the hook unmounts.
|
|
14
14
|
* - Silent fail: any error (network, 404, parse) resolves to null so the
|
|
15
15
|
* widget still renders using embed-script options as a fallback.
|
|
16
|
+
* - `preConfig` (loader.js path): config was already fetched before mount —
|
|
17
|
+
* skip the fetch entirely and resolve settled immediately. `undefined` means
|
|
18
|
+
* "no preload, fetch normally"; `null` is a valid preloaded "fetch failed".
|
|
16
19
|
*/
|
|
17
|
-
export declare function useRemoteConfig(orgSlug: string, projSlug: string | undefined, runtimeConvexUrl?: string): RemoteConfigState;
|
|
20
|
+
export declare function useRemoteConfig(orgSlug: string, projSlug: string | undefined, runtimeConvexUrl?: string, preConfig?: RemoteConfig | null): RemoteConfigState;
|
|
18
21
|
export {};
|
|
19
22
|
//# sourceMappingURL=useRemoteConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRemoteConfig.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/useRemoteConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEjF,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"useRemoteConfig.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/useRemoteConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEjF,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,gBAAgB,CAAC,EAAE,MAAM,EACzB,SAAS,CAAC,EAAE,YAAY,GAAG,IAAI,GAC9B,iBAAiB,CA8CnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../../src/module/shell/mount.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../../src/module/shell/mount.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAmBpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,iBAAiB,GACzB,MAAM,IAAI,CAgDZ"}
|
|
@@ -20,7 +20,7 @@ export declare const hasAnyHistory: import("@preact/signals").ReadonlySignal<boo
|
|
|
20
20
|
* - 'resume' — visitor clicked a history entry or used the lookup form
|
|
21
21
|
* - null — initial mount (first-time visitor lands on chat) OR not set
|
|
22
22
|
*/
|
|
23
|
-
export declare const chatMountIntent: import("@preact/signals").Signal<"
|
|
23
|
+
export declare const chatMountIntent: import("@preact/signals").Signal<"escalate" | "fresh" | "resume" | null>;
|
|
24
24
|
export declare function normalizeSessionTimeoutMs(value: unknown): number | null | undefined;
|
|
25
25
|
export declare function pruneSessionHistory(entries: SessionHistoryEntry[], now: number, timeoutMs: number | null | undefined): SessionHistoryEntry[];
|
|
26
26
|
export declare function pruneEnvelopeSessionHistory(entries: SessionHistoryEntry[], now: number, hasTimeoutMetadata: boolean, timeoutMs: number | null | undefined): SessionHistoryEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitor.state.d.ts","sourceRoot":"","sources":["../../../../src/module/visitor/visitor.state.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E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AM,EACX,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,mBAAmB,EAAE,CAIvB;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,mBAAmB,EAAE,EAC9B,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,OAAO,EAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,mBAAmB,EAAE,CAGvB;AAoCD,iEAAiE;AACjE,wBAAgB,WAAW,IAAI,IAAI,CAUlC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE,CAUnF;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;gFAEgF;AAChF,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAS/C;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAQ9C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preact port of React 19's `useEffectEvent`.
|
|
3
|
+
*
|
|
4
|
+
* Returns a stable function that always calls the LATEST version of `fn`. Use it
|
|
5
|
+
* for the "an effect needs to call this, but must not re-run when it changes"
|
|
6
|
+
* case — the alternative is either a stale closure or an effect that re-fires on
|
|
7
|
+
* every render because the callback is recreated each time.
|
|
8
|
+
*
|
|
9
|
+
* Two things make this work rather than just look like it works:
|
|
10
|
+
*
|
|
11
|
+
* 1. The ref is assigned in `useLayoutEffect`, never during render. Assigning
|
|
12
|
+
* during render is a mutation the compiler-based `react-hooks/purity` and
|
|
13
|
+
* `react-hooks/immutability` rules correctly reject.
|
|
14
|
+
* 2. The name matters. `eslint-plugin-react-hooks` v7 detects effect events by
|
|
15
|
+
* identifier name only (`isUseEffectEventIdentifier`: `node.name ===
|
|
16
|
+
* 'useEffectEvent'`), so a locally-defined hook with this exact name gets the
|
|
17
|
+
* real treatment: exhaustive-deps stops demanding it, and actively errors if
|
|
18
|
+
* you put the returned function in a dependency array.
|
|
19
|
+
*
|
|
20
|
+
* Preact 10.29 has no built-in equivalent — `preact/hooks` exports stop at
|
|
21
|
+
* `useId`. Drop this file if that ever changes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useEffectEvent<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R;
|
|
24
|
+
//# sourceMappingURL=useEffectEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEffectEvent.d.ts","sourceRoot":"","sources":["../../../../src/shared/hooks/useEffectEvent.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,CAQ/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/build-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,GAAG,CAAC,aAAa,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"build-theme.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/build-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,GAAG,CAAC,aAAa,GAAG,SAAS,CAoDzF"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -76,6 +76,10 @@ export interface JexityChatOptions {
|
|
|
76
76
|
triggerIcon?: 'chat' | 'bot' | 'sparkles';
|
|
77
77
|
triggerRadius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
78
78
|
triggerLabel?: string;
|
|
79
|
+
/** FAB gap in px from the anchored corner (X = left/right edge, Y = bottom).
|
|
80
|
+
* Absent ⇒ 24 (the legacy hardcoded gap); clamped 0–100 in mergeWidgetConfig. */
|
|
81
|
+
triggerOffsetX?: number;
|
|
82
|
+
triggerOffsetY?: number;
|
|
79
83
|
hideBranding?: boolean;
|
|
80
84
|
privacyPolicyMode?: 'platform' | 'custom';
|
|
81
85
|
privacyPolicyUrl?: string;
|
|
@@ -94,6 +98,21 @@ export interface JexityChatOptions {
|
|
|
94
98
|
* Designed for dashboard test panels and in-app integrations.
|
|
95
99
|
*/
|
|
96
100
|
mode?: 'floating' | 'embedded';
|
|
101
|
+
/**
|
|
102
|
+
* Trigger mode for floating widgets.
|
|
103
|
+
* - unset (default): Jexity renders its own FAB.
|
|
104
|
+
* - `'none'`: headless — no Jexity FAB/teaser/proactive. The host owns the
|
|
105
|
+
* button and calls `open()`/`toggle()`; the core is not loaded until then.
|
|
106
|
+
*/
|
|
107
|
+
trigger?: 'none';
|
|
108
|
+
/**
|
|
109
|
+
* Where the open chat window anchors on screen — independent of the trigger.
|
|
110
|
+
* - `'bottom-right'` (default): the usual corner-anchored window.
|
|
111
|
+
* - `'middle-center'`: a centered, wider modal-style window (command-palette feel).
|
|
112
|
+
* Desktop only; mobile is always a fullscreen sheet. Set via `data-window-position`
|
|
113
|
+
* on the script tag or `windowPosition` on the React provider.
|
|
114
|
+
*/
|
|
115
|
+
windowPosition?: 'bottom-right' | 'middle-center';
|
|
97
116
|
/** Tags the session origin, e.g. "dashboard-test". Stored on `contactSessions`. */
|
|
98
117
|
source?: string;
|
|
99
118
|
/** Bootstrap token from /widget/bootstrap — required for origin-gated sessions. */
|
|
@@ -111,6 +130,18 @@ export interface JexityChatOptions {
|
|
|
111
130
|
* pre-fetched `bootstrapToken` so the widget enforces exclusions without a refetch.
|
|
112
131
|
*/
|
|
113
132
|
excludePaths?: string[];
|
|
133
|
+
/**
|
|
134
|
+
* Internal — set by loader.js. Skips WidgetShell's own /widget/config fetch
|
|
135
|
+
* by handing it the config the loader already fetched for the placeholder FAB.
|
|
136
|
+
* `null` means the loader's fetch settled with no config (still skip refetch).
|
|
137
|
+
*/
|
|
138
|
+
preloadedConfig?: import('./lib/widget-config').RemoteConfig | null;
|
|
139
|
+
/**
|
|
140
|
+
* Internal — set by loader.js when a proactive teaser/auto-open timer already
|
|
141
|
+
* elapsed in the loader before the core mounted. Skips WidgetShell's own
|
|
142
|
+
* proactiveDelaySeconds wait so the visitor doesn't see the delay twice.
|
|
143
|
+
*/
|
|
144
|
+
proactiveAlreadyElapsed?: boolean;
|
|
114
145
|
}
|
|
115
146
|
export interface JexityChatInstance {
|
|
116
147
|
open: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE;QACH,wCAAwC;QACxC,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iCAAiC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,qCAAqC;QACrC,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,oCAAoC;QACpC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,6BAA6B;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,6BAA6B;QAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,IAAI,CAAC,EAAE;QACL,iCAAiC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