@vvedantb/native-ui 0.37.2 → 0.38.0

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 (42) hide show
  1. package/README.md +8 -7
  2. package/dist/app-root/AuthGroupGate.jsx +65 -0
  3. package/dist/app-root/SsoCallbackScreen.jsx +97 -0
  4. package/dist/app-root/fonts.js +88 -0
  5. package/dist/app-root/index.js +3 -0
  6. package/dist/auth/AuthScreen.jsx +252 -74
  7. package/dist/auth/SecondFactorScreen.jsx +18 -12
  8. package/dist/auth/SignInScreen.jsx +40 -17
  9. package/dist/crash/LastCrashDialog.jsx +56 -0
  10. package/dist/crash/lastCrash.js +213 -0
  11. package/dist/entries/app-root.js +6 -0
  12. package/dist/entries/crash.js +5 -0
  13. package/dist/entries/theme.js +3 -0
  14. package/dist/index.js +3 -0
  15. package/dist/neutralTheme.js +163 -0
  16. package/dist/primitives/icon.jsx +0 -4
  17. package/dist/primitives/select.jsx +0 -2
  18. package/dist/settings/ThemeModePicker.jsx +2 -5
  19. package/dist/themeModeStore.js +67 -0
  20. package/dist/themeModes.js +9 -0
  21. package/package.json +47 -19
  22. package/src/app-root/AuthGroupGate.tsx +46 -0
  23. package/src/app-root/SsoCallbackScreen.tsx +62 -0
  24. package/src/app-root/fonts.ts +55 -0
  25. package/src/app-root/index.ts +6 -0
  26. package/src/auth/AuthScreen.tsx +102 -1
  27. package/src/auth/SecondFactorScreen.tsx +20 -2
  28. package/src/auth/SignInScreen.tsx +119 -53
  29. package/src/crash/LastCrashDialog.tsx +42 -0
  30. package/src/crash/lastCrash.ts +239 -0
  31. package/src/entries/app-root.ts +6 -0
  32. package/src/entries/crash.ts +16 -0
  33. package/src/entries/theme.ts +6 -0
  34. package/src/highlight.ts +1 -1
  35. package/src/index.ts +5 -0
  36. package/src/neutralTheme.ts +130 -0
  37. package/src/primitives/icon.tsx +0 -2
  38. package/src/primitives/select.tsx +0 -2
  39. package/src/settings/ThemeModePicker.tsx +2 -5
  40. package/src/themeModeStore.ts +94 -0
  41. package/src/themeModes.ts +10 -0
  42. package/types/prism-react-renderer.d.ts +22 -0
package/README.md CHANGED
@@ -16,7 +16,7 @@ Peers the app must already have (Expo SDK 57 / RN 0.76+):
16
16
  - `nativewind` `>=4`
17
17
  - `react-native-reanimated`, `react-native-safe-area-context`, `react-native-screens`
18
18
  - `@rn-primitives/slot`, `@rn-primitives/switch`, `@rn-primitives/select`
19
- - `@expo/vector-icons`, `@tabler/icons-react-native`, `lucide-react-native`
19
+ - `@expo/vector-icons`, `@tabler/icons-react-native`
20
20
  - `class-variance-authority`, `clsx`, `tailwind-merge`
21
21
 
22
22
  Optional, only if you import those components:
@@ -27,7 +27,7 @@ Optional, only if you import those components:
27
27
  - `@clerk/expo`, `convex`, `expo-auth-session`, `expo-web-browser` and `expo-router` — `@vvedantb/native-ui/auth` (0.7.0). `expo-router` also for `@vvedantb/native-ui/expo-web-root`.
28
28
  - `react-native-gesture-handler` (`>=2.0.0`) — `@vvedantb/native-ui/gesture-handler` (Unreleased). Wrap the app in `GestureHandlerRootView`, and put `GestureHandlerProvider` from that entry inside it: the sheet drags (`SheetContent`, the compact `DialogContent`) then run on Gesture Handler, on the UI thread, and each overlay's `Modal` gets its own root view (Android needs one in every `Modal`). It also turns on the `SwipeableRow` swipe. Without the provider, the sheets drag with `PanResponder`, with the same rules, and a `SwipeableRow` does not swipe. Only that entry imports the peer, so an app without it bundles as before. In a Metro monorepo, resolve the peer from the app (one copy), as for `react`.
29
29
  - `react-native-keyboard-controller` (`>=1.21.0`) — `@vvedantb/native-ui/keyboard-controller` (Unreleased). Put `KeyboardControllerProvider` from that entry inside the app's `KeyboardProvider`: the chat transcript (`ConversationList`), the dock (`ConversationDock`) and its scroll button then follow the keyboard frame by frame, a drag down on the transcript moves the keyboard with the finger (iOS, Android 11+; Android 10 and below lower it at once), and `PromptInput`, `ChatThread`, the overlays and `KeyboardAvoidingView` pad frame by frame. The dock moves by the keyboard less the bottom inset: its content pads that inset, as `PromptInput` does. Without the provider, every part keeps React Native's `KeyboardAvoidingView`. Only that entry imports the peer. In a Metro monorepo, resolve the peer from the app (one copy): the parts read its provider's context.
30
- - `react-native-svg` — the app marks (`APP_ICONS`, `Icon*`, `AppMark`, `AppWordmark`), `GoogleMark` and `PricingModal`. Apps with the icon peers above already have it: `lucide-react-native` and `@tabler/icons-react-native` both require it.
30
+ - `react-native-svg` — the app marks (`APP_ICONS`, `Icon*`, `AppMark`, `AppWordmark`), `GoogleMark` and `PricingModal`. Apps with the icon peers above already have it: `@tabler/icons-react-native` requires it.
31
31
 
32
32
  Optional and loaded only when installed, so the package imports and runs without them:
33
33
 
@@ -69,7 +69,7 @@ pnpm --filter native-gallery start
69
69
  # or cd apps/native-gallery && npx expo start
70
70
  ```
71
71
 
72
- `tests/galleryRegistry.test.ts` fails when a React component export has no entry in `apps/native-gallery/src/galleryRegistry.ts`. Maestro flows in `apps/native-gallery/.maestro/` drive the dropdown, composer, sheets and select. The `native-ui-gallery-android` GitHub Actions job builds the gallery, boots an API 34 emulator and runs them for pull requests that touch this package or the gallery. A new or changed component needs a gallery entry, a Maestro flow and a hand test on an Android emulator.
72
+ `tests/galleryRegistry.test.ts` fails when a React component export has no entry in `apps/native-gallery/src/galleryRegistry.ts`. Maestro flows in `apps/native-gallery/.maestro/` drive the dropdown, composer, sheets and select. No workflow runs them on a pull request: run `pnpm --filter native-gallery maestro` on an emulator and report the result in the pull request body. The pre-push hook runs the typecheck, lint and tests of this package. A new or changed component needs a gallery entry, a Maestro flow and a hand test on an Android emulator.
73
73
 
74
74
  The `Select` note stays: mount one `<PortalHost />` from `@rn-primitives/portal` at the app root, outside any `Modal`. The gallery does so in `app/_layout.tsx`.
75
75
 
@@ -89,7 +89,7 @@ The root entry exports everything. It still imports `BottomSheetContainer` and `
89
89
  | `@vvedantb/native-ui/toast` | `toast`, `Toaster`, `ToastOptions`, `ToastVariant` | none (from 0.3.12) |
90
90
  | `@vvedantb/native-ui/theme` | `NativeUiProvider`, `useNativeUi`, `useLargerText`, `useAccentColor`, `DEFAULT_ACCENT`, `tokens`, `palette`, `withAlpha`, `configureTheme` (with the `ThemeConfig`, `ThemeColors` and `ThemePalette` types), `fontClass`, `fontFamily` (with the `ThemeFonts` type), `cn`, `Colors` and the colour constants | none |
91
91
  | `@vvedantb/native-ui/floating` | `FloatingSurface`, `GlassSheetBackground`, `LiquidGlass`, `GlassBlurProvider`, `GlassBlurTarget`, `FloatingFAB`, `useReduceTransparency`, the floating metrics and styles | `expo-blur` (loader) |
92
- | `@vvedantb/native-ui/layout` | `ScreenContainer`, `SafeAreaContainer`, `PageTitle`, `PageHeader`, `StackPageHeader` (0.5.0) and their props types, `SectionLabel` (0.5.0), `SettingsSection`, `SettingsField`, `SettingsToggleRow`, `SettingsStack`, `MoreFromProjectV` and `FromProjectV` (0.8.0), `ScreenContainerProps`, `SettingsEmptyState`, `PinnedBotTile`, `BotPinGrid`, `ArtifactList` (0.12.0). Unreleased: `ThemeModePicker`, `THEME_MODES` and `ThemeMode`, the web theme tiles for an Appearance section (needs `react-native-svg`). `ScreenContainer` takes `refreshing`, `onRefresh` and `refreshControl` (0.12.0). `StackPageHeader` takes `centre` (0.12.0) | `expo-blur` (loader) |
92
+ | `@vvedantb/native-ui/layout` | `ScreenContainer`, `SafeAreaContainer`, `PageTitle`, `PageHeader`, `StackPageHeader` (0.5.0) and their props types, `SectionLabel` (0.5.0), `SettingsSection`, `SettingsField`, `SettingsToggleRow`, `SettingsStack`, `MoreFromProjectV` and `FromProjectV` (0.8.0), `ScreenContainerProps`, `SettingsEmptyState`, `PinnedBotTile`, `BotPinGrid`, `ArtifactList` (0.12.0). From 0.35.0: `ThemeModePicker`, `THEME_MODES` and `ThemeMode`, the web theme tiles for an Appearance section (needs `react-native-svg`). The Neutral store, `paintDarkFamily` and `createThemeModeStore` live on `@vvedantb/native-ui/theme`. `ScreenContainer` takes `refreshing`, `onRefresh` and `refreshControl` (0.12.0). `StackPageHeader` takes `centre` (0.12.0) | `expo-blur` (loader) |
93
93
  | `@vvedantb/native-ui/marketing` | `UpgradeToProCard`, `PricingModal` and the pricing types | none |
94
94
  | `@vvedantb/native-ui/ambient` | `AmbientBackground` | `expo-linear-gradient` (loader) |
95
95
  | `@vvedantb/native-ui/blur`, `/haptics` | the loaders | `expo-blur`, `expo-haptics` (loaders) |
@@ -102,6 +102,7 @@ The root entry exports everything. It still imports `BottomSheetContainer` and `
102
102
  | `@vvedantb/native-ui/ai-gallery` | `AiChatGallery`, `AiChatSamples` (from 0.4.0) | none |
103
103
  | `@vvedantb/native-ui/auth` | From 0.7.0: `AuthProviders`, `SignInScreen`, `SignUpScreen`, `ChangePasswordScreen`, `DeleteAccountScreen` (0.32.0), `GoogleSignInButton`, `useGoogleSignIn`, `AuthScreen`, `OrDivider`, `FieldError`, `authErrorMessage`, `SecondFactorScreen`, `useSecondFactor`, `submitTotpSecondFactor`, `submitSecondFactor`, `prepareSecondFactorIfNeeded`, `prepareFirstFactorIfNeeded`, `submitFirstFactor`, `pickFirstFactorStrategy`, `TOTP_MESSAGES` and their props types. See [Auth](#auth-070). Not on the root entry. | `@clerk/expo`, `convex`, `expo-auth-session`, `expo-web-browser`, `expo-router` (import) |
104
104
  | `@vvedantb/native-ui/expo-router` | From 0.12.0: `RouterStackPageHeader`, `RouterStackPageHeaderProps`, `goBackOrReplace`. Not on the root, `/layout` or `/page-title` entries. | `expo-router` (import) |
105
+ | `@vvedantb/native-ui/app-root` | `instrumentSansFontMap`, `useInstrumentSansFonts`, `useHideSplashWhenReady`, `AuthGroupGate`, `SsoCallbackScreen` and their props types. Apps keep their own provider trees. Not on the root entry. | `@clerk/expo`, `expo-router`, `expo-font`, `expo-splash-screen`, `@expo-google-fonts/instrument-sans` (import) |
105
106
  | `@vvedantb/native-ui/expo-web-root` | From 0.7.0: `ExpoWebRoot`, `ExpoWebRootProps`, `ExpoWebRootViewport`, `EXPO_WEB_VIEWPORT`, `expoWebBackgroundCss`. Not on the root entry. | `expo-router` (import of `expo-router/html`) |
106
107
  | `@vvedantb/native-ui/tailwind-preset` | From 0.7.0, CommonJS for `tailwind.config.js`: `nativeUiPreset`, `nativeUiContent`, `cssVar`, `hslVar`, `rgbAlpha`, `cssVariables`, `schemeColors` and a default preset. See [Expo / NativeWind](#expo--nativewind). | `nativewind` (`require`, when installed) |
107
108
 
@@ -384,7 +385,7 @@ configureTheme({ font: { regular: "Inter_400Regular", medium: "Inter_500Medium",
384
385
 
385
386
  **Settings at web sizes (0.14.0).** `SettingsSection`, `SettingsToggleRow`, `SettingsField` and `SettingsEmptyState` take the web type: titles and labels `text-sm` (14 / 20; the section title semibold, the others medium), descriptions and help `text-xs leading-relaxed` (12 / 19.5; the section description `text-sm leading-relaxed`, 14 / 22.75). `SettingsToggleRow` steps up one size with larger text and has no minimum height; its control keeps the 44 target.
386
387
 
387
- **`Button` aliases and `Field` (unreleased).** `variant` also accepts `tertiary` (= `ghost`), `danger` (= `destructive`), `success`, `warning` and `flat`, as the web `Button`. `tinted` stays as a legacy alias (the pink tint of `outline` before 0.3.0). `size` accepts `md` (= `default`/`medium`), and `Spinner` `size="default"` equals `md`. Roles: `primary`/`default` is the one main action, `secondary` an alternative, `tertiary`/`ghost` a dismissive action, `destructive`/`danger` a destructive action, `success` and `warning` show status, and `outline`, `link` and `flat` are visual.
388
+ **`Button` aliases and `Field` (0.36.0).** `variant` also accepts `tertiary` (= `ghost`), `danger` (= `destructive`), `success`, `warning` and `flat`, as the web `Button`. `tinted` stays as a legacy alias (the pink tint of `outline` before 0.3.0). `size` accepts `md` (= `default`/`medium`), and `Spinner` `size="default"` equals `md`. Roles: `primary`/`default` is the one main action, `secondary` an alternative, `tertiary`/`ghost` a dismissive action, `destructive`/`danger` a destructive action, `success` and `warning` show status, and `outline`, `link` and `flat` are visual.
388
389
 
389
390
  `Field`, `FieldLabel`, `FieldControl`, `FieldDescription` and `FieldError` (root and `/primitives`) link a label to a control. `FieldLabel` sets `nativeID`; `FieldControl` sets `accessibilityLabelledBy` while a `FieldLabel` renders, and otherwise keeps the `accessibilityLabel` you pass (the fallback, and what iOS reads). A plain `Input` is unchanged. The `FieldError` in `@vvedantb/native-ui/auth` is a different component (it takes a `message` prop).
390
391
 
@@ -772,7 +773,7 @@ The components keep the web sizes on screen and reach a 44 pt touch target with
772
773
 
773
774
  Text scales with the system font size. Labelled controls have minimum heights, so a large Dynamic Type size grows them instead of clipping the label (the `SearchInput` lock grows with the font scale); only the `FloatingTabBar` labels are capped (1.5×), to fit the fixed bar. With Reduce Motion on, dialogs, sheets, toasts, the `Select` popover, `PricingModal`, `Progress`, `Skeleton` and the `FloatingTabBar` pill do not animate. Dialogs, sheets, toasts, `FloatingTabBar` and `FloatingFAB` stay inside the safe-area insets, and dialog and sheet fields stay above the keyboard on iOS and Android.
774
775
 
775
- The brand marks (`APP_ICONS`, the `Icon*` exports, `AppMark` and `GoogleMark`) are images named by `title`, and hidden from assistive tech without one. From 0.3.14 they set the props each platform reads: `accessibilityRole="image"` and `accessibilityLabel` on iOS and Android, `role="img"` and `aria-label` on web. Without a title they set `accessibilityElementsHidden` and `importantForAccessibility="no-hide-descendants"` on native and `aria-hidden` on web. `testID` is `data-testid` on web. On web `react-native-svg` passes its props straight to the DOM `<svg>`, and React Native Web does not map `accessible`, the `accessibility*` props or `testID` there. So do not put them on an `Svg` or on a Tabler icon: put them on the parent `View` or `Pressable`. The package draws no Lucide icon, as a Lucide icon always sets `testID` on its `Svg`. On web the `Select` options are Radix DOM nodes, so from 0.3.14 they take their name and test id as `aria-label` and `data-testid` there, and as `accessibilityLabel` and `testID` on iOS and Android.
776
+ The brand marks (`APP_ICONS`, the `Icon*` exports, `AppMark` and `GoogleMark`) are images named by `title`, and hidden from assistive tech without one. From 0.3.14 they set the props each platform reads: `accessibilityRole="image"` and `accessibilityLabel` on iOS and Android, `role="img"` and `aria-label` on web. Without a title they set `accessibilityElementsHidden` and `importantForAccessibility="no-hide-descendants"` on native and `aria-hidden` on web. `testID` is `data-testid` on web. On web `react-native-svg` passes its props straight to the DOM `<svg>`, and React Native Web does not map `accessible`, the `accessibility*` props or `testID` there. So do not put them on an `Svg` or on a Tabler icon: put them on the parent `View` or `Pressable`. On web the `Select` options are Radix DOM nodes, so from 0.3.14 they take their name and test id as `aria-label` and `data-testid` there, and as `accessibilityLabel` and `testID` on iOS and Android.
776
777
 
777
778
  `ThemeToggle` (from 0.3.16) is a `HeaderIconButton` that switches between light and dark with NativeWind's `setColorScheme`, the scheme every component reads through `useColorScheme`. It shows and names the scheme it switches to: a moon and "Switch to dark mode" in light, a sun and "Switch to light mode" in dark. It stores nothing: to restore the choice on the next launch, store `useColorScheme().colorScheme` in the app. It takes `testID`. It needs `darkMode: "class"` (see [Theme](#theme)). Without it, from 0.5.0, a press logs that fix with `console.error` and leaves the scheme as it is, instead of throwing from the press handler.
778
779
 
@@ -819,7 +820,7 @@ The brand files `src/brand/svg.ts`, `familyApps.ts` and `vProAppBenefits.ts` are
819
820
 
820
821
  ## Type checking
821
822
 
822
- `pnpm --filter @vvedantb/native-ui typecheck` runs `tsc` against `types/peers.d.ts`, local declarations of the React Native peers, because they are not installed in this repository. The declarations are looser than the real types. Apps type-check the source against the real packages.
823
+ `pnpm --filter @vvedantb/native-ui typecheck` runs `tsc` against `types/peers.d.ts`, local declarations of the React Native peers, because they are not installed in this repository. The declarations are looser than the real types. Apps type-check the source against the real packages. `types/peers.d.ts` is not published: its `declare module "react-native"` would replace an app's real types. The one optional peer that apps may not install, `prism-react-renderer`, has a published module file instead (`types/prism-react-renderer.d.ts`, in `files`). `src/highlight.ts` imports it by relative path, so no `exports` or `typesVersions` entry is needed.
823
824
 
824
825
  ## Publish
825
826
 
@@ -0,0 +1,65 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useAuth } from "@clerk/expo";
3
+ import { Redirect } from "expo-router";
4
+ /**
5
+ * The layout of an `(auth)` route group: waits for Clerk when asked, sends signed-in
6
+ * users on, and renders the auth stack otherwise. The app passes its own loading UI.
7
+ */
8
+ export function AuthGroupGate(t0) {
9
+ const $ = _c(7);
10
+ const {
11
+ children,
12
+ waitForLoaded: t1,
13
+ loading: t2,
14
+ treatPendingAsSignedOut,
15
+ signedInHref: t3,
16
+ withAnchor,
17
+ skipSignedInRedirect: t4,
18
+ previewHref
19
+ } = t0;
20
+ const waitForLoaded = t1 === undefined ? true : t1;
21
+ const loading = t2 === undefined ? null : t2;
22
+ const signedInHref = t3 === undefined ? "/" : t3;
23
+ const skipSignedInRedirect = t4 === undefined ? false : t4;
24
+ let t5;
25
+ if ($[0] !== treatPendingAsSignedOut) {
26
+ t5 = treatPendingAsSignedOut === undefined ? undefined : {
27
+ treatPendingAsSignedOut
28
+ };
29
+ $[0] = treatPendingAsSignedOut;
30
+ $[1] = t5;
31
+ } else {
32
+ t5 = $[1];
33
+ }
34
+ const {
35
+ isSignedIn,
36
+ isLoaded
37
+ } = useAuth(t5);
38
+ if (waitForLoaded && !isLoaded) {
39
+ return loading;
40
+ }
41
+ if (isSignedIn && !skipSignedInRedirect) {
42
+ let t6;
43
+ if ($[2] !== signedInHref || $[3] !== withAnchor) {
44
+ t6 = <Redirect href={signedInHref} withAnchor={withAnchor} />;
45
+ $[2] = signedInHref;
46
+ $[3] = withAnchor;
47
+ $[4] = t6;
48
+ } else {
49
+ t6 = $[4];
50
+ }
51
+ return t6;
52
+ }
53
+ if (previewHref) {
54
+ let t6;
55
+ if ($[5] !== previewHref) {
56
+ t6 = <Redirect href={previewHref} />;
57
+ $[5] = previewHref;
58
+ $[6] = t6;
59
+ } else {
60
+ t6 = $[6];
61
+ }
62
+ return t6;
63
+ }
64
+ return children;
65
+ }
@@ -0,0 +1,97 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useAuth } from "@clerk/expo";
3
+ import { Redirect, useRouter } from "expo-router";
4
+ import { View } from "react-native";
5
+ import { Button } from "../Button";
6
+ import { CenteredSpinner } from "../Spinner";
7
+ const DEFAULT_LOADING = <CenteredSpinner label="Signing in" />;
8
+
9
+ /**
10
+ * The `sso-callback` route of the Google sign-in redirect. `useSSO` completes the
11
+ * session; this screen only waits for it, then opens the app.
12
+ */
13
+ export function SsoCallbackScreen(t0) {
14
+ const $ = _c(19);
15
+ const {
16
+ signedInHref: t1,
17
+ signedOutHref: t2,
18
+ withAnchor,
19
+ treatPendingAsSignedOut,
20
+ loading: t3,
21
+ backLabel,
22
+ className: t4
23
+ } = t0;
24
+ const signedInHref = t1 === undefined ? "/" : t1;
25
+ const signedOutHref = t2 === undefined ? "/sign-in" : t2;
26
+ const loading = t3 === undefined ? DEFAULT_LOADING : t3;
27
+ const className = t4 === undefined ? "flex-1 items-center justify-center gap-6 px-6" : t4;
28
+ let t5;
29
+ if ($[0] !== treatPendingAsSignedOut) {
30
+ t5 = treatPendingAsSignedOut === undefined ? undefined : {
31
+ treatPendingAsSignedOut
32
+ };
33
+ $[0] = treatPendingAsSignedOut;
34
+ $[1] = t5;
35
+ } else {
36
+ t5 = $[1];
37
+ }
38
+ const {
39
+ isLoaded,
40
+ isSignedIn
41
+ } = useAuth(t5);
42
+ const router = useRouter();
43
+ if (isLoaded && isSignedIn) {
44
+ let t6;
45
+ if ($[2] !== signedInHref || $[3] !== withAnchor) {
46
+ t6 = <Redirect href={signedInHref} withAnchor={withAnchor} />;
47
+ $[2] = signedInHref;
48
+ $[3] = withAnchor;
49
+ $[4] = t6;
50
+ } else {
51
+ t6 = $[4];
52
+ }
53
+ return t6;
54
+ }
55
+ if (backLabel === undefined) {
56
+ let t6;
57
+ if ($[5] !== isLoaded || $[6] !== loading || $[7] !== signedOutHref) {
58
+ t6 = isLoaded ? <Redirect href={signedOutHref} /> : loading;
59
+ $[5] = isLoaded;
60
+ $[6] = loading;
61
+ $[7] = signedOutHref;
62
+ $[8] = t6;
63
+ } else {
64
+ t6 = $[8];
65
+ }
66
+ return t6;
67
+ }
68
+ let t6;
69
+ if ($[9] !== router || $[10] !== signedOutHref) {
70
+ t6 = () => router.replace(signedOutHref);
71
+ $[9] = router;
72
+ $[10] = signedOutHref;
73
+ $[11] = t6;
74
+ } else {
75
+ t6 = $[11];
76
+ }
77
+ let t7;
78
+ if ($[12] !== backLabel || $[13] !== t6) {
79
+ t7 = <Button variant="ghost" fullWidth={false} onPress={t6}>{backLabel}</Button>;
80
+ $[12] = backLabel;
81
+ $[13] = t6;
82
+ $[14] = t7;
83
+ } else {
84
+ t7 = $[14];
85
+ }
86
+ let t8;
87
+ if ($[15] !== className || $[16] !== loading || $[17] !== t7) {
88
+ t8 = <View className={className}>{loading}{t7}</View>;
89
+ $[15] = className;
90
+ $[16] = loading;
91
+ $[17] = t7;
92
+ $[18] = t8;
93
+ } else {
94
+ t8 = $[18];
95
+ }
96
+ return t8;
97
+ }
@@ -0,0 +1,88 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { InstrumentSans_400Regular } from "@expo-google-fonts/instrument-sans/400Regular";
3
+ import { InstrumentSans_500Medium } from "@expo-google-fonts/instrument-sans/500Medium";
4
+ import { InstrumentSans_600SemiBold } from "@expo-google-fonts/instrument-sans/600SemiBold";
5
+ import { InstrumentSans_700Bold } from "@expo-google-fonts/instrument-sans/700Bold";
6
+ import { InstrumentSans_400Regular_Italic } from "@expo-google-fonts/instrument-sans/400Regular_Italic";
7
+ import { InstrumentSans_500Medium_Italic } from "@expo-google-fonts/instrument-sans/500Medium_Italic";
8
+ import { InstrumentSans_600SemiBold_Italic } from "@expo-google-fonts/instrument-sans/600SemiBold_Italic";
9
+ import { InstrumentSans_700Bold_Italic } from "@expo-google-fonts/instrument-sans/700Bold_Italic";
10
+ import { useFonts } from "expo-font";
11
+ import * as SplashScreen from "expo-splash-screen";
12
+ import { useEffect } from "react";
13
+
14
+ /** The font sources `useFonts` takes: family name to module. */
15
+
16
+ const UPRIGHT = {
17
+ InstrumentSans_400Regular,
18
+ InstrumentSans_500Medium,
19
+ InstrumentSans_600SemiBold,
20
+ InstrumentSans_700Bold
21
+ };
22
+ const ITALIC = {
23
+ InstrumentSans_400Regular_Italic,
24
+ InstrumentSans_500Medium_Italic,
25
+ InstrumentSans_600SemiBold_Italic,
26
+ InstrumentSans_700Bold_Italic
27
+ };
28
+
29
+ /** The Instrument Sans fonts the `font-instrument-sans*` classes use, plus any `extra`. */
30
+ export function instrumentSansFontMap({
31
+ italics = false,
32
+ extra
33
+ } = {}) {
34
+ return {
35
+ ...extra,
36
+ ...UPRIGHT,
37
+ ...(italics ? ITALIC : undefined)
38
+ };
39
+ }
40
+
41
+ /** `[loaded, error]` as `useFonts` returns them, for the Instrument Sans map. */
42
+ export function useInstrumentSansFonts(t0) {
43
+ const $ = _c(4);
44
+ let t1;
45
+ if ($[0] !== t0) {
46
+ t1 = t0 === undefined ? {} : t0;
47
+ $[0] = t0;
48
+ $[1] = t1;
49
+ } else {
50
+ t1 = $[1];
51
+ }
52
+ const options = t1;
53
+ let t2;
54
+ if ($[2] !== options) {
55
+ t2 = instrumentSansFontMap(options);
56
+ $[2] = options;
57
+ $[3] = t2;
58
+ } else {
59
+ t2 = $[3];
60
+ }
61
+ return useFonts(t2);
62
+ }
63
+
64
+ /**
65
+ * Hides the native splash once `ready` is true. Call `SplashScreen.preventAutoHideAsync()`
66
+ * at module load in the app, so the call site keeps the timing. A failed hide is ignored.
67
+ */
68
+ export function useHideSplashWhenReady(ready) {
69
+ const $ = _c(3);
70
+ let t0;
71
+ let t1;
72
+ if ($[0] !== ready) {
73
+ t0 = () => {
74
+ if (ready) {
75
+ SplashScreen.hideAsync().catch(_temp);
76
+ }
77
+ };
78
+ t1 = [ready];
79
+ $[0] = ready;
80
+ $[1] = t0;
81
+ $[2] = t1;
82
+ } else {
83
+ t0 = $[1];
84
+ t1 = $[2];
85
+ }
86
+ useEffect(t0, t1);
87
+ }
88
+ function _temp() {}
@@ -0,0 +1,3 @@
1
+ export { instrumentSansFontMap, useInstrumentSansFonts, useHideSplashWhenReady } from "./fonts";
2
+ export { AuthGroupGate } from "./AuthGroupGate";
3
+ export { SsoCallbackScreen } from "./SsoCallbackScreen";