@mr.dj2u/library-registry 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/THIRD_PARTY_NOTICES.md +90 -0
  4. package/assets/create-expo-app/sdk-56/assets/images/expo-badge-white.png +0 -0
  5. package/assets/create-expo-app/sdk-56/assets/images/expo-badge.png +0 -0
  6. package/assets/create-expo-app/sdk-56/assets/images/expo-logo.png +0 -0
  7. package/assets/create-expo-app/sdk-56/assets/images/logo-glow.png +0 -0
  8. package/assets/create-expo-app/sdk-56/assets/images/react-logo.png +0 -0
  9. package/assets/create-expo-app/sdk-56/assets/images/react-logo@2x.png +0 -0
  10. package/assets/create-expo-app/sdk-56/assets/images/react-logo@3x.png +0 -0
  11. package/assets/create-expo-app/sdk-56/assets/images/tabIcons/explore.png +0 -0
  12. package/assets/create-expo-app/sdk-56/assets/images/tabIcons/explore@2x.png +0 -0
  13. package/assets/create-expo-app/sdk-56/assets/images/tabIcons/explore@3x.png +0 -0
  14. package/assets/create-expo-app/sdk-56/assets/images/tabIcons/home.png +0 -0
  15. package/assets/create-expo-app/sdk-56/assets/images/tabIcons/home@2x.png +0 -0
  16. package/assets/create-expo-app/sdk-56/assets/images/tabIcons/home@3x.png +0 -0
  17. package/assets/create-expo-app/sdk-56/assets/images/tutorial-web.png +0 -0
  18. package/assets/create-expo-app/sdk-56/src/app/_layout.tsx +15 -0
  19. package/assets/create-expo-app/sdk-56/src/app/explore.tsx +180 -0
  20. package/assets/create-expo-app/sdk-56/src/app/index.tsx +98 -0
  21. package/assets/create-expo-app/sdk-56/src/components/animated-icon.module.css +6 -0
  22. package/assets/create-expo-app/sdk-56/src/components/animated-icon.tsx +132 -0
  23. package/assets/create-expo-app/sdk-56/src/components/animated-icon.web.tsx +108 -0
  24. package/assets/create-expo-app/sdk-56/src/components/app-tabs.tsx +32 -0
  25. package/assets/create-expo-app/sdk-56/src/components/app-tabs.web.tsx +115 -0
  26. package/assets/create-expo-app/sdk-56/src/components/external-link.tsx +25 -0
  27. package/assets/create-expo-app/sdk-56/src/components/hint-row.tsx +35 -0
  28. package/assets/create-expo-app/sdk-56/src/components/themed-text.tsx +73 -0
  29. package/assets/create-expo-app/sdk-56/src/components/themed-view.tsx +16 -0
  30. package/assets/create-expo-app/sdk-56/src/components/ui/collapsible.tsx +65 -0
  31. package/assets/create-expo-app/sdk-56/src/components/web-badge.tsx +43 -0
  32. package/assets/create-expo-app/sdk-56/src/constants/theme.ts +65 -0
  33. package/assets/create-expo-app/sdk-56/src/global.css +9 -0
  34. package/assets/create-expo-app/sdk-56/src/hooks/use-color-scheme.ts +1 -0
  35. package/assets/create-expo-app/sdk-56/src/hooks/use-color-scheme.web.ts +21 -0
  36. package/assets/create-expo-app/sdk-56/src/hooks/use-theme.ts +14 -0
  37. package/assets/create-expo-stack/2.21.3/base/components/BackButton.tsx +23 -0
  38. package/assets/create-expo-stack/2.21.3/base/components/Button.tsx +42 -0
  39. package/assets/create-expo-stack/2.21.3/base/components/Container.tsx +14 -0
  40. package/assets/create-expo-stack/2.21.3/base/components/EditScreenInfo.tsx +36 -0
  41. package/assets/create-expo-stack/2.21.3/base/components/HeaderButton.tsx +31 -0
  42. package/assets/create-expo-stack/2.21.3/base/components/ScreenContent.tsx +40 -0
  43. package/assets/create-expo-stack/2.21.3/base/components/TabBarIcon.tsx +15 -0
  44. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/ActivityIndicator.tsx +10 -0
  45. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Avatar.tsx +32 -0
  46. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Button.tsx +141 -0
  47. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/DatePicker/DatePicker.android.tsx +77 -0
  48. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/DatePicker/DatePicker.tsx +23 -0
  49. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/DatePicker/index.ts +1 -0
  50. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/Icon.ios.tsx +55 -0
  51. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/Icon.tsx +58 -0
  52. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/index.ts +16 -0
  53. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Icon/types.ts +19 -0
  54. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Picker.tsx +42 -0
  55. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/ProgressIndicator.tsx +68 -0
  56. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Slider.tsx +28 -0
  57. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Text.tsx +55 -0
  58. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/ThemeToggle.tsx +33 -0
  59. package/assets/create-expo-stack/2.21.3-mrdj.2/src/components/nativewindui/Toggle.tsx +20 -0
  60. package/assets/create-expo-stack/2.21.3-mrdj.2/src/lib/cn.ts +6 -0
  61. package/assets/create-expo-stack/2.21.3-mrdj.2/src/lib/useColorScheme.tsx +21 -0
  62. package/assets/create-expo-stack/2.21.3-mrdj.2/src/lib/useHeaderSearchBar.tsx +33 -0
  63. package/assets/create-expo-stack/2.21.3-mrdj.2/src/theme/colors.ts +123 -0
  64. package/assets/create-expo-stack/2.21.3-mrdj.2/src/theme/index.ts +32 -0
  65. package/assets/create-expo-stack/2.21.3-mrdj.2/src/theme/with-opacity.ts +155 -0
  66. package/assets/mds/routes/drawer-tabs/data.tsx +1 -0
  67. package/assets/mds/routes/drawer-tabs/index.tsx +1 -0
  68. package/assets/mds/routes/drawer-tabs/nativewindui.tsx +1 -0
  69. package/assets/mds/routes/drawer-tabs/sdk-56.tsx +1 -0
  70. package/assets/mds/routes/drawer-tabs/stylist.tsx +1 -0
  71. package/assets/mds/scripts/stylist-sync-android.mjs +39 -0
  72. package/assets/mds/src/app/exposition/data.tsx +1 -0
  73. package/assets/mds/src/app/exposition/index.tsx +1 -0
  74. package/assets/mds/src/app/exposition/nativewindui.tsx +1 -0
  75. package/assets/mds/src/app/exposition/sdk-56.tsx +1 -0
  76. package/assets/mds/src/app/exposition/stylist-sync+api.ts +241 -0
  77. package/assets/mds/src/app/exposition/stylist.tsx +1 -0
  78. package/assets/mds/src/app/onboarding/account-setup.tsx +1 -0
  79. package/assets/mds/src/app/onboarding/agreement.tsx +1 -0
  80. package/assets/mds/src/app/onboarding/terms.tsx +1 -0
  81. package/assets/mds/src/app/onboarding.tsx +1 -0
  82. package/assets/mds/src/app/settings.tsx +1 -0
  83. package/assets/mds/src/components/exposition/index.ts +8 -0
  84. package/assets/mds/src/components/exposition/notice.tsx +3 -0
  85. package/assets/mds/src/components/exposition/package-card.tsx +76 -0
  86. package/assets/mds/src/components/swmansion/animated-pressable.tsx +54 -0
  87. package/assets/mds/src/components/swmansion/gesture-card.tsx +54 -0
  88. package/assets/mds/src/components/swmansion/keyboard-form.tsx +73 -0
  89. package/assets/mds/src/components/swmansion/screens-card.tsx +40 -0
  90. package/assets/mds/src/components/swmansion/software-mansion-logo.tsx +15 -0
  91. package/assets/mds/src/components/swmansion/svg-mark.tsx +16 -0
  92. package/assets/mds/src/data/mock-app.ts +21 -0
  93. package/assets/mds/src/features/exposition/data-screen.tsx +152 -0
  94. package/assets/mds/src/features/exposition/embedded-fonts.ts +72 -0
  95. package/assets/mds/src/features/exposition/expo-sdk-56-screen.tsx +709 -0
  96. package/assets/mds/src/features/exposition/exposition-screen.tsx +191 -0
  97. package/assets/mds/src/features/exposition/nativewindui-screen.tsx +125 -0
  98. package/assets/mds/src/features/exposition/stylist-screen.tsx +3456 -0
  99. package/assets/mds/src/features/onboarding/account-setup-screen.tsx +54 -0
  100. package/assets/mds/src/features/onboarding/agreement-screen.tsx +6 -0
  101. package/assets/mds/src/features/onboarding/components/legal-document-view.tsx +103 -0
  102. package/assets/mds/src/features/onboarding/legal-documents.ts +80 -0
  103. package/assets/mds/src/features/onboarding/onboarding-screen.tsx +167 -0
  104. package/assets/mds/src/features/onboarding/terms-screen.tsx +6 -0
  105. package/assets/mds/src/features/settings/settings-screen.tsx +57 -0
  106. package/assets/mds/src/services/local-data.native.ts +103 -0
  107. package/assets/mds/src/services/local-data.ts +38 -0
  108. package/assets/mds/src/theme/font-assets.ts +3 -0
  109. package/assets/mds/src/theme/provider.tsx +59 -0
  110. package/assets/mds/src/theme/tokens.ts +180 -0
  111. package/dist/catalog.d.ts +3 -0
  112. package/dist/catalog.d.ts.map +1 -0
  113. package/dist/catalog.js +1110 -0
  114. package/dist/catalog.js.map +1 -0
  115. package/dist/index.d.ts +5 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +4 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/registry.d.ts +7 -0
  120. package/dist/registry.d.ts.map +1 -0
  121. package/dist/registry.js +479 -0
  122. package/dist/registry.js.map +1 -0
  123. package/dist/types.d.ts +169 -0
  124. package/dist/types.d.ts.map +1 -0
  125. package/dist/types.js +2 -0
  126. package/dist/types.js.map +1 -0
  127. package/dist/validation.d.ts +6 -0
  128. package/dist/validation.d.ts.map +1 -0
  129. package/dist/validation.js +209 -0
  130. package/dist/validation.js.map +1 -0
  131. package/package.json +51 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mr. DJ's Dev Suite contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @mr.dj2u/library-registry
2
+
3
+ Typed, source-copy registry for completed Expo components, animations, screens,
4
+ flows, and integrations used by Mr. DJ's Dev Suite.
5
+
6
+ ```ts
7
+ import {
8
+ getLibraryItem,
9
+ listLibraryItems,
10
+ readLibraryAsset,
11
+ resolveLibraryItem,
12
+ searchLibraryItems,
13
+ } from "@mr.dj2u/library-registry";
14
+ ```
15
+
16
+ Catalog metadata is synchronous. `readLibraryAsset` returns a `Buffer` so text
17
+ and binary assets can both be restored without corruption.
18
+
19
+ ```ts
20
+ const resolution = resolveLibraryItem("swmansion/animated-pressable", {
21
+ expoSdk: 56,
22
+ appDirectory: "src/app",
23
+ componentsDirectory: "src/components",
24
+ featuresDirectory: "src/features",
25
+ navigation: "expo-router",
26
+ navigationLayout: "stack",
27
+ aliases: { "@": "./src" },
28
+ });
29
+
30
+ for (const asset of resolution.assets) {
31
+ const contents = await readLibraryAsset(asset);
32
+ // Preflight asset.destination, then copy contents without overwriting custom files.
33
+ }
34
+ ```
35
+
36
+ Supported destination tokens are `{{appDir}}`, `{{componentsDir}}`, and
37
+ `{{featuresDir}}`. Content is copied byte-for-byte except for placeholders
38
+ explicitly declared in an asset's `contentTokens` metadata. V1 declares only
39
+ `__MDS_APP_NAME__` in the canonical Stylist template.
40
+
41
+ The registry does not track installation history and does not implement
42
+ authentication. See `THIRD_PARTY_NOTICES.md` for snapshot provenance.
@@ -0,0 +1,90 @@
1
+ # Third-Party Notices
2
+
3
+ `@mr.dj2u/library-registry` distributes editable source snapshots. Each catalog
4
+ item records its exact source, source version, repository, and license.
5
+
6
+ ## Expo create-expo-app template
7
+
8
+ Files below `assets/create-expo-app/sdk-56/` are snapshots generated by the
9
+ Expo SDK 56 `create-expo-app` default template. Expo is copyright 650
10
+ Industries, Inc. (aka Expo) and is distributed under the MIT License. The
11
+ bundled notice below reproduces the required MIT license text for those source
12
+ snapshots.
13
+
14
+ Source: https://github.com/expo/expo/tree/main/templates/expo-template-default
15
+
16
+ ## create-expo-stack and NativeWindUI templates
17
+
18
+ The create-expo-stack and NativeWindUI snapshots in this package originate
19
+ from generated `create-expo-stack` output or its published template bundle.
20
+ `create-expo-stack` is copyright its contributors and distributed under the
21
+ MIT License, as recorded by its published package metadata.
22
+
23
+ Source: https://github.com/roninoss/create-expo-stack
24
+
25
+ NativeWindUI component snapshots are included only as they were distributed
26
+ inside the MIT-licensed create-expo-stack template. NativeWindUI remains the
27
+ name of its respective project and authors.
28
+
29
+ Source: https://nativewindui.com/
30
+
31
+ ## Mr. DJ's Dev Suite
32
+
33
+ MDS-authored files below `assets/mds/` were generated by Mr. DJ's Dev Suite
34
+ and are distributed under the bundled `LICENSE` file in this package. Any generated
35
+ NativeWindUI support files retained in that fixture remain covered by the
36
+ create-expo-stack notice above.
37
+
38
+ Source: https://github.com/DavidJGrimsley/mrdj-dev-suite
39
+
40
+ These notices do not change the licenses of applications into which users copy
41
+ the source. No authentication implementation or unfinished placeholder
42
+ feature is included in the registry.
43
+
44
+ ## Expo MIT license text
45
+
46
+ The MIT License (MIT)
47
+
48
+ Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)
49
+
50
+ Permission is hereby granted, free of charge, to any person obtaining a copy
51
+ of this software and associated documentation files (the "Software"), to deal
52
+ in the Software without restriction, including without limitation the rights
53
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
+ copies of the Software, and to permit persons to whom the Software is
55
+ furnished to do so, subject to the following conditions:
56
+
57
+ The above copyright notice and this permission notice shall be included in all
58
+ copies or substantial portions of the Software.
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
66
+ SOFTWARE.
67
+
68
+ ## create-expo-stack MIT license text
69
+
70
+ The MIT License (MIT)
71
+
72
+ Copyright (c) 2017
73
+
74
+ Permission is hereby granted, free of charge, to any person obtaining a copy
75
+ of this software and associated documentation files (the "Software"), to deal
76
+ in the Software without restriction, including without limitation the rights
77
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
78
+ copies of the Software, and to permit persons to whom the Software is
79
+ furnished to do so, subject to the following conditions:
80
+
81
+ The above copyright notice and this permission notice shall be included in all
82
+ copies or substantial portions of the Software.
83
+
84
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
85
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
86
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
87
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
88
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
89
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
90
+ SOFTWARE.
@@ -0,0 +1,15 @@
1
+ import { DarkTheme, DefaultTheme, ThemeProvider } from 'expo-router';
2
+ import { useColorScheme } from 'react-native';
3
+
4
+ import { AnimatedSplashOverlay } from '@/components/animated-icon';
5
+ import AppTabs from '@/components/app-tabs';
6
+
7
+ export default function TabLayout() {
8
+ const colorScheme = useColorScheme();
9
+ return (
10
+ <ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
11
+ <AnimatedSplashOverlay />
12
+ <AppTabs />
13
+ </ThemeProvider>
14
+ );
15
+ }
@@ -0,0 +1,180 @@
1
+ import { Image } from 'expo-image';
2
+ import { SymbolView } from 'expo-symbols';
3
+ import { Platform, Pressable, ScrollView, StyleSheet } from 'react-native';
4
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
+
6
+ import { ExternalLink } from '@/components/external-link';
7
+ import { ThemedText } from '@/components/themed-text';
8
+ import { ThemedView } from '@/components/themed-view';
9
+ import { Collapsible } from '@/components/ui/collapsible';
10
+ import { WebBadge } from '@/components/web-badge';
11
+ import { BottomTabInset, MaxContentWidth, Spacing } from '@/constants/theme';
12
+ import { useTheme } from '@/hooks/use-theme';
13
+
14
+ export default function TabTwoScreen() {
15
+ const safeAreaInsets = useSafeAreaInsets();
16
+ const insets = {
17
+ ...safeAreaInsets,
18
+ bottom: safeAreaInsets.bottom + BottomTabInset + Spacing.three,
19
+ };
20
+ const theme = useTheme();
21
+
22
+ const contentPlatformStyle = Platform.select({
23
+ android: {
24
+ paddingTop: insets.top,
25
+ paddingLeft: insets.left,
26
+ paddingRight: insets.right,
27
+ paddingBottom: insets.bottom,
28
+ },
29
+ web: {
30
+ paddingTop: Spacing.six,
31
+ paddingBottom: Spacing.four,
32
+ },
33
+ });
34
+
35
+ return (
36
+ <ScrollView
37
+ style={[styles.scrollView, { backgroundColor: theme.background }]}
38
+ contentInset={insets}
39
+ contentContainerStyle={[styles.contentContainer, contentPlatformStyle]}>
40
+ <ThemedView style={styles.container}>
41
+ <ThemedView style={styles.titleContainer}>
42
+ <ThemedText type="subtitle">Explore</ThemedText>
43
+ <ThemedText style={styles.centerText} themeColor="textSecondary">
44
+ This starter app includes example{'\n'}code to help you get started.
45
+ </ThemedText>
46
+
47
+ <ExternalLink href="https://docs.expo.dev" asChild>
48
+ <Pressable style={({ pressed }) => pressed && styles.pressed}>
49
+ <ThemedView type="backgroundElement" style={styles.linkButton}>
50
+ <ThemedText type="link">Expo documentation</ThemedText>
51
+ <SymbolView
52
+ tintColor={theme.text}
53
+ name={{ ios: 'arrow.up.right.square', android: 'link', web: 'link' }}
54
+ size={12}
55
+ />
56
+ </ThemedView>
57
+ </Pressable>
58
+ </ExternalLink>
59
+ </ThemedView>
60
+
61
+ <ThemedView style={styles.sectionsWrapper}>
62
+ <Collapsible title="File-based routing">
63
+ <ThemedText type="small">
64
+ This app has two screens: <ThemedText type="code">src/app/index.tsx</ThemedText> and{' '}
65
+ <ThemedText type="code">src/app/explore.tsx</ThemedText>
66
+ </ThemedText>
67
+ <ThemedText type="small">
68
+ The layout file in <ThemedText type="code">src/app/_layout.tsx</ThemedText> sets up
69
+ the tab navigator.
70
+ </ThemedText>
71
+ <ExternalLink href="https://docs.expo.dev/router/introduction">
72
+ <ThemedText type="linkPrimary">Learn more</ThemedText>
73
+ </ExternalLink>
74
+ </Collapsible>
75
+
76
+ <Collapsible title="Android, iOS, and web support">
77
+ <ThemedView type="backgroundElement" style={styles.collapsibleContent}>
78
+ <ThemedText type="small">
79
+ You can open this project on Android, iOS, and the web. To open the web version,
80
+ press <ThemedText type="smallBold">w</ThemedText> in the terminal running this
81
+ project.
82
+ </ThemedText>
83
+ <Image
84
+ source={require('@/assets/images/tutorial-web.png')}
85
+ style={styles.imageTutorial}
86
+ />
87
+ </ThemedView>
88
+ </Collapsible>
89
+
90
+ <Collapsible title="Images">
91
+ <ThemedText type="small">
92
+ For static images, you can use the <ThemedText type="code">@2x</ThemedText> and{' '}
93
+ <ThemedText type="code">@3x</ThemedText> suffixes to provide files for different
94
+ screen densities.
95
+ </ThemedText>
96
+ <Image source={require('@/assets/images/react-logo.png')} style={styles.imageReact} />
97
+ <ExternalLink href="https://reactnative.dev/docs/images">
98
+ <ThemedText type="linkPrimary">Learn more</ThemedText>
99
+ </ExternalLink>
100
+ </Collapsible>
101
+
102
+ <Collapsible title="Light and dark mode components">
103
+ <ThemedText type="small">
104
+ This template has light and dark mode support. The{' '}
105
+ <ThemedText type="code">useColorScheme()</ThemedText> hook lets you inspect what the
106
+ user&apos;s current color scheme is, and so you can adjust UI colors accordingly.
107
+ </ThemedText>
108
+ <ExternalLink href="https://docs.expo.dev/develop/user-interface/color-themes/">
109
+ <ThemedText type="linkPrimary">Learn more</ThemedText>
110
+ </ExternalLink>
111
+ </Collapsible>
112
+
113
+ <Collapsible title="Animations">
114
+ <ThemedText type="small">
115
+ This template includes an example of an animated component. The{' '}
116
+ <ThemedText type="code">src/components/ui/collapsible.tsx</ThemedText> component uses
117
+ the powerful <ThemedText type="code">react-native-reanimated</ThemedText> library to
118
+ animate opening this hint.
119
+ </ThemedText>
120
+ </Collapsible>
121
+ </ThemedView>
122
+ {Platform.OS === 'web' && <WebBadge />}
123
+ </ThemedView>
124
+ </ScrollView>
125
+ );
126
+ }
127
+
128
+ const styles = StyleSheet.create({
129
+ scrollView: {
130
+ flex: 1,
131
+ },
132
+ contentContainer: {
133
+ flexDirection: 'row',
134
+ justifyContent: 'center',
135
+ },
136
+ container: {
137
+ maxWidth: MaxContentWidth,
138
+ flexGrow: 1,
139
+ },
140
+ titleContainer: {
141
+ gap: Spacing.three,
142
+ alignItems: 'center',
143
+ paddingHorizontal: Spacing.four,
144
+ paddingVertical: Spacing.six,
145
+ },
146
+ centerText: {
147
+ textAlign: 'center',
148
+ },
149
+ pressed: {
150
+ opacity: 0.7,
151
+ },
152
+ linkButton: {
153
+ flexDirection: 'row',
154
+ paddingHorizontal: Spacing.four,
155
+ paddingVertical: Spacing.two,
156
+ borderRadius: Spacing.five,
157
+ justifyContent: 'center',
158
+ gap: Spacing.one,
159
+ alignItems: 'center',
160
+ },
161
+ sectionsWrapper: {
162
+ gap: Spacing.five,
163
+ paddingHorizontal: Spacing.four,
164
+ paddingTop: Spacing.three,
165
+ },
166
+ collapsibleContent: {
167
+ alignItems: 'center',
168
+ },
169
+ imageTutorial: {
170
+ width: '100%',
171
+ aspectRatio: 296 / 171,
172
+ borderRadius: Spacing.three,
173
+ marginTop: Spacing.two,
174
+ },
175
+ imageReact: {
176
+ width: 100,
177
+ height: 100,
178
+ alignSelf: 'center',
179
+ },
180
+ });
@@ -0,0 +1,98 @@
1
+ import * as Device from 'expo-device';
2
+ import { Platform, StyleSheet } from 'react-native';
3
+ import { SafeAreaView } from 'react-native-safe-area-context';
4
+
5
+ import { AnimatedIcon } from '@/components/animated-icon';
6
+ import { HintRow } from '@/components/hint-row';
7
+ import { ThemedText } from '@/components/themed-text';
8
+ import { ThemedView } from '@/components/themed-view';
9
+ import { WebBadge } from '@/components/web-badge';
10
+ import { BottomTabInset, MaxContentWidth, Spacing } from '@/constants/theme';
11
+
12
+ function getDevMenuHint() {
13
+ if (Platform.OS === 'web') {
14
+ return <ThemedText type="small">use browser devtools</ThemedText>;
15
+ }
16
+ if (Device.isDevice) {
17
+ return (
18
+ <ThemedText type="small">
19
+ shake device or press <ThemedText type="code">m</ThemedText> in terminal
20
+ </ThemedText>
21
+ );
22
+ }
23
+ const shortcut = Platform.OS === 'android' ? 'cmd+m (or ctrl+m)' : 'cmd+d';
24
+ return (
25
+ <ThemedText type="small">
26
+ press <ThemedText type="code">{shortcut}</ThemedText>
27
+ </ThemedText>
28
+ );
29
+ }
30
+
31
+ export default function HomeScreen() {
32
+ return (
33
+ <ThemedView style={styles.container}>
34
+ <SafeAreaView style={styles.safeArea}>
35
+ <ThemedView style={styles.heroSection}>
36
+ <AnimatedIcon />
37
+ <ThemedText type="title" style={styles.title}>
38
+ Welcome to&nbsp;Expo
39
+ </ThemedText>
40
+ </ThemedView>
41
+
42
+ <ThemedText type="code" style={styles.code}>
43
+ get started
44
+ </ThemedText>
45
+
46
+ <ThemedView type="backgroundElement" style={styles.stepContainer}>
47
+ <HintRow
48
+ title="Try editing"
49
+ hint={<ThemedText type="code">src/app/index.tsx</ThemedText>}
50
+ />
51
+ <HintRow title="Dev tools" hint={getDevMenuHint()} />
52
+ <HintRow
53
+ title="Fresh start"
54
+ hint={<ThemedText type="code">npm run reset-project</ThemedText>}
55
+ />
56
+ </ThemedView>
57
+
58
+ {Platform.OS === 'web' && <WebBadge />}
59
+ </SafeAreaView>
60
+ </ThemedView>
61
+ );
62
+ }
63
+
64
+ const styles = StyleSheet.create({
65
+ container: {
66
+ flex: 1,
67
+ justifyContent: 'center',
68
+ flexDirection: 'row',
69
+ },
70
+ safeArea: {
71
+ flex: 1,
72
+ paddingHorizontal: Spacing.four,
73
+ alignItems: 'center',
74
+ gap: Spacing.three,
75
+ paddingBottom: BottomTabInset + Spacing.three,
76
+ maxWidth: MaxContentWidth,
77
+ },
78
+ heroSection: {
79
+ alignItems: 'center',
80
+ justifyContent: 'center',
81
+ flex: 1,
82
+ paddingHorizontal: Spacing.four,
83
+ gap: Spacing.four,
84
+ },
85
+ title: {
86
+ textAlign: 'center',
87
+ },
88
+ code: {
89
+ textTransform: 'uppercase',
90
+ },
91
+ stepContainer: {
92
+ gap: Spacing.three,
93
+ alignSelf: 'stretch',
94
+ paddingHorizontal: Spacing.three,
95
+ paddingVertical: Spacing.four,
96
+ borderRadius: Spacing.four,
97
+ },
98
+ });
@@ -0,0 +1,6 @@
1
+ .expoLogoBackground {
2
+ background-image: linear-gradient(180deg, #3c9ffe, #0274df);
3
+ border-radius: 40px;
4
+ width: 128px;
5
+ height: 128px;
6
+ }
@@ -0,0 +1,132 @@
1
+ import { Image } from 'expo-image';
2
+ import { useState } from 'react';
3
+ import { Dimensions, StyleSheet, View } from 'react-native';
4
+ import Animated, { Easing, Keyframe } from 'react-native-reanimated';
5
+ import { scheduleOnRN } from 'react-native-worklets';
6
+
7
+ const INITIAL_SCALE_FACTOR = Dimensions.get('screen').height / 90;
8
+ const DURATION = 600;
9
+
10
+ export function AnimatedSplashOverlay() {
11
+ const [visible, setVisible] = useState(true);
12
+
13
+ if (!visible) return null;
14
+
15
+ const splashKeyframe = new Keyframe({
16
+ 0: {
17
+ transform: [{ scale: INITIAL_SCALE_FACTOR }],
18
+ opacity: 1,
19
+ },
20
+ 20: {
21
+ opacity: 1,
22
+ },
23
+ 70: {
24
+ opacity: 0,
25
+ easing: Easing.elastic(0.7),
26
+ },
27
+ 100: {
28
+ opacity: 0,
29
+ transform: [{ scale: 1 }],
30
+ easing: Easing.elastic(0.7),
31
+ },
32
+ });
33
+
34
+ return (
35
+ <Animated.View
36
+ entering={splashKeyframe.duration(DURATION).withCallback((finished) => {
37
+ 'worklet';
38
+ if (finished) {
39
+ scheduleOnRN(setVisible, false);
40
+ }
41
+ })}
42
+ style={styles.backgroundSolidColor}
43
+ />
44
+ );
45
+ }
46
+
47
+ const keyframe = new Keyframe({
48
+ 0: {
49
+ transform: [{ scale: INITIAL_SCALE_FACTOR }],
50
+ },
51
+ 100: {
52
+ transform: [{ scale: 1 }],
53
+ easing: Easing.elastic(0.7),
54
+ },
55
+ });
56
+
57
+ const logoKeyframe = new Keyframe({
58
+ 0: {
59
+ transform: [{ scale: 1.3 }],
60
+ opacity: 0,
61
+ },
62
+ 40: {
63
+ transform: [{ scale: 1.3 }],
64
+ opacity: 0,
65
+ easing: Easing.elastic(0.7),
66
+ },
67
+ 100: {
68
+ opacity: 1,
69
+ transform: [{ scale: 1 }],
70
+ easing: Easing.elastic(0.7),
71
+ },
72
+ });
73
+
74
+ const glowKeyframe = new Keyframe({
75
+ 0: {
76
+ transform: [{ rotateZ: '0deg' }],
77
+ },
78
+ 100: {
79
+ transform: [{ rotateZ: '7200deg' }],
80
+ },
81
+ });
82
+
83
+ export function AnimatedIcon() {
84
+ return (
85
+ <View style={styles.iconContainer}>
86
+ <Animated.View entering={glowKeyframe.duration(60 * 1000 * 4)} style={styles.glow}>
87
+ <Image style={styles.glow} source={require('@/assets/images/logo-glow.png')} />
88
+ </Animated.View>
89
+
90
+ <Animated.View entering={keyframe.duration(DURATION)} style={styles.background} />
91
+ <Animated.View style={styles.imageContainer} entering={logoKeyframe.duration(DURATION)}>
92
+ <Image style={styles.image} source={require('@/assets/images/expo-logo.png')} />
93
+ </Animated.View>
94
+ </View>
95
+ );
96
+ }
97
+
98
+ const styles = StyleSheet.create({
99
+ imageContainer: {
100
+ justifyContent: 'center',
101
+ alignItems: 'center',
102
+ },
103
+ glow: {
104
+ width: 201,
105
+ height: 201,
106
+ position: 'absolute',
107
+ },
108
+ iconContainer: {
109
+ justifyContent: 'center',
110
+ alignItems: 'center',
111
+ width: 128,
112
+ height: 128,
113
+ zIndex: 100,
114
+ },
115
+ image: {
116
+ position: 'absolute',
117
+ width: 76,
118
+ height: 71,
119
+ },
120
+ background: {
121
+ borderRadius: 40,
122
+ experimental_backgroundImage: `linear-gradient(180deg, #3C9FFE, #0274DF)`,
123
+ width: 128,
124
+ height: 128,
125
+ position: 'absolute',
126
+ },
127
+ backgroundSolidColor: {
128
+ ...StyleSheet.absoluteFill,
129
+ backgroundColor: '#208AEF',
130
+ zIndex: 1000,
131
+ },
132
+ });