@sonordev/site-kit 8.2.0 → 8.4.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 +13 -1
- package/CHANGELOG.md +12 -0
- package/README.md +9 -5
- package/agent-manifest.json +53 -8
- package/dist/{AnalyticsProvider-6TAA3XYB.js → AnalyticsProvider-D6GWEJSB.js} +6 -6
- package/dist/{ArticleFaqSection-3Q26DP7P.js → ArticleFaqSection-DEWE5B4Q.js} +1 -1
- package/dist/{ArticleViewTracker-H4N7YCLC.js → ArticleViewTracker-YZ76HM64.js} +17 -6
- package/dist/{BlocksPopup-FJT5YQD3.js → BlocksPopup-UJXZ4AXG.js} +6 -6
- package/dist/{ChatWidget-THQHHTAA.js → ChatWidget-H4EOSH5I.js} +6 -6
- package/dist/{FileField-OZXXJGUM.js → FileField-CKBYGCNT.js} +4 -4
- package/dist/{FormSpotlight-MLDJS246.js → FormSpotlight-CGF5ZE6S.js} +1 -1
- package/dist/{FormStage-6RVY7M3R.js → FormStage-PQPUPQWW.js} +1 -1
- package/dist/{ManagedForm-3VV54RVH.js → ManagedForm-YOEZ7CFS.js} +7 -7
- package/dist/{ManagedNewsletterForm-RTJDGMGG.js → ManagedNewsletterForm-EUWJ2HCA.js} +25 -11
- package/dist/{SignalCore-T7ZOCA44.js → SignalCore-JZSU7A44.js} +14 -8
- package/dist/SiteChat-OAZH34W7.js +6 -0
- package/dist/SiteDesignReporter-IWBMZJYU.js +12 -0
- package/dist/{SitePopups-K6ADAWFK.js → SitePopups-MLAT35UN.js} +6 -6
- package/dist/SitemapSync-6KQLKFO2.js +9 -0
- package/dist/_client/booking-widget.js +6 -6
- package/dist/_client/testimonial-section.js +3 -3
- package/dist/affiliates/index.js +4 -4
- package/dist/analytics/index.js +6 -6
- package/dist/analytics/publication-cta.d.ts +3 -0
- package/dist/{article-styles-GFXJJDLE.js → article-styles-AOOVVKXH.js} +7 -5
- package/dist/article-tables-6XHVULPU.js +2 -0
- package/dist/articles/Article.d.ts +2 -89
- package/dist/articles/ArticleFAQ.d.ts +2 -41
- package/dist/articles/ArticleFaqSection.d.ts +2 -2
- package/dist/articles/ArticleList.d.ts +2 -79
- package/dist/articles/ArticleViewTracker.d.ts +2 -15
- package/dist/articles/AuthorCard.d.ts +2 -10
- package/dist/articles/AuthorPage.d.ts +2 -8
- package/dist/articles/ClusterLandingPage.d.ts +2 -40
- package/dist/articles/ClusterNavigation.d.ts +2 -37
- package/dist/articles/ManagedNewsletterForm.d.ts +3 -12
- package/dist/articles/NewsletterShell.d.ts +2 -17
- package/dist/articles/NewsletterWidget.d.ts +2 -30
- package/dist/articles/PublicationLayout.d.ts +2 -67
- package/dist/articles/PublicationSidebar.d.ts +2 -36
- package/dist/articles/RelatedPosts.d.ts +2 -22
- package/dist/articles/ServiceCallout.d.ts +2 -56
- package/dist/articles/TableOfContents.d.ts +2 -6
- package/dist/articles/article-photos.d.ts +2 -9
- package/dist/articles/article-styles.d.ts +2 -21
- package/dist/articles/article-tables.d.ts +2 -12
- package/dist/articles/artwork.d.ts +2 -13
- package/dist/articles/author-schema.d.ts +2 -72
- package/dist/articles/author-social.d.ts +2 -14
- package/dist/articles/excerpt.d.ts +2 -17
- package/dist/articles/index.d.ts +2 -79
- package/dist/articles/index.js +16 -11
- package/dist/articles/news-sitemap.d.ts +2 -46
- package/dist/articles/processArticleHtml.d.ts +2 -34
- package/dist/articles/public-reads.d.ts +2 -26
- package/dist/articles/reading-time.d.ts +2 -9
- package/dist/articles/routes.d.ts +2 -52
- package/dist/articles/server-core.d.ts +2 -461
- package/dist/articles/server-ui.d.ts +2 -30
- package/dist/articles/server-ui.js +72 -62
- package/dist/articles/server.d.ts +2 -461
- package/dist/articles/server.js +14 -5
- package/dist/articles/types.d.ts +2 -316
- package/dist/articles/widget-styles.d.ts +2 -8
- package/dist/chat/index.js +8 -8
- package/dist/chunk-34ZYJTQR.js +1 -0
- package/dist/{chunk-727R7C5R.js → chunk-3VSFOD2Z.js} +2 -2
- package/dist/{chunk-JC2VS2SB.js → chunk-44GVU5UH.js} +1 -1
- package/dist/{chunk-WYZ4OUON.js → chunk-4HYIDQJJ.js} +1 -1
- package/dist/{chunk-WMVK77ND.js → chunk-4K735O3J.js} +1 -1
- package/dist/{chunk-L5UOHS6E.js → chunk-5D7ZISUP.js} +1 -1
- package/dist/{chunk-Q72M5KBS.js → chunk-5S7YTOCB.js} +1 -1
- package/dist/{chunk-WSNG2K3T.js → chunk-5TDZHIG6.js} +3 -3
- package/dist/{chunk-6CJGZFOU.js → chunk-A4MPHIVP.js} +1 -1
- package/dist/chunk-B7T2SFUF.js +1 -0
- package/dist/{chunk-FV2VD7WM.js → chunk-BC7JMY4Z.js} +3 -3
- package/dist/chunk-BLCHQIWR.js +319 -0
- package/dist/{chunk-NNEIBXGU.js → chunk-BLENFNBW.js} +2 -2
- package/dist/{chunk-NFRJTOTB.js → chunk-BSQP6PRA.js} +1 -1
- package/dist/{chunk-GKGSXUVQ.js → chunk-BVB5FBAA.js} +1 -1
- package/dist/{chunk-WACWV5EP.js → chunk-CE7VPAEH.js} +3 -3
- package/dist/{chunk-GYF2ULVO.js → chunk-DJAYFHVF.js} +1 -1
- package/dist/{chunk-WBC5B3JD.js → chunk-DKKYZLKR.js} +3 -3
- package/dist/{chunk-CAH4Y4PY.js → chunk-DLM4FFNH.js} +6 -2
- package/dist/{chunk-575L73NT.js → chunk-DS6LECIX.js} +1 -1
- package/dist/{chunk-Y3INC4QJ.js → chunk-E4PTMORJ.js} +1 -1
- package/dist/chunk-H72ZFO3F.js +1 -0
- package/dist/{chunk-WK3N3Y7V.js → chunk-HH2GOZTO.js} +2 -2
- package/dist/{chunk-JBEUZJS3.js → chunk-ITY4UZEJ.js} +3 -3
- package/dist/{chunk-GWP2VBFH.js → chunk-J4KX2D3Q.js} +3 -3
- package/dist/{chunk-57K4GW3D.js → chunk-JCSU6EJI.js} +1 -1
- package/dist/{chunk-SC4MZGWZ.js → chunk-JHTPHA2D.js} +6 -3
- package/dist/{chunk-YBAFUM3Z.js → chunk-JV5YWTJN.js} +13 -4
- package/dist/{chunk-I6QFPSUU.js → chunk-KASKB7UK.js} +11 -10
- package/dist/{chunk-SMYX3AAO.js → chunk-LEGMPX6N.js} +1 -1
- package/dist/{chunk-ZM2FNWIQ.js → chunk-LPVEBQVL.js} +1 -1
- package/dist/{chunk-HUBMKTPW.js → chunk-M5SF7NCC.js} +1 -1
- package/dist/{chunk-EBILJHUF.js → chunk-MTV5LYXN.js} +31 -2
- package/dist/{chunk-5ZCY36TY.js → chunk-MZX4EN6Z.js} +1 -1
- package/dist/{chunk-7FSB2EXS.js → chunk-OKITZFML.js} +1 -1
- package/dist/{chunk-H4R2GPAB.js → chunk-PEI6DRSK.js} +2 -2
- package/dist/{chunk-FVXFLVXF.js → chunk-QD73RO67.js} +3 -3
- package/dist/{chunk-66G47P5C.js → chunk-QKOVP7WO.js} +2 -2
- package/dist/{chunk-3EU6S5YC.js → chunk-RBNHRZGD.js} +1 -1
- package/dist/{chunk-XWIRU6UT.js → chunk-S6QDNXDK.js} +2 -2
- package/dist/{chunk-FQUGGPBM.js → chunk-TY6WNQO3.js} +124 -41
- package/dist/{chunk-QXMIKDOL.js → chunk-UVYUTBT4.js} +14 -4
- package/dist/{chunk-3G7YABRA.js → chunk-W7OPEMGJ.js} +4 -1
- package/dist/{chunk-JIH32RH2.js → chunk-XA7Q2VQA.js} +1 -1
- package/dist/{chunk-X7VKRHFF.js → chunk-XENW66OF.js} +1 -1
- package/dist/chunk-XI2XM7UG.js +14 -0
- package/dist/{chunk-BQZPHICL.js → chunk-YM5KMNTU.js} +1 -1
- package/dist/client/index.js +4 -16
- package/dist/fleet/index.js +6 -6
- package/dist/forms/index.js +9 -325
- package/dist/forms/server.js +2 -2
- package/dist/forms/types.d.ts +5 -0
- package/dist/forms/useForm.d.ts +4 -0
- package/dist/images/index.js +4 -4
- package/dist/index.js +1 -1
- package/dist/layout/client.js +9 -9
- package/dist/layout/index.js +10 -10
- package/dist/llms/index.js +8 -8
- package/dist/maps/index.js +4 -4
- package/dist/mcp/sonor.d.ts +46 -3
- package/dist/mcp/sonor.js +51 -29
- package/dist/mcp/transport.d.ts +1 -1
- package/dist/press-kit/articles/Article.d.ts +89 -0
- package/dist/press-kit/articles/ArticleFAQ.d.ts +41 -0
- package/dist/press-kit/articles/ArticleFaqSection.d.ts +2 -0
- package/dist/press-kit/articles/ArticleList.d.ts +79 -0
- package/dist/press-kit/articles/ArticleViewTracker.d.ts +15 -0
- package/dist/press-kit/articles/AuthorCard.d.ts +10 -0
- package/dist/press-kit/articles/AuthorPage.d.ts +8 -0
- package/dist/press-kit/articles/ClusterLandingPage.d.ts +40 -0
- package/dist/press-kit/articles/ClusterNavigation.d.ts +37 -0
- package/dist/press-kit/articles/ManagedNewsletterForm.d.ts +12 -0
- package/dist/press-kit/articles/NewsletterShell.d.ts +17 -0
- package/dist/press-kit/articles/NewsletterWidget.d.ts +30 -0
- package/dist/press-kit/articles/PublicationLayout.d.ts +67 -0
- package/dist/press-kit/articles/PublicationSidebar.d.ts +36 -0
- package/dist/press-kit/articles/RelatedPosts.d.ts +22 -0
- package/dist/press-kit/articles/ServiceCallout.d.ts +56 -0
- package/dist/press-kit/articles/TableOfContents.d.ts +6 -0
- package/dist/press-kit/articles/article-photos.d.ts +9 -0
- package/dist/press-kit/articles/article-styles.d.ts +21 -0
- package/dist/press-kit/articles/article-tables.d.ts +12 -0
- package/dist/press-kit/articles/artwork.d.ts +16 -0
- package/dist/press-kit/articles/author-schema.d.ts +72 -0
- package/dist/press-kit/articles/author-social.d.ts +14 -0
- package/dist/press-kit/articles/excerpt.d.ts +17 -0
- package/dist/press-kit/articles/index.d.ts +80 -0
- package/dist/press-kit/articles/news-sitemap.d.ts +40 -0
- package/dist/press-kit/articles/processArticleHtml.d.ts +34 -0
- package/dist/press-kit/articles/public-reads.d.ts +42 -0
- package/dist/press-kit/articles/publication-definition.d.ts +41 -0
- package/dist/press-kit/articles/publication-reads.d.ts +54 -0
- package/dist/press-kit/articles/reading-time.d.ts +9 -0
- package/dist/press-kit/articles/routes.d.ts +52 -0
- package/dist/press-kit/articles/server-core.d.ts +479 -0
- package/dist/press-kit/articles/server-ui.d.ts +31 -0
- package/dist/press-kit/articles/types.d.ts +339 -0
- package/dist/press-kit/articles/widget-styles.d.ts +8 -0
- package/dist/reputation/index.js +3 -3
- package/dist/reputation/server.js +2 -2
- package/dist/revalidate/index.js +2 -2
- package/dist/runtime/index.js +5 -4
- package/dist/seo/client.js +6 -6
- package/dist/seo/index.js +7 -7
- package/dist/seo/llms.js +8 -8
- package/dist/seo/register-sitemap-cli.js +1 -1
- package/dist/seo/sitemap.js +6 -6
- package/dist/server/index.js +3 -2
- package/dist/shared/build-entries.d.ts +2 -1
- package/dist/shared/clientApiConfig.d.ts +2 -0
- package/dist/shared/import-specifiers.d.ts +1 -1
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.js +8 -0
- package/dist/shared/reporting-gate.d.ts +2 -0
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +2 -2
- package/dist/sitemap/index.js +6 -6
- package/dist/sync/index.js +6 -6
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +7 -7
- package/dist/website/popups.js +6 -6
- package/dist/{writeLLMsTxt-DGKLYXIW.js → writeLLMsTxt-N4Y4YC2H.js} +5 -5
- package/docs/MIGRATING-TO-PRESS-KIT.md +83 -0
- package/docs.json +145 -29
- package/package.json +15 -5
- package/src/articles/README.md +5 -360
- package/src/mcp/README.md +16 -0
- package/src/og/README.md +1 -1
- package/src/runtime/README.md +4 -0
- package/dist/SiteChat-JSHPGAE3.js +0 -6
- package/dist/SiteDesignReporter-L2JBAKKK.js +0 -12
- package/dist/SitemapSync-VV2YSMIW.js +0 -9
- package/dist/article-tables-AXSZOGNW.js +0 -2
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { sonorFetch } from './chunk-3VSFOD2Z.js';
|
|
2
|
+
import { readPublishedApiConfig } from './chunk-W7OPEMGJ.js';
|
|
3
|
+
|
|
4
|
+
// src/forms/formsApi.ts
|
|
5
|
+
var config = null;
|
|
6
|
+
function configureFormsApi(options) {
|
|
7
|
+
config = options;
|
|
8
|
+
}
|
|
9
|
+
function getConfig() {
|
|
10
|
+
if (config) return config;
|
|
11
|
+
const { apiUrl, apiKey } = readPublishedApiConfig();
|
|
12
|
+
if (apiUrl && apiKey) {
|
|
13
|
+
return { baseUrl: apiUrl, apiKey };
|
|
14
|
+
}
|
|
15
|
+
throw new Error(
|
|
16
|
+
"Forms API not configured. Use SiteKitLayout in your root layout or call configureFormsApi() first."
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
async function apiRequest(method, path, body) {
|
|
20
|
+
const { baseUrl, apiKey, getAuthToken } = getConfig();
|
|
21
|
+
const headers = {
|
|
22
|
+
"Content-Type": "application/json"
|
|
23
|
+
};
|
|
24
|
+
if (apiKey) {
|
|
25
|
+
headers["x-api-key"] = apiKey;
|
|
26
|
+
} else if (getAuthToken) {
|
|
27
|
+
const token = await getAuthToken();
|
|
28
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
29
|
+
}
|
|
30
|
+
const response = await sonorFetch(`${baseUrl}${path}`, {
|
|
31
|
+
method,
|
|
32
|
+
headers,
|
|
33
|
+
body: body ? JSON.stringify(body) : void 0
|
|
34
|
+
}, { retries: 0 });
|
|
35
|
+
if (!response.ok) {
|
|
36
|
+
const error = await response.json().catch(() => ({ message: response.statusText }));
|
|
37
|
+
throw new Error(error.message || `API error: ${response.status}`);
|
|
38
|
+
}
|
|
39
|
+
if (response.status === 204) {
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
return response.json();
|
|
43
|
+
}
|
|
44
|
+
var formsApi = {
|
|
45
|
+
/**
|
|
46
|
+
* List all forms for a project
|
|
47
|
+
*/
|
|
48
|
+
async list(options = {}) {
|
|
49
|
+
const params = new URLSearchParams();
|
|
50
|
+
if (options.projectId) params.set("projectId", options.projectId);
|
|
51
|
+
if (options.formType) params.set("formType", options.formType);
|
|
52
|
+
if (options.isActive !== void 0) params.set("isActive", String(options.isActive));
|
|
53
|
+
if (options.search) params.set("search", options.search);
|
|
54
|
+
const query = params.toString();
|
|
55
|
+
const result = await apiRequest("GET", `/forms${query ? `?${query}` : ""}`);
|
|
56
|
+
return result.data;
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Get a single form by ID or slug
|
|
60
|
+
*/
|
|
61
|
+
async get(idOrSlug) {
|
|
62
|
+
return apiRequest("GET", `/forms/${idOrSlug}`);
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Create a new form
|
|
66
|
+
*/
|
|
67
|
+
async create(input) {
|
|
68
|
+
return apiRequest("POST", "/forms", input);
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Update an existing form
|
|
72
|
+
*/
|
|
73
|
+
async update(id, input) {
|
|
74
|
+
return apiRequest("PUT", `/forms/${id}`, input);
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Delete a form
|
|
78
|
+
*/
|
|
79
|
+
async delete(id) {
|
|
80
|
+
return apiRequest("DELETE", `/forms/${id}`);
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Add a field to an existing form
|
|
84
|
+
*/
|
|
85
|
+
async addField(formId, field2) {
|
|
86
|
+
const form = await formsApi.get(formId);
|
|
87
|
+
const maxSortOrder = Math.max(0, ...(form.fields || []).map((f) => f.sortOrder || 0));
|
|
88
|
+
return formsApi.update(formId, {
|
|
89
|
+
fields: [
|
|
90
|
+
...form.fields || [],
|
|
91
|
+
{ ...field2, sortOrder: field2.sortOrder ?? maxSortOrder + 1 }
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Update a field in an existing form
|
|
97
|
+
*/
|
|
98
|
+
async updateField(formId, fieldSlug, updates) {
|
|
99
|
+
const form = await formsApi.get(formId);
|
|
100
|
+
return formsApi.update(formId, {
|
|
101
|
+
fields: (form.fields || []).map(
|
|
102
|
+
(f) => f.slug === fieldSlug ? { ...f, ...updates } : f
|
|
103
|
+
)
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Remove a field from a form
|
|
108
|
+
*/
|
|
109
|
+
async removeField(formId, fieldSlug) {
|
|
110
|
+
const form = await formsApi.get(formId);
|
|
111
|
+
return formsApi.update(formId, {
|
|
112
|
+
fields: (form.fields || []).filter((f) => f.slug !== fieldSlug)
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* Reorder fields in a form
|
|
117
|
+
*/
|
|
118
|
+
async reorderFields(formId, fieldSlugs) {
|
|
119
|
+
const form = await formsApi.get(formId);
|
|
120
|
+
const fieldsMap = new Map((form.fields || []).map((f) => [f.slug, f]));
|
|
121
|
+
const orderedFields = fieldSlugs.map((slug, index) => {
|
|
122
|
+
const field2 = fieldsMap.get(slug);
|
|
123
|
+
if (!field2) throw new Error(`Field not found: ${slug}`);
|
|
124
|
+
return { ...field2, sortOrder: index };
|
|
125
|
+
});
|
|
126
|
+
return formsApi.update(formId, { fields: orderedFields });
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* Clone a form
|
|
130
|
+
*/
|
|
131
|
+
async clone(formId, newSlug, newName) {
|
|
132
|
+
const form = await formsApi.get(formId);
|
|
133
|
+
return formsApi.create({
|
|
134
|
+
projectId: form.projectId,
|
|
135
|
+
slug: newSlug,
|
|
136
|
+
name: newName || `${form.name} (Copy)`,
|
|
137
|
+
description: form.description,
|
|
138
|
+
formType: form.formType,
|
|
139
|
+
successMessage: form.successMessage,
|
|
140
|
+
redirectUrl: form.redirectUrl,
|
|
141
|
+
notificationEmails: form.notificationEmails,
|
|
142
|
+
submitButtonText: form.submitButtonText,
|
|
143
|
+
layout: form.layout,
|
|
144
|
+
showProgress: form.showProgress,
|
|
145
|
+
enableSaveDraft: form.enableSaveDraft,
|
|
146
|
+
isActive: false,
|
|
147
|
+
// Clone as inactive
|
|
148
|
+
fields: (form.fields || []).map(({ id, ...field2 }) => field2),
|
|
149
|
+
// Remove IDs
|
|
150
|
+
steps: (form.steps || []).map(({ id, ...step }) => step)
|
|
151
|
+
// Remove IDs
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
/**
|
|
155
|
+
* Activate or deactivate a form
|
|
156
|
+
*/
|
|
157
|
+
async setActive(formId, isActive) {
|
|
158
|
+
return formsApi.update(formId, { isActive });
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* Sync a form definition to the backend
|
|
162
|
+
* Creates the form if it doesn't exist, updates if it does
|
|
163
|
+
* Perfect for defining forms in code during development
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```tsx
|
|
167
|
+
* // In your app initialization or form component
|
|
168
|
+
* await formsApi.sync({
|
|
169
|
+
* slug: 'contact',
|
|
170
|
+
* name: 'Contact Form',
|
|
171
|
+
* formType: 'prospect',
|
|
172
|
+
* fields: [
|
|
173
|
+
* field.text('name', 'Your Name', { isRequired: true }),
|
|
174
|
+
* field.email('email', 'Email Address'),
|
|
175
|
+
* field.phone('phone', 'Phone Number'),
|
|
176
|
+
* field.textarea('message', 'Message'),
|
|
177
|
+
* ]
|
|
178
|
+
* })
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
async sync(input) {
|
|
182
|
+
return apiRequest(
|
|
183
|
+
"POST",
|
|
184
|
+
"/api/public/forms/sync",
|
|
185
|
+
input
|
|
186
|
+
);
|
|
187
|
+
},
|
|
188
|
+
/**
|
|
189
|
+
* Sync multiple forms at once
|
|
190
|
+
* Useful for initializing all forms in your app
|
|
191
|
+
*
|
|
192
|
+
* Runs sequentially to avoid bursting the API (many hosts throttle concurrent POSTs → 429).
|
|
193
|
+
*/
|
|
194
|
+
async syncAll(forms) {
|
|
195
|
+
const results = [];
|
|
196
|
+
for (const form of forms) {
|
|
197
|
+
results.push(await formsApi.sync(form));
|
|
198
|
+
}
|
|
199
|
+
return results;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
var field = {
|
|
203
|
+
text: (slug, label, options) => ({
|
|
204
|
+
slug,
|
|
205
|
+
label,
|
|
206
|
+
fieldType: "text",
|
|
207
|
+
...options
|
|
208
|
+
}),
|
|
209
|
+
email: (slug, label, options) => ({
|
|
210
|
+
slug,
|
|
211
|
+
label,
|
|
212
|
+
fieldType: "email",
|
|
213
|
+
isRequired: true,
|
|
214
|
+
...options
|
|
215
|
+
}),
|
|
216
|
+
phone: (slug, label, options) => ({
|
|
217
|
+
slug,
|
|
218
|
+
label,
|
|
219
|
+
fieldType: "phone",
|
|
220
|
+
...options
|
|
221
|
+
}),
|
|
222
|
+
textarea: (slug, label, options) => ({
|
|
223
|
+
slug,
|
|
224
|
+
label,
|
|
225
|
+
fieldType: "textarea",
|
|
226
|
+
...options
|
|
227
|
+
}),
|
|
228
|
+
select: (slug, label, choices, options) => ({
|
|
229
|
+
slug,
|
|
230
|
+
label,
|
|
231
|
+
fieldType: "select",
|
|
232
|
+
options: choices,
|
|
233
|
+
...options
|
|
234
|
+
}),
|
|
235
|
+
radio: (slug, label, choices, options) => ({
|
|
236
|
+
slug,
|
|
237
|
+
label,
|
|
238
|
+
fieldType: "radio",
|
|
239
|
+
options: choices,
|
|
240
|
+
...options
|
|
241
|
+
}),
|
|
242
|
+
checkbox: (slug, label, options) => ({
|
|
243
|
+
slug,
|
|
244
|
+
label,
|
|
245
|
+
fieldType: "checkbox",
|
|
246
|
+
...options
|
|
247
|
+
}),
|
|
248
|
+
date: (slug, label, options) => ({
|
|
249
|
+
slug,
|
|
250
|
+
label,
|
|
251
|
+
fieldType: "date",
|
|
252
|
+
...options
|
|
253
|
+
}),
|
|
254
|
+
number: (slug, label, options) => ({
|
|
255
|
+
slug,
|
|
256
|
+
label,
|
|
257
|
+
fieldType: "number",
|
|
258
|
+
...options
|
|
259
|
+
}),
|
|
260
|
+
rating: (slug, label, options) => ({
|
|
261
|
+
slug,
|
|
262
|
+
label,
|
|
263
|
+
fieldType: "rating",
|
|
264
|
+
...options
|
|
265
|
+
}),
|
|
266
|
+
file: (slug, label, options) => ({
|
|
267
|
+
slug,
|
|
268
|
+
label,
|
|
269
|
+
fieldType: "file",
|
|
270
|
+
...options
|
|
271
|
+
}),
|
|
272
|
+
hidden: (slug, defaultValue) => ({
|
|
273
|
+
slug,
|
|
274
|
+
label: "",
|
|
275
|
+
fieldType: "hidden",
|
|
276
|
+
defaultValue
|
|
277
|
+
}),
|
|
278
|
+
heading: (slug, label) => ({
|
|
279
|
+
slug,
|
|
280
|
+
label,
|
|
281
|
+
fieldType: "heading"
|
|
282
|
+
}),
|
|
283
|
+
paragraph: (slug, label) => ({
|
|
284
|
+
slug,
|
|
285
|
+
label,
|
|
286
|
+
fieldType: "paragraph"
|
|
287
|
+
})
|
|
288
|
+
};
|
|
289
|
+
function defineForm(definition) {
|
|
290
|
+
const fieldsWithOrder = definition.fields.map((f, index) => ({
|
|
291
|
+
...f,
|
|
292
|
+
sortOrder: f.sortOrder ?? index
|
|
293
|
+
}));
|
|
294
|
+
return {
|
|
295
|
+
...definition,
|
|
296
|
+
fields: fieldsWithOrder,
|
|
297
|
+
formType: definition.formType || "contact",
|
|
298
|
+
successMessage: definition.successMessage || "Thank you for your submission!",
|
|
299
|
+
submitButtonText: definition.submitButtonText || "Submit",
|
|
300
|
+
layout: definition.layout || "stacked",
|
|
301
|
+
isActive: definition.isActive ?? true
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
async function initializeForms(forms) {
|
|
305
|
+
if (typeof window === "undefined") {
|
|
306
|
+
console.log(`[Site-Kit] ${forms.length} form(s) ready to sync: ${forms.map((f) => f.slug).join(", ")}`);
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
try {
|
|
310
|
+
const results = await formsApi.syncAll(forms);
|
|
311
|
+
const created = results.filter((r) => r.created).length;
|
|
312
|
+
const updated = results.filter((r) => r.updated).length;
|
|
313
|
+
console.log(`[Site-Kit] Forms synced: ${created} created, ${updated} updated`);
|
|
314
|
+
} catch (error) {
|
|
315
|
+
console.error("[Site-Kit] Failed to sync forms:", error);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { configureFormsApi, defineForm, field, formsApi, initializeForms };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
|
|
3
|
-
import { resolveAnalyticsTarget } from './chunk-
|
|
3
|
+
import { resolveAnalyticsTarget } from './chunk-DLM4FFNH.js';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import dynamic from 'next/dynamic';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
var LazyChatWidget = dynamic(
|
|
10
|
-
() => import('./ChatWidget-
|
|
10
|
+
() => import('./ChatWidget-H4EOSH5I.js').then((m) => ({ default: m.ChatWidget })),
|
|
11
11
|
{ ssr: false }
|
|
12
12
|
);
|
|
13
13
|
function SiteChat(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getLLMsData, getOptimizedLLMsTxt } from './chunk-
|
|
2
|
-
import { linkClassificationHost } from './chunk-
|
|
3
|
-
import { resolveArticleUrl } from './chunk-
|
|
1
|
+
import { getLLMsData, getOptimizedLLMsTxt } from './chunk-XA7Q2VQA.js';
|
|
2
|
+
import { linkClassificationHost } from './chunk-5D7ZISUP.js';
|
|
3
|
+
import { resolveArticleUrl } from './chunk-4K735O3J.js';
|
|
4
4
|
import { freshFetch } from './chunk-UAYAJPEP.js';
|
|
5
5
|
import { LLM_GEO_CONTRACT_VERSION, sanitizePrimaryLanguageTag, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary } from './chunk-NZ4RXN3G.js';
|
|
6
6
|
import { resolveTrailingSlash, applyTrailingSlash } from './chunk-YVKRYQRG.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { toHexColor, normalizeDesignTokens, designTokensHash } from './chunk-IHG36STL.js';
|
|
2
2
|
import { contrastRatio, parseColor, relativeLuminance } from './chunk-S22FSH7C.js';
|
|
3
|
-
import { resolveAnalyticsTarget } from './chunk-
|
|
4
|
-
import { sonorFetch } from './chunk-
|
|
5
|
-
import { SITE_KIT_VERSION } from './chunk-
|
|
3
|
+
import { resolveAnalyticsTarget } from './chunk-DLM4FFNH.js';
|
|
4
|
+
import { sonorFetch } from './chunk-3VSFOD2Z.js';
|
|
5
|
+
import { SITE_KIT_VERSION } from './chunk-5S7YTOCB.js';
|
|
6
6
|
|
|
7
7
|
// src/website/design.ts
|
|
8
8
|
var SITE_DESIGN_PATH = "/api/public/site/design";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FRAME_READY_MESSAGE } from './chunk-EKBEOXTH.js';
|
|
2
|
-
import { readPublishedApiConfig, DEFAULT_SONOR_API_URL } from './chunk-
|
|
2
|
+
import { readPublishedApiConfig, DEFAULT_SONOR_API_URL } from './chunk-W7OPEMGJ.js';
|
|
3
3
|
|
|
4
4
|
// src/shared/frame.ts
|
|
5
5
|
function isFramed() {
|
|
@@ -46,8 +46,12 @@ function announceFrameReady() {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
// src/shared/reporting-gate.ts
|
|
49
|
+
function isPrivatePreview() {
|
|
50
|
+
return typeof document !== "undefined" && !!document.querySelector("[data-sk-private-preview]");
|
|
51
|
+
}
|
|
49
52
|
var announcedSuppression = false;
|
|
50
53
|
function resolveAnalyticsTarget(options = {}) {
|
|
54
|
+
if (isPrivatePreview()) return null;
|
|
51
55
|
const config = typeof window === "undefined" ? void 0 : window;
|
|
52
56
|
const published = readPublishedApiConfig();
|
|
53
57
|
const apiUrl = options.apiUrl || published.apiUrl || DEFAULT_SONOR_API_URL;
|
|
@@ -66,4 +70,4 @@ function resolveAnalyticsTarget(options = {}) {
|
|
|
66
70
|
return { apiUrl, apiKey };
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
export { announceFrameReady, isCrossOriginFrame, isFramed, isTopFrameSameOrigin, resolveAnalyticsTarget };
|
|
73
|
+
export { announceFrameReady, isCrossOriginFrame, isFramed, isPrivatePreview, isTopFrameSameOrigin, resolveAnalyticsTarget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateLLMsTxt, generateLLMsFullTxt, appendAgentAccessSection } from './chunk-
|
|
1
|
+
import { generateLLMsTxt, generateLLMsFullTxt, appendAgentAccessSection } from './chunk-CE7VPAEH.js';
|
|
2
2
|
import { createHash } from 'crypto';
|
|
3
3
|
import { existsSync, readFileSync } from 'fs';
|
|
4
4
|
import { join } from 'path';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { locToPath, isMalformedSitemapPath, inferPageType } from './chunk-YVKRYQRG.js';
|
|
3
|
-
import { resolveAnalyticsTarget } from './chunk-
|
|
4
|
-
import { sonorFetch } from './chunk-
|
|
3
|
+
import { resolveAnalyticsTarget } from './chunk-DLM4FFNH.js';
|
|
4
|
+
import { sonorFetch } from './chunk-3VSFOD2Z.js';
|
|
5
5
|
import { useRef, useEffect } from 'react';
|
|
6
6
|
|
|
7
7
|
var SYNC_STAMP_KEY = "_sk_sitemap_synced_at";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
|
|
3
3
|
import { readAnalyticsIdentity } from './chunk-5ROTTMBL.js';
|
|
4
4
|
import { getOrCreateVisitorId } from './chunk-ZKADJNR2.js';
|
|
5
|
-
import { resolveAnalyticsTarget } from './chunk-
|
|
6
|
-
import { sonorFetch } from './chunk-
|
|
5
|
+
import { resolveAnalyticsTarget } from './chunk-DLM4FFNH.js';
|
|
6
|
+
import { sonorFetch } from './chunk-3VSFOD2Z.js';
|
|
7
7
|
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
8
8
|
import ReactDOM from 'react-dom';
|
|
9
9
|
import dynamic from 'next/dynamic';
|
|
@@ -161,7 +161,7 @@ function activatePopup(active, id, popups) {
|
|
|
161
161
|
return [...active, id];
|
|
162
162
|
}
|
|
163
163
|
var LazyBlocksPopup = dynamic(
|
|
164
|
-
() => import('./BlocksPopup-
|
|
164
|
+
() => import('./BlocksPopup-UJXZ4AXG.js').then((m) => ({ default: m.BlocksPopup })),
|
|
165
165
|
{ ssr: false }
|
|
166
166
|
);
|
|
167
167
|
function SitePopups(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { countStageViews, countStageQuestions, useFieldControls } from './chunk-
|
|
3
|
-
import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-
|
|
2
|
+
import { countStageViews, countStageQuestions, useFieldControls } from './chunk-44GVU5UH.js';
|
|
3
|
+
import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-JV5YWTJN.js';
|
|
4
4
|
import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
|
|
5
5
|
import { isFieldVisible, validateField, isFieldComplete, isDisplayOnly, unseenControlValues } from './chunk-C2FZBUSS.js';
|
|
6
6
|
import { HoneypotField } from './chunk-DXO6SBMD.js';
|
|
@@ -63,7 +63,7 @@ function FormClient({
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
let cancelled = false;
|
|
66
|
-
const load = resolvedExperience === "stage" ? import('./FormStage-
|
|
66
|
+
const load = resolvedExperience === "stage" ? import('./FormStage-PQPUPQWW.js').then((m) => m.FormStage) : import('./FormSpotlight-CGF5ZE6S.js').then((m) => m.FormSpotlight);
|
|
67
67
|
load.then((Component) => {
|
|
68
68
|
if (!cancelled) setExperience(() => Component);
|
|
69
69
|
}).catch((err) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { writeLLMsTxtToPublic } from './chunk-
|
|
1
|
+
import { writeLLMsTxtToPublic } from './chunk-CE7VPAEH.js';
|
|
2
2
|
import { getSiteConfig } from './chunk-Z22QVHT4.js';
|
|
3
3
|
import { buildFetch } from './chunk-UAYAJPEP.js';
|
|
4
4
|
import { findAppDirForDiscovery } from './chunk-ZEGVKVD5.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { widgetStyle, widgetTitleStyle } from './chunk-
|
|
1
|
+
import { widgetStyle, widgetTitleStyle } from './chunk-DJAYFHVF.js';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
function NewsletterShell({
|
|
@@ -16,7 +16,7 @@ function NewsletterShell({
|
|
|
16
16
|
/* @__PURE__ */ jsx("h4", { style: { ...widgetTitleStyle, color: "var(--sk-primary)" }, children: title }),
|
|
17
17
|
status === "success" ? /* @__PURE__ */ jsx("p", { style: { fontSize: 14, color: "var(--sk-text-secondary)", margin: 0 }, children: successMessage }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
18
|
/* @__PURE__ */ jsx("p", { style: { fontSize: 14, color: "var(--sk-text-secondary)", marginBottom: 16 }, children: description }),
|
|
19
|
-
/* @__PURE__ */ jsxs("form", { onSubmit: onFormSubmit, style: { display: "flex", gap: 8 }, children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("form", { onSubmit: onFormSubmit, style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: [
|
|
20
20
|
/* @__PURE__ */ jsx(
|
|
21
21
|
"input",
|
|
22
22
|
{
|
|
@@ -28,7 +28,9 @@ function NewsletterShell({
|
|
|
28
28
|
onChange: (e) => onEmailChange(e.target.value),
|
|
29
29
|
disabled: status === "submitting",
|
|
30
30
|
style: {
|
|
31
|
-
flex: 1,
|
|
31
|
+
flex: "1 1 180px",
|
|
32
|
+
minWidth: 0,
|
|
33
|
+
minHeight: 44,
|
|
32
34
|
padding: "10px 12px",
|
|
33
35
|
border: "1px solid var(--sk-border)",
|
|
34
36
|
borderRadius: 8,
|
|
@@ -42,6 +44,7 @@ function NewsletterShell({
|
|
|
42
44
|
type: "submit",
|
|
43
45
|
disabled: status === "submitting",
|
|
44
46
|
style: {
|
|
47
|
+
minHeight: 44,
|
|
45
48
|
padding: "10px 16px",
|
|
46
49
|
backgroundColor: "var(--sk-primary)",
|
|
47
50
|
color: "var(--sk-bg)",
|
|
@@ -6,8 +6,8 @@ import { normalizeFormConfig, DEFAULT_FORM_SUCCESS_MESSAGE } from './chunk-5SQK3
|
|
|
6
6
|
import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
|
|
7
7
|
import { onPageLeave } from './chunk-L2V5PUFN.js';
|
|
8
8
|
import { uuid } from './chunk-GJWI74ZZ.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { sonorFetch, sonorBeacon } from './chunk-3VSFOD2Z.js';
|
|
10
|
+
import { readPublishedApiConfig, getClientApiConfig } from './chunk-W7OPEMGJ.js';
|
|
11
11
|
import { useRef, useCallback, useEffect, useState, useMemo } from 'react';
|
|
12
12
|
|
|
13
13
|
// src/forms/field-interactions.ts
|
|
@@ -632,6 +632,7 @@ async function submitForm({
|
|
|
632
632
|
}
|
|
633
633
|
function submitResult(receipt, values) {
|
|
634
634
|
const r = receipt && typeof receipt === "object" ? receipt : {};
|
|
635
|
+
const enrollment = r.publicationEnrollment;
|
|
635
636
|
const id = typeof r.submissionId === "string" ? r.submissionId : typeof r.id === "string" ? r.id : "";
|
|
636
637
|
return {
|
|
637
638
|
success: r.success !== false,
|
|
@@ -639,6 +640,7 @@ function submitResult(receipt, values) {
|
|
|
639
640
|
submissionId: id,
|
|
640
641
|
message: typeof r.message === "string" ? r.message : void 0,
|
|
641
642
|
redirectUrl: typeof r.redirectUrl === "string" ? r.redirectUrl : null,
|
|
643
|
+
...enrollment?.status === "accepted" && typeof enrollment.message === "string" ? { publicationEnrollment: { status: "accepted", message: enrollment.message } } : {},
|
|
642
644
|
data: { ...values }
|
|
643
645
|
};
|
|
644
646
|
}
|
|
@@ -689,6 +691,9 @@ function useForm(formIdOrSlug, options = {}) {
|
|
|
689
691
|
const [step, setStep] = useState(1);
|
|
690
692
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
691
693
|
const [isComplete, setIsComplete] = useState(false);
|
|
694
|
+
const [reloadVersion, setReloadVersion] = useState(0);
|
|
695
|
+
const [submissionResult, setSubmissionResult] = useState(null);
|
|
696
|
+
const reload = useCallback(() => setReloadVersion((value) => value + 1), []);
|
|
692
697
|
const [submitError, setSubmitError] = useState(null);
|
|
693
698
|
const isSubmittingRef = useRef(false);
|
|
694
699
|
const formLoadedAt = useFormLoadedAt();
|
|
@@ -696,7 +701,7 @@ function useForm(formIdOrSlug, options = {}) {
|
|
|
696
701
|
const isMultiStep = form?.is_multi_step || false;
|
|
697
702
|
useEffect(() => {
|
|
698
703
|
const initialMatches = initialForm && (initialForm.slug === formIdOrSlug || initialForm.id === formIdOrSlug);
|
|
699
|
-
if (initialMatches) {
|
|
704
|
+
if (initialMatches && reloadVersion === 0) {
|
|
700
705
|
const siteKey = initialForm.recaptcha_site_key;
|
|
701
706
|
if (typeof window !== "undefined" && siteKey) {
|
|
702
707
|
window.__SITE_KIT_RECAPTCHA_SITE_KEY__ = siteKey;
|
|
@@ -750,7 +755,7 @@ function useForm(formIdOrSlug, options = {}) {
|
|
|
750
755
|
}
|
|
751
756
|
}
|
|
752
757
|
fetchForm();
|
|
753
|
-
}, [formIdOrSlug, projectId]);
|
|
758
|
+
}, [formIdOrSlug, projectId, reloadVersion]);
|
|
754
759
|
const allFields = useMemo(() => form?.fields || [], [form]);
|
|
755
760
|
const fields = useMemo(() => {
|
|
756
761
|
if (!isMultiStep) return allFields;
|
|
@@ -884,6 +889,7 @@ function useForm(formIdOrSlug, options = {}) {
|
|
|
884
889
|
agentInvoked
|
|
885
890
|
});
|
|
886
891
|
trackComplete();
|
|
892
|
+
setSubmissionResult(data);
|
|
887
893
|
setIsComplete(true);
|
|
888
894
|
onSuccess?.(data);
|
|
889
895
|
const finalRedirect = redirectUrl !== false ? redirectUrl || form.redirect_url : void 0;
|
|
@@ -924,9 +930,12 @@ function useForm(formIdOrSlug, options = {}) {
|
|
|
924
930
|
setErrors({});
|
|
925
931
|
setStep(1);
|
|
926
932
|
setIsComplete(false);
|
|
933
|
+
setSubmissionResult(null);
|
|
927
934
|
setSubmitError(null);
|
|
928
935
|
}, [initialValues]);
|
|
929
936
|
return {
|
|
937
|
+
reload,
|
|
938
|
+
submissionResult,
|
|
930
939
|
form,
|
|
931
940
|
isLoading,
|
|
932
941
|
fetchError,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { SITE_EDIT_PARAM } from './chunk-6G43IRWR.js';
|
|
3
|
-
import { publishSiteCredential } from './chunk-
|
|
4
|
-
import { FleetHeartbeat } from './chunk-
|
|
3
|
+
import { publishSiteCredential } from './chunk-MZX4EN6Z.js';
|
|
4
|
+
import { FleetHeartbeat } from './chunk-5TDZHIG6.js';
|
|
5
5
|
import { useDeferredActivation } from './chunk-YC7ELZS3.js';
|
|
6
6
|
import { resolveSiteHost } from './chunk-FESKKJAS.js';
|
|
7
7
|
import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-ZKADJNR2.js';
|
|
8
|
-
import { announceFrameReady, isCrossOriginFrame } from './chunk-
|
|
9
|
-
import { SignalBridge } from './chunk-
|
|
8
|
+
import { announceFrameReady, isPrivatePreview, isCrossOriginFrame } from './chunk-DLM4FFNH.js';
|
|
9
|
+
import { SignalBridge } from './chunk-4HYIDQJJ.js';
|
|
10
10
|
import React, { useState, useRef, useCallback, useEffect, Suspense } from 'react';
|
|
11
11
|
import dynamic from 'next/dynamic';
|
|
12
|
-
import { jsx,
|
|
12
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
// src/shared/edit-bridge.ts
|
|
15
15
|
function startEditBridge() {
|
|
@@ -33,23 +33,23 @@ function startEditBridge() {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
var LazyAnalyticsProvider = dynamic(
|
|
36
|
-
() => import('./AnalyticsProvider-
|
|
36
|
+
() => import('./AnalyticsProvider-D6GWEJSB.js').then((m) => ({ default: m.AnalyticsProvider })),
|
|
37
37
|
{ ssr: false }
|
|
38
38
|
);
|
|
39
39
|
var LazySiteChat = dynamic(
|
|
40
|
-
() => import('./SiteChat-
|
|
40
|
+
() => import('./SiteChat-OAZH34W7.js').then((m) => ({ default: m.SiteChat })),
|
|
41
41
|
{ ssr: false }
|
|
42
42
|
);
|
|
43
43
|
var LazySitePopups = dynamic(
|
|
44
|
-
() => import('./SitePopups-
|
|
44
|
+
() => import('./SitePopups-MLAT35UN.js').then((m) => ({ default: m.SitePopups })),
|
|
45
45
|
{ ssr: false }
|
|
46
46
|
);
|
|
47
47
|
var LazySiteDesignReporter = dynamic(
|
|
48
|
-
() => import('./SiteDesignReporter-
|
|
48
|
+
() => import('./SiteDesignReporter-IWBMZJYU.js').then((m) => ({ default: m.SiteDesignReporter })),
|
|
49
49
|
{ ssr: false }
|
|
50
50
|
);
|
|
51
51
|
var LazySitemapSync = dynamic(
|
|
52
|
-
() => import('./SitemapSync-
|
|
52
|
+
() => import('./SitemapSync-6KQLKFO2.js').then((m) => ({ default: m.SitemapSync })),
|
|
53
53
|
{ ssr: false }
|
|
54
54
|
);
|
|
55
55
|
function SiteKitClientProviders({
|
|
@@ -83,6 +83,7 @@ function SiteKitClientProviders({
|
|
|
83
83
|
useEffect(() => announceFrameReady(), []);
|
|
84
84
|
useEffect(() => startEditBridge(), []);
|
|
85
85
|
const siblings = [];
|
|
86
|
+
if (isPrivatePreview()) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
86
87
|
if (signal) {
|
|
87
88
|
const signalConfig = typeof signal === "object" ? signal : {};
|
|
88
89
|
siblings.push(
|
|
@@ -6,7 +6,7 @@ import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
|
|
|
6
6
|
import React, { useRef, useEffect, useState, useMemo, useCallback } from 'react';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
var loadInteractiveForm = () => import('./ManagedForm-
|
|
9
|
+
var loadInteractiveForm = () => import('./ManagedForm-YOEZ7CFS.js').then((m) => m.ManagedForm);
|
|
10
10
|
var REPLAY_WAIT_MS = 8e3;
|
|
11
11
|
function FormEnhancer({
|
|
12
12
|
formId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { trackedFreshFetch } from './chunk-UAYAJPEP.js';
|
|
2
2
|
import { isNextControlFlow } from './chunk-C7TLGL3R.js';
|
|
3
3
|
import { monotonicMs } from './chunk-MH2DSGC6.js';
|
|
4
|
-
import { SITE_KIT_VERSION } from './chunk-
|
|
4
|
+
import { SITE_KIT_VERSION } from './chunk-5S7YTOCB.js';
|
|
5
5
|
import 'server-only';
|
|
6
6
|
|
|
7
7
|
var MINT_PATH = "/api/public/site-token";
|