@vvedantb/native-ui 0.37.2 → 0.39.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.
- package/README.md +8 -7
- package/dist/Avatar.jsx +22 -19
- package/dist/BottomSheetContainer.jsx +0 -6
- package/dist/BulkActionBar.jsx +0 -24
- package/dist/Button.jsx +92 -116
- package/dist/Card.jsx +56 -50
- package/dist/ColorSwatches.jsx +0 -6
- package/dist/Dialog.jsx +0 -12
- package/dist/DropdownMenu.jsx +0 -10
- package/dist/EmptyState.jsx +0 -3
- package/dist/ExpoWebRoot.jsx +0 -6
- package/dist/Field.jsx +0 -17
- package/dist/FloatingSurface.jsx +95 -80
- package/dist/FloatingTabBar.jsx +0 -23
- package/dist/IconButton.jsx +0 -1
- package/dist/LoadingState.jsx +0 -6
- package/dist/PasswordInput.jsx +0 -15
- package/dist/PillTabs.jsx +39 -36
- package/dist/SearchInput.jsx +0 -13
- package/dist/SectionLabel.jsx +0 -1
- package/dist/SharedTransition.jsx +0 -3
- package/dist/Skeleton.jsx +0 -2
- package/dist/Spinner.jsx +0 -2
- package/dist/StatusDot.jsx +0 -5
- package/dist/Switch.jsx +32 -22
- package/dist/Tabs.jsx +27 -26
- package/dist/Textarea.jsx +0 -1
- package/dist/ThemeToggle.jsx +0 -1
- package/dist/Toast.jsx +80 -91
- package/dist/UpdateChecker.jsx +0 -1
- package/dist/ai/activity-question.jsx +0 -6
- package/dist/ai/activity-step-label.js +0 -6
- package/dist/ai/activity-step-types.js +0 -4
- package/dist/ai/activity-tasks-utils.js +0 -17
- package/dist/ai/activity-timeline.js +0 -8
- package/dist/ai/attachments.jsx +0 -2
- package/dist/ai/chain-of-thought.jsx +0 -3
- package/dist/ai/chat-text.js +0 -1
- package/dist/ai/chat-thread.jsx +0 -1
- package/dist/ai/choice-question.jsx +0 -10
- package/dist/ai/code-block.jsx +0 -31
- package/dist/ai/collapsible.jsx +0 -14
- package/dist/ai/conversation-context.js +0 -3
- package/dist/ai/conversation.jsx +2 -48
- package/dist/ai/file-chip.jsx +0 -2
- package/dist/ai/icon-button.jsx +0 -8
- package/dist/ai/index.js +0 -5
- package/dist/ai/message-context-menu.jsx +0 -7
- package/dist/ai/message.jsx +0 -21
- package/dist/ai/prompt-input-menu.jsx +0 -3
- package/dist/ai/prompt-input.jsx +0 -27
- package/dist/ai/response-text.jsx +0 -6
- package/dist/ai/sources.jsx +0 -1
- package/dist/ai/suggestion.jsx +0 -1
- package/dist/ai/trace.jsx +0 -11
- package/dist/ai/unified-diff.jsx +0 -4
- package/dist/app-root/AuthGroupGate.jsx +65 -0
- package/dist/app-root/SsoCallbackScreen.jsx +97 -0
- package/dist/app-root/fonts.js +88 -0
- package/dist/app-root/index.js +3 -0
- package/dist/auth/AuthScreen.jsx +250 -77
- package/dist/auth/GoogleSignInButton.jsx +0 -3
- package/dist/auth/SecondFactorScreen.jsx +18 -14
- package/dist/auth/SignInScreen.jsx +40 -34
- package/dist/auth/authErrors.js +0 -4
- package/dist/auth/clerkCore3.js +0 -7
- package/dist/auth/index.js +0 -4
- package/dist/auth/totp.js +0 -2
- package/dist/brand/GoogleMark.jsx +0 -1
- package/dist/brand/ProviderIcon.jsx +0 -2
- package/dist/brand/index.js +0 -3
- package/dist/brand/svg.js +0 -6
- package/dist/configureTheme.js +0 -9
- package/dist/controlStyles.js +0 -14
- package/dist/crash/LastCrashDialog.jsx +56 -0
- package/dist/crash/lastCrash.js +192 -0
- package/dist/entries/ai.js +0 -3
- package/dist/entries/ambient.js +0 -2
- package/dist/entries/app-root.js +1 -0
- package/dist/entries/auth.js +0 -4
- package/dist/entries/bottom-sheet.js +0 -2
- package/dist/entries/brand.js +0 -1
- package/dist/entries/button.js +0 -1
- package/dist/entries/crash.js +2 -0
- package/dist/entries/date-time.js +0 -2
- package/dist/entries/expo-router.js +0 -3
- package/dist/entries/expo-web-root.js +0 -2
- package/dist/entries/floating.js +0 -2
- package/dist/entries/generative-ui.js +0 -4
- package/dist/entries/gesture-handler.js +0 -3
- package/dist/entries/keyboard-controller.js +0 -3
- package/dist/entries/layout.js +0 -2
- package/dist/entries/markdown.js +0 -3
- package/dist/entries/marketing.js +0 -1
- package/dist/entries/page-title.js +0 -5
- package/dist/entries/password-input.js +0 -2
- package/dist/entries/paste-input.js +0 -3
- package/dist/entries/primitives.js +0 -6
- package/dist/entries/search-input.js +0 -2
- package/dist/entries/tab-bar.js +0 -2
- package/dist/entries/theme.js +4 -2
- package/dist/entries/toast.js +0 -3
- package/dist/entries/video.js +0 -2
- package/dist/entries/webview.js +0 -2
- package/dist/examples/AiChatGallery.jsx +0 -11
- package/dist/examples/ParityGallery.jsx +0 -12
- package/dist/floating.js +0 -8
- package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
- package/dist/generative-ui/components.jsx +0 -8
- package/dist/glass.js +55 -0
- package/dist/glassBlur.jsx +0 -12
- package/dist/highlight.js +0 -26
- package/dist/index.js +4 -2
- package/dist/loadingGrid.js +0 -13
- package/dist/markdown/Markdown.jsx +0 -59
- package/dist/markdown/MarkdownTable.jsx +0 -18
- package/dist/markdown/tableText.js +0 -5
- package/dist/marketing/UpgradeToProCard.jsx +0 -5
- package/dist/marketing/pricing.js +0 -3
- package/dist/media/ImageGallery.jsx +0 -16
- package/dist/media/imageZoom.js +0 -4
- package/dist/media/zoom-image-gesture.jsx +0 -8
- package/dist/media/zoomImage.js +0 -3
- package/dist/motion.js +0 -3
- package/dist/neutralTheme.js +158 -0
- package/dist/pagerSwipe.js +0 -16
- package/dist/palette.js +0 -10
- package/dist/primitives/button.jsx +0 -5
- package/dist/primitives/icon.jsx +0 -4
- package/dist/primitives/keyboard-controller.jsx +0 -27
- package/dist/primitives/native-only-animated-view.jsx +0 -5
- package/dist/primitives/overlay.jsx +0 -2
- package/dist/primitives/pager-gesture.jsx +3 -29
- package/dist/primitives/paste-input.jsx +0 -5
- package/dist/primitives/select.jsx +0 -10
- package/dist/primitives/sheet-drag.jsx +0 -3
- package/dist/primitives/sheet-gesture.jsx +0 -8
- package/dist/primitives/swipe-row-gesture.jsx +3 -45
- package/dist/primitives/text.jsx +0 -5
- package/dist/primitives/toast-drag-gesture.jsx +4 -24
- package/dist/primitives/web-click-guard.js +0 -3
- package/dist/primitives/window-layer.jsx +0 -14
- package/dist/push.js +0 -6
- package/dist/relativeTime.js +0 -13
- package/dist/settings/MoreFromProjectV.jsx +0 -5
- package/dist/settings/ThemeModePicker.jsx +2 -9
- package/dist/settings/projectVMobileApps.js +1 -6
- package/dist/sheetDrag.js +0 -10
- package/dist/swipeRow.js +0 -15
- package/dist/tabBarRoutes.js +0 -4
- package/dist/tabIndicator.js +0 -4
- package/dist/tailwind-preset.cjs +0 -54
- package/dist/tailwind-preset.d.cts +0 -8
- package/dist/theme.jsx +29 -21
- package/dist/themeModeStore.js +62 -0
- package/dist/themeModes.js +9 -0
- package/dist/toastChrome.js +0 -6
- package/dist/toastDrag.js +0 -14
- package/dist/toastStore.js +0 -4
- package/dist/updateCheck.js +0 -7
- package/dist/video/InlineVideo.jsx +0 -2
- package/dist/webview/htmlView.js +0 -5
- package/package.json +47 -19
- package/src/ArtifactList.tsx +0 -2
- package/src/Avatar.tsx +3 -3
- package/src/Badge.tsx +0 -1
- package/src/BottomSheetContainer.tsx +0 -11
- package/src/BulkActionBar.tsx +0 -66
- package/src/Button.tsx +4 -40
- package/src/CaptureButton.tsx +0 -1
- package/src/Card.tsx +3 -15
- package/src/Checkbox.tsx +0 -2
- package/src/ColorSwatches.tsx +0 -9
- package/src/ConfirmDialog.tsx +0 -7
- package/src/DateTimeField.tsx +0 -5
- package/src/Dialog.tsx +0 -27
- package/src/DividedList.tsx +0 -1
- package/src/DropdownMenu.tsx +0 -51
- package/src/EmptyState.tsx +0 -5
- package/src/ExpoWebRoot.tsx +0 -10
- package/src/Field.tsx +0 -14
- package/src/FloatingFAB.tsx +0 -3
- package/src/FloatingSurface.tsx +11 -8
- package/src/FloatingTabBar.tsx +0 -25
- package/src/IconButton.tsx +0 -5
- package/src/Input.tsx +0 -1
- package/src/Label.tsx +0 -1
- package/src/LabeledSwitchRow.tsx +0 -2
- package/src/ListRow.tsx +0 -12
- package/src/LoadingState.tsx +0 -12
- package/src/MenuSheet.tsx +0 -2
- package/src/PageIndicator.tsx +0 -2
- package/src/PageTitle.tsx +0 -15
- package/src/Pager.tsx +0 -9
- package/src/PasswordInput.tsx +0 -24
- package/src/PillTabs.tsx +3 -11
- package/src/PinnedBotTile.tsx +0 -6
- package/src/Progress.tsx +0 -3
- package/src/ReactionRow.tsx +0 -8
- package/src/ScreenContainer.tsx +0 -4
- package/src/SearchInput.tsx +0 -25
- package/src/SectionLabel.tsx +0 -2
- package/src/Select.tsx +0 -6
- package/src/Separator.tsx +0 -2
- package/src/SharedTransition.tsx +0 -7
- package/src/Sheet.tsx +0 -3
- package/src/SheetRow.tsx +0 -12
- package/src/Skeleton.tsx +0 -10
- package/src/Spinner.tsx +0 -6
- package/src/StackPageHeader.tsx +0 -16
- package/src/StatGrid.tsx +0 -1
- package/src/StatusDot.tsx +0 -6
- package/src/SurfaceRow.tsx +0 -12
- package/src/SwipeableRow.tsx +0 -4
- package/src/Switch.tsx +3 -4
- package/src/Tabs.tsx +3 -27
- package/src/Textarea.tsx +0 -2
- package/src/ThemeToggle.tsx +0 -1
- package/src/Toast.tsx +3 -19
- package/src/UpdateChecker.tsx +0 -46
- package/src/ai/activity-question.tsx +0 -8
- package/src/ai/activity-step-detail.tsx +0 -5
- package/src/ai/activity-step-label.ts +0 -5
- package/src/ai/activity-step-types.ts +0 -24
- package/src/ai/activity-step.tsx +0 -4
- package/src/ai/activity-tasks-utils.ts +0 -13
- package/src/ai/activity-timeline.ts +0 -6
- package/src/ai/attachments.tsx +0 -13
- package/src/ai/chain-of-thought.tsx +0 -5
- package/src/ai/chat-jump-rail.tsx +0 -2
- package/src/ai/chat-text.ts +0 -1
- package/src/ai/chat-thread.tsx +0 -9
- package/src/ai/choice-question.tsx +0 -36
- package/src/ai/code-block.tsx +0 -52
- package/src/ai/collapsible.tsx +0 -12
- package/src/ai/conversation-context.ts +0 -14
- package/src/ai/conversation.tsx +0 -58
- package/src/ai/file-chip.tsx +0 -1
- package/src/ai/icon-button.tsx +0 -17
- package/src/ai/index.ts +0 -5
- package/src/ai/message-action-sheet.tsx +0 -8
- package/src/ai/message-context-menu.tsx +0 -22
- package/src/ai/message-quote.tsx +0 -4
- package/src/ai/message.tsx +0 -66
- package/src/ai/prompt-input-menu.tsx +0 -19
- package/src/ai/prompt-input.tsx +0 -97
- package/src/ai/reasoning.tsx +0 -6
- package/src/ai/reply-quote-chip.tsx +0 -5
- package/src/ai/response-text.tsx +0 -8
- package/src/ai/shimmer.tsx +0 -2
- package/src/ai/sources.tsx +0 -3
- package/src/ai/subagent-cards.tsx +0 -13
- package/src/ai/suggestion.tsx +0 -4
- package/src/ai/tool-approval-card.tsx +0 -14
- package/src/ai/trace.tsx +0 -23
- package/src/ai/unified-diff.tsx +0 -16
- package/src/ai/use-streaming-disclosure.ts +0 -4
- package/src/app-root/AuthGroupGate.tsx +38 -0
- package/src/app-root/SsoCallbackScreen.tsx +52 -0
- package/src/app-root/fonts.ts +53 -0
- package/src/app-root/index.ts +6 -0
- package/src/auth/AccountScreens.tsx +0 -16
- package/src/auth/AuthProviders.tsx +0 -13
- package/src/auth/AuthScreen.tsx +95 -6
- package/src/auth/GoogleSignInButton.tsx +0 -12
- package/src/auth/SecondFactorScreen.tsx +17 -15
- package/src/auth/SignInScreen.tsx +103 -105
- package/src/auth/authErrors.ts +0 -6
- package/src/auth/clerkCore3.ts +0 -6
- package/src/auth/index.ts +0 -4
- package/src/auth/totp.ts +0 -13
- package/src/brand/AppIcons.tsx +0 -6
- package/src/brand/AppMark.tsx +0 -5
- package/src/brand/AppWordmark.tsx +0 -7
- package/src/brand/GoogleMark.tsx +0 -4
- package/src/brand/ProviderIcon.tsx +0 -6
- package/src/brand/familyApps.ts +0 -2
- package/src/brand/index.ts +0 -3
- package/src/brand/svg.ts +0 -9
- package/src/configureTheme.ts +0 -10
- package/src/controlStyles.ts +0 -12
- package/src/crash/LastCrashDialog.tsx +36 -0
- package/src/crash/lastCrash.ts +218 -0
- package/src/entries/ai.ts +0 -3
- package/src/entries/ambient.ts +0 -2
- package/src/entries/app-root.ts +1 -0
- package/src/entries/auth.ts +0 -4
- package/src/entries/bottom-sheet.ts +0 -2
- package/src/entries/brand.ts +0 -1
- package/src/entries/button.ts +0 -1
- package/src/entries/crash.ts +13 -0
- package/src/entries/date-time.ts +0 -2
- package/src/entries/expo-router.ts +0 -3
- package/src/entries/expo-web-root.ts +0 -2
- package/src/entries/floating.ts +0 -2
- package/src/entries/generative-ui.ts +0 -4
- package/src/entries/gesture-handler.ts +0 -3
- package/src/entries/keyboard-controller.ts +0 -3
- package/src/entries/layout.ts +0 -2
- package/src/entries/markdown.ts +0 -3
- package/src/entries/marketing.ts +0 -1
- package/src/entries/page-title.ts +0 -5
- package/src/entries/password-input.ts +0 -2
- package/src/entries/paste-input.ts +0 -3
- package/src/entries/primitives.ts +0 -6
- package/src/entries/search-input.ts +0 -2
- package/src/entries/tab-bar.ts +0 -2
- package/src/entries/theme.ts +8 -2
- package/src/entries/toast.ts +0 -3
- package/src/entries/video.ts +0 -2
- package/src/entries/webview.ts +0 -2
- package/src/examples/AiChatGallery.tsx +0 -11
- package/src/examples/ParityGallery.tsx +0 -25
- package/src/floating.ts +0 -6
- package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
- package/src/generative-ui/components.tsx +0 -9
- package/src/generative-ui/context.ts +0 -2
- package/src/glass.ts +31 -0
- package/src/glassBlur.tsx +0 -15
- package/src/highlight.ts +1 -21
- package/src/index.ts +7 -2
- package/src/loadingGrid.ts +0 -12
- package/src/markdown/Markdown.tsx +0 -71
- package/src/markdown/MarkdownTable.tsx +0 -23
- package/src/markdown/tableText.ts +0 -3
- package/src/marketing/PricingModal.tsx +0 -13
- package/src/marketing/UpgradeToProCard.tsx +0 -14
- package/src/marketing/pricing.ts +0 -12
- package/src/media/ImageGallery.tsx +0 -18
- package/src/media/MediaCard.tsx +0 -8
- package/src/media/imageZoom.ts +0 -4
- package/src/media/zoom-image-gesture.tsx +0 -9
- package/src/media/zoomImage.ts +0 -5
- package/src/motion.ts +0 -3
- package/src/neutralTheme.ts +127 -0
- package/src/pagerSwipe.ts +0 -13
- package/src/palette.ts +0 -10
- package/src/pressScale.ts +0 -7
- package/src/primitives/button.tsx +0 -4
- package/src/primitives/card.tsx +0 -1
- package/src/primitives/icon.tsx +0 -2
- package/src/primitives/input.tsx +0 -4
- package/src/primitives/keyboard-controller.tsx +0 -25
- package/src/primitives/keyboard-parts.tsx +0 -27
- package/src/primitives/native-only-animated-view.tsx +0 -5
- package/src/primitives/overlay.tsx +0 -25
- package/src/primitives/pager-gesture.tsx +0 -20
- package/src/primitives/paste-input.tsx +0 -4
- package/src/primitives/paste-parts.tsx +0 -1
- package/src/primitives/select.tsx +0 -18
- package/src/primitives/sheet-drag.tsx +0 -19
- package/src/primitives/sheet-gesture.tsx +0 -22
- package/src/primitives/swipe-row-gesture.tsx +0 -33
- package/src/primitives/switch.tsx +0 -4
- package/src/primitives/text.tsx +0 -4
- package/src/primitives/toast-drag-gesture.tsx +0 -13
- package/src/primitives/web-click-guard.ts +0 -2
- package/src/primitives/window-layer.tsx +0 -18
- package/src/push.ts +0 -15
- package/src/relativeTime.ts +0 -21
- package/src/router/RouterStackPageHeader.tsx +0 -1
- package/src/settings/MoreFromProjectV.tsx +0 -8
- package/src/settings/SettingsEmptyState.tsx +0 -2
- package/src/settings/SettingsSection.tsx +0 -3
- package/src/settings/SettingsToggleRow.tsx +0 -4
- package/src/settings/ThemeModePicker.tsx +2 -16
- package/src/settings/projectVMobileApps.ts +0 -8
- package/src/sheetDrag.ts +0 -9
- package/src/swipeRow.ts +0 -23
- package/src/tabBarRoutes.ts +0 -13
- package/src/tabIndicator.ts +0 -5
- package/src/tailwind-preset.cjs +0 -54
- package/src/tailwind-preset.d.cts +0 -8
- package/src/theme.tsx +11 -2
- package/src/themeModeStore.ts +85 -0
- package/src/themeModes.ts +10 -0
- package/src/toastChrome.ts +0 -6
- package/src/toastDrag.ts +0 -13
- package/src/toastStore.ts +0 -7
- package/src/updateCheck.ts +0 -15
- package/src/video/InlineVideo.tsx +0 -5
- package/src/webview/HtmlView.tsx +0 -23
- package/src/webview/HtmlView.web.tsx +0 -1
- package/src/webview/htmlView.ts +0 -5
- package/types/prism-react-renderer.d.ts +22 -0
package/dist/auth/AuthScreen.jsx
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Keyboard, KeyboardAvoidingView, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
4
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
5
|
import { cn } from "../cn";
|
|
5
6
|
import { textStyle, typeStyle } from "../controlStyles";
|
|
7
|
+
import { floatingShadow } from "../floating";
|
|
6
8
|
import { palette } from "../palette";
|
|
7
9
|
import { tokens } from "../tokens";
|
|
8
10
|
import { useScheme } from "../useScheme";
|
|
9
|
-
|
|
11
|
+
const DEFAULT_HERO_COLOR = "#db2777";
|
|
12
|
+
const DEFAULT_HERO_FOREGROUND = "#ffffff";
|
|
10
13
|
const KEYBOARD_EXTRA = 24;
|
|
11
|
-
|
|
12
|
-
/** The height of the open soft keyboard, or 0. Edge-to-edge Android ignores `adjustResize`, so the screen pads itself. */
|
|
13
14
|
function useKeyboardHeight() {
|
|
14
15
|
const $ = _c(2);
|
|
15
16
|
const [height, setHeight] = useState(0);
|
|
@@ -44,7 +45,7 @@ function _temp(sub) {
|
|
|
44
45
|
return sub.remove();
|
|
45
46
|
}
|
|
46
47
|
export function AuthScreen(t0) {
|
|
47
|
-
const $ = _c(
|
|
48
|
+
const $ = _c(49);
|
|
48
49
|
const {
|
|
49
50
|
title,
|
|
50
51
|
subtitle,
|
|
@@ -52,87 +53,260 @@ export function AuthScreen(t0) {
|
|
|
52
53
|
header,
|
|
53
54
|
footer,
|
|
54
55
|
testID,
|
|
55
|
-
className
|
|
56
|
+
className,
|
|
57
|
+
variant: t1,
|
|
58
|
+
heroColor,
|
|
59
|
+
heroForeground
|
|
56
60
|
} = t0;
|
|
61
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
57
62
|
const scheme = useScheme();
|
|
58
63
|
const keyboardHeight = useKeyboardHeight();
|
|
59
64
|
const keyboardOpen = keyboardHeight > 0;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
if (variant === "hero") {
|
|
66
|
+
const t2 = heroColor ?? DEFAULT_HERO_COLOR;
|
|
67
|
+
const t3 = heroForeground ?? DEFAULT_HERO_FOREGROUND;
|
|
68
|
+
let t4;
|
|
69
|
+
if ($[0] !== children || $[1] !== className || $[2] !== footer || $[3] !== header || $[4] !== subtitle || $[5] !== t2 || $[6] !== t3 || $[7] !== testID || $[8] !== title) {
|
|
70
|
+
t4 = <HeroAuthScreen title={title} subtitle={subtitle} header={header} footer={footer} testID={testID} className={className} heroColor={t2} heroForeground={t3}>{children}</HeroAuthScreen>;
|
|
71
|
+
$[0] = children;
|
|
72
|
+
$[1] = className;
|
|
73
|
+
$[2] = footer;
|
|
74
|
+
$[3] = header;
|
|
75
|
+
$[4] = subtitle;
|
|
76
|
+
$[5] = t2;
|
|
77
|
+
$[6] = t3;
|
|
78
|
+
$[7] = testID;
|
|
79
|
+
$[8] = title;
|
|
80
|
+
$[9] = t4;
|
|
81
|
+
} else {
|
|
82
|
+
t4 = $[9];
|
|
83
|
+
}
|
|
84
|
+
return t4;
|
|
70
85
|
}
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
if ($[
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
$[
|
|
86
|
+
const t2 = tokens.color.background[scheme];
|
|
87
|
+
let t3;
|
|
88
|
+
if ($[10] !== t2) {
|
|
89
|
+
t3 = {
|
|
90
|
+
backgroundColor: t2
|
|
91
|
+
};
|
|
92
|
+
$[10] = t2;
|
|
93
|
+
$[11] = t3;
|
|
78
94
|
} else {
|
|
79
|
-
|
|
95
|
+
t3 = $[11];
|
|
80
96
|
}
|
|
97
|
+
const t4 = keyboardOpen ? "justify-start" : "justify-center";
|
|
81
98
|
let t5;
|
|
82
|
-
if ($[
|
|
83
|
-
t5 =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
$[
|
|
87
|
-
$[6] = keyboardOpen;
|
|
88
|
-
$[7] = t5;
|
|
99
|
+
if ($[12] !== className || $[13] !== t4) {
|
|
100
|
+
t5 = cn("grow px-6 py-12", t4, className);
|
|
101
|
+
$[12] = className;
|
|
102
|
+
$[13] = t4;
|
|
103
|
+
$[14] = t5;
|
|
89
104
|
} else {
|
|
90
|
-
t5 = $[
|
|
105
|
+
t5 = $[14];
|
|
91
106
|
}
|
|
92
107
|
let t6;
|
|
93
|
-
if ($[
|
|
94
|
-
t6 =
|
|
95
|
-
|
|
96
|
-
|
|
108
|
+
if ($[15] !== keyboardHeight || $[16] !== keyboardOpen) {
|
|
109
|
+
t6 = keyboardOpen ? {
|
|
110
|
+
paddingBottom: keyboardHeight + KEYBOARD_EXTRA
|
|
111
|
+
} : undefined;
|
|
112
|
+
$[15] = keyboardHeight;
|
|
113
|
+
$[16] = keyboardOpen;
|
|
114
|
+
$[17] = t6;
|
|
97
115
|
} else {
|
|
98
|
-
t6 = $[
|
|
116
|
+
t6 = $[17];
|
|
99
117
|
}
|
|
100
118
|
let t7;
|
|
101
|
-
if ($[
|
|
102
|
-
t7 =
|
|
103
|
-
$[
|
|
119
|
+
if ($[18] !== scheme) {
|
|
120
|
+
t7 = textStyle("foreground", scheme);
|
|
121
|
+
$[18] = scheme;
|
|
122
|
+
$[19] = t7;
|
|
104
123
|
} else {
|
|
105
|
-
t7 = $[
|
|
124
|
+
t7 = $[19];
|
|
106
125
|
}
|
|
107
126
|
let t8;
|
|
108
|
-
if ($[
|
|
109
|
-
t8 =
|
|
110
|
-
$[
|
|
111
|
-
$[12] = t8;
|
|
127
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
128
|
+
t8 = typeStyle("medium");
|
|
129
|
+
$[20] = t8;
|
|
112
130
|
} else {
|
|
113
|
-
t8 = $[
|
|
131
|
+
t8 = $[20];
|
|
114
132
|
}
|
|
115
133
|
let t9;
|
|
116
|
-
if ($[
|
|
117
|
-
t9 =
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[15] = t9;
|
|
134
|
+
if ($[21] !== t7) {
|
|
135
|
+
t9 = [t7, t8];
|
|
136
|
+
$[21] = t7;
|
|
137
|
+
$[22] = t9;
|
|
121
138
|
} else {
|
|
122
|
-
t9 = $[
|
|
139
|
+
t9 = $[22];
|
|
123
140
|
}
|
|
124
141
|
let t10;
|
|
125
|
-
if ($[
|
|
126
|
-
t10 =
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
142
|
+
if ($[23] !== t9 || $[24] !== title) {
|
|
143
|
+
t10 = <Text accessibilityRole="header" className="font-instrument-sans-medium text-2xl" style={t9}>{title}</Text>;
|
|
144
|
+
$[23] = t9;
|
|
145
|
+
$[24] = title;
|
|
146
|
+
$[25] = t10;
|
|
147
|
+
} else {
|
|
148
|
+
t10 = $[25];
|
|
149
|
+
}
|
|
150
|
+
let t11;
|
|
151
|
+
if ($[26] !== scheme || $[27] !== subtitle) {
|
|
152
|
+
t11 = subtitle ? <Text className="font-instrument-sans text-base" style={textStyle("muted", scheme)}>{subtitle}</Text> : null;
|
|
153
|
+
$[26] = scheme;
|
|
154
|
+
$[27] = subtitle;
|
|
155
|
+
$[28] = t11;
|
|
156
|
+
} else {
|
|
157
|
+
t11 = $[28];
|
|
158
|
+
}
|
|
159
|
+
let t12;
|
|
160
|
+
if ($[29] !== t10 || $[30] !== t11) {
|
|
161
|
+
t12 = <View className="gap-2">{t10}{t11}</View>;
|
|
162
|
+
$[29] = t10;
|
|
163
|
+
$[30] = t11;
|
|
164
|
+
$[31] = t12;
|
|
165
|
+
} else {
|
|
166
|
+
t12 = $[31];
|
|
167
|
+
}
|
|
168
|
+
let t13;
|
|
169
|
+
if ($[32] !== children) {
|
|
170
|
+
t13 = <View className="gap-4">{children}</View>;
|
|
171
|
+
$[32] = children;
|
|
172
|
+
$[33] = t13;
|
|
173
|
+
} else {
|
|
174
|
+
t13 = $[33];
|
|
175
|
+
}
|
|
176
|
+
let t14;
|
|
177
|
+
if ($[34] !== footer) {
|
|
178
|
+
t14 = footer ? <View className="flex-row flex-wrap items-center justify-center gap-1">{footer}</View> : null;
|
|
179
|
+
$[34] = footer;
|
|
180
|
+
$[35] = t14;
|
|
181
|
+
} else {
|
|
182
|
+
t14 = $[35];
|
|
183
|
+
}
|
|
184
|
+
let t15;
|
|
185
|
+
if ($[36] !== header || $[37] !== t12 || $[38] !== t13 || $[39] !== t14) {
|
|
186
|
+
t15 = <View className="w-full max-w-sm self-center gap-6">{header}{t12}{t13}{t14}</View>;
|
|
187
|
+
$[36] = header;
|
|
188
|
+
$[37] = t12;
|
|
189
|
+
$[38] = t13;
|
|
190
|
+
$[39] = t14;
|
|
191
|
+
$[40] = t15;
|
|
192
|
+
} else {
|
|
193
|
+
t15 = $[40];
|
|
194
|
+
}
|
|
195
|
+
let t16;
|
|
196
|
+
if ($[41] !== t15 || $[42] !== t5 || $[43] !== t6 || $[44] !== testID) {
|
|
197
|
+
t16 = <ScrollView testID={testID} className="flex-1" contentContainerClassName={t5} contentContainerStyle={t6} keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag">{t15}</ScrollView>;
|
|
198
|
+
$[41] = t15;
|
|
199
|
+
$[42] = t5;
|
|
200
|
+
$[43] = t6;
|
|
201
|
+
$[44] = testID;
|
|
202
|
+
$[45] = t16;
|
|
203
|
+
} else {
|
|
204
|
+
t16 = $[45];
|
|
205
|
+
}
|
|
206
|
+
let t17;
|
|
207
|
+
if ($[46] !== t16 || $[47] !== t3) {
|
|
208
|
+
t17 = <KeyboardAvoidingView behavior="padding" className="flex-1" style={t3}>{t16}</KeyboardAvoidingView>;
|
|
209
|
+
$[46] = t16;
|
|
210
|
+
$[47] = t3;
|
|
211
|
+
$[48] = t17;
|
|
212
|
+
} else {
|
|
213
|
+
t17 = $[48];
|
|
214
|
+
}
|
|
215
|
+
return t17;
|
|
216
|
+
}
|
|
217
|
+
function HeroAuthScreen(t0) {
|
|
218
|
+
const $ = _c(38);
|
|
219
|
+
const {
|
|
220
|
+
title,
|
|
221
|
+
subtitle,
|
|
222
|
+
children,
|
|
223
|
+
header,
|
|
224
|
+
footer,
|
|
225
|
+
testID,
|
|
226
|
+
className,
|
|
227
|
+
heroColor,
|
|
228
|
+
heroForeground
|
|
229
|
+
} = t0;
|
|
230
|
+
const scheme = useScheme();
|
|
231
|
+
const insets = useSafeAreaInsets();
|
|
232
|
+
let t1;
|
|
233
|
+
if ($[0] !== heroColor) {
|
|
234
|
+
t1 = {
|
|
235
|
+
backgroundColor: heroColor
|
|
236
|
+
};
|
|
237
|
+
$[0] = heroColor;
|
|
238
|
+
$[1] = t1;
|
|
239
|
+
} else {
|
|
240
|
+
t1 = $[1];
|
|
241
|
+
}
|
|
242
|
+
const t2 = insets.top + 24;
|
|
243
|
+
let t3;
|
|
244
|
+
if ($[2] !== t2) {
|
|
245
|
+
t3 = {
|
|
246
|
+
paddingTop: t2
|
|
247
|
+
};
|
|
248
|
+
$[2] = t2;
|
|
249
|
+
$[3] = t3;
|
|
250
|
+
} else {
|
|
251
|
+
t3 = $[3];
|
|
252
|
+
}
|
|
253
|
+
let t4;
|
|
254
|
+
if ($[4] !== heroForeground) {
|
|
255
|
+
t4 = {
|
|
256
|
+
color: heroForeground
|
|
257
|
+
};
|
|
258
|
+
$[4] = heroForeground;
|
|
259
|
+
$[5] = t4;
|
|
260
|
+
} else {
|
|
261
|
+
t4 = $[5];
|
|
262
|
+
}
|
|
263
|
+
let t5;
|
|
264
|
+
if ($[6] !== t4 || $[7] !== title) {
|
|
265
|
+
t5 = <Text accessibilityRole="header" className="mt-10 mb-1 text-4xl font-instrument-sans-medium" style={t4}>{title}</Text>;
|
|
266
|
+
$[6] = t4;
|
|
267
|
+
$[7] = title;
|
|
268
|
+
$[8] = t5;
|
|
269
|
+
} else {
|
|
270
|
+
t5 = $[8];
|
|
271
|
+
}
|
|
272
|
+
let t6;
|
|
273
|
+
if ($[9] !== heroForeground || $[10] !== subtitle) {
|
|
274
|
+
t6 = subtitle ? <Text className="text-lg font-instrument-sans-medium" style={{
|
|
275
|
+
color: heroForeground
|
|
276
|
+
}}>{subtitle}</Text> : null;
|
|
277
|
+
$[9] = heroForeground;
|
|
278
|
+
$[10] = subtitle;
|
|
279
|
+
$[11] = t6;
|
|
280
|
+
} else {
|
|
281
|
+
t6 = $[11];
|
|
282
|
+
}
|
|
283
|
+
let t7;
|
|
284
|
+
if ($[12] !== header || $[13] !== t3 || $[14] !== t5 || $[15] !== t6) {
|
|
285
|
+
t7 = <View className="px-6 pb-6" style={t3}>{header}{t5}{t6}</View>;
|
|
286
|
+
$[12] = header;
|
|
287
|
+
$[13] = t3;
|
|
288
|
+
$[14] = t5;
|
|
289
|
+
$[15] = t6;
|
|
290
|
+
$[16] = t7;
|
|
291
|
+
} else {
|
|
292
|
+
t7 = $[16];
|
|
293
|
+
}
|
|
294
|
+
let t8;
|
|
295
|
+
if ($[17] !== className) {
|
|
296
|
+
t8 = cn("grow rounded-t-[32px] px-6 pt-8", className);
|
|
297
|
+
$[17] = className;
|
|
298
|
+
$[18] = t8;
|
|
130
299
|
} else {
|
|
131
|
-
|
|
300
|
+
t8 = $[18];
|
|
132
301
|
}
|
|
302
|
+
const t9 = tokens.color.surface[scheme];
|
|
303
|
+
const t10 = insets.bottom + 24;
|
|
133
304
|
let t11;
|
|
134
305
|
if ($[19] !== t10 || $[20] !== t9) {
|
|
135
|
-
t11 =
|
|
306
|
+
t11 = [{
|
|
307
|
+
backgroundColor: t9,
|
|
308
|
+
paddingBottom: t10
|
|
309
|
+
}, floatingShadow];
|
|
136
310
|
$[19] = t10;
|
|
137
311
|
$[20] = t9;
|
|
138
312
|
$[21] = t11;
|
|
@@ -149,42 +323,41 @@ export function AuthScreen(t0) {
|
|
|
149
323
|
}
|
|
150
324
|
let t13;
|
|
151
325
|
if ($[24] !== footer) {
|
|
152
|
-
t13 = footer ? <View className="flex-row flex-wrap items-center justify-center gap-1">{footer}</View> : null;
|
|
326
|
+
t13 = footer ? <View className="mt-6 flex-row flex-wrap items-center justify-center gap-1">{footer}</View> : null;
|
|
153
327
|
$[24] = footer;
|
|
154
328
|
$[25] = t13;
|
|
155
329
|
} else {
|
|
156
330
|
t13 = $[25];
|
|
157
331
|
}
|
|
158
332
|
let t14;
|
|
159
|
-
if ($[26] !==
|
|
160
|
-
t14 = <View className=
|
|
161
|
-
$[26] =
|
|
162
|
-
$[27] =
|
|
163
|
-
$[28] =
|
|
164
|
-
$[29] =
|
|
333
|
+
if ($[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t8) {
|
|
334
|
+
t14 = <View className={t8} style={t11}>{t12}{t13}</View>;
|
|
335
|
+
$[26] = t11;
|
|
336
|
+
$[27] = t12;
|
|
337
|
+
$[28] = t13;
|
|
338
|
+
$[29] = t8;
|
|
165
339
|
$[30] = t14;
|
|
166
340
|
} else {
|
|
167
341
|
t14 = $[30];
|
|
168
342
|
}
|
|
169
343
|
let t15;
|
|
170
|
-
if ($[31] !== t14 || $[32] !==
|
|
171
|
-
t15 = <ScrollView testID={testID} className="flex-1" contentContainerClassName=
|
|
344
|
+
if ($[31] !== t14 || $[32] !== t7 || $[33] !== testID) {
|
|
345
|
+
t15 = <ScrollView testID={testID} className="flex-1" contentContainerClassName="grow" keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag">{t7}{t14}</ScrollView>;
|
|
172
346
|
$[31] = t14;
|
|
173
|
-
$[32] =
|
|
174
|
-
$[33] =
|
|
175
|
-
$[34] =
|
|
176
|
-
$[35] = t15;
|
|
347
|
+
$[32] = t7;
|
|
348
|
+
$[33] = testID;
|
|
349
|
+
$[34] = t15;
|
|
177
350
|
} else {
|
|
178
|
-
t15 = $[
|
|
351
|
+
t15 = $[34];
|
|
179
352
|
}
|
|
180
353
|
let t16;
|
|
181
|
-
if ($[
|
|
182
|
-
t16 = <KeyboardAvoidingView behavior="padding" className="flex-1" style={
|
|
354
|
+
if ($[35] !== t1 || $[36] !== t15) {
|
|
355
|
+
t16 = <KeyboardAvoidingView behavior="padding" className="flex-1" style={t1}>{t15}</KeyboardAvoidingView>;
|
|
356
|
+
$[35] = t1;
|
|
183
357
|
$[36] = t15;
|
|
184
|
-
$[37] =
|
|
185
|
-
$[38] = t16;
|
|
358
|
+
$[37] = t16;
|
|
186
359
|
} else {
|
|
187
|
-
t16 = $[
|
|
360
|
+
t16 = $[37];
|
|
188
361
|
}
|
|
189
362
|
return t16;
|
|
190
363
|
}
|
|
@@ -9,8 +9,6 @@ import { GoogleMark } from "../brand/GoogleMark";
|
|
|
9
9
|
import { Button } from "../Button";
|
|
10
10
|
import { toast } from "../toastStore";
|
|
11
11
|
import { authErrorMessage } from "./authErrors";
|
|
12
|
-
|
|
13
|
-
// Completes the Google browser session when the app reopens on the redirect.
|
|
14
12
|
WebBrowser.maybeCompleteAuthSession();
|
|
15
13
|
export const GOOGLE_ERROR_MESSAGE = "Could not continue with Google";
|
|
16
14
|
/** Warms the Android custom tab while the screen is up, as the Expo guide suggests. */
|
|
@@ -66,7 +64,6 @@ export function useGoogleSignIn({
|
|
|
66
64
|
path: redirectPath
|
|
67
65
|
})
|
|
68
66
|
});
|
|
69
|
-
// No session: the user closed the browser, or more steps are needed.
|
|
70
67
|
if (createdSessionId && setActive) {
|
|
71
68
|
await setActive({
|
|
72
69
|
session: createdSessionId
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
// Clerk-free: a one-time code step. The caller owns the verification call and
|
|
3
|
-
// its errors (`useSecondFactor` does both for Clerk).
|
|
4
2
|
import { useState } from "react";
|
|
5
3
|
import { Button } from "../Button";
|
|
6
4
|
import { Input } from "../Input";
|
|
7
5
|
import { AuthScreen, FieldError } from "./AuthScreen";
|
|
8
6
|
/** A one-time code step: digits only, a Verify button, an inline error and a back link. */
|
|
9
7
|
export function SecondFactorScreen(t0) {
|
|
10
|
-
const $ = _c(
|
|
8
|
+
const $ = _c(43);
|
|
11
9
|
const {
|
|
12
10
|
title,
|
|
13
11
|
description,
|
|
@@ -21,7 +19,10 @@ export function SecondFactorScreen(t0) {
|
|
|
21
19
|
testIDPrefix: t4,
|
|
22
20
|
footer,
|
|
23
21
|
digitsOnly: t5,
|
|
24
|
-
placeholder
|
|
22
|
+
placeholder,
|
|
23
|
+
variant,
|
|
24
|
+
heroColor,
|
|
25
|
+
heroForeground
|
|
25
26
|
} = t0;
|
|
26
27
|
const codeLength = t1 === undefined ? 6 : t1;
|
|
27
28
|
const loading = t2 === undefined ? false : t2;
|
|
@@ -114,20 +115,23 @@ export function SecondFactorScreen(t0) {
|
|
|
114
115
|
t18 = $[29];
|
|
115
116
|
}
|
|
116
117
|
let t19;
|
|
117
|
-
if ($[30] !== description || $[31] !== footer || $[32] !== header || $[33] !==
|
|
118
|
-
t19 = <AuthScreen testID={t7} title={title} subtitle={description} header={header} footer={footer}>{t12}{t14}{t17}{t18}</AuthScreen>;
|
|
118
|
+
if ($[30] !== description || $[31] !== footer || $[32] !== header || $[33] !== heroColor || $[34] !== heroForeground || $[35] !== t12 || $[36] !== t14 || $[37] !== t17 || $[38] !== t18 || $[39] !== t7 || $[40] !== title || $[41] !== variant) {
|
|
119
|
+
t19 = <AuthScreen testID={t7} title={title} subtitle={description} header={header} footer={footer} variant={variant} heroColor={heroColor} heroForeground={heroForeground}>{t12}{t14}{t17}{t18}</AuthScreen>;
|
|
119
120
|
$[30] = description;
|
|
120
121
|
$[31] = footer;
|
|
121
122
|
$[32] = header;
|
|
122
|
-
$[33] =
|
|
123
|
-
$[34] =
|
|
124
|
-
$[35] =
|
|
125
|
-
$[36] =
|
|
126
|
-
$[37] =
|
|
127
|
-
$[38] =
|
|
128
|
-
$[39] =
|
|
123
|
+
$[33] = heroColor;
|
|
124
|
+
$[34] = heroForeground;
|
|
125
|
+
$[35] = t12;
|
|
126
|
+
$[36] = t14;
|
|
127
|
+
$[37] = t17;
|
|
128
|
+
$[38] = t18;
|
|
129
|
+
$[39] = t7;
|
|
130
|
+
$[40] = title;
|
|
131
|
+
$[41] = variant;
|
|
132
|
+
$[42] = t19;
|
|
129
133
|
} else {
|
|
130
|
-
t19 = $[
|
|
134
|
+
t19 = $[42];
|
|
131
135
|
}
|
|
132
136
|
return t19;
|
|
133
137
|
}
|