@sonordev/site-kit 7.1.1 → 7.2.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/AGENTS.md +3 -3
- package/CHANGELOG.md +68 -3426
- package/README.md +9 -8
- package/agent-manifest.json +12 -4
- package/dist/{AnalyticsProvider-3MI5RCTL.js → AnalyticsProvider-SLFFBRPE.js} +4 -4
- package/dist/{ArticleViewTracker-CMBSJR3N.js → ArticleViewTracker-TM5AMGN2.js} +3 -3
- package/dist/{BlocksPopup-X3OAAK2L.js → BlocksPopup-YJNJIVPO.js} +5 -5
- package/dist/ChatWidget-XKOSH66S.js +17 -0
- package/dist/{FileField-QRSEGO6D.js → FileField-CI4UL5SH.js} +3 -3
- package/dist/{FormSpotlight-XKV7VTN4.js → FormSpotlight-F2AAEGBN.js} +20 -6
- package/dist/{FormStage-C3YGYAUZ.js → FormStage-BI5R5CNC.js} +27 -7
- package/dist/ManagedForm-G6COGHXL.js +16 -0
- package/dist/{ManagedNewsletterForm-LPIKGJF4.js → ManagedNewsletterForm-BO3WCGXX.js} +7 -5
- package/dist/{SignalCore-ICXXZBYI.js → SignalCore-ZA6WHKBR.js} +3 -3
- package/dist/SiteChat-YJADDTKG.js +5 -0
- package/dist/{SiteDesignReporter-A7MS2CIP.js → SiteDesignReporter-5YAW36AQ.js} +5 -5
- package/dist/SitePopups-ST5PMKZE.js +10 -0
- package/dist/SitemapSync-RJTEBINX.js +8 -0
- package/dist/SitemapSync.d.ts +1 -1
- package/dist/_client/booking-widget.js +5 -5
- package/dist/_client/testimonial-section.d.ts +1 -1
- package/dist/affiliates/api.d.ts +1 -1
- package/dist/affiliates/index.js +3 -3
- package/dist/analytics/AnalyticsProvider.d.ts +1 -1
- package/dist/analytics/index.js +4 -4
- package/dist/analytics/send-gate.d.ts +13 -26
- package/dist/articles/Article.d.ts +1 -1
- package/dist/articles/ArticleList.d.ts +1 -1
- package/dist/articles/ClusterLandingPage.d.ts +2 -2
- package/dist/articles/PublicationLayout.d.ts +1 -1
- package/dist/articles/PublicationSidebar.d.ts +1 -1
- package/dist/articles/RelatedPosts.d.ts +1 -1
- package/dist/articles/author-schema.d.ts +1 -1
- package/dist/articles/excerpt.d.ts +3 -4
- package/dist/articles/index.d.ts +2 -2
- package/dist/articles/index.js +2 -2
- package/dist/articles/news-sitemap.d.ts +1 -1
- package/dist/articles/processArticleHtml.d.ts +1 -1
- package/dist/articles/server-core.d.ts +4 -4
- package/dist/articles/server-ui.js +3 -2
- package/dist/articles/server.d.ts +4 -4
- package/dist/articles/server.js +2 -1
- package/dist/articles/types.d.ts +1 -1
- package/dist/{engage → chat}/ChatWidget.d.ts +8 -7
- package/dist/{engage → chat}/EchoUiActions.d.ts +4 -4
- package/dist/chat/SiteChat.d.ts +25 -0
- package/dist/{engage → chat}/brand-color.d.ts +2 -2
- package/dist/{engage → chat}/chat-messages.d.ts +1 -1
- package/dist/{engage → chat}/echo-config.d.ts +1 -1
- package/dist/chat/index.d.ts +10 -6
- package/dist/chat/index.js +14 -8
- package/dist/{engage → chat}/launcher-placement.d.ts +1 -7
- package/dist/{engage → chat}/socket-loader.d.ts +2 -2
- package/dist/chat/types.d.ts +136 -0
- package/dist/chunk-27FISYK4.js +4 -0
- package/dist/{chunk-QPEEKFCA.js → chunk-4NTBQNHA.js} +249 -80
- package/dist/{chunk-RK7GF7PQ.js → chunk-5V2V5C3Y.js} +2 -4
- package/dist/{chunk-ICFRH2ED.js → chunk-5YCEMV2L.js} +1 -1
- package/dist/{chunk-V4HUSHZO.js → chunk-64DKGVEI.js} +41 -7
- package/dist/{chunk-GLHQ3LRO.js → chunk-6U3VLV2C.js} +1 -1
- package/dist/{chunk-ZETJTCMV.js → chunk-BC4Y3S3D.js} +1 -1
- package/dist/{chunk-JSZN6LDZ.js → chunk-BF7TZYC3.js} +38 -31
- package/dist/{chunk-EFPS56JA.js → chunk-BKY2ZNM7.js} +1 -1
- package/dist/{chunk-AQSNPZY4.js → chunk-C2FZBUSS.js} +80 -1
- package/dist/{chunk-H42PZKVC.js → chunk-CF5QNFYU.js} +2 -2
- package/dist/{chunk-JC7KXNNM.js → chunk-D5DCBD4Y.js} +2 -2
- package/dist/{chunk-PXZ7LAOY.js → chunk-D6ZC7XKZ.js} +2 -2
- package/dist/chunk-EJVQJCG5.js +370 -0
- package/dist/{chunk-6OL23QYD.js → chunk-F24FNCTK.js} +1 -1
- package/dist/{chunk-NEKEH4CK.js → chunk-FR6BYFPC.js} +53 -21
- package/dist/{chunk-KOPVJQ2P.js → chunk-GEXT7BTE.js} +1 -1
- package/dist/{chunk-ZAWANWUS.js → chunk-GGORNBSC.js} +18 -6
- package/dist/{chunk-DUQMSNF2.js → chunk-HGFAEDG3.js} +1 -1
- package/dist/chunk-HODO5BX5.js +28 -0
- package/dist/chunk-HW7B43E5.js +14 -0
- package/dist/{chunk-EQBZ24VH.js → chunk-IAM3D3RL.js} +43 -24
- package/dist/{chunk-ODADQM6Z.js → chunk-JJ3DELUL.js} +2 -2
- package/dist/{chunk-542MIHNP.js → chunk-JMLK6MH7.js} +1 -1
- package/dist/{chunk-7FWA3I6A.js → chunk-JWTQS5F5.js} +1 -1
- package/dist/{chunk-OUNRFXDC.js → chunk-K4ZHAURD.js} +1 -1
- package/dist/chunk-NV72HZ4W.js +45 -0
- package/dist/{chunk-4Y5FWDPM.js → chunk-NZ4RXN3G.js} +55 -7
- package/dist/chunk-OWZ7ATLZ.js +187 -0
- package/dist/{chunk-TXBAOEKG.js → chunk-PKGN32AU.js} +5 -4
- package/dist/chunk-Q6E4OPGG.js +40 -0
- package/dist/{chunk-J4D6ZXRW.js → chunk-QL6XNPSD.js} +3 -3
- package/dist/{chunk-HAG4YIZY.js → chunk-R46IQIGK.js} +6 -6
- package/dist/{chunk-R3VKF43H.js → chunk-RPZ7OQGD.js} +1 -1
- package/dist/{chunk-Q3S26EQA.js → chunk-S54ECQGY.js} +1 -1
- package/dist/{chunk-JIL5VY2R.js → chunk-VHKEF5ZB.js} +1 -1
- package/dist/{chunk-ILAW3XKD.js → chunk-VO3JYRT5.js} +43 -29
- package/dist/chunk-VWWITFWM.js +300 -0
- package/dist/{chunk-OPRBF7VE.js → chunk-ZTLMPUO6.js} +3 -2
- package/dist/client/index.js +3 -3
- package/dist/cms/CmsPreview.d.ts +2 -2
- package/dist/cms/index.d.ts +3 -3
- package/dist/cms/server-api.d.ts +1 -1
- package/dist/cms/types.d.ts +1 -1
- package/dist/commerce/EventCheckout.d.ts +1 -1
- package/dist/commerce/EventsAgenda.d.ts +3 -3
- package/dist/commerce/api.d.ts +1 -1
- package/dist/commerce/index.js +4 -4
- package/dist/commerce/server.d.ts +3 -4
- package/dist/contracts/color.d.ts +1 -1
- package/dist/contracts/entries.d.ts +1 -1
- package/dist/contracts/error-page.d.ts +183 -0
- package/dist/contracts/fleet.d.ts +9 -9
- package/dist/contracts/forms.d.ts +4 -10
- package/dist/contracts/llms.d.ts +2 -1
- package/dist/contracts/portfolio.d.ts +11 -15
- package/dist/contracts/proposal-sitemap.d.ts +130 -0
- package/dist/contracts/schema-placeholders.d.ts +87 -0
- package/dist/contracts/seo-meta.d.ts +11 -12
- package/dist/contracts/seo-pages.d.ts +12 -18
- package/dist/contracts/site-cache.d.ts +4 -4
- package/dist/contracts/sites-normalize.d.ts +2 -4
- package/dist/contracts/sites.d.ts +3 -5
- package/dist/contracts/slot-content.d.ts +2 -2
- package/dist/contracts/slots.d.ts +6 -6
- package/dist/contracts/voice.d.ts +56 -0
- package/dist/contracts/website.d.ts +2 -2
- package/dist/engage/EngageWidget.d.ts +13 -12
- package/dist/engage/index.d.ts +10 -9
- package/dist/engage/index.js +31 -35
- package/dist/engage/types.d.ts +19 -244
- package/dist/fleet/FleetHeartbeat.d.ts +2 -2
- package/dist/fleet/index.js +4 -4
- package/dist/forms/FormEnhancer.d.ts +25 -12
- package/dist/forms/FormSpotlight.d.ts +2 -2
- package/dist/forms/ManagedForm.d.ts +1 -1
- package/dist/forms/ServerForm.d.ts +11 -10
- package/dist/forms/StaticForm.d.ts +4 -2
- package/dist/forms/field-autocomplete.d.ts +28 -0
- package/dist/forms/field-interactions.d.ts +2 -2
- package/dist/forms/form-dom-values.d.ts +42 -0
- package/dist/forms/form-loaded-at.d.ts +2 -2
- package/dist/forms/formsApi.d.ts +2 -2
- package/dist/forms/index.d.ts +1 -1
- package/dist/forms/index.js +11 -9
- package/dist/forms/server.d.ts +1 -1
- package/dist/forms/server.js +6 -4
- package/dist/forms/static.js +3 -2
- package/dist/forms/submitForm.d.ts +9 -2
- package/dist/forms/types.d.ts +44 -5
- package/dist/forms/useForm.d.ts +21 -4
- package/dist/forms/webmcp.d.ts +38 -0
- package/dist/images/ManagedFavicon.d.ts +1 -1
- package/dist/images/ManagedImage.d.ts +4 -4
- package/dist/images/api.d.ts +1 -1
- package/dist/images/index.d.ts +2 -2
- package/dist/images/index.js +4 -4
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/landing/contract.d.ts +3 -4
- package/dist/layout/SiteKitClientProviders.d.ts +4 -4
- package/dist/layout/SiteKitLayout.d.ts +11 -11
- package/dist/layout/client.d.ts +4 -4
- package/dist/layout/client.js +7 -7
- package/dist/layout/index.js +8 -8
- package/dist/layout/types.d.ts +7 -6
- package/dist/llms/SpeakableSchema.d.ts +2 -2
- package/dist/llms/agent-access.d.ts +2 -2
- package/dist/llms/aiRobots.d.ts +4 -4
- package/dist/llms/api.d.ts +2 -2
- package/dist/llms/contract.js +1 -1
- package/dist/llms/generateLLMsTxt.d.ts +1 -1
- package/dist/llms/index.js +6 -6
- package/dist/llms/links.d.ts +1 -1
- package/dist/llms/revalidate.d.ts +1 -1
- package/dist/llms/seo-revalidate.d.ts +2 -3
- package/dist/llms/types.d.ts +6 -6
- package/dist/llms/writeLLMsTxt.d.ts +10 -10
- package/dist/manifest/index.d.ts +8 -8
- package/dist/maps/index.js +3 -3
- package/dist/mcp/WebMcpTools.d.ts +1 -1
- package/dist/mcp/index.js +2 -14
- package/dist/mcp/report.d.ts +2 -2
- package/dist/mcp/serverCard.d.ts +1 -1
- package/dist/mcp/sonor.d.ts +5 -6
- package/dist/mcp/sonor.js +14 -11
- package/dist/mcp/transport.d.ts +1 -2
- package/dist/mcp/types.d.ts +4 -5
- package/dist/motion/engine.d.ts +2 -3
- package/dist/motion/failsafe.d.ts +1 -2
- package/dist/motion/gsap.d.ts +2 -2
- package/dist/motion/three.d.ts +1 -1
- package/dist/og/config.d.ts +4 -4
- package/dist/og/contrast.d.ts +2 -2
- package/dist/og/pages.d.ts +5 -5
- package/dist/og/route-fit.d.ts +2 -2
- package/dist/og/route.d.ts +1 -2
- package/dist/og/template.d.ts +1 -1
- package/dist/proxy/index.d.ts +2 -2
- package/dist/proxy/securityHeaders.d.ts +10 -12
- package/dist/redirects/index.d.ts +7 -7
- package/dist/reputation/TestimonialSection.d.ts +1 -1
- package/dist/reputation/api.d.ts +1 -1
- package/dist/revalidate/index.js +2 -2
- package/dist/robots/index.d.ts +5 -5
- package/dist/robots/indexnow.d.ts +2 -3
- package/dist/seo/ManagedScripts.d.ts +2 -2
- package/dist/seo/client.js +4 -4
- package/dist/seo/getManagedMetadata.d.ts +1 -1
- package/dist/seo/groundingSchema.d.ts +2 -2
- package/dist/seo/index.js +15 -8
- package/dist/seo/llms/contract.js +1 -1
- package/dist/seo/llms.js +6 -6
- package/dist/seo/register-sitemap-cli-impl.d.ts +1 -1
- package/dist/seo/register-sitemap-cli.d.ts +1 -1
- package/dist/seo/register-sitemap-cli.js +2 -2
- package/dist/seo/schema-filter.d.ts +5 -6
- package/dist/seo/server-api.d.ts +1 -1
- package/dist/seo/sitemap.js +4 -4
- package/dist/seo/types.d.ts +4 -4
- package/dist/seo/withManagedMetadata.d.ts +4 -4
- package/dist/server/index.js +2 -2
- package/dist/server/mint-site-token.d.ts +1 -2
- package/dist/server/server-fetch.d.ts +5 -5
- package/dist/shared/build-entries.d.ts +4 -4
- package/dist/shared/dialog.d.ts +27 -0
- package/dist/shared/frame.d.ts +8 -9
- package/dist/shared/fresh-fetch.d.ts +1 -2
- package/dist/shared/identity.d.ts +1 -1
- package/dist/shared/layers.d.ts +7 -0
- package/dist/shared/mid-form.d.ts +53 -0
- package/dist/shared/next-files.d.ts +1 -1
- package/dist/shared/publishCredential.d.ts +1 -1
- package/dist/shared/reporting-gate.d.ts +1 -1
- package/dist/shared/uuid.d.ts +1 -2
- package/dist/shared/version.d.ts +1 -1
- package/dist/shared/visual-viewport-gap.d.ts +3 -3
- package/dist/signal/index.js +2 -2
- package/dist/signal/types.d.ts +1 -1
- package/dist/site-config/index.d.ts +2 -2
- package/dist/sitemap/index.d.ts +13 -13
- package/dist/sitemap/index.js +4 -4
- package/dist/sitemap/shared.d.ts +3 -3
- package/dist/sites/site-param.d.ts +2 -2
- package/dist/slots/ManagedRichText.d.ts +1 -1
- package/dist/slots/ManagedSlot.d.ts +1 -1
- package/dist/slots/index.d.ts +1 -3
- package/dist/{socket-loader-R24ZSRSQ.js → socket-loader-CGIPEG74.js} +1 -1
- package/dist/sync/index.js +5 -5
- package/dist/types.d.ts +4 -2
- package/dist/website/BlocksPopup.d.ts +1 -1
- package/dist/website/PopupBlocks.d.ts +8 -6
- package/dist/website/SitePopups.d.ts +25 -0
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +6 -6
- package/dist/website/popup-rules.d.ts +46 -0
- package/dist/website/popup-types.d.ts +113 -0
- package/dist/website/popups.d.ts +2 -6
- package/dist/website/popups.js +6 -14
- package/dist/{writeLLMsTxt-QR23OQUE.js → writeLLMsTxt-OV24LQVL.js} +3 -3
- package/docs/MIGRATING-TO-7.md +50 -22
- package/docs.json +2 -1
- package/package.json +2 -2
- package/src/admin-auth/README.md +3 -3
- package/src/analytics/README.md +9 -11
- package/src/articles/README.md +10 -7
- package/src/{engage → chat}/README.md +63 -62
- package/src/cta-bar/README.md +11 -11
- package/src/forms/README.md +60 -12
- package/src/layout/README.md +8 -5
- package/src/llms/README.md +3 -3
- package/src/mcp/README.md +7 -7
- package/src/motion/README.md +1 -1
- package/src/og/README.md +26 -27
- package/src/proxy/README.md +14 -14
- package/src/seo/README.md +4 -2
- package/src/slots/README.md +1 -1
- package/src/sync/README.md +10 -0
- package/src/website/README.md +133 -0
- package/dist/ChatWidget-JMFBXJ75.js +0 -15
- package/dist/EngageWidget-A3QKZ3SU.js +0 -11
- package/dist/ManagedForm-2GSSDJPP.js +0 -14
- package/dist/SitemapSync-4U654SEA.js +0 -8
- package/dist/chunk-B73QPZPH.js +0 -837
- package/dist/chunk-NDF4A5JM.js +0 -37
- package/dist/chunk-RTMMHTEQ.js +0 -100
- package/dist/engage/DesignRenderer.d.ts +0 -57
- package/dist/engage/element-rules.d.ts +0 -38
|
@@ -23,18 +23,15 @@
|
|
|
23
23
|
* Content). The page is public anyway, and the overlay it loads there only
|
|
24
24
|
* outlines copy and reports clicks (`slots/edit/overlay.ts`).
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* non-embedder would hand out framing rights nothing needs. Re-check that
|
|
31
|
-
* before adding it.
|
|
26
|
+
* An origin earns a place on this list by embedding managed sites, not by
|
|
27
|
+
* belonging to the same company: a site that only links to case studies
|
|
28
|
+
* frames nothing, and adding it would hand out framing rights nothing needs.
|
|
29
|
+
* Re-check that before adding one.
|
|
32
30
|
*
|
|
33
31
|
* Do NOT re-fork this list into individual sites' proxy/middleware/
|
|
34
|
-
* next.config/netlify.toml/_headers
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* the fleet inherit them on its next deploy.
|
|
32
|
+
* next.config/netlify.toml/_headers: a fork is a copy that stops tracking
|
|
33
|
+
* this one, so a new origin never reaches it. Add origins HERE and every
|
|
34
|
+
* site inherits them on its next deploy.
|
|
38
35
|
*/
|
|
39
36
|
export declare const DEFAULT_FRAME_ANCESTORS: string[];
|
|
40
37
|
export interface SecurityHeadersConfig {
|
|
@@ -43,8 +40,9 @@ export interface SecurityHeadersConfig {
|
|
|
43
40
|
frameOptions?: 'DENY' | 'SAMEORIGIN' | false;
|
|
44
41
|
/**
|
|
45
42
|
* Origins allowed to frame this site, emitted as a CSP `frame-ancestors`
|
|
46
|
-
* directive. Defaults to {@link DEFAULT_FRAME_ANCESTORS} ('self'
|
|
47
|
-
*
|
|
43
|
+
* directive. Defaults to {@link DEFAULT_FRAME_ANCESTORS} ('self', Sonor's
|
|
44
|
+
* dashboard and the Upforge showcase origins). Pass an array to replace it
|
|
45
|
+
* (spread the default to extend it), or
|
|
48
46
|
* `false` to opt out entirely and fall back to X-Frame-Options.
|
|
49
47
|
*
|
|
50
48
|
* Ignored if a `Content-Security-Policy` is supplied via `customHeaders` —
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Managed Redirects - Next.js Middleware Helper
|
|
3
3
|
*
|
|
4
|
-
* Fetches redirect rules from
|
|
5
|
-
* Supports API key only (domain resolved from
|
|
4
|
+
* Fetches redirect rules from Sonor and applies them.
|
|
5
|
+
* Supports API key only (domain resolved from Sonor) or domain-based lookup.
|
|
6
6
|
*
|
|
7
7
|
* On a multi-site project (one Sonor project, many domains) rules are per
|
|
8
8
|
* host: a rule with no site applies everywhere, and one tagged
|
|
9
|
-
* '
|
|
9
|
+
* 'charlotte.example.com' applies only there. The list read and the hit both name
|
|
10
10
|
* the host through `sites/site-param` (explicit `site` > NEXT_PUBLIC_SITE_URL
|
|
11
11
|
* host), and the in-memory cache key carries it too. Keyed by API key alone,
|
|
12
12
|
* two hosts served by one process would share whichever list was fetched
|
|
@@ -41,7 +41,7 @@ export interface RedirectConfig {
|
|
|
41
41
|
/** Project API key; when set, redirects are fetched by key (no domain needed) */
|
|
42
42
|
apiKey?: string;
|
|
43
43
|
/**
|
|
44
|
-
* Sub-site host on a multi-site project (e.g. '
|
|
44
|
+
* Sub-site host on a multi-site project (e.g. 'charlotte.example.com'). Same
|
|
45
45
|
* meaning as the `site` argument of withSiteParam: when unset it comes from
|
|
46
46
|
* the NEXT_PUBLIC_SITE_URL host. The API returns this host's rules plus the
|
|
47
47
|
* project-wide ones. When nothing resolves no site is sent, and the API
|
|
@@ -54,14 +54,14 @@ export interface RedirectConfig {
|
|
|
54
54
|
* Hard ceiling on the rules fetch, in ms. Default 300.
|
|
55
55
|
*
|
|
56
56
|
* This fetch can sit in front of HTML (proxy hot path / not-found render),
|
|
57
|
-
* and without a bound a *slow*
|
|
57
|
+
* and without a bound a *slow* Sonor becomes every page's TTFB — the
|
|
58
58
|
* try/catch only fails open on error, not on slow. Build-time callers
|
|
59
59
|
* (generateNextRedirects) pass a larger value.
|
|
60
60
|
*/
|
|
61
61
|
fetchTimeoutMs?: number;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Fetch redirect rules from
|
|
64
|
+
* Fetch redirect rules from Sonor API.
|
|
65
65
|
* When apiKey is set (or from env), uses key-based endpoint (no domain required).
|
|
66
66
|
* Otherwise uses domain query (or domain from getSiteConfig when only env API key is set).
|
|
67
67
|
* Either way the site host goes along as `?site=`, left off when it resolves empty.
|
|
@@ -86,7 +86,7 @@ export declare function handleManagedRedirects(request: NextRequest, config: Red
|
|
|
86
86
|
*/
|
|
87
87
|
export declare function trackRedirectHit(config: RedirectConfig, fromPath: string, domainForHit?: string): Promise<void>;
|
|
88
88
|
/**
|
|
89
|
-
* Generate Next.js redirects config from
|
|
89
|
+
* Generate Next.js redirects config from Sonor
|
|
90
90
|
* Use this in next.config.js for build-time redirects
|
|
91
91
|
*
|
|
92
92
|
* The site host resolves as it does everywhere else. Next loads .env files
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @sonordev/site-kit/reputation - Testimonial Section
|
|
3
3
|
*
|
|
4
4
|
* Displays client reviews in a rotating carousel
|
|
5
|
-
* Fetches published reviews from
|
|
5
|
+
* Fetches published reviews from Sonor API public endpoint
|
|
6
6
|
*
|
|
7
7
|
* Minimal styling - let site CSS control appearance
|
|
8
8
|
*/
|
package/dist/reputation/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @sonordev/site-kit/reputation - API Functions
|
|
3
3
|
*
|
|
4
|
-
* Fetch reviews and stats from
|
|
4
|
+
* Fetch reviews and stats from Sonor API public endpoint.
|
|
5
5
|
* Uses API key authentication (x-api-key header) - project is resolved server-side.
|
|
6
6
|
* Includes retry with backoff for rate limiting (429).
|
|
7
7
|
*/
|
package/dist/revalidate/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createSeoRevalidationHandler } from '../chunk-
|
|
1
|
+
import { createSeoRevalidationHandler } from '../chunk-VHKEF5ZB.js';
|
|
2
2
|
import '../chunk-XTRZGXB2.js';
|
|
3
3
|
export { SITE_CACHE_TAGS, SITE_REVALIDATE_PATH, isSiteRevalidatePong } from '../chunk-RYVDGXC2.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-F24FNCTK.js';
|
|
5
5
|
import '../chunk-PKBMQBKP.js';
|
|
6
6
|
|
|
7
7
|
// src/revalidate/index.ts
|
package/dist/robots/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @sonordev/site-kit/robots - robots.txt Generator
|
|
3
3
|
*
|
|
4
4
|
* Generates robots.txt with Sitemap directive.
|
|
5
|
-
* baseUrl can be omitted when apiKey is set (resolved from
|
|
5
|
+
* baseUrl can be omitted when apiKey is set (resolved from Sonor project-info).
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* // app/robots.txt/route.ts (API key only)
|
|
@@ -20,14 +20,14 @@ export { isNextInternalsPath } from './next-internals';
|
|
|
20
20
|
export { AI_RETRIEVAL_CRAWLERS, AI_TRAINING_CRAWLERS, buildAiCrawlerRules, createRobotsTxtHandler, } from '../llms/aiRobots';
|
|
21
21
|
export type { AiCrawlerRulesOptions, ContentSignalsOptions, RobotsTxtHandlerOptions } from '../llms/aiRobots';
|
|
22
22
|
export interface RobotsConfig {
|
|
23
|
-
/** Base URL of the site (optional when apiKey is set; then resolved from
|
|
23
|
+
/** Base URL of the site (optional when apiKey is set; then resolved from Sonor) */
|
|
24
24
|
baseUrl?: string;
|
|
25
|
-
/** Project API key; when set and baseUrl is not, baseUrl is resolved from
|
|
25
|
+
/** Project API key; when set and baseUrl is not, baseUrl is resolved from Sonor */
|
|
26
26
|
apiKey?: string;
|
|
27
27
|
apiUrl?: string;
|
|
28
28
|
/** Path to sitemap (default: /sitemap.xml) */
|
|
29
29
|
sitemapPath?: string;
|
|
30
|
-
/** Pre-built robots content from
|
|
30
|
+
/** Pre-built robots content from Sonor (overrides default when provided) */
|
|
31
31
|
managedRobots?: string | null;
|
|
32
32
|
/**
|
|
33
33
|
* Paths to disallow (e.g. ['/admin', '/api']). `/_next` paths are dropped:
|
|
@@ -37,6 +37,6 @@ export interface RobotsConfig {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Create a robots.txt handler that returns a Response or Promise<Response>.
|
|
40
|
-
* Use as GET handler for app/robots.txt/route.ts. When baseUrl is omitted, pass apiKey to resolve from
|
|
40
|
+
* Use as GET handler for app/robots.txt/route.ts. When baseUrl is omitted, pass apiKey to resolve from Sonor.
|
|
41
41
|
*/
|
|
42
42
|
export declare function createRobots(config: RobotsConfig): () => Response | Promise<Response>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where the key is served. Sonor
|
|
3
|
-
*
|
|
4
|
-
* as the keyLocation. Keep the two equal.
|
|
2
|
+
* Where the key is served. Sonor submits this path as the keyLocation, so
|
|
3
|
+
* keep the two equal.
|
|
5
4
|
*/
|
|
6
5
|
export declare const INDEXNOW_KEY_PATH = "/indexnow.txt";
|
|
7
6
|
/** The project's IndexNow key, or null when Sonor can't be reached. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ManagedScriptsProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated The managed-scripts feature is retired (2026-06): scripts belong
|
|
4
|
-
* in the site's own code via next/script, not in a
|
|
5
|
-
*
|
|
4
|
+
* in the site's own code via next/script, not in a Sonor-managed table. The
|
|
5
|
+
* Sonor admin endpoints are removed and the table is empty; this component
|
|
6
6
|
* now always renders null and is kept only so existing imports keep compiling.
|
|
7
7
|
*
|
|
8
8
|
* Perf note (2026-07): the previous "stub" still fetched
|
package/dist/seo/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { SitemapSync } from '../chunk-
|
|
2
|
+
export { SitemapSync } from '../chunk-GEXT7BTE.js';
|
|
3
3
|
import '../chunk-YVKRYQRG.js';
|
|
4
4
|
import '../chunk-43OCZ3JA.js';
|
|
5
5
|
import '../chunk-EKBEOXTH.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-D6ZC7XKZ.js';
|
|
7
|
+
import '../chunk-K4ZHAURD.js';
|
|
8
|
+
import '../chunk-F24FNCTK.js';
|
|
9
9
|
import '../chunk-PKBMQBKP.js';
|
|
@@ -2,7 +2,7 @@ import type { GetManagedMetadataOptions, ManagedMetadataResult, GetABVariantOpti
|
|
|
2
2
|
/**
|
|
3
3
|
* Get managed metadata for a page
|
|
4
4
|
*
|
|
5
|
-
* Use in generateMetadata() to fetch
|
|
5
|
+
* Use in generateMetadata() to fetch Sonor-managed SEO data
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Optional JSON-LD stub when
|
|
3
|
-
* Default product stance:
|
|
2
|
+
* Optional JSON-LD stub when Sonor does **not** emit Organization/WebSite.
|
|
3
|
+
* Default product stance: Sonor owns entity nodes; only use this when confirmed absent.
|
|
4
4
|
*/
|
|
5
5
|
export interface WebSiteOrganizationStubInput {
|
|
6
6
|
name: string;
|
package/dist/seo/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { ManagedNoScripts, ManagedScripts } from '../chunk-MVLMXC44.js';
|
|
2
|
-
import { pickManagedLlmSchemaForJsonLd } from '../chunk-
|
|
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-GEXT7BTE.js';
|
|
5
6
|
import { getManagedMetadata } from '../chunk-4YTYGG2C.js';
|
|
6
7
|
export { generateSitemap, getABVariant, getManagedMetadata, getManagedMetadataWithAB, getRedirect, getRobotsDirective, isIndexable } from '../chunk-4YTYGG2C.js';
|
|
7
8
|
import { getContentBlock, getSchemaMarkups, getSEOPageData, getEntityEnhancedSchema, getFAQData, getInternalLinks, getEntities, pruneSchemaTypes } from '../chunk-662ILEZ6.js';
|
|
@@ -17,9 +18,9 @@ import '../chunk-FESKKJAS.js';
|
|
|
17
18
|
import '../chunk-A4CC4ZG3.js';
|
|
18
19
|
import '../chunk-43OCZ3JA.js';
|
|
19
20
|
import '../chunk-EKBEOXTH.js';
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-D6ZC7XKZ.js';
|
|
22
|
+
import '../chunk-K4ZHAURD.js';
|
|
23
|
+
import '../chunk-F24FNCTK.js';
|
|
23
24
|
import '../chunk-PKBMQBKP.js';
|
|
24
25
|
import { Suspense } from 'react';
|
|
25
26
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -73,10 +74,10 @@ async function ManagedSchemaAsync({
|
|
|
73
74
|
const page = pageData?.page;
|
|
74
75
|
const siteUrl = pageData?.project?.site_url || "";
|
|
75
76
|
const deny = new Set(excludeTypes ?? []);
|
|
76
|
-
const fromSonor = (values) => values.map((v) => pruneSchemaTypes(v, deny)).filter(
|
|
77
|
+
const fromSonor = (values) => values.map((v) => withoutPlaceholders(pruneSchemaTypes(v, deny))).filter(isSchemaObject);
|
|
77
78
|
const allSchemas = [
|
|
78
79
|
...fromSonor(entitySchemas),
|
|
79
|
-
...schemas.map((s) => s.schema_json),
|
|
80
|
+
...schemas.map((s) => withoutPlaceholders(s.schema_json)).filter(isSchemaObject),
|
|
80
81
|
// Include auto-generated schema from Signal meta optimization
|
|
81
82
|
...fromSonor(page?.managed_schema ? [page.managed_schema] : []),
|
|
82
83
|
...additionalSchemas
|
|
@@ -127,7 +128,7 @@ async function LLMSchemaAsync({
|
|
|
127
128
|
}) {
|
|
128
129
|
const { page: pageData, project } = await getSEOPageData(path);
|
|
129
130
|
const raw = pageData?.managed_llm_schema;
|
|
130
|
-
const picked = pickManagedLlmSchemaForJsonLd(raw);
|
|
131
|
+
const picked = withoutPlaceholders(pickManagedLlmSchemaForJsonLd(raw));
|
|
131
132
|
if (!picked) {
|
|
132
133
|
return null;
|
|
133
134
|
}
|
|
@@ -183,6 +184,12 @@ function createSpeakableWebPageSchema(type, name, url, speakable) {
|
|
|
183
184
|
speakable: speakableSpec
|
|
184
185
|
};
|
|
185
186
|
}
|
|
187
|
+
function withoutPlaceholders(value) {
|
|
188
|
+
return withoutSchemaPlaceholders(value).value;
|
|
189
|
+
}
|
|
190
|
+
function isSchemaObject(value) {
|
|
191
|
+
return value !== null && typeof value === "object";
|
|
192
|
+
}
|
|
186
193
|
function schemaNodeHasType(node, type) {
|
|
187
194
|
if (!node || typeof node !== "object") return false;
|
|
188
195
|
const t = node["@type"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, isEmittableReviewNode, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from '../../chunk-
|
|
1
|
+
export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, clipAtWordBoundary, isEmittableReviewNode, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from '../../chunk-NZ4RXN3G.js';
|
|
2
2
|
import '../../chunk-PKBMQBKP.js';
|
package/dist/seo/llms.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-
|
|
1
|
+
export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-BC4Y3S3D.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-
|
|
4
|
+
export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-VHKEF5ZB.js';
|
|
5
5
|
import '../chunk-XTRZGXB2.js';
|
|
6
6
|
export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
|
|
7
|
-
export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-
|
|
8
|
-
export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-
|
|
7
|
+
export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-QL6XNPSD.js';
|
|
8
|
+
export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-6U3VLV2C.js';
|
|
9
9
|
import '../chunk-L5UOHS6E.js';
|
|
10
10
|
import '../chunk-WMVK77ND.js';
|
|
11
11
|
import '../chunk-VX5CMNMM.js';
|
|
12
|
-
export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from '../chunk-
|
|
12
|
+
export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from '../chunk-NZ4RXN3G.js';
|
|
13
13
|
import '../chunk-4KZ6W3ZH.js';
|
|
14
14
|
import '../chunk-MJP63SSS.js';
|
|
15
15
|
import '../chunk-YVKRYQRG.js';
|
|
16
16
|
import '../chunk-FESKKJAS.js';
|
|
17
17
|
import '../chunk-A4CC4ZG3.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-F24FNCTK.js';
|
|
19
19
|
import '../chunk-PKBMQBKP.js';
|
|
@@ -37,7 +37,7 @@ export type RegisterLocalSitemapOptions = {
|
|
|
37
37
|
*/
|
|
38
38
|
brandProfile?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
* The sub-site host these pages belong to (`--site
|
|
40
|
+
* The sub-site host these pages belong to (`--site ohio.example.com`).
|
|
41
41
|
* Omit to resolve it the way every other build-time read does:
|
|
42
42
|
* `NEXT_PUBLIC_SITE_URL`'s host (the CLI loads `.env` / `.env.local`).
|
|
43
43
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* npx sonor-register-sitemap --write-llms-full # ...and public/llms-full.txt
|
|
13
13
|
* npx sonor-register-sitemap --write-llms --publication /insights # articles' path, for cluster links
|
|
14
14
|
* npx sonor-register-sitemap --write-llms --no-agent-access # never add the MCP "Agent access" section
|
|
15
|
-
* npx sonor-register-sitemap --auto-discover --site
|
|
15
|
+
* npx sonor-register-sitemap --auto-discover --site ohio.example.com # Tag the pages with a sub-site host
|
|
16
16
|
*
|
|
17
17
|
* The sub-site host defaults to NEXT_PUBLIC_SITE_URL's (from .env / .env.local),
|
|
18
18
|
* so a multi-site project's microsites tag their pages with no flag.
|
|
@@ -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-
|
|
461
|
+
const { writeLLMsTxtToPublic } = await import('../writeLLMsTxt-OV24LQVL.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.
|
|
@@ -527,7 +527,7 @@ async function main() {
|
|
|
527
527
|
}
|
|
528
528
|
if (result.meta_optimization?.triggered) {
|
|
529
529
|
console.log(`[Sonor] \u2713 Signal AI meta optimization triggered for ${result.meta_optimization.pages_queued} pages`);
|
|
530
|
-
console.log(`[Sonor] (Running in background - check
|
|
530
|
+
console.log(`[Sonor] (Running in background - check Sonor SEO module for results)`);
|
|
531
531
|
}
|
|
532
532
|
process.exit(0);
|
|
533
533
|
} else {
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
* `managed_schema` and entity-graph nodes (`ManagedSchema`).
|
|
7
7
|
*
|
|
8
8
|
* `excludeTypes` used to drop a row only when its `schema_type` matched
|
|
9
|
-
* exactly, so a node of that type nested INSIDE a row got through
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* FAQPage nodes by hand and re-added the rows. Now an excluded type goes
|
|
9
|
+
* exactly, so a node of that type nested INSIDE a row got through: a
|
|
10
|
+
* page-level row whose JSON-LD embeds a FAQPage for questions the page
|
|
11
|
+
* doesn't show (structured data has to describe visible content) was out of
|
|
12
|
+
* `excludeTypes: ['FAQPage']`'s reach, and sites dropped those nodes by
|
|
13
|
+
* hand. Now an excluded type goes
|
|
15
14
|
* wherever it sits: a whole row, an `@graph` member, or a nested value
|
|
16
15
|
* (`mainEntity`, `hasPart`). A row left with nothing in it is dropped.
|
|
17
16
|
*
|
package/dist/seo/server-api.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export declare function registerSitemap(entries: Array<{
|
|
|
146
146
|
/**
|
|
147
147
|
* Ensure metadata exists for a page by triggering Signal AI optimization.
|
|
148
148
|
* If the page has no managed_title or managed_meta_description, Signal will
|
|
149
|
-
* generate them and save to the database via
|
|
149
|
+
* generate them and save to the database via Sonor proxy.
|
|
150
150
|
*
|
|
151
151
|
* Idempotent — returns existing metadata if already populated.
|
|
152
152
|
* @server-only
|
package/dist/seo/sitemap.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-
|
|
1
|
+
export { createSitemap, getPortfolioPaths, syncSitemapToPortal } from '../chunk-R46IQIGK.js';
|
|
2
2
|
import '../chunk-Z22QVHT4.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-QL6XNPSD.js';
|
|
4
|
+
import '../chunk-6U3VLV2C.js';
|
|
5
5
|
import '../chunk-L5UOHS6E.js';
|
|
6
6
|
import '../chunk-WMVK77ND.js';
|
|
7
7
|
import '../chunk-VX5CMNMM.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-NZ4RXN3G.js';
|
|
9
9
|
import '../chunk-MJP63SSS.js';
|
|
10
10
|
import '../chunk-ZEGVKVD5.js';
|
|
11
11
|
import '../chunk-YVKRYQRG.js';
|
package/dist/seo/types.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface SEOPageData {
|
|
|
26
26
|
managed_schema?: Record<string, unknown>;
|
|
27
27
|
/** LLM-optimized schema for AI visibility (detailed descriptions, keywords, etc.) */
|
|
28
28
|
managed_llm_schema?: Record<string, unknown>;
|
|
29
|
-
/** Optional locale → URL map for hreflang (
|
|
29
|
+
/** Optional locale → URL map for hreflang (Sonor expansion track) */
|
|
30
30
|
language_alternates?: Record<string, string> | null;
|
|
31
31
|
updated_at: string;
|
|
32
32
|
}
|
|
@@ -108,7 +108,7 @@ export interface ManagedFAQProps {
|
|
|
108
108
|
/** Show section title */
|
|
109
109
|
showTitle?: boolean;
|
|
110
110
|
/**
|
|
111
|
-
* Sub-site host for multi-site projects (e.g. `
|
|
111
|
+
* Sub-site host for multi-site projects (e.g. `charlotte.example.com`): shows that
|
|
112
112
|
* host's FAQ, falling back to a project-wide one. Omit to resolve from
|
|
113
113
|
* NEXT_PUBLIC_SITE_URL.
|
|
114
114
|
*/
|
|
@@ -137,7 +137,7 @@ export interface ManagedInternalLinksProps {
|
|
|
137
137
|
/** Custom link renderer */
|
|
138
138
|
renderLink?: (link: ManagedLink) => React.ReactNode;
|
|
139
139
|
/**
|
|
140
|
-
* Sub-site host for multi-site projects (e.g. `
|
|
140
|
+
* Sub-site host for multi-site projects (e.g. `charlotte.example.com`): shows that
|
|
141
141
|
* host's links plus project-wide ones. Omit to resolve from
|
|
142
142
|
* NEXT_PUBLIC_SITE_URL.
|
|
143
143
|
*/
|
|
@@ -167,7 +167,7 @@ export interface ManagedContentProps {
|
|
|
167
167
|
/** Inject entity annotations from knowledge graph (data-sonor-entity attributes) */
|
|
168
168
|
injectEntityAnnotations?: boolean;
|
|
169
169
|
/**
|
|
170
|
-
* Sub-site host for multi-site projects (e.g. `
|
|
170
|
+
* Sub-site host for multi-site projects (e.g. `charlotte.example.com`): shows that
|
|
171
171
|
* host's block, falling back to a project-wide one. Omit to resolve from
|
|
172
172
|
* NEXT_PUBLIC_SITE_URL.
|
|
173
173
|
*/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @sonordev/site-kit/seo - withManagedMetadata
|
|
3
3
|
*
|
|
4
4
|
* Higher-order function that wraps Next.js generateMetadata to auto-merge
|
|
5
|
-
*
|
|
5
|
+
* Sonor-managed SEO data. Sonor values serve as defaults; page-level
|
|
6
6
|
* metadata returned by the caller takes priority.
|
|
7
7
|
*
|
|
8
|
-
* @example Zero-config (
|
|
8
|
+
* @example Zero-config (Sonor manages everything):
|
|
9
9
|
* ```ts
|
|
10
10
|
* export const generateMetadata = withManagedMetadata('/about')
|
|
11
11
|
* ```
|
|
@@ -32,12 +32,12 @@ type MetadataArgs = {
|
|
|
32
32
|
type PathResolver = string | ((args: MetadataArgs) => string | Promise<string>);
|
|
33
33
|
type PageMetadataFn = (args: MetadataArgs, parent: ResolvingMetadata) => Promise<Metadata> | Metadata;
|
|
34
34
|
/**
|
|
35
|
-
* Wrap generateMetadata to auto-merge
|
|
35
|
+
* Wrap generateMetadata to auto-merge Sonor managed metadata.
|
|
36
36
|
*
|
|
37
37
|
* - `path` can be a static string or a function that derives the path
|
|
38
38
|
* from the page's params.
|
|
39
39
|
* - `pageMetadata` (optional) returns page-specific overrides.
|
|
40
|
-
* Anything it returns wins over
|
|
40
|
+
* Anything it returns wins over Sonor values.
|
|
41
41
|
*/
|
|
42
42
|
export declare function withManagedMetadata(path: PathResolver, pageMetadata?: PageMetadataFn): (args: MetadataArgs, parent: ResolvingMetadata) => Promise<Metadata>;
|
|
43
43
|
export {};
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { resolveClientCredential } from '../chunk-
|
|
1
|
+
export { resolveClientCredential } from '../chunk-RPZ7OQGD.js';
|
|
2
2
|
import '../chunk-VX5CMNMM.js';
|
|
3
3
|
export { requireServerApiConfig, resolveApiOrigin, resolveServerApiConfig, serverApiFetch } from '../chunk-X6F6SO4S.js';
|
|
4
4
|
import '../chunk-MH2DSGC6.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-F24FNCTK.js';
|
|
6
6
|
import '../chunk-PKBMQBKP.js';
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
*
|
|
34
34
|
* SEED FRESHNESS: a static page's seed carries `iat` = build time, and the API
|
|
35
35
|
* refuses to refresh a seed older than SITE_TOKEN_MAX_REFRESH_AGE_SECONDS
|
|
36
|
-
* (
|
|
37
|
-
* from 30 alongside this fix). A site not rebuilt within that window serves a
|
|
36
|
+
* (currently 400 days, raised from 30 alongside this fix). A site not rebuilt within that window serves a
|
|
38
37
|
* seed the client cannot refresh, and its forms/analytics/engage start failing
|
|
39
38
|
* for new visitors. Keep that limit comfortably longer than the fleet's
|
|
40
39
|
* realistic redeploy gap; marketing sites routinely go many months untouched.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SECURITY: Server-only. Reads SONOR_API_KEY from process.env and injects it as
|
|
5
5
|
* `x-api-key`. Importing this module into a client component is a hard build
|
|
6
6
|
* error (see `import 'server-only'` below) — the API key must never reach the
|
|
7
|
-
* browser. Project is resolved by
|
|
7
|
+
* browser. Project is resolved by Sonor from the API key; sites never send
|
|
8
8
|
* or read a project ID (x-api-key only).
|
|
9
9
|
*
|
|
10
10
|
* This is the SINGLE SOURCE OF TRUTH for site-kit's server data plane. It is the
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* sibling package. Import it from `@sonordev/site-kit/server` instead.
|
|
19
19
|
*/
|
|
20
20
|
import 'server-only';
|
|
21
|
-
/** Resolved
|
|
21
|
+
/** Resolved Sonor API config. */
|
|
22
22
|
export interface ServerApiConfig {
|
|
23
23
|
apiUrl: string;
|
|
24
24
|
apiKey: string;
|
|
@@ -30,7 +30,7 @@ export interface ResolveServerApiConfigOptions {
|
|
|
30
30
|
apiUrl?: string;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Resolve
|
|
33
|
+
* Resolve Sonor API config from overrides → env. Returns null (does NOT throw)
|
|
34
34
|
* when no API key is available, so callers that prefer to degrade gracefully
|
|
35
35
|
* (e.g. portfolio fetchers) can warn-and-skip.
|
|
36
36
|
*
|
|
@@ -46,7 +46,7 @@ export declare function resolveServerApiConfig(options?: ResolveServerApiConfigO
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function requireServerApiConfig(options?: ResolveServerApiConfigOptions, errorMessage?: string): ServerApiConfig;
|
|
48
48
|
/**
|
|
49
|
-
* Origin for the
|
|
49
|
+
* Origin for the Sonor API preconnect/dns-prefetch hints (handles a custom
|
|
50
50
|
* SONOR_API_URL in staging). Shared by SiteKitLayout and AgencySiteKitLayout so
|
|
51
51
|
* the origin-resolution logic lives in one place.
|
|
52
52
|
*/
|
|
@@ -102,7 +102,7 @@ export interface ServerFetchOptions {
|
|
|
102
102
|
init?: RequestInit;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* The canonical
|
|
105
|
+
* The canonical Sonor API fetcher.
|
|
106
106
|
*
|
|
107
107
|
* - Injects `x-api-key` automatically (resolved from overrides → env)
|
|
108
108
|
* - JSON request/response
|
|
@@ -96,7 +96,7 @@ export declare const entry: {
|
|
|
96
96
|
readonly '_client/booking-widget': 'src/sync/BookingWidget.tsx';
|
|
97
97
|
readonly '_client/testimonial-section': 'src/reputation/TestimonialSection.tsx';
|
|
98
98
|
readonly 'slots/index': 'src/slots/index.ts';
|
|
99
|
-
/** Pure contract + HMAC signing (src/contracts;
|
|
99
|
+
/** Pure contract + HMAC signing (src/contracts; also published as @sonordev/contracts/slots) */
|
|
100
100
|
readonly 'slots/contract': 'src/slots/contract.ts';
|
|
101
101
|
readonly 'revalidate/index': 'src/revalidate/index.ts';
|
|
102
102
|
readonly 'website/index': 'src/website/index.ts';
|
|
@@ -127,7 +127,7 @@ export declare const entry: {
|
|
|
127
127
|
readonly 'seo/meta/contract': 'src/seo/entry-meta-contract.ts';
|
|
128
128
|
readonly 'seo/pages/contract': 'src/seo/entry-pages-contract.ts';
|
|
129
129
|
readonly 'fleet/index': 'src/fleet/index.ts';
|
|
130
|
-
/** Pure wire contract (src/contracts;
|
|
130
|
+
/** Pure wire contract (src/contracts; also published as @sonordev/contracts/fleet) */
|
|
131
131
|
readonly 'fleet/contract': 'src/fleet/contract.ts';
|
|
132
132
|
/** Multi-site `site` host normalization + equality */
|
|
133
133
|
readonly 'sites/contract': 'src/sites/contract.ts';
|
|
@@ -175,8 +175,8 @@ export declare const entry: {
|
|
|
175
175
|
* SECURITY-CRITICAL. A `'use client'` stamp makes every module the entry reaches
|
|
176
176
|
* client code *by declaration*, so anything in that graph ships to visitors and
|
|
177
177
|
* has its `NEXT_PUBLIC_*` reads inlined as literals. `articles/index` (now `articles/index`)
|
|
178
|
-
* reaching `articles/server-core` this way
|
|
179
|
-
* public `.next/static/chunks/` file of
|
|
178
|
+
* reaching `articles/server-core` this way would put a raw `sonor_` project key in a
|
|
179
|
+
* public `.next/static/chunks/` file of the site's build.
|
|
180
180
|
*
|
|
181
181
|
* `./client-entry-boundary.test.ts` asserts none of these can reach a
|
|
182
182
|
* `server-only` module. Add new client entries HERE — that keeps the stamp and
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @sonordev/site-kit shared: how a popup behaves as a dialog.
|
|
3
|
+
*
|
|
4
|
+
* SINGLE SOURCE OF TRUTH for popup focus and Escape. PopupBlocks (Website →
|
|
5
|
+
* Popups & Banners) calls usePopupDialog. Don't hand-roll another keydown
|
|
6
|
+
* listener or focus trap.
|
|
7
|
+
*
|
|
8
|
+
* - Escape closes, whatever the placement.
|
|
9
|
+
* - A modal popup takes focus when it opens (the dialog element itself, so a
|
|
10
|
+
* screen reader announces its name first; Tab then reaches its controls),
|
|
11
|
+
* keeps Tab inside, and hands focus back to where it was when it closes.
|
|
12
|
+
* - A non-modal one (a bar, a slide-in) leaves focus where it is.
|
|
13
|
+
*
|
|
14
|
+
* React only: no Next imports and no other site-kit imports, because Sonor's
|
|
15
|
+
* popup builder renders PopupBlocks too, from a copy of these files.
|
|
16
|
+
*/
|
|
17
|
+
import { type RefObject } from 'react';
|
|
18
|
+
export interface PopupDialogOptions {
|
|
19
|
+
/** False for a render that isn't live on the page (the builder preview). Default true. */
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
/** Takes focus, keeps Tab inside and returns focus on close. */
|
|
22
|
+
modal: boolean;
|
|
23
|
+
/** Escape calls it. */
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
}
|
|
26
|
+
/** Dialog behavior for the popup whose panel (the role="dialog" element) is `panelRef`. */
|
|
27
|
+
export declare function usePopupDialog(panelRef: RefObject<HTMLElement | null>, { enabled, modal, onClose }: PopupDialogOptions): void;
|
package/dist/shared/frame.d.ts
CHANGED
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* ─── Why it exists ─────────────────────────────────────────────────────────
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* upforge.io's page to the client's own project. Measured effect, and the
|
|
12
|
+
* Agency case studies embed a client's whole production site in desktop,
|
|
13
|
+
* tablet and mobile iframes, and `proxy/securityHeaders.ts`'s
|
|
14
|
+
* DEFAULT_FRAME_ANCESTORS lets the showcase origins frame every managed site.
|
|
15
|
+
* Inside that frame the client's site loads, hydrates and runs its site-kit
|
|
16
|
+
* modules exactly as it would for a real visitor: a screenshot overlay covers
|
|
17
|
+
* the PIXELS, not the JavaScript. Anything that phones home from there is
|
|
18
|
+
* attributing a visit to the portfolio page to the client's own project. Measured effect, and the
|
|
20
19
|
* analytics decision built on this: `analytics/send-gate.ts`.
|
|
21
20
|
*
|
|
22
21
|
* ─── Detection ─────────────────────────────────────────────────────────────
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
*
|
|
47
46
|
* Nesting resolves the way you would want, because these compare against
|
|
48
47
|
* `window.top` and not `window.parent`: a same-origin frame nested inside a
|
|
49
|
-
* cross-origin one (
|
|
48
|
+
* cross-origin one (portfolio.example → client.com → client.com/widget) is still
|
|
50
49
|
* correctly reported as a cross-origin embed.
|
|
51
50
|
*/
|
|
52
51
|
/**
|