@sonordev/site-kit 2.8.2 → 2.9.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/blog/index.js +2 -1
- package/dist/blog/index.js.map +1 -1
- package/dist/blog/index.mjs +2 -1
- package/dist/blog/index.mjs.map +1 -1
- package/dist/{chunk-5SQ4NRPH.mjs → chunk-3AEOGV6V.mjs} +6 -4
- package/dist/chunk-3AEOGV6V.mjs.map +1 -0
- package/dist/chunk-662YHKWW.mjs +10 -0
- package/dist/chunk-662YHKWW.mjs.map +1 -0
- package/dist/{chunk-MNOVPHL6.mjs → chunk-72MRAYAS.mjs} +19 -14
- package/dist/chunk-72MRAYAS.mjs.map +1 -0
- package/dist/{chunk-MWE2HRPU.js → chunk-D5XTX5EB.js} +19 -14
- package/dist/chunk-D5XTX5EB.js.map +1 -0
- package/dist/{chunk-PKUTYMN7.js → chunk-J25JPU77.js} +2 -2
- package/dist/chunk-J25JPU77.js.map +1 -0
- package/dist/chunk-J7QI3GDX.js +12 -0
- package/dist/chunk-J7QI3GDX.js.map +1 -0
- package/dist/{chunk-L7XPPFSS.mjs → chunk-QDKQZ5XH.mjs} +2 -2
- package/dist/chunk-QDKQZ5XH.mjs.map +1 -0
- package/dist/{chunk-PAF5IGGF.js → chunk-XNUPJC6R.js} +6 -4
- package/dist/chunk-XNUPJC6R.js.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/layout/index.js +3 -3
- package/dist/layout/index.mjs +1 -1
- package/dist/llms/index.d.mts +18 -4
- package/dist/llms/index.d.ts +18 -4
- package/dist/llms/index.js +26 -51
- package/dist/llms/index.js.map +1 -1
- package/dist/llms/index.mjs +16 -41
- package/dist/llms/index.mjs.map +1 -1
- package/dist/seo/index.d.mts +10 -205
- package/dist/seo/index.d.ts +10 -205
- package/dist/seo/index.js +16 -15
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +7 -6
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo/server.d.mts +2 -106
- package/dist/seo/server.d.ts +2 -106
- package/dist/seo/server.js +56 -197
- package/dist/seo/server.js.map +1 -1
- package/dist/seo/server.mjs +2 -183
- package/dist/seo/server.mjs.map +1 -1
- package/dist/server-l6LMNvF1.d.ts +360 -0
- package/dist/server-mX5At_6x.d.mts +360 -0
- package/dist/sitemap/index.d.mts +1 -1
- package/dist/sitemap/index.d.ts +1 -1
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.mjs +1 -1
- package/dist/{types-DYyIAgQg.d.mts → types-DPsbBKiu.d.mts} +1 -1
- package/dist/{types-DYyIAgQg.d.ts → types-DPsbBKiu.d.ts} +1 -1
- package/dist/{types-J7Z_FqmV.d.mts → types-DhCAWUmd.d.mts} +8 -0
- package/dist/{types-0NuBL1Gg.d.ts → types-xcP_owwn.d.ts} +8 -0
- package/package.json +1 -1
- package/dist/chunk-5SQ4NRPH.mjs.map +0 -1
- package/dist/chunk-L7XPPFSS.mjs.map +0 -1
- package/dist/chunk-MNOVPHL6.mjs.map +0 -1
- package/dist/chunk-MWE2HRPU.js.map +0 -1
- package/dist/chunk-PAF5IGGF.js.map +0 -1
- package/dist/chunk-PKUTYMN7.js.map +0 -1
- package/dist/routing-C7gmHWm9.d.ts +0 -163
- package/dist/routing-trNzR1Pz.d.mts +0 -163
package/dist/seo/index.d.ts
CHANGED
|
@@ -1,201 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ABTest, k as ABTestResult, F as FAQItem, l as GetABVariantOptions, G as GetManagedMetadataOptions, n as GetRedirectOptions,
|
|
3
|
-
export {
|
|
1
|
+
import { a as ManagedSchemaProps, c as ManagedFAQProps, d as ManagedInternalLinksProps, e as ManagedContentProps, f as ManagedContentBlock, g as ManagedScriptsProps } from '../types-DPsbBKiu.js';
|
|
2
|
+
export { A as ABTest, k as ABTestResult, F as FAQItem, l as GetABVariantOptions, G as GetManagedMetadataOptions, n as GetRedirectOptions, q as GetRobotsOptions, s as GetSitemapEntriesOptions, b as ManagedFAQData, j as ManagedLink, M as ManagedMetadataResult, m as ManagedRedirect, o as ManagedScript, R as RedirectResult, p as RobotsDirective, h as SEOPageData, i as SchemaMarkup, r as SitemapEntry, S as SonorSEOConfig } from '../types-DPsbBKiu.js';
|
|
3
|
+
export { E as EntityType, P as PageSeoContext, S as SEOEntity, e as generateSitemap, m as getABTest, b as getABVariant, l as getContentBlock, t as getEntities, v as getEntityEnhancedSchema, j as getFAQData, k as getInternalLinks, g as getManagedMetadata, a as getManagedMetadataWithAB, o as getManagedScripts, u as getPrimaryEntity, c as getRedirect, n as getRedirectData, p as getRobotsData, d as getRobotsDirective, f as getSEOPageData, h as getSchemaMarkups, q as getSitemapEntries, w as getVisibilityScore, x as getVisibilitySummary, i as isIndexable, r as recordABImpression, s as registerSitemap } from '../server-l6LMNvF1.js';
|
|
4
4
|
import { ResolvingMetadata, Metadata } from 'next';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
export { SitemapSync } from './client.js';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* @sonordev/site-kit/seo - Server-Only API Functions
|
|
10
|
-
*
|
|
11
|
-
* SECURITY: These functions use private environment variables
|
|
12
|
-
* and should ONLY be imported in server-side code (RSC, API routes, server actions).
|
|
13
|
-
*
|
|
14
|
-
* DO NOT import this file in client components or it will expose API keys.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/** Response shape for POST /api/public/seo/page-context */
|
|
18
|
-
type PageSeoContext = {
|
|
19
|
-
page: any | null;
|
|
20
|
-
schemas: any[];
|
|
21
|
-
project: {
|
|
22
|
-
id: string;
|
|
23
|
-
title?: string | null;
|
|
24
|
-
domain?: string | null;
|
|
25
|
-
logo_url?: string | null;
|
|
26
|
-
site_url?: string | null;
|
|
27
|
-
} | null;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Fetch SEO page data - cached per request
|
|
31
|
-
* @server-only
|
|
32
|
-
*/
|
|
33
|
-
declare const getSEOPageData: (path: string) => Promise<{
|
|
34
|
-
page: any;
|
|
35
|
-
project: {
|
|
36
|
-
id: string;
|
|
37
|
-
title?: string | null;
|
|
38
|
-
domain?: string | null;
|
|
39
|
-
logo_url?: string | null;
|
|
40
|
-
site_url?: string | null;
|
|
41
|
-
} | null;
|
|
42
|
-
}>;
|
|
43
|
-
/**
|
|
44
|
-
* Fetch schema markups for a page - cached per request (shares loadPageSeoContext with getSEOPageData)
|
|
45
|
-
* @server-only
|
|
46
|
-
*/
|
|
47
|
-
declare const getSchemaMarkups: (path: string, options?: {
|
|
48
|
-
includeTypes?: string[];
|
|
49
|
-
excludeTypes?: string[];
|
|
50
|
-
}) => Promise<any[]>;
|
|
51
|
-
/**
|
|
52
|
-
* Fetch FAQ data for a page - cached per request
|
|
53
|
-
* @server-only
|
|
54
|
-
*/
|
|
55
|
-
declare const getFAQData: (path: string) => Promise<any>;
|
|
56
|
-
/**
|
|
57
|
-
* Fetch internal links for a page - cached per request
|
|
58
|
-
* @server-only
|
|
59
|
-
*/
|
|
60
|
-
declare const getInternalLinks: (sourcePath: string, options?: {
|
|
61
|
-
position?: string;
|
|
62
|
-
limit?: number;
|
|
63
|
-
}) => Promise<any[]>;
|
|
64
|
-
/**
|
|
65
|
-
* Fetch content block - cached per request
|
|
66
|
-
* @server-only
|
|
67
|
-
*/
|
|
68
|
-
declare const getContentBlock: (path: string, section: string) => Promise<any>;
|
|
69
|
-
/**
|
|
70
|
-
* Fetch A/B test and determine variant - cached per request
|
|
71
|
-
* @server-only
|
|
72
|
-
*/
|
|
73
|
-
declare const getABTest: (path: string, field: string) => Promise<any>;
|
|
74
|
-
/**
|
|
75
|
-
* Record A/B test impression
|
|
76
|
-
* @server-only
|
|
77
|
-
*/
|
|
78
|
-
declare function recordABImpression(testId: string, variant: 'a' | 'b', sessionId?: string): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Fetch redirect for a path - cached per request
|
|
81
|
-
* @server-only
|
|
82
|
-
*/
|
|
83
|
-
declare const getRedirectData: (path: string) => Promise<any>;
|
|
84
|
-
/**
|
|
85
|
-
* Fetch managed scripts - cached per request
|
|
86
|
-
* @server-only
|
|
87
|
-
*/
|
|
88
|
-
declare const getManagedScripts: (position: string, currentPath?: string) => Promise<any[]>;
|
|
89
|
-
/**
|
|
90
|
-
* Fetch robots directive for a page - cached per request
|
|
91
|
-
* @server-only
|
|
92
|
-
*/
|
|
93
|
-
declare const getRobotsData: (path: string) => Promise<any>;
|
|
94
|
-
/**
|
|
95
|
-
* Fetch sitemap entries - cached per request
|
|
96
|
-
* @server-only
|
|
97
|
-
*/
|
|
98
|
-
declare const getSitemapEntries: (options?: {
|
|
99
|
-
publishedOnly?: boolean;
|
|
100
|
-
}) => Promise<any[]>;
|
|
101
|
-
/**
|
|
102
|
-
* Register/sync sitemap entries from the client site
|
|
103
|
-
* Call this at build time to populate seo_pages from your sitemap.xml
|
|
104
|
-
* @server-only
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* ```ts
|
|
108
|
-
* // scripts/register-sitemap.ts (run at build time)
|
|
109
|
-
* import { registerSitemap } from '@sonordev/seo/server'
|
|
110
|
-
*
|
|
111
|
-
* await registerSitemap([
|
|
112
|
-
* { path: '/', priority: 1.0, changefreq: 'daily' },
|
|
113
|
-
* { path: '/about', priority: 0.8, changefreq: 'weekly' },
|
|
114
|
-
* ])
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
declare function registerSitemap(entries: Array<{
|
|
118
|
-
path: string;
|
|
119
|
-
title?: string;
|
|
120
|
-
priority?: number;
|
|
121
|
-
changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
122
|
-
}>, options?: {
|
|
123
|
-
/**
|
|
124
|
-
* Sync mode:
|
|
125
|
-
* - 'full-replace': replaces the entire page set (default for build-time sync)
|
|
126
|
-
* - 'additive': adds/updates pages but never deletes existing ones
|
|
127
|
-
*/
|
|
128
|
-
mode?: 'additive' | 'full-replace';
|
|
129
|
-
}): Promise<{
|
|
130
|
-
success: boolean;
|
|
131
|
-
created: number;
|
|
132
|
-
updated: number;
|
|
133
|
-
}>;
|
|
134
|
-
/**
|
|
135
|
-
* Entity types for the knowledge graph
|
|
136
|
-
*/
|
|
137
|
-
type EntityType = 'organization' | 'person' | 'service' | 'product' | 'location' | 'concept' | 'credential';
|
|
138
|
-
/**
|
|
139
|
-
* Entity from the knowledge graph
|
|
140
|
-
*/
|
|
141
|
-
interface SEOEntity {
|
|
142
|
-
id: string;
|
|
143
|
-
project_id: string;
|
|
144
|
-
entity_type: EntityType;
|
|
145
|
-
name: string;
|
|
146
|
-
slug: string;
|
|
147
|
-
properties: Record<string, unknown>;
|
|
148
|
-
knows_about: string[];
|
|
149
|
-
same_as: string[];
|
|
150
|
-
schema_type?: string;
|
|
151
|
-
is_primary: boolean;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Fetch entities for a project - cached per request
|
|
155
|
-
* Returns the entity graph for enhanced schema markup
|
|
156
|
-
* @server-only
|
|
157
|
-
*/
|
|
158
|
-
declare const getEntities: (options?: {
|
|
159
|
-
type?: EntityType;
|
|
160
|
-
}) => Promise<SEOEntity[]>;
|
|
161
|
-
/**
|
|
162
|
-
* Fetch primary entity (the business) - cached per request
|
|
163
|
-
* @server-only
|
|
164
|
-
*/
|
|
165
|
-
declare const getPrimaryEntity: () => Promise<SEOEntity | null>;
|
|
166
|
-
/**
|
|
167
|
-
* Fetch entity-enhanced schema for a page
|
|
168
|
-
* Returns Organization schema with knowsAbout, areaServed, employee, etc.
|
|
169
|
-
* @server-only
|
|
170
|
-
*/
|
|
171
|
-
declare const getEntityEnhancedSchema: (pagePath: string) => Promise<object[]>;
|
|
172
|
-
/**
|
|
173
|
-
* Get AI visibility score for a page
|
|
174
|
-
* @server-only
|
|
175
|
-
*/
|
|
176
|
-
declare const getVisibilityScore: (pagePath: string) => Promise<{
|
|
177
|
-
overall_score: number;
|
|
178
|
-
entity_coverage: number;
|
|
179
|
-
answer_density: number;
|
|
180
|
-
chunk_readability: number;
|
|
181
|
-
authority_signals: number;
|
|
182
|
-
schema_completeness: number;
|
|
183
|
-
} | null>;
|
|
184
|
-
/**
|
|
185
|
-
* Get AI visibility summary for project
|
|
186
|
-
* @server-only
|
|
187
|
-
*/
|
|
188
|
-
declare const getVisibilitySummary: () => Promise<{
|
|
189
|
-
overall_score: number;
|
|
190
|
-
total_entities: number;
|
|
191
|
-
pages_analyzed: number;
|
|
192
|
-
top_recommendations: Array<{
|
|
193
|
-
priority: string;
|
|
194
|
-
type: string;
|
|
195
|
-
message: string;
|
|
196
|
-
}>;
|
|
197
|
-
} | null>;
|
|
198
|
-
|
|
199
8
|
/**
|
|
200
9
|
* @sonordev/site-kit/seo - withManagedMetadata
|
|
201
10
|
*
|
|
@@ -323,17 +132,13 @@ declare function ManagedNoScripts(props: {
|
|
|
323
132
|
}): React.ReactElement;
|
|
324
133
|
|
|
325
134
|
/**
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
* path="/areas/seattle-wa/plumbing"
|
|
332
|
-
* section="hero"
|
|
333
|
-
* />
|
|
135
|
+
* @deprecated DO NOT USE. This component calls an endpoint that does not exist
|
|
136
|
+
* (and sends project_id from the client, violating the x-api-key-only auth
|
|
137
|
+
* contract) — it has only ever rendered its fallback. Location page content is
|
|
138
|
+
* served through the standard managed-content path instead. Kept exported so
|
|
139
|
+
* existing imports keep compiling; it renders the fallback and warns.
|
|
334
140
|
*
|
|
335
|
-
*
|
|
336
|
-
* path and section, making it editable in Portal without code deploys.
|
|
141
|
+
* LocationPageContent - Server Component for fetching location page sections
|
|
337
142
|
*/
|
|
338
143
|
|
|
339
144
|
interface LocationPageContentProps {
|
|
@@ -388,4 +193,4 @@ declare const getLocationSection: (projectId: string, path: string, section: str
|
|
|
388
193
|
*/
|
|
389
194
|
declare function LocationPageContent(props: LocationPageContentProps): React.ReactElement;
|
|
390
195
|
|
|
391
|
-
export {
|
|
196
|
+
export { LLMSchema, type HeroSectionContent as LocationHeroContent, LocationPageContent, type LocationPageContentProps, type LocationSectionData, type ServiceGridContent as LocationServicesContent, type TextSectionContent as LocationTextContent, ManagedContent, ManagedContentBlock, ManagedContentProps, ManagedFAQ, ManagedFAQProps, ManagedInternalLinks, ManagedInternalLinksProps, ManagedNoScripts, ManagedSchema, ManagedSchemaProps, ManagedScripts, ManagedScriptsProps, createBreadcrumbSchema, createSchema, createWebSiteOrganizationStub, getLocationSection, getManagedContentData, withManagedMetadata };
|
package/dist/seo/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJ25JPU77_js = require('../chunk-J25JPU77.js');
|
|
4
4
|
var chunkATG4FJY6_js = require('../chunk-ATG4FJY6.js');
|
|
5
|
+
var chunkJ7QI3GDX_js = require('../chunk-J7QI3GDX.js');
|
|
5
6
|
var chunkLFGJIGLN_js = require('../chunk-LFGJIGLN.js');
|
|
6
|
-
var
|
|
7
|
+
var chunkXNUPJC6R_js = require('../chunk-XNUPJC6R.js');
|
|
7
8
|
var chunkVU4GL5ZG_js = require('../chunk-VU4GL5ZG.js');
|
|
8
9
|
require('../chunk-ZSMWDLMK.js');
|
|
9
10
|
var react = require('react');
|
|
@@ -13,7 +14,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
13
14
|
function withManagedMetadata(path, pageMetadata) {
|
|
14
15
|
return async function generateMetadata(args, parent) {
|
|
15
16
|
const resolvedPath = typeof path === "function" ? await path(args) : path;
|
|
16
|
-
const managed = await
|
|
17
|
+
const managed = await chunkXNUPJC6R_js.getManagedMetadata({ path: resolvedPath });
|
|
17
18
|
if (!pageMetadata) {
|
|
18
19
|
return managed;
|
|
19
20
|
}
|
|
@@ -102,7 +103,7 @@ async function ManagedSchemaAsync({
|
|
|
102
103
|
{
|
|
103
104
|
type: "application/ld+json",
|
|
104
105
|
dangerouslySetInnerHTML: {
|
|
105
|
-
__html:
|
|
106
|
+
__html: chunkJ7QI3GDX_js.safeJsonLd(finalSchema)
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
);
|
|
@@ -137,7 +138,7 @@ async function LLMSchemaAsync({
|
|
|
137
138
|
type: "application/ld+json",
|
|
138
139
|
"data-llm-optimized": "true",
|
|
139
140
|
dangerouslySetInnerHTML: {
|
|
140
|
-
__html:
|
|
141
|
+
__html: chunkJ7QI3GDX_js.safeJsonLd(llmSchema)
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
);
|
|
@@ -372,7 +373,7 @@ async function ManagedFAQAsync({
|
|
|
372
373
|
{
|
|
373
374
|
type: "application/ld+json",
|
|
374
375
|
dangerouslySetInnerHTML: {
|
|
375
|
-
__html:
|
|
376
|
+
__html: chunkJ7QI3GDX_js.safeJsonLd(generateFAQSchema(visibleItems))
|
|
376
377
|
}
|
|
377
378
|
}
|
|
378
379
|
),
|
|
@@ -673,11 +674,11 @@ function LocationPageContent(props) {
|
|
|
673
674
|
|
|
674
675
|
Object.defineProperty(exports, "ManagedNoScripts", {
|
|
675
676
|
enumerable: true,
|
|
676
|
-
get: function () { return
|
|
677
|
+
get: function () { return chunkJ25JPU77_js.ManagedNoScripts; }
|
|
677
678
|
});
|
|
678
679
|
Object.defineProperty(exports, "ManagedScripts", {
|
|
679
680
|
enumerable: true,
|
|
680
|
-
get: function () { return
|
|
681
|
+
get: function () { return chunkJ25JPU77_js.ManagedScripts; }
|
|
681
682
|
});
|
|
682
683
|
Object.defineProperty(exports, "SitemapSync", {
|
|
683
684
|
enumerable: true,
|
|
@@ -685,31 +686,31 @@ Object.defineProperty(exports, "SitemapSync", {
|
|
|
685
686
|
});
|
|
686
687
|
Object.defineProperty(exports, "generateSitemap", {
|
|
687
688
|
enumerable: true,
|
|
688
|
-
get: function () { return
|
|
689
|
+
get: function () { return chunkXNUPJC6R_js.generateSitemap; }
|
|
689
690
|
});
|
|
690
691
|
Object.defineProperty(exports, "getABVariant", {
|
|
691
692
|
enumerable: true,
|
|
692
|
-
get: function () { return
|
|
693
|
+
get: function () { return chunkXNUPJC6R_js.getABVariant; }
|
|
693
694
|
});
|
|
694
695
|
Object.defineProperty(exports, "getManagedMetadata", {
|
|
695
696
|
enumerable: true,
|
|
696
|
-
get: function () { return
|
|
697
|
+
get: function () { return chunkXNUPJC6R_js.getManagedMetadata; }
|
|
697
698
|
});
|
|
698
699
|
Object.defineProperty(exports, "getManagedMetadataWithAB", {
|
|
699
700
|
enumerable: true,
|
|
700
|
-
get: function () { return
|
|
701
|
+
get: function () { return chunkXNUPJC6R_js.getManagedMetadataWithAB; }
|
|
701
702
|
});
|
|
702
703
|
Object.defineProperty(exports, "getRedirect", {
|
|
703
704
|
enumerable: true,
|
|
704
|
-
get: function () { return
|
|
705
|
+
get: function () { return chunkXNUPJC6R_js.getRedirect; }
|
|
705
706
|
});
|
|
706
707
|
Object.defineProperty(exports, "getRobotsDirective", {
|
|
707
708
|
enumerable: true,
|
|
708
|
-
get: function () { return
|
|
709
|
+
get: function () { return chunkXNUPJC6R_js.getRobotsDirective; }
|
|
709
710
|
});
|
|
710
711
|
Object.defineProperty(exports, "isIndexable", {
|
|
711
712
|
enumerable: true,
|
|
712
|
-
get: function () { return
|
|
713
|
+
get: function () { return chunkXNUPJC6R_js.isIndexable; }
|
|
713
714
|
});
|
|
714
715
|
Object.defineProperty(exports, "getABTest", {
|
|
715
716
|
enumerable: true,
|