@sonordev/site-kit 6.1.0 → 6.1.3
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/agent-manifest.json +2 -2
- package/dist/{AnalyticsProvider-V6G45QG7.js → AnalyticsProvider-QK6XBDEJ.js} +10 -10
- package/dist/{AnalyticsProvider-V6G45QG7.js.map → AnalyticsProvider-QK6XBDEJ.js.map} +1 -1
- package/dist/{AnalyticsProvider-PO6SSJG2.mjs → AnalyticsProvider-TIJWTISP.mjs} +6 -6
- package/dist/{AnalyticsProvider-PO6SSJG2.mjs.map → AnalyticsProvider-TIJWTISP.mjs.map} +1 -1
- package/dist/{ArticleViewTracker-FE2YWHX4.js → ArticleViewTracker-ALE672ZR.js} +6 -6
- package/dist/{ArticleViewTracker-FE2YWHX4.js.map → ArticleViewTracker-ALE672ZR.js.map} +1 -1
- package/dist/{ArticleViewTracker-CML36HJZ.mjs → ArticleViewTracker-I66RBWDK.mjs} +5 -5
- package/dist/{ArticleViewTracker-CML36HJZ.mjs.map → ArticleViewTracker-I66RBWDK.mjs.map} +1 -1
- package/dist/ChatWidget-566CQUN6.js +26 -0
- package/dist/{ChatWidget-YL34KOZM.js.map → ChatWidget-566CQUN6.js.map} +1 -1
- package/dist/ChatWidget-LNOY4TUZ.mjs +17 -0
- package/dist/{ChatWidget-GVNDKGUU.mjs.map → ChatWidget-LNOY4TUZ.mjs.map} +1 -1
- package/dist/EngageWidget-DF47YUHQ.js +21 -0
- package/dist/{EngageWidget-IQRKRYPG.js.map → EngageWidget-DF47YUHQ.js.map} +1 -1
- package/dist/EngageWidget-IGF7SC3R.mjs +12 -0
- package/dist/{EngageWidget-465O5XUV.mjs.map → EngageWidget-IGF7SC3R.mjs.map} +1 -1
- package/dist/{FileField-FWKSBFRX.mjs → FileField-AG63W2BC.mjs} +5 -5
- package/dist/{FileField-FWKSBFRX.mjs.map → FileField-AG63W2BC.mjs.map} +1 -1
- package/dist/{FileField-F3PFKMIF.js → FileField-IK6E5IOC.js} +6 -6
- package/dist/{FileField-F3PFKMIF.js.map → FileField-IK6E5IOC.js.map} +1 -1
- package/dist/{FormSpotlight-DJQ3P3EX.js → FormSpotlight-6MUDJWW5.js} +9 -9
- package/dist/{FormSpotlight-DJQ3P3EX.js.map → FormSpotlight-6MUDJWW5.js.map} +1 -1
- package/dist/{FormSpotlight-K4LP2DMP.mjs → FormSpotlight-H7V4GBXG.mjs} +3 -3
- package/dist/{FormSpotlight-K4LP2DMP.mjs.map → FormSpotlight-H7V4GBXG.mjs.map} +1 -1
- package/dist/{FormStage-YKVTHPKV.mjs → FormStage-ACETL7SD.mjs} +3 -3
- package/dist/{FormStage-YKVTHPKV.mjs.map → FormStage-ACETL7SD.mjs.map} +1 -1
- package/dist/{FormStage-QMGZ3MOT.js → FormStage-ZXZRZ2LS.js} +9 -9
- package/dist/{FormStage-QMGZ3MOT.js.map → FormStage-ZXZRZ2LS.js.map} +1 -1
- package/dist/ManagedForm-4U54NPW2.js +25 -0
- package/dist/{ManagedForm-MLPETHSQ.js.map → ManagedForm-4U54NPW2.js.map} +1 -1
- package/dist/ManagedForm-MOBWSG4D.mjs +16 -0
- package/dist/{ManagedForm-P3L34ALG.mjs.map → ManagedForm-MOBWSG4D.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-R4LLZBRQ.js → ManagedNewsletterForm-5LBGBE2F.js} +8 -8
- package/dist/{ManagedNewsletterForm-R4LLZBRQ.js.map → ManagedNewsletterForm-5LBGBE2F.js.map} +1 -1
- package/dist/{ManagedNewsletterForm-C5YQH7MP.mjs → ManagedNewsletterForm-OV3OEMUP.mjs} +7 -7
- package/dist/{ManagedNewsletterForm-C5YQH7MP.mjs.map → ManagedNewsletterForm-OV3OEMUP.mjs.map} +1 -1
- package/dist/{SignalCore-CLELIKFI.js → SignalCore-QCVR7TZV.js} +11 -11
- package/dist/{SignalCore-CLELIKFI.js.map → SignalCore-QCVR7TZV.js.map} +1 -1
- package/dist/{SignalCore-BNYNS6P7.mjs → SignalCore-XM2MHEGR.mjs} +5 -5
- package/dist/{SignalCore-BNYNS6P7.mjs.map → SignalCore-XM2MHEGR.mjs.map} +1 -1
- package/dist/SitemapSync-74EVNOFQ.mjs +9 -0
- package/dist/{SitemapSync-SIKJCK7N.mjs.map → SitemapSync-74EVNOFQ.mjs.map} +1 -1
- package/dist/SitemapSync-BQFZAE3X.js +18 -0
- package/dist/{SitemapSync-P7XWL6VV.js.map → SitemapSync-BQFZAE3X.js.map} +1 -1
- package/dist/analytics/index.js +9 -9
- package/dist/analytics/index.mjs +4 -4
- package/dist/articles/index.js +1 -1
- package/dist/articles/index.mjs +1 -1
- package/dist/articles/server-ui.js +1 -1
- package/dist/articles/server-ui.mjs +1 -1
- package/dist/brand/extract-brand-profile.d.ts +2 -7
- package/dist/brand/extract-brand-profile.d.ts.map +1 -1
- package/dist/{chunk-SDGS2R5O.js → chunk-2SLA2LOD.js} +12 -12
- package/dist/{chunk-SDGS2R5O.js.map → chunk-2SLA2LOD.js.map} +1 -1
- package/dist/{chunk-QC6VQ2IW.mjs → chunk-3MLVI5DH.mjs} +3 -3
- package/dist/{chunk-QC6VQ2IW.mjs.map → chunk-3MLVI5DH.mjs.map} +1 -1
- package/dist/{chunk-TA3TQTDA.mjs → chunk-3RISRHOK.mjs} +8 -8
- package/dist/{chunk-TA3TQTDA.mjs.map → chunk-3RISRHOK.mjs.map} +1 -1
- package/dist/chunk-5FBALULE.mjs +6 -0
- package/dist/{chunk-ACKFL6WA.mjs.map → chunk-5FBALULE.mjs.map} +1 -1
- package/dist/{chunk-ESAPT5JT.mjs → chunk-5IQOPL7T.mjs} +3 -3
- package/dist/{chunk-ESAPT5JT.mjs.map → chunk-5IQOPL7T.mjs.map} +1 -1
- package/dist/{chunk-YS7Y2PQG.js → chunk-5OUOVPXC.js} +8 -8
- package/dist/{chunk-YS7Y2PQG.js.map → chunk-5OUOVPXC.js.map} +1 -1
- package/dist/{chunk-YP5WAFTI.mjs → chunk-6FIIA6ME.mjs} +4 -4
- package/dist/{chunk-YP5WAFTI.mjs.map → chunk-6FIIA6ME.mjs.map} +1 -1
- package/dist/{chunk-JOYMIGR2.mjs → chunk-7K6L33BX.mjs} +22 -22
- package/dist/{chunk-RVFOUPK4.js → chunk-7VRK3DWU.js} +6 -6
- package/dist/{chunk-RVFOUPK4.js.map → chunk-7VRK3DWU.js.map} +1 -1
- package/dist/{chunk-IDJY2JWU.js → chunk-AGEE4CGH.js} +5 -5
- package/dist/{chunk-IDJY2JWU.js.map → chunk-AGEE4CGH.js.map} +1 -1
- package/dist/{chunk-JS75ORH7.js → chunk-ATPQ6264.js} +24 -24
- package/dist/{chunk-LF44SJPP.js → chunk-BGBP4UN4.js} +4 -4
- package/dist/{chunk-LF44SJPP.js.map → chunk-BGBP4UN4.js.map} +1 -1
- package/dist/{chunk-RGCUND5Q.mjs → chunk-CI7T4ZRP.mjs} +4 -4
- package/dist/{chunk-RGCUND5Q.mjs.map → chunk-CI7T4ZRP.mjs.map} +1 -1
- package/dist/{chunk-KDNB6BYH.js → chunk-CTAYH725.js} +11 -11
- package/dist/{chunk-KDNB6BYH.js.map → chunk-CTAYH725.js.map} +1 -1
- package/dist/{chunk-YKNXBWPZ.mjs → chunk-D5KKVWZK.mjs} +3 -3
- package/dist/{chunk-YKNXBWPZ.mjs.map → chunk-D5KKVWZK.mjs.map} +1 -1
- package/dist/{chunk-XGELGOF6.mjs → chunk-DVZ4BMXX.mjs} +7 -7
- package/dist/{chunk-XGELGOF6.mjs.map → chunk-DVZ4BMXX.mjs.map} +1 -1
- package/dist/{chunk-FQAZBJJO.mjs → chunk-ESPOINPT.mjs} +3 -3
- package/dist/{chunk-FQAZBJJO.mjs.map → chunk-ESPOINPT.mjs.map} +1 -1
- package/dist/{chunk-XOYQKFKI.mjs → chunk-EVETX2XF.mjs} +4 -4
- package/dist/{chunk-XOYQKFKI.mjs.map → chunk-EVETX2XF.mjs.map} +1 -1
- package/dist/{chunk-ITVQV7DK.js → chunk-EVKP4SOM.js} +10 -10
- package/dist/{chunk-ITVQV7DK.js.map → chunk-EVKP4SOM.js.map} +1 -1
- package/dist/{chunk-CJX2MC62.mjs → chunk-EXVHO3CZ.mjs} +3 -3
- package/dist/{chunk-CJX2MC62.mjs.map → chunk-EXVHO3CZ.mjs.map} +1 -1
- package/dist/{chunk-3DXJHMQM.mjs → chunk-GYKFHQSZ.mjs} +3 -3
- package/dist/{chunk-3DXJHMQM.mjs.map → chunk-GYKFHQSZ.mjs.map} +1 -1
- package/dist/{chunk-H5FCJBAN.mjs → chunk-I4PUQYBI.mjs} +3 -3
- package/dist/{chunk-H5FCJBAN.mjs.map → chunk-I4PUQYBI.mjs.map} +1 -1
- package/dist/{chunk-DQXEYUTD.js → chunk-I7KIVKVW.js} +3 -3
- package/dist/{chunk-DQXEYUTD.js.map → chunk-I7KIVKVW.js.map} +1 -1
- package/dist/{chunk-L3GAEBJU.mjs → chunk-IUNFAKOS.mjs} +3 -3
- package/dist/{chunk-L3GAEBJU.mjs.map → chunk-IUNFAKOS.mjs.map} +1 -1
- package/dist/{chunk-ZQJGCQHC.js → chunk-IWHAJBYL.js} +15 -15
- package/dist/{chunk-ZQJGCQHC.js.map → chunk-IWHAJBYL.js.map} +1 -1
- package/dist/{chunk-AQUWWATH.js → chunk-IZRVSIOK.js} +4 -4
- package/dist/{chunk-AQUWWATH.js.map → chunk-IZRVSIOK.js.map} +1 -1
- package/dist/{chunk-TMNFPVK5.js → chunk-JAA42HR7.js} +7 -7
- package/dist/{chunk-TMNFPVK5.js.map → chunk-JAA42HR7.js.map} +1 -1
- package/dist/{chunk-Y53BIB7A.js → chunk-JSM4AYSZ.js} +14 -14
- package/dist/{chunk-Y53BIB7A.js.map → chunk-JSM4AYSZ.js.map} +1 -1
- package/dist/{chunk-MZK5APTV.js → chunk-KDLN2MR5.js} +18 -18
- package/dist/{chunk-MZK5APTV.js.map → chunk-KDLN2MR5.js.map} +1 -1
- package/dist/{chunk-BGOPF6J2.js → chunk-KEEZX6Q4.js} +3 -3
- package/dist/{chunk-BGOPF6J2.js.map → chunk-KEEZX6Q4.js.map} +1 -1
- package/dist/{chunk-6OSHL7H5.mjs → chunk-LXBPTKYT.mjs} +4 -4
- package/dist/{chunk-6OSHL7H5.mjs.map → chunk-LXBPTKYT.mjs.map} +1 -1
- package/dist/chunk-M2N7NY3V.js +103 -0
- package/dist/chunk-M2N7NY3V.js.map +1 -0
- package/dist/{chunk-36NE4PSS.js → chunk-MQEVQ5YB.js} +3 -3
- package/dist/{chunk-36NE4PSS.js.map → chunk-MQEVQ5YB.js.map} +1 -1
- package/dist/{chunk-DXBSBWSS.js → chunk-MTHMOXZF.js} +6 -6
- package/dist/{chunk-DXBSBWSS.js.map → chunk-MTHMOXZF.js.map} +1 -1
- package/dist/{chunk-BDSNEB3O.mjs → chunk-NRT7MOEO.mjs} +4 -4
- package/dist/{chunk-BDSNEB3O.mjs.map → chunk-NRT7MOEO.mjs.map} +1 -1
- package/dist/chunk-NYXENHD2.mjs +96 -0
- package/dist/chunk-NYXENHD2.mjs.map +1 -0
- package/dist/chunk-OI3FCJSP.js +8 -0
- package/dist/{chunk-OXA4ZSX2.js.map → chunk-OI3FCJSP.js.map} +1 -1
- package/dist/{chunk-F6BYWNHU.mjs → chunk-OUP6UL74.mjs} +3 -3
- package/dist/{chunk-F6BYWNHU.mjs.map → chunk-OUP6UL74.mjs.map} +1 -1
- package/dist/{chunk-OQWAJBYA.mjs → chunk-OWEJXMKY.mjs} +3 -3
- package/dist/{chunk-OQWAJBYA.mjs.map → chunk-OWEJXMKY.mjs.map} +1 -1
- package/dist/{chunk-XKJLJLQ4.js → chunk-OZTVJSFX.js} +107 -49
- package/dist/chunk-OZTVJSFX.js.map +1 -0
- package/dist/{chunk-QF3XTEXV.js → chunk-P4J3WG6C.js} +4 -4
- package/dist/{chunk-QF3XTEXV.js.map → chunk-P4J3WG6C.js.map} +1 -1
- package/dist/{chunk-4EJI4IOX.mjs → chunk-PTQHPWEK.mjs} +97 -39
- package/dist/chunk-PTQHPWEK.mjs.map +1 -0
- package/dist/{chunk-OF4V7CSP.mjs → chunk-QSN2QST7.mjs} +3 -3
- package/dist/{chunk-OF4V7CSP.mjs.map → chunk-QSN2QST7.mjs.map} +1 -1
- package/dist/{chunk-NMKUYGKK.mjs → chunk-RGXYE2ZI.mjs} +4 -4
- package/dist/{chunk-NMKUYGKK.mjs.map → chunk-RGXYE2ZI.mjs.map} +1 -1
- package/dist/{chunk-NNZDWY3L.mjs → chunk-RH4XEXTK.mjs} +3 -3
- package/dist/{chunk-NDVKIDMN.js → chunk-RQG7I6O4.js} +4 -4
- package/dist/{chunk-NDVKIDMN.js.map → chunk-RQG7I6O4.js.map} +1 -1
- package/dist/{chunk-VK74LC4H.js → chunk-S6CMQTVZ.js} +5 -5
- package/dist/{chunk-VK74LC4H.js.map → chunk-S6CMQTVZ.js.map} +1 -1
- package/dist/{chunk-5YA6SI4Z.mjs → chunk-TIFVAASU.mjs} +2 -2
- package/dist/{chunk-K4LLYQFZ.js → chunk-VDGCZVUF.js} +14 -14
- package/dist/{chunk-K4LLYQFZ.js.map → chunk-VDGCZVUF.js.map} +1 -1
- package/dist/{chunk-I4RU3RCS.js → chunk-XCOMBHLF.js} +8 -8
- package/dist/{chunk-I4RU3RCS.js.map → chunk-XCOMBHLF.js.map} +1 -1
- package/dist/{chunk-I7AZC5ZQ.js → chunk-XXSSUCJB.js} +2 -2
- package/dist/{chunk-ZQSJK65K.mjs → chunk-YEHC7VMW.mjs} +3 -3
- package/dist/{chunk-ZQSJK65K.mjs.map → chunk-YEHC7VMW.mjs.map} +1 -1
- package/dist/{chunk-KKTSAT7I.mjs → chunk-YK7SEUFJ.mjs} +4 -4
- package/dist/{chunk-KKTSAT7I.mjs.map → chunk-YK7SEUFJ.mjs.map} +1 -1
- package/dist/{chunk-NN2YE5WT.js → chunk-ZUQSVCMD.js} +3 -3
- package/dist/cli/index.js +211 -211
- package/dist/cli/index.mjs +151 -151
- 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 +21 -7
- package/dist/cta-bar/CtaBar.d.ts.map +1 -1
- package/dist/cta-bar/index.js +9 -12
- package/dist/cta-bar/index.js.map +1 -1
- package/dist/cta-bar/index.mjs +9 -12
- package/dist/cta-bar/index.mjs.map +1 -1
- package/dist/cta-bar/styles.d.ts.map +1 -1
- package/dist/engage/ChatWidget.d.ts.map +1 -1
- package/dist/engage/EchoUiActions.d.ts +5 -2
- package/dist/engage/EchoUiActions.d.ts.map +1 -1
- package/dist/engage/brand-color.d.ts +37 -0
- package/dist/engage/brand-color.d.ts.map +1 -0
- package/dist/engage/index.js +11 -10
- 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 +16 -16
- 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/{lib-6HOOMENJ.js → lib-6GWWPDJR.js} +7 -7
- package/dist/lib-BD4KKQBI.mjs +4 -0
- package/dist/{lib-R7IQ4ZHE.mjs → lib-N5PD6JNJ.mjs} +2 -2
- package/dist/{lib-BGAWCSUH.js → lib-WFB5RLEQ.js} +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/seo/register-sitemap-cli.js +12 -93
- package/dist/seo/register-sitemap-cli.mjs +2 -83
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/shared/color.d.ts +39 -0
- package/dist/shared/color.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/dist/{web-vitals.attribution-7LKLZ5GR.mjs → web-vitals.attribution-CHXXWO72.mjs} +3 -3
- package/dist/web-vitals.attribution-CHXXWO72.mjs.map +1 -0
- package/dist/{web-vitals.attribution-ONVYQNRB.js → web-vitals.attribution-SQVZNHN3.js} +3 -3
- package/dist/web-vitals.attribution-SQVZNHN3.js.map +1 -0
- package/package.json +1 -1
- package/skills/site-kit/SKILL.md +3 -2
- package/dist/ChatWidget-GVNDKGUU.mjs +0 -16
- package/dist/ChatWidget-YL34KOZM.js +0 -25
- package/dist/EngageWidget-465O5XUV.mjs +0 -12
- package/dist/EngageWidget-IQRKRYPG.js +0 -21
- package/dist/ManagedForm-MLPETHSQ.js +0 -25
- package/dist/ManagedForm-P3L34ALG.mjs +0 -16
- package/dist/SitemapSync-P7XWL6VV.js +0 -18
- package/dist/SitemapSync-SIKJCK7N.mjs +0 -9
- package/dist/chunk-4EJI4IOX.mjs.map +0 -1
- package/dist/chunk-ACKFL6WA.mjs +0 -6
- package/dist/chunk-OXA4ZSX2.js +0 -8
- package/dist/chunk-XKJLJLQ4.js.map +0 -1
- package/dist/lib-RSDMEKDQ.mjs +0 -4
- package/dist/web-vitals.attribution-7LKLZ5GR.mjs.map +0 -1
- package/dist/web-vitals.attribution-ONVYQNRB.js.map +0 -1
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkESP5RMB7_js = require('./chunk-ESP5RMB7.js');
|
|
5
5
|
var chunkNBOBOYMT_js = require('./chunk-NBOBOYMT.js');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunk2SLA2LOD_js = require('./chunk-2SLA2LOD.js');
|
|
7
|
+
var chunkM2N7NY3V_js = require('./chunk-M2N7NY3V.js');
|
|
8
|
+
var chunkIWHAJBYL_js = require('./chunk-IWHAJBYL.js');
|
|
8
9
|
var react = require('react');
|
|
9
10
|
var ReactMarkdown = require('react-markdown');
|
|
10
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -13,6 +14,58 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
13
14
|
|
|
14
15
|
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
15
16
|
|
|
17
|
+
// src/engage/brand-color.ts
|
|
18
|
+
var TEXT_CONTRAST = 4.5;
|
|
19
|
+
var RESTING_TINT = 0.082;
|
|
20
|
+
var UNREADABLE_BRAND_SHARE = 40;
|
|
21
|
+
var WHITE = { r: 255, g: 255, b: 255 };
|
|
22
|
+
var BLACK = { r: 0, g: 0, b: 0 };
|
|
23
|
+
function mix(a, b, share) {
|
|
24
|
+
return {
|
|
25
|
+
r: a.r * share + b.r * (1 - share),
|
|
26
|
+
g: a.g * share + b.g * (1 - share),
|
|
27
|
+
b: a.b * share + b.b * (1 - share)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function round({ r, g, b }) {
|
|
31
|
+
const c = (v) => Math.round(Math.min(255, Math.max(0, v)));
|
|
32
|
+
return { r: c(r), g: c(g), b: c(b) };
|
|
33
|
+
}
|
|
34
|
+
function toHex(rgb) {
|
|
35
|
+
const { r, g, b } = round(rgb);
|
|
36
|
+
return `#${[r, g, b].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
37
|
+
}
|
|
38
|
+
function isLightColor(color) {
|
|
39
|
+
const rgb = chunkM2N7NY3V_js.parseColor(color);
|
|
40
|
+
if (!rgb) return false;
|
|
41
|
+
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3 > 160;
|
|
42
|
+
}
|
|
43
|
+
function onBrandColor(brand) {
|
|
44
|
+
return isLightColor(brand) ? "#1a1a1a" : "white";
|
|
45
|
+
}
|
|
46
|
+
function rgbTriplet(color, fallback = "37, 99, 235") {
|
|
47
|
+
const rgb = chunkM2N7NY3V_js.parseColor(color);
|
|
48
|
+
if (!rgb) return fallback;
|
|
49
|
+
const { r, g, b } = round(rgb);
|
|
50
|
+
return `${r}, ${g}, ${b}`;
|
|
51
|
+
}
|
|
52
|
+
function brandTextColor(brand, panelTint) {
|
|
53
|
+
const tint = panelTint && chunkM2N7NY3V_js.parseColor(panelTint) || WHITE;
|
|
54
|
+
const pole = chunkM2N7NY3V_js.relativeLuminance(tint) < chunkM2N7NY3V_js.DARK_LUMINANCE ? WHITE : BLACK;
|
|
55
|
+
const rgb = chunkM2N7NY3V_js.parseColor(brand);
|
|
56
|
+
if (!rgb) return `color-mix(in srgb, ${brand} ${UNREADABLE_BRAND_SHARE}%, ${toHex(pole)})`;
|
|
57
|
+
const surface = chunkM2N7NY3V_js.relativeLuminance(mix(rgb, tint, RESTING_TINT));
|
|
58
|
+
const reads = (c) => chunkM2N7NY3V_js.contrastRatio(chunkM2N7NY3V_js.relativeLuminance(c), surface) >= TEXT_CONTRAST;
|
|
59
|
+
if (reads(rgb)) return brand;
|
|
60
|
+
let lo = 0;
|
|
61
|
+
let hi = 1;
|
|
62
|
+
for (let i = 0; i < 12; i++) {
|
|
63
|
+
const share = (lo + hi) / 2;
|
|
64
|
+
if (reads(round(mix(rgb, pole, share)))) lo = share;
|
|
65
|
+
else hi = share;
|
|
66
|
+
}
|
|
67
|
+
return toHex(mix(rgb, pole, lo));
|
|
68
|
+
}
|
|
16
69
|
function alpha(rgb, a) {
|
|
17
70
|
return `rgba(var(--sk-primary-rgb, ${rgb}), ${a})`;
|
|
18
71
|
}
|
|
@@ -39,7 +92,7 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
|
|
|
39
92
|
submit,
|
|
40
93
|
isSubmitting,
|
|
41
94
|
isComplete
|
|
42
|
-
} =
|
|
95
|
+
} = chunk2SLA2LOD_js.useForm(slug, { initialValues: prefill || {} });
|
|
43
96
|
const cardStyle = {
|
|
44
97
|
marginTop: 8,
|
|
45
98
|
padding: 12,
|
|
@@ -198,7 +251,7 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
|
|
|
198
251
|
borderRadius: 8,
|
|
199
252
|
border: "none",
|
|
200
253
|
backgroundColor: primaryColor,
|
|
201
|
-
color:
|
|
254
|
+
color: onBrandColor(primaryColor),
|
|
202
255
|
fontSize: 13.5,
|
|
203
256
|
fontWeight: 600,
|
|
204
257
|
cursor: isSubmitting ? "default" : "pointer",
|
|
@@ -211,7 +264,7 @@ function InlineManagedForm({ slug, prefill, primaryColor, primaryRgb }) {
|
|
|
211
264
|
}
|
|
212
265
|
);
|
|
213
266
|
}
|
|
214
|
-
function SuggestActionChip({ action, message, primaryColor, primaryRgb, onSuggest }) {
|
|
267
|
+
function SuggestActionChip({ action, message, primaryColor, primaryRgb, brandText, onSuggest }) {
|
|
215
268
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
216
269
|
"button",
|
|
217
270
|
{
|
|
@@ -222,7 +275,7 @@ function SuggestActionChip({ action, message, primaryColor, primaryRgb, onSugges
|
|
|
222
275
|
borderRadius: 16,
|
|
223
276
|
border: `1px solid ${primaryColor}`,
|
|
224
277
|
backgroundColor: alpha(primaryRgb, 0.063),
|
|
225
|
-
color:
|
|
278
|
+
color: brandText,
|
|
226
279
|
fontSize: 13,
|
|
227
280
|
cursor: "pointer"
|
|
228
281
|
},
|
|
@@ -230,7 +283,7 @@ function SuggestActionChip({ action, message, primaryColor, primaryRgb, onSugges
|
|
|
230
283
|
}
|
|
231
284
|
);
|
|
232
285
|
}
|
|
233
|
-
function EchoUiActions({ actions, primaryColor, primaryRgb, onSuggest }) {
|
|
286
|
+
function EchoUiActions({ actions, primaryColor, primaryRgb, brandText, onSuggest }) {
|
|
234
287
|
if (!actions?.length) return null;
|
|
235
288
|
const chips = actions.filter((a) => a?.type === "suggest_action");
|
|
236
289
|
const forms = actions.filter((a) => a?.type === "show_form");
|
|
@@ -262,6 +315,7 @@ function EchoUiActions({ actions, primaryColor, primaryRgb, onSuggest }) {
|
|
|
262
315
|
message: label,
|
|
263
316
|
primaryColor,
|
|
264
317
|
primaryRgb,
|
|
318
|
+
brandText,
|
|
265
319
|
onSuggest
|
|
266
320
|
},
|
|
267
321
|
`chip-${i}`
|
|
@@ -306,21 +360,18 @@ function userRequestedHandoff(text) {
|
|
|
306
360
|
}
|
|
307
361
|
var BUBBLE_BG = "color-mix(in srgb, var(--sk-bg, #ffffff) 94%, transparent)";
|
|
308
362
|
var HAIRLINE = "1px solid color-mix(in srgb, var(--sk-text-primary, #111827) 9%, transparent)";
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const b = num & 255;
|
|
314
|
-
return (r * 299 + g * 587 + b * 114) / 1e3 > 160;
|
|
363
|
+
var ECHO_STYLE_HREF = "sk-echo";
|
|
364
|
+
var ECHO_CSS = `
|
|
365
|
+
@media print {
|
|
366
|
+
[data-sk-echo-launcher], [data-sk-echo-panel] { display: none !important; }
|
|
315
367
|
}
|
|
368
|
+
@media (prefers-reduced-motion: reduce) {
|
|
369
|
+
[data-sk-echo-panel] { animation: none !important; }
|
|
370
|
+
}
|
|
371
|
+
`;
|
|
316
372
|
function staticPrimaryColor(apiFallback, hardDefault) {
|
|
317
373
|
return apiFallback || hardDefault;
|
|
318
374
|
}
|
|
319
|
-
function hexToRgbString(hex, fallback = "37, 99, 235") {
|
|
320
|
-
const match = hex.replace("#", "").match(/^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);
|
|
321
|
-
if (!match) return fallback;
|
|
322
|
-
return `${parseInt(match[1], 16)}, ${parseInt(match[2], 16)}, ${parseInt(match[3], 16)}`;
|
|
323
|
-
}
|
|
324
375
|
function hexAlpha(rgbVar, alpha2, fallbackRgb = "37, 99, 235") {
|
|
325
376
|
return `rgba(var(${rgbVar}, ${fallbackRgb}), ${alpha2})`;
|
|
326
377
|
}
|
|
@@ -373,11 +424,19 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
373
424
|
const primaryFallback = staticPrimaryColor(widgetConfig?.brand_primary || config?.buttonColor, "#2563eb");
|
|
374
425
|
const [primaryFromCssVar, setPrimaryFromCssVar] = react.useState(null);
|
|
375
426
|
const primaryColor = primaryFromCssVar ?? primaryFallback;
|
|
376
|
-
const primaryRgb =
|
|
427
|
+
const primaryRgb = rgbTriplet(primaryColor);
|
|
377
428
|
react.useEffect(() => {
|
|
378
429
|
const cssValue = getComputedStyle(document.documentElement).getPropertyValue("--sk-primary").trim();
|
|
379
430
|
setPrimaryFromCssVar(cssValue || null);
|
|
380
431
|
}, []);
|
|
432
|
+
const onBrand = onBrandColor(primaryColor);
|
|
433
|
+
const panelRef = react.useRef(null);
|
|
434
|
+
const [panelTint, setPanelTint] = react.useState(null);
|
|
435
|
+
react.useLayoutEffect(() => {
|
|
436
|
+
if (!isOpen || !panelRef.current) return;
|
|
437
|
+
setPanelTint(getComputedStyle(panelRef.current).getPropertyValue("--sk-glass-t").trim() || null);
|
|
438
|
+
}, [isOpen]);
|
|
439
|
+
const brandText = brandTextColor(primaryColor, panelTint);
|
|
381
440
|
const businessName = propAssistantName || widgetConfig?.project_name || widgetConfig?.business_info?.name || "Chat with us";
|
|
382
441
|
const logoUrl = propAssistantAvatar || widgetConfig?.logo_url || null;
|
|
383
442
|
const welcomeEnabled = widgetConfig?.welcome_screen_enabled !== false;
|
|
@@ -393,7 +452,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
393
452
|
const { apiKey } = getApiConfig();
|
|
394
453
|
if (!apiKey) return;
|
|
395
454
|
let cancelled = false;
|
|
396
|
-
|
|
455
|
+
chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/api/public/seo/project-info`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((data) => {
|
|
397
456
|
if (cancelled || !data?.valid || !data?.project_id) return;
|
|
398
457
|
setResolvedProjectId(data.project_id);
|
|
399
458
|
}).catch(() => {
|
|
@@ -407,7 +466,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
407
466
|
const apiKey = ensureApiKey();
|
|
408
467
|
if (!apiKey) return;
|
|
409
468
|
try {
|
|
410
|
-
const response = await
|
|
469
|
+
const response = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/config?projectId=${projectId}`, {}, { apiKey, retries: 0 });
|
|
411
470
|
if (response.ok) {
|
|
412
471
|
const { data } = await response.json();
|
|
413
472
|
setWidgetConfig(data ?? null);
|
|
@@ -423,7 +482,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
423
482
|
const apiKey = ensureApiKey();
|
|
424
483
|
if (!apiKey) return null;
|
|
425
484
|
try {
|
|
426
|
-
const response = await
|
|
485
|
+
const response = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/availability?projectId=${projectId}`, {}, { apiKey, retries: 0 });
|
|
427
486
|
if (response.ok) {
|
|
428
487
|
const { data } = await response.json();
|
|
429
488
|
setAvailability(data);
|
|
@@ -440,7 +499,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
440
499
|
const apiKey = ensureApiKey();
|
|
441
500
|
if (!apiKey) return null;
|
|
442
501
|
try {
|
|
443
|
-
const response = await
|
|
502
|
+
const response = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/session`, {
|
|
444
503
|
method: "POST",
|
|
445
504
|
headers: { "Content-Type": "application/json" },
|
|
446
505
|
body: JSON.stringify({
|
|
@@ -501,7 +560,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
501
560
|
pageUrl: typeof window !== "undefined" ? window.location.href : void 0,
|
|
502
561
|
...siteContext ? { siteContext } : {}
|
|
503
562
|
};
|
|
504
|
-
const res = await
|
|
563
|
+
const res = await chunkIWHAJBYL_js.sonorFetch(url, {
|
|
505
564
|
method: "POST",
|
|
506
565
|
headers: {
|
|
507
566
|
"Content-Type": "application/json"
|
|
@@ -612,7 +671,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
612
671
|
if (currentSessionId) {
|
|
613
672
|
const apiKey = ensureApiKey();
|
|
614
673
|
if (apiKey) {
|
|
615
|
-
|
|
674
|
+
chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 }).then((res) => res.ok ? res.json() : null).then((json) => {
|
|
616
675
|
const data = json?.data ?? json;
|
|
617
676
|
if (Array.isArray(data) && data.length) {
|
|
618
677
|
setMessages((prev) => {
|
|
@@ -675,7 +734,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
675
734
|
try {
|
|
676
735
|
const apiKey = ensureApiKey();
|
|
677
736
|
if (!apiKey) return;
|
|
678
|
-
const response = await
|
|
737
|
+
const response = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/messages?sessionId=${currentSessionId}`, {}, { apiKey, retries: 0 });
|
|
679
738
|
if (response.ok) {
|
|
680
739
|
const { data } = await response.json();
|
|
681
740
|
setMessages((prev) => {
|
|
@@ -828,7 +887,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
828
887
|
form.append("file", file);
|
|
829
888
|
form.append("sessionId", sessionId);
|
|
830
889
|
form.append("visitorId", visitorId);
|
|
831
|
-
const res = await
|
|
890
|
+
const res = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/upload`, {
|
|
832
891
|
method: "POST",
|
|
833
892
|
body: form
|
|
834
893
|
}, { apiKey, retries: 0 });
|
|
@@ -975,7 +1034,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
975
1034
|
if (!apiKey) return;
|
|
976
1035
|
setCheckingHandoff(true);
|
|
977
1036
|
try {
|
|
978
|
-
const res = await
|
|
1037
|
+
const res = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/handoff`, {
|
|
979
1038
|
method: "POST",
|
|
980
1039
|
headers: { "Content-Type": "application/json" },
|
|
981
1040
|
body: JSON.stringify({ sessionId })
|
|
@@ -1014,7 +1073,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1014
1073
|
setIsLoading(true);
|
|
1015
1074
|
setOfflineError(null);
|
|
1016
1075
|
try {
|
|
1017
|
-
const response = await
|
|
1076
|
+
const response = await chunkIWHAJBYL_js.sonorFetch(`${baseUrl}/engage/widget/offline-form`, {
|
|
1018
1077
|
method: "POST",
|
|
1019
1078
|
headers: { "Content-Type": "application/json" },
|
|
1020
1079
|
body: JSON.stringify({
|
|
@@ -1063,7 +1122,6 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1063
1122
|
if (availability && availability.agentsOnline > 0) return { dot: "#22c55e", text: "Online" };
|
|
1064
1123
|
return { dot: "var(--sk-text-tertiary, #9ca3af)", text: "We'll respond soon" };
|
|
1065
1124
|
})();
|
|
1066
|
-
const launcherIcon = isLightColor(primaryColor) ? "#1a1a1a" : "white";
|
|
1067
1125
|
const ChatButton = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1068
1126
|
"button",
|
|
1069
1127
|
{
|
|
@@ -1092,10 +1150,10 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1092
1150
|
onMouseLeave: (e) => {
|
|
1093
1151
|
e.currentTarget.style.transform = "scale(1)";
|
|
1094
1152
|
},
|
|
1095
|
-
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1153
|
+
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: onBrand, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1096
1154
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1097
1155
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1098
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1156
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: onBrand, 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" }) })
|
|
1099
1157
|
}
|
|
1100
1158
|
);
|
|
1101
1159
|
const Header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1119,7 +1177,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1119
1177
|
height: 40,
|
|
1120
1178
|
borderRadius: "50%",
|
|
1121
1179
|
backgroundColor: primaryColor,
|
|
1122
|
-
color:
|
|
1180
|
+
color: onBrand,
|
|
1123
1181
|
boxShadow: "inset 0 1px 0 color-mix(in srgb, #ffffff 30%, transparent), 0 2px 6px rgba(0, 0, 0, 0.12)",
|
|
1124
1182
|
display: "flex",
|
|
1125
1183
|
alignItems: "center",
|
|
@@ -1156,7 +1214,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1156
1214
|
borderRadius: 12,
|
|
1157
1215
|
border: `1px solid ${hexAlpha("--sk-primary-rgb", 0.2, primaryRgb)}`,
|
|
1158
1216
|
backgroundColor: hexAlpha("--sk-primary-rgb", 0.031, primaryRgb),
|
|
1159
|
-
color:
|
|
1217
|
+
color: brandText,
|
|
1160
1218
|
fontSize: 14,
|
|
1161
1219
|
cursor: "pointer",
|
|
1162
1220
|
textAlign: "left",
|
|
@@ -1185,7 +1243,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1185
1243
|
borderRadius: 12,
|
|
1186
1244
|
border: "none",
|
|
1187
1245
|
backgroundColor: primaryColor,
|
|
1188
|
-
color:
|
|
1246
|
+
color: onBrand,
|
|
1189
1247
|
fontSize: 14,
|
|
1190
1248
|
fontWeight: 600,
|
|
1191
1249
|
cursor: "pointer",
|
|
@@ -1197,11 +1255,11 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1197
1255
|
widgetConfig?.business_info?.phone && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "center", fontSize: 13, color: "var(--sk-text-secondary, #6b7280)" }, children: [
|
|
1198
1256
|
"Or call us at",
|
|
1199
1257
|
" ",
|
|
1200
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { href: `tel:${widgetConfig.business_info.phone}`, style: { color:
|
|
1258
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: `tel:${widgetConfig.business_info.phone}`, style: { color: brandText, textDecoration: "none", fontWeight: 500 }, children: widgetConfig.business_info.phone })
|
|
1201
1259
|
] })
|
|
1202
1260
|
] });
|
|
1203
1261
|
const OfflineFormView = /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 20, flex: 1, overflowY: "auto" }, children: offlineSubmitted ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "center", padding: 20 }, children: [
|
|
1204
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: 56, height: 56, borderRadius: "50%", backgroundColor: hexAlpha("--sk-primary-rgb", 0.082, primaryRgb), display: "flex", alignItems: "center", justifyContent: "center", margin: "0 auto 16px" }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1262
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: 56, height: 56, borderRadius: "50%", backgroundColor: hexAlpha("--sk-primary-rgb", 0.082, primaryRgb), display: "flex", alignItems: "center", justifyContent: "center", margin: "0 auto 16px" }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: brandText, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }) }),
|
|
1205
1263
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { style: { margin: "0 0 8px", fontSize: 18, fontWeight: 600, color: "var(--sk-text-primary, #111827)" }, children: "Message Sent!" }),
|
|
1206
1264
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, color: "var(--sk-text-secondary, #6b7280)", fontSize: 14 }, children: offlineSubheading })
|
|
1207
1265
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleOfflineSubmit, children: [
|
|
@@ -1248,7 +1306,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1248
1306
|
borderRadius: 8,
|
|
1249
1307
|
border: "none",
|
|
1250
1308
|
backgroundColor: primaryColor,
|
|
1251
|
-
color:
|
|
1309
|
+
color: onBrand,
|
|
1252
1310
|
fontSize: 14,
|
|
1253
1311
|
fontWeight: 600,
|
|
1254
1312
|
cursor: isLoading ? "wait" : "pointer",
|
|
@@ -1296,7 +1354,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1296
1354
|
alignItems: "center",
|
|
1297
1355
|
justifyContent: "center"
|
|
1298
1356
|
},
|
|
1299
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
1357
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: onBrand, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1300
1358
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
1301
1359
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8.5", cy: "7", r: "4" }),
|
|
1302
1360
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "20", y1: "8", x2: "20", y2: "14" }),
|
|
@@ -1345,7 +1403,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1345
1403
|
// Bubbles on glass stay near-opaque: the glass behind them
|
|
1346
1404
|
// is for depth, never for the text to read against.
|
|
1347
1405
|
backgroundColor: message.role === "user" ? primaryColor : message.role === "system" ? "color-mix(in srgb, var(--sk-text-primary, #111827) 7%, transparent)" : BUBBLE_BG,
|
|
1348
|
-
color: message.role === "user" ?
|
|
1406
|
+
color: message.role === "user" ? onBrand : message.role === "system" ? "var(--sk-text-secondary, #6b7280)" : "var(--sk-text-primary, #111827)",
|
|
1349
1407
|
border: message.role === "user" || message.role === "system" ? "none" : HAIRLINE,
|
|
1350
1408
|
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)",
|
|
1351
1409
|
fontSize: message.role === "system" ? 13 : 14,
|
|
@@ -1381,7 +1439,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1381
1439
|
padding: "8px 14px",
|
|
1382
1440
|
borderRadius: 8,
|
|
1383
1441
|
backgroundColor: hexAlpha("--sk-primary-rgb", 0.082, primaryRgb),
|
|
1384
|
-
color:
|
|
1442
|
+
color: brandText,
|
|
1385
1443
|
fontWeight: 600,
|
|
1386
1444
|
fontSize: 13,
|
|
1387
1445
|
textDecoration: "none",
|
|
@@ -1427,7 +1485,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1427
1485
|
borderRadius: 16,
|
|
1428
1486
|
border: `1px solid ${primaryColor}`,
|
|
1429
1487
|
backgroundColor: hexAlpha("--sk-primary-rgb", 0.063, primaryRgb),
|
|
1430
|
-
color:
|
|
1488
|
+
color: brandText,
|
|
1431
1489
|
fontSize: 13,
|
|
1432
1490
|
cursor: "pointer"
|
|
1433
1491
|
},
|
|
@@ -1441,6 +1499,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1441
1499
|
actions: message.uiActions,
|
|
1442
1500
|
primaryColor,
|
|
1443
1501
|
primaryRgb,
|
|
1502
|
+
brandText,
|
|
1444
1503
|
onSuggest: handleSuggestAction
|
|
1445
1504
|
}
|
|
1446
1505
|
) : null,
|
|
@@ -1464,7 +1523,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1464
1523
|
borderRadius: 6,
|
|
1465
1524
|
border: `1px solid ${primaryColor}`,
|
|
1466
1525
|
backgroundColor: "transparent",
|
|
1467
|
-
color:
|
|
1526
|
+
color: brandText,
|
|
1468
1527
|
fontSize: 13,
|
|
1469
1528
|
cursor: "pointer"
|
|
1470
1529
|
},
|
|
@@ -1546,7 +1605,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1546
1605
|
borderRadius: "50%",
|
|
1547
1606
|
border: "none",
|
|
1548
1607
|
backgroundColor: (inputValue.trim() || pendingFiles.length) && !isLoading ? primaryColor : "var(--sk-border, #e5e7eb)",
|
|
1549
|
-
color: (inputValue.trim() || pendingFiles.length) && !isLoading
|
|
1608
|
+
color: (inputValue.trim() || pendingFiles.length) && !isLoading ? onBrand : "white",
|
|
1550
1609
|
cursor: inputValue.trim() && !isLoading ? "pointer" : "not-allowed",
|
|
1551
1610
|
display: "flex",
|
|
1552
1611
|
alignItems: "center",
|
|
@@ -1562,6 +1621,7 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1562
1621
|
const ChatPopup = isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1563
1622
|
"div",
|
|
1564
1623
|
{
|
|
1624
|
+
ref: panelRef,
|
|
1565
1625
|
"data-sk-echo-panel": true,
|
|
1566
1626
|
className: "sk-glass sk-glass--panel",
|
|
1567
1627
|
style: {
|
|
@@ -1592,9 +1652,6 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1592
1652
|
from { opacity: 0; transform: translateY(12px) scale(0.94); }
|
|
1593
1653
|
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
1594
1654
|
}
|
|
1595
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1596
|
-
[data-sk-echo-panel] { animation: none !important; }
|
|
1597
|
-
}
|
|
1598
1655
|
@keyframes chatDot {
|
|
1599
1656
|
0%, 80%, 100% { opacity: 0.3; }
|
|
1600
1657
|
40% { opacity: 1; }
|
|
@@ -1621,11 +1678,12 @@ function ChatWidget({ projectId: propProjectId, config, apiUrl: propApiUrl, sign
|
|
|
1621
1678
|
);
|
|
1622
1679
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1623
1680
|
/* @__PURE__ */ jsxRuntime.jsx(chunkNBOBOYMT_js.GlassStyles, {}),
|
|
1681
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { href: ECHO_STYLE_HREF, precedence: "default", children: ECHO_CSS }),
|
|
1624
1682
|
ChatPopup,
|
|
1625
1683
|
ChatButton
|
|
1626
1684
|
] });
|
|
1627
1685
|
}
|
|
1628
1686
|
|
|
1629
1687
|
exports.ChatWidget = ChatWidget;
|
|
1630
|
-
//# sourceMappingURL=chunk-
|
|
1631
|
-
//# sourceMappingURL=chunk-
|
|
1688
|
+
//# sourceMappingURL=chunk-OZTVJSFX.js.map
|
|
1689
|
+
//# sourceMappingURL=chunk-OZTVJSFX.js.map
|