@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
package/src/seo/README.md
CHANGED
|
@@ -143,6 +143,8 @@ It renders one `application/ld+json` script (an `@graph` when there's more than
|
|
|
143
143
|
- a `BreadcrumbList` built from the path, when there isn't one already and the project has a site URL (skipped on `/`)
|
|
144
144
|
- a speakable `WebPage` or `Article` node, when `speakable`, `pageName` and `pageUrl` are all set
|
|
145
145
|
|
|
146
|
+
Everything Sonor supplies (its schema rows, `managed_schema` and the entity graph) loses any template placeholder first. A node whose values are a template's unfilled slots is dropped: a URL on a reserved example domain (`example.com`), a name like "Example" or "Your Business Name", a placeholder phone such as `+1-000-000-0000`, a slot like `[Resident Name]` or `{plan.name}`, or an object that's only a note about what goes there. Its real siblings and parents stay, so an `FAQPage` keeps its questions when only its publisher was a placeholder, and the `BreadcrumbList` fallback still applies when a placeholder breadcrumb is dropped. Your `additionalSchemas` are never touched. The rule is `@sonordev/contracts/schema-placeholders`.
|
|
147
|
+
|
|
146
148
|
| Prop | Default | Notes |
|
|
147
149
|
|------|---------|-------|
|
|
148
150
|
| `path` | | Required. |
|
|
@@ -157,7 +159,7 @@ It's wrapped in `Suspense`, so the fetch never holds up the rest of the page. Th
|
|
|
157
159
|
|
|
158
160
|
### `<LLMSchema path>`
|
|
159
161
|
|
|
160
|
-
Renders the page's `managed_llm_schema` as a `WebPage` JSON-LD script marked `data-llm-optimized="true"`, linked to the site's `WebSite` node when the project has a site URL. It renders nothing when the page has no LLM schema.
|
|
162
|
+
Renders the page's `managed_llm_schema` as a `WebPage` JSON-LD script marked `data-llm-optimized="true"`, linked to the site's `WebSite` node when the project has a site URL. It renders nothing when the page has no LLM schema, or when that schema is a template placeholder (see `<ManagedSchema>`).
|
|
161
163
|
|
|
162
164
|
### Schema helpers
|
|
163
165
|
|
|
@@ -268,7 +270,7 @@ The SEO module keeps a few lower-level helpers:
|
|
|
268
270
|
|
|
269
271
|
It skips itself when an `app/sitemap` route exists, and it only adds or updates pages unless you pass `--full-replace`.
|
|
270
272
|
|
|
271
|
-
On a multi-site project, each page is tagged with the host it belongs to. The CLI takes it from `NEXT_PUBLIC_SITE_URL` (it loads `.env` and `.env.local`), or from `--site
|
|
273
|
+
On a multi-site project, each page is tagged with the host it belongs to. The CLI takes it from `NEXT_PUBLIC_SITE_URL` (it loads `.env` and `.env.local`), or from `--site ohio.example.com`. It used to send no host at all, so a microsite's pages synced as unattributed.
|
|
272
274
|
|
|
273
275
|
From code, `registerLocalSitemap({ entries?, autoDiscover?, mode?, site? })` on `@sonordev/site-kit/seo/server` does the same and is additive by default.
|
|
274
276
|
|
package/src/slots/README.md
CHANGED
|
@@ -10,7 +10,7 @@ import { ManagedSlot, ManagedRichText, ManagedLink, ManagedList } from '@sonorde
|
|
|
10
10
|
|
|
11
11
|
<h1 className="hero-title">
|
|
12
12
|
<ManagedSlot id="home-hero-headline" page="/">
|
|
13
|
-
New homes in
|
|
13
|
+
New homes in Springfield and beyond
|
|
14
14
|
</ManagedSlot>
|
|
15
15
|
</h1>
|
|
16
16
|
```
|
package/src/sync/README.md
CHANGED
|
@@ -59,6 +59,16 @@ Expired meeting details and time reservations show a recovery action. Guests can
|
|
|
59
59
|
|
|
60
60
|
Navigation is disabled while a reservation or booking request is running. Stale responses cannot reopen a previous step, and holds created after the widget is removed are released.
|
|
61
61
|
|
|
62
|
+
## Accessibility
|
|
63
|
+
|
|
64
|
+
Screen readers and AI agent browsers (which act on elements by their accessible names) can book without guessing:
|
|
65
|
+
|
|
66
|
+
- **Days** are buttons named with the full date, year included: "Wednesday, October 7, 2026". The picked day is pressed (`aria-pressed="true"`), and days that can't be booked are disabled.
|
|
67
|
+
- **Times** are buttons named with the time and the date, "10:30 AM, Wednesday, October 7, 2026", in the booking's time zone. They still show just the time. The picked time is pressed.
|
|
68
|
+
- **Confirm**, the button that reserves the picked time, is named "Confirm 10:30 AM, Wednesday, October 7, 2026".
|
|
69
|
+
|
|
70
|
+
Every name contains what its button shows (a time's and Confirm's start with it), so voice control can still target a button by its visible text (WCAG 2.5.3). None of this changes what the widget sends.
|
|
71
|
+
|
|
62
72
|
## API Functions
|
|
63
73
|
|
|
64
74
|
```ts
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Popups and banners — `@sonordev/site-kit/website/popups`
|
|
2
|
+
|
|
3
|
+
The popups, banners and toasts you publish in Sonor (Website → Popups &
|
|
4
|
+
Banners), shown on your site where and when you set them, in the site's own
|
|
5
|
+
design.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
`SiteKitLayout` mounts it for you, after the page goes idle:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
<SiteKitLayout>{children}</SiteKitLayout> // popups on (default)
|
|
13
|
+
<SiteKitLayout popups={false}>{children}</SiteKitLayout> // no popups
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
On a site without `SiteKitLayout`, mount `SitePopups` the same way:
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
'use client'
|
|
20
|
+
import { SitePopups } from '@sonordev/site-kit/website/popups'
|
|
21
|
+
|
|
22
|
+
export function Popups() {
|
|
23
|
+
return <SitePopups />
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
A project with nothing published costs one request and draws nothing. The
|
|
28
|
+
renderer downloads only when a popup is about to open.
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
interface SitePopupsProps {
|
|
34
|
+
apiUrl?: string // Default: from SiteKitLayout, else https://api.sonor.io
|
|
35
|
+
apiKey?: string // Default: from SiteKitLayout
|
|
36
|
+
zIndex?: number // The layer popups, banners and toasts sit on. Default: 9999
|
|
37
|
+
allowInFrame?: boolean // Show inside a cross-origin frame. Default: false
|
|
38
|
+
allowLocalhost?: boolean // Show on localhost. Default: false
|
|
39
|
+
debug?: boolean
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Through `SiteKitLayout`, `zIndex` comes from `chat={{ zIndex }}`, so the chat
|
|
44
|
+
launcher and popups share one layer.
|
|
45
|
+
|
|
46
|
+
## What shows
|
|
47
|
+
|
|
48
|
+
Each popup is a set of blocks (heading, formatted text, image, button,
|
|
49
|
+
divider) drawn in your site's design: its colors, fonts, radius and buttons.
|
|
50
|
+
`SiteKitLayout` measures the design from the home page at idle and reports it
|
|
51
|
+
to Sonor, so the popup builder previews popups the way they'll look. Its
|
|
52
|
+
`design` prop declares any part of it yourself
|
|
53
|
+
(`design={{ primary: 'var(--brand)', fontHeading: 'Fraunces, serif' }}`).
|
|
54
|
+
|
|
55
|
+
| Placement | What it is |
|
|
56
|
+
|-----------|------------|
|
|
57
|
+
| Popup | Centred over a dimmed page. One at a time: a second waits until the first closes |
|
|
58
|
+
| Banner | A bar along the top or bottom edge |
|
|
59
|
+
| Toast | A small card in a corner (slide-in) |
|
|
60
|
+
|
|
61
|
+
## Targeting and triggers
|
|
62
|
+
|
|
63
|
+
All set in Sonor, no code changes:
|
|
64
|
+
|
|
65
|
+
- **Pages**: include and exclude paths, with `*` for a prefix (`/services/*`)
|
|
66
|
+
- **Devices**: desktop, mobile, tablet
|
|
67
|
+
- **Schedule**: start and end dates
|
|
68
|
+
- **Trigger**: immediately, after a delay, at a scroll depth, or on exit intent
|
|
69
|
+
- **Frequency**: once, once per session, or every N days. Closing a popup and
|
|
70
|
+
pressing its button both count as seen.
|
|
71
|
+
|
|
72
|
+
A popup targeted at one page leaves when the visitor navigates away from it.
|
|
73
|
+
|
|
74
|
+
### Popups wait for forms
|
|
75
|
+
|
|
76
|
+
A popup or toast that opens on its own first checks whether the visitor is in
|
|
77
|
+
the middle of a form, and waits while they are. Mid-form means:
|
|
78
|
+
|
|
79
|
+
- focus is in a form field, or in a card field embedded in a form;
|
|
80
|
+
- a form has a field they've filled in and haven't sent yet;
|
|
81
|
+
- a site-kit form is sending.
|
|
82
|
+
|
|
83
|
+
It opens a moment after focus leaves the form, or once the form has been sent
|
|
84
|
+
and cleared. It never gives up: while the visitor stays mid-form, it keeps
|
|
85
|
+
waiting. Banners show at once, since they don't take focus or hide the page.
|
|
86
|
+
|
|
87
|
+
Why it matters: a modal popup takes focus and hides the rest of the page from
|
|
88
|
+
assistive technology while it's open. Opening one mid-form throws a person out
|
|
89
|
+
of the field they're typing in, and an AI agent browser filling the form for
|
|
90
|
+
someone (agents act on the accessibility tree) loses every field it was about
|
|
91
|
+
to fill.
|
|
92
|
+
|
|
93
|
+
## Accessibility
|
|
94
|
+
|
|
95
|
+
Popups, toasts and banners are built so people and agent browsers can find
|
|
96
|
+
them and their controls by name:
|
|
97
|
+
|
|
98
|
+
- **A popup** is a modal dialog (`role="dialog"`, `aria-modal="true"`) named
|
|
99
|
+
by its heading. It takes focus when it opens, keeps Tab inside, closes on
|
|
100
|
+
Escape or a click outside it, and puts focus back where it was.
|
|
101
|
+
- **A toast** is a named, non-modal dialog, and **a banner** is a named
|
|
102
|
+
region. Both close on Escape and leave focus where it is.
|
|
103
|
+
- **Close buttons are named "Close"**, whatever they show.
|
|
104
|
+
|
|
105
|
+
## Tracking
|
|
106
|
+
|
|
107
|
+
Each popup's impression (once half of it is on screen) and button presses are
|
|
108
|
+
counted in Sonor, against the same visitor ID (`_sk_vid`) analytics uses.
|
|
109
|
+
|
|
110
|
+
## Drawing one popup yourself
|
|
111
|
+
|
|
112
|
+
`PopupBlocks` is the renderer `SitePopups` uses, for drawing one popup from
|
|
113
|
+
its blocks (a preview, a custom placement):
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import { PopupBlocks } from '@sonordev/site-kit/website/popups'
|
|
117
|
+
|
|
118
|
+
<PopupBlocks
|
|
119
|
+
blocks={[{ type: 'heading', text: 'Spring cleanups are booking' }]}
|
|
120
|
+
placement="popup"
|
|
121
|
+
onClose={() => setOpen(false)}
|
|
122
|
+
/>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`inline` renders it in place, without the overlay or focus handling.
|
|
126
|
+
|
|
127
|
+
## Engage (retired)
|
|
128
|
+
|
|
129
|
+
Engage was retired in Sonor, and its popups with it. Popups made in Engage
|
|
130
|
+
Studio (a `design_json` without blocks) aren't drawn by site-kit 7.2 or later;
|
|
131
|
+
make them again in Website → Popups & Banners. `@sonordev/site-kit/engage`
|
|
132
|
+
still builds through 7.x: its `EngageWidget` draws `SitePopups` and the
|
|
133
|
+
website chat.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { ChatWidget, EchoChat, isChatEnabled } from './chunk-V4HUSHZO.js';
|
|
2
|
-
import './chunk-JE4A5S4F.js';
|
|
3
|
-
import './chunk-NDF4A5JM.js';
|
|
4
|
-
import './chunk-6T6CQVNL.js';
|
|
5
|
-
import './chunk-NEKEH4CK.js';
|
|
6
|
-
import './chunk-AQSNPZY4.js';
|
|
7
|
-
import './chunk-5SQK3D53.js';
|
|
8
|
-
import './chunk-NJCTQH2P.js';
|
|
9
|
-
import './chunk-S22FSH7C.js';
|
|
10
|
-
import './chunk-L2V5PUFN.js';
|
|
11
|
-
import './chunk-GJWI74ZZ.js';
|
|
12
|
-
import './chunk-PXZ7LAOY.js';
|
|
13
|
-
import './chunk-OUNRFXDC.js';
|
|
14
|
-
import './chunk-6OL23QYD.js';
|
|
15
|
-
import './chunk-PKBMQBKP.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { EngageWidget } from './chunk-B73QPZPH.js';
|
|
2
|
-
import './chunk-NDF4A5JM.js';
|
|
3
|
-
import './chunk-6T6CQVNL.js';
|
|
4
|
-
import './chunk-24QZEO3Q.js';
|
|
5
|
-
import './chunk-GJWI74ZZ.js';
|
|
6
|
-
import './chunk-43OCZ3JA.js';
|
|
7
|
-
import './chunk-EKBEOXTH.js';
|
|
8
|
-
import './chunk-PXZ7LAOY.js';
|
|
9
|
-
import './chunk-OUNRFXDC.js';
|
|
10
|
-
import './chunk-6OL23QYD.js';
|
|
11
|
-
import './chunk-PKBMQBKP.js';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { ManagedForm } from './chunk-EQBZ24VH.js';
|
|
2
|
-
import './chunk-JC7KXNNM.js';
|
|
3
|
-
import './chunk-DXO6SBMD.js';
|
|
4
|
-
import './chunk-QPEEKFCA.js';
|
|
5
|
-
import './chunk-NEKEH4CK.js';
|
|
6
|
-
import './chunk-AQSNPZY4.js';
|
|
7
|
-
import './chunk-5SQK3D53.js';
|
|
8
|
-
import './chunk-NJCTQH2P.js';
|
|
9
|
-
import './chunk-L2V5PUFN.js';
|
|
10
|
-
import './chunk-GJWI74ZZ.js';
|
|
11
|
-
import './chunk-PXZ7LAOY.js';
|
|
12
|
-
import './chunk-OUNRFXDC.js';
|
|
13
|
-
import './chunk-6OL23QYD.js';
|
|
14
|
-
import './chunk-PKBMQBKP.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { SitemapSync } from './chunk-KOPVJQ2P.js';
|
|
2
|
-
import './chunk-YVKRYQRG.js';
|
|
3
|
-
import './chunk-43OCZ3JA.js';
|
|
4
|
-
import './chunk-EKBEOXTH.js';
|
|
5
|
-
import './chunk-PXZ7LAOY.js';
|
|
6
|
-
import './chunk-OUNRFXDC.js';
|
|
7
|
-
import './chunk-6OL23QYD.js';
|
|
8
|
-
import './chunk-PKBMQBKP.js';
|