@sonordev/site-kit 6.0.1 → 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-YU6QANW5.mjs → AnalyticsProvider-PO6SSJG2.mjs} +6 -6
- package/dist/{AnalyticsProvider-YU6QANW5.mjs.map → AnalyticsProvider-PO6SSJG2.mjs.map} +1 -1
- package/dist/{AnalyticsProvider-4RLYTVWO.js → AnalyticsProvider-V6G45QG7.js} +10 -10
- package/dist/{AnalyticsProvider-4RLYTVWO.js.map → AnalyticsProvider-V6G45QG7.js.map} +1 -1
- package/dist/{ArticleViewTracker-LI44SA4T.mjs → ArticleViewTracker-CML36HJZ.mjs} +5 -5
- package/dist/{ArticleViewTracker-LI44SA4T.mjs.map → ArticleViewTracker-CML36HJZ.mjs.map} +1 -1
- package/dist/{ArticleViewTracker-OQB2VT73.js → ArticleViewTracker-FE2YWHX4.js} +6 -6
- package/dist/{ArticleViewTracker-OQB2VT73.js.map → ArticleViewTracker-FE2YWHX4.js.map} +1 -1
- package/dist/ChatWidget-GVNDKGUU.mjs +16 -0
- package/dist/{ChatWidget-56SW5ITH.mjs.map → ChatWidget-GVNDKGUU.mjs.map} +1 -1
- package/dist/ChatWidget-YL34KOZM.js +25 -0
- package/dist/{ChatWidget-HR3OC3WA.js.map → ChatWidget-YL34KOZM.js.map} +1 -1
- package/dist/EngageWidget-465O5XUV.mjs +12 -0
- package/dist/{EngageWidget-L4X35N2B.mjs.map → EngageWidget-465O5XUV.mjs.map} +1 -1
- package/dist/EngageWidget-IQRKRYPG.js +21 -0
- package/dist/{EngageWidget-HXGI3ZKG.js.map → EngageWidget-IQRKRYPG.js.map} +1 -1
- package/dist/{FileField-N2P6E2PN.js → FileField-F3PFKMIF.js} +6 -6
- package/dist/{FileField-N2P6E2PN.js.map → FileField-F3PFKMIF.js.map} +1 -1
- package/dist/{FileField-GSTLU42O.mjs → FileField-FWKSBFRX.mjs} +5 -5
- package/dist/{FileField-GSTLU42O.mjs.map → FileField-FWKSBFRX.mjs.map} +1 -1
- package/dist/{FormSpotlight-QLXOS5LN.js → FormSpotlight-DJQ3P3EX.js} +9 -9
- package/dist/{FormSpotlight-QLXOS5LN.js.map → FormSpotlight-DJQ3P3EX.js.map} +1 -1
- package/dist/{FormSpotlight-UFATQTN3.mjs → FormSpotlight-K4LP2DMP.mjs} +3 -3
- package/dist/{FormSpotlight-UFATQTN3.mjs.map → FormSpotlight-K4LP2DMP.mjs.map} +1 -1
- package/dist/{FormStage-4HYDMCYU.js → FormStage-QMGZ3MOT.js} +9 -9
- package/dist/{FormStage-4HYDMCYU.js.map → FormStage-QMGZ3MOT.js.map} +1 -1
- package/dist/{FormStage-SYOKD5TJ.mjs → FormStage-YKVTHPKV.mjs} +3 -3
- package/dist/{FormStage-SYOKD5TJ.mjs.map → FormStage-YKVTHPKV.mjs.map} +1 -1
- package/dist/ManagedForm-MLPETHSQ.js +25 -0
- package/dist/{ManagedForm-TUSGW5EH.js.map → ManagedForm-MLPETHSQ.js.map} +1 -1
- package/dist/ManagedForm-P3L34ALG.mjs +16 -0
- package/dist/{ManagedForm-3TDSIRCM.mjs.map → ManagedForm-P3L34ALG.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-CNGCBA2N.mjs → ManagedNewsletterForm-C5YQH7MP.mjs} +7 -7
- package/dist/{ManagedNewsletterForm-CNGCBA2N.mjs.map → ManagedNewsletterForm-C5YQH7MP.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-XJEPVJRM.js → ManagedNewsletterForm-R4LLZBRQ.js} +8 -8
- package/dist/{ManagedNewsletterForm-XJEPVJRM.js.map → ManagedNewsletterForm-R4LLZBRQ.js.map} +1 -1
- package/dist/{SignalCore-ARRVP6F7.mjs → SignalCore-BNYNS6P7.mjs} +5 -5
- package/dist/{SignalCore-ARRVP6F7.mjs.map → SignalCore-BNYNS6P7.mjs.map} +1 -1
- package/dist/{SignalCore-AXK6RCR4.js → SignalCore-CLELIKFI.js} +11 -11
- package/dist/{SignalCore-AXK6RCR4.js.map → SignalCore-CLELIKFI.js.map} +1 -1
- package/dist/SitemapSync-P7XWL6VV.js +18 -0
- package/dist/{SitemapSync-GAGREAX6.js.map → SitemapSync-P7XWL6VV.js.map} +1 -1
- package/dist/SitemapSync-SIKJCK7N.mjs +9 -0
- package/dist/{SitemapSync-42VKJUOU.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-UILVPI2R.js → chunk-36NE4PSS.js} +3 -3
- package/dist/{chunk-UILVPI2R.js.map → chunk-36NE4PSS.js.map} +1 -1
- package/dist/{chunk-L63DFM4R.mjs → chunk-3DXJHMQM.mjs} +3 -3
- package/dist/{chunk-L63DFM4R.mjs.map → chunk-3DXJHMQM.mjs.map} +1 -1
- package/dist/{chunk-NYNL6UQV.mjs → chunk-4EJI4IOX.mjs} +63 -50
- package/dist/chunk-4EJI4IOX.mjs.map +1 -0
- package/dist/{chunk-6URNNS3V.mjs → chunk-6OSHL7H5.mjs} +4 -4
- package/dist/{chunk-6URNNS3V.mjs.map → chunk-6OSHL7H5.mjs.map} +1 -1
- package/dist/chunk-ACKFL6WA.mjs +6 -0
- package/dist/{chunk-7MAHP735.mjs.map → chunk-ACKFL6WA.mjs.map} +1 -1
- package/dist/{chunk-4NBJDP6Y.js → chunk-AQUWWATH.js} +4 -4
- package/dist/{chunk-4NBJDP6Y.js.map → chunk-AQUWWATH.js.map} +1 -1
- package/dist/{chunk-QXPGIOU7.mjs → chunk-BDSNEB3O.mjs} +3 -3
- package/dist/{chunk-QXPGIOU7.mjs.map → chunk-BDSNEB3O.mjs.map} +1 -1
- package/dist/{chunk-ZRWIMNQF.js → chunk-BGOPF6J2.js} +3 -3
- package/dist/{chunk-ZRWIMNQF.js.map → chunk-BGOPF6J2.js.map} +1 -1
- package/dist/chunk-BZR6RUIN.mjs +128 -0
- package/dist/chunk-BZR6RUIN.mjs.map +1 -0
- package/dist/{chunk-XLFTZV34.mjs → chunk-CJX2MC62.mjs} +3 -3
- package/dist/{chunk-XLFTZV34.mjs.map → chunk-CJX2MC62.mjs.map} +1 -1
- package/dist/{chunk-AQMQOH7V.js → chunk-DQXEYUTD.js} +3 -3
- package/dist/{chunk-AQMQOH7V.js.map → chunk-DQXEYUTD.js.map} +1 -1
- package/dist/{chunk-PKZMNDZJ.js → chunk-DXBSBWSS.js} +5 -5
- package/dist/{chunk-PKZMNDZJ.js.map → chunk-DXBSBWSS.js.map} +1 -1
- package/dist/{chunk-NVWUXCUQ.mjs → chunk-ESAPT5JT.mjs} +3 -3
- package/dist/{chunk-NVWUXCUQ.mjs.map → chunk-ESAPT5JT.mjs.map} +1 -1
- package/dist/{chunk-QP56JXMH.mjs → chunk-F6BYWNHU.mjs} +3 -3
- package/dist/{chunk-QP56JXMH.mjs.map → chunk-F6BYWNHU.mjs.map} +1 -1
- package/dist/{chunk-NNQG25M2.mjs → chunk-FQAZBJJO.mjs} +3 -3
- package/dist/{chunk-NNQG25M2.mjs.map → chunk-FQAZBJJO.mjs.map} +1 -1
- package/dist/{chunk-RX4TVHSN.mjs → chunk-H5FCJBAN.mjs} +3 -3
- package/dist/{chunk-RX4TVHSN.mjs.map → chunk-H5FCJBAN.mjs.map} +1 -1
- package/dist/{chunk-6ZOMIPU5.js → chunk-I4RU3RCS.js} +8 -8
- package/dist/{chunk-6ZOMIPU5.js.map → chunk-I4RU3RCS.js.map} +1 -1
- package/dist/{chunk-GCZHKHEH.js → chunk-IDJY2JWU.js} +5 -5
- package/dist/{chunk-GCZHKHEH.js.map → chunk-IDJY2JWU.js.map} +1 -1
- package/dist/{chunk-6YEPFH3Q.js → chunk-ITVQV7DK.js} +10 -10
- package/dist/{chunk-6YEPFH3Q.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-P2HOVWJW.js → chunk-K4LLYQFZ.js} +14 -14
- package/dist/{chunk-P2HOVWJW.js.map → chunk-K4LLYQFZ.js.map} +1 -1
- package/dist/{chunk-XWKY46NU.js → chunk-KDNB6BYH.js} +11 -11
- package/dist/{chunk-XWKY46NU.js.map → chunk-KDNB6BYH.js.map} +1 -1
- package/dist/{chunk-U6F6AN23.mjs → chunk-KKTSAT7I.mjs} +4 -4
- package/dist/{chunk-U6F6AN23.mjs.map → chunk-KKTSAT7I.mjs.map} +1 -1
- package/dist/{chunk-BMH2D2EP.mjs → chunk-L3GAEBJU.mjs} +3 -3
- package/dist/{chunk-BMH2D2EP.mjs.map → chunk-L3GAEBJU.mjs.map} +1 -1
- package/dist/{chunk-TC3JSQUS.js → chunk-LF44SJPP.js} +4 -4
- package/dist/{chunk-TC3JSQUS.js.map → chunk-LF44SJPP.js.map} +1 -1
- package/dist/{chunk-QD4BNYMM.js → chunk-MZK5APTV.js} +18 -18
- package/dist/{chunk-QD4BNYMM.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-ZYJYBE5G.js → chunk-NDVKIDMN.js} +4 -4
- package/dist/{chunk-ZYJYBE5G.js.map → chunk-NDVKIDMN.js.map} +1 -1
- package/dist/{chunk-IDOHDP7D.mjs → chunk-NMKUYGKK.mjs} +4 -4
- package/dist/{chunk-IDOHDP7D.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-WLCPBZOS.mjs → chunk-OF4V7CSP.mjs} +3 -3
- package/dist/{chunk-WLCPBZOS.mjs.map → chunk-OF4V7CSP.mjs.map} +1 -1
- package/dist/{chunk-LCYODFNY.mjs → chunk-OQWAJBYA.mjs} +3 -3
- package/dist/{chunk-LCYODFNY.mjs.map → chunk-OQWAJBYA.mjs.map} +1 -1
- package/dist/chunk-OXA4ZSX2.js +8 -0
- package/dist/{chunk-F3EAAAZ3.js.map → chunk-OXA4ZSX2.js.map} +1 -1
- package/dist/{chunk-QJ3SMLND.mjs → chunk-QC6VQ2IW.mjs} +3 -3
- package/dist/{chunk-QJ3SMLND.mjs.map → chunk-QC6VQ2IW.mjs.map} +1 -1
- package/dist/{chunk-UCBBZXJI.js → chunk-QF3XTEXV.js} +4 -4
- package/dist/{chunk-UCBBZXJI.js.map → chunk-QF3XTEXV.js.map} +1 -1
- package/dist/{chunk-SU42KCQD.mjs → chunk-RGCUND5Q.mjs} +4 -4
- package/dist/{chunk-SU42KCQD.mjs.map → chunk-RGCUND5Q.mjs.map} +1 -1
- package/dist/{chunk-BWSYPQ5E.js → chunk-RVFOUPK4.js} +6 -6
- package/dist/{chunk-BWSYPQ5E.js.map → chunk-RVFOUPK4.js.map} +1 -1
- package/dist/{chunk-ULSFOC3J.js → chunk-SDGS2R5O.js} +12 -12
- package/dist/{chunk-ULSFOC3J.js.map → chunk-SDGS2R5O.js.map} +1 -1
- package/dist/{chunk-BIU234TJ.mjs → chunk-TA3TQTDA.mjs} +8 -8
- package/dist/{chunk-BIU234TJ.mjs.map → chunk-TA3TQTDA.mjs.map} +1 -1
- package/dist/{chunk-R6UE6MC5.js → chunk-TMNFPVK5.js} +7 -7
- package/dist/{chunk-R6UE6MC5.js.map → chunk-TMNFPVK5.js.map} +1 -1
- package/dist/{chunk-4VCR6TXK.js → chunk-VK74LC4H.js} +5 -5
- package/dist/{chunk-4VCR6TXK.js.map → chunk-VK74LC4H.js.map} +1 -1
- package/dist/{chunk-GJCQVVO3.mjs → chunk-XGELGOF6.mjs} +7 -7
- package/dist/{chunk-GJCQVVO3.mjs.map → chunk-XGELGOF6.mjs.map} +1 -1
- package/dist/{chunk-LZPICBND.js → chunk-XKJLJLQ4.js} +74 -61
- package/dist/chunk-XKJLJLQ4.js.map +1 -0
- package/dist/{chunk-YTJKVWHY.mjs → chunk-XOYQKFKI.mjs} +4 -4
- package/dist/{chunk-YTJKVWHY.mjs.map → chunk-XOYQKFKI.mjs.map} +1 -1
- package/dist/{chunk-NVOYCK2S.js → chunk-Y53BIB7A.js} +14 -14
- package/dist/{chunk-NVOYCK2S.js.map → chunk-Y53BIB7A.js.map} +1 -1
- package/dist/{chunk-GKPVGVHY.mjs → chunk-YKNXBWPZ.mjs} +3 -3
- package/dist/{chunk-GKPVGVHY.mjs.map → chunk-YKNXBWPZ.mjs.map} +1 -1
- package/dist/{chunk-KUHMHKG5.mjs → chunk-YP5WAFTI.mjs} +4 -4
- package/dist/{chunk-KUHMHKG5.mjs.map → chunk-YP5WAFTI.mjs.map} +1 -1
- package/dist/{chunk-FKFVN3GT.js → chunk-YS7Y2PQG.js} +8 -8
- package/dist/{chunk-FKFVN3GT.js.map → chunk-YS7Y2PQG.js.map} +1 -1
- package/dist/{chunk-5ABTBPPK.js → chunk-ZQJGCQHC.js} +15 -15
- package/dist/{chunk-5ABTBPPK.js.map → chunk-ZQJGCQHC.js.map} +1 -1
- package/dist/{chunk-LFASEDBO.mjs → chunk-ZQSJK65K.mjs} +3 -3
- package/dist/{chunk-LFASEDBO.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/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 +6 -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 chunkSDGS2R5O_js = require('./chunk-SDGS2R5O.js');
|
|
7
|
+
var chunkZQJGCQHC_js = require('./chunk-ZQJGCQHC.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
|
+
} = chunkSDGS2R5O_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,8 @@ function userRequestedHandoff(text) {
|
|
|
301
304
|
];
|
|
302
305
|
return patterns.some((p) => p.test(lower));
|
|
303
306
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
const r = Math.min(255, Math.max(0, (num >> 16) + amount));
|
|
307
|
-
const g = Math.min(255, Math.max(0, (num >> 8 & 255) + amount));
|
|
308
|
-
const b = Math.min(255, Math.max(0, (num & 255) + amount));
|
|
309
|
-
return `#${(1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1)}`;
|
|
310
|
-
}
|
|
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)";
|
|
311
309
|
function isLightColor(hex) {
|
|
312
310
|
const num = parseInt(hex.replace("#", ""), 16);
|
|
313
311
|
const r = num >> 16;
|
|
@@ -395,7 +393,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
395
393
|
const { apiKey } = getApiConfig();
|
|
396
394
|
if (!apiKey) return;
|
|
397
395
|
let cancelled = false;
|
|
398
|
-
|
|
396
|
+
chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/api/public/seo/project-info`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((data) => {
|
|
399
397
|
if (cancelled || !data?.valid || !data?.project_id) return;
|
|
400
398
|
setResolvedProjectId(data.project_id);
|
|
401
399
|
}).catch(() => {
|
|
@@ -409,7 +407,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
409
407
|
const apiKey = ensureApiKey();
|
|
410
408
|
if (!apiKey) return;
|
|
411
409
|
try {
|
|
412
|
-
const response = await
|
|
410
|
+
const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/config?projectId=${projectId}`, {}, { apiKey, retries: 0 });
|
|
413
411
|
if (response.ok) {
|
|
414
412
|
const { data } = await response.json();
|
|
415
413
|
setWidgetConfig(data ?? null);
|
|
@@ -425,7 +423,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
425
423
|
const apiKey = ensureApiKey();
|
|
426
424
|
if (!apiKey) return null;
|
|
427
425
|
try {
|
|
428
|
-
const response = await
|
|
426
|
+
const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/availability?projectId=${projectId}`, {}, { apiKey, retries: 0 });
|
|
429
427
|
if (response.ok) {
|
|
430
428
|
const { data } = await response.json();
|
|
431
429
|
setAvailability(data);
|
|
@@ -442,7 +440,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
442
440
|
const apiKey = ensureApiKey();
|
|
443
441
|
if (!apiKey) return null;
|
|
444
442
|
try {
|
|
445
|
-
const response = await
|
|
443
|
+
const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/session`, {
|
|
446
444
|
method: "POST",
|
|
447
445
|
headers: { "Content-Type": "application/json" },
|
|
448
446
|
body: JSON.stringify({
|
|
@@ -503,7 +501,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
503
501
|
pageUrl: typeof window !== "undefined" ? window.location.href : void 0,
|
|
504
502
|
...siteContext ? { siteContext } : {}
|
|
505
503
|
};
|
|
506
|
-
const res = await
|
|
504
|
+
const res = await chunkZQJGCQHC_js.sonorFetch(url, {
|
|
507
505
|
method: "POST",
|
|
508
506
|
headers: {
|
|
509
507
|
"Content-Type": "application/json"
|
|
@@ -614,7 +612,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
614
612
|
if (currentSessionId) {
|
|
615
613
|
const apiKey = ensureApiKey();
|
|
616
614
|
if (apiKey) {
|
|
617
|
-
|
|
615
|
+
chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((json) => {
|
|
618
616
|
const data = json?.data ?? json;
|
|
619
617
|
if (Array.isArray(data) && data.length) {
|
|
620
618
|
setMessages((prev) => {
|
|
@@ -677,7 +675,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
677
675
|
try {
|
|
678
676
|
const apiKey = ensureApiKey();
|
|
679
677
|
if (!apiKey) return;
|
|
680
|
-
const response = await
|
|
678
|
+
const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 });
|
|
681
679
|
if (response.ok) {
|
|
682
680
|
const { data } = await response.json();
|
|
683
681
|
setMessages((prev) => {
|
|
@@ -830,7 +828,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
830
828
|
form.append("file", file);
|
|
831
829
|
form.append("sessionId", sessionId);
|
|
832
830
|
form.append("visitorId", visitorId);
|
|
833
|
-
const res = await
|
|
831
|
+
const res = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/upload`, {
|
|
834
832
|
method: "POST",
|
|
835
833
|
body: form
|
|
836
834
|
}, { apiKey, retries: 0 });
|
|
@@ -977,7 +975,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
977
975
|
if (!apiKey) return;
|
|
978
976
|
setCheckingHandoff(true);
|
|
979
977
|
try {
|
|
980
|
-
const res = await
|
|
978
|
+
const res = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/handoff`, {
|
|
981
979
|
method: "POST",
|
|
982
980
|
headers: { "Content-Type": "application/json" },
|
|
983
981
|
body: JSON.stringify({ sessionId })
|
|
@@ -1016,7 +1014,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1016
1014
|
setIsLoading(true);
|
|
1017
1015
|
setOfflineError(null);
|
|
1018
1016
|
try {
|
|
1019
|
-
const response = await
|
|
1017
|
+
const response = await chunkZQJGCQHC_js.sonorFetch(`${baseUrl}/engage/widget/offline-form`, {
|
|
1020
1018
|
method: "POST",
|
|
1021
1019
|
headers: { "Content-Type": "application/json" },
|
|
1022
1020
|
body: JSON.stringify({
|
|
@@ -1065,11 +1063,13 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1065
1063
|
if (availability && availability.agentsOnline > 0) return { dot: "#22c55e", text: "Online" };
|
|
1066
1064
|
return { dot: "var(--sk-text-tertiary, #9ca3af)", text: "We'll respond soon" };
|
|
1067
1065
|
})();
|
|
1066
|
+
const launcherIcon = isLightColor(primaryColor) ? "#1a1a1a" : "white";
|
|
1068
1067
|
const ChatButton = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1069
1068
|
"button",
|
|
1070
1069
|
{
|
|
1071
1070
|
type: "button",
|
|
1072
1071
|
"data-sk-echo-launcher": true,
|
|
1072
|
+
className: "sk-glass sk-glass--brand",
|
|
1073
1073
|
onClick: handleToggle,
|
|
1074
1074
|
"aria-label": isOpen ? "Close chat" : "Open chat",
|
|
1075
1075
|
style: {
|
|
@@ -1078,37 +1078,34 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1078
1078
|
width: "60px",
|
|
1079
1079
|
height: "60px",
|
|
1080
1080
|
borderRadius: "50%",
|
|
1081
|
-
|
|
1082
|
-
border: "none",
|
|
1081
|
+
["--sk-glass-brand"]: primaryColor,
|
|
1083
1082
|
display: "flex",
|
|
1084
1083
|
alignItems: "center",
|
|
1085
1084
|
justifyContent: "center",
|
|
1086
1085
|
cursor: "pointer",
|
|
1087
|
-
|
|
1088
|
-
transition: "transform 0.2s, box-shadow 0.2s",
|
|
1086
|
+
transition: "transform 0.2s, bottom 0.35s cubic-bezier(0.2, 0.8, 0.2, 1)",
|
|
1089
1087
|
zIndex: placement.zIndex.launcher
|
|
1090
1088
|
},
|
|
1091
1089
|
onMouseEnter: (e) => {
|
|
1092
1090
|
e.currentTarget.style.transform = "scale(1.05)";
|
|
1093
|
-
e.currentTarget.style.boxShadow = "0 6px 16px rgba(0, 0, 0, 0.3)";
|
|
1094
1091
|
},
|
|
1095
1092
|
onMouseLeave: (e) => {
|
|
1096
1093
|
e.currentTarget.style.transform = "scale(1)";
|
|
1097
|
-
e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.25)";
|
|
1098
1094
|
},
|
|
1099
|
-
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1095
|
+
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
1096
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1101
1097
|
/* @__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:
|
|
1098
|
+
] }) : /* @__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
1099
|
}
|
|
1104
1100
|
);
|
|
1105
1101
|
const Header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1106
1102
|
"div",
|
|
1107
1103
|
{
|
|
1108
1104
|
style: {
|
|
1109
|
-
padding: "16px
|
|
1110
|
-
background: `linear-gradient(
|
|
1111
|
-
|
|
1105
|
+
padding: "16px 18px 14px",
|
|
1106
|
+
background: `linear-gradient(180deg, color-mix(in srgb, ${primaryColor} 16%, transparent), transparent)`,
|
|
1107
|
+
borderBottom: "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 8%, transparent)",
|
|
1108
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1112
1109
|
display: "flex",
|
|
1113
1110
|
alignItems: "center",
|
|
1114
1111
|
gap: 12
|
|
@@ -1121,7 +1118,9 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1121
1118
|
width: 40,
|
|
1122
1119
|
height: 40,
|
|
1123
1120
|
borderRadius: "50%",
|
|
1124
|
-
backgroundColor:
|
|
1121
|
+
backgroundColor: primaryColor,
|
|
1122
|
+
color: launcherIcon,
|
|
1123
|
+
boxShadow: "inset 0 1px 0 color-mix(in srgb, #ffffff 30%, transparent), 0 2px 6px rgba(0, 0, 0, 0.12)",
|
|
1125
1124
|
display: "flex",
|
|
1126
1125
|
alignItems: "center",
|
|
1127
1126
|
justifyContent: "center",
|
|
@@ -1133,12 +1132,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1133
1132
|
),
|
|
1134
1133
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1135
1134
|
/* @__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,
|
|
1135
|
+
statusLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 13, color: "var(--sk-text-secondary, #6b7280)", display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
|
|
1137
1136
|
statusLabel.dot && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", backgroundColor: statusLabel.dot, flexShrink: 0 } }),
|
|
1138
1137
|
statusLabel.text
|
|
1139
1138
|
] })
|
|
1140
1139
|
] }),
|
|
1141
|
-
connectionStatus === "connecting" && !showWelcome && !showOfflineForm && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 11,
|
|
1140
|
+
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
1141
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { animation: "chatDot 1s infinite ease-in-out" }, children: "\u25CF" }),
|
|
1143
1142
|
"Connecting"
|
|
1144
1143
|
] })
|
|
@@ -1219,7 +1218,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1219
1218
|
value: offlineForm[field.name],
|
|
1220
1219
|
onChange: (e) => setOfflineForm((prev) => ({ ...prev, [field.name]: e.target.value })),
|
|
1221
1220
|
required: field.required,
|
|
1222
|
-
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize:
|
|
1221
|
+
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize: 16, outline: "none", boxSizing: "border-box" },
|
|
1223
1222
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1224
1223
|
onBlur: (e) => e.currentTarget.style.borderColor = "var(--sk-border, #e5e7eb)"
|
|
1225
1224
|
}
|
|
@@ -1232,7 +1231,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1232
1231
|
onChange: (e) => setOfflineForm((prev) => ({ ...prev, message: e.target.value })),
|
|
1233
1232
|
required: true,
|
|
1234
1233
|
rows: 4,
|
|
1235
|
-
style: { width: "100%", padding: "10px 12px", borderRadius: 8, border: "1px solid var(--sk-border, #e5e7eb)", fontSize:
|
|
1234
|
+
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
1235
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1237
1236
|
onBlur: (e) => e.currentTarget.style.borderColor = "var(--sk-border, #e5e7eb)"
|
|
1238
1237
|
}
|
|
@@ -1332,7 +1331,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1332
1331
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1333
1332
|
"div",
|
|
1334
1333
|
{
|
|
1335
|
-
style: { flex: 1, overflowY: "auto", padding: 16, display: "flex", flexDirection: "column", gap: 12, backgroundColor: "
|
|
1334
|
+
style: { flex: 1, overflowY: "auto", padding: 16, display: "flex", flexDirection: "column", gap: 12, backgroundColor: "transparent" },
|
|
1336
1335
|
children: [
|
|
1337
1336
|
messages.map((message) => {
|
|
1338
1337
|
const isAssistant = message.role === "assistant" || message.role === "agent";
|
|
@@ -1342,17 +1341,19 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1342
1341
|
style: {
|
|
1343
1342
|
maxWidth: "80%",
|
|
1344
1343
|
padding: message.role === "system" ? "8px 12px" : isAssistant ? "12px 16px" : "10px 14px",
|
|
1345
|
-
borderRadius: message.role === "user" ? "
|
|
1346
|
-
|
|
1344
|
+
borderRadius: message.role === "user" ? "18px 18px 6px 18px" : message.role === "system" ? "10px" : "18px 18px 18px 6px",
|
|
1345
|
+
// Bubbles on glass stay near-opaque: the glass behind them
|
|
1346
|
+
// is for depth, never for the text to read against.
|
|
1347
|
+
backgroundColor: message.role === "user" ? primaryColor : message.role === "system" ? "color-mix(in srgb, var(--sk-text-primary, #111827) 7%, transparent)" : BUBBLE_BG,
|
|
1347
1348
|
color: message.role === "user" ? isLightColor(primaryColor) ? "#1a1a1a" : "white" : message.role === "system" ? "var(--sk-text-secondary, #6b7280)" : "var(--sk-text-primary, #111827)",
|
|
1348
|
-
|
|
1349
|
+
border: message.role === "user" || message.role === "system" ? "none" : HAIRLINE,
|
|
1350
|
+
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
1351
|
fontSize: message.role === "system" ? 13 : 14,
|
|
1350
1352
|
fontStyle: message.role === "system" ? "italic" : "normal",
|
|
1351
1353
|
lineHeight: isAssistant ? 1.6 : 1.5,
|
|
1352
1354
|
whiteSpace: isAssistant ? "normal" : "pre-wrap",
|
|
1353
1355
|
wordBreak: "break-word",
|
|
1354
|
-
textAlign: isAssistant ? "left" : void 0
|
|
1355
|
-
borderLeft: isAssistant ? `3px solid ${hexAlpha("--sk-primary-rgb", 0.2, primaryRgb)}` : void 0
|
|
1356
|
+
textAlign: isAssistant ? "left" : void 0
|
|
1356
1357
|
},
|
|
1357
1358
|
children: [
|
|
1358
1359
|
message.agentName && message.role === "agent" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, opacity: 0.6, marginBottom: 4 }, children: message.agentName }),
|
|
@@ -1479,9 +1480,10 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1479
1480
|
{
|
|
1480
1481
|
style: {
|
|
1481
1482
|
padding: "10px 14px",
|
|
1482
|
-
borderRadius: "
|
|
1483
|
-
backgroundColor:
|
|
1484
|
-
|
|
1483
|
+
borderRadius: "18px 18px 18px 6px",
|
|
1484
|
+
backgroundColor: BUBBLE_BG,
|
|
1485
|
+
border: HAIRLINE,
|
|
1486
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.06)",
|
|
1485
1487
|
display: "flex",
|
|
1486
1488
|
gap: 4,
|
|
1487
1489
|
color: "var(--sk-text-tertiary, #9ca3af)"
|
|
@@ -1501,7 +1503,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1501
1503
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 13, color: "var(--sk-error, #dc2626)" }, children: "Failed to send" }),
|
|
1502
1504
|
/* @__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
1505
|
] }),
|
|
1504
|
-
/* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: handleSubmit, style: { padding:
|
|
1506
|
+
/* @__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
1507
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1506
1508
|
"input",
|
|
1507
1509
|
{
|
|
@@ -1517,15 +1519,20 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1517
1519
|
disabled: isLoading,
|
|
1518
1520
|
style: {
|
|
1519
1521
|
flex: 1,
|
|
1520
|
-
|
|
1522
|
+
minWidth: 0,
|
|
1523
|
+
padding: "10px 16px",
|
|
1521
1524
|
borderRadius: 24,
|
|
1522
|
-
border:
|
|
1523
|
-
|
|
1525
|
+
border: HAIRLINE,
|
|
1526
|
+
backgroundColor: BUBBLE_BG,
|
|
1527
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1528
|
+
// 16px: iOS Safari zooms the page into any focused field under 16px.
|
|
1529
|
+
fontSize: 16,
|
|
1524
1530
|
outline: "none",
|
|
1531
|
+
boxShadow: "inset 0 1px 2px rgba(0,0,0,0.04)",
|
|
1525
1532
|
transition: "border-color 0.2s"
|
|
1526
1533
|
},
|
|
1527
1534
|
onFocus: (e) => e.currentTarget.style.borderColor = primaryColor,
|
|
1528
|
-
onBlur: (e) => e.currentTarget.style.borderColor = "
|
|
1535
|
+
onBlur: (e) => e.currentTarget.style.borderColor = ""
|
|
1529
1536
|
}
|
|
1530
1537
|
),
|
|
1531
1538
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1555,33 +1562,38 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1555
1562
|
const ChatPopup = isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1556
1563
|
"div",
|
|
1557
1564
|
{
|
|
1565
|
+
"data-sk-echo-panel": true,
|
|
1566
|
+
className: "sk-glass sk-glass--panel",
|
|
1558
1567
|
style: {
|
|
1559
1568
|
position: "fixed",
|
|
1560
1569
|
...placement.popup,
|
|
1561
1570
|
width: "380px",
|
|
1562
1571
|
maxWidth: "calc(100vw - 40px)",
|
|
1563
1572
|
height: "520px",
|
|
1564
|
-
|
|
1565
|
-
borderRadius: "
|
|
1566
|
-
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.2)",
|
|
1573
|
+
color: "var(--sk-text-primary, #111827)",
|
|
1574
|
+
borderRadius: "24px",
|
|
1567
1575
|
display: "flex",
|
|
1568
1576
|
flexDirection: "column",
|
|
1569
1577
|
overflow: "hidden",
|
|
1570
1578
|
zIndex: placement.zIndex.popup,
|
|
1571
|
-
|
|
1579
|
+
transformOrigin: position === "bottom-left" ? "bottom left" : "bottom right",
|
|
1580
|
+
animation: "chatGlassIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.05)"
|
|
1572
1581
|
},
|
|
1573
1582
|
children: [
|
|
1574
1583
|
Header,
|
|
1575
1584
|
checkingAvailability || checkingHandoff ? CheckingScreen : showOfflineForm ? OfflineFormView : showWelcome && welcomeEnabled && messages.length === 0 ? WelcomeScreen : MessagesView,
|
|
1576
|
-
showPoweredBy && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "
|
|
1585
|
+
showPoweredBy && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "0 0 8px", textAlign: "center", fontSize: 11, color: "var(--sk-text-tertiary, #9ca3af)", backgroundColor: "transparent" }, children: [
|
|
1577
1586
|
"Powered by",
|
|
1578
1587
|
" ",
|
|
1579
1588
|
/* @__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
1589
|
] }),
|
|
1581
1590
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
1582
|
-
@keyframes
|
|
1583
|
-
from { opacity: 0; transform: translateY(
|
|
1584
|
-
to { opacity: 1; transform: translateY(0); }
|
|
1591
|
+
@keyframes chatGlassIn {
|
|
1592
|
+
from { opacity: 0; transform: translateY(12px) scale(0.94); }
|
|
1593
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
1594
|
+
}
|
|
1595
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1596
|
+
[data-sk-echo-panel] { animation: none !important; }
|
|
1585
1597
|
}
|
|
1586
1598
|
@keyframes chatDot {
|
|
1587
1599
|
0%, 80%, 100% { opacity: 0.3; }
|
|
@@ -1608,11 +1620,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1608
1620
|
}
|
|
1609
1621
|
);
|
|
1610
1622
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1623
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNBOBOYMT_js.GlassStyles, {}),
|
|
1611
1624
|
ChatPopup,
|
|
1612
1625
|
ChatButton
|
|
1613
1626
|
] });
|
|
1614
1627
|
}
|
|
1615
1628
|
|
|
1616
1629
|
exports.ChatWidget = ChatWidget;
|
|
1617
|
-
//# sourceMappingURL=chunk-
|
|
1618
|
-
//# sourceMappingURL=chunk-
|
|
1630
|
+
//# sourceMappingURL=chunk-XKJLJLQ4.js.map
|
|
1631
|
+
//# sourceMappingURL=chunk-XKJLJLQ4.js.map
|