@burdenoff/website-sdk 2026.1024.1 → 2026.1026.1
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/components/explore-cta.d.mts +10 -1
- package/dist/components/explore-cta.d.ts +10 -1
- package/dist/components/explore-cta.js +82 -74
- package/dist/components/explore-cta.js.map +1 -1
- package/dist/components/explore-cta.mjs +83 -75
- package/dist/components/explore-cta.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 +590 -463
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +591 -464
- package/dist/components/explore.mjs.map +1 -1
- package/dist/{explore-POqE7J8r.d.mts → explore-BRfKFfvI.d.mts} +21 -2
- package/dist/{explore-D6kon7uz.d.ts → explore-DkfcKgp6.d.ts} +21 -2
- package/dist/{explore-types-BB8HNFzX.d.mts → explore-types-_9UJu6EA.d.mts} +1 -1
- package/dist/{explore-types-BB8HNFzX.d.ts → explore-types-_9UJu6EA.d.ts} +1 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +15 -9
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +15 -9
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +123 -7
- package/dist/index.d.ts +123 -7
- package/dist/index.js +922 -117
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +922 -120
- package/dist/index.mjs.map +1 -1
- package/dist/{use-progressive-reveal-Kr6DwGXG.d.mts → use-progressive-reveal-BFPWbEXy.d.mts} +25 -2
- package/dist/{use-progressive-reveal-BVJn9NIr.d.ts → use-progressive-reveal-C0hkdu_i.d.ts} +25 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { E as ExploreProduct, a as ExploreReference } from './explore-types-
|
|
2
|
+
import { E as ExploreProduct, a as ExploreReference } from './explore-types-_9UJu6EA.mjs';
|
|
3
3
|
import { Components } from 'react-markdown';
|
|
4
4
|
|
|
5
5
|
/** The words the player needs. `AnswerRendererStrings`, and so `ExploreStrings`, carry them. */
|
|
@@ -237,6 +237,21 @@ interface ExplorePageProps {
|
|
|
237
237
|
* falls back to English.
|
|
238
238
|
*/
|
|
239
239
|
locale?: string;
|
|
240
|
+
/**
|
|
241
|
+
* BOFF-9697. `page` (default) is the dedicated `/explore` route, exactly as before: it owns the document head
|
|
242
|
+
* (PageHead), the `<h1>`, the baked catalog and, in `viewport` mode, the page's scrolling. `panel` is the same
|
|
243
|
+
* conversation inside the site-wide assistant panel (`ExplorePanel`): it is a guest on whatever page is showing,
|
|
244
|
+
* so it writes nothing to the head, uses an `<h2>`, bakes nothing, fills its container and leaves the page's
|
|
245
|
+
* scrolling alone. Share links point at `/explore` (`explorePath`), not at the page the panel is on.
|
|
246
|
+
*/
|
|
247
|
+
presentation?: "page" | "panel";
|
|
248
|
+
/**
|
|
249
|
+
* BOFF-9697. Whether the view is showing (default `true`). The panel passes `false` while it is closed or on its
|
|
250
|
+
* Avatar tab: dictation and read-aloud stop then, and the conversation itself is untouched.
|
|
251
|
+
*/
|
|
252
|
+
active?: boolean;
|
|
253
|
+
/** BOFF-9697. The site's Explore route, for share links made from the panel. Default `/explore`. */
|
|
254
|
+
explorePath?: string;
|
|
240
255
|
}
|
|
241
256
|
/**
|
|
242
257
|
* The product's own logo, derived from the reference's origin.
|
|
@@ -304,6 +319,10 @@ declare const EXPLORE_PREFILL_MAX_LENGTH = 500;
|
|
|
304
319
|
* `base` is the explore page's path or absolute URL.
|
|
305
320
|
*/
|
|
306
321
|
declare function exploreQuestionHref(question: string, base?: string): string;
|
|
307
|
-
|
|
322
|
+
/**
|
|
323
|
+
* The Explore page. Under an `ExploreChatProvider` it shows the provider's conversation (one for the whole site, shared
|
|
324
|
+
* with `ExplorePanel`); otherwise it sets up its own, exactly as it always has (BOFF-9697).
|
|
325
|
+
*/
|
|
326
|
+
declare function ExplorePage(props: ExplorePageProps): react.JSX.Element;
|
|
308
327
|
|
|
309
328
|
export { type AnswerRendererStrings as A, EXPLORE_PREFILL_MAX_LENGTH as E, ExploreAnswerBody as a, type ExploreAnswerBodyProps as b, ExploreAnswerStyles as c, ExplorePage as d, type ExplorePageProps as e, answerPlainText as f, answerSpeechText as g, exploreQuestionHref as h, inlineImageOrigins as i, isInlineImageAllowed as j, isInlineVideoAllowed as k, type ExploreProvenance as l, type ExploreReferenceKind as m, logoUrlOf as n, productNamesByOrigin as o, productSlugsByOrigin as p, referenceKindOf as r, summariseReferences as s };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { E as ExploreProduct, a as ExploreReference } from './explore-types-
|
|
2
|
+
import { E as ExploreProduct, a as ExploreReference } from './explore-types-_9UJu6EA.js';
|
|
3
3
|
import { Components } from 'react-markdown';
|
|
4
4
|
|
|
5
5
|
/** The words the player needs. `AnswerRendererStrings`, and so `ExploreStrings`, carry them. */
|
|
@@ -237,6 +237,21 @@ interface ExplorePageProps {
|
|
|
237
237
|
* falls back to English.
|
|
238
238
|
*/
|
|
239
239
|
locale?: string;
|
|
240
|
+
/**
|
|
241
|
+
* BOFF-9697. `page` (default) is the dedicated `/explore` route, exactly as before: it owns the document head
|
|
242
|
+
* (PageHead), the `<h1>`, the baked catalog and, in `viewport` mode, the page's scrolling. `panel` is the same
|
|
243
|
+
* conversation inside the site-wide assistant panel (`ExplorePanel`): it is a guest on whatever page is showing,
|
|
244
|
+
* so it writes nothing to the head, uses an `<h2>`, bakes nothing, fills its container and leaves the page's
|
|
245
|
+
* scrolling alone. Share links point at `/explore` (`explorePath`), not at the page the panel is on.
|
|
246
|
+
*/
|
|
247
|
+
presentation?: "page" | "panel";
|
|
248
|
+
/**
|
|
249
|
+
* BOFF-9697. Whether the view is showing (default `true`). The panel passes `false` while it is closed or on its
|
|
250
|
+
* Avatar tab: dictation and read-aloud stop then, and the conversation itself is untouched.
|
|
251
|
+
*/
|
|
252
|
+
active?: boolean;
|
|
253
|
+
/** BOFF-9697. The site's Explore route, for share links made from the panel. Default `/explore`. */
|
|
254
|
+
explorePath?: string;
|
|
240
255
|
}
|
|
241
256
|
/**
|
|
242
257
|
* The product's own logo, derived from the reference's origin.
|
|
@@ -304,6 +319,10 @@ declare const EXPLORE_PREFILL_MAX_LENGTH = 500;
|
|
|
304
319
|
* `base` is the explore page's path or absolute URL.
|
|
305
320
|
*/
|
|
306
321
|
declare function exploreQuestionHref(question: string, base?: string): string;
|
|
307
|
-
|
|
322
|
+
/**
|
|
323
|
+
* The Explore page. Under an `ExploreChatProvider` it shows the provider's conversation (one for the whole site, shared
|
|
324
|
+
* with `ExplorePanel`); otherwise it sets up its own, exactly as it always has (BOFF-9697).
|
|
325
|
+
*/
|
|
326
|
+
declare function ExplorePage(props: ExplorePageProps): react.JSX.Element;
|
|
308
327
|
|
|
309
328
|
export { type AnswerRendererStrings as A, EXPLORE_PREFILL_MAX_LENGTH as E, ExploreAnswerBody as a, type ExploreAnswerBodyProps as b, ExploreAnswerStyles as c, ExplorePage as d, type ExplorePageProps as e, answerPlainText as f, answerSpeechText as g, exploreQuestionHref as h, inlineImageOrigins as i, isInlineImageAllowed as j, isInlineVideoAllowed as k, type ExploreProvenance as l, type ExploreReferenceKind as m, logoUrlOf as n, productNamesByOrigin as o, productSlugsByOrigin as p, referenceKindOf as r, summariseReferences as s };
|
|
@@ -350,4 +350,4 @@ declare const EXPLORE_ESCALATION_NOTE_SOFT_MAX = 2000;
|
|
|
350
350
|
*/
|
|
351
351
|
declare function looksLikeDeliverableEmail(value: string): boolean;
|
|
352
352
|
|
|
353
|
-
export { looksLikeDeliverableEmail as A, type ExploreProduct as E, SEND_EXPLORE_MESSAGE_MUTATION as S, type ExploreReference as a, type
|
|
353
|
+
export { looksLikeDeliverableEmail as A, type ExploreProduct as E, SEND_EXPLORE_MESSAGE_MUTATION as S, type ExploreReference as a, type ExploreCatalog as b, type ExploreMessage as c, type ExploreFeedbackRating as d, type ExploreFeedbackReason as e, type ExploreLimits as f, ESCALATE_EXPLORE_CONVERSATION_MUTATION as g, EXPLORE_CATALOG_QUERY as h, EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS as i, EXPLORE_ESCALATION_NOTE_SOFT_MAX as j, EXPLORE_MESSAGE_QUERY as k, type EscalateExploreConversationInput as l, type EscalateExploreConversationResult as m, type ExploreCatalogQueryData as n, type ExploreConceptHighlight as o, type ExploreConversation as p, type ExploreCtaKind as q, type ExploreCtaLink as r, type ExploreErrorCode as s, type ExploreEscalation as t, type ExploreMessageQueryData as u, type ExploreMessageRole as v, type ExploreMessageStatus as w, type SendExploreMessageInput as x, type SendExploreMessageMutationData as y, type SendExploreMessageResult as z };
|
|
@@ -350,4 +350,4 @@ declare const EXPLORE_ESCALATION_NOTE_SOFT_MAX = 2000;
|
|
|
350
350
|
*/
|
|
351
351
|
declare function looksLikeDeliverableEmail(value: string): boolean;
|
|
352
352
|
|
|
353
|
-
export { looksLikeDeliverableEmail as A, type ExploreProduct as E, SEND_EXPLORE_MESSAGE_MUTATION as S, type ExploreReference as a, type
|
|
353
|
+
export { looksLikeDeliverableEmail as A, type ExploreProduct as E, SEND_EXPLORE_MESSAGE_MUTATION as S, type ExploreReference as a, type ExploreCatalog as b, type ExploreMessage as c, type ExploreFeedbackRating as d, type ExploreFeedbackReason as e, type ExploreLimits as f, ESCALATE_EXPLORE_CONVERSATION_MUTATION as g, EXPLORE_CATALOG_QUERY as h, EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS as i, EXPLORE_ESCALATION_NOTE_SOFT_MAX as j, EXPLORE_MESSAGE_QUERY as k, type EscalateExploreConversationInput as l, type EscalateExploreConversationResult as m, type ExploreCatalogQueryData as n, type ExploreConceptHighlight as o, type ExploreConversation as p, type ExploreCtaKind as q, type ExploreCtaLink as r, type ExploreErrorCode as s, type ExploreEscalation as t, type ExploreMessageQueryData as u, type ExploreMessageRole as v, type ExploreMessageStatus as w, type SendExploreMessageInput as x, type SendExploreMessageMutationData as y, type SendExploreMessageResult as z };
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, e as UseExploreChatResult, f as UseSpeechOutputOptions, g as UseSpeechOutputResult, h as classifyExploreError, s as stopSpeaking, u as useExploreChat, i as useProgressiveReveal, j as useSpeechOutput } from '../use-progressive-reveal-
|
|
2
|
-
import '../explore-types-
|
|
1
|
+
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, e as UseExploreChatResult, f as UseSpeechOutputOptions, g as UseSpeechOutputResult, h as classifyExploreError, s as stopSpeaking, u as useExploreChat, i as useProgressiveReveal, j as useSpeechOutput } from '../use-progressive-reveal-BFPWbEXy.mjs';
|
|
2
|
+
import '../explore-types-_9UJu6EA.mjs';
|
|
3
3
|
|
|
4
4
|
interface UseSpeechInputOptions {
|
|
5
5
|
/** Receives settled text as it is recognised. Append it to the draft. */
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, e as UseExploreChatResult, f as UseSpeechOutputOptions, g as UseSpeechOutputResult, h as classifyExploreError, s as stopSpeaking, u as useExploreChat, i as useProgressiveReveal, j as useSpeechOutput } from '../use-progressive-reveal-
|
|
2
|
-
import '../explore-types-
|
|
1
|
+
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, e as UseExploreChatResult, f as UseSpeechOutputOptions, g as UseSpeechOutputResult, h as classifyExploreError, s as stopSpeaking, u as useExploreChat, i as useProgressiveReveal, j as useSpeechOutput } from '../use-progressive-reveal-C0hkdu_i.js';
|
|
2
|
+
import '../explore-types-_9UJu6EA.js';
|
|
3
3
|
|
|
4
4
|
interface UseSpeechInputOptions {
|
|
5
5
|
/** Receives settled text as it is recognised. Append it to the draft. */
|
package/dist/hooks/index.js
CHANGED
|
@@ -1019,7 +1019,9 @@ function useExploreChat(options = {}) {
|
|
|
1019
1019
|
pollTimeoutMs = DEFAULT_POLL_TIMEOUT_MS,
|
|
1020
1020
|
storageKey = DEFAULT_STORAGE_KEY,
|
|
1021
1021
|
persist = true,
|
|
1022
|
-
onSend
|
|
1022
|
+
onSend,
|
|
1023
|
+
enabled = true,
|
|
1024
|
+
shareToken: shareTokenOption
|
|
1023
1025
|
} = options;
|
|
1024
1026
|
const client = useWebSDK();
|
|
1025
1027
|
const { productId } = useWebSDKConfig();
|
|
@@ -1057,7 +1059,7 @@ function useExploreChat(options = {}) {
|
|
|
1057
1059
|
const [hasConversation, setHasConversation] = react.useState(false);
|
|
1058
1060
|
const shareTokenRef = react.useRef(void 0);
|
|
1059
1061
|
if (shareTokenRef.current === void 0) {
|
|
1060
|
-
shareTokenRef.current = readShareToken();
|
|
1062
|
+
shareTokenRef.current = shareTokenOption === void 0 ? readShareToken() : shareTokenOption;
|
|
1061
1063
|
}
|
|
1062
1064
|
const isSharedView = shareTokenRef.current !== null;
|
|
1063
1065
|
const catalogRef = react.useRef(catalog);
|
|
@@ -1095,6 +1097,7 @@ function useExploreChat(options = {}) {
|
|
|
1095
1097
|
};
|
|
1096
1098
|
}, []);
|
|
1097
1099
|
react.useEffect(() => {
|
|
1100
|
+
if (!enabled) return;
|
|
1098
1101
|
const shareToken = shareTokenRef.current;
|
|
1099
1102
|
if (!shareToken) return;
|
|
1100
1103
|
let cancelled = false;
|
|
@@ -1129,8 +1132,9 @@ function useExploreChat(options = {}) {
|
|
|
1129
1132
|
return () => {
|
|
1130
1133
|
cancelled = true;
|
|
1131
1134
|
};
|
|
1132
|
-
}, [client]);
|
|
1135
|
+
}, [client, enabled]);
|
|
1133
1136
|
react.useEffect(() => {
|
|
1137
|
+
if (!enabled) return;
|
|
1134
1138
|
if (shareTokenRef.current !== null) return;
|
|
1135
1139
|
if (!persist) {
|
|
1136
1140
|
setHydrated(true);
|
|
@@ -1155,9 +1159,10 @@ function useExploreChat(options = {}) {
|
|
|
1155
1159
|
setTurnCount(turns);
|
|
1156
1160
|
}
|
|
1157
1161
|
setHydrated(true);
|
|
1158
|
-
}, [persist, rememberConversationToken, storageKey]);
|
|
1162
|
+
}, [persist, rememberConversationToken, storageKey, enabled]);
|
|
1159
1163
|
react.useEffect(() => {
|
|
1160
|
-
if (!persist || !hydrated || typeof window === "undefined")
|
|
1164
|
+
if (!persist || !hydrated || isSharedView || typeof window === "undefined")
|
|
1165
|
+
return;
|
|
1161
1166
|
try {
|
|
1162
1167
|
const payload = {
|
|
1163
1168
|
conversationToken: conversationTokenRef.current,
|
|
@@ -1171,10 +1176,10 @@ function useExploreChat(options = {}) {
|
|
|
1171
1176
|
window.localStorage.setItem(storageKey, JSON.stringify(payload));
|
|
1172
1177
|
} catch {
|
|
1173
1178
|
}
|
|
1174
|
-
}, [persist, hydrated, storageKey, messages, focusProduct]);
|
|
1179
|
+
}, [persist, hydrated, isSharedView, storageKey, messages, focusProduct]);
|
|
1175
1180
|
react.useEffect(() => {
|
|
1176
1181
|
messagesRef.current = messages;
|
|
1177
|
-
if (!persist || !hydrated) return;
|
|
1182
|
+
if (!persist || !hydrated || isSharedView) return;
|
|
1178
1183
|
const settled = messages.some(
|
|
1179
1184
|
(m) => m.role === "ASSISTANT" && (m.status === "COMPLETED" || m.status === "FAILED")
|
|
1180
1185
|
);
|
|
@@ -1186,8 +1191,9 @@ function useExploreChat(options = {}) {
|
|
|
1186
1191
|
focusProduct: focusProductRef.current
|
|
1187
1192
|
})
|
|
1188
1193
|
);
|
|
1189
|
-
}, [messages, persist, hydrated, storageKey]);
|
|
1194
|
+
}, [messages, persist, hydrated, isSharedView, storageKey]);
|
|
1190
1195
|
react.useEffect(() => {
|
|
1196
|
+
if (!enabled) return;
|
|
1191
1197
|
let cancelled = false;
|
|
1192
1198
|
const load = async () => {
|
|
1193
1199
|
const variables = { productSlug: productSlug ?? null };
|
|
@@ -1228,7 +1234,7 @@ function useExploreChat(options = {}) {
|
|
|
1228
1234
|
return () => {
|
|
1229
1235
|
cancelled = true;
|
|
1230
1236
|
};
|
|
1231
|
-
}, [client, productSlug, fallbackCatalog, bakedRaw]);
|
|
1237
|
+
}, [client, productSlug, fallbackCatalog, bakedRaw, enabled]);
|
|
1232
1238
|
const startPolling = react.useCallback(
|
|
1233
1239
|
(conversationToken, messageId) => {
|
|
1234
1240
|
pollGenerationRef.current += 1;
|