@teardown/cli 2.0.70 → 2.0.71
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/package.json +2 -2
- package/templates/metro.config.js +1 -1
- package/templates/src/navigation/index.ts +0 -1
- package/templates/src/navigation/router.tsx +37 -39
- package/templates/src/providers/app.provider.tsx +1 -4
- package/templates/src/navigation/navigation-provider.tsx +0 -27
- /package/templates/src/{routes → _routes}/_layout.tsx +0 -0
- /package/templates/src/{routes → _routes}/home.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teardown/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.71",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@biomejs/biome": "2.3.11",
|
|
79
|
-
"@teardown/tsconfig": "2.0.
|
|
79
|
+
"@teardown/tsconfig": "2.0.71",
|
|
80
80
|
"@types/bun": "1.3.5",
|
|
81
81
|
"@types/ejs": "^3.1.5",
|
|
82
82
|
"typescript": "5.9.3"
|
|
@@ -30,7 +30,7 @@ const config = {};
|
|
|
30
30
|
const teardownConfig = withTeardown(mergeConfig(getDefaultConfig(__dirname), config));
|
|
31
31
|
|
|
32
32
|
const navigationConfig = withTeardownNavigation(teardownConfig, {
|
|
33
|
-
routesDir: "./src/
|
|
33
|
+
routesDir: "./src/_routes",
|
|
34
34
|
generatedDir: "./.teardown",
|
|
35
35
|
verbose: false,
|
|
36
36
|
});
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Router Component
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Creates a type-safe router from the generated route tree.
|
|
5
|
+
* Routes are automatically generated from files in src/_routes/
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
8
|
+
import { createTeardownRouter } from "@teardown/navigation";
|
|
9
|
+
import { routeTree } from "../../.teardown/routeTree.generated";
|
|
10
|
+
import { generatedLinkingConfig, defaultPrefixes } from "../../.teardown/linking.generated";
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Create navigator
|
|
15
|
-
const Stack = createNativeStackNavigator();
|
|
16
|
-
|
|
17
|
-
// Theme colors using CSS variable-friendly values
|
|
12
|
+
/**
|
|
13
|
+
* Theme colors for navigation styling
|
|
14
|
+
*/
|
|
18
15
|
const theme = {
|
|
19
16
|
background: "hsl(0, 0%, 100%)",
|
|
20
17
|
foreground: "hsl(224, 71%, 4%)",
|
|
@@ -23,32 +20,33 @@ const theme = {
|
|
|
23
20
|
/**
|
|
24
21
|
* Root Router
|
|
25
22
|
*
|
|
26
|
-
*
|
|
23
|
+
* Auto-generated from file-based routes in src/_routes/
|
|
24
|
+
* Add new screens by creating files in the _routes directory.
|
|
27
25
|
*/
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
26
|
+
export const Router = createTeardownRouter({
|
|
27
|
+
routeTree,
|
|
28
|
+
initialRouteName: "home",
|
|
29
|
+
linking: {
|
|
30
|
+
prefixes: defaultPrefixes,
|
|
31
|
+
config: generatedLinkingConfig,
|
|
32
|
+
},
|
|
33
|
+
navigationContainerProps: {
|
|
34
|
+
theme: {
|
|
35
|
+
dark: false,
|
|
36
|
+
colors: {
|
|
37
|
+
primary: theme.foreground,
|
|
38
|
+
background: theme.background,
|
|
39
|
+
card: theme.background,
|
|
40
|
+
text: theme.foreground,
|
|
41
|
+
border: "hsl(214, 32%, 91%)",
|
|
42
|
+
notification: "hsl(0, 84%, 60%)",
|
|
43
|
+
},
|
|
44
|
+
fonts: {
|
|
45
|
+
regular: { fontFamily: "System", fontWeight: "400" },
|
|
46
|
+
medium: { fontFamily: "System", fontWeight: "500" },
|
|
47
|
+
bold: { fontFamily: "System", fontWeight: "700" },
|
|
48
|
+
heavy: { fontFamily: "System", fontWeight: "900" },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { HeroUINativeProvider } from "heroui-native";
|
|
9
9
|
import type React from "react";
|
|
10
10
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
11
|
-
import { NavigationProvider } from "@/navigation";
|
|
12
11
|
|
|
13
12
|
interface AppProvidersProps {
|
|
14
13
|
children: React.ReactNode;
|
|
@@ -17,9 +16,7 @@ interface AppProvidersProps {
|
|
|
17
16
|
export function AppProviders({ children }: AppProvidersProps): React.JSX.Element {
|
|
18
17
|
return (
|
|
19
18
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
20
|
-
<HeroUINativeProvider>
|
|
21
|
-
<NavigationProvider>{children}</NavigationProvider>
|
|
22
|
-
</HeroUINativeProvider>
|
|
19
|
+
<HeroUINativeProvider>{children}</HeroUINativeProvider>
|
|
23
20
|
</GestureHandlerRootView>
|
|
24
21
|
);
|
|
25
22
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Navigation Provider
|
|
3
|
-
*
|
|
4
|
-
* Wraps the app with NavigationContainer and linking configuration.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { LinkingOptions } from "@react-navigation/native";
|
|
8
|
-
import { NavigationContainer } from "@react-navigation/native";
|
|
9
|
-
import type React from "react";
|
|
10
|
-
import { defaultPrefixes, generatedLinkingConfig } from "@/.teardown/linking.generated";
|
|
11
|
-
|
|
12
|
-
interface NavigationProviderProps {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Linking configuration for deep links.
|
|
18
|
-
* Routes are automatically generated by @teardown/navigation-metro.
|
|
19
|
-
*/
|
|
20
|
-
const linking: LinkingOptions<object> = {
|
|
21
|
-
prefixes: defaultPrefixes,
|
|
22
|
-
config: generatedLinkingConfig,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export function NavigationProvider({ children }: NavigationProviderProps): React.JSX.Element {
|
|
26
|
-
return <NavigationContainer linking={linking}>{children}</NavigationContainer>;
|
|
27
|
-
}
|
|
File without changes
|
|
File without changes
|