@burdenoff/website-sdk 2026.1101.3 → 2026.1102.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 (40) hide show
  1. package/README.md +234 -14
  2. package/dist/avatar-live-view/index.d.mts +1 -1
  3. package/dist/avatar-live-view/index.d.ts +1 -1
  4. package/dist/avatar-live-view/index.js +71 -24
  5. package/dist/avatar-live-view/index.js.map +1 -1
  6. package/dist/avatar-live-view/index.mjs +69 -22
  7. package/dist/avatar-live-view/index.mjs.map +1 -1
  8. package/dist/{chunk-Y4V5CEWD.mjs → chunk-2LPDCXQH.mjs} +7 -4
  9. package/dist/chunk-2LPDCXQH.mjs.map +1 -0
  10. package/dist/{chunk-FFADMVIK.mjs → chunk-ETI2HQEC.mjs} +7 -5
  11. package/dist/chunk-ETI2HQEC.mjs.map +1 -0
  12. package/dist/{chunk-23H4JUL4.js → chunk-OIQHIGGU.js} +20 -3
  13. package/dist/chunk-OIQHIGGU.js.map +1 -0
  14. package/dist/{chunk-OYEUNZJY.js → chunk-PIXTBL63.js} +7 -3
  15. package/dist/chunk-PIXTBL63.js.map +1 -0
  16. package/dist/{chunk-BX2USEWF.mjs → chunk-QOHPLTGT.mjs} +19 -4
  17. package/dist/chunk-QOHPLTGT.mjs.map +1 -0
  18. package/dist/{chunk-O76QDGRM.js → chunk-R742FS5E.js} +8 -4
  19. package/dist/chunk-R742FS5E.js.map +1 -0
  20. package/dist/components/explore-cta.d.mts +7 -0
  21. package/dist/components/explore-cta.d.ts +7 -0
  22. package/dist/components/explore-cta.js +2 -2
  23. package/dist/components/explore-cta.mjs +1 -1
  24. package/dist/components/explore.js +13 -13
  25. package/dist/components/explore.mjs +1 -1
  26. package/dist/{explore-avatar-live-config-B171o1Yo.d.ts → explore-avatar-live-config-C1ILEcY8.d.ts} +16 -4
  27. package/dist/{explore-avatar-live-config-BGsGwbcq.d.mts → explore-avatar-live-config-D-hO90-A.d.mts} +16 -4
  28. package/dist/index.d.mts +107 -4
  29. package/dist/index.d.ts +107 -4
  30. package/dist/index.js +209 -43
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.mjs +173 -7
  33. package/dist/index.mjs.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunk-23H4JUL4.js.map +0 -1
  36. package/dist/chunk-BX2USEWF.mjs.map +0 -1
  37. package/dist/chunk-FFADMVIK.mjs.map +0 -1
  38. package/dist/chunk-O76QDGRM.js.map +0 -1
  39. package/dist/chunk-OYEUNZJY.js.map +0 -1
  40. package/dist/chunk-Y4V5CEWD.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,9 +1,10 @@
1
- import { avatarApiBase, liveConfigComplete, isAvatarLiveLocaleReviewed } from './chunk-BX2USEWF.mjs';
1
+ import { isRealTurnstileSiteKey, avatarApiBase, liveConfigComplete, isAvatarLiveLocaleReviewed } from './chunk-QOHPLTGT.mjs';
2
2
  export { DEFAULT_COMPARISON_MAX_AGE_DAYS, checkComparisonFreshness, formatFreshnessReport, latestVerification, oldestVerification, parseVerifiedAt } from './chunk-B63XLDZH.mjs';
3
3
  import './chunk-GTRAXQGC.mjs';
4
4
  export { RybbitAnalytics } from './chunk-NZANQGDM.mjs';
5
5
  import './chunk-FJZJDUOR.mjs';
6
6
  import './chunk-FJWS7BKT.mjs';
7
+ import { normalizeRoutePath } from './chunk-PIHHPP7J.mjs';
7
8
  export { FOOTERLESS_ROUTES, isFooterlessPath, normalizeRoutePath, shouldRenderSiteFooter } from './chunk-PIHHPP7J.mjs';
8
9
  export { ProductCard, StarRating, StoreBrowsePage, StoreHomePage, StoreProductDetailPage, TypeBadge, formatDownloads, formatPrice } from './chunk-ZP6QRAYC.mjs';
9
10
  export { BlogListPage, BlogPostPage, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContractsPage, LEGAL_DOCUMENTS, LEGAL_DOCUMENT_KEYS, LegalPage, PressKitPage, fetchLegalContent, fetchLegalContentPage, fetchPublicJobPosting, fetchPublicJobPostings, fetchPublicJobPostingsForSubmission, findLegalDocument, formatLegalDate, hasCustomerSignOff, splitLeadingHeading, usePublicJobPosting, usePublicJobPostings, usePublicJobPostingsForSubmission } from './chunk-D2TW7MNC.mjs';
@@ -14,15 +15,16 @@ export { WebsiteSwitcher } from './chunk-ZOON3S3Y.mjs';
14
15
  export { LaunchCountdown } from './chunk-KU2PXHGB.mjs';
15
16
  export { ProblemsSolvedSection } from './chunk-WPKFFQCR.mjs';
16
17
  export { ElectronDownloadLink, detectElectronPlatform } from './chunk-COOELBX7.mjs';
17
- import { productSlugsByOrigin, inlineImageOrigins, exploreStrings, resolveExploreLocale, isRtlLocale, answerSpeechText, ExploreAnswerStyles, ExploreAnswerBody, ExploreCatalogProductsContext, pinnedProductSlug, productNameFor, ExplorePage, ExploreConversationContext } from './chunk-FFADMVIK.mjs';
18
- export { EXPLORE_LOCALES, EXPLORE_PREFILL_MAX_LENGTH, ExploreAnswerBody, ExploreAnswerStyles, ExploreChatProvider, ExplorePage, answerPlainText, answerSpeechText, exploreQuestionHref, inlineImageOrigins, isInlineImageAllowed, isInlineVideoAllowed, productSlugsByOrigin, speechLocaleOf, useExploreConversation } from './chunk-FFADMVIK.mjs';
18
+ import { productSlugsByOrigin, inlineImageOrigins, exploreStrings, resolveExploreLocale, isRtlLocale, answerSpeechText, ExploreAnswerStyles, ExploreAnswerBody, ExploreCatalogProductsContext, pinnedProductSlug, productNameFor, ExplorePage, ExploreConversationStartContext, isDevelopmentBuild, ExploreConversationContext } from './chunk-ETI2HQEC.mjs';
19
+ export { EXPLORE_LOCALES, EXPLORE_PREFILL_MAX_LENGTH, ExploreAnswerBody, ExploreAnswerStyles, ExploreChatProvider, ExplorePage, answerPlainText, answerSpeechText, exploreQuestionHref, inlineImageOrigins, isInlineImageAllowed, isInlineVideoAllowed, productSlugsByOrigin, speechLocaleOf, useExploreConversation } from './chunk-ETI2HQEC.mjs';
19
20
  import { fill } from './chunk-TT3MHN42.mjs';
20
21
  import { ECOSYSTEM_PRODUCTS } from './chunk-EUPFS6MZ.mjs';
21
22
  export { DEFAULT_EXPLORE_EXAMPLE_PROMPTS, ECOSYSTEM_PRODUCTS, ESCALATE_EXPLORE_CONVERSATION_MUTATION, EXPLORE_CATALOG_QUERY, EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS, EXPLORE_ESCALATION_NOTE_SOFT_MAX, EXPLORE_MESSAGE_QUERY, FALLBACK_EXPLORE_LIMITS, SEND_EXPLORE_MESSAGE_MUTATION, classifyExploreError, looksLikeDeliverableEmail, stopSpeaking, useExploreChat, useProgressiveReveal, useSpeechOutput } from './chunk-EUPFS6MZ.mjs';
22
23
  export { EXPLORE_RECAPTCHA_ACTION, getRecaptchaV3Token, loadRecaptchaV3 } from './chunk-SKIYDKIS.mjs';
23
24
  import { ProseStyles } from './chunk-6VJT3SM4.mjs';
24
25
  export { Markdown } from './chunk-EBZ2HGJ2.mjs';
25
- export { ExploreCta } from './chunk-Y4V5CEWD.mjs';
26
+ import { ExploreCta, useCurrentPath } from './chunk-2LPDCXQH.mjs';
27
+ export { ExploreCta } from './chunk-2LPDCXQH.mjs';
26
28
  import './chunk-D5KEZ6V6.mjs';
27
29
  export { ContactPage, DEFAULT_CONTACT_CATEGORIES, Select } from './chunk-PXRHVVOU.mjs';
28
30
  export { NewsletterForm, NewsletterPage } from './chunk-JSLDWYV7.mjs';
@@ -50,7 +52,7 @@ export { PRODUCT_SLUG_ALIASES, PRODUCT_SLUG_EMIT, PRODUCT_SLUG_RENAMES, emitProd
50
52
  import { useWebSDK, useWebSDKConfig, cfAccessHeaders } from './chunk-5JRJ57CL.mjs';
51
53
  export { WebSDKClient, WebSDKProvider, useWebSDK, useWebSDKConfig } from './chunk-5JRJ57CL.mjs';
52
54
  import './chunk-VNS5WDWO.mjs';
53
- import { useRef, useState, useId, useMemo, useCallback, useEffect, useContext, version } from 'react';
55
+ import { useRef, useState, useId, useMemo, useCallback, useEffect, useContext, version, useLayoutEffect } from 'react';
54
56
  import { CheckCircle, Upload, Send, Search, ImageIcon, ChevronRight, Maximize2, Check, ArrowLeft, ArrowRight, Sparkles, Minimize2, X, Info, ExternalLink, ChevronLeft, BookOpenText } from 'lucide-react';
55
57
  import ReCAPTCHA from 'react-google-recaptcha';
56
58
  import { toast } from 'sonner';
@@ -3359,7 +3361,7 @@ function ExploreAvatarLive({
3359
3361
  useEffect(() => {
3360
3362
  if (!complete) {
3361
3363
  console.warn(
3362
- "[WebSDK] ExplorePanel: avatar.live needs site, load, turnstileSiteKey and manifestVersion; the live avatar stays off."
3364
+ "[WebSDK] ExplorePanel: avatar.live needs site, load and manifestVersion, and turnstileSiteKey and allowTestSiteKey of a valid shape when set; the live avatar stays off."
3363
3365
  );
3364
3366
  }
3365
3367
  }, [complete]);
@@ -4161,7 +4163,171 @@ function ExplorePanel({
4161
4163
  }
4162
4164
  );
4163
4165
  }
4166
+ var reportedMissingProvider = false;
4167
+ var mountedDocks = [];
4168
+ var dockListeners = /* @__PURE__ */ new Set();
4169
+ function activeDock() {
4170
+ return mountedDocks[0] ?? null;
4171
+ }
4172
+ function announceActiveDock() {
4173
+ for (const listener of dockListeners) listener();
4174
+ }
4175
+ var useBrowserLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
4176
+ var SITE_ASSISTANT_DOCK_MORE_THAN_ONE = "[WebSDK] More than one SiteAssistantDock is mounted: only the first renders, the others render nothing. Render one, in the layout every route shares.";
4177
+ function useIsActiveDock() {
4178
+ const id = useId();
4179
+ const [active, setActive] = useState(activeDock);
4180
+ useBrowserLayoutEffect(() => {
4181
+ const listener = () => setActive(activeDock());
4182
+ dockListeners.add(listener);
4183
+ mountedDocks.push(id);
4184
+ if (mountedDocks.length > 1 && isDevelopmentBuild()) {
4185
+ console.error(SITE_ASSISTANT_DOCK_MORE_THAN_ONE);
4186
+ }
4187
+ announceActiveDock();
4188
+ return () => {
4189
+ dockListeners.delete(listener);
4190
+ const at = mountedDocks.indexOf(id);
4191
+ if (at !== -1) mountedDocks.splice(at, 1);
4192
+ announceActiveDock();
4193
+ };
4194
+ }, [id]);
4195
+ return active === null || active === id;
4196
+ }
4197
+ var SITE_ASSISTANT_DOCK_NEEDS_PROVIDER = "[WebSDK] SiteAssistantDock must be rendered under an ExploreChatProvider (inside the router, around the routes). Without one the panel cannot share the /explore conversation, and the live avatar cannot run.";
4198
+ function SiteAssistantDock(props) {
4199
+ const start = useContext(ExploreConversationStartContext);
4200
+ const active = useIsActiveDock();
4201
+ if (start === null) {
4202
+ if (isDevelopmentBuild())
4203
+ throw new Error(SITE_ASSISTANT_DOCK_NEEDS_PROVIDER);
4204
+ return active ? /* @__PURE__ */ jsx(DockWithoutProvider, { ...props }) : null;
4205
+ }
4206
+ if (!active) return null;
4207
+ return /* @__PURE__ */ jsx(Dock, { ...props, start });
4208
+ }
4209
+ function DockWithoutProvider({
4210
+ className,
4211
+ currentPath,
4212
+ explorePath = "/explore",
4213
+ label,
4214
+ onNavigate,
4215
+ bottomOffset
4216
+ }) {
4217
+ useEffect(() => {
4218
+ if (reportedMissingProvider) return;
4219
+ reportedMissingProvider = true;
4220
+ console.error(SITE_ASSISTANT_DOCK_NEEDS_PROVIDER);
4221
+ }, []);
4222
+ return /* @__PURE__ */ jsx(
4223
+ ExploreCta,
4224
+ {
4225
+ variant: "floating",
4226
+ href: explorePath,
4227
+ label,
4228
+ currentPath,
4229
+ onNavigate,
4230
+ bottomOffset,
4231
+ className
4232
+ }
4233
+ );
4234
+ }
4235
+ function Dock({
4236
+ start,
4237
+ productSlug,
4238
+ scope,
4239
+ productName,
4240
+ examplePrompts,
4241
+ locale,
4242
+ avatar,
4243
+ onNavigate,
4244
+ bottomOffset,
4245
+ className,
4246
+ panelClassName,
4247
+ currentPath,
4248
+ explorePath = "/explore",
4249
+ label,
4250
+ id = "boff-explore-panel",
4251
+ zIndex
4252
+ }) {
4253
+ const observedPath = useCurrentPath(currentPath);
4254
+ const path = currentPath ?? observedPath;
4255
+ const onExplore = path !== null && normalizeRoutePath(path) === normalizeRoutePath(explorePath);
4256
+ const [open, setOpen] = useState(false);
4257
+ const launcherRef = useRef(null);
4258
+ const changeOpen = useCallback(
4259
+ (next) => {
4260
+ if (next) start();
4261
+ setOpen(next);
4262
+ },
4263
+ [start]
4264
+ );
4265
+ const openPanel = useCallback(() => changeOpen(true), [changeOpen]);
4266
+ const showing = open && !onExplore;
4267
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
4268
+ onExplore ? null : /* @__PURE__ */ jsx(
4269
+ ExploreCta,
4270
+ {
4271
+ ref: launcherRef,
4272
+ variant: "floating",
4273
+ href: explorePath,
4274
+ label,
4275
+ currentPath: path ?? void 0,
4276
+ onNavigate: openPanel,
4277
+ expanded: showing,
4278
+ controls: id,
4279
+ bottomOffset,
4280
+ className
4281
+ }
4282
+ ),
4283
+ /* @__PURE__ */ jsx(
4284
+ ExplorePanel,
4285
+ {
4286
+ id,
4287
+ open: showing,
4288
+ onOpenChange: changeOpen,
4289
+ productSlug,
4290
+ scope,
4291
+ productName,
4292
+ examplePrompts,
4293
+ locale,
4294
+ onNavigate,
4295
+ explorePath,
4296
+ avatar,
4297
+ bottomOffset,
4298
+ zIndex,
4299
+ returnFocusRef: launcherRef,
4300
+ className: panelClassName
4301
+ }
4302
+ )
4303
+ ] });
4304
+ }
4305
+
4306
+ // src/components/website-avatar-live.ts
4307
+ var ALPHA_TEST_SITE_KEY = "1x00000000000000000000AA";
4308
+ function websiteAvatarLive({
4309
+ deployEnv,
4310
+ siteKey,
4311
+ site,
4312
+ manifestVersion,
4313
+ load,
4314
+ enabled
4315
+ }) {
4316
+ if (enabled === false) return void 0;
4317
+ const alpha = typeof deployEnv === "string" && deployEnv.trim().toLowerCase() === "alpha";
4318
+ const live = {
4319
+ site,
4320
+ load,
4321
+ manifestVersion,
4322
+ allowTestSiteKey: alpha
4323
+ };
4324
+ const key = typeof siteKey === "string" ? siteKey.trim() : "";
4325
+ if (key === "") return live;
4326
+ const accepted = alpha ? key === ALPHA_TEST_SITE_KEY || isRealTurnstileSiteKey(key) : isRealTurnstileSiteKey(key);
4327
+ if (!accepted) return void 0;
4328
+ return { ...live, turnstileSiteKey: key };
4329
+ }
4164
4330
 
4165
- export { ANSWERS_PATH, ANSWER_HEADING_SHIFT, ANSWER_PATH_PREFIX, AnswerDetailPage, AnswersPage, CONCEPTS_PATH, CONCEPT_ILLUSTRATION_NOTICE, CONCEPT_PATH_PREFIX, CONCEPT_WORKFLOW_NOTICE, CareersApplyForm, CareersSubmissionForm, ConceptDetailPage, ConceptsPage, DOMAINS_URL, ExplorePanel, PUBLISHED_ANSWER_FIELDS, answerPath, answerSourceHost, answerStrings, conceptPath, formatAnswerDate, getAnswerBySlug, getConceptBySlug, isPublishedSourceUrl, isValidUrl };
4331
+ export { ANSWERS_PATH, ANSWER_HEADING_SHIFT, ANSWER_PATH_PREFIX, AnswerDetailPage, AnswersPage, CONCEPTS_PATH, CONCEPT_ILLUSTRATION_NOTICE, CONCEPT_PATH_PREFIX, CONCEPT_WORKFLOW_NOTICE, CareersApplyForm, CareersSubmissionForm, ConceptDetailPage, ConceptsPage, DOMAINS_URL, ExplorePanel, PUBLISHED_ANSWER_FIELDS, SiteAssistantDock, answerPath, answerSourceHost, answerStrings, conceptPath, formatAnswerDate, getAnswerBySlug, getConceptBySlug, isPublishedSourceUrl, isValidUrl, websiteAvatarLive };
4166
4332
  //# sourceMappingURL=index.mjs.map
4167
4333
  //# sourceMappingURL=index.mjs.map