@sonordev/site-kit 1.2.10 → 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.
@@ -1,7 +1,8 @@
1
1
  import { getManagedScripts } from './chunk-SQSBAPWA.mjs';
2
+ import { Suspense } from 'react';
2
3
  import { jsx, Fragment } from 'react/jsx-runtime';
3
4
 
4
- async function ManagedScripts({
5
+ async function ManagedScriptsAsync({
5
6
  position,
6
7
  path
7
8
  }) {
@@ -31,7 +32,7 @@ async function ManagedScripts({
31
32
  );
32
33
  }) });
33
34
  }
34
- async function ManagedNoScripts({
35
+ async function ManagedNoScriptsAsync({
35
36
  path
36
37
  }) {
37
38
  const scripts = await getManagedScripts("body-start", path);
@@ -41,7 +42,13 @@ async function ManagedNoScripts({
41
42
  }
42
43
  return /* @__PURE__ */ jsx("noscript", { dangerouslySetInnerHTML: { __html: noscriptContent } });
43
44
  }
45
+ function ManagedScripts(props) {
46
+ return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(ManagedScriptsAsync, { ...props }) });
47
+ }
48
+ function ManagedNoScripts(props) {
49
+ return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(ManagedNoScriptsAsync, { ...props }) });
50
+ }
44
51
 
45
52
  export { ManagedNoScripts, ManagedScripts };
46
- //# sourceMappingURL=chunk-5F7FFUPJ.mjs.map
47
- //# sourceMappingURL=chunk-5F7FFUPJ.mjs.map
53
+ //# sourceMappingURL=chunk-44GSXYHJ.mjs.map
54
+ //# sourceMappingURL=chunk-44GSXYHJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/seo/ManagedScripts.tsx"],"names":[],"mappings":";;;;AAwCA,eAAe,mBAAA,CAAoB;AAAA,EACjC,QAAA;AAAA,EACA;AACF,CAAA,EAA4D;AAC1D,EAAA,MAAM,OAAA,GAAU,MAAM,iBAAA,CAAkB,QAAA,EAAU,IAAI,CAAA;A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AA,EACT;AAEA,EAAA,2BACG,UAAA,EAAA,EAAS,uBAAA,EAAyB,EAAE,MAAA,EAAQ,iBAAgB,EAAG,CAAA;AAEpE;AAEO,SAAS,eAAe,KAAA,EAAgD;AAC7E,EAAA,uBACE,GAAA,CAAC,YAAS,QAAA,EAAU,IAAA,EAClB,8BAAC,mBAAA,EAAA,EAAqB,GAAG,OAAO,CAAA,EAClC,CAAA;AAEJ;AAEO,SAAS,iBAAiB,KAAA,EAAkE;AACjG,EAAA,uBACE,GAAA,CAAC,YAAS,QAAA,EAAU,IAAA,EAClB,8BAAC,qBAAA,EAAA,EAAuB,GAAG,OAAO,CAAA,EACpC,CAAA;AAEJ","file":"chunk-44GSXYHJ.mjs","sourcesContent":["import * as React from 'react'\nimport { Suspense } from 'react'\nimport { getManagedScripts } from './server-api'\nimport type { ManagedScriptsProps, ManagedScript } from './types'\n\n/**\n * ManagedScripts - Server Component for injecting tracking/analytics scripts\n * \n * Fetches scripts from Portal and renders them in the appropriate position\n * \n * @example\n * ```tsx\n * // app/layout.tsx\n * import { ManagedScripts } from '@sonordev/seo'\n * \n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <head>\n * <ManagedScripts \n * projectId={process.env.UPTRADE_PROJECT_ID!}\n * position=\"head\"\n * />\n * </head>\n * <body>\n * <ManagedScripts \n * projectId={process.env.UPTRADE_PROJECT_ID!}\n * position=\"body-start\"\n * />\n * {children}\n * <ManagedScripts \n * projectId={process.env.UPTRADE_PROJECT_ID!}\n * position=\"body-end\"\n * />\n * </body>\n * </html>\n * )\n * }\n * ```\n */\nasync function ManagedScriptsAsync({\n position,\n path,\n}: ManagedScriptsProps): Promise<React.ReactElement | null> {\n const scripts = await getManagedScripts(position, path)\n\n if (!scripts.length) {\n return null\n }\n\n return (\n <>\n {scripts.map((script: ManagedScript) => {\n if (script.script_type === 'external') {\n // External script with src. Always include async so React 19 allows\n // rendering outside the main document (body-start/body-end).\n const attrs: Record<string, unknown> = {\n key: script.id,\n src: script.src,\n async: true,\n ...(script.defer && { defer: true }),\n ...script.attributes,\n }\n\n return <script {...attrs} />\n }\n\n // Inline script — add async so React 19 doesn't treat it as sync outside document\n return (\n <script\n key={script.id}\n async\n dangerouslySetInnerHTML={{ __html: script.content || '' }}\n {...script.attributes}\n />\n )\n })}\n </>\n )\n}\n\n/**\n * NoScript fallback component\n * \n * Use for adding noscript content (like Google Tag Manager noscript)\n */\nasync function ManagedNoScriptsAsync({\n path,\n}: {\n projectId?: string\n path?: string\n}): Promise<React.ReactElement | null> {\n const scripts = await getManagedScripts('body-start', path)\n\n // Filter scripts that have noscript content\n const noscriptContent = scripts\n .filter((s: ManagedScript) => s.attributes?.noscript)\n .map((s: ManagedScript) => s.attributes?.noscript)\n .join('')\n\n if (!noscriptContent) {\n return null\n }\n\n return (\n <noscript dangerouslySetInnerHTML={{ __html: noscriptContent }} />\n )\n}\n\nexport function ManagedScripts(props: ManagedScriptsProps): React.ReactElement {\n return (\n <Suspense fallback={null}>\n <ManagedScriptsAsync {...props} />\n </Suspense>\n )\n}\n\nexport function ManagedNoScripts(props: { projectId?: string; path?: string }): React.ReactElement {\n return (\n <Suspense fallback={null}>\n <ManagedNoScriptsAsync {...props} />\n </Suspense>\n )\n}\n\nexport default ManagedScripts\n"]}
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkRMOL4TZ6_js = require('./chunk-RMOL4TZ6.js');
4
+ var react = require('react');
4
5
  var jsxRuntime = require('react/jsx-runtime');
5
6
 
6
- async function ManagedScripts({
7
+ async function ManagedScriptsAsync({
7
8
  position,
8
9
  path
9
10
  }) {
@@ -33,7 +34,7 @@ async function ManagedScripts({
33
34
  );
34
35
  }) });
35
36
  }
36
- async function ManagedNoScripts({
37
+ async function ManagedNoScriptsAsync({
37
38
  path
38
39
  }) {
39
40
  const scripts = await chunkRMOL4TZ6_js.getManagedScripts("body-start", path);
@@ -43,8 +44,14 @@ async function ManagedNoScripts({
43
44
  }
44
45
  return /* @__PURE__ */ jsxRuntime.jsx("noscript", { dangerouslySetInnerHTML: { __html: noscriptContent } });
45
46
  }
47
+ function ManagedScripts(props) {
48
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ManagedScriptsAsync, { ...props }) });
49
+ }
50
+ function ManagedNoScripts(props) {
51
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ManagedNoScriptsAsync, { ...props }) });
52
+ }
46
53
 
47
54
  exports.ManagedNoScripts = ManagedNoScripts;
48
55
  exports.ManagedScripts = ManagedScripts;
49
- //# sourceMappingURL=chunk-2XOW276O.js.map
50
- //# sourceMappingURL=chunk-2XOW276O.js.map
56
+ //# sourceMappingURL=chunk-YIL674PV.js.map
57
+ //# sourceMappingURL=chunk-YIL674PV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/seo/ManagedScripts.tsx"],"names":["getManagedScripts","jsx","Fragment","Suspense"],"mappings":";;;;;;AAwCA,eAAe,mBAAA,CAAoB;AAAA,EACjC,QAAA;AAAA,EACA;AACF,CAAA,EAA4D;AAC1D,EAAA,MAAM,OAAA,GAAU,MAAMA,kCAAA,CAAkB,QAAA,EAAU,IAAI,CAAA;AAEtD,EAAA,IAAI,CAAC,QAAQ,MAAA,EAAQ;AACnB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACEC,cAAA,CAAAC,mBAAA,EAAA,EACG,QAAA,EAAA,OAAA,CAAQ,GAAA,CAAI,CAAC,MAAA,KAA0B;AACtC,IAAA,IAAI,MAAA,CAAO,gBAAgB,UAAA,EAAY;AAGrC,MAAA,MAAM,KAAA,GAAiC;AAAA,QACrC,KAAK,MAAA,CAAO,EAAA;AAAA,QACZ,KAAK,MAAA,CAAO,GAAA;AAAA,QACZ,KAAA,EAAO,IAAA;AAAA,QACP,GAAI,MAAA,CAAO,KAAA,IAAS,EAAE,OAAO,IAAA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EJ","file":"chunk-YIL674PV.js","sourcesContent":["import * as React from 'react'\nimport { Suspense } from 'react'\nimport { getManagedScripts } from './server-api'\nimport type { ManagedScriptsProps, ManagedScript } from './types'\n\n/**\n * ManagedScripts - Server Component for injecting tracking/analytics scripts\n * \n * Fetches scripts from Portal and renders them in the appropriate position\n * \n * @example\n * ```tsx\n * // app/layout.tsx\n * import { ManagedScripts } from '@sonordev/seo'\n * \n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <head>\n * <ManagedScripts \n * projectId={process.env.UPTRADE_PROJECT_ID!}\n * position=\"head\"\n * />\n * </head>\n * <body>\n * <ManagedScripts \n * projectId={process.env.UPTRADE_PROJECT_ID!}\n * position=\"body-start\"\n * />\n * {children}\n * <ManagedScripts \n * projectId={process.env.UPTRADE_PROJECT_ID!}\n * position=\"body-end\"\n * />\n * </body>\n * </html>\n * )\n * }\n * ```\n */\nasync function ManagedScriptsAsync({\n position,\n path,\n}: ManagedScriptsProps): Promise<React.ReactElement | null> {\n const scripts = await getManagedScripts(position, path)\n\n if (!scripts.length) {\n return null\n }\n\n return (\n <>\n {scripts.map((script: ManagedScript) => {\n if (script.script_type === 'external') {\n // External script with src. Always include async so React 19 allows\n // rendering outside the main document (body-start/body-end).\n const attrs: Record<string, unknown> = {\n key: script.id,\n src: script.src,\n async: true,\n ...(script.defer && { defer: true }),\n ...script.attributes,\n }\n\n return <script {...attrs} />\n }\n\n // Inline script — add async so React 19 doesn't treat it as sync outside document\n return (\n <script\n key={script.id}\n async\n dangerouslySetInnerHTML={{ __html: script.content || '' }}\n {...script.attributes}\n />\n )\n })}\n </>\n )\n}\n\n/**\n * NoScript fallback component\n * \n * Use for adding noscript content (like Google Tag Manager noscript)\n */\nasync function ManagedNoScriptsAsync({\n path,\n}: {\n projectId?: string\n path?: string\n}): Promise<React.ReactElement | null> {\n const scripts = await getManagedScripts('body-start', path)\n\n // Filter scripts that have noscript content\n const noscriptContent = scripts\n .filter((s: ManagedScript) => s.attributes?.noscript)\n .map((s: ManagedScript) => s.attributes?.noscript)\n .join('')\n\n if (!noscriptContent) {\n return null\n }\n\n return (\n <noscript dangerouslySetInnerHTML={{ __html: noscriptContent }} />\n )\n}\n\nexport function ManagedScripts(props: ManagedScriptsProps): React.ReactElement {\n return (\n <Suspense fallback={null}>\n <ManagedScriptsAsync {...props} />\n </Suspense>\n )\n}\n\nexport function ManagedNoScripts(props: { projectId?: string; path?: string }): React.ReactElement {\n return (\n <Suspense fallback={null}>\n <ManagedNoScriptsAsync {...props} />\n </Suspense>\n )\n}\n\nexport default ManagedScripts\n"]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunk742WMKQC_js = require('../chunk-742WMKQC.js');
4
4
  var chunkDY4K6X3A_js = require('../chunk-DY4K6X3A.js');
5
- var chunk2XOW276O_js = require('../chunk-2XOW276O.js');
5
+ var chunkYIL674PV_js = require('../chunk-YIL674PV.js');
6
6
  require('../chunk-RMOL4TZ6.js');
7
7
  require('../chunk-ZSMWDLMK.js');
8
8
  var jsxRuntime = require('react/jsx-runtime');
@@ -29,7 +29,7 @@ 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(chunk2XOW276O_js.ManagedScripts, { position: "head" }),
32
+ managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkYIL674PV_js.ManagedScripts, { position: "head" }),
33
33
  /* @__PURE__ */ jsxRuntime.jsx(
34
34
  chunk742WMKQC_js.SiteKitClientProviders,
35
35
  {
@@ -44,7 +44,7 @@ async function SiteKitLayout({
44
44
  children
45
45
  }
46
46
  ),
47
- managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunk2XOW276O_js.ManagedScripts, { position: "body-end" })
47
+ managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkYIL674PV_js.ManagedScripts, { position: "body-end" })
48
48
  ] });
49
49
  }
50
50
 
@@ -1,6 +1,6 @@
1
1
  import { SiteKitClientProviders } from '../chunk-6TFGPXXK.mjs';
2
2
  import { ManagedFavicon } from '../chunk-N24BPFF6.mjs';
3
- import { ManagedScripts } from '../chunk-5F7FFUPJ.mjs';
3
+ import { ManagedScripts } from '../chunk-44GSXYHJ.mjs';
4
4
  import '../chunk-SQSBAPWA.mjs';
5
5
  import '../chunk-4XPGGLVP.mjs';
6
6
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -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
- * ManagedFAQ - Server Component that renders FAQ section with schema
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 ManagedFAQ({ path, className, renderItem, includeSchema, showTitle, }: ManagedFAQProps): Promise<React.ReactElement | null>;
387
-
301
+ declare function ManagedSchema(props: EnhancedManagedSchemaProps): React.ReactElement;
388
302
  /**
389
- * ManagedInternalLinks - Server Component for AI-suggested internal links
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 ManagedInternalLinks({ path, position, limit, className, renderLink, }: ManagedInternalLinksProps): Promise<React.ReactElement | null>;
305
+ declare function LLMSchema(props: {
306
+ projectId?: string;
307
+ path: string;
308
+ }): React.ReactElement;
415
309
 
416
310
  /**
417
- * ManagedContent - Server Component for CMS-controlled content blocks
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 ManagedContent({ path, section, fallback, className, components, injectEntityAnnotations: shouldInjectEntities, }: ManagedContentProps): Promise<React.ReactElement | null>;
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
- * ManagedScripts - Server Component for injecting tracking/analytics scripts
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
- }): Promise<React.ReactElement | null>;
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 - Server Component
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({ projectId, path, section, fallback, className, render, }: LocationPageContentProps): Promise<React.ReactElement | null>;
395
+ declare function LocationPageContent(props: LocationPageContentProps): React.ReactElement;
575
396
 
576
397
  /**
577
398
  * SitemapSync - Automatically sync sitemap.xml to Portal API
@@ -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
- * ManagedFAQ - Server Component that renders FAQ section with schema
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 ManagedFAQ({ path, className, renderItem, includeSchema, showTitle, }: ManagedFAQProps): Promise<React.ReactElement | null>;
387
-
301
+ declare function ManagedSchema(props: EnhancedManagedSchemaProps): React.ReactElement;
388
302
  /**
389
- * ManagedInternalLinks - Server Component for AI-suggested internal links
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 ManagedInternalLinks({ path, position, limit, className, renderLink, }: ManagedInternalLinksProps): Promise<React.ReactElement | null>;
305
+ declare function LLMSchema(props: {
306
+ projectId?: string;
307
+ path: string;
308
+ }): React.ReactElement;
415
309
 
416
310
  /**
417
- * ManagedContent - Server Component for CMS-controlled content blocks
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 ManagedContent({ path, section, fallback, className, components, injectEntityAnnotations: shouldInjectEntities, }: ManagedContentProps): Promise<React.ReactElement | null>;
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
- * ManagedScripts - Server Component for injecting tracking/analytics scripts
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
- }): Promise<React.ReactElement | null>;
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 - Server Component
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({ projectId, path, section, fallback, className, render, }: LocationPageContentProps): Promise<React.ReactElement | null>;
395
+ declare function LocationPageContent(props: LocationPageContentProps): React.ReactElement;
575
396
 
576
397
  /**
577
398
  * SitemapSync - Automatically sync sitemap.xml to Portal API