react-native-unistyles 3.0.0-alpha.34 → 3.0.0-alpha.35

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,11 @@ HybridShadowRegistry.add = (handle, style, variants, args) => {
19
19
  if (!handle || !style) {
20
20
  return;
21
21
  }
22
+
23
+ // don't register Reanimated styles
24
+ if (style?.initial?.updater) {
25
+ return;
26
+ }
22
27
  HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {}, args ?? []);
23
28
  };
24
29
  HybridShadowRegistry.remove = handle => {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","args","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAaA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACW,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,KAAK;EAC1D;EACA,IAAI,CAACV,MAAM,IAAI,CAACQ,KAAK,EAAE;IACnB;EACJ;EAEAZ,oBAAoB,CAACe,IAAI,CAACZ,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AACjG,CAAC;AAEDd,oBAAoB,CAACgB,MAAM,GAAGZ,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAJ,oBAAoB,CAACiB,MAAM,CAACd,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQM,MAAMc,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGlB,oBAA4D","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","args","initial","updater","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAaA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACW,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,KAAK;EAC1D;EACA,IAAI,CAACV,MAAM,IAAI,CAACQ,KAAK,EAAE;IACnB;EACJ;;EAEA;EACA,IAAIA,KAAK,EAAEG,OAAO,EAAEC,OAAO,EAAE;IACzB;EACJ;EAEAhB,oBAAoB,CAACiB,IAAI,CAACd,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AACjG,CAAC;AAEDd,oBAAoB,CAACkB,MAAM,GAAGd,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAJ,oBAAoB,CAACmB,MAAM,CAAChB,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQM,MAAMgB,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGpB,oBAA4D","ignoreList":[]}
@@ -15,6 +15,11 @@ HybridShadowRegistry.add = (handle, style, variants, args) => {
15
15
  if (!handle || !style) {
16
16
  return;
17
17
  }
18
+
19
+ // don't register Reanimated styles
20
+ if (style?.initial?.updater) {
21
+ return;
22
+ }
18
23
  HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {}, args ?? []);
19
24
  };
20
25
  HybridShadowRegistry.remove = handle => {
@@ -1 +1 @@
1
- {"version":3,"names":["NitroModules","HybridShadowRegistry","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","args","link","remove","unlink","UnistylesShadowRegistry"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAazD,MAAMC,oBAAoB,GAAGD,YAAY,CAACE,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDJ,oBAAoB,CAACU,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,KAAK;EAC1D;EACA,IAAI,CAACV,MAAM,IAAI,CAACQ,KAAK,EAAE;IACnB;EACJ;EAEAX,oBAAoB,CAACc,IAAI,CAACZ,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AACjG,CAAC;AAEDb,oBAAoB,CAACe,MAAM,GAAGZ,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAH,oBAAoB,CAACgB,MAAM,CAACd,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQD,OAAO,MAAMc,uBAAuB,GAAGjB,oBAA4D","ignoreList":[]}
1
+ {"version":3,"names":["NitroModules","HybridShadowRegistry","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","args","initial","updater","link","remove","unlink","UnistylesShadowRegistry"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAazD,MAAMC,oBAAoB,GAAGD,YAAY,CAACE,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uB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C,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACjH,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEpD,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAC/G,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC;AAuCD,KAAK,cAAc,GACb,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAEd,eAAO,MAAM,uBAAuB,EAA2B,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA"}
@@ -23,5 +23,8 @@ export type ViewHandle = {
23
23
  };
24
24
  export type Unistyle = {
25
25
  __unid?: number;
26
+ initial?: {
27
+ updater?: () => void;
28
+ };
26
29
  };
27
30
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,6BAA6B,EAAE,GAAG,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,wBAAwB,CAAC,EAAE;QACvB,SAAS,CAAC,EAAE,SAAS,CAAA;KACxB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;YACxB,wBAAwB,CAAC,EAAE;gBACvB,SAAS,CAAC,EAAE,SAAS,CAAA;aACxB,CAAA;SACJ,CAAC,CAAA;KACL,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB,CAAC,EAAE;YACvB,SAAS,CAAC,EAAE,SAAS,CAAA;SACxB,CAAA;KACJ,CAAC,CAAA;CACL,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,6BAA6B,EAAE,GAAG,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,wBAAwB,CAAC,EAAE;QACvB,SAAS,CAAC,EAAE,SAAS,CAAA;KACxB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;YACxB,wBAAwB,CAAC,EAAE;gBACvB,SAAS,CAAC,EAAE,SAAS,CAAA;aACxB,CAAA;SACJ,CAAC,CAAA;KACL,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB,CAAC,EAAE;YACvB,SAAS,CAAC,EAAE,SAAS,CAAA;SACxB,CAAA;KACJ,CAAC,CAAA;CACL,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACvB,CAAA;CACJ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "3.0.0-alpha.34",
3
+ "version": "3.0.0-alpha.35",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -32,6 +32,11 @@ HybridShadowRegistry.add = (handle, style, variants, args) => {
32
32
  return
33
33
  }
34
34
 
35
+ // don't register Reanimated styles
36
+ if (style?.initial?.updater) {
37
+ return
38
+ }
39
+
35
40
  HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {}, args ?? [])
36
41
  }
37
42
 
@@ -25,5 +25,8 @@ export type ViewHandle = {
25
25
  }
26
26
 
27
27
  export type Unistyle = {
28
- __unid?: number
28
+ __unid?: number,
29
+ initial?: {
30
+ updater?: () => void
31
+ }
29
32
  }