@burdenoff/website-sdk 2026.1101.3 → 2026.1101.4

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/index.mjs CHANGED
@@ -4,6 +4,7 @@ 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';
@@ -4161,7 +4163,168 @@ 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
+ var TEST_SITE_KEY = /^\dx0{16,}[A-Za-z]{2}$/;
4309
+ var REAL_SITE_KEY = /^0x[A-Za-z0-9_-]{16,62}$/;
4310
+ function isRealSiteKey(key) {
4311
+ return REAL_SITE_KEY.test(key) && !TEST_SITE_KEY.test(key);
4312
+ }
4313
+ function websiteAvatarLive({
4314
+ deployEnv,
4315
+ siteKey,
4316
+ site,
4317
+ manifestVersion,
4318
+ load
4319
+ }) {
4320
+ const key = typeof siteKey === "string" ? siteKey.trim() : "";
4321
+ if (key === "") return void 0;
4322
+ const alpha = typeof deployEnv === "string" && deployEnv.trim().toLowerCase() === "alpha";
4323
+ const accepted = alpha ? key === ALPHA_TEST_SITE_KEY || isRealSiteKey(key) : isRealSiteKey(key);
4324
+ if (!accepted) return void 0;
4325
+ return { site, load, manifestVersion, turnstileSiteKey: key };
4326
+ }
4164
4327
 
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 };
4328
+ 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
4329
  //# sourceMappingURL=index.mjs.map
4167
4330
  //# sourceMappingURL=index.mjs.map