@tamagui/react-native-web-lite 1.141.5 → 1.142.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 (2) hide show
  1. package/README.md +20 -21
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,32 +1,31 @@
1
- # Deprecated: ⚠️
1
+ # react-native-web-lite
2
2
 
3
- Just use react-native-web, it's evolved enough to fix a few things and this has been left behind a bit.
3
+ A tree-shakeable fork of react-native-web that replaces the style engine with simple inline styles.
4
4
 
5
- ## Experiment!
5
+ ## What is this?
6
6
 
7
- Use at your own risk.
7
+ This package keeps **all** the API surfaces of react-native-web, but makes them fully tree-shakeable by replacing the style engine with a simple inline style system.
8
8
 
9
- Slimming down react-native-web, this does the following:
9
+ This is ideal if you're using an alternative style engine (like Tamagui, StyleX, etc.) and just want react-native API compatibility for non-style concerns.
10
+
11
+ ## Trade-offs
12
+
13
+ Because the style engine is replaced with inline styles, **descendant-based styles are not supported**. This means things like `pointerEvents="box-none"` won't work as expected since they rely on react-native-web's CSS-based styling system.
14
+
15
+ If you need full react-native-web style support, use react-native-web directly.
16
+
17
+ ## Features
10
18
 
11
- - Flow => Typescript
12
19
  - Full ESModule support
13
20
  - Vite compatibility
14
- - `sideEffects: false` + tree shaking support changes
15
- - merges [concurrent mode fixes](https://github.com/necolas/react-native-web/pull/2330)
16
- - merges the [experimental fully concurrent safe / functional `Animated`](https://github.com/facebook/react-native/blob/main/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js)
17
- - Removes:
18
- - ❌ VirtualList, FlatList, SectionList
19
- - ❌ Switch (going to be split out, in Tamagui already)
20
- - ❌ Touchable* views (prefer Pressable)
21
- - ❌ normalize-css-color
22
- - ❌ inline-style-prefixer
23
- - ❌ create-react-class
21
+ - `sideEffects: false` + full tree shaking support
22
+ - TypeScript (converted from Flow)
24
23
 
25
- `@tamagui/next-plugin` and `@tamagui/vite-plugin` have an option `useReactNativeWebLite` to help automatically setting this up.
24
+ ## Setup
26
25
 
27
- With webpack:
26
+ `@tamagui/next-plugin` and `@tamagui/vite-plugin` have an option `useReactNativeWebLite` to help automatically set this up.
28
27
 
29
- Alias the following
28
+ With webpack, alias the following:
30
29
 
31
- - react-native-web$ => react-native-web-lite
32
- - react-native-svg => @tamagui/react-native-svg
30
+ - `react-native-web$` => `react-native-web-lite`
31
+ - `react-native-svg` => `@tamagui/react-native-svg`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/react-native-web-lite",
3
- "version": "1.141.5",
3
+ "version": "1.142.0",
4
4
  "type": "module",
5
5
  "description": "React Native for Web",
6
6
  "main": "dist/cjs",
@@ -61,16 +61,16 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@tamagui/normalize-css-color": "1.141.5",
65
- "@tamagui/react-native-use-pressable": "1.141.5",
66
- "@tamagui/react-native-use-responder-events": "1.141.5",
67
- "@tamagui/react-native-web-internals": "1.141.5",
68
- "@tamagui/web": "1.141.5",
64
+ "@tamagui/normalize-css-color": "1.142.0",
65
+ "@tamagui/react-native-use-pressable": "1.142.0",
66
+ "@tamagui/react-native-use-responder-events": "1.142.0",
67
+ "@tamagui/react-native-web-internals": "1.142.0",
68
+ "@tamagui/web": "1.142.0",
69
69
  "invariant": "^2.2.4",
70
70
  "memoize-one": "^6.0.0"
71
71
  },
72
72
  "devDependencies": {
73
- "@tamagui/build": "1.141.5",
73
+ "@tamagui/build": "1.142.0",
74
74
  "react": "*",
75
75
  "react-dom": "*"
76
76
  },