@sonordev/site-kit 3.3.1 → 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 +13 -1
- package/dist/AnalyticsProvider-35EDQA5V.js +31 -0
- package/dist/{AnalyticsProvider-PLGTU56K.js.map → AnalyticsProvider-35EDQA5V.js.map} +1 -1
- package/dist/AnalyticsProvider-V5CWTWWO.mjs +10 -0
- package/dist/{AnalyticsProvider-3MZ3O5OB.mjs.map → AnalyticsProvider-V5CWTWWO.mjs.map} +1 -1
- package/dist/ChatWidget-2OK6DD66.js +19 -0
- package/dist/{ChatWidget-FQARJMGU.js.map → ChatWidget-2OK6DD66.js.map} +1 -1
- package/dist/ChatWidget-WNT6VNJK.mjs +10 -0
- package/dist/{ChatWidget-7JHVRNVE.mjs.map → ChatWidget-WNT6VNJK.mjs.map} +1 -1
- package/dist/EngageWidget-7RZIC426.js +18 -0
- package/dist/{EngageWidget-DQ62NQPU.js.map → EngageWidget-7RZIC426.js.map} +1 -1
- package/dist/EngageWidget-GWME22IP.mjs +9 -0
- package/dist/{EngageWidget-VXQOZOYA.mjs.map → EngageWidget-GWME22IP.mjs.map} +1 -1
- package/dist/{SignalCore-3SG3LFQL.js → SignalCore-DK4HQBPY.js} +62 -43
- package/dist/SignalCore-DK4HQBPY.js.map +1 -0
- package/dist/{SignalCore-BKG66B4C.mjs → SignalCore-TW4YA3BW.mjs} +56 -37
- package/dist/SignalCore-TW4YA3BW.mjs.map +1 -0
- package/dist/SitemapSync-7PXQMF5A.mjs +8 -0
- package/dist/{SitemapSync-IO2VOR23.mjs.map → SitemapSync-7PXQMF5A.mjs.map} +1 -1
- package/dist/SitemapSync-O3J2DPV7.js +17 -0
- package/dist/{SitemapSync-DWX7I6MX.js.map → SitemapSync-O3J2DPV7.js.map} +1 -1
- package/dist/analytics/index.js +14 -12
- package/dist/analytics/index.mjs +7 -5
- 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-QW3T6WH2.mjs → chunk-2NA5CAK5.mjs} +3 -3
- package/dist/{chunk-QW3T6WH2.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-3WRE7ZDC.js → chunk-3KEZ2YHQ.js} +8 -8
- package/dist/{chunk-3WRE7ZDC.js.map → chunk-3KEZ2YHQ.js.map} +1 -1
- package/dist/{chunk-NQ3K4NWX.mjs → chunk-5WQHWBCW.mjs} +11 -30
- package/dist/chunk-5WQHWBCW.mjs.map +1 -0
- package/dist/chunk-6EDVCUAG.mjs +29 -0
- package/dist/chunk-6EDVCUAG.mjs.map +1 -0
- package/dist/{chunk-ZFF3BKNE.mjs → chunk-6JVDIW5L.mjs} +4 -4
- package/dist/{chunk-ZFF3BKNE.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-OC64AHKN.mjs → chunk-7FZWMAI2.mjs} +3 -3
- package/dist/{chunk-OC64AHKN.mjs.map → chunk-7FZWMAI2.mjs.map} +1 -1
- package/dist/{chunk-EE6SFAZP.mjs → chunk-AX4AROLH.mjs} +5 -14
- package/dist/chunk-AX4AROLH.mjs.map +1 -0
- 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-PIV54R2O.js → chunk-CTPE3G5W.js} +5 -5
- package/dist/{chunk-PIV54R2O.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-C4JAMON3.js → chunk-EH7QQU6P.js} +15 -15
- package/dist/{chunk-C4JAMON3.js.map → chunk-EH7QQU6P.js.map} +1 -1
- package/dist/chunk-EU2UGO25.js +52 -0
- package/dist/chunk-EU2UGO25.js.map +1 -0
- 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-JD6LV6JZ.mjs → chunk-HRJ65XKY.mjs} +3 -3
- package/dist/{chunk-JD6LV6JZ.mjs.map → chunk-HRJ65XKY.mjs.map} +1 -1
- package/dist/chunk-IBMOX3YE.mjs +48 -0
- package/dist/chunk-IBMOX3YE.mjs.map +1 -0
- package/dist/{chunk-TXEOLHMC.js → chunk-IMDSDDRU.js} +4 -4
- package/dist/{chunk-TXEOLHMC.js.map → chunk-IMDSDDRU.js.map} +1 -1
- package/dist/{chunk-25YPXQBA.mjs → chunk-INGAARGC.mjs} +8 -25
- package/dist/chunk-INGAARGC.mjs.map +1 -0
- package/dist/{chunk-3AG6O3IA.mjs → chunk-LZSHZVBE.mjs} +49 -5
- package/dist/chunk-LZSHZVBE.mjs.map +1 -0
- 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-DIXWP4BO.mjs → chunk-NBI5AV6U.mjs} +3 -3
- package/dist/{chunk-DIXWP4BO.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-3X2YPJU5.js.map → chunk-NME3SQCB.js.map} +1 -1
- package/dist/{chunk-4JMXBIUC.js → chunk-PE2A3ON5.js} +16 -35
- package/dist/chunk-PE2A3ON5.js.map +1 -0
- package/dist/{chunk-BOWR5QEV.js → chunk-PWIBFSXK.js} +14 -14
- package/dist/{chunk-BOWR5QEV.js.map → chunk-PWIBFSXK.js.map} +1 -1
- package/dist/{chunk-4ROFY6PM.js → chunk-Q2SPOBHU.js} +61 -17
- package/dist/chunk-Q2SPOBHU.js.map +1 -0
- package/dist/chunk-QGPYFC6G.mjs +6 -0
- package/dist/{chunk-K6YGF2KJ.mjs.map → chunk-QGPYFC6G.mjs.map} +1 -1
- package/dist/{chunk-FSYXHIAI.js → chunk-SQGDDITI.js} +14 -14
- package/dist/{chunk-FSYXHIAI.js.map → chunk-SQGDDITI.js.map} +1 -1
- package/dist/{chunk-S2N3NSC7.mjs → chunk-STTSIODQ.mjs} +5 -5
- package/dist/{chunk-S2N3NSC7.mjs.map → chunk-STTSIODQ.mjs.map} +1 -1
- package/dist/{chunk-QRIGY6EM.js → chunk-T3RPPS25.js} +7 -7
- package/dist/{chunk-QRIGY6EM.js.map → chunk-T3RPPS25.js.map} +1 -1
- package/dist/{chunk-DNW7FTJD.js → chunk-TBMFLLRV.js} +9 -9
- package/dist/{chunk-DNW7FTJD.js.map → chunk-TBMFLLRV.js.map} +1 -1
- package/dist/{chunk-YFYMOQAX.js → chunk-TJS6FPR7.js} +14 -31
- package/dist/chunk-TJS6FPR7.js.map +1 -0
- 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-QFWBAGBT.mjs → chunk-UFOOVODL.mjs} +3 -3
- package/dist/{chunk-QFWBAGBT.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-MLD3EGM2.mjs → chunk-V37Z65NF.mjs} +3 -3
- package/dist/{chunk-MLD3EGM2.mjs.map → chunk-V37Z65NF.mjs.map} +1 -1
- package/dist/chunk-VJMPIRSD.js +31 -0
- package/dist/chunk-VJMPIRSD.js.map +1 -0
- 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-3BNFUMLL.js → chunk-XB57AM6T.js} +5 -14
- package/dist/chunk-XB57AM6T.js.map +1 -0
- package/dist/chunk-XY4NJJEX.js +129 -0
- package/dist/chunk-XY4NJJEX.js.map +1 -0
- package/dist/{chunk-FMQHK6MM.js → chunk-Y4U3OCKH.js} +3 -3
- package/dist/{chunk-FMQHK6MM.js.map → chunk-Y4U3OCKH.js.map} +1 -1
- package/dist/{chunk-ZYIONE7A.mjs → chunk-YKPAFEJ4.mjs} +4 -4
- package/dist/{chunk-ZYIONE7A.mjs.map → chunk-YKPAFEJ4.mjs.map} +1 -1
- package/dist/{chunk-7OROUYZH.mjs → chunk-YSDJ7HI3.mjs} +4 -4
- package/dist/{chunk-7OROUYZH.mjs.map → chunk-YSDJ7HI3.mjs.map} +1 -1
- package/dist/{chunk-PCDAVHVX.js → chunk-ZY3G7JGT.js} +8 -8
- package/dist/{chunk-PCDAVHVX.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 +21 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +19 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/commerce/index.js +53 -51
- package/dist/commerce/index.mjs +8 -6
- package/dist/engage/index.js +11 -9
- package/dist/engage/index.js.map +1 -1
- package/dist/engage/index.mjs +8 -6
- 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 +14 -12
- package/dist/forms/index.js.map +1 -1
- package/dist/forms/index.mjs +6 -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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +75 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -10
- package/dist/index.mjs.map +1 -1
- package/dist/landing/index.d.mts +21 -0
- package/dist/landing/index.d.ts +21 -0
- package/dist/landing/index.js +21 -0
- package/dist/landing/index.js.map +1 -0
- package/dist/landing/index.mjs +4 -0
- package/dist/landing/index.mjs.map +1 -0
- package/dist/layout/client.js +11 -8
- package/dist/layout/client.mjs +10 -7
- package/dist/layout/index.js +13 -54
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +11 -52
- 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/metadata-D_GiY8LJ.d.mts +36 -0
- package/dist/metadata-D_GiY8LJ.d.ts +36 -0
- package/dist/middleware/index.js +2 -8
- package/dist/middleware/index.js.map +1 -1
- package/dist/middleware/index.mjs +2 -8
- package/dist/middleware/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 +11 -1
- package/dist/AnalyticsProvider-3MZ3O5OB.mjs +0 -8
- package/dist/AnalyticsProvider-PLGTU56K.js +0 -29
- package/dist/ChatWidget-7JHVRNVE.mjs +0 -8
- package/dist/ChatWidget-FQARJMGU.js +0 -17
- package/dist/EngageWidget-DQ62NQPU.js +0 -16
- package/dist/EngageWidget-VXQOZOYA.mjs +0 -7
- package/dist/SignalCore-3SG3LFQL.js.map +0 -1
- package/dist/SignalCore-BKG66B4C.mjs.map +0 -1
- package/dist/SitemapSync-DWX7I6MX.js +0 -16
- package/dist/SitemapSync-IO2VOR23.mjs +0 -7
- package/dist/chunk-25YPXQBA.mjs.map +0 -1
- package/dist/chunk-3AG6O3IA.mjs.map +0 -1
- package/dist/chunk-3BNFUMLL.js.map +0 -1
- package/dist/chunk-3X2YPJU5.js +0 -8
- package/dist/chunk-4JMXBIUC.js.map +0 -1
- package/dist/chunk-4ROFY6PM.js.map +0 -1
- package/dist/chunk-AB2VYIYU.mjs.map +0 -1
- package/dist/chunk-BMKZHXWQ.js.map +0 -1
- package/dist/chunk-EE6SFAZP.mjs.map +0 -1
- package/dist/chunk-GUU3AEFM.mjs +0 -259
- package/dist/chunk-GUU3AEFM.mjs.map +0 -1
- package/dist/chunk-IB4FRJDV.js.map +0 -1
- package/dist/chunk-K6YGF2KJ.mjs +0 -6
- package/dist/chunk-KPKZBIAQ.js +0 -264
- package/dist/chunk-KPKZBIAQ.js.map +0 -1
- package/dist/chunk-NQ3K4NWX.mjs.map +0 -1
- package/dist/chunk-SH4VZDVX.mjs.map +0 -1
- package/dist/chunk-WZHWWOUC.js.map +0 -1
- package/dist/chunk-X4OPM3SK.mjs.map +0 -1
- package/dist/chunk-YFYMOQAX.js.map +0 -1
|
@@ -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,12 +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
|
-
var
|
|
8
|
+
var chunkXB57AM6T_js = require('../chunk-XB57AM6T.js');
|
|
9
|
+
require('../chunk-VJMPIRSD.js');
|
|
10
|
+
require('../chunk-UXEB6UAR.js');
|
|
11
|
+
require('../chunk-NME3SQCB.js');
|
|
7
12
|
require('../chunk-ZSMWDLMK.js');
|
|
8
13
|
|
|
9
|
-
|
|
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
|
+
}
|
|
10
24
|
|
|
11
25
|
Object.defineProperty(exports, "useDeferredActivation", {
|
|
12
26
|
enumerable: true,
|
|
@@ -22,19 +36,20 @@ Object.defineProperty(exports, "trackEvent", {
|
|
|
22
36
|
});
|
|
23
37
|
Object.defineProperty(exports, "SiteKitIdentityProvider", {
|
|
24
38
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkXB57AM6T_js.SiteKitIdentityProvider; }
|
|
26
40
|
});
|
|
27
41
|
Object.defineProperty(exports, "getOrCreateSessionId", {
|
|
28
42
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkXB57AM6T_js.getOrCreateSessionId; }
|
|
30
44
|
});
|
|
31
45
|
Object.defineProperty(exports, "getOrCreateVisitorId", {
|
|
32
46
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkXB57AM6T_js.getOrCreateVisitorId; }
|
|
34
48
|
});
|
|
35
49
|
Object.defineProperty(exports, "useSiteKitIdentity", {
|
|
36
50
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkXB57AM6T_js.useSiteKitIdentity; }
|
|
38
52
|
});
|
|
53
|
+
exports.SiteKitCredential = SiteKitCredential;
|
|
39
54
|
//# sourceMappingURL=index.js.map
|
|
40
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,7 +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
|
-
export { SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-
|
|
6
|
+
export { SiteKitIdentityProvider, getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-AX4AROLH.mjs';
|
|
7
|
+
import '../chunk-6EDVCUAG.mjs';
|
|
8
|
+
import '../chunk-BNJH2RFU.mjs';
|
|
9
|
+
import '../chunk-QGPYFC6G.mjs';
|
|
5
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 };
|
|
6
24
|
//# sourceMappingURL=index.mjs.map
|
|
7
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,196 +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
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XB57AM6T.js');
|
|
9
|
+
require('../chunk-VJMPIRSD.js');
|
|
10
|
+
require('../chunk-XY4NJJEX.js');
|
|
11
|
+
require('../chunk-UXEB6UAR.js');
|
|
12
|
+
require('../chunk-NME3SQCB.js');
|
|
11
13
|
require('../chunk-ZSMWDLMK.js');
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
Object.defineProperty(exports, "CalendarView", {
|
|
16
18
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkSQGDDITI_js.CalendarView; }
|
|
18
20
|
});
|
|
19
21
|
Object.defineProperty(exports, "CheckoutForm", {
|
|
20
22
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkSQGDDITI_js.CheckoutForm; }
|
|
22
24
|
});
|
|
23
25
|
Object.defineProperty(exports, "EventCalendar", {
|
|
24
26
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkSQGDDITI_js.EventCalendar; }
|
|
26
28
|
});
|
|
27
29
|
Object.defineProperty(exports, "EventCheckout", {
|
|
28
30
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkSQGDDITI_js.EventCheckout; }
|
|
30
32
|
});
|
|
31
33
|
Object.defineProperty(exports, "EventEmbed", {
|
|
32
34
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkSQGDDITI_js.EventEmbed; }
|
|
34
36
|
});
|
|
35
37
|
Object.defineProperty(exports, "EventModal", {
|
|
36
38
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkSQGDDITI_js.EventModal; }
|
|
38
40
|
});
|
|
39
41
|
Object.defineProperty(exports, "EventTile", {
|
|
40
42
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkSQGDDITI_js.EventTile; }
|
|
42
44
|
});
|
|
43
45
|
Object.defineProperty(exports, "EventsWidget", {
|
|
44
46
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkSQGDDITI_js.EventsWidget; }
|
|
46
48
|
});
|
|
47
49
|
Object.defineProperty(exports, "OfferingCard", {
|
|
48
50
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkSQGDDITI_js.OfferingCard; }
|
|
50
52
|
});
|
|
51
53
|
Object.defineProperty(exports, "OfferingList", {
|
|
52
54
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkSQGDDITI_js.OfferingList; }
|
|
54
56
|
});
|
|
55
57
|
Object.defineProperty(exports, "ProductDetail", {
|
|
56
58
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkSQGDDITI_js.ProductDetail; }
|
|
58
60
|
});
|
|
59
61
|
Object.defineProperty(exports, "ProductEmbed", {
|
|
60
62
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkSQGDDITI_js.ProductEmbed; }
|
|
62
64
|
});
|
|
63
65
|
Object.defineProperty(exports, "ProductGrid", {
|
|
64
66
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkSQGDDITI_js.ProductGrid; }
|
|
66
68
|
});
|
|
67
69
|
Object.defineProperty(exports, "ProductPage", {
|
|
68
70
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkSQGDDITI_js.ProductPage; }
|
|
70
72
|
});
|
|
71
73
|
Object.defineProperty(exports, "RegistrationForm", {
|
|
72
74
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkSQGDDITI_js.RegistrationForm; }
|
|
74
76
|
});
|
|
75
77
|
Object.defineProperty(exports, "SizeChart", {
|
|
76
78
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkSQGDDITI_js.SizeChart; }
|
|
78
80
|
});
|
|
79
81
|
Object.defineProperty(exports, "UpcomingEvents", {
|
|
80
82
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkSQGDDITI_js.UpcomingEvents; }
|
|
82
84
|
});
|
|
83
85
|
Object.defineProperty(exports, "createCheckoutSession", {
|
|
84
86
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkSQGDDITI_js.createCheckoutSession; }
|
|
86
88
|
});
|
|
87
89
|
Object.defineProperty(exports, "createPaymentIntent", {
|
|
88
90
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkSQGDDITI_js.createPaymentIntent; }
|
|
90
92
|
});
|
|
91
93
|
Object.defineProperty(exports, "fetchActiveProcessor", {
|
|
92
94
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkSQGDDITI_js.fetchActiveProcessor; }
|
|
94
96
|
});
|
|
95
97
|
Object.defineProperty(exports, "fetchCategories", {
|
|
96
98
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkSQGDDITI_js.fetchCategories; }
|
|
98
100
|
});
|
|
99
101
|
Object.defineProperty(exports, "fetchLatestOffering", {
|
|
100
102
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkSQGDDITI_js.fetchLatestOffering; }
|
|
102
104
|
});
|
|
103
105
|
Object.defineProperty(exports, "fetchNextEvent", {
|
|
104
106
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkSQGDDITI_js.fetchNextEvent; }
|
|
106
108
|
});
|
|
107
109
|
Object.defineProperty(exports, "fetchOffering", {
|
|
108
110
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkSQGDDITI_js.fetchOffering; }
|
|
110
112
|
});
|
|
111
113
|
Object.defineProperty(exports, "fetchOfferings", {
|
|
112
114
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkSQGDDITI_js.fetchOfferings; }
|
|
114
116
|
});
|
|
115
117
|
Object.defineProperty(exports, "fetchProcessorConfig", {
|
|
116
118
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkSQGDDITI_js.fetchProcessorConfig; }
|
|
118
120
|
});
|
|
119
121
|
Object.defineProperty(exports, "fetchProductBySlug", {
|
|
120
122
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkSQGDDITI_js.fetchProductBySlug; }
|
|
122
124
|
});
|
|
123
125
|
Object.defineProperty(exports, "fetchProducts", {
|
|
124
126
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkSQGDDITI_js.fetchProducts; }
|
|
126
128
|
});
|
|
127
129
|
Object.defineProperty(exports, "fetchProductsPublic", {
|
|
128
130
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkSQGDDITI_js.fetchProductsPublic; }
|
|
130
132
|
});
|
|
131
133
|
Object.defineProperty(exports, "fetchServices", {
|
|
132
134
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkSQGDDITI_js.fetchServices; }
|
|
134
136
|
});
|
|
135
137
|
Object.defineProperty(exports, "fetchShippingRates", {
|
|
136
138
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkSQGDDITI_js.fetchShippingRates; }
|
|
138
140
|
});
|
|
139
141
|
Object.defineProperty(exports, "fetchUpcomingEvents", {
|
|
140
142
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkSQGDDITI_js.fetchUpcomingEvents; }
|
|
142
144
|
});
|
|
143
145
|
Object.defineProperty(exports, "formatDate", {
|
|
144
146
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkSQGDDITI_js.formatDate; }
|
|
146
148
|
});
|
|
147
149
|
Object.defineProperty(exports, "formatDateRange", {
|
|
148
150
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkSQGDDITI_js.formatDateRange; }
|
|
150
152
|
});
|
|
151
153
|
Object.defineProperty(exports, "formatDateTime", {
|
|
152
154
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkSQGDDITI_js.formatDateTime; }
|
|
154
156
|
});
|
|
155
157
|
Object.defineProperty(exports, "formatPrice", {
|
|
156
158
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkSQGDDITI_js.formatPrice; }
|
|
158
160
|
});
|
|
159
161
|
Object.defineProperty(exports, "formatTime", {
|
|
160
162
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkSQGDDITI_js.formatTime; }
|
|
162
164
|
});
|
|
163
165
|
Object.defineProperty(exports, "getOfferingUrl", {
|
|
164
166
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkSQGDDITI_js.getOfferingUrl; }
|
|
166
168
|
});
|
|
167
169
|
Object.defineProperty(exports, "getRelativeTimeUntil", {
|
|
168
170
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkSQGDDITI_js.getRelativeTimeUntil; }
|
|
170
172
|
});
|
|
171
173
|
Object.defineProperty(exports, "getSpotsRemaining", {
|
|
172
174
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkSQGDDITI_js.getSpotsRemaining; }
|
|
174
176
|
});
|
|
175
177
|
Object.defineProperty(exports, "isEventSoldOut", {
|
|
176
178
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkSQGDDITI_js.isEventSoldOut; }
|
|
178
180
|
});
|
|
179
181
|
Object.defineProperty(exports, "registerForEvent", {
|
|
180
182
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkSQGDDITI_js.registerForEvent; }
|
|
182
184
|
});
|
|
183
185
|
Object.defineProperty(exports, "useEventModal", {
|
|
184
186
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkSQGDDITI_js.useEventModal; }
|
|
186
188
|
});
|
|
187
189
|
Object.defineProperty(exports, "validateAddress", {
|
|
188
190
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkSQGDDITI_js.validateAddress; }
|
|
190
192
|
});
|
|
191
193
|
Object.defineProperty(exports, "validateDiscountCode", {
|
|
192
194
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkSQGDDITI_js.validateDiscountCode; }
|
|
194
196
|
});
|
|
195
197
|
//# sourceMappingURL=index.js.map
|
|
196
198
|
//# sourceMappingURL=index.js.map
|
package/dist/commerce/index.mjs
CHANGED
|
@@ -1,11 +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
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-AX4AROLH.mjs';
|
|
7
|
+
import '../chunk-6EDVCUAG.mjs';
|
|
8
|
+
import '../chunk-VX3WK77I.mjs';
|
|
9
|
+
import '../chunk-BNJH2RFU.mjs';
|
|
10
|
+
import '../chunk-QGPYFC6G.mjs';
|
|
9
11
|
import '../chunk-4XPGGLVP.mjs';
|
|
10
12
|
//# sourceMappingURL=index.mjs.map
|
|
11
13
|
//# sourceMappingURL=index.mjs.map
|
package/dist/engage/index.js
CHANGED
|
@@ -1,13 +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
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XB57AM6T.js');
|
|
9
|
+
require('../chunk-VJMPIRSD.js');
|
|
10
|
+
require('../chunk-XY4NJJEX.js');
|
|
11
|
+
require('../chunk-UXEB6UAR.js');
|
|
12
|
+
require('../chunk-NME3SQCB.js');
|
|
11
13
|
require('../chunk-ZSMWDLMK.js');
|
|
12
14
|
|
|
13
15
|
// src/engage/echo-config.ts
|
|
@@ -39,15 +41,15 @@ function getEchoWidgetProps(config = SONOR_PUBLIC_ECHO_DEFAULTS) {
|
|
|
39
41
|
|
|
40
42
|
Object.defineProperty(exports, "ChatWidget", {
|
|
41
43
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkEH7QQU6P_js.ChatWidget; }
|
|
43
45
|
});
|
|
44
46
|
Object.defineProperty(exports, "DesignRenderer", {
|
|
45
47
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk3KEZ2YHQ_js.DesignRenderer; }
|
|
47
49
|
});
|
|
48
50
|
Object.defineProperty(exports, "EngageWidget", {
|
|
49
51
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk3KEZ2YHQ_js.EngageWidget; }
|
|
51
53
|
});
|
|
52
54
|
exports.SONOR_PUBLIC_ECHO_DEFAULTS = SONOR_PUBLIC_ECHO_DEFAULTS;
|
|
53
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,11 +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
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-AX4AROLH.mjs';
|
|
7
|
+
import '../chunk-6EDVCUAG.mjs';
|
|
8
|
+
import '../chunk-VX3WK77I.mjs';
|
|
9
|
+
import '../chunk-BNJH2RFU.mjs';
|
|
10
|
+
import '../chunk-QGPYFC6G.mjs';
|
|
9
11
|
import '../chunk-4XPGGLVP.mjs';
|
|
10
12
|
|
|
11
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"]}
|