posthog-react-native 2.2.0-alpha1 → 2.2.0-alpha3
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 +138 -0
- package/lib/posthog-core/src/eventemitter.d.ts +8 -8
- package/lib/posthog-core/src/eventemitter.js +1 -0
- package/lib/posthog-core/src/eventemitter.js.map +1 -0
- package/lib/posthog-core/src/index.d.ts +102 -102
- package/lib/posthog-core/src/index.js +1 -0
- package/lib/posthog-core/src/index.js.map +1 -0
- package/lib/posthog-core/src/lz-string.d.ts +8 -8
- package/lib/posthog-core/src/lz-string.js +1 -0
- package/lib/posthog-core/src/lz-string.js.map +1 -0
- package/lib/posthog-core/src/storage-memory.d.ts +6 -6
- package/lib/posthog-core/src/storage-memory.js +1 -0
- package/lib/posthog-core/src/storage-memory.js.map +1 -0
- package/lib/posthog-core/src/types.d.ts +77 -77
- package/lib/posthog-core/src/types.js +1 -0
- package/lib/posthog-core/src/types.js.map +1 -0
- package/lib/posthog-core/src/utils.d.ts +12 -12
- package/lib/posthog-core/src/utils.js +1 -0
- package/lib/posthog-core/src/utils.js.map +1 -0
- package/lib/posthog-react-native/index.d.ts +10 -10
- package/lib/posthog-react-native/index.js +1 -0
- package/lib/posthog-react-native/index.js.map +1 -0
- package/lib/posthog-react-native/src/PostHogProvider.d.ts +13 -13
- package/lib/posthog-react-native/src/PostHogProvider.js +1 -0
- package/lib/posthog-react-native/src/PostHogProvider.js.map +1 -0
- package/lib/posthog-react-native/src/PosthogContext.d.ts +5 -5
- package/lib/posthog-react-native/src/PosthogContext.js +1 -0
- package/lib/posthog-react-native/src/PosthogContext.js.map +1 -0
- package/lib/posthog-react-native/src/autocapture.d.ts +3 -3
- package/lib/posthog-react-native/src/autocapture.js +1 -0
- package/lib/posthog-react-native/src/autocapture.js.map +1 -0
- package/lib/posthog-react-native/src/hooks/useFeatureFlag.d.ts +1 -1
- package/lib/posthog-react-native/src/hooks/useFeatureFlag.js +1 -0
- package/lib/posthog-react-native/src/hooks/useFeatureFlag.js.map +1 -0
- package/lib/posthog-react-native/src/hooks/useFeatureFlags.d.ts +3 -3
- package/lib/posthog-react-native/src/hooks/useFeatureFlags.js +1 -0
- package/lib/posthog-react-native/src/hooks/useFeatureFlags.js.map +1 -0
- package/lib/posthog-react-native/src/hooks/useLifecycleTracker.d.ts +2 -2
- package/lib/posthog-react-native/src/hooks/useLifecycleTracker.js +1 -0
- package/lib/posthog-react-native/src/hooks/useLifecycleTracker.js.map +1 -0
- package/lib/posthog-react-native/src/hooks/useNavigationTracker.d.ts +5 -5
- package/lib/posthog-react-native/src/hooks/useNavigationTracker.js +1 -0
- package/lib/posthog-react-native/src/hooks/useNavigationTracker.js.map +1 -0
- package/lib/posthog-react-native/src/hooks/usePostHog.d.ts +2 -2
- package/lib/posthog-react-native/src/hooks/usePostHog.js +1 -0
- package/lib/posthog-react-native/src/hooks/usePostHog.js.map +1 -0
- package/lib/posthog-react-native/src/legacy.d.ts +4 -4
- package/lib/posthog-react-native/src/legacy.js +1 -0
- package/lib/posthog-react-native/src/legacy.js.map +1 -0
- package/lib/posthog-react-native/src/native-deps.d.ts +3 -3
- package/lib/posthog-react-native/src/native-deps.js +1 -0
- package/lib/posthog-react-native/src/native-deps.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalAsyncStorage.d.ts +2 -1
- package/lib/posthog-react-native/src/optional/OptionalAsyncStorage.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalAsyncStorage.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoApplication.d.ts +2 -2
- package/lib/posthog-react-native/src/optional/OptionalExpoApplication.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoApplication.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoDevice.d.ts +2 -2
- package/lib/posthog-react-native/src/optional/OptionalExpoDevice.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoDevice.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoFileSystem.d.ts +2 -2
- package/lib/posthog-react-native/src/optional/OptionalExpoFileSystem.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoFileSystem.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoLocalization.d.ts +2 -2
- package/lib/posthog-react-native/src/optional/OptionalExpoLocalization.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalExpoLocalization.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalReactNativeDeviceInfo.d.ts +2 -1
- package/lib/posthog-react-native/src/optional/OptionalReactNativeDeviceInfo.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalReactNativeDeviceInfo.js.map +1 -0
- package/lib/posthog-react-native/src/optional/OptionalReactNativeNavigation.d.ts +2 -2
- package/lib/posthog-react-native/src/optional/OptionalReactNativeNavigation.js +1 -0
- package/lib/posthog-react-native/src/optional/OptionalReactNativeNavigation.js.map +1 -0
- package/lib/posthog-react-native/src/posthog-rn.d.ts +25 -24
- package/lib/posthog-react-native/src/posthog-rn.js +1 -0
- package/lib/posthog-react-native/src/posthog-rn.js.map +1 -0
- package/lib/posthog-react-native/src/storage.d.ts +15 -14
- package/lib/posthog-react-native/src/storage.js +1 -0
- package/lib/posthog-react-native/src/storage.js.map +1 -0
- package/lib/posthog-react-native/src/types.d.ts +41 -41
- package/lib/posthog-react-native/src/types.js +1 -0
- package/lib/posthog-react-native/src/types.js.map +1 -0
- package/lib/posthog-react-native/src/version.d.ts +1 -0
- package/lib/posthog-react-native/src/version.js +1 -0
- package/lib/posthog-react-native/src/version.js.map +1 -0
- package/lib/posthog-react-native/tsconfig.tsbuildinfo +1 -0
- package/package.json +7 -5
- package/lib/index.cjs.js +0 -2012
- package/lib/index.cjs.js.map +0 -1
- package/lib/index.d.ts +0 -276
- package/lib/index.esm.js +0 -1997
- package/lib/index.esm.js.map +0 -1
- package/lib/node_modules/tslib/tslib.es6.d.ts +0 -35
- package/lib/posthog-react-native/src/optional/warning.d.ts +0 -1
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
export declare type PosthogCoreOptions = {
|
|
2
|
-
host?: string;
|
|
3
|
-
flushAt?: number;
|
|
4
|
-
flushInterval?: number;
|
|
5
|
-
enable?: boolean;
|
|
6
|
-
sendFeatureFlagEvent?: boolean;
|
|
7
|
-
preloadFeatureFlags?: boolean;
|
|
8
|
-
bootstrap?: {
|
|
9
|
-
distinctId?: string;
|
|
10
|
-
isIdentifiedId?: boolean;
|
|
11
|
-
featureFlags?: Record<string, boolean | string>;
|
|
12
|
-
};
|
|
13
|
-
fetchRetryCount?: number;
|
|
14
|
-
fetchRetryDelay?: number;
|
|
15
|
-
sessionExpirationTimeSeconds?: number;
|
|
16
|
-
captureMode?: 'json' | 'form';
|
|
17
|
-
};
|
|
18
|
-
export declare enum PostHogPersistedProperty {
|
|
19
|
-
AnonymousId = "anonymous_id",
|
|
20
|
-
DistinctId = "distinct_id",
|
|
21
|
-
Props = "props",
|
|
22
|
-
FeatureFlags = "feature_flags",
|
|
23
|
-
OverrideFeatureFlags = "override_feature_flags",
|
|
24
|
-
Queue = "queue",
|
|
25
|
-
OptedOut = "opted_out",
|
|
26
|
-
SessionId = "session_id",
|
|
27
|
-
SessionLastTimestamp = "session_timestamp",
|
|
28
|
-
PersonProperties = "person_properties",
|
|
29
|
-
GroupProperties = "group_properties"
|
|
30
|
-
}
|
|
31
|
-
export declare type PostHogFetchOptions = {
|
|
32
|
-
method: 'GET' | 'POST' | 'PUT' | 'PATCH';
|
|
33
|
-
mode?: 'no-cors';
|
|
34
|
-
credentials?: 'omit';
|
|
35
|
-
headers: {
|
|
36
|
-
[key: string]: string;
|
|
37
|
-
};
|
|
38
|
-
body?: string;
|
|
39
|
-
signal?: AbortSignal;
|
|
40
|
-
};
|
|
41
|
-
export declare type PostHogFetchResponse = {
|
|
42
|
-
status: number;
|
|
43
|
-
text: () => Promise<string>;
|
|
44
|
-
json: () => Promise<any>;
|
|
45
|
-
};
|
|
46
|
-
export declare type PostHogQueueItem = {
|
|
47
|
-
message: any;
|
|
48
|
-
callback?: (err: any) => void;
|
|
49
|
-
};
|
|
50
|
-
export declare type PostHogEventProperties = {
|
|
51
|
-
[key: string]: any;
|
|
52
|
-
};
|
|
53
|
-
export declare type PostHogAutocaptureElement = {
|
|
54
|
-
$el_text?: string;
|
|
55
|
-
tag_name: string;
|
|
56
|
-
href?: string;
|
|
57
|
-
nth_child?: number;
|
|
58
|
-
nth_of_type?: number;
|
|
59
|
-
order?: number;
|
|
60
|
-
} & {
|
|
61
|
-
[key: string]: any;
|
|
62
|
-
};
|
|
63
|
-
export declare type PostHogDecideResponse = {
|
|
64
|
-
config: {
|
|
65
|
-
enable_collect_everything: boolean;
|
|
66
|
-
};
|
|
67
|
-
editorParams: {
|
|
68
|
-
toolbarVersion: string;
|
|
69
|
-
jsURL: string;
|
|
70
|
-
};
|
|
71
|
-
isAuthenticated: true;
|
|
72
|
-
supportedCompression: string[];
|
|
73
|
-
featureFlags: {
|
|
74
|
-
[key: string]: string | boolean;
|
|
75
|
-
};
|
|
76
|
-
sessionRecording: boolean;
|
|
77
|
-
};
|
|
1
|
+
export declare type PosthogCoreOptions = {
|
|
2
|
+
host?: string;
|
|
3
|
+
flushAt?: number;
|
|
4
|
+
flushInterval?: number;
|
|
5
|
+
enable?: boolean;
|
|
6
|
+
sendFeatureFlagEvent?: boolean;
|
|
7
|
+
preloadFeatureFlags?: boolean;
|
|
8
|
+
bootstrap?: {
|
|
9
|
+
distinctId?: string;
|
|
10
|
+
isIdentifiedId?: boolean;
|
|
11
|
+
featureFlags?: Record<string, boolean | string>;
|
|
12
|
+
};
|
|
13
|
+
fetchRetryCount?: number;
|
|
14
|
+
fetchRetryDelay?: number;
|
|
15
|
+
sessionExpirationTimeSeconds?: number;
|
|
16
|
+
captureMode?: 'json' | 'form';
|
|
17
|
+
};
|
|
18
|
+
export declare enum PostHogPersistedProperty {
|
|
19
|
+
AnonymousId = "anonymous_id",
|
|
20
|
+
DistinctId = "distinct_id",
|
|
21
|
+
Props = "props",
|
|
22
|
+
FeatureFlags = "feature_flags",
|
|
23
|
+
OverrideFeatureFlags = "override_feature_flags",
|
|
24
|
+
Queue = "queue",
|
|
25
|
+
OptedOut = "opted_out",
|
|
26
|
+
SessionId = "session_id",
|
|
27
|
+
SessionLastTimestamp = "session_timestamp",
|
|
28
|
+
PersonProperties = "person_properties",
|
|
29
|
+
GroupProperties = "group_properties"
|
|
30
|
+
}
|
|
31
|
+
export declare type PostHogFetchOptions = {
|
|
32
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH';
|
|
33
|
+
mode?: 'no-cors';
|
|
34
|
+
credentials?: 'omit';
|
|
35
|
+
headers: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
body?: string;
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
};
|
|
41
|
+
export declare type PostHogFetchResponse = {
|
|
42
|
+
status: number;
|
|
43
|
+
text: () => Promise<string>;
|
|
44
|
+
json: () => Promise<any>;
|
|
45
|
+
};
|
|
46
|
+
export declare type PostHogQueueItem = {
|
|
47
|
+
message: any;
|
|
48
|
+
callback?: (err: any) => void;
|
|
49
|
+
};
|
|
50
|
+
export declare type PostHogEventProperties = {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
};
|
|
53
|
+
export declare type PostHogAutocaptureElement = {
|
|
54
|
+
$el_text?: string;
|
|
55
|
+
tag_name: string;
|
|
56
|
+
href?: string;
|
|
57
|
+
nth_child?: number;
|
|
58
|
+
nth_of_type?: number;
|
|
59
|
+
order?: number;
|
|
60
|
+
} & {
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
};
|
|
63
|
+
export declare type PostHogDecideResponse = {
|
|
64
|
+
config: {
|
|
65
|
+
enable_collect_everything: boolean;
|
|
66
|
+
};
|
|
67
|
+
editorParams: {
|
|
68
|
+
toolbarVersion: string;
|
|
69
|
+
jsURL: string;
|
|
70
|
+
};
|
|
71
|
+
isAuthenticated: true;
|
|
72
|
+
supportedCompression: string[];
|
|
73
|
+
featureFlags: {
|
|
74
|
+
[key: string]: string | boolean;
|
|
75
|
+
};
|
|
76
|
+
sessionRecording: boolean;
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogPersistedProperty=void 0;var PostHogPersistedProperty;exports.PostHogPersistedProperty=PostHogPersistedProperty;(function(PostHogPersistedProperty){PostHogPersistedProperty["AnonymousId"]="anonymous_id";PostHogPersistedProperty["DistinctId"]="distinct_id";PostHogPersistedProperty["Props"]="props";PostHogPersistedProperty["FeatureFlags"]="feature_flags";PostHogPersistedProperty["OverrideFeatureFlags"]="override_feature_flags";PostHogPersistedProperty["Queue"]="queue";PostHogPersistedProperty["OptedOut"]="opted_out";PostHogPersistedProperty["SessionId"]="session_id";PostHogPersistedProperty["SessionLastTimestamp"]="session_timestamp";PostHogPersistedProperty["PersonProperties"]="person_properties";PostHogPersistedProperty["GroupProperties"]="group_properties";})(PostHogPersistedProperty||(exports.PostHogPersistedProperty=PostHogPersistedProperty={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../posthog-core/src/types.ts"],"names":[],"mappings":"AA6BA,MAAM,CAAN,IAAY,wBAYX;AAZD,WAAY,wBAAwB;IAClC,wDAA4B,CAAA;IAC5B,sDAA0B,CAAA;IAC1B,2CAAe,CAAA;IACf,0DAA8B,CAAA;IAC9B,2EAA+C,CAAA;IAC/C,2CAAe,CAAA;IACf,kDAAsB,CAAA;IACtB,oDAAwB,CAAA;IACxB,sEAA0C,CAAA;IAC1C,kEAAsC,CAAA;IACtC,gEAAoC,CAAA;AACtC,CAAC,EAZW,wBAAwB,KAAxB,wBAAwB,QAYnC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare function assert(truthyValue: any, message: string): void;
|
|
2
|
-
export declare function removeTrailingSlash(url: string): string;
|
|
3
|
-
export interface RetriableOptions {
|
|
4
|
-
retryCount?: number;
|
|
5
|
-
retryDelay?: number;
|
|
6
|
-
retryCheck?: (err: any) => true;
|
|
7
|
-
}
|
|
8
|
-
export declare function retriable<T>(fn: () => Promise<T>, props?: RetriableOptions): Promise<T>;
|
|
9
|
-
export declare function generateUUID(globalThis?: any): string;
|
|
10
|
-
export declare function currentTimestamp(): number;
|
|
11
|
-
export declare function currentISOTime(): string;
|
|
12
|
-
export declare function safeSetTimeout(fn: () => void, timeout: number): any;
|
|
1
|
+
export declare function assert(truthyValue: any, message: string): void;
|
|
2
|
+
export declare function removeTrailingSlash(url: string): string;
|
|
3
|
+
export interface RetriableOptions {
|
|
4
|
+
retryCount?: number;
|
|
5
|
+
retryDelay?: number;
|
|
6
|
+
retryCheck?: (err: any) => true;
|
|
7
|
+
}
|
|
8
|
+
export declare function retriable<T>(fn: () => Promise<T>, props?: RetriableOptions): Promise<T>;
|
|
9
|
+
export declare function generateUUID(globalThis?: any): string;
|
|
10
|
+
export declare function currentTimestamp(): number;
|
|
11
|
+
export declare function currentISOTime(): string;
|
|
12
|
+
export declare function safeSetTimeout(fn: () => void, timeout: number): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.assert=assert;exports.currentISOTime=currentISOTime;exports.currentTimestamp=currentTimestamp;exports.generateUUID=generateUUID;exports.removeTrailingSlash=removeTrailingSlash;exports.retriable=retriable;exports.safeSetTimeout=safeSetTimeout;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));function assert(truthyValue,message){if(!truthyValue){throw new Error(message);}}function removeTrailingSlash(url){return url===null||url===void 0?void 0:url.replace(/\/+$/,'');}function retriable(_x){return _retriable.apply(this,arguments);}function _retriable(){_retriable=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(fn){var props,_props$retryCount,retryCount,_props$retryDelay,retryDelay,_props$retryCheck,retryCheck,lastError,i,res,_args=arguments;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:props=_args.length>1&&_args[1]!==undefined?_args[1]:{};_props$retryCount=props.retryCount,retryCount=_props$retryCount===void 0?3:_props$retryCount,_props$retryDelay=props.retryDelay,retryDelay=_props$retryDelay===void 0?5000:_props$retryDelay,_props$retryCheck=props.retryCheck,retryCheck=_props$retryCheck===void 0?function(){return true;}:_props$retryCheck;lastError=null;i=0;case 4:if(!(i<retryCount+1)){_context.next=22;break;}_context.prev=5;_context.next=8;return fn();case 8:res=_context.sent;return _context.abrupt("return",res);case 12:_context.prev=12;_context.t0=_context["catch"](5);lastError=_context.t0;if(retryCheck(_context.t0)){_context.next=17;break;}throw _context.t0;case 17:_context.next=19;return new Promise(function(r){return setTimeout(r,retryDelay);});case 19:i++;_context.next=4;break;case 22:throw lastError;case 23:case"end":return _context.stop();}}},_callee,null,[[5,12]]);}));return _retriable.apply(this,arguments);}function generateUUID(globalThis){var d=new Date().getTime();var d2=globalThis&&globalThis.performance&&globalThis.performance.now&&globalThis.performance.now()*1000||0;return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16;if(d>0){r=(d+r)%16|0;d=Math.floor(d/16);}else{r=(d2+r)%16|0;d2=Math.floor(d2/16);}return(c==='x'?r:r&0x3|0x8).toString(16);});}function currentTimestamp(){return new Date().getTime();}function currentISOTime(){return new Date().toISOString();}function safeSetTimeout(fn,timeout){var t=setTimeout(fn,timeout);(t===null||t===void 0?void 0:t.unref)&&(t===null||t===void 0?void 0:t.unref());return t;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../posthog-core/src/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,WAAgB,EAAE,OAAe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AA;IACtB,OAAO,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PostHog } from './src/posthog-rn';
|
|
2
|
-
export default PostHog;
|
|
3
|
-
export * from './src/posthog-rn';
|
|
4
|
-
export * from './src/hooks/useLifecycleTracker';
|
|
5
|
-
export * from './src/hooks/useNavigationTracker';
|
|
6
|
-
export * from './src/hooks/useFeatureFlags';
|
|
7
|
-
export * from './src/hooks/useFeatureFlag';
|
|
8
|
-
export * from './src/hooks/usePostHog';
|
|
9
|
-
export * from './src/PostHogProvider';
|
|
10
|
-
export * from './src/types';
|
|
1
|
+
import { PostHog } from './src/posthog-rn';
|
|
2
|
+
export default PostHog;
|
|
3
|
+
export * from './src/posthog-rn';
|
|
4
|
+
export * from './src/hooks/useLifecycleTracker';
|
|
5
|
+
export * from './src/hooks/useNavigationTracker';
|
|
6
|
+
export * from './src/hooks/useFeatureFlags';
|
|
7
|
+
export * from './src/hooks/useFeatureFlag';
|
|
8
|
+
export * from './src/hooks/usePostHog';
|
|
9
|
+
export * from './src/PostHogProvider';
|
|
10
|
+
export * from './src/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports["default"]=void 0;var _posthogRn=require("./src/posthog-rn");Object.keys(_posthogRn).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_posthogRn[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _posthogRn[key];}});});var _useLifecycleTracker=require("./src/hooks/useLifecycleTracker");Object.keys(_useLifecycleTracker).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useLifecycleTracker[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useLifecycleTracker[key];}});});var _useNavigationTracker=require("./src/hooks/useNavigationTracker");Object.keys(_useNavigationTracker).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useNavigationTracker[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useNavigationTracker[key];}});});var _useFeatureFlags=require("./src/hooks/useFeatureFlags");Object.keys(_useFeatureFlags).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useFeatureFlags[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useFeatureFlags[key];}});});var _useFeatureFlag=require("./src/hooks/useFeatureFlag");Object.keys(_useFeatureFlag).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useFeatureFlag[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useFeatureFlag[key];}});});var _usePostHog=require("./src/hooks/usePostHog");Object.keys(_usePostHog).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_usePostHog[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _usePostHog[key];}});});var _PostHogProvider=require("./src/PostHogProvider");Object.keys(_PostHogProvider).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PostHogProvider[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PostHogProvider[key];}});});var _types=require("./src/types");Object.keys(_types).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_types[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _types[key];}});});var _default=_posthogRn.PostHog;exports["default"]=_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,eAAe,OAAO,CAAA;AACtB,cAAc,kBAAkB,CAAA;AAChC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { PostHog, PostHogOptions } from './posthog-rn';
|
|
4
|
-
import { PostHogAutocaptureOptions } from './types';
|
|
5
|
-
export interface PostHogProviderProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
options?: PostHogOptions;
|
|
8
|
-
apiKey?: string;
|
|
9
|
-
client?: PostHog;
|
|
10
|
-
autocapture?: boolean | PostHogAutocaptureOptions;
|
|
11
|
-
style?: StyleProp<ViewStyle>;
|
|
12
|
-
}
|
|
13
|
-
export declare const PostHogProvider: ({ children, client, options, apiKey, autocapture, style, }: PostHogProviderProps) => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { PostHog, PostHogOptions } from './posthog-rn';
|
|
4
|
+
import { PostHogAutocaptureOptions } from './types';
|
|
5
|
+
export interface PostHogProviderProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
options?: PostHogOptions;
|
|
8
|
+
apiKey?: string;
|
|
9
|
+
client?: PostHog;
|
|
10
|
+
autocapture?: boolean | PostHogAutocaptureOptions;
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
}
|
|
13
|
+
export declare const PostHogProvider: ({ children, client, options, apiKey, autocapture, style, }: PostHogProviderProps) => JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogProvider=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _posthogRn=require("./posthog-rn");var _autocapture=require("./autocapture");var _useNavigationTracker=require("./hooks/useNavigationTracker");var _useLifecycleTracker=require("./hooks/useLifecycleTracker");var _PosthogContext=require("./PosthogContext");var _this=void 0,_jsxFileName="/home/runner/work/posthog-js-lite/posthog-js-lite/posthog-react-native/lib/posthog-react-native/src/PostHogProvider.js";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{"default":obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj["default"]=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PostHogNavigationHook(_ref){var options=_ref.options;(0,_useNavigationTracker.useNavigationTracker)(options===null||options===void 0?void 0:options.navigation);return null;}function PostHogLifecycleHook(){(0,_useLifecycleTracker.useLifecycleTracker)();return null;}var PostHogProvider=function PostHogProvider(_ref2){var children=_ref2.children,client=_ref2.client,options=_ref2.options,apiKey=_ref2.apiKey,autocapture=_ref2.autocapture,style=_ref2.style;var _a,_b;var _useState=(0,_react.useState)(client),_useState2=(0,_slicedToArray2["default"])(_useState,2),posthog=_useState2[0],setPosthog=_useState2[1];(0,_react.useEffect)(function(){if(apiKey&&!posthog){_posthogRn.PostHog.initAsync(apiKey,options).then(setPosthog);}},[apiKey]);var autocaptureOptions=autocapture&&typeof autocapture!=='boolean'?autocapture:{};var captureTouches=posthog&&(autocapture===true||(autocaptureOptions===null||autocaptureOptions===void 0?void 0:autocaptureOptions.captureTouches));var captureScreens=posthog&&(autocapture===true||((_a=autocaptureOptions===null||autocaptureOptions===void 0?void 0:autocaptureOptions.captureScreens)!==null&&_a!==void 0?_a:true));var captureLifecycle=posthog&&(autocapture===true||((_b=autocaptureOptions===null||autocaptureOptions===void 0?void 0:autocaptureOptions.captureLifecycleEvents)!==null&&_b!==void 0?_b:true));var onTouch=(0,_react.useCallback)(function(type,e){if(!captureTouches){return;}if(type==='end'){(0,_autocapture.autocaptureFromTouchEvent)(e,posthog,autocaptureOptions);}},[posthog,autocapture]);return _react["default"].createElement(_reactNative.View,{"ph-label":"PostHogProvider",style:style||{flex:1},onTouchEndCapture:captureTouches?function(e){return onTouch('end',e);}:undefined,__self:_this,__source:{fileName:_jsxFileName,lineNumber:37,columnNumber:13}},_react["default"].createElement(_PosthogContext.PostHogContext.Provider,{value:{client:posthog},__self:_this,__source:{fileName:_jsxFileName,lineNumber:38,columnNumber:7}},_react["default"].createElement(_react["default"].Fragment,null,captureScreens?_react["default"].createElement(PostHogNavigationHook,{options:autocaptureOptions,__self:_this,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:29}}):null,captureLifecycle?_react["default"].createElement(PostHogLifecycleHook,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:41,columnNumber:31}}):null),children));};exports.PostHogProvider=PostHogProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostHogProvider.js","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qBAAqB,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,EAAG,CAAC,CAAC,CAAC,IAAI,CAC/E;UAAA,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,AAAD,EAAG,CAAC,CAAC,CAAC,IAAI,CACrD;QAAA,GACA;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,cAAc,CAAC,QAAQ,CAC3B;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PostHog } from './posthog-rn';
|
|
3
|
-
export declare const PostHogContext: React.Context<{
|
|
4
|
-
client?: PostHog | undefined;
|
|
5
|
-
}>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PostHog } from './posthog-rn';
|
|
3
|
+
export declare const PostHogContext: React.Context<{
|
|
4
|
+
client?: PostHog | undefined;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogContext=void 0;var _react=_interopRequireDefault(require("react"));var PostHogContext=_react["default"].createContext({client:undefined});exports.PostHogContext=PostHogContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PosthogContext.js","sourceRoot":"","sources":["../../../src/PosthogContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAAuB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PostHog } from './posthog-rn';
|
|
2
|
-
import { PostHogAutocaptureOptions } from './types';
|
|
3
|
-
export declare const autocaptureFromTouchEvent: (e: any, posthog: PostHog, options?: PostHogAutocaptureOptions) => void;
|
|
1
|
+
import { PostHog } from './posthog-rn';
|
|
2
|
+
import { PostHogAutocaptureOptions } from './types';
|
|
3
|
+
export declare const autocaptureFromTouchEvent: (e: any, posthog: PostHog, options?: PostHogAutocaptureOptions) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.autocaptureFromTouchEvent=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var flattenStyles=function flattenStyles(styles){var flattened={};if(Array.isArray(styles)){var _iterator=_createForOfIteratorHelper(styles),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var style=_step.value;Object.assign(flattened,flattenStyles(style));}}catch(err){_iterator.e(err);}finally{_iterator.f();}}else{Object.assign(flattened,styles);}return flattened;};var stringifyStyle=function stringifyStyle(styles){var flattened=flattenStyles(styles);var str=Object.keys(flattened).map(function(x){return"".concat(x,":").concat(flattened[x]);}).join(';');return str;};var sanitiseLabel=function sanitiseLabel(label){return label.replace(/[^a-z0-9]+/gi,'-');};var autocaptureFromTouchEvent=function autocaptureFromTouchEvent(e,posthog){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var _a,_b;var _options$noCapturePro=options.noCaptureProp,noCaptureProp=_options$noCapturePro===void 0?'ph-no-capture':_options$noCapturePro,_options$customLabelP=options.customLabelProp,customLabelProp=_options$customLabelP===void 0?'ph-label':_options$customLabelP,_options$maxElementsC=options.maxElementsCaptured,maxElementsCaptured=_options$maxElementsC===void 0?20:_options$maxElementsC,_options$ignoreLabels=options.ignoreLabels,ignoreLabels=_options$ignoreLabels===void 0?[]:_options$ignoreLabels,_options$propsToCaptu=options.propsToCapture,propsToCapture=_options$propsToCaptu===void 0?['style','testID','accessibilityLabel','ph-label']:_options$propsToCaptu;if(!e._targetInst){return;}var elements=[];var currentInst=e._targetInst;var _loop=function _loop(){var el={tag_name:''};var props=currentInst.memoizedProps;if(props===null||props===void 0?void 0:props[noCaptureProp]){return{v:void 0};}if(props){Object.keys(props).forEach(function(key){if(!propsToCapture.includes(key)){return;}var value=props[key];if(key==='style'){el.attr__style=stringifyStyle(value);}else if(['string','number','boolean'].includes((0,_typeof2["default"])(value))){if(key==='children'){el.$el_text=typeof value==='string'?value:JSON.stringify(value);}else{el["attr__".concat(key)]=value;}}});}var label=typeof(props===null||props===void 0?void 0:props[customLabelProp])!=='undefined'?"".concat(props[customLabelProp]):((_a=currentInst.elementType)===null||_a===void 0?void 0:_a.displayName)||((_b=currentInst.elementType)===null||_b===void 0?void 0:_b.name);if(label&&!ignoreLabels.includes(label)){el.tag_name=sanitiseLabel(label);elements.push(el);}currentInst=currentInst["return"];};while(currentInst&&elements.length<maxElementsCaptured){var _ret=_loop();if((0,_typeof2["default"])(_ret)==="object")return _ret.v;}if(elements.length){posthog.autocapture('touch',elements,{$touch_x:e.nativeEvent.pageX,$touch_y:e.nativeEvent.pageY});}};exports.autocaptureFromTouchEvent=autocaptureFromTouchEvent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocapture.js","sourceRoot":"","sources":["../../../src/autocapture.tsx"],"names":[],"mappings":"AAaA,MAAM,aAAa,GAAG,CAAC,MAAW,EAAO,EAAE;IACzC,MAAM,SAAS,GAAQ,EAAE,CAAA;IAEzB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC1B,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;SAC/C;KACF;SAAM;QACL,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;KACjC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,MAAW,EAAU,EAAE;IAC7C,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,CAAA;IAEvC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;SAC/B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;SAClC,IAAI,CAAC,GAAG,CAAC,CAAA;IAEZ,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,CAAA;AAC3C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC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G,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;qBACxE;yBAAM;wBACL,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,KAAK,CAAA;qBAC3B;iBACF;YACH,CAAC,CAAC,CAAA;SACH;QAED,gCAAgC;QAChC,MAAM,KAAK,GACT,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,eAAe,CAAC,CAAA,KAAK,WAAW;YAC7C,CAAC,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,EAAE;YAC7B,CAAC,CAAC,CAAA,MAAA,WAAW,CAAC,WAAW,0CAAE,WAAW,MAAI,MAAA,WAAW,CAAC,WAAW,0CAAE,IAAI,CAAA,CAAA;QAE3E,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC1C,EAAE,CAAC,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;YAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;SAClB;QAED,WAAW,GAAG,WAAW,CAAC,MAAM,CAAA;KACjC;IAED,IAAI,QAAQ,CAAC,MAAM,EAAE;QACnB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE;YACrC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK;YAC7B,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK;SAC9B,CAAC,CAAA;KACH;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useFeatureFlag(flag: string): string | boolean | undefined;
|
|
1
|
+
export declare function useFeatureFlag(flag: string): string | boolean | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useFeatureFlag=useFeatureFlag;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _usePostHog=require("./usePostHog");function useFeatureFlag(flag){var posthog=(0,_usePostHog.usePostHog)();var _useState=(0,_react.useState)(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag)),_useState2=(0,_slicedToArray2["default"])(_useState,2),featureFlag=_useState2[0],setFeatureFlag=_useState2[1];if(!posthog){return featureFlag;}(0,_react.useEffect)(function(){setFeatureFlag(posthog.getFeatureFlag(flag));return posthog.onFeatureFlags(function(){setFeatureFlag(posthog.getFeatureFlag(flag));});},[posthog,flag]);return featureFlag;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFeatureFlag.js","sourceRoot":"","sources":["../../../../src/hooks/useFeatureFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAE5B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAA+B,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;IAE3G,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,WAAW,CAAA;KACnB;IAED,SAAS,CAAC,GAAG,EAAE;QACb,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE;YACjC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAEnB,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { PostHog } from '../posthog-rn';
|
|
2
|
-
import { PostHogDecideResponse } from 'posthog-core';
|
|
3
|
-
export declare function useFeatureFlags(client?: PostHog): PostHogDecideResponse['featureFlags'] | undefined;
|
|
1
|
+
import type { PostHog } from '../posthog-rn';
|
|
2
|
+
import { PostHogDecideResponse } from 'posthog-core';
|
|
3
|
+
export declare function useFeatureFlags(client?: PostHog): PostHogDecideResponse['featureFlags'] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useFeatureFlags=useFeatureFlags;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _usePostHog=require("./usePostHog");function useFeatureFlags(client){var contextClient=(0,_usePostHog.usePostHog)();var posthog=client||contextClient;var _useState=(0,_react.useState)(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlags()),_useState2=(0,_slicedToArray2["default"])(_useState,2),featureFlags=_useState2[0],setFeatureFlags=_useState2[1];if(!posthog){return featureFlags;}(0,_react.useEffect)(function(){setFeatureFlags(posthog.getFeatureFlags());return posthog.onFeatureFlags(function(flags){setFeatureFlags(flags);});},[posthog]);return featureFlags;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFeatureFlags.js","sourceRoot":"","sources":["../../../../src/hooks/useFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,eAAe,CAAC,MAAgB;IAC9C,MAAM,aAAa,GAAG,UAAU,EAAE,CAAA;IAClC,MAAM,OAAO,GAAG,MAAM,IAAI,aAAa,CAAA;IAEvC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,EAAE,CAC3B,CAAA;IAED,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,YAAY,CAAA;KACpB;IAED,SAAS,CAAC,GAAG,EAAE;QACb,eAAe,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;QAC1C,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,EAAE;YACtC,eAAe,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PostHog } from '../posthog-rn';
|
|
2
|
-
export declare function useLifecycleTracker(client?: PostHog): void;
|
|
1
|
+
import type { PostHog } from '../posthog-rn';
|
|
2
|
+
export declare function useLifecycleTracker(client?: PostHog): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.useLifecycleTracker=useLifecycleTracker;var _react=require("react");var _reactNative=require("react-native");var _usePostHog=require("./usePostHog");function useLifecycleTracker(client){var openTrackedRef=(0,_react.useRef)(false);var contextClient=(0,_usePostHog.usePostHog)();var posthog=client||contextClient;return(0,_react.useEffect)(function(){if(!posthog){return;}if(!openTrackedRef.current){openTrackedRef.current=true;posthog.capture('Application Opened');}var subscription=_reactNative.AppState.addEventListener('change',function(nextAppState){switch(nextAppState){case'active':return posthog.capture('Application Became Active');case'background':return posthog.capture('Application Backgrounded');default:return;}});return function(){return subscription.remove();};},[posthog]);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLifecycleTracker.js","sourceRoot":"","sources":["../../../../src/hooks/useLifecycleTracker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,mBAAmB,CAAC,MAAgB;IAClD,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACpC,MAAM,aAAa,GAAG,UAAU,EAAE,CAAA;IAClC,MAAM,OAAO,GAAG,MAAM,IAAI,aAAa,CAAA;IAEvC,OAAO,SAAS,CAAC,GAAG,EAAE;QACpB,IAAI,CAAC,OAAO,EAAE;YACZ,OAAM;SACP;QAED,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YAC3B,cAAc,CAAC,OAAO,GAAG,IAAI,CAAA;YAC7B,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;SACtC;QACD,MAAM,YAAY,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,EAAE;YACxE,QAAQ,YAAY,EAAE;gBACpB,KAAK,QAAQ;oBACX,OAAO,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAA;gBACrD,KAAK,YAAY;oBACf,OAAO,OAAO,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAA;gBACpD;oBACE,OAAM;aACT;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAA;IACpC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;AACf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PostHog } from '../posthog-rn';
|
|
2
|
-
import { PostHogAutocaptureNavigationTrackerOptions } from '../types';
|
|
3
|
-
declare function _useNavigationTracker(options?: PostHogAutocaptureNavigationTrackerOptions, client?: PostHog): void;
|
|
4
|
-
export declare const useNavigationTracker: typeof _useNavigationTracker;
|
|
5
|
-
export {};
|
|
1
|
+
import type { PostHog } from '../posthog-rn';
|
|
2
|
+
import { PostHogAutocaptureNavigationTrackerOptions } from '../types';
|
|
3
|
+
declare function _useNavigationTracker(options?: PostHogAutocaptureNavigationTrackerOptions, client?: PostHog): void;
|
|
4
|
+
export declare const useNavigationTracker: typeof _useNavigationTracker;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.useNavigationTracker=void 0;var _react=require("react");var _OptionalReactNativeNavigation=require("../optional/OptionalReactNativeNavigation");var _usePostHog=require("./usePostHog");function _useNavigationTrackerDisabled(){return;}function _useNavigationTracker(options,client){var contextClient=(0,_usePostHog.usePostHog)();var posthog=client||contextClient;if(!_OptionalReactNativeNavigation.OptionalReactNativeNavigation){return;}var routes=_OptionalReactNativeNavigation.OptionalReactNativeNavigation.useNavigationState(function(state){return state===null||state===void 0?void 0:state.routes;});var navigation=_OptionalReactNativeNavigation.OptionalReactNativeNavigation.useNavigation();var trackRoute=function trackRoute(){var _a,_b,_c;if(!posthog){return;}var currentRoute=navigation.getCurrentRoute();if(!currentRoute){return;}var state=currentRoute.state;var name=currentRoute.name,params=currentRoute.params;if((_a=state===null||state===void 0?void 0:state.routes)===null||_a===void 0?void 0:_a.length){var route=state.routes[state.routes.length-1];name=route.name;params=route.params;}var currentRouteName=((_b=options===null||options===void 0?void 0:options.routeToName)===null||_b===void 0?void 0:_b.call(options,name,params))||name||'Unknown';if(currentRouteName){var properties=(_c=options===null||options===void 0?void 0:options.routeToProperties)===null||_c===void 0?void 0:_c.call(options,currentRouteName,params);posthog.screen(currentRouteName,properties);}};(0,_react.useEffect)(function(){if(!routes){setTimeout(trackRoute,1);return;}trackRoute();},[routes]);}var useNavigationTracker=_OptionalReactNativeNavigation.OptionalReactNativeNavigation?_useNavigationTracker:_useNavigationTrackerDisabled;exports.useNavigationTracker=useNavigationTracker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationTracker.js","sourceRoot":"","sources":["../../../../src/h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,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,wDAAG,IAAI,EAAE,MAAM,CAAC,KAAI,IAAI,IAAI,SAAS,CAAA;QAElF,IAAI,gBAAgB,EAAE;YACpB,MAAM,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,wDAAG,gBAAgB,EAAE,MAAM,CAAC,CAAA;YACzE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;SAC7C;IACH,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,mJAAmJ;QACnJ,sDAAsD;QACtD,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;YACzB,OAAM;SACP;QACD,UAAU,EAAE,CAAA;IACd,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AACd,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B;IAC/D,CAAC,CAAC,qBAAqB;IACvB,CAAC,CAAC,6BAA6B,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PostHog } from '../posthog-rn';
|
|
2
|
-
export declare const usePostHog: () => PostHog | undefined;
|
|
1
|
+
import { PostHog } from '../posthog-rn';
|
|
2
|
+
export declare const usePostHog: () => PostHog | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.usePostHog=void 0;var _react=_interopRequireDefault(require("react"));var _PosthogContext=require("../PosthogContext");var usePostHog=function usePostHog(){var _React$useContext=_react["default"].useContext(_PosthogContext.PostHogContext),client=_React$useContext.client;return client;};exports.usePostHog=usePostHog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePostHog.js","sourceRoot":"","sources":["../../../../src/hooks/usePostHog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAwB,EAAE;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;IACnD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getLegacyValues: () => Promise<{
|
|
2
|
-
distinctId?: string;
|
|
3
|
-
anonymousId?: string;
|
|
4
|
-
} | undefined>;
|
|
1
|
+
export declare const getLegacyValues: () => Promise<{
|
|
2
|
+
distinctId?: string;
|
|
3
|
+
anonymousId?: string;
|
|
4
|
+
} | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getLegacyValues=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _OptionalExpoApplication=require("./optional/OptionalExpoApplication");var _OptionalExpoFileSystem=require("./optional/OptionalExpoFileSystem");var getLegacyValues=function(){var _ref=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var posthogFileDirectory,posthogDistinctIdFile,posthogAnonymousIdFile,res;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(!(!_OptionalExpoFileSystem.OptionalExpoFileSystem||!_OptionalExpoApplication.OptionalExpoApplication)){_context.next=2;break;}return _context.abrupt("return");case 2:if(!(_reactNative.Platform.OS==='ios')){_context.next=30;break;}posthogFileDirectory="".concat(_OptionalExpoFileSystem.OptionalExpoFileSystem.documentDirectory,"../Library/Application%20Support/").concat(_OptionalExpoApplication.OptionalExpoApplication.applicationId,"/");posthogDistinctIdFile=posthogFileDirectory+'posthog.distinctId';posthogAnonymousIdFile=posthogFileDirectory+'posthog.anonymousId';res={distinctId:undefined,anonymousId:undefined};_context.prev=7;_context.t0=JSON;_context.next=11;return _OptionalExpoFileSystem.OptionalExpoFileSystem.readAsStringAsync(posthogDistinctIdFile);case 11:_context.t1=_context.sent;res.distinctId=_context.t0.parse.call(_context.t0,_context.t1)['posthog.distinctId'];_context.next=17;break;case 15:_context.prev=15;_context.t2=_context["catch"](7);case 17:_context.prev=17;_context.t3=JSON;_context.next=21;return _OptionalExpoFileSystem.OptionalExpoFileSystem.readAsStringAsync(posthogAnonymousIdFile);case 21:_context.t4=_context.sent;res.anonymousId=_context.t3.parse.call(_context.t3,_context.t4)['posthog.anonymousId'];_context.next=27;break;case 25:_context.prev=25;_context.t5=_context["catch"](17);case 27:return _context.abrupt("return",res);case 30:case"end":return _context.stop();}}},_callee,null,[[7,15],[17,25]]);}));return function getLegacyValues(){return _ref.apply(this,arguments);};}();exports.getLegacyValues=getLegacyValues;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../src/legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAE1E,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,IAAwE,EAAE;IAC5G,yEAAyE;IACzE,oGAAoG;IAEpG,IAAI,CAAC,sBAAsB,IAAI,CAAC,uBAAuB,EAAE;QACvD,OAAM;KACP;IAED,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,MAAM,oBAAoB,GAAG,GAAG,sBAAsB,CAAC,iBAAiB,oCAAoC,uBAAuB,CAAC,aAAa,GAAG,CAAA;QACpJ,MAAM,qBAAqB,GAAG,oBAAoB,GAAG,oBAAoB,CAAA;QACzE,MAAM,sBAAsB,GAAG,oBAAoB,GAAG,qBAAqB,CAAA;QAE3E,MAAM,GAAG,GAAG;YACV,UAAU,EAAE,SAAS;YACrB,WAAW,EAAE,SAAS;SACvB,CAAA;QAED,IAAI;YACF,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,sBAAsB,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAAC,CAChG,oBAAoB,CACrB,CAAA;SACF;QAAC,OAAO,CAAC,EAAE,GAAE;QAEd,IAAI;YACF,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,sBAAsB,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC,CAClG,qBAAqB,CACtB,CAAA;SACF;QAAC,OAAO,CAAC,EAAE,GAAE;QAEd,OAAO,GAAG,CAAA;KACX;SAAM;QACL,qGAAqG;KACtG;AACH,CAAC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PostHogCustomAppProperties, PostHogCustomAsyncStorage } from './types';
|
|
2
|
-
export declare const getAppProperties: () => PostHogCustomAppProperties;
|
|
3
|
-
export declare const buildOptimisiticAsyncStorage: () => PostHogCustomAsyncStorage;
|
|
1
|
+
import { PostHogCustomAppProperties, PostHogCustomAsyncStorage } from './types';
|
|
2
|
+
export declare const getAppProperties: () => PostHogCustomAppProperties;
|
|
3
|
+
export declare const buildOptimisiticAsyncStorage: () => PostHogCustomAsyncStorage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.buildOptimisiticAsyncStorage=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _OptionalAsyncStorage=require("./optional/OptionalAsyncStorage");var _OptionalExpoApplication=require("./optional/OptionalExpoApplication");var _OptionalExpoDevice=require("./optional/OptionalExpoDevice");var _OptionalExpoFileSystem=require("./optional/OptionalExpoFileSystem");var _OptionalExpoLocalization=require("./optional/OptionalExpoLocalization");var _OptionalReactNativeDeviceInfo=require("./optional/OptionalReactNativeDeviceInfo");var getAppProperties=function getAppProperties(){var properties={};if(_OptionalExpoApplication.OptionalExpoApplication){properties.$app_build=_OptionalExpoApplication.OptionalExpoApplication.nativeBuildVersion;properties.$app_name=_OptionalExpoApplication.OptionalExpoApplication.applicationName;properties.$app_namespace=_OptionalExpoApplication.OptionalExpoApplication.applicationId;properties.$app_version=_OptionalExpoApplication.OptionalExpoApplication.nativeApplicationVersion;}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;}if(_OptionalExpoLocalization.OptionalExpoLocalization){properties.$locale=_OptionalExpoLocalization.OptionalExpoLocalization.locale;properties.$timezone=_OptionalExpoLocalization.OptionalExpoLocalization.timezone;}if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildIdSync();properties.$app_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName();properties.$app_namespace=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId();properties.$app_version=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion();properties.$device_manufacturer=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync();properties.$device_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getDeviceNameSync();properties.$os_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName();properties.$os_version=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion();}return properties;};exports.getAppProperties=getAppProperties;var buildOptimisiticAsyncStorage=function buildOptimisiticAsyncStorage(){if(_OptionalExpoFileSystem.OptionalExpoFileSystem){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var uri,stringContent;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context.prev=1;_context.next=4;return filesystem.readAsStringAsync(uri);case 4:stringContent=_context.sent;return _context.abrupt("return",stringContent);case 8:_context.prev=8;_context.t0=_context["catch"](1);return _context.abrupt("return",null);case 11:case"end":return _context.stop();}}},_callee,null,[[1,8]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var uri;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context2.next=3;return filesystem.writeAsStringAsync(uri,value);case 3:case"end":return _context2.stop();}}},_callee2);}))();}};}if(_OptionalAsyncStorage.OptionalAsyncStorage){return _OptionalAsyncStorage.OptionalAsyncStorage;}throw new Error('PostHog: No storage available. Please install expo-filesystem or react-native-async-storage OR implement a custom storage provider.');};exports.buildOptimisiticAsyncStorage=buildOptimisiticAsyncStorage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-deps.js","sourceRoot":"","sources":["../../../src/native-deps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CA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UAAU,CAAC,YAAY,GAAG,6BAA6B,CAAC,iBAAiB,EAAE,CAAA;QAC3E,UAAU,CAAC,QAAQ,GAAG,6BAA6B,CAAC,aAAa,EAAE,CAAA;QACnE,UAAU,CAAC,WAAW,GAAG,6BAA6B,CAAC,gBAAgB,EAAE,CAAA;KAC1E;IAED,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAA8B,EAAE;IAC1E,IAAI,sBAAsB,EAAE;QAC1B,MAAM,UAAU,GAAG,sBAAsB,CAAA;QACzC,OAAO;YACL,KAAK,CAAC,OAAO,CAAC,GAAW;gBACvB,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,iBAAiB,IAAI,EAAE,CAAC,GAAG,GAAG,CAAA;gBACtD,IAAI;oBACF,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA;oBAC7D,OAAO,aAAa,CAAA;iBACrB;gBAAC,OAAO,CAAC,EAAE;oBACV,OAAO,IAAI,CAAA;iBACZ;YACH,CAAC;YAED,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,KAAa;gBACtC,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,iBAAiB,IAAI,EAAE,CAAC,GAAG,GAAG,CAAA;gBACtD,MAAM,UAAU,CAAC,kBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;YACjD,CAAC;SACF,CAAA;KACF;IAED,IAAI,oBAAoB,EAAE;QACxB,OAAO,oBAAoB,CAAA;KAC5B;IAED,MAAM,IAAI,KAAK,CACb,qIAAqI,CACtI,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
export declare let OptionalAsyncStorage: typeof AsyncStorage | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalAsyncStorage=void 0;var OptionalAsyncStorage=undefined;exports.OptionalAsyncStorage=OptionalAsyncStorage;try{exports.OptionalAsyncStorage=OptionalAsyncStorage=require('@react-native-async-storage/async-storage')["default"];}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalAsyncStorage.js","sourceRoot":"","sources":["../../../../src/optional/OptionalAsyncStorage.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,oBAAoB,GAAoC,SAAS,CAAA;AAE5E,IAAI;IACF,8DAA8D;IAC9D,oBAAoB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC,OAAO,CAAA;CACpF;AAAC,OAAO,CAAC,EAAE,GAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type ExpoApplication from 'expo-application';
|
|
2
|
-
export declare
|
|
1
|
+
import type ExpoApplication from 'expo-application';
|
|
2
|
+
export declare let OptionalExpoApplication: typeof ExpoApplication | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoApplication=void 0;var OptionalExpoApplication=undefined;exports.OptionalExpoApplication=OptionalExpoApplication;try{exports.OptionalExpoApplication=OptionalExpoApplication=require('expo-application');}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalExpoApplication.js","sourceRoot":"","sources":["../../../../src/optional/OptionalExpoApplication.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,uBAAuB,GAAuC,SAAS,CAAA;AAElF,IAAI;IACF,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CACtD;AAAC,OAAO,CAAC,EAAE,GAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type ExpoDevice from 'expo-device';
|
|
2
|
-
export declare
|
|
1
|
+
import type ExpoDevice from 'expo-device';
|
|
2
|
+
export declare let OptionalExpoDevice: typeof ExpoDevice | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoDevice=void 0;var OptionalExpoDevice=undefined;exports.OptionalExpoDevice=OptionalExpoDevice;try{exports.OptionalExpoDevice=OptionalExpoDevice=require('expo-device');}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalExpoDevice.js","sourceRoot":"","sources":["../../../../src/optional/OptionalExpoDevice.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,kBAAkB,GAAkC,SAAS,CAAA;AAExE,IAAI;IACF,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;CAC5C;AAAC,OAAO,CAAC,EAAE,GAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type ExpoFileSystem from 'expo-file-system';
|
|
2
|
-
export declare
|
|
1
|
+
import type ExpoFileSystem from 'expo-file-system';
|
|
2
|
+
export declare let OptionalExpoFileSystem: typeof ExpoFileSystem | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoFileSystem=void 0;var OptionalExpoFileSystem=undefined;exports.OptionalExpoFileSystem=OptionalExpoFileSystem;try{exports.OptionalExpoFileSystem=OptionalExpoFileSystem=require('expo-file-system');}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalExpoFileSystem.js","sourceRoot":"","sources":["../../../../src/optional/OptionalExpoFileSystem.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,sBAAsB,GAAsC,SAAS,CAAA;AAEhF,IAAI;IACF,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CACrD;AAAC,OAAO,CAAC,EAAE,GAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type ExpoLocalization from 'expo-localization';
|
|
2
|
-
export declare
|
|
1
|
+
import type ExpoLocalization from 'expo-localization';
|
|
2
|
+
export declare let OptionalExpoLocalization: typeof ExpoLocalization | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoLocalization=void 0;var OptionalExpoLocalization=undefined;exports.OptionalExpoLocalization=OptionalExpoLocalization;try{exports.OptionalExpoLocalization=OptionalExpoLocalization=require('expo-localization');}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalExpoLocalization.js","sourceRoot":"","sources":["../../../../src/optional/OptionalExpoLocalization.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,wBAAwB,GAAwC,SAAS,CAAA;AAEpF,IAAI;IACF,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACxD;AAAC,OAAO,CAAC,EAAE,GAAE"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type ReactNativeDeviceInfo from 'react-native-device-info';
|
|
2
|
+
export declare let OptionalReactNativeDeviceInfo: typeof ReactNativeDeviceInfo | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalReactNativeDeviceInfo=void 0;var OptionalReactNativeDeviceInfo=undefined;exports.OptionalReactNativeDeviceInfo=OptionalReactNativeDeviceInfo;try{exports.OptionalReactNativeDeviceInfo=OptionalReactNativeDeviceInfo=require('react-native-device-info');}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalReactNativeDeviceInfo.js","sourceRoot":"","sources":["../../../../src/optional/OptionalReactNativeDeviceInfo.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,6BAA6B,GAA6C,SAAS,CAAA;AAE9F,IAAI;IACF,6BAA6B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAA;CACpE;AAAC,OAAO,CAAC,EAAE,GAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type ReactNativeNavigation from '@react-navigation/native';
|
|
2
|
-
export declare
|
|
1
|
+
import type ReactNativeNavigation from '@react-navigation/native';
|
|
2
|
+
export declare let OptionalReactNativeNavigation: typeof ReactNativeNavigation | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalReactNativeNavigation=void 0;var OptionalReactNativeNavigation=undefined;exports.OptionalReactNativeNavigation=OptionalReactNativeNavigation;try{exports.OptionalReactNativeNavigation=OptionalReactNativeNavigation=require('@react-navigation/native');}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalReactNativeNavigation.js","sourceRoot":"","sources":["../../../../src/optional/OptionalReactNativeNavigation.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,6BAA6B,GAA6C,SAAS,CAAA;AAE9F,IAAI;IACF,6BAA6B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAA;CACpE;AAAC,OAAO,CAAC,EAAE,GAAE"}
|