@burdenoff/website-sdk 2026.1102.2 → 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.
Files changed (48) hide show
  1. package/README.md +63 -8
  2. package/dist/avatar-live-view/index.d.mts +29 -5
  3. package/dist/avatar-live-view/index.d.ts +29 -5
  4. package/dist/avatar-live-view/index.js +1319 -271
  5. package/dist/avatar-live-view/index.js.map +1 -1
  6. package/dist/avatar-live-view/index.mjs +1317 -269
  7. package/dist/avatar-live-view/index.mjs.map +1 -1
  8. package/dist/{chunk-R742FS5E.js → chunk-22OT6E26.js} +61 -27
  9. package/dist/chunk-22OT6E26.js.map +1 -0
  10. package/dist/{chunk-ETI2HQEC.mjs → chunk-5JQGE3XI.mjs} +46 -14
  11. package/dist/chunk-5JQGE3XI.mjs.map +1 -0
  12. package/dist/{chunk-FQH3AJN3.js → chunk-7O2I32ZN.js} +2 -2
  13. package/dist/chunk-7O2I32ZN.js.map +1 -0
  14. package/dist/{chunk-SFT3WHN5.mjs → chunk-K3QZGJEH.mjs} +2 -2
  15. package/dist/chunk-K3QZGJEH.mjs.map +1 -0
  16. package/dist/{chunk-SK5UGG6A.js → chunk-P5GMVPR6.js} +76 -20
  17. package/dist/chunk-P5GMVPR6.js.map +1 -0
  18. package/dist/{chunk-EUPFS6MZ.mjs → chunk-SMD7MEEA.mjs} +76 -20
  19. package/dist/chunk-SMD7MEEA.mjs.map +1 -0
  20. package/dist/components/explore.d.mts +2 -2
  21. package/dist/components/explore.d.ts +2 -2
  22. package/dist/components/explore.js +14 -14
  23. package/dist/components/explore.mjs +2 -2
  24. package/dist/{explore-DUTNYUOm.d.mts → explore-BV4dRwoC.d.ts} +8 -1
  25. package/dist/{explore-DjQE7Xia.d.ts → explore-BgEeGPvY.d.mts} +8 -1
  26. package/dist/{explore-avatar-live-config-Cetx8-Zu.d.ts → explore-avatar-live-config-CAfN5eAX.d.ts} +6 -3
  27. package/dist/{explore-avatar-live-config-Bp3kQbU2.d.mts → explore-avatar-live-config-N4WhJzgS.d.mts} +6 -3
  28. package/dist/{explore-types-Bb2Ih3d8.d.mts → explore-types-Ol1Mm3dW.d.mts} +12 -1
  29. package/dist/{explore-types-Bb2Ih3d8.d.ts → explore-types-Ol1Mm3dW.d.ts} +12 -1
  30. package/dist/hooks/index.d.mts +2 -2
  31. package/dist/hooks/index.d.ts +2 -2
  32. package/dist/hooks/index.js +9 -9
  33. package/dist/hooks/index.mjs +1 -1
  34. package/dist/index.d.mts +14 -8
  35. package/dist/index.d.ts +14 -8
  36. package/dist/index.js +100 -63
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +43 -6
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/{use-explore-chat-DunjG-3p.d.ts → use-explore-chat-B3dOOvJN.d.ts} +43 -3
  41. package/dist/{use-explore-chat-zRuoAin6.d.mts → use-explore-chat-CbfohA9O.d.mts} +43 -3
  42. package/package.json +1 -1
  43. package/dist/chunk-ETI2HQEC.mjs.map +0 -1
  44. package/dist/chunk-EUPFS6MZ.mjs.map +0 -1
  45. package/dist/chunk-FQH3AJN3.js.map +0 -1
  46. package/dist/chunk-R742FS5E.js.map +0 -1
  47. package/dist/chunk-SFT3WHN5.mjs.map +0 -1
  48. package/dist/chunk-SK5UGG6A.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkO4GS3XPZ_js = require('./chunk-O4GS3XPZ.js');
4
- var chunkSK5UGG6A_js = require('./chunk-SK5UGG6A.js');
4
+ var chunkP5GMVPR6_js = require('./chunk-P5GMVPR6.js');
5
5
  var chunk3LFFY7AZ_js = require('./chunk-3LFFY7AZ.js');
6
6
  var chunkGEXC4LRP_js = require('./chunk-GEXC4LRP.js');
7
7
  var chunkR6J7IULF_js = require('./chunk-R6J7IULF.js');
@@ -1728,7 +1728,7 @@ function useExploreConversation(options = {}) {
1728
1728
  () => exploreStrings(resolveExploreLocale(locale)),
1729
1729
  [locale]
1730
1730
  );
1731
- const chat = chunkSK5UGG6A_js.useExploreChat({
1731
+ const chat = chunkP5GMVPR6_js.useExploreChat({
1732
1732
  productSlug,
1733
1733
  pageUrl: pageUrl ?? urlAtMount,
1734
1734
  onSend,
@@ -2803,7 +2803,7 @@ function AnswerFeedback({
2803
2803
  className: "boff-explore-fade mt-2 rounded-xl border border-border bg-card p-3",
2804
2804
  children: [
2805
2805
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs font-medium text-card-foreground", children: T.feedbackReasonTitle }),
2806
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: chunkSK5UGG6A_js.EXPLORE_FEEDBACK_REASONS.map((code, index) => /* @__PURE__ */ jsxRuntime.jsx(
2806
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: chunkP5GMVPR6_js.EXPLORE_FEEDBACK_REASONS.map((code, index) => /* @__PURE__ */ jsxRuntime.jsx(
2807
2807
  "button",
2808
2808
  {
2809
2809
  ref: index === 0 ? firstReasonRef : void 0,
@@ -2836,7 +2836,7 @@ function AnswerFeedback({
2836
2836
  },
2837
2837
  "aria-label": T.feedbackCommentPlaceholder,
2838
2838
  placeholder: T.feedbackCommentPlaceholder,
2839
- maxLength: chunkSK5UGG6A_js.EXPLORE_FEEDBACK_COMMENT_SOFT_MAX,
2839
+ maxLength: chunkP5GMVPR6_js.EXPLORE_FEEDBACK_COMMENT_SOFT_MAX,
2840
2840
  className: "min-w-0 flex-1 rounded-md border border-border bg-background px-2 py-1 text-base text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring sm:text-sm"
2841
2841
  }
2842
2842
  ),
@@ -2901,7 +2901,7 @@ function EscalateForm({
2901
2901
  event.preventDefault();
2902
2902
  if (inFlightRef.current) return;
2903
2903
  const address = email.trim();
2904
- if (!chunkSK5UGG6A_js.looksLikeDeliverableEmail(address)) {
2904
+ if (!chunkP5GMVPR6_js.looksLikeDeliverableEmail(address)) {
2905
2905
  setError(T.escalateInvalidEmail);
2906
2906
  emailRef.current?.focus();
2907
2907
  return;
@@ -3016,7 +3016,7 @@ function EscalateForm({
3016
3016
  rows: 2,
3017
3017
  value: note,
3018
3018
  onChange: (event) => setNote(event.target.value),
3019
- maxLength: chunkSK5UGG6A_js.EXPLORE_ESCALATION_NOTE_SOFT_MAX,
3019
+ maxLength: chunkP5GMVPR6_js.EXPLORE_ESCALATION_NOTE_SOFT_MAX,
3020
3020
  className: "min-h-0 border-border bg-background"
3021
3021
  }
3022
3022
  )
@@ -3115,23 +3115,29 @@ var ANSWER_ACTION_ACTIVE = "border-primary/40 bg-accent text-primary";
3115
3115
  function ReadAloudButton({
3116
3116
  strings: T,
3117
3117
  text,
3118
- lang
3118
+ lang,
3119
+ hold
3119
3120
  }) {
3120
- const speech = chunkSK5UGG6A_js.useSpeechOutput({ lang });
3121
+ const speech = chunkP5GMVPR6_js.useSpeechOutput({ lang });
3121
3122
  if (!speech.supported) return null;
3122
3123
  const label = speech.speaking ? T.stopReading : T.readAloud;
3124
+ const held = hold !== null && !speech.speaking;
3123
3125
  return /* @__PURE__ */ jsxRuntime.jsxs(
3124
3126
  "button",
3125
3127
  {
3126
3128
  "data-boff-explore": "read-aloud",
3127
3129
  "data-speaking": speech.speaking ? "true" : "false",
3128
3130
  type: "button",
3129
- title: label,
3131
+ title: held ? hold : label,
3130
3132
  "aria-pressed": speech.speaking,
3131
- onClick: () => speech.toggle(text),
3133
+ "aria-disabled": held ? "true" : void 0,
3134
+ onClick: () => {
3135
+ if (!held) speech.toggle(text);
3136
+ },
3132
3137
  className: chunkC6OJIHNO_js.cn(
3133
3138
  ANSWER_ACTION_PILL,
3134
- speech.speaking ? ANSWER_ACTION_ACTIVE : ANSWER_ACTION_IDLE
3139
+ speech.speaking ? ANSWER_ACTION_ACTIVE : ANSWER_ACTION_IDLE,
3140
+ held && "cursor-not-allowed opacity-50"
3135
3141
  ),
3136
3142
  children: [
3137
3143
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Volume2, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }),
@@ -3144,7 +3150,8 @@ function AnswerActions({
3144
3150
  strings: T,
3145
3151
  text,
3146
3152
  speechText,
3147
- speechLang
3153
+ speechLang,
3154
+ voiceHold
3148
3155
  }) {
3149
3156
  const [outcome, setOutcome] = react.useState("idle");
3150
3157
  const resetRef = react.useRef(null);
@@ -3196,7 +3203,15 @@ function AnswerActions({
3196
3203
  ]
3197
3204
  }
3198
3205
  ),
3199
- /* @__PURE__ */ jsxRuntime.jsx(ReadAloudButton, { strings: T, text: speechText, lang: speechLang }),
3206
+ /* @__PURE__ */ jsxRuntime.jsx(
3207
+ ReadAloudButton,
3208
+ {
3209
+ strings: T,
3210
+ text: speechText,
3211
+ lang: speechLang,
3212
+ hold: voiceHold
3213
+ }
3214
+ ),
3200
3215
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-boff-explore": "copy-status", role: "status", className: "sr-only", children: outcome === "idle" ? "" : label })
3201
3216
  ]
3202
3217
  }
@@ -3250,6 +3265,7 @@ function AssistantBubble({
3250
3265
  productSlugs,
3251
3266
  productNames,
3252
3267
  speechLang,
3268
+ voiceHold,
3253
3269
  onNavigate,
3254
3270
  anchorRef,
3255
3271
  onFollow,
@@ -3262,7 +3278,7 @@ function AssistantBubble({
3262
3278
  const body = message.content || message.partialContent || "";
3263
3279
  const failed = message.status === "FAILED";
3264
3280
  const completed = message.status === "COMPLETED";
3265
- const visible = chunkSK5UGG6A_js.useProgressiveReveal(body, !streaming);
3281
+ const visible = chunkP5GMVPR6_js.useProgressiveReveal(body, !streaming);
3266
3282
  const provenance = react.useMemo(
3267
3283
  () => summariseReferences(message.references, imageOrigins, productNames),
3268
3284
  [message.references, imageOrigins, productNames]
@@ -3416,7 +3432,8 @@ function AssistantBubble({
3416
3432
  strings: T,
3417
3433
  text: copyText,
3418
3434
  speechText,
3419
- speechLang
3435
+ speechLang,
3436
+ voiceHold
3420
3437
  }
3421
3438
  ) : null,
3422
3439
  completed && onFeedback ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -4036,6 +4053,7 @@ function ExploreView({
4036
4053
  locale,
4037
4054
  presentation = "page",
4038
4055
  active = true,
4056
+ voiceHold = null,
4039
4057
  explorePath = "/explore",
4040
4058
  examplePrompts,
4041
4059
  scope,
@@ -4099,7 +4117,7 @@ function ExploreView({
4099
4117
  const stopDictation = react.useCallback(() => {
4100
4118
  speechStopRef.current();
4101
4119
  }, []);
4102
- const speech = chunkSK5UGG6A_js.useSpeechInput({
4120
+ const speech = chunkP5GMVPR6_js.useSpeechInput({
4103
4121
  onFinalTranscript: (text) => {
4104
4122
  setDraft((current) => {
4105
4123
  const joined = current.trim() === "" ? text.trimStart() : `${current.trimEnd()} ${text.trim()}`;
@@ -4112,8 +4130,14 @@ function ExploreView({
4112
4130
  react.useEffect(() => {
4113
4131
  if (active) return;
4114
4132
  stopDictation();
4115
- chunkSK5UGG6A_js.stopSpeaking();
4133
+ chunkP5GMVPR6_js.stopSpeaking();
4116
4134
  }, [active, stopDictation]);
4135
+ const voiceHeld = voiceHold !== null;
4136
+ react.useEffect(() => {
4137
+ if (!voiceHeld) return;
4138
+ stopDictation();
4139
+ chunkP5GMVPR6_js.stopSpeaking();
4140
+ }, [voiceHeld, stopDictation]);
4117
4141
  const [disclaimerOpen, setDisclaimerOpen] = react.useState(false);
4118
4142
  const [attachmentNotice, setAttachmentNotice] = react.useState(null);
4119
4143
  const fileInputRef = react.useRef(null);
@@ -4505,7 +4529,7 @@ function ExploreView({
4505
4529
  const text = draft.trim();
4506
4530
  if (!text || overLimit || busy || !canSend) return;
4507
4531
  stopDictation();
4508
- chunkSK5UGG6A_js.stopSpeaking();
4532
+ chunkP5GMVPR6_js.stopSpeaking();
4509
4533
  setDraft("");
4510
4534
  stickToBottomRef.current = true;
4511
4535
  pinFocus();
@@ -4527,7 +4551,7 @@ function ExploreView({
4527
4551
  const sendPrompt = react.useCallback(
4528
4552
  (prompt) => {
4529
4553
  if (!canSend || busy) return;
4530
- chunkSK5UGG6A_js.stopSpeaking();
4554
+ chunkP5GMVPR6_js.stopSpeaking();
4531
4555
  setDraft("");
4532
4556
  stickToBottomRef.current = true;
4533
4557
  pinFocus();
@@ -4553,7 +4577,7 @@ function ExploreView({
4553
4577
  catalog.captchaRequired && catalog.recaptchaSiteKey
4554
4578
  );
4555
4579
  const bakedCatalogJson = react.useMemo(
4556
- () => serverCatalogRaw && serverCatalogRaw.enabled !== false ? chunkSK5UGG6A_js.serializeBakedCatalog(serverCatalogRaw) : null,
4580
+ () => serverCatalogRaw && serverCatalogRaw.enabled !== false ? chunkP5GMVPR6_js.serializeBakedCatalog(serverCatalogRaw) : null,
4557
4581
  [serverCatalogRaw]
4558
4582
  );
4559
4583
  const rootStyle = {};
@@ -4608,10 +4632,10 @@ function ExploreView({
4608
4632
  !panel && bakedCatalogJson ? /* @__PURE__ */ jsxRuntime.jsx(
4609
4633
  "script",
4610
4634
  {
4611
- id: chunkSK5UGG6A_js.BAKED_CATALOG_ELEMENT_ID,
4635
+ id: chunkP5GMVPR6_js.BAKED_CATALOG_ELEMENT_ID,
4612
4636
  type: "application/json",
4613
4637
  "data-product": productSlug ?? "",
4614
- "data-locale": chunkSK5UGG6A_js.bakedCatalogLocale(),
4638
+ "data-locale": chunkP5GMVPR6_js.bakedCatalogLocale(),
4615
4639
  dangerouslySetInnerHTML: { __html: bakedCatalogJson }
4616
4640
  }
4617
4641
  ) : null,
@@ -4793,6 +4817,7 @@ function ExploreView({
4793
4817
  productSlugs,
4794
4818
  productNames,
4795
4819
  speechLang,
4820
+ voiceHold,
4796
4821
  onNavigate,
4797
4822
  anchorRef: message.id === latestAssistantId ? latestAssistantRef : void 0,
4798
4823
  onFollow: (kind, url) => recordClick(message.id, kind, url),
@@ -5003,9 +5028,16 @@ function ExploreView({
5003
5028
  disabled: composerDisabled,
5004
5029
  "aria-label": speech.listening ? T.stopDictating : T.dictate,
5005
5030
  "aria-pressed": speech.listening,
5006
- title: speech.listening ? T.stopDictating : T.dictate,
5007
- onClick: speech.toggle,
5008
- className: chunkC6OJIHNO_js.cn(speech.listening && "animate-pulse"),
5031
+ "aria-disabled": voiceHeld && !speech.listening ? "true" : void 0,
5032
+ title: speech.listening ? T.stopDictating : voiceHold ?? T.dictate,
5033
+ onClick: () => {
5034
+ if (voiceHeld && !speech.listening) return;
5035
+ speech.toggle();
5036
+ },
5037
+ className: chunkC6OJIHNO_js.cn(
5038
+ speech.listening && "animate-pulse",
5039
+ voiceHeld && !speech.listening && "cursor-not-allowed opacity-50"
5040
+ ),
5009
5041
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mic, { className: "h-4 w-4" })
5010
5042
  }
5011
5043
  ) : null,
@@ -5135,6 +5167,7 @@ exports.ExploreChatProvider = ExploreChatProvider;
5135
5167
  exports.ExploreConversationContext = ExploreConversationContext;
5136
5168
  exports.ExploreConversationStartContext = ExploreConversationStartContext;
5137
5169
  exports.ExplorePage = ExplorePage;
5170
+ exports.anotherProductMatcher = anotherProductMatcher;
5138
5171
  exports.answerPlainText = answerPlainText;
5139
5172
  exports.answerSpeechText = answerSpeechText;
5140
5173
  exports.exploreQuestionHref = exploreQuestionHref;
@@ -5148,11 +5181,12 @@ exports.logoUrlOf = logoUrlOf;
5148
5181
  exports.pinnedProductSlug = pinnedProductSlug;
5149
5182
  exports.productNameFor = productNameFor;
5150
5183
  exports.productNamesByOrigin = productNamesByOrigin;
5184
+ exports.productScopedPrompts = productScopedPrompts;
5151
5185
  exports.productSlugsByOrigin = productSlugsByOrigin;
5152
5186
  exports.referenceKindOf = referenceKindOf;
5153
5187
  exports.resolveExploreLocale = resolveExploreLocale;
5154
5188
  exports.speechLocaleOf = speechLocaleOf;
5155
5189
  exports.summariseReferences = summariseReferences;
5156
5190
  exports.useExploreConversation = useExploreConversation;
5157
- //# sourceMappingURL=chunk-R742FS5E.js.map
5158
- //# sourceMappingURL=chunk-R742FS5E.js.map
5191
+ //# sourceMappingURL=chunk-22OT6E26.js.map
5192
+ //# sourceMappingURL=chunk-22OT6E26.js.map