@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
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @sonordev/site-kit/website/popups: what a published popup looks like.
|
|
3
|
+
*
|
|
4
|
+
* Sonor → Website → Popups & Banners. The API serves them from
|
|
5
|
+
* `GET /engage/widget/elements` (its route keeps the retired module's name).
|
|
6
|
+
*/
|
|
7
|
+
import type { PopupBlock } from './contract';
|
|
8
|
+
/** What Sonor says a popup is. A blocks popup's `layout` says where it actually sits. */
|
|
9
|
+
export type SitePopupType = 'popup' | 'nudge' | 'bar' | 'chat' | 'slide-in';
|
|
10
|
+
/** A popup, banner or toast published for this site (Sonor → Website → Popups & Banners). */
|
|
11
|
+
export interface SitePopup {
|
|
12
|
+
id: string;
|
|
13
|
+
project_id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
type: SitePopupType;
|
|
16
|
+
config: SitePopupConfig;
|
|
17
|
+
targeting: SitePopupTargeting;
|
|
18
|
+
trigger: SitePopupTrigger;
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
priority: number;
|
|
21
|
+
created_at: string;
|
|
22
|
+
updated_at: string;
|
|
23
|
+
/**
|
|
24
|
+
* The popup as blocks, drawn in the site's own design by PopupBlocks. A
|
|
25
|
+
* popup without blocks isn't drawn: Sonor's older `design_json` (Engage
|
|
26
|
+
* Studio) is for site-kits before 7.2.0, and is ignored here.
|
|
27
|
+
*/
|
|
28
|
+
blocks?: PopupBlock[];
|
|
29
|
+
/**
|
|
30
|
+
* Where a blocks popup sits. `type`/`config` describe it for older kits
|
|
31
|
+
* (which can't pin a bar to the bottom); this says what it actually is.
|
|
32
|
+
*/
|
|
33
|
+
layout?: {
|
|
34
|
+
placement: 'popup' | 'bar' | 'slide-in';
|
|
35
|
+
edge?: 'top' | 'bottom';
|
|
36
|
+
corner?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
37
|
+
/** The popup's own accent, over the site's. */
|
|
38
|
+
accent?: string;
|
|
39
|
+
};
|
|
40
|
+
status?: 'draft' | 'published' | 'archived' | 'paused';
|
|
41
|
+
}
|
|
42
|
+
export interface SitePopupConfig {
|
|
43
|
+
/** Visual style */
|
|
44
|
+
theme?: 'light' | 'dark' | 'custom';
|
|
45
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
46
|
+
/** Content */
|
|
47
|
+
title?: string;
|
|
48
|
+
message?: string;
|
|
49
|
+
imageUrl?: string;
|
|
50
|
+
/** CTA */
|
|
51
|
+
ctaText?: string;
|
|
52
|
+
ctaUrl?: string;
|
|
53
|
+
ctaAction?: 'link' | 'close' | 'form' | 'chat';
|
|
54
|
+
/** Form (if ctaAction is 'form') */
|
|
55
|
+
formId?: string;
|
|
56
|
+
/** Styling */
|
|
57
|
+
backgroundColor?: string;
|
|
58
|
+
textColor?: string;
|
|
59
|
+
ctaBackgroundColor?: string;
|
|
60
|
+
ctaTextColor?: string;
|
|
61
|
+
borderRadius?: number;
|
|
62
|
+
/** Behavior */
|
|
63
|
+
closable?: boolean;
|
|
64
|
+
showOverlay?: boolean;
|
|
65
|
+
overlayOpacity?: number;
|
|
66
|
+
}
|
|
67
|
+
export interface SitePopupTargeting {
|
|
68
|
+
/** Page targeting */
|
|
69
|
+
pages?: {
|
|
70
|
+
include?: string[];
|
|
71
|
+
exclude?: string[];
|
|
72
|
+
};
|
|
73
|
+
/** Device targeting */
|
|
74
|
+
devices?: ('desktop' | 'mobile' | 'tablet')[];
|
|
75
|
+
/** Visitor targeting */
|
|
76
|
+
visitor?: {
|
|
77
|
+
type?: 'new' | 'returning' | 'all';
|
|
78
|
+
minSessions?: number;
|
|
79
|
+
maxSessions?: number;
|
|
80
|
+
};
|
|
81
|
+
/** Source targeting */
|
|
82
|
+
source?: {
|
|
83
|
+
utm_source?: string[];
|
|
84
|
+
utm_medium?: string[];
|
|
85
|
+
utm_campaign?: string[];
|
|
86
|
+
referrer?: string[];
|
|
87
|
+
};
|
|
88
|
+
/** Time targeting */
|
|
89
|
+
schedule?: {
|
|
90
|
+
startDate?: string;
|
|
91
|
+
endDate?: string;
|
|
92
|
+
daysOfWeek?: number[];
|
|
93
|
+
startTime?: string;
|
|
94
|
+
endTime?: string;
|
|
95
|
+
timezone?: string;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export interface SitePopupTrigger {
|
|
99
|
+
type: 'immediate' | 'delay' | 'scroll' | 'exit-intent' | 'click' | 'custom';
|
|
100
|
+
/** Delay in seconds (for 'delay' type) */
|
|
101
|
+
delay?: number;
|
|
102
|
+
/** Scroll percentage (for 'scroll' type) */
|
|
103
|
+
scrollPercentage?: number;
|
|
104
|
+
/** CSS selector (for 'click' type) */
|
|
105
|
+
clickSelector?: string;
|
|
106
|
+
/** Custom event name (for 'custom' type) */
|
|
107
|
+
customEvent?: string;
|
|
108
|
+
/** Frequency capping */
|
|
109
|
+
frequency?: {
|
|
110
|
+
type: 'always' | 'once' | 'once-per-session' | 'every-n-days';
|
|
111
|
+
days?: number;
|
|
112
|
+
};
|
|
113
|
+
}
|
package/dist/website/popups.d.ts
CHANGED
|
@@ -7,11 +7,7 @@
|
|
|
7
7
|
* import it to place it yourself. `PopupBlocks` is the renderer, for drawing
|
|
8
8
|
* one popup from its blocks.
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
import { EngageWidget } from '../engage/EngageWidget';
|
|
12
|
-
export type SitePopupsProps = Omit<React.ComponentProps<typeof EngageWidget>, 'chatEnabled'>;
|
|
13
|
-
/** The site's published popups, banners and toasts. No chat launcher (that's `./chat`). */
|
|
14
|
-
export declare function SitePopups(props: SitePopupsProps): React.JSX.Element;
|
|
10
|
+
export { SitePopups, type SitePopupsProps } from './SitePopups';
|
|
15
11
|
export { PopupBlocks, DEFAULT_POPUP_TOKENS, type PopupBlocksProps, type PopupPlacement } from './PopupBlocks';
|
|
16
|
-
export type {
|
|
12
|
+
export type { SitePopup, SitePopupConfig, SitePopupTargeting, SitePopupTrigger, SitePopupType, } from './popup-types';
|
|
17
13
|
export type { PopupBlock, SiteDesignTokens } from './contract';
|
package/dist/website/popups.js
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { DEFAULT_POPUP_TOKENS, PopupBlocks } from '../chunk-
|
|
2
|
+
export { DEFAULT_POPUP_TOKENS, PopupBlocks } from '../chunk-BF7TZYC3.js';
|
|
3
3
|
import '../chunk-IHG36STL.js';
|
|
4
|
-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-6T6CQVNL.js';
|
|
4
|
+
export { SitePopups } from '../chunk-EJVQJCG5.js';
|
|
5
|
+
import '../chunk-27FISYK4.js';
|
|
7
6
|
import '../chunk-S22FSH7C.js';
|
|
8
7
|
import '../chunk-24QZEO3Q.js';
|
|
9
8
|
import '../chunk-GJWI74ZZ.js';
|
|
10
9
|
import '../chunk-43OCZ3JA.js';
|
|
11
10
|
import '../chunk-EKBEOXTH.js';
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-D6ZC7XKZ.js';
|
|
12
|
+
import '../chunk-K4ZHAURD.js';
|
|
13
|
+
import '../chunk-F24FNCTK.js';
|
|
15
14
|
import '../chunk-PKBMQBKP.js';
|
|
16
|
-
import { jsx } from 'react/jsx-runtime';
|
|
17
|
-
|
|
18
|
-
function SitePopups(props) {
|
|
19
|
-
return /* @__PURE__ */ jsx(EngageWidget, { ...props, chatEnabled: false });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { SitePopups };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { writeLLMsTxtToPublic } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { writeLLMsTxtToPublic } from './chunk-QL6XNPSD.js';
|
|
2
|
+
import './chunk-6U3VLV2C.js';
|
|
3
3
|
import './chunk-L5UOHS6E.js';
|
|
4
4
|
import './chunk-WMVK77ND.js';
|
|
5
5
|
import './chunk-VX5CMNMM.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-NZ4RXN3G.js';
|
|
7
7
|
import './chunk-MJP63SSS.js';
|
|
8
8
|
import './chunk-YVKRYQRG.js';
|
|
9
9
|
import './chunk-FESKKJAS.js';
|
package/docs/MIGRATING-TO-7.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Moving a site to site-kit 7
|
|
2
2
|
|
|
3
3
|
site-kit 7 is organised the way Sonor's dashboard is: one entry per module.
|
|
4
|
-
Most sites need no changes at all. Move a site when you next touch it
|
|
5
|
-
|
|
4
|
+
Most sites need no changes at all. Move a site when you next touch it;
|
|
5
|
+
nothing forces it before then, because a
|
|
6
6
|
site's `^6` range never picks up 7.
|
|
7
7
|
|
|
8
8
|
## The short version
|
|
@@ -20,7 +20,14 @@ idempotent: running it twice changes nothing the second time. It works from
|
|
|
20
20
|
any 2.x-6.x site: copies of sites on 4.2, 5.8 and 6.5 were migrated with it
|
|
21
21
|
and built.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
It leaves nothing in the project but the change. Since sonor-setup 7.1.2 the
|
|
24
|
+
originals of the files it writes go to a folder in your OS temp directory
|
|
25
|
+
(it prints where, and git has them too), not `.bak` files beside them, and
|
|
26
|
+
it never creates or edits `.env.example`: `.env.local` is the one env file.
|
|
27
|
+
An old fallback such as `process.env.SONOR_API_KEY || process.env.UPTRADE_API_KEY`
|
|
28
|
+
becomes `process.env.SONOR_API_KEY`.
|
|
29
|
+
|
|
30
|
+
Requirements: Next 16 and Node 20.19+ or 22.12+
|
|
24
31
|
(Netlify's default is 22).
|
|
25
32
|
|
|
26
33
|
## What changed, and what the codemod does about it
|
|
@@ -48,9 +55,6 @@ keeps type imports on the root. It flags, rather than rewrites, a namespace
|
|
|
48
55
|
import (`import * as SK`), a `require`, or a re-export from the root. The full
|
|
49
56
|
list is `src/shared/module-map.json` (`rootRuntime`).
|
|
50
57
|
|
|
51
|
-
Across our own sites on 2026-09-26 this touched three repos: one for
|
|
52
|
-
`affiliates`, two for `BookingWidget`.
|
|
53
|
-
|
|
54
58
|
### 2. The setup CLI is its own package: `sonor-setup`
|
|
55
59
|
|
|
56
60
|
The CLI (init, scaffold, codemods, OG cards, GEO wiring, verify) was 3 MB of
|
|
@@ -58,10 +62,10 @@ every site's install and forced a site-kit release for every setup-only fix.
|
|
|
58
62
|
It's now [`sonor-setup`](../packages/sonor-setup).
|
|
59
63
|
|
|
60
64
|
- **`npx sonor-setup …` keeps working unchanged:** npx fetches the package.
|
|
61
|
-
- **A site whose package.json scripts run `sonor-setup`** (
|
|
62
|
-
|
|
65
|
+
- **A site whose package.json scripts run `sonor-setup`** (an OG step that
|
|
66
|
+
runs `sonor-setup og`, say) needs it as a dev dependency. The codemod adds
|
|
63
67
|
`"sonor-setup": "^7.0.0"` for you.
|
|
64
|
-
- **`sonor-register-sitemap` stays in site-kit**, since
|
|
68
|
+
- **`sonor-register-sitemap` stays in site-kit**, since sites run it from
|
|
65
69
|
their postbuild. Nothing to change.
|
|
66
70
|
- The `site-kit` bin alias for the CLI is gone (no site used it).
|
|
67
71
|
|
|
@@ -71,30 +75,46 @@ New homes, each the same module as before:
|
|
|
71
75
|
|
|
72
76
|
- Website: `./website/{popups,images,slots,cms,landing,cta-bar}`
|
|
73
77
|
- SEO: `./seo/{sitemap,robots,indexnow,redirects,og,og/route,llms,llms/client,llms/contract,meta/contract,pages/contract}`
|
|
74
|
-
- Website chat: `./chat` (out of
|
|
78
|
+
- Website chat: `./chat`, and popups: `./website/popups` (both out of
|
|
79
|
+
`./engage`, which Sonor retired with the Engage module)
|
|
75
80
|
|
|
76
81
|
**The old paths keep working through 7.x** and are removed in 8.0. The
|
|
77
|
-
codemod moves them anyway, so a touched site is done in one pass
|
|
78
|
-
|
|
79
|
-
(`
|
|
82
|
+
codemod moves them anyway, so a touched site is done in one pass: chat
|
|
83
|
+
imports go to `./chat`, popup types to `./website/popups` under their new
|
|
84
|
+
names (`EngageElement` is `SitePopup`). It flags `EngageWidget`, which draws
|
|
85
|
+
both and which `SiteKitLayout` already mounts. `SiteKitLayout` gains `chat`
|
|
86
|
+
and `popups` props; `engage` is an alias (`engage={false}` still turns both
|
|
87
|
+
off). Since 7.2.0, popups render only from blocks: one made in Engage Studio
|
|
88
|
+
isn't drawn, so make it again in Sonor (Website → Popups & Banners).
|
|
80
89
|
|
|
81
90
|
### 4. ESM only, Next 16 only
|
|
82
91
|
|
|
83
92
|
site-kit ships ES modules alone (`"type": "module"`). Next, Turbopack and the
|
|
84
93
|
kits don't notice. Node 20.19+/22.12+ can `require()` it too, so a
|
|
85
94
|
`next.config.ts` that imports `@sonordev/site-kit/config` keeps working. A
|
|
86
|
-
site-side script that `require()`s site-kit on an older Node would break
|
|
87
|
-
in the fleet does.
|
|
95
|
+
site-side script that `require()`s site-kit on an older Node would break.
|
|
88
96
|
|
|
89
97
|
The `next` peer is `^16`. Next 16 renamed `middleware.ts` to `proxy.ts`, and
|
|
90
98
|
**the codemod moves it**: the file, a named `middleware` export (to `proxy`),
|
|
91
99
|
and `createMiddleware` from `@sonordev/site-kit/middleware` (to `createProxy`
|
|
92
|
-
from `/proxy`). The old names work through 7.x.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
from `/proxy`). The old names work through 7.x.
|
|
101
|
+
|
|
102
|
+
**The proxy goes beside the app directory.** Next reads it from the project
|
|
103
|
+
root, or from `src/` when the app is `src/app`, and silently ignores one
|
|
104
|
+
anywhere else: the build passes, but the site sends no security headers and
|
|
105
|
+
runs no managed redirects. So on a `src/app` site the codemod writes
|
|
106
|
+
`src/proxy.ts`, with the file's relative imports re-pointed. Before
|
|
107
|
+
sonor-setup 7.1.2 it renamed the file in place, which left a root `proxy.ts`
|
|
108
|
+
on those sites; rerunning the codemod moves it, and `npx sonor-setup doctor`
|
|
109
|
+
warns about any proxy Next doesn't read.
|
|
110
|
+
|
|
111
|
+
It won't move a file that sets `runtime` (a proxy file can't; the build
|
|
112
|
+
throws), and says so: remove the export, check the logic still runs on your
|
|
113
|
+
host, rerun. It never moves onto a proxy Next already runs: with one in each
|
|
114
|
+
place, it reports both and changes neither. `npx sonor-setup next16` runs
|
|
115
|
+
just this part.
|
|
96
116
|
|
|
97
|
-
### 5. Removed (
|
|
117
|
+
### 5. Removed (nothing used them)
|
|
98
118
|
|
|
99
119
|
- `@sonordev/site-kit/search` and `/search/contract`
|
|
100
120
|
- `@sonordev/site-kit/redirects/not-found` (`resolveManagedRedirect`), and
|
|
@@ -123,7 +143,7 @@ Still accepted and ignored until 8.0, because sites pass them:
|
|
|
123
143
|
`.env.local`, `.env.production`, `.env`. It used to let `.env.local` beat
|
|
124
144
|
the host.
|
|
125
145
|
|
|
126
|
-
## Optional, and new in 7.
|
|
146
|
+
## Optional, and new in 7.x
|
|
127
147
|
|
|
128
148
|
- **Cache Components.** `cacheComponents: true` in next.config works with
|
|
129
149
|
site-kit now (it failed every page through 6.x). Remove route segment
|
|
@@ -133,11 +153,19 @@ Still accepted and ignored until 8.0, because sites pass them:
|
|
|
133
153
|
reviews; inquiries, availability and offerings when you ask), the server
|
|
134
154
|
card, and on Netlify the rate-limited relay. Sonor's AI Visibility tab then
|
|
135
155
|
shows which agents used them. A site that already runs its own MCP server
|
|
136
|
-
(
|
|
156
|
+
(a hand-written one) is left exactly as it is:
|
|
137
157
|
nothing in 7.0 turns anything on for it. To have Sonor see its calls, add
|
|
138
158
|
`onToolCall: reportToolCallsToSonor()` to its `createMcpHandler`.
|
|
139
159
|
- **`@sonordev/contracts`** is for the APIs and the dashboard; sites keep
|
|
140
160
|
importing `@sonordev/site-kit/*/contract`, which is the same code.
|
|
161
|
+
- **Live updates (7.1).** `npx sonor-setup scaffold` writes the route Sonor
|
|
162
|
+
calls when content changes, `app/api/seo-revalidate/route.ts`, and
|
|
163
|
+
`npx sonor-setup doctor` checks for it. A site with articles gets
|
|
164
|
+
`createRevalidateRoute({ publicationBasePath: '/insights' })` with its own
|
|
165
|
+
path, read from the app directory (a dynamic page that renders site-kit
|
|
166
|
+
articles, or a `[slug]` route under a folder like `/blog` or `/news`).
|
|
167
|
+
When more than one folder looks like the publication, it writes the
|
|
168
|
+
one-line route and lists them.
|
|
141
169
|
|
|
142
170
|
## Kits built on site-kit
|
|
143
171
|
|
package/docs.json
CHANGED
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"title": "Engagement",
|
|
39
39
|
"pages": [
|
|
40
40
|
{ "slug": "forms", "title": "Forms", "file": "src/forms/README.md" },
|
|
41
|
-
{ "slug": "chat", "title": "Website chat", "file": "src/
|
|
41
|
+
{ "slug": "chat", "title": "Website chat", "file": "src/chat/README.md" },
|
|
42
|
+
{ "slug": "popups", "title": "Popups and banners", "file": "src/website/README.md" },
|
|
42
43
|
{ "slug": "cta-bar", "title": "CTA bar", "file": "src/cta-bar/README.md" },
|
|
43
44
|
{ "slug": "signal", "title": "Signal (A/B)", "file": "src/signal/README.md" }
|
|
44
45
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonordev/site-kit",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "pnpm@11.5.3",
|
|
6
6
|
"description": "Complete client-side integration kit for Sonor - SEO, Analytics, Engage, Forms, Blog",
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
"gsap": "^3.15.0",
|
|
462
462
|
"happy-dom": "^20.14.5",
|
|
463
463
|
"inquirer": "^14.0.2",
|
|
464
|
-
"next": "16.3.
|
|
464
|
+
"next": "16.3.8",
|
|
465
465
|
"open": "11.0.0",
|
|
466
466
|
"ora": "^9.4.1",
|
|
467
467
|
"playwright": "^1.62.1",
|
package/src/admin-auth/README.md
CHANGED
|
@@ -11,7 +11,7 @@ admins) can sign in; nobody else can. There are no passwords on the site.
|
|
|
11
11
|
import { createSonorSso } from '@sonordev/site-kit/admin-auth'
|
|
12
12
|
|
|
13
13
|
export const sso = createSonorSso({
|
|
14
|
-
paths: '/admin', // or ['/
|
|
14
|
+
paths: '/admin', // or ['/admin', '/staff'] for several areas
|
|
15
15
|
// loginPath: '/admin/login' (default: `${paths[0]}/login`)
|
|
16
16
|
// adminEmails: process.env.ADMIN_EMAILS,
|
|
17
17
|
})
|
|
@@ -62,8 +62,8 @@ const session = await sso.getSession()
|
|
|
62
62
|
if (!session) return new Response('Unauthorized', { status: 401 })
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
JSON endpoints can be guarded in the middleware too: pass
|
|
66
|
+
`apiPaths: ['/api/admin']` and include them in the matcher. They get a
|
|
67
67
|
401 JSON response instead of a redirect.
|
|
68
68
|
|
|
69
69
|
## Env
|
package/src/analytics/README.md
CHANGED
|
@@ -178,14 +178,12 @@ events or conversions. The visitor is on whoever framed the page, not on this
|
|
|
178
178
|
site, so every metric the frame produces is phantom traffic in the analytics
|
|
179
179
|
its owner reads.
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
study. The screenshot overlay in those frames hides the pixels, not the
|
|
188
|
-
JavaScript.
|
|
181
|
+
A portfolio page that shows a live site in desktop, tablet and mobile frames
|
|
182
|
+
is the common case, and `securityHeaders`' `DEFAULT_FRAME_ANCESTORS` permits
|
|
183
|
+
it. Without the guard, one visit to that page would record three views of `/`
|
|
184
|
+
on the framed site, milliseconds apart, sharing one session and visitor id,
|
|
185
|
+
with the portfolio as the referrer. A screenshot laid over the frames hides
|
|
186
|
+
the pixels, not the JavaScript.
|
|
189
187
|
|
|
190
188
|
**Same-origin frames still report.** A site embedding itself (a preview pane,
|
|
191
189
|
a print view, an on-domain booking frame) has a real visitor really on that
|
|
@@ -214,7 +212,7 @@ with `analytics.site` or `NEXT_PUBLIC_SITE_URL` set to a production domain.
|
|
|
214
212
|
`localhost`, its subdomains, `127.0.0.1`, `[::1]`, and `0.0.0.0` report nothing
|
|
215
213
|
by default: page views, events, conversions, sessions, vitals, scroll and
|
|
216
214
|
heatmap data, fleet heartbeats, and client-side sitemap registrations all use
|
|
217
|
-
`resolveAnalyticsTarget`.
|
|
215
|
+
`resolveAnalyticsTarget`. Website chat and popups don't mount at all.
|
|
218
216
|
Public hosts and same-origin frames on public hosts still report normally.
|
|
219
217
|
|
|
220
218
|
For intentional local reporting:
|
|
@@ -224,7 +222,7 @@ For intentional local reporting:
|
|
|
224
222
|
```
|
|
225
223
|
|
|
226
224
|
The layout passes this option to AnalyticsProvider, WebVitals, FleetHeartbeat,
|
|
227
|
-
SitemapSync and
|
|
225
|
+
SitemapSync, SiteChat and SitePopups. Standalone components and `sendFleetHeartbeat`
|
|
228
226
|
accept it too; standalone `trackEvent`/`trackConversion` use their mounted
|
|
229
227
|
AnalyticsProvider's options. A local cross-origin frame needs **both** opt-ins.
|
|
230
228
|
Neither option bypasses authentication. No environment variable or global
|
|
@@ -241,7 +239,7 @@ Uses `SONOR_API_KEY` (injected by `SiteKitLayout`) or `window.__SITE_KIT_API_KEY
|
|
|
241
239
|
## Multi-site projects (`analytics.site`)
|
|
242
240
|
|
|
243
241
|
A single Sonor project can host many sub-sites (e.g. one project hosting
|
|
244
|
-
example.com +
|
|
242
|
+
example.com + a dozen regional microsites). Every analytics event is
|
|
245
243
|
tagged with the sub-site host so the dashboard can roll up + filter per
|
|
246
244
|
site without forcing each microsite into its own Sonor project.
|
|
247
245
|
|
package/src/articles/README.md
CHANGED
|
@@ -17,12 +17,12 @@ import type { PublicationRoutingOptions } from '@sonordev/site-kit/articles/serv
|
|
|
17
17
|
|
|
18
18
|
const siteUrl = 'https://example.com'
|
|
19
19
|
const routing = {
|
|
20
|
-
basePath: '/
|
|
20
|
+
basePath: '/journal',
|
|
21
21
|
includeCategoryInPath: true,
|
|
22
|
-
categoryPath: (slug: string) => `/
|
|
22
|
+
categoryPath: (slug: string) => `/journal?category=${encodeURIComponent(slug)}`,
|
|
23
23
|
} satisfies PublicationRoutingOptions
|
|
24
24
|
|
|
25
|
-
// Cards, related stories and cluster links now use /
|
|
25
|
+
// Cards, related stories and cluster links now use /journal/category/slug.
|
|
26
26
|
const article = <Article slug="build-first" routing={routing} />
|
|
27
27
|
const archive = <ArticleList routing={routing} />
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ const archive = <ArticleList routing={routing} />
|
|
|
30
30
|
const metadata = await generateArticleMetadata('build-first', { siteUrl, ...routing })
|
|
31
31
|
const post = await getArticle('build-first')
|
|
32
32
|
const schema = post ? generateArticleSchema(post, { siteUrl, ...routing }) : null
|
|
33
|
-
// In app/
|
|
33
|
+
// In app/journal/[category]/[slug]/page.tsx, wrap it to pass the routing:
|
|
34
34
|
// export function generateStaticParams() { return generateArticleStaticParams(routing) }
|
|
35
35
|
const params = await generateArticleStaticParams(routing) // { category, slug }[]
|
|
36
36
|
const sitemap = await generateArticleSitemap(siteUrl, {
|
|
@@ -38,7 +38,7 @@ const sitemap = await generateArticleSitemap(siteUrl, {
|
|
|
38
38
|
includeCategories: false, // category filters don't need separate sitemap entries
|
|
39
39
|
includeClusters: false, // enable when your site implements cluster routes
|
|
40
40
|
})
|
|
41
|
-
const rss = await generateRssFeed({ siteUrl, siteName: 'The
|
|
41
|
+
const rss = await generateRssFeed({ siteUrl, siteName: 'The Journal', ...routing })
|
|
42
42
|
const href = createPublicationRoutes(routing).post({ slug: 'build-first', category: 'guides' })
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -47,7 +47,10 @@ const href = createPublicationRoutes(routing).post({ slug: 'build-first', catego
|
|
|
47
47
|
provide `postPath: post => '/articles/' + encodeURIComponent(post.slug)`.
|
|
48
48
|
Callbacks return local paths; generated metadata, feeds, and sitemaps separately
|
|
49
49
|
honor a valid `canonical_url`. The same routes apply to Atom and generated
|
|
50
|
-
breadcrumb/cluster schemas. Supplied `schema`/`schema_json` objects stay intact
|
|
50
|
+
breadcrumb/cluster schemas. Supplied `schema`/`schema_json` objects stay intact, apart
|
|
51
|
+
from template placeholders (an `Organization` named "Example", `example.com` URLs,
|
|
52
|
+
`{post.title}`), which `generateAllArticleSchemas` drops. When nothing real is left,
|
|
53
|
+
it generates the article's schema from its own fields instead.
|
|
51
54
|
|
|
52
55
|
For custom layouts, `resolveArticleArtwork(post, 'article')` prefers
|
|
53
56
|
`editorial_image`, preserving an empty decorative `editorial_image_alt`.
|
|
@@ -107,7 +110,7 @@ export async function generateMetadata() {
|
|
|
107
110
|
|
|
108
111
|
export default function PublicationPage() {
|
|
109
112
|
return (
|
|
110
|
-
<PublicationLayout hero={{ title: 'The
|
|
113
|
+
<PublicationLayout hero={{ title: 'The Journal', subtitle: 'Latest articles' }}>
|
|
111
114
|
<ArticleList showCategoryFilter showPagination />
|
|
112
115
|
</PublicationLayout>
|
|
113
116
|
)
|