@sonordev/site-kit 3.4.0 → 3.5.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 +2 -2
- package/agent-manifest.json +1 -1
- package/dist/AnalyticsProvider-35EDQA5V.js +31 -0
- package/dist/{AnalyticsProvider-ARAWVJPX.js.map → AnalyticsProvider-35EDQA5V.js.map} +1 -1
- package/dist/AnalyticsProvider-V5CWTWWO.mjs +10 -0
- package/dist/{AnalyticsProvider-HIGSPNRA.mjs.map → AnalyticsProvider-V5CWTWWO.mjs.map} +1 -1
- package/dist/ChatWidget-2OK6DD66.js +19 -0
- package/dist/{ChatWidget-BDES6WUR.js.map → ChatWidget-2OK6DD66.js.map} +1 -1
- package/dist/ChatWidget-WNT6VNJK.mjs +10 -0
- package/dist/{ChatWidget-47KAOFLG.mjs.map → ChatWidget-WNT6VNJK.mjs.map} +1 -1
- package/dist/EngageWidget-7RZIC426.js +18 -0
- package/dist/{EngageWidget-X3NIWGMZ.js.map → EngageWidget-7RZIC426.js.map} +1 -1
- package/dist/EngageWidget-GWME22IP.mjs +9 -0
- package/dist/{EngageWidget-HPZAI6SU.mjs.map → EngageWidget-GWME22IP.mjs.map} +1 -1
- package/dist/{SignalCore-K2CTZ52G.js → SignalCore-DK4HQBPY.js} +11 -10
- package/dist/SignalCore-DK4HQBPY.js.map +1 -0
- package/dist/{SignalCore-XABEH2GA.mjs → SignalCore-TW4YA3BW.mjs} +5 -4
- package/dist/SignalCore-TW4YA3BW.mjs.map +1 -0
- package/dist/SitemapSync-7PXQMF5A.mjs +8 -0
- package/dist/{SitemapSync-OQPRGBG3.mjs.map → SitemapSync-7PXQMF5A.mjs.map} +1 -1
- package/dist/SitemapSync-O3J2DPV7.js +17 -0
- package/dist/{SitemapSync-4BALOI4B.js.map → SitemapSync-O3J2DPV7.js.map} +1 -1
- package/dist/analytics/index.js +12 -11
- package/dist/analytics/index.mjs +5 -4
- package/dist/blog/index.d.mts +3 -3
- package/dist/blog/index.d.ts +3 -3
- package/dist/blog/index.js +11 -15
- package/dist/blog/index.js.map +1 -1
- package/dist/blog/index.mjs +2 -2
- package/dist/blog/index.mjs.map +1 -1
- package/dist/blog/server-ui.d.mts +1 -1
- package/dist/blog/server-ui.d.ts +1 -1
- package/dist/blog/server-ui.js +198 -9
- package/dist/blog/server-ui.js.map +1 -1
- package/dist/blog/server-ui.mjs +198 -2
- package/dist/blog/server-ui.mjs.map +1 -1
- package/dist/blog/server.d.mts +27 -8
- package/dist/blog/server.d.ts +27 -8
- package/dist/blog/server.js +45 -43
- package/dist/blog/server.mjs +3 -1
- package/dist/{chunk-PYA4BR2N.mjs → chunk-2NA5CAK5.mjs} +3 -3
- package/dist/{chunk-PYA4BR2N.mjs.map → chunk-2NA5CAK5.mjs.map} +1 -1
- package/dist/{chunk-WN5A3KSY.mjs → chunk-34IUDOBC.mjs} +2 -2
- package/dist/{chunk-WN5A3KSY.mjs.map → chunk-34IUDOBC.mjs.map} +1 -1
- package/dist/{chunk-6Q72JAL2.js → chunk-3KEZ2YHQ.js} +6 -6
- package/dist/{chunk-6Q72JAL2.js.map → chunk-3KEZ2YHQ.js.map} +1 -1
- package/dist/{chunk-WVAY4ZWC.mjs → chunk-5WQHWBCW.mjs} +10 -29
- package/dist/chunk-5WQHWBCW.mjs.map +1 -0
- package/dist/{chunk-QE53WRXW.mjs → chunk-6JVDIW5L.mjs} +4 -4
- package/dist/{chunk-QE53WRXW.mjs.map → chunk-6JVDIW5L.mjs.map} +1 -1
- package/dist/{chunk-7TX5BKVA.js → chunk-6T4NVCAT.js} +2 -2
- package/dist/{chunk-7TX5BKVA.js.map → chunk-6T4NVCAT.js.map} +1 -1
- package/dist/{chunk-VE5XLADP.mjs → chunk-7FZWMAI2.mjs} +3 -3
- package/dist/{chunk-VE5XLADP.mjs.map → chunk-7FZWMAI2.mjs.map} +1 -1
- package/dist/chunk-BNJH2RFU.mjs +139 -0
- package/dist/chunk-BNJH2RFU.mjs.map +1 -0
- package/dist/{chunk-WZHWWOUC.js → chunk-BX6FFL2Y.js} +6 -16
- package/dist/chunk-BX6FFL2Y.js.map +1 -0
- package/dist/chunk-CGCYZJYX.mjs +41 -0
- package/dist/chunk-CGCYZJYX.mjs.map +1 -0
- package/dist/{chunk-5SJKYZID.js → chunk-CTPE3G5W.js} +5 -5
- package/dist/{chunk-5SJKYZID.js.map → chunk-CTPE3G5W.js.map} +1 -1
- package/dist/chunk-CXDIWBIQ.js +78 -0
- package/dist/chunk-CXDIWBIQ.js.map +1 -0
- package/dist/chunk-DWVF7SEK.mjs +35 -0
- package/dist/chunk-DWVF7SEK.mjs.map +1 -0
- package/dist/{chunk-MCDQM75H.js → chunk-EH7QQU6P.js} +15 -15
- package/dist/{chunk-MCDQM75H.js.map → chunk-EH7QQU6P.js.map} +1 -1
- package/dist/{chunk-X4OPM3SK.mjs → chunk-GU5OTUQS.mjs} +5 -14
- package/dist/chunk-GU5OTUQS.mjs.map +1 -0
- package/dist/{chunk-SH4VZDVX.mjs → chunk-GUXB3QH7.mjs} +38 -67
- package/dist/chunk-GUXB3QH7.mjs.map +1 -0
- package/dist/{chunk-JRUNONG5.mjs → chunk-HRJ65XKY.mjs} +3 -3
- package/dist/{chunk-JRUNONG5.mjs.map → chunk-HRJ65XKY.mjs.map} +1 -1
- package/dist/{chunk-7UYUVHCR.js → chunk-IMDSDDRU.js} +4 -4
- package/dist/{chunk-7UYUVHCR.js.map → chunk-IMDSDDRU.js.map} +1 -1
- package/dist/{chunk-LQHZFUZJ.mjs → chunk-INGAARGC.mjs} +3 -3
- package/dist/{chunk-LQHZFUZJ.mjs.map → chunk-INGAARGC.mjs.map} +1 -1
- package/dist/{chunk-G3G4HQT3.mjs → chunk-LZSHZVBE.mjs} +3 -3
- package/dist/{chunk-G3G4HQT3.mjs.map → chunk-LZSHZVBE.mjs.map} +1 -1
- package/dist/chunk-MJDYY6S3.mjs +76 -0
- package/dist/chunk-MJDYY6S3.mjs.map +1 -0
- package/dist/{chunk-BMKZHXWQ.js → chunk-MMON6EVI.js} +3 -194
- package/dist/chunk-MMON6EVI.js.map +1 -0
- package/dist/chunk-NB4MK2Q5.js +18 -0
- package/dist/chunk-NB4MK2Q5.js.map +1 -0
- package/dist/{chunk-O4RVFKQW.mjs → chunk-NBI5AV6U.mjs} +3 -3
- package/dist/{chunk-O4RVFKQW.mjs.map → chunk-NBI5AV6U.mjs.map} +1 -1
- package/dist/chunk-NI7OY4FW.mjs +16 -0
- package/dist/chunk-NI7OY4FW.mjs.map +1 -0
- package/dist/chunk-NME3SQCB.js +8 -0
- package/dist/{chunk-CDETOO5W.js.map → chunk-NME3SQCB.js.map} +1 -1
- package/dist/{chunk-56X3IUOL.js → chunk-PE2A3ON5.js} +12 -31
- package/dist/chunk-PE2A3ON5.js.map +1 -0
- package/dist/{chunk-O7B7IEXY.js → chunk-PWIBFSXK.js} +14 -14
- package/dist/{chunk-O7B7IEXY.js.map → chunk-PWIBFSXK.js.map} +1 -1
- package/dist/{chunk-HV7IYMXK.js → chunk-Q2SPOBHU.js} +13 -13
- package/dist/{chunk-HV7IYMXK.js.map → chunk-Q2SPOBHU.js.map} +1 -1
- package/dist/chunk-QGPYFC6G.mjs +6 -0
- package/dist/{chunk-YCQHE2XT.mjs.map → chunk-QGPYFC6G.mjs.map} +1 -1
- package/dist/{chunk-C37DFD5F.js → chunk-SQGDDITI.js} +14 -14
- package/dist/{chunk-C37DFD5F.js.map → chunk-SQGDDITI.js.map} +1 -1
- package/dist/{chunk-3SIIYHVE.mjs → chunk-STTSIODQ.mjs} +4 -4
- package/dist/{chunk-3SIIYHVE.mjs.map → chunk-STTSIODQ.mjs.map} +1 -1
- package/dist/{chunk-RMUOY6XB.js → chunk-T3RPPS25.js} +7 -7
- package/dist/{chunk-RMUOY6XB.js.map → chunk-T3RPPS25.js.map} +1 -1
- package/dist/{chunk-7523LJ52.js → chunk-TBMFLLRV.js} +9 -9
- package/dist/{chunk-7523LJ52.js.map → chunk-TBMFLLRV.js.map} +1 -1
- package/dist/{chunk-IB34IYMN.js → chunk-TJS6FPR7.js} +9 -9
- package/dist/{chunk-IB34IYMN.js.map → chunk-TJS6FPR7.js.map} +1 -1
- package/dist/chunk-TPL2IHFI.js +43 -0
- package/dist/chunk-TPL2IHFI.js.map +1 -0
- package/dist/chunk-TRTT4PND.js +38 -0
- package/dist/chunk-TRTT4PND.js.map +1 -0
- package/dist/{chunk-VNQFKBKF.mjs → chunk-UFOOVODL.mjs} +3 -3
- package/dist/{chunk-VNQFKBKF.mjs.map → chunk-UFOOVODL.mjs.map} +1 -1
- package/dist/chunk-UXEB6UAR.js +147 -0
- package/dist/chunk-UXEB6UAR.js.map +1 -0
- package/dist/{chunk-IURQA3H5.mjs → chunk-V37Z65NF.mjs} +3 -3
- package/dist/{chunk-IURQA3H5.mjs.map → chunk-V37Z65NF.mjs.map} +1 -1
- package/dist/chunk-VX3WK77I.mjs +126 -0
- package/dist/chunk-VX3WK77I.mjs.map +1 -0
- package/dist/{chunk-AB2VYIYU.mjs → chunk-WTR7QJ32.mjs} +4 -194
- package/dist/chunk-WTR7QJ32.mjs.map +1 -0
- package/dist/{chunk-IB4FRJDV.js → chunk-XAWB2HFQ.js} +37 -67
- package/dist/chunk-XAWB2HFQ.js.map +1 -0
- package/dist/chunk-XY4NJJEX.js +129 -0
- package/dist/chunk-XY4NJJEX.js.map +1 -0
- package/dist/{chunk-MJV6RC7I.js → chunk-Y4U3OCKH.js} +3 -3
- package/dist/{chunk-MJV6RC7I.js.map → chunk-Y4U3OCKH.js.map} +1 -1
- package/dist/{chunk-5WEADCND.mjs → chunk-YKPAFEJ4.mjs} +4 -4
- package/dist/{chunk-5WEADCND.mjs.map → chunk-YKPAFEJ4.mjs.map} +1 -1
- package/dist/{chunk-472FTEPP.mjs → chunk-YSDJ7HI3.mjs} +4 -4
- package/dist/{chunk-472FTEPP.mjs.map → chunk-YSDJ7HI3.mjs.map} +1 -1
- package/dist/{chunk-E4VA4FYW.js → chunk-ZY3G7JGT.js} +8 -8
- package/dist/{chunk-E4VA4FYW.js.map → chunk-ZY3G7JGT.js.map} +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.mjs +1 -1
- package/dist/client/index.d.mts +15 -1
- package/dist/client/index.d.ts +15 -1
- package/dist/client/index.js +15 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +17 -0
- package/dist/client/index.mjs.map +1 -1
- package/dist/commerce/index.js +51 -50
- package/dist/commerce/index.mjs +6 -5
- package/dist/engage/index.js +9 -8
- package/dist/engage/index.js.map +1 -1
- package/dist/engage/index.mjs +6 -5
- package/dist/engage/index.mjs.map +1 -1
- package/dist/fleet/index.js +8 -7
- package/dist/fleet/index.mjs +4 -3
- package/dist/forms/index.js +13 -12
- package/dist/forms/index.js.map +1 -1
- package/dist/forms/index.mjs +5 -4
- package/dist/forms/index.mjs.map +1 -1
- package/dist/images/index.js +11 -10
- package/dist/images/index.mjs +4 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +64 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -9
- package/dist/index.mjs.map +1 -1
- package/dist/layout/client.js +9 -7
- package/dist/layout/client.mjs +8 -6
- package/dist/layout/index.js +11 -53
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +9 -51
- package/dist/layout/index.mjs.map +1 -1
- package/dist/llms/index.js +12 -12
- package/dist/llms/index.mjs +2 -2
- package/dist/maps/index.js +5 -4
- package/dist/maps/index.js.map +1 -1
- package/dist/maps/index.mjs +3 -2
- package/dist/maps/index.mjs.map +1 -1
- package/dist/seo/client.js +5 -4
- package/dist/seo/client.mjs +4 -3
- package/dist/seo/index.js +5 -4
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +4 -3
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-pages/contract.js +6 -5
- package/dist/seo-pages/contract.js.map +1 -1
- package/dist/seo-pages/contract.mjs +2 -1
- package/dist/seo-pages/contract.mjs.map +1 -1
- package/dist/server/index.d.mts +34 -1
- package/dist/server/index.d.ts +34 -1
- package/dist/server/index.js +6 -0
- package/dist/server/index.mjs +2 -0
- package/dist/signal/index.js +11 -11
- package/dist/signal/index.mjs +2 -2
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.mjs +1 -1
- package/dist/sites/contract.d.mts +36 -12
- package/dist/sites/contract.d.ts +36 -12
- package/dist/sites/contract.js +12 -11
- package/dist/sites/contract.mjs +2 -1
- package/dist/sync/index.js +16 -15
- package/dist/sync/index.mjs +4 -3
- package/dist/{types-DYOumpUT.d.mts → types-8IcjVMDa.d.mts} +1 -1
- package/dist/{types-DYOumpUT.d.ts → types-8IcjVMDa.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/AnalyticsProvider-ARAWVJPX.js +0 -30
- package/dist/AnalyticsProvider-HIGSPNRA.mjs +0 -9
- package/dist/ChatWidget-47KAOFLG.mjs +0 -9
- package/dist/ChatWidget-BDES6WUR.js +0 -18
- package/dist/EngageWidget-HPZAI6SU.mjs +0 -8
- package/dist/EngageWidget-X3NIWGMZ.js +0 -17
- package/dist/SignalCore-K2CTZ52G.js.map +0 -1
- package/dist/SignalCore-XABEH2GA.mjs.map +0 -1
- package/dist/SitemapSync-4BALOI4B.js +0 -16
- package/dist/SitemapSync-OQPRGBG3.mjs +0 -7
- package/dist/chunk-56X3IUOL.js.map +0 -1
- package/dist/chunk-AB2VYIYU.mjs.map +0 -1
- package/dist/chunk-BMKZHXWQ.js.map +0 -1
- package/dist/chunk-CDETOO5W.js +0 -8
- package/dist/chunk-IB4FRJDV.js.map +0 -1
- package/dist/chunk-SH4VZDVX.mjs.map +0 -1
- package/dist/chunk-WS4GNH3F.mjs +0 -259
- package/dist/chunk-WS4GNH3F.mjs.map +0 -1
- package/dist/chunk-WVAY4ZWC.mjs.map +0 -1
- package/dist/chunk-WZHWWOUC.js.map +0 -1
- package/dist/chunk-X4OPM3SK.mjs.map +0 -1
- package/dist/chunk-XKV73RDH.js +0 -266
- package/dist/chunk-XKV73RDH.js.map +0 -1
- package/dist/chunk-YCQHE2XT.mjs +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkY4U3OCKH_js = require('./chunk-Y4U3OCKH.js');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
|
|
@@ -16,8 +16,8 @@ function SignalExperiment({
|
|
|
16
16
|
trackImpression = true,
|
|
17
17
|
children
|
|
18
18
|
}) {
|
|
19
|
-
const { assignment, variant, isControl } =
|
|
20
|
-
const trackEvent =
|
|
19
|
+
const { assignment, variant, isControl } = chunkY4U3OCKH_js.useSignalExperiment(experimentId);
|
|
20
|
+
const trackEvent = chunkY4U3OCKH_js.useSignalEvent();
|
|
21
21
|
React.useEffect(() => {
|
|
22
22
|
if (trackImpression && variant) {
|
|
23
23
|
trackEvent({
|
|
@@ -44,7 +44,7 @@ function SignalExperiment({
|
|
|
44
44
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: variants.control || null });
|
|
45
45
|
}
|
|
46
46
|
function useExperimentVariant(experimentId) {
|
|
47
|
-
return
|
|
47
|
+
return chunkY4U3OCKH_js.useSignalExperiment(experimentId);
|
|
48
48
|
}
|
|
49
49
|
function ExperimentConversion({
|
|
50
50
|
experimentId,
|
|
@@ -52,8 +52,8 @@ function ExperimentConversion({
|
|
|
52
52
|
value,
|
|
53
53
|
children
|
|
54
54
|
}) {
|
|
55
|
-
const trackEvent =
|
|
56
|
-
const { variant } =
|
|
55
|
+
const trackEvent = chunkY4U3OCKH_js.useSignalEvent();
|
|
56
|
+
const { variant } = chunkY4U3OCKH_js.useSignalExperiment(experimentId);
|
|
57
57
|
const handleInteraction = () => {
|
|
58
58
|
trackEvent({
|
|
59
59
|
event_type: "experiment",
|
|
@@ -79,5 +79,5 @@ function ExperimentConversion({
|
|
|
79
79
|
exports.ExperimentConversion = ExperimentConversion;
|
|
80
80
|
exports.SignalExperiment = SignalExperiment;
|
|
81
81
|
exports.useExperimentVariant = useExperimentVariant;
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-ZY3G7JGT.js.map
|
|
83
|
+
//# sourceMappingURL=chunk-ZY3G7JGT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/signal/SignalExperiment.tsx"],"names":["useSignalExperiment","useSignalEvent","useEffect","jsx","Fragment","React"],"mappings":";;;;;;;;;;AAgDO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,YAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA,GAAkB,IAAA;AAAA,EAClB;AACF,CAAA,EAA0B;AACxB,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAS,SAAA,EAAU,GAAIA,qCAAoB,YAAY,CAAA;AAC3E,EAAA,MAAM,aAAaC,+BAAA,EAAe;AAGlC,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,mBAAmB,OAAA,EAAS;AAC9B,MAAA,UAAA,CAAW;AAAA,QACT,UAAA,EAAY,YAAA;AAAA,QACZ,UAAA,EAAY,YAAA;AAAA,QACZ,UAAA,EAAY;AAAA,UACV,aAAA,EAAe,YAAA;AAAA,UACf,WAAA,EAAa;AAAA;AACf,OACD,CAAA;AAAA,IACH;AAAA,EACF,GAAG,CAAC,YAAA,EAAc,OAAA,EAAS,eAAA,EAAiB,UAAU,CAAC,CAAA;AAGvD,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,uBAAOC,cAAA,CAAAC,mBAAA,EAAA,EAAG,mBAAS,EAAE,OAAA,EAAS,WAAW,SAAA,EAAW,SAAA,EAAW,CAAA,EAAE,CAAA;AAAA,EACnE;AAGA,EAAA,MAAM,kBAAkB,OAAA,IAAW,SAAA;AACnC,EAAA,MAAM,OAAA,GAAU,SAAS,eAAe,CAAA;AAExC,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,6DAAU,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,EACpB;AAGA,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,6DAAU,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,EACrB;AAEA,EAAA,uBAAOD,cAAA,CAAAC,mBAAA,EAAA,EAAG,QAAA,EAAA,QAAA,CAAS,OAAA,IAAW,IAAA,EAAK,CAAA;AACrC;AAYO,SAAS,qBAAqB,YAAA,EAAsB;AACzD,EAAA,OAAOJ,qCAAoB,YAAY,CAAA;AACzC;AAoBO,SAAS,oBAAA,CAAqB;AAAA,EACnC,YAAA;AAAA,EACA,WAAA,GAAc,OAAA;AAAA,EACd,KAAA;AAAA,EACA;AACF,CAAA,EAKG;AACD,EAAA,MAAM,aAAaC,+BAAA,EAAe;AAClC,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAID,oCAAA,CAAoB,YAAY,CAAA;AAEpD,EAAA,MAAM,oBAAoB,MAAM;AAC9B,IAAA,UAAA,CAAW;AAAA,MACT,UAAA,EAAY,YAAA;AAAA,MACZ,UAAA,EAAY,YAAA;AAAA,MACZ,UAAA,EAAY;AAAA,QACV,aAAA,EAAe,YAAA;AAAA,QACf,WAAA,EAAa,OAAA;AAAA,QACb,YAAA,EAAc,WAAA;AAAA,QACd;AAAA;AACF,KACD,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,OAAOK,sBAAA,CAAM,aAAa,QAAA,EAAU;AAAA,IAClC,OAAA,EAAS,CAAC,CAAA,KAAwB;AAChC,MAAA,iBAAA,EAAkB;AAElB,MAAA,IAAK,QAAA,CAAS,MAAsD,OAAA,EAAS;AAC3E,QAAC,QAAA,CAAS,KAAA,CAAsD,OAAA,CAAS,CAAC,CAAA;AAAA,MAC5E;AAAA,IACF;AAAA,GACD,CAAA;AACH","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/signal/SignalExperiment.tsx"],"names":["useSignalExperiment","useSignalEvent","useEffect","jsx","Fragment","React"],"mappings":";;;;;;;;;;AAgDO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,YAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA,GAAkB,IAAA;AAAA,EAClB;AACF,CAAA,EAA0B;AACxB,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAS,SAAA,EAAU,GAAIA,qCAAoB,YAAY,CAAA;AAC3E,EAAA,MAAM,aAAaC,+BAAA,EAAe;AAGlC,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,mBAAmB,OAAA,EAAS;AAC9B,MAAA,UAAA,CAAW;AAAA,QACT,UAAA,EAAY,YAAA;AAAA,QACZ,UAAA,EAAY,YAAA;AAAA,QACZ,UAAA,EAAY;AAAA,UACV,aAAA,EAAe,YAAA;AAAA,UACf,WAAA,EAAa;AAAA;AACf,OACD,CAAA;AAAA,IACH;AAAA,EACF,GAAG,CAAC,YAAA,EAAc,OAAA,EAAS,eAAA,EAAiB,UAAU,CAAC,CAAA;AAGvD,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,uBAAOC,cAAA,CAAAC,mBAAA,EAAA,EAAG,mBAAS,EAAE,OAAA,EAAS,WAAW,SAAA,EAAW,SAAA,EAAW,CAAA,EAAE,CAAA;AAAA,EACnE;AAGA,EAAA,MAAM,kBAAkB,OAAA,IAAW,SAAA;AACnC,EAAA,MAAM,OAAA,GAAU,SAAS,eAAe,CAAA;AAExC,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,6DAAU,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,EACpB;AAGA,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,6DAAU,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,EACrB;AAEA,EAAA,uBAAOD,cAAA,CAAAC,mBAAA,EAAA,EAAG,QAAA,EAAA,QAAA,CAAS,OAAA,IAAW,IAAA,EAAK,CAAA;AACrC;AAYO,SAAS,qBAAqB,YAAA,EAAsB;AACzD,EAAA,OAAOJ,qCAAoB,YAAY,CAAA;AACzC;AAoBO,SAAS,oBAAA,CAAqB;AAAA,EACnC,YAAA;AAAA,EACA,WAAA,GAAc,OAAA;AAAA,EACd,KAAA;AAAA,EACA;AACF,CAAA,EAKG;AACD,EAAA,MAAM,aAAaC,+BAAA,EAAe;AAClC,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAID,oCAAA,CAAoB,YAAY,CAAA;AAEpD,EAAA,MAAM,oBAAoB,MAAM;AAC9B,IAAA,UAAA,CAAW;AAAA,MACT,UAAA,EAAY,YAAA;AAAA,MACZ,UAAA,EAAY,YAAA;AAAA,MACZ,UAAA,EAAY;AAAA,QACV,aAAA,EAAe,YAAA;AAAA,QACf,WAAA,EAAa,OAAA;AAAA,QACb,YAAA,EAAc,WAAA;AAAA,QACd;AAAA;AACF,KACD,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,OAAOK,sBAAA,CAAM,aAAa,QAAA,EAAU;AAAA,IAClC,OAAA,EAAS,CAAC,CAAA,KAAwB;AAChC,MAAA,iBAAA,EAAkB;AAElB,MAAA,IAAK,QAAA,CAAS,MAAsD,OAAA,EAAS;AAC3E,QAAC,QAAA,CAAS,KAAA,CAAsD,OAAA,CAAS,CAAC,CAAA;AAAA,MAC5E;AAAA,IACF;AAAA,GACD,CAAA;AACH","file":"chunk-ZY3G7JGT.js","sourcesContent":["/**\n * @sonordev/site-kit/signal - SignalExperiment\n * \n * A/B test component that renders different variants based on Signal assignment.\n * Uses Thompson Sampling (Bayesian bandit) for optimization.\n */\n\n'use client'\n\nimport React, { useMemo, useEffect } from 'react'\nimport { useSignalExperiment, useSignalEvent } from './SignalBridge'\n\ninterface SignalExperimentProps {\n /** Unique experiment ID */\n experimentId: string\n \n /** Variants to test - keys are variant names, values are React nodes */\n variants: Record<string, React.ReactNode>\n \n /** Fallback content if no assignment (defaults to 'control' variant) */\n fallback?: React.ReactNode\n \n /** Track impression automatically */\n trackImpression?: boolean\n \n /** Children function for more control */\n children?: (props: { variant: string; isControl: boolean }) => React.ReactNode\n}\n\n/**\n * Renders different content variants based on Signal's A/B assignment.\n * \n * @example\n * // Simple variant switching\n * <SignalExperiment experimentId=\"hero-cta\" variants={{\n * control: <Button>Get Started</Button>,\n * variant_a: <Button variant=\"primary\">Start Free Trial</Button>,\n * variant_b: <Button variant=\"secondary\">Book a Demo</Button>,\n * }} />\n * \n * @example\n * // With render prop for more control\n * <SignalExperiment experimentId=\"pricing-layout\">\n * {({ variant, isControl }) => (\n * <PricingSection layout={isControl ? 'cards' : 'table'} />\n * )}\n * </SignalExperiment>\n */\nexport function SignalExperiment({\n experimentId,\n variants,\n fallback,\n trackImpression = true,\n children,\n}: SignalExperimentProps) {\n const { assignment, variant, isControl } = useSignalExperiment(experimentId)\n const trackEvent = useSignalEvent()\n \n // Track impression when variant is rendered\n useEffect(() => {\n if (trackImpression && variant) {\n trackEvent({\n event_type: 'experiment',\n event_name: 'impression',\n event_data: {\n experiment_id: experimentId,\n variant_key: variant,\n },\n })\n }\n }, [experimentId, variant, trackImpression, trackEvent])\n \n // If using render prop\n if (children) {\n return <>{children({ variant: variant || 'control', isControl })}</>\n }\n \n // Determine what to render\n const selectedVariant = variant || 'control'\n const content = variants[selectedVariant]\n \n if (content !== undefined) {\n return <>{content}</>\n }\n \n // Fallback to provided fallback or control\n if (fallback) {\n return <>{fallback}</>\n }\n \n return <>{variants.control || null}</>\n}\n\n/**\n * Hook for conditional experiment logic\n * \n * @example\n * const { variant, isControl } = useExperimentVariant('pricing-test')\n * \n * return isControl \n * ? <OldPricing />\n * : <NewPricing showAnnual={variant === 'annual_first'} />\n */\nexport function useExperimentVariant(experimentId: string) {\n return useSignalExperiment(experimentId)\n}\n\n/**\n * Component for tracking experiment conversions\n * Wraps interactive elements to track when they convert\n * \n * @example\n * <SignalExperiment experimentId=\"signup-button\" variants={{\n * control: (\n * <ExperimentConversion experimentId=\"signup-button\" outcomeType=\"click\">\n * <Button>Sign Up</Button>\n * </ExperimentConversion>\n * ),\n * variant_a: (\n * <ExperimentConversion experimentId=\"signup-button\" outcomeType=\"click\">\n * <Button variant=\"large\">Join Now - It's Free!</Button>\n * </ExperimentConversion>\n * ),\n * }} />\n */\nexport function ExperimentConversion({\n experimentId,\n outcomeType = 'click',\n value,\n children,\n}: {\n experimentId: string\n outcomeType?: string\n value?: number\n children: React.ReactElement<{ onClick?: (e: React.MouseEvent) => void }>\n}) {\n const trackEvent = useSignalEvent()\n const { variant } = useSignalExperiment(experimentId)\n\n const handleInteraction = () => {\n trackEvent({\n event_type: 'experiment',\n event_name: 'conversion',\n event_data: {\n experiment_id: experimentId,\n variant_key: variant,\n outcome_type: outcomeType,\n value,\n },\n })\n }\n\n return React.cloneElement(children, {\n onClick: (e: React.MouseEvent) => {\n handleInteraction()\n // Call original onClick if exists\n if ((children.props as { onClick?: (e: React.MouseEvent) => void }).onClick) {\n (children.props as { onClick?: (e: React.MouseEvent) => void }).onClick!(e)\n }\n },\n })\n}\n"]}
|
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var chunkAX4MJV2T_js = require('../chunk-AX4MJV2T.js');
|
|
5
5
|
var chunkY34HM2DT_js = require('../chunk-Y34HM2DT.js');
|
|
6
6
|
var chunkBICCLF2W_js = require('../chunk-BICCLF2W.js');
|
|
7
|
-
var
|
|
7
|
+
var chunkNME3SQCB_js = require('../chunk-NME3SQCB.js');
|
|
8
8
|
var chunkZSMWDLMK_js = require('../chunk-ZSMWDLMK.js');
|
|
9
9
|
var process6 = require('process');
|
|
10
10
|
var os = require('os');
|
|
@@ -29442,7 +29442,7 @@ function buildEnvelope(input, nowMs = Date.now()) {
|
|
|
29442
29442
|
ok: exitCode === 0 /* OK */,
|
|
29443
29443
|
command,
|
|
29444
29444
|
schemaVersion: 1,
|
|
29445
|
-
siteKitVersion:
|
|
29445
|
+
siteKitVersion: chunkNME3SQCB_js.SITE_KIT_VERSION,
|
|
29446
29446
|
exitCode,
|
|
29447
29447
|
status: statusForCode(exitCode),
|
|
29448
29448
|
summary,
|
package/dist/cli/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { require_supports_color, require_lib2, require_lib as require_lib$1 } from '../chunk-X73XS4WC.mjs';
|
|
3
3
|
import { require_lib } from '../chunk-GH265SBI.mjs';
|
|
4
4
|
import { require_main } from '../chunk-5OKOV3NJ.mjs';
|
|
5
|
-
import { SITE_KIT_VERSION } from '../chunk-
|
|
5
|
+
import { SITE_KIT_VERSION } from '../chunk-QGPYFC6G.mjs';
|
|
6
6
|
import { __commonJS, __require, __toESM, __privateAdd, __publicField, __privateGet, __privateMethod, __privateSet, __privateWrapper } from '../chunk-4XPGGLVP.mjs';
|
|
7
7
|
import process6 from 'process';
|
|
8
8
|
import os from 'os';
|
package/dist/client/index.d.mts
CHANGED
|
@@ -36,6 +36,20 @@ export { a as TrackConversionOptions, T as TrackEventOptions } from '../types-DN
|
|
|
36
36
|
*/
|
|
37
37
|
declare function useDeferredActivation(enabled: boolean, idleTimeout?: number): boolean;
|
|
38
38
|
|
|
39
|
+
interface SiteKitCredentialProps {
|
|
40
|
+
/** Minted `st1.` token from `resolveClientCredential` (server-side). */
|
|
41
|
+
apiKey?: string;
|
|
42
|
+
/** Sonor API base. Defaults to `https://api.sonor.io`. */
|
|
43
|
+
apiUrl?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Sub-site host for multi-site projects. Omit to resolve from
|
|
46
|
+
* `NEXT_PUBLIC_SITE_URL` then `window.location.host`.
|
|
47
|
+
*/
|
|
48
|
+
site?: string;
|
|
49
|
+
debug?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare function SiteKitCredential({ apiKey, apiUrl, site, debug, }: SiteKitCredentialProps): null;
|
|
52
|
+
|
|
39
53
|
/**
|
|
40
54
|
* Get or create a persistent visitor ID.
|
|
41
55
|
* Stored in localStorage under `_sk_vid`.
|
|
@@ -63,4 +77,4 @@ declare function SiteKitIdentityProvider({ visitorId, sessionId, children, }: Si
|
|
|
63
77
|
*/
|
|
64
78
|
declare function useSiteKitIdentity(): SiteKitIdentity;
|
|
65
79
|
|
|
66
|
-
export { type SiteKitIdentity, SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useDeferredActivation, useSiteKitIdentity };
|
|
80
|
+
export { SiteKitCredential, type SiteKitCredentialProps, type SiteKitIdentity, SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useDeferredActivation, useSiteKitIdentity };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -36,6 +36,20 @@ export { a as TrackConversionOptions, T as TrackEventOptions } from '../types-DN
|
|
|
36
36
|
*/
|
|
37
37
|
declare function useDeferredActivation(enabled: boolean, idleTimeout?: number): boolean;
|
|
38
38
|
|
|
39
|
+
interface SiteKitCredentialProps {
|
|
40
|
+
/** Minted `st1.` token from `resolveClientCredential` (server-side). */
|
|
41
|
+
apiKey?: string;
|
|
42
|
+
/** Sonor API base. Defaults to `https://api.sonor.io`. */
|
|
43
|
+
apiUrl?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Sub-site host for multi-site projects. Omit to resolve from
|
|
46
|
+
* `NEXT_PUBLIC_SITE_URL` then `window.location.host`.
|
|
47
|
+
*/
|
|
48
|
+
site?: string;
|
|
49
|
+
debug?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare function SiteKitCredential({ apiKey, apiUrl, site, debug, }: SiteKitCredentialProps): null;
|
|
52
|
+
|
|
39
53
|
/**
|
|
40
54
|
* Get or create a persistent visitor ID.
|
|
41
55
|
* Stored in localStorage under `_sk_vid`.
|
|
@@ -63,4 +77,4 @@ declare function SiteKitIdentityProvider({ visitorId, sessionId, children, }: Si
|
|
|
63
77
|
*/
|
|
64
78
|
declare function useSiteKitIdentity(): SiteKitIdentity;
|
|
65
79
|
|
|
66
|
-
export { type SiteKitIdentity, SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useDeferredActivation, useSiteKitIdentity };
|
|
80
|
+
export { SiteKitCredential, type SiteKitCredentialProps, type SiteKitIdentity, SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useDeferredActivation, useSiteKitIdentity };
|
package/dist/client/index.js
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var chunkTRTT4PND_js = require('../chunk-TRTT4PND.js');
|
|
4
5
|
var chunkHGNSJXWT_js = require('../chunk-HGNSJXWT.js');
|
|
6
|
+
require('../chunk-NB4MK2Q5.js');
|
|
5
7
|
var chunkHMFFAUCD_js = require('../chunk-HMFFAUCD.js');
|
|
6
8
|
var chunkXB57AM6T_js = require('../chunk-XB57AM6T.js');
|
|
7
9
|
require('../chunk-VJMPIRSD.js');
|
|
10
|
+
require('../chunk-UXEB6UAR.js');
|
|
11
|
+
require('../chunk-NME3SQCB.js');
|
|
8
12
|
require('../chunk-ZSMWDLMK.js');
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
// src/client/SiteKitCredential.tsx
|
|
15
|
+
function SiteKitCredential({
|
|
16
|
+
apiKey,
|
|
17
|
+
apiUrl,
|
|
18
|
+
site,
|
|
19
|
+
debug
|
|
20
|
+
}) {
|
|
21
|
+
chunkTRTT4PND_js.publishSiteCredential({ apiKey, apiUrl, site, debug });
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
11
24
|
|
|
12
25
|
Object.defineProperty(exports, "useDeferredActivation", {
|
|
13
26
|
enumerable: true,
|
|
@@ -37,5 +50,6 @@ Object.defineProperty(exports, "useSiteKitIdentity", {
|
|
|
37
50
|
enumerable: true,
|
|
38
51
|
get: function () { return chunkXB57AM6T_js.useSiteKitIdentity; }
|
|
39
52
|
});
|
|
53
|
+
exports.SiteKitCredential = SiteKitCredential;
|
|
40
54
|
//# sourceMappingURL=index.js.map
|
|
41
55
|
//# sourceMappingURL=index.js.map
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/client/SiteKitCredential.tsx"],"names":["publishSiteCredential"],"mappings":";;;;;;;;;;;;;AA6CO,SAAS,iBAAA,CAAkB;AAAA,EAChC,MAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,EAAiC;AAG/B,EAAAA,sCAAA,CAAsB,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,OAAO,CAAA;AACrD,EAAA,OAAO,IAAA;AACT","file":"index.js","sourcesContent":["'use client'\n\n/**\n * SiteKitCredential — publish a minted credential to the browser.\n *\n * The client half of the token mint, for layouts that are NOT core\n * `SiteKitLayout`. A server component mints with `resolveClientCredential`\n * (`@sonordev/site-kit/server`) and renders this to seed the token manager and\n * the `window.__SITE_KIT_*` globals every client module reads:\n *\n * ```tsx\n * // app/layout.tsx (server component)\n * import { resolveClientCredential } from '@sonordev/site-kit/server'\n * import { SiteKitCredential } from '@sonordev/site-kit/client'\n *\n * const credential = await resolveClientCredential(\n * process.env.SONOR_API_KEY ?? '',\n * 'https://api.sonor.io',\n * )\n * return <><SiteKitCredential apiKey={credential} />{children}</>\n * ```\n *\n * Renders null — it is a childless sibling, never a wrapper, so it can't pull\n * page content into a client boundary (CLAUDE.md's cardinal perf rule).\n *\n * WARNING: `apiKey` must be a minted `st1.` token resolved SERVER-side. Passing\n * a raw `sonor_` key from a client component inlines the project secret into\n * the browser bundle and defeats the mint. Never source it from\n * `NEXT_PUBLIC_SONOR_API_KEY`.\n */\nimport { publishSiteCredential } from '../shared/publishCredential'\n\nexport interface SiteKitCredentialProps {\n /** Minted `st1.` token from `resolveClientCredential` (server-side). */\n apiKey?: string\n /** Sonor API base. Defaults to `https://api.sonor.io`. */\n apiUrl?: string\n /**\n * Sub-site host for multi-site projects. Omit to resolve from\n * `NEXT_PUBLIC_SITE_URL` then `window.location.host`.\n */\n site?: string\n debug?: boolean\n}\n\nexport function SiteKitCredential({\n apiKey,\n apiUrl,\n site,\n debug,\n}: SiteKitCredentialProps): null {\n // Publish during render, not in an effect — client modules read these globals\n // in their own mount effects, and effects run child-first.\n publishSiteCredential({ apiKey, apiUrl, site, debug })\n return null\n}\n"]}
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { publishSiteCredential } from '../chunk-DWVF7SEK.mjs';
|
|
2
3
|
export { useDeferredActivation } from '../chunk-ZVBLXXNJ.mjs';
|
|
4
|
+
import '../chunk-NI7OY4FW.mjs';
|
|
3
5
|
export { trackConversion, trackEvent } from '../chunk-3DPXOZAU.mjs';
|
|
4
6
|
export { SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-AX4AROLH.mjs';
|
|
5
7
|
import '../chunk-6EDVCUAG.mjs';
|
|
8
|
+
import '../chunk-BNJH2RFU.mjs';
|
|
9
|
+
import '../chunk-QGPYFC6G.mjs';
|
|
6
10
|
import '../chunk-4XPGGLVP.mjs';
|
|
11
|
+
|
|
12
|
+
// src/client/SiteKitCredential.tsx
|
|
13
|
+
function SiteKitCredential({
|
|
14
|
+
apiKey,
|
|
15
|
+
apiUrl,
|
|
16
|
+
site,
|
|
17
|
+
debug
|
|
18
|
+
}) {
|
|
19
|
+
publishSiteCredential({ apiKey, apiUrl, site, debug });
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { SiteKitCredential };
|
|
7
24
|
//# sourceMappingURL=index.mjs.map
|
|
8
25
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
1
|
+
{"version":3,"sources":["../../src/client/SiteKitCredential.tsx"],"names":[],"mappings":";;;;;;;;;;;AA6CO,SAAS,iBAAA,CAAkB;AAAA,EAChC,MAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,EAAiC;AAG/B,EAAA,qBAAA,CAAsB,EAAE,MAAA,EAAQ,MAAA,EAAQ,IAAA,EAAM,OAAO,CAAA;AACrD,EAAA,OAAO,IAAA;AACT","file":"index.mjs","sourcesContent":["'use client'\n\n/**\n * SiteKitCredential — publish a minted credential to the browser.\n *\n * The client half of the token mint, for layouts that are NOT core\n * `SiteKitLayout`. A server component mints with `resolveClientCredential`\n * (`@sonordev/site-kit/server`) and renders this to seed the token manager and\n * the `window.__SITE_KIT_*` globals every client module reads:\n *\n * ```tsx\n * // app/layout.tsx (server component)\n * import { resolveClientCredential } from '@sonordev/site-kit/server'\n * import { SiteKitCredential } from '@sonordev/site-kit/client'\n *\n * const credential = await resolveClientCredential(\n * process.env.SONOR_API_KEY ?? '',\n * 'https://api.sonor.io',\n * )\n * return <><SiteKitCredential apiKey={credential} />{children}</>\n * ```\n *\n * Renders null — it is a childless sibling, never a wrapper, so it can't pull\n * page content into a client boundary (CLAUDE.md's cardinal perf rule).\n *\n * WARNING: `apiKey` must be a minted `st1.` token resolved SERVER-side. Passing\n * a raw `sonor_` key from a client component inlines the project secret into\n * the browser bundle and defeats the mint. Never source it from\n * `NEXT_PUBLIC_SONOR_API_KEY`.\n */\nimport { publishSiteCredential } from '../shared/publishCredential'\n\nexport interface SiteKitCredentialProps {\n /** Minted `st1.` token from `resolveClientCredential` (server-side). */\n apiKey?: string\n /** Sonor API base. Defaults to `https://api.sonor.io`. */\n apiUrl?: string\n /**\n * Sub-site host for multi-site projects. Omit to resolve from\n * `NEXT_PUBLIC_SITE_URL` then `window.location.host`.\n */\n site?: string\n debug?: boolean\n}\n\nexport function SiteKitCredential({\n apiKey,\n apiUrl,\n site,\n debug,\n}: SiteKitCredentialProps): null {\n // Publish during render, not in an effect — client modules read these globals\n // in their own mount effects, and effects run child-first.\n publishSiteCredential({ apiKey, apiUrl, site, debug })\n return null\n}\n"]}
|
package/dist/commerce/index.js
CHANGED
|
@@ -1,197 +1,198 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkSQGDDITI_js = require('../chunk-SQGDDITI.js');
|
|
5
|
+
require('../chunk-IMDSDDRU.js');
|
|
6
|
+
require('../chunk-Q2SPOBHU.js');
|
|
7
7
|
require('../chunk-HMFFAUCD.js');
|
|
8
8
|
require('../chunk-XB57AM6T.js');
|
|
9
9
|
require('../chunk-VJMPIRSD.js');
|
|
10
|
-
require('../chunk-
|
|
11
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-XY4NJJEX.js');
|
|
11
|
+
require('../chunk-UXEB6UAR.js');
|
|
12
|
+
require('../chunk-NME3SQCB.js');
|
|
12
13
|
require('../chunk-ZSMWDLMK.js');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
Object.defineProperty(exports, "CalendarView", {
|
|
17
18
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkSQGDDITI_js.CalendarView; }
|
|
19
20
|
});
|
|
20
21
|
Object.defineProperty(exports, "CheckoutForm", {
|
|
21
22
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkSQGDDITI_js.CheckoutForm; }
|
|
23
24
|
});
|
|
24
25
|
Object.defineProperty(exports, "EventCalendar", {
|
|
25
26
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkSQGDDITI_js.EventCalendar; }
|
|
27
28
|
});
|
|
28
29
|
Object.defineProperty(exports, "EventCheckout", {
|
|
29
30
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkSQGDDITI_js.EventCheckout; }
|
|
31
32
|
});
|
|
32
33
|
Object.defineProperty(exports, "EventEmbed", {
|
|
33
34
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkSQGDDITI_js.EventEmbed; }
|
|
35
36
|
});
|
|
36
37
|
Object.defineProperty(exports, "EventModal", {
|
|
37
38
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkSQGDDITI_js.EventModal; }
|
|
39
40
|
});
|
|
40
41
|
Object.defineProperty(exports, "EventTile", {
|
|
41
42
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkSQGDDITI_js.EventTile; }
|
|
43
44
|
});
|
|
44
45
|
Object.defineProperty(exports, "EventsWidget", {
|
|
45
46
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkSQGDDITI_js.EventsWidget; }
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "OfferingCard", {
|
|
49
50
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkSQGDDITI_js.OfferingCard; }
|
|
51
52
|
});
|
|
52
53
|
Object.defineProperty(exports, "OfferingList", {
|
|
53
54
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkSQGDDITI_js.OfferingList; }
|
|
55
56
|
});
|
|
56
57
|
Object.defineProperty(exports, "ProductDetail", {
|
|
57
58
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkSQGDDITI_js.ProductDetail; }
|
|
59
60
|
});
|
|
60
61
|
Object.defineProperty(exports, "ProductEmbed", {
|
|
61
62
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkSQGDDITI_js.ProductEmbed; }
|
|
63
64
|
});
|
|
64
65
|
Object.defineProperty(exports, "ProductGrid", {
|
|
65
66
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkSQGDDITI_js.ProductGrid; }
|
|
67
68
|
});
|
|
68
69
|
Object.defineProperty(exports, "ProductPage", {
|
|
69
70
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkSQGDDITI_js.ProductPage; }
|
|
71
72
|
});
|
|
72
73
|
Object.defineProperty(exports, "RegistrationForm", {
|
|
73
74
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkSQGDDITI_js.RegistrationForm; }
|
|
75
76
|
});
|
|
76
77
|
Object.defineProperty(exports, "SizeChart", {
|
|
77
78
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkSQGDDITI_js.SizeChart; }
|
|
79
80
|
});
|
|
80
81
|
Object.defineProperty(exports, "UpcomingEvents", {
|
|
81
82
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkSQGDDITI_js.UpcomingEvents; }
|
|
83
84
|
});
|
|
84
85
|
Object.defineProperty(exports, "createCheckoutSession", {
|
|
85
86
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkSQGDDITI_js.createCheckoutSession; }
|
|
87
88
|
});
|
|
88
89
|
Object.defineProperty(exports, "createPaymentIntent", {
|
|
89
90
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkSQGDDITI_js.createPaymentIntent; }
|
|
91
92
|
});
|
|
92
93
|
Object.defineProperty(exports, "fetchActiveProcessor", {
|
|
93
94
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkSQGDDITI_js.fetchActiveProcessor; }
|
|
95
96
|
});
|
|
96
97
|
Object.defineProperty(exports, "fetchCategories", {
|
|
97
98
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkSQGDDITI_js.fetchCategories; }
|
|
99
100
|
});
|
|
100
101
|
Object.defineProperty(exports, "fetchLatestOffering", {
|
|
101
102
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkSQGDDITI_js.fetchLatestOffering; }
|
|
103
104
|
});
|
|
104
105
|
Object.defineProperty(exports, "fetchNextEvent", {
|
|
105
106
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkSQGDDITI_js.fetchNextEvent; }
|
|
107
108
|
});
|
|
108
109
|
Object.defineProperty(exports, "fetchOffering", {
|
|
109
110
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkSQGDDITI_js.fetchOffering; }
|
|
111
112
|
});
|
|
112
113
|
Object.defineProperty(exports, "fetchOfferings", {
|
|
113
114
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkSQGDDITI_js.fetchOfferings; }
|
|
115
116
|
});
|
|
116
117
|
Object.defineProperty(exports, "fetchProcessorConfig", {
|
|
117
118
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkSQGDDITI_js.fetchProcessorConfig; }
|
|
119
120
|
});
|
|
120
121
|
Object.defineProperty(exports, "fetchProductBySlug", {
|
|
121
122
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkSQGDDITI_js.fetchProductBySlug; }
|
|
123
124
|
});
|
|
124
125
|
Object.defineProperty(exports, "fetchProducts", {
|
|
125
126
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkSQGDDITI_js.fetchProducts; }
|
|
127
128
|
});
|
|
128
129
|
Object.defineProperty(exports, "fetchProductsPublic", {
|
|
129
130
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkSQGDDITI_js.fetchProductsPublic; }
|
|
131
132
|
});
|
|
132
133
|
Object.defineProperty(exports, "fetchServices", {
|
|
133
134
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkSQGDDITI_js.fetchServices; }
|
|
135
136
|
});
|
|
136
137
|
Object.defineProperty(exports, "fetchShippingRates", {
|
|
137
138
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkSQGDDITI_js.fetchShippingRates; }
|
|
139
140
|
});
|
|
140
141
|
Object.defineProperty(exports, "fetchUpcomingEvents", {
|
|
141
142
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkSQGDDITI_js.fetchUpcomingEvents; }
|
|
143
144
|
});
|
|
144
145
|
Object.defineProperty(exports, "formatDate", {
|
|
145
146
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkSQGDDITI_js.formatDate; }
|
|
147
148
|
});
|
|
148
149
|
Object.defineProperty(exports, "formatDateRange", {
|
|
149
150
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkSQGDDITI_js.formatDateRange; }
|
|
151
152
|
});
|
|
152
153
|
Object.defineProperty(exports, "formatDateTime", {
|
|
153
154
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkSQGDDITI_js.formatDateTime; }
|
|
155
156
|
});
|
|
156
157
|
Object.defineProperty(exports, "formatPrice", {
|
|
157
158
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkSQGDDITI_js.formatPrice; }
|
|
159
160
|
});
|
|
160
161
|
Object.defineProperty(exports, "formatTime", {
|
|
161
162
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkSQGDDITI_js.formatTime; }
|
|
163
164
|
});
|
|
164
165
|
Object.defineProperty(exports, "getOfferingUrl", {
|
|
165
166
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkSQGDDITI_js.getOfferingUrl; }
|
|
167
168
|
});
|
|
168
169
|
Object.defineProperty(exports, "getRelativeTimeUntil", {
|
|
169
170
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkSQGDDITI_js.getRelativeTimeUntil; }
|
|
171
172
|
});
|
|
172
173
|
Object.defineProperty(exports, "getSpotsRemaining", {
|
|
173
174
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkSQGDDITI_js.getSpotsRemaining; }
|
|
175
176
|
});
|
|
176
177
|
Object.defineProperty(exports, "isEventSoldOut", {
|
|
177
178
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkSQGDDITI_js.isEventSoldOut; }
|
|
179
180
|
});
|
|
180
181
|
Object.defineProperty(exports, "registerForEvent", {
|
|
181
182
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkSQGDDITI_js.registerForEvent; }
|
|
183
184
|
});
|
|
184
185
|
Object.defineProperty(exports, "useEventModal", {
|
|
185
186
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkSQGDDITI_js.useEventModal; }
|
|
187
188
|
});
|
|
188
189
|
Object.defineProperty(exports, "validateAddress", {
|
|
189
190
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkSQGDDITI_js.validateAddress; }
|
|
191
192
|
});
|
|
192
193
|
Object.defineProperty(exports, "validateDiscountCode", {
|
|
193
194
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkSQGDDITI_js.validateDiscountCode; }
|
|
195
196
|
});
|
|
196
197
|
//# sourceMappingURL=index.js.map
|
|
197
198
|
//# sourceMappingURL=index.js.map
|
package/dist/commerce/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { CalendarView, CheckoutForm, EventCalendar, EventCheckout, EventEmbed, EventModal, EventTile, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, SizeChart, UpcomingEvents, createCheckoutSession, createPaymentIntent, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProcessorConfig, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchShippingRates, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, isEventSoldOut, registerForEvent, useEventModal, validateAddress, validateDiscountCode } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { CalendarView, CheckoutForm, EventCalendar, EventCheckout, EventEmbed, EventModal, EventTile, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, SizeChart, UpcomingEvents, createCheckoutSession, createPaymentIntent, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProcessorConfig, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchShippingRates, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, isEventSoldOut, registerForEvent, useEventModal, validateAddress, validateDiscountCode } from '../chunk-YSDJ7HI3.mjs';
|
|
3
|
+
import '../chunk-NBI5AV6U.mjs';
|
|
4
|
+
import '../chunk-LZSHZVBE.mjs';
|
|
5
5
|
import '../chunk-3DPXOZAU.mjs';
|
|
6
6
|
import '../chunk-AX4AROLH.mjs';
|
|
7
7
|
import '../chunk-6EDVCUAG.mjs';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-VX3WK77I.mjs';
|
|
9
|
+
import '../chunk-BNJH2RFU.mjs';
|
|
10
|
+
import '../chunk-QGPYFC6G.mjs';
|
|
10
11
|
import '../chunk-4XPGGLVP.mjs';
|
|
11
12
|
//# sourceMappingURL=index.mjs.map
|
|
12
13
|
//# sourceMappingURL=index.mjs.map
|
package/dist/engage/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkEH7QQU6P_js = require('../chunk-EH7QQU6P.js');
|
|
5
|
+
var chunk3KEZ2YHQ_js = require('../chunk-3KEZ2YHQ.js');
|
|
6
|
+
require('../chunk-TJS6FPR7.js');
|
|
7
7
|
require('../chunk-V6NVBFEP.js');
|
|
8
8
|
require('../chunk-XB57AM6T.js');
|
|
9
9
|
require('../chunk-VJMPIRSD.js');
|
|
10
|
-
require('../chunk-
|
|
11
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-XY4NJJEX.js');
|
|
11
|
+
require('../chunk-UXEB6UAR.js');
|
|
12
|
+
require('../chunk-NME3SQCB.js');
|
|
12
13
|
require('../chunk-ZSMWDLMK.js');
|
|
13
14
|
|
|
14
15
|
// src/engage/echo-config.ts
|
|
@@ -40,15 +41,15 @@ function getEchoWidgetProps(config = SONOR_PUBLIC_ECHO_DEFAULTS) {
|
|
|
40
41
|
|
|
41
42
|
Object.defineProperty(exports, "ChatWidget", {
|
|
42
43
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkEH7QQU6P_js.ChatWidget; }
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(exports, "DesignRenderer", {
|
|
46
47
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk3KEZ2YHQ_js.DesignRenderer; }
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(exports, "EngageWidget", {
|
|
50
51
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk3KEZ2YHQ_js.EngageWidget; }
|
|
52
53
|
});
|
|
53
54
|
exports.SONOR_PUBLIC_ECHO_DEFAULTS = SONOR_PUBLIC_ECHO_DEFAULTS;
|
|
54
55
|
exports.getEchoWidgetProps = getEchoWidgetProps;
|
package/dist/engage/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/engage/echo-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/engage/echo-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBO,IAAM,0BAAA,GAA+C;AAAA,EAC1D,SAAA,EAAW,yBAAA;AAAA,EACX,cAAA,EACE,0KAAA;AAAA,EACF,kBAAA,EAAoB;AAAA,IAClB,qBAAA;AAAA,IACA,0BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,UAAA,EAAY,SAAA;AAAA;AAAA,EACZ,aAAA,EAAe;AACjB;AAEO,SAAS,kBAAA,CAAmB,SAA2B,0BAAA,EAA4B;AACxF,EAAA,OAAO;AAAA,IACL,cAAA,EAAgB,IAAA;AAAA,IAChB,UAAA,EAAY,MAAA,CAAO,SAAA,IAAa,0BAAA,CAA2B,SAAA;AAAA,IAC3D,eAAA,EAAiB,MAAA,CAAO,cAAA,IAAkB,0BAAA,CAA2B,cAAA;AAAA,IACrE,mBAAA,EAAqB,MAAA,CAAO,kBAAA,IAAsB,0BAAA,CAA2B,kBAAA;AAAA,IAC7E,WAAA,EAAa,MAAA,CAAO,UAAA,IAAc,0BAAA,CAA2B,UAAA;AAAA,IAC7D,cAAA,EAAgB,MAAA,CAAO,aAAA,IAAiB,0BAAA,CAA2B,aAAA;AAAA,IACnE,kBAAkB,MAAA,CAAO;AAAA,GAC3B;AACF","file":"index.js","sourcesContent":["/**\n * @sonordev/site-kit/engage - Echo Public Configuration\n *\n * Helpers for configuring the ChatWidget with Echo-specific defaults\n * for the Sonor public site (sonor.io).\n */\n\nexport interface EchoPublicConfig {\n signalUrl?: string\n welcomeMessage?: string\n suggestedQuestions?: string[]\n brandColor?: string\n assistantName?: string\n assistantAvatar?: string\n}\n\nexport const SONOR_PUBLIC_ECHO_DEFAULTS: EchoPublicConfig = {\n signalUrl: 'https://signal.sonor.io',\n welcomeMessage:\n \"Hi! I'm Echo, Sonor's AI assistant. I can answer questions about our platform, help you understand pricing, or get you started with a demo. What would you like to know?\",\n suggestedQuestions: [\n 'What does Sonor do?',\n 'How does Signal AI work?',\n 'What are the pricing plans?',\n 'Can I migrate from HubSpot?',\n 'How does the SEO module work?',\n ],\n brandColor: '#2563eb', // blue-600 (~5.2:1 on white, AA); overridden by --sk-primary CSS var or API brand_primary\n assistantName: 'Echo',\n}\n\nexport function getEchoWidgetProps(config: EchoPublicConfig = SONOR_PUBLIC_ECHO_DEFAULTS) {\n return {\n signal_enabled: true,\n signal_url: config.signalUrl || SONOR_PUBLIC_ECHO_DEFAULTS.signalUrl,\n welcome_message: config.welcomeMessage || SONOR_PUBLIC_ECHO_DEFAULTS.welcomeMessage,\n suggested_questions: config.suggestedQuestions || SONOR_PUBLIC_ECHO_DEFAULTS.suggestedQuestions,\n brand_color: config.brandColor || SONOR_PUBLIC_ECHO_DEFAULTS.brandColor,\n assistant_name: config.assistantName || SONOR_PUBLIC_ECHO_DEFAULTS.assistantName,\n assistant_avatar: config.assistantAvatar,\n }\n}\n"]}
|
package/dist/engage/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { ChatWidget } from '../chunk-
|
|
3
|
-
export { DesignRenderer, EngageWidget } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { ChatWidget } from '../chunk-YKPAFEJ4.mjs';
|
|
3
|
+
export { DesignRenderer, EngageWidget } from '../chunk-STTSIODQ.mjs';
|
|
4
|
+
import '../chunk-INGAARGC.mjs';
|
|
5
5
|
import '../chunk-X3S6KXAP.mjs';
|
|
6
6
|
import '../chunk-AX4AROLH.mjs';
|
|
7
7
|
import '../chunk-6EDVCUAG.mjs';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-VX3WK77I.mjs';
|
|
9
|
+
import '../chunk-BNJH2RFU.mjs';
|
|
10
|
+
import '../chunk-QGPYFC6G.mjs';
|
|
10
11
|
import '../chunk-4XPGGLVP.mjs';
|
|
11
12
|
|
|
12
13
|
// src/engage/echo-config.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/engage/echo-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/engage/echo-config.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBO,IAAM,0BAAA,GAA+C;AAAA,EAC1D,SAAA,EAAW,yBAAA;AAAA,EACX,cAAA,EACE,0KAAA;AAAA,EACF,kBAAA,EAAoB;AAAA,IAClB,qBAAA;AAAA,IACA,0BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,UAAA,EAAY,SAAA;AAAA;AAAA,EACZ,aAAA,EAAe;AACjB;AAEO,SAAS,kBAAA,CAAmB,SAA2B,0BAAA,EAA4B;AACxF,EAAA,OAAO;AAAA,IACL,cAAA,EAAgB,IAAA;AAAA,IAChB,UAAA,EAAY,MAAA,CAAO,SAAA,IAAa,0BAAA,CAA2B,SAAA;AAAA,IAC3D,eAAA,EAAiB,MAAA,CAAO,cAAA,IAAkB,0BAAA,CAA2B,cAAA;AAAA,IACrE,mBAAA,EAAqB,MAAA,CAAO,kBAAA,IAAsB,0BAAA,CAA2B,kBAAA;AAAA,IAC7E,WAAA,EAAa,MAAA,CAAO,UAAA,IAAc,0BAAA,CAA2B,UAAA;AAAA,IAC7D,cAAA,EAAgB,MAAA,CAAO,aAAA,IAAiB,0BAAA,CAA2B,aAAA;AAAA,IACnE,kBAAkB,MAAA,CAAO;AAAA,GAC3B;AACF","file":"index.mjs","sourcesContent":["/**\n * @sonordev/site-kit/engage - Echo Public Configuration\n *\n * Helpers for configuring the ChatWidget with Echo-specific defaults\n * for the Sonor public site (sonor.io).\n */\n\nexport interface EchoPublicConfig {\n signalUrl?: string\n welcomeMessage?: string\n suggestedQuestions?: string[]\n brandColor?: string\n assistantName?: string\n assistantAvatar?: string\n}\n\nexport const SONOR_PUBLIC_ECHO_DEFAULTS: EchoPublicConfig = {\n signalUrl: 'https://signal.sonor.io',\n welcomeMessage:\n \"Hi! I'm Echo, Sonor's AI assistant. I can answer questions about our platform, help you understand pricing, or get you started with a demo. What would you like to know?\",\n suggestedQuestions: [\n 'What does Sonor do?',\n 'How does Signal AI work?',\n 'What are the pricing plans?',\n 'Can I migrate from HubSpot?',\n 'How does the SEO module work?',\n ],\n brandColor: '#2563eb', // blue-600 (~5.2:1 on white, AA); overridden by --sk-primary CSS var or API brand_primary\n assistantName: 'Echo',\n}\n\nexport function getEchoWidgetProps(config: EchoPublicConfig = SONOR_PUBLIC_ECHO_DEFAULTS) {\n return {\n signal_enabled: true,\n signal_url: config.signalUrl || SONOR_PUBLIC_ECHO_DEFAULTS.signalUrl,\n welcome_message: config.welcomeMessage || SONOR_PUBLIC_ECHO_DEFAULTS.welcomeMessage,\n suggested_questions: config.suggestedQuestions || SONOR_PUBLIC_ECHO_DEFAULTS.suggestedQuestions,\n brand_color: config.brandColor || SONOR_PUBLIC_ECHO_DEFAULTS.brandColor,\n assistant_name: config.assistantName || SONOR_PUBLIC_ECHO_DEFAULTS.assistantName,\n assistant_avatar: config.assistantAvatar,\n }\n}\n"]}
|