@burdenoff/website-sdk 2026.829.2 → 2026.829.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/components/explore.js +86 -2
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +87 -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 +86 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -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/hooks/index.mjs
CHANGED
|
@@ -327,6 +327,16 @@ var RECORD_EXPLORE_CLICK_MUTATION = (
|
|
|
327
327
|
}
|
|
328
328
|
`
|
|
329
329
|
);
|
|
330
|
+
var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
|
|
331
|
+
/* GraphQL */
|
|
332
|
+
`
|
|
333
|
+
mutation CreateExploreShareLink($conversationToken: String!) {
|
|
334
|
+
createExploreShareLink(conversationToken: $conversationToken) {
|
|
335
|
+
shareToken
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
`
|
|
339
|
+
);
|
|
330
340
|
|
|
331
341
|
// src/data/products.ts
|
|
332
342
|
var ECOSYSTEM_PRODUCTS = [
|
|
@@ -1259,6 +1269,16 @@ function useExploreChat(options = {}) {
|
|
|
1259
1269
|
return null;
|
|
1260
1270
|
}, [messages]);
|
|
1261
1271
|
const canSend = (phase === "ready" || phase === "error") && catalog.enabled && turnCount < catalog.limits.maxTurnsPerConversation;
|
|
1272
|
+
const createShareLink = useCallback(async () => {
|
|
1273
|
+
const token = conversationTokenRef.current;
|
|
1274
|
+
if (!token) return null;
|
|
1275
|
+
try {
|
|
1276
|
+
const result = await client.mutate(CREATE_EXPLORE_SHARE_LINK_MUTATION, { conversationToken: token });
|
|
1277
|
+
return result?.data?.createExploreShareLink?.shareToken ?? null;
|
|
1278
|
+
} catch {
|
|
1279
|
+
return null;
|
|
1280
|
+
}
|
|
1281
|
+
}, [client]);
|
|
1262
1282
|
const recordClick = useCallback(
|
|
1263
1283
|
(messageId, kind, url) => {
|
|
1264
1284
|
const token = conversationTokenRef.current;
|
|
@@ -1291,7 +1311,8 @@ function useExploreChat(options = {}) {
|
|
|
1291
1311
|
openConversation,
|
|
1292
1312
|
deleteConversation,
|
|
1293
1313
|
clearHistory,
|
|
1294
|
-
recordClick
|
|
1314
|
+
recordClick,
|
|
1315
|
+
createShareLink
|
|
1295
1316
|
};
|
|
1296
1317
|
}
|
|
1297
1318
|
var optimisticCounter = 0;
|