@sonordev/site-kit 8.1.0 → 8.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.
Files changed (194) hide show
  1. package/AGENTS.md +13 -1
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +9 -5
  4. package/agent-manifest.json +47 -8
  5. package/dist/{AnalyticsProvider-UWTCE5UO.js → AnalyticsProvider-QXO33JUF.js} +6 -6
  6. package/dist/{ArticleFaqSection-3Q26DP7P.js → ArticleFaqSection-DEWE5B4Q.js} +1 -1
  7. package/dist/{ArticleViewTracker-MYD6SGNH.js → ArticleViewTracker-KN6ENIRS.js} +17 -6
  8. package/dist/{BlocksPopup-OY5G3EFH.js → BlocksPopup-3RPN6YVJ.js} +6 -6
  9. package/dist/{ChatWidget-BTR5VERC.js → ChatWidget-D2X445PO.js} +6 -6
  10. package/dist/{FileField-DEHVYXAO.js → FileField-UNGSNGJ5.js} +4 -4
  11. package/dist/{FormSpotlight-VGC4CZL4.js → FormSpotlight-JFH2ENKQ.js} +1 -1
  12. package/dist/{FormStage-CJUSCSAL.js → FormStage-RC3WHHXP.js} +1 -1
  13. package/dist/{ManagedForm-JCI2KPMO.js → ManagedForm-FOQZ2IYG.js} +7 -7
  14. package/dist/{ManagedNewsletterForm-DTE4KKXV.js → ManagedNewsletterForm-NFNF33V3.js} +16 -7
  15. package/dist/{SignalCore-LGCBQDEH.js → SignalCore-5KABGX5C.js} +4 -4
  16. package/dist/SiteChat-JQ46ZIJ4.js +6 -0
  17. package/dist/SiteDesignReporter-N7L6DR4J.js +12 -0
  18. package/dist/{SitePopups-T6YPHAVY.js → SitePopups-WZBKX5Q3.js} +6 -6
  19. package/dist/SitemapSync-GY6UADRI.js +9 -0
  20. package/dist/_client/booking-widget.js +6 -6
  21. package/dist/_client/testimonial-section.js +3 -3
  22. package/dist/affiliates/index.js +4 -4
  23. package/dist/analytics/index.js +6 -6
  24. package/dist/{article-styles-GGZOQG5X.js → article-styles-7QONZJR5.js} +3 -3
  25. package/dist/article-tables-6XHVULPU.js +2 -0
  26. package/dist/articles/Article.d.ts +2 -89
  27. package/dist/articles/ArticleFAQ.d.ts +2 -41
  28. package/dist/articles/ArticleFaqSection.d.ts +2 -2
  29. package/dist/articles/ArticleList.d.ts +2 -79
  30. package/dist/articles/ArticleViewTracker.d.ts +2 -15
  31. package/dist/articles/AuthorCard.d.ts +2 -10
  32. package/dist/articles/AuthorPage.d.ts +2 -8
  33. package/dist/articles/ClusterLandingPage.d.ts +2 -40
  34. package/dist/articles/ClusterNavigation.d.ts +2 -37
  35. package/dist/articles/ManagedNewsletterForm.d.ts +3 -12
  36. package/dist/articles/NewsletterShell.d.ts +2 -17
  37. package/dist/articles/NewsletterWidget.d.ts +2 -30
  38. package/dist/articles/PublicationLayout.d.ts +2 -67
  39. package/dist/articles/PublicationSidebar.d.ts +2 -36
  40. package/dist/articles/RelatedPosts.d.ts +2 -22
  41. package/dist/articles/ServiceCallout.d.ts +2 -56
  42. package/dist/articles/TableOfContents.d.ts +2 -6
  43. package/dist/articles/article-photos.d.ts +2 -9
  44. package/dist/articles/article-styles.d.ts +2 -21
  45. package/dist/articles/article-tables.d.ts +2 -12
  46. package/dist/articles/artwork.d.ts +2 -13
  47. package/dist/articles/author-schema.d.ts +2 -72
  48. package/dist/articles/author-social.d.ts +2 -14
  49. package/dist/articles/excerpt.d.ts +2 -17
  50. package/dist/articles/index.d.ts +2 -79
  51. package/dist/articles/index.js +16 -11
  52. package/dist/articles/news-sitemap.d.ts +2 -46
  53. package/dist/articles/processArticleHtml.d.ts +2 -34
  54. package/dist/articles/public-reads.d.ts +2 -26
  55. package/dist/articles/reading-time.d.ts +2 -9
  56. package/dist/articles/routes.d.ts +2 -52
  57. package/dist/articles/server-core.d.ts +2 -461
  58. package/dist/articles/server-ui.d.ts +2 -30
  59. package/dist/articles/server-ui.js +26 -17
  60. package/dist/articles/server.d.ts +2 -461
  61. package/dist/articles/server.js +14 -5
  62. package/dist/articles/types.d.ts +2 -315
  63. package/dist/articles/widget-styles.d.ts +2 -8
  64. package/dist/chat/index.js +8 -8
  65. package/dist/{chunk-AIDIEVPZ.js → chunk-2JMCBJM5.js} +1 -1
  66. package/dist/chunk-34ZYJTQR.js +1 -0
  67. package/dist/{chunk-ADI6IYFH.js → chunk-3OY52UFM.js} +1 -1
  68. package/dist/{chunk-WMVK77ND.js → chunk-4K735O3J.js} +1 -1
  69. package/dist/{chunk-55GHBRCN.js → chunk-4PVMUPC6.js} +2 -2
  70. package/dist/{chunk-L5UOHS6E.js → chunk-5D7ZISUP.js} +1 -1
  71. package/dist/{chunk-JT52KYHQ.js → chunk-5RYSTKVU.js} +1 -1
  72. package/dist/{chunk-6CJGZFOU.js → chunk-A4MPHIVP.js} +1 -1
  73. package/dist/chunk-B7T2SFUF.js +1 -0
  74. package/dist/{chunk-FV2VD7WM.js → chunk-BC7JMY4Z.js} +3 -3
  75. package/dist/{chunk-255NCCPB.js → chunk-BOCYBDKV.js} +1 -1
  76. package/dist/{chunk-NFRJTOTB.js → chunk-BSQP6PRA.js} +1 -1
  77. package/dist/{chunk-GKGSXUVQ.js → chunk-BVB5FBAA.js} +1 -1
  78. package/dist/{chunk-NWVB75ER.js → chunk-C2UROFGZ.js} +1 -1
  79. package/dist/{chunk-F2VYN3QL.js → chunk-C4AFNZT2.js} +1 -1
  80. package/dist/{chunk-GC2QWXJ3.js → chunk-D6ZIQMHB.js} +3 -3
  81. package/dist/{chunk-GYF2ULVO.js → chunk-DJAYFHVF.js} +1 -1
  82. package/dist/{chunk-XUCU3LX4.js → chunk-DPSNMOMZ.js} +1 -1
  83. package/dist/{chunk-A3EU6HB5.js → chunk-E3UR37RX.js} +2 -2
  84. package/dist/{chunk-Y3INC4QJ.js → chunk-E4PTMORJ.js} +1 -1
  85. package/dist/{chunk-TAO6BVA2.js → chunk-EA6FZMYA.js} +2 -2
  86. package/dist/{chunk-V56RZH7J.js → chunk-FHUTOXS7.js} +1 -1
  87. package/dist/{chunk-LLW5HKEE.js → chunk-GKJVSZ7H.js} +3 -3
  88. package/dist/chunk-H72ZFO3F.js +1 -0
  89. package/dist/{chunk-CSTC6HZO.js → chunk-HND6BDXC.js} +3 -3
  90. package/dist/chunk-IEGDPRQB.js +14 -0
  91. package/dist/{chunk-CAH4Y4PY.js → chunk-JO76F5WP.js} +1 -1
  92. package/dist/{chunk-4Z3DI2EL.js → chunk-KJVUOJMW.js} +58 -58
  93. package/dist/{chunk-SC4MZGWZ.js → chunk-LBDWAXAO.js} +1 -1
  94. package/dist/{chunk-RSBMQFZW.js → chunk-LPKKSYKX.js} +3 -3
  95. package/dist/{chunk-2UO4HPGE.js → chunk-M5SF7NCC.js} +73 -51
  96. package/dist/{chunk-S6IGQYHW.js → chunk-MQ4REMTH.js} +2 -2
  97. package/dist/{chunk-O4DETQJI.js → chunk-NA4Z4CQG.js} +1 -1
  98. package/dist/{chunk-WPOFTCKL.js → chunk-OIWFXUVD.js} +2 -2
  99. package/dist/{chunk-G2HCCWZQ.js → chunk-QBCWVT2S.js} +2 -2
  100. package/dist/{chunk-DZV3KPVF.js → chunk-QCZHYO5M.js} +1 -1
  101. package/dist/{chunk-DOMBP3FW.js → chunk-QDILCQBL.js} +9 -9
  102. package/dist/{chunk-IAYGTQJD.js → chunk-SCTVADDL.js} +2 -2
  103. package/dist/{chunk-QXMIKDOL.js → chunk-SNRE3ZVZ.js} +3 -3
  104. package/dist/{chunk-DSNCU2E3.js → chunk-TT4JZDKM.js} +3 -3
  105. package/dist/{chunk-6VHDCJIZ.js → chunk-U7Y3QG3A.js} +1 -1
  106. package/dist/{chunk-3G7YABRA.js → chunk-W7OPEMGJ.js} +4 -1
  107. package/dist/{chunk-2JEUDTL6.js → chunk-WBUG7XRL.js} +2 -2
  108. package/dist/{chunk-47VB5INH.js → chunk-WSOZ3FQN.js} +1 -1
  109. package/dist/chunk-X4IJS7LV.js +319 -0
  110. package/dist/{chunk-JIH32RH2.js → chunk-XA7Q2VQA.js} +1 -1
  111. package/dist/{chunk-5L467Z5Q.js → chunk-XLAXYPTK.js} +3 -3
  112. package/dist/client/index.js +4 -16
  113. package/dist/contracts/editorial-media.d.ts +39 -0
  114. package/dist/contracts/entries.d.ts +1 -1
  115. package/dist/fleet/index.js +6 -6
  116. package/dist/forms/index.js +9 -325
  117. package/dist/forms/server.js +2 -2
  118. package/dist/images/index.js +4 -4
  119. package/dist/index.js +1 -1
  120. package/dist/layout/client.js +9 -9
  121. package/dist/layout/index.js +10 -10
  122. package/dist/llms/index.js +8 -8
  123. package/dist/maps/index.js +4 -4
  124. package/dist/mcp/sonor.d.ts +42 -3
  125. package/dist/mcp/sonor.js +25 -20
  126. package/dist/mcp/transport.d.ts +1 -1
  127. package/dist/press-kit/articles/Article.d.ts +89 -0
  128. package/dist/press-kit/articles/ArticleFAQ.d.ts +41 -0
  129. package/dist/press-kit/articles/ArticleFaqSection.d.ts +2 -0
  130. package/dist/press-kit/articles/ArticleList.d.ts +79 -0
  131. package/dist/press-kit/articles/ArticleViewTracker.d.ts +15 -0
  132. package/dist/press-kit/articles/AuthorCard.d.ts +10 -0
  133. package/dist/press-kit/articles/AuthorPage.d.ts +8 -0
  134. package/dist/press-kit/articles/ClusterLandingPage.d.ts +40 -0
  135. package/dist/press-kit/articles/ClusterNavigation.d.ts +37 -0
  136. package/dist/press-kit/articles/ManagedNewsletterForm.d.ts +12 -0
  137. package/dist/press-kit/articles/NewsletterShell.d.ts +17 -0
  138. package/dist/press-kit/articles/NewsletterWidget.d.ts +30 -0
  139. package/dist/press-kit/articles/PublicationLayout.d.ts +67 -0
  140. package/dist/press-kit/articles/PublicationSidebar.d.ts +36 -0
  141. package/dist/press-kit/articles/RelatedPosts.d.ts +22 -0
  142. package/dist/press-kit/articles/ServiceCallout.d.ts +56 -0
  143. package/dist/press-kit/articles/TableOfContents.d.ts +6 -0
  144. package/dist/press-kit/articles/article-photos.d.ts +9 -0
  145. package/dist/press-kit/articles/article-styles.d.ts +21 -0
  146. package/dist/press-kit/articles/article-tables.d.ts +12 -0
  147. package/dist/press-kit/articles/artwork.d.ts +13 -0
  148. package/dist/press-kit/articles/author-schema.d.ts +72 -0
  149. package/dist/press-kit/articles/author-social.d.ts +14 -0
  150. package/dist/press-kit/articles/excerpt.d.ts +17 -0
  151. package/dist/press-kit/articles/index.d.ts +79 -0
  152. package/dist/press-kit/articles/news-sitemap.d.ts +46 -0
  153. package/dist/press-kit/articles/processArticleHtml.d.ts +34 -0
  154. package/dist/press-kit/articles/public-reads.d.ts +26 -0
  155. package/dist/press-kit/articles/reading-time.d.ts +9 -0
  156. package/dist/press-kit/articles/routes.d.ts +52 -0
  157. package/dist/press-kit/articles/server-core.d.ts +461 -0
  158. package/dist/press-kit/articles/server-ui.d.ts +31 -0
  159. package/dist/press-kit/articles/types.d.ts +316 -0
  160. package/dist/press-kit/articles/widget-styles.d.ts +8 -0
  161. package/dist/reputation/index.js +3 -3
  162. package/dist/reputation/server.js +2 -2
  163. package/dist/revalidate/index.js +2 -2
  164. package/dist/runtime/index.js +5 -4
  165. package/dist/seo/client.js +6 -6
  166. package/dist/seo/index.js +7 -7
  167. package/dist/seo/llms.js +8 -8
  168. package/dist/seo/register-sitemap-cli.js +1 -1
  169. package/dist/seo/sitemap.js +6 -6
  170. package/dist/server/index.js +3 -2
  171. package/dist/shared/build-entries.d.ts +2 -1
  172. package/dist/shared/clientApiConfig.d.ts +2 -0
  173. package/dist/shared/import-specifiers.d.ts +1 -1
  174. package/dist/shared/index.d.ts +6 -0
  175. package/dist/shared/index.js +8 -0
  176. package/dist/shared/version.d.ts +1 -1
  177. package/dist/signal/index.js +2 -2
  178. package/dist/sitemap/index.js +6 -6
  179. package/dist/sync/index.js +6 -6
  180. package/dist/website/images.js +4 -4
  181. package/dist/website/index.js +7 -7
  182. package/dist/website/popups.js +6 -6
  183. package/dist/{writeLLMsTxt-OS2WBSLM.js → writeLLMsTxt-VKHCM5IS.js} +5 -5
  184. package/docs/MIGRATING-TO-PRESS-KIT.md +83 -0
  185. package/docs.json +145 -29
  186. package/package.json +15 -5
  187. package/src/articles/README.md +5 -360
  188. package/src/mcp/README.md +16 -0
  189. package/src/og/README.md +1 -1
  190. package/src/runtime/README.md +4 -0
  191. package/dist/SiteChat-6SF7PVUT.js +0 -6
  192. package/dist/SiteDesignReporter-VISQZ5NQ.js +0 -12
  193. package/dist/SitemapSync-VKMVRPZL.js +0 -9
  194. package/dist/article-tables-AXSZOGNW.js +0 -2
@@ -1,461 +1,2 @@
1
- /**
2
- * @sonordev/site-kit/articles/server
3
- *
4
- * Data and metadata helpers only (no React components). For `Article` / `ArticleList`
5
- * in the App Router, import from `@sonordev/site-kit/articles/server-ui` so Next never
6
- * treats `getAllArticleSlugs` / `generateArticleStaticParams` as client code.
7
- */
8
- import type { Metadata } from 'next';
9
- import type { Article as ArticleRecord, ArticleAuthor, TopicCluster, ClusterNavigation } from './types';
10
- import { sanitizeExcerpt } from './excerpt';
11
- import { type PublicationRoutingOptions } from './routes';
12
- import { type NewsSitemapOptions } from './news-sitemap';
13
- export { sanitizeExcerpt };
14
- export declare const SEO_LIMITS: {
15
- readonly title: {
16
- readonly min: 30;
17
- readonly max: 60;
18
- readonly recommended: 55;
19
- };
20
- readonly metaDescription: {
21
- readonly min: 120;
22
- readonly max: 160;
23
- readonly recommended: 155;
24
- };
25
- readonly excerpt: {
26
- readonly min: 100;
27
- readonly max: 300;
28
- readonly recommended: 200;
29
- };
30
- readonly slug: {
31
- readonly max: 75;
32
- };
33
- readonly focusKeyphrase: {
34
- readonly min: 2;
35
- readonly max: 4;
36
- readonly words: true;
37
- };
38
- };
39
- export interface SeoValidationResult {
40
- field: string;
41
- value: string;
42
- length: number;
43
- limit: {
44
- min?: number;
45
- max: number;
46
- recommended?: number;
47
- };
48
- status: 'good' | 'warning' | 'error';
49
- message: string;
50
- }
51
- /**
52
- * Validate SEO title (60 chars max, keyword-first recommended)
53
- */
54
- export declare function validateSeoTitle(title: string, focusKeyphrase?: string): SeoValidationResult;
55
- /**
56
- * Validate meta description (150-160 chars, benefit-driven)
57
- */
58
- export declare function validateMetaDescription(description: string, focusKeyphrase?: string): SeoValidationResult;
59
- /**
60
- * Full SEO validation for an article
61
- */
62
- export declare function validateArticleSeo(post: Partial<ArticleRecord>): SeoValidationResult[];
63
- /**
64
- * Fetch an article by slug (server-side)
65
- *
66
- * @param options.site - Sub-site host override. Omit to resolve from
67
- * NEXT_PUBLIC_SITE_URL.
68
- */
69
- export declare function getArticle(slug: string, options?: {
70
- site?: string;
71
- }): Promise<ArticleRecord | null>;
72
- /**
73
- * Fetch an article by slug, or answer 404 when there isn't one.
74
- *
75
- * `getArticle` returns null for a mistyped or deleted slug, and the page
76
- * used to carry on rendering a "not found" message with HTTP 200 and an
77
- * indexable title: a soft 404 on every bad post URL. This calls Next's
78
- * `notFound()` instead, so the
79
- * route answers 404 with `noindex`.
80
- *
81
- * Call it from `generateMetadata` (or the page) before rendering `Article`:
82
- * metadata resolves before anything streams, so the status is a real 404.
83
- * The fetch is the same one `Article` and `generateArticleMetadata` make,
84
- * and Next dedupes it within the render.
85
- *
86
- * @example
87
- * ```tsx
88
- * export async function generateMetadata({ params }) {
89
- * const { slug } = await params
90
- * await requireArticle(slug)
91
- * return generateArticleMetadata(slug, { siteName: 'Acme' })
92
- * }
93
- * ```
94
- */
95
- export declare function requireArticle(slug: string, options?: {
96
- site?: string;
97
- }): Promise<ArticleRecord>;
98
- /**
99
- * Fetch all article slugs for static generation
100
- */
101
- export declare function getAllArticleSlugs(): Promise<{
102
- slug: string;
103
- id?: string;
104
- last_modified?: string;
105
- article_type?: string;
106
- }[]>;
107
- /**
108
- * Fetch article categories
109
- */
110
- export declare function getArticleCategories(options?: {
111
- site?: string;
112
- }): Promise<{
113
- name: string;
114
- slug: string;
115
- post_count: number;
116
- }[]>;
117
- export interface PublicationMetadataOptions extends PublicationRoutingOptions {
118
- /** Site name for og:site_name */
119
- siteName?: string;
120
- /** Base URL of the site */
121
- siteUrl?: string;
122
- /** URL path prefix for publication index and posts (default `/article`, e.g. `/insights`) */
123
- /** Default OG image */
124
- defaultImage?: string;
125
- /** Twitter handle */
126
- twitterHandle?: string;
127
- }
128
- export interface ArticleMetadataOptions extends PublicationMetadataOptions {
129
- /**
130
- * Declare the featured image (or `defaultImage`) as `openGraph.images` and
131
- * `twitter.images`. Default true.
132
- *
133
- * Pass false when the post route has its own card, an
134
- * `opengraph-image.tsx` beside the page. Next lets declared images beat
135
- * that file, so leaving them in silently swaps the post's card for the raw
136
- * photo. With false the `images` keys are left out entirely, not set to
137
- * undefined: Next checks `hasOwnProperty('images')`, so even an undefined
138
- * value hides the card.
139
- */
140
- images?: boolean;
141
- /**
142
- * What to do when the post doesn't exist. Default true: call Next's
143
- * `notFound()`, so the route answers 404. False returns placeholder
144
- * metadata marked `noindex` instead, for a page that renders its own
145
- * missing-post state.
146
- */
147
- notFound?: boolean;
148
- }
149
- /**
150
- * Generate metadata for an article page
151
- */
152
- export declare function generateArticleMetadata(slug: string, options?: ArticleMetadataOptions): Promise<Metadata>;
153
- /**
154
- * Generate metadata for the publication index page
155
- */
156
- export declare function generatePublicationMetadata(options: PublicationMetadataOptions & {
157
- title?: string;
158
- description?: string;
159
- }): Metadata;
160
- /**
161
- * Generate metadata for a category page
162
- */
163
- export declare function generateArticleCategoryMetadata(categoryName: string, options?: PublicationMetadataOptions & {
164
- categorySlug?: string;
165
- }): Metadata;
166
- /**
167
- * What Next passes to a route's `generateStaticParams`: the parent segments'
168
- * params. The publication helpers ignore it; it's typed so they can be exported
169
- * directly as `generateStaticParams`.
170
- */
171
- export interface NextStaticParamsProps {
172
- params: unknown;
173
- }
174
- /**
175
- * Generate static params for article pages.
176
- *
177
- * Export it directly for the default `/article/[slug]` routes:
178
- *
179
- * export const generateStaticParams = generateArticleStaticParams
180
- *
181
- * With routing options, wrap it:
182
- *
183
- * export function generateStaticParams() {
184
- * return generateArticleStaticParams(routing)
185
- * }
186
- */
187
- export declare function generateArticleStaticParams(options?: PublicationRoutingOptions): Promise<{
188
- slug: string;
189
- category?: string;
190
- }[]>;
191
- export declare function generateArticleStaticParams(props: NextStaticParamsProps): Promise<{
192
- slug: string;
193
- category?: string;
194
- }[]>;
195
- /**
196
- * Generate static params for category pages. Takes no arguments, so it can be
197
- * exported directly:
198
- *
199
- * export const generateStaticParams = generateCategoryStaticParams
200
- */
201
- export declare function generateCategoryStaticParams(): Promise<{
202
- category: string;
203
- }[]>;
204
- interface SitemapEntry {
205
- url: string;
206
- lastModified?: Date;
207
- changeFrequency?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
208
- priority?: number;
209
- /** Image sitemap entries; Next's MetadataRoute.Sitemap renders them as <image:image>. */
210
- images?: string[];
211
- }
212
- /**
213
- * Generate sitemap entries for articles
214
- */
215
- export interface ArticleSitemapOptions extends PublicationRoutingOptions {
216
- includeCategories?: boolean;
217
- includeClusters?: boolean;
218
- }
219
- export declare function generateArticleSitemap(siteUrl: string, options?: ArticleSitemapOptions): Promise<SitemapEntry[]>;
220
- /**
221
- * Google News sitemap XML for posts published in the last two days. Serve it
222
- * from a route (app/news-sitemap.xml/route.ts) and list it in robots.txt.
223
- */
224
- export declare function generateNewsSitemap(options: NewsSitemapOptions & {
225
- site?: string;
226
- }): Promise<string>;
227
- /**
228
- * Generate JSON-LD schema for an article
229
- */
230
- export declare function generateArticleSchema(post: ArticleRecord, options?: PublicationRoutingOptions & {
231
- siteUrl?: string;
232
- siteName?: string;
233
- logoUrl?: string;
234
- }): object;
235
- /**
236
- * Generate JSON-LD schema for publication index/listing page
237
- */
238
- export declare function generateArticleListSchema(options?: PublicationRoutingOptions & {
239
- siteUrl?: string;
240
- siteName?: string;
241
- description?: string;
242
- }): object;
243
- /**
244
- * Generate standalone FAQ schema (great for PAA inclusion)
245
- */
246
- export declare function generateFaqSchema(faqItems: {
247
- question: string;
248
- answer: string;
249
- }[]): object | null;
250
- export interface HowToStep {
251
- name: string;
252
- text: string;
253
- image?: string;
254
- url?: string;
255
- }
256
- /**
257
- * Generate HowTo schema for step-by-step posts
258
- */
259
- export declare function generateHowToSchema(post: ArticleRecord, steps: HowToStep[], options?: PublicationRoutingOptions & {
260
- siteUrl?: string;
261
- }): object;
262
- export interface RssFeedOptions extends PublicationRoutingOptions {
263
- siteUrl: string;
264
- siteName: string;
265
- description?: string;
266
- language?: string;
267
- copyright?: string;
268
- managingEditor?: string;
269
- webMaster?: string;
270
- ttl?: number;
271
- imageUrl?: string;
272
- /** Most recent posts to include. Defaults to FEED_DEFAULT_ITEMS (20); older posts stay in the sitemap. */
273
- maxItems?: number;
274
- }
275
- /**
276
- * Fetch all published articles for RSS feed.
277
- *
278
- * Paginates with `per_page`/`page` — the only pagination params the deployed
279
- * controller reads — accumulating up to FEED_MAX_POSTS. A mid-loop failure
280
- * returns what was accumulated so far: a partial feed beats an empty one.
281
- */
282
- export declare function getAllArticles(options?: {
283
- maxPosts?: number; /** Sub-site host override (see getArticle). */
284
- site?: string;
285
- }): Promise<ArticleRecord[]>;
286
- /**
287
- * Generate RSS 2.0 feed XML
288
- */
289
- export declare function generateRssFeed(options: RssFeedOptions): Promise<string>;
290
- /**
291
- * Generate Atom feed XML
292
- */
293
- export declare function generateAtomFeed(options: RssFeedOptions): Promise<string>;
294
- /**
295
- * Fetch all active topic clusters for the project.
296
- * Uses the real cluster data from Sonor API (not heuristic-based).
297
- */
298
- export declare function getTopicClusters(options?: {
299
- site?: string;
300
- }): Promise<TopicCluster[]>;
301
- /**
302
- * Fetch a single topic cluster with its pillar and support articles.
303
- */
304
- export declare function getTopicCluster(slug: string, options?: {
305
- site?: string;
306
- }): Promise<TopicCluster | null>;
307
- /**
308
- * Get cluster navigation context for an article.
309
- * Returns the cluster name, pillar link, and sibling articles.
310
- */
311
- export declare function getClusterNavigation(post: ArticleRecord): ClusterNavigation | null;
312
- /**
313
- * Fetch posts by category for topic cluster organization
314
- */
315
- export declare function getPostsByCategory(categorySlug: string, options?: {
316
- site?: string;
317
- }): Promise<ArticleRecord[]>;
318
- /**
319
- * Generate ItemList schema for a cluster's pillar page.
320
- * Wraps supporting posts as a structured list Google can parse.
321
- */
322
- export declare function generateClusterItemListSchema(cluster: TopicCluster, options?: PublicationRoutingOptions & {
323
- siteUrl?: string;
324
- }): object;
325
- /**
326
- * Generate Article schema with cluster relationship (isPartOf / hasPart).
327
- * - Support articles get `isPartOf` pointing to the pillar.
328
- * - Pillar articles get `hasPart` listing all supports.
329
- */
330
- export declare function generateClusterArticleSchema(post: ArticleRecord, cluster: TopicCluster, options?: PublicationRoutingOptions & {
331
- siteUrl?: string;
332
- siteName?: string;
333
- logoUrl?: string;
334
- }): object;
335
- /**
336
- * Generate BreadcrumbList schema for a cluster-linked post.
337
- * Path: Home > Article > Cluster > Article
338
- */
339
- export declare function generateClusterBreadcrumbSchema(post: ArticleRecord, cluster: TopicCluster, options?: PublicationRoutingOptions & {
340
- siteUrl?: string;
341
- siteName?: string;
342
- }): object;
343
- /**
344
- * Generate CollectionPage schema for a cluster landing page.
345
- */
346
- export declare function generateClusterLandingSchema(cluster: TopicCluster, options?: PublicationRoutingOptions & {
347
- siteUrl?: string;
348
- siteName?: string;
349
- }): object;
350
- /**
351
- * Generate metadata for a cluster landing page (Next.js generateMetadata).
352
- */
353
- export declare function generateClusterPageMetadata(clusterSlug: string, options?: PublicationRoutingOptions & {
354
- siteName?: string;
355
- siteUrl?: string;
356
- }): Promise<{
357
- title?: undefined;
358
- description?: undefined;
359
- openGraph?: undefined;
360
- } | {
361
- title: string;
362
- description: string;
363
- openGraph: {
364
- title: string;
365
- description: string;
366
- url: string;
367
- type: string;
368
- };
369
- }>;
370
- /**
371
- * Generate "Related Insights" section data
372
- */
373
- export declare function getRelatedInsights(currentSlug: string, options?: {
374
- limit?: number;
375
- category?: string; /** Sub-site host override (see getArticle). */
376
- site?: string;
377
- }): Promise<ArticleRecord[]>;
378
- /**
379
- * Generate BreadcrumbList schema for article navigation
380
- */
381
- export declare function generateBreadcrumbSchema(post: ArticleRecord, options?: PublicationRoutingOptions & {
382
- siteUrl?: string;
383
- siteName?: string;
384
- }): object;
385
- /**
386
- * Generate all relevant schemas for an article in a single array
387
- * This is the recommended way to include multiple schemas.
388
- * When post has E-E-A-T schema (post.schema), use it instead of generating Article/FAQ.
389
- */
390
- export declare function generateAllArticleSchemas(post: ArticleRecord, options?: PublicationRoutingOptions & {
391
- siteUrl?: string;
392
- siteName?: string;
393
- logoUrl?: string;
394
- }): object[];
395
- /**
396
- * Fetch a single author by slug
397
- */
398
- export declare function getAuthorBySlug(slug: string, options?: {
399
- site?: string;
400
- }): Promise<ArticleAuthor | null>;
401
- /**
402
- * Fetch an author's posts by slug.
403
- *
404
- * `offset` pages through the controller's existing offset support. Older API
405
- * versions return a stripped `{name, slug}` author on this endpoint; when
406
- * that shape is detected the full author row is hydrated via getAuthorBySlug
407
- * (both fetches revalidate:60, so the extra hop is cached and disappears once
408
- * the API returns the full row itself).
409
- */
410
- export declare function getAuthorPosts(slug: string, limit?: number, offset?: number, options?: {
411
- site?: string;
412
- }): Promise<{
413
- author: ArticleAuthor | null;
414
- posts: ArticleRecord[];
415
- total: number;
416
- }>;
417
- /**
418
- * Fetch all author slugs for static generation
419
- */
420
- export declare function getAllAuthorSlugs(): Promise<{
421
- slug: string;
422
- }[]>;
423
- /**
424
- * Generate static params for author pages. Takes no arguments, so it can be
425
- * exported directly:
426
- *
427
- * export const generateStaticParams = generateAuthorStaticParams
428
- */
429
- export declare function generateAuthorStaticParams(): Promise<{
430
- slug: string;
431
- }[]>;
432
- /**
433
- * Generate Next.js Metadata for an author page
434
- */
435
- export declare function generateAuthorPageMetadata(author: ArticleAuthor, options?: PublicationRoutingOptions & {
436
- siteUrl?: string;
437
- siteName?: string;
438
- }): Metadata;
439
- /**
440
- * Author JSON-LD: `generateAuthorSchema` (the author page's ProfilePage with
441
- * the Person as mainEntity), `generateAuthorPersonSchema` (the bare Person for
442
- * embedding), `generateArticleAuthorNode` (an article byline) and
443
- * `authorEntityId` (the Person @id rule).
444
- *
445
- * The implementation lives in `./author-schema` because it is pure, and
446
- * `AuthorPage` — which is exported from the client-stamped `articles` barrel —
447
- * needs it. Importing it from here instead would drag this entire server module
448
- * into the browser bundle. Re-exported so `@sonordev/site-kit/articles/server`
449
- * keeps its existing public API.
450
- */
451
- export { authorEntityId, generateArticleAuthorNode, generateAuthorPersonSchema, generateAuthorSchema, withArticleAuthorIdentity, type AuthorSchemaOptions, } from './author-schema';
452
- /** Sonor article document shape (alias of `Article` from `./types`) */
453
- export type { Article as ArticleRecord } from './types';
454
- export { articleCategorySlug, createPublicationRoutes, resolveArticleUrl, resolvePublicationUrl } from './routes';
455
- export type { ArticleRoutePost, PublicationRoutingOptions } from './routes';
456
- export { resolveArticleArtwork } from './artwork';
457
- export { wrapArticleTables, articleTableCss } from './article-tables';
458
- export { insertArticlePhotos, articlePhotoCss } from './article-photos';
459
- export type { ArticleEditorialPhoto } from './types';
460
- export { FEED_DEFAULT_ITEMS, NEWS_SITEMAP_MAX_URLS, NEWS_SITEMAP_WINDOW_MS, buildNewsSitemapXml, cdata, recentNewsPosts } from './news-sitemap';
461
- export type { NewsSitemapOptions, NewsSitemapPost } from './news-sitemap';
1
+ /** @deprecated Import from @sonordev/press-kit instead. Compatibility build uses the same canonical source. */
2
+ export * from '../press-kit/articles/server-core';
@@ -1,12 +1,21 @@
1
- export { FEED_DEFAULT_ITEMS, NEWS_SITEMAP_MAX_URLS, NEWS_SITEMAP_WINDOW_MS, SEO_LIMITS, buildNewsSitemapXml, cdata, generateAllArticleSchemas, generateArticleCategoryMetadata, generateArticleListSchema, generateArticleMetadata, generateArticleSchema, generateArticleSitemap, generateArticleStaticParams, generateAtomFeed, generateAuthorPageMetadata, generateAuthorStaticParams, generateBreadcrumbSchema, generateCategoryStaticParams, generateClusterArticleSchema, generateClusterBreadcrumbSchema, generateClusterItemListSchema, generateClusterLandingSchema, generateClusterPageMetadata, generateFaqSchema, generateHowToSchema, generateNewsSitemap, generatePublicationMetadata, generateRssFeed, getAllArticleSlugs, getAllArticles, getAllAuthorSlugs, getArticle, getArticleCategories, getAuthorBySlug, getAuthorPosts, getClusterNavigation, getPostsByCategory, getRelatedInsights, getTopicCluster, getTopicClusters, recentNewsPosts, requireArticle, sanitizeExcerpt, validateArticleSeo, validateMetaDescription, validateSeoTitle } from '../chunk-4Z3DI2EL.js';
2
- export { articlePhotoCss, insertArticlePhotos } from '../chunk-2UO4HPGE.js';
3
- export { articleTableCss, wrapArticleTables } from '../chunk-Y3INC4QJ.js';
4
- export { authorEntityId, generateArticleAuthorNode, generateAuthorPersonSchema, generateAuthorSchema, resolveArticleArtwork, withArticleAuthorIdentity } from '../chunk-QXMIKDOL.js';
5
- export { articleCategorySlug, createPublicationRoutes, resolveArticleUrl, resolvePublicationUrl } from '../chunk-WMVK77ND.js';
1
+ export { FEED_DEFAULT_ITEMS, NEWS_SITEMAP_MAX_URLS, NEWS_SITEMAP_WINDOW_MS, SEO_LIMITS, buildNewsSitemapXml, cdata, generateAllArticleSchemas, generateArticleCategoryMetadata, generateArticleListSchema, generateArticleMetadata, generateArticleSchema, generateArticleSitemap, generateArticleStaticParams, generateAtomFeed, generateAuthorPageMetadata, generateAuthorStaticParams, generateBreadcrumbSchema, generateCategoryStaticParams, generateClusterArticleSchema, generateClusterBreadcrumbSchema, generateClusterItemListSchema, generateClusterLandingSchema, generateClusterPageMetadata, generateFaqSchema, generateHowToSchema, generateNewsSitemap, generatePublicationMetadata, generateRssFeed, getAllArticleSlugs, getAllArticles, getAllAuthorSlugs, getArticle, getArticleCategories, getAuthorBySlug, getAuthorPosts, getClusterNavigation, getPostsByCategory, getRelatedInsights, getTopicCluster, getTopicClusters, recentNewsPosts, requireArticle, sanitizeExcerpt, validateArticleSeo, validateMetaDescription, validateSeoTitle } from '../chunk-KJVUOJMW.js';
2
+ export { articlePhotoCss, insertArticlePhotos } from '../chunk-M5SF7NCC.js';
3
+ export { articleTableCss, wrapArticleTables } from '../chunk-E4PTMORJ.js';
4
+ export { authorEntityId, generateArticleAuthorNode, generateAuthorPersonSchema, generateAuthorSchema, resolveArticleArtwork, withArticleAuthorIdentity } from '../chunk-SNRE3ZVZ.js';
5
+ import '../chunk-H72ZFO3F.js';
6
+ export { articleCategorySlug, createPublicationRoutes, resolveArticleUrl, resolvePublicationUrl } from '../chunk-4K735O3J.js';
7
+ import '../chunk-34ZYJTQR.js';
8
+ import '../chunk-WSOZ3FQN.js';
9
+ import '../chunk-UAYAJPEP.js';
6
10
  import '../chunk-VWWITFWM.js';
11
+ import '../chunk-4KZ6W3ZH.js';
7
12
  import '../chunk-MJP63SSS.js';
13
+ import '../chunk-6KU7STM3.js';
8
14
  import '../chunk-C7TLGL3R.js';
9
15
  import '../chunk-MH2DSGC6.js';
16
+ import '../chunk-YVKRYQRG.js';
10
17
  import '../chunk-FESKKJAS.js';
11
18
  import '../chunk-A4CC4ZG3.js';
19
+ import '../chunk-W7OPEMGJ.js';
20
+ import '../chunk-C2UROFGZ.js';
12
21
  import '../chunk-PKBMQBKP.js';