@burdenoff/website-sdk 2026.922.5 → 2026.923.2

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.
@@ -1,180 +1,4 @@
1
- import * as react from 'react';
2
- import { E as ExploreProduct, a as ExploreReference } from '../explore-types-DvQPiL1t.mjs';
3
-
4
- interface ExplorePageProps {
5
- /**
6
- * SEO metadata. Every field is optional and each one falls back to a default
7
- * derived from {@link ExplorePageProps.productSlug}, so a site that passes
8
- * nothing still gets a correct head — see `defaultExploreSeo`.
9
- *
10
- * Pass this only to say something the default cannot. All 38 sites used to
11
- * hard-code the same two sentences here, which is how every one of them ended
12
- * up announcing "Explore Burdenoff products with AI" — product-first on a page
13
- * whose whole purpose is to ask the visitor about their problem, and simply
14
- * the wrong brand on 37 of them.
15
- */
16
- seo?: {
17
- title?: string;
18
- description?: string;
19
- keywords?: string;
20
- image?: string;
21
- url?: string;
22
- };
23
- /** Slug of the product site this page lives on — a soft hint to the harness. */
24
- productSlug?: string;
25
- /**
26
- * Example prompts shown when `exploreCatalog` supplies none. Resolution
27
- * order: catalog → this prop → the SDK's built-in list.
28
- */
29
- examplePrompts?: string[];
30
- /** Extra classes for the page root. */
31
- className?: string;
32
- /**
33
- * `viewport` (default) pins the chat to the viewport with an internally
34
- * scrolling transcript — the right feel for a dedicated `/explore` route.
35
- * `auto` lets the page grow, for embedding inside a longer page.
36
- *
37
- * `viewport` also means "this component IS the page": only in that mode does it take over
38
- * `history.scrollRestoration` and correct a restored scroll offset that has parked the
39
- * page in the site footer. An `auto` embed never touches its host page's scrolling.
40
- */
41
- heightMode?: "viewport" | "auto";
42
- /**
43
- * Chrome to subtract in `viewport` mode — the site header height. A number is treated as
44
- * pixels. Default `0`.
45
- *
46
- * Pre-measurement fallback ONLY. Once mounted the pane measures its own top, so an
47
- * approximate value is fine and the keyboard case is handled; see `measurePane` in
48
- * `ExplorePage`.
49
- */
50
- viewportOffset?: string | number;
51
- /** SPA navigation for internal CTA paths. Falls back to a plain link. */
52
- onNavigate?: (path: string) => void;
53
- /** Fired with the message text every time a send is accepted. */
54
- onSend?: (message: string) => void;
55
- /** Overrides `exploreCatalog.welcomeTitle` — also the page `<h1>`. */
56
- welcomeTitle?: string;
57
- /** Overrides `exploreCatalog.welcomeBody`. */
58
- welcomeBody?: string;
59
- /**
60
- * BCP-47 locale to render in. Defaults to the document's own `lang`, then the browser.
61
- * Only the six the products ship are recognised (en, zh, hi, es, ar, ta); anything else
62
- * falls back to English.
63
- */
64
- locale?: string;
65
- }
66
- /**
67
- * The product's own logo, derived from the reference's origin.
68
- *
69
- * Every Burdenoff product site serves `/favicon.svg`, so the logo needs no registry and no
70
- * bundled assets — the reference URL already names the product. Deliberately NOT
71
- * `/favicon-512.png`: that path returns 200 with `text/html` because the SPA fallback
72
- * answers unknown paths, so it would render as a broken image rather than 404 into the
73
- * fallback below.
74
- */
75
- declare function logoUrlOf(url: string): string | null;
76
- /**
77
- * Origins an answer may embed images from: every catalog product's website, apex and
78
- * `www.` alike (Botlit ships on www.botlit.ai, everything else on the apex, and either can
79
- * appear in the corpus). https only.
80
- */
81
- declare function inlineImageOrigins(products: readonly Pick<ExploreProduct, "website">[]): Set<string>;
82
- /**
83
- * True when `src` is an https URL on a catalog product site. The backend already strips
84
- * every image it did not put in the answer; this is the browser's own check, so a model
85
- * that slips an arbitrary URL past it still cannot make the visitor's browser fetch it.
86
- */
87
- declare function isInlineImageAllowed(src: unknown, origins: ReadonlySet<string>): src is string;
88
- /**
89
- * The kinds of page an answer can cite.
90
- *
91
- * `PAGE` is the catch-all for a catalog site's own marketing pages, so the list is total for
92
- * anything on one of our origins; a reference that is NOT on a catalog origin gets no kind at
93
- * all (see `referenceKindOf`).
94
- */
95
- type ExploreReferenceKind = "CONCEPT" | "DOCS" | "PRICING" | "USE_CASE" | "PAGE";
96
- /**
97
- * What KIND of page a reference points at, decided from its URL alone.
98
- *
99
- * Deliberately not from the title: titles are model-written prose in six languages, so
100
- * "Pricing" in one answer is "Precios" in the next and "Plans and pricing" in the one after.
101
- * The URL is the only part of a reference nobody paraphrases.
102
- *
103
- * Reasoned against the catalog origins exactly as `isInlineImageAllowed` is: a URL that is
104
- * not on a product site we list gets `null` rather than a guessed label, because the whole
105
- * value of the row is that it says what the evidence IS.
106
- */
107
- declare function referenceKindOf(url: string, origins: ReadonlySet<string>): ExploreReferenceKind | null;
108
- /**
109
- * Apex origin → the product's display name, built from the catalog the same way
110
- * `inlineImageOrigins` builds its allow-list.
111
- *
112
- * The display name matters: `ExploreReference.product` carries the slug, so a row built from
113
- * it says "vibecontrols" next to a page that calls itself VibeControls everywhere else.
114
- */
115
- declare function productNamesByOrigin(products: readonly Pick<ExploreProduct, "name" | "website">[]): Map<string, string>;
116
- /** The shape of one answer's evidence, as the chips render it. */
117
- interface ExploreProvenance {
118
- /** Every reference the answer cites, including any we could not classify. */
119
- total: number;
120
- /** Kinds present, in `REFERENCE_KIND_ORDER`, with how many sources each covers. */
121
- kinds: Array<{
122
- kind: ExploreReferenceKind;
123
- count: number;
124
- }>;
125
- /** Product names, in the order the answer first cited them. */
126
- products: string[];
127
- }
128
- /**
129
- * Summarise what an answer is grounded in. Pure, and derived entirely from `references` —
130
- * there is no backend field behind this row.
131
- */
132
- declare function summariseReferences(references: readonly ExploreReference[], origins: ReadonlySet<string>, productNames: ReadonlyMap<string, string>): ExploreProvenance;
133
- /**
134
- * An answer as READABLE TEXT, for the clipboard.
135
- *
136
- * What counts as "our internal markup artefacts", and why each choice:
137
- *
138
- * - **Image embeds go.** `![Concept illustration of …](https://…/01.webp)` is a picture this
139
- * page injected into the answer; pasted into an email it is a URL and an alt string, and
140
- * neither is the answer. The caption line the backend writes under it is ordinary prose and
141
- * stays.
142
- * - **Links become `label (url)`.** The destination is information the reader may need; the
143
- * bracket-paren syntax is not. Dropping the URL would quietly strip the page it came from.
144
- * - **Citation markers `[3]` stay.** They are the only attribution the copied text carries,
145
- * and they are the answer's own — not something the UI added. The sources they point at are
146
- * listed right next to the button that copied this.
147
- * - **Emphasis, headings, blockquote and rule markers go**, because `**` and `###` are
148
- * instructions to a renderer, not words.
149
- * - **A table keeps its pipes.** Pasted into a README, an issue or a chat it is a table
150
- * again; flattened into sentences it is not.
151
- * - **Fenced code is verbatim**, fences included, minus nothing but the fence lines
152
- * themselves: stripping `*` or `_` inside a code block would corrupt the code.
153
- *
154
- * Built from `message.content` rather than from the rendered DOM: `textContent` on the bubble
155
- * would fold every paragraph, list item and table cell into one run-on line.
156
- */
157
- declare function answerPlainText(markdown: string): string;
158
- /**
159
- * The same answer as something to SAY, for read-aloud.
160
- *
161
- * It shares every rule above but the two that are right for a paste and wrong for a voice:
162
- *
163
- * - **A link is its label.** The clipboard keeps `label (https://…)` because a pasted answer
164
- * loses the page otherwise. Spoken, that is a URL spelled out character by character in
165
- * the middle of a sentence — and the prompt asks for two to five links in every answer, so
166
- * it is not an edge case. The sources are listed under the answer either way.
167
- * - **A table is read as rows, not as pipes.** `| --- | --- |` is a line of punctuation and
168
- * the pipes are column rules, neither of which is a word. Each row is read with its cells
169
- * under their own column headings — the phone layout, out loud — so a plan list still says
170
- * which number is the price. Comparisons and plan lists are exactly the answers the
171
- * feature was built for (CONTRACT.md §7), which is what makes this worth a second mode.
172
- *
173
- * Everything else stays deliberately identical, including citation markers: they are the
174
- * answer's own attribution in both, and a listener hearing "two" after a claim is hearing
175
- * the same thing a reader sees.
176
- */
177
- declare function answerSpeechText(markdown: string): string;
178
- declare function ExplorePage({ seo, productSlug, examplePrompts, className, heightMode, viewportOffset, onNavigate, onSend, welcomeTitle, welcomeBody, locale, }: ExplorePageProps): react.JSX.Element;
179
-
180
- export { ExplorePage, type ExplorePageProps, type ExploreProvenance, type ExploreReferenceKind, answerPlainText, answerSpeechText, inlineImageOrigins, isInlineImageAllowed, logoUrlOf, productNamesByOrigin, referenceKindOf, summariseReferences };
1
+ import 'react';
2
+ export { c as ExplorePage, d as ExplorePageProps, h as ExploreProvenance, j as ExploreReferenceKind, e as answerPlainText, f as answerSpeechText, i as inlineImageOrigins, g as isInlineImageAllowed, l as logoUrlOf, p as productNamesByOrigin, r as referenceKindOf, s as summariseReferences } from '../explore-D25zoXy9.mjs';
3
+ import '../explore-types-B5sdOC5M.mjs';
4
+ import 'react-markdown';
@@ -1,180 +1,4 @@
1
- import * as react from 'react';
2
- import { E as ExploreProduct, a as ExploreReference } from '../explore-types-DvQPiL1t.js';
3
-
4
- interface ExplorePageProps {
5
- /**
6
- * SEO metadata. Every field is optional and each one falls back to a default
7
- * derived from {@link ExplorePageProps.productSlug}, so a site that passes
8
- * nothing still gets a correct head — see `defaultExploreSeo`.
9
- *
10
- * Pass this only to say something the default cannot. All 38 sites used to
11
- * hard-code the same two sentences here, which is how every one of them ended
12
- * up announcing "Explore Burdenoff products with AI" — product-first on a page
13
- * whose whole purpose is to ask the visitor about their problem, and simply
14
- * the wrong brand on 37 of them.
15
- */
16
- seo?: {
17
- title?: string;
18
- description?: string;
19
- keywords?: string;
20
- image?: string;
21
- url?: string;
22
- };
23
- /** Slug of the product site this page lives on — a soft hint to the harness. */
24
- productSlug?: string;
25
- /**
26
- * Example prompts shown when `exploreCatalog` supplies none. Resolution
27
- * order: catalog → this prop → the SDK's built-in list.
28
- */
29
- examplePrompts?: string[];
30
- /** Extra classes for the page root. */
31
- className?: string;
32
- /**
33
- * `viewport` (default) pins the chat to the viewport with an internally
34
- * scrolling transcript — the right feel for a dedicated `/explore` route.
35
- * `auto` lets the page grow, for embedding inside a longer page.
36
- *
37
- * `viewport` also means "this component IS the page": only in that mode does it take over
38
- * `history.scrollRestoration` and correct a restored scroll offset that has parked the
39
- * page in the site footer. An `auto` embed never touches its host page's scrolling.
40
- */
41
- heightMode?: "viewport" | "auto";
42
- /**
43
- * Chrome to subtract in `viewport` mode — the site header height. A number is treated as
44
- * pixels. Default `0`.
45
- *
46
- * Pre-measurement fallback ONLY. Once mounted the pane measures its own top, so an
47
- * approximate value is fine and the keyboard case is handled; see `measurePane` in
48
- * `ExplorePage`.
49
- */
50
- viewportOffset?: string | number;
51
- /** SPA navigation for internal CTA paths. Falls back to a plain link. */
52
- onNavigate?: (path: string) => void;
53
- /** Fired with the message text every time a send is accepted. */
54
- onSend?: (message: string) => void;
55
- /** Overrides `exploreCatalog.welcomeTitle` — also the page `<h1>`. */
56
- welcomeTitle?: string;
57
- /** Overrides `exploreCatalog.welcomeBody`. */
58
- welcomeBody?: string;
59
- /**
60
- * BCP-47 locale to render in. Defaults to the document's own `lang`, then the browser.
61
- * Only the six the products ship are recognised (en, zh, hi, es, ar, ta); anything else
62
- * falls back to English.
63
- */
64
- locale?: string;
65
- }
66
- /**
67
- * The product's own logo, derived from the reference's origin.
68
- *
69
- * Every Burdenoff product site serves `/favicon.svg`, so the logo needs no registry and no
70
- * bundled assets — the reference URL already names the product. Deliberately NOT
71
- * `/favicon-512.png`: that path returns 200 with `text/html` because the SPA fallback
72
- * answers unknown paths, so it would render as a broken image rather than 404 into the
73
- * fallback below.
74
- */
75
- declare function logoUrlOf(url: string): string | null;
76
- /**
77
- * Origins an answer may embed images from: every catalog product's website, apex and
78
- * `www.` alike (Botlit ships on www.botlit.ai, everything else on the apex, and either can
79
- * appear in the corpus). https only.
80
- */
81
- declare function inlineImageOrigins(products: readonly Pick<ExploreProduct, "website">[]): Set<string>;
82
- /**
83
- * True when `src` is an https URL on a catalog product site. The backend already strips
84
- * every image it did not put in the answer; this is the browser's own check, so a model
85
- * that slips an arbitrary URL past it still cannot make the visitor's browser fetch it.
86
- */
87
- declare function isInlineImageAllowed(src: unknown, origins: ReadonlySet<string>): src is string;
88
- /**
89
- * The kinds of page an answer can cite.
90
- *
91
- * `PAGE` is the catch-all for a catalog site's own marketing pages, so the list is total for
92
- * anything on one of our origins; a reference that is NOT on a catalog origin gets no kind at
93
- * all (see `referenceKindOf`).
94
- */
95
- type ExploreReferenceKind = "CONCEPT" | "DOCS" | "PRICING" | "USE_CASE" | "PAGE";
96
- /**
97
- * What KIND of page a reference points at, decided from its URL alone.
98
- *
99
- * Deliberately not from the title: titles are model-written prose in six languages, so
100
- * "Pricing" in one answer is "Precios" in the next and "Plans and pricing" in the one after.
101
- * The URL is the only part of a reference nobody paraphrases.
102
- *
103
- * Reasoned against the catalog origins exactly as `isInlineImageAllowed` is: a URL that is
104
- * not on a product site we list gets `null` rather than a guessed label, because the whole
105
- * value of the row is that it says what the evidence IS.
106
- */
107
- declare function referenceKindOf(url: string, origins: ReadonlySet<string>): ExploreReferenceKind | null;
108
- /**
109
- * Apex origin → the product's display name, built from the catalog the same way
110
- * `inlineImageOrigins` builds its allow-list.
111
- *
112
- * The display name matters: `ExploreReference.product` carries the slug, so a row built from
113
- * it says "vibecontrols" next to a page that calls itself VibeControls everywhere else.
114
- */
115
- declare function productNamesByOrigin(products: readonly Pick<ExploreProduct, "name" | "website">[]): Map<string, string>;
116
- /** The shape of one answer's evidence, as the chips render it. */
117
- interface ExploreProvenance {
118
- /** Every reference the answer cites, including any we could not classify. */
119
- total: number;
120
- /** Kinds present, in `REFERENCE_KIND_ORDER`, with how many sources each covers. */
121
- kinds: Array<{
122
- kind: ExploreReferenceKind;
123
- count: number;
124
- }>;
125
- /** Product names, in the order the answer first cited them. */
126
- products: string[];
127
- }
128
- /**
129
- * Summarise what an answer is grounded in. Pure, and derived entirely from `references` —
130
- * there is no backend field behind this row.
131
- */
132
- declare function summariseReferences(references: readonly ExploreReference[], origins: ReadonlySet<string>, productNames: ReadonlyMap<string, string>): ExploreProvenance;
133
- /**
134
- * An answer as READABLE TEXT, for the clipboard.
135
- *
136
- * What counts as "our internal markup artefacts", and why each choice:
137
- *
138
- * - **Image embeds go.** `![Concept illustration of …](https://…/01.webp)` is a picture this
139
- * page injected into the answer; pasted into an email it is a URL and an alt string, and
140
- * neither is the answer. The caption line the backend writes under it is ordinary prose and
141
- * stays.
142
- * - **Links become `label (url)`.** The destination is information the reader may need; the
143
- * bracket-paren syntax is not. Dropping the URL would quietly strip the page it came from.
144
- * - **Citation markers `[3]` stay.** They are the only attribution the copied text carries,
145
- * and they are the answer's own — not something the UI added. The sources they point at are
146
- * listed right next to the button that copied this.
147
- * - **Emphasis, headings, blockquote and rule markers go**, because `**` and `###` are
148
- * instructions to a renderer, not words.
149
- * - **A table keeps its pipes.** Pasted into a README, an issue or a chat it is a table
150
- * again; flattened into sentences it is not.
151
- * - **Fenced code is verbatim**, fences included, minus nothing but the fence lines
152
- * themselves: stripping `*` or `_` inside a code block would corrupt the code.
153
- *
154
- * Built from `message.content` rather than from the rendered DOM: `textContent` on the bubble
155
- * would fold every paragraph, list item and table cell into one run-on line.
156
- */
157
- declare function answerPlainText(markdown: string): string;
158
- /**
159
- * The same answer as something to SAY, for read-aloud.
160
- *
161
- * It shares every rule above but the two that are right for a paste and wrong for a voice:
162
- *
163
- * - **A link is its label.** The clipboard keeps `label (https://…)` because a pasted answer
164
- * loses the page otherwise. Spoken, that is a URL spelled out character by character in
165
- * the middle of a sentence — and the prompt asks for two to five links in every answer, so
166
- * it is not an edge case. The sources are listed under the answer either way.
167
- * - **A table is read as rows, not as pipes.** `| --- | --- |` is a line of punctuation and
168
- * the pipes are column rules, neither of which is a word. Each row is read with its cells
169
- * under their own column headings — the phone layout, out loud — so a plan list still says
170
- * which number is the price. Comparisons and plan lists are exactly the answers the
171
- * feature was built for (CONTRACT.md §7), which is what makes this worth a second mode.
172
- *
173
- * Everything else stays deliberately identical, including citation markers: they are the
174
- * answer's own attribution in both, and a listener hearing "two" after a claim is hearing
175
- * the same thing a reader sees.
176
- */
177
- declare function answerSpeechText(markdown: string): string;
178
- declare function ExplorePage({ seo, productSlug, examplePrompts, className, heightMode, viewportOffset, onNavigate, onSend, welcomeTitle, welcomeBody, locale, }: ExplorePageProps): react.JSX.Element;
179
-
180
- export { ExplorePage, type ExplorePageProps, type ExploreProvenance, type ExploreReferenceKind, answerPlainText, answerSpeechText, inlineImageOrigins, isInlineImageAllowed, logoUrlOf, productNamesByOrigin, referenceKindOf, summariseReferences };
1
+ import 'react';
2
+ export { c as ExplorePage, d as ExplorePageProps, h as ExploreProvenance, j as ExploreReferenceKind, e as answerPlainText, f as answerSpeechText, i as inlineImageOrigins, g as isInlineImageAllowed, l as logoUrlOf, p as productNamesByOrigin, r as referenceKindOf, s as summariseReferences } from '../explore-I4QnY4J9.js';
3
+ import '../explore-types-B5sdOC5M.js';
4
+ import 'react-markdown';