posthog-react-native 4.74.1 → 4.74.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/PostHogContext.js +2 -1
- package/dist/PostHogContext.js.map +1 -1
- package/dist/PostHogErrorBoundary.js +2 -1
- package/dist/PostHogErrorBoundary.js.map +1 -1
- package/dist/PostHogMaskView.js +2 -1
- package/dist/PostHogMaskView.js.map +1 -1
- package/dist/PostHogProvider.js +2 -1
- package/dist/PostHogProvider.js.map +1 -1
- package/dist/autocapture.js +2 -1
- package/dist/autocapture.js.map +1 -1
- package/dist/error-tracking/exception-context.js +2 -1
- package/dist/error-tracking/exception-context.js.map +1 -1
- package/dist/error-tracking/index.js +2 -1
- package/dist/error-tracking/index.js.map +1 -1
- package/dist/error-tracking/utils.js +2 -1
- package/dist/error-tracking/utils.js.map +1 -1
- package/dist/frameworks/wix-navigation.js +2 -1
- package/dist/frameworks/wix-navigation.js.map +1 -1
- package/dist/hooks/useFeatureFlag.js +2 -1
- package/dist/hooks/useFeatureFlag.js.map +1 -1
- package/dist/hooks/useFeatureFlagResult.js +2 -1
- package/dist/hooks/useFeatureFlagResult.js.map +1 -1
- package/dist/hooks/useFeatureFlags.js +2 -1
- package/dist/hooks/useFeatureFlags.js.map +1 -1
- package/dist/hooks/useNavigationTracker.js +2 -1
- package/dist/hooks/useNavigationTracker.js.map +1 -1
- package/dist/hooks/usePostHog.js +2 -1
- package/dist/hooks/usePostHog.js.map +1 -1
- package/dist/hooks/utils.js +2 -1
- package/dist/hooks/utils.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/logs-defaults.js +2 -1
- package/dist/logs-defaults.js.map +1 -1
- package/dist/native-deps.js +2 -1
- package/dist/native-deps.js.map +1 -1
- package/dist/optional/OptionalAsyncStorage.js +2 -1
- package/dist/optional/OptionalAsyncStorage.js.map +1 -1
- package/dist/optional/OptionalExpoApplication.js +2 -1
- package/dist/optional/OptionalExpoApplication.js.map +1 -1
- package/dist/optional/OptionalExpoDevice.js +2 -1
- package/dist/optional/OptionalExpoDevice.js.map +1 -1
- package/dist/optional/OptionalExpoFileSystem.js +2 -1
- package/dist/optional/OptionalExpoFileSystem.js.map +1 -1
- package/dist/optional/OptionalExpoFileSystemLegacy.js +2 -1
- package/dist/optional/OptionalExpoFileSystemLegacy.js.map +1 -1
- package/dist/optional/OptionalExpoLocalization.js +2 -1
- package/dist/optional/OptionalExpoLocalization.js.map +1 -1
- package/dist/optional/OptionalExpoUpdates.js +2 -1
- package/dist/optional/OptionalExpoUpdates.js.map +1 -1
- package/dist/optional/OptionalPlugin.js +2 -1
- package/dist/optional/OptionalPlugin.js.map +1 -1
- package/dist/optional/OptionalReactNativeDeviceInfo.js +2 -1
- package/dist/optional/OptionalReactNativeDeviceInfo.js.map +1 -1
- package/dist/optional/OptionalReactNativeLocalize.js +2 -1
- package/dist/optional/OptionalReactNativeLocalize.js.map +1 -1
- package/dist/optional/OptionalReactNativeNavigation.js +2 -1
- package/dist/optional/OptionalReactNativeNavigation.js.map +1 -1
- package/dist/optional/OptionalReactNativeNavigationWix.js +2 -1
- package/dist/optional/OptionalReactNativeNavigationWix.js.map +1 -1
- package/dist/optional/OptionalReactNativeSafeArea.js +2 -1
- package/dist/optional/OptionalReactNativeSafeArea.js.map +1 -1
- package/dist/optional/OptionalReactNativeSvg.js +2 -1
- package/dist/optional/OptionalReactNativeSvg.js.map +1 -1
- package/dist/posthog-rn.js +2 -1
- package/dist/posthog-rn.js.map +1 -1
- package/dist/storage.js +2 -1
- package/dist/storage.js.map +1 -1
- package/dist/surveys/PostHogSurveyProvider.js +2 -1
- package/dist/surveys/PostHogSurveyProvider.js.map +1 -1
- package/dist/surveys/components/BottomSection.js +2 -1
- package/dist/surveys/components/BottomSection.js.map +1 -1
- package/dist/surveys/components/Cancel.js +2 -1
- package/dist/surveys/components/Cancel.js.map +1 -1
- package/dist/surveys/components/ConfirmationMessage.js +2 -1
- package/dist/surveys/components/ConfirmationMessage.js.map +1 -1
- package/dist/surveys/components/IntroMessage.js +2 -1
- package/dist/surveys/components/IntroMessage.js.map +1 -1
- package/dist/surveys/components/QuestionHeader.js +2 -1
- package/dist/surveys/components/QuestionHeader.js.map +1 -1
- package/dist/surveys/components/QuestionTypes.js +2 -1
- package/dist/surveys/components/QuestionTypes.js.map +1 -1
- package/dist/surveys/components/SurveyModal.js +2 -1
- package/dist/surveys/components/SurveyModal.js.map +1 -1
- package/dist/surveys/components/Surveys.js +2 -1
- package/dist/surveys/components/Surveys.js.map +1 -1
- package/dist/surveys/getActiveMatchingSurveys.js +2 -1
- package/dist/surveys/getActiveMatchingSurveys.js.map +1 -1
- package/dist/surveys/icons.js +2 -1
- package/dist/surveys/icons.js.map +1 -1
- package/dist/surveys/index.js +2 -1
- package/dist/surveys/index.js.map +1 -1
- package/dist/surveys/safeStyleSheet.js +2 -1
- package/dist/surveys/safeStyleSheet.js.map +1 -1
- package/dist/surveys/survey-shuffling.js +2 -1
- package/dist/surveys/survey-shuffling.js.map +1 -1
- package/dist/surveys/survey-translations.js +2 -1
- package/dist/surveys/survey-translations.js.map +1 -1
- package/dist/surveys/surveys-utils.js +2 -1
- package/dist/surveys/surveys-utils.js.map +1 -1
- package/dist/surveys/useActivatedSurveys.js +2 -1
- package/dist/surveys/useActivatedSurveys.js.map +1 -1
- package/dist/surveys/useSurveyStorage.js +2 -1
- package/dist/surveys/useSurveyStorage.js.map +1 -1
- package/dist/tooling/expoconfig.js +2 -1
- package/dist/tooling/expoconfig.js.map +1 -1
- package/dist/tooling/metroconfig.js +2 -1
- package/dist/tooling/metroconfig.js.map +1 -1
- package/dist/tooling/posthogMetroSerializer.js +2 -1
- package/dist/tooling/posthogMetroSerializer.js.map +1 -1
- package/dist/tooling/utils.js +2 -1
- package/dist/tooling/utils.js.map +1 -1
- package/dist/tooling/vendor/expo/expoconfig.js +2 -1
- package/dist/tooling/vendor/expo/expoconfig.js.map +1 -1
- package/dist/tooling/vendor/metro/countLines.js +2 -1
- package/dist/tooling/vendor/metro/countLines.js.map +1 -1
- package/dist/tooling/vendor/metro/utils.js +2 -1
- package/dist/tooling/vendor/metro/utils.js.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.js +2 -1
- package/dist/utils.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/package.json +7 -6
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.withReactNativeNavigation=void 0;var _OptionalReactNativeNavigationWix=require("../optional/OptionalReactNativeNavigationWix");var withReactNativeNavigation=exports.withReactNativeNavigation=function withReactNativeNavigation(posthog){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!_OptionalReactNativeNavigationWix.OptionalReactNativeNavigationWix){return false;}var Navigation=_OptionalReactNativeNavigationWix.OptionalReactNativeNavigationWix.Navigation;Navigation.events().registerComponentDidAppearListener(function(_ref){var componentName=_ref.componentName,passProps=_ref.passProps;var _a,_b,_c,_d,_e;if(!((_a=options.captureScreens)!==null&&_a!==void 0?_a:true)){return;}var currentRouteName=((_c=(_b=options===null||options===void 0?void 0:options.navigation)===null||_b===void 0?void 0:_b.routeToName)===null||_c===void 0?void 0:_c.call(_b,componentName,passProps||{}))||componentName||'Unknown';if(currentRouteName){var properties=(_e=(_d=options===null||options===void 0?void 0:options.navigation)===null||_d===void 0?void 0:_d.routeToProperties)===null||_e===void 0?void 0:_e.call(_d,currentRouteName,passProps||{});posthog.screen(currentRouteName,properties);}});return true;};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.withReactNativeNavigation=void 0;var _OptionalReactNativeNavigationWix=require("../optional/OptionalReactNativeNavigationWix");var withReactNativeNavigation=exports.withReactNativeNavigation=function withReactNativeNavigation(posthog){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!_OptionalReactNativeNavigationWix.OptionalReactNativeNavigationWix){return false;}var Navigation=_OptionalReactNativeNavigationWix.OptionalReactNativeNavigationWix.Navigation;Navigation.events().registerComponentDidAppearListener(function(_ref){var componentName=_ref.componentName,passProps=_ref.passProps;var _a,_b,_c,_d,_e;if(!((_a=options.captureScreens)!==null&&_a!==void 0?_a:true)){return;}var currentRouteName=((_c=(_b=options===null||options===void 0?void 0:options.navigation)===null||_b===void 0?void 0:_b.routeToName)===null||_c===void 0?void 0:_c.call(_b,componentName,passProps||{}))||componentName||'Unknown';if(currentRouteName){var properties=(_e=(_d=options===null||options===void 0?void 0:options.navigation)===null||_d===void 0?void 0:_d.routeToProperties)===null||_e===void 0?void 0:_e.call(_d,currentRouteName,passProps||{});posthog.screen(currentRouteName,properties);}});return true;};
|
|
2
|
+
//# sourceMappingURL=wix-navigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wix-navigation.js","
|
|
1
|
+
{"version":3,"file":"wix-navigation.js","names":["_OptionalReactNativeNavigationWix","require","withReactNativeNavigation","exports","posthog","options","arguments","length","undefined","OptionalReactNativeNavigationWix","Navigation","events","registerComponentDidAppearListener","_ref","componentName","passProps","_a","captureScreens","currentRouteName","_c","_b","navigation","routeToName","call","properties","_e","_d","routeToProperties","screen"],"sources":["../../src/frameworks/wix-navigation.ts"],"sourcesContent":["/*\n * Wix Navigation (react-native-navigation)\n *\n * Wix Navigation uses a very different paradigm for rendering screens, with a more imperative / config driven approach\n * Instead of hooking into the natural React lifecycle, it provides a very different API which we can hook into and use instead.\n */\n\nimport { OptionalReactNativeNavigationWix } from '../optional/OptionalReactNativeNavigationWix'\nimport { PostHog } from '../posthog-rn'\nimport { PostHogAutocaptureOptions } from '../types'\n\nexport const withReactNativeNavigation = (posthog: PostHog, options: PostHogAutocaptureOptions = {}): boolean => {\n if (!OptionalReactNativeNavigationWix) {\n return false\n }\n\n const Navigation = OptionalReactNativeNavigationWix.Navigation\n\n // Equivalent of `useNavigationTracker`\n Navigation.events().registerComponentDidAppearListener(({ componentName, passProps }) => {\n if (!(options.captureScreens ?? true)) {\n return\n }\n\n const currentRouteName =\n options?.navigation?.routeToName?.(componentName, passProps || {}) || componentName || 'Unknown'\n\n if (currentRouteName) {\n const properties = options?.navigation?.routeToProperties?.(currentRouteName, passProps || {})\n posthog.screen(currentRouteName, properties)\n }\n })\n\n return true\n}\n"],"mappings":"+GAOA,IAAAA,iCAAA,CAAAC,OAAA,iDAIO,GAAM,CAAAC,yBAAyB,CAAAC,OAAA,CAAAD,yBAAA,CAAG,QAA5B,CAAAA,yBAAyBA,CAAIE,OAAgB,CAAsD,IAApD,CAAAC,OAAA,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAqC,EAAE,CACjG,GAAI,CAACG,kEAAgC,CAAE,CACrC,MAAO,MAAK,CACd,CAEA,GAAM,CAAAC,UAAU,CAAGD,kEAAgC,CAACC,UAAU,CAG9DA,UAAU,CAACC,MAAM,EAAE,CAACC,kCAAkC,CAAC,SAAAC,IAAA,CAAiC,IAA9B,CAAAC,aAAa,CAAAD,IAAA,CAAbC,aAAa,CAAEC,SAAS,CAAAF,IAAA,CAATE,SAAS,C,mBAChF,GAAI,EAAE,CAAAC,EAAA,CAAAX,OAAO,CAACY,cAAc,UAAAD,EAAA,UAAAA,EAAA,CAAI,IAAI,CAAC,CAAE,CACrC,OACF,CAEA,GAAM,CAAAE,gBAAgB,CACpB,EAAAC,EAAA,EAAAC,EAAA,CAAAf,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEgB,UAAU,UAAAD,EAAA,iBAAAA,EAAA,CAAEE,WAAW,UAAAH,EAAA,iBAAAA,EAAA,CAAAI,IAAA,CAAAH,EAAA,CAAGN,aAAa,CAAEC,SAAS,EAAI,EAAE,CAAC,GAAID,aAAa,EAAI,SAAS,CAElG,GAAII,gBAAgB,CAAE,CACpB,GAAM,CAAAM,UAAU,CAAG,CAAAC,EAAA,EAAAC,EAAA,CAAArB,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEgB,UAAU,UAAAK,EAAA,iBAAAA,EAAA,CAAEC,iBAAiB,UAAAF,EAAA,iBAAAA,EAAA,CAAAF,IAAA,CAAAG,EAAA,CAAGR,gBAAgB,CAAEH,SAAS,EAAI,EAAE,CAAC,CAC9FX,OAAO,CAACwB,MAAM,CAACV,gBAAgB,CAAEM,UAAU,CAAC,CAC9C,CACF,CAAC,CAAC,CAEF,MAAO,KAAI,CACb,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useFeatureFlag=useFeatureFlag;exports.useFeatureFlagWithPayload=useFeatureFlagWithPayload;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _utils=require("./utils");function useFeatureFlag(flag,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlag');var _useState=(0,_react.useState)(function(){return posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag);}),_useState2=(0,_slicedToArray2["default"])(_useState,2),featureFlag=_useState2[0],setFeatureFlag=_useState2[1];(0,_react.useEffect)(function(){setFeatureFlag(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag));return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(){setFeatureFlag(posthog.getFeatureFlag(flag));});},[posthog,flag]);return featureFlag;}function useFeatureFlagWithPayload(flag,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlagWithPayload');var _useState3=(0,_react.useState)([undefined,undefined]),_useState4=(0,_slicedToArray2["default"])(_useState3,2),featureFlag=_useState4[0],setFeatureFlag=_useState4[1];(0,_react.useEffect)(function(){var _a;setFeatureFlag([posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag),(_a=posthog===null||posthog===void 0?void 0:posthog.getFeatureFlagResult(flag,{sendEvent:false}))===null||_a===void 0?void 0:_a.payload]);return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(){var _a;setFeatureFlag([posthog.getFeatureFlag(flag),(_a=posthog.getFeatureFlagResult(flag,{sendEvent:false}))===null||_a===void 0?void 0:_a.payload]);});},[posthog,flag]);return featureFlag;}
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useFeatureFlag=useFeatureFlag;exports.useFeatureFlagWithPayload=useFeatureFlagWithPayload;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _utils=require("./utils");function useFeatureFlag(flag,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlag');var _useState=(0,_react.useState)(function(){return posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag);}),_useState2=(0,_slicedToArray2["default"])(_useState,2),featureFlag=_useState2[0],setFeatureFlag=_useState2[1];(0,_react.useEffect)(function(){setFeatureFlag(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag));return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(){setFeatureFlag(posthog.getFeatureFlag(flag));});},[posthog,flag]);return featureFlag;}function useFeatureFlagWithPayload(flag,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlagWithPayload');var _useState3=(0,_react.useState)([undefined,undefined]),_useState4=(0,_slicedToArray2["default"])(_useState3,2),featureFlag=_useState4[0],setFeatureFlag=_useState4[1];(0,_react.useEffect)(function(){var _a;setFeatureFlag([posthog===null||posthog===void 0?void 0:posthog.getFeatureFlag(flag),(_a=posthog===null||posthog===void 0?void 0:posthog.getFeatureFlagResult(flag,{sendEvent:false}))===null||_a===void 0?void 0:_a.payload]);return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(){var _a;setFeatureFlag([posthog.getFeatureFlag(flag),(_a=posthog.getFeatureFlagResult(flag,{sendEvent:false}))===null||_a===void 0?void 0:_a.payload]);});},[posthog,flag]);return featureFlag;}
|
|
2
|
+
//# sourceMappingURL=useFeatureFlag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureFlag.js","
|
|
1
|
+
{"version":3,"file":"useFeatureFlag.js","names":["_react","require","_utils","useFeatureFlag","flag","client","posthog","useOverridablePostHog","_useState","useState","getFeatureFlag","_useState2","_slicedToArray2","featureFlag","setFeatureFlag","useEffect","onFeatureFlags","useFeatureFlagWithPayload","_useState3","undefined","_useState4","_a","getFeatureFlagResult","sendEvent","payload"],"sources":["../../src/hooks/useFeatureFlag.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { useOverridablePostHog } from './utils'\nimport { JsonType, FeatureFlagValue } from '@posthog/core'\nimport { PostHog } from '../posthog-rn'\n\nexport function useFeatureFlag(flag: string, client?: PostHog): FeatureFlagValue | undefined {\n const posthog = useOverridablePostHog(client, 'useFeatureFlag')\n const [featureFlag, setFeatureFlag] = useState<FeatureFlagValue | undefined>(() => posthog?.getFeatureFlag(flag))\n\n useEffect(() => {\n setFeatureFlag(posthog?.getFeatureFlag(flag))\n return posthog?.onFeatureFlags(() => {\n setFeatureFlag(posthog.getFeatureFlag(flag))\n })\n }, [posthog, flag])\n\n return featureFlag\n}\n\nexport type FeatureFlagWithPayload = [FeatureFlagValue | undefined, JsonType | undefined]\n\nexport function useFeatureFlagWithPayload(flag: string, client?: PostHog): FeatureFlagWithPayload {\n const posthog = useOverridablePostHog(client, 'useFeatureFlagWithPayload')\n const [featureFlag, setFeatureFlag] = useState<FeatureFlagWithPayload>([undefined, undefined])\n\n useEffect(() => {\n setFeatureFlag([posthog?.getFeatureFlag(flag), posthog?.getFeatureFlagResult(flag, { sendEvent: false })?.payload])\n return posthog?.onFeatureFlags(() => {\n setFeatureFlag([posthog.getFeatureFlag(flag), posthog.getFeatureFlagResult(flag, { sendEvent: false })?.payload])\n })\n }, [posthog, flag])\n\n return featureFlag\n}\n"],"mappings":"u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AC,CAAE,CAAAiB,EAAA,CAAAf,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEgB,oBAAoB,CAAClB,IAAI,CAAE,CAAEmB,SAAS,CAAE,KAAK,CAAE,CAAC,UAAAF,EAAA,iBAAAA,EAAA,CAAEG,OAAO,CAAC,CAAC,CACnH,MAAO,CAAAlB,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEU,cAAc,CAAC,UAAK,C,OAClCF,cAAc,CAAC,CAACR,OAAO,CAACI,cAAc,CAACN,IAAI,CAAC,CAAE,CAAAiB,EAAA,CAAAf,OAAO,CAACgB,oBAAoB,CAAClB,IAAI,CAAE,CAAEmB,SAAS,CAAE,KAAK,CAAE,CAAC,UAAAF,EAAA,iBAAAA,EAAA,CAAEG,OAAO,CAAC,CAAC,CACnH,CAAC,CAAC,CACJ,CAAC,CAAE,CAAClB,OAAO,CAAEF,IAAI,CAAC,CAAC,CAEnB,MAAO,CAAAS,WAAW,CACpB","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useFeatureFlagResult=useFeatureFlagResult;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _utils=require("./utils");function useFeatureFlagResult(flag,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlagResult');var _useState=(0,_react.useState)(function(){return posthog===null||posthog===void 0?void 0:posthog.getFeatureFlagResult(flag);}),_useState2=(0,_slicedToArray2["default"])(_useState,2),result=_useState2[0],setResult=_useState2[1];(0,_react.useEffect)(function(){setResult(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlagResult(flag));return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(){setResult(posthog.getFeatureFlagResult(flag));});},[posthog,flag]);return result;}
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useFeatureFlagResult=useFeatureFlagResult;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _utils=require("./utils");function useFeatureFlagResult(flag,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlagResult');var _useState=(0,_react.useState)(function(){return posthog===null||posthog===void 0?void 0:posthog.getFeatureFlagResult(flag);}),_useState2=(0,_slicedToArray2["default"])(_useState,2),result=_useState2[0],setResult=_useState2[1];(0,_react.useEffect)(function(){setResult(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlagResult(flag));return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(){setResult(posthog.getFeatureFlagResult(flag));});},[posthog,flag]);return result;}
|
|
2
|
+
//# sourceMappingURL=useFeatureFlagResult.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureFlagResult.js","
|
|
1
|
+
{"version":3,"file":"useFeatureFlagResult.js","names":["_react","require","_utils","useFeatureFlagResult","flag","client","posthog","useOverridablePostHog","_useState","useState","getFeatureFlagResult","_useState2","_slicedToArray2","result","setResult","useEffect","onFeatureFlags"],"sources":["../../src/hooks/useFeatureFlagResult.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { useOverridablePostHog } from './utils'\nimport { FeatureFlagResult } from '@posthog/core'\nimport { PostHog } from '../posthog-rn'\n\nexport function useFeatureFlagResult(flag: string, client?: PostHog): FeatureFlagResult | undefined {\n const posthog = useOverridablePostHog(client, 'useFeatureFlagResult')\n const [result, setResult] = useState<FeatureFlagResult | undefined>(() => posthog?.getFeatureFlagResult(flag))\n\n useEffect(() => {\n setResult(posthog?.getFeatureFlagResult(flag))\n return posthog?.onFeatureFlags(() => {\n setResult(posthog.getFeatureFlagResult(flag))\n })\n }, [posthog, flag])\n\n return result\n}\n"],"mappings":"uSAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,MAAA,CAAAD,OAAA,YAIM,QAAU,CAAAE,oBAAoBA,CAACC,IAAY,CAAEC,MAAgB,EACjE,GAAM,CAAAC,OAAO,CAAG,GAAAC,4BAAqB,EAACF,MAAM,CAAE,sBAAsB,CAAC,CACrE,IAAAG,SAAA,CAA4B,GAAAC,eAAQ,EAAgC,iBAAM,CAAAH,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEI,oBAAoB,CAACN,IAAI,CAAC,GAAC,CAAAO,UAAA,IAAAC,eAAA,aAAAJ,SAAA,IAAvGK,MAAM,CAAAF,UAAA,IAAEG,SAAS,CAAAH,UAAA,IAExB,GAAAI,gBAAS,EAAC,UAAK,CACbD,SAAS,CAACR,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEI,oBAAoB,CAACN,IAAI,CAAC,CAAC,CAC9C,MAAO,CAAAE,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEU,cAAc,CAAC,UAAK,CAClCF,SAAS,CAACR,OAAO,CAACI,oBAAoB,CAACN,IAAI,CAAC,CAAC,CAC/C,CAAC,CAAC,CACJ,CAAC,CAAE,CAACE,OAAO,CAAEF,IAAI,CAAC,CAAC,CAEnB,MAAO,CAAAS,MAAM,CACf","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
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 _utils=require("./utils");function useFeatureFlags(client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlags');var _useState=(0,_react.useState)(function(){return posthog===null||posthog===void 0?void 0:posthog.getFeatureFlags();}),_useState2=(0,_slicedToArray2["default"])(_useState,2),featureFlags=_useState2[0],setFeatureFlags=_useState2[1];(0,_react.useEffect)(function(){setFeatureFlags(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlags());return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(flags){setFeatureFlags(flags);});},[posthog]);return featureFlags;}
|
|
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 _utils=require("./utils");function useFeatureFlags(client){var posthog=(0,_utils.useOverridablePostHog)(client,'useFeatureFlags');var _useState=(0,_react.useState)(function(){return posthog===null||posthog===void 0?void 0:posthog.getFeatureFlags();}),_useState2=(0,_slicedToArray2["default"])(_useState,2),featureFlags=_useState2[0],setFeatureFlags=_useState2[1];(0,_react.useEffect)(function(){setFeatureFlags(posthog===null||posthog===void 0?void 0:posthog.getFeatureFlags());return posthog===null||posthog===void 0?void 0:posthog.onFeatureFlags(function(flags){setFeatureFlags(flags);});},[posthog]);return featureFlags;}
|
|
2
|
+
//# sourceMappingURL=useFeatureFlags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureFlags.js","
|
|
1
|
+
{"version":3,"file":"useFeatureFlags.js","names":["_react","require","_utils","useFeatureFlags","client","posthog","useOverridablePostHog","_useState","useState","getFeatureFlags","_useState2","_slicedToArray2","featureFlags","setFeatureFlags","useEffect","onFeatureFlags","flags"],"sources":["../../src/hooks/useFeatureFlags.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport type { PostHog } from '../posthog-rn'\nimport { PostHogFlagsResponse } from '@posthog/core'\nimport { useOverridablePostHog } from './utils'\n\nexport function useFeatureFlags(client?: PostHog): PostHogFlagsResponse['featureFlags'] | undefined {\n const posthog = useOverridablePostHog(client, 'useFeatureFlags')\n const [featureFlags, setFeatureFlags] = useState<PostHogFlagsResponse['featureFlags'] | undefined>(() =>\n posthog?.getFeatureFlags()\n )\n\n useEffect(() => {\n setFeatureFlags(posthog?.getFeatureFlags())\n return posthog?.onFeatureFlags((flags) => {\n setFeatureFlags(flags)\n })\n }, [posthog])\n\n return featureFlags\n}\n"],"mappings":"6RAAA,IAAAA,MAAA,CAAAC,OAAA,UAGA,IAAAC,MAAA,CAAAD,OAAA,YAEM,QAAU,CAAAE,eAAeA,CAACC,MAAgB,EAC9C,GAAM,CAAAC,OAAO,CAAG,GAAAC,4BAAqB,EAACF,MAAM,CAAE,iBAAiB,CAAC,CAChE,IAAAG,SAAA,CAAwC,GAAAC,eAAQ,EAAmD,iBACjG,CAAAH,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEI,eAAe,EAAE,GAC3B,CAAAC,UAAA,IAAAC,eAAA,aAAAJ,SAAA,IAFMK,YAAY,CAAAF,UAAA,IAAEG,eAAe,CAAAH,UAAA,IAIpC,GAAAI,gBAAS,EAAC,UAAK,CACbD,eAAe,CAACR,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEI,eAAe,EAAE,CAAC,CAC3C,MAAO,CAAAJ,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEU,cAAc,CAAC,SAACC,KAAK,CAAI,CACvCH,eAAe,CAACG,KAAK,CAAC,CACxB,CAAC,CAAC,CACJ,CAAC,CAAE,CAACX,OAAO,CAAC,CAAC,CAEb,MAAO,CAAAO,YAAY,CACrB","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.useNavigationTracker=void 0;var _react=require("react");var _OptionalReactNativeNavigation=require("../optional/OptionalReactNativeNavigation");var _utils=require("./utils");function _useNavigationTrackerDisabled(){return;}function _useNavigationTracker(options,navigationRef,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useNavigationTracker');if(!_OptionalReactNativeNavigation.OptionalReactNativeNavigation){throw new Error('No OptionalReactNativeNavigation');}var navigationState=undefined;var navigation=navigationRef;try{navigationState=_OptionalReactNativeNavigation.OptionalReactNativeNavigation.useNavigationState(function(state){return state;});}catch(error){console.error('useNavigationState error',error);}try{if(!navigation){navigation=_OptionalReactNativeNavigation.OptionalReactNativeNavigation.useNavigation();}}catch(error){console.error('useNavigation error',error);return;}var trackRoute=(0,_react.useCallback)(function(){var _a,_b;if(!navigation||!posthog){return;}var currentNavigation=navigation;if(navigation.current){currentNavigation=navigation.current;}var currentRoute=undefined;try{var isReady=false;try{isReady=currentNavigation.isReady();}catch(error){isReady=true;}if(!isReady){return;}currentRoute=currentNavigation.getCurrentRoute();}catch(error){return;}if(!currentRoute){return;}var _currentRoute=currentRoute,name=_currentRoute.name,params=_currentRoute.params;var currentRouteName=((_a=options===null||options===void 0?void 0:options.routeToName)===null||_a===void 0?void 0:_a.call(options,name,params))||name||'Unknown';if(currentRouteName){var properties=(_b=options===null||options===void 0?void 0:options.routeToProperties)===null||_b===void 0?void 0:_b.call(options,currentRouteName,params);posthog.screen(currentRouteName,properties);}},[navigation,options,posthog]);(0,_react.useEffect)(function(){if(!navigationState){var timeout=setTimeout(trackRoute,1);return function(){return clearTimeout(timeout);};}trackRoute();},[navigationState,trackRoute]);}var useNavigationTracker=exports.useNavigationTracker=_OptionalReactNativeNavigation.OptionalReactNativeNavigation?_useNavigationTracker:_useNavigationTrackerDisabled;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.useNavigationTracker=void 0;var _react=require("react");var _OptionalReactNativeNavigation=require("../optional/OptionalReactNativeNavigation");var _utils=require("./utils");function _useNavigationTrackerDisabled(){return;}function _useNavigationTracker(options,navigationRef,client){var posthog=(0,_utils.useOverridablePostHog)(client,'useNavigationTracker');if(!_OptionalReactNativeNavigation.OptionalReactNativeNavigation){throw new Error('No OptionalReactNativeNavigation');}var navigationState=undefined;var navigation=navigationRef;try{navigationState=_OptionalReactNativeNavigation.OptionalReactNativeNavigation.useNavigationState(function(state){return state;});}catch(error){console.error('useNavigationState error',error);}try{if(!navigation){navigation=_OptionalReactNativeNavigation.OptionalReactNativeNavigation.useNavigation();}}catch(error){console.error('useNavigation error',error);return;}var trackRoute=(0,_react.useCallback)(function(){var _a,_b;if(!navigation||!posthog){return;}var currentNavigation=navigation;if(navigation.current){currentNavigation=navigation.current;}var currentRoute=undefined;try{var isReady=false;try{isReady=currentNavigation.isReady();}catch(error){isReady=true;}if(!isReady){return;}currentRoute=currentNavigation.getCurrentRoute();}catch(error){return;}if(!currentRoute){return;}var _currentRoute=currentRoute,name=_currentRoute.name,params=_currentRoute.params;var currentRouteName=((_a=options===null||options===void 0?void 0:options.routeToName)===null||_a===void 0?void 0:_a.call(options,name,params))||name||'Unknown';if(currentRouteName){var properties=(_b=options===null||options===void 0?void 0:options.routeToProperties)===null||_b===void 0?void 0:_b.call(options,currentRouteName,params);posthog.screen(currentRouteName,properties);}},[navigation,options,posthog]);(0,_react.useEffect)(function(){if(!navigationState){var timeout=setTimeout(trackRoute,1);return function(){return clearTimeout(timeout);};}trackRoute();},[navigationState,trackRoute]);}var useNavigationTracker=exports.useNavigationTracker=_OptionalReactNativeNavigation.OptionalReactNativeNavigation?_useNavigationTracker:_useNavigationTrackerDisabled;
|
|
2
|
+
//# sourceMappingURL=useNavigationTracker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavigationTracker.js","
|
|
1
|
+
{"version":3,"file":"useNavigationTracker.js","names":["_react","require","_OptionalReactNativeNavigation","_utils","_useNavigationTrackerDisabled","_useNavigationTracker","options","navigationRef","client","posthog","useOverridablePostHog","OptionalReactNativeNavigation","Error","navigationState","undefined","navigation","useNavigationState","state","error","console","useNavigation","trackRoute","useCallback","currentNavigation","current","currentRoute","isReady","getCurrentRoute","_currentRoute","name","params","currentRouteName","_a","routeToName","call","properties","_b","routeToProperties","screen","useEffect","timeout","setTimeout","clearTimeout","useNavigationTracker","exports"],"sources":["../../src/hooks/useNavigationTracker.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { OptionalReactNativeNavigation } from '../optional/OptionalReactNativeNavigation'\nimport type { PostHog } from '../posthog-rn'\nimport { PostHogAutocaptureNavigationTrackerOptions } from '../types'\nimport { useOverridablePostHog } from './utils'\nimport { PostHogNavigationRef } from '../types'\n\nfunction _useNavigationTrackerDisabled(): void {\n return\n}\n\nfunction _useNavigationTracker(\n options?: PostHogAutocaptureNavigationTrackerOptions,\n navigationRef?: PostHogNavigationRef,\n client?: PostHog\n): void {\n // oxlint-disable-next-line react-hooks/rules-of-hooks -- This internal function is exported as useNavigationTracker.\n const posthog = useOverridablePostHog(client, 'useNavigationTracker')\n\n if (!OptionalReactNativeNavigation) {\n // NOTE: This is taken care of by the export, but we keep this here for TS\n throw new Error('No OptionalReactNativeNavigation')\n }\n\n let navigationState: any = undefined\n let navigation: any = navigationRef\n\n try {\n // oxlint-disable-next-line react/rules-of-hooks\n navigationState = OptionalReactNativeNavigation.useNavigationState((state: any) => state)\n } catch (error) {\n // useNavigationState might not be available in static navigation setups\n // We'll rely on the navigation object to get the current route\n console.error('useNavigationState error', error)\n }\n\n try {\n if (!navigation) {\n // oxlint-disable-next-line react/rules-of-hooks\n navigation = OptionalReactNativeNavigation.useNavigation()\n }\n } catch (error) {\n // useNavigation hook might not be available in static navigation setups\n // Navigation tracking will be disabled in this case\n console.error('useNavigation error', error)\n return\n }\n\n // oxlint-disable-next-line react/rules-of-hooks\n const trackRoute = useCallback((): void => {\n if (!navigation || !posthog) {\n return\n }\n\n // if you create a navigation ref with createNavigationContainerRef, you need to use the current property to get the navigation object\n let currentNavigation = navigation\n if (navigation.current) {\n currentNavigation = navigation.current\n }\n\n let currentRoute: any = undefined\n\n // NOTE: This method is not typed correctly but is available and takes care of parsing the router state correctly\n try {\n let isReady = false\n try {\n isReady = (currentNavigation as any).isReady()\n } catch (error) {\n // keep compatibility with older versions of react-navigation\n isReady = true\n }\n\n if (!isReady) {\n return\n }\n\n currentRoute = (currentNavigation as any).getCurrentRoute()\n } catch (error) {\n // if this happens, we're not in a navigation context, so we can't track the route\n return\n }\n\n if (!currentRoute) {\n return\n }\n\n const { name, params } = currentRoute\n\n const currentRouteName = options?.routeToName?.(name, params) || name || 'Unknown'\n\n if (currentRouteName) {\n const properties = options?.routeToProperties?.(currentRouteName, params)\n posthog.screen(currentRouteName, properties)\n }\n }, [navigation, options, posthog])\n\n // oxlint-disable-next-line react/rules-of-hooks\n useEffect(() => {\n // NOTE: The navigation stacks may not be fully rendered initially. This means the first route can be missed (it doesn't update useNavigationState)\n // If missing we simply wait a tick and call it again.\n if (!navigationState) {\n const timeout = setTimeout(trackRoute, 1)\n return () => clearTimeout(timeout)\n }\n trackRoute()\n }, [navigationState, trackRoute])\n}\n\nexport const useNavigationTracker = OptionalReactNativeNavigation\n ? _useNavigationTracker\n : _useNavigationTrackerDisabled\n"],"mappings":"0GAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,8BAAA,CAAAD,OAAA,8CAGA,IAAAE,MAAA,CAAAF,OAAA,YAGA,QAAS,CAAAG,6BAA6BA,CAAA,EACpC,OACF,CAEA,QAAS,CAAAC,qBAAqBA,CAC5BC,OAAoD,CACpDC,aAAoC,CACpCC,MAAgB,EAGhB,GAAM,CAAAC,OAAO,CAAG,GAAAC,4BAAqB,EAACF,MAAM,CAAE,sBAAsB,CAAC,CAErE,GAAI,CAACG,4DAA6B,CAAE,CAElC,KAAM,IAAI,CAAAC,KAAK,CAAC,kCAAkC,CAAC,CACrD,CAEA,GAAI,CAAAC,eAAe,CAAQC,SAAS,CACpC,GAAI,CAAAC,UAAU,CAAQR,aAAa,CAEnC,GAAI,CAEFM,eAAe,CAAGF,4DAA6B,CAACK,kBAAkB,CAAC,SAACC,KAAU,QAAK,CAAAA,KAAK,GAAC,CAC3F,CAAE,MAAOC,KAAK,CAAE,CAGdC,OAAO,CAACD,KAAK,CAAC,0BAA0B,CAAEA,KAAK,CAAC,CAClD,CAEA,GAAI,CACF,GAAI,CAACH,UAAU,CAAE,CAEfA,UAAU,CAAGJ,4DAA6B,CAACS,aAAa,EAAE,CAC5D,CACF,CAAE,MAAOF,KAAK,CAAE,CAGdC,OAAO,CAACD,KAAK,CAAC,qB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AC6B,MAAM,CAACP,gBAAgB,CAAEI,UAAU,CAAC,CAC9C,CACF,CAAC,CAAE,CAACpB,UAAU,CAAET,OAAO,CAAEG,OAAO,CAAC,CAAC,CAGlC,GAAA8B,gBAAS,EAAC,UAAK,CAGb,GAAI,CAAC1B,eAAe,CAAE,CACpB,GAAM,CAAA2B,OAAO,CAAGC,UAAU,CAACpB,UAAU,CAAE,CAAC,CAAC,CACzC,MAAO,kBAAM,CAAAqB,YAAY,CAACF,OAAO,CAAC,GACpC,CACAnB,UAAU,EAAE,CACd,CAAC,CAAE,CAACR,eAAe,CAAEQ,UAAU,CAAC,CAAC,CACnC,CAEO,GAAM,CAAAsB,oBAAoB,CAAAC,OAAA,CAAAD,oBAAA,CAAGhC,4DAA6B,CAC7DN,qBAAqB,CACrBD,6BAA6B","ignoreList":[]}
|
package/dist/hooks/usePostHog.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
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 _utils=require("./utils");var usePostHog=exports.usePostHog=function usePostHog(){var _React$useContext=_react["default"].useContext(_PostHogContext.PostHogContext),client=_React$useContext.client;(0,_utils.warnIfNoClient)(client,'usePostHog');return client;};
|
|
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 _utils=require("./utils");var usePostHog=exports.usePostHog=function usePostHog(){var _React$useContext=_react["default"].useContext(_PostHogContext.PostHogContext),client=_React$useContext.client;(0,_utils.warnIfNoClient)(client,'usePostHog');return client;};
|
|
2
|
+
//# sourceMappingURL=usePostHog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePostHog.js","
|
|
1
|
+
{"version":3,"file":"usePostHog.js","names":["_react","_interopRequireDefault","require","_PostHogContext","_utils","usePostHog","exports","_React$useContext","React","useContext","PostHogContext","client","warnIfNoClient"],"sources":["../../src/hooks/usePostHog.ts"],"sourcesContent":["import type { PostHog } from '../posthog-rn'\nimport React from 'react'\nimport { PostHogContext } from '../PostHogContext'\nimport { warnIfNoClient } from './utils'\n\nexport const usePostHog = (): PostHog => {\n const { client } = React.useContext(PostHogContext)\n warnIfNoClient(client, 'usePostHog')\n return client\n}\n"],"mappings":"mLACA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,eAAA,CAAAD,OAAA,sBACA,IAAAE,MAAA,CAAAF,OAAA,YAEO,GAAM,CAAAG,UAAU,CAAAC,OAAA,CAAAD,UAAA,CAAG,QAAb,CAAAA,UAAUA,CAAA,CAAiB,CACtC,IAAAE,iBAAA,CAAmBC,iBAAK,CAACC,UAAU,CAACC,8BAAc,CAAC,CAA3CC,MAAM,CAAAJ,iBAAA,CAANI,MAAM,CACd,GAAAC,qBAAc,EAACD,MAAM,CAAE,YAAY,CAAC,CACpC,MAAO,CAAAA,MAAM,CACf,CAAC","ignoreList":[]}
|
package/dist/hooks/utils.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.resetWarnedCallers=resetWarnedCallers;exports.useOverridablePostHog=void 0;exports.warnIfNoClient=warnIfNoClient;var _react=require("react");var _PostHogContext=require("../PostHogContext");var warnedCallers=new Set();function warnIfNoClient(client,caller){if(!client&&!warnedCallers.has(caller)){warnedCallers.add(caller);console.error("".concat(caller," was called without a PostHog client. Wrap your app with <PostHogProvider> or pass a client directly. See https://posthog.com/docs/libraries/react-native?#with-the-posthogprovider"));}}function resetWarnedCallers(){warnedCallers.clear();}var useOverridablePostHog=exports.useOverridablePostHog=function useOverridablePostHog(client,caller){var _useContext=(0,_react.useContext)(_PostHogContext.PostHogContext),contextClient=_useContext.client;var posthog=client!==null&&client!==void 0?client:contextClient;warnIfNoClient(posthog,caller);return posthog;};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.resetWarnedCallers=resetWarnedCallers;exports.useOverridablePostHog=void 0;exports.warnIfNoClient=warnIfNoClient;var _react=require("react");var _PostHogContext=require("../PostHogContext");var warnedCallers=new Set();function warnIfNoClient(client,caller){if(!client&&!warnedCallers.has(caller)){warnedCallers.add(caller);console.error("".concat(caller," was called without a PostHog client. Wrap your app with <PostHogProvider> or pass a client directly. See https://posthog.com/docs/libraries/react-native?#with-the-posthogprovider"));}}function resetWarnedCallers(){warnedCallers.clear();}var useOverridablePostHog=exports.useOverridablePostHog=function useOverridablePostHog(client,caller){var _useContext=(0,_react.useContext)(_PostHogContext.PostHogContext),contextClient=_useContext.client;var posthog=client!==null&&client!==void 0?client:contextClient;warnIfNoClient(posthog,caller);return posthog;};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
package/dist/hooks/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_react","require","_PostHogContext","warnedCallers","Set","warnIfNoClient","client","caller","has","add","console","error","concat","resetWarnedCallers","clear","useOverridablePostHog","exports","_useContext","useContext","PostHogContext","contextClient","posthog"],"sources":["../../src/hooks/utils.ts"],"sourcesContent":["import { useContext } from 'react'\nimport type { PostHog } from '../posthog-rn'\nimport { PostHogContext } from '../PostHogContext'\n\nconst warnedCallers = new Set<string>()\n\n/**\n * Log an error if the PostHog client is not available. Warns once per unique caller to avoid console spam.\n * @internal\n */\nexport function warnIfNoClient(client: PostHog | undefined, caller: string): void {\n if (!client && !warnedCallers.has(caller)) {\n warnedCallers.add(caller)\n console.error(\n `${caller} was called without a PostHog client. Wrap your app with <PostHogProvider> or pass a client directly. See https://posthog.com/docs/libraries/react-native?#with-the-posthogprovider`\n )\n }\n}\n\n/** @internal Exported for testing only. */\nexport function resetWarnedCallers(): void {\n warnedCallers.clear()\n}\n\n/**\n * Returns the first available PostHog client from arguments or context, correctly typed. Logs an error if no\n * client is found. This is used internally by hooks that accept an optional client parameter.\n * @internal\n */\nexport const useOverridablePostHog = (client: PostHog | undefined, caller: string): PostHog | undefined => {\n const { client: contextClient } = useContext(PostHogContext)\n const posthog = client ?? (contextClient as PostHog | undefined)\n warnIfNoClient(posthog, caller)\n return posthog\n}\n"],"mappings":"+LAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,eAAA,CAAAD,OAAA,sBAEA,GAAM,CAAAE,aAAa,CAAG,GAAI,CAAAC,GAAG,EAAU,CAMjC,QAAU,CAAAC,cAAcA,CAACC,MAA2B,CAAEC,MAAc,EACxE,GAAI,CAACD,MAAM,EAAI,CAACH,aAAa,CAACK,GAAG,CAACD,MAAM,CAAC,CAAE,CACzCJ,aAAa,CAACM,GAAG,CAACF,MAAM,CAAC,CACzBG,OAAO,CAACC,KAAK,IAAAC,MAAA,CACRL,MAAM,uLAAqL,CAC/L,CACH,CACF,CAGM,QAAU,CAAAM,kBAAkBA,CAAA,EAChCV,aAAa,CAACW,KAAK,EAAE,CACvB,CAOO,GAAM,CAAAC,qBAAqB,CAAAC,OAAA,CAAAD,qBAAA,CAAG,QAAxB,CAAAA,qBAAqBA,CAAIT,MAA2B,CAAEC,MAAc,CAAyB,CACxG,IAAAU,WAAA,CAAkC,GAAAC,iBAAU,EAACC,8BAAc,CAAC,CAA5CC,aAAa,CAAAH,WAAA,CAArBX,MAAM,CACd,GAAM,CAAAe,OAAO,CAAGf,MAAM,SAANA,MAAM,UAANA,MAAM,CAAKc,aAAqC,CAChEf,cAAc,CAACgB,OAAO,CAAEd,MAAM,CAAC,CAC/B,MAAO,CAAAc,OAAO,CAChB,CAAC","ignoreList":[]}
|
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports["default"]=void 0;var _posthogRn=require("./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 _useNavigationTracker=require("./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("./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("./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 _useFeatureFlagResult=require("./hooks/useFeatureFlagResult");Object.keys(_useFeatureFlagResult).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useFeatureFlagResult[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useFeatureFlagResult[key];}});});var _usePostHog=require("./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 _PostHogMaskView=require("./PostHogMaskView");Object.keys(_PostHogMaskView).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PostHogMaskView[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PostHogMaskView[key];}});});var _PostHogProvider=require("./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 _PostHogErrorBoundary=require("./PostHogErrorBoundary");Object.keys(_PostHogErrorBoundary).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PostHogErrorBoundary[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PostHogErrorBoundary[key];}});});var _types=require("./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 _surveys=require("./surveys");Object.keys(_surveys).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_surveys[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _surveys[key];}});});var _default=exports["default"]=_posthogRn.PostHog;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports["default"]=void 0;var _posthogRn=require("./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 _useNavigationTracker=require("./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("./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("./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 _useFeatureFlagResult=require("./hooks/useFeatureFlagResult");Object.keys(_useFeatureFlagResult).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useFeatureFlagResult[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useFeatureFlagResult[key];}});});var _usePostHog=require("./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 _PostHogMaskView=require("./PostHogMaskView");Object.keys(_PostHogMaskView).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PostHogMaskView[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PostHogMaskView[key];}});});var _PostHogProvider=require("./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 _PostHogErrorBoundary=require("./PostHogErrorBoundary");Object.keys(_PostHogErrorBoundary).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PostHogErrorBoundary[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PostHogErrorBoundary[key];}});});var _types=require("./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 _surveys=require("./surveys");Object.keys(_surveys).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_surveys[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _surveys[key];}});});var _default=exports["default"]=_posthogRn.PostHog;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_posthogRn","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_useNavigationTracker","_useFeatureFlags","_useFeatureFlag","_useFeatureFlagResult","_usePostHog","_PostHogMaskView","_PostHogProvider","_PostHogErrorBoundary","_types","_surveys","_default","PostHog"],"sources":["../src/index.ts"],"sourcesContent":["import { PostHog } from './posthog-rn'\n\nexport default PostHog\nexport * from './posthog-rn'\nexport * from './hooks/useNavigationTracker'\nexport * from './hooks/useFeatureFlags'\nexport * from './hooks/useFeatureFlag'\nexport * from './hooks/useFeatureFlagResult'\nexport * from './hooks/usePostHog'\nexport * from './PostHogMaskView'\nexport * from './PostHogProvider'\nexport * from './PostHogErrorBoundary'\nexport * from './types'\nexport * from './surveys'\n\n// Re-export logs public types so consumers can type their own wrappers\n// (e.g. hooks, HOCs, custom loggers) without pulling in @posthog/core.\nexport type {\n BeforeSendLogFn,\n CaptureLogOptions,\n CaptureLogger,\n LogAttributes,\n LogAttributeValue,\n LogSeverityLevel,\n PostHogLogsConfig,\n} from '@posthog/core'\n"],"mappings":"oHAAA,IAAAA,UAAA,CAAAC,OAAA,iBAGAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAL,UAAA,CAAAK,GAAA,QAAAH,CAAA,OAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAb,UAAA,CAAAK,GAAA,SACA,IAAAS,qBAAA,CAAAb,OAAA,iCAAAC,MAAA,CAAAC,IAAA,CAAAW,qBAAA,EAAAV,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAS,qBAAA,CAAAT,GAAA,QAAAH,CAAA,OAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAC,qBAAA,CAAAT,GAAA,SACA,IAAAU,gBAAA,CAAAd,OAAA,4BAAAC,MAAA,CAAAC,IAAA,CAAAY,gBAAA,EAAAX,OAAA,UAAAC,GAAA,KAAAA,GA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,2 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.DEFAULT_TERMINATION_FLUSH_BUDGET_MS=exports.DEFAULT_RATE_CAP_WINDOW_MS=exports.DEFAULT_MAX_LOGS_PER_INTERVAL=exports.DEFAULT_MAX_BUFFER_SIZE=exports.DEFAULT_MAX_BATCH_RECORDS_PER_POST=exports.DEFAULT_FLUSH_INTERVAL_MS=exports.DEFAULT_BACKGROUND_FLUSH_BUDGET_MS=void 0;exports.resolveLogsConfig=resolveLogsConfig;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _reactNative=require("react-native");var _utils=require("./utils");var _excluded=["rateCap"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var DEFAULT_FLUSH_INTERVAL_MS=exports.DEFAULT_FLUSH_INTERVAL_MS=10000;var DEFAULT_RATE_CAP_WINDOW_MS=exports.DEFAULT_RATE_CAP_WINDOW_MS=10000;var DEFAULT_MAX_BUFFER_SIZE=exports.DEFAULT_MAX_BUFFER_SIZE=100;var DEFAULT_MAX_LOGS_PER_INTERVAL=exports.DEFAULT_MAX_LOGS_PER_INTERVAL=500;var DEFAULT_MAX_BATCH_RECORDS_PER_POST=exports.DEFAULT_MAX_BATCH_RECORDS_PER_POST=50;var DEFAULT_BACKGROUND_FLUSH_BUDGET_MS=exports.DEFAULT_BACKGROUND_FLUSH_BUDGET_MS=25000;var DEFAULT_TERMINATION_FLUSH_BUDGET_MS=exports.DEFAULT_TERMINATION_FLUSH_BUDGET_MS=2000;function getPlatformVersion(){try{return(_reactNative.Platform===null||_reactNative.Platform===void 0?void 0:_reactNative.Platform.Version)!==undefined?String(_reactNative.Platform.Version):undefined;}catch(_a){return undefined;}}function defaultResourceAttributes(){var osName=(0,_utils.getPlatformOS)();var osVersion=getPlatformVersion();return _objectSpread(_objectSpread({},osName?{'os.name':osName}:{}),osVersion?{'os.version':osVersion}:{});}function resolveLogsConfig(config){var _a,_b,_c,_d,_e,_f,_g;var _ref=config!==null&&config!==void 0?config:{},_rateCap=_ref.rateCap,rest=(0,_objectWithoutProperties2["default"])(_ref,_excluded);return _objectSpread(_objectSpread({},rest),{},{maxBufferSize:(_a=config===null||config===void 0?void 0:config.maxBufferSize)!==null&&_a!==void 0?_a:DEFAULT_MAX_BUFFER_SIZE,flushIntervalMs:(_b=config===null||config===void 0?void 0:config.flushIntervalMs)!==null&&_b!==void 0?_b:DEFAULT_FLUSH_INTERVAL_MS,maxBatchRecordsPerPost:(_c=config===null||config===void 0?void 0:config.maxBatchRecordsPerPost)!==null&&_c!==void 0?_c:DEFAULT_MAX_BATCH_RECORDS_PER_POST,rateCapWindowMs:(_e=(_d=config===null||config===void 0?void 0:config.rateCap)===null||_d===void 0?void 0:_d.windowMs)!==null&&_e!==void 0?_e:DEFAULT_RATE_CAP_WINDOW_MS,maxLogsPerInterval:(_g=(_f=config===null||config===void 0?void 0:config.rateCap)===null||_f===void 0?void 0:_f.maxLogs)!==null&&_g!==void 0?_g:DEFAULT_MAX_LOGS_PER_INTERVAL,backgroundFlushBudgetMs:DEFAULT_BACKGROUND_FLUSH_BUDGET_MS,terminationFlushBudgetMs:DEFAULT_TERMINATION_FLUSH_BUDGET_MS,resourceAttributes:_objectSpread(_objectSpread({},defaultResourceAttributes()),config===null||config===void 0?void 0:config.resourceAttributes)});}
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.DEFAULT_TERMINATION_FLUSH_BUDGET_MS=exports.DEFAULT_RATE_CAP_WINDOW_MS=exports.DEFAULT_MAX_LOGS_PER_INTERVAL=exports.DEFAULT_MAX_BUFFER_SIZE=exports.DEFAULT_MAX_BATCH_RECORDS_PER_POST=exports.DEFAULT_FLUSH_INTERVAL_MS=exports.DEFAULT_BACKGROUND_FLUSH_BUDGET_MS=void 0;exports.resolveLogsConfig=resolveLogsConfig;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _reactNative=require("react-native");var _utils=require("./utils");var _excluded=["rateCap"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var DEFAULT_FLUSH_INTERVAL_MS=exports.DEFAULT_FLUSH_INTERVAL_MS=10000;var DEFAULT_RATE_CAP_WINDOW_MS=exports.DEFAULT_RATE_CAP_WINDOW_MS=10000;var DEFAULT_MAX_BUFFER_SIZE=exports.DEFAULT_MAX_BUFFER_SIZE=100;var DEFAULT_MAX_LOGS_PER_INTERVAL=exports.DEFAULT_MAX_LOGS_PER_INTERVAL=500;var DEFAULT_MAX_BATCH_RECORDS_PER_POST=exports.DEFAULT_MAX_BATCH_RECORDS_PER_POST=50;var DEFAULT_BACKGROUND_FLUSH_BUDGET_MS=exports.DEFAULT_BACKGROUND_FLUSH_BUDGET_MS=25000;var DEFAULT_TERMINATION_FLUSH_BUDGET_MS=exports.DEFAULT_TERMINATION_FLUSH_BUDGET_MS=2000;function getPlatformVersion(){try{return(_reactNative.Platform===null||_reactNative.Platform===void 0?void 0:_reactNative.Platform.Version)!==undefined?String(_reactNative.Platform.Version):undefined;}catch(_a){return undefined;}}function defaultResourceAttributes(){var osName=(0,_utils.getPlatformOS)();var osVersion=getPlatformVersion();return _objectSpread(_objectSpread({},osName?{'os.name':osName}:{}),osVersion?{'os.version':osVersion}:{});}function resolveLogsConfig(config){var _a,_b,_c,_d,_e,_f,_g;var _ref=config!==null&&config!==void 0?config:{},_rateCap=_ref.rateCap,rest=(0,_objectWithoutProperties2["default"])(_ref,_excluded);return _objectSpread(_objectSpread({},rest),{},{maxBufferSize:(_a=config===null||config===void 0?void 0:config.maxBufferSize)!==null&&_a!==void 0?_a:DEFAULT_MAX_BUFFER_SIZE,flushIntervalMs:(_b=config===null||config===void 0?void 0:config.flushIntervalMs)!==null&&_b!==void 0?_b:DEFAULT_FLUSH_INTERVAL_MS,maxBatchRecordsPerPost:(_c=config===null||config===void 0?void 0:config.maxBatchRecordsPerPost)!==null&&_c!==void 0?_c:DEFAULT_MAX_BATCH_RECORDS_PER_POST,rateCapWindowMs:(_e=(_d=config===null||config===void 0?void 0:config.rateCap)===null||_d===void 0?void 0:_d.windowMs)!==null&&_e!==void 0?_e:DEFAULT_RATE_CAP_WINDOW_MS,maxLogsPerInterval:(_g=(_f=config===null||config===void 0?void 0:config.rateCap)===null||_f===void 0?void 0:_f.maxLogs)!==null&&_g!==void 0?_g:DEFAULT_MAX_LOGS_PER_INTERVAL,backgroundFlushBudgetMs:DEFAULT_BACKGROUND_FLUSH_BUDGET_MS,terminationFlushBudgetMs:DEFAULT_TERMINATION_FLUSH_BUDGET_MS,resourceAttributes:_objectSpread(_objectSpread({},defaultResourceAttributes()),config===null||config===void 0?void 0:config.resourceAttributes)});}
|
|
2
|
+
//# sourceMappingURL=logs-defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs-defaults.js","
|
|
1
|
+
{"version":3,"file":"logs-defaults.js","names":["_reactNative","require","_utils","_excluded","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","DEFAULT_FLUSH_INTERVAL_MS","exports","DEFAULT_RATE_CAP_WINDOW_MS","DEFAULT_MAX_BUFFER_SIZE","DEFAULT_MAX_LOGS_PER_INTERVAL","DEFAULT_MAX_BATCH_RECORDS_PER_POST","DEFAULT_BACKGROUND_FLUSH_BUDGET_MS","DEFAULT_TERMINATION_FLUSH_BUDGET_MS","getPlatformVersion","Platform","Version","undefined","String","_a","defaultResourceAttributes","osName","getPlatformOS","osVersion","resolveLogsConfig","config","_ref","_rateCap","rateCap","rest","_objectWithoutProperties2","maxBufferSize","flushIntervalMs","_b","maxBatchRecordsPerPost","_c","rateCapWindowMs","_e","_d","windowMs","maxLogsPerInterval","_g","_f","maxLogs","backgroundFlushBudgetMs","terminationFlushBudgetMs","resourceAttributes"],"sources":["../src/logs-defaults.ts"],"sourcesContent":["import { Platform } from 'react-native'\nimport type { PostHogLogsConfig, ResolvedPostHogLogsConfig } from '@posthog/core'\nimport { getPlatformOS } from './utils'\n\n// Mobile defaults. Tuned for cellular radio tail (longer flush interval keeps\n// the radio asleep) and cellular data cost (tighter per-interval rate cap).\nexport const DEFAULT_FLUSH_INTERVAL_MS = 10000\nexport const DEFAULT_RATE_CAP_WINDOW_MS = 10000\nexport const DEFAULT_MAX_BUFFER_SIZE = 100\nexport const DEFAULT_MAX_LOGS_PER_INTERVAL = 500\nexport const DEFAULT_MAX_BATCH_RECORDS_PER_POST = 50\n// iOS beginBackgroundTask budget is ~30s; stay comfortably under.\nexport const DEFAULT_BACKGROUND_FLUSH_BUDGET_MS = 25000\nexport const DEFAULT_TERMINATION_FLUSH_BUDGET_MS = 2000\n\n/**\n * RN-specific resource attribute defaults. Identifies the device's OS so\n * logs can be filtered by platform (e.g. \"all errors on Android 13\" or\n * \"iOS 17 only\" in the PostHog UI). User-supplied `resourceAttributes`\n * spreads last in `_buildResourceAttributes` so these are overridable.\n *\n * `Platform.Version` is `string` on iOS and `number` on Android — coerce\n * to string so the OTLP `os.version` attribute has a stable type.\n */\nfunction getPlatformVersion(): string | undefined {\n try {\n return Platform?.Version !== undefined ? String(Platform.Version) : undefined\n } catch {\n return undefined\n }\n}\n\nfunction defaultResourceAttributes(): Record<string, string> {\n const osName = getPlatformOS()\n const osVersion = getPlatformVersion()\n return {\n ...(osName ? { 'os.name': osName } : {}),\n ...(osVersion ? { 'os.version': osVersion } : {}),\n }\n}\n\nexport function resolveLogsConfig(config: PostHogLogsConfig | undefined): ResolvedPostHogLogsConfig {\n // `rateCap` is dropped from the spread so the resolved (flat) names below\n // are the only authoritative form on the resolved config.\n const { rateCap: _rateCap, ...rest } = config ?? {}\n return {\n ...rest,\n maxBufferSize: config?.maxBufferSize ?? DEFAULT_MAX_BUFFER_SIZE,\n flushIntervalMs: config?.flushIntervalMs ?? DEFAULT_FLUSH_INTERVAL_MS,\n maxBatchRecordsPerPost: config?.maxBatchRecordsPerPost ?? DEFAULT_MAX_BATCH_RECORDS_PER_POST,\n // Rate-cap window defaults independently of flush cadence: changing flush\n // frequency shouldn't implicitly re-shape the rate budget.\n rateCapWindowMs: config?.rateCap?.windowMs ?? DEFAULT_RATE_CAP_WINDOW_MS,\n // RN defaults to 500/window to bound cellular data cost.\n maxLogsPerInterval: config?.rateCap?.maxLogs ?? DEFAULT_MAX_LOGS_PER_INTERVAL,\n backgroundFlushBudgetMs: DEFAULT_BACKGROUND_FLUSH_BUDGET_MS,\n terminationFlushBudgetMs: DEFAULT_TERMINATION_FLUSH_BUDGET_MS,\n // Merge platform-detected attrs first so user-provided `resourceAttributes`\n // wins on any conflict. Never throw if `Platform` is unavailable in\n // unusual envs (web bundle, vi without RN preset) — fall back silently.\n resourceAttributes: {\n ...defaultResourceAttributes(),\n ...config?.resourceAttributes,\n },\n }\n}\n"],"mappings":"uqBAAA,IAAAA,YAAA,CAAAC,OAAA,iBAEA,IAAAC,MAAA,CAAAD,OAAA,YAAuC,IAAAE,SAAA,sBAAAC,QAAAC,CAAA,CAAAC,CAAA,MAAAC,CAAA,CAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,KAAAG,MAAA,CAAAE,qBAAA,MAAAC,CAAA,CAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,CAAAC,CAAA,IAAAK,CAAA,CAAAA,CAAA,CAAAC,MAAA,UAAAN,CAAA,SAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,CAAAC,CAAA,EAAAQ,UAAA,KAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,CAAAI,CAAA,UAAAJ,CAAA,WAAAU,cAAAZ,CAAA,UAAAC,CAAA,GAAAA,CAAA,CAAAY,SAAA,CAAAC,MAAA,CAAAb,CAAA,QAAAC,CAAA,OAAAW,SAAA,CAAAZ,CAAA,EAAAY,SAAA,CAAAZ,CAAA,IAAAA,CAAA,IAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,MAAAa,OAAA,UAAAd,CAAA,KAAAe,gBAAA,aAAAhB,CAAA,CAAAC,CAAA,CAAAC,CAAA,CAAAD,CAAA,MAAAE,MAAA,CAAAc,yBAAA,CAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,CAAAG,MAAA,CAAAc,yBAAA,CAAAf,CAAA,GAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAa,OAAA,UAAAd,CAAA,EAAAE,MAAA,CAAAgB,cAAA,CAAAnB,CAAA,CAAA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CE,QAAQ,CAAAD,IAAA,CAAjBE,OAAO,CAAeC,IAAI,IAAAC,yBAAA,aAAAJ,IAAA,CAAA1C,SAAA,EAClC,OAAAc,aAAA,CAAAA,aAAA,IACK+B,IAAI,MACPE,aAAa,CAAE,CAAAZ,EAAA,CAAAM,MAAM,SAANA,MAAM,iBAANA,MAAM,CAAEM,aAAa,UAAAZ,EAAA,UAAAA,EAAA,CAAIV,uBAAuB,CAC/DuB,eAAe,CAAE,CAAAC,EAAA,CAAAR,MAAM,SAANA,MAAM,iBAANA,MAAM,CAAEO,eAAe,UAAAC,EAAA,UAAAA,EAAA,CAAI3B,yBAAyB,CACrE4B,sBAAsB,CAAE,CAAAC,EAAA,CAAAV,MAAM,SAANA,MAAM,iBAANA,MAAM,CAAES,sBAAsB,UAAAC,EAAA,UAAAA,EAAA,CAAIxB,kCAAkC,CAG5FyB,eAAe,CAAE,CAAAC,EAAA,EAAAC,EAAA,CAAAb,MAAM,SAANA,MAAM,iBAANA,MAAM,CAAEG,OAAO,UAAAU,EAAA,iBAAAA,EAAA,CAAEC,QAAQ,UAAAF,EAAA,UAAAA,EAAA,CAAI7B,0BAA0B,CAExEgC,kBAAkB,CAAE,CAAAC,EAAA,EAAAC,EAAA,CAAAjB,MAAM,SAANA,MAAM,iBAANA,MAAM,CAAEG,OAAO,UAAAc,EAAA,iBAAAA,EAAA,CAAEC,OAAO,UAAAF,EAAA,UAAAA,EAAA,CAAI/B,6BAA6B,CAC7EkC,uBAAuB,CAAEhC,kCAAkC,CAC3DiC,wBAAwB,CAAEhC,mCAAmC,CAI7DiC,kBAAkB,CAAAhD,aAAA,CAAAA,aAAA,IACbsB,yBAAyB,EAAE,EAC3BK,MAAM,SAANA,MAAM,iBAANA,MAAM,CAAEqB,kBAAkB,CAC9B,GAEL","ignoreList":[]}
|
package/dist/native-deps.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.currentDeviceType=exports.buildOptimisticAsyncStorage=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _OptionalAsyncStorage=require("./optional/OptionalAsyncStorage");var _utils=require("./utils");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 _OptionalReactNativeLocalize=require("./optional/OptionalReactNativeLocalize");var _OptionalExpoFileSystemLegacy=require("./optional/OptionalExpoFileSystemLegacy");var _core=require("@posthog/core");var getDeviceType=function getDeviceType(){var _a,_b,_c;var deviceType='Mobile';if((0,_utils.isMacOS)()||(0,_utils.isWindows)()){deviceType='Desktop';}else if((0,_utils.isWeb)()){var ua=typeof navigator!=='undefined'&&navigator.userAgent?navigator.userAgent:'';var nav=typeof navigator!=='undefined'?navigator:undefined;var win=typeof globalThis.window!=='undefined'?globalThis.window:undefined;deviceType=(0,_core.detectDeviceType)(ua,{userAgentDataPlatform:(_a=nav===null||nav===void 0?void 0:nav.userAgentData)===null||_a===void 0?void 0:_a.platform,maxTouchPoints:nav===null||nav===void 0?void 0:nav.maxTouchPoints,screenWidth:(_b=win===null||win===void 0?void 0:win.screen)===null||_b===void 0?void 0:_b.width,screenHeight:(_c=win===null||win===void 0?void 0:win.screen)===null||_c===void 0?void 0:_c.height,devicePixelRatio:win===null||win===void 0?void 0:win.devicePixelRatio});}return deviceType;};var currentDeviceType=exports.currentDeviceType=getDeviceType();var getAppProperties=exports.getAppProperties=function getAppProperties(){var _a,_b;var properties={$device_type:currentDeviceType};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;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildNumber());properties.$app_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName());properties.$app_namespace=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId());properties.$app_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion());}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;if((0,_utils.getPlatformOS)()==='android'){properties.$os_name='Android';}else{properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;}properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;properties.$is_emulator=!_OptionalExpoDevice.OptionalExpoDevice.isDevice;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$device_manufacturer=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync());properties.$device_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getModel());properties.$os_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName());properties.$os_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion());properties.$is_emulator=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.isEmulatorSync();}if(_OptionalExpoLocalization.OptionalExpoLocalization){var optionalExpoLocalization=_OptionalExpoLocalization.OptionalExpoLocalization;var locale=optionalExpoLocalization.locale;if(!locale&&optionalExpoLocalization.getLocales){locale=(_a=optionalExpoLocalization.getLocales()[0])===null||_a===void 0?void 0:_a.languageTag;}if(locale){properties.$locale=locale;}var timezone=optionalExpoLocalization.timezone;if(!timezone&&optionalExpoLocalization.getCalendars){timezone=(_b=optionalExpoLocalization.getCalendars()[0])===null||_b===void 0?void 0:_b.timeZone;}if(timezone){properties.$timezone=timezone;}}else if(_OptionalReactNativeLocalize.OptionalReactNativeLocalize){var localesFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getLocales;if(localesFn){var locales=localesFn();if(locales&&locales.length>0){var languageTag=locales[0].languageTag;if(languageTag){properties.$locale=languageTag;}}}var timezoneFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getTimeZone;if(timezoneFn){var _timezone=timezoneFn();if(_timezone){properties.$timezone=_timezone;}}}return properties;};var returnPropertyIfNotUnknown=function returnPropertyIfNotUnknown(value){if(value!=='unknown'){return value;}return null;};var buildLegacyStorage=function buildLegacyStorage(filesystem){return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var uri,stringContent,_t;return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;uri=(filesystem.documentDirectory||'')+key;_context.next=1;return filesystem.readAsStringAsync(uri);case 1:stringContent=_context.sent;return _context.abrupt("return",stringContent);case 2:_context.prev=2;_t=_context["catch"](0);return _context.abrupt("return",null);case 3:case"end":return _context.stop();}},_callee,null,[[0,2]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var uri;return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context2.next=1;return filesystem.writeAsStringAsync(uri,value);case 1:case"end":return _context2.stop();}},_callee2);}))();}};};var buildOptimisticAsyncStorage=exports.buildOptimisticAsyncStorage=function buildOptimisticAsyncStorage(){if((0,_utils.isWeb)()&&typeof(_utils.GLOBAL_OBJ===null||_utils.GLOBAL_OBJ===void 0?void 0:_utils.GLOBAL_OBJ.window)==='undefined'){return undefined;}var supportedPlatform=!(0,_utils.isWeb)()&&!(0,_utils.isMacOS)();if(supportedPlatform){if(_OptionalExpoFileSystem.OptionalExpoFileSystem){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;if(filesystem.Paths&&filesystem.File){return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){var file,stringContent,_t2;return _regenerator["default"].wrap(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;file=new filesystem.File(filesystem.Paths.document,key);_context3.next=1;return file.text();case 1:stringContent=_context3.sent;return _context3.abrupt("return",stringContent);case 2:_context3.prev=2;_t2=_context3["catch"](0);return _context3.abrupt("return",null);case 3:case"end":return _context3.stop();}},_callee3,null,[[0,2]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4(){var file;return _regenerator["default"].wrap(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:file=new filesystem.File(filesystem.Paths.document,key);_context4.next=1;return file.write(value);case 1:case"end":return _context4.stop();}},_callee4);}))();}};}}var legacyModule=_OptionalExpoFileSystemLegacy.OptionalExpoFileSystemLegacy||_OptionalExpoFileSystem.OptionalExpoFileSystem;try{if(legacyModule&&typeof legacyModule.readAsStringAsync==='function'){return buildLegacyStorage(legacyModule);}}catch(e){}}if(_OptionalAsyncStorage.OptionalAsyncStorage){return _OptionalAsyncStorage.OptionalAsyncStorage;}throw new Error('PostHog: No storage available. Please install expo-file-system or react-native-async-storage OR implement a custom storage provider.');};
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.currentDeviceType=exports.buildOptimisticAsyncStorage=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _OptionalAsyncStorage=require("./optional/OptionalAsyncStorage");var _utils=require("./utils");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 _OptionalReactNativeLocalize=require("./optional/OptionalReactNativeLocalize");var _OptionalExpoFileSystemLegacy=require("./optional/OptionalExpoFileSystemLegacy");var _core=require("@posthog/core");var getDeviceType=function getDeviceType(){var _a,_b,_c;var deviceType='Mobile';if((0,_utils.isMacOS)()||(0,_utils.isWindows)()){deviceType='Desktop';}else if((0,_utils.isWeb)()){var ua=typeof navigator!=='undefined'&&navigator.userAgent?navigator.userAgent:'';var nav=typeof navigator!=='undefined'?navigator:undefined;var win=typeof globalThis.window!=='undefined'?globalThis.window:undefined;deviceType=(0,_core.detectDeviceType)(ua,{userAgentDataPlatform:(_a=nav===null||nav===void 0?void 0:nav.userAgentData)===null||_a===void 0?void 0:_a.platform,maxTouchPoints:nav===null||nav===void 0?void 0:nav.maxTouchPoints,screenWidth:(_b=win===null||win===void 0?void 0:win.screen)===null||_b===void 0?void 0:_b.width,screenHeight:(_c=win===null||win===void 0?void 0:win.screen)===null||_c===void 0?void 0:_c.height,devicePixelRatio:win===null||win===void 0?void 0:win.devicePixelRatio});}return deviceType;};var currentDeviceType=exports.currentDeviceType=getDeviceType();var getAppProperties=exports.getAppProperties=function getAppProperties(){var _a,_b;var properties={$device_type:currentDeviceType};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;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildNumber());properties.$app_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName());properties.$app_namespace=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId());properties.$app_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion());}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;if((0,_utils.getPlatformOS)()==='android'){properties.$os_name='Android';}else{properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;}properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;properties.$is_emulator=!_OptionalExpoDevice.OptionalExpoDevice.isDevice;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$device_manufacturer=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync());properties.$device_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getModel());properties.$os_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName());properties.$os_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion());properties.$is_emulator=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.isEmulatorSync();}if(_OptionalExpoLocalization.OptionalExpoLocalization){var optionalExpoLocalization=_OptionalExpoLocalization.OptionalExpoLocalization;var locale=optionalExpoLocalization.locale;if(!locale&&optionalExpoLocalization.getLocales){locale=(_a=optionalExpoLocalization.getLocales()[0])===null||_a===void 0?void 0:_a.languageTag;}if(locale){properties.$locale=locale;}var timezone=optionalExpoLocalization.timezone;if(!timezone&&optionalExpoLocalization.getCalendars){timezone=(_b=optionalExpoLocalization.getCalendars()[0])===null||_b===void 0?void 0:_b.timeZone;}if(timezone){properties.$timezone=timezone;}}else if(_OptionalReactNativeLocalize.OptionalReactNativeLocalize){var localesFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getLocales;if(localesFn){var locales=localesFn();if(locales&&locales.length>0){var languageTag=locales[0].languageTag;if(languageTag){properties.$locale=languageTag;}}}var timezoneFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getTimeZone;if(timezoneFn){var _timezone=timezoneFn();if(_timezone){properties.$timezone=_timezone;}}}return properties;};var returnPropertyIfNotUnknown=function returnPropertyIfNotUnknown(value){if(value!=='unknown'){return value;}return null;};var buildLegacyStorage=function buildLegacyStorage(filesystem){return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var uri,stringContent,_t;return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;uri=(filesystem.documentDirectory||'')+key;_context.next=1;return filesystem.readAsStringAsync(uri);case 1:stringContent=_context.sent;return _context.abrupt("return",stringContent);case 2:_context.prev=2;_t=_context["catch"](0);return _context.abrupt("return",null);case 3:case"end":return _context.stop();}},_callee,null,[[0,2]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var uri;return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context2.next=1;return filesystem.writeAsStringAsync(uri,value);case 1:case"end":return _context2.stop();}},_callee2);}))();}};};var buildOptimisticAsyncStorage=exports.buildOptimisticAsyncStorage=function buildOptimisticAsyncStorage(){if((0,_utils.isWeb)()&&typeof(_utils.GLOBAL_OBJ===null||_utils.GLOBAL_OBJ===void 0?void 0:_utils.GLOBAL_OBJ.window)==='undefined'){return undefined;}var supportedPlatform=!(0,_utils.isWeb)()&&!(0,_utils.isMacOS)();if(supportedPlatform){if(_OptionalExpoFileSystem.OptionalExpoFileSystem){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;if(filesystem.Paths&&filesystem.File){return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){var file,stringContent,_t2;return _regenerator["default"].wrap(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;file=new filesystem.File(filesystem.Paths.document,key);_context3.next=1;return file.text();case 1:stringContent=_context3.sent;return _context3.abrupt("return",stringContent);case 2:_context3.prev=2;_t2=_context3["catch"](0);return _context3.abrupt("return",null);case 3:case"end":return _context3.stop();}},_callee3,null,[[0,2]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4(){var file;return _regenerator["default"].wrap(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:file=new filesystem.File(filesystem.Paths.document,key);_context4.next=1;return file.write(value);case 1:case"end":return _context4.stop();}},_callee4);}))();}};}}var legacyModule=_OptionalExpoFileSystemLegacy.OptionalExpoFileSystemLegacy||_OptionalExpoFileSystem.OptionalExpoFileSystem;try{if(legacyModule&&typeof legacyModule.readAsStringAsync==='function'){return buildLegacyStorage(legacyModule);}}catch(e){}}if(_OptionalAsyncStorage.OptionalAsyncStorage){return _OptionalAsyncStorage.OptionalAsyncStorage;}throw new Error('PostHog: No storage available. Please install expo-file-system or react-native-async-storage OR implement a custom storage provider.');};
|
|
2
|
+
//# sourceMappingURL=native-deps.js.map
|
package/dist/native-deps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AC;IAED,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,oBAAoB,CAAA;IAC7B,CAAC;IAED,MAAM,IAAI,KAAK,CACb,sIAAsI,CACvI,CAAA;AACH,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"native-deps.js","names":["_OptionalAsyncStorage","require","_utils","_OptionalExpoApplication","_OptionalExpoDevice","_OptionalExpoFileSystem","_OptionalExpoLocalization","_OptionalReactNativeDeviceInfo","_OptionalReactNativeLocalize","_OptionalExpoFileSystemLegacy","_core","getDeviceType","deviceType","isMacOS","isWindows","isWeb","ua","navigator","userAgent","nav","undefined","win","globalThis","window","detectDeviceType","userAgentDataPlatform","_a","userAgentData","platform","maxTouchPoints","screenWidth","_b","screen","width","screenHeight","_c","height","devicePixelRatio","currentDeviceType","exports","getAppProperties","properties","$device_type","OptionalExpoApplication","$app_build","nativeBuildVersion","$app_name","applicationName","$app_namespace","applicationId","$app_version","nativeApplicationVersion","OptionalReactNativeDeviceInfo","returnPropertyIfNotUnknown","getBuildNumber","getApplicationName","getBundleId","getVersion","OptionalExpoDevice","$device_manufacturer","manufacturer","$device_name","modelName","getPlatformOS","$os_name","osName","$os_version","osVersion","$is_emulator","isDevice","getManufacturerSync","getModel","getSystemName","getSystemVersion","isEmulatorSync","OptionalExpoLocalization","optionalExpoLocalization","locale","getLocales","languageTag","$locale","timezone","getCalendars","timeZone","$timezone","OptionalReactNativeLocalize","localesFn","locales","length","timezoneFn","getTimeZone","value","buildLegacyStorage","filesystem","getItem","key","_asyncToGenerator2","_regenerator","mark","_callee","uri","stringContent","_t","wrap","_context","prev","next","documentDirectory","readAsStringAsync","sent","abrupt","stop","setItem","_callee2","_context2","writeAsStringAsync","buildOptimisticAsyncStorage","GLOBAL_OBJ","supportedPlatform","OptionalExpoFileSystem","Paths","File","_callee3","file","_t2","_context3","document","text","_callee4","_context4","write","legacyModule","OptionalExpoFileSystemLegacy","e","OptionalAsyncStorage","Error"],"sources":["../src/native-deps.tsx"],"sourcesContent":["import { OptionalAsyncStorage } from './optional/OptionalAsyncStorage'\nimport { GLOBAL_OBJ, getPlatformOS, isMacOS, isWeb, isWindows } from './utils'\nimport { OptionalExpoApplication } from './optional/OptionalExpoApplication'\nimport { OptionalExpoDevice } from './optional/OptionalExpoDevice'\nimport { OptionalExpoFileSystem } from './optional/OptionalExpoFileSystem'\nimport { OptionalExpoLocalization } from './optional/OptionalExpoLocalization'\nimport { OptionalReactNativeDeviceInfo } from './optional/OptionalReactNativeDeviceInfo'\nimport { PostHogCustomAppProperties, PostHogCustomStorage } from './types'\nimport { OptionalReactNativeLocalize } from './optional/OptionalReactNativeLocalize'\nimport { OptionalExpoFileSystemLegacy } from './optional/OptionalExpoFileSystemLegacy'\nimport { detectDeviceType } from '@posthog/core'\n\nconst getDeviceType = (): string => {\n let deviceType = 'Mobile'\n\n if (isMacOS() || isWindows()) {\n deviceType = 'Desktop'\n } else if (isWeb()) {\n // Check user agent to determine if it's desktop or mobile\n const ua = typeof navigator !== 'undefined' && navigator.userAgent ? navigator.userAgent : ''\n\n const nav = typeof navigator !== 'undefined' ? (navigator as any) : undefined\n const win = typeof (globalThis as any).window !== 'undefined' ? (globalThis as any).window : undefined\n deviceType = detectDeviceType(ua, {\n userAgentDataPlatform: nav?.userAgentData?.platform,\n maxTouchPoints: nav?.maxTouchPoints,\n screenWidth: win?.screen?.width,\n screenHeight: win?.screen?.height,\n devicePixelRatio: win?.devicePixelRatio,\n })\n }\n return deviceType\n}\n\nexport const currentDeviceType = getDeviceType()\n\nexport const getAppProperties = (): PostHogCustomAppProperties => {\n const properties: PostHogCustomAppProperties = {\n $device_type: currentDeviceType,\n }\n\n if (OptionalExpoApplication) {\n properties.$app_build = OptionalExpoApplication.nativeBuildVersion\n properties.$app_name = OptionalExpoApplication.applicationName\n properties.$app_namespace = OptionalExpoApplication.applicationId\n properties.$app_version = OptionalExpoApplication.nativeApplicationVersion\n } else if (OptionalReactNativeDeviceInfo) {\n properties.$app_build = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getBuildNumber())\n properties.$app_name = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getApplicationName())\n properties.$app_namespace = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getBundleId())\n properties.$app_version = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getVersion())\n }\n\n if (OptionalExpoDevice) {\n properties.$device_manufacturer = OptionalExpoDevice.manufacturer\n // expo-device already maps the device model identifier to a human readable name\n properties.$device_name = OptionalExpoDevice.modelName\n\n // https://github.com/expo/expo/issues/6990\n // some devices return a value similar to:\n // HUAWEI/SNE-LX1/HWSNE:8.1.0/HUAWEISNE-LX1/131(C432):user/release-keys\n if (getPlatformOS() === 'android') {\n properties.$os_name = 'Android'\n } else {\n properties.$os_name = OptionalExpoDevice.osName\n }\n\n properties.$os_version = OptionalExpoDevice.osVersion\n properties.$is_emulator = !OptionalExpoDevice.isDevice\n } else if (OptionalReactNativeDeviceInfo) {\n properties.$device_manufacturer = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getManufacturerSync())\n // react-native-device-info already maps the device model identifier to a human readable name\n properties.$device_name = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getModel())\n properties.$os_name = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getSystemName())\n properties.$os_version = returnPropertyIfNotUnknown(OptionalReactNativeDeviceInfo.getSystemVersion())\n properties.$is_emulator = OptionalReactNativeDeviceInfo.isEmulatorSync()\n }\n\n if (OptionalExpoLocalization) {\n // expo-localization >= 14 use functions to get these results, older versions use JS getters\n // https://github.com/expo/expo/blob/sdk-54/packages/expo-localization/CHANGELOG.md#1400--2022-10-25\n // this type below supports both variants, and type-checks with older and newer versions of expo-localization\n const optionalExpoLocalization: {\n locale?: string\n getLocales?: () => {\n languageTag: string\n }[]\n timezone?: string\n getCalendars?: () => {\n timeZone: string | null\n }[]\n } = OptionalExpoLocalization\n\n let locale = optionalExpoLocalization.locale\n if (!locale && optionalExpoLocalization.getLocales) {\n locale = optionalExpoLocalization.getLocales()[0]?.languageTag\n }\n if (locale) {\n properties.$locale = locale\n }\n let timezone: string | undefined | null = optionalExpoLocalization.timezone\n if (!timezone && optionalExpoLocalization.getCalendars) {\n timezone = optionalExpoLocalization.getCalendars()[0]?.timeZone\n }\n if (timezone) {\n properties.$timezone = timezone\n }\n } else if (OptionalReactNativeLocalize) {\n const localesFn = OptionalReactNativeLocalize.getLocales\n if (localesFn) {\n const locales = localesFn()\n\n if (locales && locales.length > 0) {\n const languageTag = locales[0].languageTag\n if (languageTag) {\n properties.$locale = languageTag\n }\n }\n }\n\n const timezoneFn = OptionalReactNativeLocalize.getTimeZone\n if (timezoneFn) {\n const timezone = timezoneFn()\n\n if (timezone) {\n properties.$timezone = timezone\n }\n }\n }\n\n return properties\n}\n\n// react-native-device-info returns 'unknown' if the property is not available (Web target)\nconst returnPropertyIfNotUnknown = (value: string | null): string | null => {\n if (value !== 'unknown') {\n return value\n }\n return null\n}\n\nconst buildLegacyStorage = (filesystem: any): PostHogCustomStorage => {\n return {\n async getItem(key: string) {\n try {\n const uri = (filesystem.documentDirectory || '') + key\n const stringContent = await filesystem.readAsStringAsync(uri)\n return stringContent\n } catch (e) {\n return null\n }\n },\n\n async setItem(key: string, value: string) {\n const uri = (filesystem.documentDirectory || '') + key\n await filesystem.writeAsStringAsync(uri, value)\n },\n }\n}\n\nexport const buildOptimisticAsyncStorage = (): PostHogCustomStorage | undefined => {\n // On web platform during SSR (no window), skip file storage\n // The caller will fall back to memory storage\n if (isWeb() && typeof (GLOBAL_OBJ as any)?.window === 'undefined') {\n return undefined\n }\n\n // expo-file-system is not supported on web and macos, so we need to use the react-native-async-storage package instead\n // see https://github.com/PostHog/posthog-js-lite/blob/5fb7bee96f739b243dfea5589e2027f16629e8cd/posthog-react-native/src/optional/OptionalExpoFileSystem.ts#L7-L11\n const supportedPlatform = !isWeb() && !isMacOS()\n\n // expo-file-system is only supported on native platforms (not web/macOS).\n // See https://github.com/PostHog/posthog-js-lite/issues/140\n if (supportedPlatform) {\n // expo >= 54 and expo-file-system >= 19: prefer the new File/Paths API.\n // We always check for the new API first because:\n // - SDK 54 stable exports legacy methods (readAsStringAsync, writeAsStringAsync) that throw\n // a deprecation error when called, so existence checks alone are unreliable.\n // - SDK 55+ has a working legacy subpath, but the new API is the recommended approach.\n // See https://github.com/PostHog/posthog-js/issues/3151\n if (OptionalExpoFileSystem) {\n const filesystem = OptionalExpoFileSystem as any\n\n if (filesystem.Paths && filesystem.File) {\n return {\n async getItem(key: string) {\n try {\n // File constructor accepts Directory instances and joins path segments\n // See https://docs.expo.dev/versions/latest/sdk/filesystem/\n const file = new filesystem.File(filesystem.Paths.document, key)\n const stringContent = await file.text()\n return stringContent\n } catch (e) {\n return null\n }\n },\n\n async setItem(key: string, value: string) {\n const file = new filesystem.File(filesystem.Paths.document, key)\n await file.write(value)\n },\n }\n }\n }\n\n // Fallback to legacy APIs for older Expo versions (expo <= 53, expo-file-system <= 18).\n // Try the legacy subpath first (available in SDK 55+), then the main module.\n // We validate that readAsStringAsync is a real function before using it,\n // to avoid calling deprecated stubs that throw at runtime (SDK 54 stable).\n const legacyModule = (OptionalExpoFileSystemLegacy || OptionalExpoFileSystem) as any\n try {\n if (legacyModule && typeof legacyModule.readAsStringAsync === 'function') {\n return buildLegacyStorage(legacyModule)\n }\n } catch (e) {}\n }\n\n if (OptionalAsyncStorage) {\n return OptionalAsyncStorage\n }\n\n throw new Error(\n 'PostHog: No storage available. Please install expo-file-system or react-native-async-storage OR implement a custom storage provider.'\n )\n}\n"],"mappings":"waAAA,IAAAA,qBAAA,CAAAC,OAAA,oCACA,IAAAC,MAAA,CAAAD,OAAA,YACA,IAAAE,wBAAA,CAAAF,OAAA,uCACA,IAAAG,mBAAA,CAAAH,OAAA,kCACA,IAAAI,uBAAA,CAAAJ,OAAA,sCACA,IAAAK,yBAAA,CAAAL,OAAA,wCACA,IAAAM,8BAAA,CAAAN,OAAA,6CAEA,IA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CAAAlB,IAAA,MAAAiB,QAAA,QACzB,C,CACD,CACH,CACF,CAMA,GAAM,CAAAG,YAAY,CAAIC,0DAA4B,EAAIb,8CAA8B,CACpF,GAAI,CACF,GAAIY,YAAY,EAAI,MAAO,CAAAA,YAAY,CAACvB,iBAAiB,GAAK,UAAU,CAAE,CACxE,MAAO,CAAAhB,kBAAkB,CAACuC,YAAY,CAAC,CACzC,CACF,CAAE,MAAOE,CAAC,CAAE,CAAC,CACf,CAEA,GAAIC,0CAAoB,CAAE,CACxB,MAAO,CAAAA,0CAAoB,CAC7B,CAEA,KAAM,IAAI,CAAAC,KAAK,CACb,sIAAsI,CACvI,CACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalAsyncStorage=void 0;var OptionalAsyncStorage=exports.OptionalAsyncStorage=undefined;try{exports.OptionalAsyncStorage=OptionalAsyncStorage=require('@react-native-async-storage/async-storage')["default"];}catch(e){}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalAsyncStorage=void 0;var OptionalAsyncStorage=exports.OptionalAsyncStorage=undefined;try{exports.OptionalAsyncStorage=OptionalAsyncStorage=require('@react-native-async-storage/async-storage')["default"];}catch(e){}
|
|
2
|
+
//# sourceMappingURL=OptionalAsyncStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalAsyncStorage.js","
|
|
1
|
+
{"version":3,"file":"OptionalAsyncStorage.js","names":["OptionalAsyncStorage","exports","undefined","require","e"],"sources":["../../src/optional/OptionalAsyncStorage.ts"],"sourcesContent":["import type AsyncStorage from '@react-native-async-storage/async-storage'\n\nexport let OptionalAsyncStorage: typeof AsyncStorage | undefined = undefined\n\ntry {\n OptionalAsyncStorage = require('@react-native-async-storage/async-storage').default\n} catch (e) {}\n"],"mappings":"0GAEO,GAAI,CAAAA,oBAAoB,CAAAC,OAAA,CAAAD,oBAAA,CAAoCE,SAAS,CAE5E,GAAI,CACFD,OAAA,CAAAD,oBAAA,CAAAA,oBAAoB,CAAGG,OAAO,CAAC,2CAA2C,CAAC,WAAQ,CACrF,CAAE,MAAOC,CAAC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoApplication=void 0;var _reactNative=require("react-native");var OptionalExpoApplication=exports.OptionalExpoApplication=undefined;try{exports.OptionalExpoApplication=OptionalExpoApplication=_reactNative.Platform.select({macos:undefined,"default":require('expo-application')});}catch(e){}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoApplication=void 0;var _reactNative=require("react-native");var OptionalExpoApplication=exports.OptionalExpoApplication=undefined;try{exports.OptionalExpoApplication=OptionalExpoApplication=_reactNative.Platform.select({macos:undefined,"default":require('expo-application')});}catch(e){}
|
|
2
|
+
//# sourceMappingURL=OptionalExpoApplication.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoApplication.js","
|
|
1
|
+
{"version":3,"file":"OptionalExpoApplication.js","names":["_reactNative","require","OptionalExpoApplication","exports","undefined","Platform","select","macos","e"],"sources":["../../src/optional/OptionalExpoApplication.ts"],"sourcesContent":["import type ExpoApplication from 'expo-application'\nimport { Platform } from 'react-native'\n\nexport let OptionalExpoApplication: typeof ExpoApplication | undefined = undefined\n\ntry {\n // macos not supported\n OptionalExpoApplication = Platform.select({\n macos: undefined,\n default: require('expo-application'),\n })\n} catch (e) {}\n"],"mappings":"6GACA,IAAAA,YAAA,CAAAC,OAAA,iBAEO,GAAI,CAAAC,uBAAuB,CAAAC,OAAA,CAAAD,uBAAA,CAAuCE,SAAS,CAElF,GAAI,CAEFD,OAAA,CAAAD,uBAAA,CAAAA,uBAAuB,CAAGG,qBAAQ,CAACC,MAAM,CAAC,CACxCC,KAAK,CAAEH,SAAS,CAChB,UAASH,OAAO,CAAC,kBAAkB,C,CACpC,CAAC,CACJ,CAAE,MAAOO,CAAC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoDevice=void 0;var _reactNative=require("react-native");var OptionalExpoDevice=exports.OptionalExpoDevice=undefined;try{exports.OptionalExpoDevice=OptionalExpoDevice=_reactNative.Platform.select({macos:undefined,"default":require('expo-device')});}catch(e){}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoDevice=void 0;var _reactNative=require("react-native");var OptionalExpoDevice=exports.OptionalExpoDevice=undefined;try{exports.OptionalExpoDevice=OptionalExpoDevice=_reactNative.Platform.select({macos:undefined,"default":require('expo-device')});}catch(e){}
|
|
2
|
+
//# sourceMappingURL=OptionalExpoDevice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoDevice.js","
|
|
1
|
+
{"version":3,"file":"OptionalExpoDevice.js","names":["_reactNative","require","OptionalExpoDevice","exports","undefined","Platform","select","macos","e"],"sources":["../../src/optional/OptionalExpoDevice.ts"],"sourcesContent":["import type ExpoDevice from 'expo-device'\nimport { Platform } from 'react-native'\n\nexport let OptionalExpoDevice: typeof ExpoDevice | undefined = undefined\n\ntry {\n // macos not supported\n OptionalExpoDevice = Platform.select({\n macos: undefined,\n default: require('expo-device'),\n })\n} catch (e) {}\n"],"mappings":"wGACA,IAAAA,YAAA,CAAAC,OAAA,iBAEO,GAAI,CAAAC,kBAAkB,CAAAC,OAAA,CAAAD,kBAAA,CAAkCE,SAAS,CAExE,GAAI,CAEFD,OAAA,CAAAD,kBAAA,CAAAA,kBAAkB,CAAGG,qBAAQ,CAACC,MAAM,CAAC,CACnCC,KAAK,CAAEH,SAAS,CAChB,UAASH,OAAO,CAAC,aAAa,C,CAC/B,CAAC,CACJ,CAAE,MAAOO,CAAC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoFileSystem=void 0;var _reactNative=require("react-native");var OptionalExpoFileSystem=exports.OptionalExpoFileSystem=undefined;try{exports.OptionalExpoFileSystem=OptionalExpoFileSystem=_reactNative.Platform.select({macos:undefined,web:undefined,"default":require('expo-file-system')});}catch(e){}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoFileSystem=void 0;var _reactNative=require("react-native");var OptionalExpoFileSystem=exports.OptionalExpoFileSystem=undefined;try{exports.OptionalExpoFileSystem=OptionalExpoFileSystem=_reactNative.Platform.select({macos:undefined,web:undefined,"default":require('expo-file-system')});}catch(e){}
|
|
2
|
+
//# sourceMappingURL=OptionalExpoFileSystem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoFileSystem.js","
|
|
1
|
+
{"version":3,"file":"OptionalExpoFileSystem.js","names":["_reactNative","require","OptionalExpoFileSystem","exports","undefined","Platform","select","macos","web","e"],"sources":["../../src/optional/OptionalExpoFileSystem.ts"],"sourcesContent":["// expo-54 and expo-file-system v19 support\nimport type ExpoFileSystem from 'expo-file-system'\nimport { Platform } from 'react-native'\n\nexport let OptionalExpoFileSystem: typeof ExpoFileSystem | undefined = undefined\n\ntry {\n // do not try to load expo-file-system on web and macos, otherwise it will throw an error\n // See https://github.com/PostHog/posthog-js-lite/issues/140\n // Once expo-file-system is supported on web/macos, we can remove this try/catch block\n // For now, use the react-native-async-storage/async-storage package instead\n OptionalExpoFileSystem = Platform.select({\n macos: undefined,\n web: undefined,\n default: require('expo-file-system'),\n })\n} catch (e) {}\n"],"mappings":"4GAEA,IAAAA,YAAA,CAAAC,OAAA,iBAEO,GAAI,CAAAC,sBAAsB,CAAAC,OAAA,CAAAD,sBAAA,CAAsCE,SAAS,CAEhF,GAAI,CAKFD,OAAA,CAAAD,sBAAA,CAAAA,sBAAsB,CAAGG,qBAAQ,CAACC,MAAM,CAAC,CACvCC,KAAK,CAAEH,SAAS,CAChBI,GAAG,CAAEJ,SAAS,CACd,UAASH,OAAO,CAAC,kBAAkB,C,CACpC,CAAC,CACJ,CAAE,MAAOQ,CAAC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoFileSystemLegacy=void 0;var _reactNative=require("react-native");var OptionalExpoFileSystemLegacy=exports.OptionalExpoFileSystemLegacy=undefined;try{exports.OptionalExpoFileSystemLegacy=OptionalExpoFileSystemLegacy=_reactNative.Platform.select({macos:undefined,web:undefined,"default":require('expo-file-system/legacy')});}catch(e){}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoFileSystemLegacy=void 0;var _reactNative=require("react-native");var OptionalExpoFileSystemLegacy=exports.OptionalExpoFileSystemLegacy=undefined;try{exports.OptionalExpoFileSystemLegacy=OptionalExpoFileSystemLegacy=_reactNative.Platform.select({macos:undefined,web:undefined,"default":require('expo-file-system/legacy')});}catch(e){}
|
|
2
|
+
//# sourceMappingURL=OptionalExpoFileSystemLegacy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoFileSystemLegacy.js","
|
|
1
|
+
{"version":3,"file":"OptionalExpoFileSystemLegacy.js","names":["_reactNative","require","OptionalExpoFileSystemLegacy","exports","undefined","Platform","select","macos","web","e"],"sources":["../../src/optional/OptionalExpoFileSystemLegacy.ts"],"sourcesContent":["// expo <= 54 and expo-file-system <=19 back compatibility support\n\n// @ts-ignore -- legacy subpath has no .d.ts; type-only import is fine\nimport type FileSystem from 'expo-file-system/legacy'\nimport { Platform } from 'react-native'\n\nexport let OptionalExpoFileSystemLegacy: typeof FileSystem | undefined = undefined\n\ntry {\n // do not try to load expo-file-system on web and macos, otherwise it will throw an error\n // See https://github.com/PostHog/posthog-js-lite/issues/140\n // Once expo-file-system is supported on web/macos, we can remove this try/catch block\n // For now, use the react-native-async-storage/async-storage package instead\n OptionalExpoFileSystemLegacy = Platform.select({\n macos: undefined,\n web: undefined,\n default: require('expo-file-system/legacy'),\n })\n} catch (e) {}\n"],"mappings":"kHAIA,IAAAA,YAAA,CAAAC,OAAA,iBAEO,GAAI,CAAAC,4BAA4B,CAAAC,OAAA,CAAAD,4BAAA,CAAkCE,SAAS,CAElF,GAAI,CAKFD,OAAA,CAAAD,4BAAA,CAAAA,4BAA4B,CAAGG,qBAAQ,CAACC,MAAM,CAAC,CAC7CC,KAAK,CAAEH,SAAS,CAChBI,GAAG,CAAEJ,SAAS,CACd,UAASH,OAAO,CAAC,yBAAyB,C,CAC3C,CAAC,CACJ,CAAE,MAAOQ,CAAC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoLocalization=void 0;var _reactNative=require("react-native");var OptionalExpoLocalization=exports.OptionalExpoLocalization=undefined;try{exports.OptionalExpoLocalization=OptionalExpoLocalization=_reactNative.Platform.select({macos:undefined,"default":require('expo-localization')});}catch(e){}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoLocalization=void 0;var _reactNative=require("react-native");var OptionalExpoLocalization=exports.OptionalExpoLocalization=undefined;try{exports.OptionalExpoLocalization=OptionalExpoLocalization=_reactNative.Platform.select({macos:undefined,"default":require('expo-localization')});}catch(e){}
|
|
2
|
+
//# sourceMappingURL=OptionalExpoLocalization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoLocalization.js","
|
|
1
|
+
{"version":3,"file":"OptionalExpoLocalization.js","names":["_reactNative","require","OptionalExpoLocalization","exports","undefined","Platform","select","macos","e"],"sources":["../../src/optional/OptionalExpoLocalization.ts"],"sourcesContent":["import type ExpoLocalization from 'expo-localization'\nimport { Platform } from 'react-native'\n\nexport let OptionalExpoLocalization: typeof ExpoLocalization | undefined = undefined\n\ntry {\n // macos not supported\n OptionalExpoLocalization = Platform.select({\n macos: undefined,\n default: require('expo-localization'),\n })\n} catch (e) {}\n"],"mappings":"8GACA,IAAAA,YAAA,CAAAC,OAAA,iBAEO,GAAI,CAAAC,wBAAwB,CAAAC,OAAA,CAAAD,wBAAA,CAAwCE,SAAS,CAEpF,GAAI,CAEFD,OAAA,CAAAD,wBAAA,CAAAA,wBAAwB,CAAGG,qBAAQ,CAACC,MAAM,CAAC,CACzCC,KAAK,CAAEH,SAAS,CAChB,UAASH,OAAO,CAAC,mBAAmB,C,CACrC,CAAC,CACJ,CAAE,MAAOO,CAAC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoUpdates=void 0;var _reactNative=require("react-native");var OptionalExpoUpdates;if(_reactNative.Platform.OS==='ios'||_reactNative.Platform.OS==='android'){try{exports.OptionalExpoUpdates=OptionalExpoUpdates=require('expo-updates');}catch(_a){}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoUpdates=void 0;var _reactNative=require("react-native");var OptionalExpoUpdates;if(_reactNative.Platform.OS==='ios'||_reactNative.Platform.OS==='android'){try{exports.OptionalExpoUpdates=OptionalExpoUpdates=require('expo-updates');}catch(_a){}}
|
|
2
|
+
//# sourceMappingURL=OptionalExpoUpdates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoUpdates.js","
|
|
1
|
+
{"version":3,"file":"OptionalExpoUpdates.js","names":["_reactNative","require","OptionalExpoUpdates","Platform","OS","exports","_a"],"sources":["../../src/optional/OptionalExpoUpdates.ts"],"sourcesContent":["import { Platform } from 'react-native'\n\n// Only read the public constants we use; older or unlinked modules may omit them.\ntype ExpoUpdatesContext = {\n isEnabled?: boolean\n updateId?: string | null\n runtimeVersion?: string | null\n channel?: string | null\n isEmbeddedLaunch?: boolean\n}\n\nexport let OptionalExpoUpdates: ExpoUpdatesContext | undefined\n\nif (Platform.OS === 'ios' || Platform.OS === 'android') {\n try {\n // Metro recognizes optional dependencies only when require is directly inside the try block.\n OptionalExpoUpdates = require('expo-updates')\n } catch {}\n}\n"],"mappings":"yGAAA,IAAAA,YAAA,CAAAC,OAAA,iBAWO,GAAI,CAAAC,mBAAmD,CAE9D,GAAIC,qBAAQ,CAACC,EAAE,GAAK,KAAK,EAAID,qBAAQ,CAACC,EAAE,GAAK,SAAS,CAAE,CACtD,GAAI,CAEFC,OAAA,CAAAH,mBAAA,CAAAA,mBAAmB,CAAGD,OAAO,CAAC,cAAc,CAAC,CAC/C,CAAE,MAAAK,EAAA,CAAM,CAAC,CACX","ignoreList":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.resolveOptionalPlugin=exports.OptionalReactNativePluginVersion=exports.OptionalReactNativePlugin=void 0;var _reactNative=require("react-native");var resolveOptionalPlugin=exports.resolveOptionalPlugin=function resolveOptionalPlugin(platformOS,loaders){var _a;var plugin;var version;if(platformOS!=='web'){try{plugin=loaders?loaders.loadPrimary():require('@posthog/react-native-plugin');try{version=loaders?loaders.loadPrimaryVersion():(_a=require('@posthog/react-native-plugin/package.json'))===null||_a===void 0?void 0:_a.version;}catch(_b){}}catch(_c){}if(!plugin&&platformOS!=='macos'){try{plugin=loaders?loaders.loadLegacy():require('posthog-react-native-session-replay');}catch(_d){}}}return{plugin:plugin,version:version};};var optionalPlugin=resolveOptionalPlugin(_reactNative.Platform.OS);var OptionalReactNativePlugin=exports.OptionalReactNativePlugin=optionalPlugin.plugin;var OptionalReactNativePluginVersion=exports.OptionalReactNativePluginVersion=optionalPlugin.version;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.resolveOptionalPlugin=exports.OptionalReactNativePluginVersion=exports.OptionalReactNativePlugin=void 0;var _reactNative=require("react-native");var resolveOptionalPlugin=exports.resolveOptionalPlugin=function resolveOptionalPlugin(platformOS,loaders){var _a;var plugin;var version;if(platformOS!=='web'){try{plugin=loaders?loaders.loadPrimary():require('@posthog/react-native-plugin');try{version=loaders?loaders.loadPrimaryVersion():(_a=require('@posthog/react-native-plugin/package.json'))===null||_a===void 0?void 0:_a.version;}catch(_b){}}catch(_c){}if(!plugin&&platformOS!=='macos'){try{plugin=loaders?loaders.loadLegacy():require('posthog-react-native-session-replay');}catch(_d){}}}return{plugin:plugin,version:version};};var optionalPlugin=resolveOptionalPlugin(_reactNative.Platform.OS);var OptionalReactNativePlugin=exports.OptionalReactNativePlugin=optionalPlugin.plugin;var OptionalReactNativePluginVersion=exports.OptionalReactNativePluginVersion=optionalPlugin.version;
|
|
2
|
+
//# sourceMappingURL=OptionalPlugin.js.map
|