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

3
node_modules/expo-router/build/views/EmptyRoute.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import React from 'react';
export declare function EmptyRoute(): React.JSX.Element;
//# sourceMappingURL=EmptyRoute.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EmptyRoute.d.ts","sourceRoot":"","sources":["../../src/views/EmptyRoute.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAgB,UAAU,sBAUzB"}

19
node_modules/expo-router/build/views/EmptyRoute.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
'use client';
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmptyRoute = EmptyRoute;
const react_1 = __importDefault(require("react"));
const Toast_1 = require("./Toast");
const Route_1 = require("../Route");
function EmptyRoute() {
const route = (0, Route_1.useRouteNode)();
return (<Toast_1.ToastWrapper>
<Toast_1.Toast warning filename={route?.contextKey}>
Missing default export
</Toast_1.Toast>
</Toast_1.ToastWrapper>);
}
//# sourceMappingURL=EmptyRoute.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"EmptyRoute.js","sourceRoot":"","sources":["../../src/views/EmptyRoute.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;AAOb,gCAUC;AAfD,kDAA0B;AAE1B,mCAA8C;AAC9C,oCAAwC;AAExC,SAAgB,UAAU;IACxB,MAAM,KAAK,GAAG,IAAA,oBAAY,GAAE,CAAC;IAE7B,OAAO,CACL,CAAC,oBAAY,CACX;MAAA,CAAC,aAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,CACzC;;MACF,EAAE,aAAK,CACT;IAAA,EAAE,oBAAY,CAAC,CAChB,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { Toast, ToastWrapper } from './Toast';\nimport { useRouteNode } from '../Route';\n\nexport function EmptyRoute() {\n const route = useRouteNode();\n\n return (\n <ToastWrapper>\n <Toast warning filename={route?.contextKey}>\n Missing default export\n </Toast>\n </ToastWrapper>\n );\n}\n"]}

View File

@@ -0,0 +1,3 @@
import { ErrorBoundaryProps } from './Try';
export declare function ErrorBoundary({ error, retry }: ErrorBoundaryProps): import("react").JSX.Element;
//# sourceMappingURL=ErrorBoundary.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/views/ErrorBoundary.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAsB3C,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BAuCjE"}

183
node_modules/expo-router/build/views/ErrorBoundary.js generated vendored Normal file
View File

@@ -0,0 +1,183 @@
"use strict";
'use client';
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorBoundary = ErrorBoundary;
const bottom_tabs_1 = require("@react-navigation/bottom-tabs");
const react_1 = require("react");
const react_native_1 = require("react-native");
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
const Pressable_1 = require("./Pressable");
const Link_1 = require("../link/Link");
const errors_1 = require("../rsc/router/errors");
function StandardErrorView({ error }) {
return (<react_native_1.View style={{
marginBottom: 12,
gap: 4,
flexWrap: process.env.EXPO_OS === 'web' ? 'wrap' : 'nowrap',
}}>
<react_native_1.Text role="heading" aria-level={1} style={styles.title}>
Something went wrong
</react_native_1.Text>
<react_native_1.Text testID="router_error_message" role="heading" aria-level={2} style={styles.errorMessage}>
Error: {error.message}
</react_native_1.Text>
</react_native_1.View>);
}
function ErrorBoundary({ error, retry }) {
const inTabBar = (0, react_1.use)(bottom_tabs_1.BottomTabBarHeightContext);
const Wrapper = inTabBar ? react_native_1.View : react_native_safe_area_context_1.SafeAreaView;
const isServerError = error instanceof errors_1.ReactServerError;
return (<react_native_1.View style={styles.container}>
<Wrapper style={{ flex: 1, gap: 8, maxWidth: 720, marginHorizontal: 'auto' }}>
{isServerError ? (<ReactServerErrorView error={error}/>) : (<StandardErrorView error={error}/>)}
<react_native_1.View style={{ flex: 1 }}/>
{process.env.NODE_ENV === 'development' && (<Link_1.Link testID="router_error_sitemap" href="/_sitemap" style={styles.link}>
Sitemap
</Link_1.Link>)}
<Pressable_1.Pressable testID="router_error_retry" onPress={retry}>
{({ hovered, pressed }) => (<react_native_1.View style={[styles.buttonInner, (hovered || pressed) && { backgroundColor: 'white' }]}>
<react_native_1.Text style={[
styles.buttonText,
{
color: hovered || pressed ? 'black' : 'white',
},
]}>
Retry
</react_native_1.Text>
</react_native_1.View>)}
</Pressable_1.Pressable>
</Wrapper>
</react_native_1.View>);
}
const COMMON_ERROR_STATUS = {
404: 'NOT_FOUND',
500: 'INTERNAL_SERVER_ERROR',
503: 'SERVICE_UNAVAILABLE',
504: 'GATEWAY_TIMEOUT',
};
// TODO: This should probably be replaced by a DOM component that loads server errors in the future.
function ReactServerErrorView({ error }) {
let title = String(error.statusCode);
title += ': ' + (COMMON_ERROR_STATUS[error.statusCode] ?? 'Server Error');
const errorId = error.headers.get('cf-ray');
const date = error.headers.get('Date');
return (<react_native_1.View style={{
padding: 12,
gap: 8,
}}>
<react_native_1.Text selectable allowFontScaling style={{
fontSize: react_native_1.Platform.select({ web: 24, default: 16 }),
fontWeight: 'bold',
marginBottom: 4,
color: 'white',
}}>
{title}
</react_native_1.Text>
{process.env.EXPO_OS === 'web' ? (<react_native_1.ScrollView style={{
borderColor: 'rgba(255,255,255,0.5)',
borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
maxHeight: 150,
}} contentContainerStyle={{ paddingVertical: 4 }}>
<react_native_1.Text testID="router_error_message" selectable allowFontScaling style={{
color: 'white',
}}>
{error.message}
</react_native_1.Text>
</react_native_1.ScrollView>) : (<react_native_1.TextInput testID="router_error_message" scrollEnabled multiline editable={false} allowFontScaling value={error.message} style={{
borderColor: 'rgba(255,255,255,0.5)',
borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
paddingVertical: 4,
maxHeight: 150,
color: 'white',
}}/>)}
<InfoRow title="Code" right={error.statusCode}/>
{errorId && <InfoRow title="ID" right={errorId}/>}
{date && <InfoRow title="Date" right={date}/>}
{error.url && (<react_native_1.Text selectable allowFontScaling style={{ fontSize: 14, opacity: 0.5, color: 'white' }}>
{error.url}
</react_native_1.Text>)}
</react_native_1.View>);
}
function InfoRow({ title, right }) {
const style = {
fontSize: 16,
color: 'white',
};
return (<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<react_native_1.Text selectable allowFontScaling style={style}>
{title}
</react_native_1.Text>
{right && (<react_native_1.Text selectable allowFontScaling style={[style, styles.code]}>
{right}
</react_native_1.Text>)}
</react_native_1.View>);
}
const styles = react_native_1.StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'black',
padding: 24,
alignItems: 'stretch',
justifyContent: 'center',
},
title: {
color: 'white',
fontSize: react_native_1.Platform.select({ web: 32, default: 24 }),
fontWeight: 'bold',
},
buttonText: {
fontSize: 18,
fontWeight: 'bold',
color: 'black',
...react_native_1.Platform.select({
web: {
transitionDuration: '100ms',
},
}),
},
buttonInner: {
...react_native_1.Platform.select({
web: {
transitionDuration: '100ms',
},
}),
paddingVertical: 12,
paddingHorizontal: 24,
borderColor: 'white',
borderWidth: 2,
marginLeft: 8,
justifyContent: 'center',
alignItems: 'center',
},
code: {
fontFamily: react_native_1.Platform.select({
default: 'Courier',
ios: 'Courier New',
android: 'monospace',
}),
fontWeight: '500',
},
errorMessage: {
color: 'white',
fontSize: 16,
},
subtitle: {
color: 'white',
fontSize: 14,
marginBottom: 12,
},
link: {
color: 'rgba(255,255,255,0.4)',
textDecorationStyle: 'solid',
textDecorationLine: 'underline',
fontSize: 14,
textAlign: 'center',
},
});
//# sourceMappingURL=ErrorBoundary.js.map

File diff suppressed because one or more lines are too long

54
node_modules/expo-router/build/views/Navigator.d.ts generated vendored Normal file
View File

@@ -0,0 +1,54 @@
import { RouterFactory, useNavigationBuilder } from '@react-navigation/native';
import * as React from 'react';
import { StackRouter } from '../layouts/StackClient';
export type NavigatorContextValue = ReturnType<typeof useNavigationBuilder> & {
contextKey: string;
router: RouterFactory<any, any, any>;
};
export declare const NavigatorContext: React.Context<NavigatorContextValue | null>;
type UseNavigationBuilderRouter = Parameters<typeof useNavigationBuilder>[0];
type UseNavigationBuilderOptions = Parameters<typeof useNavigationBuilder>[1];
export type NavigatorProps<T extends UseNavigationBuilderRouter> = {
initialRouteName?: UseNavigationBuilderOptions['initialRouteName'];
screenOptions?: UseNavigationBuilderOptions['screenOptions'];
children?: UseNavigationBuilderOptions['children'];
router?: T;
routerOptions?: Omit<Parameters<T>[0], 'initialRouteName'>;
};
/**
* An unstyled custom navigator. Good for basic web layouts.
*
* @hidden
*/
export declare function Navigator<T extends UseNavigationBuilderRouter = typeof StackRouter>({ initialRouteName, screenOptions, children, router, routerOptions, }: NavigatorProps<T>): React.JSX.Element | null;
export declare namespace Navigator {
var Slot: typeof NavigatorSlot;
var useContext: typeof useNavigatorContext;
var Screen: typeof import("./Screen").Screen;
}
/**
* @hidden
*/
export declare function useNavigatorContext(): NavigatorContextValue;
/**
* Renders the currently selected content.
*
* There are actually two different implementations of `<Slot/>`:
* - Used inside a `_layout` as the `Navigator`
* - Used inside a `Navigator` as the content
*
* Since a custom `Navigator` will set the `NavigatorContext.contextKey` to
* the current `_layout`, you can use this to determine if you are inside
* a custom navigator or not.
*/
export declare function Slot(props: Omit<NavigatorProps<any>, 'children'>): React.JSX.Element;
/**
* Render the current navigator content.
*/
declare function NavigatorSlot(): React.JSX.Element;
/**
* The default navigator for the app when no root _layout is provided.
*/
export declare function DefaultNavigator(): React.JSX.Element;
export {};
//# sourceMappingURL=Navigator.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Navigator.d.ts","sourceRoot":"","sources":["../../src/views/Navigator.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,GAAG;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,6CAA0D,CAAC;AAMxF,KAAK,0BAA0B,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7E,KAAK,2BAA2B,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9E,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,0BAA0B,IAAI;IACjE,gBAAgB,CAAC,EAAE,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;IACnE,aAAa,CAAC,EAAE,2BAA2B,CAAC,eAAe,CAAC,CAAC;IAC7D,QAAQ,CAAC,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,aAAa,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,0BAA0B,GAAG,OAAO,WAAW,EAAE,EACnF,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,aAAa,GACd,EAAE,cAAc,CAAC,CAAC,CAAC,4BA0CnB;yBAhDe,SAAS;;;;;AAkDzB;;GAEG;AACH,wBAAgB,mBAAmB,0BAMlC;AAqBD;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,qBAchE;AAED;;GAEG;AACH,iBAAS,aAAa,sBAMrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,sBAS/B"}

161
node_modules/expo-router/build/views/Navigator.js generated vendored Normal file
View File

@@ -0,0 +1,161 @@
"use strict";
// Copyright © 2024 650 Industries.
'use client';
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.NavigatorContext = void 0;
exports.Navigator = Navigator;
exports.useNavigatorContext = useNavigatorContext;
exports.Slot = Slot;
exports.DefaultNavigator = DefaultNavigator;
const native_1 = require("@react-navigation/native");
const React = __importStar(require("react"));
const react_native_is_edge_to_edge_1 = require("react-native-is-edge-to-edge");
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
const Screen_1 = require("./Screen");
const Route_1 = require("../Route");
const StackClient_1 = require("../layouts/StackClient");
const withLayoutContext_1 = require("../layouts/withLayoutContext");
const useScreens_1 = require("../useScreens");
exports.NavigatorContext = React.createContext(null);
if (process.env.NODE_ENV !== 'production') {
exports.NavigatorContext.displayName = 'NavigatorContext';
}
/**
* An unstyled custom navigator. Good for basic web layouts.
*
* @hidden
*/
function Navigator({ initialRouteName, screenOptions, children, router, routerOptions, }) {
const contextKey = (0, Route_1.useContextKey)();
// A custom navigator can have a mix of Screen and other components (like a Slot inside a View)
const { screens, children: nonScreenChildren, protectedScreens, } = (0, withLayoutContext_1.useFilterScreenChildren)(children, {
isCustomNavigator: true,
contextKey,
});
const sortedScreens = (0, useScreens_1.useSortedScreens)(screens ?? [], protectedScreens);
router ||= StackClient_1.StackRouter;
const navigation = (0, native_1.useNavigationBuilder)(router, {
// Used for getting the parent with navigation.getParent('/normalized/path')
...routerOptions,
id: contextKey,
children: sortedScreens || [<Screen_1.Screen key="default"/>],
screenOptions,
initialRouteName,
});
// useNavigationBuilder requires at least one screen to be defined otherwise it will throw.
if (!sortedScreens.length) {
console.warn(`Navigator at "${contextKey}" has no children.`);
return null;
}
return (<exports.NavigatorContext.Provider value={{
...navigation,
contextKey,
router,
}}>
{nonScreenChildren}
</exports.NavigatorContext.Provider>);
}
/**
* @hidden
*/
function useNavigatorContext() {
const context = React.use(exports.NavigatorContext);
if (!context) {
throw new Error('useNavigatorContext must be used within a <Navigator />');
}
return context;
}
function SlotNavigator(props) {
const contextKey = (0, Route_1.useContextKey)();
// Allows adding Screen components as children to configure routes.
const { screens, protectedScreens } = (0, withLayoutContext_1.useFilterScreenChildren)([], {
contextKey,
});
const { state, descriptors, NavigationContent } = (0, native_1.useNavigationBuilder)(StackClient_1.StackRouter, {
...props,
id: contextKey,
children: (0, useScreens_1.useSortedScreens)(screens ?? [], protectedScreens),
});
return (<NavigationContent>{descriptors[state.routes[state.index].key].render()}</NavigationContent>);
}
/**
* Renders the currently selected content.
*
* There are actually two different implementations of `<Slot/>`:
* - Used inside a `_layout` as the `Navigator`
* - Used inside a `Navigator` as the content
*
* Since a custom `Navigator` will set the `NavigatorContext.contextKey` to
* the current `_layout`, you can use this to determine if you are inside
* a custom navigator or not.
*/
function Slot(props) {
const contextKey = (0, Route_1.useContextKey)();
const context = React.use(exports.NavigatorContext);
if (context?.contextKey !== contextKey) {
// The _layout has changed since the last navigator
return <SlotNavigator {...props}/>;
}
/*
* The user has defined a custom navigator
* <Navigator><Slot /></Navigator>
*/
return <NavigatorSlot />;
}
/**
* Render the current navigator content.
*/
function NavigatorSlot() {
const context = useNavigatorContext();
const { state, descriptors } = context;
return descriptors[state.routes[state.index].key]?.render() ?? null;
}
/**
* The default navigator for the app when no root _layout is provided.
*/
function DefaultNavigator() {
if (process.env.EXPO_OS === 'android' && (0, react_native_is_edge_to_edge_1.isEdgeToEdge)()) {
return <SlotNavigator />;
}
return (<react_native_safe_area_context_1.SafeAreaView style={{ flex: 1 }}>
<SlotNavigator />
</react_native_safe_area_context_1.SafeAreaView>);
}
Navigator.Slot = NavigatorSlot;
Navigator.useContext = useNavigatorContext;
/** Used to configure route settings. */
Navigator.Screen = Screen_1.Screen;
//# sourceMappingURL=Navigator.js.map

File diff suppressed because one or more lines are too long

5
node_modules/expo-router/build/views/NoSSR.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import React from 'react';
export declare function NoSSR({ children }: {
children: React.ReactNode;
}): React.JSX.Element | null;
//# sourceMappingURL=NoSSR.d.ts.map

1
node_modules/expo-router/build/views/NoSSR.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"NoSSR.d.ts","sourceRoot":"","sources":["../../src/views/NoSSR.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4BAahE"}

22
node_modules/expo-router/build/views/NoSSR.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.NoSSR = NoSSR;
const react_1 = __importDefault(require("react"));
function NoSSR({ children }) {
const [mounted, setMounted] = react_1.default.useState(false);
react_1.default.useEffect(() => {
setMounted(true);
}, []);
if (!mounted) {
// If the component is not mounted, return null to prevent server-side rendering.
return null;
}
// This component is used to prevent server-side rendering of its children.
// It can be useful for components that rely on browser-specific APIs or
// need to be rendered only on the client side.
return <>{children}</>;
}
//# sourceMappingURL=NoSSR.js.map

1
node_modules/expo-router/build/views/NoSSR.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"NoSSR.js","sourceRoot":"","sources":["../../src/views/NoSSR.tsx"],"names":[],"mappings":";;;;;AAEA,sBAaC;AAfD,kDAA0B;AAE1B,SAAgB,KAAK,CAAC,EAAE,QAAQ,EAAiC;IAC/D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,iFAAiF;QACjF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,+CAA+C;IAC/C,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,CAAC","sourcesContent":["import React from 'react';\n\nexport function NoSSR({ children }: { children: React.ReactNode }) {\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => {\n setMounted(true);\n }, []);\n if (!mounted) {\n // If the component is not mounted, return null to prevent server-side rendering.\n return null;\n }\n // This component is used to prevent server-side rendering of its children.\n // It can be useful for components that rely on browser-specific APIs or\n // need to be rendered only on the client side.\n return <>{children}</>;\n}\n"]}

25
node_modules/expo-router/build/views/Pressable.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import { ClassAttributes, ComponentProps, ComponentType } from 'react';
import { Pressable as NativePressable, StyleProp, ViewStyle, PressableStateCallbackType as NativePressableStateCallbackType } from 'react-native';
type NativePressableProps = ComponentProps<typeof NativePressable> & ClassAttributes<typeof NativePressable>;
export type PressableStateCallbackType = NativePressableStateCallbackType & {
readonly pressed: boolean;
readonly hovered: boolean;
/** @platform web */
readonly focused: boolean;
};
export type WebPressableProps = {
/**
* Either children or a render prop that receives a boolean reflecting whether
* the component is currently pressed.
*/
children?: React.ReactNode | ((state: PressableStateCallbackType) => React.ReactNode);
/**
* Either view styles or a function that receives a boolean reflecting whether
* the component is currently pressed and returns view styles.
*/
style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);
};
export type PressableProps = Omit<NativePressableProps, 'children' | 'style'> & WebPressableProps;
export declare const Pressable: ComponentType<PressableProps>;
export {};
//# sourceMappingURL=Pressable.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../src/views/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EACL,SAAS,IAAI,eAAe,EAC5B,SAAS,EACT,SAAS,EACT,0BAA0B,IAAI,gCAAgC,EAC/D,MAAM,cAAc,CAAC;AAEtB,KAAK,oBAAoB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,GAChE,eAAe,CAAC,OAAO,eAAe,CAAC,CAAC;AAE1C,MAAM,MAAM,0BAA0B,GAAG,gCAAgC,GAAG;IAC1E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,oBAAoB;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,0BAA0B,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAEtF;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,0BAA0B,KAAK,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC9F,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,iBAAiB,CAAC;AAElG,eAAO,MAAM,SAAS,EAAsB,aAAa,CAAC,cAAc,CAAC,CAAC"}

6
node_modules/expo-router/build/views/Pressable.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Pressable = void 0;
const react_native_1 = require("react-native");
exports.Pressable = react_native_1.Pressable;
//# sourceMappingURL=Pressable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../../src/views/Pressable.tsx"],"names":[],"mappings":";;;AACA,+CAKsB;AA4BT,QAAA,SAAS,GAAG,wBAAgD,CAAC","sourcesContent":["import { ClassAttributes, ComponentProps, ComponentType } from 'react';\nimport {\n Pressable as NativePressable,\n StyleProp,\n ViewStyle,\n PressableStateCallbackType as NativePressableStateCallbackType,\n} from 'react-native';\n\ntype NativePressableProps = ComponentProps<typeof NativePressable> &\n ClassAttributes<typeof NativePressable>;\n\nexport type PressableStateCallbackType = NativePressableStateCallbackType & {\n readonly pressed: boolean;\n readonly hovered: boolean;\n /** @platform web */\n readonly focused: boolean;\n};\n\nexport type WebPressableProps = {\n /**\n * Either children or a render prop that receives a boolean reflecting whether\n * the component is currently pressed.\n */\n children?: React.ReactNode | ((state: PressableStateCallbackType) => React.ReactNode);\n\n /**\n * Either view styles or a function that receives a boolean reflecting whether\n * the component is currently pressed and returns view styles.\n */\n style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);\n};\n\nexport type PressableProps = Omit<NativePressableProps, 'children' | 'style'> & WebPressableProps;\n\nexport const Pressable = NativePressable as ComponentType<PressableProps>;\n"]}

8
node_modules/expo-router/build/views/Protected.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { FunctionComponent, ReactElement, ReactNode } from 'react';
export type ProtectedProps = {
guard: boolean;
children?: ReactNode;
};
export declare const Protected: FunctionComponent<ProtectedProps>;
export declare function isProtectedReactElement(child: ReactNode): child is ReactElement<ProtectedProps>;
//# sourceMappingURL=Protected.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Protected.d.ts","sourceRoot":"","sources":["../../src/views/Protected.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAInF,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtE,eAAO,MAAM,SAAS,EAAY,iBAAiB,CAAC,cAAc,CAAC,CAAC;AAEpE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,IAAI,YAAY,CAAC,cAAc,CAAC,CAI/F"}

11
node_modules/expo-router/build/views/Protected.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Protected = void 0;
exports.isProtectedReactElement = isProtectedReactElement;
const react_1 = require("react");
const primitives_1 = require("../primitives");
exports.Protected = primitives_1.Group;
function isProtectedReactElement(child) {
return Boolean((0, react_1.isValidElement)(child) && child.type === primitives_1.Group && child.props && 'guard' in child.props);
}
//# sourceMappingURL=Protected.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Protected.js","sourceRoot":"","sources":["../../src/views/Protected.tsx"],"names":[],"mappings":";;;AAQA,0DAIC;AAZD,iCAAmF;AAEnF,8CAAsC;AAIzB,QAAA,SAAS,GAAG,kBAA0C,CAAC;AAEpE,SAAgB,uBAAuB,CAAC,KAAgB;IACtD,OAAO,OAAO,CACZ,IAAA,sBAAc,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAK,IAAI,KAAK,CAAC,KAAK,IAAI,OAAO,IAAK,KAAK,CAAC,KAAa,CAChG,CAAC;AACJ,CAAC","sourcesContent":["import { FunctionComponent, isValidElement, ReactElement, ReactNode } from 'react';\n\nimport { Group } from '../primitives';\n\nexport type ProtectedProps = { guard: boolean; children?: ReactNode };\n\nexport const Protected = Group as FunctionComponent<ProtectedProps>;\n\nexport function isProtectedReactElement(child: ReactNode): child is ReactElement<ProtectedProps> {\n return Boolean(\n isValidElement(child) && child.type === Group && child.props && 'guard' in (child.props as any)\n );\n}\n"]}

19
node_modules/expo-router/build/views/Screen.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import { ReactElement, ReactNode } from 'react';
export type ScreenProps<TOptions extends Record<string, any> = Record<string, any>> = {
/**
* Name is required when used inside a Layout component.
*
* When used in a route, this can be an absolute path like `/(root)` to the parent route or a relative path like `../../` to the parent route.
* This should not be used inside of a Layout component.
* @example `/(root)` maps to a layout route `/app/(root).tsx`.
*/
name?: string;
initialParams?: Record<string, any>;
options?: TOptions;
};
/** Component for setting the current screen's options dynamically. */
export declare function Screen<TOptions extends object = object>({ name, options }: ScreenProps<TOptions>): null;
export declare function isScreen(child: ReactNode, contextKey?: string): child is ReactElement<ScreenProps & {
name: string;
}>;
//# sourceMappingURL=Screen.d.ts.map

1
node_modules/expo-router/build/views/Screen.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../src/views/Screen.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMhE,MAAM,MAAM,WAAW,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IACpF;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,sEAAsE;AACtE,wBAAgB,MAAM,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,WAAW,CAAC,QAAQ,CAAC,QAsBhG;AAED,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,KAAK,IAAI,YAAY,CAAC,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6BvD"}

48
node_modules/expo-router/build/views/Screen.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
"use strict";
'use client';
Object.defineProperty(exports, "__esModule", { value: true });
exports.Screen = Screen;
exports.isScreen = isScreen;
const native_1 = require("@react-navigation/native");
const react_1 = require("react");
const useNavigation_1 = require("../useNavigation");
const useSafeLayoutEffect_1 = require("./useSafeLayoutEffect");
const stack_1 = require("../utils/stack");
/** Component for setting the current screen's options dynamically. */
function Screen({ name, options }) {
if (name) {
throw new Error(`The name prop on the Screen component may only be used when it is inside a Layout route`);
}
const route = (0, native_1.useRoute)();
const navigation = (0, useNavigation_1.useNavigation)();
const isFocused = navigation.isFocused();
const isPreloaded = (0, stack_1.isRoutePreloadedInStack)(navigation.getState(), route);
(0, useSafeLayoutEffect_1.useSafeLayoutEffect)(() => {
if (options && Object.keys(options).length) {
// React Navigation will infinitely loop in some cases if an empty object is passed to setOptions.
// https://github.com/expo/router/issues/452
if (!isPreloaded || (isPreloaded && isFocused)) {
navigation.setOptions(options);
}
}
}, [isFocused, isPreloaded, navigation, options]);
return null;
}
function isScreen(child, contextKey) {
if ((0, react_1.isValidElement)(child) && child && child.type === Screen) {
if (typeof child.props === 'object' &&
child.props &&
'name' in child.props &&
!child.props.name) {
throw new Error(`<Screen /> component in \`default export\` at \`app${contextKey}/_layout\` must have a \`name\` prop when used as a child of a Layout Route.`);
}
if (process.env.NODE_ENV !== 'production') {
if (['children', 'component', 'getComponent'].some((key) => child.props && typeof child.props === 'object' && key in child.props)) {
throw new Error(`<Screen /> component in \`default export\` at \`app${contextKey}/_layout\` must not have a \`children\`, \`component\`, or \`getComponent\` prop when used as a child of a Layout Route`);
}
}
return true;
}
return false;
}
//# sourceMappingURL=Screen.js.map

1
node_modules/expo-router/build/views/Screen.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Screen.js","sourceRoot":"","sources":["../../src/views/Screen.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAsBb,wBAsBC;AAED,4BAgCC;AA7ED,qDAAoD;AACpD,iCAAgE;AAEhE,oDAAiD;AACjD,+DAA4D;AAC5D,0CAAyD;AAezD,sEAAsE;AACtE,SAAgB,MAAM,CAAmC,EAAE,IAAI,EAAE,OAAO,EAAyB;IAC/F,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,yFAAyF,CAC1F,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,iBAAQ,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,6BAAa,GAAE,CAAC;IACnC,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;IACzC,MAAM,WAAW,GAAG,IAAA,+BAAuB,EAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;IAE1E,IAAA,yCAAmB,EAAC,GAAG,EAAE;QACvB,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;YAC3C,kGAAkG;YAClG,4CAA4C;YAC5C,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,IAAI,SAAS,CAAC,EAAE,CAAC;gBAC/C,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAElD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,QAAQ,CACtB,KAAgB,EAChB,UAAmB;IAEnB,IAAI,IAAA,sBAAc,EAAC,KAAK,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC5D,IACE,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;YAC/B,KAAK,CAAC,KAAK;YACX,MAAM,IAAI,KAAK,CAAC,KAAK;YACrB,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EACjB,CAAC;YACD,MAAM,IAAI,KAAK,CACb,sDAAsD,UAAU,8EAA8E,CAC/I,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC1C,IACE,CAAC,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC,IAAI,CAC5C,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,GAAG,IAAI,KAAK,CAAC,KAAK,CAC9E,EACD,CAAC;gBACD,MAAM,IAAI,KAAK,CACb,sDAAsD,UAAU,yHAAyH,CAC1L,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["'use client';\nimport { useRoute } from '@react-navigation/native';\nimport { isValidElement, ReactElement, ReactNode } from 'react';\n\nimport { useNavigation } from '../useNavigation';\nimport { useSafeLayoutEffect } from './useSafeLayoutEffect';\nimport { isRoutePreloadedInStack } from '../utils/stack';\n\nexport type ScreenProps<TOptions extends Record<string, any> = Record<string, any>> = {\n /**\n * Name is required when used inside a Layout component.\n *\n * When used in a route, this can be an absolute path like `/(root)` to the parent route or a relative path like `../../` to the parent route.\n * This should not be used inside of a Layout component.\n * @example `/(root)` maps to a layout route `/app/(root).tsx`.\n */\n name?: string;\n initialParams?: Record<string, any>;\n options?: TOptions;\n};\n\n/** Component for setting the current screen's options dynamically. */\nexport function Screen<TOptions extends object = object>({ name, options }: ScreenProps<TOptions>) {\n if (name) {\n throw new Error(\n `The name prop on the Screen component may only be used when it is inside a Layout route`\n );\n }\n const route = useRoute();\n const navigation = useNavigation();\n const isFocused = navigation.isFocused();\n const isPreloaded = isRoutePreloadedInStack(navigation.getState(), route);\n\n useSafeLayoutEffect(() => {\n if (options && Object.keys(options).length) {\n // React Navigation will infinitely loop in some cases if an empty object is passed to setOptions.\n // https://github.com/expo/router/issues/452\n if (!isPreloaded || (isPreloaded && isFocused)) {\n navigation.setOptions(options);\n }\n }\n }, [isFocused, isPreloaded, navigation, options]);\n\n return null;\n}\n\nexport function isScreen(\n child: ReactNode,\n contextKey?: string\n): child is ReactElement<ScreenProps & { name: string }> {\n if (isValidElement(child) && child && child.type === Screen) {\n if (\n typeof child.props === 'object' &&\n child.props &&\n 'name' in child.props &&\n !child.props.name\n ) {\n throw new Error(\n `<Screen /> component in \\`default export\\` at \\`app${contextKey}/_layout\\` must have a \\`name\\` prop when used as a child of a Layout Route.`\n );\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (\n ['children', 'component', 'getComponent'].some(\n (key) => child.props && typeof child.props === 'object' && key in child.props\n )\n ) {\n throw new Error(\n `<Screen /> component in \\`default export\\` at \\`app${contextKey}/_layout\\` must not have a \\`children\\`, \\`component\\`, or \\`getComponent\\` prop when used as a child of a Layout Route`\n );\n }\n }\n\n return true;\n }\n\n return false;\n}\n"]}

5
node_modules/expo-router/build/views/Sitemap.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { NativeStackNavigationOptions } from '@react-navigation/native-stack';
import React from 'react';
export declare function getNavOptions(): NativeStackNavigationOptions;
export declare function Sitemap(): React.JSX.Element;
//# sourceMappingURL=Sitemap.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Sitemap.d.ts","sourceRoot":"","sources":["../../src/views/Sitemap.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,wBAAgB,aAAa,IAAI,4BAA4B,CAkC5D;AAED,wBAAgB,OAAO,sBAQtB"}

314
node_modules/expo-router/build/views/Sitemap.js generated vendored Normal file
View File

@@ -0,0 +1,314 @@
"use strict";
// Copyright © 2024 650 Industries.
'use client';
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNavOptions = getNavOptions;
exports.Sitemap = Sitemap;
const expo_constants_1 = __importDefault(require("expo-constants"));
const react_1 = __importDefault(require("react"));
const react_native_1 = require("react-native");
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
const NoSSR_1 = require("./NoSSR");
const Pressable_1 = require("./Pressable");
const useSitemap_1 = require("./useSitemap");
const Link_1 = require("../link/Link");
const statusbar_1 = require("../utils/statusbar");
const INDENT = 20;
function getNavOptions() {
return {
title: 'sitemap',
presentation: 'modal',
headerLargeTitle: false,
headerTitleStyle: {
color: 'white',
},
headerShown: true,
headerTintColor: 'white',
headerLargeTitleStyle: {
color: 'white',
},
headerStyle: {
backgroundColor: 'black',
// @ts-expect-error: mistyped
borderBottomColor: '#323232',
},
header: () => {
const WrapperElement = react_native_1.Platform.OS === 'android' ? react_native_safe_area_context_1.SafeAreaView : react_native_1.View;
return (<WrapperElement style={styles.header}>
<react_native_1.View style={styles.headerContent}>
<react_native_1.View style={styles.headerIcon}>
<SitemapIcon />
</react_native_1.View>
<react_native_1.Text role="heading" aria-level={1} style={styles.title}>
Sitemap
</react_native_1.Text>
</react_native_1.View>
</WrapperElement>);
},
};
}
function Sitemap() {
// Following the https://github.com/expo/expo/blob/ubax/router/move-404-and-sitemap-to-root/packages/expo-router/src/getRoutesSSR.ts#L38
// we need to ensure that the Sitemap component is not rendered on the server.
return (<NoSSR_1.NoSSR>
<SitemapInner />
</NoSSR_1.NoSSR>);
}
function SitemapInner() {
const sitemap = (0, useSitemap_1.useSitemap)();
const children = react_1.default.useMemo(() => sitemap?.children.filter(({ isInternal }) => !isInternal) ?? [], [sitemap]);
const Wrapper = react_native_1.Platform.OS === 'android' ? react_native_safe_area_context_1.SafeAreaView : react_native_1.View;
return (<Wrapper style={styles.container} testID="expo-router-sitemap">
{statusbar_1.canOverrideStatusBarBehavior && <react_native_1.StatusBar barStyle="light-content"/>}
<react_native_1.ScrollView contentContainerStyle={styles.scroll} automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
{children.map((child) => (<react_native_1.View testID="sitemap-item-container" key={child.contextKey} style={styles.itemContainer}>
<SitemapItem node={child}/>
</react_native_1.View>))}
<SystemInfo />
</react_native_1.ScrollView>
</Wrapper>);
}
function SitemapItem({ node, level = 0 }) {
const isLayout = react_1.default.useMemo(() => node.children.length > 0 || node.contextKey.match(/_layout\.[jt]sx?$/), [node]);
const info = node.isInitial ? 'Initial' : node.isGenerated ? 'Generated' : '';
if (isLayout) {
return <LayoutSitemapItem node={node} level={level} info={info}/>;
}
return <StandardSitemapItem node={node} level={level} info={info}/>;
}
function LayoutSitemapItem({ node, level, info }) {
const [isCollapsed, setIsCollapsed] = react_1.default.useState(true);
return (<react_native_1.View style={styles.itemInnerContainer}>
<SitemapItemPressable style={{ opacity: 0.4 }} leftIcon={<PkgIcon />} rightIcon={<ArrowIcon rotation={isCollapsed ? 0 : 180}/>} filename={node.filename} level={level} info={info} onPress={() => setIsCollapsed((prev) => !prev)}/>
{!isCollapsed &&
node.children.map((child) => (<SitemapItem key={child.contextKey} node={child} level={level + (node.isGenerated ? 0 : 1)}/>))}
</react_native_1.View>);
}
function StandardSitemapItem({ node, info, level }) {
return (<Link_1.Link accessibilityLabel={node.contextKey} href={node.href} asChild replace>
<SitemapItemPressable leftIcon={<FileIcon />} rightIcon={<ForwardIcon />} filename={node.filename} level={level} info={info}/>
</Link_1.Link>);
}
function SitemapItemPressable({ style, leftIcon, rightIcon, filename, level, info, ...pressableProps }) {
return (<Pressable_1.Pressable {...pressableProps}>
{({ pressed, hovered }) => (<react_native_1.View testID="sitemap-item" style={[
styles.itemInnerContainer,
styles.itemPressable,
{
paddingLeft: INDENT + level * INDENT,
backgroundColor: hovered ? '#202425' : '#151718',
},
pressed && { backgroundColor: '#26292b' },
style,
]}>
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center' }}>
{leftIcon}
<react_native_1.Text style={styles.filename}>{filename}</react_native_1.Text>
</react_native_1.View>
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center' }}>
{!!info && <react_native_1.Text style={[styles.virtual, { marginRight: 8 }]}>{info}</react_native_1.Text>}
{rightIcon}
</react_native_1.View>
</react_native_1.View>)}
</Pressable_1.Pressable>);
}
function FileIcon() {
return <react_native_1.Image style={styles.image} source={require('expo-router/assets/file.png')}/>;
}
function PkgIcon() {
return <react_native_1.Image style={styles.image} source={require('expo-router/assets/pkg.png')}/>;
}
function ForwardIcon() {
return <react_native_1.Image style={styles.image} source={require('expo-router/assets/forward.png')}/>;
}
function SitemapIcon() {
return <react_native_1.Image style={styles.image} source={require('expo-router/assets/sitemap.png')}/>;
}
function ArrowIcon({ rotation = 0 }) {
return (<react_native_1.Image style={[
styles.image,
{
transform: [{ rotate: `${rotation}deg` }],
},
]} source={require('expo-router/assets/arrow_down.png')}/>);
}
function SystemInfo() {
const getHermesVersion = () => {
if (!global.HermesInternal) {
return null;
}
const HERMES_RUNTIME = global.HermesInternal?.getRuntimeProperties?.() ?? {};
const HERMES_VERSION = HERMES_RUNTIME['OSS Release Version'];
const isStaticHermes = HERMES_RUNTIME['Static Hermes'];
if (!HERMES_RUNTIME) {
return null;
}
if (isStaticHermes) {
return `${HERMES_VERSION} (shermes)`;
}
return HERMES_VERSION;
};
const locationOrigin = window.location.origin;
const expoSdkVersion = expo_constants_1.default.expoConfig?.sdkVersion || 'Unknown';
const hermesVersion = getHermesVersion();
return (<react_native_1.View testID="sitemap-system-info" style={{
gap: 8,
marginTop: 16,
}}>
<react_native_1.Text style={styles.systemInfoTitle}>System Information</react_native_1.Text>
<react_native_1.View style={styles.systemInfoContainer}>
<FormText right={process.env.NODE_ENV}>Mode</FormText>
<FormText right={expoSdkVersion}>Expo SDK</FormText>
{hermesVersion && <FormText right={hermesVersion}>Hermes version</FormText>}
{locationOrigin && <FormText right={locationOrigin}>Location origin</FormText>}
</react_native_1.View>
</react_native_1.View>);
}
function FormText({ children, right }) {
return (<react_native_1.View style={styles.systemInfoItem}>
<react_native_1.Text style={styles.systemInfoLabel} numberOfLines={1} ellipsizeMode="tail">
{children}
</react_native_1.Text>
<react_native_1.View style={{ flex: 1 }}/>
<react_native_1.Text selectable style={[styles.systemInfoValue, styles.code]} numberOfLines={1} ellipsizeMode="tail">
{right}
</react_native_1.Text>
</react_native_1.View>);
}
const styles = react_native_1.StyleSheet.create({
container: {
backgroundColor: 'black',
flex: 1,
alignItems: 'stretch',
},
header: {
backgroundColor: '#151718',
paddingVertical: 16,
borderBottomWidth: 1,
borderColor: '#313538',
boxShadow: '0px 3px 3px rgba(0, 0, 0, 0.33)',
},
headerContent: {
flexDirection: 'row',
alignItems: 'center',
gap: 14,
paddingHorizontal: '5%',
...react_native_1.Platform.select({
web: {
width: '100%',
maxWidth: 960,
marginHorizontal: 'auto',
},
}),
},
title: {
color: 'white',
fontSize: 28,
fontWeight: 'bold',
},
scroll: {
gap: 12,
paddingHorizontal: '5%',
paddingVertical: 16,
...react_native_1.Platform.select({
ios: {
paddingBottom: 24,
},
web: {
width: '100%',
maxWidth: 960,
marginHorizontal: 'auto',
paddingBottom: 24,
},
default: {
paddingBottom: 12,
},
}),
},
itemContainer: {
borderWidth: 1,
borderColor: '#313538',
backgroundColor: '#151718',
borderRadius: 12,
borderCurve: 'continuous',
},
itemInnerContainer: {
backgroundColor: '#151718',
borderRadius: 12,
borderCurve: 'continuous',
gap: 12,
},
itemPressable: {
paddingHorizontal: INDENT,
paddingVertical: 16,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
...react_native_1.Platform.select({
web: {
transitionDuration: '100ms',
},
}),
},
filename: { color: 'white', fontSize: 20, marginLeft: 12 },
virtual: { textAlign: 'right', color: 'white' },
image: { width: 24, height: 24, resizeMode: 'contain', opacity: 0.6 },
headerIcon: {
width: 40,
height: 40,
backgroundColor: '#202425',
borderRadius: 8,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
},
systemInfoContainer: {
borderWidth: 1,
borderColor: '#313538',
backgroundColor: '#151718',
borderRadius: 12,
gap: 8,
borderCurve: 'continuous',
padding: INDENT,
},
systemInfoTitle: {
color: 'white',
fontSize: 18,
fontWeight: '600',
marginBottom: 12,
paddingHorizontal: INDENT,
},
systemInfoItem: {
flexDirection: 'row',
gap: 8,
alignItems: 'center',
flexWrap: 'wrap',
},
systemInfoLabel: {
color: 'white',
fontSize: 16,
lineHeight: 24,
},
systemInfoValue: {
color: 'white',
fontSize: 16,
opacity: 0.7,
flexShrink: 1,
letterSpacing: 0.5,
},
code: {
fontVariant: ['tabular-nums'],
fontFamily: react_native_1.Platform.select({
default: `SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,
ios: 'ui-monospace',
android: 'monospace',
}),
fontWeight: '500',
},
});
//# sourceMappingURL=Sitemap.js.map

1
node_modules/expo-router/build/views/Sitemap.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2
node_modules/expo-router/build/views/Splash.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export * from '../utils/splash';
//# sourceMappingURL=Splash.d.ts.map

1
node_modules/expo-router/build/views/Splash.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Splash.d.ts","sourceRoot":"","sources":["../../src/views/Splash.tsx"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC"}

19
node_modules/expo-router/build/views/Splash.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
'use client';
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("../utils/splash"), exports);
//# sourceMappingURL=Splash.js.map

1
node_modules/expo-router/build/views/Splash.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Splash.js","sourceRoot":"","sources":["../../src/views/Splash.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;AACb,kDAAgC","sourcesContent":["'use client';\nexport * from '../utils/splash';\n"]}

View File

@@ -0,0 +1,6 @@
import React from 'react';
import { RouteNode } from '../Route';
export declare function SuspenseFallback({ route }: {
route: RouteNode;
}): React.JSX.Element | null;
//# sourceMappingURL=SuspenseFallback.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SuspenseFallback.d.ts","sourceRoot":"","sources":["../../src/views/SuspenseFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,4BAU/D"}

View File

@@ -0,0 +1,18 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SuspenseFallback = SuspenseFallback;
const react_1 = __importDefault(require("react"));
const Toast_1 = require("./Toast");
function SuspenseFallback({ route }) {
if (__DEV__) {
return (<Toast_1.ToastWrapper>
<Toast_1.Toast filename={route?.contextKey}>Bundling...</Toast_1.Toast>
</Toast_1.ToastWrapper>);
}
// TODO: Support user's customizing the fallback.
return null;
}
//# sourceMappingURL=SuspenseFallback.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SuspenseFallback.js","sourceRoot":"","sources":["../../src/views/SuspenseFallback.tsx"],"names":[],"mappings":";;;;;AAKA,4CAUC;AAfD,kDAA0B;AAE1B,mCAA8C;AAG9C,SAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAwB;IAC9D,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,CAAC,oBAAY,CACX;QAAA,CAAC,aAAK,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,WAAW,EAAE,aAAK,CACxD;MAAA,EAAE,oBAAY,CAAC,CAChB,CAAC;IACJ,CAAC;IACD,iDAAiD;IACjD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import React from 'react';\n\nimport { Toast, ToastWrapper } from './Toast';\nimport { RouteNode } from '../Route';\n\nexport function SuspenseFallback({ route }: { route: RouteNode }) {\n if (__DEV__) {\n return (\n <ToastWrapper>\n <Toast filename={route?.contextKey}>Bundling...</Toast>\n </ToastWrapper>\n );\n }\n // TODO: Support user's customizing the fallback.\n return null;\n}\n"]}

8
node_modules/expo-router/build/views/Toast.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import React, { type PropsWithChildren } from 'react';
export declare const CODE_FONT: string;
export declare function ToastWrapper({ children }: React.PropsWithChildren): React.JSX.Element;
export declare function Toast({ children, filename, warning, }: PropsWithChildren<{
filename?: string;
warning?: boolean;
}>): React.JSX.Element;
//# sourceMappingURL=Toast.d.ts.map

1
node_modules/expo-router/build/views/Toast.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../src/views/Toast.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAItD,eAAO,MAAM,SAAS,QAIpB,CAAC;AAeH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,iBAAiB,qBASjE;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,QAAQ,EACR,OAAO,GACR,EAAE,iBAAiB,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,qBA6BD"}

93
node_modules/expo-router/build/views/Toast.js generated vendored Normal file
View File

@@ -0,0 +1,93 @@
"use strict";
'use client';
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CODE_FONT = void 0;
exports.ToastWrapper = ToastWrapper;
exports.Toast = Toast;
const bottom_tabs_1 = require("@react-navigation/bottom-tabs");
const react_1 = __importDefault(require("react"));
const react_native_1 = require("react-native");
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
exports.CODE_FONT = react_native_1.Platform.select({
default: 'Courier',
ios: 'Courier New',
android: 'monospace',
});
function useFadeIn() {
// Returns a React Native Animated value for fading in
const [value] = react_1.default.useState(() => new react_native_1.Animated.Value(0));
react_1.default.useEffect(() => {
react_native_1.Animated.timing(value, {
toValue: 1,
duration: 200,
useNativeDriver: true,
}).start();
}, []);
return value;
}
function ToastWrapper({ children }) {
const inTabBar = react_1.default.use(bottom_tabs_1.BottomTabBarHeightContext);
const Wrapper = inTabBar ? react_native_1.View : react_native_safe_area_context_1.SafeAreaView;
return (<Wrapper collapsable={false} style={{ flex: 1 }}>
{children}
</Wrapper>);
}
function Toast({ children, filename, warning, }) {
const filenamePretty = react_1.default.useMemo(() => {
if (!filename)
return undefined;
return 'app' + filename.replace(/^\./, '');
}, [filename]);
const value = useFadeIn();
return (<react_native_1.View style={styles.container}>
<react_native_1.Animated.View style={[
styles.toast,
{
position: react_native_1.Platform.select({
// NOTE(@kitten): This isn't typed to support Web properties
web: 'fixed',
default: 'absolute',
}),
opacity: value,
},
]}>
{!warning && <react_native_1.ActivityIndicator color="white"/>}
{warning && <react_native_1.Image source={require('expo-router/assets/error.png')} style={styles.icon}/>}
<react_native_1.View style={{ marginLeft: 8 }}>
<react_native_1.Text style={styles.text}>{children}</react_native_1.Text>
{filenamePretty && <react_native_1.Text style={styles.filename}>{filenamePretty}</react_native_1.Text>}
</react_native_1.View>
</react_native_1.Animated.View>
</react_native_1.View>);
}
const styles = react_native_1.StyleSheet.create({
container: {
backgroundColor: 'transparent',
flex: 1,
},
icon: { width: 20, height: 20, resizeMode: 'contain' },
toast: {
alignItems: 'center',
borderWidth: 1,
borderColor: 'rgba(255,255,255,0.2)',
flexDirection: 'row',
bottom: 8,
left: 8,
paddingVertical: 8,
paddingHorizontal: 12,
borderRadius: 4,
backgroundColor: 'black',
},
text: { color: 'white', fontSize: 16 },
filename: {
fontFamily: exports.CODE_FONT,
opacity: 0.8,
color: 'white',
fontSize: 12,
},
code: { fontFamily: exports.CODE_FONT },
});
//# sourceMappingURL=Toast.js.map

1
node_modules/expo-router/build/views/Toast.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

23
node_modules/expo-router/build/views/Try.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
import React, { Component, type ComponentType, type PropsWithChildren } from 'react';
/** Props passed to a page's `ErrorBoundary` export. */
export type ErrorBoundaryProps = {
/** A function that will re-render the route component by clearing the `error` state. */
retry: () => Promise<void>;
/** The error that was thrown. */
error: Error;
};
export declare class Try extends Component<PropsWithChildren<{
catch: ComponentType<ErrorBoundaryProps>;
}>, {
error?: Error;
}> {
state: {
error: undefined;
};
static getDerivedStateFromError(error: Error): {
error: Error;
} | null;
retry: () => Promise<void>;
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
}
//# sourceMappingURL=Try.d.ts.map

1
node_modules/expo-router/build/views/Try.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Try.d.ts","sourceRoot":"","sources":["../../src/views/Try.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKrF,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wFAAwF;IACxF,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,iCAAiC;IACjC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAGF,qBAAa,GAAI,SAAQ,SAAS,CAChC,iBAAiB,CAAC;IAChB,KAAK,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC1C,CAAC,EACF;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAClB;IACC,KAAK;;MAAwB;IAE7B,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK;;;IAY5C,KAAK,sBAMH;IAEF,MAAM;CAQP"}

70
node_modules/expo-router/build/views/Try.js generated vendored Normal file
View File

@@ -0,0 +1,70 @@
"use strict";
'use client';
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Try = void 0;
const react_1 = __importStar(require("react"));
const SplashScreen = __importStar(require("./Splash"));
const errors_1 = require("../rsc/router/errors");
// No way to access `getDerivedStateFromError` from a function component afaict.
class Try extends react_1.Component {
state = { error: undefined };
static getDerivedStateFromError(error) {
// Force hide the splash screen if an error occurs.
SplashScreen.hideAsync();
if (__DEV__ && error instanceof errors_1.MetroServerError) {
// Throw up to the LogBox.
return null;
}
return { error };
}
retry = () => {
return new Promise((resolve) => {
this.setState({ error: undefined }, () => {
resolve();
});
});
};
render() {
const { error } = this.state;
const { catch: ErrorBoundary, children } = this.props;
if (!error) {
return children;
}
return <ErrorBoundary error={error} retry={this.retry}/>;
}
}
exports.Try = Try;
//# sourceMappingURL=Try.js.map

1
node_modules/expo-router/build/views/Try.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Try.js","sourceRoot":"","sources":["../../src/views/Try.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,+CAAqF;AAErF,uDAAyC;AACzC,iDAAwD;AAUxD,gFAAgF;AAChF,MAAa,GAAI,SAAQ,iBAKxB;IACC,KAAK,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAE7B,MAAM,CAAC,wBAAwB,CAAC,KAAY;QAC1C,mDAAmD;QACnD,YAAY,CAAC,SAAS,EAAE,CAAC;QAEzB,IAAI,OAAO,IAAI,KAAK,YAAY,yBAAgB,EAAE,CAAC;YACjD,0BAA0B;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,KAAK,GAAG,GAAG,EAAE;QACX,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACnC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE;gBACvC,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAG,CAAC;IAC5D,CAAC;CACF;AApCD,kBAoCC","sourcesContent":["'use client';\n\nimport React, { Component, type ComponentType, type PropsWithChildren } from 'react';\n\nimport * as SplashScreen from './Splash';\nimport { MetroServerError } from '../rsc/router/errors';\n\n/** Props passed to a page's `ErrorBoundary` export. */\nexport type ErrorBoundaryProps = {\n /** A function that will re-render the route component by clearing the `error` state. */\n retry: () => Promise<void>;\n /** The error that was thrown. */\n error: Error;\n};\n\n// No way to access `getDerivedStateFromError` from a function component afaict.\nexport class Try extends Component<\n PropsWithChildren<{\n catch: ComponentType<ErrorBoundaryProps>;\n }>,\n { error?: Error }\n> {\n state = { error: undefined };\n\n static getDerivedStateFromError(error: Error) {\n // Force hide the splash screen if an error occurs.\n SplashScreen.hideAsync();\n\n if (__DEV__ && error instanceof MetroServerError) {\n // Throw up to the LogBox.\n return null;\n }\n\n return { error };\n }\n\n retry = () => {\n return new Promise<void>((resolve) => {\n this.setState({ error: undefined }, () => {\n resolve();\n });\n });\n };\n\n render() {\n const { error } = this.state;\n const { catch: ErrorBoundary, children } = this.props;\n if (!error) {\n return children;\n }\n return <ErrorBoundary error={error} retry={this.retry} />;\n }\n}\n"]}

8
node_modules/expo-router/build/views/Unmatched.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import React from 'react';
/**
* Default screen for unmatched routes.
*
* @hidden
*/
export declare function Unmatched(): React.JSX.Element;
//# sourceMappingURL=Unmatched.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Unmatched.d.ts","sourceRoot":"","sources":["../../src/views/Unmatched.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;;;GAIG;AACH,wBAAgB,SAAS,sBAQxB"}

202
node_modules/expo-router/build/views/Unmatched.js generated vendored Normal file
View File

@@ -0,0 +1,202 @@
"use strict";
// Copyright © 2024 650 Industries.
'use client';
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Unmatched = Unmatched;
const native_1 = require("@react-navigation/native");
const expo_linking_1 = require("expo-linking");
const react_1 = __importDefault(require("react"));
const react_native_1 = require("react-native");
const hooks_1 = require("../hooks");
const NoSSR_1 = require("./NoSSR");
const Link_1 = require("../link/Link");
const useNavigation_1 = require("../useNavigation");
const useSafeLayoutEffect_1 = require("./useSafeLayoutEffect");
const stack_1 = require("../utils/stack");
const Pressable_1 = require("../views/Pressable");
/**
* Default screen for unmatched routes.
*
* @hidden
*/
function Unmatched() {
// Following the https://github.com/expo/expo/blob/ubax/router/move-404-and-sitemap-to-root/packages/expo-router/src/getRoutesSSR.ts#L51
// we need to ensure that the Unmatched component is not rendered on the server.
return (<NoSSR_1.NoSSR>
<UnmatchedInner />
</NoSSR_1.NoSSR>);
}
function UnmatchedInner() {
const [render, setRender] = react_1.default.useState(false);
const router = (0, hooks_1.useRouter)();
const route = (0, native_1.useRoute)();
const navigation = (0, useNavigation_1.useNavigation)();
const pathname = (0, hooks_1.usePathname)();
const url = (0, expo_linking_1.createURL)(pathname);
react_1.default.useEffect(() => {
setRender(true);
}, []);
const isFocused = navigation.isFocused();
const isPreloaded = (0, stack_1.isRoutePreloadedInStack)(navigation.getState(), route);
/** This route may be prefetched if a <Link prefetch href="/<unmatched>" /> is used */
(0, useSafeLayoutEffect_1.useSafeLayoutEffect)(() => {
if (!isPreloaded || (isPreloaded && isFocused)) {
navigation.setOptions({
title: 'Not Found',
});
}
}, [isFocused, isPreloaded, navigation]);
return (<react_native_1.View testID="expo-router-unmatched" style={styles.container}>
<NotFoundAsset />
<react_native_1.Text role="heading" aria-level={1} style={styles.title}>
Unmatched Route
</react_native_1.Text>
<react_native_1.Text role="heading" aria-level={2} style={[styles.subtitle, styles.secondaryText]}>
Page could not be found.
</react_native_1.Text>
{render ? (<Link_1.Link href={pathname} replace {...react_native_1.Platform.select({ native: { asChild: true } })}>
<Pressable_1.Pressable>
{({ hovered, pressed }) => (<react_native_1.Text style={[
styles.pageLink,
styles.secondaryText,
react_native_1.Platform.select({
web: {
transitionDuration: '200ms',
opacity: 1,
},
}),
hovered && {
opacity: 0.8,
textDecorationLine: 'underline',
},
pressed && {
opacity: 0.8,
},
]}>
{url}
</react_native_1.Text>)}
</Pressable_1.Pressable>
</Link_1.Link>) : (<react_native_1.View style={[styles.pageLink, styles.placeholder]}/>)}
<react_native_1.View style={styles.linkContainer}>
<Pressable_1.Pressable>
{({ hovered, pressed }) => (<react_native_1.Text onPress={() => {
if (router.canGoBack()) {
router.back();
}
else {
router.replace('/');
}
}} style={[
styles.link,
react_native_1.Platform.select({
web: {
transitionDuration: '200ms',
opacity: 1,
},
}),
hovered && {
opacity: 0.8,
textDecorationLine: 'underline',
},
pressed && {
opacity: 0.8,
},
]}>
Go back
</react_native_1.Text>)}
</Pressable_1.Pressable>
<react_native_1.Text style={[styles.linkSeparator, styles.secondaryText]}></react_native_1.Text>
<Link_1.Link href="/_sitemap" replace {...react_native_1.Platform.select({ native: { asChild: true } })}>
<Pressable_1.Pressable>
{({ hovered, pressed }) => (<react_native_1.Text style={[
styles.link,
react_native_1.Platform.select({
web: {
transitionDuration: '200ms',
opacity: 1,
},
}),
hovered && {
opacity: 0.8,
textDecorationLine: 'underline',
},
pressed && {
opacity: 0.8,
},
]}>
Sitemap
</react_native_1.Text>)}
</Pressable_1.Pressable>
</Link_1.Link>
</react_native_1.View>
</react_native_1.View>);
}
function NotFoundAsset() {
return <react_native_1.Image source={require('expo-router/assets/unmatched.png')} style={styles.image}/>;
}
const styles = react_native_1.StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'black',
padding: 24,
paddingBottom: 64,
alignItems: 'center',
justifyContent: 'center',
},
image: {
width: 270,
height: 168,
resizeMode: 'contain',
marginBottom: 28,
},
title: {
...react_native_1.Platform.select({
web: {
fontSize: 64,
lineHeight: 64,
},
default: {
fontSize: 56,
lineHeight: 56,
},
}),
color: '#fff',
fontWeight: '800',
textAlign: 'center',
},
subtitle: {
fontSize: 34,
marginTop: 4,
marginBottom: 12,
fontWeight: '200',
textAlign: 'center',
},
pageLink: {
minHeight: 20,
},
secondaryText: {
color: '#9ba1a6',
},
placeholder: {
backgroundColor: '#9ba1a644',
minWidth: 180,
borderRadius: 5,
},
linkContainer: {
marginTop: 28,
flexDirection: 'row',
gap: 12,
},
link: {
fontSize: 20,
textAlign: 'center',
color: '#52a9ff',
},
linkSeparator: {
fontSize: 20,
},
});
//# sourceMappingURL=Unmatched.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
import { useLayoutEffect } from 'react';
export declare const useSafeLayoutEffect: typeof useLayoutEffect;
//# sourceMappingURL=useSafeLayoutEffect.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useSafeLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/views/useSafeLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,eAAO,MAAM,mBAAmB,wBAAmE,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSafeLayoutEffect = void 0;
const react_1 = require("react");
exports.useSafeLayoutEffect = typeof window !== 'undefined' ? react_1.useLayoutEffect : function () { };
//# sourceMappingURL=useSafeLayoutEffect.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useSafeLayoutEffect.js","sourceRoot":"","sources":["../../src/views/useSafeLayoutEffect.ts"],"names":[],"mappings":";;;AAAA,iCAAwC;AAE3B,QAAA,mBAAmB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,uBAAe,CAAC,CAAC,CAAC,cAAa,CAAC,CAAC","sourcesContent":["import { useLayoutEffect } from 'react';\n\nexport const useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : function () {};\n"]}

12
node_modules/expo-router/build/views/useSitemap.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import { Href } from '../types';
export type SitemapType = {
contextKey: string;
filename: string;
href: string | Href;
isInitial: boolean;
isInternal: boolean;
isGenerated: boolean;
children: SitemapType[];
};
export declare function useSitemap(): SitemapType | null;
//# sourceMappingURL=useSitemap.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useSitemap.d.ts","sourceRoot":"","sources":["../../src/views/useSitemap.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAmChC,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAcF,wBAAgB,UAAU,IAAI,WAAW,GAAG,IAAI,CAM/C"}

50
node_modules/expo-router/build/views/useSitemap.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSitemap = useSitemap;
const react_1 = require("react");
const Route_1 = require("../Route");
const router_store_1 = require("../global-state/router-store");
const matchers_1 = require("../matchers");
const routeSegments = (route, parents) => [
...parents,
...route.route.split('/'),
];
const routeHref = (route, parents) => '/' +
routeSegments(route, parents)
.map((segment) => {
// add an extra layer of entropy to the url for deep dynamic routes
if ((0, matchers_1.matchDynamicName)(segment)?.deep) {
return segment + '/' + Date.now();
}
// index must be erased but groups can be preserved.
return segment === 'index' ? '' : segment;
})
.filter(Boolean)
.join('/');
const routeFilename = (route) => {
const segments = route.contextKey.split('/');
// join last two segments for layout routes
if (route.contextKey.match(/_layout\.[jt]sx?$/)) {
return segments[segments.length - 2] + '/' + segments[segments.length - 1];
}
const routeSegmentsCount = route.route.split('/').length;
// Join the segment count in reverse order
// This presents files without layout routes as children with all relevant segments.
return segments.slice(-routeSegmentsCount).join('/');
};
const mapForRoute = (route, parents) => ({
contextKey: route.contextKey,
filename: routeFilename(route),
href: routeHref(route, parents),
isInitial: route.initialRouteName === route.route,
isInternal: route.internal ?? false,
isGenerated: route.generated ?? false,
children: [...route.children]
.sort(Route_1.sortRoutes)
.map((child) => mapForRoute(child, routeSegments(route, parents))),
});
function useSitemap() {
const sitemap = (0, react_1.useMemo)(() => (router_store_1.store.routeNode ? mapForRoute(router_store_1.store.routeNode, []) : null), [router_store_1.store.routeNode]);
return sitemap;
}
//# sourceMappingURL=useSitemap.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useSitemap.js","sourceRoot":"","sources":["../../src/views/useSitemap.tsx"],"names":[],"mappings":";;AA8DA,gCAMC;AApED,iCAAgC;AAEhC,oCAAiD;AACjD,+DAAqD;AACrD,0CAA+C;AAG/C,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAE,OAAiB,EAAE,EAAE,CAAC;IAC7D,GAAG,OAAO;IACV,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;CAC1B,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAgB,EAAE,OAAiB,EAAE,EAAE,CACxD,GAAG;IACH,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC;SAC1B,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACf,mEAAmE;QACnE,IAAI,IAAA,2BAAgB,EAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;YACpC,OAAO,OAAO,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACpC,CAAC;QACD,oDAAoD;QACpD,OAAO,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5C,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;AAEf,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAE,EAAE;IACzC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7C,2CAA2C;IAC3C,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAChD,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,kBAAkB,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IAEzD,0CAA0C;IAC1C,oFAAoF;IACpF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC,CAAC;AAYF,MAAM,WAAW,GAAyD,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAC7F,UAAU,EAAE,KAAK,CAAC,UAAU;IAC5B,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC;IAC9B,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,KAAK,CAAC,gBAAgB,KAAK,KAAK,CAAC,KAAK;IACjD,UAAU,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;IACnC,WAAW,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK;IACrC,QAAQ,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;SAC1B,IAAI,CAAC,kBAAU,CAAC;SAChB,GAAG,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;CAChF,CAAC,CAAC;AAEH,SAAgB,UAAU;IACxB,MAAM,OAAO,GAAG,IAAA,eAAO,EACrB,GAAG,EAAE,CAAC,CAAC,oBAAK,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,oBAAK,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EACjE,CAAC,oBAAK,CAAC,SAAS,CAAC,CAClB,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { RouteNode, sortRoutes } from '../Route';\nimport { store } from '../global-state/router-store';\nimport { matchDynamicName } from '../matchers';\nimport { Href } from '../types';\n\nconst routeSegments = (route: RouteNode, parents: string[]) => [\n ...parents,\n ...route.route.split('/'),\n];\n\nconst routeHref = (route: RouteNode, parents: string[]) =>\n '/' +\n routeSegments(route, parents)\n .map((segment) => {\n // add an extra layer of entropy to the url for deep dynamic routes\n if (matchDynamicName(segment)?.deep) {\n return segment + '/' + Date.now();\n }\n // index must be erased but groups can be preserved.\n return segment === 'index' ? '' : segment;\n })\n .filter(Boolean)\n .join('/');\n\nconst routeFilename = (route: RouteNode) => {\n const segments = route.contextKey.split('/');\n // join last two segments for layout routes\n if (route.contextKey.match(/_layout\\.[jt]sx?$/)) {\n return segments[segments.length - 2] + '/' + segments[segments.length - 1];\n }\n\n const routeSegmentsCount = route.route.split('/').length;\n\n // Join the segment count in reverse order\n // This presents files without layout routes as children with all relevant segments.\n return segments.slice(-routeSegmentsCount).join('/');\n};\n\nexport type SitemapType = {\n contextKey: string;\n filename: string;\n href: string | Href;\n isInitial: boolean;\n isInternal: boolean;\n isGenerated: boolean;\n children: SitemapType[];\n};\n\nconst mapForRoute: (route: RouteNode, parents: string[]) => SitemapType = (route, parents) => ({\n contextKey: route.contextKey,\n filename: routeFilename(route),\n href: routeHref(route, parents),\n isInitial: route.initialRouteName === route.route,\n isInternal: route.internal ?? false,\n isGenerated: route.generated ?? false,\n children: [...route.children]\n .sort(sortRoutes)\n .map((child: RouteNode) => mapForRoute(child, routeSegments(route, parents))),\n});\n\nexport function useSitemap(): SitemapType | null {\n const sitemap = useMemo(\n () => (store.routeNode ? mapForRoute(store.routeNode, []) : null),\n [store.routeNode]\n );\n return sitemap;\n}\n"]}