@uptrademedia/site-kit 1.0.38 → 1.0.40
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/api-BoW4FSlW.d.mts +671 -0
- package/dist/api-BoW4FSlW.d.ts +671 -0
- package/dist/{chunk-X66VOCWP.mjs → chunk-35Y3M4ZE.mjs} +6 -2
- package/dist/chunk-35Y3M4ZE.mjs.map +1 -0
- package/dist/{chunk-DRFTRTKV.js → chunk-5TTUNB63.js} +6 -2
- package/dist/chunk-5TTUNB63.js.map +1 -0
- package/dist/{chunk-KBS3KW2U.js → chunk-F6D3L676.js} +4 -4
- package/dist/{chunk-KBS3KW2U.js.map → chunk-F6D3L676.js.map} +1 -1
- package/dist/{chunk-Y4BW6XYJ.js → chunk-JRCYNWUZ.js} +6 -2
- package/dist/chunk-JRCYNWUZ.js.map +1 -0
- package/dist/chunk-K4B34K4J.mjs +306 -0
- package/dist/chunk-K4B34K4J.mjs.map +1 -0
- package/dist/{chunk-6ONUXZDO.mjs → chunk-QT73LSTP.mjs} +19 -4
- package/dist/chunk-QT73LSTP.mjs.map +1 -0
- package/dist/{chunk-CG53ASWX.mjs → chunk-SVSZVPP6.mjs} +36 -238
- package/dist/chunk-SVSZVPP6.mjs.map +1 -0
- package/dist/{chunk-EL5QTAA3.mjs → chunk-TEYPRKYU.mjs} +6 -2
- package/dist/chunk-TEYPRKYU.mjs.map +1 -0
- package/dist/{chunk-IT6R5VAZ.mjs → chunk-WZMRFNJK.mjs} +4 -4
- package/dist/{chunk-IT6R5VAZ.mjs.map → chunk-WZMRFNJK.mjs.map} +1 -1
- package/dist/chunk-XXAO5WVO.js +316 -0
- package/dist/chunk-XXAO5WVO.js.map +1 -0
- package/dist/{chunk-S2GXR5HY.js → chunk-ZG2AGGPZ.js} +19 -4
- package/dist/chunk-ZG2AGGPZ.js.map +1 -0
- package/dist/{chunk-VOR53RUR.js → chunk-ZVIOI47K.js} +35 -244
- package/dist/chunk-ZVIOI47K.js.map +1 -0
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.mjs +1 -1
- package/dist/{generators-TYPILCWD.mjs → generators-H6YQQRR4.mjs} +3 -3
- package/dist/{generators-TYPILCWD.mjs.map → generators-H6YQQRR4.mjs.map} +1 -1
- package/dist/{generators-5EU4PTVF.js → generators-HZZLGIUB.js} +9 -9
- package/dist/{generators-5EU4PTVF.js.map → generators-HZZLGIUB.js.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/llms/index.d.mts +24 -649
- package/dist/llms/index.d.ts +24 -649
- package/dist/llms/index.js +34 -25
- package/dist/llms/index.mjs +2 -1
- package/dist/seo/register-sitemap-cli.mjs +0 -0
- package/dist/setup/client.js +7 -7
- package/dist/setup/client.mjs +2 -2
- package/dist/setup/index.js +9 -9
- package/dist/setup/index.mjs +3 -3
- package/dist/setup/server.js +2 -2
- package/dist/setup/server.mjs +1 -1
- package/dist/sitemap/index.d.mts +14 -2
- package/dist/sitemap/index.d.ts +14 -2
- package/dist/sitemap/index.js +30 -5
- package/dist/sitemap/index.js.map +1 -1
- package/dist/sitemap/index.mjs +30 -5
- package/dist/sitemap/index.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/chunk-6ONUXZDO.mjs.map +0 -1
- package/dist/chunk-CG53ASWX.mjs.map +0 -1
- package/dist/chunk-DRFTRTKV.js.map +0 -1
- package/dist/chunk-EL5QTAA3.mjs.map +0 -1
- package/dist/chunk-S2GXR5HY.js.map +0 -1
- package/dist/chunk-VOR53RUR.js.map +0 -1
- package/dist/chunk-X66VOCWP.mjs.map +0 -1
- package/dist/chunk-Y4BW6XYJ.js.map +0 -1
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @uptrade/site-kit/llms - Types
|
|
5
|
+
*
|
|
6
|
+
* LLM Visibility Types for Answer Engine Optimization (AEO)
|
|
7
|
+
*/
|
|
8
|
+
interface LLMBusinessInfo {
|
|
9
|
+
/** Business/organization name */
|
|
10
|
+
name: string;
|
|
11
|
+
/** One-line tagline or mission */
|
|
12
|
+
tagline?: string;
|
|
13
|
+
/** Longer description (1-3 paragraphs) */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Industry/category */
|
|
16
|
+
industry?: string;
|
|
17
|
+
/** Primary service area (city, region, or "nationwide") */
|
|
18
|
+
service_area?: string;
|
|
19
|
+
/** Year established */
|
|
20
|
+
founded?: string;
|
|
21
|
+
/** Website URL */
|
|
22
|
+
website: string;
|
|
23
|
+
}
|
|
24
|
+
interface LLMContactInfo {
|
|
25
|
+
/** Primary phone */
|
|
26
|
+
phone?: string;
|
|
27
|
+
/** Primary email */
|
|
28
|
+
email?: string;
|
|
29
|
+
/** Street address */
|
|
30
|
+
address?: string;
|
|
31
|
+
/** City */
|
|
32
|
+
city?: string;
|
|
33
|
+
/** State/province */
|
|
34
|
+
state?: string;
|
|
35
|
+
/** ZIP/postal code */
|
|
36
|
+
postal_code?: string;
|
|
37
|
+
/** Country */
|
|
38
|
+
country?: string;
|
|
39
|
+
/** Business hours (e.g., "Mon-Fri 9am-5pm EST") */
|
|
40
|
+
hours?: string;
|
|
41
|
+
}
|
|
42
|
+
interface LLMService {
|
|
43
|
+
/** Service name */
|
|
44
|
+
name: string;
|
|
45
|
+
/** Brief description */
|
|
46
|
+
description: string;
|
|
47
|
+
/** URL path to service page */
|
|
48
|
+
url?: string;
|
|
49
|
+
}
|
|
50
|
+
interface LLMFAQItem {
|
|
51
|
+
/** Question */
|
|
52
|
+
question: string;
|
|
53
|
+
/** Answer */
|
|
54
|
+
answer: string;
|
|
55
|
+
}
|
|
56
|
+
interface LLMPageSummary {
|
|
57
|
+
/** Page path */
|
|
58
|
+
path: string;
|
|
59
|
+
/** Page title */
|
|
60
|
+
title: string;
|
|
61
|
+
/** Brief description of page content */
|
|
62
|
+
description?: string;
|
|
63
|
+
}
|
|
64
|
+
interface GenerateLLMSTxtOptions {
|
|
65
|
+
/** Project ID for fetching data (optional - uses API key's project) */
|
|
66
|
+
projectId?: string;
|
|
67
|
+
/** Include business info section */
|
|
68
|
+
includeBusinessInfo?: boolean;
|
|
69
|
+
/** Include services list */
|
|
70
|
+
includeServices?: boolean;
|
|
71
|
+
/** Include FAQ section */
|
|
72
|
+
includeFAQ?: boolean;
|
|
73
|
+
/** Include page index */
|
|
74
|
+
includePages?: boolean;
|
|
75
|
+
/** Include contact info */
|
|
76
|
+
includeContact?: boolean;
|
|
77
|
+
/** Maximum number of FAQ items */
|
|
78
|
+
maxFAQItems?: number;
|
|
79
|
+
/** Maximum number of pages to list */
|
|
80
|
+
maxPages?: number;
|
|
81
|
+
/** Custom sections to append */
|
|
82
|
+
customSections?: Array<{
|
|
83
|
+
title: string;
|
|
84
|
+
content: string;
|
|
85
|
+
}>;
|
|
86
|
+
}
|
|
87
|
+
interface LLMSTxtContent {
|
|
88
|
+
/** Raw markdown content */
|
|
89
|
+
markdown: string;
|
|
90
|
+
/** Metadata about generation */
|
|
91
|
+
metadata: {
|
|
92
|
+
generated_at: string;
|
|
93
|
+
project_id: string;
|
|
94
|
+
sections: string[];
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
interface SpeakableConfig {
|
|
98
|
+
/** CSS selectors for speakable content */
|
|
99
|
+
cssSelectors?: string[];
|
|
100
|
+
/** XPath selectors for speakable content */
|
|
101
|
+
xPaths?: string[];
|
|
102
|
+
}
|
|
103
|
+
interface SpeakableSchemaProps {
|
|
104
|
+
/** Page type - Article or WebPage */
|
|
105
|
+
type: 'Article' | 'WebPage';
|
|
106
|
+
/** Page name/title */
|
|
107
|
+
name: string;
|
|
108
|
+
/** Page URL */
|
|
109
|
+
url: string;
|
|
110
|
+
/** Speakable content selectors */
|
|
111
|
+
speakable: SpeakableConfig;
|
|
112
|
+
/** Additional schema properties */
|
|
113
|
+
additionalProperties?: Record<string, unknown>;
|
|
114
|
+
}
|
|
115
|
+
interface AEOBlockProps {
|
|
116
|
+
/** Block ID for speakable reference */
|
|
117
|
+
id?: string;
|
|
118
|
+
/** Type of content block */
|
|
119
|
+
type: 'summary' | 'definition' | 'answer' | 'list' | 'steps' | 'comparison';
|
|
120
|
+
/** Optional question (for Q&A format) */
|
|
121
|
+
question?: string;
|
|
122
|
+
/** Whether to mark as speakable */
|
|
123
|
+
speakable?: boolean;
|
|
124
|
+
/** Entity ID for knowledge graph linking */
|
|
125
|
+
entityId?: string;
|
|
126
|
+
/** Children content */
|
|
127
|
+
children: React.ReactNode;
|
|
128
|
+
/** Optional CSS class */
|
|
129
|
+
className?: string;
|
|
130
|
+
}
|
|
131
|
+
interface AEOSummaryProps {
|
|
132
|
+
/** Title for the summary */
|
|
133
|
+
title?: string;
|
|
134
|
+
/** Key points to highlight */
|
|
135
|
+
points: string[];
|
|
136
|
+
/** Whether to mark as speakable */
|
|
137
|
+
speakable?: boolean;
|
|
138
|
+
/** Entity ID for knowledge graph linking */
|
|
139
|
+
entityId?: string;
|
|
140
|
+
/** Optional CSS class */
|
|
141
|
+
className?: string;
|
|
142
|
+
}
|
|
143
|
+
interface AEODefinitionProps {
|
|
144
|
+
/** Term being defined */
|
|
145
|
+
term: string;
|
|
146
|
+
/** Definition */
|
|
147
|
+
definition: string;
|
|
148
|
+
/** Whether to mark as speakable */
|
|
149
|
+
speakable?: boolean;
|
|
150
|
+
/** Entity ID for knowledge graph linking */
|
|
151
|
+
entityId?: string;
|
|
152
|
+
/** Source for the definition (e.g., statute code) */
|
|
153
|
+
source?: string;
|
|
154
|
+
/** Optional CSS class */
|
|
155
|
+
className?: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* AEOClaimProps - AI-Verifiable Claim with Provenance
|
|
159
|
+
*
|
|
160
|
+
* For wrapping factual claims with machine-readable source attribution.
|
|
161
|
+
* LLMs heavily favor content with verifiable sources and confidence scores.
|
|
162
|
+
*/
|
|
163
|
+
interface AEOClaimProps {
|
|
164
|
+
/** Source reference (e.g., "KRS 281A.170", "NIH Study 2024") */
|
|
165
|
+
source: string;
|
|
166
|
+
/** URL to source document */
|
|
167
|
+
sourceUrl?: string;
|
|
168
|
+
/** Confidence score 0-1 */
|
|
169
|
+
confidence?: number;
|
|
170
|
+
/** Type of claim */
|
|
171
|
+
claimType?: 'fact' | 'statute' | 'study' | 'quote' | 'statistic';
|
|
172
|
+
/** When the source was retrieved */
|
|
173
|
+
retrievedAt?: string;
|
|
174
|
+
/** Children content */
|
|
175
|
+
children: React.ReactNode;
|
|
176
|
+
/** Optional CSS class */
|
|
177
|
+
className?: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* AEOEntityProps - Inline Entity Annotation
|
|
181
|
+
*
|
|
182
|
+
* For annotating entity mentions with knowledge graph IDs.
|
|
183
|
+
*/
|
|
184
|
+
interface AEOEntityProps {
|
|
185
|
+
/** Entity ID from knowledge graph */
|
|
186
|
+
entityId: string;
|
|
187
|
+
/** Entity type */
|
|
188
|
+
entityType: 'organization' | 'person' | 'service' | 'product' | 'location' | 'concept' | 'credential';
|
|
189
|
+
/** Canonical entity name */
|
|
190
|
+
name: string;
|
|
191
|
+
/** Entity URL */
|
|
192
|
+
url?: string;
|
|
193
|
+
/** Children content */
|
|
194
|
+
children: React.ReactNode;
|
|
195
|
+
/** Optional CSS class */
|
|
196
|
+
className?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* ContentProvenance - Source attribution for content
|
|
200
|
+
*
|
|
201
|
+
* Links content to authoritative sources for AI verification.
|
|
202
|
+
*/
|
|
203
|
+
interface ContentProvenance {
|
|
204
|
+
/** Unique provenance ID */
|
|
205
|
+
id: string;
|
|
206
|
+
/** Type of source */
|
|
207
|
+
source_type: 'press_release' | 'news_article' | 'legal_statute' | 'research_paper' | 'official_document' | 'internal' | 'citation';
|
|
208
|
+
/** Source title */
|
|
209
|
+
title: string;
|
|
210
|
+
/** Source URL */
|
|
211
|
+
url?: string;
|
|
212
|
+
/** Publisher/organization name */
|
|
213
|
+
publisher?: string;
|
|
214
|
+
/** Publication date */
|
|
215
|
+
published_at?: string;
|
|
216
|
+
/** Date accessed */
|
|
217
|
+
accessed_at?: string;
|
|
218
|
+
/** Brief excerpt or summary */
|
|
219
|
+
excerpt?: string;
|
|
220
|
+
/** Confidence score 0-1 */
|
|
221
|
+
confidence?: number;
|
|
222
|
+
/** DOI or other identifier */
|
|
223
|
+
identifier?: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* AEOProvenanceListProps - Display provenance sources
|
|
227
|
+
*/
|
|
228
|
+
interface AEOProvenanceListProps {
|
|
229
|
+
/** List of provenance sources */
|
|
230
|
+
sources: ContentProvenance[];
|
|
231
|
+
/** Title for the section */
|
|
232
|
+
title?: string;
|
|
233
|
+
/** Optional CSS class */
|
|
234
|
+
className?: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* AEOCitedContentProps - Content with inline citations
|
|
238
|
+
*
|
|
239
|
+
* Wraps content that has numbered citations referencing provenance sources.
|
|
240
|
+
*/
|
|
241
|
+
interface AEOCitedContentProps {
|
|
242
|
+
/** Content with [1], [2] style inline citations */
|
|
243
|
+
children: React.ReactNode;
|
|
244
|
+
/** Provenance sources (index matches citation number) */
|
|
245
|
+
sources: ContentProvenance[];
|
|
246
|
+
/** Whether to show sources list at bottom */
|
|
247
|
+
showSourcesList?: boolean;
|
|
248
|
+
/** Optional CSS class */
|
|
249
|
+
className?: string;
|
|
250
|
+
}
|
|
251
|
+
interface LLMsDataResponse {
|
|
252
|
+
business: LLMBusinessInfo;
|
|
253
|
+
contact?: LLMContactInfo;
|
|
254
|
+
services: LLMService[];
|
|
255
|
+
faq: LLMFAQItem[];
|
|
256
|
+
pages: LLMPageSummary[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @uptrade/site-kit/llms - llms.txt Generator
|
|
261
|
+
*
|
|
262
|
+
* Generates llms.txt content following the llms.txt specification.
|
|
263
|
+
* https://llmstxt.org/
|
|
264
|
+
*
|
|
265
|
+
* The llms.txt file provides a markdown-formatted overview of a website
|
|
266
|
+
* specifically designed for LLM consumption. It helps AI systems understand
|
|
267
|
+
* what a business does, what services it offers, and how to answer questions.
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Generate llms.txt content from Portal data
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```ts
|
|
275
|
+
* // app/llms.txt/route.ts
|
|
276
|
+
* import { generateLLMsTxt } from '@uptrade/site-kit/llms'
|
|
277
|
+
*
|
|
278
|
+
* export async function GET() {
|
|
279
|
+
* const { markdown } = await generateLLMsTxt({
|
|
280
|
+
* projectId: process.env.UPTRADE_PROJECT_ID!
|
|
281
|
+
* })
|
|
282
|
+
*
|
|
283
|
+
* return new Response(markdown, {
|
|
284
|
+
* headers: { 'Content-Type': 'text/plain; charset=utf-8' }
|
|
285
|
+
* })
|
|
286
|
+
* }
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
declare function generateLLMsTxt(options: GenerateLLMSTxtOptions): Promise<LLMSTxtContent>;
|
|
290
|
+
/**
|
|
291
|
+
* Generate llms-full.txt with comprehensive knowledge dump
|
|
292
|
+
* Use this for AI systems that can handle larger context
|
|
293
|
+
*/
|
|
294
|
+
declare function generateLLMsFullTxt(options: GenerateLLMSTxtOptions): Promise<LLMSTxtContent>;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @uptrade/site-kit/llms - Next.js Route Handlers
|
|
298
|
+
*
|
|
299
|
+
* Ready-to-use route handlers for /llms.txt and /llms-full.txt
|
|
300
|
+
*/
|
|
301
|
+
|
|
302
|
+
interface LLMsTxtHandlerOptions extends GenerateLLMSTxtOptions {
|
|
303
|
+
/** When true, serve static public/llms.txt if it exists (for build-time optimized output) */
|
|
304
|
+
preferStatic?: boolean;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Create a route handler for /llms.txt
|
|
308
|
+
*
|
|
309
|
+
* Zero-config by default - uses NEXT_PUBLIC_UPTRADE_API_KEY from environment.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* // app/llms.txt/route.ts (zero-config)
|
|
314
|
+
* import { createLLMsTxtHandler } from '@uptrade/site-kit/llms'
|
|
315
|
+
*
|
|
316
|
+
* export const GET = createLLMsTxtHandler()
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* ```ts
|
|
321
|
+
* // With preferStatic: serve build-time file if exists
|
|
322
|
+
* export const GET = createLLMsTxtHandler({
|
|
323
|
+
* preferStatic: true,
|
|
324
|
+
* includeServices: false
|
|
325
|
+
* })
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
declare function createLLMsTxtHandler(options?: LLMsTxtHandlerOptions): () => Promise<Response>;
|
|
329
|
+
/**
|
|
330
|
+
* Create a route handler for /llms-full.txt
|
|
331
|
+
*
|
|
332
|
+
* Zero-config by default - uses NEXT_PUBLIC_UPTRADE_API_KEY from environment.
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```ts
|
|
336
|
+
* // app/llms-full.txt/route.ts (zero-config)
|
|
337
|
+
* import { createLLMsFullTxtHandler } from '@uptrade/site-kit/llms'
|
|
338
|
+
*
|
|
339
|
+
* export const GET = createLLMsFullTxtHandler()
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
declare function createLLMsFullTxtHandler(options?: LLMsTxtHandlerOptions): () => Promise<Response>;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @uptrade/site-kit/llms - Speakable Schema Generator
|
|
346
|
+
*
|
|
347
|
+
* Generates JSON-LD with SpeakableSpecification for voice assistant
|
|
348
|
+
* and AI system content extraction.
|
|
349
|
+
*
|
|
350
|
+
* @see https://schema.org/speakable
|
|
351
|
+
* @see https://developers.google.com/search/docs/appearance/structured-data/speakable
|
|
352
|
+
*/
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Generate a WebPage or Article schema with speakable specification
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```tsx
|
|
359
|
+
* // In a page component
|
|
360
|
+
* <SpeakableSchema
|
|
361
|
+
* type="Article"
|
|
362
|
+
* name="Family Law Services in Cincinnati"
|
|
363
|
+
* url="https://heinrichlaw.com/family-law"
|
|
364
|
+
* speakable={{
|
|
365
|
+
* cssSelectors: ['.page-summary', '.key-points', 'h1']
|
|
366
|
+
* }}
|
|
367
|
+
* />
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
declare function SpeakableSchema({ type, name, url, speakable, additionalProperties, }: SpeakableSchemaProps): React$1.ReactElement;
|
|
371
|
+
/**
|
|
372
|
+
* Create speakable schema object (for manual use or testing)
|
|
373
|
+
*/
|
|
374
|
+
declare function createSpeakableSchema(type: 'Article' | 'WebPage', name: string, url: string, speakable: SpeakableConfig, additionalProperties?: Record<string, unknown>): Record<string, unknown>;
|
|
375
|
+
/**
|
|
376
|
+
* Default speakable CSS selectors for common page elements
|
|
377
|
+
*/
|
|
378
|
+
declare const DEFAULT_SPEAKABLE_SELECTORS: {
|
|
379
|
+
/** Standard page elements */
|
|
380
|
+
page: string[];
|
|
381
|
+
/** Article/blog post elements */
|
|
382
|
+
article: string[];
|
|
383
|
+
/** Service page elements */
|
|
384
|
+
service: string[];
|
|
385
|
+
/** FAQ page elements */
|
|
386
|
+
faq: string[];
|
|
387
|
+
/** Contact page elements */
|
|
388
|
+
contact: string[];
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Get recommended speakable selectors for a page type
|
|
392
|
+
*/
|
|
393
|
+
declare function getSpeakableSelectorsForPage(pageType: 'page' | 'article' | 'service' | 'faq' | 'contact'): string[];
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @uptrade/site-kit/llms - AEO Components
|
|
397
|
+
*
|
|
398
|
+
* Answer Engine Optimization (AEO) components for structuring content
|
|
399
|
+
* in a way that AI systems can easily extract and cite.
|
|
400
|
+
*
|
|
401
|
+
* These components create semantic HTML with proper structure for:
|
|
402
|
+
* - Featured snippets
|
|
403
|
+
* - AI-generated answers
|
|
404
|
+
* - Voice assistant responses
|
|
405
|
+
* - AI retrieval and citation (Sonor AI Visibility)
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* AEOBlock - Generic content block optimized for AI extraction
|
|
410
|
+
*
|
|
411
|
+
* Wraps content with semantic HTML and Sonor data attributes.
|
|
412
|
+
* Use for any content you want AI systems to prioritize.
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* ```tsx
|
|
416
|
+
* <AEOBlock type="answer" question="What is family law?" speakable>
|
|
417
|
+
* Family law is the area of legal practice that deals with family-related
|
|
418
|
+
* matters such as divorce, child custody, adoption, and domestic relations.
|
|
419
|
+
* </AEOBlock>
|
|
420
|
+
* ```
|
|
421
|
+
*/
|
|
422
|
+
declare function AEOBlock({ id, type, question, speakable, entityId, children, className, }: AEOBlockProps): React$1.ReactElement;
|
|
423
|
+
/**
|
|
424
|
+
* AEOSummary - Key points summary for AI extraction
|
|
425
|
+
*
|
|
426
|
+
* Creates a scannable list of key points that AI can easily cite.
|
|
427
|
+
* Perfect for "at a glance" or "key takeaways" sections.
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```tsx
|
|
431
|
+
* <AEOSummary
|
|
432
|
+
* title="Key Points"
|
|
433
|
+
* points={[
|
|
434
|
+
* "Family law covers divorce, custody, and adoption",
|
|
435
|
+
* "Ohio is an equitable distribution state",
|
|
436
|
+
* "Child custody decisions prioritize the child's best interests"
|
|
437
|
+
* ]}
|
|
438
|
+
* />
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
declare function AEOSummary({ title, points, speakable, entityId, className, }: AEOSummaryProps): React$1.ReactElement;
|
|
442
|
+
/**
|
|
443
|
+
* AEODefinition - Term definition optimized for featured snippets
|
|
444
|
+
*
|
|
445
|
+
* Creates a clear definition format that works well for
|
|
446
|
+
* "What is X?" queries in AI search results.
|
|
447
|
+
*
|
|
448
|
+
* @example
|
|
449
|
+
* ```tsx
|
|
450
|
+
* <AEODefinition
|
|
451
|
+
* term="Equitable Distribution"
|
|
452
|
+
* definition="A legal principle used in Ohio divorce cases where marital
|
|
453
|
+
* property is divided fairly, though not necessarily equally, between spouses."
|
|
454
|
+
* />
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
declare function AEODefinition({ term, definition, speakable, entityId, source, className, }: AEODefinitionProps): React$1.ReactElement;
|
|
458
|
+
/**
|
|
459
|
+
* AEOSteps - How-to steps for featured snippets
|
|
460
|
+
*
|
|
461
|
+
* Creates numbered steps with HowTo schema markup.
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* ```tsx
|
|
465
|
+
* <AEOSteps title="How to File for Divorce in Ohio">
|
|
466
|
+
* <AEOStep number={1} name="Gather Documents">
|
|
467
|
+
* Collect financial records, property deeds, and marriage certificate.
|
|
468
|
+
* </AEOStep>
|
|
469
|
+
* <AEOStep number={2} name="File Petition">
|
|
470
|
+
* Submit divorce petition to the county court.
|
|
471
|
+
* </AEOStep>
|
|
472
|
+
* </AEOSteps>
|
|
473
|
+
* ```
|
|
474
|
+
*/
|
|
475
|
+
declare function AEOSteps({ title, children, speakable, entityId, className, }: {
|
|
476
|
+
title: string;
|
|
477
|
+
children: React$1.ReactNode;
|
|
478
|
+
speakable?: boolean;
|
|
479
|
+
entityId?: string;
|
|
480
|
+
className?: string;
|
|
481
|
+
}): React$1.ReactElement;
|
|
482
|
+
/**
|
|
483
|
+
* AEOStep - Individual step within AEOSteps
|
|
484
|
+
*/
|
|
485
|
+
declare function AEOStep({ number, name, children, }: {
|
|
486
|
+
number: number;
|
|
487
|
+
name: string;
|
|
488
|
+
children: React$1.ReactNode;
|
|
489
|
+
}): React$1.ReactElement;
|
|
490
|
+
/**
|
|
491
|
+
* AEOComparison - Comparison table for AI extraction
|
|
492
|
+
*
|
|
493
|
+
* Creates a structured comparison that AI can understand and cite.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```tsx
|
|
497
|
+
* <AEOComparison
|
|
498
|
+
* title="Divorce vs. Dissolution in Ohio"
|
|
499
|
+
* items={[
|
|
500
|
+
* { aspect: 'Agreement', optionA: 'May be contested', optionB: 'Must be agreed upon' },
|
|
501
|
+
* { aspect: 'Timeline', optionA: '6-12 months', optionB: '30-90 days' },
|
|
502
|
+
* ]}
|
|
503
|
+
* labelA="Divorce"
|
|
504
|
+
* labelB="Dissolution"
|
|
505
|
+
* />
|
|
506
|
+
* ```
|
|
507
|
+
*/
|
|
508
|
+
declare function AEOComparison({ title, items, labelA, labelB, speakable, entityId, className, }: {
|
|
509
|
+
title: string;
|
|
510
|
+
items: Array<{
|
|
511
|
+
aspect: string;
|
|
512
|
+
optionA: string;
|
|
513
|
+
optionB: string;
|
|
514
|
+
}>;
|
|
515
|
+
labelA: string;
|
|
516
|
+
labelB: string;
|
|
517
|
+
speakable?: boolean;
|
|
518
|
+
entityId?: string;
|
|
519
|
+
className?: string;
|
|
520
|
+
}): React$1.ReactElement;
|
|
521
|
+
/**
|
|
522
|
+
* AEOClaim - AI-Verifiable Claim with Provenance
|
|
523
|
+
*
|
|
524
|
+
* Wraps factual claims with machine-readable source and confidence data.
|
|
525
|
+
* LLMs prioritize verifiable facts with clear provenance.
|
|
526
|
+
*
|
|
527
|
+
* @example
|
|
528
|
+
* ```tsx
|
|
529
|
+
* <AEOClaim
|
|
530
|
+
* source="KRS 281A.170"
|
|
531
|
+
* sourceUrl="https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=6398"
|
|
532
|
+
* confidence={0.95}
|
|
533
|
+
* claimType="statute"
|
|
534
|
+
* >
|
|
535
|
+
* A CDL suspension is triggered at 26 MPH over the limit.
|
|
536
|
+
* </AEOClaim>
|
|
537
|
+
* ```
|
|
538
|
+
*/
|
|
539
|
+
declare function AEOClaim({ source, sourceUrl, confidence, claimType, retrievedAt, children, className, }: AEOClaimProps): React$1.ReactElement;
|
|
540
|
+
/**
|
|
541
|
+
* AEOEntity - Inline entity annotation
|
|
542
|
+
*
|
|
543
|
+
* Wraps entity mentions with machine-readable entity IDs for knowledge graph linking.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```tsx
|
|
547
|
+
* <AEOEntity entityId="person-123" entityType="person" name="Shannon Sexton">
|
|
548
|
+
* Attorney Shannon Sexton
|
|
549
|
+
* </AEOEntity> handles CDL defense cases.
|
|
550
|
+
* ```
|
|
551
|
+
*/
|
|
552
|
+
declare function AEOEntity({ entityId, entityType, name, url, children, className, }: {
|
|
553
|
+
entityId: string;
|
|
554
|
+
entityType: 'organization' | 'person' | 'service' | 'product' | 'location' | 'concept' | 'credential';
|
|
555
|
+
name: string;
|
|
556
|
+
url?: string;
|
|
557
|
+
children: React$1.ReactNode;
|
|
558
|
+
className?: string;
|
|
559
|
+
}): React$1.ReactElement;
|
|
560
|
+
/**
|
|
561
|
+
* AEOProvenanceList - Display sources/citations for content
|
|
562
|
+
*
|
|
563
|
+
* Shows a list of provenance sources with machine-readable attributes.
|
|
564
|
+
* LLMs use this to verify claims and assess source quality.
|
|
565
|
+
*
|
|
566
|
+
* @example
|
|
567
|
+
* ```tsx
|
|
568
|
+
* <AEOProvenanceList
|
|
569
|
+
* title="Sources"
|
|
570
|
+
* sources={[
|
|
571
|
+
* { id: '1', source_type: 'legal_statute', title: 'KRS 281A.170', url: '...' },
|
|
572
|
+
* { id: '2', source_type: 'news_article', title: 'CDL News', publisher: 'Transport Weekly' }
|
|
573
|
+
* ]}
|
|
574
|
+
* />
|
|
575
|
+
* ```
|
|
576
|
+
*/
|
|
577
|
+
declare function AEOProvenanceList({ sources, title, className, }: {
|
|
578
|
+
sources: Array<{
|
|
579
|
+
id: string;
|
|
580
|
+
source_type: 'press_release' | 'news_article' | 'legal_statute' | 'research_paper' | 'official_document' | 'internal' | 'citation';
|
|
581
|
+
title: string;
|
|
582
|
+
url?: string;
|
|
583
|
+
publisher?: string;
|
|
584
|
+
published_at?: string;
|
|
585
|
+
accessed_at?: string;
|
|
586
|
+
excerpt?: string;
|
|
587
|
+
confidence?: number;
|
|
588
|
+
identifier?: string;
|
|
589
|
+
}>;
|
|
590
|
+
title?: string;
|
|
591
|
+
className?: string;
|
|
592
|
+
}): React$1.ReactElement;
|
|
593
|
+
/**
|
|
594
|
+
* AEOCitedContent - Content with inline citations linked to sources
|
|
595
|
+
*
|
|
596
|
+
* Wraps content that contains numbered citations [1], [2] etc., and links them
|
|
597
|
+
* to a list of provenance sources for AI verification.
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```tsx
|
|
601
|
+
* <AEOCitedContent
|
|
602
|
+
* sources={[
|
|
603
|
+
* { id: '1', source_type: 'legal_statute', title: 'KRS 281A.170' },
|
|
604
|
+
* { id: '2', source_type: 'news_article', title: 'FMCSA Guidelines 2024' }
|
|
605
|
+
* ]}
|
|
606
|
+
* showSourcesList={true}
|
|
607
|
+
* >
|
|
608
|
+
* <p>Kentucky law requires CDL holders to report violations within 30 days [1].
|
|
609
|
+
* Federal guidelines add additional requirements [2].</p>
|
|
610
|
+
* </AEOCitedContent>
|
|
611
|
+
* ```
|
|
612
|
+
*/
|
|
613
|
+
declare function AEOCitedContent({ children, sources, showSourcesList, className, }: {
|
|
614
|
+
children: React$1.ReactNode;
|
|
615
|
+
sources: Array<{
|
|
616
|
+
id: string;
|
|
617
|
+
source_type: 'press_release' | 'news_article' | 'legal_statute' | 'research_paper' | 'official_document' | 'internal' | 'citation';
|
|
618
|
+
title: string;
|
|
619
|
+
url?: string;
|
|
620
|
+
publisher?: string;
|
|
621
|
+
published_at?: string;
|
|
622
|
+
accessed_at?: string;
|
|
623
|
+
excerpt?: string;
|
|
624
|
+
confidence?: number;
|
|
625
|
+
identifier?: string;
|
|
626
|
+
}>;
|
|
627
|
+
showSourcesList?: boolean;
|
|
628
|
+
className?: string;
|
|
629
|
+
}): React$1.ReactElement;
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* @uptrade/site-kit/llms - API Functions
|
|
633
|
+
*
|
|
634
|
+
* Data fetching for LLM visibility content.
|
|
635
|
+
* Pulls from Signal knowledge base and project data.
|
|
636
|
+
*/
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Fetch all LLM visibility data for a project - cached per request
|
|
640
|
+
* This is the main data source for llms.txt generation
|
|
641
|
+
*
|
|
642
|
+
* @param projectId - Optional project ID (API key identifies project if omitted)
|
|
643
|
+
*/
|
|
644
|
+
declare const getLLMsData: (projectId?: string) => Promise<LLMsDataResponse | null>;
|
|
645
|
+
/**
|
|
646
|
+
* Fetch business info only - cached per request
|
|
647
|
+
*/
|
|
648
|
+
declare const getBusinessInfo: (projectId?: string) => Promise<LLMBusinessInfo | null>;
|
|
649
|
+
/**
|
|
650
|
+
* Fetch services list - cached per request
|
|
651
|
+
*/
|
|
652
|
+
declare const getServices: (projectId?: string) => Promise<LLMService[]>;
|
|
653
|
+
/**
|
|
654
|
+
* Fetch FAQ items - cached per request
|
|
655
|
+
*/
|
|
656
|
+
declare const getFAQItems: (projectId?: string, limit?: number) => Promise<LLMFAQItem[]>;
|
|
657
|
+
/**
|
|
658
|
+
* Fetch page summaries for sitemap - cached per request
|
|
659
|
+
*/
|
|
660
|
+
declare const getPageSummaries: (projectId?: string, limit?: number) => Promise<LLMPageSummary[]>;
|
|
661
|
+
/**
|
|
662
|
+
* Fetch AI-optimized llms.txt markdown from Portal API (build-time)
|
|
663
|
+
* Used by writeLLMsTxtToPublic for static file generation
|
|
664
|
+
*/
|
|
665
|
+
declare function getOptimizedLLMsTxt(options?: {
|
|
666
|
+
full?: boolean;
|
|
667
|
+
apiUrl?: string;
|
|
668
|
+
apiKey?: string;
|
|
669
|
+
}): Promise<string | null>;
|
|
670
|
+
|
|
671
|
+
export { AEOBlock as A, createSpeakableSchema as B, type ContentProvenance as C, DEFAULT_SPEAKABLE_SELECTORS as D, generateLLMsFullTxt as E, generateLLMsTxt as F, type GenerateLLMSTxtOptions as G, getBusinessInfo as H, getFAQItems as I, getLLMsData as J, getOptimizedLLMsTxt as K, type LLMBusinessInfo as L, getPageSummaries as M, getServices as N, getSpeakableSelectorsForPage as O, type SpeakableConfig as S, type AEOBlockProps as a, AEOCitedContent as b, type AEOCitedContentProps as c, AEOClaim as d, type AEOClaimProps as e, AEOComparison as f, AEODefinition as g, type AEODefinitionProps as h, AEOEntity as i, type AEOEntityProps as j, AEOProvenanceList as k, type AEOProvenanceListProps as l, AEOStep as m, AEOSteps as n, AEOSummary as o, type AEOSummaryProps as p, type LLMContactInfo as q, type LLMFAQItem as r, type LLMPageSummary as s, type LLMSTxtContent as t, type LLMService as u, type LLMsDataResponse as v, SpeakableSchema as w, type SpeakableSchemaProps as x, createLLMsFullTxtHandler as y, createLLMsTxtHandler as z };
|