@gurulu/web 1.0.1 → 1.1.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/dist/crypto.d.ts +6 -0
- package/dist/crypto.d.ts.map +1 -0
- package/dist/fingerprint.d.ts +31 -0
- package/dist/fingerprint.d.ts.map +1 -0
- package/dist/react.d.ts +10 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +1431 -0
- package/dist/replay.d.ts +97 -0
- package/dist/replay.d.ts.map +1 -0
- package/package.json +17 -2
package/dist/crypto.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAc9D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface FingerprintComponents {
|
|
2
|
+
ua: string;
|
|
3
|
+
screen: string;
|
|
4
|
+
language: string;
|
|
5
|
+
/** Minutes. */
|
|
6
|
+
tz_offset: number;
|
|
7
|
+
canvas_hash: string;
|
|
8
|
+
audio_hash: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DeviceHint {
|
|
11
|
+
ua_hash: string;
|
|
12
|
+
screen_hash?: string;
|
|
13
|
+
audio_hash?: string;
|
|
14
|
+
tz_offset?: number;
|
|
15
|
+
language?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Compute device fingerprint hint. Returns `null` in non-browser env or when
|
|
19
|
+
* SubtleCrypto unavailable. localStorage cache hit on second call.
|
|
20
|
+
*
|
|
21
|
+
* Caller responsibility — guard with consent check (`categories.fingerprint`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function computeFingerprint(): Promise<DeviceHint | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Sync cache read — `computeFingerprint()` warm path için. SDK init'te
|
|
26
|
+
* async `computeFingerprint()` cache'i populate eder; sonraki sync track
|
|
27
|
+
* çağrılarında bu helper sıfır maliyetle hint döndürür.
|
|
28
|
+
*/
|
|
29
|
+
export declare function readFingerprintCacheSync(): DeviceHint | null;
|
|
30
|
+
export declare function clearFingerprintCache(): void;
|
|
31
|
+
//# sourceMappingURL=fingerprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID;;;;;GAKG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CA0CrE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,UAAU,GAAG,IAAI,CAW5D;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAO5C"}
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { GuruluPublicSDK, InitOptions } from './index.ts';
|
|
3
|
+
export type GuruluProviderProps = InitOptions & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/** Uygulama kökünü sar — mount'ta gurulu.init (idempotent). */
|
|
7
|
+
export declare function GuruluProvider({ children, ...opts }: GuruluProviderProps): ReactNode;
|
|
8
|
+
/** Singleton SDK — track/identify/page/... handler'larında kullan. */
|
|
9
|
+
export declare function useGurulu(): GuruluPublicSDK;
|
|
10
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAExE,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,GAAG,SAAS,CAOpF;AAED,sEAAsE;AACtE,wBAAgB,SAAS,IAAI,eAAe,CAE3C"}
|