@burdenoff/website-sdk 2026.829.2 → 2026.829.3
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/components/explore.js +62 -2
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +63 -3
- package/dist/components/explore.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +22 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +22 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +62 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +63 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{use-explore-chat-8eL7WdLc.d.mts → use-explore-chat-B-E7jN1H.d.mts} +5 -0
- package/dist/{use-explore-chat-8eL7WdLc.d.ts → use-explore-chat-B-E7jN1H.d.ts} +5 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -18,7 +18,7 @@ export { ProblemSolved, ProblemsSolvedSection, ProblemsSolvedSectionProps } from
|
|
|
18
18
|
export { DetectedPlatform, ElectronDownloadLink, ElectronDownloadLinkProps, detectElectronPlatform } from './components/electron-download.mjs';
|
|
19
19
|
export { ExplorePage, ExplorePageProps } from './components/explore.mjs';
|
|
20
20
|
export { ExploreCta, ExploreCtaProps } from './components/explore-cta.mjs';
|
|
21
|
-
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, e as EXPLORE_CATALOG_QUERY, f as EXPLORE_MESSAGE_QUERY, g as ExploreCatalog, h as ExploreCatalogQueryData, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, i as ExploreConversation, j as ExploreCtaKind, k as ExploreCtaLink, l as ExploreErrorCode, m as ExploreLimits, n as ExploreMessage, o as ExploreMessageQueryData, p as ExploreMessageRole, q as ExploreMessageStatus, r as ExploreProduct, s as ExploreReference, F as FALLBACK_EXPLORE_LIMITS, S as SEND_EXPLORE_MESSAGE_MUTATION, t as SendExploreMessageInput, v as SendExploreMessageMutationData, w as SendExploreMessageResult, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from './use-explore-chat-
|
|
21
|
+
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, e as EXPLORE_CATALOG_QUERY, f as EXPLORE_MESSAGE_QUERY, g as ExploreCatalog, h as ExploreCatalogQueryData, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, i as ExploreConversation, j as ExploreCtaKind, k as ExploreCtaLink, l as ExploreErrorCode, m as ExploreLimits, n as ExploreMessage, o as ExploreMessageQueryData, p as ExploreMessageRole, q as ExploreMessageStatus, r as ExploreProduct, s as ExploreReference, F as FALLBACK_EXPLORE_LIMITS, S as SEND_EXPLORE_MESSAGE_MUTATION, t as SendExploreMessageInput, v as SendExploreMessageMutationData, w as SendExploreMessageResult, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from './use-explore-chat-B-E7jN1H.mjs';
|
|
22
22
|
export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.mjs';
|
|
23
23
|
export { PageHead, PageHeadProps } from './seo/index.mjs';
|
|
24
24
|
export { ProductData, ProductProvider, ProductProviderProps, useProduct, useProductConfig } from './product/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { ProblemSolved, ProblemsSolvedSection, ProblemsSolvedSectionProps } from
|
|
|
18
18
|
export { DetectedPlatform, ElectronDownloadLink, ElectronDownloadLinkProps, detectElectronPlatform } from './components/electron-download.js';
|
|
19
19
|
export { ExplorePage, ExplorePageProps } from './components/explore.js';
|
|
20
20
|
export { ExploreCta, ExploreCtaProps } from './components/explore-cta.js';
|
|
21
|
-
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, e as EXPLORE_CATALOG_QUERY, f as EXPLORE_MESSAGE_QUERY, g as ExploreCatalog, h as ExploreCatalogQueryData, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, i as ExploreConversation, j as ExploreCtaKind, k as ExploreCtaLink, l as ExploreErrorCode, m as ExploreLimits, n as ExploreMessage, o as ExploreMessageQueryData, p as ExploreMessageRole, q as ExploreMessageStatus, r as ExploreProduct, s as ExploreReference, F as FALLBACK_EXPLORE_LIMITS, S as SEND_EXPLORE_MESSAGE_MUTATION, t as SendExploreMessageInput, v as SendExploreMessageMutationData, w as SendExploreMessageResult, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from './use-explore-chat-
|
|
21
|
+
export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, e as EXPLORE_CATALOG_QUERY, f as EXPLORE_MESSAGE_QUERY, g as ExploreCatalog, h as ExploreCatalogQueryData, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, i as ExploreConversation, j as ExploreCtaKind, k as ExploreCtaLink, l as ExploreErrorCode, m as ExploreLimits, n as ExploreMessage, o as ExploreMessageQueryData, p as ExploreMessageRole, q as ExploreMessageStatus, r as ExploreProduct, s as ExploreReference, F as FALLBACK_EXPLORE_LIMITS, S as SEND_EXPLORE_MESSAGE_MUTATION, t as SendExploreMessageInput, v as SendExploreMessageMutationData, w as SendExploreMessageResult, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from './use-explore-chat-B-E7jN1H.js';
|
|
22
22
|
export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.js';
|
|
23
23
|
export { PageHead, PageHeadProps } from './seo/index.js';
|
|
24
24
|
export { ProductData, ProductProvider, ProductProviderProps, useProduct, useProductConfig } from './product/index.js';
|
package/dist/index.js
CHANGED
|
@@ -5044,6 +5044,16 @@ var RECORD_EXPLORE_CLICK_MUTATION = (
|
|
|
5044
5044
|
}
|
|
5045
5045
|
`
|
|
5046
5046
|
);
|
|
5047
|
+
var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
|
|
5048
|
+
/* GraphQL */
|
|
5049
|
+
`
|
|
5050
|
+
mutation CreateExploreShareLink($conversationToken: String!) {
|
|
5051
|
+
createExploreShareLink(conversationToken: $conversationToken) {
|
|
5052
|
+
shareToken
|
|
5053
|
+
}
|
|
5054
|
+
}
|
|
5055
|
+
`
|
|
5056
|
+
);
|
|
5047
5057
|
|
|
5048
5058
|
// src/data/products.ts
|
|
5049
5059
|
var ECOSYSTEM_PRODUCTS = [
|
|
@@ -5976,6 +5986,16 @@ function useExploreChat(options = {}) {
|
|
|
5976
5986
|
return null;
|
|
5977
5987
|
}, [messages]);
|
|
5978
5988
|
const canSend = (phase === "ready" || phase === "error") && catalog.enabled && turnCount < catalog.limits.maxTurnsPerConversation;
|
|
5989
|
+
const createShareLink = React.useCallback(async () => {
|
|
5990
|
+
const token = conversationTokenRef.current;
|
|
5991
|
+
if (!token) return null;
|
|
5992
|
+
try {
|
|
5993
|
+
const result = await client.mutate(CREATE_EXPLORE_SHARE_LINK_MUTATION, { conversationToken: token });
|
|
5994
|
+
return result?.data?.createExploreShareLink?.shareToken ?? null;
|
|
5995
|
+
} catch {
|
|
5996
|
+
return null;
|
|
5997
|
+
}
|
|
5998
|
+
}, [client]);
|
|
5979
5999
|
const recordClick = React.useCallback(
|
|
5980
6000
|
(messageId, kind, url) => {
|
|
5981
6001
|
const token = conversationTokenRef.current;
|
|
@@ -6008,7 +6028,8 @@ function useExploreChat(options = {}) {
|
|
|
6008
6028
|
openConversation,
|
|
6009
6029
|
deleteConversation,
|
|
6010
6030
|
clearHistory,
|
|
6011
|
-
recordClick
|
|
6031
|
+
recordClick,
|
|
6032
|
+
createShareLink
|
|
6012
6033
|
};
|
|
6013
6034
|
}
|
|
6014
6035
|
var optimisticCounter = 0;
|
|
@@ -7011,7 +7032,8 @@ function ExplorePage({
|
|
|
7011
7032
|
openConversation,
|
|
7012
7033
|
deleteConversation,
|
|
7013
7034
|
clearHistory,
|
|
7014
|
-
recordClick
|
|
7035
|
+
recordClick,
|
|
7036
|
+
createShareLink
|
|
7015
7037
|
} = useExploreChat({ productSlug, pageUrl, onSend, examplePrompts });
|
|
7016
7038
|
const [draft, setDraft] = React.useState("");
|
|
7017
7039
|
const textareaRef = React.useRef(null);
|
|
@@ -7031,6 +7053,7 @@ function ExplorePage({
|
|
|
7031
7053
|
});
|
|
7032
7054
|
speechStopRef.current = speech.stop;
|
|
7033
7055
|
const [disclaimerOpen, setDisclaimerOpen] = React.useState(false);
|
|
7056
|
+
const [shareLabel, setShareLabel] = React.useState("Share");
|
|
7034
7057
|
const scrollRef = React.useRef(null);
|
|
7035
7058
|
const latestAssistantRef = React.useRef(null);
|
|
7036
7059
|
const alignedForRef = React.useRef(null);
|
|
@@ -7085,6 +7108,25 @@ function ExplorePage({
|
|
|
7085
7108
|
if (!el) return;
|
|
7086
7109
|
el.scrollTop = el.scrollHeight;
|
|
7087
7110
|
}, [activity, latestAssistantId, messages]);
|
|
7111
|
+
const handleShare = React.useCallback(async () => {
|
|
7112
|
+
setShareLabel("Copying\u2026");
|
|
7113
|
+
const token = await createShareLink();
|
|
7114
|
+
if (!token) {
|
|
7115
|
+
setShareLabel("Unavailable");
|
|
7116
|
+
setTimeout(() => setShareLabel("Share"), 2500);
|
|
7117
|
+
return;
|
|
7118
|
+
}
|
|
7119
|
+
const base = (pageUrl ?? window.location.href).split("?")[0];
|
|
7120
|
+
const url = `${base}?c=${encodeURIComponent(token)}`;
|
|
7121
|
+
try {
|
|
7122
|
+
await navigator.clipboard.writeText(url);
|
|
7123
|
+
setShareLabel("Copied");
|
|
7124
|
+
} catch {
|
|
7125
|
+
window.prompt("Copy this link", url);
|
|
7126
|
+
setShareLabel("Share");
|
|
7127
|
+
}
|
|
7128
|
+
setTimeout(() => setShareLabel("Share"), 2500);
|
|
7129
|
+
}, [createShareLink, pageUrl]);
|
|
7088
7130
|
const submitDraft = React.useCallback(() => {
|
|
7089
7131
|
const text = draft.trim();
|
|
7090
7132
|
if (!text || overLimit || busy || !canSend) return;
|
|
@@ -7167,6 +7209,24 @@ function ExplorePage({
|
|
|
7167
7209
|
]
|
|
7168
7210
|
}
|
|
7169
7211
|
),
|
|
7212
|
+
messages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7213
|
+
Button,
|
|
7214
|
+
{
|
|
7215
|
+
"data-boff-explore": "share",
|
|
7216
|
+
type: "button",
|
|
7217
|
+
size: "sm",
|
|
7218
|
+
variant: "ghost",
|
|
7219
|
+
className: "shrink-0 text-muted-foreground",
|
|
7220
|
+
title: "Copy a read-only link to this conversation",
|
|
7221
|
+
onClick: () => {
|
|
7222
|
+
void handleShare();
|
|
7223
|
+
},
|
|
7224
|
+
children: [
|
|
7225
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, { className: "h-3.5 w-3.5" }),
|
|
7226
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: shareLabel })
|
|
7227
|
+
]
|
|
7228
|
+
}
|
|
7229
|
+
) : null,
|
|
7170
7230
|
history.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7171
7231
|
Button,
|
|
7172
7232
|
{
|