posthog-react-native 4.87.0 → 4.87.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.
@@ -36,4 +36,10 @@ export type PostHogSurveyProviderProps = {
36
36
  client?: PostHog;
37
37
  children: React.ReactNode;
38
38
  };
39
+ /**
40
+ * Presents the surveys that match the current user.
41
+ *
42
+ * Surveys in React Native don't support URL or CSS selector targeting.
43
+ * Surveys that rely on these conditions don't appear.
44
+ */
39
45
  export declare function PostHogSurveyProvider(props: PostHogSurveyProviderProps): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"PostHogSurveyProvider.js","names":["_react","_interopRequireWildcard","require","_Surveys","_getActiveMatchingSurveys","_useSurveyStorage2","_surveyProgress","_surveys","_useActivatedSurveys","_SurveyModal","_surveysUtils","_core","_usePostHog","_useFeatureFlags","_surveyTranslations","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","ActiveSurveyContext","React","createContext","undefined","FeedbackSurveyContext","PostHogSurveyProvider","props","posthogFromHook","usePostHog","posthog","_a","client","_useSurveyStorage","useSurveyStorage","seenSurveys","setSeenSurvey","lastSeenSurveyDate","setLastSeenSurveyDate","isReady","progressStore","useMemo","SurveyProgressStore","_useState","useState","_useState2","_slicedToArray2","surveys","setSurveys","_useState3","_useState4","activeSurvey","setActiveSurvey","shownSurveyIdRef","useRef","sessionEpochRef","activeSessionRef","pendingSurveyRef","activatedSurveys","useActivatedSurveys","invalidateSession","useCallback","current","flags","useFeatureFlags","_useState5","detectUserLanguage","_useState6","userLanguage","setUserLanguage","defaultSurveyAppearance","overrideAppearanceWithDefault","useEffect","updateLanguage","unsubscribe","on","mounted","ready","then","_onSurveysReady","getSurveys","loadedSurveys","Array","isArray","getPersistedProperty","PostHogPersistedProperty","Surveys","reconcile","canCaptureSurvey","isShown","id","inProgressSurveys","Set","survey","load","map","getSurveyIterationKey","activeSurveys","getActiveMatchingSurveys","defaultDelay","_b","surveyPopupDelaySeconds","getDelaySeconds","Math","max","appearance","popoverSurveys","type","SurveyType","Popover","sort","a","b","progressPriority","Number","some","nextSurvey","_c","find","surveyKey","startedAt","Date","now","elapsed","remainingDelay","surveyActivationTimeoutId","setTimeout","currentActiveSurveys","nextSurveyEligible","clearTimeout","translatedActiveSurvey","applySurveyTranslationForUser","surveyAppearance","builtInSurveyAppearance","submitButtonColor","submitButtonTextColor","getContrastingTextColor","activeSession","progress","createSurveyProgress","completed","epoch","activeContext","initialProgress","onProgressChange","submissionId","remove","save","surveyLanguage","language","onShow","sendSurveyShownEvent","onClose","submitted","responses","dismissedSurveyEvent","autoPresent","autoPresentSurveys","isAlreadyShown","shouldShowModal","jsx","Provider","value","children","jsxs","SurveyModal","androidKeyboardBehavior"],"sources":["../../src/surveys/PostHogSurveyProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'\n\nimport { dismissedSurveyEvent, sendSurveyShownEvent } from './components/Surveys'\n\nimport { getActiveMatchingSurveys } from './getActiveMatchingSurveys'\nimport { useSurveyStorage } from './useSurveyStorage'\nimport { canCaptureSurvey, createSurveyProgress, SurveyProgress, SurveyProgressStore } from './survey-progress'\nimport { getSurveyIterationKey } from '@posthog/core/surveys'\nimport { useActivatedSurveys } from './useActivatedSurveys'\nimport { SurveyModal } from './components/SurveyModal'\nimport {\n defaultSurveyAppearance as builtInSurveyAppearance,\n getContrastingTextColor,\n SurveyAppearance,\n SurveyAppearanceTheme,\n} from './surveys-utils'\nimport { PostHogPersistedProperty, Survey, SurveyType, type SurveyResponses } from '@posthog/core'\nimport { usePostHog } from '../hooks/usePostHog'\nimport { useFeatureFlags } from '../hooks/useFeatureFlags'\nimport { PostHog } from '../posthog-rn'\nimport { applySurveyTranslationForUser, detectUserLanguage } from './survey-translations'\n\ntype ActiveSurveyContextType =\n | {\n survey: Survey\n surveyLanguage: string | null\n onShow: () => void\n onClose: (submitted: boolean, responses: SurveyResponses) => void\n }\n | undefined\nconst ActiveSurveyContext = React.createContext<ActiveSurveyContextType>(undefined)\n// export const useActiveSurvey = (): ActiveSurveyContextType => React.useContext(ActiveSurveyContext)\n\n// type FeedbackSurveyHook = {\n// survey: Survey\n// showSurveyModal: () => void\n// hideSurveyModal: () => void\n// }\nconst FeedbackSurveyContext = React.createContext<\n | {\n surveys: Survey[]\n activeSurvey: Survey | undefined\n setActiveSurvey: React.Dispatch<React.SetStateAction<Survey | undefined>>\n }\n | undefined\n>(undefined)\n// export const useFeedbackSurvey = (selector: string): FeedbackSurveyHook | undefined => {\n// const context = React.useContext(FeedbackSurveyContext)\n// const survey = context?.surveys.find(\n// (survey: Survey) => survey.type === SurveyType.Widget && survey.appearance?.widgetSelector === selector\n// )\n// if (!context || !survey) {\n// return undefined\n// }\n\n// return {\n// survey,\n// showSurveyModal: () => context.setActiveSurvey(survey),\n// hideSurveyModal: () => {\n// if (context.activeSurvey === survey) {\n// context.setActiveSurvey(undefined)\n// }\n// },\n// }\n// }\n\nexport type PostHogSurveyProviderProps = {\n /**\n * Whether eligible popover surveys are automatically presented. (Default: true)\n * Set to false to defer presentation — e.g. while a native-stack formSheet/modal is on top.\n * Deferral is display-only: the survey stays armed and presents once this is true again.\n * A survey already on screen is not interrupted when this becomes false.\n *\n * You own flipping this back to true (e.g. wire it to route/screen focus). While it stays\n * false the survey remains deferred and never shows — if the un-defer never happens\n * (sheet dismissed without re-focusing the provider, an unmount, an error boundary), the\n * survey stays armed indefinitely and no \"survey shown\" event fires.\n */\n autoPresentSurveys?: boolean\n\n /**\n * The default appearance for surveys when not specified in PostHog.\n *\n * Accepts the React Native-only appearance fields as well (e.g.\n * `maxFontSizeMultiplier`) — they are merged into the same theme object the\n * survey components read, and PostHog never sends them down.\n */\n defaultSurveyAppearance?: SurveyAppearance\n\n /**\n * If true, PosHog appearance will be ignored and defaultSurveyAppearance is always used.\n */\n overrideAppearanceWithDefault?: boolean\n\n /**\n * The keyboard avoiding behavior for the survey modal (KeyboardAvoidingView), applied only to Android devices.\n * - 'padding': Adds padding to avoid keyboard (recommended)\n * - 'height': Resizes the view height (default, for legacy - may cause flickering on some Android devices)\n * @default 'height'\n */\n androidKeyboardBehavior?: 'padding' | 'height'\n\n client?: PostHog\n\n children: React.ReactNode\n}\n\nexport function PostHogSurveyProvider(props: PostHogSurveyProviderProps): JSX.Element {\n const posthogFromHook = usePostHog()\n const posthog = props.client ?? posthogFromHook\n const { seenSurveys, setSeenSurvey, lastSeenSurveyDate, setLastSeenSurveyDate, isReady } = useSurveyStorage(posthog)\n const progressStore = useMemo(() => new SurveyProgressStore(posthog), [posthog])\n const [surveys, setSurveys] = useState<Survey[]>([])\n const [activeSurvey, setActiveSurvey] = useState<Survey | undefined>(undefined)\n // Latches the id of the survey once its modal has actually painted, so deferring presentation\n // (autoPresentSurveys=false) never tears down a survey the user is already interacting with.\n const shownSurveyIdRef = useRef<string | undefined>(undefined)\n const sessionEpochRef = useRef(0)\n const activeSessionRef = useRef<object | undefined>(undefined)\n const pendingSurveyRef = useRef<{ surveyKey: string; startedAt: number } | undefined>(undefined)\n const activatedSurveys = useActivatedSurveys(posthog, surveys)\n const invalidateSession = useCallback(() => {\n sessionEpochRef.current++\n activeSessionRef.current = undefined\n shownSurveyIdRef.current = undefined\n pendingSurveyRef.current = undefined\n }, [])\n\n const flags = useFeatureFlags(posthog)\n const [userLanguage, setUserLanguage] = useState(() => detectUserLanguage(posthog))\n const defaultSurveyAppearance = useMemo(() => props?.defaultSurveyAppearance ?? {}, [props?.defaultSurveyAppearance])\n\n const overrideAppearanceWithDefault = props?.overrideAppearanceWithDefault\n\n useEffect(() => {\n const updateLanguage = () => setUserLanguage(detectUserLanguage(posthog))\n const unsubscribe = posthog.on('personProperties', updateLanguage)\n updateLanguage()\n return unsubscribe\n }, [posthog])\n\n useEffect(\n () =>\n posthog.on('surveysReset', () => {\n invalidateSession()\n setActiveSurvey(undefined)\n }),\n [posthog, invalidateSession]\n )\n\n // Load surveys once\n useEffect(() => {\n let mounted = true\n setActiveSurvey(undefined)\n setSurveys([])\n activeSessionRef.current = undefined\n shownSurveyIdRef.current = undefined\n posthog\n .ready()\n .then(() => posthog._onSurveysReady())\n .then(() => {\n setUserLanguage(detectUserLanguage(posthog))\n return posthog.getSurveys()\n })\n .then((loadedSurveys) => {\n if (!mounted) return\n // An unavailable cache (failed load or disableSurveys) is not an empty project.\n if (Array.isArray(posthog.getPersistedProperty(PostHogPersistedProperty.Surveys))) {\n progressStore.reconcile(loadedSurveys)\n }\n setSurveys(loadedSurveys)\n })\n .catch(() => {})\n return () => {\n mounted = false\n invalidateSession()\n }\n }, [posthog, progressStore, invalidateSession])\n\n // Whenever state changes, re-select the popover survey to show. A survey that has already\n // painted is left alone; an armed-but-deferred one is re-validated so it can't be presented\n // after it stops matching (e.g. its targeting flag flips off during a long deferral).\n useEffect(() => {\n if (!isReady || !canCaptureSurvey(posthog)) {\n pendingSurveyRef.current = undefined\n return\n }\n const isShown = !!activeSurvey && shownSurveyIdRef.current === activeSurvey.id\n if (isShown) {\n return\n }\n const inProgressSurveys = new Set(surveys.filter((survey) => progressStore.load(survey)).map(getSurveyIterationKey))\n const activeSurveys = getActiveMatchingSurveys(\n surveys,\n flags ?? {},\n seenSurveys,\n activatedSurveys,\n inProgressSurveys,\n lastSeenSurveyDate\n )\n const defaultDelay = defaultSurveyAppearance.surveyPopupDelaySeconds ?? 0\n const getDelaySeconds = (survey: Survey) =>\n Math.max(\n 0,\n overrideAppearanceWithDefault ? defaultDelay : (survey.appearance?.surveyPopupDelaySeconds ?? defaultDelay)\n )\n const popoverSurveys = activeSurveys\n .filter((survey) => survey.type === SurveyType.Popover)\n .sort((a, b) => {\n // Resume an existing response before starting a new survey, then prefer the shortest delay.\n const progressPriority =\n Number(inProgressSurveys.has(getSurveyIterationKey(b))) -\n Number(inProgressSurveys.has(getSurveyIterationKey(a)))\n return progressPriority || getDelaySeconds(a) - getDelaySeconds(b)\n })\n\n // Keep an eligible armed survey, including one whose delay has already elapsed.\n if (activeSurvey && popoverSurveys.some((survey) => survey.id === activeSurvey.id)) {\n return\n }\n\n // An ineligible armed survey must not be presented while its replacement waits.\n setActiveSurvey(undefined)\n const nextSurvey =\n popoverSurveys.find((survey) => getSurveyIterationKey(survey) === pendingSurveyRef.current?.surveyKey) ??\n popoverSurveys[0]\n if (!nextSurvey) {\n pendingSurveyRef.current = undefined\n return\n }\n\n const surveyKey = getSurveyIterationKey(nextSurvey)\n if (pendingSurveyRef.current?.surveyKey !== surveyKey) {\n pendingSurveyRef.current = { surveyKey, startedAt: Date.now() }\n }\n const elapsed = Math.max(0, Date.now() - pendingSurveyRef.current.startedAt)\n const remainingDelay = Math.max(0, getDelaySeconds(nextSurvey) * 1000 - elapsed)\n\n if (remainingDelay === 0) {\n pendingSurveyRef.current = undefined\n setActiveSurvey(nextSurvey)\n return\n }\n\n const surveyActivationTimeoutId = setTimeout(() => {\n pendingSurveyRef.current = undefined\n if (!canCaptureSurvey(posthog)) return\n\n const currentActiveSurveys = getActiveMatchingSurveys(\n surveys,\n flags ?? {},\n seenSurveys,\n activatedSurveys,\n new Set(surveys.filter((survey) => progressStore.load(survey)).map(getSurveyIterationKey)),\n lastSeenSurveyDate\n )\n\n const nextSurveyEligible = currentActiveSurveys.some((survey: Survey) => survey.id === nextSurvey.id)\n\n if (nextSurveyEligible) {\n setActiveSurvey(nextSurvey)\n }\n }, remainingDelay)\n\n return () => clearTimeout(surveyActivationTimeoutId)\n }, [\n activeSurvey,\n flags,\n surveys,\n seenSurveys,\n lastSeenSurveyDate,\n defaultSurveyAppearance,\n overrideAppearanceWithDefault,\n activatedSurveys,\n isReady,\n posthog,\n progressStore,\n ])\n\n const translatedActiveSurvey = useMemo(() => {\n return activeSurvey ? applySurveyTranslationForUser(activeSurvey, posthog, userLanguage) : undefined\n }, [activeSurvey, posthog, userLanguage])\n\n // Merge survey appearance so that components and hooks can use a consistent model\n const surveyAppearance = useMemo<SurveyAppearanceTheme>(() => {\n if (overrideAppearanceWithDefault || !translatedActiveSurvey) {\n return {\n ...builtInSurveyAppearance,\n ...defaultSurveyAppearance,\n }\n }\n return {\n ...builtInSurveyAppearance,\n ...defaultSurveyAppearance,\n ...(translatedActiveSurvey.survey.appearance ?? {}),\n // If submitButtonColor is set by PostHog, ensure submitButtonTextColor is also set to contrast\n ...(translatedActiveSurvey.survey.appearance?.submitButtonColor\n ? {\n submitButtonTextColor:\n translatedActiveSurvey.survey.appearance.submitButtonTextColor ??\n getContrastingTextColor(translatedActiveSurvey.survey.appearance.submitButtonColor),\n }\n : {}),\n }\n }, [translatedActiveSurvey, defaultSurveyAppearance, overrideAppearanceWithDefault])\n\n const activeSession = useMemo(\n () =>\n activeSurvey\n ? {\n progress: progressStore.load(activeSurvey) ?? createSurveyProgress(activeSurvey),\n completed: false,\n epoch: sessionEpochRef.current,\n }\n : undefined,\n [activeSurvey, progressStore]\n )\n\n const activeContext = useMemo(() => {\n if (!activeSurvey || !translatedActiveSurvey || !activeSession) {\n return undefined\n }\n return {\n client: posthog,\n initialProgress: activeSession.progress,\n onProgressChange: (progress: SurveyProgress, completed: boolean) => {\n if (\n activeSessionRef.current !== activeSession ||\n !canCaptureSurvey(posthog) ||\n progressStore.load(activeSurvey)?.submissionId !== activeSession.progress.submissionId\n )\n return false\n activeSession.progress = progress\n activeSession.completed = completed\n if (completed) {\n progressStore.remove(activeSurvey)\n setSeenSurvey(activeSurvey)\n } else {\n progressStore.save(activeSurvey, progress)\n }\n return true\n },\n survey: translatedActiveSurvey.survey,\n surveyLanguage: translatedActiveSurvey.language,\n onShow: () => {\n // Updating translated copy changes this callback, but does not show a new survey.\n if (activeSession.epoch !== sessionEpochRef.current || !canCaptureSurvey(posthog)) return\n if (shownSurveyIdRef.current === activeSurvey.id) {\n return\n }\n activeSessionRef.current = activeSession\n progressStore.save(activeSurvey, activeSession.progress)\n shownSurveyIdRef.current = activeSurvey.id\n sendSurveyShownEvent(translatedActiveSurvey.survey, posthog, translatedActiveSurvey.language)\n setLastSeenSurveyDate(new Date())\n },\n onClose: (submitted: boolean, responses: SurveyResponses) => {\n if (activeSessionRef.current !== activeSession) return\n activeSessionRef.current = undefined\n progressStore.remove(activeSurvey)\n shownSurveyIdRef.current = undefined\n setSeenSurvey(activeSurvey)\n setActiveSurvey(undefined)\n if (submitted || activeSession.completed) return\n if (canCaptureSurvey(posthog)) {\n dismissedSurveyEvent(\n translatedActiveSurvey.survey,\n responses,\n posthog,\n Object.keys(activeSession.progress.responses).length > 0\n ? activeSession.progress.surveyLanguage\n : translatedActiveSurvey.language,\n activeSession.progress\n )\n }\n },\n }\n }, [\n activeSurvey,\n activeSession,\n posthog,\n progressStore,\n setLastSeenSurveyDate,\n setSeenSurvey,\n translatedActiveSurvey,\n ])\n\n // Present a popover survey when autoPresentSurveys is on. Once it has painted (shownSurveyIdRef),\n // keep it mounted regardless of the gate so a mid-interaction survey is never yanked — the gate\n // defers not-yet-shown surveys, it does not interrupt a live one.\n const autoPresent = props.autoPresentSurveys !== false\n const isAlreadyShown = !!activeSurvey && shownSurveyIdRef.current === activeSurvey.id\n const shouldShowModal =\n activeContext && activeContext.survey.type === SurveyType.Popover && (autoPresent || isAlreadyShown)\n\n return (\n <ActiveSurveyContext.Provider value={activeContext}>\n <FeedbackSurveyContext.Provider value={{ surveys, activeSurvey, setActiveSurvey }}>\n {props.children}\n {shouldShowModal && (\n <SurveyModal\n key={activeSession?.progress.submissionId}\n appearance={surveyAppearance}\n androidKeyboardBehavior={props.androidKeyboardBehavior}\n {...activeContext}\n />\n )}\n </FeedbackSurveyContext.Provider>\n </ActiveSurveyContext.Provider>\n )\n}\n"],"mappings":"4bAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,QAAA,CAAAD,OAAA,yBA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,CAClC,CAA8B,CAAC,CAEnC","ignoreList":[]}
1
+ {"version":3,"file":"PostHogSurveyProvider.js","names":["_react","_interopRequireWildcard","require","_Surveys","_getActiveMatchingSurveys","_useSurveyStorage2","_surveyProgress","_surveys","_useActivatedSurveys","_SurveyModal","_surveysUtils","_core","_usePostHog","_useFeatureFlags","_surveyTranslations","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","ActiveSurveyContext","React","createContext","undefined","FeedbackSurveyContext","PostHogSurveyProvider","props","posthogFromHook","usePostHog","posthog","_a","client","_useSurveyStorage","useSurveyStorage","seenSurveys","setSeenSurvey","lastSeenSurveyDate","setLastSeenSurveyDate","isReady","progressStore","useMemo","SurveyProgressStore","_useState","useState","_useState2","_slicedToArray2","surveys","setSurveys","_useState3","_useState4","activeSurvey","setActiveSurvey","shownSurveyIdRef","useRef","sessionEpochRef","activeSessionRef","pendingSurveyRef","activatedSurveys","useActivatedSurveys","invalidateSession","useCallback","current","flags","useFeatureFlags","_useState5","detectUserLanguage","_useState6","userLanguage","setUserLanguage","defaultSurveyAppearance","overrideAppearanceWithDefault","useEffect","updateLanguage","unsubscribe","on","mounted","ready","then","_onSurveysReady","getSurveys","loadedSurveys","Array","isArray","getPersistedProperty","PostHogPersistedProperty","Surveys","reconcile","canCaptureSurvey","isShown","id","inProgressSurveys","Set","survey","load","map","getSurveyIterationKey","activeSurveys","getActiveMatchingSurveys","defaultDelay","_b","surveyPopupDelaySeconds","getDelaySeconds","Math","max","appearance","popoverSurveys","type","SurveyType","Popover","sort","a","b","progressPriority","Number","some","nextSurvey","_c","find","surveyKey","startedAt","Date","now","elapsed","remainingDelay","surveyActivationTimeoutId","setTimeout","currentActiveSurveys","nextSurveyEligible","clearTimeout","translatedActiveSurvey","applySurveyTranslationForUser","surveyAppearance","builtInSurveyAppearance","submitButtonColor","submitButtonTextColor","getContrastingTextColor","activeSession","progress","createSurveyProgress","completed","epoch","activeContext","initialProgress","onProgressChange","submissionId","remove","save","surveyLanguage","language","onShow","sendSurveyShownEvent","onClose","submitted","responses","dismissedSurveyEvent","autoPresent","autoPresentSurveys","isAlreadyShown","shouldShowModal","jsx","Provider","value","children","jsxs","SurveyModal","androidKeyboardBehavior"],"sources":["../../src/surveys/PostHogSurveyProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'\n\nimport { dismissedSurveyEvent, sendSurveyShownEvent } from './components/Surveys'\n\nimport { getActiveMatchingSurveys } from './getActiveMatchingSurveys'\nimport { useSurveyStorage } from './useSurveyStorage'\nimport { canCaptureSurvey, createSurveyProgress, SurveyProgress, SurveyProgressStore } from './survey-progress'\nimport { getSurveyIterationKey } from '@posthog/core/surveys'\nimport { useActivatedSurveys } from './useActivatedSurveys'\nimport { SurveyModal } from './components/SurveyModal'\nimport {\n defaultSurveyAppearance as builtInSurveyAppearance,\n getContrastingTextColor,\n SurveyAppearance,\n SurveyAppearanceTheme,\n} from './surveys-utils'\nimport { PostHogPersistedProperty, Survey, SurveyType, type SurveyResponses } from '@posthog/core'\nimport { usePostHog } from '../hooks/usePostHog'\nimport { useFeatureFlags } from '../hooks/useFeatureFlags'\nimport { PostHog } from '../posthog-rn'\nimport { applySurveyTranslationForUser, detectUserLanguage } from './survey-translations'\n\ntype ActiveSurveyContextType =\n | {\n survey: Survey\n surveyLanguage: string | null\n onShow: () => void\n onClose: (submitted: boolean, responses: SurveyResponses) => void\n }\n | undefined\nconst ActiveSurveyContext = React.createContext<ActiveSurveyContextType>(undefined)\n// export const useActiveSurvey = (): ActiveSurveyContextType => React.useContext(ActiveSurveyContext)\n\n// type FeedbackSurveyHook = {\n// survey: Survey\n// showSurveyModal: () => void\n// hideSurveyModal: () => void\n// }\nconst FeedbackSurveyContext = React.createContext<\n | {\n surveys: Survey[]\n activeSurvey: Survey | undefined\n setActiveSurvey: React.Dispatch<React.SetStateAction<Survey | undefined>>\n }\n | undefined\n>(undefined)\n// export const useFeedbackSurvey = (selector: string): FeedbackSurveyHook | undefined => {\n// const context = React.useContext(FeedbackSurveyContext)\n// const survey = context?.surveys.find(\n// (survey: Survey) => survey.type === SurveyType.Widget && survey.appearance?.widgetSelector === selector\n// )\n// if (!context || !survey) {\n// return undefined\n// }\n\n// return {\n// survey,\n// showSurveyModal: () => context.setActiveSurvey(survey),\n// hideSurveyModal: () => {\n// if (context.activeSurvey === survey) {\n// context.setActiveSurvey(undefined)\n// }\n// },\n// }\n// }\n\nexport type PostHogSurveyProviderProps = {\n /**\n * Whether eligible popover surveys are automatically presented. (Default: true)\n * Set to false to defer presentation — e.g. while a native-stack formSheet/modal is on top.\n * Deferral is display-only: the survey stays armed and presents once this is true again.\n * A survey already on screen is not interrupted when this becomes false.\n *\n * You own flipping this back to true (e.g. wire it to route/screen focus). While it stays\n * false the survey remains deferred and never shows — if the un-defer never happens\n * (sheet dismissed without re-focusing the provider, an unmount, an error boundary), the\n * survey stays armed indefinitely and no \"survey shown\" event fires.\n */\n autoPresentSurveys?: boolean\n\n /**\n * The default appearance for surveys when not specified in PostHog.\n *\n * Accepts the React Native-only appearance fields as well (e.g.\n * `maxFontSizeMultiplier`) — they are merged into the same theme object the\n * survey components read, and PostHog never sends them down.\n */\n defaultSurveyAppearance?: SurveyAppearance\n\n /**\n * If true, PosHog appearance will be ignored and defaultSurveyAppearance is always used.\n */\n overrideAppearanceWithDefault?: boolean\n\n /**\n * The keyboard avoiding behavior for the survey modal (KeyboardAvoidingView), applied only to Android devices.\n * - 'padding': Adds padding to avoid keyboard (recommended)\n * - 'height': Resizes the view height (default, for legacy - may cause flickering on some Android devices)\n * @default 'height'\n */\n androidKeyboardBehavior?: 'padding' | 'height'\n\n client?: PostHog\n\n children: React.ReactNode\n}\n\n/**\n * Presents the surveys that match the current user.\n *\n * Surveys in React Native don't support URL or CSS selector targeting.\n * Surveys that rely on these conditions don't appear.\n */\nexport function PostHogSurveyProvider(props: PostHogSurveyProviderProps): JSX.Element {\n const posthogFromHook = usePostHog()\n const posthog = props.client ?? posthogFromHook\n const { seenSurveys, setSeenSurvey, lastSeenSurveyDate, setLastSeenSurveyDate, isReady } = useSurveyStorage(posthog)\n const progressStore = useMemo(() => new SurveyProgressStore(posthog), [posthog])\n const [surveys, setSurveys] = useState<Survey[]>([])\n const [activeSurvey, setActiveSurvey] = useState<Survey | undefined>(undefined)\n // Latches the id of the survey once its modal has actually painted, so deferring presentation\n // (autoPresentSurveys=false) never tears down a survey the user is already interacting with.\n const shownSurveyIdRef = useRef<string | undefined>(undefined)\n const sessionEpochRef = useRef(0)\n const activeSessionRef = useRef<object | undefined>(undefined)\n const pendingSurveyRef = useRef<{ surveyKey: string; startedAt: number } | undefined>(undefined)\n const activatedSurveys = useActivatedSurveys(posthog, surveys)\n const invalidateSession = useCallback(() => {\n sessionEpochRef.current++\n activeSessionRef.current = undefined\n shownSurveyIdRef.current = undefined\n pendingSurveyRef.current = undefined\n }, [])\n\n const flags = useFeatureFlags(posthog)\n const [userLanguage, setUserLanguage] = useState(() => detectUserLanguage(posthog))\n const defaultSurveyAppearance = useMemo(() => props?.defaultSurveyAppearance ?? {}, [props?.defaultSurveyAppearance])\n\n const overrideAppearanceWithDefault = props?.overrideAppearanceWithDefault\n\n useEffect(() => {\n const updateLanguage = () => setUserLanguage(detectUserLanguage(posthog))\n const unsubscribe = posthog.on('personProperties', updateLanguage)\n updateLanguage()\n return unsubscribe\n }, [posthog])\n\n useEffect(\n () =>\n posthog.on('surveysReset', () => {\n invalidateSession()\n setActiveSurvey(undefined)\n }),\n [posthog, invalidateSession]\n )\n\n // Load surveys once\n useEffect(() => {\n let mounted = true\n setActiveSurvey(undefined)\n setSurveys([])\n activeSessionRef.current = undefined\n shownSurveyIdRef.current = undefined\n posthog\n .ready()\n .then(() => posthog._onSurveysReady())\n .then(() => {\n setUserLanguage(detectUserLanguage(posthog))\n return posthog.getSurveys()\n })\n .then((loadedSurveys) => {\n if (!mounted) return\n // An unavailable cache (failed load or disableSurveys) is not an empty project.\n if (Array.isArray(posthog.getPersistedProperty(PostHogPersistedProperty.Surveys))) {\n progressStore.reconcile(loadedSurveys)\n }\n setSurveys(loadedSurveys)\n })\n .catch(() => {})\n return () => {\n mounted = false\n invalidateSession()\n }\n }, [posthog, progressStore, invalidateSession])\n\n // Whenever state changes, re-select the popover survey to show. A survey that has already\n // painted is left alone; an armed-but-deferred one is re-validated so it can't be presented\n // after it stops matching (e.g. its targeting flag flips off during a long deferral).\n useEffect(() => {\n if (!isReady || !canCaptureSurvey(posthog)) {\n pendingSurveyRef.current = undefined\n return\n }\n const isShown = !!activeSurvey && shownSurveyIdRef.current === activeSurvey.id\n if (isShown) {\n return\n }\n const inProgressSurveys = new Set(surveys.filter((survey) => progressStore.load(survey)).map(getSurveyIterationKey))\n const activeSurveys = getActiveMatchingSurveys(\n surveys,\n flags ?? {},\n seenSurveys,\n activatedSurveys,\n inProgressSurveys,\n lastSeenSurveyDate\n )\n const defaultDelay = defaultSurveyAppearance.surveyPopupDelaySeconds ?? 0\n const getDelaySeconds = (survey: Survey) =>\n Math.max(\n 0,\n overrideAppearanceWithDefault ? defaultDelay : (survey.appearance?.surveyPopupDelaySeconds ?? defaultDelay)\n )\n const popoverSurveys = activeSurveys\n .filter((survey) => survey.type === SurveyType.Popover)\n .sort((a, b) => {\n // Resume an existing response before starting a new survey, then prefer the shortest delay.\n const progressPriority =\n Number(inProgressSurveys.has(getSurveyIterationKey(b))) -\n Number(inProgressSurveys.has(getSurveyIterationKey(a)))\n return progressPriority || getDelaySeconds(a) - getDelaySeconds(b)\n })\n\n // Keep an eligible armed survey, including one whose delay has already elapsed.\n if (activeSurvey && popoverSurveys.some((survey) => survey.id === activeSurvey.id)) {\n return\n }\n\n // An ineligible armed survey must not be presented while its replacement waits.\n setActiveSurvey(undefined)\n const nextSurvey =\n popoverSurveys.find((survey) => getSurveyIterationKey(survey) === pendingSurveyRef.current?.surveyKey) ??\n popoverSurveys[0]\n if (!nextSurvey) {\n pendingSurveyRef.current = undefined\n return\n }\n\n const surveyKey = getSurveyIterationKey(nextSurvey)\n if (pendingSurveyRef.current?.surveyKey !== surveyKey) {\n pendingSurveyRef.current = { surveyKey, startedAt: Date.now() }\n }\n const elapsed = Math.max(0, Date.now() - pendingSurveyRef.current.startedAt)\n const remainingDelay = Math.max(0, getDelaySeconds(nextSurvey) * 1000 - elapsed)\n\n if (remainingDelay === 0) {\n pendingSurveyRef.current = undefined\n setActiveSurvey(nextSurvey)\n return\n }\n\n const surveyActivationTimeoutId = setTimeout(() => {\n pendingSurveyRef.current = undefined\n if (!canCaptureSurvey(posthog)) return\n\n const currentActiveSurveys = getActiveMatchingSurveys(\n surveys,\n flags ?? {},\n seenSurveys,\n activatedSurveys,\n new Set(surveys.filter((survey) => progressStore.load(survey)).map(getSurveyIterationKey)),\n lastSeenSurveyDate\n )\n\n const nextSurveyEligible = currentActiveSurveys.some((survey: Survey) => survey.id === nextSurvey.id)\n\n if (nextSurveyEligible) {\n setActiveSurvey(nextSurvey)\n }\n }, remainingDelay)\n\n return () => clearTimeout(surveyActivationTimeoutId)\n }, [\n activeSurvey,\n flags,\n surveys,\n seenSurveys,\n lastSeenSurveyDate,\n defaultSurveyAppearance,\n overrideAppearanceWithDefault,\n activatedSurveys,\n isReady,\n posthog,\n progressStore,\n ])\n\n const translatedActiveSurvey = useMemo(() => {\n return activeSurvey ? applySurveyTranslationForUser(activeSurvey, posthog, userLanguage) : undefined\n }, [activeSurvey, posthog, userLanguage])\n\n // Merge survey appearance so that components and hooks can use a consistent model\n const surveyAppearance = useMemo<SurveyAppearanceTheme>(() => {\n if (overrideAppearanceWithDefault || !translatedActiveSurvey) {\n return {\n ...builtInSurveyAppearance,\n ...defaultSurveyAppearance,\n }\n }\n return {\n ...builtInSurveyAppearance,\n ...defaultSurveyAppearance,\n ...(translatedActiveSurvey.survey.appearance ?? {}),\n // If submitButtonColor is set by PostHog, ensure submitButtonTextColor is also set to contrast\n ...(translatedActiveSurvey.survey.appearance?.submitButtonColor\n ? {\n submitButtonTextColor:\n translatedActiveSurvey.survey.appearance.submitButtonTextColor ??\n getContrastingTextColor(translatedActiveSurvey.survey.appearance.submitButtonColor),\n }\n : {}),\n }\n }, [translatedActiveSurvey, defaultSurveyAppearance, overrideAppearanceWithDefault])\n\n const activeSession = useMemo(\n () =>\n activeSurvey\n ? {\n progress: progressStore.load(activeSurvey) ?? createSurveyProgress(activeSurvey),\n completed: false,\n epoch: sessionEpochRef.current,\n }\n : undefined,\n [activeSurvey, progressStore]\n )\n\n const activeContext = useMemo(() => {\n if (!activeSurvey || !translatedActiveSurvey || !activeSession) {\n return undefined\n }\n return {\n client: posthog,\n initialProgress: activeSession.progress,\n onProgressChange: (progress: SurveyProgress, completed: boolean) => {\n if (\n activeSessionRef.current !== activeSession ||\n !canCaptureSurvey(posthog) ||\n progressStore.load(activeSurvey)?.submissionId !== activeSession.progress.submissionId\n )\n return false\n activeSession.progress = progress\n activeSession.completed = completed\n if (completed) {\n progressStore.remove(activeSurvey)\n setSeenSurvey(activeSurvey)\n } else {\n progressStore.save(activeSurvey, progress)\n }\n return true\n },\n survey: translatedActiveSurvey.survey,\n surveyLanguage: translatedActiveSurvey.language,\n onShow: () => {\n // Updating translated copy changes this callback, but does not show a new survey.\n if (activeSession.epoch !== sessionEpochRef.current || !canCaptureSurvey(posthog)) return\n if (shownSurveyIdRef.current === activeSurvey.id) {\n return\n }\n activeSessionRef.current = activeSession\n progressStore.save(activeSurvey, activeSession.progress)\n shownSurveyIdRef.current = activeSurvey.id\n sendSurveyShownEvent(translatedActiveSurvey.survey, posthog, translatedActiveSurvey.language)\n setLastSeenSurveyDate(new Date())\n },\n onClose: (submitted: boolean, responses: SurveyResponses) => {\n if (activeSessionRef.current !== activeSession) return\n activeSessionRef.current = undefined\n progressStore.remove(activeSurvey)\n shownSurveyIdRef.current = undefined\n setSeenSurvey(activeSurvey)\n setActiveSurvey(undefined)\n if (submitted || activeSession.completed) return\n if (canCaptureSurvey(posthog)) {\n dismissedSurveyEvent(\n translatedActiveSurvey.survey,\n responses,\n posthog,\n Object.keys(activeSession.progress.responses).length > 0\n ? activeSession.progress.surveyLanguage\n : translatedActiveSurvey.language,\n activeSession.progress\n )\n }\n },\n }\n }, [\n activeSurvey,\n activeSession,\n posthog,\n progressStore,\n setLastSeenSurveyDate,\n setSeenSurvey,\n translatedActiveSurvey,\n ])\n\n // Present a popover survey when autoPresentSurveys is on. Once it has painted (shownSurveyIdRef),\n // keep it mounted regardless of the gate so a mid-interaction survey is never yanked — the gate\n // defers not-yet-shown surveys, it does not interrupt a live one.\n const autoPresent = props.autoPresentSurveys !== false\n const isAlreadyShown = !!activeSurvey && shownSurveyIdRef.current === activeSurvey.id\n const shouldShowModal =\n activeContext && activeContext.survey.type === SurveyType.Popover && (autoPresent || isAlreadyShown)\n\n return (\n <ActiveSurveyContext.Provider value={activeContext}>\n <FeedbackSurveyContext.Provider value={{ surveys, activeSurvey, setActiveSurvey }}>\n {props.children}\n {shouldShowModal && (\n <SurveyModal\n key={activeSession?.progress.submissionId}\n appearance={surveyAppearance}\n androidKeyboardBehavior={props.androidKeyboardBehavior}\n {...activeContext}\n />\n )}\n </FeedbackSurveyContext.Provider>\n </ActiveSurveyContext.Provider>\n )\n}\n"],"mappings":"4bAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,QAAA,CAAAD,OAAA,yBAEA,IAAAE,yBAAA,CAAAF,OAAA,+BACA,IAAAG,kBAAA,CAAAH,OAAA,uBACA,IAAAI,eAAA,CAAAJ,OAAA,sBACA,IAAAK,QAAA,CAAAL,OAAA,0BACA,IAAAM,oBAAA,CAAAN,OAAA,0BACA,IAAAO,YAAA,CAAAP,OAAA,6BACA,IAAAQ,aAAA,CAAAR,OAAA,oBAMA,IAAAS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ACb3G,OAAO,CACPU,aAAa,CACbF,qBAAqB,CACrBF,aAAa,CACb8F,sBAAsB,CACvB,CAAC,CAKF,GAAM,CAAA0B,WAAW,CAAGjI,KAAK,CAACkI,kBAAkB,GAAK,KAAK,CACtD,GAAM,CAAAC,cAAc,CAAG,CAAC,CAAC3G,YAAY,EAAIE,gBAAgB,CAACS,OAAO,GAAKX,YAAY,CAACuC,EAAE,CACrF,GAAM,CAAAqE,eAAe,CACnBjB,aAAa,EAAIA,aAAa,CAACjD,MAAM,CAACc,IAAI,GAAKC,gBAAU,CAACC,OAAO,GAAK+C,WAAW,EAAIE,cAAc,CAAC,CAEtG,MACE,GAAA7K,WAAA,CAAA+K,GAAA,EAAC3I,mBAAmB,CAAC4I,QAAQ,EAACC,KAAK,CAAEpB,aAAc,CAAAqB,QAAA,CACjD,GAAAlL,WAAA,CAAAmL,IAAA,EAAC3I,qBAAqB,CAACwI,QAAQ,EAACC,KAAK,CAAE,CAAEnH,OAAO,CAAPA,OAAO,CAAEI,YAAY,CAAZA,YAAY,CAAEC,eAAe,CAAfA,eAAe,CAAG,CAAA+G,QAAA,EAC/ExI,KAAK,CAACwI,QAAQ,CACdJ,eAAe,EACd,GAAA9K,WAAA,CAAA+K,GAAA,EAACrL,YAAA,CAAA0L,WAAW,CAAAvJ,aAAA,EAEV2F,UAAU,CAAE2B,gBAAiB,CAC7BkC,uBAAuB,CAAE3I,KAAK,CAAC2I,uBAAwB,EACnDxB,aAAa,EAHZL,aAAa,SAAbA,aAAa,iBAAbA,aAAa,CAAEC,QAAQ,CAACO,YAGX,CAErB,EAC6B,CAClC,CAA8B,CAAC,CAEnC","ignoreList":[]}
package/dist/types.d.ts CHANGED
@@ -86,23 +86,21 @@ export type PostHogAutocaptureOptions = {
86
86
  *
87
87
  * Only used for expo-router, @react-navigation/native and react-native-navigation
88
88
  *
89
- * For react-native-navigation, you need to call initReactNativeNavigation before using this option
90
- * See example: https://posthog.com/docs/libraries/react-native#with-react-native-navigation-and-autocapture
91
- *
92
- * For @react-navigation/native v6 and below, you need to wrap the PostHogProvider within the NavigationContainer
93
- * See example: https://posthog.com/docs/libraries/react-native#with-react-navigationnative-and-autocapture
94
- *
95
- * For @react-navigation/native v7 and above, because of a library change, you'll need to capture the screens manually and disable this option
96
- * You can use the onStateChange callback from the NavigationContainer to capture the screens automatically using the screen capture method
97
- * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens
98
- * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored
99
- * See example: https://reactnavigation.org/docs/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events
100
- *
101
- * For expo-router, expo-router uses @react-navigation/native, but does not expose the NavigationContainer, you'll need to capture the screens manually and disable this option
102
- * expo-router always has access to a URL, you can use the URL to capture the screens automatically using the screen capture method
103
- * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens
104
- * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored
105
- * See example: https://docs.expo.dev/router/reference/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events
89
+ * For react-native-navigation, call `initReactNativeNavigation` before using this option.
90
+ *
91
+ * For @react-navigation/native v6 and below, wrap `PostHogProvider` within `NavigationContainer`.
92
+ *
93
+ * For @react-navigation/native v7 and above, because of a library change, you'll need to capture screens manually and disable this option.
94
+ * You can use the `onStateChange` callback from `NavigationContainer` to capture screens with [`PostHog.screen`](#posthogscreen).
95
+ * You can use the `usePostHog()` hook or your own `PostHog` instance to capture screens.
96
+ * Since `captureScreens` is disabled, you don't need to pass `navigationRef`, and the navigation mutation object is ignored.
97
+ * See: https://reactnavigation.org/docs/screen-tracking/
98
+ *
99
+ * For expo-router, expo-router uses @react-navigation/native, but does not expose `NavigationContainer`, so capture screens manually and disable this option.
100
+ * expo-router always has access to a URL, so you can pass the URL to [`PostHog.screen`](#posthogscreen).
101
+ * You can use the `usePostHog()` hook or your own `PostHog` instance to capture screens.
102
+ * Since `captureScreens` is disabled, you don't need to pass `navigationRef`, and the navigation mutation object is ignored.
103
+ * See: https://docs.expo.dev/router/reference/screen-tracking/
106
104
  *
107
105
  * @default true
108
106
  */
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["export type PostHogAutocaptureNavigationTrackerOptions = {\n routeToName?: (name: string, params: any) => string\n routeToProperties?: (name: string, params: any) => Record<string, any>\n}\n\n/**\n * @deprecated\n */\nexport type PostHogNavigationRef = {\n getCurrentRoute(): any | undefined\n isReady: () => boolean\n current?: PostHogNavigationRef | any | undefined\n}\n\nexport type PostHogRageClickConfig = {\n /**\n * Enable or disable rage click (rage tap) detection.\n *\n * When enabled the native SDK emits a `$rageclick` event whenever a user\n * taps the same area repeatedly in quick succession.\n *\n * @default true\n */\n enabled?: boolean\n /**\n * Number of consecutive taps required to trigger a rage click.\n *\n * @default 3\n */\n minimumTapCount?: number\n /**\n * Maximum pixel distance between consecutive taps for them to still\n * count toward a rage click.\n *\n * @default 30\n */\n thresholdPoints?: number\n /**\n * Maximum time in seconds allowed between consecutive taps.\n *\n * @default 1.0\n */\n timeoutInterval?: number\n}\n\nexport type PostHogAutocaptureOptions = {\n /**\n * Enable autocapture of touch events.\n *\n * On React Native Web this also captures `click` events — mouse, trackpad, keyboard\n * activation and programmatic clicks — emitted with `$event_type: 'click'`, since\n * browsers fire `touchend` only for touch input.\n *\n * @default false\n */\n captureTouches?: boolean\n /**\n * Custom prop name used to label elements for autocapture\n *\n * @default 'ph-label'\n */\n customLabelProp?: string\n /**\n * Prop name used to prevent autocapture on an element and its children\n *\n * @default 'ph-no-capture'\n */\n noCaptureProp?: string\n /**\n * Maximum number of elements to capture in the component tree hierarchy\n *\n * @default 20\n */\n maxElementsCaptured?: number\n /**\n * List of element labels to ignore during autocapture\n *\n * @default []\n */\n ignoreLabels?: string[]\n /**\n * List of prop names to capture from elements\n *\n * @default ['style', 'testID', 'accessibilityLabel', 'ph-label', 'children']\n */\n propsToCapture?: string[]\n\n /**\n * Capture the screen name (or route name) and properties\n *\n * Only used for expo-router, @react-navigation/native and react-native-navigation\n *\n * For react-native-navigation, you need to call initReactNativeNavigation before using this option\n * See example: https://posthog.com/docs/libraries/react-native#with-react-native-navigation-and-autocapture\n *\n * For @react-navigation/native v6 and below, you need to wrap the PostHogProvider within the NavigationContainer\n * See example: https://posthog.com/docs/libraries/react-native#with-react-navigationnative-and-autocapture\n *\n * For @react-navigation/native v7 and above, because of a library change, you'll need to capture the screens manually and disable this option\n * You can use the onStateChange callback from the NavigationContainer to capture the screens automatically using the screen capture method\n * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens\n * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored\n * See example: https://reactnavigation.org/docs/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events\n *\n * For expo-router, expo-router uses @react-navigation/native, but does not expose the NavigationContainer, you'll need to capture the screens manually and disable this option\n * expo-router always has access to a URL, you can use the URL to capture the screens automatically using the screen capture method\n * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens\n * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored\n * See example: https://docs.expo.dev/router/reference/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events\n *\n * @default true\n */\n captureScreens?: boolean\n /**\n * Used for mutating the screen name and properties\n * Only used if captureScreens is true\n *\n * @default Default to the route name and params\n */\n navigation?: PostHogAutocaptureNavigationTrackerOptions\n /**\n * If you create a navigation ref with createNavigationContainerRef, you need to pass the navigation ref\n * Only used for expo-router and @react-navigation/native if captureScreens is true\n *\n * @deprecated this is deprecated since it didn't work as expected, check out the `captureScreens` comments for capturing screen views semi-automatically\n */\n navigationRef?: PostHogNavigationRef\n}\n\nexport interface PostHogCustomAppProperties {\n /** Build number like \"1.2.2\" or \"122\" */\n $app_build?: string | null\n /** Name of the app as displayed below the icon like \"PostHog\" */\n $app_name?: string | null\n /** Namespace of the app usually like \"com.posthog.app\" */\n $app_namespace?: string | null\n /** Human friendly app version like what a user would see in the app store like \"1.2.2\" */\n $app_version?: string | null\n /** Manufacturer like \"Apple\", \"Samsung\" or \"Android\" */\n $device_manufacturer?: string | null\n /** Readable model name like \"iPhone 12\" or \"Samsung Galaxy S24\" */\n $device_name?: string | null\n /** Model identifier like \"iPhone13,2\" or \"SM-S921B\" */\n $device_model?: string | null\n /** Device type (\"Mobile\" | \"Desktop\") */\n $device_type?: string | null\n /** Operating system name like iOS or Android */\n $os_name?: string | null\n /** Operating system version \"14.0\" */\n $os_version?: string | null\n /** Locale (language) of the device like \"en-US\" */\n $locale?: string | null\n /** Timezone of the device like \"Europe/Berlin\" */\n $timezone?: string | null\n /** Whether the app is running on an emulator/simulator */\n $is_emulator?: boolean | null\n /** React Native version like \"0.79.6\". Not set by default: the SDK sends it only on `Application Installed` and `Application Updated` */\n $react_native_version?: string | null | undefined\n}\n\nexport type PostHogSessionReplayConfig = {\n /**\n * Capture touch coordinates in session replay. Set to false to keep screenshots\n * without recording taps that could reveal sensitive input on a known keypad layout.\n * Does not change masking or `PostHogProvider` touch autocapture.\n * Android and iOS only. Requires `@posthog/react-native-plugin` 2.9.0 or later;\n * older plugins and `posthog-react-native-session-replay` ignore this option.\n * Set before constructing PostHog. Changes after initialization do not update native state.\n *\n * @default true\n */\n captureTouches?: boolean\n /**\n * Enable masking of all text and text input fields\n *\n * @default true\n */\n maskAllTextInputs?: boolean\n /**\n * Enable masking of all images to a placeholder\n *\n * @default true\n */\n maskAllImages?: boolean\n /**\n * Enable masking of all sandboxed system views\n * These may include UIImagePickerController, PHPickerViewController and CNContactPickerViewController\n * iOS only\n *\n * @default true\n */\n maskAllSandboxedViews?: boolean\n /**\n * Enable capturing of logs as console events\n *\n * @default true\n */\n captureLog?: boolean\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n iOSdebouncerDelayMs?: number\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n * Ps: it was 500ms (0.5s) by default until version 3.3.7\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n androidDebouncerDelayMs?: number\n /**\n * Throttling delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a wireframe or screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * This value has precedence over iOSdebouncerDelayMs and androidDebouncerDelayMs\n * If this is not set, we will take the max number between iOSdebouncerDelayMs and androidDebouncerDelayMs for back compatibility\n *\n * @default 1000\n */\n throttleDelayMs?: number\n /**\n * Enable capturing network telemetry\n * iOS only\n *\n * @default true\n */\n captureNetworkTelemetry?: boolean\n /**\n * Verify that masks remain aligned while capturing session replay screenshots.\n * Android only. Requires `@posthog/react-native-plugin`.\n *\n * Enabling this can preserve screenshots during pixel-only redraws, including\n * continuously animated content, but performs additional view hierarchy walks\n * while a screenshot is captured.\n *\n * @default false\n */\n verifyScreenshotMaskAlignment?: boolean\n /**\n * Experimental. Multiplier for the physical width and height of screenshots, clamped to 0.1–1.0.\n * For example, 0.5 captures half the width and height, or one quarter of the pixels.\n * The logical replay viewport is unchanged. Non-finite values use the native default.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n * Does not enable session replay or change compression quality or color mode.\n *\n * @experimental\n * @default undefined, which uses the native default: one pixel per dp with posthog-android 3.74.0 or later, native resolution with older versions.\n */\n screenshotScale?: number\n /**\n * Experimental. WebP compression quality, clamped to 0–100. Fractional values are truncated.\n * Higher values generally retain more detail and produce larger payloads.\n * Compression is lossy, except at quality 100 on Android 10, which uses lossless WebP.\n * Non-finite values use the native default. Does not change screenshot resolution.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 30\n */\n screenshotCompressionQuality?: number\n /**\n * Experimental. Screenshot bitmap pixel format. ARGB_8888 preserves transparency and color precision.\n * RGB_565 uses half the bitmap memory but reduces color precision and removes alpha,\n * making transparent window regions appear black. Unsupported devices fall back to ARGB_8888.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 'ARGB_8888'\n */\n screenshotColorMode?: 'ARGB_8888' | 'RGB_565'\n /**\n * Schedule screenshot image capture on a background queue.\n * iOS only\n * Experimental support\n *\n * Warning: Enabling this option will trigger Main Thread Checker warnings and may\n * briefly freeze the app the first time a screenshot is captured. Consider disabling\n * Main Thread Checker in your scheme's run diagnostics when enabling this.\n *\n * @default false\n */\n screenshotModeBackgroundCapture?: boolean\n /**\n * Session replay sample rate between 0 and 1\n * Local config has precedence over remote config when both are set.\n * If undefined, sampling is controlled by remote config (when available).\n */\n sampleRate?: number\n}\n\nexport interface PostHogCustomStorage {\n getItem: (key: string) => string | null | Promise<string | null>\n setItem: (key: string, value: string) => void | Promise<void>\n}\n\n/**\n * Mints a signed identity-verification token for a push subscription request.\n *\n * Called by the native SDK with the current `distinctId` and `appId`. Return\n * `null` to send the request without an identity token.\n */\nexport type PostHogPushIdentityProvider = (distinctId: string, appId: string) => Promise<string | null>\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["export type PostHogAutocaptureNavigationTrackerOptions = {\n routeToName?: (name: string, params: any) => string\n routeToProperties?: (name: string, params: any) => Record<string, any>\n}\n\n/**\n * @deprecated\n */\nexport type PostHogNavigationRef = {\n getCurrentRoute(): any | undefined\n isReady: () => boolean\n current?: PostHogNavigationRef | any | undefined\n}\n\nexport type PostHogRageClickConfig = {\n /**\n * Enable or disable rage click (rage tap) detection.\n *\n * When enabled the native SDK emits a `$rageclick` event whenever a user\n * taps the same area repeatedly in quick succession.\n *\n * @default true\n */\n enabled?: boolean\n /**\n * Number of consecutive taps required to trigger a rage click.\n *\n * @default 3\n */\n minimumTapCount?: number\n /**\n * Maximum pixel distance between consecutive taps for them to still\n * count toward a rage click.\n *\n * @default 30\n */\n thresholdPoints?: number\n /**\n * Maximum time in seconds allowed between consecutive taps.\n *\n * @default 1.0\n */\n timeoutInterval?: number\n}\n\nexport type PostHogAutocaptureOptions = {\n /**\n * Enable autocapture of touch events.\n *\n * On React Native Web this also captures `click` events — mouse, trackpad, keyboard\n * activation and programmatic clicks — emitted with `$event_type: 'click'`, since\n * browsers fire `touchend` only for touch input.\n *\n * @default false\n */\n captureTouches?: boolean\n /**\n * Custom prop name used to label elements for autocapture\n *\n * @default 'ph-label'\n */\n customLabelProp?: string\n /**\n * Prop name used to prevent autocapture on an element and its children\n *\n * @default 'ph-no-capture'\n */\n noCaptureProp?: string\n /**\n * Maximum number of elements to capture in the component tree hierarchy\n *\n * @default 20\n */\n maxElementsCaptured?: number\n /**\n * List of element labels to ignore during autocapture\n *\n * @default []\n */\n ignoreLabels?: string[]\n /**\n * List of prop names to capture from elements\n *\n * @default ['style', 'testID', 'accessibilityLabel', 'ph-label', 'children']\n */\n propsToCapture?: string[]\n\n /**\n * Capture the screen name (or route name) and properties\n *\n * Only used for expo-router, @react-navigation/native and react-native-navigation\n *\n * For react-native-navigation, call `initReactNativeNavigation` before using this option.\n *\n * For @react-navigation/native v6 and below, wrap `PostHogProvider` within `NavigationContainer`.\n *\n * For @react-navigation/native v7 and above, because of a library change, you'll need to capture screens manually and disable this option.\n * You can use the `onStateChange` callback from `NavigationContainer` to capture screens with [`PostHog.screen`](#posthogscreen).\n * You can use the `usePostHog()` hook or your own `PostHog` instance to capture screens.\n * Since `captureScreens` is disabled, you don't need to pass `navigationRef`, and the navigation mutation object is ignored.\n * See: https://reactnavigation.org/docs/screen-tracking/\n *\n * For expo-router, expo-router uses @react-navigation/native, but does not expose `NavigationContainer`, so capture screens manually and disable this option.\n * expo-router always has access to a URL, so you can pass the URL to [`PostHog.screen`](#posthogscreen).\n * You can use the `usePostHog()` hook or your own `PostHog` instance to capture screens.\n * Since `captureScreens` is disabled, you don't need to pass `navigationRef`, and the navigation mutation object is ignored.\n * See: https://docs.expo.dev/router/reference/screen-tracking/\n *\n * @default true\n */\n captureScreens?: boolean\n /**\n * Used for mutating the screen name and properties\n * Only used if captureScreens is true\n *\n * @default Default to the route name and params\n */\n navigation?: PostHogAutocaptureNavigationTrackerOptions\n /**\n * If you create a navigation ref with createNavigationContainerRef, you need to pass the navigation ref\n * Only used for expo-router and @react-navigation/native if captureScreens is true\n *\n * @deprecated this is deprecated since it didn't work as expected, check out the `captureScreens` comments for capturing screen views semi-automatically\n */\n navigationRef?: PostHogNavigationRef\n}\n\nexport interface PostHogCustomAppProperties {\n /** Build number like \"1.2.2\" or \"122\" */\n $app_build?: string | null\n /** Name of the app as displayed below the icon like \"PostHog\" */\n $app_name?: string | null\n /** Namespace of the app usually like \"com.posthog.app\" */\n $app_namespace?: string | null\n /** Human friendly app version like what a user would see in the app store like \"1.2.2\" */\n $app_version?: string | null\n /** Manufacturer like \"Apple\", \"Samsung\" or \"Android\" */\n $device_manufacturer?: string | null\n /** Readable model name like \"iPhone 12\" or \"Samsung Galaxy S24\" */\n $device_name?: string | null\n /** Model identifier like \"iPhone13,2\" or \"SM-S921B\" */\n $device_model?: string | null\n /** Device type (\"Mobile\" | \"Desktop\") */\n $device_type?: string | null\n /** Operating system name like iOS or Android */\n $os_name?: string | null\n /** Operating system version \"14.0\" */\n $os_version?: string | null\n /** Locale (language) of the device like \"en-US\" */\n $locale?: string | null\n /** Timezone of the device like \"Europe/Berlin\" */\n $timezone?: string | null\n /** Whether the app is running on an emulator/simulator */\n $is_emulator?: boolean | null\n /** React Native version like \"0.79.6\". Not set by default: the SDK sends it only on `Application Installed` and `Application Updated` */\n $react_native_version?: string | null | undefined\n}\n\nexport type PostHogSessionReplayConfig = {\n /**\n * Capture touch coordinates in session replay. Set to false to keep screenshots\n * without recording taps that could reveal sensitive input on a known keypad layout.\n * Does not change masking or `PostHogProvider` touch autocapture.\n * Android and iOS only. Requires `@posthog/react-native-plugin` 2.9.0 or later;\n * older plugins and `posthog-react-native-session-replay` ignore this option.\n * Set before constructing PostHog. Changes after initialization do not update native state.\n *\n * @default true\n */\n captureTouches?: boolean\n /**\n * Enable masking of all text and text input fields\n *\n * @default true\n */\n maskAllTextInputs?: boolean\n /**\n * Enable masking of all images to a placeholder\n *\n * @default true\n */\n maskAllImages?: boolean\n /**\n * Enable masking of all sandboxed system views\n * These may include UIImagePickerController, PHPickerViewController and CNContactPickerViewController\n * iOS only\n *\n * @default true\n */\n maskAllSandboxedViews?: boolean\n /**\n * Enable capturing of logs as console events\n *\n * @default true\n */\n captureLog?: boolean\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n iOSdebouncerDelayMs?: number\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n * Ps: it was 500ms (0.5s) by default until version 3.3.7\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n androidDebouncerDelayMs?: number\n /**\n * Throttling delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a wireframe or screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * This value has precedence over iOSdebouncerDelayMs and androidDebouncerDelayMs\n * If this is not set, we will take the max number between iOSdebouncerDelayMs and androidDebouncerDelayMs for back compatibility\n *\n * @default 1000\n */\n throttleDelayMs?: number\n /**\n * Enable capturing network telemetry\n * iOS only\n *\n * @default true\n */\n captureNetworkTelemetry?: boolean\n /**\n * Verify that masks remain aligned while capturing session replay screenshots.\n * Android only. Requires `@posthog/react-native-plugin`.\n *\n * Enabling this can preserve screenshots during pixel-only redraws, including\n * continuously animated content, but performs additional view hierarchy walks\n * while a screenshot is captured.\n *\n * @default false\n */\n verifyScreenshotMaskAlignment?: boolean\n /**\n * Experimental. Multiplier for the physical width and height of screenshots, clamped to 0.1–1.0.\n * For example, 0.5 captures half the width and height, or one quarter of the pixels.\n * The logical replay viewport is unchanged. Non-finite values use the native default.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n * Does not enable session replay or change compression quality or color mode.\n *\n * @experimental\n * @default undefined, which uses the native default: one pixel per dp with posthog-android 3.74.0 or later, native resolution with older versions.\n */\n screenshotScale?: number\n /**\n * Experimental. WebP compression quality, clamped to 0–100. Fractional values are truncated.\n * Higher values generally retain more detail and produce larger payloads.\n * Compression is lossy, except at quality 100 on Android 10, which uses lossless WebP.\n * Non-finite values use the native default. Does not change screenshot resolution.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 30\n */\n screenshotCompressionQuality?: number\n /**\n * Experimental. Screenshot bitmap pixel format. ARGB_8888 preserves transparency and color precision.\n * RGB_565 uses half the bitmap memory but reduces color precision and removes alpha,\n * making transparent window regions appear black. Unsupported devices fall back to ARGB_8888.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 'ARGB_8888'\n */\n screenshotColorMode?: 'ARGB_8888' | 'RGB_565'\n /**\n * Schedule screenshot image capture on a background queue.\n * iOS only\n * Experimental support\n *\n * Warning: Enabling this option will trigger Main Thread Checker warnings and may\n * briefly freeze the app the first time a screenshot is captured. Consider disabling\n * Main Thread Checker in your scheme's run diagnostics when enabling this.\n *\n * @default false\n */\n screenshotModeBackgroundCapture?: boolean\n /**\n * Session replay sample rate between 0 and 1\n * Local config has precedence over remote config when both are set.\n * If undefined, sampling is controlled by remote config (when available).\n */\n sampleRate?: number\n}\n\nexport interface PostHogCustomStorage {\n getItem: (key: string) => string | null | Promise<string | null>\n setItem: (key: string, value: string) => void | Promise<void>\n}\n\n/**\n * Mints a signed identity-verification token for a push subscription request.\n *\n * Called by the native SDK with the current `distinctId` and `appId`. Return\n * `null` to send the request without an identity token.\n */\nexport type PostHogPushIdentityProvider = (distinctId: string, appId: string) => Promise<string | null>\n"],"mappings":"","ignoreList":[]}
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "4.87.0";
1
+ export declare const version = "4.87.2";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.87.0";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.87.2";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":["version","exports"],"sources":["../src/version.ts"],"sourcesContent":["export const version = \"4.87.0\"\n"],"mappings":"6FAAO,GAAM,CAAAA,OAAO,CAAAC,OAAA,CAAAD,OAAA,CAAG,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"version.js","names":["version","exports"],"sources":["../src/version.ts"],"sourcesContent":["export const version = \"4.87.2\"\n"],"mappings":"6FAAO,GAAM,CAAAA,OAAO,CAAAC,OAAA,CAAAD,OAAA,CAAG,QAAQ","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-react-native",
3
- "version": "4.87.0",
3
+ "version": "4.87.2",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -34,8 +34,8 @@
34
34
  "directory": "packages/react-native"
35
35
  },
36
36
  "dependencies": {
37
- "@posthog/core": "^1.68.0",
38
- "@posthog/types": "^1.425.1"
37
+ "@posthog/core": "^1.69.2",
38
+ "@posthog/types": "^1.427.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/cli": "^7.19.3",
@@ -73,9 +73,9 @@
73
73
  "typescript": "7.0.2",
74
74
  "@vitest/coverage-v8": "^1.6.1",
75
75
  "vitest": "^1.6.1",
76
- "@posthog-tooling/rollup-utils": "1.1.1",
77
76
  "@posthog-tooling/tsconfig-base": "1.1.1",
78
- "@posthog/react-native-plugin": "2.13.1"
77
+ "@posthog-tooling/rollup-utils": "1.1.1",
78
+ "@posthog/react-native-plugin": "2.13.3"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@react-native-async-storage/async-storage": ">=1.0.0",