@burdenoff/website-sdk 2026.1102.3 → 2026.1104.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/README.md +22 -6
- package/dist/avatar-live-view/index.d.mts +17 -2
- package/dist/avatar-live-view/index.d.ts +17 -2
- package/dist/avatar-live-view/index.js +64 -21
- package/dist/avatar-live-view/index.js.map +1 -1
- package/dist/avatar-live-view/index.mjs +64 -21
- package/dist/avatar-live-view/index.mjs.map +1 -1
- package/dist/{chunk-DZLUZKOX.js → chunk-22OT6E26.js} +44 -12
- package/dist/chunk-22OT6E26.js.map +1 -0
- package/dist/{chunk-ZWEEBHXJ.mjs → chunk-5JQGE3XI.mjs} +44 -12
- package/dist/chunk-5JQGE3XI.mjs.map +1 -0
- package/dist/components/explore.d.mts +1 -1
- package/dist/components/explore.d.ts +1 -1
- package/dist/components/explore.js +13 -13
- package/dist/components/explore.mjs +1 -1
- package/dist/{explore-DtSPdlEy.d.ts → explore-BV4dRwoC.d.ts} +7 -0
- package/dist/{explore-DaSNdm4O.d.mts → explore-BgEeGPvY.d.mts} +7 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +49 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DZLUZKOX.js.map +0 -1
- package/dist/chunk-ZWEEBHXJ.mjs.map +0 -1
|
@@ -3113,23 +3113,29 @@ var ANSWER_ACTION_ACTIVE = "border-primary/40 bg-accent text-primary";
|
|
|
3113
3113
|
function ReadAloudButton({
|
|
3114
3114
|
strings: T,
|
|
3115
3115
|
text,
|
|
3116
|
-
lang
|
|
3116
|
+
lang,
|
|
3117
|
+
hold
|
|
3117
3118
|
}) {
|
|
3118
3119
|
const speech = useSpeechOutput({ lang });
|
|
3119
3120
|
if (!speech.supported) return null;
|
|
3120
3121
|
const label = speech.speaking ? T.stopReading : T.readAloud;
|
|
3122
|
+
const held = hold !== null && !speech.speaking;
|
|
3121
3123
|
return /* @__PURE__ */ jsxs(
|
|
3122
3124
|
"button",
|
|
3123
3125
|
{
|
|
3124
3126
|
"data-boff-explore": "read-aloud",
|
|
3125
3127
|
"data-speaking": speech.speaking ? "true" : "false",
|
|
3126
3128
|
type: "button",
|
|
3127
|
-
title: label,
|
|
3129
|
+
title: held ? hold : label,
|
|
3128
3130
|
"aria-pressed": speech.speaking,
|
|
3129
|
-
|
|
3131
|
+
"aria-disabled": held ? "true" : void 0,
|
|
3132
|
+
onClick: () => {
|
|
3133
|
+
if (!held) speech.toggle(text);
|
|
3134
|
+
},
|
|
3130
3135
|
className: cn(
|
|
3131
3136
|
ANSWER_ACTION_PILL,
|
|
3132
|
-
speech.speaking ? ANSWER_ACTION_ACTIVE : ANSWER_ACTION_IDLE
|
|
3137
|
+
speech.speaking ? ANSWER_ACTION_ACTIVE : ANSWER_ACTION_IDLE,
|
|
3138
|
+
held && "cursor-not-allowed opacity-50"
|
|
3133
3139
|
),
|
|
3134
3140
|
children: [
|
|
3135
3141
|
/* @__PURE__ */ jsx(Volume2, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }),
|
|
@@ -3142,7 +3148,8 @@ function AnswerActions({
|
|
|
3142
3148
|
strings: T,
|
|
3143
3149
|
text,
|
|
3144
3150
|
speechText,
|
|
3145
|
-
speechLang
|
|
3151
|
+
speechLang,
|
|
3152
|
+
voiceHold
|
|
3146
3153
|
}) {
|
|
3147
3154
|
const [outcome, setOutcome] = useState("idle");
|
|
3148
3155
|
const resetRef = useRef(null);
|
|
@@ -3194,7 +3201,15 @@ function AnswerActions({
|
|
|
3194
3201
|
]
|
|
3195
3202
|
}
|
|
3196
3203
|
),
|
|
3197
|
-
/* @__PURE__ */ jsx(
|
|
3204
|
+
/* @__PURE__ */ jsx(
|
|
3205
|
+
ReadAloudButton,
|
|
3206
|
+
{
|
|
3207
|
+
strings: T,
|
|
3208
|
+
text: speechText,
|
|
3209
|
+
lang: speechLang,
|
|
3210
|
+
hold: voiceHold
|
|
3211
|
+
}
|
|
3212
|
+
),
|
|
3198
3213
|
/* @__PURE__ */ jsx("span", { "data-boff-explore": "copy-status", role: "status", className: "sr-only", children: outcome === "idle" ? "" : label })
|
|
3199
3214
|
]
|
|
3200
3215
|
}
|
|
@@ -3248,6 +3263,7 @@ function AssistantBubble({
|
|
|
3248
3263
|
productSlugs,
|
|
3249
3264
|
productNames,
|
|
3250
3265
|
speechLang,
|
|
3266
|
+
voiceHold,
|
|
3251
3267
|
onNavigate,
|
|
3252
3268
|
anchorRef,
|
|
3253
3269
|
onFollow,
|
|
@@ -3414,7 +3430,8 @@ function AssistantBubble({
|
|
|
3414
3430
|
strings: T,
|
|
3415
3431
|
text: copyText,
|
|
3416
3432
|
speechText,
|
|
3417
|
-
speechLang
|
|
3433
|
+
speechLang,
|
|
3434
|
+
voiceHold
|
|
3418
3435
|
}
|
|
3419
3436
|
) : null,
|
|
3420
3437
|
completed && onFeedback ? /* @__PURE__ */ jsx(
|
|
@@ -4034,6 +4051,7 @@ function ExploreView({
|
|
|
4034
4051
|
locale,
|
|
4035
4052
|
presentation = "page",
|
|
4036
4053
|
active = true,
|
|
4054
|
+
voiceHold = null,
|
|
4037
4055
|
explorePath = "/explore",
|
|
4038
4056
|
examplePrompts,
|
|
4039
4057
|
scope,
|
|
@@ -4112,6 +4130,12 @@ function ExploreView({
|
|
|
4112
4130
|
stopDictation();
|
|
4113
4131
|
stopSpeaking();
|
|
4114
4132
|
}, [active, stopDictation]);
|
|
4133
|
+
const voiceHeld = voiceHold !== null;
|
|
4134
|
+
useEffect(() => {
|
|
4135
|
+
if (!voiceHeld) return;
|
|
4136
|
+
stopDictation();
|
|
4137
|
+
stopSpeaking();
|
|
4138
|
+
}, [voiceHeld, stopDictation]);
|
|
4115
4139
|
const [disclaimerOpen, setDisclaimerOpen] = useState(false);
|
|
4116
4140
|
const [attachmentNotice, setAttachmentNotice] = useState(null);
|
|
4117
4141
|
const fileInputRef = useRef(null);
|
|
@@ -4791,6 +4815,7 @@ function ExploreView({
|
|
|
4791
4815
|
productSlugs,
|
|
4792
4816
|
productNames,
|
|
4793
4817
|
speechLang,
|
|
4818
|
+
voiceHold,
|
|
4794
4819
|
onNavigate,
|
|
4795
4820
|
anchorRef: message.id === latestAssistantId ? latestAssistantRef : void 0,
|
|
4796
4821
|
onFollow: (kind, url) => recordClick(message.id, kind, url),
|
|
@@ -5001,9 +5026,16 @@ function ExploreView({
|
|
|
5001
5026
|
disabled: composerDisabled,
|
|
5002
5027
|
"aria-label": speech.listening ? T.stopDictating : T.dictate,
|
|
5003
5028
|
"aria-pressed": speech.listening,
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5029
|
+
"aria-disabled": voiceHeld && !speech.listening ? "true" : void 0,
|
|
5030
|
+
title: speech.listening ? T.stopDictating : voiceHold ?? T.dictate,
|
|
5031
|
+
onClick: () => {
|
|
5032
|
+
if (voiceHeld && !speech.listening) return;
|
|
5033
|
+
speech.toggle();
|
|
5034
|
+
},
|
|
5035
|
+
className: cn(
|
|
5036
|
+
speech.listening && "animate-pulse",
|
|
5037
|
+
voiceHeld && !speech.listening && "cursor-not-allowed opacity-50"
|
|
5038
|
+
),
|
|
5007
5039
|
children: /* @__PURE__ */ jsx(Mic, { className: "h-4 w-4" })
|
|
5008
5040
|
}
|
|
5009
5041
|
) : null,
|
|
@@ -5125,5 +5157,5 @@ function ExploreView({
|
|
|
5125
5157
|
}
|
|
5126
5158
|
|
|
5127
5159
|
export { EXPLORE_LOCALES, EXPLORE_PREFILL_MAX_LENGTH, ExploreAnswerBody, ExploreAnswerStyles, ExploreCatalogProductsContext, ExploreChatProvider, ExploreConversationContext, ExploreConversationStartContext, ExplorePage, anotherProductMatcher, answerPlainText, answerSpeechText, exploreQuestionHref, exploreStrings, inlineImageOrigins, isDevelopmentBuild, isInlineImageAllowed, isInlineVideoAllowed, isRtlLocale, logoUrlOf, pinnedProductSlug, productNameFor, productNamesByOrigin, productScopedPrompts, productSlugsByOrigin, referenceKindOf, resolveExploreLocale, speechLocaleOf, summariseReferences, useExploreConversation };
|
|
5128
|
-
//# sourceMappingURL=chunk-
|
|
5129
|
-
//# sourceMappingURL=chunk-
|
|
5160
|
+
//# sourceMappingURL=chunk-5JQGE3XI.mjs.map
|
|
5161
|
+
//# sourceMappingURL=chunk-5JQGE3XI.mjs.map
|