@tamagui/proxy-worm 1.0.1-beta.21 → 1.0.1-beta.210

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.
@@ -0,0 +1,16 @@
1
+ const View = require('react-native').View
2
+ module.exports = new Proxy(
3
+ {
4
+ get default() {
5
+ return View
6
+ },
7
+ },
8
+ {
9
+ get(_, key) {
10
+ if (key === 'createAnimatedComponent') {
11
+ return (x) => x
12
+ }
13
+ return View
14
+ },
15
+ }
16
+ )
@@ -0,0 +1,17 @@
1
+ import { View } from 'react-native'
2
+
3
+ export default new Proxy(
4
+ {
5
+ get default() {
6
+ return View
7
+ },
8
+ },
9
+ {
10
+ get(_, key) {
11
+ if (key === 'createAnimatedComponent') {
12
+ return (x) => x
13
+ }
14
+ return View
15
+ },
16
+ }
17
+ )
package/index.js CHANGED
@@ -8,10 +8,28 @@ function worm(root = false) {
8
8
  },
9
9
  }
10
10
  : function () {
11
+ // dev warning in debug mode
12
+ if (process.env.NODE_ENV === 'development' && process.env.DEBUG?.startsWith('tamagui')) {
13
+ // eslint-disable-next-line no-console
14
+ console.warn(`
15
+
16
+ This has been excluded via Tamagui!
17
+ Check "excludeReactNativeWebExports" setting and include it to fix.
18
+
19
+ ${new Error().stack}
20
+
21
+ `)
22
+ }
23
+
11
24
  return worm()
12
25
  }
26
+
27
+ obj.displayName = `ProxyWorm - Check excludeReactNativeWebExports`
28
+ obj._isProxyWorm = true
29
+
13
30
  return new Proxy(obj, {
14
- get() {
31
+ get(_, key) {
32
+ if (Reflect.has(obj, key)) return Reflect.get(obj, key)
15
33
  return worm()
16
34
  },
17
35
  apply() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/proxy-worm",
3
- "version": "1.0.1-beta.21",
3
+ "version": "1.0.1-beta.210",
4
4
  "main": "index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,5 +9,12 @@
9
9
  "build": "true",
10
10
  "watch": "true"
11
11
  },
12
+ "exports": {
13
+ "./empty-react-native-view": {
14
+ "import": "./empty-react-native-view.mjs",
15
+ "require": "./empty-react-native-view.js"
16
+ },
17
+ ".": "./index.js"
18
+ },
12
19
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14"
13
20
  }
@@ -1 +0,0 @@
1
- @tamagui/proxy-worm:build: cache hit, replaying output 8107618d1385234b