@otfdashkit/ui-native 0.1.1 → 0.1.2
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/LICENSE +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.js +608 -106
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +539 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -4
package/dist/index.js
CHANGED
|
@@ -31,77 +31,77 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/index.ts
|
|
32
32
|
var index_exports = {};
|
|
33
33
|
__export(index_exports, {
|
|
34
|
-
Accordion: () =>
|
|
34
|
+
Accordion: () => import_tamagui78.Accordion,
|
|
35
35
|
ActionSheet: () => ActionSheet,
|
|
36
|
-
Adapt: () =>
|
|
37
|
-
AlertDialog: () =>
|
|
38
|
-
Anchor: () =>
|
|
39
|
-
AnimatePresence: () =>
|
|
36
|
+
Adapt: () => import_tamagui78.Adapt,
|
|
37
|
+
AlertDialog: () => import_tamagui78.AlertDialog,
|
|
38
|
+
Anchor: () => import_tamagui78.Anchor,
|
|
39
|
+
AnimatePresence: () => import_tamagui78.AnimatePresence,
|
|
40
40
|
AnimatedView: () => AnimatedView,
|
|
41
41
|
AppHeader: () => AppHeader,
|
|
42
42
|
AppleLogo: () => AppleLogo,
|
|
43
|
-
Article: () =>
|
|
44
|
-
Aside: () =>
|
|
45
|
-
Avatar: () =>
|
|
43
|
+
Article: () => import_tamagui78.Article,
|
|
44
|
+
Aside: () => import_tamagui78.Aside,
|
|
45
|
+
Avatar: () => import_tamagui78.Avatar,
|
|
46
46
|
AvatarGroup: () => AvatarGroup,
|
|
47
47
|
Badge: () => Badge,
|
|
48
48
|
BottomSheet: () => BottomSheet,
|
|
49
|
-
Button: () =>
|
|
50
|
-
Card: () =>
|
|
49
|
+
Button: () => import_tamagui78.Button,
|
|
50
|
+
Card: () => import_tamagui78.Card,
|
|
51
51
|
CardScroller: () => CardScroller,
|
|
52
52
|
Carousel: () => Carousel,
|
|
53
53
|
ChatBubble: () => ChatBubble,
|
|
54
|
-
Checkbox: () =>
|
|
54
|
+
Checkbox: () => import_tamagui78.Checkbox,
|
|
55
55
|
Chip: () => Chip,
|
|
56
56
|
ChipGroup: () => ChipGroup,
|
|
57
57
|
ChipsTabBar: () => ChipsTabBar,
|
|
58
|
-
Circle: () =>
|
|
58
|
+
Circle: () => import_tamagui78.Circle,
|
|
59
59
|
ConfirmDialog: () => ConfirmDialog,
|
|
60
60
|
Container: () => Container,
|
|
61
61
|
CountdownBanner: () => CountdownBanner,
|
|
62
62
|
DataTable: () => DataTable,
|
|
63
63
|
DatePicker: () => DatePicker,
|
|
64
|
-
Dialog: () =>
|
|
64
|
+
Dialog: () => import_tamagui78.Dialog,
|
|
65
65
|
DialogProvider: () => DialogProvider,
|
|
66
66
|
Divider: () => Divider,
|
|
67
67
|
EmptyState: () => EmptyState,
|
|
68
|
-
EnsureFlexed: () =>
|
|
68
|
+
EnsureFlexed: () => import_tamagui78.EnsureFlexed,
|
|
69
69
|
EventCard: () => EventCard,
|
|
70
70
|
Expandable: () => Expandable,
|
|
71
|
-
Fieldset: () =>
|
|
71
|
+
Fieldset: () => import_tamagui78.Fieldset,
|
|
72
72
|
FinanceDashboard: () => FinanceDashboard,
|
|
73
73
|
FloatingActionButton: () => FloatingActionButton,
|
|
74
|
-
Footer: () =>
|
|
75
|
-
Form: () =>
|
|
74
|
+
Footer: () => import_tamagui78.Footer,
|
|
75
|
+
Form: () => import_tamagui78.Form,
|
|
76
76
|
FormField: () => FormField,
|
|
77
|
-
Frame: () =>
|
|
77
|
+
Frame: () => import_tamagui78.Frame,
|
|
78
78
|
GitHubLogo: () => GitHubLogo,
|
|
79
79
|
GlassCard: () => GlassCard,
|
|
80
80
|
GoogleLogo: () => GoogleLogo,
|
|
81
81
|
Grid: () => Grid,
|
|
82
|
-
Group: () =>
|
|
83
|
-
H1: () =>
|
|
84
|
-
H2: () =>
|
|
85
|
-
H3: () =>
|
|
86
|
-
H4: () =>
|
|
87
|
-
H5: () =>
|
|
88
|
-
H6: () =>
|
|
89
|
-
Header: () =>
|
|
90
|
-
Heading: () =>
|
|
82
|
+
Group: () => import_tamagui78.Group,
|
|
83
|
+
H1: () => import_tamagui78.H1,
|
|
84
|
+
H2: () => import_tamagui78.H2,
|
|
85
|
+
H3: () => import_tamagui78.H3,
|
|
86
|
+
H4: () => import_tamagui78.H4,
|
|
87
|
+
H5: () => import_tamagui78.H5,
|
|
88
|
+
H6: () => import_tamagui78.H6,
|
|
89
|
+
Header: () => import_tamagui78.Header,
|
|
90
|
+
Heading: () => import_tamagui78.Heading,
|
|
91
91
|
ICONS: () => ICONS,
|
|
92
92
|
Icon: () => Icon,
|
|
93
93
|
Image: () => import_tamagui11.Image,
|
|
94
94
|
ImmersiveMediaScreen: () => ImmersiveMediaScreen,
|
|
95
|
-
Input: () =>
|
|
95
|
+
Input: () => import_tamagui78.Input,
|
|
96
96
|
KeyboardStickyFooter: () => KeyboardStickyFooter,
|
|
97
|
-
Label: () =>
|
|
97
|
+
Label: () => import_tamagui78.Label,
|
|
98
98
|
ListItem: () => ListItem,
|
|
99
99
|
LoginScreen: () => LoginScreen,
|
|
100
|
-
Main: () =>
|
|
100
|
+
Main: () => import_tamagui78.Main,
|
|
101
101
|
MediaCard: () => MediaCard,
|
|
102
102
|
MicrosoftLogo: () => MicrosoftLogo,
|
|
103
103
|
MultiStep: () => MultiStep,
|
|
104
|
-
Nav: () =>
|
|
104
|
+
Nav: () => import_tamagui78.Nav,
|
|
105
105
|
NotificationBanner: () => NotificationBanner,
|
|
106
106
|
OTF_DESIGN_THEMES: () => OTF_DESIGN_THEMES,
|
|
107
107
|
OTF_DESIGN_THEME_IDS: () => OTF_DESIGN_THEME_IDS,
|
|
@@ -114,7 +114,7 @@ __export(index_exports, {
|
|
|
114
114
|
OtfDialog: () => OtfDialog,
|
|
115
115
|
OtfInput: () => Input,
|
|
116
116
|
OtfPopover: () => OtfPopover,
|
|
117
|
-
OtfProvider: () =>
|
|
117
|
+
OtfProvider: () => import_tamagui78.TamaguiProvider,
|
|
118
118
|
OtfSelect: () => OtfSelect,
|
|
119
119
|
OtfTabs: () => OtfTabs,
|
|
120
120
|
OtfText: () => OtfText,
|
|
@@ -123,117 +123,120 @@ __export(index_exports, {
|
|
|
123
123
|
OtfTooltip: () => OtfTooltip,
|
|
124
124
|
PageContainer: () => PageContainer,
|
|
125
125
|
PageMainContainer: () => PageMainContainer,
|
|
126
|
-
Paragraph: () =>
|
|
126
|
+
Paragraph: () => import_tamagui78.Paragraph,
|
|
127
127
|
PasswordInput: () => PasswordInput,
|
|
128
128
|
PaywallScreen: () => PaywallScreen,
|
|
129
|
-
Popover: () =>
|
|
130
|
-
Portal: () =>
|
|
131
|
-
PortalHost: () =>
|
|
132
|
-
PortalItem: () =>
|
|
133
|
-
PortalProvider: () =>
|
|
129
|
+
Popover: () => import_tamagui78.Popover,
|
|
130
|
+
Portal: () => import_tamagui78.Portal,
|
|
131
|
+
PortalHost: () => import_tamagui78.PortalHost,
|
|
132
|
+
PortalItem: () => import_tamagui78.PortalItem,
|
|
133
|
+
PortalProvider: () => import_tamagui78.PortalProvider,
|
|
134
134
|
Pressable: () => Pressable,
|
|
135
135
|
PricingTable: () => PricingTable,
|
|
136
136
|
ProductCard: () => ProductCard,
|
|
137
137
|
ProfileHeader: () => ProfileHeader,
|
|
138
|
-
Progress: () =>
|
|
138
|
+
Progress: () => import_tamagui78.Progress,
|
|
139
139
|
ProgressSteps: () => ProgressSteps,
|
|
140
140
|
PullToRefresh: () => PullToRefresh,
|
|
141
|
-
RadioGroup: () =>
|
|
141
|
+
RadioGroup: () => import_tamagui78.RadioGroup,
|
|
142
142
|
RulerScrubber: () => RulerScrubber,
|
|
143
143
|
SafeArea: () => SafeArea,
|
|
144
144
|
ScreenLayout: () => ScreenLayout,
|
|
145
|
-
ScrollView: () =>
|
|
145
|
+
ScrollView: () => import_tamagui78.ScrollView,
|
|
146
146
|
SearchBar: () => SearchBar,
|
|
147
147
|
Section: () => Section,
|
|
148
|
-
Select: () =>
|
|
148
|
+
Select: () => import_tamagui78.Select,
|
|
149
149
|
Selectable: () => Selectable,
|
|
150
150
|
SelectableGroup: () => SelectableGroup,
|
|
151
151
|
SepHeading: () => SepHeading,
|
|
152
|
-
Separator: () =>
|
|
152
|
+
Separator: () => import_tamagui78.Separator,
|
|
153
153
|
SettingsScreen: () => SettingsScreen,
|
|
154
|
-
Sheet: () =>
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
Sheet: () => import_tamagui78.Sheet,
|
|
155
|
+
Shockwave: () => Shockwave,
|
|
156
|
+
SizableStack: () => import_tamagui78.SizableStack,
|
|
157
|
+
SizableText: () => import_tamagui78.SizableText,
|
|
157
158
|
Skeleton: () => Skeleton,
|
|
158
|
-
Slider: () =>
|
|
159
|
-
Spacer: () =>
|
|
160
|
-
Spinner: () =>
|
|
161
|
-
Square: () =>
|
|
162
|
-
Stack: () =>
|
|
159
|
+
Slider: () => import_tamagui78.Slider,
|
|
160
|
+
Spacer: () => import_tamagui78.Spacer,
|
|
161
|
+
Spinner: () => import_tamagui78.Spinner,
|
|
162
|
+
Square: () => import_tamagui78.Square,
|
|
163
|
+
Stack: () => import_tamagui78.Stack,
|
|
163
164
|
StatusBadge: () => StatusBadge,
|
|
165
|
+
StayBrowseScreen: () => StayBrowseScreen,
|
|
166
|
+
StayDetailScreen: () => StayDetailScreen,
|
|
164
167
|
Step: () => Step,
|
|
165
168
|
StepPageLayout: () => StepPageLayout,
|
|
166
169
|
SubHeading: () => SubHeading,
|
|
167
170
|
SwipeCards: () => SwipeCards,
|
|
168
171
|
SwipeableRow: () => SwipeableRow,
|
|
169
|
-
Switch: () =>
|
|
172
|
+
Switch: () => import_tamagui78.Switch,
|
|
170
173
|
TabBar: () => TabBar,
|
|
171
|
-
Tabs: () =>
|
|
172
|
-
TamaguiImage: () =>
|
|
173
|
-
TamaguiListItem: () =>
|
|
174
|
-
TamaguiProvider: () =>
|
|
174
|
+
Tabs: () => import_tamagui78.Tabs,
|
|
175
|
+
TamaguiImage: () => import_tamagui78.Image,
|
|
176
|
+
TamaguiListItem: () => import_tamagui78.ListItem,
|
|
177
|
+
TamaguiProvider: () => import_tamagui78.TamaguiProvider,
|
|
175
178
|
TestimonialCard: () => TestimonialCard2,
|
|
176
|
-
Text: () =>
|
|
177
|
-
TextArea: () =>
|
|
178
|
-
Theme: () =>
|
|
179
|
-
ThemeableStack: () =>
|
|
180
|
-
ToggleGroup: () =>
|
|
181
|
-
Tooltip: () =>
|
|
182
|
-
TooltipSimple: () =>
|
|
183
|
-
Unspaced: () =>
|
|
179
|
+
Text: () => import_tamagui78.Text,
|
|
180
|
+
TextArea: () => import_tamagui78.TextArea,
|
|
181
|
+
Theme: () => import_tamagui78.Theme,
|
|
182
|
+
ThemeableStack: () => import_tamagui78.ThemeableStack,
|
|
183
|
+
ToggleGroup: () => import_tamagui78.ToggleGroup,
|
|
184
|
+
Tooltip: () => import_tamagui78.Tooltip,
|
|
185
|
+
TooltipSimple: () => import_tamagui78.TooltipSimple,
|
|
186
|
+
Unspaced: () => import_tamagui78.Unspaced,
|
|
184
187
|
UserPreferences: () => UserPreferences,
|
|
185
|
-
View: () =>
|
|
186
|
-
VisuallyHidden: () =>
|
|
188
|
+
View: () => import_tamagui78.View,
|
|
189
|
+
VisuallyHidden: () => import_tamagui78.VisuallyHidden,
|
|
187
190
|
WheelPicker: () => WheelPicker,
|
|
188
|
-
XGroup: () =>
|
|
189
|
-
XStack: () =>
|
|
190
|
-
YGroup: () =>
|
|
191
|
-
YStack: () =>
|
|
192
|
-
ZStack: () =>
|
|
193
|
-
addTheme: () =>
|
|
194
|
-
composeEventHandlers: () =>
|
|
195
|
-
composeRefs: () =>
|
|
196
|
-
createFont: () =>
|
|
197
|
-
createMedia: () =>
|
|
198
|
-
createStyledContext: () =>
|
|
199
|
-
createTamagui: () =>
|
|
200
|
-
createTheme: () =>
|
|
201
|
-
createTokens: () =>
|
|
202
|
-
createVariable: () =>
|
|
191
|
+
XGroup: () => import_tamagui78.XGroup,
|
|
192
|
+
XStack: () => import_tamagui78.XStack,
|
|
193
|
+
YGroup: () => import_tamagui78.YGroup,
|
|
194
|
+
YStack: () => import_tamagui78.YStack,
|
|
195
|
+
ZStack: () => import_tamagui78.ZStack,
|
|
196
|
+
addTheme: () => import_tamagui78.addTheme,
|
|
197
|
+
composeEventHandlers: () => import_tamagui78.composeEventHandlers,
|
|
198
|
+
composeRefs: () => import_tamagui78.composeRefs,
|
|
199
|
+
createFont: () => import_tamagui78.createFont,
|
|
200
|
+
createMedia: () => import_tamagui78.createMedia,
|
|
201
|
+
createStyledContext: () => import_tamagui78.createStyledContext,
|
|
202
|
+
createTamagui: () => import_tamagui78.createTamagui,
|
|
203
|
+
createTheme: () => import_tamagui78.createTheme,
|
|
204
|
+
createTokens: () => import_tamagui78.createTokens,
|
|
205
|
+
createVariable: () => import_tamagui78.createVariable,
|
|
203
206
|
dialogConfirm: () => dialogConfirm,
|
|
204
|
-
getConfig: () =>
|
|
207
|
+
getConfig: () => import_tamagui78.getConfig,
|
|
205
208
|
getOtfDesignTheme: () => getOtfDesignTheme,
|
|
206
209
|
getOtfThemePalettes: () => getOtfThemePalettes,
|
|
207
|
-
getToken: () =>
|
|
208
|
-
getTokenValue: () =>
|
|
209
|
-
getTokens: () =>
|
|
210
|
-
isClient: () =>
|
|
211
|
-
isWeb: () =>
|
|
210
|
+
getToken: () => import_tamagui78.getToken,
|
|
211
|
+
getTokenValue: () => import_tamagui78.getTokenValue,
|
|
212
|
+
getTokens: () => import_tamagui78.getTokens,
|
|
213
|
+
isClient: () => import_tamagui78.isClient,
|
|
214
|
+
isWeb: () => import_tamagui78.isWeb,
|
|
212
215
|
otfConfig: () => otfConfig,
|
|
213
|
-
replaceTheme: () =>
|
|
216
|
+
replaceTheme: () => import_tamagui78.replaceTheme,
|
|
214
217
|
showError: () => showError,
|
|
215
|
-
styled: () =>
|
|
218
|
+
styled: () => import_tamagui78.styled,
|
|
216
219
|
tamaguiDefaultConfig: () => import_v52.defaultConfig,
|
|
217
220
|
toast: () => toast,
|
|
218
|
-
updateTheme: () =>
|
|
221
|
+
updateTheme: () => import_tamagui78.updateTheme,
|
|
219
222
|
useCollapsibleHeader: () => useCollapsibleHeader,
|
|
220
|
-
useComposedRefs: () =>
|
|
221
|
-
useControllableState: () =>
|
|
222
|
-
useDebounce: () =>
|
|
223
|
-
useDebounceValue: () =>
|
|
224
|
-
useDidFinishSSR: () =>
|
|
225
|
-
useEvent: () =>
|
|
226
|
-
useForceUpdate: () =>
|
|
227
|
-
useIsPresent: () =>
|
|
228
|
-
useIsomorphicLayoutEffect: () =>
|
|
229
|
-
useMedia: () =>
|
|
223
|
+
useComposedRefs: () => import_tamagui78.useComposedRefs,
|
|
224
|
+
useControllableState: () => import_tamagui78.useControllableState,
|
|
225
|
+
useDebounce: () => import_tamagui78.useDebounce,
|
|
226
|
+
useDebounceValue: () => import_tamagui78.useDebounceValue,
|
|
227
|
+
useDidFinishSSR: () => import_tamagui78.useDidFinishSSR,
|
|
228
|
+
useEvent: () => import_tamagui78.useEvent,
|
|
229
|
+
useForceUpdate: () => import_tamagui78.useForceUpdate,
|
|
230
|
+
useIsPresent: () => import_tamagui78.useIsPresent,
|
|
231
|
+
useIsomorphicLayoutEffect: () => import_tamagui78.useIsomorphicLayoutEffect,
|
|
232
|
+
useMedia: () => import_tamagui78.useMedia,
|
|
230
233
|
useMultiStep: () => useMultiStep,
|
|
231
234
|
useOtfToast: () => useOtfToast,
|
|
232
|
-
usePresence: () =>
|
|
233
|
-
useTheme: () =>
|
|
234
|
-
useThemeName: () =>
|
|
235
|
-
useWindowDimensions: () =>
|
|
236
|
-
withStaticProperties: () =>
|
|
235
|
+
usePresence: () => import_tamagui78.usePresence,
|
|
236
|
+
useTheme: () => import_tamagui78.useTheme,
|
|
237
|
+
useThemeName: () => import_tamagui78.useThemeName,
|
|
238
|
+
useWindowDimensions: () => import_tamagui78.useWindowDimensions,
|
|
239
|
+
withStaticProperties: () => import_tamagui78.withStaticProperties
|
|
237
240
|
});
|
|
238
241
|
module.exports = __toCommonJS(index_exports);
|
|
239
242
|
|
|
@@ -417,7 +420,7 @@ function getOtfDesignTheme(themeId) {
|
|
|
417
420
|
}
|
|
418
421
|
|
|
419
422
|
// src/index.ts
|
|
420
|
-
var
|
|
423
|
+
var import_tamagui78 = require("tamagui");
|
|
421
424
|
|
|
422
425
|
// src/primitives/Button.tsx
|
|
423
426
|
var import_tamagui2 = require("tamagui");
|
|
@@ -5907,6 +5910,502 @@ function useCollapsibleHeader(opts = {}) {
|
|
|
5907
5910
|
});
|
|
5908
5911
|
return { scrollHandler, headerStyle, titleStyle, scrollY };
|
|
5909
5912
|
}
|
|
5913
|
+
|
|
5914
|
+
// src/patterns/Shockwave/Shockwave.tsx
|
|
5915
|
+
var import_react27 = require("react");
|
|
5916
|
+
var import_react_native14 = require("react-native");
|
|
5917
|
+
var import_react_native_skia2 = require("@shopify/react-native-skia");
|
|
5918
|
+
var import_react_native_reanimated11 = require("react-native-reanimated");
|
|
5919
|
+
var import_react_native_worklets = require("react-native-worklets");
|
|
5920
|
+
|
|
5921
|
+
// src/patterns/Shockwave/conf.ts
|
|
5922
|
+
var SHOCKWAVE_DEFAULTS = {
|
|
5923
|
+
WIDTH: 320,
|
|
5924
|
+
HEIGHT: 320,
|
|
5925
|
+
DURATION: 900,
|
|
5926
|
+
SHOCK_STRENGTH: 0.12,
|
|
5927
|
+
LENSING_SPREAD: 0.2
|
|
5928
|
+
};
|
|
5929
|
+
|
|
5930
|
+
// src/patterns/Shockwave/shader.ts
|
|
5931
|
+
var SHOCKWAVE_SHADER_SOURCE = `
|
|
5932
|
+
uniform float2 iResolution;
|
|
5933
|
+
uniform float iTime;
|
|
5934
|
+
uniform float2 iMouse;
|
|
5935
|
+
uniform float uShockStrength;
|
|
5936
|
+
uniform float uLensingSpread;
|
|
5937
|
+
uniform shader iChannel0;
|
|
5938
|
+
uniform shader iChannel1;
|
|
5939
|
+
|
|
5940
|
+
half4 main(float2 fragCoord) {
|
|
5941
|
+
float2 uv = fragCoord / iResolution;
|
|
5942
|
+
float2 origin = iMouse / iResolution;
|
|
5943
|
+
|
|
5944
|
+
float t = clamp(iTime, 0.0, 1.0);
|
|
5945
|
+
float radius = sqrt(2.0) * t;
|
|
5946
|
+
float circle = radius - distance(origin, uv);
|
|
5947
|
+
float factor = uShockStrength
|
|
5948
|
+
* sin(t * 3.14159265)
|
|
5949
|
+
* pow(clamp(1.0 - abs(circle), 0.0, 1.0), 20.0);
|
|
5950
|
+
|
|
5951
|
+
float2 delta = origin - uv;
|
|
5952
|
+
float2 dir = delta / (length(delta) + 1e-6);
|
|
5953
|
+
|
|
5954
|
+
float2 d0 = (uLensingSpread) * factor * dir * iResolution;
|
|
5955
|
+
float2 d1 = (uLensingSpread * 1.2) * factor * dir * iResolution;
|
|
5956
|
+
float2 d2 = (uLensingSpread * 1.5) * factor * dir * iResolution;
|
|
5957
|
+
|
|
5958
|
+
half4 a = half4(
|
|
5959
|
+
iChannel0.eval(fragCoord + d0).r,
|
|
5960
|
+
iChannel0.eval(fragCoord + d1).g,
|
|
5961
|
+
iChannel0.eval(fragCoord + d2).b,
|
|
5962
|
+
1.0
|
|
5963
|
+
);
|
|
5964
|
+
half4 b = half4(
|
|
5965
|
+
iChannel1.eval(fragCoord + d0).r,
|
|
5966
|
+
iChannel1.eval(fragCoord + d1).g,
|
|
5967
|
+
iChannel1.eval(fragCoord + d2).b,
|
|
5968
|
+
1.0
|
|
5969
|
+
);
|
|
5970
|
+
|
|
5971
|
+
half mixT = half(clamp(t + circle * 5.0, 0.0, 1.0));
|
|
5972
|
+
return mix(a, b, mixT);
|
|
5973
|
+
}
|
|
5974
|
+
`;
|
|
5975
|
+
|
|
5976
|
+
// src/patterns/Shockwave/utils.ts
|
|
5977
|
+
var import_react_native13 = require("react-native");
|
|
5978
|
+
var import_react_native_skia = require("@shopify/react-native-skia");
|
|
5979
|
+
var webNoopCallback = () => Promise.resolve(null);
|
|
5980
|
+
async function snapshotPair(fromRef, toRef, prev, next) {
|
|
5981
|
+
const callback = import_react_native13.Platform.OS === "web" ? webNoopCallback : null;
|
|
5982
|
+
const fromImg = await (0, import_react_native_skia.makeImageFromView)(
|
|
5983
|
+
fromRef,
|
|
5984
|
+
callback
|
|
5985
|
+
);
|
|
5986
|
+
const toImg = await (0, import_react_native_skia.makeImageFromView)(
|
|
5987
|
+
toRef,
|
|
5988
|
+
callback
|
|
5989
|
+
);
|
|
5990
|
+
if (!fromImg || !toImg) return null;
|
|
5991
|
+
const fromSnapshot = prev === "from" ? fromImg : toImg;
|
|
5992
|
+
const toSnapshot = next === "from" ? fromImg : toImg;
|
|
5993
|
+
return { from: fromSnapshot, to: toSnapshot };
|
|
5994
|
+
}
|
|
5995
|
+
|
|
5996
|
+
// src/patterns/Shockwave/Shockwave.tsx
|
|
5997
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5998
|
+
var useShockwaveShader = () => {
|
|
5999
|
+
const [shader, setShader] = (0, import_react27.useState)(null);
|
|
6000
|
+
(0, import_react27.useEffect)(() => {
|
|
6001
|
+
let cancelled = false;
|
|
6002
|
+
let attempts = 0;
|
|
6003
|
+
let timer = null;
|
|
6004
|
+
const tryCompile = () => {
|
|
6005
|
+
if (cancelled) return;
|
|
6006
|
+
try {
|
|
6007
|
+
if (import_react_native_skia2.Skia?.RuntimeEffect?.Make) {
|
|
6008
|
+
const compiled = import_react_native_skia2.Skia.RuntimeEffect.Make(SHOCKWAVE_SHADER_SOURCE);
|
|
6009
|
+
if (compiled) {
|
|
6010
|
+
setShader(compiled);
|
|
6011
|
+
return;
|
|
6012
|
+
}
|
|
6013
|
+
}
|
|
6014
|
+
} catch {
|
|
6015
|
+
}
|
|
6016
|
+
attempts += 1;
|
|
6017
|
+
if (attempts < 30) {
|
|
6018
|
+
timer = setTimeout(tryCompile, 80);
|
|
6019
|
+
}
|
|
6020
|
+
};
|
|
6021
|
+
tryCompile();
|
|
6022
|
+
return () => {
|
|
6023
|
+
cancelled = true;
|
|
6024
|
+
if (timer !== null) clearTimeout(timer);
|
|
6025
|
+
};
|
|
6026
|
+
}, []);
|
|
6027
|
+
return shader;
|
|
6028
|
+
};
|
|
6029
|
+
var ShockwaveContext = (0, import_react27.createContext)(null);
|
|
6030
|
+
var useShockwaveContext = () => {
|
|
6031
|
+
const ctx = (0, import_react27.useContext)(ShockwaveContext);
|
|
6032
|
+
if (!ctx) {
|
|
6033
|
+
throw new Error(
|
|
6034
|
+
"<Shockwave.Transition.From> / <Shockwave.Transition.To> must be rendered inside <Shockwave>"
|
|
6035
|
+
);
|
|
6036
|
+
}
|
|
6037
|
+
return ctx;
|
|
6038
|
+
};
|
|
6039
|
+
var OFFSCREEN_OFFSET = 1e5;
|
|
6040
|
+
var From = (0, import_react27.memo)(function From2({ children, style }) {
|
|
6041
|
+
const { fromRef, activeValue, isTransitioning } = useShockwaveContext();
|
|
6042
|
+
const isActive = activeValue === "from";
|
|
6043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6044
|
+
import_react_native14.View,
|
|
6045
|
+
{
|
|
6046
|
+
ref: fromRef,
|
|
6047
|
+
collapsable: false,
|
|
6048
|
+
pointerEvents: isActive && !isTransitioning ? "auto" : "none",
|
|
6049
|
+
style: [
|
|
6050
|
+
import_react_native14.StyleSheet.absoluteFill,
|
|
6051
|
+
{
|
|
6052
|
+
zIndex: isActive ? 2 : 1,
|
|
6053
|
+
transform: [{ translateX: isActive ? 0 : OFFSCREEN_OFFSET }]
|
|
6054
|
+
},
|
|
6055
|
+
style
|
|
6056
|
+
],
|
|
6057
|
+
children
|
|
6058
|
+
}
|
|
6059
|
+
);
|
|
6060
|
+
});
|
|
6061
|
+
var To = (0, import_react27.memo)(function To2({ children, style }) {
|
|
6062
|
+
const { toRef, activeValue, isTransitioning } = useShockwaveContext();
|
|
6063
|
+
const isActive = activeValue === "to";
|
|
6064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6065
|
+
import_react_native14.View,
|
|
6066
|
+
{
|
|
6067
|
+
ref: toRef,
|
|
6068
|
+
collapsable: false,
|
|
6069
|
+
pointerEvents: isActive && !isTransitioning ? "auto" : "none",
|
|
6070
|
+
style: [
|
|
6071
|
+
import_react_native14.StyleSheet.absoluteFill,
|
|
6072
|
+
{
|
|
6073
|
+
zIndex: isActive ? 2 : 1,
|
|
6074
|
+
transform: [{ translateX: isActive ? 0 : OFFSCREEN_OFFSET }]
|
|
6075
|
+
},
|
|
6076
|
+
style
|
|
6077
|
+
],
|
|
6078
|
+
children
|
|
6079
|
+
}
|
|
6080
|
+
);
|
|
6081
|
+
});
|
|
6082
|
+
var Transition = { From, To };
|
|
6083
|
+
var ShockwaveRoot = (0, import_react27.memo)(function ShockwaveRoot2({
|
|
6084
|
+
value,
|
|
6085
|
+
width = SHOCKWAVE_DEFAULTS.WIDTH,
|
|
6086
|
+
height = SHOCKWAVE_DEFAULTS.HEIGHT,
|
|
6087
|
+
duration = SHOCKWAVE_DEFAULTS.DURATION,
|
|
6088
|
+
origin,
|
|
6089
|
+
shockStrength = SHOCKWAVE_DEFAULTS.SHOCK_STRENGTH,
|
|
6090
|
+
lensingSpread = SHOCKWAVE_DEFAULTS.LENSING_SPREAD,
|
|
6091
|
+
style,
|
|
6092
|
+
children,
|
|
6093
|
+
onTransitionEnd
|
|
6094
|
+
}) {
|
|
6095
|
+
const fromRef = (0, import_react27.useRef)(null);
|
|
6096
|
+
const toRef = (0, import_react27.useRef)(null);
|
|
6097
|
+
const prevValueRef = (0, import_react27.useRef)(value);
|
|
6098
|
+
const shader = useShockwaveShader();
|
|
6099
|
+
const [activeValue, setActiveValue] = (0, import_react27.useState)(value);
|
|
6100
|
+
const [snapshots, setSnapshots] = (0, import_react27.useState)(null);
|
|
6101
|
+
const progress = (0, import_react_native_reanimated11.useSharedValue)(0);
|
|
6102
|
+
const finishTransition = (0, import_react27.useCallback)(
|
|
6103
|
+
(next) => {
|
|
6104
|
+
setActiveValue(next);
|
|
6105
|
+
setSnapshots(null);
|
|
6106
|
+
onTransitionEnd?.(next);
|
|
6107
|
+
},
|
|
6108
|
+
[onTransitionEnd]
|
|
6109
|
+
);
|
|
6110
|
+
(0, import_react27.useEffect)(() => {
|
|
6111
|
+
if (value === prevValueRef.current) return;
|
|
6112
|
+
const prev = prevValueRef.current;
|
|
6113
|
+
const next = value;
|
|
6114
|
+
prevValueRef.current = value;
|
|
6115
|
+
let cancelled = false;
|
|
6116
|
+
void (async () => {
|
|
6117
|
+
const pair = await snapshotPair(
|
|
6118
|
+
fromRef,
|
|
6119
|
+
toRef,
|
|
6120
|
+
prev,
|
|
6121
|
+
next
|
|
6122
|
+
);
|
|
6123
|
+
if (cancelled) return;
|
|
6124
|
+
if (!pair) {
|
|
6125
|
+
setActiveValue(next);
|
|
6126
|
+
return;
|
|
6127
|
+
}
|
|
6128
|
+
setSnapshots(pair);
|
|
6129
|
+
progress.value = 0;
|
|
6130
|
+
progress.value = (0, import_react_native_reanimated11.withTiming)(
|
|
6131
|
+
1,
|
|
6132
|
+
{ duration, easing: import_react_native_reanimated11.Easing.linear },
|
|
6133
|
+
(done) => {
|
|
6134
|
+
if (done) (0, import_react_native_worklets.scheduleOnRN)(finishTransition, next);
|
|
6135
|
+
}
|
|
6136
|
+
);
|
|
6137
|
+
})();
|
|
6138
|
+
return () => {
|
|
6139
|
+
cancelled = true;
|
|
6140
|
+
};
|
|
6141
|
+
}, [value, duration, finishTransition, progress]);
|
|
6142
|
+
const ox = origin?.x ?? width / 2;
|
|
6143
|
+
const oy = origin?.y ?? height / 2;
|
|
6144
|
+
const uniforms = (0, import_react_native_reanimated11.useDerivedValue)(() => ({
|
|
6145
|
+
iResolution: [width, height],
|
|
6146
|
+
iTime: progress.value,
|
|
6147
|
+
iMouse: [ox, oy],
|
|
6148
|
+
uShockStrength: shockStrength,
|
|
6149
|
+
uLensingSpread: lensingSpread
|
|
6150
|
+
}));
|
|
6151
|
+
const ctxValue = (0, import_react27.useMemo)(
|
|
6152
|
+
() => ({
|
|
6153
|
+
fromRef,
|
|
6154
|
+
toRef,
|
|
6155
|
+
activeValue,
|
|
6156
|
+
isTransitioning: snapshots !== null
|
|
6157
|
+
}),
|
|
6158
|
+
[activeValue, snapshots]
|
|
6159
|
+
);
|
|
6160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react_native14.View, { style: [styles.wrapper, { width, height }, style], children: [
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ShockwaveContext.Provider, { value: ctxValue, children }),
|
|
6162
|
+
snapshots && shader ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6163
|
+
import_react_native_skia2.Canvas,
|
|
6164
|
+
{
|
|
6165
|
+
style: [import_react_native14.StyleSheet.absoluteFill, styles.canvasOverlay],
|
|
6166
|
+
pointerEvents: "none",
|
|
6167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_native_skia2.Fill, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react_native_skia2.Shader, { source: shader, uniforms, children: [
|
|
6168
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6169
|
+
import_react_native_skia2.ImageShader,
|
|
6170
|
+
{
|
|
6171
|
+
image: snapshots.from,
|
|
6172
|
+
fit: "cover",
|
|
6173
|
+
rect: { x: 0, y: 0, width, height }
|
|
6174
|
+
}
|
|
6175
|
+
),
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6177
|
+
import_react_native_skia2.ImageShader,
|
|
6178
|
+
{
|
|
6179
|
+
image: snapshots.to,
|
|
6180
|
+
fit: "cover",
|
|
6181
|
+
rect: { x: 0, y: 0, width, height }
|
|
6182
|
+
}
|
|
6183
|
+
)
|
|
6184
|
+
] }) })
|
|
6185
|
+
}
|
|
6186
|
+
) : null
|
|
6187
|
+
] });
|
|
6188
|
+
});
|
|
6189
|
+
var styles = import_react_native14.StyleSheet.create({
|
|
6190
|
+
wrapper: {
|
|
6191
|
+
position: "relative",
|
|
6192
|
+
overflow: "hidden",
|
|
6193
|
+
backgroundColor: "transparent"
|
|
6194
|
+
},
|
|
6195
|
+
canvasOverlay: {
|
|
6196
|
+
zIndex: 3
|
|
6197
|
+
}
|
|
6198
|
+
});
|
|
6199
|
+
var Shockwave = Object.assign(ShockwaveRoot, { Transition });
|
|
6200
|
+
|
|
6201
|
+
// src/patterns/StayCard/StayBrowseScreen.tsx
|
|
6202
|
+
var import_react_native15 = require("react-native");
|
|
6203
|
+
var import_tamagui75 = require("tamagui");
|
|
6204
|
+
var import_lucide_icons4 = require("@tamagui/lucide-icons");
|
|
6205
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6206
|
+
var DEFAULT_CATEGORIES = [
|
|
6207
|
+
{ label: "Villa" },
|
|
6208
|
+
{ label: "Hotel", active: true },
|
|
6209
|
+
{ label: "Apartment" },
|
|
6210
|
+
{ label: "Campsite" }
|
|
6211
|
+
];
|
|
6212
|
+
function StayBrowseScreen({
|
|
6213
|
+
greeting = "Good morning",
|
|
6214
|
+
headline = "Unlock Your\nPerfect Stay Today!",
|
|
6215
|
+
categories = DEFAULT_CATEGORIES,
|
|
6216
|
+
listing,
|
|
6217
|
+
onFavorite,
|
|
6218
|
+
backgroundColor = "#fafaf9"
|
|
6219
|
+
}) {
|
|
6220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.YStack, { flex: 1, backgroundColor, padding: 18, gap: 14, children: [
|
|
6221
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.YStack, { gap: 4, marginTop: 28, children: [
|
|
6222
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_tamagui75.SizableText, { size: "$2", color: "#737373", children: greeting }),
|
|
6223
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_tamagui75.H3, { color: "#0a0a0a", size: "$7", lineHeight: 28, children: headline })
|
|
6224
|
+
] }),
|
|
6225
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_tamagui75.XStack, { gap: 8, flexWrap: "wrap", children: categories.map((c) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6226
|
+
import_react_native15.View,
|
|
6227
|
+
{
|
|
6228
|
+
onTouchEnd: c.onPress,
|
|
6229
|
+
style: {
|
|
6230
|
+
paddingHorizontal: 12,
|
|
6231
|
+
paddingVertical: 6,
|
|
6232
|
+
borderRadius: 999,
|
|
6233
|
+
backgroundColor: c.active ? "#d9f99d" : "#f4f4f5"
|
|
6234
|
+
},
|
|
6235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6236
|
+
import_tamagui75.SizableText,
|
|
6237
|
+
{
|
|
6238
|
+
size: "$2",
|
|
6239
|
+
color: c.active ? "#365314" : "#52525b",
|
|
6240
|
+
fontWeight: "600",
|
|
6241
|
+
children: c.label
|
|
6242
|
+
}
|
|
6243
|
+
)
|
|
6244
|
+
},
|
|
6245
|
+
c.label
|
|
6246
|
+
)) }),
|
|
6247
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
6248
|
+
import_tamagui75.YStack,
|
|
6249
|
+
{
|
|
6250
|
+
flex: 1,
|
|
6251
|
+
borderRadius: 20,
|
|
6252
|
+
overflow: "hidden",
|
|
6253
|
+
backgroundColor: "#e7e5e4",
|
|
6254
|
+
marginTop: 4,
|
|
6255
|
+
children: [
|
|
6256
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6257
|
+
import_react_native15.Image,
|
|
6258
|
+
{
|
|
6259
|
+
source: { uri: listing.image },
|
|
6260
|
+
style: { width: "100%", height: "60%" },
|
|
6261
|
+
resizeMode: "cover"
|
|
6262
|
+
}
|
|
6263
|
+
),
|
|
6264
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.YStack, { flex: 1, padding: 14, gap: 8, children: [
|
|
6265
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.XStack, { alignItems: "center", justifyContent: "space-between", children: [
|
|
6266
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_tamagui75.H4, { color: "#0a0a0a", size: "$5", children: listing.title }),
|
|
6267
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_native15.View, { onTouchEnd: onFavorite, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_icons4.Heart, { size: 18, color: "#ef4444" }) })
|
|
6268
|
+
] }),
|
|
6269
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.XStack, { alignItems: "center", gap: 4, children: [
|
|
6270
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_icons4.MapPin, { size: 12, color: "#737373" }),
|
|
6271
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_tamagui75.SizableText, { size: "$1", color: "#737373", children: listing.address })
|
|
6272
|
+
] }),
|
|
6273
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.XStack, { gap: 14, marginTop: 6, children: [
|
|
6274
|
+
typeof listing.bed === "number" ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.XStack, { alignItems: "center", gap: 4, children: [
|
|
6275
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_icons4.Bed, { size: 14, color: "#737373" }),
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.SizableText, { size: "$1", color: "#525252", children: [
|
|
6277
|
+
"Bed: ",
|
|
6278
|
+
listing.bed
|
|
6279
|
+
] })
|
|
6280
|
+
] }) : null,
|
|
6281
|
+
typeof listing.bath === "number" ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.XStack, { alignItems: "center", gap: 4, children: [
|
|
6282
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_icons4.Bath, { size: 14, color: "#737373" }),
|
|
6283
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.SizableText, { size: "$1", color: "#525252", children: [
|
|
6284
|
+
"Bath: ",
|
|
6285
|
+
listing.bath
|
|
6286
|
+
] })
|
|
6287
|
+
] }) : null,
|
|
6288
|
+
typeof listing.rating === "number" ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_tamagui75.XStack, { alignItems: "center", gap: 4, children: [
|
|
6289
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_icons4.Star, { size: 14, color: "#f59e0b", fill: "#f59e0b" }),
|
|
6290
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_tamagui75.SizableText, { size: "$1", color: "#525252", children: listing.rating.toFixed(1) })
|
|
6291
|
+
] }) : null
|
|
6292
|
+
] })
|
|
6293
|
+
] })
|
|
6294
|
+
]
|
|
6295
|
+
}
|
|
6296
|
+
)
|
|
6297
|
+
] });
|
|
6298
|
+
}
|
|
6299
|
+
|
|
6300
|
+
// src/patterns/StayCard/StayDetailScreen.tsx
|
|
6301
|
+
var import_react_native16 = require("react-native");
|
|
6302
|
+
var import_tamagui76 = require("tamagui");
|
|
6303
|
+
var import_lucide_icons5 = require("@tamagui/lucide-icons");
|
|
6304
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6305
|
+
var formatPrice = (n) => "$" + n.toLocaleString("en-US", { maximumFractionDigits: 0 });
|
|
6306
|
+
var buildDefaultMetrics = (props) => {
|
|
6307
|
+
const out = [];
|
|
6308
|
+
if (typeof props.listing.sqft === "number") {
|
|
6309
|
+
out.push({
|
|
6310
|
+
label: "Living",
|
|
6311
|
+
value: `${props.listing.sqft} sqft`
|
|
6312
|
+
});
|
|
6313
|
+
} else if (typeof props.listing.bed === "number") {
|
|
6314
|
+
out.push({
|
|
6315
|
+
label: "Beds",
|
|
6316
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_icons5.Bed, { size: 14, color: "#fafaf9" }),
|
|
6317
|
+
value: props.listing.bed
|
|
6318
|
+
});
|
|
6319
|
+
}
|
|
6320
|
+
if (typeof props.listing.bath === "number") {
|
|
6321
|
+
out.push({
|
|
6322
|
+
label: "Baths",
|
|
6323
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_icons5.Bath, { size: 14, color: "#fafaf9" }),
|
|
6324
|
+
value: props.listing.bath
|
|
6325
|
+
});
|
|
6326
|
+
}
|
|
6327
|
+
out.push({
|
|
6328
|
+
label: "Wifi",
|
|
6329
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_icons5.Wifi, { size: 14, color: "#fafaf9" }),
|
|
6330
|
+
value: "Fast"
|
|
6331
|
+
});
|
|
6332
|
+
return out;
|
|
6333
|
+
};
|
|
6334
|
+
function StayDetailScreen(props) {
|
|
6335
|
+
const {
|
|
6336
|
+
listing,
|
|
6337
|
+
metrics,
|
|
6338
|
+
eyebrow = "BOOKING DETAILS",
|
|
6339
|
+
ctaLabel = "Reserve now",
|
|
6340
|
+
onReserve,
|
|
6341
|
+
backgroundColor = "#0a0a0a",
|
|
6342
|
+
ctaColor = "#f97316"
|
|
6343
|
+
} = props;
|
|
6344
|
+
const resolvedMetrics = metrics ?? buildDefaultMetrics(props);
|
|
6345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_tamagui76.YStack, { flex: 1, backgroundColor, children: [
|
|
6346
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react_native16.View, { style: { position: "relative", height: "50%" }, children: [
|
|
6347
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6348
|
+
import_react_native16.Image,
|
|
6349
|
+
{
|
|
6350
|
+
source: { uri: listing.image },
|
|
6351
|
+
style: { width: "100%", height: "100%" },
|
|
6352
|
+
resizeMode: "cover"
|
|
6353
|
+
}
|
|
6354
|
+
),
|
|
6355
|
+
typeof listing.rating === "number" ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
6356
|
+
import_react_native16.View,
|
|
6357
|
+
{
|
|
6358
|
+
style: {
|
|
6359
|
+
position: "absolute",
|
|
6360
|
+
top: 36,
|
|
6361
|
+
right: 18,
|
|
6362
|
+
backgroundColor: "rgba(255,255,255,0.92)",
|
|
6363
|
+
paddingHorizontal: 10,
|
|
6364
|
+
paddingVertical: 6,
|
|
6365
|
+
borderRadius: 999,
|
|
6366
|
+
flexDirection: "row",
|
|
6367
|
+
alignItems: "center",
|
|
6368
|
+
gap: 4
|
|
6369
|
+
},
|
|
6370
|
+
children: [
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_icons5.Star, { size: 12, color: "#f59e0b", fill: "#f59e0b" }),
|
|
6372
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.SizableText, { size: "$1", color: "#0a0a0a", fontWeight: "700", children: listing.rating.toFixed(1) })
|
|
6373
|
+
]
|
|
6374
|
+
}
|
|
6375
|
+
) : null
|
|
6376
|
+
] }),
|
|
6377
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_tamagui76.YStack, { flex: 1, padding: 18, gap: 10, children: [
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.SizableText, { size: "$2", color: "#a3a3a3", children: eyebrow }),
|
|
6379
|
+
typeof listing.pricePerNight === "number" ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_tamagui76.H3, { color: "#fafaf9", size: "$7", children: [
|
|
6380
|
+
formatPrice(listing.pricePerNight),
|
|
6381
|
+
"/night"
|
|
6382
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.H3, { color: "#fafaf9", size: "$7", children: listing.title }),
|
|
6383
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_tamagui76.SizableText, { size: "$2", color: "#a3a3a3", children: [
|
|
6384
|
+
listing.ownerName ? listing.ownerName + " \xB7 " : "",
|
|
6385
|
+
listing.address
|
|
6386
|
+
] }),
|
|
6387
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.XStack, { gap: 20, marginTop: 6, children: resolvedMetrics.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_tamagui76.YStack, { gap: 2, children: [
|
|
6388
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.SizableText, { size: "$1", color: "#737373", children: m.label }),
|
|
6389
|
+
m.icon ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_tamagui76.XStack, { alignItems: "center", gap: 4, children: [
|
|
6390
|
+
m.icon,
|
|
6391
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.SizableText, { size: "$3", color: "#fafaf9", fontWeight: "600", children: m.value })
|
|
6392
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.SizableText, { size: "$3", color: "#fafaf9", fontWeight: "600", children: m.value })
|
|
6393
|
+
] }, i)) }),
|
|
6394
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6395
|
+
import_tamagui76.YStack,
|
|
6396
|
+
{
|
|
6397
|
+
marginTop: "auto",
|
|
6398
|
+
padding: 14,
|
|
6399
|
+
borderRadius: 14,
|
|
6400
|
+
backgroundColor: ctaColor,
|
|
6401
|
+
alignItems: "center",
|
|
6402
|
+
onPress: onReserve,
|
|
6403
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_tamagui76.SizableText, { size: "$3", color: "#fff", fontWeight: "700", children: ctaLabel })
|
|
6404
|
+
}
|
|
6405
|
+
)
|
|
6406
|
+
] })
|
|
6407
|
+
] });
|
|
6408
|
+
}
|
|
5910
6409
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5911
6410
|
0 && (module.exports = {
|
|
5912
6411
|
Accordion,
|
|
@@ -6030,6 +6529,7 @@ function useCollapsibleHeader(opts = {}) {
|
|
|
6030
6529
|
Separator,
|
|
6031
6530
|
SettingsScreen,
|
|
6032
6531
|
Sheet,
|
|
6532
|
+
Shockwave,
|
|
6033
6533
|
SizableStack,
|
|
6034
6534
|
SizableText,
|
|
6035
6535
|
Skeleton,
|
|
@@ -6039,6 +6539,8 @@ function useCollapsibleHeader(opts = {}) {
|
|
|
6039
6539
|
Square,
|
|
6040
6540
|
Stack,
|
|
6041
6541
|
StatusBadge,
|
|
6542
|
+
StayBrowseScreen,
|
|
6543
|
+
StayDetailScreen,
|
|
6042
6544
|
Step,
|
|
6043
6545
|
StepPageLayout,
|
|
6044
6546
|
SubHeading,
|