@sonordev/site-kit 1.2.9 → 1.3.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/AnalyticsProvider-FX5TLRQC.mjs +4 -0
- package/dist/AnalyticsProvider-FX5TLRQC.mjs.map +1 -0
- package/dist/AnalyticsProvider-PIUZBIOK.js +21 -0
- package/dist/AnalyticsProvider-PIUZBIOK.js.map +1 -0
- package/dist/EngageWidget-I4AZTKFY.js +13 -0
- package/dist/EngageWidget-I4AZTKFY.js.map +1 -0
- package/dist/EngageWidget-R7YFQBS5.mjs +4 -0
- package/dist/EngageWidget-R7YFQBS5.mjs.map +1 -0
- package/dist/SignalBridge-6UYUZ2CN.js +33 -0
- package/dist/SignalBridge-6UYUZ2CN.js.map +1 -0
- package/dist/SignalBridge-WGHMEILW.mjs +4 -0
- package/dist/SignalBridge-WGHMEILW.mjs.map +1 -0
- package/dist/SitemapSync-4FRADGXF.js +19 -0
- package/dist/SitemapSync-4FRADGXF.js.map +1 -0
- package/dist/SitemapSync-IJRJ32Y3.mjs +4 -0
- package/dist/SitemapSync-IJRJ32Y3.mjs.map +1 -0
- package/dist/analytics/index.js +6 -6
- package/dist/analytics/index.mjs +2 -2
- package/dist/{chunk-BBITDUZQ.js → chunk-3QQDXQJE.js} +4 -4
- package/dist/{chunk-BBITDUZQ.js.map → chunk-3QQDXQJE.js.map} +1 -1
- package/dist/{chunk-5F7FFUPJ.mjs → chunk-44GSXYHJ.mjs} +11 -4
- package/dist/chunk-44GSXYHJ.mjs.map +1 -0
- package/dist/{chunk-UPR5FEIO.mjs → chunk-4QHHFCAA.mjs} +2 -2
- package/dist/{chunk-UPR5FEIO.mjs.map → chunk-4QHHFCAA.mjs.map} +1 -1
- package/dist/{chunk-QETK4P5G.mjs → chunk-6TFGPXXK.mjs} +24 -10
- package/dist/chunk-6TFGPXXK.mjs.map +1 -0
- package/dist/{chunk-VTECURKB.js → chunk-742WMKQC.js} +28 -10
- package/dist/chunk-742WMKQC.js.map +1 -0
- package/dist/{chunk-JIDOXTX2.mjs → chunk-EGZEZR2I.mjs} +4 -3
- package/dist/chunk-EGZEZR2I.mjs.map +1 -0
- package/dist/{chunk-EISQ7LJG.mjs → chunk-GADRLCYH.mjs} +4 -4
- package/dist/{chunk-EISQ7LJG.mjs.map → chunk-GADRLCYH.mjs.map} +1 -1
- package/dist/{chunk-TG46LJFB.js → chunk-JAXKHEOM.js} +3 -3
- package/dist/{chunk-TG46LJFB.js.map → chunk-JAXKHEOM.js.map} +1 -1
- package/dist/{chunk-DOSSLBNW.mjs → chunk-TK76624B.mjs} +3 -3
- package/dist/{chunk-DOSSLBNW.mjs.map → chunk-TK76624B.mjs.map} +1 -1
- package/dist/{chunk-PPRAW576.js → chunk-UOBK3SSF.js} +4 -2
- package/dist/chunk-UOBK3SSF.js.map +1 -0
- package/dist/{chunk-REMHGWXT.js → chunk-YBTYDBWY.js} +2 -2
- package/dist/{chunk-REMHGWXT.js.map → chunk-YBTYDBWY.js.map} +1 -1
- package/dist/{chunk-2XOW276O.js → chunk-YIL674PV.js} +11 -4
- package/dist/chunk-YIL674PV.js.map +1 -0
- package/dist/engage/index.js +4 -4
- package/dist/engage/index.mjs +1 -1
- package/dist/index.js +37 -37
- package/dist/index.mjs +5 -5
- package/dist/layout/client.js +2 -6
- package/dist/layout/client.mjs +1 -5
- package/dist/layout/index.js +5 -9
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +2 -6
- package/dist/layout/index.mjs.map +1 -1
- package/dist/seo/index.d.mts +19 -198
- package/dist/seo/index.d.ts +19 -198
- package/dist/seo/index.js +35 -24
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +33 -22
- package/dist/seo/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2XOW276O.js.map +0 -1
- package/dist/chunk-5F7FFUPJ.mjs.map +0 -1
- package/dist/chunk-JIDOXTX2.mjs.map +0 -1
- package/dist/chunk-PPRAW576.js.map +0 -1
- package/dist/chunk-QETK4P5G.mjs.map +0 -1
- package/dist/chunk-VTECURKB.js.map +0 -1
package/dist/seo/index.d.mts
CHANGED
|
@@ -284,67 +284,6 @@ interface EnhancedManagedSchemaProps extends ManagedSchemaProps {
|
|
|
284
284
|
/** Include entity-enhanced schema from knowledge graph (AI Visibility) */
|
|
285
285
|
includeEntityGraph?: boolean;
|
|
286
286
|
}
|
|
287
|
-
/**
|
|
288
|
-
* ManagedSchema - Server Component that injects JSON-LD schema
|
|
289
|
-
*
|
|
290
|
-
* Fetches schema markup from Portal and renders as script tags.
|
|
291
|
-
* Now with speakable support for voice assistants and AI systems.
|
|
292
|
-
*
|
|
293
|
-
* @example
|
|
294
|
-
* ```tsx
|
|
295
|
-
* // app/services/[slug]/page.tsx
|
|
296
|
-
* import { ManagedSchema } from '@sonordev/seo'
|
|
297
|
-
*
|
|
298
|
-
* export default async function ServicePage({ params }) {
|
|
299
|
-
* return (
|
|
300
|
-
* <>
|
|
301
|
-
* <ManagedSchema
|
|
302
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
303
|
-
* path={`/services/${params.slug}`}
|
|
304
|
-
* speakable={true}
|
|
305
|
-
* pageName="Family Law Services"
|
|
306
|
-
* pageUrl="https://example.com/services/family-law"
|
|
307
|
-
* />
|
|
308
|
-
* <main>...</main>
|
|
309
|
-
* </>
|
|
310
|
-
* )
|
|
311
|
-
* }
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
|
-
declare function ManagedSchema({ path, additionalSchemas, includeTypes, excludeTypes, speakable, pageType, pageName, pageUrl, includeEntityGraph, }: EnhancedManagedSchemaProps): Promise<React.ReactElement | null>;
|
|
315
|
-
/**
|
|
316
|
-
* LLMSchema - Server Component that injects LLM-optimized structured data
|
|
317
|
-
*
|
|
318
|
-
* This component renders AI-visibility optimized data that helps LLM crawlers
|
|
319
|
-
* (like ChatGPT, Claude, Perplexity) better understand page content.
|
|
320
|
-
*
|
|
321
|
-
* The schema includes:
|
|
322
|
-
* - Detailed description (100-200 words for context)
|
|
323
|
-
* - Keywords and topics
|
|
324
|
-
* - Target audience
|
|
325
|
-
* - Content relationships
|
|
326
|
-
*
|
|
327
|
-
* @example
|
|
328
|
-
* ```tsx
|
|
329
|
-
* import { LLMSchema } from '@sonordev/seo'
|
|
330
|
-
*
|
|
331
|
-
* export default async function ServicePage({ params }) {
|
|
332
|
-
* return (
|
|
333
|
-
* <>
|
|
334
|
-
* <LLMSchema
|
|
335
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
336
|
-
* path={`/services/${params.slug}`}
|
|
337
|
-
* />
|
|
338
|
-
* <main>...</main>
|
|
339
|
-
* </>
|
|
340
|
-
* )
|
|
341
|
-
* }
|
|
342
|
-
* ```
|
|
343
|
-
*/
|
|
344
|
-
declare function LLMSchema({ path, }: {
|
|
345
|
-
projectId?: string;
|
|
346
|
-
path: string;
|
|
347
|
-
}): Promise<React.ReactElement | null>;
|
|
348
287
|
/**
|
|
349
288
|
* Generate schema for a specific type with managed data
|
|
350
289
|
*
|
|
@@ -355,154 +294,39 @@ declare function createSchema(type: string, data: Record<string, unknown>): Reco
|
|
|
355
294
|
* Create BreadcrumbList schema from path
|
|
356
295
|
*/
|
|
357
296
|
declare function createBreadcrumbSchema(baseUrl: string, path: string, labels?: Record<string, string>): Record<string, unknown>;
|
|
358
|
-
|
|
359
297
|
/**
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
* Fetches FAQ content from Portal and renders with optional schema injection
|
|
363
|
-
*
|
|
364
|
-
* @example
|
|
365
|
-
* ```tsx
|
|
366
|
-
* // app/services/plumbing/page.tsx
|
|
367
|
-
* import { ManagedFAQ } from '@sonordev/seo'
|
|
368
|
-
*
|
|
369
|
-
* export default async function PlumbingPage() {
|
|
370
|
-
* return (
|
|
371
|
-
* <main>
|
|
372
|
-
* <h1>Plumbing Services</h1>
|
|
373
|
-
* <section>
|
|
374
|
-
* <ManagedFAQ
|
|
375
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
376
|
-
* path="/services/plumbing"
|
|
377
|
-
* showTitle
|
|
378
|
-
* includeSchema
|
|
379
|
-
* />
|
|
380
|
-
* </section>
|
|
381
|
-
* </main>
|
|
382
|
-
* )
|
|
383
|
-
* }
|
|
384
|
-
* ```
|
|
298
|
+
* ManagedSchema — Suspense-wrapped so API fetches never block page streaming.
|
|
299
|
+
* The hero and other page content flush immediately; schema scripts stream in when ready.
|
|
385
300
|
*/
|
|
386
|
-
declare function
|
|
387
|
-
|
|
301
|
+
declare function ManagedSchema(props: EnhancedManagedSchemaProps): React.ReactElement;
|
|
388
302
|
/**
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* Fetches internal link suggestions from Portal and renders them
|
|
392
|
-
*
|
|
393
|
-
* @example
|
|
394
|
-
* ```tsx
|
|
395
|
-
* // In your article component
|
|
396
|
-
* import { ManagedInternalLinks } from '@sonordev/seo'
|
|
397
|
-
*
|
|
398
|
-
* export default async function BlogPost({ params }) {
|
|
399
|
-
* return (
|
|
400
|
-
* <article>
|
|
401
|
-
* <p>Your content here...</p>
|
|
402
|
-
*
|
|
403
|
-
* <ManagedInternalLinks
|
|
404
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
405
|
-
* path={`/blog/${params.slug}`}
|
|
406
|
-
* position="bottom"
|
|
407
|
-
* limit={5}
|
|
408
|
-
* />
|
|
409
|
-
* </article>
|
|
410
|
-
* )
|
|
411
|
-
* }
|
|
412
|
-
* ```
|
|
303
|
+
* LLMSchema — Suspense-wrapped so API fetches never block page streaming.
|
|
413
304
|
*/
|
|
414
|
-
declare function
|
|
305
|
+
declare function LLMSchema(props: {
|
|
306
|
+
projectId?: string;
|
|
307
|
+
path: string;
|
|
308
|
+
}): React.ReactElement;
|
|
415
309
|
|
|
416
310
|
/**
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
* Fetches content sections from Portal and renders them
|
|
420
|
-
* Supports HTML, Markdown, JSON, and React component references
|
|
421
|
-
*
|
|
422
|
-
* @example
|
|
423
|
-
* ```tsx
|
|
424
|
-
* // Hero section managed by Portal
|
|
425
|
-
* import { ManagedContent } from '@sonordev/seo'
|
|
426
|
-
*
|
|
427
|
-
* export default async function ServicePage({ params }) {
|
|
428
|
-
* return (
|
|
429
|
-
* <main>
|
|
430
|
-
* <ManagedContent
|
|
431
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
432
|
-
* path={`/services/${params.slug}`}
|
|
433
|
-
* section="hero"
|
|
434
|
-
* fallback={<DefaultHero />}
|
|
435
|
-
* />
|
|
436
|
-
*
|
|
437
|
-
* <ManagedContent
|
|
438
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
439
|
-
* path={`/services/${params.slug}`}
|
|
440
|
-
* section="features"
|
|
441
|
-
* />
|
|
442
|
-
*
|
|
443
|
-
* <ManagedContent
|
|
444
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
445
|
-
* path={`/services/${params.slug}`}
|
|
446
|
-
* section="cta"
|
|
447
|
-
* />
|
|
448
|
-
* </main>
|
|
449
|
-
* )
|
|
450
|
-
* }
|
|
451
|
-
* ```
|
|
311
|
+
* ManagedFAQ — Suspense-wrapped so the FAQ API fetch never blocks page streaming.
|
|
452
312
|
*/
|
|
453
|
-
declare function
|
|
313
|
+
declare function ManagedFAQ(props: ManagedFAQProps): React.ReactElement;
|
|
314
|
+
|
|
315
|
+
declare function ManagedInternalLinks(props: ManagedInternalLinksProps): React.ReactElement;
|
|
316
|
+
|
|
454
317
|
/**
|
|
455
318
|
* Get content block data without rendering
|
|
456
319
|
*
|
|
457
320
|
* Useful when you need to access the raw data
|
|
458
321
|
*/
|
|
459
322
|
declare function getManagedContentData(path: string, section: string): Promise<ManagedContentBlock | null>;
|
|
323
|
+
declare function ManagedContent(props: ManagedContentProps): React.ReactElement;
|
|
460
324
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
*
|
|
464
|
-
* Fetches scripts from Portal and renders them in the appropriate position
|
|
465
|
-
*
|
|
466
|
-
* @example
|
|
467
|
-
* ```tsx
|
|
468
|
-
* // app/layout.tsx
|
|
469
|
-
* import { ManagedScripts } from '@sonordev/seo'
|
|
470
|
-
*
|
|
471
|
-
* export default function RootLayout({ children }) {
|
|
472
|
-
* return (
|
|
473
|
-
* <html>
|
|
474
|
-
* <head>
|
|
475
|
-
* <ManagedScripts
|
|
476
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
477
|
-
* position="head"
|
|
478
|
-
* />
|
|
479
|
-
* </head>
|
|
480
|
-
* <body>
|
|
481
|
-
* <ManagedScripts
|
|
482
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
483
|
-
* position="body-start"
|
|
484
|
-
* />
|
|
485
|
-
* {children}
|
|
486
|
-
* <ManagedScripts
|
|
487
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
488
|
-
* position="body-end"
|
|
489
|
-
* />
|
|
490
|
-
* </body>
|
|
491
|
-
* </html>
|
|
492
|
-
* )
|
|
493
|
-
* }
|
|
494
|
-
* ```
|
|
495
|
-
*/
|
|
496
|
-
declare function ManagedScripts({ position, path, }: ManagedScriptsProps): Promise<React.ReactElement | null>;
|
|
497
|
-
/**
|
|
498
|
-
* NoScript fallback component
|
|
499
|
-
*
|
|
500
|
-
* Use for adding noscript content (like Google Tag Manager noscript)
|
|
501
|
-
*/
|
|
502
|
-
declare function ManagedNoScripts({ path, }: {
|
|
325
|
+
declare function ManagedScripts(props: ManagedScriptsProps): React.ReactElement;
|
|
326
|
+
declare function ManagedNoScripts(props: {
|
|
503
327
|
projectId?: string;
|
|
504
328
|
path?: string;
|
|
505
|
-
}):
|
|
329
|
+
}): React.ReactElement;
|
|
506
330
|
|
|
507
331
|
/**
|
|
508
332
|
* LocationPageContent - Server Component for fetching location page sections
|
|
@@ -566,12 +390,9 @@ interface TextSectionContent {
|
|
|
566
390
|
*/
|
|
567
391
|
declare const getLocationSection: (projectId: string, path: string, section: string) => Promise<LocationSectionData | null>;
|
|
568
392
|
/**
|
|
569
|
-
* LocationPageContent -
|
|
570
|
-
*
|
|
571
|
-
* Fetches and renders a section of a location page from Portal.
|
|
572
|
-
* Content is fully editable in Portal → SEO → Location Pages.
|
|
393
|
+
* LocationPageContent — Suspense-wrapped so API fetches never block page streaming.
|
|
573
394
|
*/
|
|
574
|
-
declare function LocationPageContent(
|
|
395
|
+
declare function LocationPageContent(props: LocationPageContentProps): React.ReactElement;
|
|
575
396
|
|
|
576
397
|
/**
|
|
577
398
|
* SitemapSync - Automatically sync sitemap.xml to Portal API
|
package/dist/seo/index.d.ts
CHANGED
|
@@ -284,67 +284,6 @@ interface EnhancedManagedSchemaProps extends ManagedSchemaProps {
|
|
|
284
284
|
/** Include entity-enhanced schema from knowledge graph (AI Visibility) */
|
|
285
285
|
includeEntityGraph?: boolean;
|
|
286
286
|
}
|
|
287
|
-
/**
|
|
288
|
-
* ManagedSchema - Server Component that injects JSON-LD schema
|
|
289
|
-
*
|
|
290
|
-
* Fetches schema markup from Portal and renders as script tags.
|
|
291
|
-
* Now with speakable support for voice assistants and AI systems.
|
|
292
|
-
*
|
|
293
|
-
* @example
|
|
294
|
-
* ```tsx
|
|
295
|
-
* // app/services/[slug]/page.tsx
|
|
296
|
-
* import { ManagedSchema } from '@sonordev/seo'
|
|
297
|
-
*
|
|
298
|
-
* export default async function ServicePage({ params }) {
|
|
299
|
-
* return (
|
|
300
|
-
* <>
|
|
301
|
-
* <ManagedSchema
|
|
302
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
303
|
-
* path={`/services/${params.slug}`}
|
|
304
|
-
* speakable={true}
|
|
305
|
-
* pageName="Family Law Services"
|
|
306
|
-
* pageUrl="https://example.com/services/family-law"
|
|
307
|
-
* />
|
|
308
|
-
* <main>...</main>
|
|
309
|
-
* </>
|
|
310
|
-
* )
|
|
311
|
-
* }
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
|
-
declare function ManagedSchema({ path, additionalSchemas, includeTypes, excludeTypes, speakable, pageType, pageName, pageUrl, includeEntityGraph, }: EnhancedManagedSchemaProps): Promise<React.ReactElement | null>;
|
|
315
|
-
/**
|
|
316
|
-
* LLMSchema - Server Component that injects LLM-optimized structured data
|
|
317
|
-
*
|
|
318
|
-
* This component renders AI-visibility optimized data that helps LLM crawlers
|
|
319
|
-
* (like ChatGPT, Claude, Perplexity) better understand page content.
|
|
320
|
-
*
|
|
321
|
-
* The schema includes:
|
|
322
|
-
* - Detailed description (100-200 words for context)
|
|
323
|
-
* - Keywords and topics
|
|
324
|
-
* - Target audience
|
|
325
|
-
* - Content relationships
|
|
326
|
-
*
|
|
327
|
-
* @example
|
|
328
|
-
* ```tsx
|
|
329
|
-
* import { LLMSchema } from '@sonordev/seo'
|
|
330
|
-
*
|
|
331
|
-
* export default async function ServicePage({ params }) {
|
|
332
|
-
* return (
|
|
333
|
-
* <>
|
|
334
|
-
* <LLMSchema
|
|
335
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
336
|
-
* path={`/services/${params.slug}`}
|
|
337
|
-
* />
|
|
338
|
-
* <main>...</main>
|
|
339
|
-
* </>
|
|
340
|
-
* )
|
|
341
|
-
* }
|
|
342
|
-
* ```
|
|
343
|
-
*/
|
|
344
|
-
declare function LLMSchema({ path, }: {
|
|
345
|
-
projectId?: string;
|
|
346
|
-
path: string;
|
|
347
|
-
}): Promise<React.ReactElement | null>;
|
|
348
287
|
/**
|
|
349
288
|
* Generate schema for a specific type with managed data
|
|
350
289
|
*
|
|
@@ -355,154 +294,39 @@ declare function createSchema(type: string, data: Record<string, unknown>): Reco
|
|
|
355
294
|
* Create BreadcrumbList schema from path
|
|
356
295
|
*/
|
|
357
296
|
declare function createBreadcrumbSchema(baseUrl: string, path: string, labels?: Record<string, string>): Record<string, unknown>;
|
|
358
|
-
|
|
359
297
|
/**
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
* Fetches FAQ content from Portal and renders with optional schema injection
|
|
363
|
-
*
|
|
364
|
-
* @example
|
|
365
|
-
* ```tsx
|
|
366
|
-
* // app/services/plumbing/page.tsx
|
|
367
|
-
* import { ManagedFAQ } from '@sonordev/seo'
|
|
368
|
-
*
|
|
369
|
-
* export default async function PlumbingPage() {
|
|
370
|
-
* return (
|
|
371
|
-
* <main>
|
|
372
|
-
* <h1>Plumbing Services</h1>
|
|
373
|
-
* <section>
|
|
374
|
-
* <ManagedFAQ
|
|
375
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
376
|
-
* path="/services/plumbing"
|
|
377
|
-
* showTitle
|
|
378
|
-
* includeSchema
|
|
379
|
-
* />
|
|
380
|
-
* </section>
|
|
381
|
-
* </main>
|
|
382
|
-
* )
|
|
383
|
-
* }
|
|
384
|
-
* ```
|
|
298
|
+
* ManagedSchema — Suspense-wrapped so API fetches never block page streaming.
|
|
299
|
+
* The hero and other page content flush immediately; schema scripts stream in when ready.
|
|
385
300
|
*/
|
|
386
|
-
declare function
|
|
387
|
-
|
|
301
|
+
declare function ManagedSchema(props: EnhancedManagedSchemaProps): React.ReactElement;
|
|
388
302
|
/**
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* Fetches internal link suggestions from Portal and renders them
|
|
392
|
-
*
|
|
393
|
-
* @example
|
|
394
|
-
* ```tsx
|
|
395
|
-
* // In your article component
|
|
396
|
-
* import { ManagedInternalLinks } from '@sonordev/seo'
|
|
397
|
-
*
|
|
398
|
-
* export default async function BlogPost({ params }) {
|
|
399
|
-
* return (
|
|
400
|
-
* <article>
|
|
401
|
-
* <p>Your content here...</p>
|
|
402
|
-
*
|
|
403
|
-
* <ManagedInternalLinks
|
|
404
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
405
|
-
* path={`/blog/${params.slug}`}
|
|
406
|
-
* position="bottom"
|
|
407
|
-
* limit={5}
|
|
408
|
-
* />
|
|
409
|
-
* </article>
|
|
410
|
-
* )
|
|
411
|
-
* }
|
|
412
|
-
* ```
|
|
303
|
+
* LLMSchema — Suspense-wrapped so API fetches never block page streaming.
|
|
413
304
|
*/
|
|
414
|
-
declare function
|
|
305
|
+
declare function LLMSchema(props: {
|
|
306
|
+
projectId?: string;
|
|
307
|
+
path: string;
|
|
308
|
+
}): React.ReactElement;
|
|
415
309
|
|
|
416
310
|
/**
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
* Fetches content sections from Portal and renders them
|
|
420
|
-
* Supports HTML, Markdown, JSON, and React component references
|
|
421
|
-
*
|
|
422
|
-
* @example
|
|
423
|
-
* ```tsx
|
|
424
|
-
* // Hero section managed by Portal
|
|
425
|
-
* import { ManagedContent } from '@sonordev/seo'
|
|
426
|
-
*
|
|
427
|
-
* export default async function ServicePage({ params }) {
|
|
428
|
-
* return (
|
|
429
|
-
* <main>
|
|
430
|
-
* <ManagedContent
|
|
431
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
432
|
-
* path={`/services/${params.slug}`}
|
|
433
|
-
* section="hero"
|
|
434
|
-
* fallback={<DefaultHero />}
|
|
435
|
-
* />
|
|
436
|
-
*
|
|
437
|
-
* <ManagedContent
|
|
438
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
439
|
-
* path={`/services/${params.slug}`}
|
|
440
|
-
* section="features"
|
|
441
|
-
* />
|
|
442
|
-
*
|
|
443
|
-
* <ManagedContent
|
|
444
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
445
|
-
* path={`/services/${params.slug}`}
|
|
446
|
-
* section="cta"
|
|
447
|
-
* />
|
|
448
|
-
* </main>
|
|
449
|
-
* )
|
|
450
|
-
* }
|
|
451
|
-
* ```
|
|
311
|
+
* ManagedFAQ — Suspense-wrapped so the FAQ API fetch never blocks page streaming.
|
|
452
312
|
*/
|
|
453
|
-
declare function
|
|
313
|
+
declare function ManagedFAQ(props: ManagedFAQProps): React.ReactElement;
|
|
314
|
+
|
|
315
|
+
declare function ManagedInternalLinks(props: ManagedInternalLinksProps): React.ReactElement;
|
|
316
|
+
|
|
454
317
|
/**
|
|
455
318
|
* Get content block data without rendering
|
|
456
319
|
*
|
|
457
320
|
* Useful when you need to access the raw data
|
|
458
321
|
*/
|
|
459
322
|
declare function getManagedContentData(path: string, section: string): Promise<ManagedContentBlock | null>;
|
|
323
|
+
declare function ManagedContent(props: ManagedContentProps): React.ReactElement;
|
|
460
324
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
*
|
|
464
|
-
* Fetches scripts from Portal and renders them in the appropriate position
|
|
465
|
-
*
|
|
466
|
-
* @example
|
|
467
|
-
* ```tsx
|
|
468
|
-
* // app/layout.tsx
|
|
469
|
-
* import { ManagedScripts } from '@sonordev/seo'
|
|
470
|
-
*
|
|
471
|
-
* export default function RootLayout({ children }) {
|
|
472
|
-
* return (
|
|
473
|
-
* <html>
|
|
474
|
-
* <head>
|
|
475
|
-
* <ManagedScripts
|
|
476
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
477
|
-
* position="head"
|
|
478
|
-
* />
|
|
479
|
-
* </head>
|
|
480
|
-
* <body>
|
|
481
|
-
* <ManagedScripts
|
|
482
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
483
|
-
* position="body-start"
|
|
484
|
-
* />
|
|
485
|
-
* {children}
|
|
486
|
-
* <ManagedScripts
|
|
487
|
-
* projectId={process.env.UPTRADE_PROJECT_ID!}
|
|
488
|
-
* position="body-end"
|
|
489
|
-
* />
|
|
490
|
-
* </body>
|
|
491
|
-
* </html>
|
|
492
|
-
* )
|
|
493
|
-
* }
|
|
494
|
-
* ```
|
|
495
|
-
*/
|
|
496
|
-
declare function ManagedScripts({ position, path, }: ManagedScriptsProps): Promise<React.ReactElement | null>;
|
|
497
|
-
/**
|
|
498
|
-
* NoScript fallback component
|
|
499
|
-
*
|
|
500
|
-
* Use for adding noscript content (like Google Tag Manager noscript)
|
|
501
|
-
*/
|
|
502
|
-
declare function ManagedNoScripts({ path, }: {
|
|
325
|
+
declare function ManagedScripts(props: ManagedScriptsProps): React.ReactElement;
|
|
326
|
+
declare function ManagedNoScripts(props: {
|
|
503
327
|
projectId?: string;
|
|
504
328
|
path?: string;
|
|
505
|
-
}):
|
|
329
|
+
}): React.ReactElement;
|
|
506
330
|
|
|
507
331
|
/**
|
|
508
332
|
* LocationPageContent - Server Component for fetching location page sections
|
|
@@ -566,12 +390,9 @@ interface TextSectionContent {
|
|
|
566
390
|
*/
|
|
567
391
|
declare const getLocationSection: (projectId: string, path: string, section: string) => Promise<LocationSectionData | null>;
|
|
568
392
|
/**
|
|
569
|
-
* LocationPageContent -
|
|
570
|
-
*
|
|
571
|
-
* Fetches and renders a section of a location page from Portal.
|
|
572
|
-
* Content is fully editable in Portal → SEO → Location Pages.
|
|
393
|
+
* LocationPageContent — Suspense-wrapped so API fetches never block page streaming.
|
|
573
394
|
*/
|
|
574
|
-
declare function LocationPageContent(
|
|
395
|
+
declare function LocationPageContent(props: LocationPageContentProps): React.ReactElement;
|
|
575
396
|
|
|
576
397
|
/**
|
|
577
398
|
* SitemapSync - Automatically sync sitemap.xml to Portal API
|
package/dist/seo/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkYIL674PV_js = require('../chunk-YIL674PV.js');
|
|
4
|
+
var chunkUOBK3SSF_js = require('../chunk-UOBK3SSF.js');
|
|
5
5
|
var chunkCFEOOJUT_js = require('../chunk-CFEOOJUT.js');
|
|
6
6
|
var chunkRMOL4TZ6_js = require('../chunk-RMOL4TZ6.js');
|
|
7
7
|
require('../chunk-ZSMWDLMK.js');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
8
|
var react = require('react');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
11
11
|
// src/seo/getManagedMetadata.ts
|
|
12
12
|
async function getManagedMetadata(options) {
|
|
@@ -180,7 +180,7 @@ var DEFAULT_SPEAKABLE_SELECTORS = [
|
|
|
180
180
|
".key-points",
|
|
181
181
|
'.aeo-block[data-speakable="true"]'
|
|
182
182
|
];
|
|
183
|
-
async function
|
|
183
|
+
async function ManagedSchemaAsync({
|
|
184
184
|
path,
|
|
185
185
|
additionalSchemas = [],
|
|
186
186
|
includeTypes,
|
|
@@ -191,18 +191,11 @@ async function ManagedSchema({
|
|
|
191
191
|
pageUrl,
|
|
192
192
|
includeEntityGraph = true
|
|
193
193
|
}) {
|
|
194
|
-
const schemas = await
|
|
195
|
-
includeTypes,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
let entitySchemas = [];
|
|
200
|
-
if (includeEntityGraph) {
|
|
201
|
-
try {
|
|
202
|
-
entitySchemas = await chunkRMOL4TZ6_js.getEntityEnhancedSchema(path);
|
|
203
|
-
} catch {
|
|
204
|
-
}
|
|
205
|
-
}
|
|
194
|
+
const [schemas, pageData, entitySchemas] = await Promise.all([
|
|
195
|
+
chunkRMOL4TZ6_js.getSchemaMarkups(path, { includeTypes, excludeTypes }),
|
|
196
|
+
chunkRMOL4TZ6_js.getSEOPageData(path),
|
|
197
|
+
includeEntityGraph ? chunkRMOL4TZ6_js.getEntityEnhancedSchema(path).catch(() => []) : Promise.resolve([])
|
|
198
|
+
]);
|
|
206
199
|
const page = pageData?.page;
|
|
207
200
|
const siteUrl = pageData?.project?.site_url || "";
|
|
208
201
|
const allSchemas = [
|
|
@@ -256,7 +249,7 @@ async function ManagedSchema({
|
|
|
256
249
|
}
|
|
257
250
|
);
|
|
258
251
|
}
|
|
259
|
-
async function
|
|
252
|
+
async function LLMSchemaAsync({
|
|
260
253
|
path
|
|
261
254
|
}) {
|
|
262
255
|
const { page: pageData } = await chunkRMOL4TZ6_js.getSEOPageData(path);
|
|
@@ -333,6 +326,12 @@ function createBreadcrumbSchema(baseUrl, path, labels) {
|
|
|
333
326
|
itemListElement: items
|
|
334
327
|
});
|
|
335
328
|
}
|
|
329
|
+
function ManagedSchema(props) {
|
|
330
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ManagedSchemaAsync, { ...props }) });
|
|
331
|
+
}
|
|
332
|
+
function LLMSchema(props) {
|
|
333
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(LLMSchemaAsync, { ...props }) });
|
|
334
|
+
}
|
|
336
335
|
var faqStyles = `
|
|
337
336
|
.uptrade-faq-items {
|
|
338
337
|
display: flex;
|
|
@@ -459,7 +458,7 @@ function generateFAQSchema(items) {
|
|
|
459
458
|
}))
|
|
460
459
|
});
|
|
461
460
|
}
|
|
462
|
-
async function
|
|
461
|
+
async function ManagedFAQAsync({
|
|
463
462
|
path,
|
|
464
463
|
className,
|
|
465
464
|
renderItem,
|
|
@@ -496,6 +495,9 @@ async function ManagedFAQ({
|
|
|
496
495
|
] })
|
|
497
496
|
] });
|
|
498
497
|
}
|
|
498
|
+
function ManagedFAQ(props) {
|
|
499
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ManagedFAQAsync, { ...props }) });
|
|
500
|
+
}
|
|
499
501
|
function DefaultLinkRenderer({ link }) {
|
|
500
502
|
const href = link.target_url || link.target_path;
|
|
501
503
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -508,7 +510,7 @@ function DefaultLinkRenderer({ link }) {
|
|
|
508
510
|
link.id
|
|
509
511
|
);
|
|
510
512
|
}
|
|
511
|
-
async function
|
|
513
|
+
async function ManagedInternalLinksAsync({
|
|
512
514
|
path,
|
|
513
515
|
position = "bottom",
|
|
514
516
|
limit = 5,
|
|
@@ -545,6 +547,9 @@ async function ManagedInternalLinks({
|
|
|
545
547
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "uptrade-internal-links-list", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: renderLink ? renderLink(link) : /* @__PURE__ */ jsxRuntime.jsx(DefaultLinkRenderer, { link }) }, link.id)) })
|
|
546
548
|
] });
|
|
547
549
|
}
|
|
550
|
+
function ManagedInternalLinks(props) {
|
|
551
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ManagedInternalLinksAsync, { ...props }) });
|
|
552
|
+
}
|
|
548
553
|
function renderMarkdown(content) {
|
|
549
554
|
return content.replace(/^### (.*$)/gim, "<h3>$1</h3>").replace(/^## (.*$)/gim, "<h2>$1</h2>").replace(/^# (.*$)/gim, "<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim, "<strong>$1</strong>").replace(/\*(.*)\*/gim, "<em>$1</em>").replace(/\[(.*?)\]\((.*?)\)/gim, '<a href="$2">$1</a>').replace(/\n\n/gim, "</p><p>").replace(/^(.+)$/gim, "<p>$1</p>");
|
|
550
555
|
}
|
|
@@ -580,7 +585,7 @@ function getSchemaTypeForEntity(entityType) {
|
|
|
580
585
|
};
|
|
581
586
|
return typeMap[entityType] || "Thing";
|
|
582
587
|
}
|
|
583
|
-
async function
|
|
588
|
+
async function ManagedContentAsync({
|
|
584
589
|
path,
|
|
585
590
|
section,
|
|
586
591
|
fallback,
|
|
@@ -661,6 +666,9 @@ async function ManagedContent({
|
|
|
661
666
|
async function getManagedContentData(path, section) {
|
|
662
667
|
return chunkRMOL4TZ6_js.getContentBlock(path, section);
|
|
663
668
|
}
|
|
669
|
+
function ManagedContent(props) {
|
|
670
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ManagedContentAsync, { ...props }) });
|
|
671
|
+
}
|
|
664
672
|
function getApiConfig() {
|
|
665
673
|
const apiUrl = process.env.SONOR_API_URL || process.env.UPTRADE_API_URL || process.env.NEXT_PUBLIC_UPTRADE_API_URL || "https://api.sonor.io";
|
|
666
674
|
return { apiUrl };
|
|
@@ -738,7 +746,7 @@ function DefaultRenderer({ data, className }) {
|
|
|
738
746
|
}
|
|
739
747
|
return null;
|
|
740
748
|
}
|
|
741
|
-
async function
|
|
749
|
+
async function LocationPageContentAsync({
|
|
742
750
|
projectId,
|
|
743
751
|
path,
|
|
744
752
|
section,
|
|
@@ -768,18 +776,21 @@ async function LocationPageContent({
|
|
|
768
776
|
return /* @__PURE__ */ jsxRuntime.jsx(DefaultRenderer, { data, className });
|
|
769
777
|
}
|
|
770
778
|
}
|
|
779
|
+
function LocationPageContent(props) {
|
|
780
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: props.fallback ?? null, children: /* @__PURE__ */ jsxRuntime.jsx(LocationPageContentAsync, { ...props }) });
|
|
781
|
+
}
|
|
771
782
|
|
|
772
783
|
Object.defineProperty(exports, "ManagedNoScripts", {
|
|
773
784
|
enumerable: true,
|
|
774
|
-
get: function () { return
|
|
785
|
+
get: function () { return chunkYIL674PV_js.ManagedNoScripts; }
|
|
775
786
|
});
|
|
776
787
|
Object.defineProperty(exports, "ManagedScripts", {
|
|
777
788
|
enumerable: true,
|
|
778
|
-
get: function () { return
|
|
789
|
+
get: function () { return chunkYIL674PV_js.ManagedScripts; }
|
|
779
790
|
});
|
|
780
791
|
Object.defineProperty(exports, "SitemapSync", {
|
|
781
792
|
enumerable: true,
|
|
782
|
-
get: function () { return
|
|
793
|
+
get: function () { return chunkUOBK3SSF_js.SitemapSync; }
|
|
783
794
|
});
|
|
784
795
|
Object.defineProperty(exports, "generateSitemap", {
|
|
785
796
|
enumerable: true,
|