@vvedantb/native-ui 0.17.2 → 0.18.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/dist/AlertDialog.jsx +123 -0
- package/dist/AmbientBackground.jsx +73 -0
- package/dist/ArtifactList.jsx +59 -0
- package/dist/Avatar.jsx +285 -0
- package/dist/Badge.jsx +154 -0
- package/dist/BottomSheetContainer.jsx +208 -0
- package/dist/BulkActionBar.jsx +717 -0
- package/dist/Button.jsx +344 -0
- package/dist/CaptureButton.jsx +104 -0
- package/dist/Card.jsx +371 -0
- package/dist/Checkbox.jsx +177 -0
- package/dist/Chip.jsx +79 -0
- package/dist/ColorSwatches.jsx +159 -0
- package/dist/ConfirmDialog.jsx +157 -0
- package/dist/DateTimeField.jsx +204 -0
- package/dist/Dialog.jsx +614 -0
- package/dist/DividedList.jsx +120 -0
- package/dist/DropdownMenu.jsx +849 -0
- package/dist/EmptyState.jsx +434 -0
- package/dist/ExpoWebRoot.jsx +134 -0
- package/dist/FloatingFAB.jsx +95 -0
- package/dist/FloatingSurface.jsx +226 -0
- package/dist/FloatingTabBar.jsx +403 -0
- package/dist/HeaderIconButton.jsx +53 -0
- package/dist/IconButton.jsx +157 -0
- package/dist/Input.jsx +96 -0
- package/dist/Label.jsx +96 -0
- package/dist/LabeledSwitchRow.jsx +170 -0
- package/dist/LiquidGlass.jsx +2 -0
- package/dist/ListRow.jsx +281 -0
- package/dist/LoadingState.jsx +205 -0
- package/dist/PageIndicator.jsx +128 -0
- package/dist/PageTitle.jsx +205 -0
- package/dist/Pager.jsx +105 -0
- package/dist/PasswordInput.jsx +120 -0
- package/dist/PillTabs.jsx +300 -0
- package/dist/PinnedBotTile.jsx +212 -0
- package/dist/Progress.jsx +147 -0
- package/dist/SafeAreaContainer.jsx +38 -0
- package/dist/ScreenContainer.jsx +117 -0
- package/dist/SearchInput.jsx +150 -0
- package/dist/SectionLabel.jsx +128 -0
- package/dist/Select.jsx +223 -0
- package/dist/Separator.jsx +95 -0
- package/dist/Sheet.jsx +343 -0
- package/dist/SheetRow.jsx +198 -0
- package/dist/Skeleton.jsx +311 -0
- package/dist/Spinner.jsx +195 -0
- package/dist/StackPageHeader.jsx +160 -0
- package/dist/StatGrid.jsx +74 -0
- package/dist/StatusDot.jsx +129 -0
- package/dist/SurfaceRow.jsx +143 -0
- package/dist/SwipeableRow.jsx +50 -0
- package/dist/Switch.jsx +130 -0
- package/dist/Tabs.jsx +385 -0
- package/dist/Textarea.jsx +103 -0
- package/dist/ThemeToggle.jsx +78 -0
- package/dist/Toast.jsx +396 -0
- package/dist/ai/activity-step-detail.jsx +179 -0
- package/dist/ai/activity-step-label.js +816 -0
- package/dist/ai/activity-step-types.js +14 -0
- package/dist/ai/activity-step.jsx +98 -0
- package/dist/ai/activity-tasks-utils.js +172 -0
- package/dist/ai/activity-timeline.js +47 -0
- package/dist/ai/attachments.jsx +258 -0
- package/dist/ai/card-button.jsx +188 -0
- package/dist/ai/chain-of-thought.jsx +459 -0
- package/dist/ai/chat-jump-rail.jsx +57 -0
- package/dist/ai/chat-text.js +44 -0
- package/dist/ai/chat-thread.jsx +135 -0
- package/dist/ai/choice-question.jsx +925 -0
- package/dist/ai/code-block.jsx +574 -0
- package/dist/ai/collapsible.jsx +275 -0
- package/dist/ai/conversation.jsx +723 -0
- package/dist/ai/file-chip.jsx +198 -0
- package/dist/ai/icon-button.jsx +179 -0
- package/dist/ai/index.js +37 -0
- package/dist/ai/message-action-sheet.jsx +408 -0
- package/dist/ai/message-quote.jsx +241 -0
- package/dist/ai/message.jsx +739 -0
- package/dist/ai/prompt-input-menu.jsx +365 -0
- package/dist/ai/prompt-input.jsx +626 -0
- package/dist/ai/reasoning.jsx +446 -0
- package/dist/ai/reply-quote-chip.jsx +278 -0
- package/dist/ai/response-text.jsx +130 -0
- package/dist/ai/shimmer.jsx +149 -0
- package/dist/ai/sources.jsx +260 -0
- package/dist/ai/subagent-cards.jsx +645 -0
- package/dist/ai/suggestion.jsx +186 -0
- package/dist/ai/tool-approval-card.jsx +359 -0
- package/dist/ai/trace.jsx +728 -0
- package/dist/ai/unified-diff.jsx +280 -0
- package/dist/ai/use-streaming-disclosure.js +70 -0
- package/dist/auth/AuthProviders.jsx +27 -0
- package/dist/auth/AuthScreen.jsx +292 -0
- package/dist/auth/GoogleSignInButton.jsx +188 -0
- package/dist/auth/SecondFactorScreen.jsx +133 -0
- package/dist/auth/SignInScreen.jsx +482 -0
- package/dist/auth/authErrors.js +131 -0
- package/dist/auth/index.js +11 -0
- package/dist/auth/totp.js +378 -0
- package/dist/blur.js +36 -0
- package/dist/brand/AppIcons.jsx +118 -0
- package/dist/brand/AppMark.jsx +128 -0
- package/dist/brand/AppWordmark.jsx +138 -0
- package/dist/brand/GoogleMark.jsx +71 -0
- package/dist/brand/ProviderIcon.jsx +192 -0
- package/dist/brand/familyApps.js +33 -0
- package/dist/brand/index.js +11 -0
- package/dist/brand/svg.js +252 -0
- package/dist/brand/vProAppBenefits.js +19 -0
- package/dist/cn.js +5 -0
- package/dist/colors.js +15 -0
- package/dist/configureTheme.js +72 -0
- package/dist/controlStyles.js +520 -0
- package/dist/definiteSize.js +12 -0
- package/dist/dialogLayout.js +18 -0
- package/dist/entries/ai.js +4 -0
- package/dist/entries/ambient.js +3 -0
- package/dist/entries/auth.js +5 -0
- package/dist/entries/bottom-sheet.js +2 -0
- package/dist/entries/brand.js +2 -0
- package/dist/entries/button.js +2 -0
- package/dist/entries/date-time.js +3 -0
- package/dist/entries/expo-router.js +4 -0
- package/dist/entries/expo-web-root.js +3 -0
- package/dist/entries/floating.js +7 -0
- package/dist/entries/gesture-handler.js +4 -0
- package/dist/entries/keyboard-controller.js +4 -0
- package/dist/entries/layout.js +16 -0
- package/dist/entries/markdown.js +4 -0
- package/dist/entries/marketing.js +3 -0
- package/dist/entries/page-title.js +7 -0
- package/dist/entries/password-input.js +3 -0
- package/dist/entries/primitives.js +57 -0
- package/dist/entries/search-input.js +3 -0
- package/dist/entries/tab-bar.js +4 -0
- package/dist/entries/theme.js +7 -0
- package/dist/entries/toast.js +5 -0
- package/dist/entries/video.js +3 -0
- package/dist/entries/webview.js +4 -0
- package/dist/examples/AiChatGallery.jsx +509 -0
- package/dist/examples/ParityGallery.jsx +1307 -0
- package/dist/floating.js +62 -0
- package/dist/glassBlur.jsx +145 -0
- package/dist/gradient.js +17 -0
- package/dist/haptics.js +44 -0
- package/dist/highlight.js +382 -0
- package/dist/index.js +85 -0
- package/dist/initials.js +4 -0
- package/dist/loadingGrid.js +81 -0
- package/dist/markdown/Markdown.jsx +515 -0
- package/dist/markdown/MarkdownTable.jsx +443 -0
- package/dist/markdown/tableText.js +68 -0
- package/dist/marketing/PricingModal.jsx +608 -0
- package/dist/marketing/UpgradeToProCard.jsx +164 -0
- package/dist/marketing/pricing.js +34 -0
- package/dist/media/ImageGallery.jsx +580 -0
- package/dist/media/MediaCard.jsx +162 -0
- package/dist/media/imageGrid.js +54 -0
- package/dist/motion.js +33 -0
- package/dist/pagerSwipe.js +104 -0
- package/dist/palette.js +104 -0
- package/dist/primitives/button.jsx +127 -0
- package/dist/primitives/card.jsx +249 -0
- package/dist/primitives/icon.jsx +37 -0
- package/dist/primitives/input.jsx +56 -0
- package/dist/primitives/keyboard-controller.jsx +207 -0
- package/dist/primitives/keyboard-parts.jsx +75 -0
- package/dist/primitives/native-only-animated-view.jsx +68 -0
- package/dist/primitives/overlay.jsx +391 -0
- package/dist/primitives/pager-gesture.jsx +131 -0
- package/dist/primitives/select-host.jsx +103 -0
- package/dist/primitives/select.jsx +555 -0
- package/dist/primitives/sheet-drag.jsx +420 -0
- package/dist/primitives/sheet-gesture.jsx +219 -0
- package/dist/primitives/swipe-row-gesture.jsx +341 -0
- package/dist/primitives/switch.jsx +105 -0
- package/dist/primitives/text.jsx +145 -0
- package/dist/primitives/toast-drag-gesture.jsx +94 -0
- package/dist/primitives/use-controllable-state.js +40 -0
- package/dist/primitives/web-click-guard.js +69 -0
- package/dist/push.js +166 -0
- package/dist/relativeTime.js +70 -0
- package/dist/router/RouterStackPageHeader.jsx +53 -0
- package/dist/selectA11y.js +32 -0
- package/dist/settings/MoreFromProjectV.jsx +168 -0
- package/dist/settings/SettingsEmptyState.jsx +102 -0
- package/dist/settings/SettingsField.jsx +49 -0
- package/dist/settings/SettingsSection.jsx +101 -0
- package/dist/settings/SettingsStack.jsx +17 -0
- package/dist/settings/SettingsToggleRow.jsx +163 -0
- package/dist/settings/projectVMobileApps.js +126 -0
- package/dist/settings/relaxedSizeStyle.js +11 -0
- package/dist/sheetDrag.js +76 -0
- package/dist/svgA11y.js +46 -0
- package/dist/swipeRow.js +161 -0
- package/dist/tabBarRoutes.js +41 -0
- package/dist/tabIndicator.js +139 -0
- package/dist/tailwind-preset.cjs +255 -0
- package/dist/tailwind-preset.d.cts +55 -0
- package/dist/theme.jsx +62 -0
- package/dist/toastChrome.js +110 -0
- package/dist/toastDrag.js +51 -0
- package/dist/toastStore.js +54 -0
- package/dist/tokens.js +70 -0
- package/dist/typography.js +40 -0
- package/dist/useReduceMotion.js +32 -0
- package/dist/useReduceTransparency.js +27 -0
- package/dist/useScheme.js +15 -0
- package/dist/video/InlineVideo.jsx +115 -0
- package/dist/webview/HtmlView.jsx +169 -0
- package/dist/webview/HtmlView.web.jsx +63 -0
- package/dist/webview/htmlView.js +43 -0
- package/package.json +70 -33
- package/src/DropdownMenu.tsx +28 -16
- package/src/FloatingTabBar.tsx +78 -41
- package/src/ai/conversation.tsx +12 -8
- package/src/glassBlur.tsx +47 -22
- package/src/primitives/swipe-row-gesture.tsx +11 -2
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { View, Text } from "react-native";
|
|
4
|
+
import { IconInbox } from "@tabler/icons-react-native";
|
|
5
|
+
import { cn } from "./cn";
|
|
6
|
+
import { textStyle, typeStyle } from "./controlStyles";
|
|
7
|
+
import { palette } from "./palette";
|
|
8
|
+
import { tokens } from "./tokens";
|
|
9
|
+
import { useLargerText } from "./theme";
|
|
10
|
+
import { useScheme } from "./useScheme";
|
|
11
|
+
function EmptyStateView(t0) {
|
|
12
|
+
const $ = _c(28);
|
|
13
|
+
const {
|
|
14
|
+
title,
|
|
15
|
+
description,
|
|
16
|
+
icon: t1,
|
|
17
|
+
action,
|
|
18
|
+
compact: t2,
|
|
19
|
+
testID
|
|
20
|
+
} = t0;
|
|
21
|
+
const Icon = t1 === undefined ? IconInbox : t1;
|
|
22
|
+
const compact = t2 === undefined ? false : t2;
|
|
23
|
+
const largerText = useLargerText();
|
|
24
|
+
const scheme = useScheme();
|
|
25
|
+
const t3 = `items-center px-4 ${compact ? "py-6" : "py-16"}`;
|
|
26
|
+
const t4 = largerText ? 44 : 40;
|
|
27
|
+
const t5 = tokens.color.muted[scheme];
|
|
28
|
+
let t6;
|
|
29
|
+
if ($[0] !== Icon || $[1] !== t4 || $[2] !== t5) {
|
|
30
|
+
t6 = <Icon size={t4} color={t5} />;
|
|
31
|
+
$[0] = Icon;
|
|
32
|
+
$[1] = t4;
|
|
33
|
+
$[2] = t5;
|
|
34
|
+
$[3] = t6;
|
|
35
|
+
} else {
|
|
36
|
+
t6 = $[3];
|
|
37
|
+
}
|
|
38
|
+
const t7 = largerText ? "text-xl" : "text-lg";
|
|
39
|
+
let t8;
|
|
40
|
+
if ($[4] !== t7) {
|
|
41
|
+
t8 = cn("mt-4 text-center font-instrument-sans-semibold", t7);
|
|
42
|
+
$[4] = t7;
|
|
43
|
+
$[5] = t8;
|
|
44
|
+
} else {
|
|
45
|
+
t8 = $[5];
|
|
46
|
+
}
|
|
47
|
+
let t9;
|
|
48
|
+
if ($[6] !== scheme) {
|
|
49
|
+
t9 = textStyle("foreground", scheme);
|
|
50
|
+
$[6] = scheme;
|
|
51
|
+
$[7] = t9;
|
|
52
|
+
} else {
|
|
53
|
+
t9 = $[7];
|
|
54
|
+
}
|
|
55
|
+
let t10;
|
|
56
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
57
|
+
t10 = typeStyle("semibold");
|
|
58
|
+
$[8] = t10;
|
|
59
|
+
} else {
|
|
60
|
+
t10 = $[8];
|
|
61
|
+
}
|
|
62
|
+
let t11;
|
|
63
|
+
if ($[9] !== t9) {
|
|
64
|
+
t11 = [t9, t10];
|
|
65
|
+
$[9] = t9;
|
|
66
|
+
$[10] = t11;
|
|
67
|
+
} else {
|
|
68
|
+
t11 = $[10];
|
|
69
|
+
}
|
|
70
|
+
let t12;
|
|
71
|
+
if ($[11] !== t11 || $[12] !== t8 || $[13] !== title) {
|
|
72
|
+
t12 = <Text className={t8} style={t11}>{title}</Text>;
|
|
73
|
+
$[11] = t11;
|
|
74
|
+
$[12] = t8;
|
|
75
|
+
$[13] = title;
|
|
76
|
+
$[14] = t12;
|
|
77
|
+
} else {
|
|
78
|
+
t12 = $[14];
|
|
79
|
+
}
|
|
80
|
+
let t13;
|
|
81
|
+
if ($[15] !== description || $[16] !== largerText || $[17] !== scheme) {
|
|
82
|
+
t13 = description ? <Text className={cn("mt-2 max-w-sm text-center font-instrument-sans", largerText ? "text-lg" : "text-base")} style={textStyle("muted", scheme)}>{description}</Text> : null;
|
|
83
|
+
$[15] = description;
|
|
84
|
+
$[16] = largerText;
|
|
85
|
+
$[17] = scheme;
|
|
86
|
+
$[18] = t13;
|
|
87
|
+
} else {
|
|
88
|
+
t13 = $[18];
|
|
89
|
+
}
|
|
90
|
+
let t14;
|
|
91
|
+
if ($[19] !== action) {
|
|
92
|
+
t14 = action ? <View className="mt-6">{action}</View> : null;
|
|
93
|
+
$[19] = action;
|
|
94
|
+
$[20] = t14;
|
|
95
|
+
} else {
|
|
96
|
+
t14 = $[20];
|
|
97
|
+
}
|
|
98
|
+
let t15;
|
|
99
|
+
if ($[21] !== t12 || $[22] !== t13 || $[23] !== t14 || $[24] !== t3 || $[25] !== t6 || $[26] !== testID) {
|
|
100
|
+
t15 = <View testID={testID} className={t3}>{t6}{t12}{t13}{t14}</View>;
|
|
101
|
+
$[21] = t12;
|
|
102
|
+
$[22] = t13;
|
|
103
|
+
$[23] = t14;
|
|
104
|
+
$[24] = t3;
|
|
105
|
+
$[25] = t6;
|
|
106
|
+
$[26] = testID;
|
|
107
|
+
$[27] = t15;
|
|
108
|
+
} else {
|
|
109
|
+
t15 = $[27];
|
|
110
|
+
}
|
|
111
|
+
return t15;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Composable parts with the web names (`EmptyState.Root`, `.Icon`, `.Title`,
|
|
115
|
+
// `.Description`, `.Actions`). `Root` sets the variant, the parts read it.
|
|
116
|
+
|
|
117
|
+
/** `default`: open centred block with a large bare icon. `panel`: filled rounded block, icon in a tile. */
|
|
118
|
+
|
|
119
|
+
const EmptyStateContext = createContext("default");
|
|
120
|
+
function Root(t0) {
|
|
121
|
+
const $ = _c(13);
|
|
122
|
+
let className;
|
|
123
|
+
let props;
|
|
124
|
+
let t1;
|
|
125
|
+
if ($[0] !== t0) {
|
|
126
|
+
({
|
|
127
|
+
variant: t1,
|
|
128
|
+
className,
|
|
129
|
+
...props
|
|
130
|
+
} = t0);
|
|
131
|
+
$[0] = t0;
|
|
132
|
+
$[1] = className;
|
|
133
|
+
$[2] = props;
|
|
134
|
+
$[3] = t1;
|
|
135
|
+
} else {
|
|
136
|
+
className = $[1];
|
|
137
|
+
props = $[2];
|
|
138
|
+
t1 = $[3];
|
|
139
|
+
}
|
|
140
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
141
|
+
const t2 = variant === "panel" ? "rounded-[20px] bg-surface-secondary px-4 py-10" : "px-4 py-16";
|
|
142
|
+
let t3;
|
|
143
|
+
if ($[4] !== className || $[5] !== t2) {
|
|
144
|
+
t3 = cn("items-center justify-center", t2, className);
|
|
145
|
+
$[4] = className;
|
|
146
|
+
$[5] = t2;
|
|
147
|
+
$[6] = t3;
|
|
148
|
+
} else {
|
|
149
|
+
t3 = $[6];
|
|
150
|
+
}
|
|
151
|
+
let t4;
|
|
152
|
+
if ($[7] !== props || $[8] !== t3) {
|
|
153
|
+
t4 = <View className={t3} {...props} />;
|
|
154
|
+
$[7] = props;
|
|
155
|
+
$[8] = t3;
|
|
156
|
+
$[9] = t4;
|
|
157
|
+
} else {
|
|
158
|
+
t4 = $[9];
|
|
159
|
+
}
|
|
160
|
+
let t5;
|
|
161
|
+
if ($[10] !== t4 || $[11] !== variant) {
|
|
162
|
+
t5 = <EmptyStateContext.Provider value={variant}>{t4}</EmptyStateContext.Provider>;
|
|
163
|
+
$[10] = t4;
|
|
164
|
+
$[11] = variant;
|
|
165
|
+
$[12] = t5;
|
|
166
|
+
} else {
|
|
167
|
+
t5 = $[12];
|
|
168
|
+
}
|
|
169
|
+
return t5;
|
|
170
|
+
}
|
|
171
|
+
function Icon(t0) {
|
|
172
|
+
const $ = _c(23);
|
|
173
|
+
const {
|
|
174
|
+
icon: IconComponent,
|
|
175
|
+
size,
|
|
176
|
+
stroke,
|
|
177
|
+
className
|
|
178
|
+
} = t0;
|
|
179
|
+
const variant = useContext(EmptyStateContext);
|
|
180
|
+
const scheme = useScheme();
|
|
181
|
+
if (variant === "panel") {
|
|
182
|
+
let t1;
|
|
183
|
+
if ($[0] !== className) {
|
|
184
|
+
t1 = cn("mb-3 h-11 w-11 items-center justify-center rounded-xl", className);
|
|
185
|
+
$[0] = className;
|
|
186
|
+
$[1] = t1;
|
|
187
|
+
} else {
|
|
188
|
+
t1 = $[1];
|
|
189
|
+
}
|
|
190
|
+
const t2 = palette.surfaceTertiary[scheme];
|
|
191
|
+
let t3;
|
|
192
|
+
if ($[2] !== t2) {
|
|
193
|
+
t3 = {
|
|
194
|
+
backgroundColor: t2
|
|
195
|
+
};
|
|
196
|
+
$[2] = t2;
|
|
197
|
+
$[3] = t3;
|
|
198
|
+
} else {
|
|
199
|
+
t3 = $[3];
|
|
200
|
+
}
|
|
201
|
+
const t4 = size ?? 22;
|
|
202
|
+
const t5 = stroke ?? 1.5;
|
|
203
|
+
const t6 = tokens.color.muted[scheme];
|
|
204
|
+
let t7;
|
|
205
|
+
if ($[4] !== IconComponent || $[5] !== t4 || $[6] !== t5 || $[7] !== t6) {
|
|
206
|
+
t7 = <IconComponent size={t4} strokeWidth={t5} color={t6} />;
|
|
207
|
+
$[4] = IconComponent;
|
|
208
|
+
$[5] = t4;
|
|
209
|
+
$[6] = t5;
|
|
210
|
+
$[7] = t6;
|
|
211
|
+
$[8] = t7;
|
|
212
|
+
} else {
|
|
213
|
+
t7 = $[8];
|
|
214
|
+
}
|
|
215
|
+
let t8;
|
|
216
|
+
if ($[9] !== t1 || $[10] !== t3 || $[11] !== t7) {
|
|
217
|
+
t8 = <View className={t1} style={t3}>{t7}</View>;
|
|
218
|
+
$[9] = t1;
|
|
219
|
+
$[10] = t3;
|
|
220
|
+
$[11] = t7;
|
|
221
|
+
$[12] = t8;
|
|
222
|
+
} else {
|
|
223
|
+
t8 = $[12];
|
|
224
|
+
}
|
|
225
|
+
return t8;
|
|
226
|
+
}
|
|
227
|
+
let t1;
|
|
228
|
+
if ($[13] !== className) {
|
|
229
|
+
t1 = cn("mb-4", className);
|
|
230
|
+
$[13] = className;
|
|
231
|
+
$[14] = t1;
|
|
232
|
+
} else {
|
|
233
|
+
t1 = $[14];
|
|
234
|
+
}
|
|
235
|
+
const t2 = size ?? 40;
|
|
236
|
+
const t3 = tokens.color.muted[scheme];
|
|
237
|
+
let t4;
|
|
238
|
+
if ($[15] !== IconComponent || $[16] !== stroke || $[17] !== t2 || $[18] !== t3) {
|
|
239
|
+
t4 = <IconComponent size={t2} strokeWidth={stroke} color={t3} />;
|
|
240
|
+
$[15] = IconComponent;
|
|
241
|
+
$[16] = stroke;
|
|
242
|
+
$[17] = t2;
|
|
243
|
+
$[18] = t3;
|
|
244
|
+
$[19] = t4;
|
|
245
|
+
} else {
|
|
246
|
+
t4 = $[19];
|
|
247
|
+
}
|
|
248
|
+
let t5;
|
|
249
|
+
if ($[20] !== t1 || $[21] !== t4) {
|
|
250
|
+
t5 = <View className={t1}>{t4}</View>;
|
|
251
|
+
$[20] = t1;
|
|
252
|
+
$[21] = t4;
|
|
253
|
+
$[22] = t5;
|
|
254
|
+
} else {
|
|
255
|
+
t5 = $[22];
|
|
256
|
+
}
|
|
257
|
+
return t5;
|
|
258
|
+
}
|
|
259
|
+
function Title(t0) {
|
|
260
|
+
const $ = _c(17);
|
|
261
|
+
let className;
|
|
262
|
+
let props;
|
|
263
|
+
let style;
|
|
264
|
+
if ($[0] !== t0) {
|
|
265
|
+
({
|
|
266
|
+
className,
|
|
267
|
+
style,
|
|
268
|
+
...props
|
|
269
|
+
} = t0);
|
|
270
|
+
$[0] = t0;
|
|
271
|
+
$[1] = className;
|
|
272
|
+
$[2] = props;
|
|
273
|
+
$[3] = style;
|
|
274
|
+
} else {
|
|
275
|
+
className = $[1];
|
|
276
|
+
props = $[2];
|
|
277
|
+
style = $[3];
|
|
278
|
+
}
|
|
279
|
+
const largerText = useLargerText();
|
|
280
|
+
const scheme = useScheme();
|
|
281
|
+
const t1 = largerText ? "text-xl" : "text-lg";
|
|
282
|
+
let t2;
|
|
283
|
+
if ($[4] !== className || $[5] !== t1) {
|
|
284
|
+
t2 = cn("text-center font-instrument-sans-semibold", t1, className);
|
|
285
|
+
$[4] = className;
|
|
286
|
+
$[5] = t1;
|
|
287
|
+
$[6] = t2;
|
|
288
|
+
} else {
|
|
289
|
+
t2 = $[6];
|
|
290
|
+
}
|
|
291
|
+
let t3;
|
|
292
|
+
if ($[7] !== scheme) {
|
|
293
|
+
t3 = textStyle("foreground", scheme);
|
|
294
|
+
$[7] = scheme;
|
|
295
|
+
$[8] = t3;
|
|
296
|
+
} else {
|
|
297
|
+
t3 = $[8];
|
|
298
|
+
}
|
|
299
|
+
let t4;
|
|
300
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
301
|
+
t4 = typeStyle("semibold");
|
|
302
|
+
$[9] = t4;
|
|
303
|
+
} else {
|
|
304
|
+
t4 = $[9];
|
|
305
|
+
}
|
|
306
|
+
let t5;
|
|
307
|
+
if ($[10] !== style || $[11] !== t3) {
|
|
308
|
+
t5 = [t3, t4, style];
|
|
309
|
+
$[10] = style;
|
|
310
|
+
$[11] = t3;
|
|
311
|
+
$[12] = t5;
|
|
312
|
+
} else {
|
|
313
|
+
t5 = $[12];
|
|
314
|
+
}
|
|
315
|
+
let t6;
|
|
316
|
+
if ($[13] !== props || $[14] !== t2 || $[15] !== t5) {
|
|
317
|
+
t6 = <Text className={t2} style={t5} {...props} />;
|
|
318
|
+
$[13] = props;
|
|
319
|
+
$[14] = t2;
|
|
320
|
+
$[15] = t5;
|
|
321
|
+
$[16] = t6;
|
|
322
|
+
} else {
|
|
323
|
+
t6 = $[16];
|
|
324
|
+
}
|
|
325
|
+
return t6;
|
|
326
|
+
}
|
|
327
|
+
function Description(t0) {
|
|
328
|
+
const $ = _c(16);
|
|
329
|
+
let className;
|
|
330
|
+
let props;
|
|
331
|
+
let style;
|
|
332
|
+
if ($[0] !== t0) {
|
|
333
|
+
({
|
|
334
|
+
className,
|
|
335
|
+
style,
|
|
336
|
+
...props
|
|
337
|
+
} = t0);
|
|
338
|
+
$[0] = t0;
|
|
339
|
+
$[1] = className;
|
|
340
|
+
$[2] = props;
|
|
341
|
+
$[3] = style;
|
|
342
|
+
} else {
|
|
343
|
+
className = $[1];
|
|
344
|
+
props = $[2];
|
|
345
|
+
style = $[3];
|
|
346
|
+
}
|
|
347
|
+
const largerText = useLargerText();
|
|
348
|
+
const scheme = useScheme();
|
|
349
|
+
const t1 = largerText ? "text-lg" : "text-base";
|
|
350
|
+
let t2;
|
|
351
|
+
if ($[4] !== className || $[5] !== t1) {
|
|
352
|
+
t2 = cn("mt-2 max-w-sm text-center font-instrument-sans", t1, className);
|
|
353
|
+
$[4] = className;
|
|
354
|
+
$[5] = t1;
|
|
355
|
+
$[6] = t2;
|
|
356
|
+
} else {
|
|
357
|
+
t2 = $[6];
|
|
358
|
+
}
|
|
359
|
+
let t3;
|
|
360
|
+
if ($[7] !== scheme) {
|
|
361
|
+
t3 = textStyle("muted", scheme);
|
|
362
|
+
$[7] = scheme;
|
|
363
|
+
$[8] = t3;
|
|
364
|
+
} else {
|
|
365
|
+
t3 = $[8];
|
|
366
|
+
}
|
|
367
|
+
let t4;
|
|
368
|
+
if ($[9] !== style || $[10] !== t3) {
|
|
369
|
+
t4 = [t3, style];
|
|
370
|
+
$[9] = style;
|
|
371
|
+
$[10] = t3;
|
|
372
|
+
$[11] = t4;
|
|
373
|
+
} else {
|
|
374
|
+
t4 = $[11];
|
|
375
|
+
}
|
|
376
|
+
let t5;
|
|
377
|
+
if ($[12] !== props || $[13] !== t2 || $[14] !== t4) {
|
|
378
|
+
t5 = <Text className={t2} style={t4} {...props} />;
|
|
379
|
+
$[12] = props;
|
|
380
|
+
$[13] = t2;
|
|
381
|
+
$[14] = t4;
|
|
382
|
+
$[15] = t5;
|
|
383
|
+
} else {
|
|
384
|
+
t5 = $[15];
|
|
385
|
+
}
|
|
386
|
+
return t5;
|
|
387
|
+
}
|
|
388
|
+
function Actions(t0) {
|
|
389
|
+
const $ = _c(8);
|
|
390
|
+
let className;
|
|
391
|
+
let props;
|
|
392
|
+
if ($[0] !== t0) {
|
|
393
|
+
({
|
|
394
|
+
className,
|
|
395
|
+
...props
|
|
396
|
+
} = t0);
|
|
397
|
+
$[0] = t0;
|
|
398
|
+
$[1] = className;
|
|
399
|
+
$[2] = props;
|
|
400
|
+
} else {
|
|
401
|
+
className = $[1];
|
|
402
|
+
props = $[2];
|
|
403
|
+
}
|
|
404
|
+
let t1;
|
|
405
|
+
if ($[3] !== className) {
|
|
406
|
+
t1 = cn("mt-6", className);
|
|
407
|
+
$[3] = className;
|
|
408
|
+
$[4] = t1;
|
|
409
|
+
} else {
|
|
410
|
+
t1 = $[4];
|
|
411
|
+
}
|
|
412
|
+
let t2;
|
|
413
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
414
|
+
t2 = <View className={t1} {...props} />;
|
|
415
|
+
$[5] = props;
|
|
416
|
+
$[6] = t1;
|
|
417
|
+
$[7] = t2;
|
|
418
|
+
} else {
|
|
419
|
+
t2 = $[7];
|
|
420
|
+
}
|
|
421
|
+
return t2;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* "Nothing here yet" block. Call it with `title`, `description`, `icon` and
|
|
426
|
+
* `action`, or compose `EmptyState.Root` and its parts as on the web.
|
|
427
|
+
*/
|
|
428
|
+
export const EmptyState = Object.assign(EmptyStateView, {
|
|
429
|
+
Root,
|
|
430
|
+
Icon,
|
|
431
|
+
Title,
|
|
432
|
+
Description,
|
|
433
|
+
Actions
|
|
434
|
+
});
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { ScrollViewStyleReset } from "expo-router/html";
|
|
3
|
+
import { tokens } from "./tokens";
|
|
4
|
+
|
|
5
|
+
/** `"native"` stops pinch-zoom so the page acts like the app; `"accessible"` allows it (WCAG 1.4.4). Both cover the notch. */
|
|
6
|
+
|
|
7
|
+
export const EXPO_WEB_VIEWPORT = {
|
|
8
|
+
native: "width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover",
|
|
9
|
+
accessible: "width=device-width, initial-scale=1.0, viewport-fit=cover"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The body fill as raw CSS, so the background does not flash in dark mode
|
|
13
|
+
* before the app paints. Dark follows the system, and the NativeWind `dark`
|
|
14
|
+
* class on `<html>` when the app sets the scheme (`darkMode: "class"`).
|
|
15
|
+
*/
|
|
16
|
+
export function expoWebBackgroundCss(light, dark) {
|
|
17
|
+
return `
|
|
18
|
+
body {
|
|
19
|
+
background-color: ${light};
|
|
20
|
+
}
|
|
21
|
+
@media (prefers-color-scheme: dark) {
|
|
22
|
+
body {
|
|
23
|
+
background-color: ${dark};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
html.dark body {
|
|
27
|
+
background-color: ${dark};
|
|
28
|
+
}`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The root HTML for Expo web static rendering. Use it as the whole of
|
|
33
|
+
* `app/+html.tsx`:
|
|
34
|
+
*
|
|
35
|
+
* export default function Root({ children }: { children: React.ReactNode }) {
|
|
36
|
+
* return <ExpoWebRoot>{children}</ExpoWebRoot>;
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* Runs in Node during the static render, with no DOM.
|
|
40
|
+
*/
|
|
41
|
+
export function ExpoWebRoot(t0) {
|
|
42
|
+
const $ = _c(22);
|
|
43
|
+
const {
|
|
44
|
+
children,
|
|
45
|
+
lang: t1,
|
|
46
|
+
viewport: t2,
|
|
47
|
+
scrollReset: t3,
|
|
48
|
+
lightBackground: t4,
|
|
49
|
+
darkBackground: t5,
|
|
50
|
+
head
|
|
51
|
+
} = t0;
|
|
52
|
+
const lang = t1 === undefined ? "en" : t1;
|
|
53
|
+
const viewport = t2 === undefined ? "native" : t2;
|
|
54
|
+
const scrollReset = t3 === undefined ? true : t3;
|
|
55
|
+
const lightBackground = t4 === undefined ? tokens.color.background.light : t4;
|
|
56
|
+
const darkBackground = t5 === undefined ? tokens.color.background.dark : t5;
|
|
57
|
+
let t6;
|
|
58
|
+
let t7;
|
|
59
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
+
t6 = <meta charSet="utf-8" />;
|
|
61
|
+
t7 = <meta httpEquiv="X-UA-Compatible" content="IE=edge" />;
|
|
62
|
+
$[0] = t6;
|
|
63
|
+
$[1] = t7;
|
|
64
|
+
} else {
|
|
65
|
+
t6 = $[0];
|
|
66
|
+
t7 = $[1];
|
|
67
|
+
}
|
|
68
|
+
const t8 = EXPO_WEB_VIEWPORT[viewport];
|
|
69
|
+
let t9;
|
|
70
|
+
if ($[2] !== t8) {
|
|
71
|
+
t9 = <meta name="viewport" content={t8} />;
|
|
72
|
+
$[2] = t8;
|
|
73
|
+
$[3] = t9;
|
|
74
|
+
} else {
|
|
75
|
+
t9 = $[3];
|
|
76
|
+
}
|
|
77
|
+
let t10;
|
|
78
|
+
if ($[4] !== scrollReset) {
|
|
79
|
+
t10 = scrollReset ? <ScrollViewStyleReset /> : null;
|
|
80
|
+
$[4] = scrollReset;
|
|
81
|
+
$[5] = t10;
|
|
82
|
+
} else {
|
|
83
|
+
t10 = $[5];
|
|
84
|
+
}
|
|
85
|
+
let t11;
|
|
86
|
+
if ($[6] !== darkBackground || $[7] !== lightBackground) {
|
|
87
|
+
t11 = expoWebBackgroundCss(lightBackground, darkBackground);
|
|
88
|
+
$[6] = darkBackground;
|
|
89
|
+
$[7] = lightBackground;
|
|
90
|
+
$[8] = t11;
|
|
91
|
+
} else {
|
|
92
|
+
t11 = $[8];
|
|
93
|
+
}
|
|
94
|
+
let t12;
|
|
95
|
+
if ($[9] !== t11) {
|
|
96
|
+
t12 = <style dangerouslySetInnerHTML={{
|
|
97
|
+
__html: t11
|
|
98
|
+
}} />;
|
|
99
|
+
$[9] = t11;
|
|
100
|
+
$[10] = t12;
|
|
101
|
+
} else {
|
|
102
|
+
t12 = $[10];
|
|
103
|
+
}
|
|
104
|
+
let t13;
|
|
105
|
+
if ($[11] !== head || $[12] !== t10 || $[13] !== t12 || $[14] !== t9) {
|
|
106
|
+
t13 = <head>{t6}{t7}{t9}{t10}{t12}{head}</head>;
|
|
107
|
+
$[11] = head;
|
|
108
|
+
$[12] = t10;
|
|
109
|
+
$[13] = t12;
|
|
110
|
+
$[14] = t9;
|
|
111
|
+
$[15] = t13;
|
|
112
|
+
} else {
|
|
113
|
+
t13 = $[15];
|
|
114
|
+
}
|
|
115
|
+
let t14;
|
|
116
|
+
if ($[16] !== children) {
|
|
117
|
+
t14 = <body>{children}</body>;
|
|
118
|
+
$[16] = children;
|
|
119
|
+
$[17] = t14;
|
|
120
|
+
} else {
|
|
121
|
+
t14 = $[17];
|
|
122
|
+
}
|
|
123
|
+
let t15;
|
|
124
|
+
if ($[18] !== lang || $[19] !== t13 || $[20] !== t14) {
|
|
125
|
+
t15 = <html lang={lang}>{t13}{t14}</html>;
|
|
126
|
+
$[18] = lang;
|
|
127
|
+
$[19] = t13;
|
|
128
|
+
$[20] = t14;
|
|
129
|
+
$[21] = t15;
|
|
130
|
+
} else {
|
|
131
|
+
t15 = $[21];
|
|
132
|
+
}
|
|
133
|
+
return t15;
|
|
134
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Platform, Pressable, View } from "react-native";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
5
|
+
import { FloatingSurface } from "./FloatingSurface";
|
|
6
|
+
import { useAccentColor, useLargerText } from "./theme";
|
|
7
|
+
import { FLOATING_INSET, FLOATING_TAB_BAR_HEIGHT, FLOATING_TAB_BAR_HEIGHT_LARGE } from "./floating";
|
|
8
|
+
export function FloatingFAB(t0) {
|
|
9
|
+
const $ = _c(19);
|
|
10
|
+
const {
|
|
11
|
+
onPress,
|
|
12
|
+
label,
|
|
13
|
+
testID,
|
|
14
|
+
children
|
|
15
|
+
} = t0;
|
|
16
|
+
const insets = useSafeAreaInsets();
|
|
17
|
+
const largerText = useLargerText();
|
|
18
|
+
const accentColor = useAccentColor();
|
|
19
|
+
const size = largerText ? 64 : 56;
|
|
20
|
+
const tabBar = largerText ? FLOATING_TAB_BAR_HEIGHT_LARGE : FLOATING_TAB_BAR_HEIGHT;
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
23
|
+
t1 = cn("z-10", Platform.OS === "web" ? "fixed" : "absolute");
|
|
24
|
+
$[0] = t1;
|
|
25
|
+
} else {
|
|
26
|
+
t1 = $[0];
|
|
27
|
+
}
|
|
28
|
+
const t2 = insets.right + FLOATING_INSET;
|
|
29
|
+
const t3 = FLOATING_INSET + Math.max(insets.bottom, 8) + tabBar + 20;
|
|
30
|
+
let t4;
|
|
31
|
+
if ($[1] !== t2 || $[2] !== t3) {
|
|
32
|
+
t4 = {
|
|
33
|
+
right: t2,
|
|
34
|
+
bottom: t3
|
|
35
|
+
};
|
|
36
|
+
$[1] = t2;
|
|
37
|
+
$[2] = t3;
|
|
38
|
+
$[3] = t4;
|
|
39
|
+
} else {
|
|
40
|
+
t4 = $[3];
|
|
41
|
+
}
|
|
42
|
+
const t5 = size / 2;
|
|
43
|
+
let t6;
|
|
44
|
+
if ($[4] !== accentColor || $[5] !== size) {
|
|
45
|
+
t6 = t7 => {
|
|
46
|
+
const {
|
|
47
|
+
pressed
|
|
48
|
+
} = t7;
|
|
49
|
+
return {
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
justifyContent: "center",
|
|
52
|
+
width: size,
|
|
53
|
+
height: size,
|
|
54
|
+
backgroundColor: accentColor,
|
|
55
|
+
opacity: pressed ? 0.7 : 1
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
$[4] = accentColor;
|
|
59
|
+
$[5] = size;
|
|
60
|
+
$[6] = t6;
|
|
61
|
+
} else {
|
|
62
|
+
t6 = $[6];
|
|
63
|
+
}
|
|
64
|
+
let t7;
|
|
65
|
+
if ($[7] !== children || $[8] !== label || $[9] !== onPress || $[10] !== t6 || $[11] !== testID) {
|
|
66
|
+
t7 = <Pressable testID={testID} accessibilityRole="button" accessibilityLabel={label} onPress={onPress} style={t6}>{children}</Pressable>;
|
|
67
|
+
$[7] = children;
|
|
68
|
+
$[8] = label;
|
|
69
|
+
$[9] = onPress;
|
|
70
|
+
$[10] = t6;
|
|
71
|
+
$[11] = testID;
|
|
72
|
+
$[12] = t7;
|
|
73
|
+
} else {
|
|
74
|
+
t7 = $[12];
|
|
75
|
+
}
|
|
76
|
+
let t8;
|
|
77
|
+
if ($[13] !== t5 || $[14] !== t7) {
|
|
78
|
+
t8 = <FloatingSurface radius={t5} blur={false}>{t7}</FloatingSurface>;
|
|
79
|
+
$[13] = t5;
|
|
80
|
+
$[14] = t7;
|
|
81
|
+
$[15] = t8;
|
|
82
|
+
} else {
|
|
83
|
+
t8 = $[15];
|
|
84
|
+
}
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[16] !== t4 || $[17] !== t8) {
|
|
87
|
+
t9 = <View pointerEvents="box-none" className={t1} style={t4}>{t8}</View>;
|
|
88
|
+
$[16] = t4;
|
|
89
|
+
$[17] = t8;
|
|
90
|
+
$[18] = t9;
|
|
91
|
+
} else {
|
|
92
|
+
t9 = $[18];
|
|
93
|
+
}
|
|
94
|
+
return t9;
|
|
95
|
+
}
|