@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,40 @@
|
|
|
1
|
+
import { declarativeToolForm } from './chunk-HW7B43E5.js';
|
|
2
|
+
|
|
3
|
+
// src/forms/webmcp.ts
|
|
4
|
+
var DESCRIPTION_BY_TYPE = {
|
|
5
|
+
prospect: "Send this business an inquiry: a question, a quote request or a project to discuss.",
|
|
6
|
+
contact: "Send this business a message through its contact form.",
|
|
7
|
+
support: "Ask this business for help with an existing order, project or account.",
|
|
8
|
+
feedback: "Send this business feedback.",
|
|
9
|
+
newsletter: "Sign an email address up for this business's newsletter.",
|
|
10
|
+
custom: "Submit this form to the business."
|
|
11
|
+
};
|
|
12
|
+
function formToolName(config) {
|
|
13
|
+
const base = String(config.slug || "").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
14
|
+
return `submit_${base || "form"}`.slice(0, 64);
|
|
15
|
+
}
|
|
16
|
+
function formToolDescription(config) {
|
|
17
|
+
const lead = DESCRIPTION_BY_TYPE[config.form_type] ?? DESCRIPTION_BY_TYPE.custom;
|
|
18
|
+
const named = config.name ? ` The form is called "${config.name}".` : "";
|
|
19
|
+
const extra = typeof config.description === "string" ? config.description.trim() : "";
|
|
20
|
+
return `${lead}${named}${extra ? ` ${extra}` : ""}`.slice(0, 500);
|
|
21
|
+
}
|
|
22
|
+
function formToolAttributes(config) {
|
|
23
|
+
return declarativeToolForm({ name: formToolName(config), description: formToolDescription(config) });
|
|
24
|
+
}
|
|
25
|
+
function readAgentSubmit(event) {
|
|
26
|
+
const fields = event ?? {};
|
|
27
|
+
const invoked = fields.agentInvoked === true;
|
|
28
|
+
return {
|
|
29
|
+
invoked,
|
|
30
|
+
respond: (outcome) => {
|
|
31
|
+
if (!invoked || typeof fields.respondWith !== "function") return;
|
|
32
|
+
try {
|
|
33
|
+
fields.respondWith.call(event, outcome);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { formToolAttributes, readAgentSubmit };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getLLMsData, getOptimizedLLMsTxt } from './chunk-
|
|
1
|
+
import { getLLMsData, getOptimizedLLMsTxt } from './chunk-6U3VLV2C.js';
|
|
2
2
|
import { linkClassificationHost } from './chunk-L5UOHS6E.js';
|
|
3
3
|
import { resolveArticleUrl } from './chunk-WMVK77ND.js';
|
|
4
4
|
import { freshFetch } from './chunk-VX5CMNMM.js';
|
|
5
|
-
import { LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary } from './chunk-
|
|
5
|
+
import { LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary } from './chunk-NZ4RXN3G.js';
|
|
6
6
|
import { resolveTrailingSlash, applyTrailingSlash } from './chunk-YVKRYQRG.js';
|
|
7
7
|
import { resolveSiteHost } from './chunk-FESKKJAS.js';
|
|
8
8
|
import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, unlinkSync, readdirSync } from 'fs';
|
|
@@ -673,7 +673,7 @@ async function writeLLMsTxtToPublic(options = {}) {
|
|
|
673
673
|
}
|
|
674
674
|
if (!markdown) {
|
|
675
675
|
console.warn(
|
|
676
|
-
`[site-kit] llms.txt unavailable (
|
|
676
|
+
`[site-kit] llms.txt unavailable (Sonor fetch failed, no local data) \u2014 skipped write, keeping any existing file at ${llmsPath}`
|
|
677
677
|
);
|
|
678
678
|
return { success: false, path: llmsPath, optimized: false };
|
|
679
679
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSiteConfig } from './chunk-Z22QVHT4.js';
|
|
2
|
-
import { writeLLMsTxtToPublic } from './chunk-
|
|
2
|
+
import { writeLLMsTxtToPublic } from './chunk-QL6XNPSD.js';
|
|
3
3
|
import { buildFetch } from './chunk-VX5CMNMM.js';
|
|
4
4
|
import { findAppDirForDiscovery } from './chunk-ZEGVKVD5.js';
|
|
5
5
|
import { stripEmbeddedDomain, locToPath, inferPageType, isMalformedSitemapPath, resolveTrailingSlash, stripTrailingSlash, llmsWriteTimeoutMs, applyTrailingSlash } from './chunk-YVKRYQRG.js';
|
|
@@ -361,10 +361,10 @@ function createSitemap(config) {
|
|
|
361
361
|
const pagesData = await pagesResponse.json();
|
|
362
362
|
const pagesList = pagesData?.pagesList || [];
|
|
363
363
|
pages = pagesList.map((p) => p.path).filter(Boolean);
|
|
364
|
-
console.log(`[site-kit] Recovered ${pages.length} pages from
|
|
364
|
+
console.log(`[site-kit] Recovered ${pages.length} pages from Sonor API (ISR fallback)`);
|
|
365
365
|
}
|
|
366
366
|
} catch (fetchErr) {
|
|
367
|
-
console.warn("[site-kit]
|
|
367
|
+
console.warn("[site-kit] Sonor API fallback failed:", fetchErr.message);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
if (pages.length === 0) {
|
|
@@ -469,7 +469,7 @@ function createSitemap(config) {
|
|
|
469
469
|
}
|
|
470
470
|
const result = await syncSitemapToPortal(entries, apiUrl, apiKey, syncOptions);
|
|
471
471
|
if (result.success) {
|
|
472
|
-
console.log(`[site-kit] Synced to
|
|
472
|
+
console.log(`[site-kit] Synced to Sonor API: ${result.created} created, ${result.updated} updated`);
|
|
473
473
|
if (config.awaitMetaOptimization === true) {
|
|
474
474
|
try {
|
|
475
475
|
const domain = normalizedBaseUrl.replace(/^https?:\/\/(www\.)?/, "");
|
|
@@ -530,10 +530,10 @@ function createSitemap(config) {
|
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
} catch (err) {
|
|
533
|
-
console.warn("[site-kit] Failed to sync sitemap to
|
|
533
|
+
console.warn("[site-kit] Failed to sync sitemap to Sonor API:", err.message);
|
|
534
534
|
}
|
|
535
535
|
} else {
|
|
536
|
-
console.log("[site-kit] No API key found, skipping
|
|
536
|
+
console.log("[site-kit] No API key found, skipping Sonor API sync");
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
return entries;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveFetch } from './chunk-VX5CMNMM.js';
|
|
2
2
|
import { monotonicMs } from './chunk-MH2DSGC6.js';
|
|
3
|
-
import { SITE_KIT_VERSION } from './chunk-
|
|
3
|
+
import { SITE_KIT_VERSION } from './chunk-F24FNCTK.js';
|
|
4
4
|
import 'server-only';
|
|
5
5
|
|
|
6
6
|
var MINT_PATH = "/api/public/site-token";
|
|
@@ -54,7 +54,7 @@ function useSignal() {
|
|
|
54
54
|
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
55
55
|
}
|
|
56
56
|
var LazySignalCore = dynamic(
|
|
57
|
-
() => import('./SignalCore-
|
|
57
|
+
() => import('./SignalCore-ZA6WHKBR.js').then((m) => ({ default: m.SignalCore })),
|
|
58
58
|
{ ssr: false }
|
|
59
59
|
);
|
|
60
60
|
function SignalBridge({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { secretsMatch, readCappedBody } from './chunk-XTRZGXB2.js';
|
|
2
|
-
import { SITE_KIT_VERSION } from './chunk-
|
|
2
|
+
import { SITE_KIT_VERSION } from './chunk-F24FNCTK.js';
|
|
3
3
|
|
|
4
4
|
// src/llms/revalidate.ts
|
|
5
5
|
function createLlmsRevalidateHandler(secret, options) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { SITE_EDIT_PARAM } from './chunk-6G43IRWR.js';
|
|
3
|
-
import { publishSiteCredential } from './chunk-
|
|
4
|
-
import { FleetHeartbeat } from './chunk-
|
|
5
|
-
import { SignalBridge } from './chunk-
|
|
3
|
+
import { publishSiteCredential } from './chunk-HGFAEDG3.js';
|
|
4
|
+
import { FleetHeartbeat } from './chunk-CF5QNFYU.js';
|
|
5
|
+
import { SignalBridge } from './chunk-S54ECQGY.js';
|
|
6
6
|
import { useDeferredActivation } from './chunk-YC7ELZS3.js';
|
|
7
7
|
import { resolveSiteHost } from './chunk-FESKKJAS.js';
|
|
8
8
|
import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-24QZEO3Q.js';
|
|
@@ -33,19 +33,23 @@ function startEditBridge() {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
var LazyAnalyticsProvider = dynamic(
|
|
36
|
-
() => import('./AnalyticsProvider-
|
|
36
|
+
() => import('./AnalyticsProvider-SLFFBRPE.js').then((m) => ({ default: m.AnalyticsProvider })),
|
|
37
37
|
{ ssr: false }
|
|
38
38
|
);
|
|
39
|
-
var
|
|
40
|
-
() => import('./
|
|
39
|
+
var LazySiteChat = dynamic(
|
|
40
|
+
() => import('./SiteChat-YJADDTKG.js').then((m) => ({ default: m.SiteChat })),
|
|
41
|
+
{ ssr: false }
|
|
42
|
+
);
|
|
43
|
+
var LazySitePopups = dynamic(
|
|
44
|
+
() => import('./SitePopups-ST5PMKZE.js').then((m) => ({ default: m.SitePopups })),
|
|
41
45
|
{ ssr: false }
|
|
42
46
|
);
|
|
43
47
|
var LazySiteDesignReporter = dynamic(
|
|
44
|
-
() => import('./SiteDesignReporter-
|
|
48
|
+
() => import('./SiteDesignReporter-5YAW36AQ.js').then((m) => ({ default: m.SiteDesignReporter })),
|
|
45
49
|
{ ssr: false }
|
|
46
50
|
);
|
|
47
51
|
var LazySitemapSync = dynamic(
|
|
48
|
-
() => import('./SitemapSync-
|
|
52
|
+
() => import('./SitemapSync-RJTEBINX.js').then((m) => ({ default: m.SitemapSync })),
|
|
49
53
|
{ ssr: false }
|
|
50
54
|
);
|
|
51
55
|
function SiteKitClientProviders({
|
|
@@ -121,30 +125,40 @@ function SiteKitClientProviders({
|
|
|
121
125
|
) }) }, "sk-analytics")
|
|
122
126
|
);
|
|
123
127
|
}
|
|
124
|
-
const
|
|
128
|
+
const launcher = {
|
|
129
|
+
...typeof engage === "object" ? engage : {},
|
|
130
|
+
...typeof chat === "object" ? chat : {}
|
|
131
|
+
};
|
|
132
|
+
const chatOn = engage !== false && chat !== false && launcher.chatEnabled !== false;
|
|
125
133
|
const popupsOn = engage !== false && popups !== false;
|
|
126
134
|
if (chatOn || popupsOn) {
|
|
127
|
-
const
|
|
128
|
-
...typeof engage === "object" ? engage : {},
|
|
129
|
-
...typeof chat === "object" ? chat : {}
|
|
130
|
-
};
|
|
131
|
-
const engageInFrame = engageConfig.allowInFrame === true;
|
|
135
|
+
const shown = modulesReady && (launcher.allowInFrame === true || !isCrossOriginFrame());
|
|
132
136
|
siblings.push(
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
/* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
138
|
+
shown && popupsOn && /* @__PURE__ */ jsx(
|
|
139
|
+
LazySitePopups,
|
|
140
|
+
{
|
|
141
|
+
apiUrl,
|
|
142
|
+
apiKey,
|
|
143
|
+
allowInFrame: analyticsConfig.allowInFrame === true,
|
|
144
|
+
allowLocalhost: analyticsConfig.allowLocalhost === true,
|
|
145
|
+
zIndex: launcher.zIndex
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
shown && chatOn && /* @__PURE__ */ jsx(
|
|
149
|
+
LazySiteChat,
|
|
150
|
+
{
|
|
151
|
+
apiUrl,
|
|
152
|
+
apiKey,
|
|
153
|
+
projectId,
|
|
154
|
+
allowInFrame: analyticsConfig.allowInFrame === true,
|
|
155
|
+
allowLocalhost: analyticsConfig.allowLocalhost === true,
|
|
156
|
+
position: launcher.position || "bottom-right",
|
|
157
|
+
offsetBottom: launcher.offsetBottom,
|
|
158
|
+
zIndex: launcher.zIndex
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }, "sk-widgets")
|
|
148
162
|
);
|
|
149
163
|
}
|
|
150
164
|
if (sitemapSync) {
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
// src/contracts/schema-placeholders.ts
|
|
2
|
+
var RESERVED_EXAMPLE_DOMAINS = ["example.com", "example.net", "example.org"];
|
|
3
|
+
var RESERVED_EXAMPLE_TLD = "example";
|
|
4
|
+
var PLACEHOLDER_NAMES = /* @__PURE__ */ new Set([
|
|
5
|
+
"example",
|
|
6
|
+
"example business",
|
|
7
|
+
"example company",
|
|
8
|
+
"example organization",
|
|
9
|
+
"your business",
|
|
10
|
+
"your business name",
|
|
11
|
+
"your company",
|
|
12
|
+
"your company name",
|
|
13
|
+
"your organization",
|
|
14
|
+
"your organization name",
|
|
15
|
+
"business name",
|
|
16
|
+
"company name",
|
|
17
|
+
"organization name",
|
|
18
|
+
"your name",
|
|
19
|
+
"lorem ipsum"
|
|
20
|
+
]);
|
|
21
|
+
var NAME_KEYS = /* @__PURE__ */ new Set([
|
|
22
|
+
"name",
|
|
23
|
+
"legalName",
|
|
24
|
+
"alternateName",
|
|
25
|
+
"author",
|
|
26
|
+
"creator",
|
|
27
|
+
"publisher",
|
|
28
|
+
"brand",
|
|
29
|
+
"provider",
|
|
30
|
+
"seller",
|
|
31
|
+
"manufacturer",
|
|
32
|
+
"organizer",
|
|
33
|
+
"founder"
|
|
34
|
+
]);
|
|
35
|
+
var PHONE_KEYS = /* @__PURE__ */ new Set(["telephone", "faxNumber"]);
|
|
36
|
+
var URI_TEMPLATE_KEYS = /* @__PURE__ */ new Set(["target", "urlTemplate"]);
|
|
37
|
+
var BODY_TEXT_KEYS = /* @__PURE__ */ new Set(["articleBody"]);
|
|
38
|
+
var ANNOTATION_KEYS = /* @__PURE__ */ new Set(["note", "notes", "_note", "_notes", "_comment", "_comments", "__comment", "$comment"]);
|
|
39
|
+
var STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["@context", "@type", "@id", "position"]);
|
|
40
|
+
var MUSTACHE_SLOT = /\{\{\s*[#^/>&]?\s*[A-Za-z_$][\w$.[\]-]*\s*\}\}/;
|
|
41
|
+
var JSX_EXPRESSION_VALUE = /^\{\s*[A-Za-z_$][\w$]*(?:\??\.[A-Za-z_$][\w$]*|\[[^\]]*\])+[^{}]*\}$/;
|
|
42
|
+
var JSX_MEMBER_IN_TEXT = /\{\s*[A-Za-z_$][\w$]*(?:\??\.[A-Za-z_$][\w$]*)+\s*\}/;
|
|
43
|
+
var BRACKET_SLOT_VALUE = /^\[\s*[A-Za-z][^[\]"{}<>]{0,80}\]$/;
|
|
44
|
+
var BRACKET_SLOT_IN_TEXT = /\[\s*((?:your|insert your|enter your|add your)\s+[^[\]]{1,60}?|(?:(?:business|company|organization|brand|full|first|last|resident|client|customer|author)\s+)?(?:name|phone(?:\s+number)?|telephone|email(?:\s+address)?|(?:street\s+)?address|city|state|zip(?:\s+code)?|postal\s+code|website|url|logo|date))\s*\](?!\()/gi;
|
|
45
|
+
var REPLACE_MARKER = /\bREPLACE(?:_WITH_\w*|_ME\b)/;
|
|
46
|
+
var UPPER_SLOT_VALUE = /^YOUR_[A-Z0-9_]+$/;
|
|
47
|
+
var MAX_DEPTH = 40;
|
|
48
|
+
var MAX_EVIDENCE = 5;
|
|
49
|
+
var EVIDENCE_VALUE_LENGTH = 120;
|
|
50
|
+
function withoutSchemaPlaceholders(value) {
|
|
51
|
+
const state = { dropped: [], notes: [] };
|
|
52
|
+
if (value === null || value === void 0) return { value: null, ...state };
|
|
53
|
+
const result = visitRoot(value, state);
|
|
54
|
+
return { value: result, ...state };
|
|
55
|
+
}
|
|
56
|
+
function visitRoot(value, state) {
|
|
57
|
+
if (Array.isArray(value)) {
|
|
58
|
+
const out = visitArray(value, "$", state, 0, true);
|
|
59
|
+
return out.removed && out.value.length === 0 ? null : out.value;
|
|
60
|
+
}
|
|
61
|
+
if (!isPlainObject(value)) return value;
|
|
62
|
+
if (isGraphWrapper(value)) {
|
|
63
|
+
const out = visitContainer(value, "$", state, 0);
|
|
64
|
+
return out.removedChild && !hasContentBeyond(out.value, /* @__PURE__ */ new Set(["@context"])) ? null : out.value;
|
|
65
|
+
}
|
|
66
|
+
const visit = visitNode(value, "$", state, 0);
|
|
67
|
+
return visit.keep ? visit.value : null;
|
|
68
|
+
}
|
|
69
|
+
function visitNode(node, path, state, depth) {
|
|
70
|
+
if (isAnnotationOnly(node)) {
|
|
71
|
+
state.dropped.push({ path, type: null, reasons: ["annotation"], evidence: annotationEvidence(node) });
|
|
72
|
+
return { keep: false };
|
|
73
|
+
}
|
|
74
|
+
const evidence = [];
|
|
75
|
+
collectEvidence(node, evidence, depth);
|
|
76
|
+
if (evidence.length) {
|
|
77
|
+
state.dropped.push({ path, type: typeOf(node), reasons: unique(evidence.map((e) => e.reason)), evidence });
|
|
78
|
+
return { keep: false };
|
|
79
|
+
}
|
|
80
|
+
const droppedMark = state.dropped.length;
|
|
81
|
+
const notesMark = state.notes.length;
|
|
82
|
+
const pruned = visitContainer(node, path, state, depth);
|
|
83
|
+
if (pruned.removedChild && !hasContentBeyond(pruned.value, STRUCTURAL_KEYS)) {
|
|
84
|
+
const children = state.dropped.splice(droppedMark);
|
|
85
|
+
state.notes.length = notesMark;
|
|
86
|
+
state.dropped.push({
|
|
87
|
+
path,
|
|
88
|
+
type: typeOf(node),
|
|
89
|
+
reasons: unique(["emptied", ...children.flatMap((c) => c.reasons)]),
|
|
90
|
+
evidence: children.flatMap((c) => c.evidence).slice(0, MAX_EVIDENCE)
|
|
91
|
+
});
|
|
92
|
+
return { keep: false };
|
|
93
|
+
}
|
|
94
|
+
return { keep: true, value: pruned.value };
|
|
95
|
+
}
|
|
96
|
+
function visitContainer(obj, path, state, depth) {
|
|
97
|
+
if (depth >= MAX_DEPTH) return { value: obj, removedChild: false };
|
|
98
|
+
let changed = false;
|
|
99
|
+
let removedChild = false;
|
|
100
|
+
const out = {};
|
|
101
|
+
for (const [key, child] of Object.entries(obj)) {
|
|
102
|
+
if (key === "@context") {
|
|
103
|
+
out[key] = child;
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (ANNOTATION_KEYS.has(key)) {
|
|
107
|
+
state.notes.push({ path, key });
|
|
108
|
+
changed = true;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const childPath = stepKey(path, key);
|
|
112
|
+
if (Array.isArray(child)) {
|
|
113
|
+
const pruned = visitArray(child, childPath, state, depth + 1, key === "@graph");
|
|
114
|
+
if (pruned.removed) removedChild = true;
|
|
115
|
+
if (pruned.value !== child) changed = true;
|
|
116
|
+
if (pruned.removed && pruned.value.length === 0) continue;
|
|
117
|
+
out[key] = pruned.value;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (isPlainObject(child)) {
|
|
121
|
+
if (isNestedNode(child)) {
|
|
122
|
+
const visit = visitNode(child, childPath, state, depth + 1);
|
|
123
|
+
if (!visit.keep) {
|
|
124
|
+
changed = true;
|
|
125
|
+
removedChild = true;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (visit.value !== child) changed = true;
|
|
129
|
+
out[key] = visit.value;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
const pruned = visitContainer(child, childPath, state, depth + 1);
|
|
133
|
+
if (pruned.removedChild) removedChild = true;
|
|
134
|
+
if (pruned.value !== child) changed = true;
|
|
135
|
+
out[key] = pruned.value;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
out[key] = child;
|
|
139
|
+
}
|
|
140
|
+
return { value: changed ? out : obj, removedChild };
|
|
141
|
+
}
|
|
142
|
+
function visitArray(items, path, state, depth, units) {
|
|
143
|
+
if (depth >= MAX_DEPTH) return { value: items, removed: false };
|
|
144
|
+
let changed = false;
|
|
145
|
+
let removed = false;
|
|
146
|
+
const out = [];
|
|
147
|
+
items.forEach((item, index) => {
|
|
148
|
+
const itemPath = `${path}[${index}]`;
|
|
149
|
+
if (Array.isArray(item)) {
|
|
150
|
+
const pruned = visitArray(item, itemPath, state, depth + 1, units);
|
|
151
|
+
if (pruned.removed) removed = true;
|
|
152
|
+
if (pruned.value !== item) changed = true;
|
|
153
|
+
out.push(pruned.value);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (isPlainObject(item) && (units || isNestedNode(item))) {
|
|
157
|
+
const visit = visitNode(item, itemPath, state, depth + 1);
|
|
158
|
+
if (!visit.keep) {
|
|
159
|
+
changed = true;
|
|
160
|
+
removed = true;
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (visit.value !== item) changed = true;
|
|
164
|
+
out.push(visit.value);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (isPlainObject(item)) {
|
|
168
|
+
const pruned = visitContainer(item, itemPath, state, depth + 1);
|
|
169
|
+
if (pruned.removedChild) removed = true;
|
|
170
|
+
if (pruned.value !== item) changed = true;
|
|
171
|
+
out.push(pruned.value);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
out.push(item);
|
|
175
|
+
});
|
|
176
|
+
return { value: changed ? out : items, removed };
|
|
177
|
+
}
|
|
178
|
+
function collectEvidence(holder, out, depth) {
|
|
179
|
+
for (const [key, value] of Object.entries(holder)) {
|
|
180
|
+
if (key === "@context" || ANNOTATION_KEYS.has(key)) continue;
|
|
181
|
+
collectFromValue(holder, key, value, out, depth);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function collectFromValue(holder, key, value, out, depth) {
|
|
185
|
+
if (depth >= MAX_DEPTH || out.length >= MAX_EVIDENCE) return;
|
|
186
|
+
if (typeof value === "string") {
|
|
187
|
+
for (const reason of placeholderReasons(key, value, holder)) {
|
|
188
|
+
if (out.length >= MAX_EVIDENCE) return;
|
|
189
|
+
out.push({ reason, key, value: cutForLog(value) });
|
|
190
|
+
}
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (Array.isArray(value)) {
|
|
194
|
+
for (const item of value) collectFromValue(holder, key, item, out, depth + 1);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (isPlainObject(value) && !isNestedNode(value)) collectEvidence(value, out, depth + 1);
|
|
198
|
+
}
|
|
199
|
+
function placeholderReasons(key, raw, holder) {
|
|
200
|
+
const value = raw.trim();
|
|
201
|
+
if (!value) return [];
|
|
202
|
+
const reasons = [];
|
|
203
|
+
const host = urlHost(value);
|
|
204
|
+
if (host && isReservedExampleHost(host)) reasons.push("example_domain");
|
|
205
|
+
if ((PHONE_KEYS.has(key) || /^tel:/i.test(value)) && isPlaceholderPhone(value)) reasons.push("placeholder_phone");
|
|
206
|
+
if (NAME_KEYS.has(key) && !("value" in holder) && PLACEHOLDER_NAMES.has(normalizeName(value))) {
|
|
207
|
+
reasons.push("placeholder_name");
|
|
208
|
+
}
|
|
209
|
+
if (isTemplateSlot(key, value)) reasons.push("template_token");
|
|
210
|
+
return reasons;
|
|
211
|
+
}
|
|
212
|
+
function isTemplateSlot(key, value) {
|
|
213
|
+
if (JSX_EXPRESSION_VALUE.test(value) || BRACKET_SLOT_VALUE.test(value) || UPPER_SLOT_VALUE.test(value)) return true;
|
|
214
|
+
if (REPLACE_MARKER.test(value)) return true;
|
|
215
|
+
if (!BODY_TEXT_KEYS.has(key)) {
|
|
216
|
+
if (MUSTACHE_SLOT.test(value)) return true;
|
|
217
|
+
for (const match of value.matchAll(BRACKET_SLOT_IN_TEXT)) {
|
|
218
|
+
if (/^[A-Z]/.test(match[1])) return true;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return !URI_TEMPLATE_KEYS.has(key) && isUrlOrPath(value) && JSX_MEMBER_IN_TEXT.test(value);
|
|
222
|
+
}
|
|
223
|
+
function urlHost(value) {
|
|
224
|
+
const mailto = /^mailto:[^@\s?]+@([^?\s#/]+)/i.exec(value);
|
|
225
|
+
if (mailto) return mailto[1];
|
|
226
|
+
const url = /^(?:[a-z][a-z0-9+.-]*:)?\/\/(?:[^/?#@\s]*@)?([^/?#:\s]+)/i.exec(value);
|
|
227
|
+
if (url) return url[1];
|
|
228
|
+
const email = /^[^\s@/:]+@([^\s@/:?#]+)$/.exec(value);
|
|
229
|
+
if (email) return email[1];
|
|
230
|
+
const bare = /^((?:[a-z0-9-]+\.)+[a-z][a-z0-9-]*)\.?(?::\d+)?(?:[/?#]\S*)?$/i.exec(value);
|
|
231
|
+
return bare ? bare[1] : null;
|
|
232
|
+
}
|
|
233
|
+
function isReservedExampleHost(host) {
|
|
234
|
+
const h = host.toLowerCase().replace(/\.$/, "");
|
|
235
|
+
if (h === RESERVED_EXAMPLE_TLD || h.endsWith(`.${RESERVED_EXAMPLE_TLD}`)) return true;
|
|
236
|
+
return RESERVED_EXAMPLE_DOMAINS.some((domain) => h === domain || h.endsWith(`.${domain}`));
|
|
237
|
+
}
|
|
238
|
+
function isUrlOrPath(value) {
|
|
239
|
+
return /^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(value) || value.startsWith("/");
|
|
240
|
+
}
|
|
241
|
+
function isPlaceholderPhone(raw) {
|
|
242
|
+
const value = raw.replace(/^tel:/i, "").trim();
|
|
243
|
+
if (/^[+\d\s().xX-]+$/.test(value) && (value.match(/x/gi)?.length ?? 0) >= 4) return true;
|
|
244
|
+
let digits = value.replace(/\D/g, "");
|
|
245
|
+
if (digits.length === 11 && digits.startsWith("1")) digits = digits.slice(1);
|
|
246
|
+
if (digits.length >= 7 && /^0+$/.test(digits)) return true;
|
|
247
|
+
if (digits === "1234567890" || digits === "1234567") return true;
|
|
248
|
+
const local = digits.length === 10 ? digits.slice(3) : digits.length === 7 ? digits : null;
|
|
249
|
+
return local !== null && /^55501\d\d$/.test(local);
|
|
250
|
+
}
|
|
251
|
+
function normalizeName(value) {
|
|
252
|
+
return value.replace(/\s+/g, " ").trim().replace(/[.,]+$/, "").toLowerCase();
|
|
253
|
+
}
|
|
254
|
+
function isPlainObject(value) {
|
|
255
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
256
|
+
}
|
|
257
|
+
function isNestedNode(value) {
|
|
258
|
+
return "@type" in value || "@id" in value || isAnnotationOnly(value);
|
|
259
|
+
}
|
|
260
|
+
function isGraphWrapper(value) {
|
|
261
|
+
return "@graph" in value && !("@type" in value) && !("@id" in value);
|
|
262
|
+
}
|
|
263
|
+
function isAnnotationOnly(value) {
|
|
264
|
+
if ("@type" in value || "@id" in value || "@graph" in value) return false;
|
|
265
|
+
const keys = Object.keys(value).filter((key) => key !== "@context");
|
|
266
|
+
return keys.length > 0 && keys.every((key) => ANNOTATION_KEYS.has(key));
|
|
267
|
+
}
|
|
268
|
+
function annotationEvidence(node) {
|
|
269
|
+
return Object.entries(node).filter(([key]) => ANNOTATION_KEYS.has(key)).slice(0, MAX_EVIDENCE).map(([key, value]) => ({
|
|
270
|
+
reason: "annotation",
|
|
271
|
+
key,
|
|
272
|
+
value: cutForLog(typeof value === "string" ? value : JSON.stringify(value) ?? "")
|
|
273
|
+
}));
|
|
274
|
+
}
|
|
275
|
+
function hasContentBeyond(obj, ignored) {
|
|
276
|
+
return Object.entries(obj).some(([key, value]) => !ignored.has(key) && hasContent(value));
|
|
277
|
+
}
|
|
278
|
+
function hasContent(value) {
|
|
279
|
+
if (value === null || value === void 0 || value === "") return false;
|
|
280
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
281
|
+
if (isPlainObject(value)) return Object.keys(value).length > 0;
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
function typeOf(node) {
|
|
285
|
+
const type = node["@type"];
|
|
286
|
+
if (typeof type === "string") return type;
|
|
287
|
+
if (Array.isArray(type)) return type.filter((t) => typeof t === "string").join(",") || null;
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
function stepKey(path, key) {
|
|
291
|
+
return /^[A-Za-z_$][\w$]*$/.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;
|
|
292
|
+
}
|
|
293
|
+
function unique(values) {
|
|
294
|
+
return [...new Set(values)];
|
|
295
|
+
}
|
|
296
|
+
function cutForLog(value) {
|
|
297
|
+
return value.length > EVIDENCE_VALUE_LENGTH ? `${value.slice(0, EVIDENCE_VALUE_LENGTH)}...` : value;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export { withoutSchemaPlaceholders };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HoneypotField } from './chunk-DXO6SBMD.js';
|
|
2
|
-
import { FormField } from './chunk-
|
|
2
|
+
import { FormField } from './chunk-4NTBQNHA.js';
|
|
3
3
|
import { normalizeFormConfig } from './chunk-5SQK3D53.js';
|
|
4
4
|
import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -31,7 +31,8 @@ function StaticForm({ config: raw, className }) {
|
|
|
31
31
|
},
|
|
32
32
|
field.id || field.slug
|
|
33
33
|
)) }) }),
|
|
34
|
-
/* @__PURE__ */ jsx("div", { className: "sk-form__actions", style: { justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx("button", { type: "submit", className: "sk-form__btn sk-form__btn--submit", children: config.submit_button_text || "Submit" }) }),
|
|
34
|
+
/* @__PURE__ */ jsx("div", { className: "sk-form__actions", style: { justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx("button", { type: "submit", className: "sk-form__btn sk-form__btn--submit", disabled: true, "data-sk-shell-submit": "", children: config.submit_button_text || "Submit" }) }),
|
|
35
|
+
/* @__PURE__ */ jsx("noscript", { children: /* @__PURE__ */ jsx("p", { className: "sk-form__noscript", children: "This form needs JavaScript to send. Turn it on and reload the page." }) }),
|
|
35
36
|
config.honeypot_enabled && /* @__PURE__ */ jsx(HoneypotField, { name: honeypotFieldName })
|
|
36
37
|
]
|
|
37
38
|
}
|
package/dist/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { publishSiteCredential } from '../chunk-
|
|
2
|
+
import { publishSiteCredential } from '../chunk-HGFAEDG3.js';
|
|
3
3
|
export { useDeferredActivation } from '../chunk-YC7ELZS3.js';
|
|
4
4
|
import '../chunk-FESKKJAS.js';
|
|
5
5
|
import '../chunk-A4CC4ZG3.js';
|
|
@@ -7,8 +7,8 @@ export { trackConversion, trackEvent } from '../chunk-LCDVPAMR.js';
|
|
|
7
7
|
export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-6T6CQVNL.js';
|
|
8
8
|
export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-24QZEO3Q.js';
|
|
9
9
|
import '../chunk-GJWI74ZZ.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-K4ZHAURD.js';
|
|
11
|
+
import '../chunk-F24FNCTK.js';
|
|
12
12
|
import '../chunk-PKBMQBKP.js';
|
|
13
13
|
|
|
14
14
|
// src/client/SiteKitCredential.tsx
|
package/dist/cms/CmsPreview.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SectionType, SectionRendererProps } from './types';
|
|
3
3
|
interface CmsPreviewProps {
|
|
4
|
-
/**
|
|
4
|
+
/** Sonor API base URL */
|
|
5
5
|
apiUrl?: string;
|
|
6
6
|
/** API key for fetching draft content */
|
|
7
7
|
apiKey: string;
|
|
@@ -18,7 +18,7 @@ interface CmsPreviewProps {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Client component for previewing draft CMS content.
|
|
21
|
-
* Fetches draft content from
|
|
21
|
+
* Fetches draft content from Sonor API and re-renders on changes.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```tsx
|
package/dist/cms/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* project has CMS pages and the API no longer serves them, so these components
|
|
6
6
|
* render nothing. Site copy is managed copy now (`@sonordev/site-kit/website/slots`:
|
|
7
7
|
* `ManagedSlot`, `ManagedRichText`, `ManagedLink`, `ManagedList`), edited in
|
|
8
|
-
* Sonor under Website → Content.
|
|
8
|
+
* Sonor under Website → Content.
|
|
9
9
|
*
|
|
10
10
|
* REQUIRES TWO OPTIONAL PEER DEPENDENCIES. Importing this entry without them
|
|
11
11
|
* fails the consuming site's build with "Module not found":
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
*
|
|
25
25
|
* Do NOT apply this pattern to a dependency reachable from a widely-imported
|
|
26
26
|
* entry: bundlers resolve even a dynamic import at build time, so there is no
|
|
27
|
-
* runtime fallback to hide behind.
|
|
28
|
-
* case
|
|
27
|
+
* runtime fallback to hide behind. react-markdown (4.0.3; 7.0 dropped it) is
|
|
28
|
+
* the case where exactly that made it impossible.
|
|
29
29
|
*/
|
|
30
30
|
export { CmsPage } from './CmsPage';
|
|
31
31
|
export { CmsSection } from './CmsSection';
|
package/dist/cms/server-api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @sonordev/site-kit/cms - Server-Only API Functions
|
|
3
3
|
*
|
|
4
|
-
* Fetches CMS page/section data from
|
|
4
|
+
* Fetches CMS page/section data from Sonor API.
|
|
5
5
|
* Uses the same secure API pattern as seo/server-api.ts — both delegate config
|
|
6
6
|
* resolution + fetch/retry to the shared server-fetch primitive (single source
|
|
7
7
|
* of truth — see ../server/server-fetch).
|
package/dist/cms/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Multi-variant inline event checkout. Renders a tier selector (one row per variant
|
|
5
5
|
* with qty controls), customer info, and a Square card element. Submits a single
|
|
6
|
-
* lineItems[] payload to
|
|
6
|
+
* lineItems[] payload to Sonor multi-line checkout endpoint — one charge for
|
|
7
7
|
* the aggregate total, no redirect.
|
|
8
8
|
*
|
|
9
9
|
* v1: Square inline only. For single-tier events without variants, the component
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EventsAgenda — month-grouped event list
|
|
2
|
+
* EventsAgenda — month-grouped event list.
|
|
3
3
|
*
|
|
4
4
|
* For sparse community/event calendars an agenda reads far better than a
|
|
5
|
-
* month grid, especially on phones
|
|
6
|
-
*
|
|
5
|
+
* month grid, especially on phones, which is why community sites kept
|
|
6
|
+
* forking the grid into one. Headless-first: every element carries
|
|
7
7
|
* data-sk-part, rows carry data-category / data-offering-type (same contract
|
|
8
8
|
* as CalendarView chips), so two-scheme coloring is site CSS:
|
|
9
9
|
*
|
package/dist/commerce/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @sonordev/site-kit/commerce - Commerce API
|
|
3
3
|
*
|
|
4
4
|
* API functions for fetching offerings, submitting orders, and registrations.
|
|
5
|
-
* All data goes through
|
|
5
|
+
* All data goes through Sonor API with API key auth - never Supabase directly.
|
|
6
6
|
*/
|
|
7
7
|
import type { CommerceOffering, FetchOfferingsOptions, FetchEventsOptions, CheckoutCustomer, CheckoutResult } from './types';
|
|
8
8
|
export declare function fetchOfferings(options?: FetchOfferingsOptions): Promise<CommerceOffering[]>;
|