@uptrademedia/site-kit 1.0.40 → 1.1.0
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/{chunk-XXAO5WVO.js → chunk-IRNMIFOE.js} +3 -3
- package/dist/chunk-IRNMIFOE.js.map +1 -0
- package/dist/{chunk-K4B34K4J.mjs → chunk-LHMD7CAR.mjs} +3 -3
- package/dist/chunk-LHMD7CAR.mjs.map +1 -0
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +1 -1
- package/dist/llms/index.d.mts +669 -3
- package/dist/llms/index.d.ts +669 -3
- package/dist/llms/index.js +547 -76
- package/dist/llms/index.js.map +1 -1
- package/dist/llms/index.mjs +526 -2
- package/dist/llms/index.mjs.map +1 -1
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/api-BoW4FSlW.d.mts +0 -671
- package/dist/api-BoW4FSlW.d.ts +0 -671
- package/dist/chunk-K4B34K4J.mjs.map +0 -1
- package/dist/chunk-SVSZVPP6.mjs +0 -527
- package/dist/chunk-SVSZVPP6.mjs.map +0 -1
- package/dist/chunk-XXAO5WVO.js.map +0 -1
- package/dist/chunk-ZVIOI47K.js +0 -544
- package/dist/chunk-ZVIOI47K.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/llms/api.ts","../src/llms/generateLLMsTxt.ts","../src/llms/writeLLMsTxt.ts"],"names":[],"mappings":";;;;;AAcA,SAAS,YAAA,GAAe;AAEtB,EAAA,MAAM,MAAA,GAAU,OAAO,MAAA,KAAW,WAAA,IAAgB,OAAe,oBAAA,IAC5D,OAAA,CAAQ,IAAI,2BAAA,IACZ,8BAAA;AAEL,EAAA,MAAM,MAAA,GAAU,OAAO,MAAA,KAAW,WAAA,IAAgB,O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E,CAAA;AAAA,IACjE;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,OAAA,EAAS,IAAA,EAAM,IAAA,EAAM,UAAU,SAAA,EAAU;AACpD","file":"chunk-K4B34K4J.mjs","sourcesContent":["/**\n * @uptrade/site-kit/llms - API Functions\n * \n * Data fetching for LLM visibility content.\n * Pulls from Signal knowledge base and project data.\n */\n\nimport { cache } from 'react'\nimport type { LLMsDataResponse, LLMBusinessInfo, LLMContactInfo, LLMService, LLMFAQItem, LLMPageSummary } from './types'\n\n// ============================================\n// API Config\n// ============================================\n\nfunction getApiConfig() {\n // Use site-kit globals if available, otherwise fall back to env vars\n const apiUrl = (typeof window !== 'undefined' && (window as any).__SITE_KIT_API_URL__) \n || process.env.NEXT_PUBLIC_UPTRADE_API_URL \n || 'https://api.uptrademedia.com'\n \n const apiKey = (typeof window !== 'undefined' && (window as any).__SITE_KIT_API_KEY__)\n || process.env.NEXT_PUBLIC_UPTRADE_API_KEY \n || ''\n \n return { apiUrl, apiKey }\n}\n\nasync function apiGet<T>(endpoint: string): Promise<T | null> {\n const { apiUrl, apiKey } = getApiConfig()\n \n if (!apiKey) {\n console.error('@uptrade/llms: No API key configured. Set NEXT_PUBLIC_UPTRADE_API_KEY.')\n return null\n }\n \n try {\n const response = await fetch(`${apiUrl}${endpoint}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n },\n next: { revalidate: 3600 }, // Cache for 1 hour\n })\n \n if (!response.ok) {\n console.error(`@uptrade/llms: API error: ${response.statusText}`)\n return null\n }\n \n return await response.json()\n } catch (error) {\n console.error('@uptrade/llms: Network error:', error)\n return null\n }\n}\n\n// ============================================\n// Cached Data Fetchers\n// ============================================\n\n/**\n * Fetch all LLM visibility data for a project - cached per request\n * This is the main data source for llms.txt generation\n * \n * @param projectId - Optional project ID (API key identifies project if omitted)\n */\nexport const getLLMsData = cache(async (\n projectId?: string\n): Promise<LLMsDataResponse | null> => {\n return apiGet<LLMsDataResponse>(`/api/public/llms/data`)\n})\n\n/**\n * Fetch business info only - cached per request\n */\nexport const getBusinessInfo = cache(async (\n projectId?: string\n): Promise<LLMBusinessInfo | null> => {\n const result = await apiGet<{ business: LLMBusinessInfo }>(`/api/public/llms/business`)\n return result?.business || null\n})\n\n/**\n * Fetch services list - cached per request\n */\nexport const getServices = cache(async (\n projectId?: string\n): Promise<LLMService[]> => {\n const result = await apiGet<{ services: LLMService[] }>(`/api/public/llms/services`)\n return result?.services || []\n})\n\n/**\n * Fetch FAQ items - cached per request\n */\nexport const getFAQItems = cache(async (\n projectId?: string,\n limit?: number\n): Promise<LLMFAQItem[]> => {\n const endpoint = limit \n ? `/api/public/llms/faq?limit=${limit}`\n : '/api/public/llms/faq'\n const result = await apiGet<{ faq: LLMFAQItem[] }>(endpoint)\n return result?.faq || []\n})\n\n/**\n * Fetch page summaries for sitemap - cached per request\n */\nexport const getPageSummaries = cache(async (\n projectId?: string,\n limit?: number\n): Promise<LLMPageSummary[]> => {\n const endpoint = limit \n ? `/api/public/llms/pages?limit=${limit}`\n : '/api/public/llms/pages'\n const result = await apiGet<{ pages: LLMPageSummary[] }>(endpoint)\n return result?.pages || []\n})\n\n/**\n * Fetch AI-optimized llms.txt markdown from Portal API (build-time)\n * Used by writeLLMsTxtToPublic for static file generation\n */\nexport async function getOptimizedLLMsTxt(options?: {\n full?: boolean\n apiUrl?: string\n apiKey?: string\n}): Promise<string | null> {\n const apiUrl = options?.apiUrl\n || (typeof process !== 'undefined' && process.env?.NEXT_PUBLIC_UPTRADE_API_URL)\n || 'https://api.uptrademedia.com'\n const apiKey = options?.apiKey\n || (typeof process !== 'undefined' && (process.env?.UPTRADE_API_KEY || process.env?.NEXT_PUBLIC_UPTRADE_API_KEY))\n || ''\n\n if (!apiKey) {\n console.error('@uptrade/llms: No API key configured for getOptimizedLLMsTxt')\n return null\n }\n\n const endpoint = options?.full ? '/api/public/llms/txt?full=true' : '/api/public/llms/txt'\n\n try {\n const response = await fetch(`${apiUrl}${endpoint}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'text/plain',\n 'x-api-key': apiKey,\n },\n })\n\n if (!response.ok) {\n console.error(`@uptrade/llms: Optimized txt API error: ${response.status} ${response.statusText}`)\n return null\n }\n\n return await response.text()\n } catch (error) {\n console.error('@uptrade/llms: Failed to fetch optimized llms.txt:', error)\n return null\n }\n}\n","/**\n * @uptrade/site-kit/llms - llms.txt Generator\n * \n * Generates llms.txt content following the llms.txt specification.\n * https://llmstxt.org/\n * \n * The llms.txt file provides a markdown-formatted overview of a website\n * specifically designed for LLM consumption. It helps AI systems understand\n * what a business does, what services it offers, and how to answer questions.\n */\n\nimport { getLLMsData, getBusinessInfo, getServices, getFAQItems, getPageSummaries } from './api'\nimport type { \n GenerateLLMSTxtOptions, \n LLMSTxtContent,\n LLMBusinessInfo,\n LLMContactInfo,\n LLMService,\n LLMFAQItem,\n LLMPageSummary\n} from './types'\n\n/**\n * Generate llms.txt content from Portal data\n * \n * @example\n * ```ts\n * // app/llms.txt/route.ts\n * import { generateLLMsTxt } from '@uptrade/site-kit/llms'\n * \n * export async function GET() {\n * const { markdown } = await generateLLMsTxt({\n * projectId: process.env.UPTRADE_PROJECT_ID!\n * })\n * \n * return new Response(markdown, {\n * headers: { 'Content-Type': 'text/plain; charset=utf-8' }\n * })\n * }\n * ```\n */\nexport async function generateLLMsTxt(\n options: GenerateLLMSTxtOptions\n): Promise<LLMSTxtContent> {\n const {\n projectId,\n includeBusinessInfo = true,\n includeServices = true,\n includeFAQ = true,\n includePages = true,\n includeContact = true,\n maxFAQItems = 20,\n maxPages = 50,\n customSections = [],\n } = options\n\n // Fetch all data\n const data = await getLLMsData(projectId)\n \n if (!data) {\n // Return minimal content if no data\n return {\n markdown: '# Website\\n\\n> Information not available.',\n metadata: {\n generated_at: new Date().toISOString(),\n project_id: projectId || '',\n sections: [],\n }\n }\n }\n\n const sections: string[] = []\n const sectionNames: string[] = []\n\n // ========================================\n // Header Section (H1 + blockquote summary)\n // ========================================\n if (includeBusinessInfo && data.business) {\n const header = generateHeaderSection(data.business)\n sections.push(header)\n sectionNames.push('header')\n }\n\n // ========================================\n // About Section\n // ========================================\n if (includeBusinessInfo && data.business?.description) {\n const about = generateAboutSection(data.business)\n sections.push(about)\n sectionNames.push('about')\n }\n\n // ========================================\n // Services Section\n // ========================================\n if (includeServices && data.services?.length > 0) {\n const services = generateServicesSection(data.services)\n sections.push(services)\n sectionNames.push('services')\n }\n\n // ========================================\n // Contact Section\n // ========================================\n if (includeContact && data.contact) {\n const contact = generateContactSection(data.contact)\n sections.push(contact)\n sectionNames.push('contact')\n }\n\n // ========================================\n // FAQ Section\n // ========================================\n if (includeFAQ && data.faq?.length > 0) {\n const faq = generateFAQSection(data.faq.slice(0, maxFAQItems))\n sections.push(faq)\n sectionNames.push('faq')\n }\n\n // ========================================\n // Pages Section (sitemap-like index)\n // ========================================\n if (includePages && data.pages?.length > 0) {\n const pages = generatePagesSection(data.pages.slice(0, maxPages), data.business?.website || '')\n sections.push(pages)\n sectionNames.push('pages')\n }\n\n // ========================================\n // Custom Sections\n // ========================================\n for (const custom of customSections) {\n sections.push(`## ${custom.title}\\n\\n${custom.content}`)\n sectionNames.push(custom.title.toLowerCase().replace(/\\s+/g, '-'))\n }\n\n return {\n markdown: sections.join('\\n\\n---\\n\\n'),\n metadata: {\n generated_at: new Date().toISOString(),\n project_id: projectId || '',\n sections: sectionNames,\n }\n }\n}\n\n/**\n * Generate llms-full.txt with comprehensive knowledge dump\n * Use this for AI systems that can handle larger context\n */\nexport async function generateLLMsFullTxt(\n options: GenerateLLMSTxtOptions\n): Promise<LLMSTxtContent> {\n return generateLLMsTxt({\n ...options,\n includeBusinessInfo: true,\n includeServices: true,\n includeFAQ: true,\n includePages: true,\n includeContact: true,\n maxFAQItems: 100,\n maxPages: 200,\n })\n}\n\n// ============================================\n// Section Generators\n// ============================================\n\nfunction generateHeaderSection(business: LLMBusinessInfo): string {\n const lines: string[] = []\n \n // H1 with business name\n lines.push(`# ${business.name}`)\n lines.push('')\n \n // Blockquote summary (per llms.txt spec)\n const summary = business.tagline || business.description.split('.')[0]\n lines.push(`> ${summary}`)\n \n if (business.industry) {\n lines.push('')\n lines.push(`**Industry:** ${business.industry}`)\n }\n \n if (business.service_area) {\n lines.push(`**Service Area:** ${business.service_area}`)\n }\n \n if (business.website) {\n lines.push(`**Website:** ${business.website}`)\n }\n\n return lines.join('\\n')\n}\n\nfunction generateAboutSection(business: LLMBusinessInfo): string {\n const lines: string[] = []\n \n lines.push('## About')\n lines.push('')\n lines.push(business.description)\n \n if (business.founded) {\n lines.push('')\n lines.push(`Established: ${business.founded}`)\n }\n\n return lines.join('\\n')\n}\n\nfunction generateServicesSection(services: LLMService[]): string {\n const lines: string[] = []\n \n lines.push('## Services')\n lines.push('')\n \n for (const service of services) {\n if (service.url) {\n lines.push(`- **[${service.name}](${service.url})**: ${service.description}`)\n } else {\n lines.push(`- **${service.name}**: ${service.description}`)\n }\n }\n\n return lines.join('\\n')\n}\n\nfunction generateContactSection(contact: LLMContactInfo): string {\n const lines: string[] = []\n \n lines.push('## Contact Information')\n lines.push('')\n \n if (contact.phone) {\n lines.push(`- **Phone:** ${contact.phone}`)\n }\n if (contact.email) {\n lines.push(`- **Email:** ${contact.email}`)\n }\n if (contact.address || contact.city) {\n const addressParts = [\n contact.address,\n contact.city,\n contact.state,\n contact.postal_code,\n contact.country\n ].filter(Boolean)\n lines.push(`- **Address:** ${addressParts.join(', ')}`)\n }\n if (contact.hours) {\n lines.push(`- **Hours:** ${contact.hours}`)\n }\n\n return lines.join('\\n')\n}\n\nfunction generateFAQSection(faq: LLMFAQItem[]): string {\n const lines: string[] = []\n \n lines.push('## Frequently Asked Questions')\n lines.push('')\n \n for (const item of faq) {\n lines.push(`### ${item.question}`)\n lines.push('')\n lines.push(item.answer)\n lines.push('')\n }\n\n return lines.join('\\n').trim()\n}\n\nfunction generatePagesSection(pages: LLMPageSummary[], baseUrl: string): string {\n const lines: string[] = []\n \n lines.push('## Site Pages')\n lines.push('')\n \n for (const page of pages) {\n const url = page.path.startsWith('http') ? page.path : `${baseUrl}${page.path}`\n if (page.description) {\n lines.push(`- [${page.title}](${url}): ${page.description}`)\n } else {\n lines.push(`- [${page.title}](${url})`)\n }\n }\n\n return lines.join('\\n')\n}\n\nexport default generateLLMsTxt\n","/**\n * @uptrade/site-kit/llms - Build-Time Write\n *\n * Fetches AI-optimized llms.txt from Portal API and writes to public/llms.txt\n * at build time. Integrates with sitemap flow when optimizedLLMsTxt is enabled.\n */\n\nimport { writeFileSync, mkdirSync, existsSync } from 'fs'\nimport { join } from 'path'\nimport { getOptimizedLLMsTxt } from './api'\nimport { generateLLMsTxt, generateLLMsFullTxt } from './generateLLMsTxt'\n\nexport interface WriteLLMsTxtOptions {\n /** Output directory (default: public, relative to cwd) */\n outputDir?: string\n /** Write llms-full.txt as well */\n full?: boolean\n /** Portal API URL */\n apiUrl?: string\n /** Portal API key */\n apiKey?: string\n /** Fallback to non-optimized when API fails */\n fallbackToLocal?: boolean\n}\n\n/**\n * Fetch optimized llms.txt from Portal and write to public/llms.txt\n * Called at build time after sitemap sync (when optimizedLLMsTxt is enabled)\n */\nexport async function writeLLMsTxtToPublic(\n options: WriteLLMsTxtOptions = {}\n): Promise<{ success: boolean; path: string; optimized: boolean }> {\n const {\n outputDir = 'public',\n full = false,\n apiUrl,\n apiKey,\n fallbackToLocal = true,\n } = options\n\n const cwd = typeof process !== 'undefined' ? process.cwd() : '.'\n const outPath = join(cwd, outputDir)\n const llmsPath = join(outPath, 'llms.txt')\n const llmsFullPath = join(outPath, 'llms-full.txt')\n\n // Ensure output directory exists\n if (!existsSync(outPath)) {\n mkdirSync(outPath, { recursive: true })\n }\n\n const apiOptions = { apiUrl, apiKey }\n\n // Fetch optimized content\n let markdown = await getOptimizedLLMsTxt({ ...apiOptions, full: false })\n let optimized = !!markdown\n\n if (!markdown && fallbackToLocal) {\n console.warn('[site-kit] Optimized llms.txt unavailable, using local generation')\n const result = await generateLLMsTxt({})\n markdown = result.markdown\n }\n\n if (!markdown) {\n console.error('[site-kit] Failed to generate llms.txt')\n return { success: false, path: llmsPath, optimized: false }\n }\n\n writeFileSync(llmsPath, markdown, 'utf-8')\n console.log(`[site-kit] Wrote llms.txt to ${llmsPath}`)\n\n if (full) {\n let fullMarkdown = await getOptimizedLLMsTxt({ ...apiOptions, full: true })\n if (!fullMarkdown && fallbackToLocal) {\n const result = await generateLLMsFullTxt({})\n fullMarkdown = result.markdown\n }\n if (fullMarkdown) {\n writeFileSync(llmsFullPath, fullMarkdown, 'utf-8')\n console.log(`[site-kit] Wrote llms-full.txt to ${llmsFullPath}`)\n }\n }\n\n return { success: true, path: llmsPath, optimized }\n}\n"]}
|
package/dist/chunk-SVSZVPP6.mjs
DELETED
|
@@ -1,527 +0,0 @@
|
|
|
1
|
-
import { generateLLMsTxt, generateLLMsFullTxt } from './chunk-K4B34K4J.mjs';
|
|
2
|
-
import { existsSync, readFileSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function createLLMsTxtHandler(options = {}) {
|
|
7
|
-
const { preferStatic, ...generateOptions } = options;
|
|
8
|
-
return async function GET() {
|
|
9
|
-
try {
|
|
10
|
-
if (preferStatic) {
|
|
11
|
-
const staticPath = join(process.cwd(), "public", "llms.txt");
|
|
12
|
-
if (existsSync(staticPath)) {
|
|
13
|
-
const markdown2 = readFileSync(staticPath, "utf-8");
|
|
14
|
-
return new Response(markdown2, {
|
|
15
|
-
status: 200,
|
|
16
|
-
headers: {
|
|
17
|
-
"Content-Type": "text/plain; charset=utf-8",
|
|
18
|
-
"Cache-Control": "public, max-age=3600, s-maxage=3600"
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const { markdown, metadata } = await generateLLMsTxt(generateOptions);
|
|
24
|
-
return new Response(markdown, {
|
|
25
|
-
status: 200,
|
|
26
|
-
headers: {
|
|
27
|
-
"Content-Type": "text/plain; charset=utf-8",
|
|
28
|
-
"Cache-Control": "public, max-age=3600, s-maxage=3600",
|
|
29
|
-
"X-Generated-At": metadata.generated_at,
|
|
30
|
-
"X-Sections": metadata.sections.join(",")
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error("@uptrade/llms: Error generating llms.txt:", error);
|
|
35
|
-
return new Response("# Error\n\nUnable to generate llms.txt content.", {
|
|
36
|
-
status: 500,
|
|
37
|
-
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function createLLMsFullTxtHandler(options = {}) {
|
|
43
|
-
const { preferStatic, ...generateOptions } = options;
|
|
44
|
-
return async function GET() {
|
|
45
|
-
try {
|
|
46
|
-
if (preferStatic) {
|
|
47
|
-
const staticPath = join(process.cwd(), "public", "llms-full.txt");
|
|
48
|
-
if (existsSync(staticPath)) {
|
|
49
|
-
const markdown2 = readFileSync(staticPath, "utf-8");
|
|
50
|
-
return new Response(markdown2, {
|
|
51
|
-
status: 200,
|
|
52
|
-
headers: {
|
|
53
|
-
"Content-Type": "text/plain; charset=utf-8",
|
|
54
|
-
"Cache-Control": "public, max-age=3600, s-maxage=3600"
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const { markdown, metadata } = await generateLLMsFullTxt(generateOptions);
|
|
60
|
-
return new Response(markdown, {
|
|
61
|
-
status: 200,
|
|
62
|
-
headers: {
|
|
63
|
-
"Content-Type": "text/plain; charset=utf-8",
|
|
64
|
-
"Cache-Control": "public, max-age=3600, s-maxage=3600",
|
|
65
|
-
"X-Generated-At": metadata.generated_at,
|
|
66
|
-
"X-Sections": metadata.sections.join(",")
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
} catch (error) {
|
|
70
|
-
console.error("@uptrade/llms: Error generating llms-full.txt:", error);
|
|
71
|
-
return new Response("# Error\n\nUnable to generate llms-full.txt content.", {
|
|
72
|
-
status: 500,
|
|
73
|
-
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function SpeakableSchema({
|
|
79
|
-
type,
|
|
80
|
-
name,
|
|
81
|
-
url,
|
|
82
|
-
speakable,
|
|
83
|
-
additionalProperties = {}
|
|
84
|
-
}) {
|
|
85
|
-
const schema = createSpeakableSchema(type, name, url, speakable, additionalProperties);
|
|
86
|
-
return /* @__PURE__ */ jsx(
|
|
87
|
-
"script",
|
|
88
|
-
{
|
|
89
|
-
type: "application/ld+json",
|
|
90
|
-
dangerouslySetInnerHTML: {
|
|
91
|
-
__html: JSON.stringify(schema, null, 0)
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
function createSpeakableSchema(type, name, url, speakable, additionalProperties = {}) {
|
|
97
|
-
const speakableSpec = {
|
|
98
|
-
"@type": "SpeakableSpecification"
|
|
99
|
-
};
|
|
100
|
-
if (speakable.cssSelectors?.length) {
|
|
101
|
-
speakableSpec.cssSelector = speakable.cssSelectors;
|
|
102
|
-
} else if (speakable.xPaths?.length) {
|
|
103
|
-
speakableSpec.xpath = speakable.xPaths;
|
|
104
|
-
} else {
|
|
105
|
-
speakableSpec.cssSelector = [
|
|
106
|
-
"h1",
|
|
107
|
-
"[data-speakable]",
|
|
108
|
-
".page-summary",
|
|
109
|
-
".key-points",
|
|
110
|
-
'meta[name="description"]'
|
|
111
|
-
];
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
"@context": "https://schema.org",
|
|
115
|
-
"@type": type,
|
|
116
|
-
name,
|
|
117
|
-
url,
|
|
118
|
-
speakable: speakableSpec,
|
|
119
|
-
...additionalProperties
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
var DEFAULT_SPEAKABLE_SELECTORS = {
|
|
123
|
-
/** Standard page elements */
|
|
124
|
-
page: ["h1", 'meta[name="description"]', ".page-summary"],
|
|
125
|
-
/** Article/blog post elements */
|
|
126
|
-
article: ["h1", ".article-summary", ".article-intro", 'meta[name="description"]'],
|
|
127
|
-
/** Service page elements */
|
|
128
|
-
service: ["h1", ".service-overview", ".key-benefits", 'meta[name="description"]'],
|
|
129
|
-
/** FAQ page elements */
|
|
130
|
-
faq: ["h1", ".faq-intro", ".faq-item"],
|
|
131
|
-
/** Contact page elements */
|
|
132
|
-
contact: ["h1", ".contact-intro", ".business-hours", ".contact-info"]
|
|
133
|
-
};
|
|
134
|
-
function getSpeakableSelectorsForPage(pageType) {
|
|
135
|
-
return DEFAULT_SPEAKABLE_SELECTORS[pageType] || DEFAULT_SPEAKABLE_SELECTORS.page;
|
|
136
|
-
}
|
|
137
|
-
function AEOBlock({
|
|
138
|
-
id,
|
|
139
|
-
type,
|
|
140
|
-
question,
|
|
141
|
-
speakable = true,
|
|
142
|
-
entityId,
|
|
143
|
-
children,
|
|
144
|
-
className = ""
|
|
145
|
-
}) {
|
|
146
|
-
const blockId = id || `aeo-${type}-${Math.random().toString(36).slice(2, 8)}`;
|
|
147
|
-
const baseClasses = `aeo-block aeo-${type}`;
|
|
148
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
149
|
-
const sonorAttrs = {
|
|
150
|
-
"data-sonor-ai": type,
|
|
151
|
-
"data-sonor-block": "true",
|
|
152
|
-
...entityId && { "data-sonor-entity": entityId }
|
|
153
|
-
};
|
|
154
|
-
if (type === "answer" && question) {
|
|
155
|
-
return /* @__PURE__ */ jsxs(
|
|
156
|
-
"section",
|
|
157
|
-
{
|
|
158
|
-
id: blockId,
|
|
159
|
-
className: combinedClasses,
|
|
160
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
161
|
-
"data-aeo-type": type,
|
|
162
|
-
...sonorAttrs,
|
|
163
|
-
itemScope: true,
|
|
164
|
-
itemType: "https://schema.org/Question",
|
|
165
|
-
children: [
|
|
166
|
-
/* @__PURE__ */ jsx("h3", { itemProp: "name", className: "aeo-question", children: question }),
|
|
167
|
-
/* @__PURE__ */ jsx(
|
|
168
|
-
"div",
|
|
169
|
-
{
|
|
170
|
-
itemScope: true,
|
|
171
|
-
itemType: "https://schema.org/Answer",
|
|
172
|
-
itemProp: "acceptedAnswer",
|
|
173
|
-
className: "aeo-answer",
|
|
174
|
-
children: /* @__PURE__ */ jsx("div", { itemProp: "text", children })
|
|
175
|
-
}
|
|
176
|
-
)
|
|
177
|
-
]
|
|
178
|
-
}
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
if (type === "definition") {
|
|
182
|
-
return /* @__PURE__ */ jsx(
|
|
183
|
-
"section",
|
|
184
|
-
{
|
|
185
|
-
id: blockId,
|
|
186
|
-
className: combinedClasses,
|
|
187
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
188
|
-
"data-aeo-type": type,
|
|
189
|
-
...sonorAttrs,
|
|
190
|
-
children
|
|
191
|
-
}
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
if (type === "steps") {
|
|
195
|
-
return /* @__PURE__ */ jsx(
|
|
196
|
-
"section",
|
|
197
|
-
{
|
|
198
|
-
id: blockId,
|
|
199
|
-
className: combinedClasses,
|
|
200
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
201
|
-
"data-aeo-type": type,
|
|
202
|
-
...sonorAttrs,
|
|
203
|
-
itemScope: true,
|
|
204
|
-
itemType: "https://schema.org/HowTo",
|
|
205
|
-
children
|
|
206
|
-
}
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
return /* @__PURE__ */ jsx(
|
|
210
|
-
"section",
|
|
211
|
-
{
|
|
212
|
-
id: blockId,
|
|
213
|
-
className: combinedClasses,
|
|
214
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
215
|
-
"data-aeo-type": type,
|
|
216
|
-
...sonorAttrs,
|
|
217
|
-
children
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
function AEOSummary({
|
|
222
|
-
title = "Key Points",
|
|
223
|
-
points,
|
|
224
|
-
speakable = true,
|
|
225
|
-
entityId,
|
|
226
|
-
className = ""
|
|
227
|
-
}) {
|
|
228
|
-
const baseClasses = "aeo-summary";
|
|
229
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
230
|
-
return /* @__PURE__ */ jsxs(
|
|
231
|
-
"div",
|
|
232
|
-
{
|
|
233
|
-
className: combinedClasses,
|
|
234
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
235
|
-
"data-aeo-type": "summary",
|
|
236
|
-
"data-sonor-ai": "summary",
|
|
237
|
-
"data-sonor-block": "true",
|
|
238
|
-
...entityId && { "data-sonor-entity": entityId },
|
|
239
|
-
children: [
|
|
240
|
-
title && /* @__PURE__ */ jsx("h3", { className: "aeo-summary-title", children: title }),
|
|
241
|
-
/* @__PURE__ */ jsx("ul", { className: "aeo-summary-points", children: points.map((point, index) => /* @__PURE__ */ jsx("li", { className: "aeo-summary-point", children: point }, index)) })
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
function AEODefinition({
|
|
247
|
-
term,
|
|
248
|
-
definition,
|
|
249
|
-
speakable = true,
|
|
250
|
-
entityId,
|
|
251
|
-
source,
|
|
252
|
-
className = ""
|
|
253
|
-
}) {
|
|
254
|
-
const baseClasses = "aeo-definition";
|
|
255
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
256
|
-
return /* @__PURE__ */ jsxs(
|
|
257
|
-
"dl",
|
|
258
|
-
{
|
|
259
|
-
className: combinedClasses,
|
|
260
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
261
|
-
"data-aeo-type": "definition",
|
|
262
|
-
"data-sonor-ai": "definition",
|
|
263
|
-
"data-sonor-block": "true",
|
|
264
|
-
...entityId && { "data-sonor-entity": entityId },
|
|
265
|
-
...source && { "data-sonor-source": source },
|
|
266
|
-
itemScope: true,
|
|
267
|
-
itemType: "https://schema.org/DefinedTerm",
|
|
268
|
-
children: [
|
|
269
|
-
/* @__PURE__ */ jsx("dt", { className: "aeo-term", itemProp: "name", children: /* @__PURE__ */ jsx("strong", { children: term }) }),
|
|
270
|
-
/* @__PURE__ */ jsx("dd", { className: "aeo-definition-text", itemProp: "description", children: definition })
|
|
271
|
-
]
|
|
272
|
-
}
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
function AEOSteps({
|
|
276
|
-
title,
|
|
277
|
-
children,
|
|
278
|
-
speakable = true,
|
|
279
|
-
entityId,
|
|
280
|
-
className = ""
|
|
281
|
-
}) {
|
|
282
|
-
const baseClasses = "aeo-steps";
|
|
283
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
284
|
-
return /* @__PURE__ */ jsxs(
|
|
285
|
-
"section",
|
|
286
|
-
{
|
|
287
|
-
className: combinedClasses,
|
|
288
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
289
|
-
"data-aeo-type": "steps",
|
|
290
|
-
"data-sonor-ai": "steps",
|
|
291
|
-
"data-sonor-block": "true",
|
|
292
|
-
...entityId && { "data-sonor-entity": entityId },
|
|
293
|
-
itemScope: true,
|
|
294
|
-
itemType: "https://schema.org/HowTo",
|
|
295
|
-
children: [
|
|
296
|
-
/* @__PURE__ */ jsx("h3", { className: "aeo-steps-title", itemProp: "name", children: title }),
|
|
297
|
-
/* @__PURE__ */ jsx("ol", { className: "aeo-steps-list", children })
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
function AEOStep({
|
|
303
|
-
number,
|
|
304
|
-
name,
|
|
305
|
-
children
|
|
306
|
-
}) {
|
|
307
|
-
return /* @__PURE__ */ jsxs(
|
|
308
|
-
"li",
|
|
309
|
-
{
|
|
310
|
-
className: "aeo-step",
|
|
311
|
-
itemScope: true,
|
|
312
|
-
itemType: "https://schema.org/HowToStep",
|
|
313
|
-
itemProp: "step",
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ jsx("span", { className: "aeo-step-number", itemProp: "position", children: number }),
|
|
316
|
-
/* @__PURE__ */ jsx("strong", { className: "aeo-step-name", itemProp: "name", children: name }),
|
|
317
|
-
/* @__PURE__ */ jsx("div", { className: "aeo-step-content", itemProp: "text", children })
|
|
318
|
-
]
|
|
319
|
-
}
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
function AEOComparison({
|
|
323
|
-
title,
|
|
324
|
-
items,
|
|
325
|
-
labelA,
|
|
326
|
-
labelB,
|
|
327
|
-
speakable = true,
|
|
328
|
-
entityId,
|
|
329
|
-
className = ""
|
|
330
|
-
}) {
|
|
331
|
-
const baseClasses = "aeo-comparison";
|
|
332
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
333
|
-
return /* @__PURE__ */ jsxs(
|
|
334
|
-
"section",
|
|
335
|
-
{
|
|
336
|
-
className: combinedClasses,
|
|
337
|
-
"data-speakable": speakable ? "true" : void 0,
|
|
338
|
-
"data-aeo-type": "comparison",
|
|
339
|
-
"data-sonor-ai": "comparison",
|
|
340
|
-
"data-sonor-block": "true",
|
|
341
|
-
...entityId && { "data-sonor-entity": entityId },
|
|
342
|
-
children: [
|
|
343
|
-
/* @__PURE__ */ jsx("h3", { className: "aeo-comparison-title", children: title }),
|
|
344
|
-
/* @__PURE__ */ jsxs("table", { className: "aeo-comparison-table", children: [
|
|
345
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
346
|
-
/* @__PURE__ */ jsx("th", { children: "Aspect" }),
|
|
347
|
-
/* @__PURE__ */ jsx("th", { children: labelA }),
|
|
348
|
-
/* @__PURE__ */ jsx("th", { children: labelB })
|
|
349
|
-
] }) }),
|
|
350
|
-
/* @__PURE__ */ jsx("tbody", { children: items.map((item, index) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
351
|
-
/* @__PURE__ */ jsx("td", { className: "aeo-comparison-aspect", children: item.aspect }),
|
|
352
|
-
/* @__PURE__ */ jsx("td", { className: "aeo-comparison-a", children: item.optionA }),
|
|
353
|
-
/* @__PURE__ */ jsx("td", { className: "aeo-comparison-b", children: item.optionB })
|
|
354
|
-
] }, index)) })
|
|
355
|
-
] })
|
|
356
|
-
]
|
|
357
|
-
}
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
|
-
function AEOClaim({
|
|
361
|
-
source,
|
|
362
|
-
sourceUrl,
|
|
363
|
-
confidence = 1,
|
|
364
|
-
claimType = "fact",
|
|
365
|
-
retrievedAt,
|
|
366
|
-
children,
|
|
367
|
-
className = ""
|
|
368
|
-
}) {
|
|
369
|
-
const baseClasses = "aeo-claim";
|
|
370
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
371
|
-
return /* @__PURE__ */ jsxs(
|
|
372
|
-
"span",
|
|
373
|
-
{
|
|
374
|
-
className: combinedClasses,
|
|
375
|
-
"data-sonor-claim": "true",
|
|
376
|
-
"data-sonor-source": source,
|
|
377
|
-
...sourceUrl && { "data-sonor-source-url": sourceUrl },
|
|
378
|
-
"data-sonor-confidence": confidence.toString(),
|
|
379
|
-
"data-sonor-claim-type": claimType,
|
|
380
|
-
...retrievedAt && { "data-sonor-retrieved": retrievedAt },
|
|
381
|
-
itemScope: true,
|
|
382
|
-
itemType: "https://schema.org/Claim",
|
|
383
|
-
children: [
|
|
384
|
-
/* @__PURE__ */ jsx("span", { itemProp: "text", children }),
|
|
385
|
-
sourceUrl ? /* @__PURE__ */ jsx("meta", { itemProp: "citation", content: sourceUrl }) : /* @__PURE__ */ jsx("meta", { itemProp: "citation", content: source })
|
|
386
|
-
]
|
|
387
|
-
}
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
function AEOEntity({
|
|
391
|
-
entityId,
|
|
392
|
-
entityType,
|
|
393
|
-
name,
|
|
394
|
-
url,
|
|
395
|
-
children,
|
|
396
|
-
className = ""
|
|
397
|
-
}) {
|
|
398
|
-
const baseClasses = "aeo-entity";
|
|
399
|
-
const combinedClasses = className ? `${baseClasses} aeo-entity-${entityType} ${className}` : `${baseClasses} aeo-entity-${entityType}`;
|
|
400
|
-
return /* @__PURE__ */ jsxs(
|
|
401
|
-
"span",
|
|
402
|
-
{
|
|
403
|
-
className: combinedClasses,
|
|
404
|
-
"data-sonor-entity": entityId,
|
|
405
|
-
"data-sonor-entity-type": entityType,
|
|
406
|
-
"data-sonor-entity-name": name,
|
|
407
|
-
...url && { "data-sonor-entity-url": url },
|
|
408
|
-
itemScope: true,
|
|
409
|
-
itemType: `https://schema.org/${entityType === "organization" ? "Organization" : entityType === "person" ? "Person" : entityType === "location" ? "Place" : "Thing"}`,
|
|
410
|
-
children: [
|
|
411
|
-
/* @__PURE__ */ jsx("span", { itemProp: "name", children }),
|
|
412
|
-
url && /* @__PURE__ */ jsx("link", { itemProp: "url", href: url })
|
|
413
|
-
]
|
|
414
|
-
}
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
function AEOProvenanceList({
|
|
418
|
-
sources,
|
|
419
|
-
title = "Sources & References",
|
|
420
|
-
className = ""
|
|
421
|
-
}) {
|
|
422
|
-
const baseClasses = "aeo-provenance-list";
|
|
423
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
424
|
-
const getSchemaType = (sourceType) => {
|
|
425
|
-
switch (sourceType) {
|
|
426
|
-
case "legal_statute":
|
|
427
|
-
return "https://schema.org/Legislation";
|
|
428
|
-
case "research_paper":
|
|
429
|
-
return "https://schema.org/ScholarlyArticle";
|
|
430
|
-
case "news_article":
|
|
431
|
-
return "https://schema.org/NewsArticle";
|
|
432
|
-
case "press_release":
|
|
433
|
-
return "https://schema.org/NewsArticle";
|
|
434
|
-
default:
|
|
435
|
-
return "https://schema.org/CreativeWork";
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
return /* @__PURE__ */ jsxs(
|
|
439
|
-
"aside",
|
|
440
|
-
{
|
|
441
|
-
className: combinedClasses,
|
|
442
|
-
"data-sonor-provenance": "list",
|
|
443
|
-
"data-sonor-source-count": sources.length.toString(),
|
|
444
|
-
itemScope: true,
|
|
445
|
-
itemType: "https://schema.org/ItemList",
|
|
446
|
-
children: [
|
|
447
|
-
/* @__PURE__ */ jsx("h4", { className: "aeo-provenance-title", itemProp: "name", children: title }),
|
|
448
|
-
/* @__PURE__ */ jsx("ol", { className: "aeo-provenance-sources", children: sources.map((source, index) => /* @__PURE__ */ jsxs(
|
|
449
|
-
"li",
|
|
450
|
-
{
|
|
451
|
-
className: "aeo-provenance-item",
|
|
452
|
-
"data-sonor-source-id": source.id,
|
|
453
|
-
"data-sonor-source-type": source.source_type,
|
|
454
|
-
...source.confidence && { "data-sonor-confidence": source.confidence.toString() },
|
|
455
|
-
itemScope: true,
|
|
456
|
-
itemType: getSchemaType(source.source_type),
|
|
457
|
-
itemProp: "itemListElement",
|
|
458
|
-
children: [
|
|
459
|
-
/* @__PURE__ */ jsxs("span", { className: "aeo-provenance-number", children: [
|
|
460
|
-
"[",
|
|
461
|
-
index + 1,
|
|
462
|
-
"]"
|
|
463
|
-
] }),
|
|
464
|
-
source.url ? /* @__PURE__ */ jsx(
|
|
465
|
-
"a",
|
|
466
|
-
{
|
|
467
|
-
href: source.url,
|
|
468
|
-
className: "aeo-provenance-link",
|
|
469
|
-
itemProp: "url",
|
|
470
|
-
target: "_blank",
|
|
471
|
-
rel: "noopener noreferrer",
|
|
472
|
-
children: /* @__PURE__ */ jsx("span", { itemProp: "name", children: source.title })
|
|
473
|
-
}
|
|
474
|
-
) : /* @__PURE__ */ jsx("span", { itemProp: "name", children: source.title }),
|
|
475
|
-
source.publisher && /* @__PURE__ */ jsxs("span", { className: "aeo-provenance-publisher", itemProp: "publisher", children: [
|
|
476
|
-
"\u2014 ",
|
|
477
|
-
source.publisher
|
|
478
|
-
] }),
|
|
479
|
-
source.published_at && /* @__PURE__ */ jsxs(
|
|
480
|
-
"time",
|
|
481
|
-
{
|
|
482
|
-
className: "aeo-provenance-date",
|
|
483
|
-
itemProp: "datePublished",
|
|
484
|
-
dateTime: source.published_at,
|
|
485
|
-
children: [
|
|
486
|
-
"(",
|
|
487
|
-
new Date(source.published_at).toLocaleDateString(),
|
|
488
|
-
")"
|
|
489
|
-
]
|
|
490
|
-
}
|
|
491
|
-
),
|
|
492
|
-
source.identifier && /* @__PURE__ */ jsx("span", { className: "aeo-provenance-identifier", "data-sonor-identifier": source.identifier, children: source.identifier }),
|
|
493
|
-
source.excerpt && /* @__PURE__ */ jsx("blockquote", { className: "aeo-provenance-excerpt", itemProp: "description", children: source.excerpt })
|
|
494
|
-
]
|
|
495
|
-
},
|
|
496
|
-
source.id
|
|
497
|
-
)) })
|
|
498
|
-
]
|
|
499
|
-
}
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
function AEOCitedContent({
|
|
503
|
-
children,
|
|
504
|
-
sources,
|
|
505
|
-
showSourcesList = true,
|
|
506
|
-
className = ""
|
|
507
|
-
}) {
|
|
508
|
-
const baseClasses = "aeo-cited-content";
|
|
509
|
-
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
510
|
-
return /* @__PURE__ */ jsxs(
|
|
511
|
-
"section",
|
|
512
|
-
{
|
|
513
|
-
className: combinedClasses,
|
|
514
|
-
"data-sonor-ai": "cited-content",
|
|
515
|
-
"data-sonor-provenance": "inline",
|
|
516
|
-
"data-sonor-source-count": sources.length.toString(),
|
|
517
|
-
children: [
|
|
518
|
-
/* @__PURE__ */ jsx("div", { className: "aeo-cited-body", children }),
|
|
519
|
-
showSourcesList && sources.length > 0 && /* @__PURE__ */ jsx(AEOProvenanceList, { sources, title: "References" })
|
|
520
|
-
]
|
|
521
|
-
}
|
|
522
|
-
);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createLLMsFullTxtHandler, createLLMsTxtHandler, createSpeakableSchema, getSpeakableSelectorsForPage };
|
|
526
|
-
//# sourceMappingURL=chunk-SVSZVPP6.mjs.map
|
|
527
|
-
//# sourceMappingURL=chunk-SVSZVPP6.mjs.map
|