@marktiderman/genesis-cli 1.16.2 → 1.17.1

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.
@@ -453,7 +453,11 @@ describe("product demo", () => {
453
453
  });
454
454
 
455
455
  describe("metro", () => {
456
- it("watches every Genesis workspace package the app depends on, so an edit to one reloads the app", () => {
456
+ // Only the starter inside the Genesis monorepo watches the workspace packages. An app made with
457
+ // `genesis init` gets its own Metro config, which installs those packages and watches nothing else.
458
+ const inMonorepo = read("metro.config.js").includes("monorepoRoot");
459
+
460
+ it.runIf(inMonorepo)("watches every Genesis workspace package the app depends on, so an edit to one reloads the app", () => {
457
461
  const pkg = JSON.parse(read("package.json")) as { dependencies: Record<string, string> };
458
462
  const watched = /\.\.\.\[([^\]]+)\]\.map\(\(name\) => path\.resolve\(monorepoRoot, "packages", name\)\)/.exec(read("metro.config.js"))?.[1] ?? "";
459
463
  const names = [...watched.matchAll(/"([^"]+)"/g)].map((m) => m[1]);
@@ -3,13 +3,16 @@
3
3
  * FlashList v2 for long lists, expo-image for avatars and pictures,
4
4
  * Reanimated 4 for toasts, drawers and skeletons, Liquid Glass for floating
5
5
  * surfaces on iOS 26, SF Symbols on iOS with lucide everywhere else, and the
6
- * @expo/ui (SwiftUI / Jetpack Compose) date picker. To fall back to plain
6
+ * @expo/ui (SwiftUI / Jetpack Compose) date picker, and React Navigation's
7
+ * theming (GenesisNativeApp themes headers and tab bars in the brand's light
8
+ * and dark colors). To fall back to plain
7
9
  * React Native for one, delete its line, its import below and its package.
8
10
  */
9
11
  import DateTimePicker from "@expo/ui/community/datetime-picker";
10
12
  import { FlashList } from "@shopify/flash-list";
11
13
  import * as GlassEffect from "expo-glass-effect";
12
14
  import { Image } from "expo-image";
15
+ import { DarkTheme, DefaultTheme, ThemeProvider } from "expo-router";
13
16
  import { SymbolView } from "expo-symbols";
14
17
  import * as Reanimated from "react-native-reanimated";
15
18
  import type { GenesisModules } from "@marktiderman/genesis-ui-native";
@@ -24,4 +27,5 @@ export const nativeModules: GenesisModules = {
24
27
  symbol: SymbolView as unknown as GenesisModules["symbol"],
25
28
  icons: lucideIcons,
26
29
  datePicker: DateTimePicker as unknown as GenesisModules["datePicker"],
30
+ navigation: { ThemeProvider, DefaultTheme, DarkTheme },
27
31
  };
@@ -3,7 +3,9 @@
3
3
  // installed, so the classes inside them are generated. Metro reads those packages from `src`
4
4
  // (their `react-native` export condition), so the app's NativeWind JSX transform applies to them.
5
5
  // The Genesis NativeWind preset brings the token classes
6
- // (role colors and their variables, radius scale, fonts) the ui-native components use.
6
+ // (role colors and their variables, radius scale, fonts) the ui-native components use. With your
7
+ // own brand, use `createGenesisNativewindPreset({ brand })` instead, with the brand you pass to
8
+ // GenesisNativeApp.
7
9
  import { fileURLToPath } from "node:url";
8
10
  import nativewindPreset from "nativewind/preset";
9
11
  import { genesisNativewindContent, genesisNativewindPreset } from "@marktiderman/genesis-design-system/presets/nativewind";