newcandies 0.1.11 → 0.1.13

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -116
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -136,7 +136,7 @@ function TEMPLATESafe(type) {
136
136
  async function writeBaseline({ dest, name, withQuery }) {
137
137
  const baseDeps = {
138
138
  // Expo core + platform libs
139
- expo: "latest",
139
+ expo: "54.0.23",
140
140
  "expo-constants": "~18.0.10",
141
141
  "expo-font": "~14.0.9",
142
142
  "expo-linking": "~8.0.8",
@@ -164,6 +164,9 @@ async function writeBaseline({ dest, name, withQuery }) {
164
164
  baseDeps["@tanstack/react-query"] = "latest";
165
165
  }
166
166
  baseDeps["tailwind-merge"] = "latest";
167
+ baseDeps["react-native-keyboard-controller"] = "latest";
168
+ baseDeps["@gorhom/bottom-sheet"] = "latest";
169
+ baseDeps["sonner-native"] = "latest";
167
170
  const pkg = {
168
171
  name,
169
172
  version: "0.0.0",
@@ -353,116 +356,34 @@ export default Text;
353
356
  `;
354
357
  await fs.writeFile(path.join(dest, "global.css"), globalCss);
355
358
  {
356
- const rootLayout = withQuery ? `import FontAwesome from "@expo/vector-icons/FontAwesome";
357
- import { useFonts } from "expo-font";
358
- import { Stack } from "expo-router";
359
- import * as SplashScreen from "expo-splash-screen";
360
- import { useEffect } from "react";
361
- import "react-native-reanimated";
362
- import "../../global.css";
363
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
364
-
365
- export { ErrorBoundary } from "expo-router";
366
-
367
- export const unstable_settings = {
368
- initialRouteName: "(tabs)",
369
- };
370
-
371
- SplashScreen.preventAutoHideAsync();
372
-
373
- const queryClient = new QueryClient();
374
-
375
- export default function RootLayout() {
376
- const [loaded, error] = useFonts({
377
- SpaceMono: require("../../assets/fonts/SpaceMono-Regular.ttf"),
378
- ...FontAwesome.font,
379
- });
380
-
381
- useEffect(() => {
382
- if (error) throw error;
383
- }, [error]);
384
-
385
- useEffect(() => {
386
- if (loaded) {
387
- SplashScreen.hideAsync();
388
- }
389
- }, [loaded]);
390
-
391
- if (!loaded) {
392
- return null;
393
- }
394
-
395
- return (
396
- <QueryClientProvider client={queryClient}>
397
- <RootLayoutNav />
398
- </QueryClientProvider>
399
- );
400
- }
401
-
402
- function RootLayoutNav() {
403
- return (
404
- <Stack>
405
- <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
406
- <Stack.Screen name="modal" options={{ presentation: "modal" }} />
407
- </Stack>
408
- );
409
- }
410
- ` : `import FontAwesome from "@expo/vector-icons/FontAwesome";
411
- import { useFonts } from "expo-font";
412
- import { Stack } from "expo-router";
413
- import * as SplashScreen from "expo-splash-screen";
414
- import { useEffect } from "react";
415
- import "react-native-reanimated";
416
- import "../../global.css";
417
-
418
- export { ErrorBoundary } from "expo-router";
419
-
420
- export const unstable_settings = {
421
- initialRouteName: "(tabs)",
422
- };
423
-
424
- SplashScreen.preventAutoHideAsync();
359
+ const rootLayout = `import { Stack } from 'expo-router';
360
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
361
+ import { KeyboardProvider } from 'react-native-keyboard-controller';
362
+ import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
363
+ import { Toaster } from 'sonner-native';
364
+ import 'react-native-reanimated';
365
+ import '../../global.css';
425
366
 
426
367
  export default function RootLayout() {
427
- const [loaded, error] = useFonts({
428
- SpaceMono: require("../../assets/fonts/SpaceMono-Regular.ttf"),
429
- ...FontAwesome.font,
430
- });
431
-
432
- useEffect(() => {
433
- if (error) throw error;
434
- }, [error]);
435
-
436
- useEffect(() => {
437
- if (loaded) {
438
- SplashScreen.hideAsync();
439
- }
440
- }, [loaded]);
441
-
442
- if (!loaded) {
443
- return null;
444
- }
445
-
446
- return <RootLayoutNav />;
447
- }
448
-
449
- function RootLayoutNav() {
450
368
  return (
451
- <Stack>
452
- <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
453
- <Stack.Screen name="modal" options={{ presentation: "modal" }} />
454
- </Stack>
369
+ <GestureHandlerRootView style={{ flex: 1 }}>
370
+ <KeyboardProvider>
371
+ <BottomSheetModalProvider>
372
+ <Stack>
373
+ <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
374
+ </Stack>
375
+ <Toaster />
376
+ </BottomSheetModalProvider>
377
+ </KeyboardProvider>
378
+ </GestureHandlerRootView>
455
379
  );
456
380
  }
457
381
  `;
458
382
  await fs.writeFile(path.join(appDir, "_layout.tsx"), rootLayout);
459
383
  const tabsDir = path.join(appDir, "(tabs)");
460
384
  await fs.ensureDir(tabsDir);
461
- const layout = `import React from 'react';
462
- import FontAwesome from '@expo/vector-icons/FontAwesome';
463
- import { Link, Tabs } from 'expo-router';
464
- import { Pressable } from 'react-native';
465
- import '../../../global.css';
385
+ const layout = `import FontAwesome from '@expo/vector-icons/FontAwesome';
386
+ import { Tabs } from 'expo-router';
466
387
 
467
388
  function TabBarIcon(props: { name: React.ComponentProps<typeof FontAwesome>['name']; color: string; }) {
468
389
  return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />;
@@ -470,28 +391,19 @@ function TabBarIcon(props: { name: React.ComponentProps<typeof FontAwesome>['nam
470
391
 
471
392
  export default function TabLayout() {
472
393
  return (
473
- <Tabs screenOptions={{ headerShown: true }}>
394
+ <Tabs screenOptions={{ headerShown: false }}>
474
395
  <Tabs.Screen
475
396
  name="index"
476
397
  options={{
477
- title: 'Tab One',
478
- tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
479
- headerRight: () => (
480
- <Link href="/modal" asChild>
481
- <Pressable>
482
- {({ pressed }) => (
483
- <FontAwesome name="info-circle" size={25} color={"#1f2937"} style={{ marginRight: 15, opacity: pressed ? 0.5 : 1 }} />
484
- )}
485
- </Pressable>
486
- </Link>
487
- ),
398
+ title: 'Home',
399
+ tabBarIcon: ({ color }) => <TabBarIcon name="home" color={color} />,
488
400
  }}
489
401
  />
490
402
  <Tabs.Screen
491
403
  name="two"
492
404
  options={{
493
- title: 'Tab Two',
494
- tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
405
+ title: 'Explore',
406
+ tabBarIcon: ({ color }) => <TabBarIcon name="search" color={color} />,
495
407
  }}
496
408
  />
497
409
  </Tabs>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newcandies",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Scaffold Expo Router + Uniwind React Native apps with layered templates.",
5
5
  "type": "module",
6
6
  "bin": {