@burdenoff/website-sdk 2026.1102.3 → 2026.1104.2

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 (42) hide show
  1. package/README.md +46 -6
  2. package/dist/avatar-live/index.d.mts +2 -2
  3. package/dist/avatar-live/index.d.ts +2 -2
  4. package/dist/avatar-live/index.js +29 -4
  5. package/dist/avatar-live/index.js.map +1 -1
  6. package/dist/avatar-live/index.mjs +29 -4
  7. package/dist/avatar-live/index.mjs.map +1 -1
  8. package/dist/avatar-live-view/index.d.mts +19 -4
  9. package/dist/avatar-live-view/index.d.ts +19 -4
  10. package/dist/avatar-live-view/index.js +135 -28
  11. package/dist/avatar-live-view/index.js.map +1 -1
  12. package/dist/avatar-live-view/index.mjs +130 -23
  13. package/dist/avatar-live-view/index.mjs.map +1 -1
  14. package/dist/{chunk-DZLUZKOX.js → chunk-22OT6E26.js} +44 -12
  15. package/dist/chunk-22OT6E26.js.map +1 -0
  16. package/dist/{chunk-ZWEEBHXJ.mjs → chunk-5JQGE3XI.mjs} +44 -12
  17. package/dist/chunk-5JQGE3XI.mjs.map +1 -0
  18. package/dist/{chunk-K3QZGJEH.mjs → chunk-7MSB3EUI.mjs} +4 -3
  19. package/dist/chunk-7MSB3EUI.mjs.map +1 -0
  20. package/dist/{chunk-7O2I32ZN.js → chunk-WSEQ2I6I.js} +4 -3
  21. package/dist/chunk-WSEQ2I6I.js.map +1 -0
  22. package/dist/components/explore.d.mts +1 -1
  23. package/dist/components/explore.d.ts +1 -1
  24. package/dist/components/explore.js +13 -13
  25. package/dist/components/explore.mjs +1 -1
  26. package/dist/{explore-DtSPdlEy.d.ts → explore-BV4dRwoC.d.ts} +7 -0
  27. package/dist/{explore-DaSNdm4O.d.mts → explore-BgEeGPvY.d.mts} +7 -0
  28. package/dist/{explore-avatar-live-config-N4WhJzgS.d.mts → explore-avatar-live-config-B6_p0q1c.d.mts} +14 -1
  29. package/dist/{explore-avatar-live-config-CAfN5eAX.d.ts → explore-avatar-live-config-DRpS-mqQ.d.ts} +14 -1
  30. package/dist/index.d.mts +13 -7
  31. package/dist/index.d.ts +13 -7
  32. package/dist/index.js +59 -48
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +16 -5
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/{types-CndbmBK-.d.mts → types-CXqaLlNB.d.mts} +14 -1
  37. package/dist/{types-CndbmBK-.d.ts → types-CXqaLlNB.d.ts} +14 -1
  38. package/package.json +1 -1
  39. package/dist/chunk-7O2I32ZN.js.map +0 -1
  40. package/dist/chunk-DZLUZKOX.js.map +0 -1
  41. package/dist/chunk-K3QZGJEH.mjs.map +0 -1
  42. package/dist/chunk-ZWEEBHXJ.mjs.map +0 -1
@@ -30,7 +30,8 @@ function isRealTurnstileSiteKey(key) {
30
30
  function liveConfigComplete(live) {
31
31
  const key = live.turnstileSiteKey;
32
32
  const allowTest = live.allowTestSiteKey;
33
- return typeof live.load === "function" && typeof live.site === "string" && isAvatarSite(live.site) && typeof live.manifestVersion === "string" && isAvatarVersion(live.manifestVersion) && (key === void 0 || key === "" || typeof key === "string" && SITE_KEY.test(key)) && (allowTest === void 0 || typeof allowTest === "boolean");
33
+ const endUnattended = live.endUnattended;
34
+ return typeof live.load === "function" && typeof live.site === "string" && isAvatarSite(live.site) && typeof live.manifestVersion === "string" && isAvatarVersion(live.manifestVersion) && (key === void 0 || key === "" || typeof key === "string" && SITE_KEY.test(key)) && (allowTest === void 0 || typeof allowTest === "boolean") && (endUnattended === void 0 || typeof endUnattended === "boolean");
34
35
  }
35
36
  function turnstileSiteKeyOf(live) {
36
37
  const key = live.turnstileSiteKey;
@@ -46,5 +47,5 @@ function isAvatarLiveLocaleReviewed(locale) {
46
47
  }
47
48
 
48
49
  export { avatarApiBase, isAvatarLiveLocaleReviewed, isAvatarSite, isAvatarVersion, isRealTurnstileSiteKey, liveConfigComplete, turnstileSiteKeyOf };
49
- //# sourceMappingURL=chunk-K3QZGJEH.mjs.map
50
- //# sourceMappingURL=chunk-K3QZGJEH.mjs.map
50
+ //# sourceMappingURL=chunk-7MSB3EUI.mjs.map
51
+ //# sourceMappingURL=chunk-7MSB3EUI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/explore-avatar-live-config.ts"],"names":[],"mappings":";AAgFO,IAAM,mBAAA,GAAsB,oBAAA;AAEnC,IAAM,IAAA,GAAO,wBAAA;AACb,IAAM,OAAA,GAAU,wBAAA;AAChB,IAAM,QAAA,GAAW,wBAAA;AAKjB,IAAM,aAAA,GAAgB,wBAAA;AAMtB,IAAM,aAAA,GAAgB,0BAAA;AACtB,IAAM,iCAAiB,IAAI,GAAA,CAAI,CAAC,WAAA,EAAa,WAAA,EAAa,OAAO,CAAC,CAAA;AAG3D,SAAS,aAAa,KAAA,EAAwB;AACnD,EAAA,OAAO,IAAA,CAAK,KAAK,KAAK,CAAA;AACxB;AAGO,SAAS,gBAAgB,KAAA,EAAwB;AACtD,EAAA,OAAO,OAAA,CAAQ,KAAK,KAAK,CAAA;AAC3B;AAOO,SAAS,cAAc,UAAA,EAA+C;AAC3E,EAAA,IAAI,CAAC,YAAY,OAAO,IAAA;AACxB,EAAA,IAAI,GAAA;AACJ,EAAA,IAAI;AACF,IAAA,GAAA,GAAM,IAAI,IAAI,UAAU,CAAA;AAAA,EAC1B,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,MAAM,KAAA,GACJ,IAAI,QAAA,KAAa,OAAA,IAAW,eAAe,GAAA,CAAI,GAAA,CAAI,QAAA,CAAS,WAAA,EAAa,CAAA;AAC3E,EAAA,IAAI,GAAA,CAAI,QAAA,KAAa,QAAA,IAAY,CAAC,OAAO,OAAO,IAAA;AAChD,EAAA,OAAO,CAAA,EAAG,GAAA,CAAI,MAAM,CAAA,EAAG,mBAAmB,CAAA,CAAA;AAC5C;AAGO,SAAS,uBAAuB,GAAA,EAAsB;AAC3D,EAAA,OAAO,cAAc,IAAA,CAAK,GAAG,KAAK,CAAC,aAAA,CAAc,KAAK,GAAG,CAAA;AAC3D;AAMO,SAAS,mBAAmB,IAAA,EAAuC;AACxE,EAAA,MAAM,MAAe,IAAA,CAAK,gBAAA;AAC1B,EAAA,MAAM,YAAqB,IAAA,CAAK,gBAAA;AAChC,EAAA,MAAM,gBAAyB,IAAA,CAAK,aAAA;AACpC,EAAA,OACE,OAAO,IAAA,CAAK,IAAA,KAAS,UAAA,IACrB,OAAO,KAAK,IAAA,KAAS,QAAA,IACrB,YAAA,CAAa,IAAA,CAAK,IAAI,CAAA,IACtB,OAAO,KAAK,eAAA,KAAoB,QAAA,IAChC,gBAAgB,IAAA,CAAK,eAAe,CAAA,KACnC,GAAA,KAAQ,UACP,GAAA,KAAQ,EAAA,IACP,OAAO,GAAA,KAAQ,QAAA,IAAY,SAAS,IAAA,CAAK,GAAG,CAAA,CAAA,KAC9C,SAAA,KAAc,UAAa,OAAO,SAAA,KAAc,eAChD,aAAA,KAAkB,MAAA,IAAa,OAAO,aAAA,KAAkB,SAAA,CAAA;AAE7D;AAMO,SAAS,mBACd,IAAA,EACe;AACf,EAAA,MAAM,MAAM,IAAA,CAAK,gBAAA;AACjB,EAAA,IAAI,OAAO,QAAQ,QAAA,IAAY,CAAC,SAAS,IAAA,CAAK,GAAG,GAAG,OAAO,IAAA;AAC3D,EAAA,IAAI,KAAK,gBAAA,KAAqB,KAAA,IAAS,CAAC,sBAAA,CAAuB,GAAG,CAAA,EAAG;AACnE,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,GAAA;AACT;AAMA,IAAM,QAAA,mBAAuC,IAAI,GAAA,CAAmB,CAAC,IAAI,CAAC,CAAA;AAGnE,SAAS,2BAA2B,MAAA,EAAgC;AACzE,EAAA,OAAO,QAAA,CAAS,IAAI,MAAM,CAAA;AAC5B","file":"chunk-7MSB3EUI.mjs","sourcesContent":["/**\n * BOFF-9797. The small part of the live avatar that the panel itself needs, whether or not it is ever opened: what a\n * host's `avatar.live` is, whether the live avatar can run on this page at all, and where its requests go.\n *\n * Everything else (the view, its state machine, the requests, the words, the bot check) is a separate chunk that a\n * site only downloads when its visitor first opens the Avatar view (see `explore-avatar-live.tsx`). That is why this\n * file is separate and kept to a few lines: it is the only part of the live avatar in the package root for a site that\n * does not pass `avatar.live`, and the part of it that decides, without loading anything, whether the chunk is wanted.\n * Types only, plus plain functions: nothing here imports a component, a context or a string table.\n */\nimport type { ExploreLocale } from \"./explore-i18n\";\nimport type { AvatarLiveModule } from \"../avatar-live/types\";\nimport type { UseExploreChatResult } from \"../hooks/use-explore-chat\";\n\n/**\n * BOFF-9797. A host's opt-in to the live avatar on its panel's Avatar tab. `site`, `load` and `manifestVersion` are\n * required; a config that is incomplete, or has an optional field of the wrong shape, leaves the tab as it was (and a\n * warning in the console).\n */\nexport interface ExplorePanelAvatarLive {\n /** The site, as the live avatar service knows it: `healthybowl`. */\n site: string;\n /**\n * Loads the live avatar's room module: `() => import('@burdenoff/website-sdk/avatar-live')`. Called only after the\n * visitor presses Start on the consent card, never on page load or on opening the tab. That entry needs the\n * package's optional peer dependency for media rooms (see the README).\n */\n load: () => Promise<AvatarLiveModule>;\n /**\n * The site's Cloudflare Turnstile site key, for the bot check that runs when the visitor presses Start. Used only when\n * the server says it checks for bots (its availability's `botCheck`, contract v1.2), or says nothing of it (a server\n * older than v1.2, which always checks): such a server's live avatar then needs a key, and without one the tab stays\n * as it was. A server that runs no bot check needs none, and no Cloudflare script is loaded for it, key or not.\n */\n turnstileSiteKey?: string;\n /**\n * Whether `turnstileSiteKey` may be one of Cloudflare's test keys (`1x00000000000000000000AA` and keys of their\n * shape). `websiteAvatarLive` sets it: true on alpha only, false everywhere else, so a production page never runs a\n * test widget. Unset (a config made by hand): any key of a valid shape, as before.\n */\n allowTestSiteKey?: boolean;\n /** The version of the suggested-question list the panel shows (its `examplePrompts`), such as `hb-en-1`. */\n manifestVersion: string;\n /**\n * End a session nobody is attending to (BOFF-9797 stage A). A session keeps playing behind the Chat tab and on a\n * hidden page, so the answer under way is heard to its end; with this set, out of sight it also ends:\n *\n * - **once its answer has played out**, at once: the idle tail after an answer runs only while the Avatar view is in\n * sight (the shared lifecycle rule; see `AvatarLiveView`'s `attend`);\n * - **when the browser holds its sound back** (autoplay refused, or the audio context suspended), after a short grace:\n * the \"Tap to turn on sound\" button that would let it play is out of sight, so nobody hears it.\n *\n * Both end it with reason `user`. Unset or false: such a session plays on to the end the server planned for it, as\n * before.\n */\n endUnattended?: boolean;\n}\n\n/**\n * What the live avatar reads of the panel's conversation: the transcript, whether it is read-only and the token, and\n * `reset` (the chat's own New chat) for its New chat button where the conversation can never be read. Where the server\n * reads typed questions too (contract v1.3), the Avatar tab's own question box asks through the same conversation:\n * `send` (with `surface: \"AVATAR\"`), and `canSend`, `phase`, `activity` and `catalog` to say when it can and what the\n * answer is doing, and `resent` to follow a question asked there that Chat's Retry sent again.\n */\nexport type AvatarConversation = Pick<\n UseExploreChatResult,\n | \"messages\"\n | \"isSharedView\"\n | \"getConversationToken\"\n | \"reset\"\n | \"send\"\n | \"canSend\"\n | \"phase\"\n | \"activity\"\n | \"catalog\"\n | \"resent\"\n>;\n\n/** The web branch's routes, under the gateway's origin. */\nexport const AVATAR_WEB_API_PATH = \"/api/web-avatar/v1\";\n\nconst SITE = /^[a-z][a-z0-9-]{1,31}$/;\nconst VERSION = /^[A-Za-z0-9._-]{1,32}$/;\nconst SITE_KEY = /^[A-Za-z0-9_-]{1,128}$/;\n/**\n * The shape of Cloudflare's dummy site keys: a digit, `x`, a run of zeros and two letters (`1x00000000000000000000AA`,\n * `2x00000000000000000000AB`, `3x00000000000000000000FF`, …). Also catches an all-zero `0x…` placeholder.\n */\nconst TEST_SITE_KEY = /^\\dx0{16,}[A-Za-z]{2}$/;\n/**\n * A real-looking site key. Cloudflare documents no format for real keys; every key it issues starts `0x` (in practice\n * `0x4AAAAAAA…`, about 24 characters), in letters, digits, `_` and `-`. The length is kept loose (18 to 64 in all) so a\n * longer key Cloudflare might issue later still passes, and the charset matches what the panel accepts.\n */\nconst REAL_SITE_KEY = /^0x[A-Za-z0-9_-]{16,62}$/;\nconst LOOPBACK_HOSTS = new Set([\"localhost\", \"127.0.0.1\", \"[::1]\"]);\n\n/** A site slug the contract accepts (`healthybowl`). */\nexport function isAvatarSite(value: string): boolean {\n return SITE.test(value);\n}\n\n/** A consent or manifest version the contract accepts (`hb-en-1`). */\nexport function isAvatarVersion(value: string): boolean {\n return VERSION.test(value);\n}\n\n/**\n * The web branch's base URL on the SDK's configured gateway: the gateway URL's origin, plus\n * {@link AVATAR_WEB_API_PATH}. Null for anything that is not an `https:` URL (or `http:` on this machine, for local\n * development).\n */\nexport function avatarApiBase(gatewayUrl: string | undefined): string | null {\n if (!gatewayUrl) return null;\n let url: URL;\n try {\n url = new URL(gatewayUrl);\n } catch {\n return null;\n }\n const local =\n url.protocol === \"http:\" && LOOPBACK_HOSTS.has(url.hostname.toLowerCase());\n if (url.protocol !== \"https:\" && !local) return null;\n return `${url.origin}${AVATAR_WEB_API_PATH}`;\n}\n\n/** A real-looking Turnstile site key: `0x…`, and not of the shape of Cloudflare's test keys. */\nexport function isRealTurnstileSiteKey(key: string): boolean {\n return REAL_SITE_KEY.test(key) && !TEST_SITE_KEY.test(key);\n}\n\n/**\n * Whether a host's `avatar.live` has everything the live avatar needs, in the shapes the contract accepts. The site\n * key is optional (an empty one is none), and checked only when it is there.\n */\nexport function liveConfigComplete(live: ExplorePanelAvatarLive): boolean {\n const key: unknown = live.turnstileSiteKey;\n const allowTest: unknown = live.allowTestSiteKey;\n const endUnattended: unknown = live.endUnattended;\n return (\n typeof live.load === \"function\" &&\n typeof live.site === \"string\" &&\n isAvatarSite(live.site) &&\n typeof live.manifestVersion === \"string\" &&\n isAvatarVersion(live.manifestVersion) &&\n (key === undefined ||\n key === \"\" ||\n (typeof key === \"string\" && SITE_KEY.test(key))) &&\n (allowTest === undefined || typeof allowTest === \"boolean\") &&\n (endUnattended === undefined || typeof endUnattended === \"boolean\")\n );\n}\n\n/**\n * The site key a bot check at Start may use, or null when there is none: no key, one of no valid shape, or one of\n * Cloudflare's test keys where `allowTestSiteKey` is false.\n */\nexport function turnstileSiteKeyOf(\n live: ExplorePanelAvatarLive,\n): string | null {\n const key = live.turnstileSiteKey;\n if (typeof key !== \"string\" || !SITE_KEY.test(key)) return null;\n if (live.allowTestSiteKey === false && !isRealTurnstileSiteKey(key)) {\n return null;\n }\n return key;\n}\n\n/**\n * The locales whose live-avatar strings have been reviewed. The live avatar runs only in these; see\n * `explore-avatar-i18n.ts`. English only, until a named reviewer signs off on another.\n */\nconst REVIEWED: ReadonlySet<ExploreLocale> = new Set<ExploreLocale>([\"en\"]);\n\n/** Whether the live avatar may run in `locale`: its strings have been reviewed. */\nexport function isAvatarLiveLocaleReviewed(locale: ExploreLocale): boolean {\n return REVIEWED.has(locale);\n}\n"]}
@@ -32,7 +32,8 @@ function isRealTurnstileSiteKey(key) {
32
32
  function liveConfigComplete(live) {
33
33
  const key = live.turnstileSiteKey;
34
34
  const allowTest = live.allowTestSiteKey;
35
- return typeof live.load === "function" && typeof live.site === "string" && isAvatarSite(live.site) && typeof live.manifestVersion === "string" && isAvatarVersion(live.manifestVersion) && (key === void 0 || key === "" || typeof key === "string" && SITE_KEY.test(key)) && (allowTest === void 0 || typeof allowTest === "boolean");
35
+ const endUnattended = live.endUnattended;
36
+ return typeof live.load === "function" && typeof live.site === "string" && isAvatarSite(live.site) && typeof live.manifestVersion === "string" && isAvatarVersion(live.manifestVersion) && (key === void 0 || key === "" || typeof key === "string" && SITE_KEY.test(key)) && (allowTest === void 0 || typeof allowTest === "boolean") && (endUnattended === void 0 || typeof endUnattended === "boolean");
36
37
  }
37
38
  function turnstileSiteKeyOf(live) {
38
39
  const key = live.turnstileSiteKey;
@@ -54,5 +55,5 @@ exports.isAvatarVersion = isAvatarVersion;
54
55
  exports.isRealTurnstileSiteKey = isRealTurnstileSiteKey;
55
56
  exports.liveConfigComplete = liveConfigComplete;
56
57
  exports.turnstileSiteKeyOf = turnstileSiteKeyOf;
57
- //# sourceMappingURL=chunk-7O2I32ZN.js.map
58
- //# sourceMappingURL=chunk-7O2I32ZN.js.map
58
+ //# sourceMappingURL=chunk-WSEQ2I6I.js.map
59
+ //# sourceMappingURL=chunk-WSEQ2I6I.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/explore-avatar-live-config.ts"],"names":[],"mappings":";;;AAgFO,IAAM,mBAAA,GAAsB,oBAAA;AAEnC,IAAM,IAAA,GAAO,wBAAA;AACb,IAAM,OAAA,GAAU,wBAAA;AAChB,IAAM,QAAA,GAAW,wBAAA;AAKjB,IAAM,aAAA,GAAgB,wBAAA;AAMtB,IAAM,aAAA,GAAgB,0BAAA;AACtB,IAAM,iCAAiB,IAAI,GAAA,CAAI,CAAC,WAAA,EAAa,WAAA,EAAa,OAAO,CAAC,CAAA;AAG3D,SAAS,aAAa,KAAA,EAAwB;AACnD,EAAA,OAAO,IAAA,CAAK,KAAK,KAAK,CAAA;AACxB;AAGO,SAAS,gBAAgB,KAAA,EAAwB;AACtD,EAAA,OAAO,OAAA,CAAQ,KAAK,KAAK,CAAA;AAC3B;AAOO,SAAS,cAAc,UAAA,EAA+C;AAC3E,EAAA,IAAI,CAAC,YAAY,OAAO,IAAA;AACxB,EAAA,IAAI,GAAA;AACJ,EAAA,IAAI;AACF,IAAA,GAAA,GAAM,IAAI,IAAI,UAAU,CAAA;AAAA,EAC1B,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,MAAM,KAAA,GACJ,IAAI,QAAA,KAAa,OAAA,IAAW,eAAe,GAAA,CAAI,GAAA,CAAI,QAAA,CAAS,WAAA,EAAa,CAAA;AAC3E,EAAA,IAAI,GAAA,CAAI,QAAA,KAAa,QAAA,IAAY,CAAC,OAAO,OAAO,IAAA;AAChD,EAAA,OAAO,CAAA,EAAG,GAAA,CAAI,MAAM,CAAA,EAAG,mBAAmB,CAAA,CAAA;AAC5C;AAGO,SAAS,uBAAuB,GAAA,EAAsB;AAC3D,EAAA,OAAO,cAAc,IAAA,CAAK,GAAG,KAAK,CAAC,aAAA,CAAc,KAAK,GAAG,CAAA;AAC3D;AAMO,SAAS,mBAAmB,IAAA,EAAuC;AACxE,EAAA,MAAM,MAAe,IAAA,CAAK,gBAAA;AAC1B,EAAA,MAAM,YAAqB,IAAA,CAAK,gBAAA;AAChC,EAAA,MAAM,gBAAyB,IAAA,CAAK,aAAA;AACpC,EAAA,OACE,OAAO,IAAA,CAAK,IAAA,KAAS,UAAA,IACrB,OAAO,KAAK,IAAA,KAAS,QAAA,IACrB,YAAA,CAAa,IAAA,CAAK,IAAI,CAAA,IACtB,OAAO,KAAK,eAAA,KAAoB,QAAA,IAChC,gBAAgB,IAAA,CAAK,eAAe,CAAA,KACnC,GAAA,KAAQ,UACP,GAAA,KAAQ,EAAA,IACP,OAAO,GAAA,KAAQ,QAAA,IAAY,SAAS,IAAA,CAAK,GAAG,CAAA,CAAA,KAC9C,SAAA,KAAc,UAAa,OAAO,SAAA,KAAc,eAChD,aAAA,KAAkB,MAAA,IAAa,OAAO,aAAA,KAAkB,SAAA,CAAA;AAE7D;AAMO,SAAS,mBACd,IAAA,EACe;AACf,EAAA,MAAM,MAAM,IAAA,CAAK,gBAAA;AACjB,EAAA,IAAI,OAAO,QAAQ,QAAA,IAAY,CAAC,SAAS,IAAA,CAAK,GAAG,GAAG,OAAO,IAAA;AAC3D,EAAA,IAAI,KAAK,gBAAA,KAAqB,KAAA,IAAS,CAAC,sBAAA,CAAuB,GAAG,CAAA,EAAG;AACnE,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,GAAA;AACT;AAMA,IAAM,QAAA,mBAAuC,IAAI,GAAA,CAAmB,CAAC,IAAI,CAAC,CAAA;AAGnE,SAAS,2BAA2B,MAAA,EAAgC;AACzE,EAAA,OAAO,QAAA,CAAS,IAAI,MAAM,CAAA;AAC5B","file":"chunk-WSEQ2I6I.js","sourcesContent":["/**\n * BOFF-9797. The small part of the live avatar that the panel itself needs, whether or not it is ever opened: what a\n * host's `avatar.live` is, whether the live avatar can run on this page at all, and where its requests go.\n *\n * Everything else (the view, its state machine, the requests, the words, the bot check) is a separate chunk that a\n * site only downloads when its visitor first opens the Avatar view (see `explore-avatar-live.tsx`). That is why this\n * file is separate and kept to a few lines: it is the only part of the live avatar in the package root for a site that\n * does not pass `avatar.live`, and the part of it that decides, without loading anything, whether the chunk is wanted.\n * Types only, plus plain functions: nothing here imports a component, a context or a string table.\n */\nimport type { ExploreLocale } from \"./explore-i18n\";\nimport type { AvatarLiveModule } from \"../avatar-live/types\";\nimport type { UseExploreChatResult } from \"../hooks/use-explore-chat\";\n\n/**\n * BOFF-9797. A host's opt-in to the live avatar on its panel's Avatar tab. `site`, `load` and `manifestVersion` are\n * required; a config that is incomplete, or has an optional field of the wrong shape, leaves the tab as it was (and a\n * warning in the console).\n */\nexport interface ExplorePanelAvatarLive {\n /** The site, as the live avatar service knows it: `healthybowl`. */\n site: string;\n /**\n * Loads the live avatar's room module: `() => import('@burdenoff/website-sdk/avatar-live')`. Called only after the\n * visitor presses Start on the consent card, never on page load or on opening the tab. That entry needs the\n * package's optional peer dependency for media rooms (see the README).\n */\n load: () => Promise<AvatarLiveModule>;\n /**\n * The site's Cloudflare Turnstile site key, for the bot check that runs when the visitor presses Start. Used only when\n * the server says it checks for bots (its availability's `botCheck`, contract v1.2), or says nothing of it (a server\n * older than v1.2, which always checks): such a server's live avatar then needs a key, and without one the tab stays\n * as it was. A server that runs no bot check needs none, and no Cloudflare script is loaded for it, key or not.\n */\n turnstileSiteKey?: string;\n /**\n * Whether `turnstileSiteKey` may be one of Cloudflare's test keys (`1x00000000000000000000AA` and keys of their\n * shape). `websiteAvatarLive` sets it: true on alpha only, false everywhere else, so a production page never runs a\n * test widget. Unset (a config made by hand): any key of a valid shape, as before.\n */\n allowTestSiteKey?: boolean;\n /** The version of the suggested-question list the panel shows (its `examplePrompts`), such as `hb-en-1`. */\n manifestVersion: string;\n /**\n * End a session nobody is attending to (BOFF-9797 stage A). A session keeps playing behind the Chat tab and on a\n * hidden page, so the answer under way is heard to its end; with this set, out of sight it also ends:\n *\n * - **once its answer has played out**, at once: the idle tail after an answer runs only while the Avatar view is in\n * sight (the shared lifecycle rule; see `AvatarLiveView`'s `attend`);\n * - **when the browser holds its sound back** (autoplay refused, or the audio context suspended), after a short grace:\n * the \"Tap to turn on sound\" button that would let it play is out of sight, so nobody hears it.\n *\n * Both end it with reason `user`. Unset or false: such a session plays on to the end the server planned for it, as\n * before.\n */\n endUnattended?: boolean;\n}\n\n/**\n * What the live avatar reads of the panel's conversation: the transcript, whether it is read-only and the token, and\n * `reset` (the chat's own New chat) for its New chat button where the conversation can never be read. Where the server\n * reads typed questions too (contract v1.3), the Avatar tab's own question box asks through the same conversation:\n * `send` (with `surface: \"AVATAR\"`), and `canSend`, `phase`, `activity` and `catalog` to say when it can and what the\n * answer is doing, and `resent` to follow a question asked there that Chat's Retry sent again.\n */\nexport type AvatarConversation = Pick<\n UseExploreChatResult,\n | \"messages\"\n | \"isSharedView\"\n | \"getConversationToken\"\n | \"reset\"\n | \"send\"\n | \"canSend\"\n | \"phase\"\n | \"activity\"\n | \"catalog\"\n | \"resent\"\n>;\n\n/** The web branch's routes, under the gateway's origin. */\nexport const AVATAR_WEB_API_PATH = \"/api/web-avatar/v1\";\n\nconst SITE = /^[a-z][a-z0-9-]{1,31}$/;\nconst VERSION = /^[A-Za-z0-9._-]{1,32}$/;\nconst SITE_KEY = /^[A-Za-z0-9_-]{1,128}$/;\n/**\n * The shape of Cloudflare's dummy site keys: a digit, `x`, a run of zeros and two letters (`1x00000000000000000000AA`,\n * `2x00000000000000000000AB`, `3x00000000000000000000FF`, …). Also catches an all-zero `0x…` placeholder.\n */\nconst TEST_SITE_KEY = /^\\dx0{16,}[A-Za-z]{2}$/;\n/**\n * A real-looking site key. Cloudflare documents no format for real keys; every key it issues starts `0x` (in practice\n * `0x4AAAAAAA…`, about 24 characters), in letters, digits, `_` and `-`. The length is kept loose (18 to 64 in all) so a\n * longer key Cloudflare might issue later still passes, and the charset matches what the panel accepts.\n */\nconst REAL_SITE_KEY = /^0x[A-Za-z0-9_-]{16,62}$/;\nconst LOOPBACK_HOSTS = new Set([\"localhost\", \"127.0.0.1\", \"[::1]\"]);\n\n/** A site slug the contract accepts (`healthybowl`). */\nexport function isAvatarSite(value: string): boolean {\n return SITE.test(value);\n}\n\n/** A consent or manifest version the contract accepts (`hb-en-1`). */\nexport function isAvatarVersion(value: string): boolean {\n return VERSION.test(value);\n}\n\n/**\n * The web branch's base URL on the SDK's configured gateway: the gateway URL's origin, plus\n * {@link AVATAR_WEB_API_PATH}. Null for anything that is not an `https:` URL (or `http:` on this machine, for local\n * development).\n */\nexport function avatarApiBase(gatewayUrl: string | undefined): string | null {\n if (!gatewayUrl) return null;\n let url: URL;\n try {\n url = new URL(gatewayUrl);\n } catch {\n return null;\n }\n const local =\n url.protocol === \"http:\" && LOOPBACK_HOSTS.has(url.hostname.toLowerCase());\n if (url.protocol !== \"https:\" && !local) return null;\n return `${url.origin}${AVATAR_WEB_API_PATH}`;\n}\n\n/** A real-looking Turnstile site key: `0x…`, and not of the shape of Cloudflare's test keys. */\nexport function isRealTurnstileSiteKey(key: string): boolean {\n return REAL_SITE_KEY.test(key) && !TEST_SITE_KEY.test(key);\n}\n\n/**\n * Whether a host's `avatar.live` has everything the live avatar needs, in the shapes the contract accepts. The site\n * key is optional (an empty one is none), and checked only when it is there.\n */\nexport function liveConfigComplete(live: ExplorePanelAvatarLive): boolean {\n const key: unknown = live.turnstileSiteKey;\n const allowTest: unknown = live.allowTestSiteKey;\n const endUnattended: unknown = live.endUnattended;\n return (\n typeof live.load === \"function\" &&\n typeof live.site === \"string\" &&\n isAvatarSite(live.site) &&\n typeof live.manifestVersion === \"string\" &&\n isAvatarVersion(live.manifestVersion) &&\n (key === undefined ||\n key === \"\" ||\n (typeof key === \"string\" && SITE_KEY.test(key))) &&\n (allowTest === undefined || typeof allowTest === \"boolean\") &&\n (endUnattended === undefined || typeof endUnattended === \"boolean\")\n );\n}\n\n/**\n * The site key a bot check at Start may use, or null when there is none: no key, one of no valid shape, or one of\n * Cloudflare's test keys where `allowTestSiteKey` is false.\n */\nexport function turnstileSiteKeyOf(\n live: ExplorePanelAvatarLive,\n): string | null {\n const key = live.turnstileSiteKey;\n if (typeof key !== \"string\" || !SITE_KEY.test(key)) return null;\n if (live.allowTestSiteKey === false && !isRealTurnstileSiteKey(key)) {\n return null;\n }\n return key;\n}\n\n/**\n * The locales whose live-avatar strings have been reviewed. The live avatar runs only in these; see\n * `explore-avatar-i18n.ts`. English only, until a named reviewer signs off on another.\n */\nconst REVIEWED: ReadonlySet<ExploreLocale> = new Set<ExploreLocale>([\"en\"]);\n\n/** Whether the live avatar may run in `locale`: its strings have been reviewed. */\nexport function isAvatarLiveLocaleReviewed(locale: ExploreLocale): boolean {\n return REVIEWED.has(locale);\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
- export { a as EXPLORE_PREFILL_MAX_LENGTH, e as ExplorePage, f as ExplorePageProps, m as ExploreProvenance, n as ExploreReferenceKind, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, o as logoUrlOf, q as productNamesByOrigin, r as referenceKindOf, s as summariseReferences } from '../explore-DaSNdm4O.mjs';
2
+ export { a as EXPLORE_PREFILL_MAX_LENGTH, e as ExplorePage, f as ExplorePageProps, m as ExploreProvenance, n as ExploreReferenceKind, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, o as logoUrlOf, q as productNamesByOrigin, r as referenceKindOf, s as summariseReferences } from '../explore-BgEeGPvY.mjs';
3
3
  import '../explore-types-Ol1Mm3dW.mjs';
4
4
  import 'react-markdown';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
- export { a as EXPLORE_PREFILL_MAX_LENGTH, e as ExplorePage, f as ExplorePageProps, m as ExploreProvenance, n as ExploreReferenceKind, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, o as logoUrlOf, q as productNamesByOrigin, r as referenceKindOf, s as summariseReferences } from '../explore-DtSPdlEy.js';
2
+ export { a as EXPLORE_PREFILL_MAX_LENGTH, e as ExplorePage, f as ExplorePageProps, m as ExploreProvenance, n as ExploreReferenceKind, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, o as logoUrlOf, q as productNamesByOrigin, r as referenceKindOf, s as summariseReferences } from '../explore-BV4dRwoC.js';
3
3
  import '../explore-types-Ol1Mm3dW.js';
4
4
  import 'react-markdown';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkDZLUZKOX_js = require('../chunk-DZLUZKOX.js');
3
+ var chunk22OT6E26_js = require('../chunk-22OT6E26.js');
4
4
  require('../chunk-O4GS3XPZ.js');
5
5
  require('../chunk-P5GMVPR6.js');
6
6
  require('../chunk-PHXAGQNB.js');
@@ -18,51 +18,51 @@ require('../chunk-ZSTFX7FV.js');
18
18
 
19
19
  Object.defineProperty(exports, "EXPLORE_PREFILL_MAX_LENGTH", {
20
20
  enumerable: true,
21
- get: function () { return chunkDZLUZKOX_js.EXPLORE_PREFILL_MAX_LENGTH; }
21
+ get: function () { return chunk22OT6E26_js.EXPLORE_PREFILL_MAX_LENGTH; }
22
22
  });
23
23
  Object.defineProperty(exports, "ExplorePage", {
24
24
  enumerable: true,
25
- get: function () { return chunkDZLUZKOX_js.ExplorePage; }
25
+ get: function () { return chunk22OT6E26_js.ExplorePage; }
26
26
  });
27
27
  Object.defineProperty(exports, "answerPlainText", {
28
28
  enumerable: true,
29
- get: function () { return chunkDZLUZKOX_js.answerPlainText; }
29
+ get: function () { return chunk22OT6E26_js.answerPlainText; }
30
30
  });
31
31
  Object.defineProperty(exports, "answerSpeechText", {
32
32
  enumerable: true,
33
- get: function () { return chunkDZLUZKOX_js.answerSpeechText; }
33
+ get: function () { return chunk22OT6E26_js.answerSpeechText; }
34
34
  });
35
35
  Object.defineProperty(exports, "exploreQuestionHref", {
36
36
  enumerable: true,
37
- get: function () { return chunkDZLUZKOX_js.exploreQuestionHref; }
37
+ get: function () { return chunk22OT6E26_js.exploreQuestionHref; }
38
38
  });
39
39
  Object.defineProperty(exports, "inlineImageOrigins", {
40
40
  enumerable: true,
41
- get: function () { return chunkDZLUZKOX_js.inlineImageOrigins; }
41
+ get: function () { return chunk22OT6E26_js.inlineImageOrigins; }
42
42
  });
43
43
  Object.defineProperty(exports, "isInlineImageAllowed", {
44
44
  enumerable: true,
45
- get: function () { return chunkDZLUZKOX_js.isInlineImageAllowed; }
45
+ get: function () { return chunk22OT6E26_js.isInlineImageAllowed; }
46
46
  });
47
47
  Object.defineProperty(exports, "isInlineVideoAllowed", {
48
48
  enumerable: true,
49
- get: function () { return chunkDZLUZKOX_js.isInlineVideoAllowed; }
49
+ get: function () { return chunk22OT6E26_js.isInlineVideoAllowed; }
50
50
  });
51
51
  Object.defineProperty(exports, "logoUrlOf", {
52
52
  enumerable: true,
53
- get: function () { return chunkDZLUZKOX_js.logoUrlOf; }
53
+ get: function () { return chunk22OT6E26_js.logoUrlOf; }
54
54
  });
55
55
  Object.defineProperty(exports, "productNamesByOrigin", {
56
56
  enumerable: true,
57
- get: function () { return chunkDZLUZKOX_js.productNamesByOrigin; }
57
+ get: function () { return chunk22OT6E26_js.productNamesByOrigin; }
58
58
  });
59
59
  Object.defineProperty(exports, "referenceKindOf", {
60
60
  enumerable: true,
61
- get: function () { return chunkDZLUZKOX_js.referenceKindOf; }
61
+ get: function () { return chunk22OT6E26_js.referenceKindOf; }
62
62
  });
63
63
  Object.defineProperty(exports, "summariseReferences", {
64
64
  enumerable: true,
65
- get: function () { return chunkDZLUZKOX_js.summariseReferences; }
65
+ get: function () { return chunk22OT6E26_js.summariseReferences; }
66
66
  });
67
67
  //# sourceMappingURL=explore.js.map
68
68
  //# sourceMappingURL=explore.js.map
@@ -1,4 +1,4 @@
1
- export { EXPLORE_PREFILL_MAX_LENGTH, ExplorePage, answerPlainText, answerSpeechText, exploreQuestionHref, inlineImageOrigins, isInlineImageAllowed, isInlineVideoAllowed, logoUrlOf, productNamesByOrigin, referenceKindOf, summariseReferences } from '../chunk-ZWEEBHXJ.mjs';
1
+ export { EXPLORE_PREFILL_MAX_LENGTH, ExplorePage, answerPlainText, answerSpeechText, exploreQuestionHref, inlineImageOrigins, isInlineImageAllowed, isInlineVideoAllowed, logoUrlOf, productNamesByOrigin, referenceKindOf, summariseReferences } from '../chunk-5JQGE3XI.mjs';
2
2
  import '../chunk-TT3MHN42.mjs';
3
3
  import '../chunk-SMD7MEEA.mjs';
4
4
  import '../chunk-SKIYDKIS.mjs';
@@ -259,6 +259,13 @@ interface ExplorePageProps {
259
259
  * Avatar tab: dictation and read-aloud stop then, and the conversation itself is untouched.
260
260
  */
261
261
  active?: boolean;
262
+ /**
263
+ * BOFF-9797. Set by `ExplorePanel` while its live avatar's voice is the page's (a session being created, joined or
264
+ * played): the avatar's own status line, else null (the default). Chat's read-aloud and dictation are held then, so
265
+ * the page never speaks in two voices and the microphone never takes down the avatar's: a reading under way stops, and
266
+ * both controls stay where they are, `aria-disabled`, with this line as their title, until the session ends.
267
+ */
268
+ voiceHold?: string | null;
262
269
  /** BOFF-9697. The site's Explore route, for share links made from the panel. Default `/explore`. */
263
270
  explorePath?: string;
264
271
  /**
@@ -259,6 +259,13 @@ interface ExplorePageProps {
259
259
  * Avatar tab: dictation and read-aloud stop then, and the conversation itself is untouched.
260
260
  */
261
261
  active?: boolean;
262
+ /**
263
+ * BOFF-9797. Set by `ExplorePanel` while its live avatar's voice is the page's (a session being created, joined or
264
+ * played): the avatar's own status line, else null (the default). Chat's read-aloud and dictation are held then, so
265
+ * the page never speaks in two voices and the microphone never takes down the avatar's: a reading under way stops, and
266
+ * both controls stay where they are, `aria-disabled`, with this line as their title, until the session ends.
267
+ */
268
+ voiceHold?: string | null;
262
269
  /** BOFF-9697. The site's Explore route, for share links made from the panel. Default `/explore`. */
263
270
  explorePath?: string;
264
271
  /**
@@ -1,4 +1,4 @@
1
- import { A as AvatarLiveModule } from './types-CndbmBK-.mjs';
1
+ import { A as AvatarLiveModule } from './types-CXqaLlNB.mjs';
2
2
  import { h as UseExploreChatResult } from './use-explore-chat-CbfohA9O.mjs';
3
3
 
4
4
  /**
@@ -288,6 +288,19 @@ interface ExplorePanelAvatarLive {
288
288
  allowTestSiteKey?: boolean;
289
289
  /** The version of the suggested-question list the panel shows (its `examplePrompts`), such as `hb-en-1`. */
290
290
  manifestVersion: string;
291
+ /**
292
+ * End a session nobody is attending to (BOFF-9797 stage A). A session keeps playing behind the Chat tab and on a
293
+ * hidden page, so the answer under way is heard to its end; with this set, out of sight it also ends:
294
+ *
295
+ * - **once its answer has played out**, at once: the idle tail after an answer runs only while the Avatar view is in
296
+ * sight (the shared lifecycle rule; see `AvatarLiveView`'s `attend`);
297
+ * - **when the browser holds its sound back** (autoplay refused, or the audio context suspended), after a short grace:
298
+ * the "Tap to turn on sound" button that would let it play is out of sight, so nobody hears it.
299
+ *
300
+ * Both end it with reason `user`. Unset or false: such a session plays on to the end the server planned for it, as
301
+ * before.
302
+ */
303
+ endUnattended?: boolean;
291
304
  }
292
305
  /**
293
306
  * What the live avatar reads of the panel's conversation: the transcript, whether it is read-only and the token, and
@@ -1,4 +1,4 @@
1
- import { A as AvatarLiveModule } from './types-CndbmBK-.js';
1
+ import { A as AvatarLiveModule } from './types-CXqaLlNB.js';
2
2
  import { h as UseExploreChatResult } from './use-explore-chat-B3dOOvJN.js';
3
3
 
4
4
  /**
@@ -288,6 +288,19 @@ interface ExplorePanelAvatarLive {
288
288
  allowTestSiteKey?: boolean;
289
289
  /** The version of the suggested-question list the panel shows (its `examplePrompts`), such as `hb-en-1`. */
290
290
  manifestVersion: string;
291
+ /**
292
+ * End a session nobody is attending to (BOFF-9797 stage A). A session keeps playing behind the Chat tab and on a
293
+ * hidden page, so the answer under way is heard to its end; with this set, out of sight it also ends:
294
+ *
295
+ * - **once its answer has played out**, at once: the idle tail after an answer runs only while the Avatar view is in
296
+ * sight (the shared lifecycle rule; see `AvatarLiveView`'s `attend`);
297
+ * - **when the browser holds its sound back** (autoplay refused, or the audio context suspended), after a short grace:
298
+ * the "Tap to turn on sound" button that would let it play is out of sight, so nobody hears it.
299
+ *
300
+ * Both end it with reason `user`. Unset or false: such a session plays on to the end the server planned for it, as
301
+ * before.
302
+ */
303
+ endUnattended?: boolean;
291
304
  }
292
305
  /**
293
306
  * What the live avatar reads of the panel's conversation: the transcript, whether it is read-only and the token, and
package/dist/index.d.mts CHANGED
@@ -18,10 +18,10 @@ export { LaunchCountdown, LaunchCountdownProps } from './components/launch-count
18
18
  export { ProblemSolved, ProblemsSolvedSection, ProblemsSolvedSectionProps } from './components/problems-solved.mjs';
19
19
  export { DetectedPlatform, ElectronDownloadLink, ElectronDownloadLinkProps, detectElectronPlatform } from './components/electron-download.mjs';
20
20
  import { Components } from 'react-markdown';
21
- import { a as ExploreLocale, E as ExplorePanelAvatarLive } from './explore-avatar-live-config-N4WhJzgS.mjs';
22
- export { b as EXPLORE_LOCALES, c as ExploreStrings, s as speechLocaleOf } from './explore-avatar-live-config-N4WhJzgS.mjs';
23
- import { A as AnswerRendererStrings, E as ExploreScope } from './explore-DaSNdm4O.mjs';
24
- export { a as EXPLORE_PREFILL_MAX_LENGTH, b as ExploreAnswerBody, c as ExploreAnswerBodyProps, d as ExploreAnswerStyles, e as ExplorePage, f as ExplorePageProps, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, p as productSlugsByOrigin } from './explore-DaSNdm4O.mjs';
21
+ import { a as ExploreLocale, E as ExplorePanelAvatarLive } from './explore-avatar-live-config-B6_p0q1c.mjs';
22
+ export { b as EXPLORE_LOCALES, c as ExploreStrings, s as speechLocaleOf } from './explore-avatar-live-config-B6_p0q1c.mjs';
23
+ import { A as AnswerRendererStrings, E as ExploreScope } from './explore-BgEeGPvY.mjs';
24
+ export { a as EXPLORE_PREFILL_MAX_LENGTH, b as ExploreAnswerBody, c as ExploreAnswerBodyProps, d as ExploreAnswerStyles, e as ExplorePage, f as ExplorePageProps, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, p as productSlugsByOrigin } from './explore-BgEeGPvY.mjs';
25
25
  export { ExploreCta, ExploreCtaProps } from './components/explore-cta.mjs';
26
26
  import { h as UseExploreChatResult, S as StagedAttachment } from './use-explore-chat-CbfohA9O.mjs';
27
27
  export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, e as ExploreResent, f as ExploreSendOptions, g as ExploreSent, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, i as classifyExploreError, u as useExploreChat } from './use-explore-chat-CbfohA9O.mjs';
@@ -36,7 +36,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
36
36
  export { B as BrowseStoreResult, G as GroupedStoreProducts, P as ProductCard, a as ProductCategory, R as RatingDistribution, S as SearchSuggestion, b as StarRating, c as StoreBrowsePage, d as StoreBrowsePageProps, e as StoreFacet, f as StoreFacets, g as StoreHomePage, h as StoreHomePageProps, i as StorePageProps, j as StoreProduct, k as StoreProductDetailPage, l as StoreProductDetailPageProps, m as StoreProductDetails, n as StorePublisher, o as StoreReview, p as StoreTerminology, q as StoreTypeFilter, T as TypeBadge, r as formatDownloads, s as formatPrice } from './product-card-CGxETsFa.mjs';
37
37
  export { EXPLORE_RECAPTCHA_ACTION, FOOTERLESS_ROUTES, PRODUCT_SLUG_ALIASES, PRODUCT_SLUG_EMIT, PRODUCT_SLUG_RENAMES, ProductSlugGeneration, ProductSlugRename, RecaptchaV3, cn, emitProductSlug, getRecaptchaV3Token, isFooterlessPath, isSameProductSlug, legacyProductSlug, loadRecaptchaV3, normalizeProductSlug, normalizeRoutePath, productSlugVariants, shouldRenderSiteFooter } from './utils/index.mjs';
38
38
  export { ComparisonClaim, ComparisonSource, DEFAULT_COMPARISON_MAX_AGE_DAYS, FreshnessIssue, FreshnessOptions, FreshnessProblem, NonEmptySources, Sourced, checkComparisonFreshness, formatFreshnessReport, latestVerification, oldestVerification, parseVerifiedAt } from './comparison/index.mjs';
39
- import './types-CndbmBK-.mjs';
39
+ import './types-CXqaLlNB.mjs';
40
40
  import 'clsx';
41
41
 
42
42
  interface CareersSubmissionFormProps {
@@ -848,13 +848,19 @@ interface WebsiteAvatarLiveOptions {
848
848
  load: ExplorePanelAvatarLive["load"];
849
849
  /** False keeps the still picture on this build, whatever the server offers. Default true. */
850
850
  enabled?: boolean;
851
+ /**
852
+ * `endUnattended` on the live config: out of sight (the Chat tab, a hidden page), a session ends once its answer has
853
+ * played out, or after a short grace when the browser holds its sound back. Default unset: as before, such a session
854
+ * plays on to the end the server planned for it.
855
+ */
856
+ endUnattended?: boolean;
851
857
  }
852
858
  /** The `avatar.live` prop for this build, or `undefined` for the still picture only. */
853
- declare function websiteAvatarLive({ deployEnv, siteKey, site, manifestVersion, load, enabled, }: WebsiteAvatarLiveOptions): ExplorePanelAvatarLive | undefined;
859
+ declare function websiteAvatarLive({ deployEnv, siteKey, site, manifestVersion, load, enabled, endUnattended, }: WebsiteAvatarLiveOptions): ExplorePanelAvatarLive | undefined;
854
860
 
855
861
  declare const buttonVariants: (props?: ({
856
862
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
857
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
863
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
858
864
  } & class_variance_authority_types.ClassProp) | undefined) => string;
859
865
  interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
860
866
  asChild?: boolean;
package/dist/index.d.ts CHANGED
@@ -18,10 +18,10 @@ export { LaunchCountdown, LaunchCountdownProps } from './components/launch-count
18
18
  export { ProblemSolved, ProblemsSolvedSection, ProblemsSolvedSectionProps } from './components/problems-solved.js';
19
19
  export { DetectedPlatform, ElectronDownloadLink, ElectronDownloadLinkProps, detectElectronPlatform } from './components/electron-download.js';
20
20
  import { Components } from 'react-markdown';
21
- import { a as ExploreLocale, E as ExplorePanelAvatarLive } from './explore-avatar-live-config-CAfN5eAX.js';
22
- export { b as EXPLORE_LOCALES, c as ExploreStrings, s as speechLocaleOf } from './explore-avatar-live-config-CAfN5eAX.js';
23
- import { A as AnswerRendererStrings, E as ExploreScope } from './explore-DtSPdlEy.js';
24
- export { a as EXPLORE_PREFILL_MAX_LENGTH, b as ExploreAnswerBody, c as ExploreAnswerBodyProps, d as ExploreAnswerStyles, e as ExplorePage, f as ExplorePageProps, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, p as productSlugsByOrigin } from './explore-DtSPdlEy.js';
21
+ import { a as ExploreLocale, E as ExplorePanelAvatarLive } from './explore-avatar-live-config-DRpS-mqQ.js';
22
+ export { b as EXPLORE_LOCALES, c as ExploreStrings, s as speechLocaleOf } from './explore-avatar-live-config-DRpS-mqQ.js';
23
+ import { A as AnswerRendererStrings, E as ExploreScope } from './explore-BV4dRwoC.js';
24
+ export { a as EXPLORE_PREFILL_MAX_LENGTH, b as ExploreAnswerBody, c as ExploreAnswerBodyProps, d as ExploreAnswerStyles, e as ExplorePage, f as ExplorePageProps, g as answerPlainText, h as answerSpeechText, i as exploreQuestionHref, j as inlineImageOrigins, k as isInlineImageAllowed, l as isInlineVideoAllowed, p as productSlugsByOrigin } from './explore-BV4dRwoC.js';
25
25
  export { ExploreCta, ExploreCtaProps } from './components/explore-cta.js';
26
26
  import { h as UseExploreChatResult, S as StagedAttachment } from './use-explore-chat-B3dOOvJN.js';
27
27
  export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, e as ExploreResent, f as ExploreSendOptions, g as ExploreSent, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, i as classifyExploreError, u as useExploreChat } from './use-explore-chat-B3dOOvJN.js';
@@ -36,7 +36,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
36
36
  export { B as BrowseStoreResult, G as GroupedStoreProducts, P as ProductCard, a as ProductCategory, R as RatingDistribution, S as SearchSuggestion, b as StarRating, c as StoreBrowsePage, d as StoreBrowsePageProps, e as StoreFacet, f as StoreFacets, g as StoreHomePage, h as StoreHomePageProps, i as StorePageProps, j as StoreProduct, k as StoreProductDetailPage, l as StoreProductDetailPageProps, m as StoreProductDetails, n as StorePublisher, o as StoreReview, p as StoreTerminology, q as StoreTypeFilter, T as TypeBadge, r as formatDownloads, s as formatPrice } from './product-card-CGxETsFa.js';
37
37
  export { EXPLORE_RECAPTCHA_ACTION, FOOTERLESS_ROUTES, PRODUCT_SLUG_ALIASES, PRODUCT_SLUG_EMIT, PRODUCT_SLUG_RENAMES, ProductSlugGeneration, ProductSlugRename, RecaptchaV3, cn, emitProductSlug, getRecaptchaV3Token, isFooterlessPath, isSameProductSlug, legacyProductSlug, loadRecaptchaV3, normalizeProductSlug, normalizeRoutePath, productSlugVariants, shouldRenderSiteFooter } from './utils/index.js';
38
38
  export { ComparisonClaim, ComparisonSource, DEFAULT_COMPARISON_MAX_AGE_DAYS, FreshnessIssue, FreshnessOptions, FreshnessProblem, NonEmptySources, Sourced, checkComparisonFreshness, formatFreshnessReport, latestVerification, oldestVerification, parseVerifiedAt } from './comparison/index.js';
39
- import './types-CndbmBK-.js';
39
+ import './types-CXqaLlNB.js';
40
40
  import 'clsx';
41
41
 
42
42
  interface CareersSubmissionFormProps {
@@ -848,13 +848,19 @@ interface WebsiteAvatarLiveOptions {
848
848
  load: ExplorePanelAvatarLive["load"];
849
849
  /** False keeps the still picture on this build, whatever the server offers. Default true. */
850
850
  enabled?: boolean;
851
+ /**
852
+ * `endUnattended` on the live config: out of sight (the Chat tab, a hidden page), a session ends once its answer has
853
+ * played out, or after a short grace when the browser holds its sound back. Default unset: as before, such a session
854
+ * plays on to the end the server planned for it.
855
+ */
856
+ endUnattended?: boolean;
851
857
  }
852
858
  /** The `avatar.live` prop for this build, or `undefined` for the still picture only. */
853
- declare function websiteAvatarLive({ deployEnv, siteKey, site, manifestVersion, load, enabled, }: WebsiteAvatarLiveOptions): ExplorePanelAvatarLive | undefined;
859
+ declare function websiteAvatarLive({ deployEnv, siteKey, site, manifestVersion, load, enabled, endUnattended, }: WebsiteAvatarLiveOptions): ExplorePanelAvatarLive | undefined;
854
860
 
855
861
  declare const buttonVariants: (props?: ({
856
862
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
857
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
863
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
858
864
  } & class_variance_authority_types.ClassProp) | undefined) => string;
859
865
  interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
860
866
  asChild?: boolean;