@evelan/jexity-widget 0.11.0 → 0.11.7
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 +2391 -2095
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +2343 -2047
- package/dist/react.mjs.map +1 -1
- package/dist/types/features/chat/components/ChatScreen.d.ts.map +1 -1
- package/dist/types/features/chat/components/EscalationFormScreen.d.ts.map +1 -1
- package/dist/types/features/chat/components/FormMessage.d.ts.map +1 -1
- package/dist/types/features/chat/components/HumanHandoffAction.d.ts.map +1 -1
- package/dist/types/features/chat/{components → composer/components}/ChatInput.d.ts +1 -1
- package/dist/types/features/chat/composer/components/ChatInput.d.ts.map +1 -0
- package/dist/types/features/chat/composer/components/ComposerRow.d.ts +27 -0
- package/dist/types/features/chat/composer/components/ComposerRow.d.ts.map +1 -0
- package/dist/types/features/chat/composer/components/RateLimitNotice.d.ts +9 -0
- package/dist/types/features/chat/composer/components/RateLimitNotice.d.ts.map +1 -0
- package/dist/types/features/chat/composer/components/SessionErrorNotice.d.ts +11 -0
- package/dist/types/features/chat/composer/components/SessionErrorNotice.d.ts.map +1 -0
- package/dist/types/features/chat/composer/hooks/useComposerInput.d.ts +35 -0
- package/dist/types/features/chat/composer/hooks/useComposerInput.d.ts.map +1 -0
- package/dist/types/features/chat/composer/hooks/useRateLimitCountdown.d.ts +23 -0
- package/dist/types/features/chat/composer/hooks/useRateLimitCountdown.d.ts.map +1 -0
- package/dist/types/features/chat/composer/hooks/useSendMessage.d.ts +27 -0
- package/dist/types/features/chat/composer/hooks/useSendMessage.d.ts.map +1 -0
- package/dist/types/features/chat/composer/index.d.ts +16 -0
- package/dist/types/features/chat/composer/index.d.ts.map +1 -0
- package/dist/types/features/chat/composer/state/attachments.d.ts +26 -0
- package/dist/types/features/chat/composer/state/attachments.d.ts.map +1 -0
- package/dist/types/features/chat/{composer.state.d.ts → composer/state/draft.d.ts} +3 -8
- package/dist/types/features/chat/composer/state/draft.d.ts.map +1 -0
- package/dist/types/features/chat/composer/state/index.d.ts +17 -0
- package/dist/types/features/chat/composer/state/index.d.ts.map +1 -0
- package/dist/types/features/chat/composer/state/rate-limit.d.ts +10 -0
- package/dist/types/features/chat/composer/state/rate-limit.d.ts.map +1 -0
- package/dist/types/features/chat/hooks/useConversation.d.ts +27 -0
- package/dist/types/features/chat/hooks/useConversation.d.ts.map +1 -0
- package/dist/types/features/chat/hooks/useConvexSession.d.ts +1 -0
- package/dist/types/features/chat/hooks/useConvexSession.d.ts.map +1 -1
- package/dist/types/features/chat/hooks/useEscalation.d.ts +25 -0
- package/dist/types/features/chat/hooks/useEscalation.d.ts.map +1 -0
- package/dist/types/features/chat/hooks/useHandoff.d.ts +23 -0
- package/dist/types/features/chat/hooks/useHandoff.d.ts.map +1 -0
- package/dist/types/features/chat/index.d.ts +18 -0
- package/dist/types/features/chat/index.d.ts.map +1 -0
- package/dist/types/features/chat/state/index.d.ts +13 -0
- package/dist/types/features/chat/state/index.d.ts.map +1 -0
- package/dist/types/features/chat/state/session-error.d.ts +16 -0
- package/dist/types/features/chat/state/session-error.d.ts.map +1 -0
- package/dist/types/features/chat/types.d.ts +19 -0
- package/dist/types/features/chat/types.d.ts.map +1 -0
- package/dist/types/features/home/components/HomeScreen.d.ts.map +1 -1
- package/dist/types/i18n/locales/de.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts +9 -0
- package/dist/types/i18n/locales/en.d.ts.map +1 -1
- package/dist/types/lib/refreshBootstrap.d.ts +10 -0
- package/dist/types/lib/refreshBootstrap.d.ts.map +1 -0
- package/dist/types/module/screens/ScreenRouter.d.ts +1 -1
- package/dist/types/module/screens/ScreenRouter.d.ts.map +1 -1
- package/dist/types/module/shell/WidgetShell.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts +3 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts.map +1 -1
- package/dist/types/module/shell/shell.state.d.ts +10 -0
- package/dist/types/module/shell/shell.state.d.ts.map +1 -1
- package/dist/types/module/visitor/idle-lock.d.ts +27 -0
- package/dist/types/module/visitor/idle-lock.d.ts.map +1 -0
- package/dist/types/module/visitor/visitor.state.d.ts +2 -0
- package/dist/types/module/visitor/visitor.state.d.ts.map +1 -1
- package/dist/types/shared/ui/Header.d.ts +8 -2
- package/dist/types/shared/ui/Header.d.ts.map +1 -1
- package/dist/types/shared/ui/HeaderActions.d.ts +11 -0
- package/dist/types/shared/ui/HeaderActions.d.ts.map +1 -0
- package/dist/types/shared/ui/HeaderCloseButton.d.ts +10 -0
- package/dist/types/shared/ui/HeaderCloseButton.d.ts.map +1 -0
- package/dist/types/shared/ui/HeaderLeft.d.ts +9 -0
- package/dist/types/shared/ui/HeaderLeft.d.ts.map +1 -0
- package/dist/types/shared/ui/HeaderTitle.d.ts +7 -0
- package/dist/types/shared/ui/HeaderTitle.d.ts.map +1 -0
- package/dist/widget.js +39 -39
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/features/chat/components/ChatInput.d.ts.map +0 -1
- package/dist/types/features/chat/components/RateLimitNotice.d.ts +0 -9
- package/dist/types/features/chat/components/RateLimitNotice.d.ts.map +0 -1
- package/dist/types/features/chat/composer.state.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetShell.d.ts","sourceRoot":"","sources":["../../../../src/module/shell/WidgetShell.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,UAAU,gBAAgB;IACxB,OAAO,EAAE,iBAAiB,CAAA;CAC3B;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"WidgetShell.d.ts","sourceRoot":"","sources":["../../../../src/module/shell/WidgetShell.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,UAAU,gBAAgB;IACxB,OAAO,EAAE,iBAAiB,CAAA;CAC3B;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,gCAiKxD"}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* populate the token signal so useConvexSession can create sessions.
|
|
5
5
|
*
|
|
6
6
|
* The IIFE entry bootstraps *before* mount and passes the token in via
|
|
7
|
-
* options.bootstrapToken — in that case preToken is set, this hook no-ops
|
|
7
|
+
* options.bootstrapToken — in that case preToken is set, this hook no-ops
|
|
8
|
+
* the initial fetch but still records the inputs so refreshBootstrapToken()
|
|
9
|
+
* can re-POST when the 1-hour token TTL elapses mid-session.
|
|
8
10
|
*/
|
|
9
11
|
export declare function useBootstrap(orgSlug: string, projSlug: string | undefined, preToken: string | undefined, runtimeConvexUrl: string | undefined): void;
|
|
10
12
|
//# sourceMappingURL=useBootstrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/useBootstrap.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"useBootstrap.d.ts","sourceRoot":"","sources":["../../../../../src/module/shell/hooks/useBootstrap.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,IAAI,CAsCN"}
|
|
@@ -16,4 +16,14 @@ export declare const isOpen: import("@preact/signals").Signal<boolean>;
|
|
|
16
16
|
export declare const widgetSource: import("@preact/signals").Signal<string | undefined>;
|
|
17
17
|
/** Bootstrap token issued by POST /widget/bootstrap. Read by useConvexSession. */
|
|
18
18
|
export declare const bootstrapToken: import("@preact/signals").Signal<Id<"widgetBootstrapTokens"> | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Inputs needed to re-POST /widget/bootstrap when the current token expires
|
|
21
|
+
* mid-session. Populated by useBootstrap on mount (both IIFE preToken path
|
|
22
|
+
* and ESM async-fetch path). Consumed by refreshBootstrapToken().
|
|
23
|
+
*/
|
|
24
|
+
export declare const bootstrapInputs: import("@preact/signals").Signal<{
|
|
25
|
+
orgSlug: string;
|
|
26
|
+
projSlug: string | undefined;
|
|
27
|
+
siteUrl: string;
|
|
28
|
+
} | null>;
|
|
19
29
|
//# sourceMappingURL=shell.state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.state.d.ts","sourceRoot":"","sources":["../../../../src/module/shell/shell.state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2CAA2C,CAAA;AAEnE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,2CAAgB,CAAA;AAEnC,wEAAwE;AACxE,eAAO,MAAM,YAAY,sDAAwC,CAAA;AAEjE,kFAAkF;AAClF,eAAO,MAAM,cAAc,2EAA6D,CAAA"}
|
|
1
|
+
{"version":3,"file":"shell.state.d.ts","sourceRoot":"","sources":["../../../../src/module/shell/shell.state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2CAA2C,CAAA;AAEnE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,2CAAgB,CAAA;AAEnC,wEAAwE;AACxE,eAAO,MAAM,YAAY,sDAAwC,CAAA;AAEjE,kFAAkF;AAClF,eAAO,MAAM,cAAc,2EAA6D,CAAA;AAExF;;;;GAIG;AACH,eAAO,MAAM,eAAe;aACjB,MAAM;cACL,MAAM,GAAG,SAAS;aACnB,MAAM;SACF,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** True while the widget is showing the privacy-lock notice. */
|
|
2
|
+
export declare const isLocked: import("@preact/signals").Signal<boolean>;
|
|
3
|
+
/**
|
|
4
|
+
* True while a session-creating mutation is in flight. The idle poll skips
|
|
5
|
+
* a tick when this is set, so a wipe can't race an awaited createOrResume.
|
|
6
|
+
*/
|
|
7
|
+
export declare const isSessionBusy: import("@preact/signals").Signal<boolean>;
|
|
8
|
+
/** Per-hook callbacks run when the lock fires — clears caches like resolvedRef. */
|
|
9
|
+
type ResetCallback = () => void;
|
|
10
|
+
/** Register a callback fired on lock. Returns a deregister fn for useEffect cleanup. */
|
|
11
|
+
export declare function registerLockResetCallback(fn: ResetCallback): () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Wipe in-memory + persisted session refs, drop back to Home, raise the
|
|
14
|
+
* lock flag, and notify hooks holding cached session references.
|
|
15
|
+
* Idempotent — safe to call from both triggers.
|
|
16
|
+
*/
|
|
17
|
+
export declare function lockSession(): void;
|
|
18
|
+
/** Called by HomeScreen actions — visitor explicitly engaged again. */
|
|
19
|
+
export declare function unlockSession(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Start the watcher. Returns a teardown function for useEffect cleanup.
|
|
22
|
+
* All timer / visibility state lives in the returned closure so StrictMode
|
|
23
|
+
* double-invocation (or fast-refresh) cannot orphan a prior interval.
|
|
24
|
+
*/
|
|
25
|
+
export declare function startIdleLockWatcher(threshold?: number): () => void;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=idle-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idle-lock.d.ts","sourceRoot":"","sources":["../../../../src/module/visitor/idle-lock.ts"],"names":[],"mappings":"AAyCA,gEAAgE;AAChE,eAAO,MAAM,QAAQ,2CAAgB,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,aAAa,2CAAgB,CAAA;AAE1C,mFAAmF;AACnF,KAAK,aAAa,GAAG,MAAM,IAAI,CAAA;AAG/B,wFAAwF;AACxF,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM,IAAI,CAKvE;AAeD;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAoBlC;AAED,uEAAuE;AACvE,wBAAgB,aAAa,IAAI,IAAI,CAGpC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,GAAE,MAA+B,GAAG,MAAM,IAAI,CA2B3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitor.state.d.ts","sourceRoot":"","sources":["../../../../src/module/visitor/visitor.state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"visitor.state.d.ts","sourceRoot":"","sources":["../../../../src/module/visitor/visitor.state.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,eAAO,MAAM,2BAA2B,wBAAwB,CAAA;AAEhE,eAAO,MAAM,sBAAsB,QAAiB,CAAA;AAEpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAID,eAAO,MAAM,cAAc,yDAAoC,CAAA;AAC/D,eAAO,MAAM,iBAAiB,iDAA8B,CAAA;AAG5D,eAAO,MAAM,aAAa,mDAAkD,CAAA;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,6DAA0C,CAAA;AA2BtE,iEAAiE;AACjE,wBAAgB,WAAW,IAAI,IAAI,CASlC;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,IAAI,MAAM,CAQxC;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"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { ComponentChildren } from 'preact';
|
|
2
2
|
interface HeaderProps {
|
|
3
3
|
title: string;
|
|
4
|
+
/** Slot for the action button (e.g. HumanHandoffAction). Sits left of close. */
|
|
4
5
|
rightAction?: ComponentChildren;
|
|
6
|
+
/** Hide the close button in embedded mode where the host owns visibility. */
|
|
7
|
+
showClose?: boolean;
|
|
5
8
|
}
|
|
6
|
-
/**
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Chat window header bar — composed of three independently-debuggable
|
|
11
|
+
* subcomponents: left (back/avatar), title (text), and right actions.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Header({ title, rightAction, showClose }: HeaderProps): import("preact").JSX.Element;
|
|
8
14
|
export {};
|
|
9
15
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/shared/ui/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAK/C,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/shared/ui/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAK/C,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAgB,EAAE,EAAE,WAAW,gCAQ3E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
interface HeaderActionsProps {
|
|
3
|
+
/** Optional action slot (typically HumanHandoffAction) rendered before the close button. */
|
|
4
|
+
action?: ComponentChildren;
|
|
5
|
+
/** Whether to render the close button (skipped in embedded mode — host owns visibility). */
|
|
6
|
+
showClose?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Right-cluster of the chat header: action slot + close button. */
|
|
9
|
+
export declare function HeaderActions({ action, showClose }: HeaderActionsProps): import("preact").JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=HeaderActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderActions.d.ts","sourceRoot":"","sources":["../../../../src/shared/ui/HeaderActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAG/C,UAAU,kBAAkB;IAC1B,4FAA4F;IAC5F,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAgB,EAAE,EAAE,kBAAkB,uCAQ7E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header close button — flips isOpen so the chat window unmounts.
|
|
3
|
+
*
|
|
4
|
+
* Always rendered in the header so the visitor has a close affordance even
|
|
5
|
+
* in mobile fullscreen mode where the FAB is hidden by the CSS :has() rule.
|
|
6
|
+
* Skipped in embedded mode where the host page owns visibility (rendered
|
|
7
|
+
* conditionally by the Header parent).
|
|
8
|
+
*/
|
|
9
|
+
export declare function HeaderCloseButton(): import("preact").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=HeaderCloseButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderCloseButton.d.ts","sourceRoot":"","sources":["../../../../src/shared/ui/HeaderCloseButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,iCAahC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Left slot of the chat header — either a chevron-back button when nested
|
|
3
|
+
* screens are on the stack, or the bot avatar at the root screen.
|
|
4
|
+
*
|
|
5
|
+
* Single-responsibility split so the back/avatar toggle can be debugged
|
|
6
|
+
* without touching title or right-side actions.
|
|
7
|
+
*/
|
|
8
|
+
export declare function HeaderLeft(): import("preact").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=HeaderLeft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderLeft.d.ts","sourceRoot":"","sources":["../../../../src/shared/ui/HeaderLeft.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,UAAU,iCAmBzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderTitle.d.ts","sourceRoot":"","sources":["../../../../src/shared/ui/HeaderTitle.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,gCAQtD"}
|