@sonordev/site-kit 6.0.1 → 6.1.1
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-YU6QANW5.mjs → AnalyticsProvider-33L4E6LO.mjs} +6 -6
- package/dist/{AnalyticsProvider-YU6QANW5.mjs.map → AnalyticsProvider-33L4E6LO.mjs.map} +1 -1
- package/dist/{AnalyticsProvider-4RLYTVWO.js → AnalyticsProvider-5G5AFHZN.js} +10 -10
- package/dist/{AnalyticsProvider-4RLYTVWO.js.map → AnalyticsProvider-5G5AFHZN.js.map} +1 -1
- package/dist/{ArticleViewTracker-OQB2VT73.js → ArticleViewTracker-U2KFUSZF.js} +6 -6
- package/dist/{ArticleViewTracker-OQB2VT73.js.map → ArticleViewTracker-U2KFUSZF.js.map} +1 -1
- package/dist/{ArticleViewTracker-LI44SA4T.mjs → ArticleViewTracker-VZRMPK4S.mjs} +5 -5
- package/dist/{ArticleViewTracker-LI44SA4T.mjs.map → ArticleViewTracker-VZRMPK4S.mjs.map} +1 -1
- package/dist/ChatWidget-LH3QZYKR.mjs +16 -0
- package/dist/{ChatWidget-56SW5ITH.mjs.map → ChatWidget-LH3QZYKR.mjs.map} +1 -1
- package/dist/ChatWidget-RUCQMCMN.js +25 -0
- package/dist/{ChatWidget-HR3OC3WA.js.map → ChatWidget-RUCQMCMN.js.map} +1 -1
- package/dist/EngageWidget-34BQXU7K.mjs +12 -0
- package/dist/{EngageWidget-L4X35N2B.mjs.map → EngageWidget-34BQXU7K.mjs.map} +1 -1
- package/dist/EngageWidget-X2CBW7DV.js +21 -0
- package/dist/{EngageWidget-HXGI3ZKG.js.map → EngageWidget-X2CBW7DV.js.map} +1 -1
- package/dist/{FileField-N2P6E2PN.js → FileField-2MMV53BG.js} +6 -6
- package/dist/{FileField-N2P6E2PN.js.map → FileField-2MMV53BG.js.map} +1 -1
- package/dist/{FileField-GSTLU42O.mjs → FileField-REUU36RJ.mjs} +5 -5
- package/dist/{FileField-GSTLU42O.mjs.map → FileField-REUU36RJ.mjs.map} +1 -1
- package/dist/{FormSpotlight-QLXOS5LN.js → FormSpotlight-Y27TPQ4G.js} +9 -9
- package/dist/{FormSpotlight-QLXOS5LN.js.map → FormSpotlight-Y27TPQ4G.js.map} +1 -1
- package/dist/{FormSpotlight-UFATQTN3.mjs → FormSpotlight-ZV3IS66K.mjs} +3 -3
- package/dist/{FormSpotlight-UFATQTN3.mjs.map → FormSpotlight-ZV3IS66K.mjs.map} +1 -1
- package/dist/{FormStage-SYOKD5TJ.mjs → FormStage-6NUGCDJR.mjs} +3 -3
- package/dist/{FormStage-SYOKD5TJ.mjs.map → FormStage-6NUGCDJR.mjs.map} +1 -1
- package/dist/{FormStage-4HYDMCYU.js → FormStage-K7Z6IEPM.js} +9 -9
- package/dist/{FormStage-4HYDMCYU.js.map → FormStage-K7Z6IEPM.js.map} +1 -1
- package/dist/ManagedForm-EUDKMS5G.mjs +16 -0
- package/dist/{ManagedForm-3TDSIRCM.mjs.map → ManagedForm-EUDKMS5G.mjs.map} +1 -1
- package/dist/ManagedForm-O67ILXN7.js +25 -0
- package/dist/{ManagedForm-TUSGW5EH.js.map → ManagedForm-O67ILXN7.js.map} +1 -1
- package/dist/{ManagedNewsletterForm-CNGCBA2N.mjs → ManagedNewsletterForm-IGWTZW7X.mjs} +7 -7
- package/dist/{ManagedNewsletterForm-CNGCBA2N.mjs.map → ManagedNewsletterForm-IGWTZW7X.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-XJEPVJRM.js → ManagedNewsletterForm-QBJODAIA.js} +8 -8
- package/dist/{ManagedNewsletterForm-XJEPVJRM.js.map → ManagedNewsletterForm-QBJODAIA.js.map} +1 -1
- package/dist/{SignalCore-AXK6RCR4.js → SignalCore-KQDRH44V.js} +11 -11
- package/dist/{SignalCore-AXK6RCR4.js.map → SignalCore-KQDRH44V.js.map} +1 -1
- package/dist/{SignalCore-ARRVP6F7.mjs → SignalCore-UR4KVU5X.mjs} +5 -5
- package/dist/{SignalCore-ARRVP6F7.mjs.map → SignalCore-UR4KVU5X.mjs.map} +1 -1
- package/dist/SitemapSync-DQALPBTR.js +18 -0
- package/dist/{SitemapSync-GAGREAX6.js.map → SitemapSync-DQALPBTR.js.map} +1 -1
- package/dist/SitemapSync-QYV3X5LH.mjs +9 -0
- package/dist/{SitemapSync-42VKJUOU.mjs.map → SitemapSync-QYV3X5LH.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-NVWUXCUQ.mjs → chunk-22KPMJIQ.mjs} +3 -3
- package/dist/{chunk-NVWUXCUQ.mjs.map → chunk-22KPMJIQ.mjs.map} +1 -1
- package/dist/{chunk-QXPGIOU7.mjs → chunk-3E7ZXPOB.mjs} +3 -3
- package/dist/{chunk-QXPGIOU7.mjs.map → chunk-3E7ZXPOB.mjs.map} +1 -1
- package/dist/{chunk-6ZOMIPU5.js → chunk-3H3DTYFQ.js} +8 -8
- package/dist/{chunk-6ZOMIPU5.js.map → chunk-3H3DTYFQ.js.map} +1 -1
- package/dist/{chunk-NYNL6UQV.mjs → chunk-3SHAY7PK.mjs} +69 -49
- package/dist/chunk-3SHAY7PK.mjs.map +1 -0
- package/dist/{chunk-AQMQOH7V.js → chunk-46GMNQWN.js} +3 -3
- package/dist/{chunk-AQMQOH7V.js.map → chunk-46GMNQWN.js.map} +1 -1
- package/dist/{chunk-6YEPFH3Q.js → chunk-6K3YRSYN.js} +10 -10
- package/dist/{chunk-6YEPFH3Q.js.map → chunk-6K3YRSYN.js.map} +1 -1
- package/dist/{chunk-SU42KCQD.mjs → chunk-6ZMEJSNX.mjs} +4 -4
- package/dist/{chunk-SU42KCQD.mjs.map → chunk-6ZMEJSNX.mjs.map} +1 -1
- package/dist/{chunk-WLCPBZOS.mjs → chunk-7DMAVD7W.mjs} +3 -3
- package/dist/{chunk-WLCPBZOS.mjs.map → chunk-7DMAVD7W.mjs.map} +1 -1
- package/dist/{chunk-BWSYPQ5E.js → chunk-7IM7VG4E.js} +6 -6
- package/dist/{chunk-BWSYPQ5E.js.map → chunk-7IM7VG4E.js.map} +1 -1
- package/dist/{chunk-QJ3SMLND.mjs → chunk-7PCXI25T.mjs} +3 -3
- package/dist/{chunk-QJ3SMLND.mjs.map → chunk-7PCXI25T.mjs.map} +1 -1
- package/dist/{chunk-6URNNS3V.mjs → chunk-AG7MWWGP.mjs} +4 -4
- package/dist/{chunk-6URNNS3V.mjs.map → chunk-AG7MWWGP.mjs.map} +1 -1
- package/dist/{chunk-XWKY46NU.js → chunk-BRED7YSL.js} +11 -11
- package/dist/{chunk-XWKY46NU.js.map → chunk-BRED7YSL.js.map} +1 -1
- package/dist/chunk-BZR6RUIN.mjs +128 -0
- package/dist/chunk-BZR6RUIN.mjs.map +1 -0
- package/dist/{chunk-U6F6AN23.mjs → chunk-CJ5YPYAE.mjs} +4 -4
- package/dist/{chunk-U6F6AN23.mjs.map → chunk-CJ5YPYAE.mjs.map} +1 -1
- package/dist/{chunk-FKFVN3GT.js → chunk-D6VMDDQR.js} +8 -8
- package/dist/{chunk-FKFVN3GT.js.map → chunk-D6VMDDQR.js.map} +1 -1
- package/dist/{chunk-GKPVGVHY.mjs → chunk-DGWFHL35.mjs} +3 -3
- package/dist/{chunk-GKPVGVHY.mjs.map → chunk-DGWFHL35.mjs.map} +1 -1
- package/dist/{chunk-4NBJDP6Y.js → chunk-EF7QCYLF.js} +4 -4
- package/dist/{chunk-4NBJDP6Y.js.map → chunk-EF7QCYLF.js.map} +1 -1
- package/dist/{chunk-BMH2D2EP.mjs → chunk-GZLMMX76.mjs} +3 -3
- package/dist/{chunk-BMH2D2EP.mjs.map → chunk-GZLMMX76.mjs.map} +1 -1
- package/dist/{chunk-NVOYCK2S.js → chunk-HH5EMIXK.js} +14 -14
- package/dist/{chunk-NVOYCK2S.js.map → chunk-HH5EMIXK.js.map} +1 -1
- package/dist/chunk-HQWPCX3N.mjs +6 -0
- package/dist/{chunk-7MAHP735.mjs.map → chunk-HQWPCX3N.mjs.map} +1 -1
- package/dist/{chunk-TC3JSQUS.js → chunk-IPGIFBRN.js} +4 -4
- package/dist/{chunk-TC3JSQUS.js.map → chunk-IPGIFBRN.js.map} +1 -1
- package/dist/chunk-IWSN4DGG.js +132 -0
- package/dist/chunk-IWSN4DGG.js.map +1 -0
- package/dist/{chunk-P2HOVWJW.js → chunk-JZCG25XK.js} +14 -14
- package/dist/{chunk-P2HOVWJW.js.map → chunk-JZCG25XK.js.map} +1 -1
- package/dist/{chunk-ZRWIMNQF.js → chunk-ME5636V6.js} +3 -3
- package/dist/{chunk-ZRWIMNQF.js.map → chunk-ME5636V6.js.map} +1 -1
- package/dist/{chunk-UCBBZXJI.js → chunk-MJTHYT3D.js} +4 -4
- package/dist/{chunk-UCBBZXJI.js.map → chunk-MJTHYT3D.js.map} +1 -1
- package/dist/{chunk-IDOHDP7D.mjs → chunk-MSSFRRXJ.mjs} +4 -4
- package/dist/{chunk-IDOHDP7D.mjs.map → chunk-MSSFRRXJ.mjs.map} +1 -1
- package/dist/{chunk-QP56JXMH.mjs → chunk-MWX6QO7A.mjs} +3 -3
- package/dist/{chunk-QP56JXMH.mjs.map → chunk-MWX6QO7A.mjs.map} +1 -1
- package/dist/chunk-NBOBOYMT.js +52 -0
- package/dist/chunk-NBOBOYMT.js.map +1 -0
- package/dist/{chunk-R6UE6MC5.js → chunk-NJSD5QY6.js} +7 -7
- package/dist/{chunk-R6UE6MC5.js.map → chunk-NJSD5QY6.js.map} +1 -1
- package/dist/{chunk-QD4BNYMM.js → chunk-NK7ZWPAO.js} +18 -18
- package/dist/{chunk-QD4BNYMM.js.map → chunk-NK7ZWPAO.js.map} +1 -1
- package/dist/{chunk-4VCR6TXK.js → chunk-OB7K6EFK.js} +5 -5
- package/dist/{chunk-4VCR6TXK.js.map → chunk-OB7K6EFK.js.map} +1 -1
- package/dist/chunk-OBKS3CPP.mjs +50 -0
- package/dist/chunk-OBKS3CPP.mjs.map +1 -0
- package/dist/{chunk-NNQG25M2.mjs → chunk-OP42HO3Z.mjs} +3 -3
- package/dist/{chunk-NNQG25M2.mjs.map → chunk-OP42HO3Z.mjs.map} +1 -1
- package/dist/{chunk-UILVPI2R.js → chunk-OTCJRVFJ.js} +3 -3
- package/dist/{chunk-UILVPI2R.js.map → chunk-OTCJRVFJ.js.map} +1 -1
- package/dist/{chunk-ZYJYBE5G.js → chunk-OUZQL5PV.js} +4 -4
- package/dist/{chunk-ZYJYBE5G.js.map → chunk-OUZQL5PV.js.map} +1 -1
- package/dist/chunk-QWUDHOUE.js +8 -0
- package/dist/{chunk-F3EAAAZ3.js.map → chunk-QWUDHOUE.js.map} +1 -1
- package/dist/{chunk-LZPICBND.js → chunk-QYRJ4IQD.js} +80 -60
- package/dist/chunk-QYRJ4IQD.js.map +1 -0
- package/dist/{chunk-XLFTZV34.mjs → chunk-R2BHRDPZ.mjs} +3 -3
- package/dist/{chunk-XLFTZV34.mjs.map → chunk-R2BHRDPZ.mjs.map} +1 -1
- package/dist/{chunk-PKZMNDZJ.js → chunk-S24WZNFP.js} +5 -5
- package/dist/{chunk-PKZMNDZJ.js.map → chunk-S24WZNFP.js.map} +1 -1
- package/dist/{chunk-RX4TVHSN.mjs → chunk-U2DWXE2A.mjs} +3 -3
- package/dist/{chunk-RX4TVHSN.mjs.map → chunk-U2DWXE2A.mjs.map} +1 -1
- package/dist/{chunk-BIU234TJ.mjs → chunk-U3SQBAUQ.mjs} +8 -8
- package/dist/{chunk-BIU234TJ.mjs.map → chunk-U3SQBAUQ.mjs.map} +1 -1
- package/dist/{chunk-GJCQVVO3.mjs → chunk-U577PJLH.mjs} +7 -7
- package/dist/{chunk-GJCQVVO3.mjs.map → chunk-U577PJLH.mjs.map} +1 -1
- package/dist/{chunk-5ABTBPPK.js → chunk-VNJTU6LG.js} +15 -15
- package/dist/{chunk-5ABTBPPK.js.map → chunk-VNJTU6LG.js.map} +1 -1
- package/dist/{chunk-LCYODFNY.mjs → chunk-VNSV5SY7.mjs} +3 -3
- package/dist/{chunk-LCYODFNY.mjs.map → chunk-VNSV5SY7.mjs.map} +1 -1
- package/dist/{chunk-YTJKVWHY.mjs → chunk-VPZUQXZV.mjs} +4 -4
- package/dist/{chunk-YTJKVWHY.mjs.map → chunk-VPZUQXZV.mjs.map} +1 -1
- package/dist/{chunk-LFASEDBO.mjs → chunk-WVNUOUQI.mjs} +3 -3
- package/dist/{chunk-LFASEDBO.mjs.map → chunk-WVNUOUQI.mjs.map} +1 -1
- package/dist/{chunk-ULSFOC3J.js → chunk-WWJQGMMN.js} +12 -12
- package/dist/{chunk-ULSFOC3J.js.map → chunk-WWJQGMMN.js.map} +1 -1
- package/dist/{chunk-GCZHKHEH.js → chunk-Y4A4G5XJ.js} +5 -5
- package/dist/{chunk-GCZHKHEH.js.map → chunk-Y4A4G5XJ.js.map} +1 -1
- package/dist/{chunk-L63DFM4R.mjs → chunk-YCA4KCRF.mjs} +3 -3
- package/dist/{chunk-L63DFM4R.mjs.map → chunk-YCA4KCRF.mjs.map} +1 -1
- package/dist/{chunk-KUHMHKG5.mjs → chunk-YZMI7QQ2.mjs} +4 -4
- package/dist/{chunk-KUHMHKG5.mjs.map → chunk-YZMI7QQ2.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 +74 -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 +233 -0
- package/dist/cta-bar/index.js.map +1 -0
- package/dist/cta-bar/index.mjs +227 -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/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/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/sync/index.js +17 -17
- package/dist/sync/index.mjs +4 -4
- package/package.json +6 -1
- package/skills/site-kit/SKILL.md +7 -0
- package/dist/ChatWidget-56SW5ITH.mjs +0 -15
- package/dist/ChatWidget-HR3OC3WA.js +0 -24
- package/dist/EngageWidget-HXGI3ZKG.js +0 -21
- package/dist/EngageWidget-L4X35N2B.mjs +0 -12
- package/dist/ManagedForm-3TDSIRCM.mjs +0 -16
- package/dist/ManagedForm-TUSGW5EH.js +0 -25
- package/dist/SitemapSync-42VKJUOU.mjs +0 -9
- package/dist/SitemapSync-GAGREAX6.js +0 -18
- package/dist/chunk-7MAHP735.mjs +0 -6
- package/dist/chunk-F3EAAAZ3.js +0 -8
- package/dist/chunk-LZPICBND.js.map +0 -1
- package/dist/chunk-NYNL6UQV.mjs.map +0 -1
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkESP5RMB7_js = require('./chunk-ESP5RMB7.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkNBOBOYMT_js = require('./chunk-NBOBOYMT.js');
|
|
6
|
+
var chunkWWJQGMMN_js = require('./chunk-WWJQGMMN.js');
|
|
7
|
+
var chunkVNJTU6LG_js = require('./chunk-VNJTU6LG.js');
|
|
7
8
|
var react = require('react');
|
|
8
9
|
var ReactMarkdown = require('react-markdown');
|
|
9
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -38,7 +39,7 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
|
|
|
38
39
|
submit,
|
|
39
40
|
isSubmitting,
|
|
40
41
|
isComplete
|
|
41
|
-
} =
|
|
42
|
+
} = chunkWWJQGMMN_js.useForm(slug, { initialValues: prefill || {} });
|
|
42
43
|
const cardStyle = {
|
|
43
44
|
marginTop: 8,
|
|
44
45
|
padding: 12,
|
|
@@ -66,7 +67,9 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
|
|
|
66
67
|
borderColor: "var(--sk-border, #e5e7eb)",
|
|
67
68
|
backgroundColor: "var(--sk-bg, #ffffff)",
|
|
68
69
|
color: "var(--sk-text-primary, #111827)",
|
|
69
|
-
|
|
70
|
+
// 16px, not smaller: iOS Safari zooms the whole page into any focused
|
|
71
|
+
// field under 16px, which throws the visitor out of the chat window.
|
|
72
|
+
fontSize: 16,
|
|
70
73
|
boxSizing: "border-box",
|
|
71
74
|
outline: "none"
|
|
72
75
|
};
|
|
@@ -301,13 +304,17 @@ function userRequestedHandoff(text) {
|
|
|
301
304
|
];
|
|
302
305
|
return patterns.some((p) => p.test(lower));
|
|
303
306
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
307
|
+
var BUBBLE_BG = "color-mix(in srgb, var(--sk-bg, #ffffff) 94%, transparent)";
|
|
308
|
+
var HAIRLINE = "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 9%, transparent)";
|
|
309
|
+
var ECHO_STYLE_HREF = "sk-echo";
|
|
310
|
+
var ECHO_CSS = `
|
|
311
|
+
@media print {
|
|
312
|
+
[data-sk-echo-launcher], [data-sk-echo-panel] { display: none !important; }
|
|
313
|
+
}
|
|
314
|
+
@media (prefers-reduced-motion: reduce) {
|
|
315
|
+
[data-sk-echo-panel] { animation: none !important; }
|
|
310
316
|
}
|
|
317
|
+
`;
|
|
311
318
|
function isLightColor(hex) {
|
|
312
319
|
const num = parseInt(hex.replace("#", ""), 16);
|
|
313
320
|
const r = num >> 16;
|
|
@@ -395,7 +402,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
395
402
|
const { apiKey } = getApiConfig();
|
|
396
403
|
if (!apiKey) return;
|
|
397
404
|
let cancelled = false;
|
|
398
|
-
|
|
405
|
+
chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/api/public/seo/project-info`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((data) => {
|
|
399
406
|
if (cancelled || !data?.valid || !data?.project_id) return;
|
|
400
407
|
setResolvedProjectId(data.project_id);
|
|
401
408
|
}).catch(() => {
|
|
@@ -409,7 +416,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
409
416
|
const apiKey = ensureApiKey();
|
|
410
417
|
if (!apiKey) return;
|
|
411
418
|
try {
|
|
412
|
-
const response = await
|
|
419
|
+
const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/config?projectId=${projectId}`, {}, { apiKey, retries: 0 });
|
|
413
420
|
if (response.ok) {
|
|
414
421
|
const { data } = await response.json();
|
|
415
422
|
setWidgetConfig(data ?? null);
|
|
@@ -425,7 +432,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
425
432
|
const apiKey = ensureApiKey();
|
|
426
433
|
if (!apiKey) return null;
|
|
427
434
|
try {
|
|
428
|
-
const response = await
|
|
435
|
+
const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/availability?projectId=${projectId}`, {}, { apiKey, retries: 0 });
|
|
429
436
|
if (response.ok) {
|
|
430
437
|
const { data } = await response.json();
|
|
431
438
|
setAvailability(data);
|
|
@@ -442,7 +449,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
442
449
|
const apiKey = ensureApiKey();
|
|
443
450
|
if (!apiKey) return null;
|
|
444
451
|
try {
|
|
445
|
-
const response = await
|
|
452
|
+
const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/session`, {
|
|
446
453
|
method: "POST",
|
|
447
454
|
headers: { "Content-Type": "application/json" },
|
|
448
455
|
body: JSON.stringify({
|
|
@@ -503,7 +510,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
503
510
|
pageUrl: typeof window !== "undefined" ? window.location.href : void 0,
|
|
504
511
|
...siteContext ? { siteContext } : {}
|
|
505
512
|
};
|
|
506
|
-
const res = await
|
|
513
|
+
const res = await chunkVNJTU6LG_js.sonorFetch(url, {
|
|
507
514
|
method: "POST",
|
|
508
515
|
headers: {
|
|
509
516
|
"Content-Type": "application/json"
|
|
@@ -614,7 +621,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
614
621
|
if (currentSessionId) {
|
|
615
622
|
const apiKey = ensureApiKey();
|
|
616
623
|
if (apiKey) {
|
|
617
|
-
|
|
624
|
+
chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((json) => {
|
|
618
625
|
const data = json?.data ?? json;
|
|
619
626
|
if (Array.isArray(data) && data.length) {
|
|
620
627
|
setMessages((prev) => {
|
|
@@ -677,7 +684,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
677
684
|
try {
|
|
678
685
|
const apiKey = ensureApiKey();
|
|
679
686
|
if (!apiKey) return;
|
|
680
|
-
const response = await
|
|
687
|
+
const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 });
|
|
681
688
|
if (response.ok) {
|
|
682
689
|
const { data } = await response.json();
|
|
683
690
|
setMessages((prev) => {
|
|
@@ -830,7 +837,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
830
837
|
form.append("file", file);
|
|
831
838
|
form.append("sessionId", sessionId);
|
|
832
839
|
form.append("visitorId", visitorId);
|
|
833
|
-
const res = await
|
|
840
|
+
const res = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/upload`, {
|
|
834
841
|
method: "POST",
|
|
835
842
|
body: form
|
|
836
843
|
}, { apiKey, retries: 0 });
|
|
@@ -977,7 +984,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
977
984
|
if (!apiKey) return;
|
|
978
985
|
setCheckingHandoff(true);
|
|
979
986
|
try {
|
|
980
|
-
const res = await
|
|
987
|
+
const res = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/handoff`, {
|
|
981
988
|
method: "POST",
|
|
982
989
|
headers: { "Content-Type": "application/json" },
|
|
983
990
|
body: JSON.stringify({ sessionId })
|
|
@@ -1016,7 +1023,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1016
1023
|
setIsLoading(true);
|
|
1017
1024
|
setOfflineError(null);
|
|
1018
1025
|
try {
|
|
1019
|
-
const response = await
|
|
1026
|
+
const response = await chunkVNJTU6LG_js.sonorFetch(`${baseUrl}/engage/widget/offline-form`, {
|
|
1020
1027
|
method: "POST",
|
|
1021
1028
|
headers: { "Content-Type": "application/json" },
|
|
1022
1029
|
body: JSON.stringify({
|
|
@@ -1065,11 +1072,13 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1065
1072
|
if (availability && availability.agentsOnline > 0) return { dot: "#22c55e", text: "Online" };
|
|
1066
1073
|
return { dot: "var(--sk-text-tertiary, #9ca3af)", text: "We'll respond soon" };
|
|
1067
1074
|
})();
|
|
1075
|
+
const launcherIcon = isLightColor(primaryColor) ? "#1a1a1a" : "white";
|
|
1068
1076
|
const ChatButton = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1069
1077
|
"button",
|
|
1070
1078
|
{
|
|
1071
1079
|
type: "button",
|
|
1072
1080
|
"data-sk-echo-launcher": true,
|
|
1081
|
+
className: "sk-glass sk-glass--brand",
|
|
1073
1082
|
onClick: handleToggle,
|
|
1074
1083
|
"aria-label": isOpen ? "Close chat" : "Open chat",
|
|
1075
1084
|
style: {
|
|
@@ -1078,37 +1087,34 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1078
1087
|
width: "60px",
|
|
1079
1088
|
height: "60px",
|
|
1080
1089
|
borderRadius: "50%",
|
|
1081
|
-
|
|
1082
|
-
border: "none",
|
|
1090
|
+
["--sk-glass-brand"]: primaryColor,
|
|
1083
1091
|
display: "flex",
|
|
1084
1092
|
alignItems: "center",
|
|
1085
1093
|
justifyContent: "center",
|
|
1086
1094
|
cursor: "pointer",
|
|
1087
|
-
|
|
1088
|
-
transition: "transform 0.2s, box-shadow 0.2s",
|
|
1095
|
+
transition: "transform 0.2s, bottom 0.35s cubic-bezier(0.2, 0.8, 0.2, 1)",
|
|
1089
1096
|
zIndex: placement.zIndex.launcher
|
|
1090
1097
|
},
|
|
1091
1098
|
onMouseEnter: (e) => {
|
|
1092
1099
|
e.currentTarget.style.transform = "scale(1.05)";
|
|
1093
|
-
e.currentTarget.style.boxShadow = "0 6px 16px rgba(0, 0, 0, 0.3)";
|
|
1094
1100
|
},
|
|
1095
1101
|
onMouseLeave: (e) => {
|
|
1096
1102
|
e.currentTarget.style.transform = "scale(1)";
|
|
1097
|
-
e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.25)";
|
|
1098
1103
|
},
|
|
1099
|
-
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1104
|
+
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: launcherIcon, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1100
1105
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1101
1106
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1102
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1107
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: launcherIcon, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.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" }) })
|
|
1103
1108
|
}
|
|
1104
1109
|
);
|
|
1105
1110
|
const Header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1106
1111
|
"div",
|
|
1107
1112
|
{
|
|
1108
1113
|
style: {
|
|
1109
|
-
padding: "16px
|
|
1110
|
-
background: `linear-gradient(
|
|
1111
|
-
|
|
1114
|
+
padding: "16px 18px 14px",
|
|
1115
|
+
background: `linear-gradient(180deg, color-mix(in srgb, ${primaryColor} 16%, transparent), transparent)`,
|
|
1116
|
+
borderBottom: "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 8%, transparent)",
|
|
1117
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1112
1118
|
display: "flex",
|
|
1113
1119
|
alignItems: "center",
|
|
1114
1120
|
gap: 12
|
|
@@ -1121,7 +1127,9 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1121
1127
|
width: 40,
|
|
1122
1128
|
height: 40,
|
|
1123
1129
|
borderRadius: "50%",
|
|
1124
|
-
backgroundColor:
|
|
1130
|
+
backgroundColor: primaryColor,
|
|
1131
|
+
color: launcherIcon,
|
|
1132
|
+
boxShadow: "inset 0 1px 0 color-mix(in srgb, #ffffff 30%, transparent), 0 2px 6px rgba(0, 0, 0, 0.12)",
|
|
1125
1133
|
display: "flex",
|
|
1126
1134
|
alignItems: "center",
|
|
1127
1135
|
justifyContent: "center",
|
|
@@ -1133,12 +1141,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1133
1141
|
),
|
|
1134
1142
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1135
1143
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 600, fontSize: 16, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: showOfflineForm ? offlineHeading : businessName }),
|
|
1136
|
-
statusLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 13,
|
|
1144
|
+
statusLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 13, color: "var(--sk-text-secondary, #6b7280)", display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
|
|
1137
1145
|
statusLabel.dot && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", backgroundColor: statusLabel.dot, flexShrink: 0 } }),
|
|
1138
1146
|
statusLabel.text
|
|
1139
1147
|
] })
|
|
1140
1148
|
] }),
|
|
1141
|
-
connectionStatus === "connecting" && !showWelcome && !showOfflineForm && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 11,
|
|
1149
|
+
connectionStatus === "connecting" && !showWelcome && !showOfflineForm && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 11, color: "var(--sk-text-secondary, #6b7280)", display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1142
1150
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { animation: "chatDot 1s infinite ease-in-out" }, children: "\u25CF" }),
|
|
1143
1151
|
"Connecting"
|
|
1144
1152
|
] })
|
|
@@ -1219,7 +1227,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1219
1227
|
value: offlineForm[field.name],
|
|
1220
1228
|
onChange: (e) => setOfflineForm((prev) => ({ ...prev, [field.name]: e.target.value })),
|
|
1221
1229
|
required: field.required,
|
|
1222
|
-
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize:
|
|
1230
|
+
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize: 16, outline: "none", boxSizing: "border-box" },
|
|
1223
1231
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1224
1232
|
onBlur: (e) => e.currentTarget.style.borderColor = "var(--sk-border, #e5e7eb)"
|
|
1225
1233
|
}
|
|
@@ -1232,7 +1240,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1232
1240
|
onChange: (e) => setOfflineForm((prev) => ({ ...prev, message: e.target.value })),
|
|
1233
1241
|
required: true,
|
|
1234
1242
|
rows: 4,
|
|
1235
|
-
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize:
|
|
1243
|
+
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize: 16, outline: "none", resize: "vertical", boxSizing: "border-box" },
|
|
1236
1244
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1237
1245
|
onBlur: (e) => e.currentTarget.style.borderColor = "var(--sk-border, #e5e7eb)"
|
|
1238
1246
|
}
|
|
@@ -1332,7 +1340,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1332
1340
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1333
1341
|
"div",
|
|
1334
1342
|
{
|
|
1335
|
-
style: { flex: 1, overflowY: "auto", padding: 16, display: "flex", flexDirection: "column", gap: 12, backgroundColor: "
|
|
1343
|
+
style: { flex: 1, overflowY: "auto", padding: 16, display: "flex", flexDirection: "column", gap: 12, backgroundColor: "transparent" },
|
|
1336
1344
|
children: [
|
|
1337
1345
|
messages.map((message) => {
|
|
1338
1346
|
const isAssistant = message.role === "assistant" || message.role === "agent";
|
|
@@ -1342,17 +1350,19 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1342
1350
|
style: {
|
|
1343
1351
|
maxWidth: "80%",
|
|
1344
1352
|
padding: message.role === "system" ? "8px 12px" : isAssistant ? "12px 16px" : "10px 14px",
|
|
1345
|
-
borderRadius: message.role === "user" ? "
|
|
1346
|
-
|
|
1353
|
+
borderRadius: message.role === "user" ? "18px 18px 6px 18px" : message.role === "system" ? "10px" : "18px 18px 18px 6px",
|
|
1354
|
+
// Bubbles on glass stay near-opaque: the glass behind them
|
|
1355
|
+
// is for depth, never for the text to read against.
|
|
1356
|
+
backgroundColor: message.role === "user" ? primaryColor : message.role === "system" ? "color-mix(in srgb, var(--sk-text-primary, #111827) 7%, transparent)" : BUBBLE_BG,
|
|
1347
1357
|
color: message.role === "user" ? isLightColor(primaryColor) ? "#1a1a1a" : "white" : message.role === "system" ? "var(--sk-text-secondary, #6b7280)" : "var(--sk-text-primary, #111827)",
|
|
1348
|
-
|
|
1358
|
+
border: message.role === "user" || message.role === "system" ? "none" : HAIRLINE,
|
|
1359
|
+
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)",
|
|
1349
1360
|
fontSize: message.role === "system" ? 13 : 14,
|
|
1350
1361
|
fontStyle: message.role === "system" ? "italic" : "normal",
|
|
1351
1362
|
lineHeight: isAssistant ? 1.6 : 1.5,
|
|
1352
1363
|
whiteSpace: isAssistant ? "normal" : "pre-wrap",
|
|
1353
1364
|
wordBreak: "break-word",
|
|
1354
|
-
textAlign: isAssistant ? "left" : void 0
|
|
1355
|
-
borderLeft: isAssistant ? `3px solid ${hexAlpha("--sk-primary-rgb", 0.2, primaryRgb)}` : void 0
|
|
1365
|
+
textAlign: isAssistant ? "left" : void 0
|
|
1356
1366
|
},
|
|
1357
1367
|
children: [
|
|
1358
1368
|
message.agentName && message.role === "agent" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, opacity: 0.6, marginBottom: 4 }, children: message.agentName }),
|
|
@@ -1479,9 +1489,10 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1479
1489
|
{
|
|
1480
1490
|
style: {
|
|
1481
1491
|
padding: "10px 14px",
|
|
1482
|
-
borderRadius: "
|
|
1483
|
-
backgroundColor:
|
|
1484
|
-
|
|
1492
|
+
borderRadius: "18px 18px 18px 6px",
|
|
1493
|
+
backgroundColor: BUBBLE_BG,
|
|
1494
|
+
border: HAIRLINE,
|
|
1495
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.06)",
|
|
1485
1496
|
display: "flex",
|
|
1486
1497
|
gap: 4,
|
|
1487
1498
|
color: "var(--sk-text-tertiary, #9ca3af)"
|
|
@@ -1501,7 +1512,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1501
1512
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 13, color: "var(--sk-error, #dc2626)" }, children: "Failed to send" }),
|
|
1502
1513
|
/* @__PURE__ */ jsxRuntime.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" })
|
|
1503
1514
|
] }),
|
|
1504
|
-
/* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: handleSubmit, style: { padding:
|
|
1515
|
+
/* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: handleSubmit, style: { padding: "10px 12px 12px", backgroundColor: "transparent" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
1505
1516
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1506
1517
|
"input",
|
|
1507
1518
|
{
|
|
@@ -1517,15 +1528,20 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1517
1528
|
disabled: isLoading,
|
|
1518
1529
|
style: {
|
|
1519
1530
|
flex: 1,
|
|
1520
|
-
|
|
1531
|
+
minWidth: 0,
|
|
1532
|
+
padding: "10px 16px",
|
|
1521
1533
|
borderRadius: 24,
|
|
1522
|
-
border:
|
|
1523
|
-
|
|
1534
|
+
border: HAIRLINE,
|
|
1535
|
+
backgroundColor: BUBBLE_BG,
|
|
1536
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1537
|
+
// 16px: iOS Safari zooms the page into any focused field under 16px.
|
|
1538
|
+
fontSize: 16,
|
|
1524
1539
|
outline: "none",
|
|
1540
|
+
boxShadow: "inset 0 1px 2px rgba(0,0,0,0.04)",
|
|
1525
1541
|
transition: "border-color 0.2s"
|
|
1526
1542
|
},
|
|
1527
1543
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1528
|
-
onBlur: (e) => e.currentTarget.style.borderColor = "
|
|
1544
|
+
onBlur: (e) => e.currentTarget.style.borderColor = ""
|
|
1529
1545
|
}
|
|
1530
1546
|
),
|
|
1531
1547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1555,33 +1571,35 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1555
1571
|
const ChatPopup = isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1556
1572
|
"div",
|
|
1557
1573
|
{
|
|
1574
|
+
"data-sk-echo-panel": true,
|
|
1575
|
+
className: "sk-glass sk-glass--panel",
|
|
1558
1576
|
style: {
|
|
1559
1577
|
position: "fixed",
|
|
1560
1578
|
...placement.popup,
|
|
1561
1579
|
width: "380px",
|
|
1562
1580
|
maxWidth: "calc(100vw - 40px)",
|
|
1563
1581
|
height: "520px",
|
|
1564
|
-
|
|
1565
|
-
borderRadius: "
|
|
1566
|
-
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.2)",
|
|
1582
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1583
|
+
borderRadius: "24px",
|
|
1567
1584
|
display: "flex",
|
|
1568
1585
|
flexDirection: "column",
|
|
1569
1586
|
overflow: "hidden",
|
|
1570
1587
|
zIndex: placement.zIndex.popup,
|
|
1571
|
-
|
|
1588
|
+
transformOrigin: position === "bottom-left" ? "bottom left" : "bottom right",
|
|
1589
|
+
animation: "chatGlassIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.05)"
|
|
1572
1590
|
},
|
|
1573
1591
|
children: [
|
|
1574
1592
|
Header,
|
|
1575
1593
|
checkingAvailability || checkingHandoff ? CheckingScreen : showOfflineForm ? OfflineFormView : showWelcome && welcomeEnabled && messages.length === 0 ? WelcomeScreen : MessagesView,
|
|
1576
|
-
showPoweredBy && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "
|
|
1594
|
+
showPoweredBy && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "0 0 8px", textAlign: "center", fontSize: 11, color: "var(--sk-text-tertiary, #9ca3af)", backgroundColor: "transparent" }, children: [
|
|
1577
1595
|
"Powered by",
|
|
1578
1596
|
" ",
|
|
1579
1597
|
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://sonor.io", target: "_blank", rel: "noopener noreferrer", style: { color: "var(--sk-text-secondary, #6b7280)", textDecoration: "none", fontWeight: 500 }, children: "Sonor" })
|
|
1580
1598
|
] }),
|
|
1581
1599
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
1582
|
-
@keyframes
|
|
1583
|
-
from { opacity: 0; transform: translateY(
|
|
1584
|
-
to { opacity: 1; transform: translateY(0); }
|
|
1600
|
+
@keyframes chatGlassIn {
|
|
1601
|
+
from { opacity: 0; transform: translateY(12px) scale(0.94); }
|
|
1602
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
1585
1603
|
}
|
|
1586
1604
|
@keyframes chatDot {
|
|
1587
1605
|
0%, 80%, 100% { opacity: 0.3; }
|
|
@@ -1608,11 +1626,13 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1608
1626
|
}
|
|
1609
1627
|
);
|
|
1610
1628
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1629
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNBOBOYMT_js.GlassStyles, {}),
|
|
1630
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { href: ECHO_STYLE_HREF, precedence: "default", children: ECHO_CSS }),
|
|
1611
1631
|
ChatPopup,
|
|
1612
1632
|
ChatButton
|
|
1613
1633
|
] });
|
|
1614
1634
|
}
|
|
1615
1635
|
|
|
1616
1636
|
exports.ChatWidget = ChatWidget;
|
|
1617
|
-
//# sourceMappingURL=chunk-
|
|
1618
|
-
//# sourceMappingURL=chunk-
|
|
1637
|
+
//# sourceMappingURL=chunk-QYRJ4IQD.js.map
|
|
1638
|
+
//# sourceMappingURL=chunk-QYRJ4IQD.js.map
|