@sonordev/site-kit 2.8.2 → 3.0.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.
Files changed (117) hide show
  1. package/dist/EngageWidget-LRE4VD7O.js +14 -0
  2. package/dist/{EngageWidget-JIXUBG47.js.map → EngageWidget-LRE4VD7O.js.map} +1 -1
  3. package/dist/EngageWidget-OAOLB6ED.mjs +5 -0
  4. package/dist/{EngageWidget-4W5EM4UO.mjs.map → EngageWidget-OAOLB6ED.mjs.map} +1 -1
  5. package/dist/blog/index.js +2 -1
  6. package/dist/blog/index.js.map +1 -1
  7. package/dist/blog/index.mjs +2 -1
  8. package/dist/blog/index.mjs.map +1 -1
  9. package/dist/chunk-2FEQ6TYD.mjs +37 -0
  10. package/dist/chunk-2FEQ6TYD.mjs.map +1 -0
  11. package/dist/{chunk-5SQ4NRPH.mjs → chunk-3AEOGV6V.mjs} +6 -4
  12. package/dist/chunk-3AEOGV6V.mjs.map +1 -0
  13. package/dist/chunk-662YHKWW.mjs +10 -0
  14. package/dist/chunk-662YHKWW.mjs.map +1 -0
  15. package/dist/{chunk-MNOVPHL6.mjs → chunk-72MRAYAS.mjs} +19 -14
  16. package/dist/chunk-72MRAYAS.mjs.map +1 -0
  17. package/dist/{chunk-5QLM6LZ2.mjs → chunk-APRAGA5G.mjs} +3 -3
  18. package/dist/{chunk-5QLM6LZ2.mjs.map → chunk-APRAGA5G.mjs.map} +1 -1
  19. package/dist/{chunk-MWE2HRPU.js → chunk-D5XTX5EB.js} +19 -14
  20. package/dist/chunk-D5XTX5EB.js.map +1 -0
  21. package/dist/{chunk-HANRPNKG.js → chunk-FMI65E5Y.js} +3 -3
  22. package/dist/{chunk-HANRPNKG.js.map → chunk-FMI65E5Y.js.map} +1 -1
  23. package/dist/{chunk-SLJJJWMV.js → chunk-FPU2QPO4.js} +338 -33
  24. package/dist/chunk-FPU2QPO4.js.map +1 -0
  25. package/dist/{chunk-PKUTYMN7.js → chunk-J25JPU77.js} +2 -2
  26. package/dist/chunk-J25JPU77.js.map +1 -0
  27. package/dist/chunk-J7QI3GDX.js +12 -0
  28. package/dist/chunk-J7QI3GDX.js.map +1 -0
  29. package/dist/chunk-MLJXELPA.js +693 -0
  30. package/dist/chunk-MLJXELPA.js.map +1 -0
  31. package/dist/{chunk-L7XPPFSS.mjs → chunk-QDKQZ5XH.mjs} +2 -2
  32. package/dist/chunk-QDKQZ5XH.mjs.map +1 -0
  33. package/dist/{chunk-IAV32YHL.mjs → chunk-RV45YMBJ.mjs} +338 -33
  34. package/dist/chunk-RV45YMBJ.mjs.map +1 -0
  35. package/dist/chunk-TCVHI3JP.mjs +686 -0
  36. package/dist/chunk-TCVHI3JP.mjs.map +1 -0
  37. package/dist/{chunk-PAF5IGGF.js → chunk-XNUPJC6R.js} +6 -4
  38. package/dist/chunk-XNUPJC6R.js.map +1 -0
  39. package/dist/chunk-YBKALLBH.js +46 -0
  40. package/dist/chunk-YBKALLBH.js.map +1 -0
  41. package/dist/engage/index.d.mts +2 -2
  42. package/dist/engage/index.d.ts +2 -2
  43. package/dist/engage/index.js +5 -4
  44. package/dist/engage/index.js.map +1 -1
  45. package/dist/engage/index.mjs +2 -1
  46. package/dist/engage/index.mjs.map +1 -1
  47. package/dist/forms/index.js +19 -683
  48. package/dist/forms/index.js.map +1 -1
  49. package/dist/forms/index.mjs +4 -676
  50. package/dist/forms/index.mjs.map +1 -1
  51. package/dist/index.d.mts +2 -2
  52. package/dist/index.d.ts +2 -2
  53. package/dist/layout/client.js +2 -2
  54. package/dist/layout/client.mjs +1 -1
  55. package/dist/layout/index.js +5 -5
  56. package/dist/layout/index.mjs +2 -2
  57. package/dist/llms/index.d.mts +18 -4
  58. package/dist/llms/index.d.ts +18 -4
  59. package/dist/llms/index.js +26 -51
  60. package/dist/llms/index.js.map +1 -1
  61. package/dist/llms/index.mjs +16 -41
  62. package/dist/llms/index.mjs.map +1 -1
  63. package/dist/middleware/index.d.mts +62 -1
  64. package/dist/middleware/index.d.ts +62 -1
  65. package/dist/middleware/index.js +105 -0
  66. package/dist/middleware/index.js.map +1 -1
  67. package/dist/middleware/index.mjs +103 -1
  68. package/dist/middleware/index.mjs.map +1 -1
  69. package/dist/seo/index.d.mts +10 -205
  70. package/dist/seo/index.d.ts +10 -205
  71. package/dist/seo/index.js +16 -15
  72. package/dist/seo/index.js.map +1 -1
  73. package/dist/seo/index.mjs +7 -6
  74. package/dist/seo/index.mjs.map +1 -1
  75. package/dist/seo/server.d.mts +2 -106
  76. package/dist/seo/server.d.ts +2 -106
  77. package/dist/seo/server.js +56 -197
  78. package/dist/seo/server.js.map +1 -1
  79. package/dist/seo/server.mjs +2 -183
  80. package/dist/seo/server.mjs.map +1 -1
  81. package/dist/server-l6LMNvF1.d.ts +360 -0
  82. package/dist/server-mX5At_6x.d.mts +360 -0
  83. package/dist/sitemap/index.d.mts +1 -1
  84. package/dist/sitemap/index.d.ts +1 -1
  85. package/dist/sitemap/index.js +2 -2
  86. package/dist/sitemap/index.mjs +1 -1
  87. package/dist/slots/contract.d.mts +83 -0
  88. package/dist/slots/contract.d.ts +83 -0
  89. package/dist/slots/contract.js +41 -0
  90. package/dist/slots/contract.js.map +1 -0
  91. package/dist/slots/contract.mjs +4 -0
  92. package/dist/slots/contract.mjs.map +1 -0
  93. package/dist/slots/index.d.mts +104 -0
  94. package/dist/slots/index.d.ts +104 -0
  95. package/dist/slots/index.js +186 -0
  96. package/dist/slots/index.js.map +1 -0
  97. package/dist/slots/index.mjs +146 -0
  98. package/dist/slots/index.mjs.map +1 -0
  99. package/dist/{types-DYyIAgQg.d.ts → types-DPsbBKiu.d.mts} +1 -1
  100. package/dist/{types-DYyIAgQg.d.mts → types-DPsbBKiu.d.ts} +1 -1
  101. package/dist/{types-BnCwwUX3.d.mts → types-D_1iUxOQ.d.mts} +18 -1
  102. package/dist/{types-BnCwwUX3.d.ts → types-D_1iUxOQ.d.ts} +18 -1
  103. package/dist/{types-J7Z_FqmV.d.mts → types-DhCAWUmd.d.mts} +8 -0
  104. package/dist/{types-0NuBL1Gg.d.ts → types-xcP_owwn.d.ts} +8 -0
  105. package/package.json +11 -1
  106. package/dist/EngageWidget-4W5EM4UO.mjs +0 -4
  107. package/dist/EngageWidget-JIXUBG47.js +0 -13
  108. package/dist/chunk-5SQ4NRPH.mjs.map +0 -1
  109. package/dist/chunk-IAV32YHL.mjs.map +0 -1
  110. package/dist/chunk-L7XPPFSS.mjs.map +0 -1
  111. package/dist/chunk-MNOVPHL6.mjs.map +0 -1
  112. package/dist/chunk-MWE2HRPU.js.map +0 -1
  113. package/dist/chunk-PAF5IGGF.js.map +0 -1
  114. package/dist/chunk-PKUTYMN7.js.map +0 -1
  115. package/dist/chunk-SLJJJWMV.js.map +0 -1
  116. package/dist/routing-C7gmHWm9.d.ts +0 -163
  117. package/dist/routing-trNzR1Pz.d.mts +0 -163
@@ -1,163 +0,0 @@
1
- import { G as GetManagedMetadataOptions, M as ManagedMetadataResult, l as GetABVariantOptions, k as ABTestResult, n as GetRedirectOptions, R as RedirectResult, r as GetRobotsOptions, q as RobotsDirective, t as GetSitemapEntriesOptions, s as SitemapEntry } from './types-DYyIAgQg.mjs';
2
-
3
- /**
4
- * Get managed metadata for a page
5
- *
6
- * Use in generateMetadata() to fetch Portal-managed SEO data
7
- *
8
- * @example
9
- * ```tsx
10
- * export async function generateMetadata({ params }) {
11
- * return getManagedMetadata({
12
- * path: `/services/${params.slug}`,
13
- * fallback: {
14
- * title: 'Our Services',
15
- * description: 'Learn about our services'
16
- * }
17
- * })
18
- * }
19
- * ```
20
- */
21
- declare function getManagedMetadata(options: GetManagedMetadataOptions): Promise<ManagedMetadataResult>;
22
- /**
23
- * Get A/B test variant for a field
24
- *
25
- * @example
26
- * ```tsx
27
- * const variant = await getABVariant({
28
- * path: '/pricing',
29
- * field: 'title',
30
- * sessionId: cookies().get('session_id')?.value
31
- * })
32
- *
33
- * if (variant) {
34
- * // Use variant.value instead of default
35
- * }
36
- * ```
37
- */
38
- declare function getABVariant(options: GetABVariantOptions): Promise<ABTestResult | null>;
39
- /**
40
- * Get managed metadata with A/B test support
41
- *
42
- * Automatically applies running A/B test variants to metadata
43
- */
44
- declare function getManagedMetadataWithAB(options: GetManagedMetadataOptions & {
45
- sessionId?: string;
46
- }): Promise<ManagedMetadataResult>;
47
-
48
- /**
49
- * Get redirect for a path if one exists
50
- *
51
- * Use in Next.js middleware to handle managed redirects
52
- *
53
- * @example
54
- * ```tsx
55
- * // middleware.ts
56
- * import { getRedirect } from '@sonordev/seo'
57
- *
58
- * export async function middleware(request) {
59
- * const redirect = await getRedirect({
60
- * projectId: process.env.SONOR_PROJECT_ID!,
61
- * path: request.nextUrl.pathname
62
- * })
63
- *
64
- * if (redirect) {
65
- * return NextResponse.redirect(redirect.destination, redirect.statusCode)
66
- * }
67
- * }
68
- * ```
69
- */
70
- declare function getRedirect(options: GetRedirectOptions): Promise<RedirectResult | null>;
71
- /**
72
- * Get robots directive for a page
73
- *
74
- * @example
75
- * ```tsx
76
- * const robots = await getRobotsDirective({
77
- * projectId: process.env.SONOR_PROJECT_ID!,
78
- * path: '/private-page'
79
- * })
80
- *
81
- * if (!robots.index) {
82
- * // Page should not be indexed
83
- * }
84
- * ```
85
- */
86
- declare function getRobotsDirective(options: GetRobotsOptions): Promise<RobotsDirective>;
87
- /**
88
- * Get sitemap entries for a project
89
- *
90
- * Use in sitemap.ts to generate dynamic sitemap
91
- *
92
- * @example
93
- * ```tsx
94
- * // app/sitemap.ts
95
- * import { generateSitemap } from '@sonordev/seo'
96
- *
97
- * export default async function sitemap() {
98
- * return generateSitemap({
99
- * projectId: process.env.SONOR_PROJECT_ID!,
100
- * baseUrl: 'https://example.com',
101
- * publishedOnly: true
102
- * })
103
- * }
104
- * ```
105
- */
106
- declare function generateSitemap(options: GetSitemapEntriesOptions): Promise<SitemapEntry[]>;
107
- /**
108
- * Register local sitemap entries with Sonor
109
- *
110
- * Call this at build time to sync your local routes to seo_pages.
111
- * This ensures analytics only tracks real pages.
112
- *
113
- * After registration, Signal AI will generate optimized meta titles
114
- * and descriptions for pages that don't have managed meta yet.
115
- *
116
- * @example
117
- * ```ts
118
- * // scripts/register-sitemap.ts
119
- * import { registerLocalSitemap } from '@sonordev/seo'
120
- *
121
- * // Option 1: Provide entries directly
122
- * await registerLocalSitemap({
123
- * entries: [
124
- * { path: '/', title: 'Home', priority: 1.0 },
125
- * { path: '/about', title: 'About Us', priority: 0.8 },
126
- * ]
127
- * })
128
- *
129
- * // Option 2: Auto-discover from Next.js app directory
130
- * await registerLocalSitemap({ autoDiscover: true })
131
- *
132
- * // Option 3: Skip Signal AI meta optimization
133
- * await registerLocalSitemap({ autoDiscover: true, optimize_meta: false })
134
- * ```
135
- */
136
- declare function registerLocalSitemap(options: {
137
- entries?: Array<{
138
- path: string;
139
- title?: string;
140
- priority?: number;
141
- changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
142
- }>;
143
- autoDiscover?: boolean;
144
- /** Trigger Signal AI to generate optimized meta titles/descriptions (default: true) */
145
- optimize_meta?: boolean;
146
- }): Promise<{
147
- success: boolean;
148
- created: number;
149
- updated: number;
150
- removed?: number;
151
- meta_optimization?: {
152
- triggered: boolean;
153
- pages_queued: number;
154
- } | null;
155
- }>;
156
- /**
157
- * Check if a path should be indexed
158
- *
159
- * Quick helper to check indexability without full directive parsing
160
- */
161
- declare function isIndexable(projectId: string, path: string): Promise<boolean>;
162
-
163
- export { getManagedMetadataWithAB as a, generateSitemap as b, getABVariant as c, getRedirect as d, getRobotsDirective as e, getManagedMetadata as g, isIndexable as i, registerLocalSitemap as r };