@sonordev/site-kit 8.0.0 → 8.1.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 (93) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/agent-manifest.json +1 -1
  3. package/dist/{AnalyticsProvider-LYFDQRRJ.js → AnalyticsProvider-UWTCE5UO.js} +4 -4
  4. package/dist/{ArticleViewTracker-HG7IIRJY.js → ArticleViewTracker-MYD6SGNH.js} +3 -3
  5. package/dist/{BlocksPopup-GFX3GZIK.js → BlocksPopup-OY5G3EFH.js} +4 -4
  6. package/dist/{ChatWidget-DVS7MLBN.js → ChatWidget-BTR5VERC.js} +5 -5
  7. package/dist/{FileField-DVN7NUBI.js → FileField-DEHVYXAO.js} +3 -3
  8. package/dist/{FormSpotlight-W4SXKKO6.js → FormSpotlight-VGC4CZL4.js} +1 -1
  9. package/dist/{FormStage-JTEE5MZD.js → FormStage-CJUSCSAL.js} +1 -1
  10. package/dist/{ManagedForm-ZAUHIHGP.js → ManagedForm-JCI2KPMO.js} +6 -6
  11. package/dist/{ManagedNewsletterForm-DQIB5Z4Y.js → ManagedNewsletterForm-DTE4KKXV.js} +4 -4
  12. package/dist/{SignalCore-W5PYYMGX.js → SignalCore-LGCBQDEH.js} +3 -3
  13. package/dist/{SiteChat-MY2GATWC.js → SiteChat-6SF7PVUT.js} +1 -1
  14. package/dist/{SiteDesignReporter-ICZWEGCY.js → SiteDesignReporter-VISQZ5NQ.js} +5 -5
  15. package/dist/{SitePopups-TGULLAER.js → SitePopups-T6YPHAVY.js} +4 -4
  16. package/dist/{SitemapSync-AN2OBJE6.js → SitemapSync-VKMVRPZL.js} +4 -4
  17. package/dist/_client/booking-widget.js +5 -5
  18. package/dist/affiliates/index.js +3 -3
  19. package/dist/analytics/index.js +4 -4
  20. package/dist/{article-styles-6CM5FUMV.js → article-styles-GGZOQG5X.js} +2 -0
  21. package/dist/articles/article-photos.d.ts +9 -0
  22. package/dist/articles/index.d.ts +1 -0
  23. package/dist/articles/index.js +1 -1
  24. package/dist/articles/server-core.d.ts +2 -0
  25. package/dist/articles/server-ui.d.ts +2 -0
  26. package/dist/articles/server-ui.js +7 -5
  27. package/dist/articles/server.d.ts +2 -0
  28. package/dist/articles/server.js +2 -1
  29. package/dist/articles/types.d.ts +16 -0
  30. package/dist/chat/index.js +6 -6
  31. package/dist/{chunk-OE3NXEOF.js → chunk-255NCCPB.js} +1 -1
  32. package/dist/{chunk-IJQ767JS.js → chunk-2JEUDTL6.js} +1 -1
  33. package/dist/chunk-2UO4HPGE.js +109 -0
  34. package/dist/{chunk-BQ2CXKTQ.js → chunk-47VB5INH.js} +1 -1
  35. package/dist/{chunk-XPTJRVL2.js → chunk-4Z3DI2EL.js} +3 -2
  36. package/dist/{chunk-OGK7OL3T.js → chunk-55GHBRCN.js} +1 -1
  37. package/dist/{chunk-LKH44GI3.js → chunk-5L467Z5Q.js} +3 -3
  38. package/dist/{chunk-LBIQ5LTC.js → chunk-6VHDCJIZ.js} +1 -1
  39. package/dist/{chunk-PD7K54EQ.js → chunk-A3EU6HB5.js} +1 -1
  40. package/dist/{chunk-TOSZGJEQ.js → chunk-ADI6IYFH.js} +1 -1
  41. package/dist/{chunk-M62U7TJF.js → chunk-AIDIEVPZ.js} +1 -1
  42. package/dist/{chunk-GNSXOTIK.js → chunk-CSTC6HZO.js} +2 -2
  43. package/dist/{chunk-ROAOI6GG.js → chunk-DOMBP3FW.js} +8 -8
  44. package/dist/{chunk-KRBBH64S.js → chunk-DSNCU2E3.js} +2 -2
  45. package/dist/{chunk-6ZXJ3SXR.js → chunk-DZV3KPVF.js} +1 -1
  46. package/dist/{chunk-ZLFGXKLG.js → chunk-F2VYN3QL.js} +1 -1
  47. package/dist/{chunk-ZHNQFNO3.js → chunk-G2HCCWZQ.js} +1 -1
  48. package/dist/{chunk-K22OLAPC.js → chunk-IAYGTQJD.js} +1 -1
  49. package/dist/{chunk-PIX7FAMX.js → chunk-JT52KYHQ.js} +1 -1
  50. package/dist/{chunk-S7SSYGUJ.js → chunk-LLW5HKEE.js} +2 -2
  51. package/dist/{chunk-5S2XDG5O.js → chunk-NWVB75ER.js} +1 -1
  52. package/dist/{chunk-6QFINXLH.js → chunk-O4DETQJI.js} +1 -1
  53. package/dist/{chunk-ICAVVF6D.js → chunk-RSBMQFZW.js} +2 -2
  54. package/dist/{chunk-UUWUAMUC.js → chunk-S6IGQYHW.js} +1 -1
  55. package/dist/{chunk-J65N34YM.js → chunk-TAO6BVA2.js} +1 -1
  56. package/dist/{chunk-7YEEOIWI.js → chunk-V56RZH7J.js} +1 -1
  57. package/dist/{chunk-56VDS2RP.js → chunk-WPOFTCKL.js} +2 -2
  58. package/dist/{chunk-SBPAXWLF.js → chunk-XUCU3LX4.js} +1 -1
  59. package/dist/client/index.js +3 -3
  60. package/dist/contracts/entries.d.ts +1 -1
  61. package/dist/contracts/knowledge.d.ts +84 -0
  62. package/dist/fleet/index.js +4 -4
  63. package/dist/forms/index.js +7 -7
  64. package/dist/forms/server.js +2 -2
  65. package/dist/images/index.js +4 -4
  66. package/dist/index.js +1 -1
  67. package/dist/layout/client.js +7 -7
  68. package/dist/layout/index.js +8 -8
  69. package/dist/llms/index.js +4 -4
  70. package/dist/maps/index.js +3 -3
  71. package/dist/mcp/sonor.js +11 -9
  72. package/dist/revalidate/index.js +2 -2
  73. package/dist/runtime/index.js +3 -3
  74. package/dist/seo/client.js +4 -4
  75. package/dist/seo/index.js +4 -4
  76. package/dist/seo/llms.js +4 -4
  77. package/dist/seo/register-sitemap-cli.js +1 -1
  78. package/dist/seo/sitemap.js +2 -2
  79. package/dist/server/index.js +2 -2
  80. package/dist/shared/import-specifiers.d.ts +57 -9
  81. package/dist/shared/source-graph.d.ts +4 -1
  82. package/dist/shared/version.d.ts +1 -1
  83. package/dist/signal/index.js +2 -2
  84. package/dist/sitemap/index.js +2 -2
  85. package/dist/sync/index.js +5 -5
  86. package/dist/website/images.js +4 -4
  87. package/dist/website/index.js +5 -5
  88. package/dist/website/popups.js +4 -4
  89. package/dist/{writeLLMsTxt-UZGN6IBU.js → writeLLMsTxt-OS2WBSLM.js} +1 -1
  90. package/docs/MIGRATING-TO-8.md +1 -1
  91. package/package.json +5 -3
  92. package/src/articles/README.md +33 -0
  93. /package/dist/{chunk-TZ5RTANX.js → chunk-GC2QWXJ3.js} +0 -0
package/dist/mcp/sonor.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { fetchReviews, fetchReviewStats } from '../chunk-NFRJTOTB.js';
2
2
  import { toolErrorResult } from '../chunk-FYAB6CXS.js';
3
- import { fetchBookingTypes, fetchAvailability } from '../chunk-IJQ767JS.js';
3
+ import { fetchBookingTypes, fetchAvailability } from '../chunk-2JEUDTL6.js';
4
4
  import { getLLMsData, getServices, getFAQItems, getPageSummaries } from '../chunk-JIH32RH2.js';
5
- import { getFormConfig } from '../chunk-6QFINXLH.js';
6
- import '../chunk-PIX7FAMX.js';
5
+ import { getFormConfig } from '../chunk-O4DETQJI.js';
6
+ import '../chunk-JT52KYHQ.js';
7
7
  import '../chunk-C2FZBUSS.js';
8
8
  import '../chunk-YC7ELZS3.js';
9
9
  import '../chunk-LNSF6BJC.js';
@@ -12,7 +12,8 @@ import '../chunk-TYAVHRWH.js';
12
12
  import '../chunk-5SQK3D53.js';
13
13
  import '../chunk-HW7B43E5.js';
14
14
  import '../chunk-NJCTQH2P.js';
15
- import { getAllArticles, getArticle } from '../chunk-XPTJRVL2.js';
15
+ import { getAllArticles, getArticle } from '../chunk-4Z3DI2EL.js';
16
+ import '../chunk-2UO4HPGE.js';
16
17
  import '../chunk-Y3INC4QJ.js';
17
18
  import '../chunk-QXMIKDOL.js';
18
19
  import '../chunk-WMVK77ND.js';
@@ -25,9 +26,9 @@ import '../chunk-MH2DSGC6.js';
25
26
  import { resolveSiteHost } from '../chunk-FESKKJAS.js';
26
27
  import '../chunk-A4CC4ZG3.js';
27
28
  import '../chunk-3G7YABRA.js';
28
- import '../chunk-56VDS2RP.js';
29
- import '../chunk-ZLFGXKLG.js';
30
- import { SITE_KIT_VERSION } from '../chunk-5S2XDG5O.js';
29
+ import '../chunk-WPOFTCKL.js';
30
+ import '../chunk-F2VYN3QL.js';
31
+ import { SITE_KIT_VERSION } from '../chunk-NWVB75ER.js';
31
32
  import '../chunk-PKBMQBKP.js';
32
33
  import 'server-only';
33
34
  import { after } from 'next/server.js';
@@ -225,7 +226,7 @@ function getArticleTool(ctx, basePath) {
225
226
  return {
226
227
  name: "get_article",
227
228
  title: "Read an article",
228
- description: "One article in full, by the slug list_articles returned. Cite it by its URL.",
229
+ description: "One article in full, with approved supporting photo descriptions and section placements, by the slug list_articles returned. Cite it by its URL. Photo captions describe context; they do not verify claims beyond the article.",
229
230
  inputSchema: {
230
231
  type: "object",
231
232
  properties: { slug: { type: "string", description: "The article slug from list_articles." } },
@@ -247,7 +248,8 @@ function getArticleTool(ctx, basePath) {
247
248
  published_at: post.published_at,
248
249
  content: content.slice(0, ARTICLE_CONTENT_MAX),
249
250
  truncated: content.length > ARTICLE_CONTENT_MAX,
250
- faq: post.faq_items
251
+ faq: post.faq_items,
252
+ editorial_photos: post.editorial_photos?.slice(0, 8).map(({ url, alt, caption, width, height, placement }) => ({ url, alt, caption, width, height, placement }))
251
253
  };
252
254
  }
253
255
  };
@@ -1,7 +1,7 @@
1
- import { createSeoRevalidationHandler } from '../chunk-7YEEOIWI.js';
1
+ import { createSeoRevalidationHandler } from '../chunk-V56RZH7J.js';
2
2
  import '../chunk-XTRZGXB2.js';
3
3
  export { SITE_CACHE_TAGS, SITE_REVALIDATE_PATH, isSiteRevalidatePong } from '../chunk-6KU7STM3.js';
4
- import '../chunk-5S2XDG5O.js';
4
+ import '../chunk-NWVB75ER.js';
5
5
  import '../chunk-PKBMQBKP.js';
6
6
 
7
7
  // src/revalidate/index.ts
@@ -1,7 +1,7 @@
1
1
  export { readAnalyticsIdentity } from '../chunk-5ROTTMBL.js';
2
2
  import '../chunk-5TM3WPCI.js';
3
3
  export { DEFAULT_SONOR_API_URL, getClientApiConfig, readPublishedApiConfig } from '../chunk-3G7YABRA.js';
4
- export { sonorFetch } from '../chunk-56VDS2RP.js';
5
- import '../chunk-ZLFGXKLG.js';
6
- import '../chunk-5S2XDG5O.js';
4
+ export { sonorFetch } from '../chunk-WPOFTCKL.js';
5
+ import '../chunk-F2VYN3QL.js';
6
+ import '../chunk-NWVB75ER.js';
7
7
  import '../chunk-PKBMQBKP.js';
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- export { SitemapSync } from '../chunk-K22OLAPC.js';
2
+ export { SitemapSync } from '../chunk-IAYGTQJD.js';
3
3
  import '../chunk-YVKRYQRG.js';
4
4
  import '../chunk-CAH4Y4PY.js';
5
5
  import '../chunk-EKBEOXTH.js';
6
6
  import '../chunk-3G7YABRA.js';
7
- import '../chunk-56VDS2RP.js';
8
- import '../chunk-ZLFGXKLG.js';
9
- import '../chunk-5S2XDG5O.js';
7
+ import '../chunk-WPOFTCKL.js';
8
+ import '../chunk-F2VYN3QL.js';
9
+ import '../chunk-NWVB75ER.js';
10
10
  import '../chunk-PKBMQBKP.js';
package/dist/seo/index.js CHANGED
@@ -2,7 +2,7 @@ export { ManagedNoScripts, ManagedScripts } from '../chunk-MVLMXC44.js';
2
2
  import { pickManagedLlmSchemaForJsonLd } from '../chunk-NZ4RXN3G.js';
3
3
  import { safeJsonLd } from '../chunk-4KZ6W3ZH.js';
4
4
  import { withoutSchemaPlaceholders } from '../chunk-VWWITFWM.js';
5
- export { SitemapSync } from '../chunk-K22OLAPC.js';
5
+ export { SitemapSync } from '../chunk-IAYGTQJD.js';
6
6
  import { getManagedMetadata, mergeAlternates } from '../chunk-URJN75ZG.js';
7
7
  export { generateSitemap, getABVariant, getManagedMetadata, getManagedMetadataWithAB, getRedirect, getRobotsDirective, isIndexable } from '../chunk-URJN75ZG.js';
8
8
  import { getSchemaMarkups, getSEOPageData, getEntityEnhancedSchema, getFAQData, getInternalLinks, pruneSchemaTypes } from '../chunk-Y35BWW2C.js';
@@ -19,9 +19,9 @@ import '../chunk-A4CC4ZG3.js';
19
19
  import '../chunk-CAH4Y4PY.js';
20
20
  import '../chunk-EKBEOXTH.js';
21
21
  import '../chunk-3G7YABRA.js';
22
- import '../chunk-56VDS2RP.js';
23
- import '../chunk-ZLFGXKLG.js';
24
- import '../chunk-5S2XDG5O.js';
22
+ import '../chunk-WPOFTCKL.js';
23
+ import '../chunk-F2VYN3QL.js';
24
+ import '../chunk-NWVB75ER.js';
25
25
  import '../chunk-PKBMQBKP.js';
26
26
  import { Suspense } from 'react';
27
27
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
package/dist/seo/llms.js CHANGED
@@ -1,10 +1,10 @@
1
- export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-M62U7TJF.js';
1
+ export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-AIDIEVPZ.js';
2
2
  export { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-PO2TRJPY.js';
3
3
  export { AI_RETRIEVAL_CRAWLERS, AI_TRAINING_CRAWLERS, buildAiCrawlerRules, createRobotsTxtHandler } from '../chunk-QLTDFUJ7.js';
4
- export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-7YEEOIWI.js';
4
+ export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-V56RZH7J.js';
5
5
  export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
6
6
  import '../chunk-XTRZGXB2.js';
7
- export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-TZ5RTANX.js';
7
+ export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-GC2QWXJ3.js';
8
8
  export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-JIH32RH2.js';
9
9
  import '../chunk-L5UOHS6E.js';
10
10
  import '../chunk-WMVK77ND.js';
@@ -16,5 +16,5 @@ import '../chunk-YVKRYQRG.js';
16
16
  import '../chunk-FESKKJAS.js';
17
17
  import '../chunk-A4CC4ZG3.js';
18
18
  import '../chunk-3G7YABRA.js';
19
- import '../chunk-5S2XDG5O.js';
19
+ import '../chunk-NWVB75ER.js';
20
20
  import '../chunk-PKBMQBKP.js';
@@ -458,7 +458,7 @@ async function registerLocalSitemap(options) {
458
458
  }
459
459
  if (options.writeLlms && result.success) {
460
460
  try {
461
- const { writeLLMsTxtToPublic } = await import('../writeLLMsTxt-UZGN6IBU.js');
461
+ const { writeLLMsTxtToPublic } = await import('../writeLLMsTxt-OS2WBSLM.js');
462
462
  const written = await writeLLMsTxtToPublic({
463
463
  // Resolved here too: the sync's own `site` is scoped to the branch that
464
464
  // posts, and this runs on the skip path as well.
@@ -1,5 +1,5 @@
1
- export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-OE3NXEOF.js';
2
- import '../chunk-TZ5RTANX.js';
1
+ export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-255NCCPB.js';
2
+ import '../chunk-GC2QWXJ3.js';
3
3
  import '../chunk-JIH32RH2.js';
4
4
  import '../chunk-Z22QVHT4.js';
5
5
  import '../chunk-L5UOHS6E.js';
@@ -1,7 +1,7 @@
1
- export { resolveClientCredential } from '../chunk-BQ2CXKTQ.js';
1
+ export { resolveClientCredential } from '../chunk-47VB5INH.js';
2
2
  import '../chunk-UAYAJPEP.js';
3
3
  export { SITE_CACHE_TAGS } from '../chunk-6KU7STM3.js';
4
4
  export { isNextControlFlow, requireServerApiConfig, resolveApiOrigin, resolveServerApiConfig, serverApiFetch } from '../chunk-C7TLGL3R.js';
5
5
  import '../chunk-MH2DSGC6.js';
6
- import '../chunk-5S2XDG5O.js';
6
+ import '../chunk-NWVB75ER.js';
7
7
  import '../chunk-PKBMQBKP.js';
@@ -1,20 +1,28 @@
1
1
  /**
2
2
  * The module specifiers a piece of code imports, and what an isomorphic entry
3
- * may not import: the one definition behind both the source-level boundary
4
- * checks (./boundary-graph.ts) and the built-chunk check
5
- * (scripts/kit-post-build.ts), which had each grown their own copy.
3
+ * may not import: the one definition behind the source-level boundary checks
4
+ * (./boundary-graph.ts), the built-chunk check (scripts/kit-post-build.ts),
5
+ * the doctor's import graph (./source-graph.ts) and sonor-setup's codemod,
6
+ * which had each grown their own copy.
6
7
  *
7
- * Test and build infrastructure: nothing ships from here (tsconfig.build.json
8
- * leaves it out of the declarations, and no entry reaches it).
8
+ * No site-kit entry reaches it. sonor-setup bundles it.
9
9
  *
10
- * Callers strip comments (and type-only imports, where erased imports don't
11
- * count) first; a comment that names an import is not an import.
10
+ * `importSpecifiers` reads code. A caller either strips comments first (and
11
+ * type-only imports, where erased imports don't count), or hands it
12
+ * `codeOnly(source, { syntax: codeSyntaxOf(file) })`, which also blanks the
13
+ * text of strings and of JSX elements, so an import written out inside a code
14
+ * sample isn't read as one.
12
15
  */
16
+ export interface ImportSpecifierOptions {
17
+ /** Read `require()` calls too. */
18
+ require?: boolean;
19
+ }
13
20
  /**
14
21
  * Every specifier `code` imports, in the order they appear, without a query or
15
- * hash a bundler would strip (`./server?raw` is `./server`).
22
+ * hash a bundler would strip (`./server?raw` is `./server`). With
23
+ * `{ require: true }`, the modules it requires as well.
16
24
  */
17
- export declare function importSpecifiers(code: string): string[];
25
+ export declare function importSpecifiers(code: string, options?: ImportSpecifierOptions): string[];
18
26
  /**
19
27
  * A specifier an isomorphic entry's graph must not import: React, Next or
20
28
  * `server-only` (hooks, a client reference, or a hard error on the other
@@ -24,3 +32,43 @@ export declare function importSpecifiers(code: string): string[];
24
32
  * counts.
25
33
  */
26
34
  export declare function isNotIsomorphicSpecifier(spec: string): boolean;
35
+ /**
36
+ * What `codeOnly` reads a file as. `js` is TypeScript or JavaScript with no
37
+ * JSX: in a `.ts` file `<T>(x: T) => x` is a generic, not an element. `jsx`
38
+ * also blanks the text of each JSX element, as it does a string's (`.tsx`,
39
+ * `.jsx`, `.js`). `mdx` reads only an MDX file's import and export blocks.
40
+ */
41
+ export type CodeSyntax = 'js' | 'jsx' | 'mdx';
42
+ export interface CodeOnlyOptions {
43
+ /** What the source is written in (`js` when not given). Pick it with `codeSyntaxOf`. */
44
+ syntax?: CodeSyntax;
45
+ }
46
+ /** The syntax `codeOnly` reads a file in, from its name. The one map from an extension to it. */
47
+ export declare function codeSyntaxOf(filePath: string): CodeSyntax;
48
+ /**
49
+ * `source` as a specifier reader should see it: comments blanked, and the text
50
+ * of every string, template and regular expression literal that can't be a
51
+ * module specifier blanked too. A blanked character becomes a space and line
52
+ * breaks stay, so a position in the result is the same position in `source`
53
+ * (a caller can match the result and edit `source` there).
54
+ *
55
+ * A specifier is one token, with no space, quote or backslash in it (and, in a
56
+ * template, no `${}`), so `'@sonordev/x'` in `import a from '@sonordev/x'`
57
+ * stays as written. A string that holds code as text, such as a code sample on
58
+ * a docs page (`` `import { A } from '@sonordev/x'` ``) or a JSX prop, reads
59
+ * as blank, and the import written out inside it isn't one.
60
+ *
61
+ * With `{ syntax: 'jsx' }` the text of a JSX element is blanked too, as a
62
+ * string's is: `<code>import A from '@sonordev/x'</code>` and a sentence that
63
+ * names a path import nothing, while code in the element's braces is read. A
64
+ * `<` is taken for an element only where a comparison can't stand (after
65
+ * `(`, `=`, `return`, `=>`...), and one that turns out not to be (a generic
66
+ * such as `<T,>(x: T) => x`, or a tag that never closes) is read again as
67
+ * code. With `{ syntax: 'mdx' }` only the import and export blocks are read.
68
+ *
69
+ * A lexer, not a parser. It tells a regular expression from a division by the
70
+ * code before the slash, ends a string at the end of its line, and reads a
71
+ * backtick that is never closed as a stray character. A file it can't fully
72
+ * follow (a syntax error) costs it a line, not the rest of the file.
73
+ */
74
+ export declare function codeOnly(source: string, options?: CodeOnlyOptions): string;
@@ -51,7 +51,10 @@ export interface SourceGraphOptions {
51
51
  /** Stop after this many files in total. Default 300. */
52
52
  maxFiles?: number;
53
53
  }
54
- /** Every module specifier a file imports, exports from, or requires. */
54
+ /**
55
+ * Every module specifier a file imports, exports from, or requires, once each.
56
+ * Read with ./import-specifiers, the one specifier reader in this repo.
57
+ */
55
58
  export declare function importSpecifiers(source: string): string[];
56
59
  /**
57
60
  * Read `entries` (absolute paths) and the local modules they import, entries
@@ -7,4 +7,4 @@
7
7
  * it matches package.json at publish time, and version.test.ts asserts it in
8
8
  * dev, so it can't silently drift.
9
9
  */
10
- export declare const SITE_KIT_VERSION = "8.0.0";
10
+ export declare const SITE_KIT_VERSION = "8.1.0";
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { useSignalExperiment, useSignalEvent } from '../chunk-6ZXJ3SXR.js';
3
- export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from '../chunk-6ZXJ3SXR.js';
2
+ import { useSignalExperiment, useSignalEvent } from '../chunk-DZV3KPVF.js';
3
+ export { SignalBridge, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from '../chunk-DZV3KPVF.js';
4
4
  import '../chunk-PKBMQBKP.js';
5
5
  import React, { useEffect } from 'react';
6
6
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-OE3NXEOF.js';
2
- import '../chunk-TZ5RTANX.js';
1
+ export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-255NCCPB.js';
2
+ import '../chunk-GC2QWXJ3.js';
3
3
  import '../chunk-JIH32RH2.js';
4
4
  import '../chunk-Z22QVHT4.js';
5
5
  import '../chunk-L5UOHS6E.js';
@@ -1,7 +1,7 @@
1
- export { BookingWidget } from '../chunk-OGK7OL3T.js';
2
- export { createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, prepareMeeting, releaseSlotHold } from '../chunk-IJQ767JS.js';
1
+ export { BookingWidget } from '../chunk-55GHBRCN.js';
2
+ export { createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, prepareMeeting, releaseSlotHold } from '../chunk-2JEUDTL6.js';
3
3
  import '../chunk-3G7YABRA.js';
4
- import '../chunk-56VDS2RP.js';
5
- import '../chunk-ZLFGXKLG.js';
6
- import '../chunk-5S2XDG5O.js';
4
+ import '../chunk-WPOFTCKL.js';
5
+ import '../chunk-F2VYN3QL.js';
6
+ import '../chunk-NWVB75ER.js';
7
7
  import '../chunk-PKBMQBKP.js';
@@ -1,6 +1,6 @@
1
- export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-TOSZGJEQ.js';
1
+ export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-ADI6IYFH.js';
2
2
  export { ManagedFavicon, getManagedFaviconUrl } from '../chunk-GW7GSBO7.js';
3
- import '../chunk-56VDS2RP.js';
4
- import '../chunk-ZLFGXKLG.js';
5
- import '../chunk-5S2XDG5O.js';
3
+ import '../chunk-WPOFTCKL.js';
4
+ import '../chunk-F2VYN3QL.js';
5
+ import '../chunk-NWVB75ER.js';
6
6
  import '../chunk-PKBMQBKP.js';
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- export { SiteDesignReporter } from '../chunk-ZHNQFNO3.js';
3
- export { SITE_DESIGN_PATH, cleanFontStack, colorToHex, getSiteDesignTokens, measureSiteDesign, readDeclaredDesign, sendSiteDesign } from '../chunk-KRBBH64S.js';
2
+ export { SiteDesignReporter } from '../chunk-G2HCCWZQ.js';
3
+ export { SITE_DESIGN_PATH, cleanFontStack, colorToHex, getSiteDesignTokens, measureSiteDesign, readDeclaredDesign, sendSiteDesign } from '../chunk-DSNCU2E3.js';
4
4
  export { DEFAULT_POPUP_TOKENS, PopupBlocks } from '../chunk-BF7TZYC3.js';
5
5
  import '../chunk-IHG36STL.js';
6
6
  import '../chunk-YC7ELZS3.js';
@@ -8,7 +8,7 @@ import '../chunk-S22FSH7C.js';
8
8
  import '../chunk-CAH4Y4PY.js';
9
9
  import '../chunk-EKBEOXTH.js';
10
10
  import '../chunk-3G7YABRA.js';
11
- import '../chunk-56VDS2RP.js';
12
- import '../chunk-ZLFGXKLG.js';
13
- import '../chunk-5S2XDG5O.js';
11
+ import '../chunk-WPOFTCKL.js';
12
+ import '../chunk-F2VYN3QL.js';
13
+ import '../chunk-NWVB75ER.js';
14
14
  import '../chunk-PKBMQBKP.js';
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- export { SitePopups } from '../chunk-S7SSYGUJ.js';
2
+ export { SitePopups } from '../chunk-LLW5HKEE.js';
3
3
  import '../chunk-27FISYK4.js';
4
4
  export { DEFAULT_POPUP_TOKENS, PopupBlocks } from '../chunk-BF7TZYC3.js';
5
5
  import '../chunk-IHG36STL.js';
@@ -11,7 +11,7 @@ import '../chunk-GJWI74ZZ.js';
11
11
  import '../chunk-CAH4Y4PY.js';
12
12
  import '../chunk-EKBEOXTH.js';
13
13
  import '../chunk-3G7YABRA.js';
14
- import '../chunk-56VDS2RP.js';
15
- import '../chunk-ZLFGXKLG.js';
16
- import '../chunk-5S2XDG5O.js';
14
+ import '../chunk-WPOFTCKL.js';
15
+ import '../chunk-F2VYN3QL.js';
16
+ import '../chunk-NWVB75ER.js';
17
17
  import '../chunk-PKBMQBKP.js';
@@ -1,4 +1,4 @@
1
- export { writeLLMsTxtToPublic } from './chunk-TZ5RTANX.js';
1
+ export { writeLLMsTxtToPublic } from './chunk-GC2QWXJ3.js';
2
2
  import './chunk-JIH32RH2.js';
3
3
  import './chunk-L5UOHS6E.js';
4
4
  import './chunk-WMVK77ND.js';
@@ -52,7 +52,7 @@ It prints what it would change and writes nothing. When the diff looks right, ap
52
52
  npx sonor-setup codemod --only site-kit-8 --write
53
53
  ```
54
54
 
55
- The codemod needs sonor-setup 7.3.0 or later, and `npx` fetches the latest. It reads source files anywhere in the project (`pages/`, `hooks/` and `scripts/` count, not just `app/` and `src/`), but not `node_modules`, build output or `public/`. It rewrites your imports (the table below). When your code imports commerce, it also adds `@sonordev/commerce-kit` to package.json and raises site-kit's range to `^8.0.0`, and if `pnpm-workspace.yaml` lists site-kit under `minimumReleaseAgeExclude` it adds commerce-kit there too. Anything it can't rewrite safely it flags, with the fix, so you can finish those by hand: a `require()` of an old path (commerce-kit is ESM only, so that call needs an `import`), an import of a [removed](#what-was-removed) entry, or a `sonorMcpServer` whose `offerings` has no reader (see [The MCP change](#the-mcp-change)). Run it in the app's folder: in a monorepo, once per app that imports commerce, because it stops at a workspace root.
55
+ The codemod needs sonor-setup 7.3.1 or later, and `npx` fetches the latest. It reads source files anywhere in the project (`pages/`, `hooks/` and `scripts/` count, not just `app/` and `src/`), but not `node_modules`, build output or `public/`. It rewrites your imports (the table below), and goes by imports only: a path that appears in a comment or inside a string, such as a code sample or a redirect table, is left as it is. When your code imports commerce, it also adds `@sonordev/commerce-kit` to package.json and raises site-kit's range to `^8.0.0`, and if `pnpm-workspace.yaml` lists site-kit under `minimumReleaseAgeExclude` it adds commerce-kit there too. Anything it can't rewrite safely it flags, with the fix, so you can finish those by hand: a `require()` of an old path (commerce-kit is ESM only, so that call needs an `import`), an import of a [removed](#what-was-removed) entry, or a `sonorMcpServer` whose `offerings` has no reader (see [The MCP change](#the-mcp-change)). Run it in the app's folder: in a monorepo, once per app that imports commerce, because it stops at a workspace root.
56
56
 
57
57
  `--check` is the gate: it exits 1 while a file needs rewriting and while a manual follow-up remains, so exit 0 means there's nothing left for you to do.
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonordev/site-kit",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.5.3",
6
6
  "description": "The Sonor modules a Next.js site needs, from one package and one API key: SEO, analytics, forms, articles, chat, booking, AI visibility and agent tools. Selling online? Add @sonordev/commerce-kit.",
@@ -372,7 +372,7 @@
372
372
  "typecheck": "tsc --noEmit",
373
373
  "typecheck:setup": "tsc --noEmit -p packages/sonor-setup/tsconfig.json",
374
374
  "version": "node scripts/sync-version.cjs && node scripts/gen-agent-manifest.cjs && git add src/shared/version.ts agent-manifest.json",
375
- "prepublishOnly": "vitest run && tsc --noEmit -p packages/commerce-kit/tsconfig.json && rm -rf dist && NODE_OPTIONS=--max-old-space-size=8192 tsup && pnpm build:types && node scripts/gen-agent-manifest.cjs && node scripts/verify-dts.cjs && node scripts/verify-no-local-paths.cjs dist agent-manifest.json && node scripts/prepublish-integration.cjs && node scripts/audit-as-consumer.cjs && node scripts/verify-docs.cjs",
375
+ "prepublishOnly": "vitest run && tsc --noEmit -p packages/commerce-kit/tsconfig.json && rm -rf dist && NODE_OPTIONS=--max-old-space-size=8192 tsup && pnpm build:types && node scripts/gen-agent-manifest.cjs && node scripts/verify-dts.cjs && node scripts/verify-no-local-paths.cjs dist agent-manifest.json && node scripts/prepublish-integration.cjs && node scripts/audit-as-consumer.cjs && node scripts/verify-server-entries.cjs . && node scripts/verify-docs.cjs",
376
376
  "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --noEmit false && node scripts/alias-dts.cjs",
377
377
  "verify:docs": "node scripts/verify-docs.cjs",
378
378
  "build:commerce": "node scripts/check-kit-build-order.cjs && NODE_OPTIONS=--max-old-space-size=8192 tsup --config packages/commerce-kit/tsup.config.ts && tsc -p packages/commerce-kit/tsconfig.build.json && node packages/commerce-kit/scripts/verify-dist.cjs && node packages/commerce-kit/scripts/verify-against-site-kit.cjs",
@@ -411,6 +411,7 @@
411
411
  "dependencies": {
412
412
  "engine.io-client": "^6.6.6",
413
413
  "marked": "^18.0.9",
414
+ "server-only": "^0.0.1",
414
415
  "socket.io-client": "^4.8.3",
415
416
  "socket.io-parser": "^4.2.7"
416
417
  },
@@ -442,7 +443,8 @@
442
443
  "tsup": "^8.5.1",
443
444
  "typescript": "^7.0.2",
444
445
  "vitest": "^4.1.10",
445
- "web-vitals": "^6.1.0"
446
+ "web-vitals": "^6.1.0",
447
+ "yaml": "^2.9.1"
446
448
  },
447
449
  "keywords": [
448
450
  "sonor",
@@ -326,3 +326,36 @@ Components use `.sk-article-*` and `.sk-article-list-*` classes. Import default
326
326
  ```
327
327
 
328
328
  Or use `unstyled` prop + `children` render prop for complete control.
329
+
330
+ ## Supporting photos (8.1)
331
+
332
+ Sonor's article photo plan can attach up to eight supporting images to exact
333
+ places in the article. The public response includes `editorial_photos`, an
334
+ optional array of approved snapshots with `url`, `alt`, optional `caption`,
335
+ `width`, `height`, and `placement`. Placement is `{ kind: 'after_intro' }` or
336
+ `{ kind: 'after_heading', heading: 'Exact section heading' }`. Photo briefs,
337
+ file ownership and private source notes stay in the authenticated API.
338
+
339
+ The default `Article` renderer and the RSS/Atom generators apply these
340
+ placements automatically. Custom publications use the same pure helper after
341
+ converting Markdown to HTML and before rendering their content:
342
+
343
+ ```tsx
344
+ import { insertArticlePhotos, articlePhotoCss } from '@sonordev/site-kit/articles/server-ui'
345
+
346
+ const html = insertArticlePhotos(articleHtml, post.editorial_photos)
347
+ // Render articlePhotoCss once and use html with your existing trusted-content policy.
348
+ ```
349
+
350
+ The helper inserts a semantic figure after the introduction's first prose
351
+ paragraph or a section's first prose paragraph. It preserves the surrounding
352
+ HTML and includes intrinsic dimensions, descriptions, captions and lazy loading.
353
+ It skips missing or duplicate headings, code examples, tables, existing figures,
354
+ lists, and callouts. An image already in the body isn't inserted again. It
355
+ doesn't sanitize the original article HTML; retain your existing content policy.
356
+ Articles without this field render as before. Custom styles can target
357
+ `.sk-article-photo` and `.sk-article-photo figcaption` or use `articlePhotoCss`.
358
+
359
+ Agents managing photos use the authenticated Sonor article media tools. The
360
+ site's public `get_article` MCP tool only reads the approved photo descriptions
361
+ and placements; it can't attach photos or read planning briefs.
File without changes