first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
"use strict";
export function debounce(func, duration) {
let timeout;
return function (...args) {
clearTimeout(timeout);
timeout = setTimeout(() => {
func.apply(this, args);
}, duration);
};
}
//# sourceMappingURL=debounce.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["debounce","func","duration","timeout","args","clearTimeout","setTimeout","apply"],"sourceRoot":"../../../src","sources":["utils/debounce.tsx"],"mappings":";;AAAA,OAAO,SAASA,QAAQA,CACtBC,IAAO,EACPC,QAAgB,EACb;EACH,IAAIC,OAAsC;EAE1C,OAAO,UAAyB,GAAGC,IAAI,EAAE;IACvCC,YAAY,CAACF,OAAO,CAAC;IAErBA,OAAO,GAAGG,UAAU,CAAC,MAAM;MACzBL,IAAI,CAACM,KAAK,CAAC,IAAI,EAAEH,IAAI,CAAC;IACxB,CAAC,EAAEF,QAAQ,CAAC;EACd,CAAC;AACH","ignoreList":[]}

View File

@@ -0,0 +1,12 @@
"use strict";
export const getModalRouteKeys = (routes, descriptors) => routes.reduce((acc, route) => {
const {
presentation
} = descriptors[route.key]?.options ?? {};
if (acc.length && !presentation || presentation === 'modal' || presentation === 'transparentModal' || presentation === 'containedModal' || presentation === 'containedTransparentModal' || presentation === 'fullScreenModal' || presentation === 'formSheet' || presentation === 'pageSheet') {
acc.push(route.key);
}
return acc;
}, []);
//# sourceMappingURL=getModalRoutesKeys.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["getModalRouteKeys","routes","descriptors","reduce","acc","route","presentation","key","options","length","push"],"sourceRoot":"../../../src","sources":["utils/getModalRoutesKeys.ts"],"mappings":";;AAIA,OAAO,MAAMA,iBAAiB,GAAGA,CAC/BC,MAAuB,EACvBC,WAAqC,KAErCD,MAAM,CAACE,MAAM,CAAW,CAACC,GAAG,EAAEC,KAAK,KAAK;EACtC,MAAM;IAAEC;EAAa,CAAC,GAAGJ,WAAW,CAACG,KAAK,CAACE,GAAG,CAAC,EAAEC,OAAO,IAAI,CAAC,CAAC;EAE9D,IACGJ,GAAG,CAACK,MAAM,IAAI,CAACH,YAAY,IAC5BA,YAAY,KAAK,OAAO,IACxBA,YAAY,KAAK,kBAAkB,IACnCA,YAAY,KAAK,gBAAgB,IACjCA,YAAY,KAAK,2BAA2B,IAC5CA,YAAY,KAAK,iBAAiB,IAClCA,YAAY,KAAK,WAAW,IAC5BA,YAAY,KAAK,WAAW,EAC5B;IACAF,GAAG,CAACM,IAAI,CAACL,KAAK,CAACE,GAAG,CAAC;EACrB;EAEA,OAAOH,GAAG;AACZ,CAAC,EAAE,EAAE,CAAC","ignoreList":[]}

View File

@@ -0,0 +1,12 @@
"use strict";
import * as React from 'react';
export const AnimatedHeaderHeightContext = /*#__PURE__*/React.createContext(undefined);
export function useAnimatedHeaderHeight() {
const animatedValue = React.useContext(AnimatedHeaderHeightContext);
if (animatedValue === undefined) {
throw new Error("Couldn't find the header height. Are you inside a screen in a native stack navigator?");
}
return animatedValue;
}
//# sourceMappingURL=useAnimatedHeaderHeight.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","AnimatedHeaderHeightContext","createContext","undefined","useAnimatedHeaderHeight","animatedValue","useContext","Error"],"sourceRoot":"../../../src","sources":["utils/useAnimatedHeaderHeight.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAO,MAAMC,2BAA2B,gBAAGD,KAAK,CAACE,aAAa,CAE5DC,SAAS,CAAC;AAEZ,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,MAAMC,aAAa,GAAGL,KAAK,CAACM,UAAU,CAACL,2BAA2B,CAAC;EAEnE,IAAII,aAAa,KAAKF,SAAS,EAAE;IAC/B,MAAM,IAAII,KAAK,CACb,uFACF,CAAC;EACH;EAEA,OAAOF,aAAa;AACtB","ignoreList":[]}

View File

@@ -0,0 +1,17 @@
"use strict";
import * as React from 'react';
export function useDismissedRouteError(state) {
const [nextDismissedKey, setNextDismissedKey] = React.useState(null);
const dismissedRouteName = nextDismissedKey ? state.routes.find(route => route.key === nextDismissedKey)?.name : null;
React.useEffect(() => {
if (dismissedRouteName) {
const message = `The screen '${dismissedRouteName}' was removed natively but didn't get removed from JS state. ` + `This can happen if the action was prevented in a 'beforeRemove' listener, which is not fully supported in native-stack.\n\n` + `Consider using a 'usePreventRemove' hook with 'headerBackButtonMenuEnabled: false' to prevent users from natively going back multiple screens.`;
console.error(message);
}
}, [dismissedRouteName]);
return {
setNextDismissedKey
};
}
//# sourceMappingURL=useDismissedRouteError.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","useDismissedRouteError","state","nextDismissedKey","setNextDismissedKey","useState","dismissedRouteName","routes","find","route","key","name","useEffect","message","console","error"],"sourceRoot":"../../../src","sources":["utils/useDismissedRouteError.tsx"],"mappings":";;AAIA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAO,SAASC,sBAAsBA,CACpCC,KAA0C,EAC1C;EACA,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGJ,KAAK,CAACK,QAAQ,CAC5D,IACF,CAAC;EAED,MAAMC,kBAAkB,GAAGH,gBAAgB,GACvCD,KAAK,CAACK,MAAM,CAACC,IAAI,CAAEC,KAAK,IAAKA,KAAK,CAACC,GAAG,KAAKP,gBAAgB,CAAC,EAAEQ,IAAI,GAClE,IAAI;EAERX,KAAK,CAACY,SAAS,CAAC,MAAM;IACpB,IAAIN,kBAAkB,EAAE;MACtB,MAAMO,OAAO,GACX,eAAeP,kBAAkB,+DAA+D,GAChG,6HAA6H,GAC7H,gJAAgJ;MAElJQ,OAAO,CAACC,KAAK,CAACF,OAAO,CAAC;IACxB;EACF,CAAC,EAAE,CAACP,kBAAkB,CAAC,CAAC;EAExB,OAAO;IAAEF;EAAoB,CAAC;AAChC","ignoreList":[]}

View File

@@ -0,0 +1,20 @@
"use strict";
import { usePreventRemoveContext } from '@react-navigation/native';
import * as React from 'react';
export function useInvalidPreventRemoveError(descriptors) {
const {
preventedRoutes
} = usePreventRemoveContext();
const preventedRouteKey = Object.keys(preventedRoutes)[0];
const preventedDescriptor = descriptors[preventedRouteKey];
const isHeaderBackButtonMenuEnabledOnPreventedScreen = preventedDescriptor?.options?.headerBackButtonMenuEnabled;
const preventedRouteName = preventedDescriptor?.route?.name;
React.useEffect(() => {
if (preventedRouteKey != null && isHeaderBackButtonMenuEnabledOnPreventedScreen) {
const message = `The screen ${preventedRouteName} uses 'usePreventRemove' hook alongside 'headerBackButtonMenuEnabled: true', which is not supported. \n\n` + `Consider removing 'headerBackButtonMenuEnabled: true' from ${preventedRouteName} screen to get rid of this error.`;
console.error(message);
}
}, [preventedRouteKey, isHeaderBackButtonMenuEnabledOnPreventedScreen, preventedRouteName]);
}
//# sourceMappingURL=useInvalidPreventRemoveError.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["usePreventRemoveContext","React","useInvalidPreventRemoveError","descriptors","preventedRoutes","preventedRouteKey","Object","keys","preventedDescriptor","isHeaderBackButtonMenuEnabledOnPreventedScreen","options","headerBackButtonMenuEnabled","preventedRouteName","route","name","useEffect","message","console","error"],"sourceRoot":"../../../src","sources":["utils/useInvalidPreventRemoveError.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAI9B,OAAO,SAASC,4BAA4BA,CAC1CC,WAAqC,EACrC;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGJ,uBAAuB,CAAC,CAAC;EACrD,MAAMK,iBAAiB,GAAGC,MAAM,CAACC,IAAI,CAACH,eAAe,CAAC,CAAC,CAAC,CAAC;EACzD,MAAMI,mBAAmB,GAAGL,WAAW,CAACE,iBAAiB,CAAC;EAC1D,MAAMI,8CAA8C,GAClDD,mBAAmB,EAAEE,OAAO,EAAEC,2BAA2B;EAC3D,MAAMC,kBAAkB,GAAGJ,mBAAmB,EAAEK,KAAK,EAAEC,IAAI;EAE3Db,KAAK,CAACc,SAAS,CAAC,MAAM;IACpB,IACEV,iBAAiB,IAAI,IAAI,IACzBI,8CAA8C,EAC9C;MACA,MAAMO,OAAO,GACX,cAAcJ,kBAAkB,2GAA2G,GAC3I,8DAA8DA,kBAAkB,mCAAmC;MACrHK,OAAO,CAACC,KAAK,CAACF,OAAO,CAAC;IACxB;EACF,CAAC,EAAE,CACDX,iBAAiB,EACjBI,8CAA8C,EAC9CG,kBAAkB,CACnB,CAAC;AACJ","ignoreList":[]}