@sonordev/site-kit 1.2.10 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SQSBAPWA.mjs → chunk-3QKTOTWS.mjs} +5 -5
- package/dist/chunk-3QKTOTWS.mjs.map +1 -0
- package/dist/{chunk-BFJDUTXK.js → chunk-5NXUENL3.js} +3 -3
- package/dist/{chunk-BFJDUTXK.js.map → chunk-5NXUENL3.js.map} +1 -1
- package/dist/{chunk-6TFGPXXK.mjs → chunk-5TTTX6NN.mjs} +2 -2
- package/dist/{chunk-6TFGPXXK.mjs.map → chunk-5TTTX6NN.mjs.map} +1 -1
- package/dist/{chunk-5F7FFUPJ.mjs → chunk-J4K335PQ.mjs} +12 -5
- package/dist/chunk-J4K335PQ.mjs.map +1 -0
- package/dist/chunk-JB6I5PYV.js +939 -0
- package/dist/chunk-JB6I5PYV.js.map +1 -0
- package/dist/{chunk-7ROZJDXE.js → chunk-JKPJ2QCC.js} +2 -2
- package/dist/{chunk-7ROZJDXE.js.map → chunk-JKPJ2QCC.js.map} +1 -1
- package/dist/{chunk-JMNSED4O.mjs → chunk-KMLCQYEV.mjs} +3 -3
- package/dist/{chunk-JMNSED4O.mjs.map → chunk-KMLCQYEV.mjs.map} +1 -1
- package/dist/{chunk-2XOW276O.js → chunk-LTTTIJPN.js} +14 -7
- package/dist/chunk-LTTTIJPN.js.map +1 -0
- package/dist/{chunk-742WMKQC.js → chunk-NZHVGBAF.js} +2 -2
- package/dist/{chunk-742WMKQC.js.map → chunk-NZHVGBAF.js.map} +1 -1
- package/dist/{chunk-RMOL4TZ6.js → chunk-PJKHCYI5.js} +5 -5
- package/dist/chunk-PJKHCYI5.js.map +1 -0
- package/dist/{chunk-47Y3YSES.mjs → chunk-QBFTBORL.mjs} +2 -2
- package/dist/{chunk-47Y3YSES.mjs.map → chunk-QBFTBORL.mjs.map} +1 -1
- package/dist/{chunk-2RHO4KSK.mjs → chunk-RJTBSSZB.mjs} +4 -4
- package/dist/{chunk-2RHO4KSK.mjs.map → chunk-RJTBSSZB.mjs.map} +1 -1
- package/dist/{chunk-CFEOOJUT.js → chunk-RRBBMEDL.js} +7 -7
- package/dist/{chunk-CFEOOJUT.js.map → chunk-RRBBMEDL.js.map} +1 -1
- package/dist/chunk-W2TZYAUL.mjs +925 -0
- package/dist/chunk-W2TZYAUL.mjs.map +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.js +60 -938
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -917
- package/dist/index.mjs.map +1 -1
- package/dist/layout/client.js +2 -2
- package/dist/layout/client.mjs +1 -1
- package/dist/layout/index.js +6 -6
- package/dist/layout/index.mjs +3 -3
- package/dist/llms/index.js +12 -12
- package/dist/llms/index.mjs +2 -2
- package/dist/seo/index.d.mts +19 -198
- package/dist/seo/index.d.ts +19 -198
- package/dist/seo/index.js +68 -69
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +36 -37
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo/server.js +4 -4
- package/dist/seo/server.mjs +2 -2
- package/dist/{server-api-HTSLBT6F.mjs → server-api-FCTEQOTK.mjs} +3 -3
- package/dist/{server-api-HTSLBT6F.mjs.map → server-api-FCTEQOTK.mjs.map} +1 -1
- package/dist/{server-api-C5JXIROA.js → server-api-SYINXTN7.js} +21 -21
- package/dist/{server-api-C5JXIROA.js.map → server-api-SYINXTN7.js.map} +1 -1
- package/dist/setup/index.js +2 -2
- package/dist/setup/index.mjs +1 -1
- package/dist/setup/server.js +2 -2
- package/dist/setup/server.mjs +1 -1
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.mjs +1 -1
- package/dist/sync/index.js +63 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/index.mjs +4 -0
- package/dist/sync/index.mjs.map +1 -0
- package/package.json +6 -1
- package/dist/chunk-2XOW276O.js.map +0 -1
- package/dist/chunk-5F7FFUPJ.mjs.map +0 -1
- package/dist/chunk-RMOL4TZ6.js.map +0 -1
- package/dist/chunk-SQSBAPWA.mjs.map +0 -1
package/dist/layout/client.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkNZHVGBAF_js = require('../chunk-NZHVGBAF.js');
|
|
5
5
|
require('../chunk-ZSMWDLMK.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "SiteKitClientProviders", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkNZHVGBAF_js.SiteKitClientProviders; }
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=client.js.map
|
|
14
14
|
//# sourceMappingURL=client.js.map
|
package/dist/layout/client.mjs
CHANGED
package/dist/layout/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNZHVGBAF_js = require('../chunk-NZHVGBAF.js');
|
|
4
4
|
var chunkDY4K6X3A_js = require('../chunk-DY4K6X3A.js');
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var chunkLTTTIJPN_js = require('../chunk-LTTTIJPN.js');
|
|
6
|
+
require('../chunk-PJKHCYI5.js');
|
|
7
7
|
require('../chunk-ZSMWDLMK.js');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
|
|
@@ -29,9 +29,9 @@ async function SiteKitLayout({
|
|
|
29
29
|
}
|
|
30
30
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31
31
|
favicon && /* @__PURE__ */ jsxRuntime.jsx(chunkDY4K6X3A_js.ManagedFavicon, { apiKey: resolvedApiKey, apiUrl: resolvedApiUrl }),
|
|
32
|
-
managedScripts && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
+
managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkLTTTIJPN_js.ManagedScripts, { position: "head" }),
|
|
33
33
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
-
|
|
34
|
+
chunkNZHVGBAF_js.SiteKitClientProviders,
|
|
35
35
|
{
|
|
36
36
|
apiKey: resolvedApiKey,
|
|
37
37
|
apiUrl: resolvedApiUrl,
|
|
@@ -44,7 +44,7 @@ async function SiteKitLayout({
|
|
|
44
44
|
children
|
|
45
45
|
}
|
|
46
46
|
),
|
|
47
|
-
managedScripts && /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkLTTTIJPN_js.ManagedScripts, { position: "body-end" })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
50
|
|
package/dist/layout/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SiteKitClientProviders } from '../chunk-
|
|
1
|
+
import { SiteKitClientProviders } from '../chunk-5TTTX6NN.mjs';
|
|
2
2
|
import { ManagedFavicon } from '../chunk-N24BPFF6.mjs';
|
|
3
|
-
import { ManagedScripts } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import { ManagedScripts } from '../chunk-J4K335PQ.mjs';
|
|
4
|
+
import '../chunk-3QKTOTWS.mjs';
|
|
5
5
|
import '../chunk-4XPGGLVP.mjs';
|
|
6
6
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
package/dist/llms/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5NXUENL3_js = require('../chunk-5NXUENL3.js');
|
|
4
4
|
require('../chunk-ZSMWDLMK.js');
|
|
5
5
|
var fs = require('fs');
|
|
6
6
|
var path = require('path');
|
|
@@ -23,7 +23,7 @@ function createLLMsTxtHandler(options = {}) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
const { markdown, metadata } = await
|
|
26
|
+
const { markdown, metadata } = await chunk5NXUENL3_js.generateLLMsTxt(generateOptions);
|
|
27
27
|
return new Response(markdown, {
|
|
28
28
|
status: 200,
|
|
29
29
|
headers: {
|
|
@@ -59,7 +59,7 @@ function createLLMsFullTxtHandler(options = {}) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
const { markdown, metadata } = await
|
|
62
|
+
const { markdown, metadata } = await chunk5NXUENL3_js.generateLLMsFullTxt(generateOptions);
|
|
63
63
|
return new Response(markdown, {
|
|
64
64
|
status: 200,
|
|
65
65
|
headers: {
|
|
@@ -527,39 +527,39 @@ function AEOCitedContent({
|
|
|
527
527
|
|
|
528
528
|
Object.defineProperty(exports, "generateLLMsFullTxt", {
|
|
529
529
|
enumerable: true,
|
|
530
|
-
get: function () { return
|
|
530
|
+
get: function () { return chunk5NXUENL3_js.generateLLMsFullTxt; }
|
|
531
531
|
});
|
|
532
532
|
Object.defineProperty(exports, "generateLLMsTxt", {
|
|
533
533
|
enumerable: true,
|
|
534
|
-
get: function () { return
|
|
534
|
+
get: function () { return chunk5NXUENL3_js.generateLLMsTxt; }
|
|
535
535
|
});
|
|
536
536
|
Object.defineProperty(exports, "getBusinessInfo", {
|
|
537
537
|
enumerable: true,
|
|
538
|
-
get: function () { return
|
|
538
|
+
get: function () { return chunk5NXUENL3_js.getBusinessInfo; }
|
|
539
539
|
});
|
|
540
540
|
Object.defineProperty(exports, "getFAQItems", {
|
|
541
541
|
enumerable: true,
|
|
542
|
-
get: function () { return
|
|
542
|
+
get: function () { return chunk5NXUENL3_js.getFAQItems; }
|
|
543
543
|
});
|
|
544
544
|
Object.defineProperty(exports, "getLLMsData", {
|
|
545
545
|
enumerable: true,
|
|
546
|
-
get: function () { return
|
|
546
|
+
get: function () { return chunk5NXUENL3_js.getLLMsData; }
|
|
547
547
|
});
|
|
548
548
|
Object.defineProperty(exports, "getOptimizedLLMsTxt", {
|
|
549
549
|
enumerable: true,
|
|
550
|
-
get: function () { return
|
|
550
|
+
get: function () { return chunk5NXUENL3_js.getOptimizedLLMsTxt; }
|
|
551
551
|
});
|
|
552
552
|
Object.defineProperty(exports, "getPageSummaries", {
|
|
553
553
|
enumerable: true,
|
|
554
|
-
get: function () { return
|
|
554
|
+
get: function () { return chunk5NXUENL3_js.getPageSummaries; }
|
|
555
555
|
});
|
|
556
556
|
Object.defineProperty(exports, "getServices", {
|
|
557
557
|
enumerable: true,
|
|
558
|
-
get: function () { return
|
|
558
|
+
get: function () { return chunk5NXUENL3_js.getServices; }
|
|
559
559
|
});
|
|
560
560
|
Object.defineProperty(exports, "writeLLMsTxtToPublic", {
|
|
561
561
|
enumerable: true,
|
|
562
|
-
get: function () { return
|
|
562
|
+
get: function () { return chunk5NXUENL3_js.writeLLMsTxtToPublic; }
|
|
563
563
|
});
|
|
564
564
|
exports.AEOBlock = AEOBlock;
|
|
565
565
|
exports.AEOCitedContent = AEOCitedContent;
|
package/dist/llms/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { generateLLMsTxt, generateLLMsFullTxt } from '../chunk-
|
|
2
|
-
export { generateLLMsFullTxt, generateLLMsTxt, getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices, writeLLMsTxtToPublic } from '../chunk-
|
|
1
|
+
import { generateLLMsTxt, generateLLMsFullTxt } from '../chunk-KMLCQYEV.mjs';
|
|
2
|
+
export { generateLLMsFullTxt, generateLLMsTxt, getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices, writeLLMsTxtToPublic } from '../chunk-KMLCQYEV.mjs';
|
|
3
3
|
import '../chunk-4XPGGLVP.mjs';
|
|
4
4
|
import { existsSync, readFileSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
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
|