@faststats/react 0.8.1 → 0.8.2
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/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AnalyticsExtension, ConsentMode, ConsentMode as ConsentMode$1, IdentifyOptions, IdentifyOptions as IdentifyOptions$1, IdentifyUser, WebAnalytics, WebAnalyticsOptions, WebAnalyticsOptions as WebAnalyticsOptions$1 } from "@faststats/web";
|
|
2
2
|
//#region src/analytics.d.ts
|
|
3
3
|
type AnalyticsProps = WebAnalyticsOptions$1;
|
|
4
|
-
declare function Analytics(props: AnalyticsProps): null;
|
|
4
|
+
export declare function Analytics(props: AnalyticsProps): null;
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/hooks.d.ts
|
|
7
|
-
declare function useAnalytics(): WebAnalytics | null;
|
|
8
|
-
declare function useTrack(): (name: string, properties?: Record<string, unknown>) => void | undefined;
|
|
9
|
-
declare function useEvent(name: string, properties?: Record<string, unknown>): () => void;
|
|
10
|
-
declare function useIdentify(): (userOrExternalId: IdentifyUser | string, email?: string, options?: IdentifyOptions$1) => Promise<boolean>;
|
|
11
|
-
declare function useLogout(): (resetAnonymousIdentity?: boolean) => void | undefined;
|
|
12
|
-
declare function useConsentMode(): (mode: ConsentMode$1) => void | undefined;
|
|
13
|
-
declare function useOptIn(): () => void | undefined;
|
|
14
|
-
declare function useOptOut(): () => void | undefined;
|
|
7
|
+
export declare function useAnalytics(): WebAnalytics | null;
|
|
8
|
+
export declare function useTrack(): (name: string, properties?: Record<string, unknown>) => void | undefined;
|
|
9
|
+
export declare function useEvent(name: string, properties?: Record<string, unknown>): () => void;
|
|
10
|
+
export declare function useIdentify(): (userOrExternalId: IdentifyUser | string, email?: string, options?: IdentifyOptions$1) => Promise<boolean>;
|
|
11
|
+
export declare function useLogout(): (resetAnonymousIdentity?: boolean) => void | undefined;
|
|
12
|
+
export declare function useConsentMode(): (mode: ConsentMode$1) => void | undefined;
|
|
13
|
+
export declare function useOptIn(): () => void | undefined;
|
|
14
|
+
export declare function useOptOut(): () => void | undefined;
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export type { AnalyticsExtension, AnalyticsProps, ConsentMode, IdentifyOptions, WebAnalyticsOptions };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ function setInstance(wa) {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/analytics.tsx
|
|
22
22
|
const SDK_NAME = "@faststats/react";
|
|
23
|
-
const SDK_VERSION = "0.8.
|
|
23
|
+
const SDK_VERSION = "0.8.2";
|
|
24
24
|
function Analytics(props) {
|
|
25
25
|
const ownedRef = useRef(null);
|
|
26
26
|
const propsRef = useRef(props);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/faststats-dev/faststats-javascript.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.8.
|
|
7
|
+
"version": "0.8.2",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"module": "./dist/index.js",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"react": ">=18"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@faststats/web": "^0.8.
|
|
54
|
+
"@faststats/web": "^0.8.2"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/node": "^26.2.0",
|
|
58
58
|
"@types/react": "^19.2.18",
|
|
59
59
|
"react": "^19.2.8",
|
|
60
|
-
"tsdown": "^0.
|
|
60
|
+
"tsdown": "^0.23.0",
|
|
61
61
|
"typescript": "^6.0.3"
|
|
62
62
|
}
|
|
63
63
|
}
|