@sonordev/site-kit 6.0.0 → 6.1.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/README.md +11 -0
- package/agent-manifest.json +8 -1
- package/dist/{AnalyticsProvider-6QVM2B6O.mjs → AnalyticsProvider-PO6SSJG2.mjs} +6 -6
- package/dist/{AnalyticsProvider-6QVM2B6O.mjs.map → AnalyticsProvider-PO6SSJG2.mjs.map} +1 -1
- package/dist/{AnalyticsProvider-AZQXLRWN.js → AnalyticsProvider-V6G45QG7.js} +10 -10
- package/dist/{AnalyticsProvider-AZQXLRWN.js.map → AnalyticsProvider-V6G45QG7.js.map} +1 -1
- package/dist/{ArticleViewTracker-AEWJMXQQ.mjs → ArticleViewTracker-CML36HJZ.mjs} +5 -5
- package/dist/{ArticleViewTracker-AEWJMXQQ.mjs.map → ArticleViewTracker-CML36HJZ.mjs.map} +1 -1
- package/dist/{ArticleViewTracker-CFBTQ46B.js → ArticleViewTracker-FE2YWHX4.js} +6 -6
- package/dist/{ArticleViewTracker-CFBTQ46B.js.map → ArticleViewTracker-FE2YWHX4.js.map} +1 -1
- package/dist/ChatWidget-GVNDKGUU.mjs +16 -0
- package/dist/{ChatWidget-6626OPXO.mjs.map → ChatWidget-GVNDKGUU.mjs.map} +1 -1
- package/dist/ChatWidget-YL34KOZM.js +25 -0
- package/dist/{ChatWidget-U24AYLXF.js.map → ChatWidget-YL34KOZM.js.map} +1 -1
- package/dist/EngageWidget-465O5XUV.mjs +12 -0
- package/dist/{EngageWidget-TR47W2ZI.mjs.map → EngageWidget-465O5XUV.mjs.map} +1 -1
- package/dist/EngageWidget-IQRKRYPG.js +21 -0
- package/dist/{EngageWidget-XUTDFRF3.js.map → EngageWidget-IQRKRYPG.js.map} +1 -1
- package/dist/{FileField-R4RQG77G.js → FileField-F3PFKMIF.js} +6 -6
- package/dist/{FileField-R4RQG77G.js.map → FileField-F3PFKMIF.js.map} +1 -1
- package/dist/{FileField-DNNC5IPS.mjs → FileField-FWKSBFRX.mjs} +5 -5
- package/dist/{FileField-DNNC5IPS.mjs.map → FileField-FWKSBFRX.mjs.map} +1 -1
- package/dist/{FormSpotlight-7ILRAD3W.js → FormSpotlight-DJQ3P3EX.js} +9 -9
- package/dist/{FormSpotlight-7ILRAD3W.js.map → FormSpotlight-DJQ3P3EX.js.map} +1 -1
- package/dist/{FormSpotlight-MXY4I46H.mjs → FormSpotlight-K4LP2DMP.mjs} +3 -3
- package/dist/{FormSpotlight-MXY4I46H.mjs.map → FormSpotlight-K4LP2DMP.mjs.map} +1 -1
- package/dist/{FormStage-CVD3I3SE.js → FormStage-QMGZ3MOT.js} +9 -9
- package/dist/{FormStage-CVD3I3SE.js.map → FormStage-QMGZ3MOT.js.map} +1 -1
- package/dist/{FormStage-FDJGRGEU.mjs → FormStage-YKVTHPKV.mjs} +3 -3
- package/dist/{FormStage-FDJGRGEU.mjs.map → FormStage-YKVTHPKV.mjs.map} +1 -1
- package/dist/ManagedForm-MLPETHSQ.js +25 -0
- package/dist/{ManagedForm-KYIK54SL.js.map → ManagedForm-MLPETHSQ.js.map} +1 -1
- package/dist/ManagedForm-P3L34ALG.mjs +16 -0
- package/dist/{ManagedForm-5675CLWS.mjs.map → ManagedForm-P3L34ALG.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-DFLDGNQU.mjs → ManagedNewsletterForm-C5YQH7MP.mjs} +7 -7
- package/dist/{ManagedNewsletterForm-DFLDGNQU.mjs.map → ManagedNewsletterForm-C5YQH7MP.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-IH3MRJOD.js → ManagedNewsletterForm-R4LLZBRQ.js} +8 -8
- package/dist/{ManagedNewsletterForm-IH3MRJOD.js.map → ManagedNewsletterForm-R4LLZBRQ.js.map} +1 -1
- package/dist/{SignalCore-ZH3R6XD3.mjs → SignalCore-BNYNS6P7.mjs} +5 -5
- package/dist/{SignalCore-ZH3R6XD3.mjs.map → SignalCore-BNYNS6P7.mjs.map} +1 -1
- package/dist/{SignalCore-6LYIZFXK.js → SignalCore-CLELIKFI.js} +11 -11
- package/dist/{SignalCore-6LYIZFXK.js.map → SignalCore-CLELIKFI.js.map} +1 -1
- package/dist/SitemapSync-P7XWL6VV.js +18 -0
- package/dist/{SitemapSync-PZ76V5MX.js.map → SitemapSync-P7XWL6VV.js.map} +1 -1
- package/dist/SitemapSync-SIKJCK7N.mjs +9 -0
- package/dist/{SitemapSync-PKBXWVI6.mjs.map → SitemapSync-SIKJCK7N.mjs.map} +1 -1
- package/dist/analytics/index.js +9 -9
- package/dist/analytics/index.mjs +4 -4
- package/dist/articles/index.js +2 -2
- package/dist/articles/index.mjs +2 -2
- package/dist/articles/server-ui.js +1 -1
- package/dist/articles/server-ui.mjs +1 -1
- package/dist/{chunk-QOCLSJIU.js → chunk-36NE4PSS.js} +3 -3
- package/dist/{chunk-QOCLSJIU.js.map → chunk-36NE4PSS.js.map} +1 -1
- package/dist/{chunk-NR52QHOD.mjs → chunk-3DXJHMQM.mjs} +3 -3
- package/dist/{chunk-NR52QHOD.mjs.map → chunk-3DXJHMQM.mjs.map} +1 -1
- package/dist/{chunk-XKXZ4OW4.mjs → chunk-4EJI4IOX.mjs} +63 -50
- package/dist/chunk-4EJI4IOX.mjs.map +1 -0
- package/dist/{chunk-RZGVNDO6.mjs → chunk-6OSHL7H5.mjs} +4 -4
- package/dist/{chunk-RZGVNDO6.mjs.map → chunk-6OSHL7H5.mjs.map} +1 -1
- package/dist/chunk-ACKFL6WA.mjs +6 -0
- package/dist/{chunk-2KRAY5NC.mjs.map → chunk-ACKFL6WA.mjs.map} +1 -1
- package/dist/{chunk-YYEBFQGS.js → chunk-AQUWWATH.js} +4 -4
- package/dist/{chunk-YYEBFQGS.js.map → chunk-AQUWWATH.js.map} +1 -1
- package/dist/{chunk-2WEBUZNP.mjs → chunk-BDSNEB3O.mjs} +3 -3
- package/dist/{chunk-2WEBUZNP.mjs.map → chunk-BDSNEB3O.mjs.map} +1 -1
- package/dist/{chunk-VINLIMAX.js → chunk-BGOPF6J2.js} +3 -3
- package/dist/{chunk-VINLIMAX.js.map → chunk-BGOPF6J2.js.map} +1 -1
- package/dist/{chunk-RDPI27TS.mjs → chunk-BJ4T65OK.mjs} +4 -2
- package/dist/chunk-BJ4T65OK.mjs.map +1 -0
- package/dist/chunk-BZR6RUIN.mjs +128 -0
- package/dist/chunk-BZR6RUIN.mjs.map +1 -0
- package/dist/{chunk-WV5YQL3W.mjs → chunk-CJX2MC62.mjs} +3 -3
- package/dist/{chunk-WV5YQL3W.mjs.map → chunk-CJX2MC62.mjs.map} +1 -1
- package/dist/{chunk-3LCJJ6Y6.js → chunk-DQXEYUTD.js} +3 -3
- package/dist/{chunk-3LCJJ6Y6.js.map → chunk-DQXEYUTD.js.map} +1 -1
- package/dist/{chunk-MCG4BSRW.js → chunk-DXBSBWSS.js} +5 -5
- package/dist/{chunk-MCG4BSRW.js.map → chunk-DXBSBWSS.js.map} +1 -1
- package/dist/{chunk-JXCMCASE.mjs → chunk-ESAPT5JT.mjs} +3 -3
- package/dist/{chunk-JXCMCASE.mjs.map → chunk-ESAPT5JT.mjs.map} +1 -1
- package/dist/{chunk-3OCXVTN5.mjs → chunk-F6BYWNHU.mjs} +3 -3
- package/dist/{chunk-3OCXVTN5.mjs.map → chunk-F6BYWNHU.mjs.map} +1 -1
- package/dist/{chunk-PJYTYM5G.mjs → chunk-FQAZBJJO.mjs} +3 -3
- package/dist/{chunk-PJYTYM5G.mjs.map → chunk-FQAZBJJO.mjs.map} +1 -1
- package/dist/{chunk-G6KQ3C3W.js → chunk-G3L26XQ7.js} +4 -2
- package/dist/chunk-G3L26XQ7.js.map +1 -0
- package/dist/{chunk-CSSNZGTU.mjs → chunk-H5FCJBAN.mjs} +3 -3
- package/dist/{chunk-CSSNZGTU.mjs.map → chunk-H5FCJBAN.mjs.map} +1 -1
- package/dist/{chunk-HX5JPNMN.js → chunk-I4RU3RCS.js} +8 -8
- package/dist/{chunk-HX5JPNMN.js.map → chunk-I4RU3RCS.js.map} +1 -1
- package/dist/{chunk-YGDQVZEL.js → chunk-IDJY2JWU.js} +5 -5
- package/dist/{chunk-YGDQVZEL.js.map → chunk-IDJY2JWU.js.map} +1 -1
- package/dist/{chunk-MS2EE6LT.js → chunk-ITVQV7DK.js} +10 -10
- package/dist/{chunk-MS2EE6LT.js.map → chunk-ITVQV7DK.js.map} +1 -1
- package/dist/chunk-IWSN4DGG.js +132 -0
- package/dist/chunk-IWSN4DGG.js.map +1 -0
- package/dist/{chunk-BZG34WHF.js → chunk-K4LLYQFZ.js} +14 -14
- package/dist/{chunk-BZG34WHF.js.map → chunk-K4LLYQFZ.js.map} +1 -1
- package/dist/{chunk-5DSUPTBU.js → chunk-KDNB6BYH.js} +11 -11
- package/dist/{chunk-5DSUPTBU.js.map → chunk-KDNB6BYH.js.map} +1 -1
- package/dist/{chunk-RC4L4DV2.mjs → chunk-KKTSAT7I.mjs} +4 -4
- package/dist/{chunk-RC4L4DV2.mjs.map → chunk-KKTSAT7I.mjs.map} +1 -1
- package/dist/{chunk-RPCODOWG.mjs → chunk-L3GAEBJU.mjs} +3 -3
- package/dist/{chunk-RPCODOWG.mjs.map → chunk-L3GAEBJU.mjs.map} +1 -1
- package/dist/{chunk-TCZHRSWY.js → chunk-LF44SJPP.js} +4 -4
- package/dist/{chunk-TCZHRSWY.js.map → chunk-LF44SJPP.js.map} +1 -1
- package/dist/{chunk-HFCQGSD2.js → chunk-MZK5APTV.js} +18 -18
- package/dist/{chunk-HFCQGSD2.js.map → chunk-MZK5APTV.js.map} +1 -1
- package/dist/chunk-NBOBOYMT.js +52 -0
- package/dist/chunk-NBOBOYMT.js.map +1 -0
- package/dist/{chunk-3U5SVB4W.js → chunk-NDVKIDMN.js} +4 -4
- package/dist/{chunk-3U5SVB4W.js.map → chunk-NDVKIDMN.js.map} +1 -1
- package/dist/{chunk-YWLBQ3L5.mjs → chunk-NMKUYGKK.mjs} +4 -4
- package/dist/{chunk-YWLBQ3L5.mjs.map → chunk-NMKUYGKK.mjs.map} +1 -1
- package/dist/chunk-OBKS3CPP.mjs +50 -0
- package/dist/chunk-OBKS3CPP.mjs.map +1 -0
- package/dist/{chunk-TCCGP3FT.mjs → chunk-OF4V7CSP.mjs} +3 -3
- package/dist/{chunk-TCCGP3FT.mjs.map → chunk-OF4V7CSP.mjs.map} +1 -1
- package/dist/{chunk-ZR4TYCQW.mjs → chunk-OQWAJBYA.mjs} +3 -3
- package/dist/{chunk-ZR4TYCQW.mjs.map → chunk-OQWAJBYA.mjs.map} +1 -1
- package/dist/chunk-OXA4ZSX2.js +8 -0
- package/dist/{chunk-EL74YDNX.js.map → chunk-OXA4ZSX2.js.map} +1 -1
- package/dist/{chunk-GQ3SDRL6.mjs → chunk-QC6VQ2IW.mjs} +3 -3
- package/dist/{chunk-GQ3SDRL6.mjs.map → chunk-QC6VQ2IW.mjs.map} +1 -1
- package/dist/{chunk-D47W5DE4.js → chunk-QF3XTEXV.js} +4 -4
- package/dist/{chunk-D47W5DE4.js.map → chunk-QF3XTEXV.js.map} +1 -1
- package/dist/{chunk-2YSB4FIC.mjs → chunk-RGCUND5Q.mjs} +4 -4
- package/dist/{chunk-2YSB4FIC.mjs.map → chunk-RGCUND5Q.mjs.map} +1 -1
- package/dist/{chunk-N6CB7MK7.js → chunk-RVFOUPK4.js} +6 -6
- package/dist/{chunk-N6CB7MK7.js.map → chunk-RVFOUPK4.js.map} +1 -1
- package/dist/{chunk-WDEGGHTB.js → chunk-SDGS2R5O.js} +12 -12
- package/dist/{chunk-WDEGGHTB.js.map → chunk-SDGS2R5O.js.map} +1 -1
- package/dist/{chunk-JMNBU2RG.mjs → chunk-TA3TQTDA.mjs} +8 -8
- package/dist/{chunk-JMNBU2RG.mjs.map → chunk-TA3TQTDA.mjs.map} +1 -1
- package/dist/{chunk-KA4NNWOK.js → chunk-TMNFPVK5.js} +7 -7
- package/dist/{chunk-KA4NNWOK.js.map → chunk-TMNFPVK5.js.map} +1 -1
- package/dist/{chunk-254IW4FC.js → chunk-VK74LC4H.js} +5 -5
- package/dist/{chunk-254IW4FC.js.map → chunk-VK74LC4H.js.map} +1 -1
- package/dist/{chunk-7TKSRUQU.mjs → chunk-XGELGOF6.mjs} +7 -7
- package/dist/{chunk-7TKSRUQU.mjs.map → chunk-XGELGOF6.mjs.map} +1 -1
- package/dist/{chunk-CZGGUPPQ.js → chunk-XKJLJLQ4.js} +74 -61
- package/dist/chunk-XKJLJLQ4.js.map +1 -0
- package/dist/{chunk-XSBKR3VF.mjs → chunk-XOYQKFKI.mjs} +4 -4
- package/dist/{chunk-XSBKR3VF.mjs.map → chunk-XOYQKFKI.mjs.map} +1 -1
- package/dist/{chunk-MIYGP34I.js → chunk-Y53BIB7A.js} +14 -14
- package/dist/{chunk-MIYGP34I.js.map → chunk-Y53BIB7A.js.map} +1 -1
- package/dist/{chunk-QVBAAPNT.mjs → chunk-YKNXBWPZ.mjs} +3 -3
- package/dist/{chunk-QVBAAPNT.mjs.map → chunk-YKNXBWPZ.mjs.map} +1 -1
- package/dist/{chunk-HOOVYWTO.mjs → chunk-YP5WAFTI.mjs} +4 -4
- package/dist/{chunk-HOOVYWTO.mjs.map → chunk-YP5WAFTI.mjs.map} +1 -1
- package/dist/{chunk-SCRB5DZM.js → chunk-YS7Y2PQG.js} +8 -8
- package/dist/{chunk-SCRB5DZM.js.map → chunk-YS7Y2PQG.js.map} +1 -1
- package/dist/{chunk-3GHPFLEH.js → chunk-ZQJGCQHC.js} +15 -15
- package/dist/{chunk-3GHPFLEH.js.map → chunk-ZQJGCQHC.js.map} +1 -1
- package/dist/{chunk-QEM2F2DC.mjs → chunk-ZQSJK65K.mjs} +3 -3
- package/dist/{chunk-QEM2F2DC.mjs.map → chunk-ZQSJK65K.mjs.map} +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.mjs +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/commerce/index.js +57 -57
- package/dist/commerce/index.mjs +5 -5
- package/dist/cta-bar/CtaBar.d.ts +71 -0
- package/dist/cta-bar/CtaBar.d.ts.map +1 -0
- package/dist/cta-bar/CtaBarBehavior.d.ts +46 -0
- package/dist/cta-bar/CtaBarBehavior.d.ts.map +1 -0
- package/dist/cta-bar/client.d.ts +46 -0
- package/dist/cta-bar/client.d.ts.map +1 -0
- package/dist/cta-bar/client.js +23 -0
- package/dist/cta-bar/client.js.map +1 -0
- package/dist/cta-bar/client.mjs +6 -0
- package/dist/cta-bar/client.mjs.map +1 -0
- package/dist/cta-bar/index.d.ts +12 -0
- package/dist/cta-bar/index.d.ts.map +1 -0
- package/dist/cta-bar/index.js +230 -0
- package/dist/cta-bar/index.js.map +1 -0
- package/dist/cta-bar/index.mjs +224 -0
- package/dist/cta-bar/index.mjs.map +1 -0
- package/dist/cta-bar/styles.d.ts +46 -0
- package/dist/cta-bar/styles.d.ts.map +1 -0
- package/dist/engage/ChatWidget.d.ts.map +1 -1
- package/dist/engage/EchoUiActions.d.ts.map +1 -1
- package/dist/engage/index.js +14 -13
- package/dist/engage/index.js.map +1 -1
- package/dist/engage/index.mjs +8 -7
- package/dist/engage/index.mjs.map +1 -1
- package/dist/fleet/index.js +8 -8
- package/dist/fleet/index.mjs +4 -4
- package/dist/forms/index.js +22 -22
- package/dist/forms/index.mjs +9 -9
- package/dist/forms/server.js +10 -10
- package/dist/forms/server.mjs +8 -8
- package/dist/forms/static.js +7 -7
- package/dist/forms/static.mjs +6 -6
- package/dist/images/index.js +11 -11
- package/dist/images/index.mjs +4 -4
- package/dist/index.js +63 -63
- package/dist/index.mjs +9 -9
- package/dist/layout/client.js +8 -8
- package/dist/layout/client.mjs +7 -7
- package/dist/layout/index.js +10 -10
- package/dist/layout/index.mjs +8 -8
- package/dist/llms/index.js +12 -12
- package/dist/llms/index.mjs +2 -2
- package/dist/llms/writeLLMsTxt.d.ts +6 -0
- package/dist/llms/writeLLMsTxt.d.ts.map +1 -1
- package/dist/maps/index.js +5 -5
- package/dist/maps/index.mjs +3 -3
- package/dist/search/index.js +4 -4
- package/dist/search/index.mjs +3 -3
- package/dist/seo/client.js +5 -5
- package/dist/seo/client.mjs +4 -4
- package/dist/seo/index.js +5 -5
- package/dist/seo/index.mjs +4 -4
- package/dist/seo/register-sitemap-cli-impl.d.ts +2 -0
- package/dist/seo/register-sitemap-cli-impl.d.ts.map +1 -1
- package/dist/seo/register-sitemap-cli.d.ts +1 -0
- package/dist/seo/register-sitemap-cli.d.ts.map +1 -1
- package/dist/seo/register-sitemap-cli.js +7 -3
- package/dist/seo/register-sitemap-cli.mjs +7 -3
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/shared/build-entries.d.ts +4 -1
- package/dist/shared/build-entries.d.ts.map +1 -1
- package/dist/shared/glass.d.ts +51 -0
- package/dist/shared/glass.d.ts.map +1 -0
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +11 -11
- package/dist/signal/index.mjs +2 -2
- package/dist/sitemap/index.d.ts +6 -0
- package/dist/sitemap/index.d.ts.map +1 -1
- package/dist/sitemap/index.js +3 -2
- package/dist/sitemap/index.js.map +1 -1
- package/dist/sitemap/index.mjs +2 -1
- package/dist/sitemap/index.mjs.map +1 -1
- package/dist/sync/index.js +17 -17
- package/dist/sync/index.mjs +4 -4
- package/dist/{writeLLMsTxt-QJFXBHZF.mjs → writeLLMsTxt-LYYC3ZSN.mjs} +2 -2
- package/dist/{writeLLMsTxt-ATADOUVZ.js → writeLLMsTxt-XHLHJ5XY.js} +3 -3
- package/package.json +6 -1
- package/skills/site-kit/SKILL.md +6 -0
- package/dist/ChatWidget-6626OPXO.mjs +0 -15
- package/dist/ChatWidget-U24AYLXF.js +0 -24
- package/dist/EngageWidget-TR47W2ZI.mjs +0 -12
- package/dist/EngageWidget-XUTDFRF3.js +0 -21
- package/dist/ManagedForm-5675CLWS.mjs +0 -16
- package/dist/ManagedForm-KYIK54SL.js +0 -25
- package/dist/SitemapSync-PKBXWVI6.mjs +0 -9
- package/dist/SitemapSync-PZ76V5MX.js +0 -18
- package/dist/chunk-2KRAY5NC.mjs +0 -6
- package/dist/chunk-CZGGUPPQ.js.map +0 -1
- package/dist/chunk-EL74YDNX.js +0 -8
- package/dist/chunk-G6KQ3C3W.js.map +0 -1
- package/dist/chunk-RDPI27TS.mjs.map +0 -1
- package/dist/chunk-XKXZ4OW4.mjs.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { chatLauncherStyles } from './chunk-4U5NCKQY.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { GlassStyles } from './chunk-OBKS3CPP.mjs';
|
|
4
|
+
import { useForm } from './chunk-YP5WAFTI.mjs';
|
|
5
|
+
import { sonorFetch } from './chunk-RGCUND5Q.mjs';
|
|
5
6
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
6
7
|
import ReactMarkdown from 'react-markdown';
|
|
7
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -60,7 +61,9 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
|
|
|
60
61
|
borderColor: "var(--sk-border, #e5e7eb)",
|
|
61
62
|
backgroundColor: "var(--sk-bg, #ffffff)",
|
|
62
63
|
color: "var(--sk-text-primary, #111827)",
|
|
63
|
-
|
|
64
|
+
// 16px, not smaller: iOS Safari zooms the whole page into any focused
|
|
65
|
+
// field under 16px, which throws the visitor out of the chat window.
|
|
66
|
+
fontSize: 16,
|
|
64
67
|
boxSizing: "border-box",
|
|
65
68
|
outline: "none"
|
|
66
69
|
};
|
|
@@ -295,13 +298,8 @@ function userRequestedHandoff(text) {
|
|
|
295
298
|
];
|
|
296
299
|
return patterns.some((p) => p.test(lower));
|
|
297
300
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
const r = Math.min(255, Math.max(0, (num >> 16) + amount));
|
|
301
|
-
const g = Math.min(255, Math.max(0, (num >> 8 & 255) + amount));
|
|
302
|
-
const b = Math.min(255, Math.max(0, (num & 255) + amount));
|
|
303
|
-
return `#${(1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1)}`;
|
|
304
|
-
}
|
|
301
|
+
var BUBBLE_BG = "color-mix(in srgb, var(--sk-bg, #ffffff) 94%, transparent)";
|
|
302
|
+
var HAIRLINE = "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 9%, transparent)";
|
|
305
303
|
function isLightColor(hex) {
|
|
306
304
|
const num = parseInt(hex.replace("#", ""), 16);
|
|
307
305
|
const r = num >> 16;
|
|
@@ -1059,11 +1057,13 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1059
1057
|
if (availability && availability.agentsOnline > 0) return { dot: "#22c55e", text: "Online" };
|
|
1060
1058
|
return { dot: "var(--sk-text-tertiary, #9ca3af)", text: "We'll respond soon" };
|
|
1061
1059
|
})();
|
|
1060
|
+
const launcherIcon = isLightColor(primaryColor) ? "#1a1a1a" : "white";
|
|
1062
1061
|
const ChatButton = /* @__PURE__ */ jsx(
|
|
1063
1062
|
"button",
|
|
1064
1063
|
{
|
|
1065
1064
|
type: "button",
|
|
1066
1065
|
"data-sk-echo-launcher": true,
|
|
1066
|
+
className: "sk-glass sk-glass--brand",
|
|
1067
1067
|
onClick: handleToggle,
|
|
1068
1068
|
"aria-label": isOpen ? "Close chat" : "Open chat",
|
|
1069
1069
|
style: {
|
|
@@ -1072,37 +1072,34 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1072
1072
|
width: "60px",
|
|
1073
1073
|
height: "60px",
|
|
1074
1074
|
borderRadius: "50%",
|
|
1075
|
-
|
|
1076
|
-
border: "none",
|
|
1075
|
+
["--sk-glass-brand"]: primaryColor,
|
|
1077
1076
|
display: "flex",
|
|
1078
1077
|
alignItems: "center",
|
|
1079
1078
|
justifyContent: "center",
|
|
1080
1079
|
cursor: "pointer",
|
|
1081
|
-
|
|
1082
|
-
transition: "transform 0.2s, box-shadow 0.2s",
|
|
1080
|
+
transition: "transform 0.2s, bottom 0.35s cubic-bezier(0.2, 0.8, 0.2, 1)",
|
|
1083
1081
|
zIndex: placement.zIndex.launcher
|
|
1084
1082
|
},
|
|
1085
1083
|
onMouseEnter: (e) => {
|
|
1086
1084
|
e.currentTarget.style.transform = "scale(1.05)";
|
|
1087
|
-
e.currentTarget.style.boxShadow = "0 6px 16px rgba(0, 0, 0, 0.3)";
|
|
1088
1085
|
},
|
|
1089
1086
|
onMouseLeave: (e) => {
|
|
1090
1087
|
e.currentTarget.style.transform = "scale(1)";
|
|
1091
|
-
e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.25)";
|
|
1092
1088
|
},
|
|
1093
|
-
children: isOpen ? /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1089
|
+
children: isOpen ? /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: launcherIcon, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1094
1090
|
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1095
1091
|
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1096
|
-
] }) : /* @__PURE__ */ jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1092
|
+
] }) : /* @__PURE__ */ jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: launcherIcon, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) })
|
|
1097
1093
|
}
|
|
1098
1094
|
);
|
|
1099
1095
|
const Header = /* @__PURE__ */ jsxs(
|
|
1100
1096
|
"div",
|
|
1101
1097
|
{
|
|
1102
1098
|
style: {
|
|
1103
|
-
padding: "16px
|
|
1104
|
-
background: `linear-gradient(
|
|
1105
|
-
|
|
1099
|
+
padding: "16px 18px 14px",
|
|
1100
|
+
background: `linear-gradient(180deg, color-mix(in srgb, ${primaryColor} 16%, transparent), transparent)`,
|
|
1101
|
+
borderBottom: "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 8%, transparent)",
|
|
1102
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1106
1103
|
display: "flex",
|
|
1107
1104
|
alignItems: "center",
|
|
1108
1105
|
gap: 12
|
|
@@ -1115,7 +1112,9 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1115
1112
|
width: 40,
|
|
1116
1113
|
height: 40,
|
|
1117
1114
|
borderRadius: "50%",
|
|
1118
|
-
backgroundColor:
|
|
1115
|
+
backgroundColor: primaryColor,
|
|
1116
|
+
color: launcherIcon,
|
|
1117
|
+
boxShadow: "inset 0 1px 0 color-mix(in srgb, #ffffff 30%, transparent), 0 2px 6px rgba(0, 0, 0, 0.12)",
|
|
1119
1118
|
display: "flex",
|
|
1120
1119
|
alignItems: "center",
|
|
1121
1120
|
justifyContent: "center",
|
|
@@ -1127,12 +1126,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1127
1126
|
),
|
|
1128
1127
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1129
1128
|
/* @__PURE__ */ jsx("div", { style: { fontWeight: 600, fontSize: 16, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: showOfflineForm ? offlineHeading : businessName }),
|
|
1130
|
-
statusLabel && /* @__PURE__ */ jsxs("div", { style: { fontSize: 13,
|
|
1129
|
+
statusLabel && /* @__PURE__ */ jsxs("div", { style: { fontSize: 13, color: "var(--sk-text-secondary, #6b7280)", display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
|
|
1131
1130
|
statusLabel.dot && /* @__PURE__ */ jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", backgroundColor: statusLabel.dot, flexShrink: 0 } }),
|
|
1132
1131
|
statusLabel.text
|
|
1133
1132
|
] })
|
|
1134
1133
|
] }),
|
|
1135
|
-
connectionStatus === "connecting" && !showWelcome && !showOfflineForm && /* @__PURE__ */ jsxs("div", { style: { fontSize: 11,
|
|
1134
|
+
connectionStatus === "connecting" && !showWelcome && !showOfflineForm && /* @__PURE__ */ jsxs("div", { style: { fontSize: 11, color: "var(--sk-text-secondary, #6b7280)", display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1136
1135
|
/* @__PURE__ */ jsx("span", { style: { animation: "chatDot 1s infinite ease-in-out" }, children: "\u25CF" }),
|
|
1137
1136
|
"Connecting"
|
|
1138
1137
|
] })
|
|
@@ -1213,7 +1212,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1213
1212
|
value: offlineForm[field.name],
|
|
1214
1213
|
onChange: (e) => setOfflineForm((prev) => ({ ...prev, [field.name]: e.target.value })),
|
|
1215
1214
|
required: field.required,
|
|
1216
|
-
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize:
|
|
1215
|
+
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize: 16, outline: "none", boxSizing: "border-box" },
|
|
1217
1216
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1218
1217
|
onBlur: (e) => e.currentTarget.style.borderColor = "var(--sk-border, #e5e7eb)"
|
|
1219
1218
|
}
|
|
@@ -1226,7 +1225,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1226
1225
|
onChange: (e) => setOfflineForm((prev) => ({ ...prev, message: e.target.value })),
|
|
1227
1226
|
required: true,
|
|
1228
1227
|
rows: 4,
|
|
1229
|
-
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize:
|
|
1228
|
+
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize: 16, outline: "none", resize: "vertical", boxSizing: "border-box" },
|
|
1230
1229
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1231
1230
|
onBlur: (e) => e.currentTarget.style.borderColor = "var(--sk-border, #e5e7eb)"
|
|
1232
1231
|
}
|
|
@@ -1326,7 +1325,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1326
1325
|
/* @__PURE__ */ jsxs(
|
|
1327
1326
|
"div",
|
|
1328
1327
|
{
|
|
1329
|
-
style: { flex: 1, overflowY: "auto", padding: 16, display: "flex", flexDirection: "column", gap: 12, backgroundColor: "
|
|
1328
|
+
style: { flex: 1, overflowY: "auto", padding: 16, display: "flex", flexDirection: "column", gap: 12, backgroundColor: "transparent" },
|
|
1330
1329
|
children: [
|
|
1331
1330
|
messages.map((message) => {
|
|
1332
1331
|
const isAssistant = message.role === "assistant" || message.role === "agent";
|
|
@@ -1336,17 +1335,19 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1336
1335
|
style: {
|
|
1337
1336
|
maxWidth: "80%",
|
|
1338
1337
|
padding: message.role === "system" ? "8px 12px" : isAssistant ? "12px 16px" : "10px 14px",
|
|
1339
|
-
borderRadius: message.role === "user" ? "
|
|
1340
|
-
|
|
1338
|
+
borderRadius: message.role === "user" ? "18px 18px 6px 18px" : message.role === "system" ? "10px" : "18px 18px 18px 6px",
|
|
1339
|
+
// Bubbles on glass stay near-opaque: the glass behind them
|
|
1340
|
+
// is for depth, never for the text to read against.
|
|
1341
|
+
backgroundColor: message.role === "user" ? primaryColor : message.role === "system" ? "color-mix(in srgb, var(--sk-text-primary, #111827) 7%, transparent)" : BUBBLE_BG,
|
|
1341
1342
|
color: message.role === "user" ? isLightColor(primaryColor) ? "#1a1a1a" : "white" : message.role === "system" ? "var(--sk-text-secondary, #6b7280)" : "var(--sk-text-primary, #111827)",
|
|
1342
|
-
|
|
1343
|
+
border: message.role === "user" || message.role === "system" ? "none" : HAIRLINE,
|
|
1344
|
+
boxShadow: message.role === "system" ? "none" : message.role === "user" ? "inset 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent), 0 1px 2px rgba(0,0,0,0.10)" : "0 1px 2px rgba(0,0,0,0.06)",
|
|
1343
1345
|
fontSize: message.role === "system" ? 13 : 14,
|
|
1344
1346
|
fontStyle: message.role === "system" ? "italic" : "normal",
|
|
1345
1347
|
lineHeight: isAssistant ? 1.6 : 1.5,
|
|
1346
1348
|
whiteSpace: isAssistant ? "normal" : "pre-wrap",
|
|
1347
1349
|
wordBreak: "break-word",
|
|
1348
|
-
textAlign: isAssistant ? "left" : void 0
|
|
1349
|
-
borderLeft: isAssistant ? `3px solid ${hexAlpha("--sk-primary-rgb", 0.2, primaryRgb)}` : void 0
|
|
1350
|
+
textAlign: isAssistant ? "left" : void 0
|
|
1350
1351
|
},
|
|
1351
1352
|
children: [
|
|
1352
1353
|
message.agentName && message.role === "agent" && /* @__PURE__ */ jsx("div", { style: { fontSize: 12, opacity: 0.6, marginBottom: 4 }, children: message.agentName }),
|
|
@@ -1473,9 +1474,10 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1473
1474
|
{
|
|
1474
1475
|
style: {
|
|
1475
1476
|
padding: "10px 14px",
|
|
1476
|
-
borderRadius: "
|
|
1477
|
-
backgroundColor:
|
|
1478
|
-
|
|
1477
|
+
borderRadius: "18px 18px 18px 6px",
|
|
1478
|
+
backgroundColor: BUBBLE_BG,
|
|
1479
|
+
border: HAIRLINE,
|
|
1480
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.06)",
|
|
1479
1481
|
display: "flex",
|
|
1480
1482
|
gap: 4,
|
|
1481
1483
|
color: "var(--sk-text-tertiary, #9ca3af)"
|
|
@@ -1495,7 +1497,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1495
1497
|
/* @__PURE__ */ jsx("span", { style: { fontSize: 13, color: "var(--sk-error, #dc2626)" }, children: "Failed to send" }),
|
|
1496
1498
|
/* @__PURE__ */ jsx("button", { type: "button", onClick: retryFailedSend, style: { padding: "4px 10px", borderRadius: 6, border: "1px solid var(--sk-error, #dc2626)", background: "var(--sk-bg, #fff)", color: "var(--sk-error, #dc2626)", fontSize: 12, cursor: "pointer" }, children: "Retry" })
|
|
1497
1499
|
] }),
|
|
1498
|
-
/* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, style: { padding:
|
|
1500
|
+
/* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, style: { padding: "10px 12px 12px", backgroundColor: "transparent" }, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
1499
1501
|
/* @__PURE__ */ jsx(
|
|
1500
1502
|
"input",
|
|
1501
1503
|
{
|
|
@@ -1511,15 +1513,20 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1511
1513
|
disabled: isLoading,
|
|
1512
1514
|
style: {
|
|
1513
1515
|
flex: 1,
|
|
1514
|
-
|
|
1516
|
+
minWidth: 0,
|
|
1517
|
+
padding: "10px 16px",
|
|
1515
1518
|
borderRadius: 24,
|
|
1516
|
-
border:
|
|
1517
|
-
|
|
1519
|
+
border: HAIRLINE,
|
|
1520
|
+
backgroundColor: BUBBLE_BG,
|
|
1521
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1522
|
+
// 16px: iOS Safari zooms the page into any focused field under 16px.
|
|
1523
|
+
fontSize: 16,
|
|
1518
1524
|
outline: "none",
|
|
1525
|
+
boxShadow: "inset 0 1px 2px rgba(0,0,0,0.04)",
|
|
1519
1526
|
transition: "border-color 0.2s"
|
|
1520
1527
|
},
|
|
1521
1528
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1522
|
-
onBlur: (e) => e.currentTarget.style.borderColor = "
|
|
1529
|
+
onBlur: (e) => e.currentTarget.style.borderColor = ""
|
|
1523
1530
|
}
|
|
1524
1531
|
),
|
|
1525
1532
|
/* @__PURE__ */ jsx(
|
|
@@ -1549,33 +1556,38 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1549
1556
|
const ChatPopup = isOpen && /* @__PURE__ */ jsxs(
|
|
1550
1557
|
"div",
|
|
1551
1558
|
{
|
|
1559
|
+
"data-sk-echo-panel": true,
|
|
1560
|
+
className: "sk-glass sk-glass--panel",
|
|
1552
1561
|
style: {
|
|
1553
1562
|
position: "fixed",
|
|
1554
1563
|
...placement.popup,
|
|
1555
1564
|
width: "380px",
|
|
1556
1565
|
maxWidth: "calc(100vw - 40px)",
|
|
1557
1566
|
height: "520px",
|
|
1558
|
-
|
|
1559
|
-
borderRadius: "
|
|
1560
|
-
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.2)",
|
|
1567
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1568
|
+
borderRadius: "24px",
|
|
1561
1569
|
display: "flex",
|
|
1562
1570
|
flexDirection: "column",
|
|
1563
1571
|
overflow: "hidden",
|
|
1564
1572
|
zIndex: placement.zIndex.popup,
|
|
1565
|
-
|
|
1573
|
+
transformOrigin: position === "bottom-left" ? "bottom left" : "bottom right",
|
|
1574
|
+
animation: "chatGlassIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.05)"
|
|
1566
1575
|
},
|
|
1567
1576
|
children: [
|
|
1568
1577
|
Header,
|
|
1569
1578
|
checkingAvailability || checkingHandoff ? CheckingScreen : showOfflineForm ? OfflineFormView : showWelcome && welcomeEnabled && messages.length === 0 ? WelcomeScreen : MessagesView,
|
|
1570
|
-
showPoweredBy && /* @__PURE__ */ jsxs("div", { style: { padding: "
|
|
1579
|
+
showPoweredBy && /* @__PURE__ */ jsxs("div", { style: { padding: "0 0 8px", textAlign: "center", fontSize: 11, color: "var(--sk-text-tertiary, #9ca3af)", backgroundColor: "transparent" }, children: [
|
|
1571
1580
|
"Powered by",
|
|
1572
1581
|
" ",
|
|
1573
1582
|
/* @__PURE__ */ jsx("a", { href: "https://sonor.io", target: "_blank", rel: "noopener noreferrer", style: { color: "var(--sk-text-secondary, #6b7280)", textDecoration: "none", fontWeight: 500 }, children: "Sonor" })
|
|
1574
1583
|
] }),
|
|
1575
1584
|
/* @__PURE__ */ jsx("style", { children: `
|
|
1576
|
-
@keyframes
|
|
1577
|
-
from { opacity: 0; transform: translateY(
|
|
1578
|
-
to { opacity: 1; transform: translateY(0); }
|
|
1585
|
+
@keyframes chatGlassIn {
|
|
1586
|
+
from { opacity: 0; transform: translateY(12px) scale(0.94); }
|
|
1587
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
1588
|
+
}
|
|
1589
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1590
|
+
[data-sk-echo-panel] { animation: none !important; }
|
|
1579
1591
|
}
|
|
1580
1592
|
@keyframes chatDot {
|
|
1581
1593
|
0%, 80%, 100% { opacity: 0.3; }
|
|
@@ -1602,11 +1614,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1602
1614
|
}
|
|
1603
1615
|
);
|
|
1604
1616
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1617
|
+
/* @__PURE__ */ jsx(GlassStyles, {}),
|
|
1605
1618
|
ChatPopup,
|
|
1606
1619
|
ChatButton
|
|
1607
1620
|
] });
|
|
1608
1621
|
}
|
|
1609
1622
|
|
|
1610
1623
|
export { ChatWidget };
|
|
1611
|
-
//# sourceMappingURL=chunk-
|
|
1612
|
-
//# sourceMappingURL=chunk-
|
|
1624
|
+
//# sourceMappingURL=chunk-4EJI4IOX.mjs.map
|
|
1625
|
+
//# sourceMappingURL=chunk-4EJI4IOX.mjs.map
|