@sensiblestats/widget-react 0.157.0 → 0.158.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/CHANGELOG.md +11 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1383,7 +1383,7 @@ function parseCustomTotal(text2, format2) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
|
|
1385
1385
|
// src/version.generated.ts
|
|
1386
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1386
|
+
var WIDGET_REACT_VERSION = "0.158.0";
|
|
1387
1387
|
|
|
1388
1388
|
// src/config.ts
|
|
1389
1389
|
var COLOR_KEYS = ["accent", "cta", "surface", "ink"];
|
|
@@ -1793,6 +1793,8 @@ function toClientOptions(cfg) {
|
|
|
1793
1793
|
const opts = { operatorId: cfg.operatorId, publicKey: cfg.publicKey, client: `${cfg.transport?.client ?? "widget-react"}/${WIDGET_REACT_VERSION}` };
|
|
1794
1794
|
if (cfg.baseUrl !== void 0) opts.baseUrl = cfg.baseUrl;
|
|
1795
1795
|
if (cfg.transport?.fetch !== void 0) opts.fetch = cfg.transport.fetch;
|
|
1796
|
+
const timeZone = validZone(cfg.timeZone);
|
|
1797
|
+
if (timeZone !== void 0) opts.timeZone = timeZone;
|
|
1796
1798
|
return opts;
|
|
1797
1799
|
}
|
|
1798
1800
|
function toUserContext(cfg) {
|
|
@@ -22434,7 +22436,7 @@ function StatsWidget(props) {
|
|
|
22434
22436
|
onUnavailableRef.current?.(reason);
|
|
22435
22437
|
} catch {
|
|
22436
22438
|
}
|
|
22437
|
-
}), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl, cfg?.userContext?.operatorUserId, cfg?.userContext?.anonymousUserId]);
|
|
22439
|
+
}), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl, cfg?.userContext?.operatorUserId, cfg?.userContext?.anonymousUserId, cfg?.timeZone]);
|
|
22438
22440
|
const trackingRef = useRef50({ envelope: { operatorId: "", widgetVersion: WIDGET_REACT_VERSION } });
|
|
22439
22441
|
const track = useMemo17(() => createTracker(() => trackingRef.current), []);
|
|
22440
22442
|
const eventTextRef = useRef50(false);
|