react-native-unistyles 3.0.0-alpha.37 → 3.0.0-alpha.38

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,7 +46,7 @@ const createUnistylesComponent = (Component, mappings) => {
46
46
  stylesRef.current = {
47
47
  ...stylesRef.current,
48
48
  // @ts-expect-error - this is hidden from TS
49
- [propName]: props[propName].__proto__?.getStyle() || props[propName]
49
+ [propName]: props[propName].__proto__?.getStyle?.() || props[propName]
50
50
  };
51
51
  }
52
52
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","props","theme","setTheme","useState","UnistylesRuntime","getTheme","setRt","stylesRef","useRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","getStyle","useEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","UnistyleDependency","Theme","some","dependency","prevState","mergedProps","keys","key","assign","jsx","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAqG,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,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EFH,WAAW,CAACC,OAAO,GAAG,KAAK;IAE3B,oBAAO,IAAAnC,WAAA,CAAA+D,GAAA,EAACxC,SAAS;MAAA,GAAKoC;IAAW,CAAa,CAAC;EACnD,CAAC;AACL,CAAC;AAAAK,OAAA,CAAA1C,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","props","theme","setTheme","useState","UnistylesRuntime","getTheme","setRt","stylesRef","useRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","getStyle","useEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","UnistyleDependency","Theme","some","dependency","prevState","mergedProps","keys","key","assign","jsx","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAqG,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,C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,GAAKoC;IAAW,CAAa,CAAC;EACnD,CAAC;AACL,CAAC;AAAAK,OAAA,CAAA1C,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -40,7 +40,7 @@ export const createUnistylesComponent = (Component, mappings) => {
40
40
  stylesRef.current = {
41
41
  ...stylesRef.current,
42
42
  // @ts-expect-error - this is hidden from TS
43
- [propName]: props[propName].__proto__?.getStyle() || props[propName]
43
+ [propName]: props[propName].__proto__?.getStyle?.() || props[propName]
44
44
  };
45
45
  }
46
46
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useRef","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","jsx","_jsx","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","props","theme","setTheme","getTheme","setRt","stylesRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","__proto__","getStyle","removeChangeListener","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","Theme","some","dependency","prevState","mergedProps","Object","keys","key","assign"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAwBC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE9E,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGrG,MAAMC,qBAAqB,GAAG,CAAC,OAAO,EAAE,uBAAuB,CAAU;AAGzE,OAAO,MAAMC,wBAAwB,GAAEA,CAAmGC,SAAgC,EAAEC,QAA+C,KAAK;EAC5N,OAAQC,KAA+D,IAAK;IACxE,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGZ,QAAQ,CAAiBG,gBAAgB,CAACU,QAAQ,CAAC,CAAC,CAAC;IAC/E,MAAM,GAAGC,KAAK,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;IAC7B,MAAMe,SAAS,GAAGhB,MAAM,CAAsB,CA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AACpB,QAAQ,CAAC,GAAGJ,SAAS,CAACE,OAAO,CAACE,QAAQ,CAAC;MACvD;IACJ,CAAC,CAAC;IAEFH,WAAW,CAACC,OAAO,GAAG,KAAK;IAE3B,oBAAOZ,IAAA,CAACG,SAAS;MAAA,GAAK+B;IAAW,CAAa,CAAC;EACnD,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useRef","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","jsx","_jsx","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","props","theme","setTheme","getTheme","setRt","stylesRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","__proto__","getStyle","removeChangeListener","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","Theme","some","dependency","prevState","mergedProps","Object","keys","key","assign"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAwBC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE9E,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGrG,MAAMC,qBAAqB,GAAG,CAAC,OAAO,EAAE,uBAAuB,CAAU;AAGzE,OAAO,MAAMC,wBAAwB,GAAEA,CAAmGC,SAAgC,EAAEC,QAA+C,KAAK;EAC5N,OAAQC,KAA+D,IAAK;IACxE,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGZ,QAAQ,CAAiBG,gBAAgB,CAACU,QAAQ,CAAC,CAAC,CAAC;IAC/E,MAAM,GAAGC,KAAK,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;IAC7B,MAAMe,SAAS,GAAGhB,MAAM,CAAsB,CAAC,CAAC,CAAC;IACjD,MAAMiB,WAAW,GAAGjB,MAAM,CAAC,KAAK,CAAC;IAEjC,IAAI,CAACiB,WAAW,CAACC,OAAO,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,OAAO,GAAG,KAAK;IAE3B,oBAAOZ,IAAA,CAACG,SAAS;MAAA,GAAK+B;IAAW,CAAa,CAAC;EACnD,CAAC;AACL,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "3.0.0-alpha.37",
3
+ "version": "3.0.0-alpha.38",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",
package/plugin/common.js CHANGED
@@ -1,5 +1,9 @@
1
1
  function getIdentifierNameFromExpression(t, memberExpression) {
2
2
  if (t.isMemberExpression(memberExpression)) {
3
+ if (memberExpression.computed) {
4
+ return getIdentifierNameFromExpression(t, memberExpression.property).flat()
5
+ }
6
+
3
7
  const object = memberExpression.object
4
8
 
5
9
  // If the object is an Identifier, return its name
@@ -96,7 +100,9 @@ function getSecondPropertyName(t, memberExpression) {
96
100
  return []
97
101
  }
98
102
 
99
- let current = memberExpression
103
+ let current = memberExpression.computed
104
+ ? memberExpression.property
105
+ : memberExpression
100
106
  let propertyName = null
101
107
 
102
108
  while (t.isMemberExpression(current)) {
@@ -46,7 +46,7 @@ export const createUnistylesComponent =<TProps extends Record<string, any>, TMap
46
46
  stylesRef.current = {
47
47
  ...stylesRef.current,
48
48
  // @ts-expect-error - this is hidden from TS
49
- [propName]: props[propName].__proto__?.getStyle() || props[propName]
49
+ [propName]: props[propName].__proto__?.getStyle?.() || props[propName]
50
50
  }
51
51
  }
52
52
  })