@sonordev/site-kit 8.5.2 → 8.7.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/CHANGELOG.md +16 -0
- package/agent-manifest.json +1 -1
- package/dist/{AnalyticsProvider-HSJMHYBA.js → AnalyticsProvider-3UIQMIRW.js} +6 -6
- package/dist/{ArticleViewTracker-XEA6ZY67.js → ArticleViewTracker-KNXP2DXL.js} +5 -5
- package/dist/{BlocksPopup-DUTOENMQ.js → BlocksPopup-DFE32GPX.js} +9 -8
- package/dist/{ChatWidget-PMVQTSEU.js → ChatWidget-L74L4YAD.js} +6 -6
- package/dist/FileField-P3PLEAON.js +237 -0
- package/dist/{FormSpotlight-RTPJPLQ3.js → FormSpotlight-DNBSBRIE.js} +2 -2
- package/dist/{FormStage-UANGD66Z.js → FormStage-I4JGLT57.js} +2 -2
- package/dist/{ManagedForm-4AACRHEY.js → ManagedForm-GJRGBM6W.js} +8 -8
- package/dist/{ManagedNewsletterForm-RWKFWZ72.js → ManagedNewsletterForm-AUZ6YB7G.js} +11 -11
- package/dist/{SignalCore-XULLPKPX.js → SignalCore-UV7K7PT4.js} +5 -5
- package/dist/SiteChat-6UWE545R.js +6 -0
- package/dist/SiteDesignReporter-ZSU76DZJ.js +13 -0
- package/dist/{SitePopups-US6VQN7X.js → SitePopups-XHWU7GNF.js} +6 -6
- package/dist/SitemapSync-ELWV6W7Y.js +9 -0
- package/dist/_client/booking-widget.js +5 -5
- package/dist/affiliates/index.js +3 -3
- package/dist/analytics/content-text.d.ts +17 -0
- package/dist/analytics/index.js +6 -6
- package/dist/{article-styles-VASFBYA3.js → article-styles-D7VCDXMG.js} +2 -1
- package/dist/article-tables-W45BE353.js +3 -0
- package/dist/articles/index.js +7 -20
- package/dist/articles/server-ui.js +29 -55
- package/dist/articles/server.js +6 -5
- package/dist/chat/index.js +9 -9
- package/dist/{chunk-3RDJKIYO.js → chunk-2WDWQI7K.js} +1 -1
- package/dist/{chunk-DLTLXYOV.js → chunk-36ZMNBXZ.js} +4 -9
- package/dist/chunk-3MJNBOUO.js +8 -0
- package/dist/{chunk-IXA7ZB6U.js → chunk-3MLWIBHX.js} +1 -1
- package/dist/{chunk-BF7TZYC3.js → chunk-52KO4LKD.js} +1 -1
- package/dist/{chunk-ZDUTXHM6.js → chunk-5WHBYQJ4.js} +3 -3
- package/dist/{chunk-5D7ZISUP.js → chunk-7DYMM6SS.js} +11 -6
- package/dist/{chunk-HNYECNCU.js → chunk-7YB3QA4P.js} +15 -7
- package/dist/{chunk-N4ZCNYWF.js → chunk-A2MDVP47.js} +1 -1
- package/dist/{chunk-E4PTMORJ.js → chunk-AL5UCWLI.js} +23 -8
- package/dist/{chunk-ANVHRT35.js → chunk-BAJUXQTH.js} +2 -2
- package/dist/{chunk-ITQND6IB.js → chunk-BJYX6SFI.js} +2 -2
- package/dist/{chunk-TYAVHRWH.js → chunk-CVADNHJ4.js} +8 -2
- package/dist/{chunk-5BRHTBPO.js → chunk-DJIGFX33.js} +1 -1
- package/dist/{chunk-ZSU7KTIE.js → chunk-DPYGC7WE.js} +2 -2
- package/dist/{chunk-XA7Q2VQA.js → chunk-EK7P62DT.js} +1 -1
- package/dist/chunk-FXR5PJDL.js +420 -0
- package/dist/{chunk-GLLFIE2R.js → chunk-G5FD7UXK.js} +2 -2
- package/dist/{chunk-OFQ3BU52.js → chunk-HM7CDWFK.js} +1 -1
- package/dist/{chunk-Q4Y3WIHE.js → chunk-HWQPCZOX.js} +1 -1
- package/dist/{chunk-6KU7STM3.js → chunk-HY7ZEU2C.js} +3 -1
- package/dist/chunk-IBHBEUZV.js +27 -0
- package/dist/{chunk-7HRYSLY2.js → chunk-IXZBOOAD.js} +4 -4
- package/dist/chunk-JESLPEST.js +14 -0
- package/dist/{chunk-BC7JMY4Z.js → chunk-JG53YJLM.js} +58 -1
- package/dist/{chunk-FVXCQC7W.js → chunk-JWCCY72G.js} +1 -1
- package/dist/{chunk-RI2N2EBI.js → chunk-JYITKUUB.js} +13 -5
- package/dist/chunk-KIYACQW3.js +1 -0
- package/dist/{chunk-YW3LNSBM.js → chunk-KLIDCNML.js} +1 -1
- package/dist/{chunk-3PT6SO65.js → chunk-L2KSHJS2.js} +5 -5
- package/dist/{chunk-27LYZVPP.js → chunk-LGWN6KCN.js} +2 -2
- package/dist/{chunk-GTVOB5RN.js → chunk-MJW6YIDJ.js} +1 -1
- package/dist/{chunk-CFSIGEUW.js → chunk-MNORERMF.js} +1 -1
- package/dist/{chunk-Y35BWW2C.js → chunk-ODOV76VW.js} +1 -1
- package/dist/{chunk-EQHGPB3J.js → chunk-OHLCE4GC.js} +2 -2
- package/dist/{chunk-OEA7U4HJ.js → chunk-P5PRR2BB.js} +1 -1
- package/dist/{chunk-JJ4JS3LD.js → chunk-PAYCK7FC.js} +1 -1
- package/dist/{chunk-DLM4FFNH.js → chunk-QTBAKOCZ.js} +1 -1
- package/dist/{chunk-2QFIYYMP.js → chunk-RHT7OZNF.js} +1 -1
- package/dist/{chunk-UGZ3B5AK.js → chunk-RWWSOYJO.js} +9 -9
- package/dist/{chunk-T6U6J3QK.js → chunk-T6TWPKBL.js} +1 -1
- package/dist/{chunk-5SQK3D53.js → chunk-TYSIAWC3.js} +1 -0
- package/dist/{chunk-24NM64IV.js → chunk-U4OQJQK6.js} +3 -3
- package/dist/{chunk-GDQKDL3E.js → chunk-UYOE3HA4.js} +2 -2
- package/dist/chunk-VEJD5EJ2.js +344 -0
- package/dist/{chunk-LNSF6BJC.js → chunk-VPZJ7ZTL.js} +2 -2
- package/dist/chunk-XAZC2TUD.js +1119 -0
- package/dist/{chunk-A7RZQI6H.js → chunk-XC2TWYDV.js} +3 -3
- package/dist/{chunk-URJN75ZG.js → chunk-XIDWNXZN.js} +3 -3
- package/dist/chunk-XLAHRN4B.js +1 -0
- package/dist/{chunk-URZTBPZO.js → chunk-XZFOQ2V4.js} +113 -93
- package/dist/{chunk-I4LMZNBN.js → chunk-YYPYLYZM.js} +1 -1
- package/dist/client/index.js +4 -4
- package/dist/contracts/broadcast-layouts.d.ts +133 -0
- package/dist/contracts/business-claims.d.ts +456 -0
- package/dist/contracts/campaign-normalize.d.ts +2 -0
- package/dist/contracts/entries.d.ts +1 -1
- package/dist/contracts/funnels.d.ts +576 -0
- package/dist/contracts/inbox.d.ts +42 -0
- package/dist/contracts/llms.d.ts +200 -0
- package/dist/contracts/outreach.d.ts +267 -0
- package/dist/contracts/page-titles.d.ts +140 -0
- package/dist/contracts/portfolio.d.ts +170 -0
- package/dist/contracts/public-url-host.d.ts +10 -0
- package/dist/contracts/publication-branding.d.ts +151 -0
- package/dist/contracts/publication-charter.d.ts +14 -0
- package/dist/contracts/site-cache.d.ts +2 -0
- package/dist/fleet/index.js +6 -6
- package/dist/forms/FileField.d.ts +3 -1
- package/dist/forms/PrivateFileField.d.ts +3 -0
- package/dist/forms/index.js +11 -11
- package/dist/forms/private-file-rules.d.ts +8 -0
- package/dist/forms/server.js +5 -5
- package/dist/forms/static.js +3 -3
- package/dist/forms/styles.css +17 -1
- package/dist/forms/types.d.ts +4 -0
- package/dist/images/index.js +4 -4
- package/dist/index.js +1 -1
- package/dist/landing/contract.d.ts +2 -13
- package/dist/landing/contract.js +2 -0
- package/dist/landing/index.js +4 -2
- package/dist/landing/managed-server.d.ts +21 -0
- package/dist/landing/managed.d.ts +11 -0
- package/dist/landing/metadata.js +2 -0
- package/dist/landing/server.d.ts +5 -0
- package/dist/landing/server.js +19 -2
- package/dist/layout/client.js +9 -9
- package/dist/layout/index.js +10 -10
- package/dist/llms/contract.js +2 -1
- package/dist/llms/index.js +9 -7
- package/dist/llms/merge.d.ts +29 -0
- package/dist/maps/index.js +3 -3
- package/dist/mcp/sonor.js +12 -11
- package/dist/portfolio/contract.js +1 -1
- package/dist/press-kit/articles/article-body.d.ts +13 -0
- package/dist/press-kit/articles/article-heading-ids.d.ts +7 -0
- package/dist/press-kit/articles/article-headings.d.ts +61 -0
- package/dist/press-kit/articles/html-tags.d.ts +46 -0
- package/dist/press-kit/articles/types.d.ts +2 -0
- package/dist/revalidate/index.js +3 -3
- package/dist/runtime/index.js +3 -3
- package/dist/seo/client.js +6 -6
- package/dist/seo/index.js +14 -13
- package/dist/seo/llms/contract.js +2 -1
- package/dist/seo/llms.js +9 -7
- package/dist/seo/meta/contract.js +2 -1
- package/dist/seo/register-sitemap-cli.js +1 -1
- package/dist/seo/server.js +5 -4
- package/dist/seo/sitemap.js +7 -5
- package/dist/seo-meta/contract.js +2 -1
- package/dist/server/index.js +3 -3
- package/dist/{server-api-EGOKC7Q3.js → server-api-XIKDWSNO.js} +2 -2
- package/dist/shared/build-entries.d.ts +3 -1
- package/dist/shared/markdown.d.ts +7 -6
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +2 -2
- package/dist/sitemap/index.js +7 -5
- package/dist/slots/index.js +2 -2
- package/dist/sync/index.js +5 -5
- package/dist/website/contract.js +2 -1
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +10 -9
- package/dist/website/landing/server.js +19 -2
- package/dist/website/landing.js +4 -2
- package/dist/website/popups.js +9 -8
- package/dist/website/slots.js +2 -2
- package/dist/{writeLLMsTxt-BAK5XMRR.js → writeLLMsTxt-QN2HIVT4.js} +6 -4
- package/docs.json +5 -0
- package/package.json +1 -1
- package/src/analytics/README.md +1 -1
- package/src/forms/README.md +22 -0
- package/src/landing/README.md +64 -0
- package/src/llms/README.md +52 -20
- package/dist/FileField-F7BG4XAZ.js +0 -83
- package/dist/SiteChat-P4CRBRJZ.js +0 -6
- package/dist/SiteDesignReporter-QDVP4WMK.js +0 -12
- package/dist/SitemapSync-5FBRDGHG.js +0 -9
- package/dist/article-tables-6XHVULPU.js +0 -2
- package/dist/chunk-EKBEOXTH.js +0 -114
- package/dist/chunk-NZ4RXN3G.js +0 -145
- package/dist/chunk-OSYCOC3K.js +0 -21
- /package/dist/{chunk-7ZWO5HDQ.js → chunk-BTHEQDN4.js} +0 -0
- /package/dist/{chunk-BQR4IPBW.js → chunk-ISRBSTB7.js} +0 -0
- /package/dist/{chunk-IHG36STL.js → chunk-XHYE24HU.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @sonordev/site-kit Changelog
|
|
2
2
|
|
|
3
|
+
## 8.7.0
|
|
4
|
+
|
|
5
|
+
- Add opt-in managed landing-page reads and a bounded server-rendered layout through `website/landing/server`. Published reads are site scoped and uncached. Private previews use inert conversion controls and suppress reporting.
|
|
6
|
+
- Share campaign normalization and the funnel cache tag with `@sonordev/contracts`. Existing authored landing-page imports remain available.
|
|
7
|
+
- `llms.txt` describes each page with its best source: the page's public summary, then its curated meta description, the meta description the page serves, its schema description and, last, a cleaned copy of its scraped text. A summary that mentions a phone number or an email address loses just that part and is still used; it used to be thrown away whole, and the page fell back to its scrape. Notes are cut at a sentence or word boundary, and a lead-in such as "This page covers" is dropped.
|
|
8
|
+
- A page whose title is its path is named from the path ("Accounting", not `/features/accounting`). A page that answered with an error, a `noindex` page and a utility page (cart, thank-you, login) are left out, and each path is listed once.
|
|
9
|
+
- The page index lists the home page and the key pages first, then one group per section of the site, with the legal pages last. When `maxPages` is smaller than the site, every section stays represented, most valuable first, instead of the end of an alphabetical list being cut.
|
|
10
|
+
- Sections now read About, Contact, Services, Site Pages, Portfolio, FAQ, with `## Optional` last. The contact block prints an address on one line with hours, and is left out when it has nothing in it. Service links are absolute URLs. The line under the name is the first sentence of the description, not the text up to its first full stop.
|
|
11
|
+
- `getLocalData` fills gaps field by field. An empty field from Sonor no longer deletes the business name, description, phone or address the site supplies, and the site's data is read whenever Sonor leaves services, FAQs, pages or those fields empty.
|
|
12
|
+
- The analytics page-text scrape keeps elements apart and leaves out menus, form fields, buttons and dialogs, so stored page text no longer runs a heading into the paragraph after it.
|
|
13
|
+
|
|
14
|
+
## 8.6.0
|
|
15
|
+
|
|
16
|
+
- Managed file fields can accept private documents with drag and drop, upload status, removal and retry. Configure `validation.private_attachments` and `validation.max_files` to accept up to four PDF, JPEG, PNG or WebP files, each up to 10 MB. This requires Sonor's private attachment endpoints; documents never fall back to public media uploads.
|
|
17
|
+
- Lazy date and file controls continue loading correctly when React Strict Mode cleans up and restarts their effects.
|
|
18
|
+
|
|
3
19
|
## 8.5.2
|
|
4
20
|
|
|
5
21
|
- Booking requests include the browser's existing visitor and analytics session IDs so Sonor can connect the recorded journey to the accepted booking's CRM contact. Slot-hold session ownership stays separate.
|
package/agent-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@sonordev/site-kit",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.7.0",
|
|
5
5
|
"description": "Machine-readable manifest for coding agents integrating a site with Sonor. See AGENTS.md (shipped) and docs/SITE-KIT-AGENT-NATIVE.md.",
|
|
6
6
|
"env": {
|
|
7
7
|
"required": [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { AnalyticsProvider, useAnalytics, useAnalyticsOptional, useTrackEvent } from './chunk-
|
|
1
|
+
export { AnalyticsProvider, useAnalytics, useAnalyticsOptional, useTrackEvent } from './chunk-7YB3QA4P.js';
|
|
2
2
|
import './chunk-LCDVPAMR.js';
|
|
3
3
|
import './chunk-IPQKQEWI.js';
|
|
4
4
|
import './chunk-L2V5PUFN.js';
|
|
5
5
|
import './chunk-GJWI74ZZ.js';
|
|
6
6
|
import './chunk-5TM3WPCI.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
7
|
+
import './chunk-QTBAKOCZ.js';
|
|
8
|
+
import './chunk-VEJD5EJ2.js';
|
|
9
|
+
import './chunk-UYOE3HA4.js';
|
|
10
|
+
import './chunk-P5PRR2BB.js';
|
|
11
11
|
import './chunk-W7OPEMGJ.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-MNORERMF.js';
|
|
13
13
|
import './chunk-PKBMQBKP.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import './chunk-
|
|
2
|
+
import './chunk-A2MDVP47.js';
|
|
3
3
|
import './chunk-B7T2SFUF.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-JWCCY72G.js';
|
|
5
5
|
import './chunk-6T6CQVNL.js';
|
|
6
6
|
import './chunk-5ROTTMBL.js';
|
|
7
7
|
import { useDeferredActivation } from './chunk-YC7ELZS3.js';
|
|
@@ -15,10 +15,10 @@ import './chunk-LCDVPAMR.js';
|
|
|
15
15
|
import './chunk-IPQKQEWI.js';
|
|
16
16
|
import './chunk-GJWI74ZZ.js';
|
|
17
17
|
import './chunk-5TM3WPCI.js';
|
|
18
|
-
import { sonorFetch } from './chunk-
|
|
19
|
-
import './chunk-
|
|
18
|
+
import { sonorFetch } from './chunk-UYOE3HA4.js';
|
|
19
|
+
import './chunk-P5PRR2BB.js';
|
|
20
20
|
import { readPublishedApiConfig, readPublishedSite } from './chunk-W7OPEMGJ.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-MNORERMF.js';
|
|
22
22
|
import './chunk-PKBMQBKP.js';
|
|
23
23
|
import { useEffect } from 'react';
|
|
24
24
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { getSiteDesignTokens } from './chunk-
|
|
3
|
-
import { DEFAULT_POPUP_TOKENS, PopupBlocks } from './chunk-
|
|
4
|
-
import
|
|
2
|
+
import { getSiteDesignTokens } from './chunk-IXZBOOAD.js';
|
|
3
|
+
import { DEFAULT_POPUP_TOKENS, PopupBlocks } from './chunk-52KO4LKD.js';
|
|
4
|
+
import './chunk-XLAHRN4B.js';
|
|
5
|
+
import { normalizePopupBlocks, toHexColor, readableOn } from './chunk-XHYE24HU.js';
|
|
5
6
|
import './chunk-S22FSH7C.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
7
|
+
import './chunk-QTBAKOCZ.js';
|
|
8
|
+
import './chunk-VEJD5EJ2.js';
|
|
9
|
+
import './chunk-UYOE3HA4.js';
|
|
10
|
+
import './chunk-P5PRR2BB.js';
|
|
10
11
|
import './chunk-W7OPEMGJ.js';
|
|
11
|
-
import './chunk-
|
|
12
|
+
import './chunk-MNORERMF.js';
|
|
12
13
|
import './chunk-PKBMQBKP.js';
|
|
13
14
|
import { useState } from 'react';
|
|
14
15
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { ChatWidget, EchoChat, isChatEnabled } from './chunk-
|
|
1
|
+
export { ChatWidget, EchoChat, isChatEnabled } from './chunk-BJYX6SFI.js';
|
|
2
2
|
import './chunk-6T6CQVNL.js';
|
|
3
3
|
import './chunk-JE4A5S4F.js';
|
|
4
4
|
import './chunk-27FISYK4.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-LGWN6KCN.js';
|
|
6
6
|
import './chunk-Q6E4OPGG.js';
|
|
7
7
|
import './chunk-5ROTTMBL.js';
|
|
8
8
|
import './chunk-C2FZBUSS.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-TYSIAWC3.js';
|
|
10
10
|
import './chunk-HW7B43E5.js';
|
|
11
11
|
import './chunk-NJCTQH2P.js';
|
|
12
12
|
import './chunk-S22FSH7C.js';
|
|
13
13
|
import './chunk-L2V5PUFN.js';
|
|
14
14
|
import './chunk-GJWI74ZZ.js';
|
|
15
15
|
import './chunk-5TM3WPCI.js';
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-
|
|
16
|
+
import './chunk-UYOE3HA4.js';
|
|
17
|
+
import './chunk-P5PRR2BB.js';
|
|
18
18
|
import './chunk-W7OPEMGJ.js';
|
|
19
|
-
import './chunk-
|
|
19
|
+
import './chunk-MNORERMF.js';
|
|
20
20
|
import './chunk-PKBMQBKP.js';
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { sonorFetch } from './chunk-UYOE3HA4.js';
|
|
3
|
+
import './chunk-P5PRR2BB.js';
|
|
4
|
+
import { getClientApiConfig } from './chunk-W7OPEMGJ.js';
|
|
5
|
+
import './chunk-MNORERMF.js';
|
|
6
|
+
import './chunk-PKBMQBKP.js';
|
|
7
|
+
import React2, { useState, useRef } from 'react';
|
|
8
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
// src/forms/private-file-rules.ts
|
|
11
|
+
var PRIVATE_FILE_MAX_BYTES = 10 * 1024 * 1024;
|
|
12
|
+
var PRIVATE_FILE_TYPES = ["application/pdf", "image/jpeg", "image/png", "image/webp"];
|
|
13
|
+
var PRIVATE_FILE_ACCEPT = ".pdf,.jpg,.jpeg,.png,.webp";
|
|
14
|
+
function validatePrivateFileSelection(files, maxFiles = 4) {
|
|
15
|
+
if (!files.length) return null;
|
|
16
|
+
if (files.length > Math.max(1, Math.min(4, maxFiles))) return `Choose up to ${Math.max(1, Math.min(4, maxFiles))} files.`;
|
|
17
|
+
if (files.some((file) => !file.size || file.size > PRIVATE_FILE_MAX_BYTES)) return "Each file must be between 1 byte and 10 MB.";
|
|
18
|
+
if (files.some((file) => !PRIVATE_FILE_TYPES.includes(file.type))) return "Choose PDF, JPG, PNG or WebP files.";
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
function PrivateFileField({ field, inputId, onChange, ariaInvalid, describedBy }) {
|
|
22
|
+
const [entries, setEntries] = useState([]);
|
|
23
|
+
const [busy, setBusy] = useState(false);
|
|
24
|
+
const [dragging, setDragging] = useState(false);
|
|
25
|
+
const [error, setError] = useState(null);
|
|
26
|
+
const serial = useRef(0);
|
|
27
|
+
const dragDepth = useRef(0);
|
|
28
|
+
const busyRef = useRef(false);
|
|
29
|
+
const maxFiles = Math.max(1, Math.min(4, field.validation?.max_files || 4));
|
|
30
|
+
const report = (next) => onChange(next.every((item) => item.state === "ready" && item.token) ? next.map((item) => item.token) : []);
|
|
31
|
+
const upload = async (next) => {
|
|
32
|
+
if (busyRef.current) return;
|
|
33
|
+
busyRef.current = true;
|
|
34
|
+
setBusy(true);
|
|
35
|
+
setError(null);
|
|
36
|
+
onChange([]);
|
|
37
|
+
const current = next.map((item) => ({ ...item }));
|
|
38
|
+
for (const entry of current) {
|
|
39
|
+
if (entry.token) continue;
|
|
40
|
+
entry.state = "uploading";
|
|
41
|
+
setEntries(current.map((item) => ({ ...item })));
|
|
42
|
+
try {
|
|
43
|
+
const { apiUrl, apiKey } = getClientApiConfig();
|
|
44
|
+
if (!apiKey || !field.form_id) throw new Error("Unavailable");
|
|
45
|
+
const body = new FormData();
|
|
46
|
+
body.append("form_id", field.form_id);
|
|
47
|
+
body.append("field_slug", field.slug);
|
|
48
|
+
body.append("file", entry.file);
|
|
49
|
+
const response = await sonorFetch(`${apiUrl}/api/public/forms/attachments`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}` }, body }, { retries: 0, timeoutMs: 6e4 });
|
|
50
|
+
if (!response.ok) throw new Error("Upload failed");
|
|
51
|
+
const data = await response.json();
|
|
52
|
+
if (!data.token?.startsWith("sonor-private-upload:")) throw new Error("Invalid upload response");
|
|
53
|
+
entry.token = data.token;
|
|
54
|
+
entry.state = "ready";
|
|
55
|
+
} catch {
|
|
56
|
+
entry.state = "error";
|
|
57
|
+
setError("A document could not be uploaded. Try again or remove it before sending.");
|
|
58
|
+
}
|
|
59
|
+
setEntries(current.map((item) => ({ ...item })));
|
|
60
|
+
}
|
|
61
|
+
report(current);
|
|
62
|
+
busyRef.current = false;
|
|
63
|
+
setBusy(false);
|
|
64
|
+
};
|
|
65
|
+
const addFiles = (files) => {
|
|
66
|
+
if (busyRef.current) return;
|
|
67
|
+
const fresh = files.filter((file) => !entries.some((entry) => entry.file.name === file.name && entry.file.size === file.size && entry.file.lastModified === file.lastModified));
|
|
68
|
+
const next = [...entries, ...fresh.map((file) => ({ id: ++serial.current, file, state: "waiting" }))];
|
|
69
|
+
const problem = validatePrivateFileSelection(next.map((item) => item.file), maxFiles);
|
|
70
|
+
if (problem) {
|
|
71
|
+
setError(problem);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (fresh.length) void upload(next);
|
|
75
|
+
};
|
|
76
|
+
const remove = (id) => {
|
|
77
|
+
const next = entries.filter((item) => item.id !== id);
|
|
78
|
+
setEntries(next);
|
|
79
|
+
setError(next.some((item) => item.state === "error") ? "Try uploading the remaining document again." : null);
|
|
80
|
+
report(next);
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ jsxs("div", { className: "sk-private-files", "aria-busy": busy, children: [
|
|
83
|
+
/* @__PURE__ */ jsxs(
|
|
84
|
+
"label",
|
|
85
|
+
{
|
|
86
|
+
htmlFor: inputId,
|
|
87
|
+
className: `sk-file-dropzone${dragging ? " sk-file-dropzone--active" : ""}${busy ? " sk-file-dropzone--busy" : ""}`,
|
|
88
|
+
onDragEnter: (event) => {
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
dragDepth.current++;
|
|
91
|
+
setDragging(true);
|
|
92
|
+
},
|
|
93
|
+
onDragOver: (event) => {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
event.dataTransfer.dropEffect = busy ? "none" : "copy";
|
|
96
|
+
},
|
|
97
|
+
onDragLeave: (event) => {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
if (--dragDepth.current <= 0) {
|
|
100
|
+
dragDepth.current = 0;
|
|
101
|
+
setDragging(false);
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
onDrop: (event) => {
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
dragDepth.current = 0;
|
|
107
|
+
setDragging(false);
|
|
108
|
+
addFiles(Array.from(event.dataTransfer.files));
|
|
109
|
+
},
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "28", height: "28", fill: "none", stroke: "currentColor", strokeWidth: "1.4", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M12 16V3m-5 5 5-5 5 5M4 15v5h16v-5" }) }),
|
|
112
|
+
/* @__PURE__ */ jsx("span", { className: "sk-file-dropzone__title", children: busy ? "Uploading privately\u2026" : entries.length ? "Add another document" : "Drop your estimate here" }),
|
|
113
|
+
/* @__PURE__ */ jsxs("span", { className: "sk-file-dropzone__hint", children: [
|
|
114
|
+
"or ",
|
|
115
|
+
/* @__PURE__ */ jsx("span", { children: "choose files" })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ jsx("span", { className: "sk-file-dropzone__formats", children: "PDF, JPG, PNG or WebP \xB7 10 MB each" }),
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
"input",
|
|
120
|
+
{
|
|
121
|
+
id: inputId,
|
|
122
|
+
className: "sk-file-dropzone__input",
|
|
123
|
+
type: "file",
|
|
124
|
+
name: field.slug,
|
|
125
|
+
accept: PRIVATE_FILE_ACCEPT,
|
|
126
|
+
multiple: maxFiles > 1,
|
|
127
|
+
disabled: busy,
|
|
128
|
+
"aria-required": field.is_required,
|
|
129
|
+
"aria-invalid": ariaInvalid,
|
|
130
|
+
"aria-describedby": [describedBy, `${inputId}-upload-status`, error ? `${inputId}-upload-error` : null].filter(Boolean).join(" "),
|
|
131
|
+
onChange: (event) => {
|
|
132
|
+
addFiles(Array.from(event.target.files || []));
|
|
133
|
+
event.target.value = "";
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
!!entries.length && /* @__PURE__ */ jsx("ul", { className: "sk-private-files__list", children: entries.map((entry) => /* @__PURE__ */ jsxs("li", { children: [
|
|
141
|
+
/* @__PURE__ */ jsxs("span", { className: "sk-private-files__name", children: [
|
|
142
|
+
entry.file.name,
|
|
143
|
+
/* @__PURE__ */ jsxs("small", { children: [
|
|
144
|
+
(entry.file.size / 1024 / 1024).toFixed(1),
|
|
145
|
+
" MB \xB7 ",
|
|
146
|
+
entry.state === "ready" ? "Uploaded" : entry.state === "error" ? "Upload failed" : entry.state === "uploading" ? "Uploading\u2026" : "Waiting"
|
|
147
|
+
] })
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
150
|
+
entry.state === "error" && /* @__PURE__ */ jsx("button", { type: "button", disabled: busy, onClick: () => void upload(entries), children: "Try again" }),
|
|
151
|
+
/* @__PURE__ */ jsx("button", { type: "button", disabled: busy, "aria-label": `Remove ${entry.file.name}`, onClick: () => remove(entry.id), children: "Remove" })
|
|
152
|
+
] })
|
|
153
|
+
] }, entry.id)) }),
|
|
154
|
+
/* @__PURE__ */ jsx("p", { id: `${inputId}-upload-status`, className: "sk-private-files__status", role: "status", "aria-live": "polite", children: busy ? "Wait for your documents to finish uploading." : entries.length && entries.every((entry) => entry.state === "ready") ? `${entries.length} ${entries.length === 1 ? "document" : "documents"} ready to send.` : "Files upload privately when you add them." }),
|
|
155
|
+
error && /* @__PURE__ */ jsx("p", { id: `${inputId}-upload-error`, className: "sk-private-files__error", role: "alert", children: error })
|
|
156
|
+
] });
|
|
157
|
+
}
|
|
158
|
+
function FileField({
|
|
159
|
+
field,
|
|
160
|
+
inputId,
|
|
161
|
+
classPrefix,
|
|
162
|
+
baseInputStyle,
|
|
163
|
+
onChange,
|
|
164
|
+
ariaInvalid,
|
|
165
|
+
describedBy
|
|
166
|
+
}) {
|
|
167
|
+
if (field.validation?.private_attachments) return /* @__PURE__ */ jsx(PrivateFileField, { field, inputId, onChange, ariaInvalid, describedBy });
|
|
168
|
+
return /* @__PURE__ */ jsx(PublicFileField, { field, inputId, classPrefix, baseInputStyle, onChange });
|
|
169
|
+
}
|
|
170
|
+
function PublicFileField({ field, inputId, classPrefix, baseInputStyle, onChange }) {
|
|
171
|
+
const [status, setStatus] = React2.useState("idle");
|
|
172
|
+
const [fileName, setFileName] = React2.useState("");
|
|
173
|
+
const handleFile = async (e) => {
|
|
174
|
+
const file = e.target.files?.[0];
|
|
175
|
+
if (!file) return;
|
|
176
|
+
setFileName(file.name);
|
|
177
|
+
setStatus("uploading");
|
|
178
|
+
onChange("");
|
|
179
|
+
try {
|
|
180
|
+
const url = await uploadFormFile(file);
|
|
181
|
+
onChange(url);
|
|
182
|
+
setStatus("idle");
|
|
183
|
+
} catch (err) {
|
|
184
|
+
console.error("[Forms] File upload failed:", err);
|
|
185
|
+
onChange("");
|
|
186
|
+
setStatus("error");
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
190
|
+
/* @__PURE__ */ jsx(
|
|
191
|
+
"input",
|
|
192
|
+
{
|
|
193
|
+
id: inputId,
|
|
194
|
+
className: `${classPrefix}__input ${classPrefix}__input--file`,
|
|
195
|
+
type: "file",
|
|
196
|
+
name: field.slug,
|
|
197
|
+
required: field.is_required,
|
|
198
|
+
disabled: status === "uploading",
|
|
199
|
+
onChange: handleFile,
|
|
200
|
+
style: baseInputStyle
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
status === "uploading" && /* @__PURE__ */ jsxs("p", { style: { color: "var(--sk-text-tertiary, #6b7280)", fontSize: 14, marginTop: 4 }, children: [
|
|
204
|
+
"Uploading ",
|
|
205
|
+
fileName,
|
|
206
|
+
"\u2026"
|
|
207
|
+
] }),
|
|
208
|
+
status === "error" && /* @__PURE__ */ jsx("p", { role: "alert", style: { color: "var(--sk-error, #dc2626)", fontSize: 14, marginTop: 4 }, children: "Upload failed. Please choose the file again." })
|
|
209
|
+
] });
|
|
210
|
+
}
|
|
211
|
+
async function uploadFormFile(file) {
|
|
212
|
+
const { apiUrl, apiKey } = getClientApiConfig();
|
|
213
|
+
if (!apiKey) {
|
|
214
|
+
throw new Error("API key is required to upload files.");
|
|
215
|
+
}
|
|
216
|
+
const body = new FormData();
|
|
217
|
+
body.append("file", file);
|
|
218
|
+
const response = await sonorFetch(
|
|
219
|
+
`${apiUrl}/api/public/forms/upload`,
|
|
220
|
+
{
|
|
221
|
+
method: "POST",
|
|
222
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
223
|
+
body
|
|
224
|
+
},
|
|
225
|
+
{ retries: 1, timeoutMs: 6e4 }
|
|
226
|
+
);
|
|
227
|
+
if (!response.ok) {
|
|
228
|
+
throw new Error(`Upload failed (${response.status})`);
|
|
229
|
+
}
|
|
230
|
+
const data = await response.json().catch(() => null);
|
|
231
|
+
if (!data?.url) {
|
|
232
|
+
throw new Error("Upload did not return a URL.");
|
|
233
|
+
}
|
|
234
|
+
return data.url;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export { FileField };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { StageStyles, SummaryTick } from './chunk-3YKQLC7J.js';
|
|
3
|
-
import { stageFirstName, useFieldControls, stageViews, stageEstimate, AUTO_ADVANCE_TYPES } from './chunk-
|
|
3
|
+
import { stageFirstName, useFieldControls, stageViews, stageEstimate, AUTO_ADVANCE_TYPES } from './chunk-36ZMNBXZ.js';
|
|
4
4
|
import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
|
|
5
5
|
import { isEmptyValue, unseenControlValues, isDisplayOnly } from './chunk-C2FZBUSS.js';
|
|
6
|
-
import { FormField } from './chunk-
|
|
6
|
+
import { FormField } from './chunk-CVADNHJ4.js';
|
|
7
7
|
import './chunk-HW7B43E5.js';
|
|
8
8
|
import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
|
|
9
9
|
import './chunk-PKBMQBKP.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { StageStyles, SummaryTick } from './chunk-3YKQLC7J.js';
|
|
3
|
-
import { useFieldControls, stageViews, stageFirstName, stageEstimate, formatAnswer, AUTO_ADVANCE_TYPES } from './chunk-
|
|
3
|
+
import { useFieldControls, stageViews, stageFirstName, stageEstimate, formatAnswer, AUTO_ADVANCE_TYPES } from './chunk-36ZMNBXZ.js';
|
|
4
4
|
import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
|
|
5
5
|
import { isEmptyValue, unseenControlValues } from './chunk-C2FZBUSS.js';
|
|
6
|
-
import { FormField } from './chunk-
|
|
6
|
+
import { FormField } from './chunk-CVADNHJ4.js';
|
|
7
7
|
import './chunk-HW7B43E5.js';
|
|
8
8
|
import { DEFAULT_HONEYPOT_FIELD } from './chunk-NJCTQH2P.js';
|
|
9
9
|
import './chunk-PKBMQBKP.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { ManagedForm } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { ManagedForm } from './chunk-L2KSHJS2.js';
|
|
2
|
+
import './chunk-36ZMNBXZ.js';
|
|
3
|
+
import './chunk-LGWN6KCN.js';
|
|
4
4
|
import './chunk-Q6E4OPGG.js';
|
|
5
5
|
import './chunk-5ROTTMBL.js';
|
|
6
6
|
import './chunk-C2FZBUSS.js';
|
|
7
7
|
import './chunk-DXO6SBMD.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-CVADNHJ4.js';
|
|
9
|
+
import './chunk-TYSIAWC3.js';
|
|
10
10
|
import './chunk-HW7B43E5.js';
|
|
11
11
|
import './chunk-NJCTQH2P.js';
|
|
12
12
|
import './chunk-L2V5PUFN.js';
|
|
13
13
|
import './chunk-GJWI74ZZ.js';
|
|
14
14
|
import './chunk-5TM3WPCI.js';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
15
|
+
import './chunk-UYOE3HA4.js';
|
|
16
|
+
import './chunk-P5PRR2BB.js';
|
|
17
17
|
import './chunk-W7OPEMGJ.js';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-MNORERMF.js';
|
|
19
19
|
import './chunk-PKBMQBKP.js';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
import './chunk-3PT6SO65.js';
|
|
3
|
-
import './chunk-DLTLXYOV.js';
|
|
4
|
-
import './chunk-SOD2F6C2.js';
|
|
1
|
+
import './chunk-RHT7OZNF.js';
|
|
5
2
|
import './chunk-YGGDU6C3.js';
|
|
6
|
-
import
|
|
3
|
+
import './chunk-L2KSHJS2.js';
|
|
4
|
+
import './chunk-36ZMNBXZ.js';
|
|
5
|
+
import './chunk-SOD2F6C2.js';
|
|
6
|
+
import { useForm } from './chunk-LGWN6KCN.js';
|
|
7
7
|
import './chunk-Q6E4OPGG.js';
|
|
8
8
|
import './chunk-5ROTTMBL.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-G5FD7UXK.js';
|
|
10
10
|
import './chunk-C2FZBUSS.js';
|
|
11
11
|
import './chunk-YC7ELZS3.js';
|
|
12
12
|
import './chunk-DXO6SBMD.js';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
13
|
+
import './chunk-CVADNHJ4.js';
|
|
14
|
+
import './chunk-TYSIAWC3.js';
|
|
15
15
|
import './chunk-HW7B43E5.js';
|
|
16
16
|
import './chunk-NJCTQH2P.js';
|
|
17
17
|
import { NewsletterShell } from './chunk-JHTPHA2D.js';
|
|
@@ -19,10 +19,10 @@ import './chunk-DJAYFHVF.js';
|
|
|
19
19
|
import './chunk-L2V5PUFN.js';
|
|
20
20
|
import './chunk-GJWI74ZZ.js';
|
|
21
21
|
import './chunk-5TM3WPCI.js';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
22
|
+
import './chunk-UYOE3HA4.js';
|
|
23
|
+
import './chunk-P5PRR2BB.js';
|
|
24
24
|
import './chunk-W7OPEMGJ.js';
|
|
25
|
-
import './chunk-
|
|
25
|
+
import './chunk-MNORERMF.js';
|
|
26
26
|
import './chunk-PKBMQBKP.js';
|
|
27
27
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
28
28
|
|
|
@@ -3,12 +3,12 @@ import { getOrCreateVisitorId, getOrCreateSessionId } from './chunk-IPQKQEWI.js'
|
|
|
3
3
|
import { onPageLeave } from './chunk-L2V5PUFN.js';
|
|
4
4
|
import './chunk-GJWI74ZZ.js';
|
|
5
5
|
import './chunk-5TM3WPCI.js';
|
|
6
|
-
import { isPrivatePreview } from './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import { sonorFetch } from './chunk-
|
|
9
|
-
import { getFreshCredential, isSiteToken } from './chunk-
|
|
6
|
+
import { isPrivatePreview } from './chunk-QTBAKOCZ.js';
|
|
7
|
+
import './chunk-VEJD5EJ2.js';
|
|
8
|
+
import { sonorFetch } from './chunk-UYOE3HA4.js';
|
|
9
|
+
import { getFreshCredential, isSiteToken } from './chunk-P5PRR2BB.js';
|
|
10
10
|
import { getClientApiConfig } from './chunk-W7OPEMGJ.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-MNORERMF.js';
|
|
12
12
|
import './chunk-PKBMQBKP.js';
|
|
13
13
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
14
14
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { SiteDesignReporter } from './chunk-XC2TWYDV.js';
|
|
2
|
+
import './chunk-IXZBOOAD.js';
|
|
3
|
+
import './chunk-XLAHRN4B.js';
|
|
4
|
+
import './chunk-XHYE24HU.js';
|
|
5
|
+
import './chunk-YC7ELZS3.js';
|
|
6
|
+
import './chunk-S22FSH7C.js';
|
|
7
|
+
import './chunk-QTBAKOCZ.js';
|
|
8
|
+
import './chunk-VEJD5EJ2.js';
|
|
9
|
+
import './chunk-UYOE3HA4.js';
|
|
10
|
+
import './chunk-P5PRR2BB.js';
|
|
11
|
+
import './chunk-W7OPEMGJ.js';
|
|
12
|
+
import './chunk-MNORERMF.js';
|
|
13
|
+
import './chunk-PKBMQBKP.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { SitePopups } from './chunk-
|
|
1
|
+
export { SitePopups } from './chunk-U4OQJQK6.js';
|
|
2
2
|
import './chunk-27FISYK4.js';
|
|
3
3
|
import './chunk-5ROTTMBL.js';
|
|
4
4
|
import './chunk-IPQKQEWI.js';
|
|
5
5
|
import './chunk-GJWI74ZZ.js';
|
|
6
6
|
import './chunk-5TM3WPCI.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
7
|
+
import './chunk-QTBAKOCZ.js';
|
|
8
|
+
import './chunk-VEJD5EJ2.js';
|
|
9
|
+
import './chunk-UYOE3HA4.js';
|
|
10
|
+
import './chunk-P5PRR2BB.js';
|
|
11
11
|
import './chunk-W7OPEMGJ.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-MNORERMF.js';
|
|
13
13
|
import './chunk-PKBMQBKP.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { SitemapSync } from './chunk-OHLCE4GC.js';
|
|
2
|
+
import './chunk-YVKRYQRG.js';
|
|
3
|
+
import './chunk-QTBAKOCZ.js';
|
|
4
|
+
import './chunk-VEJD5EJ2.js';
|
|
5
|
+
import './chunk-UYOE3HA4.js';
|
|
6
|
+
import './chunk-P5PRR2BB.js';
|
|
7
|
+
import './chunk-W7OPEMGJ.js';
|
|
8
|
+
import './chunk-MNORERMF.js';
|
|
9
|
+
import './chunk-PKBMQBKP.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { BookingWidget, BookingWidget_default as default } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { BookingWidget, BookingWidget_default as default } from '../chunk-YYPYLYZM.js';
|
|
3
|
+
import '../chunk-DJIGFX33.js';
|
|
4
4
|
import '../chunk-5ROTTMBL.js';
|
|
5
5
|
import '../chunk-5TM3WPCI.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-UYOE3HA4.js';
|
|
7
|
+
import '../chunk-P5PRR2BB.js';
|
|
8
8
|
import '../chunk-W7OPEMGJ.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-MNORERMF.js';
|
|
10
10
|
import '../chunk-PKBMQBKP.js';
|
package/dist/affiliates/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { sonorFetch } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { sonorFetch } from '../chunk-UYOE3HA4.js';
|
|
3
|
+
import '../chunk-P5PRR2BB.js';
|
|
4
4
|
import { getClientApiConfig } from '../chunk-W7OPEMGJ.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-MNORERMF.js';
|
|
6
6
|
import '../chunk-PKBMQBKP.js';
|
|
7
7
|
import { useState, useEffect } from 'react';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The readable text of a page's main content, for `seo_pages.content_text`.
|
|
3
|
+
*
|
|
4
|
+
* `textContent` joins elements with nothing between them, so a heading, its
|
|
5
|
+
* tagline and the first paragraph came out as "Getting paid for the
|
|
6
|
+
* workIncome, spending, budgets.Track expenses", and a contact page as
|
|
7
|
+
* "First Name*Last Name*Email*PhoneMessage*Send Message". That text is stored,
|
|
8
|
+
* read by the metadata generators, and was the last-resort description in
|
|
9
|
+
* llms.txt. A space goes after every block element and in place of every line
|
|
10
|
+
* break, and a form's field names, buttons and dialogs are left out, so the
|
|
11
|
+
* text reads the way the page does. Sonor still cleans what older pages
|
|
12
|
+
* stored (`cleanScrapedPageText` in @sonordev/contracts/llms).
|
|
13
|
+
*/
|
|
14
|
+
/** The longest text stored, in characters. */
|
|
15
|
+
export declare const CONTENT_TEXT_MAX_LENGTH = 10000;
|
|
16
|
+
/** The text of `root`'s content with its elements apart, whitespace collapsed, at most `CONTENT_TEXT_MAX_LENGTH` characters. Leaves `root` as it was. */
|
|
17
|
+
export declare function extractContentText(root: Element): string;
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { AnalyticsProvider, WebVitals, useAnalytics, useAnalyticsOptional, useTrackEvent } from '../chunk-
|
|
2
|
+
export { AnalyticsProvider, WebVitals, useAnalytics, useAnalyticsOptional, useTrackEvent } from '../chunk-7YB3QA4P.js';
|
|
3
3
|
import { trackConversion } from '../chunk-LCDVPAMR.js';
|
|
4
4
|
export { trackConversion, trackEvent } from '../chunk-LCDVPAMR.js';
|
|
5
5
|
import '../chunk-IPQKQEWI.js';
|
|
6
6
|
import '../chunk-L2V5PUFN.js';
|
|
7
7
|
import '../chunk-GJWI74ZZ.js';
|
|
8
8
|
import '../chunk-5TM3WPCI.js';
|
|
9
|
-
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
9
|
+
export { isCrossOriginFrame, isFramed, isTopFrameSameOrigin } from '../chunk-QTBAKOCZ.js';
|
|
10
|
+
import '../chunk-VEJD5EJ2.js';
|
|
11
|
+
import '../chunk-UYOE3HA4.js';
|
|
12
|
+
import '../chunk-P5PRR2BB.js';
|
|
13
13
|
import '../chunk-W7OPEMGJ.js';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-MNORERMF.js';
|
|
15
15
|
import '../chunk-PKBMQBKP.js';
|
|
16
16
|
import { useCallback, useEffect } from 'react';
|
|
17
17
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { articlePhotoCss } from './chunk-WHPCGQHC.js';
|
|
2
|
-
import { articleTableCss } from './chunk-
|
|
2
|
+
import { articleTableCss } from './chunk-AL5UCWLI.js';
|
|
3
|
+
import './chunk-IBHBEUZV.js';
|
|
3
4
|
import './chunk-PKBMQBKP.js';
|
|
4
5
|
|
|
5
6
|
// packages/press-kit/src/articles/article-styles.ts
|