@faststats/react 0.2.7 → 0.2.8

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -18,6 +18,10 @@ function setInstance(wa) {
18
18
  for (const l of listeners) l();
19
19
  }
20
20
  //#endregion
21
+ //#region src/sdk.ts
22
+ const SDK_NAME = "@faststats/react";
23
+ const SDK_VERSION = "0.2.8";
24
+ //#endregion
21
25
  //#region src/analytics.tsx
22
26
  function Analytics(props) {
23
27
  const ownedRef = useRef(null);
@@ -28,7 +32,11 @@ function Analytics(props) {
28
32
  if (ownedRef.current) return;
29
33
  const existing = getInstance();
30
34
  if (existing) existing.destroy();
31
- const wa = new WebAnalytics(propsRef.current);
35
+ const wa = new WebAnalytics({
36
+ ...propsRef.current,
37
+ sdkName: SDK_NAME,
38
+ sdkVersion: SDK_VERSION
39
+ });
32
40
  const consentMode = propsRef.current.consent?.mode;
33
41
  if (consentMode !== void 0) wa.setConsentMode(consentMode);
34
42
  ownedRef.current = wa;
package/package.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@faststats/react",
3
3
  "repository": {
4
4
  "type": "git",
5
- "url": "https://github.com/faststats-dev/web-analytics.git"
5
+ "url": "https://github.com/faststats-dev/faststats-javascript.git"
6
6
  },
7
- "version": "0.2.7",
7
+ "version": "0.2.8",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",
10
10
  "module": "./dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "react": ">=18"
32
32
  },
33
33
  "dependencies": {
34
- "@faststats/web": "^0.2.7"
34
+ "@faststats/web": "^0.2.8"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react": "^19.0.0",