@rootnative/web-expo 0.0.0-alpha.4

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 (75) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +21 -0
  3. package/README.md +21 -0
  4. package/asset-registry.js +4 -0
  5. package/dist/AppRegistry.js +52 -0
  6. package/dist/cjs/exports/StyleSheet/compiler/createReactDOMStyle.js +2 -0
  7. package/dist/cjs/exports/StyleSheet/preprocess.js +2 -0
  8. package/dist/createSheet.js +40 -0
  9. package/dist/exports/AccessibilityInfo/index.js +1 -0
  10. package/dist/exports/ActivityIndicator/index.js +1 -0
  11. package/dist/exports/Alert/index.js +1 -0
  12. package/dist/exports/Animated/index.js +3 -0
  13. package/dist/exports/AppRegistry/index.js +1 -0
  14. package/dist/exports/AppState/index.js +1 -0
  15. package/dist/exports/Appearance/index.js +1 -0
  16. package/dist/exports/BackHandler/index.js +1 -0
  17. package/dist/exports/Button/index.js +1 -0
  18. package/dist/exports/CheckBox/index.js +3 -0
  19. package/dist/exports/Clipboard/index.js +1 -0
  20. package/dist/exports/DeviceEventEmitter/index.js +3 -0
  21. package/dist/exports/Dimensions/index.js +1 -0
  22. package/dist/exports/Easing/index.js +3 -0
  23. package/dist/exports/FlatList/index.js +1 -0
  24. package/dist/exports/I18nManager/index.js +1 -0
  25. package/dist/exports/Image/index.js +1 -0
  26. package/dist/exports/ImageBackground/index.js +3 -0
  27. package/dist/exports/InputAccessoryView/index.js +3 -0
  28. package/dist/exports/InteractionManager/index.js +3 -0
  29. package/dist/exports/Keyboard/index.js +1 -0
  30. package/dist/exports/KeyboardAvoidingView/index.js +1 -0
  31. package/dist/exports/LayoutAnimation/index.js +3 -0
  32. package/dist/exports/Linking/index.js +1 -0
  33. package/dist/exports/LogBox/index.js +3 -0
  34. package/dist/exports/Modal/index.js +1 -0
  35. package/dist/exports/NativeEventEmitter/index.js +3 -0
  36. package/dist/exports/NativeModules/index.js +3 -0
  37. package/dist/exports/PanResponder/index.js +1 -0
  38. package/dist/exports/Picker/index.js +3 -0
  39. package/dist/exports/PixelRatio/index.js +1 -0
  40. package/dist/exports/Platform/index.js +1 -0
  41. package/dist/exports/Pressable/index.js +1 -0
  42. package/dist/exports/ProgressBar/index.js +3 -0
  43. package/dist/exports/RefreshControl/index.js +1 -0
  44. package/dist/exports/SafeAreaView/index.js +3 -0
  45. package/dist/exports/ScrollView/index.js +1 -0
  46. package/dist/exports/SectionList/index.js +3 -0
  47. package/dist/exports/Share/index.js +1 -0
  48. package/dist/exports/StatusBar/index.js +1 -0
  49. package/dist/exports/StyleSheet/dom/index.js +1 -0
  50. package/dist/exports/StyleSheet/index.js +1 -0
  51. package/dist/exports/Switch/index.js +1 -0
  52. package/dist/exports/Text/index.js +1 -0
  53. package/dist/exports/TextInput/index.js +1 -0
  54. package/dist/exports/Touchable/index.js +3 -0
  55. package/dist/exports/TouchableHighlight/index.js +1 -0
  56. package/dist/exports/TouchableNativeFeedback/index.js +1 -0
  57. package/dist/exports/TouchableOpacity/index.js +1 -0
  58. package/dist/exports/TouchableWithoutFeedback/index.js +1 -0
  59. package/dist/exports/UIManager/index.js +3 -0
  60. package/dist/exports/Vibration/index.js +1 -0
  61. package/dist/exports/View/index.js +1 -0
  62. package/dist/exports/VirtualizedList/index.js +3 -0
  63. package/dist/exports/YellowBox/index.js +3 -0
  64. package/dist/exports/createElement/index.js +1 -0
  65. package/dist/exports/findNodeHandle/index.js +1 -0
  66. package/dist/exports/processColor/index.js +1 -0
  67. package/dist/exports/render/index.js +3 -0
  68. package/dist/exports/unmountComponentAtNode/index.js +3 -0
  69. package/dist/exports/useColorScheme/index.js +1 -0
  70. package/dist/exports/useLocaleContext/index.js +3 -0
  71. package/dist/exports/useWindowDimensions/index.js +1 -0
  72. package/dist/index.js +25 -0
  73. package/dist/missing.js +10 -0
  74. package/expo-exports.json +91 -0
  75. package/package.json +47 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@rootnative/web-expo` are in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Before `1.0.0`, any release can have breaking changes. Each release lists them.
4
+
5
+ Each version works only with the same version of `@rootnative/web`. The package depends on that exact version.
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.0.0-alpha.4] - 2026-11-15
10
+
11
+ ### Added
12
+
13
+ - **The first release.** An Expo app with no router runs on `@rootnative/web` in place of react-native-web. Install this package under the name `react-native-web`, with an npm alias. Expo Router needs `Animated`, which isn't there yet. See [Expo](https://rootnative.github.io/web/expo).
14
+ - **The file layout that Expo's web bundler reads:** one file for each name of `react-native` in `dist/exports/<Name>/index.js`, and `dist/index.js` for every name. Each file loads only its own module of `@rootnative/web`, so the app bundles only the components that it imports.
15
+ - **`AppRegistry`** with the three methods that Expo calls: `registerComponent`, `runApplication`, which renders or hydrates the app, and `getApplication`, which gives a server render its element and its style element.
16
+ - **`createSheet`** in `dist/exports/StyleSheet/dom`, where Expo looks for it. It adds the four reset rules of react-native-web, such as `body { margin: 0 }`, once for each document.
17
+ - **`asset-registry.js`**, for a library that imports React Native's asset registry, such as `react-native-svg` or `expo-asset`.
18
+ - **The two style files of react-native-web that Reanimated 4 reads**, so Reanimated animates the components of `@rootnative/web`.
19
+ - **A stub for each name that `@rootnative/web` doesn't have yet**, such as `Animated`. The import works, and a use throws an error with the name. `expo-exports.json` lists these names under `missing`.
20
+
21
+ [unreleased]: https://github.com/rootnative/web/compare/web@0.0.0-alpha.4...HEAD
22
+ [0.0.0-alpha.4]: https://github.com/rootnative/web/releases/tag/web@0.0.0-alpha.4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rootnative
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,21 @@
1
+ # @rootnative/web-expo
2
+
3
+ Runs an Expo app on [`@rootnative/web`](https://rootnative.github.io/web/) in place of react-native-web.
4
+
5
+ Expo's web bundler rewrites each `react-native` import to a file of react-native-web. This package has the same file layout, and each file loads `@rootnative/web`. Install it under the name `react-native-web`:
6
+
7
+ ```json
8
+ {
9
+ "dependencies": {
10
+ "react-native-web": "npm:@rootnative/web-expo@0.0.0-alpha.4"
11
+ }
12
+ }
13
+ ```
14
+
15
+ This package depends on the same version of `@rootnative/web`, and works only with that version. Don't add a different version of `@rootnative/web` to your app.
16
+
17
+ ## What works
18
+
19
+ An Expo app with no router, on the dev server and in a web export (`expo export --platform web`). Reanimated 4 animates the components, image imports load, and `react-native-svg` renders.
20
+
21
+ The names of React Native that `@rootnative/web` doesn't have yet load as stubs, and a stub throws when your code uses it. `expo-exports.json` lists them under `missing`. Expo Router needs `Animated`, which is one of them.
@@ -0,0 +1,4 @@
1
+ // Expo's bundler resolves the asset registry of React Native to `react-native-web/asset-registry`
2
+ // on the web, for a library that imports it. An image import of the app doesn't come here: on
3
+ // the web, Expo gives it a URL.
4
+ export { getAssetByID, registerAsset } from '@rootnative/web/assets-registry'
@@ -0,0 +1,52 @@
1
+ import { createStyleRegistry, renderStyleTags, StyleRegistryProvider } from '@rootnative/web/server'
2
+ import { Children, cloneElement, createElement } from 'react'
3
+ import { createRoot, hydrateRoot } from 'react-dom/client'
4
+
5
+ const providers = new Map()
6
+
7
+ const elementOf = (appKey, parameters) => {
8
+ const provider = providers.get(appKey)
9
+ if (provider === undefined) {
10
+ throw new Error(
11
+ `Application "${appKey}" has not been registered. Call AppRegistry.registerComponent first.`,
12
+ )
13
+ }
14
+ return createElement(provider(), parameters?.initialProps ?? {})
15
+ }
16
+
17
+ // The three methods that Expo calls on the web. `registerRootComponent` from `expo` registers
18
+ // the app and runs it, and the static export of Expo Router reads `getApplication`.
19
+ export const AppRegistry = {
20
+ registerComponent(appKey, componentProvider) {
21
+ providers.set(appKey, componentProvider)
22
+ return appKey
23
+ },
24
+ // For a render on a server. The styles of this render go into a registry of its own, so two
25
+ // requests never share CSS. Expo Router renders `element` first and then asks for the style
26
+ // element, which it puts in `<head>`. The runtime has three style sheets, so the "element" is
27
+ // a fragment of three, and the browser adopts them by their ids on hydration.
28
+ getApplication(appKey, parameters) {
29
+ const registry = createStyleRegistry()
30
+ return {
31
+ element: createElement(StyleRegistryProvider, { registry }, elementOf(appKey, parameters)),
32
+ getStyleElement: (props) => {
33
+ const tags = renderStyleTags(registry)
34
+ if (props === undefined) return tags
35
+ return cloneElement(
36
+ tags,
37
+ undefined,
38
+ ...Children.map(tags.props.children, (tag) => cloneElement(tag, props)),
39
+ )
40
+ },
41
+ }
42
+ },
43
+ runApplication(appKey, parameters) {
44
+ const { rootTag, hydrate } = parameters
45
+ if (!rootTag) throw new Error(`"rootTag" was not provided for appKey "${appKey}".`)
46
+ const element = elementOf(appKey, parameters)
47
+ if (hydrate) return hydrateRoot(rootTag, element)
48
+ const root = createRoot(rootTag)
49
+ root.render(element)
50
+ return root
51
+ },
52
+ }
@@ -0,0 +1,2 @@
1
+ export * from '@rootnative/web/style'
2
+ export { default } from '@rootnative/web/style'
@@ -0,0 +1,2 @@
1
+ export * from '@rootnative/web/style'
2
+ export { default } from '@rootnative/web/style'
@@ -0,0 +1,40 @@
1
+ // Expo's `AppRegistry` for the web calls `createSheet(rootTag)` from
2
+ // `react-native-web/dist/exports/StyleSheet/dom` before the first render. In react-native-web, that
3
+ // sheet starts with a small reset of the document, and Expo's default `index.html` relies on it:
4
+ // without it, `body` keeps the 8 px margin of the browser, and the page scrolls. These are the
5
+ // same rules, in a sheet with the same id.
6
+ export const resetRules = [
7
+ 'html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}',
8
+ 'body{margin:0;}',
9
+ 'button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}',
10
+ 'input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}',
11
+ ]
12
+
13
+ export function createSheet(root, id = 'react-native-stylesheet') {
14
+ if (typeof document === 'undefined') {
15
+ const rules = [...resetRules]
16
+ return {
17
+ id,
18
+ getTextContent: () => rules.join('\n'),
19
+ insert: (cssText) => void rules.push(cssText),
20
+ }
21
+ }
22
+ // The root can be in a shadow root, which has style sheets of its own.
23
+ const rootNode = root?.getRootNode?.()
24
+ const scope = typeof rootNode?.getElementById === 'function' ? rootNode : document
25
+ let element = scope.getElementById(id)
26
+ if (element === null) {
27
+ element = document.createElement('style')
28
+ element.id = id
29
+ element.textContent = resetRules.join('\n')
30
+ // First in its parent, so each style sheet after it wins over the reset.
31
+ const parent = scope === document ? (document.head ?? document.documentElement) : scope
32
+ parent.insertBefore(element, parent.firstChild)
33
+ }
34
+ const sheet = element
35
+ return {
36
+ id,
37
+ getTextContent: () => sheet.textContent,
38
+ insert: (cssText) => sheet.append(`\n${cssText}`),
39
+ }
40
+ }
@@ -0,0 +1 @@
1
+ export { AccessibilityInfo as default } from '@rootnative/web/internal/apis/AccessibilityInfo/index.js'
@@ -0,0 +1 @@
1
+ export { ActivityIndicator as default } from '@rootnative/web/internal/components/ActivityIndicator/index.js'
@@ -0,0 +1 @@
1
+ export { Alert as default } from '@rootnative/web/internal/apis/Alert/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('Animated')
@@ -0,0 +1 @@
1
+ export { AppRegistry as default } from '../../AppRegistry.js'
@@ -0,0 +1 @@
1
+ export { AppState as default } from '@rootnative/web/internal/apis/AppState/index.js'
@@ -0,0 +1 @@
1
+ export { Appearance as default } from '@rootnative/web/internal/apis/Appearance/index.js'
@@ -0,0 +1 @@
1
+ export { BackHandler as default } from '@rootnative/web/internal/apis/BackHandler/index.js'
@@ -0,0 +1 @@
1
+ export { Button as default } from '@rootnative/web/internal/components/Button/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('CheckBox')
@@ -0,0 +1 @@
1
+ export { Clipboard as default } from '@rootnative/web/internal/apis/Clipboard/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('DeviceEventEmitter')
@@ -0,0 +1 @@
1
+ export { Dimensions as default } from '@rootnative/web/internal/apis/Dimensions/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('Easing')
@@ -0,0 +1 @@
1
+ export { FlatList as default } from '@rootnative/web/internal/components/FlatList/index.js'
@@ -0,0 +1 @@
1
+ export { I18nManager as default } from '@rootnative/web/internal/apis/I18nManager/index.js'
@@ -0,0 +1 @@
1
+ export { Image as default } from '@rootnative/web/internal/components/Image/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('ImageBackground')
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('InputAccessoryView')
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('InteractionManager')
@@ -0,0 +1 @@
1
+ export { Keyboard as default } from '@rootnative/web/internal/apis/Keyboard/index.js'
@@ -0,0 +1 @@
1
+ export { KeyboardAvoidingView as default } from '@rootnative/web/internal/components/KeyboardAvoidingView/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('LayoutAnimation')
@@ -0,0 +1 @@
1
+ export { Linking as default } from '@rootnative/web/internal/apis/Linking/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('LogBox')
@@ -0,0 +1 @@
1
+ export { Modal as default } from '@rootnative/web/internal/components/Modal/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('NativeEventEmitter')
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('NativeModules')
@@ -0,0 +1 @@
1
+ export { PanResponder as default } from '@rootnative/web/internal/apis/PanResponder/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('Picker')
@@ -0,0 +1 @@
1
+ export { PixelRatio as default } from '@rootnative/web/internal/apis/PixelRatio/index.js'
@@ -0,0 +1 @@
1
+ export { Platform as default } from '@rootnative/web/internal/apis/Platform/index.js'
@@ -0,0 +1 @@
1
+ export { Pressable as default } from '@rootnative/web/internal/components/Pressable/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('ProgressBar')
@@ -0,0 +1 @@
1
+ export { RefreshControl as default } from '@rootnative/web/internal/components/RefreshControl/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('SafeAreaView')
@@ -0,0 +1 @@
1
+ export { ScrollView as default } from '@rootnative/web/internal/components/ScrollView/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('SectionList')
@@ -0,0 +1 @@
1
+ export { Share as default } from '@rootnative/web/internal/apis/Share/index.js'
@@ -0,0 +1 @@
1
+ export { StatusBar as default } from '@rootnative/web/internal/components/StatusBar/index.js'
@@ -0,0 +1 @@
1
+ export { createSheet } from '../../../createSheet.js'
@@ -0,0 +1 @@
1
+ export { StyleSheet as default } from '@rootnative/web/internal/apis/StyleSheet/index.js'
@@ -0,0 +1 @@
1
+ export { Switch as default } from '@rootnative/web/internal/components/Switch/index.js'
@@ -0,0 +1 @@
1
+ export { Text as default } from '@rootnative/web/internal/components/Text/index.js'
@@ -0,0 +1 @@
1
+ export { TextInput as default } from '@rootnative/web/internal/components/TextInput/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('Touchable')
@@ -0,0 +1 @@
1
+ export { TouchableHighlight as default } from '@rootnative/web/internal/components/TouchableHighlight/index.js'
@@ -0,0 +1 @@
1
+ export { TouchableNativeFeedback as default } from '@rootnative/web/internal/components/TouchableNativeFeedback/index.js'
@@ -0,0 +1 @@
1
+ export { TouchableOpacity as default } from '@rootnative/web/internal/components/TouchableOpacity/index.js'
@@ -0,0 +1 @@
1
+ export { TouchableWithoutFeedback as default } from '@rootnative/web/internal/components/TouchableWithoutFeedback/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('UIManager')
@@ -0,0 +1 @@
1
+ export { Vibration as default } from '@rootnative/web/internal/apis/Vibration/index.js'
@@ -0,0 +1 @@
1
+ export { View as default } from '@rootnative/web/internal/components/View/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('VirtualizedList')
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('YellowBox')
@@ -0,0 +1 @@
1
+ export { unstable_createElement as default } from '@rootnative/web/internal/compat/createElement/index.js'
@@ -0,0 +1 @@
1
+ export { findNodeHandle as default } from '@rootnative/web/internal/compat/findNodeHandle/index.js'
@@ -0,0 +1 @@
1
+ export { processColor as default } from '@rootnative/web/internal/apis/processColor/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('render')
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('unmountComponentAtNode')
@@ -0,0 +1 @@
1
+ export { useColorScheme as default } from '@rootnative/web/internal/apis/useColorScheme/index.js'
@@ -0,0 +1,3 @@
1
+ import { missing } from '../../missing.js'
2
+
3
+ export default missing('useLocaleContext')
@@ -0,0 +1 @@
1
+ export { useWindowDimensions as default } from '@rootnative/web/internal/apis/useWindowDimensions/index.js'
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ export * from '@rootnative/web'
2
+ export { unstable_createElement as createElement } from '@rootnative/web'
3
+ export { AppRegistry } from './AppRegistry.js'
4
+ export { default as Animated } from './exports/Animated/index.js'
5
+ export { default as CheckBox } from './exports/CheckBox/index.js'
6
+ export { default as DeviceEventEmitter } from './exports/DeviceEventEmitter/index.js'
7
+ export { default as Easing } from './exports/Easing/index.js'
8
+ export { default as ImageBackground } from './exports/ImageBackground/index.js'
9
+ export { default as InputAccessoryView } from './exports/InputAccessoryView/index.js'
10
+ export { default as InteractionManager } from './exports/InteractionManager/index.js'
11
+ export { default as LayoutAnimation } from './exports/LayoutAnimation/index.js'
12
+ export { default as LogBox } from './exports/LogBox/index.js'
13
+ export { default as NativeEventEmitter } from './exports/NativeEventEmitter/index.js'
14
+ export { default as NativeModules } from './exports/NativeModules/index.js'
15
+ export { default as Picker } from './exports/Picker/index.js'
16
+ export { default as ProgressBar } from './exports/ProgressBar/index.js'
17
+ export { default as SafeAreaView } from './exports/SafeAreaView/index.js'
18
+ export { default as SectionList } from './exports/SectionList/index.js'
19
+ export { default as Touchable } from './exports/Touchable/index.js'
20
+ export { default as UIManager } from './exports/UIManager/index.js'
21
+ export { default as VirtualizedList } from './exports/VirtualizedList/index.js'
22
+ export { default as YellowBox } from './exports/YellowBox/index.js'
23
+ export { default as render } from './exports/render/index.js'
24
+ export { default as unmountComponentAtNode } from './exports/unmountComponentAtNode/index.js'
25
+ export { default as useLocaleContext } from './exports/useLocaleContext/index.js'
@@ -0,0 +1,10 @@
1
+ // A name that Expo can import but `@rootnative/web` doesn't have yet. The import works, so an
2
+ // app that never uses the name runs. A use throws an error that names it.
3
+ export const missing = (name) => {
4
+ const fail = () => {
5
+ throw new Error(
6
+ `${name} is not in @rootnative/web yet. See https://rootnative.github.io/web/status.`,
7
+ )
8
+ }
9
+ return new Proxy(function missingExport() {}, { get: fail, apply: fail, construct: fail })
10
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "expoSdk": "58",
3
+ "names": [
4
+ "AccessibilityInfo",
5
+ "ActivityIndicator",
6
+ "Alert",
7
+ "Animated",
8
+ "AppRegistry",
9
+ "AppState",
10
+ "Appearance",
11
+ "BackHandler",
12
+ "Button",
13
+ "CheckBox",
14
+ "Clipboard",
15
+ "DeviceEventEmitter",
16
+ "Dimensions",
17
+ "Easing",
18
+ "FlatList",
19
+ "I18nManager",
20
+ "Image",
21
+ "ImageBackground",
22
+ "InputAccessoryView",
23
+ "InteractionManager",
24
+ "Keyboard",
25
+ "KeyboardAvoidingView",
26
+ "LayoutAnimation",
27
+ "Linking",
28
+ "LogBox",
29
+ "Modal",
30
+ "NativeEventEmitter",
31
+ "NativeModules",
32
+ "PanResponder",
33
+ "Picker",
34
+ "PixelRatio",
35
+ "Platform",
36
+ "Pressable",
37
+ "ProgressBar",
38
+ "RefreshControl",
39
+ "SafeAreaView",
40
+ "ScrollView",
41
+ "SectionList",
42
+ "Share",
43
+ "StatusBar",
44
+ "StyleSheet",
45
+ "Switch",
46
+ "Text",
47
+ "TextInput",
48
+ "Touchable",
49
+ "TouchableHighlight",
50
+ "TouchableNativeFeedback",
51
+ "TouchableOpacity",
52
+ "TouchableWithoutFeedback",
53
+ "UIManager",
54
+ "Vibration",
55
+ "View",
56
+ "VirtualizedList",
57
+ "YellowBox",
58
+ "createElement",
59
+ "findNodeHandle",
60
+ "processColor",
61
+ "render",
62
+ "unmountComponentAtNode",
63
+ "useColorScheme",
64
+ "useLocaleContext",
65
+ "useWindowDimensions"
66
+ ],
67
+ "missing": [
68
+ "Animated",
69
+ "CheckBox",
70
+ "DeviceEventEmitter",
71
+ "Easing",
72
+ "ImageBackground",
73
+ "InputAccessoryView",
74
+ "InteractionManager",
75
+ "LayoutAnimation",
76
+ "LogBox",
77
+ "NativeEventEmitter",
78
+ "NativeModules",
79
+ "Picker",
80
+ "ProgressBar",
81
+ "SafeAreaView",
82
+ "SectionList",
83
+ "Touchable",
84
+ "UIManager",
85
+ "VirtualizedList",
86
+ "YellowBox",
87
+ "render",
88
+ "unmountComponentAtNode",
89
+ "useLocaleContext"
90
+ ]
91
+ }
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@rootnative/web-expo",
3
+ "version": "0.0.0-alpha.4",
4
+ "description": "Runs an Expo app on @rootnative/web, with the file layout of react-native-web",
5
+ "license": "MIT",
6
+ "homepage": "https://rootnative.github.io/web/",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/rootnative/web.git",
10
+ "directory": "packages/web-expo"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/rootnative/web/issues"
14
+ },
15
+ "keywords": [
16
+ "react-native",
17
+ "react-native-web",
18
+ "expo",
19
+ "react",
20
+ "web"
21
+ ],
22
+ "type": "module",
23
+ "sideEffects": false,
24
+ "main": "./dist/index.js",
25
+ "files": [
26
+ "dist",
27
+ "asset-registry.js",
28
+ "expo-exports.json",
29
+ "LICENSE",
30
+ "CHANGELOG.md"
31
+ ],
32
+ "scripts": {
33
+ "build": "node scripts/build.mjs",
34
+ "prepack": "node scripts/build.mjs",
35
+ "test": "vitest run"
36
+ },
37
+ "dependencies": {
38
+ "@rootnative/web": "0.0.0-alpha.4"
39
+ },
40
+ "peerDependencies": {
41
+ "react": "^19.0.0",
42
+ "react-dom": "^19.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "vitest": "5.0.5"
46
+ }
47
+ }