@burdenoff/website-sdk 2026.1102.2 → 2026.1102.3
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 +41 -2
- package/dist/avatar-live-view/index.d.mts +13 -4
- package/dist/avatar-live-view/index.d.ts +13 -4
- package/dist/avatar-live-view/index.js +1262 -257
- package/dist/avatar-live-view/index.js.map +1 -1
- package/dist/avatar-live-view/index.mjs +1260 -255
- package/dist/avatar-live-view/index.mjs.map +1 -1
- package/dist/{chunk-FQH3AJN3.js → chunk-7O2I32ZN.js} +2 -2
- package/dist/chunk-7O2I32ZN.js.map +1 -0
- package/dist/{chunk-R742FS5E.js → chunk-DZLUZKOX.js} +19 -17
- package/dist/{chunk-R742FS5E.js.map → chunk-DZLUZKOX.js.map} +1 -1
- package/dist/{chunk-SFT3WHN5.mjs → chunk-K3QZGJEH.mjs} +2 -2
- package/dist/chunk-K3QZGJEH.mjs.map +1 -0
- package/dist/{chunk-SK5UGG6A.js → chunk-P5GMVPR6.js} +76 -20
- package/dist/chunk-P5GMVPR6.js.map +1 -0
- package/dist/{chunk-EUPFS6MZ.mjs → chunk-SMD7MEEA.mjs} +76 -20
- package/dist/chunk-SMD7MEEA.mjs.map +1 -0
- package/dist/{chunk-ETI2HQEC.mjs → chunk-ZWEEBHXJ.mjs} +4 -4
- package/dist/{chunk-ETI2HQEC.mjs.map → chunk-ZWEEBHXJ.mjs.map} +1 -1
- package/dist/components/explore.d.mts +2 -2
- package/dist/components/explore.d.ts +2 -2
- package/dist/components/explore.js +14 -14
- package/dist/components/explore.mjs +2 -2
- package/dist/{explore-DUTNYUOm.d.mts → explore-DaSNdm4O.d.mts} +1 -1
- package/dist/{explore-DjQE7Xia.d.ts → explore-DtSPdlEy.d.ts} +1 -1
- package/dist/{explore-avatar-live-config-Cetx8-Zu.d.ts → explore-avatar-live-config-CAfN5eAX.d.ts} +6 -3
- package/dist/{explore-avatar-live-config-Bp3kQbU2.d.mts → explore-avatar-live-config-N4WhJzgS.d.mts} +6 -3
- package/dist/{explore-types-Bb2Ih3d8.d.mts → explore-types-Ol1Mm3dW.d.mts} +12 -1
- package/dist/{explore-types-Bb2Ih3d8.d.ts → explore-types-Ol1Mm3dW.d.ts} +12 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +9 -9
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.d.mts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +92 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -6
- package/dist/index.mjs.map +1 -1
- package/dist/{use-explore-chat-DunjG-3p.d.ts → use-explore-chat-B3dOOvJN.d.ts} +43 -3
- package/dist/{use-explore-chat-zRuoAin6.d.mts → use-explore-chat-CbfohA9O.d.mts} +43 -3
- package/package.json +1 -1
- package/dist/chunk-EUPFS6MZ.mjs.map +0 -1
- package/dist/chunk-FQH3AJN3.js.map +0 -1
- package/dist/chunk-SFT3WHN5.mjs.map +0 -1
- package/dist/chunk-SK5UGG6A.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ExploreCatalog, a as ExploreMessage, b as
|
|
1
|
+
import { E as ExploreCatalog, a as ExploreMessage, b as ExploreSurface, c as ExploreFeedbackRating, d as ExploreFeedbackReason, e as ExploreLimits } from './explore-types-Ol1Mm3dW.js';
|
|
2
2
|
|
|
3
3
|
/** What travels on the wire — mirrors `ExploreAttachmentInput`. */
|
|
4
4
|
interface ExploreAttachmentPayload {
|
|
@@ -122,6 +122,31 @@ interface UseExploreChatOptions {
|
|
|
122
122
|
*/
|
|
123
123
|
shareToken?: string | null;
|
|
124
124
|
}
|
|
125
|
+
/** How one question is sent: see {@link UseExploreChatResult.send}. */
|
|
126
|
+
interface ExploreSendOptions {
|
|
127
|
+
surface?: ExploreSurface;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The question one {@link UseExploreChatResult.send} added to the conversation: the id of its USER message (the
|
|
131
|
+
* server's once the server took it; the one shown while it was on its way when the server never did) and the
|
|
132
|
+
* conversation's token as the send ended (null when the server never named one).
|
|
133
|
+
*/
|
|
134
|
+
interface ExploreSent {
|
|
135
|
+
userMessageId: string;
|
|
136
|
+
conversationToken: string | null;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A question a {@link UseExploreChatResult.retry} sent again, in place of the one that failed: every id the question
|
|
140
|
+
* had before (`replacedMessageIds`, oldest first: the failed USER message the retry dropped, then, once the server
|
|
141
|
+
* took it, the one shown while it was on its way) and the question as it is now. Announced when the retry adds its
|
|
142
|
+
* question, and again once the server takes it (its own message, and the conversation's token as the server named
|
|
143
|
+
* it), each time in the same update as the messages it describes. Both name the failed message, so a reader that only
|
|
144
|
+
* sees the last one (React may render the two as one) still finds the question it knew.
|
|
145
|
+
*/
|
|
146
|
+
interface ExploreResent {
|
|
147
|
+
replacedMessageIds: readonly string[];
|
|
148
|
+
sent: ExploreSent;
|
|
149
|
+
}
|
|
125
150
|
interface UseExploreChatResult {
|
|
126
151
|
phase: ExploreChatPhase;
|
|
127
152
|
/** Never null — starts as the baked or static fallback catalog, upgraded by the server. */
|
|
@@ -140,11 +165,26 @@ interface UseExploreChatResult {
|
|
|
140
165
|
/** Product the visitor pinned the conversation to, or null for "all". */
|
|
141
166
|
focusProduct: string | null;
|
|
142
167
|
setFocusProduct: (slug: string | null) => void;
|
|
143
|
-
|
|
168
|
+
/**
|
|
169
|
+
* Ask `message`, with files as extra context. `options.surface` says where it was asked: only the live avatar's own
|
|
170
|
+
* question box passes `AVATAR` (BOFF-9797); the chat's composer passes nothing, and nothing is sent for it. A retry
|
|
171
|
+
* and the silent re-send after a stale captcha token keep the surface of the question they send again.
|
|
172
|
+
*
|
|
173
|
+
* Resolves, once the server has answered the send (or it failed), with the question it added, or null when it added
|
|
174
|
+
* none: an empty question, one asked while another is on its way, a disabled chat, a question over the length or
|
|
175
|
+
* turn limit, or the panel gone.
|
|
176
|
+
*/
|
|
177
|
+
send: (message: string, attachments?: readonly ExploreAttachmentPayload[], options?: ExploreSendOptions) => Promise<ExploreSent | null>;
|
|
144
178
|
/** Stop polling and keep whatever text has streamed so far. */
|
|
145
179
|
stop: () => void;
|
|
146
180
|
/** Re-send the last message after a failed turn. */
|
|
147
181
|
retry: () => void;
|
|
182
|
+
/**
|
|
183
|
+
* BOFF-9797. The last question a {@link retry} sent again in place of a failed one (see {@link ExploreResent}), or
|
|
184
|
+
* null when there was none since the conversation was last reset. The Avatar tab follows it, so a question asked
|
|
185
|
+
* there and retried from Chat is still the one asked there.
|
|
186
|
+
*/
|
|
187
|
+
resent: ExploreResent | null;
|
|
148
188
|
/** Clear the conversation and the persisted session. */
|
|
149
189
|
reset: () => void;
|
|
150
190
|
/** Past conversations held in THIS browser, newest first. */
|
|
@@ -243,4 +283,4 @@ interface ArchivedExploreConversation {
|
|
|
243
283
|
}
|
|
244
284
|
declare function useExploreChat(options?: UseExploreChatOptions): UseExploreChatResult;
|
|
245
285
|
|
|
246
|
-
export { DEFAULT_EXPLORE_EXAMPLE_PROMPTS as D, type ExploreChatError as E, FALLBACK_EXPLORE_LIMITS as F, type StagedAttachment as S, type UseExploreChatOptions as U, type ExploreChatErrorKind as a, type ExploreChatPhase as b, type ExploreEscalateOutcome as c, type ExploreEscalateResult as d, type
|
|
286
|
+
export { DEFAULT_EXPLORE_EXAMPLE_PROMPTS as D, type ExploreChatError as E, FALLBACK_EXPLORE_LIMITS as F, type StagedAttachment as S, type UseExploreChatOptions as U, type ExploreChatErrorKind as a, type ExploreChatPhase as b, type ExploreEscalateOutcome as c, type ExploreEscalateResult as d, type ExploreResent as e, type ExploreSendOptions as f, type ExploreSent as g, type UseExploreChatResult as h, classifyExploreError as i, useExploreChat as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ExploreCatalog, a as ExploreMessage, b as
|
|
1
|
+
import { E as ExploreCatalog, a as ExploreMessage, b as ExploreSurface, c as ExploreFeedbackRating, d as ExploreFeedbackReason, e as ExploreLimits } from './explore-types-Ol1Mm3dW.mjs';
|
|
2
2
|
|
|
3
3
|
/** What travels on the wire — mirrors `ExploreAttachmentInput`. */
|
|
4
4
|
interface ExploreAttachmentPayload {
|
|
@@ -122,6 +122,31 @@ interface UseExploreChatOptions {
|
|
|
122
122
|
*/
|
|
123
123
|
shareToken?: string | null;
|
|
124
124
|
}
|
|
125
|
+
/** How one question is sent: see {@link UseExploreChatResult.send}. */
|
|
126
|
+
interface ExploreSendOptions {
|
|
127
|
+
surface?: ExploreSurface;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The question one {@link UseExploreChatResult.send} added to the conversation: the id of its USER message (the
|
|
131
|
+
* server's once the server took it; the one shown while it was on its way when the server never did) and the
|
|
132
|
+
* conversation's token as the send ended (null when the server never named one).
|
|
133
|
+
*/
|
|
134
|
+
interface ExploreSent {
|
|
135
|
+
userMessageId: string;
|
|
136
|
+
conversationToken: string | null;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A question a {@link UseExploreChatResult.retry} sent again, in place of the one that failed: every id the question
|
|
140
|
+
* had before (`replacedMessageIds`, oldest first: the failed USER message the retry dropped, then, once the server
|
|
141
|
+
* took it, the one shown while it was on its way) and the question as it is now. Announced when the retry adds its
|
|
142
|
+
* question, and again once the server takes it (its own message, and the conversation's token as the server named
|
|
143
|
+
* it), each time in the same update as the messages it describes. Both name the failed message, so a reader that only
|
|
144
|
+
* sees the last one (React may render the two as one) still finds the question it knew.
|
|
145
|
+
*/
|
|
146
|
+
interface ExploreResent {
|
|
147
|
+
replacedMessageIds: readonly string[];
|
|
148
|
+
sent: ExploreSent;
|
|
149
|
+
}
|
|
125
150
|
interface UseExploreChatResult {
|
|
126
151
|
phase: ExploreChatPhase;
|
|
127
152
|
/** Never null — starts as the baked or static fallback catalog, upgraded by the server. */
|
|
@@ -140,11 +165,26 @@ interface UseExploreChatResult {
|
|
|
140
165
|
/** Product the visitor pinned the conversation to, or null for "all". */
|
|
141
166
|
focusProduct: string | null;
|
|
142
167
|
setFocusProduct: (slug: string | null) => void;
|
|
143
|
-
|
|
168
|
+
/**
|
|
169
|
+
* Ask `message`, with files as extra context. `options.surface` says where it was asked: only the live avatar's own
|
|
170
|
+
* question box passes `AVATAR` (BOFF-9797); the chat's composer passes nothing, and nothing is sent for it. A retry
|
|
171
|
+
* and the silent re-send after a stale captcha token keep the surface of the question they send again.
|
|
172
|
+
*
|
|
173
|
+
* Resolves, once the server has answered the send (or it failed), with the question it added, or null when it added
|
|
174
|
+
* none: an empty question, one asked while another is on its way, a disabled chat, a question over the length or
|
|
175
|
+
* turn limit, or the panel gone.
|
|
176
|
+
*/
|
|
177
|
+
send: (message: string, attachments?: readonly ExploreAttachmentPayload[], options?: ExploreSendOptions) => Promise<ExploreSent | null>;
|
|
144
178
|
/** Stop polling and keep whatever text has streamed so far. */
|
|
145
179
|
stop: () => void;
|
|
146
180
|
/** Re-send the last message after a failed turn. */
|
|
147
181
|
retry: () => void;
|
|
182
|
+
/**
|
|
183
|
+
* BOFF-9797. The last question a {@link retry} sent again in place of a failed one (see {@link ExploreResent}), or
|
|
184
|
+
* null when there was none since the conversation was last reset. The Avatar tab follows it, so a question asked
|
|
185
|
+
* there and retried from Chat is still the one asked there.
|
|
186
|
+
*/
|
|
187
|
+
resent: ExploreResent | null;
|
|
148
188
|
/** Clear the conversation and the persisted session. */
|
|
149
189
|
reset: () => void;
|
|
150
190
|
/** Past conversations held in THIS browser, newest first. */
|
|
@@ -243,4 +283,4 @@ interface ArchivedExploreConversation {
|
|
|
243
283
|
}
|
|
244
284
|
declare function useExploreChat(options?: UseExploreChatOptions): UseExploreChatResult;
|
|
245
285
|
|
|
246
|
-
export { DEFAULT_EXPLORE_EXAMPLE_PROMPTS as D, type ExploreChatError as E, FALLBACK_EXPLORE_LIMITS as F, type StagedAttachment as S, type UseExploreChatOptions as U, type ExploreChatErrorKind as a, type ExploreChatPhase as b, type ExploreEscalateOutcome as c, type ExploreEscalateResult as d, type
|
|
286
|
+
export { DEFAULT_EXPLORE_EXAMPLE_PROMPTS as D, type ExploreChatError as E, FALLBACK_EXPLORE_LIMITS as F, type StagedAttachment as S, type UseExploreChatOptions as U, type ExploreChatErrorKind as a, type ExploreChatPhase as b, type ExploreEscalateOutcome as c, type ExploreEscalateResult as d, type ExploreResent as e, type ExploreSendOptions as f, type ExploreSent as g, type UseExploreChatResult as h, classifyExploreError as i, useExploreChat as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/website-sdk",
|
|
3
|
-
"version": "2026.1102.
|
|
3
|
+
"version": "2026.1102.3",
|
|
4
4
|
"description": "Shared SDK for Burdenoff product websites - reusable React components, utilities, and configurations",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|