@tamagui/static 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "dist/cjs/index.js",
@@ -35,16 +35,16 @@
35
35
  "@babel/runtime": "^7.19.4",
36
36
  "@babel/traverse": "^7.19.6",
37
37
  "@expo/match-media": "^0.3.0",
38
- "@tamagui/build": "^1.2.5",
39
- "@tamagui/cli-color": "^1.2.5",
40
- "@tamagui/config-default-node": "^1.2.5",
41
- "@tamagui/core-node": "^1.2.5",
42
- "@tamagui/fake-react-native": "^1.2.5",
43
- "@tamagui/helpers": "^1.2.5",
44
- "@tamagui/helpers-node": "^1.2.5",
45
- "@tamagui/proxy-worm": "^1.2.5",
46
- "@tamagui/shorthands": "^1.2.5",
47
- "@tamagui/types": "^1.2.5",
38
+ "@tamagui/build": "^1.2.6",
39
+ "@tamagui/cli-color": "^1.2.6",
40
+ "@tamagui/config-default-node": "^1.2.6",
41
+ "@tamagui/core-node": "^1.2.6",
42
+ "@tamagui/fake-react-native": "^1.2.6",
43
+ "@tamagui/helpers": "^1.2.6",
44
+ "@tamagui/helpers-node": "^1.2.6",
45
+ "@tamagui/proxy-worm": "^1.2.6",
46
+ "@tamagui/shorthands": "^1.2.6",
47
+ "@tamagui/types": "^1.2.6",
48
48
  "babel-literal-to-ast": "^2.1.0",
49
49
  "esbuild": "^0.17.5",
50
50
  "esbuild-register": "^3.4.2",
@@ -53,14 +53,14 @@
53
53
  "fs-extra": "^11.1.0",
54
54
  "invariant": "^2.2.4",
55
55
  "lodash": "^4.17.21",
56
- "react-native-web-internals": "^1.2.5",
57
- "react-native-web-lite": "^1.2.5"
56
+ "react-native-web-internals": "^1.2.6",
57
+ "react-native-web-lite": "^1.2.6"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@babel/plugin-syntax-typescript": "^7.18.6",
61
61
  "@babel/types": "^7.19.4",
62
62
  "@dish/babel-preset": "^0.0.6",
63
- "@tamagui/test-design-system": "^1.2.5",
63
+ "@tamagui/test-design-system": "^1.2.6",
64
64
  "@testing-library/react": "^13.4.0",
65
65
  "@types/babel__generator": "^7.6.4",
66
66
  "@types/babel__traverse": "^7.18.2",
@@ -1950,15 +1950,6 @@ export function createExtractor(
1950
1950
  throw new Error(`Impossible, no styles`)
1951
1951
  }
1952
1952
 
1953
- const isNativeNotFlat = !shouldFlatten && target === 'native'
1954
- if (isNativeNotFlat) {
1955
- if (shouldPrintDebug) {
1956
- logger.info(`Disabled flattening except for simple cases on native for now`)
1957
- }
1958
- node.attributes = ogAttributes
1959
- return null
1960
- }
1961
-
1962
1953
  let getStyleError: any = null
1963
1954
 
1964
1955
  // fix up ternaries, combine final style values
@@ -2083,9 +2074,19 @@ export function createExtractor(
2083
2074
  }
2084
2075
  }
2085
2076
 
2077
+ const isNativeNotFlat = !shouldFlatten && target === 'native'
2078
+ if (isNativeNotFlat) {
2079
+ if (shouldPrintDebug) {
2080
+ logger.info(`Disabled flattening except for simple cases on native for now`)
2081
+ }
2082
+ node.attributes = ogAttributes
2083
+ return null
2084
+ }
2085
+
2086
2086
  if (shouldPrintDebug) {
2087
2087
  // prettier-ignore
2088
- logger.info([` ❊❊ inline props (${inlined.size}):`, shouldDeopt ? ' deopted' : '', hasSpread ? ' has spread' : '', staticConfig.neverFlatten ? 'neverFlatten' : ''].join(' '))
2088
+ logger.info([` - inlined props (${inlined.size}):`, shouldDeopt ? ' deopted' : '', hasSpread ? ' has spread' : '', staticConfig.neverFlatten ? 'neverFlatten' : ''].join(' '))
2089
+ logger.info(` - shouldFlatten/isFlattened: ${shouldFlatten}`)
2089
2090
  logger.info(` - attrs (end):\n ${logLines(attrs.map(attrStr).join(', '))}`)
2090
2091
  }
2091
2092
 
@@ -2103,6 +2104,9 @@ export function createExtractor(
2103
2104
  completeProps,
2104
2105
  staticConfig,
2105
2106
  })
2107
+ } catch (err) {
2108
+ node.attributes = ogAttributes
2109
+ console.error(`err: ${err}`)
2106
2110
  } finally {
2107
2111
  if (debugPropValue) {
2108
2112
  shouldPrintDebug = ogDebug
@@ -1 +1 @@
1
- {"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAGA,OAAiB,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AACrE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAcjC,OAAO,KAAK,EAIV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,aAAa,CAAA;AAapB,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,kBAAkB,EAAgC,MAAM,kBAAkB,CAAA;AAiCnF,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE1D,KAAK,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAI9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,GAAE,gBAAsC;;;;;yBA4BjC,cAAc;6BAPhB,cAAc;;mBAwBtB,UAAU,SAAS,mBAAmB;;;;;;;eAIpC,UAAU,SAAS,mBAAmB;;;;;;;EA88D1D"}
1
+ {"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAGA,OAAiB,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AACrE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAcjC,OAAO,KAAK,EAIV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAGf,MAAM,aAAa,CAAA;AAapB,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,kBAAkB,EAAgC,MAAM,kBAAkB,CAAA;AAiCnF,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE1D,KAAK,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAI9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,GAAE,gBAAsC;;;;;yBA4BjC,cAAc;6BAPhB,cAAc;;mBAwBtB,UAAU,SAAS,mBAAmB;;;;;;;eAIpC,UAAU,SAAS,mBAAmB;;;;;;;EAk9D1D"}