expo-router 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/onboard/Tutorial.js +2 -2
- package/build/onboard/Tutorial.js.map +1 -1
- package/build/views/ErrorBoundary.js +1 -1
- package/build/views/ErrorBoundary.js.map +1 -1
- package/build/views/Link.d.ts +1 -1
- package/build/views/Link.js +1 -0
- package/build/views/Link.js.map +1 -1
- package/build/views/Unmatched.js +2 -2
- package/build/views/Unmatched.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { View, Text, Pressable, StyleSheet } from "@bacons/react-views";
|
|
|
4
4
|
import { createEntryFileAsync } from "./createEntryFile";
|
|
5
5
|
// TODO: Use openLinkFromBrowser thing
|
|
6
6
|
function Header() {
|
|
7
|
-
return (React.createElement(Pressable, null, ({ hovered }) => (React.createElement(Text, { accessibilityRole: "
|
|
7
|
+
return (React.createElement(Pressable, null, ({ hovered }) => (React.createElement(Text, { accessibilityRole: "header", accessibilityLevel: 1, style: [styles.title, Platform.OS !== "web" && { textAlign: "left" }] },
|
|
8
8
|
"Welcome to",
|
|
9
9
|
" ",
|
|
10
10
|
React.createElement(Text, { href: "https://github.com/expo/expo-router/", style: [
|
|
@@ -47,7 +47,7 @@ export function Tutorial() {
|
|
|
47
47
|
} },
|
|
48
48
|
React.createElement(View, { accessibilityRole: "main", style: styles.container },
|
|
49
49
|
React.createElement(Header, null),
|
|
50
|
-
React.createElement(Text, { accessibilityRole: "
|
|
50
|
+
React.createElement(Text, { accessibilityRole: "header", accessibilityLevel: 2, style: styles.subtitle },
|
|
51
51
|
"Get started by creating a file",
|
|
52
52
|
"\n",
|
|
53
53
|
"in the",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EA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E;QACP,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,OAAO;QACnB,cAAc,EAAE,QAAQ;KAC3B;IACD,KAAK,EAAE;QACH,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,EAAE;QACjB,UAAU,EAAE,MAAM;KACrB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,OAAO;KACjB;IACD,IAAI,EAAE;QACF,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC;YACxB,OAAO,EAAE,SAAS;YAClB,GAAG,EAAE,aAAa;YAClB,OAAO,EAAE,WAAW;SACvB,CAAC;KACL;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,EAAE;QACjB,QAAQ,EAAE,GAAG;KAChB;CACJ,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { SafeAreaView, StatusBar, Platform } from \"react-native\";\nimport { View, Text, Pressable, StyleSheet } from \"@bacons/react-views\";\nimport { createEntryFileAsync } from \"./createEntryFile\";\n\n// TODO: Use openLinkFromBrowser thing\nfunction Header() {\n return (\n <Pressable>\n {({ hovered }) => (\n <Text\n accessibilityRole=\"header\"\n accessibilityLevel={1}\n style={[styles.title, Platform.OS !== \"web\" && { textAlign: \"left\" }]}\n >\n Welcome to{\" \"}\n <Text\n href=\"https://github.com/expo/expo-router/\"\n style={[\n hovered && {\n textDecorationColor: \"white\",\n textDecorationLine: \"underline\",\n },\n ]}\n >\n Expo\n </Text>\n </Text>\n )}\n </Pressable>\n );\n}\n\nconst canAutoTouchFile = process.env.EXPO_ROUTER_APP_ROOT != null;\n\nexport function Tutorial() {\n React.useEffect(() => {\n if (Platform.OS === \"web\") {\n // Reset the route on web so the initial route isn't a 404 after\n // the user has created the entry file.\n // This is useful for cases where you are testing the tutorial.\n // To test: touch the new file, then navigate to a missing route `/foobar`, then delete the app folder.\n // you should see the tutorial again and be able to create the entry file once more.\n if (typeof location !== \"undefined\" && location.pathname !== \"/\") {\n location.replace(\"/\");\n }\n if (typeof window !== \"undefined\" && typeof window.document !== \"undefined\") {\n window.document.title = \"npx expo start\";\n }\n }\n }, []);\n\n return (\n <View\n style={{\n backgroundColor: \"black\",\n flex: 1,\n backgroundImage:\n \"radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0)\",\n backgroundPosition: \"-3px -3px\",\n backgroundSize: \"40px 40px\",\n }}\n >\n <StatusBar barStyle=\"light-content\" />\n\n <SafeAreaView\n style={{\n flex: 1,\n maxWidth: 960,\n marginHorizontal: \"auto\",\n alignItems: \"stretch\",\n }}\n >\n <View accessibilityRole=\"main\" style={styles.container}>\n <Header />\n <Text\n accessibilityRole=\"header\"\n accessibilityLevel={2}\n style={styles.subtitle}\n >\n Get started by creating a file{\"\\n\"}in the{\" \"}\n <Text style={{ fontWeight: \"bold\" }}>app</Text> directory{\"\\n\"}that\n exports a React component.\n </Text>\n {canAutoTouchFile && <Button />}\n </View>\n </SafeAreaView>\n </View>\n );\n}\n\nfunction Button() {\n return (\n <Pressable\n onPress={() => {\n createEntryFileAsync();\n }}\n style={{\n ...Platform.select({\n native: {\n position: \"absolute\",\n bottom: 8,\n left: 24,\n right: 24,\n },\n }),\n }}\n >\n {({ pressed, hovered }) => (\n <View\n style={[\n {\n transitionDuration: \"200ms\",\n backgroundColor: \"transparent\",\n borderColor: \"white\",\n borderWidth: 2,\n paddingVertical: 12,\n paddingHorizontal: 24,\n },\n hovered && {\n backgroundColor: \"white\",\n },\n pressed && {\n backgroundColor: \"rgba(255,255,255,0.7)\",\n },\n ]}\n >\n <Text\n selectable={false}\n style={[\n {\n fontSize: 18,\n transitionDuration: \"200ms\",\n fontWeight: \"bold\",\n color: \"white\",\n },\n styles.code,\n hovered && { color: \"black\" },\n ]}\n >\n <Text style={{ color: \"#BCC3CD\" }}>$</Text> touch app/index.js\n </Text>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 24,\n alignItems: \"start\",\n justifyContent: \"center\",\n },\n title: {\n color: \"white\",\n fontSize: 64,\n paddingBottom: 24,\n fontWeight: \"bold\",\n },\n buttonText: {\n color: \"black\",\n },\n code: {\n fontFamily: Platform.select({\n default: \"Courier\",\n ios: \"Courier New\",\n android: \"monospace\",\n }),\n },\n subtitle: {\n color: \"#BCC3CD\",\n fontSize: 36,\n fontWeight: \"light\",\n paddingBottom: 36,\n maxWidth: 960,\n },\n});\n"]}
|
|
@@ -7,7 +7,7 @@ export function ErrorBoundary({ error, retry }) {
|
|
|
7
7
|
return (React.createElement(View, { accessibilityRole: 'main', style: [styles.container] },
|
|
8
8
|
React.createElement(SafeAreaView, { style: { flex: 1, maxWidth: 720, marginHorizontal: 'auto' } },
|
|
9
9
|
React.createElement(View, { style: { marginBottom: 12, flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-between', alignItems: 'center' } },
|
|
10
|
-
React.createElement(Text, { accessibilityRole: "
|
|
10
|
+
React.createElement(Text, { accessibilityRole: "header", accessibilityLevel: 1, style: styles.title }, "Something went wrong"),
|
|
11
11
|
React.createElement(View, { style: { flexDirection: 'row', alignItems: 'center' } },
|
|
12
12
|
React.createElement(Pressable, null, ({ hovered }) => (React.createElement(TouchableOpacity, { onPress: retry },
|
|
13
13
|
React.createElement(View, { style: [{ transitionDuration: '100ms', paddingVertical: 12, paddingHorizontal: 24, borderColor: 'white', borderWidth: 2, marginLeft: 8 }, hovered && { backgroundColor: 'white' }] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/views/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA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QAAQ,EAAE;CAC7I,CAAC,CAAC","sourcesContent":["import { Pressable, StyleSheet, Text, View } from '@bacons/react-views';\nimport React from 'react';\nimport { Platform, ScrollView, TouchableOpacity } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { ErrorBoundaryProps } from './Try';\nimport { Link } from './Link';\n\nexport function ErrorBoundary({ error, retry }: ErrorBoundaryProps) {\n return (\n <View accessibilityRole='main' style={[styles.container]}>\n <SafeAreaView style={{ flex: 1, maxWidth: 720, marginHorizontal: 'auto' }}>\n <View style={{ marginBottom: 12, flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-between', alignItems: 'center' }}>\n <Text\n accessibilityRole=\"header\" accessibilityLevel={1}\n style={styles.title}\n >\n Something went wrong\n </Text>\n <View style={{ flexDirection: 'row', alignItems: 'center' }}>\n <Pressable>\n {({ hovered }) => (\n <TouchableOpacity onPress={retry}>\n <View style={[{ transitionDuration: '100ms', paddingVertical: 12, paddingHorizontal: 24, borderColor: 'white', borderWidth: 2, marginLeft: 8 }, hovered && { backgroundColor: 'white' }]}>\n <Text style={[styles.buttonText, { transitionDuration: '100ms', color: hovered ? 'black' : 'white' }]}>\n Retry\n </Text>\n </View>\n </TouchableOpacity>\n )}\n </Pressable>\n </View>\n </View>\n\n <StackTrace error={error} />\n {process.env.NODE_ENV === 'development' && <Link href={'/__index'} style={styles.link}>\n Sitemap\n </Link>}\n </SafeAreaView>\n </View>\n );\n}\n\nfunction StackTrace({ error }: { error: Error }) {\n return (\n <ScrollView style={{ marginVertical: 8, borderColor: 'rgba(255,255,255,0.5)', borderWidth: 1, padding: 12, }}>\n <Text style={[styles.code, { color: 'white' }]}>\n {error.stack}\n </Text>\n </ScrollView>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"black\",\n padding: 24,\n alignItems: \"stretch\",\n justifyContent: \"center\",\n },\n title: {\n color: \"white\",\n fontSize: 36,\n\n // textAlign: \"center\",\n fontWeight: \"bold\",\n },\n buttonText: {\n fontSize: 18,\n fontWeight: 'bold',\n color: 'black',\n },\n code: {\n fontFamily: Platform.select({ default: 'Courier', ios: 'Courier New', android: 'monospace' }),\n fontWeight: '500',\n },\n subtitle: {\n color: \"white\",\n fontSize: 14,\n marginBottom: 12,\n // textAlign: \"center\",\n },\n link: { color: \"rgba(255,255,255,0.4)\", textDecorationStyle: 'solid', textDecorationLine: 'underline', fontSize: 14, textAlign: \"center\" },\n});\n"]}
|
package/build/views/Link.d.ts
CHANGED
|
@@ -21,6 +21,6 @@ declare type Props<ParamList extends ReactNavigation.RootParamList> = {
|
|
|
21
21
|
* @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
|
|
22
22
|
* @param props.children Child elements to render the content.
|
|
23
23
|
*/
|
|
24
|
-
export declare const Link: React.ForwardRefExoticComponent<Pick<Props<ReactNavigation.RootParamList>, "children" | "key" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onLayout" | "onTextLayout" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "adjustsFontSizeToFit" | "minimumFontScale" | "suppressHighlighting" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "asChild" | "to" |
|
|
24
|
+
export declare const Link: React.ForwardRefExoticComponent<Pick<Props<ReactNavigation.RootParamList>, "children" | "key" | "action" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onLayout" | "onTextLayout" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "adjustsFontSizeToFit" | "minimumFontScale" | "suppressHighlighting" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "asChild" | "to" | keyof import("@bacons/react-views/build/Text").WebTextProps> & React.RefAttributes<Text>>;
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=Link.d.ts.map
|
package/build/views/Link.js
CHANGED
|
@@ -26,6 +26,7 @@ function BaseLink({ to, href, action, asChild, ...rest }, ref) {
|
|
|
26
26
|
return resolved;
|
|
27
27
|
}, [href, to]);
|
|
28
28
|
const props = useLinkProps({ to: resolvedTo, action });
|
|
29
|
+
console.log('link props', resolvedTo, action, props);
|
|
29
30
|
const onPress = (e) => {
|
|
30
31
|
if ('onPress' in rest) {
|
|
31
32
|
rest.onPress?.(e);
|
package/build/views/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../src/views/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAyB,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAa,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,YAAY,GAAG,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAc3C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAE/C,SAAS,QAAQ,CAAkD,EAC/D,EAAE,EACF,IAAI,EACJ,MAAM,EACN,OAAO,EACP,GAAG,IAAI,EACQ,EAAE,GAA6B;IAC9C,6CAA6C;IAC7C,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAClC,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,MAAM,IAAI,KAAK,CACX,4DAA4D,CAC/D,CAAC;SACL;QACD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAC3D,yCAAyC;YACzC,OAAO,GAAG,CAAA;SACb;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACf,MAAM,KAAK,GAAG,YAAY,CAAY,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;IAElE,MAAM,OAAO,GAAG,CACZ,CAA0E,EAC5E,EAAE;QACA,IAAI,SAAS,IAAI,IAAI,EAAE;YACnB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SACrB;QAED,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC,aAAa;IACtB,0CAA0C;IAC1C,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EACrB;QACI,GAAG;QACH,GAAG,KAAK;QACR,GAAG,IAAI;QACP,GAAG,QAAQ,CAAC,MAAM,CAAC;YACf,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAS;YAChC,OAAO,EAAE,EAAE,OAAO,EAAE;SACvB,CAAC;KACL,CAAC,CAAC;AACX,CAAC","sourcesContent":["// Fork of @react-navigation/native Link.tsx\nimport type { NavigationAction } from '@react-navigation/core';\nimport * as React from 'react';\nimport { GestureResponderEvent, Platform } from 'react-native';\nimport { Text, TextProps } from '@bacons/react-views'\nimport { useLinkProps, } from '@react-navigation/native';\nimport { Slot } from '@radix-ui/react-slot'\nimport type { To } from '@react-navigation/native/src/useLinkTo';\n\ntype Props<ParamList extends ReactNavigation.RootParamList> = {\n asChild?: boolean;\n href?: string;\n to?: To<ParamList>;\n action?: NavigationAction;\n target?: string;\n onPress?: (\n e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent\n ) => void;\n} & (TextProps & { children: React.ReactNode });\n\n/**\n * Component to render link to another screen using a path.\n * Uses an anchor tag on the web.\n *\n * @param props.href Absolute path to screen (e.g. `/feeds/hot`).\n * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.\n * @param props.children Child elements to render the content.\n */\nexport const Link = React.forwardRef(BaseLink);\n\nfunction BaseLink<ParamList extends ReactNavigation.RootParamList>({\n to,\n href,\n action,\n asChild,\n ...rest\n}: Props<ParamList>, ref: React.ForwardedRef<Text>) {\n // TODO: Auto use router's client-side event.\n const resolvedTo = React.useMemo(() => {\n const resolved = href ? href : to;\n if (resolved == null) {\n throw new Error(\n `You must specify either 'href' or 'to' prop in a <Link />.`\n );\n }\n if (typeof resolved === 'string' && !resolved.startsWith('/')) {\n // TODO: Auto delegate out external links\n return '/'\n }\n return resolved;\n }, [href, to]);\n const props = useLinkProps<ParamList>({ to: resolvedTo, action });\n\n const onPress = (\n e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent\n ) => {\n if ('onPress' in rest) {\n rest.onPress?.(e);\n }\n\n props.onPress(e);\n };\n\n return React.createElement(\n // @ts-expect-error: slot is not type-safe\n asChild ? Slot : Text,\n {\n ref,\n ...props,\n ...rest,\n ...Platform.select({\n web: { onClick: onPress } as any,\n default: { onPress },\n }),\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../src/views/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,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KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC,aAAa;IACtB,0CAA0C;IAC1C,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EACrB;QACI,GAAG;QACH,GAAG,KAAK;QACR,GAAG,IAAI;QACP,GAAG,QAAQ,CAAC,MAAM,CAAC;YACf,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAS;YAChC,OAAO,EAAE,EAAE,OAAO,EAAE;SACvB,CAAC;KACL,CAAC,CAAC;AACX,CAAC","sourcesContent":["// Fork of @react-navigation/native Link.tsx\nimport type { NavigationAction } from '@react-navigation/core';\nimport * as React from 'react';\nimport { GestureResponderEvent, Platform } from 'react-native';\nimport { Text, TextProps } from '@bacons/react-views'\nimport { useLinkProps, } from '@react-navigation/native';\nimport { Slot } from '@radix-ui/react-slot'\nimport type { To } from '@react-navigation/native/src/useLinkTo';\n\ntype Props<ParamList extends ReactNavigation.RootParamList> = {\n asChild?: boolean;\n href?: string;\n to?: To<ParamList>;\n action?: NavigationAction;\n target?: string;\n onPress?: (\n e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent\n ) => void;\n} & (TextProps & { children: React.ReactNode });\n\n/**\n * Component to render link to another screen using a path.\n * Uses an anchor tag on the web.\n *\n * @param props.href Absolute path to screen (e.g. `/feeds/hot`).\n * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.\n * @param props.children Child elements to render the content.\n */\nexport const Link = React.forwardRef(BaseLink);\n\nfunction BaseLink<ParamList extends ReactNavigation.RootParamList>({\n to,\n href,\n action,\n asChild,\n ...rest\n}: Props<ParamList>, ref: React.ForwardedRef<Text>) {\n // TODO: Auto use router's client-side event.\n const resolvedTo = React.useMemo(() => {\n const resolved = href ? href : to;\n if (resolved == null) {\n throw new Error(\n `You must specify either 'href' or 'to' prop in a <Link />.`\n );\n }\n if (typeof resolved === 'string' && !resolved.startsWith('/')) {\n // TODO: Auto delegate out external links\n return '/'\n }\n return resolved;\n }, [href, to]);\n const props = useLinkProps<ParamList>({ to: resolvedTo, action });\n\n console.log('link props', resolvedTo, action, props);\n const onPress = (\n e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent\n ) => {\n if ('onPress' in rest) {\n rest.onPress?.(e);\n }\n\n props.onPress(e);\n };\n\n return React.createElement(\n // @ts-expect-error: slot is not type-safe\n asChild ? Slot : Text,\n {\n ref,\n ...props,\n ...rest,\n ...Platform.select({\n web: { onClick: onPress } as any,\n default: { onPress },\n }),\n });\n}\n"]}
|
package/build/views/Unmatched.js
CHANGED
|
@@ -9,8 +9,8 @@ export const Unmatched = forwardRef((props, ref) => {
|
|
|
9
9
|
return (
|
|
10
10
|
// @ts-ignore
|
|
11
11
|
React.createElement(View, { ref: ref, accessibilityRole: "main", style: styles.container },
|
|
12
|
-
React.createElement(Text, { accessibilityRole: "
|
|
13
|
-
React.createElement(Text, { accessibilityRole: "
|
|
12
|
+
React.createElement(Text, { accessibilityRole: "header", accessibilityLevel: 1, style: styles.title }, "Unmatched Route"),
|
|
13
|
+
React.createElement(Text, { accessibilityRole: "header", accessibilityLevel: 2, style: styles.subtitle },
|
|
14
14
|
"Page could not be found.",
|
|
15
15
|
" ",
|
|
16
16
|
React.createElement(Link, { href: "/", style: styles.link }, "Go back.")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unmatched.js","sourceRoot":"","sources":["../../src/views/Unmatched.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CA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,IAAC,IAAI,EAAC,GAAG,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,eAE1B,CACJ;QAEP,oBAAC,IAAI,IAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IAC9B,GAAG,CACD;QAEN,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,CACvC,oBAAC,IAAI,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,cAEnC,CACV,CACE,CACV,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC7B,SAAS,EAAE;QACP,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,OAAO;QACxB,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KAC3B;IACD,KAAK,EAAE;QACH,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,EAAE;QACjB,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,SAAS;QAC5B,iBAAiB,EAAE,CAAC;QACpB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;KACrB;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,QAAQ;KACtB;IACD,IAAI,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,QAAQ,EAAE;CAChE,CAAC,CAAC","sourcesContent":["import React, { forwardRef } from \"react\";\nimport { createURL } from \"expo-linking\";\nimport { StyleSheet } from \"@bacons/react-views\";\nimport { Link } from \"./Link\";\nimport { Text, View } from \"@bacons/react-views\";\n\n/** Default screen for unmatched routes. */\nexport const Unmatched = forwardRef((props, ref) => {\n const url = createURL(\"\");\n return (\n // @ts-ignore\n <View ref={ref} accessibilityRole=\"main\" style={styles.container}>\n <Text\n accessibilityRole=\"header\"\n accessibilityLevel={1}\n style={styles.title}\n >\n Unmatched Route\n </Text>\n <Text\n accessibilityRole=\"header\"\n accessibilityLevel={2}\n style={styles.subtitle}\n >\n Page could not be found.{\" \"}\n <Link href=\"/\" style={styles.link}>\n Go back.\n </Link>\n </Text>\n\n <Link href={\"/\"} style={styles.link}>\n {url}\n </Link>\n\n {process.env.NODE_ENV === \"development\" && (\n <Link href={\"/__index\"} style={styles.link}>\n Sitemap\n </Link>\n )}\n </View>\n );\n});\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"black\",\n padding: 24,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n title: {\n color: \"white\",\n fontSize: 36,\n paddingBottom: 12,\n marginBottom: 12,\n borderBottomColor: \"#323232\",\n borderBottomWidth: 1,\n textAlign: \"center\",\n fontWeight: \"bold\",\n },\n subtitle: {\n color: \"white\",\n fontSize: 18,\n marginBottom: 12,\n textAlign: \"center\",\n },\n link: { color: \"rgba(255,255,255,0.4)\", textAlign: \"center\" },\n});\n"]}
|