chore: add mobile app

This commit is contained in:
2026-02-07 22:33:02 +01:00
parent db34640acc
commit e89384ad4e
29327 changed files with 3886944 additions and 12 deletions
@@ -0,0 +1,5 @@
import type { MetroConfig } from '@react-native/metro-config/dist';
export declare function wrapWithReanimatedMetroConfig(
config: MetroConfig
): MetroConfig;
@@ -0,0 +1,39 @@
const COLLAPSED_STACK_REGEX = new RegExp(
[
// For internal usage in the example app
'/packages/react-native-reanimated/.+\\.(t|j)sx?$',
// When reanimated is installed as a dependency (node_modules)
'/node_modules/react-native-reanimated/.+\\.(t|j)sx?$',
]
// Make patterns work with both Windows and POSIX paths.
.map((pathPattern) => pathPattern.replaceAll('/', '[/\\\\]'))
.join('|')
);
/**
* @param {import('@react-native/metro-config').MetroConfig} config
* @returns {import('@react-native/metro-config').MetroConfig}
*/
function wrapWithReanimatedMetroConfig(config) {
return {
...config,
symbolicator: {
async customizeFrame(frame) {
const collapse = Boolean(
// Collapse the stack frame based on user's config symbolicator settings
(await config?.symbolicator?.customizeFrame?.(frame))?.collapse ||
// or, if not already collapsed, collapse the stack frame with path
// to react-native-reanimated source code
(frame.file && COLLAPSED_STACK_REGEX.test(frame.file))
);
return {
collapse,
};
},
},
};
}
module.exports = {
wrapWithReanimatedMetroConfig,
};
@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.json",
}