@uptrademedia/site-kit 1.0.38 → 1.0.41

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