@burdenoff/website-sdk 2026.1026.1 → 2026.1027.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.
- package/README.md +77 -1
- package/dist/components/explore.d.mts +1 -1
- package/dist/components/explore.d.ts +1 -1
- package/dist/components/explore.js +276 -37
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +276 -37
- package/dist/components/explore.mjs.map +1 -1
- package/dist/{explore-BRfKFfvI.d.mts → explore-BEgq1_0O.d.mts} +44 -1
- package/dist/{explore-DkfcKgp6.d.ts → explore-CHiP9u-4.d.ts} +44 -1
- package/dist/index.d.mts +60 -5
- package/dist/index.d.ts +60 -5
- package/dist/index.js +319 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +319 -40
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -159,7 +159,9 @@ function Header() {
|
|
|
159
159
|
|---|---|---|
|
|
160
160
|
| `seo` | – | Renders `PageHead` with these overrides. Omit to manage `<head>` yourself. |
|
|
161
161
|
| `productSlug` | – | The site this page is on. A soft hint to the assistant, not a hard filter. |
|
|
162
|
-
| `examplePrompts` | – | Prompt chips used only when the backend catalog supplies none. |
|
|
162
|
+
| `examplePrompts` | – | Prompt chips used only when the backend catalog supplies none. With `scope="product"` they are the only prompts shown, whatever the catalog has. |
|
|
163
|
+
| `scope` | `'portfolio'` | `'product'` (with `productSlug`) makes the assistant one product's own. See [One product's own assistant](#one-products-own-assistant). |
|
|
164
|
+
| `productName` | catalog name | The product's display name in the `product` scope. Default: the catalog's name for `productSlug`. |
|
|
163
165
|
| `className` | – | Extra classes on the page root. |
|
|
164
166
|
| `heightMode` | `'viewport'` | `viewport` pins the chat to the screen with an internally scrolling transcript, and is the only mode in which the component manages the host page's scroll position; `auto` lets the page grow and never touches its host's scrolling (for embedding). |
|
|
165
167
|
| `viewportOffset` | `0` | Chrome to subtract in `viewport` mode, **before the first measurement only**. A number is pixels; a string is any CSS length (`'4rem'`). Once mounted the pane measures its own top and this value stops being used — so an approximate header height is fine, and the on-screen keyboard is handled for you. |
|
|
@@ -167,6 +169,80 @@ function Header() {
|
|
|
167
169
|
| `onSend` | – | Fired with the message text each time a send is accepted (analytics). |
|
|
168
170
|
| `welcomeTitle` / `welcomeBody` | catalog values | Override the welcome copy. `welcomeTitle` **is** the page `<h1>`. |
|
|
169
171
|
|
|
172
|
+
#### One product's own assistant
|
|
173
|
+
|
|
174
|
+
By default the assistant speaks for the whole portfolio: a "Focus on a product"
|
|
175
|
+
picker lists every product, concept cards come from every product, and the
|
|
176
|
+
catalog's copy invites comparing products. A product site that wants its
|
|
177
|
+
assistant to be about that product alone passes `scope="product"` with its
|
|
178
|
+
`productSlug`, on `ExplorePage`, on the site-wide `ExplorePanel`, or on both.
|
|
179
|
+
`ExplorePanel` takes the same `scope`, `productName` and `examplePrompts` props
|
|
180
|
+
and passes them to its chat.
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
<ExplorePanel
|
|
184
|
+
open={open}
|
|
185
|
+
onOpenChange={setOpen}
|
|
186
|
+
productSlug="healthybowl"
|
|
187
|
+
scope="product"
|
|
188
|
+
productName="Healthy Bowl" // the panel is titled "Healthy Bowl assistant"
|
|
189
|
+
examplePrompts={[
|
|
190
|
+
"Our herd's health records are spread across three notebooks.",
|
|
191
|
+
'We only find out a field needs water once the crop is stressed.',
|
|
192
|
+
]}
|
|
193
|
+
/>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
In that scope:
|
|
197
|
+
|
|
198
|
+
- The panel's title is "{product} assistant", in the visitor's language and its
|
|
199
|
+
word order, named from `productName`, else from the catalog. Where a phone
|
|
200
|
+
leaves it too little room beside the tabs, it wraps to two lines, and the
|
|
201
|
+
header keeps its height. In English and most locales two lines hold the whole
|
|
202
|
+
title at 320px and wider; a narrower title box, such as Tamil's at 320px (its
|
|
203
|
+
tabs are wider), can still end the second line with an ellipsis.
|
|
204
|
+
- There is no product picker. Every question is asked about this product, also
|
|
205
|
+
in a conversation that was stored, reopened or shared with another focus; the
|
|
206
|
+
request carries `productSlug` as it always has.
|
|
207
|
+
- Only this product's concept cards show, and none at all when it has none.
|
|
208
|
+
- The example prompts are your `examplePrompts` and nothing else (each once,
|
|
209
|
+
blank ones dropped), whatever the catalog has. Only when you pass none does it
|
|
210
|
+
fall back to the catalog's, without any that name another product and without
|
|
211
|
+
the built-in "Which of your products fits a problem like mine?". Pass your
|
|
212
|
+
own: the catalog's are written for every site at once, and even the ones that
|
|
213
|
+
name no product describe other sites' problems. Pass them to the
|
|
214
|
+
product-scoped view itself (`ExplorePanel` or `ExplorePage`): an
|
|
215
|
+
`ExploreChatProvider`'s own `examplePrompts` only stand in until the catalog
|
|
216
|
+
loads.
|
|
217
|
+
- Unless you pass `welcomeBody`, the welcome invites the visitor to describe a
|
|
218
|
+
problem or ask what the product does, instead of the catalog's invitation to
|
|
219
|
+
compare products. A catalog title that names another product is replaced by
|
|
220
|
+
the built-in one. The welcome's "Compare across the ecosystem" tile is left
|
|
221
|
+
out.
|
|
222
|
+
- The composer is the published one, unchanged: the same layout, the same size
|
|
223
|
+
and the same fit to its draft. Only its placeholder's text is shorter, "Ask
|
|
224
|
+
about {product}…" instead of "Describe a problem, or ask about {product}…",
|
|
225
|
+
because on a phone the field stays one line tall and cuts off a placeholder
|
|
226
|
+
that wraps. The English one fits that line at 320px and wider. Some longer
|
|
227
|
+
locales, such as Spanish and Tamil, may still wrap at 320px and narrower; that
|
|
228
|
+
is left for a follow-up, and HealthyBowl, the site this was made for, is
|
|
229
|
+
English-only.
|
|
230
|
+
- The page's meta description (and its `og:` and `twitter:` copies) is the
|
|
231
|
+
product's own, "Answers about {product}, drawn from {product}'s
|
|
232
|
+
documentation…", never "and every other product we build". The title and
|
|
233
|
+
`og:site_name` name the product already.
|
|
234
|
+
- A question that needs more searches than one answer can make (`TOOL_BUDGET`)
|
|
235
|
+
is asked to be narrowed to one part of it, in the visitor's language, instead
|
|
236
|
+
of to "two or three specific products".
|
|
237
|
+
|
|
238
|
+
Answers still come from the backend unchanged: when a visitor asks about
|
|
239
|
+
another product, the answer and its sources can mention it. Each view applies
|
|
240
|
+
its own scope, so under an `ExploreChatProvider` a portfolio `/explore` page and
|
|
241
|
+
a product-scoped panel still share one conversation. Without a `productSlug`,
|
|
242
|
+
`scope="product"` has no product to pin to and behaves like the default (a
|
|
243
|
+
development build logs a warning). The default, `scope="portfolio"`, renders
|
|
244
|
+
exactly what it always has.
|
|
245
|
+
|
|
170
246
|
**`ExploreCta` props**: `variant` (`'header' \| 'mobile' \| 'floating'`, required),
|
|
171
247
|
`href` (default `/explore`), `label` (default `Ask AI`), `className`,
|
|
172
248
|
`onNavigate`, `onClick`, `currentPath`. The `floating` variant hides itself on
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export {
|
|
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-BEgq1_0O.mjs';
|
|
3
3
|
import '../explore-types-_9UJu6EA.mjs';
|
|
4
4
|
import 'react-markdown';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export {
|
|
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-CHiP9u-4.js';
|
|
3
3
|
import '../explore-types-_9UJu6EA.js';
|
|
4
4
|
import 'react-markdown';
|