react-native-unistyles 3.0.0-alpha.13 → 3.0.0-alpha.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. package/cxx/core/UnistyleWrapper.h +1 -1
  2. package/cxx/core/UnistylesCommitHook.cpp +5 -2
  3. package/cxx/hybridObjects/HybridStyleSheet.cpp +1 -3
  4. package/cxx/hybridObjects/HybridStyleSheet.h +1 -1
  5. package/lib/commonjs/index.js +4 -0
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/commonjs/specs/ShadowRegistry/index.js +7 -1
  8. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  9. package/lib/commonjs/web/convert/index.js +1 -1
  10. package/lib/commonjs/web/convert/index.js.map +1 -1
  11. package/lib/commonjs/web/create.js +25 -63
  12. package/lib/commonjs/web/create.js.map +1 -1
  13. package/lib/commonjs/web/createUnistylesComponent.js +61 -0
  14. package/lib/commonjs/web/createUnistylesComponent.js.map +1 -0
  15. package/lib/commonjs/web/index.js +12 -3
  16. package/lib/commonjs/web/index.js.map +1 -1
  17. package/lib/commonjs/web/listener/index.js +7 -0
  18. package/lib/commonjs/web/listener/index.js.map +1 -1
  19. package/lib/commonjs/web/listener/listenToDependencies.js +39 -0
  20. package/lib/commonjs/web/listener/listenToDependencies.js.map +1 -0
  21. package/lib/commonjs/web/listener/listener.js +1 -2
  22. package/lib/commonjs/web/listener/listener.js.map +1 -1
  23. package/lib/commonjs/web/mock.js +1 -10
  24. package/lib/commonjs/web/mock.js.map +1 -1
  25. package/lib/commonjs/web/pseudo.js +2 -3
  26. package/lib/commonjs/web/pseudo.js.map +1 -1
  27. package/lib/commonjs/web/registry.js +2 -4
  28. package/lib/commonjs/web/registry.js.map +1 -1
  29. package/lib/commonjs/web/runtime.js +0 -1
  30. package/lib/commonjs/web/runtime.js.map +1 -1
  31. package/lib/commonjs/web/shadowRegistry.js +120 -0
  32. package/lib/commonjs/web/shadowRegistry.js.map +1 -0
  33. package/lib/commonjs/web/state.js +0 -40
  34. package/lib/commonjs/web/state.js.map +1 -1
  35. package/lib/commonjs/web/utils.js +66 -14
  36. package/lib/commonjs/web/utils.js.map +1 -1
  37. package/lib/commonjs/web/variants/useVariants.js +1 -34
  38. package/lib/commonjs/web/variants/useVariants.js.map +1 -1
  39. package/lib/module/index.js +4 -0
  40. package/lib/module/index.js.map +1 -1
  41. package/lib/module/specs/ShadowRegistry/index.js +7 -1
  42. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  43. package/lib/module/web/convert/index.js +1 -1
  44. package/lib/module/web/convert/index.js.map +1 -1
  45. package/lib/module/web/create.js +26 -64
  46. package/lib/module/web/create.js.map +1 -1
  47. package/lib/module/web/createUnistylesComponent.js +54 -0
  48. package/lib/module/web/createUnistylesComponent.js.map +1 -0
  49. package/lib/module/web/index.js +4 -2
  50. package/lib/module/web/index.js.map +1 -1
  51. package/lib/module/web/listener/index.js +1 -0
  52. package/lib/module/web/listener/index.js.map +1 -1
  53. package/lib/module/web/listener/listenToDependencies.js +34 -0
  54. package/lib/module/web/listener/listenToDependencies.js.map +1 -0
  55. package/lib/module/web/listener/listener.js +1 -1
  56. package/lib/module/web/listener/listener.js.map +1 -1
  57. package/lib/module/web/mock.js +0 -9
  58. package/lib/module/web/mock.js.map +1 -1
  59. package/lib/module/web/pseudo.js +2 -3
  60. package/lib/module/web/pseudo.js.map +1 -1
  61. package/lib/module/web/registry.js +2 -4
  62. package/lib/module/web/registry.js.map +1 -1
  63. package/lib/module/web/runtime.js +0 -1
  64. package/lib/module/web/runtime.js.map +1 -1
  65. package/lib/module/web/shadowRegistry.js +116 -0
  66. package/lib/module/web/shadowRegistry.js.map +1 -0
  67. package/lib/module/web/state.js +0 -40
  68. package/lib/module/web/state.js.map +1 -1
  69. package/lib/module/web/utils.js +59 -12
  70. package/lib/module/web/utils.js.map +1 -1
  71. package/lib/module/web/variants/useVariants.js +1 -34
  72. package/lib/module/web/variants/useVariants.js.map +1 -1
  73. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  74. package/lib/typescript/src/web/create.d.ts.map +1 -1
  75. package/lib/typescript/src/web/createUnistylesComponent.d.ts +3 -0
  76. package/lib/typescript/src/web/createUnistylesComponent.d.ts.map +1 -0
  77. package/lib/typescript/src/web/index.d.ts +2 -1
  78. package/lib/typescript/src/web/index.d.ts.map +1 -1
  79. package/lib/typescript/src/web/listener/index.d.ts +1 -0
  80. package/lib/typescript/src/web/listener/index.d.ts.map +1 -1
  81. package/lib/typescript/src/web/listener/listenToDependencies.d.ts +12 -0
  82. package/lib/typescript/src/web/listener/listenToDependencies.d.ts.map +1 -0
  83. package/lib/typescript/src/web/listener/listener.d.ts +2 -1
  84. package/lib/typescript/src/web/listener/listener.d.ts.map +1 -1
  85. package/lib/typescript/src/web/mock.d.ts +0 -9
  86. package/lib/typescript/src/web/mock.d.ts.map +1 -1
  87. package/lib/typescript/src/web/pseudo.d.ts +4 -2
  88. package/lib/typescript/src/web/pseudo.d.ts.map +1 -1
  89. package/lib/typescript/src/web/registry.d.ts +1 -1
  90. package/lib/typescript/src/web/registry.d.ts.map +1 -1
  91. package/lib/typescript/src/web/runtime.d.ts +0 -1
  92. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  93. package/lib/typescript/src/web/shadowRegistry.d.ts +17 -0
  94. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -0
  95. package/lib/typescript/src/web/state.d.ts +0 -5
  96. package/lib/typescript/src/web/state.d.ts.map +1 -1
  97. package/lib/typescript/src/web/utils.d.ts +22 -7
  98. package/lib/typescript/src/web/utils.d.ts.map +1 -1
  99. package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -1
  100. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +6 -3
  101. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +8 -3
  102. package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +1 -1
  103. package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +1 -1
  104. package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +14 -2
  105. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +3 -0
  106. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +3 -0
  107. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +3 -0
  108. package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +3 -0
  109. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +3 -0
  110. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +1 -1
  111. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +4 -1
  112. package/package.json +3 -3
  113. package/src/index.ts +3 -0
  114. package/src/specs/ShadowRegistry/index.ts +7 -1
  115. package/src/web/convert/index.ts +1 -1
  116. package/src/web/create.ts +24 -79
  117. package/src/web/createUnistylesComponent.tsx +56 -0
  118. package/src/web/index.ts +3 -2
  119. package/src/web/listener/index.ts +1 -0
  120. package/src/web/listener/listenToDependencies.ts +50 -0
  121. package/src/web/listener/listener.ts +1 -1
  122. package/src/web/mock.ts +0 -10
  123. package/src/web/pseudo.ts +131 -5
  124. package/src/web/registry.ts +3 -5
  125. package/src/web/runtime.ts +0 -2
  126. package/src/web/shadowRegistry.ts +121 -0
  127. package/src/web/state.ts +0 -44
  128. package/src/web/utils.ts +90 -16
  129. package/src/web/variants/useVariants.ts +1 -37
@@ -60,7 +60,7 @@ inline static jsi::Value valueFromUnistyle(jsi::Runtime& rt, Unistyle::Shared un
60
60
  auto hostFn = jsi::Value(rt, unistyleFn->proxiedFunction.value()).asObject(rt).asFunction(rt);
61
61
 
62
62
  hostFn.setNativeState(rt, std::move(wrappedUnistyle));
63
- hostFn.setProperty(rt, helpers::UNISTYLES_ID.c_str(), unistyleFn->styleKey);
63
+ helpers::defineHiddenProperty(rt, hostFn, helpers::UNISTYLES_ID.c_str(), unistyleFn->styleKey);
64
64
 
65
65
  return std::move(hostFn);
66
66
  }
@@ -25,10 +25,13 @@ RootShadowNode::Unshared core::UnistylesCommitHook::shadowTreeWillCommit(
25
25
 
26
26
  return newRootShadowNode;
27
27
  }
28
+
29
+ auto& registry = core::UnistylesRegistry::get();
28
30
 
29
- unistylesRootNode->removeUnistylesMountTrait();
31
+ if (!registry.trafficController.hasUnistylesCommit()) {
32
+ return newRootShadowNode;
33
+ }
30
34
 
31
- auto& registry = core::UnistylesRegistry::get();
32
35
  auto shadowLeafUpdates = this->getUnistylesUpdates();
33
36
 
34
37
  if (shadowLeafUpdates.size() == 0) {
@@ -9,7 +9,7 @@ double HybridStyleSheet::getHairlineWidth() {
9
9
  return nearestPixel / pixelRatio;
10
10
  }
11
11
 
12
- double HybridStyleSheet::get___unid() {
12
+ double HybridStyleSheet::get__unid() {
13
13
  return this->__unid;
14
14
  }
15
15
 
@@ -35,8 +35,6 @@ jsi::Value HybridStyleSheet::create(jsi::Runtime& rt, const jsi::Value &thisVal,
35
35
  auto style = std::make_shared<core::HostStyle>(registeredStyleSheet, this->_unistylesRuntime);
36
36
  auto styleHostObject = jsi::Object::createFromHostObject(rt, style);
37
37
 
38
- registry.trafficController.setHasUnistylesCommit(true);
39
-
40
38
  return styleHostObject;
41
39
  }
42
40
 
@@ -43,7 +43,7 @@ struct HybridStyleSheet: public HybridUnistylesStyleSheetSpec {
43
43
  };
44
44
 
45
45
  double getHairlineWidth() override;
46
- double get___unid() override;
46
+ double get__unid() override;
47
47
 
48
48
  private:
49
49
  void parseSettings(jsi::Runtime& rt, jsi::Object settings);
@@ -27,6 +27,10 @@ Object.keys(_specs).forEach(function (key) {
27
27
  });
28
28
  var _mq = require("./mq");
29
29
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
30
+ // TODO: export Native createUnistylesComponent
31
+ // can't import it this way, it will break native build
32
+ // export { createUnistylesComponent } from './web/createUnistylesComponent'
33
+
30
34
  // todo verify true min version
31
35
  const minReactVersionRequiredByUnistyles = '18.3.1';
32
36
  if (_react.default.version < minReactVersionRequiredByUnistyles) {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_specs","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","e","__esModule","default","minReactVersionRequiredByUnistyles","React","version","Error"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,GAAA,GAAAd,OAAA;AAAyB,SAAAD,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGzB;AACA,MAAMG,kCAAkC,GAAG,QAAQ;AAEnD,IAAIC,cAAK,CAACC,OAAO,GAAGF,kCAAkC,EAAE;EACpD,MAAM,IAAIG,KAAK,CAAC;AACpB,sDAAsDF,cAAK,CAACC,OAAO;AACnE,4CAA4CF,kCAAkC;AAC9E,KAAK,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_specs","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","e","__esModule","default","minReactVersionRequiredByUnistyles","React","version","Error"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,GAAA,GAAAd,OAAA;AAAyB,SAAAD,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzB;AACA;AACA;;AAEA;AACA,MAAMG,kCAAkC,GAAG,QAAQ;AAEnD,IAAIC,cAAK,CAACC,OAAO,GAAGF,kCAAkC,EAAE;EACpD,MAAM,IAAIG,KAAK,CAAC;AACpB,sDAAsDF,cAAK,CAACC,OAAO;AACnE,4CAA4CF,kCAAkC;AAC9E,KAAK,CAAC;AACN","ignoreList":[]}
@@ -15,7 +15,13 @@ const findShadowNodeForHandle = handle => {
15
15
  return node;
16
16
  };
17
17
  HybridShadowRegistry.add = (handle, style, variants, args) => {
18
- if (!handle || typeof style !== 'object') {
18
+ // virtualized nodes can be null
19
+ if (!handle || !style) {
20
+ return;
21
+ }
22
+
23
+ // at this point unistyle can be only object or dynamic function
24
+ if (typeof style !== 'object' && typeof style !== 'function') {
19
25
  return;
20
26
  }
21
27
  HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {}, args ?? []);
@@ -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","__unid","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,IAAI,CAACV,MAAM,IAAI,OAAOQ,KAAK,KAAK,QAAQ,EAAE;IACtC;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,GAAG,CAACZ,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEK,MAAM,EAAE;IAC3B;EACJ;EAEAjB,oBAAoB,CAACkB,MAAM,CAACf,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQM,MAAMO,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGnB,oBAA4D","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","args","link","remove","__unid","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,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,OAAOA,KAAK,KAAK,UAAU,EAAE;IAC1D;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,GAAG,CAACZ,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEK,MAAM,EAAE;IAC3B;EACJ;EAEAjB,oBAAoB,CAACkB,MAAM,CAACf,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQM,MAAMO,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGnB,oBAA4D","ignoreList":[]}
@@ -23,7 +23,7 @@ const convertToTypeStyle = value => {
23
23
  ...value._web
24
24
  }).flatMap(([unistylesKey, unistylesValue]) => {
25
25
  // Keys to omit
26
- if (['_css', '_web', 'variants', 'compoundVariants', 'uni__dependencies'].includes(unistylesKey)) {
26
+ if (['_css', '_web', 'variants', 'compoundVariants', 'uni__dependencies', '__unistyles-secrets__'].includes(unistylesKey) || unistylesKey.startsWith('variant-')) {
27
27
  return [];
28
28
  }
29
29
 
@@ -1 +1 @@
1
- {"version":3,"names":["_typestyle","require","_pseudo","_breakpoint","_style","_utils","_transform","_utils2","_textShadow","_boxShadow","convertToTypeStyle","value","hasTextShadow","hasBoxShadow","stylesArray","Object","entries","_web","flatMap","unistylesKey","unistylesValue","includes","isPseudo","typestyleValues","$nest","replace","isTextShadow","getTextShadowStyle","isBoxShadow","getBoxShadowStyle","isTransform","getTransformStyle","map","breakpointKey","breakpointValue","media","convertBreakpoint","getStyle","deepMergeObjects","exports"],"sourceRoot":"../../../../src","sources":["web/convert/index.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,WAA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AK,CAAC;IACnC;;IAEA;IACA,IAAI,IAAAmB,mBAAW,EAACX,YAAY,EAAEC,cAAc,CAAC,EAAE;MAC3C,OAAO,IAAAW,4BAAiB,EAACX,cAAc,CAAC;IAC5C;;IAEA;IACA,IAAI,OAAOA,cAAc,KAAK,QAAQ,IAAIA,cAAc,KAAK,IAAI,EAAE;MAC/D,OAAOL,MAAM,CAACC,OAAO,CAACI,cAAc,CAAC,CAACY,GAAG,CAAC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;QAC5E,OAAO,IAAAC,gBAAK,EAAC,IAAAC,6BAAiB,EAACH,aAAa,CAAC,EAAE,IAAAI,eAAQ,EAAClB,YAAY,EAAEe,eAAe,CAAC,CAAC;MAC3F,CAAC,CAAC;IACN;;IAEA;IACA,OAAO,IAAAG,eAAQ,EAAClB,YAAY,EAAEC,cAAc,CAAC;EACjD,CAAC,CAA+B;EAEhC,OAAO,IAAAkB,uBAAgB,EAAC,GAAGxB,WAAW,CAAC;AAC3C,CAAC;AAAAyB,OAAA,CAAA7B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_typestyle","require","_pseudo","_breakpoint","_style","_utils","_transform","_utils2","_textShadow","_boxShadow","convertToTypeStyle","value","hasTextShadow","hasBoxShadow","stylesArray","Object","entries","_web","flatMap","unistylesKey","unistylesValue","includes","startsWith","isPseudo","typestyleValues","$nest","replace","isTextShadow","getTextShadowStyle","isBoxShadow","getBoxShadowStyle","isTransform","getTransformStyle","map","breakpointKey","breakpointValue","media","convertBreakpoint","getStyle","deepMergeObjects","exports"],"sourceRoot":"../../../../src","sources":["web/convert/index.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA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,YAAY,EAAEC,cAAc,CAAC,EAAE;MAC3C,OAAO,IAAAY,4BAAiB,EAACZ,cAAc,CAAC;IAC5C;;IAEA;IACA,IAAI,OAAOA,cAAc,KAAK,QAAQ,IAAIA,cAAc,KAAK,IAAI,EAAE;MAC/D,OAAOL,MAAM,CAACC,OAAO,CAACI,cAAc,CAAC,CAACa,GAAG,CAAC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;QAC5E,OAAO,IAAAC,gBAAK,EAAC,IAAAC,6BAAiB,EAACH,aAAa,CAAC,EAAE,IAAAI,eAAQ,EAACnB,YAAY,EAAEgB,eAAe,CAAC,CAAC;MAC3F,CAAC,CAAC;IACN;;IAEA;IACA,OAAO,IAAAG,eAAQ,EAACnB,YAAY,EAAEC,cAAc,CAAC;EACjD,CAAC,CAA+B;EAEhC,OAAO,IAAAmB,uBAAgB,EAAC,GAAGzB,WAAW,CAAC;AAC3C,CAAC;AAAA0B,OAAA,CAAA9B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -4,85 +4,47 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.create = void 0;
7
- var _registry = require("./registry");
8
7
  var _utils = require("./utils");
9
8
  var _runtime = require("./runtime");
10
9
  var _variants = require("./variants");
11
- var _listener = require("./listener");
12
10
  const create = stylesheet => {
13
11
  const computedStylesheet = typeof stylesheet === 'function' ? stylesheet(_runtime.UnistylesRuntime.theme, _runtime.UnistylesRuntime.miniRuntime) : stylesheet;
14
- let lastlySelectedVariants = {};
15
- const listenToDependencies = ({
16
- key,
17
- className,
18
- unistyles,
19
- value,
20
- args = []
21
- }) => {
22
- const dependencies = 'uni__dependencies' in value ? value['uni__dependencies'] : [];
23
- if (dependencies.length === 0) {
24
- return;
25
- }
26
- return _listener.UnistylesListener.addListeners(dependencies, () => {
27
- const newComputedStylesheet = typeof stylesheet === 'function' ? stylesheet(_runtime.UnistylesRuntime.theme, _runtime.UnistylesRuntime.miniRuntime) : stylesheet;
28
- if (!(0, _utils.keyInObject)(newComputedStylesheet, key)) {
29
- return;
30
- }
31
- const value = newComputedStylesheet[key];
32
- const result = typeof value === 'function' ? value(...args) : value;
33
- _registry.UnistylesRegistry.updateStyles(unistyles, result, className);
34
- });
35
- };
36
- const styles = (0, _utils.reduceObject)(computedStylesheet, (value, key) => {
12
+ const selectedVariants = new Map();
13
+ const copyVariants = () => Object.fromEntries(selectedVariants.entries());
14
+ const addSecrets = (value, key, args) => (0, _utils.assignSecrets)(value, {
15
+ __uni__key: key,
16
+ __uni__refs: new Set(),
17
+ __uni__stylesheet: stylesheet,
18
+ __uni__args: args,
19
+ __uni__variants: copyVariants()
20
+ });
21
+ const styles = (0, _utils.reduceObject)(computedStylesheet, (value, _key) => {
22
+ const key = String(_key);
37
23
  if (typeof value === 'function') {
38
- const webUnistyleByRef = new Map();
39
- const disposeByRef = new Map();
40
- return (...args) => {
41
- const [ref] = args.slice(-1);
24
+ const dynamicStyle = (...args) => {
42
25
  const result = value(...args);
43
26
  const variants = Object.fromEntries((0, _variants.getVariants)({
44
27
  [key]: result
45
- }, lastlySelectedVariants));
28
+ }, copyVariants()));
46
29
  const resultWithVariants = {
47
30
  ...result,
48
31
  ...variants[key]
49
32
  };
50
- if (ref instanceof HTMLElement) {
51
- const storedWebUnistyle = webUnistyleByRef.get(ref);
52
- const webUnistyle = storedWebUnistyle ?? _registry.UnistylesRegistry.createStyles(resultWithVariants, key);
53
- webUnistyleByRef.set(ref, webUnistyle);
54
- disposeByRef.get(ref)?.();
55
- disposeByRef.set(ref, listenToDependencies({
56
- key,
57
- value,
58
- unistyles: webUnistyle.unistyles,
59
- className: webUnistyle.className,
60
- args
61
- }));
62
- ref.classList.add(webUnistyle.className);
63
- if (storedWebUnistyle) {
64
- _registry.UnistylesRegistry.updateStyles(webUnistyle.unistyles, resultWithVariants, webUnistyle.className);
65
- }
66
- return;
67
- }
68
- return (0, _utils.toReactNativeClassName)(null, resultWithVariants);
33
+
34
+ // Add secrets to result of dynamic styles function
35
+ return addSecrets((0, _utils.getStyles)(resultWithVariants), key, args);
69
36
  };
37
+
38
+ // Add secrets to dynamic styles function
39
+ return addSecrets(dynamicStyle, key);
70
40
  }
71
- const {
72
- className,
73
- unistyles
74
- } = _registry.UnistylesRegistry.createStyles(value, key);
75
- listenToDependencies({
76
- key,
77
- value,
78
- unistyles,
79
- className
80
- });
81
- return (0, _utils.toReactNativeClassName)(className, value);
82
- });
83
- (0, _variants.createUseVariants)(styles, newVariants => {
84
- lastlySelectedVariants = newVariants;
41
+
42
+ // Add secrets to static styles
43
+ return addSecrets((0, _utils.getStyles)(value), key);
85
44
  });
45
+
46
+ // Inject useVariants hook to styles
47
+ (0, _variants.createUseVariants)(styles, newVariants => Object.entries(newVariants).forEach(([key, value]) => selectedVariants.set(key, value)));
86
48
  return styles;
87
49
  };
88
50
  exports.create = create;
@@ -1 +1 @@
1
- {"version":3,"names":["_registry","require","_utils","_runtime","_variants","_listener","create","stylesheet","computedStylesheet","UnistylesRuntime","theme","miniRuntime","lastlySelectedVariants","listenToDependencies","key","className","unistyles","value","args","dependencies","length","UnistylesListener","addListeners","newComputedStylesheet","keyInObject","result","UnistylesRegistry","updateStyles","styles","reduceObject","webUnistyleByRef","Map","disposeByRef","ref","slice","variants","Object","fromEntries","getVariants","resultWithVariants","HTMLElement","storedWebUnistyle","get","webUnistyle","createStyles","set","classList","add","toReactNativeClassName","createUseVariants","newVariants","exports"],"sourceRoot":"../../../src","sources":["web/create.ts"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAaO,MAAMK,MAAM,GAAIC,UAAiD,IAAK;EACzE,MAAMC,kBAAkB,GAAG,OAAOD,UAAU,KAAK,UAAU,GACrDA,UAAU,CAACE,yBAAgB,CAACC,KAA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AAY,CAAC3B,KAAK,EAAEH,GAAG,CAAC;IAE3ED,oBAAoB,CAAC;MAAEC,GAAG;MAAEG,KAAK;MAAED,SAAS;MAAED;IAAU,CAAC,CAAC;IAE1D,OAAO,IAAAiC,6BAAsB,EAACjC,SAAS,EAAEE,KAAK,CAAC;EACnD,CAAC,CAAsC;EAEvC,IAAAgC,2BAAiB,EAACrB,MAAM,EAAEsB,WAAW,IAAI;IACrCtC,sBAAsB,GAAGsC,WAAW;EACxC,CAAC,CAAC;EAEF,OAAOtB,MAAM;AACjB,CAAC;AAAAuB,OAAA,CAAA7C,MAAA,GAAAA,MAAA","ignoreList":[]}
1
+ {"version":3,"names":["_utils","require","_runtime","_variants","create","stylesheet","computedStylesheet","UnistylesRuntime","theme","miniRuntime","selectedVariants","Map","copyVariants","Object","fromEntries","entries","addSecrets","value","key","args","assignSecrets","__uni__key","__uni__refs","Set","__uni__stylesheet","__uni__args","__uni__variants","styles","reduceObject","_key","String","dynamicStyle","result","variants","getVariants","resultWithVariants","getStyles","createUseVariants","newVariants","forEach","set","exports"],"sourceRoot":"../../../src","sources":["web/create.ts"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEO,MAAMG,MAAM,GAAIC,UAAiD,IAAK;EACzE,MAAMC,kBAAkB,GAAG,OAAOD,UAAU,KAAK,UAAU,GACrDA,UAAU,CAACE,yBAAgB,CAACC,KAAK,EAAED,yBAAgB,CAACE,WAAW,CAAC,GAChEJ,UAAU;EAChB,MAAMK,gBAAgB,GAAG,IAAIC,GAAG,CAAc,CAAC;EAE/C,MAAMC,YAAY,GAAGA,CAAA,KAAMC,MAAM,CAACC,WAAW,CAACJ,gBAAgB,CAACK,OAAO,CAAC,CAAC,CAAC;EACzE,MAAMC,UAAU,GAAGA,CAACC,KAAU,EAAEC,GAAW,EAAEC,IAAiB,KAAK,IAAAC,oBAAa,EAACH,K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AAC,CAAC,CAAC;EAEjI,OAAOU,MAAM;AACjB,CAAC;AAAAc,OAAA,CAAArC,MAAA,GAAAA,MAAA","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createUnistylesComponent = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _utils = require("./utils");
9
+ var _runtime = require("./runtime");
10
+ var _variants = require("./variants");
11
+ var _listener = require("./listener");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ const getStyles = value => {
16
+ const secrets = (0, _utils.extractSecrets)(value);
17
+ if (secrets.length === 0) {
18
+ return undefined;
19
+ }
20
+ return secrets.reduce((acc, {
21
+ __uni__stylesheet,
22
+ __uni__key,
23
+ __uni__args = [],
24
+ __uni__variants
25
+ }) => {
26
+ const newComputedStylesheet = typeof __uni__stylesheet === 'function' ? __uni__stylesheet(_runtime.UnistylesRuntime.theme, _runtime.UnistylesRuntime.miniRuntime) : __uni__stylesheet;
27
+ const style = newComputedStylesheet[__uni__key];
28
+ const resultHidden = typeof style === 'function' ? style(...__uni__args) : style;
29
+ const result = (0, _utils.extractHiddenProperties)(resultHidden);
30
+ const {
31
+ variants
32
+ } = Object.fromEntries((0, _variants.getVariants)({
33
+ variants: result
34
+ }, __uni__variants));
35
+ const resultWithVariants = {
36
+ ...result,
37
+ ...variants
38
+ };
39
+ return {
40
+ ...acc,
41
+ ...resultWithVariants
42
+ };
43
+ }, {});
44
+ };
45
+ const createUnistylesComponent = Component => props => {
46
+ const passedStyles = props.style ?? {};
47
+ const [style, setStyle] = (0, _react.useState)(getStyles(passedStyles));
48
+ (0, _react.useEffect)(() => {
49
+ const newStyles = getStyles(passedStyles);
50
+ const dependencies = newStyles?.['uni__dependencies'] ?? [];
51
+ const dispose = _listener.UnistylesListener.addListeners(dependencies, () => setStyle(getStyles(passedStyles)));
52
+ setStyle(newStyles);
53
+ return dispose;
54
+ }, [passedStyles]);
55
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
56
+ ...props,
57
+ style: style
58
+ });
59
+ };
60
+ exports.createUnistylesComponent = createUnistylesComponent;
61
+ //# sourceMappingURL=createUnistylesComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_utils","_runtime","_variants","_listener","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getStyles","value","secrets","extractSecrets","length","undefined","reduce","acc","__uni__stylesheet","__uni__key","__uni__args","__uni__variants","newComputedStylesheet","UnistylesRuntime","theme","miniRuntime","style","resultHidden","result","extractHiddenProperties","variants","fromEntries","getVariants","resultWithVariants","createUnistylesComponent","Component","props","passedStyles","setStyle","useState","useEffect","newStyles","dependencies","dispose","UnistylesListener","addListeners","jsx","exports"],"sourceRoot":"../../../src","sources":["web/createUnistylesComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,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S,GAAG,mBAAmB,CAAC,IAAI,EAAE;IAC3D,MAAME,OAAO,GAAGC,2BAAiB,CAACC,YAAY,CAACH,YAAY,EAAE,MAAMJ,QAAQ,CAAC5B,SAAS,CAAC2B,YAAY,CAAC,CAAC,CAAC;IAErGC,QAAQ,CAACG,SAAS,CAAC;IAEnB,OAAOE,OAAO;EAClB,CAAC,EAAE,CAACN,YAAY,CAAC,CAAC;EAElB,oBACI,IAAAhD,WAAA,CAAAyD,GAAA,EAACX,SAAS;IAAA,GACFC,KAAK;IACTV,KAAK,EAAEA;EAAM,CAChB,CAAC;AAEV,CAAC;AAAAqB,OAAA,CAAAb,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  var _exportNames = {
7
7
  StyleSheet: true,
8
8
  getSSRUnistyles: true,
9
- UnistylesRuntime: true
9
+ UnistylesRuntime: true,
10
+ UnistylesShadowRegistry: true
10
11
  };
11
12
  exports.StyleSheet = void 0;
12
13
  Object.defineProperty(exports, "UnistylesRuntime", {
@@ -15,11 +16,18 @@ Object.defineProperty(exports, "UnistylesRuntime", {
15
16
  return _runtime.UnistylesRuntime;
16
17
  }
17
18
  });
19
+ Object.defineProperty(exports, "UnistylesShadowRegistry", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _shadowRegistry.UnistylesShadowRegistry;
23
+ }
24
+ });
18
25
  exports.getSSRUnistyles = void 0;
19
26
  var _create = require("./create");
20
- var _runtime = require("./runtime");
21
27
  var _state = require("./state");
22
28
  var _utils = require("./utils");
29
+ var _runtime = require("./runtime");
30
+ var _shadowRegistry = require("./shadowRegistry");
23
31
  var _mock = require("./mock");
24
32
  Object.keys(_mock).forEach(function (key) {
25
33
  if (key === "default" || key === "__esModule") return;
@@ -46,6 +54,7 @@ const StyleSheet = exports.StyleSheet = {
46
54
  flatten: (...styles) => (0, _utils.deepMergeObjects)(...styles),
47
55
  hairlineWidth: 1
48
56
  };
49
- const getSSRUnistyles = () => _runtime.UnistylesRuntime.getSSRUnistyles();
57
+ // TODO: Work on SSR
58
+ const getSSRUnistyles = () => [];
50
59
  exports.getSSRUnistyles = getSSRUnistyles;
51
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_create","require","_runtime","_state","_utils","_mock","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","StyleSheet","configure","UnistylesState","init","create","absoluteFill","position","left","top","right","bottom","compose","a","b","deepMergeObjects","flatten","styles","hairlineWidth","getSSRUnistyles","UnistylesRuntime"],"sourceRoot":"../../../src","sources":["web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAkBA,IAAAI,KAAA,GAAAJ,OAAA;AAAAK,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAhBO,MAAMS,UAAU,GAAAJ,OAAA,CAAAI,UAAA,GAAG;EACtBC,SAAS,EAAEC,qBAAc,CAACC,IAAI;EAC9BC,MAAM,EAANA,cAAM;EACNC,YAAY,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACZ,CAAC;EACDC,OAAO,EAAEA,CAACC,CAAS,EAAEC,CAAS,KAAK,IAAAC,uBAAgB,EAACF,CAAC,EAAEC,CAAC,CAAC;EACzDE,OAAO,EAAEA,CAAC,GAAGC,MAAqB,KAAK,IAAAF,uBAAgB,EAAC,GAAGE,MAAM,CAAC;EAClEC,aAAa,EAAE;AACnB,CAAC;AAKM,MAAMC,eAAe,GAAGA,CAAA,KAAMC,yBAAgB,CAACD,eAAe,CAAC,CAAC;AAAAtB,OAAA,CAAAsB,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["_create","require","_state","_utils","_runtime","_shadowRegistry","_mock","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","StyleSheet","configure","UnistylesState","init","create","absoluteFill","position","left","top","right","bottom","compose","a","b","deepMergeObjects","flatten","styles","hairlineWidth","getSSRUnistyles"],"sourceRoot":"../../../src","sources":["web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAiBA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAAAM,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAjBO,MAAMS,UAAU,GAAAJ,OAAA,CAAAI,UAAA,GAAG;EACtBC,SAAS,EAAEC,qBAAc,CAACC,IAAI;EAC9BC,MAAM,EAANA,cAAM;EACNC,YAAY,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACZ,CAAC;EACDC,OAAO,EAAEA,CAACC,CAAS,EAAEC,CAAS,KAAK,IAAAC,uBAAgB,EAACF,CAAC,EAAEC,CAAC,CAAC;EACzDE,OAAO,EAAEA,CAAC,GAAGC,MAAqB,KAAK,IAAAF,uBAAgB,EAAC,GAAGE,MAAM,CAAC;EAClEC,aAAa,EAAE;AACnB,CAAC;AAMD;AACO,MAAMC,eAAe,GAAGA,CAAA,KAAM,EAAE;AAAAtB,OAAA,CAAAsB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -9,5 +9,12 @@ Object.defineProperty(exports, "UnistylesListener", {
9
9
  return _listener.UnistylesListener;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "listenToDependencies", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _listenToDependencies.listenToDependencies;
16
+ }
17
+ });
12
18
  var _listener = require("./listener");
19
+ var _listenToDependencies = require("./listenToDependencies");
13
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_listener","require"],"sourceRoot":"../../../../src","sources":["web/listener/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_listener","require","_listenToDependencies"],"sourceRoot":"../../../../src","sources":["web/listener/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.listenToDependencies = void 0;
7
+ var _listener = require("./listener");
8
+ var _runtime = require("../runtime");
9
+ var _utils = require("../utils");
10
+ var _registry = require("../registry");
11
+ const listenToDependencies = ({
12
+ key,
13
+ className,
14
+ unistyles,
15
+ args = [],
16
+ stylesheet
17
+ }) => {
18
+ const newComputedStylesheet = typeof stylesheet === 'function' ? stylesheet(_runtime.UnistylesRuntime.theme, _runtime.UnistylesRuntime.miniRuntime) : stylesheet;
19
+ const _value = (0, _utils.keyInObject)(newComputedStylesheet, key) ? newComputedStylesheet[key] : undefined;
20
+ if (!_value) {
21
+ return;
22
+ }
23
+ const value = typeof _value === 'function' ? _value(...args) : _value;
24
+ const dependencies = 'uni__dependencies' in value ? value['uni__dependencies'] : [];
25
+ if (dependencies.length === 0) {
26
+ return;
27
+ }
28
+ return _listener.UnistylesListener.addListeners(dependencies, () => {
29
+ const newComputedStylesheet = typeof stylesheet === 'function' ? stylesheet(_runtime.UnistylesRuntime.theme, _runtime.UnistylesRuntime.miniRuntime) : stylesheet;
30
+ if (!(0, _utils.keyInObject)(newComputedStylesheet, key)) {
31
+ return;
32
+ }
33
+ const value = newComputedStylesheet[key];
34
+ const result = typeof value === 'function' ? value(...args) : value;
35
+ _registry.UnistylesRegistry.updateStyles(unistyles, result, className);
36
+ });
37
+ };
38
+ exports.listenToDependencies = listenToDependencies;
39
+ //# sourceMappingURL=listenToDependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_listener","require","_runtime","_utils","_registry","listenToDependencies","key","className","unistyles","args","stylesheet","newComputedStylesheet","UnistylesRuntime","theme","miniRuntime","_value","keyInObject","undefined","value","dependencies","length","UnistylesListener","addListeners","result","UnistylesRegistry","updateStyles","exports"],"sourceRoot":"../../../../src","sources":["web/listener/listenToDependencies.ts"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAA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SAAS,EAAEe,MAAM,EAAEhB,SAAS,CAAC;EAChE,CAAC,CAAC;AACN,CAAC;AAAAmB,OAAA,CAAArB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.UnistylesListenerBuilder = exports.UnistylesListener = void 0;
6
+ exports.UnistylesListener = void 0;
7
7
  var _NativePlatform = require("../../specs/NativePlatform");
8
8
  var _runtime = require("../runtime");
9
9
  class UnistylesListenerBuilder {
@@ -31,6 +31,5 @@ class UnistylesListenerBuilder {
31
31
  };
32
32
  };
33
33
  }
34
- exports.UnistylesListenerBuilder = UnistylesListenerBuilder;
35
34
  const UnistylesListener = exports.UnistylesListener = new UnistylesListenerBuilder();
36
35
  //# sourceMappingURL=listener.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_NativePlatform","require","_runtime","UnistylesListenerBuilder","isInitialized","listeners","Array","from","length","Object","keys","UnistyleDependency","Set","emitChange","dependency","forEach","listener","initListeners","UnistylesRuntime","darkMedia","addEventListener","ColorScheme","lightMedia","window","Orientation","Dimensions","addListeners","dependencies","add","delete","exports","UnistylesListener"],"sourceRoot":"../../../../src","sources":["web/listener/listener.ts"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEO,MAAME,wBAAwB,CAAC;EAC1BC,aAAa,GAAG,KAAK;EACrBC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACC,kCAAkB,CAAC,CAACH,MAAM,GAAG;EAAE,CAAC,EAAE,MAAM,IAAII,GAAG,CAAe,CAAC,CAAC;EAErHC,UAAU,GAAIC,UAA8B,IAAK;IAC7C,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEC,OAAO,CAACC,QAAQ,IAAIA,QAAQ,CAAC,CAAC,CAAC;EAC/D,CAAC;EAEDC,aAAa,GAAGA,CAAA,KAAM;IAClB,IAAI,IAAI,CAACb,aAAa,EAAE;MACpB;IACJ;IAEA,IAAI,CAACA,aAAa,GAAG,IAAI;IACzBc,yBAAgB,CAACC,SAAS,EAAEC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACU,WAAW,CAAC,CAAC;IAC7GH,yBAAgB,CAACI,UAAU,EAAEF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACU,WAAW,CAAC,CAAC;IAC9GE,MAAM,CAACH,gBAAgB,CAAC,mBAAmB,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACa,WAAW,CAAC,CAAC;IACnGD,MAAM,CAACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACc,UAAU,CAAC,CAAC;EAC3F,CAAC;EAEDC,YAAY,GAAGA,CAACC,YAAuC,EAAEX,QAAsB,KAAK;IAChFW,YAAY,CAACZ,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEc,GAAG,CAACZ,QAAQ,CAAC,CAAC;IAE7E,OAAO,MAAM;MACTW,YAAY,CAACZ,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEe,MAAM,CAACb,QAAQ,CAAC,CAAC;IACpF,CAAC;EACL,CAAC;AACL;AAACc,OAAA,CAAA3B,wBAAA,GAAAA,wBAAA;AAEM,MAAM4B,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAG,IAAI5B,wBAAwB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_NativePlatform","require","_runtime","UnistylesListenerBuilder","isInitialized","listeners","Array","from","length","Object","keys","UnistyleDependency","Set","emitChange","dependency","forEach","listener","initListeners","UnistylesRuntime","darkMedia","addEventListener","ColorScheme","lightMedia","window","Orientation","Dimensions","addListeners","dependencies","add","delete","UnistylesListener","exports"],"sourceRoot":"../../../../src","sources":["web/listener/listener.ts"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,MAAME,wBAAwB,CAAC;EACnBC,aAAa,GAAG,KAAK;EACrBC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACC,kCAAkB,CAAC,CAACH,MAAM,GAAG;EAAE,CAAC,EAAE,MAAM,IAAII,GAAG,CAAe,CAAC,CAAC;EAErHC,UAAU,GAAIC,UAA8B,IAAK;IAC7C,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEC,OAAO,CAACC,QAAQ,IAAIA,QAAQ,CAAC,CAAC,CAAC;EAC/D,CAAC;EAEDC,aAAa,GAAGA,CAAA,KAAM;IAClB,IAAI,IAAI,CAACb,aAAa,EAAE;MACpB;IACJ;IAEA,IAAI,CAACA,aAAa,GAAG,IAAI;IACzBc,yBAAgB,CAACC,SAAS,EAAEC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACU,WAAW,CAAC,CAAC;IAC7GH,yBAAgB,CAACI,UAAU,EAAEF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACU,WAAW,CAAC,CAAC;IAC9GE,MAAM,CAACH,gBAAgB,CAAC,mBAAmB,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACa,WAAW,CAAC,CAAC;IACnGD,MAAM,CAACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACP,UAAU,CAACF,kCAAkB,CAACc,UAAU,CAAC,CAAC;EAC3F,CAAC;EAEDC,YAAY,GAAGA,CAACC,YAAuC,EAAEX,QAAsB,KAAK;IAChFW,YAAY,CAACZ,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEc,GAAG,CAACZ,QAAQ,CAAC,CAAC;IAE7E,OAAO,MAAM;MACTW,YAAY,CAACZ,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEe,MAAM,CAACb,QAAQ,CAAC,CAAC;IACpF,CAAC;EACL,CAAC;AACL;AAEO,MAAMc,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAI3B,wBAAwB,CAAC,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.UnistylesShadowRegistry = exports.StatusBar = exports.NavigationBar = void 0;
6
+ exports.StatusBar = exports.NavigationBar = void 0;
7
7
  const StatusBar = exports.StatusBar = {
8
8
  width: 0,
9
9
  height: 0,
@@ -25,13 +25,4 @@ const NavigationBar = exports.NavigationBar = {
25
25
  __type: 'web',
26
26
  name: 'NavigationBar'
27
27
  };
28
- const UnistylesShadowRegistry = exports.UnistylesShadowRegistry = {
29
- name: 'UnistylesShadowRegistry',
30
- __type: 'web',
31
- equals: () => true,
32
- toString: () => 'UnistylesShadowRegistry',
33
- dispose: () => {},
34
- add: () => {},
35
- remove: () => {}
36
- };
37
28
  //# sourceMappingURL=mock.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["StatusBar","exports","width","height","setStyle","setHidden","setBackgroundColor","equals","toString","__type","name","NavigationBar","UnistylesShadowRegistry","dispose","add","remove"],"sourceRoot":"../../../src","sources":["web/mock.ts"],"mappings":";;;;;;AAGO,MAAMA,SAAwB,GAAAC,OAAA,CAAAD,SAAA,GAAG;EACpCE,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EACnBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAC5BC,MAAM,EAAEA,CAAA,KAAM,IAAI;EAClBC,QAAQ,EAAEA,CAAA,KAAM,WAAW;EAC3BC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE;AACV,CAAC;AAEM,MAAMC,aAAgC,GAAAV,OAAA,CAAAU,aAAA,GAAG;EAC5CT,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTE,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EACnBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAC5BC,MAAM,EAAEA,CAAA,KAAM,IAAI;EAClBC,QAAQ,EAAEA,CAAA,KAAM,eAAe;EAC/BC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE;AACV,CAAC;AAEM,MAAME,uBAAuB,GAAAX,OAAA,CAAAW,uBAAA,GAAG;EACnCF,IAAI,EAAE,yBAAyB;EAC/BD,MAAM,EAAE,KAAK;EACbF,MAAM,EAAEA,CAAA,KAAM,IAAI;EAClBC,QAAQ,EAAEA,CAAA,KAAM,yBAAyB;EACzCK,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;EACjBC,GAAG,EAAEA,CAAA,KAAM,CAAC,CAAC;EACbC,MAAM,EAAEA,CAAA,KAAM,CAAC;AACnB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["StatusBar","exports","width","height","setStyle","setHidden","setBackgroundColor","equals","toString","__type","name","NavigationBar"],"sourceRoot":"../../../src","sources":["web/mock.ts"],"mappings":";;;;;;AAGO,MAAMA,SAAwB,GAAAC,OAAA,CAAAD,SAAA,GAAG;EACpCE,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EACnBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAC5BC,MAAM,EAAEA,CAAA,KAAM,IAAI;EAClBC,QAAQ,EAAEA,CAAA,KAAM,WAAW;EAC3BC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE;AACV,CAAC;AAEM,MAAMC,aAAgC,GAAAV,OAAA,CAAAU,aAAA,GAAG;EAC5CT,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTE,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EACnBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAC5BC,MAAM,EAAEA,CAAA,KAAM,IAAI;EAClBC,QAAQ,EAAEA,CAAA,KAAM,eAAe;EAC/BC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE;AACV,CAAC","ignoreList":[]}
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.pseudos = exports.isPseudo = void 0;
7
- // TODO: Add complete list of pseudo selectors
8
- const pseudos = exports.pseudos = ['_hover', '_css', '_before', '_after'];
9
- const isPseudo = selector => pseudos.includes(selector);
7
+ const pseudos = exports.pseudos = ['_-moz-broken', '_-moz-drag-over', '_-moz-first-node', '_-moz-handler-blocked', '_-moz-handler-crashed', '_-moz-handler-disabled', '_-moz-last-node', '_-moz-loading', '_-moz-locale-dir(ltr)', '_-moz-locale-dir(rtl)', '_-moz-only-whitespace', '_-moz-submit-invalid', '_-moz-suppressed', '_-moz-user-disabled', '_-moz-window-inactive', '_active', '_any-link', '_autofill', '_blank', '_buffering', '_checked', '_current', '_default', '_defined', '_dir(', '_disabled', '_empty', '_enabled', '_first', '_first-child', '_first-of-type', '_focus', '_focus-visible', '_focus-within', '_fullscreen', '_future', '_has(', '_host', '_host-context(', '_host(', '_hover', '_in-range', '_indeterminate', '_invalid', '_is(', '_lang(', '_last-child', '_last-of-type', '_left', '_link', '_local-link', '_modal', '_muted', '_not(', '_nth-child(', '_nth-last-child(', '_nth-last-of-type(', '_nth-of-type(', '_only-child', '_only-of-type', '_optional', '_out-of-range', '_past', '_paused', '_picture-in-picture', '_placeholder-shown', '_playing', '_popover-open', '_read-only', '_read-write', '_required', '_right', '_scope', '_seeking', '_stalled', '_state(', '_target', '_target-within', '_user-invalid', '_user-valid', '_valid', '_visited', '_volume-locked', '_where(', '_-moz-color-swatch', '_-moz-focus-inner', '_-moz-list-bullet', '_-moz-list-number', '_-moz-meter-bar', '_-moz-progress-bar', '_-moz-range-progress', '_-moz-range-thumb', '_-moz-range-track', '_-webkit-inner-spin-button', '_-webkit-meter-barDeprecated', '_-webkit-meter-even-less-good-value', '_-webkit-meter-inner-element', '_-webkit-meter-optimum-value', '_-webkit-meter-suboptimum-value', '_-webkit-progress-bar', '_-webkit-progress-inner-element', '_-webkit-progress-value', '_-webkit-scrollbar', '_-webkit-search-cancel-button', '_-webkit-search-results-button', '_-webkit-slider-runnable-track', '_-webkit-slider-thumb', '_after', '_backdrop', '_before', '_cue', '_file-selector-button', '_first-letter', '_first-line', '_grammar-error', '_highlight(', '_marker', '_part(', '_placeholder', '_selection', '_slotted(', '_spelling-error', '_target-text', '_view-transition', '_view-transition-group', '_view-transition-image-pair', '_view-transition-new', '_view-transition-old'];
8
+ const isPseudo = selector => pseudos.some(pseudo => selector.startsWith(pseudo));
10
9
  exports.isPseudo = isPseudo;
11
10
  //# sourceMappingURL=pseudo.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["pseudos","exports","isPseudo","selector","includes"],"sourceRoot":"../../../src","sources":["web/pseudo.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,CACnB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,CACF;AAEH,MAAME,QAAQ,GAAIC,QAAgB,IAAKH,OAAO,CAACI,QAAQ,CAACD,QAAkB,CAAC;AAAAF,OAAA,CAAAC,QAAA,GAAAA,QAAA","ignoreList":[]}
1
+ {"version":3,"names":["pseudos","exports","isPseudo","selector","some","pseudo","startsWith"],"sourceRoot":"../../../src","sources":["web/pseudo.ts"],"mappings":";;;;;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AAqC,EACrC,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,uBAAuB,EACvB,iCAAiC,EACjC,yBAAyB,EACzB,oBAAoB,EACpB,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,SAAS,EACT,MAAM,EACN,uBAAuB,EACvB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,CAChB;AAEH,MAAME,QAAQ,GAAIC,QAAgB,IAAKH,OAAO,CAACI,IAAI,CAACC,MAAM,IAAIF,QAAQ,CAACG,UAAU,CAACD,MAAM,CAAC,CAAC;AAAAJ,OAAA,CAAAC,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -6,14 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.UnistylesRegistry = void 0;
7
7
  var _typestyle = require("typestyle");
8
8
  var _convert = require("./convert");
9
- var _state = require("./state");
10
9
  class UnistylesRegistryBuilder {
11
10
  createStyles = (stylesheet, key) => {
12
- const stylesTag = _state.UnistylesState.createTag();
13
- const unistyles = (0, _typestyle.createTypeStyle)(stylesTag);
11
+ const unistyles = (0, _typestyle.createTypeStyle)();
14
12
  const typestyleStylesheet = (0, _convert.convertToTypeStyle)(stylesheet);
15
13
  const className = unistyles.style({
16
- $debugName: String(key)
14
+ $debugName: `${key}-${Math.random().toString(16).slice(10)}`
17
15
  }, typestyleStylesheet);
18
16
  if (stylesheet._web?._css) {
19
17
  const customClassName = Array.isArray(stylesheet._web._css) ? stylesheet._web._css.join(' ') : stylesheet._web._css;
@@ -1 +1 @@
1
- {"version":3,"names":["_typestyle","require","_convert","_state","UnistylesRegistryBuilder","createStyles","stylesheet","key","stylesTag","UnistylesState","createTag","unistyles","createTypeStyle","typestyleStylesheet","convertToTypeStyle","className","style","$debugName","String","_web","_css","customClassName","Array","isArray","join","updateStyles","reinit","cssRule","UnistylesRegistry","exports"],"sourceRoot":"../../../src","sources":["web/registry.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,MAAMG,wBAAwB,CAAC;EAC3BC,YAAY,GAAGA,CAACC,UAA2B,EAAEC,GAAoB,KAAK;IAClE,MAAMC,SAAS,GAAGC,qBAAc,CAACC,SAAS,CAAC,CAAC;IAC5C,MAAMC,SAAS,GAAG,IAAAC,0BAAe,EAACJ,SAAS,CAAC;IAC5C,MAAMK,mBAAmB,GAAG,IAAAC,2BAAkB,EAACR,UAAU,CAAC;IAE1D,MAAMS,SAAS,GAAGJ,SAAS,CAACK,KAAK,CAAC;MAC9BC,UAAU,EAAEC,MAAM,CAACX,GAAG;IAC1B,CAAC,EAAEM,mBAAmB,CAAC;IAEvB,IAAIP,UAAU,CAACa,IAAI,EAAEC,IAAI,EAAE;MACvB,MAAMC,eAAe,GAAGC,KAAK,CAACC,OAAO,CAACjB,UAAU,CAACa,IAAI,CAACC,IAAI,CAAC,GACrDd,UAAU,CAACa,IAAI,CAACC,IAAI,CAACI,IAAI,CAAC,GAAG,CAAC,GAC9BlB,UAAU,CAACa,IAAI,CAACC,IAAI;MAE1B,OAAO;QACHL,SAAS,EAAE,GAAGA,SAAS,IAAIM,eAAe,EAAE;QAC5CV;MACJ,CAAC;IACL;IAEA,OAAO;MACHI,SAAS;MACTJ;IACJ,CAAC;EACL,CAAC;EAEDc,YAAY,GAAGA,CAACd,SAAoB,EAAEL,UAA2B,EAAES,SAAiB,KAAK;IACrF,MAAMF,mBAAmB,GAAG,IAAAC,2BAAkB,EAACR,UAAU,CAAC;IAE1DK,SAAS,CAACe,MAAM,CAAC,CAAC;IAClBf,SAAS,CAACgB,OAAO,CAAC,IAAIZ,SAAS,EAAE,EAAEF,mBAAmB,CAAC;EAC3D,CAAC;AACL;AAEO,MAAMe,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAIxB,wBAAwB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_typestyle","require","_convert","UnistylesRegistryBuilder","createStyles","stylesheet","key","unistyles","createTypeStyle","typestyleStylesheet","convertToTypeStyle","className","style","$debugName","Math","random","toString","slice","_web","_css","customClassName","Array","isArray","join","updateStyles","reinit","cssRule","UnistylesRegistry","exports"],"sourceRoot":"../../../src","sources":["web/registry.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,MAAME,wBAAwB,CAAC;EAC3BC,YAAY,GAAGA,CAACC,UAA2B,EAAEC,GAAW,KAAK;IACzD,MAAMC,SAAS,GAAG,IAAAC,0BAAe,EAAC,CAAC;IACnC,MAAMC,mBAAmB,GAAG,IAAAC,2BAAkB,EAACL,UAAU,CAAC;IAE1D,MAAMM,SAAS,GAAGJ,SAAS,CAACK,KAAK,CAAC;MAC9BC,UAAU,EAAE,GAAGP,GAAG,IAAIQ,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,EAAE,CAAC;IAC9D,CAAC,EAAER,mBAAmB,CAAC;IAEvB,IAAIJ,UAAU,CAACa,IAAI,EAAEC,IAAI,EAAE;MACvB,MAAMC,eAAe,GAAGC,KAAK,CAACC,OAAO,CAACjB,UAAU,CAACa,IAAI,CAACC,IAAI,CAAC,GACrDd,UAAU,CAACa,IAAI,CAACC,IAAI,CAACI,IAAI,CAAC,GAAG,CAAC,GAC9BlB,UAAU,CAACa,IAAI,CAACC,IAAI;MAE1B,OAAO;QACHR,SAAS,EAAE,GAAGA,SAAS,IAAIS,eAAe,EAAE;QAC5Cb;MACJ,CAAC;IACL;IAEA,OAAO;MACHI,SAAS;MACTJ;IACJ,CAAC;EACL,CAAC;EAEDiB,YAAY,GAAGA,CAACjB,SAAoB,EAAEF,UAA2B,EAAEM,SAAiB,KAAK;IACrF,MAAMF,mBAAmB,GAAG,IAAAC,2BAAkB,EAACL,UAAU,CAAC;IAE1DE,SAAS,CAACkB,MAAM,CAAC,CAAC;IAClBlB,SAAS,CAACmB,OAAO,CAAC,IAAIf,SAAS,EAAE,EAAEF,mBAAmB,CAAC;EAC3D,CAAC;AACL;AAEO,MAAMkB,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAIxB,wBAAwB,CAAC,CAAC","ignoreList":[]}
@@ -158,7 +158,6 @@ class UnistylesRuntimeBuilder {
158
158
  }
159
159
  _state.UnistylesState.themes.set(themeName, updater(oldTheme));
160
160
  };
161
- getSSRUnistyles = () => _state.UnistylesState.tags;
162
161
  }
163
162
  const UnistylesRuntime = exports.UnistylesRuntime = new UnistylesRuntimeBuilder();
164
163
  //# sourceMappingURL=runtime.js.map