@uptrademedia/site-kit 1.0.5 → 1.0.7
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/analytics/index.js +7 -7
- package/dist/analytics/index.mjs +3 -3
- package/dist/api-QUIPJJCX.js +77 -0
- package/dist/api-QUIPJJCX.js.map +1 -0
- package/dist/api-V3BA5PMX.mjs +4 -0
- package/dist/api-V3BA5PMX.mjs.map +1 -0
- package/dist/blog/index.d.mts +2 -2
- package/dist/blog/index.d.ts +2 -2
- package/dist/blog/index.js +40 -6
- package/dist/blog/index.js.map +1 -1
- package/dist/blog/index.mjs +40 -6
- package/dist/blog/index.mjs.map +1 -1
- package/dist/blog/server.d.mts +3 -2
- package/dist/blog/server.d.ts +3 -2
- package/dist/blog/server.js +13 -6
- package/dist/blog/server.js.map +1 -1
- package/dist/blog/server.mjs +13 -6
- package/dist/blog/server.mjs.map +1 -1
- package/dist/{chunk-FKVJOT2F.mjs → chunk-42EXHJTC.mjs} +196 -7
- package/dist/chunk-42EXHJTC.mjs.map +1 -0
- package/dist/{scanner-AZV5I6US.mjs → chunk-44OMJFCG.mjs} +354 -14
- package/dist/chunk-44OMJFCG.mjs.map +1 -0
- package/dist/chunk-4TGJYNHV.js +981 -0
- package/dist/chunk-4TGJYNHV.js.map +1 -0
- package/dist/chunk-4XPGGLVP.mjs +53 -0
- package/dist/{chunk-NYKRE2FL.mjs.map → chunk-4XPGGLVP.mjs.map} +1 -1
- package/dist/{generators-TO2FKJR6.mjs → chunk-6ONUXZDO.mjs} +26 -9
- package/dist/chunk-6ONUXZDO.mjs.map +1 -0
- package/dist/chunk-CG53ASWX.mjs +729 -0
- package/dist/chunk-CG53ASWX.mjs.map +1 -0
- package/dist/{scanner-ETJAMIT7.js → chunk-DERI27QC.js} +448 -102
- package/dist/chunk-DERI27QC.js.map +1 -0
- package/dist/chunk-DYM5ML2V.mjs +1518 -0
- package/dist/chunk-DYM5ML2V.mjs.map +1 -0
- package/dist/chunk-FLZZOX44.js +1526 -0
- package/dist/chunk-FLZZOX44.js.map +1 -0
- package/dist/{chunk-7H6I3ECV.mjs → chunk-FQVGK746.mjs} +63 -3
- package/dist/chunk-FQVGK746.mjs.map +1 -0
- package/dist/{chunk-GQ6ZOU2N.mjs → chunk-JGQPAXTL.mjs} +4 -4
- package/dist/{chunk-GQ6ZOU2N.mjs.map → chunk-JGQPAXTL.mjs.map} +1 -1
- package/dist/{chunk-V3F5J6CV.js → chunk-JUEVN4Q4.js} +196 -7
- package/dist/chunk-JUEVN4Q4.js.map +1 -0
- package/dist/chunk-KKMGTT7F.mjs +968 -0
- package/dist/chunk-KKMGTT7F.mjs.map +1 -0
- package/dist/{chunk-XQJX252G.mjs → chunk-MB3WR5KJ.mjs} +28 -18
- package/dist/chunk-MB3WR5KJ.mjs.map +1 -0
- package/dist/{chunk-2IHTEKHU.mjs → chunk-QD5CN2OI.mjs} +16 -7
- package/dist/chunk-QD5CN2OI.mjs.map +1 -0
- package/dist/{chunk-SBVEYCSV.js → chunk-QQB4FO4Q.js} +7 -7
- package/dist/{chunk-SBVEYCSV.js.map → chunk-QQB4FO4Q.js.map} +1 -1
- package/dist/{generators-YZWIGHCO.js → chunk-S2GXR5HY.js} +26 -9
- package/dist/chunk-S2GXR5HY.js.map +1 -0
- package/dist/{chunk-O2OHHBUD.js → chunk-TDK7DLCH.js} +30 -20
- package/dist/chunk-TDK7DLCH.js.map +1 -0
- package/dist/{chunk-QP5NCO2E.js → chunk-VDI7KYME.js} +67 -2
- package/dist/chunk-VDI7KYME.js.map +1 -0
- package/dist/chunk-VOR53RUR.js +753 -0
- package/dist/chunk-VOR53RUR.js.map +1 -0
- package/dist/{chunk-GAJLEDRD.js → chunk-ZKJ7JKFV.js} +16 -7
- package/dist/chunk-ZKJ7JKFV.js.map +1 -0
- package/dist/chunk-ZSMWDLMK.js +63 -0
- package/dist/{chunk-EQCVQC35.js.map → chunk-ZSMWDLMK.js.map} +1 -1
- package/dist/cli/index.js +37269 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.mjs +37233 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/commerce/index.js +1 -1
- package/dist/commerce/index.mjs +1 -1
- package/dist/commerce/server.d.mts +12 -3
- package/dist/commerce/server.d.ts +12 -3
- package/dist/commerce/server.js +71 -70
- package/dist/commerce/server.js.map +1 -1
- package/dist/commerce/server.mjs +71 -70
- package/dist/commerce/server.mjs.map +1 -1
- package/dist/engage/index.d.mts +6 -4
- package/dist/engage/index.d.ts +6 -4
- package/dist/engage/index.js +8 -4
- package/dist/engage/index.mjs +2 -2
- package/dist/forms/index.js +1 -1
- package/dist/forms/index.mjs +1 -1
- package/dist/generators-5EU4PTVF.js +33 -0
- package/dist/generators-5EU4PTVF.js.map +1 -0
- package/dist/generators-TYPILCWD.mjs +4 -0
- package/dist/generators-TYPILCWD.mjs.map +1 -0
- package/dist/images/index.js +11 -11
- package/dist/images/index.mjs +4 -4
- package/dist/index.d.mts +154 -5
- package/dist/index.d.ts +154 -5
- package/dist/index.js +940 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +819 -7
- package/dist/index.mjs.map +1 -1
- package/dist/llms/index.d.mts +657 -0
- package/dist/llms/index.d.ts +657 -0
- package/dist/llms/index.js +101 -0
- package/dist/llms/index.js.map +1 -0
- package/dist/llms/index.mjs +4 -0
- package/dist/llms/index.mjs.map +1 -0
- package/dist/migrator-ARLHUNB3.mjs +4 -0
- package/dist/migrator-ARLHUNB3.mjs.map +1 -0
- package/dist/migrator-VZLBH3VY.js +37 -0
- package/dist/migrator-VZLBH3VY.js.map +1 -0
- package/dist/redirects/index.js +1 -1
- package/dist/redirects/index.mjs +1 -1
- package/dist/reputation/index.js +1 -1
- package/dist/reputation/index.mjs +1 -1
- package/dist/{routing-BWjUF7lp.d.ts → routing-CF91y6NO.d.ts} +1 -1
- package/dist/{routing-CgmRi9tD.d.mts → routing-CIOFpFCB.d.mts} +1 -1
- package/dist/scanner-7ZMUM2P5.mjs +4 -0
- package/dist/scanner-7ZMUM2P5.mjs.map +1 -0
- package/dist/scanner-OY7UF3WA.js +53 -0
- package/dist/scanner-OY7UF3WA.js.map +1 -0
- package/dist/seo/index.d.mts +267 -7
- package/dist/seo/index.d.ts +267 -7
- package/dist/seo/index.js +432 -24
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +400 -11
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo/server.d.mts +11 -4
- package/dist/seo/server.d.ts +11 -4
- package/dist/seo/server.js +17 -17
- package/dist/seo/server.mjs +3 -3
- package/dist/setup/client.js +1 -1
- package/dist/setup/client.mjs +1 -1
- package/dist/setup/index.js +3 -3
- package/dist/setup/index.mjs +2 -2
- package/dist/setup/server.js +3 -3
- package/dist/setup/server.mjs +2 -2
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.js.map +1 -1
- package/dist/sitemap/index.mjs +2 -2
- package/dist/sitemap/index.mjs.map +1 -1
- package/dist/{types-C0pJGfbH.d.mts → types-D6FHAVWX.d.mts} +99 -3
- package/dist/{types-C0pJGfbH.d.ts → types-D6FHAVWX.d.ts} +99 -3
- package/dist/{types-BN4OwtCO.d.mts → types-DI0jnhjJ.d.mts} +2 -0
- package/dist/{types-BN4OwtCO.d.ts → types-DI0jnhjJ.d.ts} +2 -0
- package/dist/{types-BmzutFwy.d.ts → types-j8X4vUhB.d.mts} +19 -2
- package/dist/{types-BmzutFwy.d.mts → types-j8X4vUhB.d.ts} +19 -2
- package/dist/{web-vitals-BH55V7EJ.js → web-vitals-444RLW3B.js} +11 -11
- package/dist/{web-vitals-BH55V7EJ.js.map → web-vitals-444RLW3B.js.map} +1 -1
- package/dist/{web-vitals-RJYPWAR3.mjs → web-vitals-KPICZIEF.mjs} +3 -3
- package/dist/{web-vitals-RJYPWAR3.mjs.map → web-vitals-KPICZIEF.mjs.map} +1 -1
- package/package.json +9 -2
- package/dist/api-N35S3EES.js +0 -57
- package/dist/api-N35S3EES.js.map +0 -1
- package/dist/api-SYBTK7Z7.mjs +0 -4
- package/dist/api-SYBTK7Z7.mjs.map +0 -1
- package/dist/chunk-2IHTEKHU.mjs.map +0 -1
- package/dist/chunk-7H6I3ECV.mjs.map +0 -1
- package/dist/chunk-BGJLOJ7T.mjs +0 -605
- package/dist/chunk-BGJLOJ7T.mjs.map +0 -1
- package/dist/chunk-EQCVQC35.js +0 -35
- package/dist/chunk-FKVJOT2F.mjs.map +0 -1
- package/dist/chunk-GAJLEDRD.js.map +0 -1
- package/dist/chunk-NYKRE2FL.mjs +0 -31
- package/dist/chunk-O2OHHBUD.js.map +0 -1
- package/dist/chunk-QAYJV4KK.js +0 -608
- package/dist/chunk-QAYJV4KK.js.map +0 -1
- package/dist/chunk-QP5NCO2E.js.map +0 -1
- package/dist/chunk-V3F5J6CV.js.map +0 -1
- package/dist/chunk-XQJX252G.mjs.map +0 -1
- package/dist/generators-TO2FKJR6.mjs.map +0 -1
- package/dist/generators-YZWIGHCO.js.map +0 -1
- package/dist/migrator-V6KS75EA.mjs +0 -265
- package/dist/migrator-V6KS75EA.mjs.map +0 -1
- package/dist/migrator-XKM7YQCY.js +0 -272
- package/dist/migrator-XKM7YQCY.js.map +0 -1
- package/dist/scanner-AZV5I6US.mjs.map +0 -1
- package/dist/scanner-ETJAMIT7.js.map +0 -1
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/llms/api.ts
|
|
5
|
+
function getApiConfig() {
|
|
6
|
+
const apiUrl = typeof window !== "undefined" && window.__SITE_KIT_API_URL__ || process.env.NEXT_PUBLIC_UPTRADE_API_URL || "https://api.uptrademedia.com";
|
|
7
|
+
const apiKey = typeof window !== "undefined" && window.__SITE_KIT_API_KEY__ || process.env.NEXT_PUBLIC_UPTRADE_API_KEY || "";
|
|
8
|
+
return { apiUrl, apiKey };
|
|
9
|
+
}
|
|
10
|
+
async function apiGet(endpoint) {
|
|
11
|
+
const { apiUrl, apiKey } = getApiConfig();
|
|
12
|
+
if (!apiKey) {
|
|
13
|
+
console.error("@uptrade/llms: No API key configured. Set NEXT_PUBLIC_UPTRADE_API_KEY.");
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch(`${apiUrl}${endpoint}`, {
|
|
18
|
+
method: "GET",
|
|
19
|
+
headers: {
|
|
20
|
+
"Content-Type": "application/json",
|
|
21
|
+
"x-api-key": apiKey
|
|
22
|
+
},
|
|
23
|
+
next: { revalidate: 3600 }
|
|
24
|
+
// Cache for 1 hour
|
|
25
|
+
});
|
|
26
|
+
if (!response.ok) {
|
|
27
|
+
console.error(`@uptrade/llms: API error: ${response.statusText}`);
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return await response.json();
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error("@uptrade/llms: Network error:", error);
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
var getLLMsData = cache(async (projectId) => {
|
|
37
|
+
return apiGet(`/api/public/llms/data`);
|
|
38
|
+
});
|
|
39
|
+
var getBusinessInfo = cache(async (projectId) => {
|
|
40
|
+
const result = await apiGet(`/api/public/llms/business`);
|
|
41
|
+
return result?.business || null;
|
|
42
|
+
});
|
|
43
|
+
var getServices = cache(async (projectId) => {
|
|
44
|
+
const result = await apiGet(`/api/public/llms/services`);
|
|
45
|
+
return result?.services || [];
|
|
46
|
+
});
|
|
47
|
+
var getFAQItems = cache(async (projectId, limit) => {
|
|
48
|
+
const endpoint = limit ? `/api/public/llms/faq?limit=${limit}` : "/api/public/llms/faq";
|
|
49
|
+
const result = await apiGet(endpoint);
|
|
50
|
+
return result?.faq || [];
|
|
51
|
+
});
|
|
52
|
+
var getPageSummaries = cache(async (projectId, limit) => {
|
|
53
|
+
const endpoint = limit ? `/api/public/llms/pages?limit=${limit}` : "/api/public/llms/pages";
|
|
54
|
+
const result = await apiGet(endpoint);
|
|
55
|
+
return result?.pages || [];
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// src/llms/generateLLMsTxt.ts
|
|
59
|
+
async function generateLLMsTxt(options) {
|
|
60
|
+
const {
|
|
61
|
+
projectId,
|
|
62
|
+
includeBusinessInfo = true,
|
|
63
|
+
includeServices = true,
|
|
64
|
+
includeFAQ = true,
|
|
65
|
+
includePages = true,
|
|
66
|
+
includeContact = true,
|
|
67
|
+
maxFAQItems = 20,
|
|
68
|
+
maxPages = 50,
|
|
69
|
+
customSections = []
|
|
70
|
+
} = options;
|
|
71
|
+
const data = await getLLMsData(projectId);
|
|
72
|
+
if (!data) {
|
|
73
|
+
return {
|
|
74
|
+
markdown: "# Website\n\n> Information not available.",
|
|
75
|
+
metadata: {
|
|
76
|
+
generated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
77
|
+
project_id: projectId || "",
|
|
78
|
+
sections: []
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const sections = [];
|
|
83
|
+
const sectionNames = [];
|
|
84
|
+
if (includeBusinessInfo && data.business) {
|
|
85
|
+
const header = generateHeaderSection(data.business);
|
|
86
|
+
sections.push(header);
|
|
87
|
+
sectionNames.push("header");
|
|
88
|
+
}
|
|
89
|
+
if (includeBusinessInfo && data.business?.description) {
|
|
90
|
+
const about = generateAboutSection(data.business);
|
|
91
|
+
sections.push(about);
|
|
92
|
+
sectionNames.push("about");
|
|
93
|
+
}
|
|
94
|
+
if (includeServices && data.services?.length > 0) {
|
|
95
|
+
const services = generateServicesSection(data.services);
|
|
96
|
+
sections.push(services);
|
|
97
|
+
sectionNames.push("services");
|
|
98
|
+
}
|
|
99
|
+
if (includeContact && data.contact) {
|
|
100
|
+
const contact = generateContactSection(data.contact);
|
|
101
|
+
sections.push(contact);
|
|
102
|
+
sectionNames.push("contact");
|
|
103
|
+
}
|
|
104
|
+
if (includeFAQ && data.faq?.length > 0) {
|
|
105
|
+
const faq = generateFAQSection(data.faq.slice(0, maxFAQItems));
|
|
106
|
+
sections.push(faq);
|
|
107
|
+
sectionNames.push("faq");
|
|
108
|
+
}
|
|
109
|
+
if (includePages && data.pages?.length > 0) {
|
|
110
|
+
const pages = generatePagesSection(data.pages.slice(0, maxPages), data.business?.website || "");
|
|
111
|
+
sections.push(pages);
|
|
112
|
+
sectionNames.push("pages");
|
|
113
|
+
}
|
|
114
|
+
for (const custom of customSections) {
|
|
115
|
+
sections.push(`## ${custom.title}
|
|
116
|
+
|
|
117
|
+
${custom.content}`);
|
|
118
|
+
sectionNames.push(custom.title.toLowerCase().replace(/\s+/g, "-"));
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
markdown: sections.join("\n\n---\n\n"),
|
|
122
|
+
metadata: {
|
|
123
|
+
generated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
124
|
+
project_id: projectId || "",
|
|
125
|
+
sections: sectionNames
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
async function generateLLMsFullTxt(options) {
|
|
130
|
+
return generateLLMsTxt({
|
|
131
|
+
...options,
|
|
132
|
+
includeBusinessInfo: true,
|
|
133
|
+
includeServices: true,
|
|
134
|
+
includeFAQ: true,
|
|
135
|
+
includePages: true,
|
|
136
|
+
includeContact: true,
|
|
137
|
+
maxFAQItems: 100,
|
|
138
|
+
maxPages: 200
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function generateHeaderSection(business) {
|
|
142
|
+
const lines = [];
|
|
143
|
+
lines.push(`# ${business.name}`);
|
|
144
|
+
lines.push("");
|
|
145
|
+
const summary = business.tagline || business.description.split(".")[0];
|
|
146
|
+
lines.push(`> ${summary}`);
|
|
147
|
+
if (business.industry) {
|
|
148
|
+
lines.push("");
|
|
149
|
+
lines.push(`**Industry:** ${business.industry}`);
|
|
150
|
+
}
|
|
151
|
+
if (business.service_area) {
|
|
152
|
+
lines.push(`**Service Area:** ${business.service_area}`);
|
|
153
|
+
}
|
|
154
|
+
if (business.website) {
|
|
155
|
+
lines.push(`**Website:** ${business.website}`);
|
|
156
|
+
}
|
|
157
|
+
return lines.join("\n");
|
|
158
|
+
}
|
|
159
|
+
function generateAboutSection(business) {
|
|
160
|
+
const lines = [];
|
|
161
|
+
lines.push("## About");
|
|
162
|
+
lines.push("");
|
|
163
|
+
lines.push(business.description);
|
|
164
|
+
if (business.founded) {
|
|
165
|
+
lines.push("");
|
|
166
|
+
lines.push(`Established: ${business.founded}`);
|
|
167
|
+
}
|
|
168
|
+
return lines.join("\n");
|
|
169
|
+
}
|
|
170
|
+
function generateServicesSection(services) {
|
|
171
|
+
const lines = [];
|
|
172
|
+
lines.push("## Services");
|
|
173
|
+
lines.push("");
|
|
174
|
+
for (const service of services) {
|
|
175
|
+
if (service.url) {
|
|
176
|
+
lines.push(`- **[${service.name}](${service.url})**: ${service.description}`);
|
|
177
|
+
} else {
|
|
178
|
+
lines.push(`- **${service.name}**: ${service.description}`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return lines.join("\n");
|
|
182
|
+
}
|
|
183
|
+
function generateContactSection(contact) {
|
|
184
|
+
const lines = [];
|
|
185
|
+
lines.push("## Contact Information");
|
|
186
|
+
lines.push("");
|
|
187
|
+
if (contact.phone) {
|
|
188
|
+
lines.push(`- **Phone:** ${contact.phone}`);
|
|
189
|
+
}
|
|
190
|
+
if (contact.email) {
|
|
191
|
+
lines.push(`- **Email:** ${contact.email}`);
|
|
192
|
+
}
|
|
193
|
+
if (contact.address || contact.city) {
|
|
194
|
+
const addressParts = [
|
|
195
|
+
contact.address,
|
|
196
|
+
contact.city,
|
|
197
|
+
contact.state,
|
|
198
|
+
contact.postal_code,
|
|
199
|
+
contact.country
|
|
200
|
+
].filter(Boolean);
|
|
201
|
+
lines.push(`- **Address:** ${addressParts.join(", ")}`);
|
|
202
|
+
}
|
|
203
|
+
if (contact.hours) {
|
|
204
|
+
lines.push(`- **Hours:** ${contact.hours}`);
|
|
205
|
+
}
|
|
206
|
+
return lines.join("\n");
|
|
207
|
+
}
|
|
208
|
+
function generateFAQSection(faq) {
|
|
209
|
+
const lines = [];
|
|
210
|
+
lines.push("## Frequently Asked Questions");
|
|
211
|
+
lines.push("");
|
|
212
|
+
for (const item of faq) {
|
|
213
|
+
lines.push(`### ${item.question}`);
|
|
214
|
+
lines.push("");
|
|
215
|
+
lines.push(item.answer);
|
|
216
|
+
lines.push("");
|
|
217
|
+
}
|
|
218
|
+
return lines.join("\n").trim();
|
|
219
|
+
}
|
|
220
|
+
function generatePagesSection(pages, baseUrl) {
|
|
221
|
+
const lines = [];
|
|
222
|
+
lines.push("## Site Pages");
|
|
223
|
+
lines.push("");
|
|
224
|
+
for (const page of pages) {
|
|
225
|
+
const url = page.path.startsWith("http") ? page.path : `${baseUrl}${page.path}`;
|
|
226
|
+
if (page.description) {
|
|
227
|
+
lines.push(`- [${page.title}](${url}): ${page.description}`);
|
|
228
|
+
} else {
|
|
229
|
+
lines.push(`- [${page.title}](${url})`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return lines.join("\n");
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/llms/handlers.ts
|
|
236
|
+
function createLLMsTxtHandler(options = {}) {
|
|
237
|
+
return async function GET() {
|
|
238
|
+
try {
|
|
239
|
+
const { markdown, metadata } = await generateLLMsTxt(options);
|
|
240
|
+
return new Response(markdown, {
|
|
241
|
+
status: 200,
|
|
242
|
+
headers: {
|
|
243
|
+
"Content-Type": "text/plain; charset=utf-8",
|
|
244
|
+
"Cache-Control": "public, max-age=3600, s-maxage=3600",
|
|
245
|
+
"X-Generated-At": metadata.generated_at,
|
|
246
|
+
"X-Sections": metadata.sections.join(",")
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
} catch (error) {
|
|
250
|
+
console.error("@uptrade/llms: Error generating llms.txt:", error);
|
|
251
|
+
return new Response("# Error\n\nUnable to generate llms.txt content.", {
|
|
252
|
+
status: 500,
|
|
253
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function createLLMsFullTxtHandler(options = {}) {
|
|
259
|
+
return async function GET() {
|
|
260
|
+
try {
|
|
261
|
+
const { markdown, metadata } = await generateLLMsFullTxt(options);
|
|
262
|
+
return new Response(markdown, {
|
|
263
|
+
status: 200,
|
|
264
|
+
headers: {
|
|
265
|
+
"Content-Type": "text/plain; charset=utf-8",
|
|
266
|
+
"Cache-Control": "public, max-age=3600, s-maxage=3600",
|
|
267
|
+
"X-Generated-At": metadata.generated_at,
|
|
268
|
+
"X-Sections": metadata.sections.join(",")
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
} catch (error) {
|
|
272
|
+
console.error("@uptrade/llms: Error generating llms-full.txt:", error);
|
|
273
|
+
return new Response("# Error\n\nUnable to generate llms-full.txt content.", {
|
|
274
|
+
status: 500,
|
|
275
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
function SpeakableSchema({
|
|
281
|
+
type,
|
|
282
|
+
name,
|
|
283
|
+
url,
|
|
284
|
+
speakable,
|
|
285
|
+
additionalProperties = {}
|
|
286
|
+
}) {
|
|
287
|
+
const schema = createSpeakableSchema(type, name, url, speakable, additionalProperties);
|
|
288
|
+
return /* @__PURE__ */ jsx(
|
|
289
|
+
"script",
|
|
290
|
+
{
|
|
291
|
+
type: "application/ld+json",
|
|
292
|
+
dangerouslySetInnerHTML: {
|
|
293
|
+
__html: JSON.stringify(schema, null, 0)
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
function createSpeakableSchema(type, name, url, speakable, additionalProperties = {}) {
|
|
299
|
+
const speakableSpec = {
|
|
300
|
+
"@type": "SpeakableSpecification"
|
|
301
|
+
};
|
|
302
|
+
if (speakable.cssSelectors?.length) {
|
|
303
|
+
speakableSpec.cssSelector = speakable.cssSelectors;
|
|
304
|
+
} else if (speakable.xPaths?.length) {
|
|
305
|
+
speakableSpec.xpath = speakable.xPaths;
|
|
306
|
+
} else {
|
|
307
|
+
speakableSpec.cssSelector = [
|
|
308
|
+
"h1",
|
|
309
|
+
"[data-speakable]",
|
|
310
|
+
".page-summary",
|
|
311
|
+
".key-points",
|
|
312
|
+
'meta[name="description"]'
|
|
313
|
+
];
|
|
314
|
+
}
|
|
315
|
+
return {
|
|
316
|
+
"@context": "https://schema.org",
|
|
317
|
+
"@type": type,
|
|
318
|
+
name,
|
|
319
|
+
url,
|
|
320
|
+
speakable: speakableSpec,
|
|
321
|
+
...additionalProperties
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
var DEFAULT_SPEAKABLE_SELECTORS = {
|
|
325
|
+
/** Standard page elements */
|
|
326
|
+
page: ["h1", 'meta[name="description"]', ".page-summary"],
|
|
327
|
+
/** Article/blog post elements */
|
|
328
|
+
article: ["h1", ".article-summary", ".article-intro", 'meta[name="description"]'],
|
|
329
|
+
/** Service page elements */
|
|
330
|
+
service: ["h1", ".service-overview", ".key-benefits", 'meta[name="description"]'],
|
|
331
|
+
/** FAQ page elements */
|
|
332
|
+
faq: ["h1", ".faq-intro", ".faq-item"],
|
|
333
|
+
/** Contact page elements */
|
|
334
|
+
contact: ["h1", ".contact-intro", ".business-hours", ".contact-info"]
|
|
335
|
+
};
|
|
336
|
+
function getSpeakableSelectorsForPage(pageType) {
|
|
337
|
+
return DEFAULT_SPEAKABLE_SELECTORS[pageType] || DEFAULT_SPEAKABLE_SELECTORS.page;
|
|
338
|
+
}
|
|
339
|
+
function AEOBlock({
|
|
340
|
+
id,
|
|
341
|
+
type,
|
|
342
|
+
question,
|
|
343
|
+
speakable = true,
|
|
344
|
+
entityId,
|
|
345
|
+
children,
|
|
346
|
+
className = ""
|
|
347
|
+
}) {
|
|
348
|
+
const blockId = id || `aeo-${type}-${Math.random().toString(36).slice(2, 8)}`;
|
|
349
|
+
const baseClasses = `aeo-block aeo-${type}`;
|
|
350
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
351
|
+
const sonorAttrs = {
|
|
352
|
+
"data-sonor-ai": type,
|
|
353
|
+
"data-sonor-block": "true",
|
|
354
|
+
...entityId && { "data-sonor-entity": entityId }
|
|
355
|
+
};
|
|
356
|
+
if (type === "answer" && question) {
|
|
357
|
+
return /* @__PURE__ */ jsxs(
|
|
358
|
+
"section",
|
|
359
|
+
{
|
|
360
|
+
id: blockId,
|
|
361
|
+
className: combinedClasses,
|
|
362
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
363
|
+
"data-aeo-type": type,
|
|
364
|
+
...sonorAttrs,
|
|
365
|
+
itemScope: true,
|
|
366
|
+
itemType: "https://schema.org/Question",
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ jsx("h3", { itemProp: "name", className: "aeo-question", children: question }),
|
|
369
|
+
/* @__PURE__ */ jsx(
|
|
370
|
+
"div",
|
|
371
|
+
{
|
|
372
|
+
itemScope: true,
|
|
373
|
+
itemType: "https://schema.org/Answer",
|
|
374
|
+
itemProp: "acceptedAnswer",
|
|
375
|
+
className: "aeo-answer",
|
|
376
|
+
children: /* @__PURE__ */ jsx("div", { itemProp: "text", children })
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
if (type === "definition") {
|
|
384
|
+
return /* @__PURE__ */ jsx(
|
|
385
|
+
"section",
|
|
386
|
+
{
|
|
387
|
+
id: blockId,
|
|
388
|
+
className: combinedClasses,
|
|
389
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
390
|
+
"data-aeo-type": type,
|
|
391
|
+
...sonorAttrs,
|
|
392
|
+
children
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
if (type === "steps") {
|
|
397
|
+
return /* @__PURE__ */ jsx(
|
|
398
|
+
"section",
|
|
399
|
+
{
|
|
400
|
+
id: blockId,
|
|
401
|
+
className: combinedClasses,
|
|
402
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
403
|
+
"data-aeo-type": type,
|
|
404
|
+
...sonorAttrs,
|
|
405
|
+
itemScope: true,
|
|
406
|
+
itemType: "https://schema.org/HowTo",
|
|
407
|
+
children
|
|
408
|
+
}
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
return /* @__PURE__ */ jsx(
|
|
412
|
+
"section",
|
|
413
|
+
{
|
|
414
|
+
id: blockId,
|
|
415
|
+
className: combinedClasses,
|
|
416
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
417
|
+
"data-aeo-type": type,
|
|
418
|
+
...sonorAttrs,
|
|
419
|
+
children
|
|
420
|
+
}
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
function AEOSummary({
|
|
424
|
+
title = "Key Points",
|
|
425
|
+
points,
|
|
426
|
+
speakable = true,
|
|
427
|
+
entityId,
|
|
428
|
+
className = ""
|
|
429
|
+
}) {
|
|
430
|
+
const baseClasses = "aeo-summary";
|
|
431
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
432
|
+
return /* @__PURE__ */ jsxs(
|
|
433
|
+
"div",
|
|
434
|
+
{
|
|
435
|
+
className: combinedClasses,
|
|
436
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
437
|
+
"data-aeo-type": "summary",
|
|
438
|
+
"data-sonor-ai": "summary",
|
|
439
|
+
"data-sonor-block": "true",
|
|
440
|
+
...entityId && { "data-sonor-entity": entityId },
|
|
441
|
+
children: [
|
|
442
|
+
title && /* @__PURE__ */ jsx("h3", { className: "aeo-summary-title", children: title }),
|
|
443
|
+
/* @__PURE__ */ jsx("ul", { className: "aeo-summary-points", children: points.map((point, index) => /* @__PURE__ */ jsx("li", { className: "aeo-summary-point", children: point }, index)) })
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
function AEODefinition({
|
|
449
|
+
term,
|
|
450
|
+
definition,
|
|
451
|
+
speakable = true,
|
|
452
|
+
entityId,
|
|
453
|
+
source,
|
|
454
|
+
className = ""
|
|
455
|
+
}) {
|
|
456
|
+
const baseClasses = "aeo-definition";
|
|
457
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
458
|
+
return /* @__PURE__ */ jsxs(
|
|
459
|
+
"dl",
|
|
460
|
+
{
|
|
461
|
+
className: combinedClasses,
|
|
462
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
463
|
+
"data-aeo-type": "definition",
|
|
464
|
+
"data-sonor-ai": "definition",
|
|
465
|
+
"data-sonor-block": "true",
|
|
466
|
+
...entityId && { "data-sonor-entity": entityId },
|
|
467
|
+
...source && { "data-sonor-source": source },
|
|
468
|
+
itemScope: true,
|
|
469
|
+
itemType: "https://schema.org/DefinedTerm",
|
|
470
|
+
children: [
|
|
471
|
+
/* @__PURE__ */ jsx("dt", { className: "aeo-term", itemProp: "name", children: /* @__PURE__ */ jsx("strong", { children: term }) }),
|
|
472
|
+
/* @__PURE__ */ jsx("dd", { className: "aeo-definition-text", itemProp: "description", children: definition })
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
function AEOSteps({
|
|
478
|
+
title,
|
|
479
|
+
children,
|
|
480
|
+
speakable = true,
|
|
481
|
+
entityId,
|
|
482
|
+
className = ""
|
|
483
|
+
}) {
|
|
484
|
+
const baseClasses = "aeo-steps";
|
|
485
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
486
|
+
return /* @__PURE__ */ jsxs(
|
|
487
|
+
"section",
|
|
488
|
+
{
|
|
489
|
+
className: combinedClasses,
|
|
490
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
491
|
+
"data-aeo-type": "steps",
|
|
492
|
+
"data-sonor-ai": "steps",
|
|
493
|
+
"data-sonor-block": "true",
|
|
494
|
+
...entityId && { "data-sonor-entity": entityId },
|
|
495
|
+
itemScope: true,
|
|
496
|
+
itemType: "https://schema.org/HowTo",
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ jsx("h3", { className: "aeo-steps-title", itemProp: "name", children: title }),
|
|
499
|
+
/* @__PURE__ */ jsx("ol", { className: "aeo-steps-list", children })
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
function AEOStep({
|
|
505
|
+
number,
|
|
506
|
+
name,
|
|
507
|
+
children
|
|
508
|
+
}) {
|
|
509
|
+
return /* @__PURE__ */ jsxs(
|
|
510
|
+
"li",
|
|
511
|
+
{
|
|
512
|
+
className: "aeo-step",
|
|
513
|
+
itemScope: true,
|
|
514
|
+
itemType: "https://schema.org/HowToStep",
|
|
515
|
+
itemProp: "step",
|
|
516
|
+
children: [
|
|
517
|
+
/* @__PURE__ */ jsx("span", { className: "aeo-step-number", itemProp: "position", children: number }),
|
|
518
|
+
/* @__PURE__ */ jsx("strong", { className: "aeo-step-name", itemProp: "name", children: name }),
|
|
519
|
+
/* @__PURE__ */ jsx("div", { className: "aeo-step-content", itemProp: "text", children })
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
function AEOComparison({
|
|
525
|
+
title,
|
|
526
|
+
items,
|
|
527
|
+
labelA,
|
|
528
|
+
labelB,
|
|
529
|
+
speakable = true,
|
|
530
|
+
entityId,
|
|
531
|
+
className = ""
|
|
532
|
+
}) {
|
|
533
|
+
const baseClasses = "aeo-comparison";
|
|
534
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
535
|
+
return /* @__PURE__ */ jsxs(
|
|
536
|
+
"section",
|
|
537
|
+
{
|
|
538
|
+
className: combinedClasses,
|
|
539
|
+
"data-speakable": speakable ? "true" : void 0,
|
|
540
|
+
"data-aeo-type": "comparison",
|
|
541
|
+
"data-sonor-ai": "comparison",
|
|
542
|
+
"data-sonor-block": "true",
|
|
543
|
+
...entityId && { "data-sonor-entity": entityId },
|
|
544
|
+
children: [
|
|
545
|
+
/* @__PURE__ */ jsx("h3", { className: "aeo-comparison-title", children: title }),
|
|
546
|
+
/* @__PURE__ */ jsxs("table", { className: "aeo-comparison-table", children: [
|
|
547
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
548
|
+
/* @__PURE__ */ jsx("th", { children: "Aspect" }),
|
|
549
|
+
/* @__PURE__ */ jsx("th", { children: labelA }),
|
|
550
|
+
/* @__PURE__ */ jsx("th", { children: labelB })
|
|
551
|
+
] }) }),
|
|
552
|
+
/* @__PURE__ */ jsx("tbody", { children: items.map((item, index) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
553
|
+
/* @__PURE__ */ jsx("td", { className: "aeo-comparison-aspect", children: item.aspect }),
|
|
554
|
+
/* @__PURE__ */ jsx("td", { className: "aeo-comparison-a", children: item.optionA }),
|
|
555
|
+
/* @__PURE__ */ jsx("td", { className: "aeo-comparison-b", children: item.optionB })
|
|
556
|
+
] }, index)) })
|
|
557
|
+
] })
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
function AEOClaim({
|
|
563
|
+
source,
|
|
564
|
+
sourceUrl,
|
|
565
|
+
confidence = 1,
|
|
566
|
+
claimType = "fact",
|
|
567
|
+
retrievedAt,
|
|
568
|
+
children,
|
|
569
|
+
className = ""
|
|
570
|
+
}) {
|
|
571
|
+
const baseClasses = "aeo-claim";
|
|
572
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
573
|
+
return /* @__PURE__ */ jsxs(
|
|
574
|
+
"span",
|
|
575
|
+
{
|
|
576
|
+
className: combinedClasses,
|
|
577
|
+
"data-sonor-claim": "true",
|
|
578
|
+
"data-sonor-source": source,
|
|
579
|
+
...sourceUrl && { "data-sonor-source-url": sourceUrl },
|
|
580
|
+
"data-sonor-confidence": confidence.toString(),
|
|
581
|
+
"data-sonor-claim-type": claimType,
|
|
582
|
+
...retrievedAt && { "data-sonor-retrieved": retrievedAt },
|
|
583
|
+
itemScope: true,
|
|
584
|
+
itemType: "https://schema.org/Claim",
|
|
585
|
+
children: [
|
|
586
|
+
/* @__PURE__ */ jsx("span", { itemProp: "text", children }),
|
|
587
|
+
sourceUrl ? /* @__PURE__ */ jsx("meta", { itemProp: "citation", content: sourceUrl }) : /* @__PURE__ */ jsx("meta", { itemProp: "citation", content: source })
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
function AEOEntity({
|
|
593
|
+
entityId,
|
|
594
|
+
entityType,
|
|
595
|
+
name,
|
|
596
|
+
url,
|
|
597
|
+
children,
|
|
598
|
+
className = ""
|
|
599
|
+
}) {
|
|
600
|
+
const baseClasses = "aeo-entity";
|
|
601
|
+
const combinedClasses = className ? `${baseClasses} aeo-entity-${entityType} ${className}` : `${baseClasses} aeo-entity-${entityType}`;
|
|
602
|
+
return /* @__PURE__ */ jsxs(
|
|
603
|
+
"span",
|
|
604
|
+
{
|
|
605
|
+
className: combinedClasses,
|
|
606
|
+
"data-sonor-entity": entityId,
|
|
607
|
+
"data-sonor-entity-type": entityType,
|
|
608
|
+
"data-sonor-entity-name": name,
|
|
609
|
+
...url && { "data-sonor-entity-url": url },
|
|
610
|
+
itemScope: true,
|
|
611
|
+
itemType: `https://schema.org/${entityType === "organization" ? "Organization" : entityType === "person" ? "Person" : entityType === "location" ? "Place" : "Thing"}`,
|
|
612
|
+
children: [
|
|
613
|
+
/* @__PURE__ */ jsx("span", { itemProp: "name", children }),
|
|
614
|
+
url && /* @__PURE__ */ jsx("link", { itemProp: "url", href: url })
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
function AEOProvenanceList({
|
|
620
|
+
sources,
|
|
621
|
+
title = "Sources & References",
|
|
622
|
+
className = ""
|
|
623
|
+
}) {
|
|
624
|
+
const baseClasses = "aeo-provenance-list";
|
|
625
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
626
|
+
const getSchemaType = (sourceType) => {
|
|
627
|
+
switch (sourceType) {
|
|
628
|
+
case "legal_statute":
|
|
629
|
+
return "https://schema.org/Legislation";
|
|
630
|
+
case "research_paper":
|
|
631
|
+
return "https://schema.org/ScholarlyArticle";
|
|
632
|
+
case "news_article":
|
|
633
|
+
return "https://schema.org/NewsArticle";
|
|
634
|
+
case "press_release":
|
|
635
|
+
return "https://schema.org/NewsArticle";
|
|
636
|
+
default:
|
|
637
|
+
return "https://schema.org/CreativeWork";
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
return /* @__PURE__ */ jsxs(
|
|
641
|
+
"aside",
|
|
642
|
+
{
|
|
643
|
+
className: combinedClasses,
|
|
644
|
+
"data-sonor-provenance": "list",
|
|
645
|
+
"data-sonor-source-count": sources.length.toString(),
|
|
646
|
+
itemScope: true,
|
|
647
|
+
itemType: "https://schema.org/ItemList",
|
|
648
|
+
children: [
|
|
649
|
+
/* @__PURE__ */ jsx("h4", { className: "aeo-provenance-title", itemProp: "name", children: title }),
|
|
650
|
+
/* @__PURE__ */ jsx("ol", { className: "aeo-provenance-sources", children: sources.map((source, index) => /* @__PURE__ */ jsxs(
|
|
651
|
+
"li",
|
|
652
|
+
{
|
|
653
|
+
className: "aeo-provenance-item",
|
|
654
|
+
"data-sonor-source-id": source.id,
|
|
655
|
+
"data-sonor-source-type": source.source_type,
|
|
656
|
+
...source.confidence && { "data-sonor-confidence": source.confidence.toString() },
|
|
657
|
+
itemScope: true,
|
|
658
|
+
itemType: getSchemaType(source.source_type),
|
|
659
|
+
itemProp: "itemListElement",
|
|
660
|
+
children: [
|
|
661
|
+
/* @__PURE__ */ jsxs("span", { className: "aeo-provenance-number", children: [
|
|
662
|
+
"[",
|
|
663
|
+
index + 1,
|
|
664
|
+
"]"
|
|
665
|
+
] }),
|
|
666
|
+
source.url ? /* @__PURE__ */ jsx(
|
|
667
|
+
"a",
|
|
668
|
+
{
|
|
669
|
+
href: source.url,
|
|
670
|
+
className: "aeo-provenance-link",
|
|
671
|
+
itemProp: "url",
|
|
672
|
+
target: "_blank",
|
|
673
|
+
rel: "noopener noreferrer",
|
|
674
|
+
children: /* @__PURE__ */ jsx("span", { itemProp: "name", children: source.title })
|
|
675
|
+
}
|
|
676
|
+
) : /* @__PURE__ */ jsx("span", { itemProp: "name", children: source.title }),
|
|
677
|
+
source.publisher && /* @__PURE__ */ jsxs("span", { className: "aeo-provenance-publisher", itemProp: "publisher", children: [
|
|
678
|
+
"\u2014 ",
|
|
679
|
+
source.publisher
|
|
680
|
+
] }),
|
|
681
|
+
source.published_at && /* @__PURE__ */ jsxs(
|
|
682
|
+
"time",
|
|
683
|
+
{
|
|
684
|
+
className: "aeo-provenance-date",
|
|
685
|
+
itemProp: "datePublished",
|
|
686
|
+
dateTime: source.published_at,
|
|
687
|
+
children: [
|
|
688
|
+
"(",
|
|
689
|
+
new Date(source.published_at).toLocaleDateString(),
|
|
690
|
+
")"
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
),
|
|
694
|
+
source.identifier && /* @__PURE__ */ jsx("span", { className: "aeo-provenance-identifier", "data-sonor-identifier": source.identifier, children: source.identifier }),
|
|
695
|
+
source.excerpt && /* @__PURE__ */ jsx("blockquote", { className: "aeo-provenance-excerpt", itemProp: "description", children: source.excerpt })
|
|
696
|
+
]
|
|
697
|
+
},
|
|
698
|
+
source.id
|
|
699
|
+
)) })
|
|
700
|
+
]
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
function AEOCitedContent({
|
|
705
|
+
children,
|
|
706
|
+
sources,
|
|
707
|
+
showSourcesList = true,
|
|
708
|
+
className = ""
|
|
709
|
+
}) {
|
|
710
|
+
const baseClasses = "aeo-cited-content";
|
|
711
|
+
const combinedClasses = className ? `${baseClasses} ${className}` : baseClasses;
|
|
712
|
+
return /* @__PURE__ */ jsxs(
|
|
713
|
+
"section",
|
|
714
|
+
{
|
|
715
|
+
className: combinedClasses,
|
|
716
|
+
"data-sonor-ai": "cited-content",
|
|
717
|
+
"data-sonor-provenance": "inline",
|
|
718
|
+
"data-sonor-source-count": sources.length.toString(),
|
|
719
|
+
children: [
|
|
720
|
+
/* @__PURE__ */ jsx("div", { className: "aeo-cited-body", children }),
|
|
721
|
+
showSourcesList && sources.length > 0 && /* @__PURE__ */ jsx(AEOProvenanceList, { sources, title: "References" })
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createLLMsFullTxtHandler, createLLMsTxtHandler, createSpeakableSchema, generateLLMsFullTxt, generateLLMsTxt, getBusinessInfo, getFAQItems, getLLMsData, getPageSummaries, getServices, getSpeakableSelectorsForPage };
|
|
728
|
+
//# sourceMappingURL=chunk-CG53ASWX.mjs.map
|
|
729
|
+
//# sourceMappingURL=chunk-CG53ASWX.mjs.map
|