react-native-unistyles 3.0.0-alpha.29 → 3.0.0-alpha.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. package/cxx/common/Helpers.h +11 -0
  2. package/cxx/core/HostStyle.cpp +1 -1
  3. package/cxx/core/UnistyleWrapper.h +9 -8
  4. package/cxx/core/UnistylesCommitHook.cpp +3 -14
  5. package/cxx/core/UnistylesCommitHook.h +5 -11
  6. package/cxx/core/UnistylesMountHook.cpp +0 -1
  7. package/cxx/core/UnistylesMountHook.h +0 -2
  8. package/cxx/core/UnistylesRegistry.cpp +1 -1
  9. package/cxx/core/UnistylesRegistry.h +1 -1
  10. package/cxx/hybridObjects/HybridStyleSheet.cpp +17 -11
  11. package/cxx/hybridObjects/HybridStyleSheet.h +1 -1
  12. package/cxx/parser/Parser.cpp +20 -14
  13. package/cxx/parser/Parser.h +1 -1
  14. package/cxx/shadowTree/ShadowTrafficController.h +4 -0
  15. package/cxx/shadowTree/ShadowTreeManager.cpp +3 -4
  16. package/cxx/shadowTree/ShadowTreeManager.h +1 -1
  17. package/ios/UnistylesModuleOnLoad.mm +4 -4
  18. package/lib/commonjs/common.js.map +1 -1
  19. package/lib/commonjs/core/createUnistylesComponent.js +18 -0
  20. package/lib/commonjs/core/createUnistylesComponent.js.map +1 -0
  21. package/lib/commonjs/core/createUnistylesComponent.native.js +45 -0
  22. package/lib/commonjs/core/createUnistylesComponent.native.js.map +2 -0
  23. package/lib/commonjs/core/index.js +7 -0
  24. package/lib/commonjs/core/index.js.map +1 -1
  25. package/lib/commonjs/core/useBreakpoint.js.map +1 -1
  26. package/lib/commonjs/core/useBreakpoint.native.js.map +2 -1
  27. package/lib/commonjs/core/useTheme.js.map +2 -1
  28. package/lib/commonjs/core/useTheme.native.js.map +2 -1
  29. package/lib/commonjs/global.js +3 -0
  30. package/lib/commonjs/index.js +8 -1
  31. package/lib/commonjs/index.js.map +1 -1
  32. package/lib/commonjs/mq.js +1 -4
  33. package/lib/commonjs/mq.js.map +2 -1
  34. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +5 -4
  35. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  36. package/lib/commonjs/specs/NativePlatform/index.js.map +1 -1
  37. package/lib/commonjs/specs/ShadowRegistry/types.js.map +1 -1
  38. package/lib/commonjs/specs/StatusBar/index.js.map +2 -1
  39. package/lib/commonjs/specs/TurboUnistyles/index.js.map +1 -1
  40. package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -2
  41. package/lib/commonjs/specs/index.web.js.map +1 -2
  42. package/lib/commonjs/specs/types.js +10 -10
  43. package/lib/commonjs/specs/types.js.map +2 -1
  44. package/lib/commonjs/types/accessibility.js +9 -9
  45. package/lib/commonjs/types/accessibility.js.map +1 -1
  46. package/lib/commonjs/types/common.js +3 -0
  47. package/lib/commonjs/types/core.js.map +1 -1
  48. package/lib/commonjs/types/index.js.map +2 -1
  49. package/lib/commonjs/types/stylesheet.js +1 -2
  50. package/lib/commonjs/web/convert/index.js +1 -7
  51. package/lib/commonjs/web/convert/index.js.map +2 -1
  52. package/lib/commonjs/web/convert/pseudo.js.map +2 -1
  53. package/lib/commonjs/web/convert/shadow.js.map +2 -1
  54. package/lib/commonjs/web/convert/style.js.map +2 -1
  55. package/lib/commonjs/web/convert/textShadow.js +1 -4
  56. package/lib/commonjs/web/convert/textShadow.js.map +2 -1
  57. package/lib/commonjs/web/convert/transform.js.map +2 -1
  58. package/lib/commonjs/web/convert/utils.js +1 -2
  59. package/lib/commonjs/web/convert/utils.js.map +2 -1
  60. package/lib/commonjs/web/index.js.map +2 -1
  61. package/lib/commonjs/web/listener.js.map +2 -1
  62. package/lib/commonjs/web/mock.js.map +2 -1
  63. package/lib/commonjs/web/mq.js.map +1 -1
  64. package/lib/commonjs/web/registry.js +1 -3
  65. package/lib/commonjs/web/registry.js.map +2 -1
  66. package/lib/commonjs/web/runtime.js.map +2 -1
  67. package/lib/commonjs/web/shadowRegistry.js +1 -9
  68. package/lib/commonjs/web/shadowRegistry.js.map +2 -1
  69. package/lib/commonjs/web/state.js +1 -5
  70. package/lib/commonjs/web/state.js.map +2 -1
  71. package/lib/commonjs/web/utils/common.js +1 -3
  72. package/lib/commonjs/web/utils/common.js.map +2 -1
  73. package/lib/commonjs/web/utils/index.js.map +1 -1
  74. package/lib/commonjs/web/utils/unistyle.js.map +2 -1
  75. package/lib/commonjs/web/variants/index.js.map +1 -1
  76. package/lib/commonjs/web/variants/useVariants.js +1 -2
  77. package/lib/commonjs/web/variants/useVariants.js.map +2 -1
  78. package/lib/module/core/createUnistylesComponent.js +11 -0
  79. package/lib/module/core/createUnistylesComponent.js.map +2 -0
  80. package/lib/module/core/createUnistylesComponent.native.js +39 -0
  81. package/lib/module/core/createUnistylesComponent.native.js.map +1 -0
  82. package/lib/module/core/index.js +1 -0
  83. package/lib/module/core/index.js.map +1 -1
  84. package/lib/module/core/useBreakpoint.js.map +1 -1
  85. package/lib/module/core/useBreakpoint.native.js.map +2 -1
  86. package/lib/module/core/useTheme.js.map +2 -1
  87. package/lib/module/core/useTheme.native.js.map +2 -1
  88. package/lib/module/global.js +1 -1
  89. package/lib/module/global.js.map +1 -0
  90. package/lib/module/index.js +1 -1
  91. package/lib/module/index.js.map +1 -1
  92. package/lib/module/mq.js +1 -4
  93. package/lib/module/mq.js.map +2 -1
  94. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  95. package/lib/module/specs/NativePlatform/index.js.map +1 -1
  96. package/lib/module/specs/NavigtionBar/index.js.map +2 -1
  97. package/lib/module/specs/ShadowRegistry/ShadowRegistry.nitro.js.map +1 -2
  98. package/lib/module/specs/ShadowRegistry/index.js.map +2 -1
  99. package/lib/module/specs/ShadowRegistry/types.js.map +2 -1
  100. package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -2
  101. package/lib/module/specs/StatusBar/index.js.map +1 -1
  102. package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js +1 -1
  103. package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +0 -1
  104. package/lib/module/specs/StyleSheet/index.js.map +2 -1
  105. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js +3 -2
  106. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +2 -1
  107. package/lib/module/specs/UnistylesRuntime/UnistylesRuntime.nitro.js.map +2 -1
  108. package/lib/module/specs/index.js.map +1 -2
  109. package/lib/module/specs/types.js.map +1 -2
  110. package/lib/module/types/accessibility.js +1 -1
  111. package/lib/module/types/accessibility.js.map +1 -0
  112. package/lib/module/types/breakpoints.js.map +1 -0
  113. package/lib/module/types/common.js +1 -1
  114. package/lib/module/types/common.js.map +1 -0
  115. package/lib/module/types/core.js.map +1 -1
  116. package/lib/module/types/index.js.map +2 -1
  117. package/lib/module/types/variants.js.map +1 -0
  118. package/lib/module/web/convert/index.js.map +2 -1
  119. package/lib/module/web/convert/pseudo.js.map +2 -1
  120. package/lib/module/web/convert/shadow.js +1 -5
  121. package/lib/module/web/convert/utils.js +1 -2
  122. package/lib/module/web/index.js +1 -2
  123. package/lib/module/web/index.js.map +2 -1
  124. package/lib/module/web/listener.js.map +2 -1
  125. package/lib/module/web/mock.js.map +2 -1
  126. package/lib/module/web/state.js +1 -5
  127. package/lib/module/web/state.js.map +2 -1
  128. package/lib/module/web/variants/getVariants.js.map +2 -1
  129. package/lib/module/web/variants/index.js.map +1 -1
  130. package/lib/module/web/variants/useVariants.js +1 -2
  131. package/lib/module/web/variants/useVariants.js.map +2 -1
  132. package/lib/typescript/src/core/createUnistylesComponent.d.ts +6 -0
  133. package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -0
  134. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +6 -0
  135. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -0
  136. package/lib/typescript/src/core/index.d.ts +1 -0
  137. package/lib/typescript/src/core/index.d.ts.map +1 -1
  138. package/lib/typescript/src/index.d.ts +1 -1
  139. package/lib/typescript/src/index.d.ts.map +1 -1
  140. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +1 -1
  141. package/nitrogen/generated/android/c++/JUnistylesNativeMiniRuntime.hpp +3 -3
  142. package/nitrogen/generated/android/unistyles+autolinking.cmake +13 -1
  143. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +4 -10
  144. package/package.json +3 -3
  145. package/src/common.js +4 -0
  146. package/src/core/createUnistylesComponent.js +6 -0
  147. package/src/core/createUnistylesComponent.native.js +31 -0
  148. package/src/core/createUnistylesComponent.native.tsx +44 -0
  149. package/src/core/createUnistylesComponent.tsx +10 -0
  150. package/src/core/index.js +3 -0
  151. package/src/core/index.ts +1 -0
  152. package/src/core/useBreakpoint.js +14 -0
  153. package/src/core/useBreakpoint.native.js +16 -0
  154. package/src/core/useTheme.js +14 -0
  155. package/src/core/useTheme.native.js +16 -0
  156. package/src/global.js +1 -0
  157. package/src/index.js +3 -0
  158. package/src/index.ts +1 -1
  159. package/src/mq.js +38 -0
  160. package/src/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  161. package/src/types/accessibility.js +30 -0
  162. package/src/types/breakpoints.js +1 -0
  163. package/src/types/common.js +1 -0
  164. package/src/types/core.js +1 -0
  165. package/src/types/index.js +1 -0
  166. package/src/types/stylesheet.js +2 -0
  167. package/src/types/variants.js +1 -0
  168. package/src/web/convert/boxShadow.js +59 -0
  169. package/src/web/convert/index.js +56 -0
  170. package/src/web/convert/pseudo.js +131 -0
  171. package/src/web/convert/shadow.js +50 -0
  172. package/src/web/convert/style.js +137 -0
  173. package/src/web/convert/textShadow.js +56 -0
  174. package/src/web/convert/transform.js +65 -0
  175. package/src/web/convert/types.js +2 -0
  176. package/src/web/convert/utils.js +39 -0
  177. package/src/web/create.js +36 -0
  178. package/src/web/index.js +22 -0
  179. package/src/web/listener.js +26 -0
  180. package/src/web/mock.js +21 -0
  181. package/src/web/mq.js +14 -0
  182. package/src/web/registry.js +165 -0
  183. package/src/web/runtime.js +160 -0
  184. package/src/web/shadowRegistry.js +96 -0
  185. package/src/web/state.js +68 -0
  186. package/src/web/utils/common.js +79 -0
  187. package/src/web/utils/index.js +2 -0
  188. package/src/web/utils/unistyle.js +72 -0
  189. package/src/web/variants/getVariants.js +26 -0
  190. package/src/web/variants/index.js +2 -0
  191. package/src/web/variants/useVariants.js +50 -0
@@ -1 +1,2 @@
1
- {"version":3,"names":["_runtime","require","_utils","_listener","_convert","_variants","UnistylesRegistryBuilder","stylesheets","Map","stylesCounter","styleTag","disposeListenersMap","dependenciesMap","tag","newTag","document","createElement","id","head","appendChild","getComputedStylesheet","stylesheet","computedStylesheet","get","createdStylesheet","UnistylesRuntime","theme","miniRuntime","dependencies","Object","values","flatMap","value","extractUnistyleDependencies","addDependenciesToStylesheet","set","Set","forEach","dependency","add","dispose","UnistylesListener","addListeners","Array","from","newComputedStylesheet","key","args","variants","hash","generateHash","existingCounter","size","counter","applyStyles","convertUnistyles","Promise","resolve","newComputedStyleSheet","newValue","result","variantsResult","fromEntries","getVariants","resultWithVariants","deepMergeObjects","styles","entries","sheet","startsWith","mediaQuery","getMediaQuery","cssRules","queryRule","find","rule","CSSMediaRule","media","item","includes","mediaQueryValue","extractMediaQueryValue","ruleIndex","reduce","acc","ruleMediaQueryValue","conditionText","undefined","length","insertRule","mqKey","mqValue","applyRule","pseudoKey","pseudoValue","replace","CSSStyleRule","selectorText","keyInObject","style","remove","existingStyles","delete","findIndex","cssText","deleteRule","UnistylesRegistry","exports"],"sourceRoot":"../../../src","sources":["web/registry.ts"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAGA,IAAAI,SAAA,GAAAJ,OAAA;AAmBA,MAAMK,wBAAwB,CAAC;EACVC,WAAW,GAAG,IAAIC,GAAG,CAAoD,CAAC;EAC1EC,aAAa,GAAG,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D,CAAC,CAAC,IAAI,IAAI;IAEV,IAAI,CAAC0B,IAAI,EAAE;MACPA,IAAI,GAAGP,KAAK,CAACI,QAAQ,CAACM,IAAI,CAACV,KAAK,CAACqB,UAAU,CAAC,IAAIxC,IAAI,KAAK,CAAC,CAAC;IAC/D;IAEA,IAAI,EAAE0B,IAAI,YAAYqB,YAAY,CAAC,IAAI,CAAC,IAAAE,kBAAW,EAACvB,IAAI,CAACwB,KAAK,EAAErD,GAAG,CAAC,EAAE;MAClE;IACJ;IAEA6B,IAAI,CAACwB,KAAK,CAACrD,GAAG,CAAwC,GAAGd,KAAK;EAClE,CAAC;EAEDoE,MAAM,GAAIpE,KAAsB,IAAK;IACjC,MAAMiB,IAAI,GAAG,IAAAC,mBAAY,EAAClB,KAAK,CAAC;IAChC,MAAMqE,cAAc,GAAG,IAAI,CAAC5F,aAAa,CAACc,GAAG,CAAC0B,IAAI,CAAC;IAEnD,IAAI,CAACoD,cAAc,EAAE;MACjB;IACJ;IAEAA,cAAc,CAACC,MAAM,CAACtE,KAAK,CAAC;IAE5B,IAAIqE,cAAc,CAACjD,IAAI,KAAK,CAAC,EAAE;MAC3B,MAAM8B,SAAS,GAAGvC,KAAK,CAACC,IAAI,CAAC,IAAI,CAAClC,QAAQ,CAAC0D,KAAK,EAAEI,QAAQ,IAAI,EAAE,CAAC,CAAC+B,SAAS,CAAC5B,IAAI,IAAIA,IAAI,CAAC6B,OAAO,CAACzB,QAAQ,CAAC,IAAI9B,IAAI,EAAE,CAAC,CAAC;MAEtH,IAAI,CAACvC,QAAQ,CAAC0D,KAAK,EAAEqC,UAAU,CAACvB,SAAS,CAAC;IAC9C;EACJ,CAAC;AACL;AAEO,MAAMwB,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAIpG,wBAAwB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_runtime","require","_utils","_listener","_convert","_variants","UnistylesRegistryBuilder","stylesheets","Map","stylesCounter","styleTag","disposeListenersMap","dependenciesMap","tag","newTag","document","createElement","id","head","appendChild","getComputedStylesheet","stylesheet","computedStylesheet","get","createdStylesheet","UnistylesRuntime","theme","miniRuntime","dependencies","Object","values","flatMap","value","extractUnistyleDependencies","addDependenciesToStylesheet","set","Set","forEach","dependency","add","dispose","UnistylesListener","addListeners","Array","from","newComputedStylesheet","key","args","variants","hash","generateHash","existingCounter","size","counter","applyStyles","convertUnistyles","Promise","resolve","newComputedStyleSheet","newValue","result","variantsResult","fromEntries","getVariants","resultWithVariants","deepMergeObjects","styles","entries","sheet","startsWith","mediaQuery","getMediaQuery","cssRules","queryRule","find","rule","CSSMediaRule","media","item","includes","mediaQueryValue","extractMediaQueryValue","ruleIndex","reduce","acc","ruleMediaQueryValue","conditionText","undefined","length","insertRule","mqKey","mqValue","applyRule","pseudoKey","pseudoValue","replace","CSSStyleRule","selectorText","keyInObject","style","remove","existingStyles","delete","findIndex","cssText","deleteRule","UnistylesRegistry","exports"],"sourceRoot":"../../../src","sources":["web/registry.js"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,MAAMK,wBAAwB,CAAC;EAC3BC,WAAW,GAAG,IAAIC,GAAG,CAAC,CAAC;EACvBC,aAAa,GAAG,IAAID,GAAG,CAAC,CAAC;EACzB,CAACE,QAAQ,GAAG,IAAI;EAChBC,mBAAmB,GAAG,IAAIH,GAAG,CAAC,CAAC;EAC/BI,eAAe,GAAG,IAAIJ,GAAG,CAAC,CAAC;EAC3B,IAAIE,QAAQA,CAAA,EAAG;IACX,MAAMG,GAAG,GAAG,IAAI,CAAC,CAACH,QAAQ;IAC1B,IAAI,CAACG,GAAG,EAAE;MACN,MAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;MAC9CF,MAAM,CAACG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AAIpE,KAAK,IAAK;IAChB,MAAMiB,IAAI,GAAG,IAAAC,mBAAY,EAAClB,KAAK,CAAC;IAChC,MAAMqE,cAAc,GAAG,IAAI,CAAC5F,aAAa,CAACc,GAAG,CAAC0B,IAAI,CAAC;IACnD,IAAI,CAACoD,cAAc,EAAE;MACjB;IACJ;IACAA,cAAc,CAACC,MAAM,CAACtE,KAAK,CAAC;IAC5B,IAAIqE,cAAc,CAACjD,IAAI,KAAK,CAAC,EAAE;MAC3B,MAAM8B,SAAS,GAAGvC,KAAK,CAACC,IAAI,CAAC,IAAI,CAAClC,QAAQ,CAAC0D,KAAK,EAAEI,QAAQ,IAAI,EAAE,CAAC,CAAC+B,SAAS,CAAC5B,IAAI,IAAIA,IAAI,CAAC6B,OAAO,CAACzB,QAAQ,CAAC,IAAI9B,IAAI,EAAE,CAAC,CAAC;MACtH,IAAI,CAACvC,QAAQ,CAAC0D,KAAK,EAAEqC,UAAU,CAACvB,SAAS,CAAC;IAC9C;EACJ,CAAC;AACL;AACO,MAAMwB,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAIpG,wBAAwB,CAAC,CAAC","ignoreList":[]}
2
+ ,"ignoreList":[]}
@@ -1 +1,2 @@
1
- {"version":3,"names":["_NativePlatform","require","_types","_types2","_listener","_mock","_state","_utils","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","isServer","window","matchMedia","colorScheme","matches","ColorScheme","Light","Dark","Unspecified","themeName","UnistylesState","contentSizeCategory","WebContentSizeCategory","breakpoint","orientation","Orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","StatusBar","rtl","document","documentElement","dir","hasAdaptiveThemes","navigationBar","NavigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","UnistylesListener","emitChange","UnistyleDependency","Theme","ThemeName","setAdaptiveThemes","isEnabled","schemeToTheme","setRootViewBackgroundColor","hex","alpha","style","backgroundColor","hexToRGBA","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","Error","set","exports"],"sourceRoot":"../../../src","sources":["web/runtime.ts"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,MAAMO,uBAAuB,CAAC;EAC1BC,UAAU,GAAG,IAAI,CAACC,aAAa,CAAC,CAAC;EACjCC,SAAS,GAAG,IAAI,CAACC,YAAY,CAAC,CAAC;EAEvBF,aAAaA,CAAA,EAA0B;IAC3C,IAAI,IAAAG,eAAQ,EAAC,CAAC,EAAE;MACZ,OAAO,IAAI;IACf;IAEA,IAAI,CAAC,IAAI,CAACJ,UAAU,EAAE;MAClB,IAAI,CAACA,UAAU,GAAGK,MAAM,CAACC,UAAU,CAAC,+BAA+B,CAAC;IACxE;IAEA,OAAO,IAAI,CAACN,UAAU;EAC1B;EAEQG,YAAYA,CAAA,EAA0B;IAC1C,IAAI,IAAAC,eAAQ,EAAC,CAAC,EAAE;MACZ,OAAO,IAAI;IACf;IAEA,IAAI,CAAC,IAAI,CAACF,SAAS,EAAE;MACjB,IAAI,CAACA,SAAS,GAAGG,MAAM,CAACC,UAAU,CAAC,8BAA8B,CAAC;IACtE;IAEA,OAAO,IAAI,CAACJ,SAAS;EACzB;EAEA,IAAIK,WAAWA,CAAA,EAAG;IACd,QAAQ,IAAI;MACR,KAAK,IAAI,CAACN,aAAa,CAAC,CAAC,EAAEO,OAAO;QAC9B,OAAOC,kBAAW,CAACC,KAAK;MAC5B,KAAK,IAAI,CAACP,YAAY,CAAC,CAAC,EAAEK,OAAO;QAC7B,OAAOC,kBAAW,CAACE,IAAI;MAC3B;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,KAAK,GAAGX,qBAAc,CAAC0D,MAAM,CAACC,GAAG,CAAC5D,SAAS,CAAC;IAElD,IAAI,CAACY,KAAK,EAAE;MACR,MAAM,IAAIiD,KAAK,CAAC,aAAa,IAAI,CAAC7D,SAAS,sBAAsB,CAAC;IACtE;IAEA,OAAOY,KAAK;EAChB,CAAC;AACL;AAEO,MAAM4B,gBAAgB,GAAAuB,OAAA,CAAAvB,gBAAA,GAAG,IAAItD,uBAAuB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_NativePlatform","require","_types","_types2","_listener","_mock","_state","_utils","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","isServer","window","matchMedia","colorScheme","matches","ColorScheme","Light","Dark","Unspecified","themeName","UnistylesState","contentSizeCategory","WebContentSizeCategory","breakpoint","orientation","Orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","StatusBar","rtl","document","documentElement","dir","hasAdaptiveThemes","navigationBar","NavigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","UnistylesListener","emitChange","UnistyleDependency","Theme","ThemeName","setAdaptiveThemes","isEnabled","schemeToTheme","setRootViewBackgroundColor","hex","alpha","style","backgroundColor","hexToRGBA","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","Error","set","exports"],"sourceRoot":"../../../src","sources":["web/runtime.js"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,MAAMO,uBAAuB,CAAC;EAC1BC,UAAU,GAAG,IAAI,CAACC,aAAa,CAAC,CAAC;EACjCC,SAA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AQ,EAAC,CAAC,EAAE;MACZ;IACJ;IACAuC,QAAQ,CAACC,eAAe,CAACqB,KAAK,CAACC,eAAe,GAAGF,KAAK,GAAG,IAAAG,gBAAS,EAACJ,GAAG,EAAEC,KAAK,CAAC,GAAGD,GAAG;EACxF,CAAC;EACDK,gBAAgB,GAAGA,CAAA,KAAM,CAAE,CAAC;EAC5BC,WAAW,GAAGA,CAACxD,SAAS,EAAEyD,OAAO,KAAK;IAClC,MAAMC,QAAQ,GAAGzD,qBAAc,CAAC0D,MAAM,CAACC,GAAG,CAAC5D,SAAS,CAAC;IACrD,IAAI,CAAC0D,QAAQ,EAAE;MACX,MAAM,IAAIG,KAAK,CAAC,aAAa7D,SAAS,sBAAsB,CAAC;IACjE;IACAC,qBAAc,CAAC0D,MAAM,CAACG,GAAG,CAAC9D,SAAS,EAAEyD,OAAO,CAACC,QAAQ,CAAC,CAAC;EAC3D,CAAC;EACD7C,QAAQ,GAAGA,CAACb,SAAS,GAAG,IAAI,CAACA,SAAS,KAAK;IACvC,IAAI,CAACA,SAAS,EAAE;MACZ,MAAM,IAAI6D,KAAK,CAAC,uBAAuB,CAAC;IAC5C;IACA,MAAMjD,KAAK,GAAGX,qBAAc,CAAC0D,MAAM,CAACC,GAAG,CAAC5D,SAAS,CAAC;IAClD,IAAI,CAACY,KAAK,EAAE;MACR,MAAM,IAAIiD,KAAK,CAAC,aAAa,IAAI,CAAC7D,SAAS,sBAAsB,CAAC;IACtE;IACA,OAAOY,KAAK;EAChB,CAAC;AACL;AACO,MAAM4B,gBAAgB,GAAAuB,OAAA,CAAAvB,gBAAA,GAAG,IAAItD,uBAAuB,CAAC,CAAC","ignoreList":[]}
2
+ eList":[]}
@@ -15,7 +15,6 @@ class UnistylesShadowRegistryBuilder {
15
15
  toString = () => 'UnistylesShadowRegistry';
16
16
  dispose = () => {};
17
17
  // END MOCKS
18
-
19
18
  resultsMap = (0, _utils.createDoubleMap)();
20
19
  classNamesMap = (0, _utils.createDoubleMap)();
21
20
  add = (ref, _style, _variants, _args) => {
@@ -23,18 +22,15 @@ class UnistylesShadowRegistryBuilder {
23
22
  if (!_style) {
24
23
  return;
25
24
  }
26
-
27
25
  // Array of styles
28
26
  if (Array.isArray(_style)) {
29
27
  _style.forEach(style => this.add(ref, style, _variants, _args));
30
28
  return;
31
29
  }
32
-
33
30
  // Not a unistyle
34
31
  if (!Object.keys(_style).some(key => key.startsWith('__uni__'))) {
35
32
  return;
36
33
  }
37
-
38
34
  // Ref is unmounted, remove style tags from the document
39
35
  if (ref === null) {
40
36
  const secrets = (0, _utils.extractSecrets)(_style);
@@ -56,7 +52,6 @@ class UnistylesShadowRegistryBuilder {
56
52
  });
57
53
  return;
58
54
  }
59
-
60
55
  // Ref is not an HTMLElement
61
56
  if (!(ref instanceof HTMLElement)) {
62
57
  return;
@@ -81,18 +76,15 @@ class UnistylesShadowRegistryBuilder {
81
76
  }, variants));
82
77
  const resultWithVariants = (0, _utils.deepMergeObjects)(result, variantsResult ?? {});
83
78
  const oldResult = this.resultsMap.get(ref, __uni__key);
84
-
85
79
  // If results are the same do nothing
86
80
  if ((0, _utils.equal)(oldResult, resultWithVariants)) {
87
81
  return;
88
82
  }
89
83
  const oldClassNames = this.classNamesMap.get(ref, __uni__key);
90
-
91
84
  // Remove old styles
92
85
  if (oldResult) {
93
86
  _registry.UnistylesRegistry.remove(oldResult);
94
87
  }
95
-
96
88
  // Remove old classnames from the ref
97
89
  oldClassNames?.forEach(className => ref.classList.remove(className));
98
90
  this.resultsMap.set(ref, __uni__key, resultWithVariants);
@@ -119,4 +111,4 @@ class UnistylesShadowRegistryBuilder {
119
111
  remove = () => {};
120
112
  }
121
113
  const UnistylesShadowRegistry = exports.UnistylesShadowRegistry = new UnistylesShadowRegistryBuilder();
122
- //# sourceMappingURL=shadowRegistry.js.map
114
+ //# sourceMappingURL=shadowRegistry.js.mapy.js.map
@@ -1 +1,2 @@
1
- {"version":3,"names":["_registry","require","_utils","_variants2","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","createDoubleMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","extractSecrets","__uni__refs","__uni__key","isInDocument","oldResult","get","delete","UnistylesRegistry","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","getVariants","resultWithVariants","deepMergeObjects","equal","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","extractUnistyleDependencies","addDependenciesToStylesheet","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAIA,MAAMG,8BAA8B,CAAC;EACjC;EACAC,IAAI,GAAG,yBAAyB;EAChCC,MAAM,GAAG,KAAK;EACdC,MAAM,GAAGA,CAAA,KAAM,IAAI;EACnBC,QAAQ,GAAGA,CAAA,KAAM,yBAAyB;EAC1CC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClB;;EAEQC,UAAU,GAAG,IAAAC,sBAAe,EAAuC,CAAC;EACpEC,aAAa,GAAG,IAAAD,sBAAe,EAAqC,CAAC;EAE7EE,GAAG,GAAGA,CAACC,GAAQ,EAAEC,MAA6B,EAAEC,SAA+B,EAAEC,KAAkB,KAAK;IACpG;IACA,IAAI,CAACF,MAAM,EAAE;MACT;IACJ;;IAEA;IACA,IAAIG,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,EAAE;MACvBA,MAAM,CAACK,OAAO,CAACC,KAAK,IAAI,IAAI,CAACR,GAAG,CAACC,GAAG,EAAEO,KAAK,EAAEL,SAAS,EAAEC,KAAK,CAAC,CAAC;MAE/D;IACJ;;IAEA;IACA,IAAI,CAACK,MAAM,CAACC,IAAI,CAACR,MAAM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I,EAAE;MACrF,MAAMC,aAAa,GAAGH,kBAAkB,CAACI,MAAM,CAACT,SAAS,CAAC;MAC1D,MAAMU,YAAY,GAAG,IAAAC,kCAA2B,EAACf,kBAAkB,CAAC;MAEpE,IAAI,OAAOZ,iBAAiB,KAAK,UAAU,EAAE;QACzC;QACAJ,2BAAiB,CAACgC,2BAA2B,CAAC5B,iBAAiB,EAAE0B,YAAY,CAAC;MAClF;MAEApC,WAAW,CAAChB,GAAG,CAACC,GAAG,CAAC;MACpB,IAAI,CAACF,aAAa,CAAC6C,GAAG,CAAC3C,GAAG,EAAEgB,UAAU,EAAEiC,aAAa,CAAC;MACtD;MACAjD,GAAG,CAAC0C,SAAS,CAAC3C,GAAG,CAAC,GAAGkD,aAAa,CAAC;IACvC,CAAC,CAAC;EACN,CAAC;EAED3B,MAAM,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB;AAEO,MAAMgC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAIhE,8BAA8B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_registry","require","_utils","_variants2","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","createDoubleMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","extractSecrets","__uni__refs","__uni__key","isInDocument","oldResult","get","delete","UnistylesRegistry","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","getVariants","resultWithVariants","deepMergeObjects","equal","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","extractUnistyleDependencies","addDependenciesToStylesheet","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.js"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAA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C,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAIhE,8BAA8B,CAAC,CAAC","ignoreList":[]}
2
+ oreList":[]}
@@ -33,24 +33,20 @@ class UnistylesStateBuilder {
33
33
  initSettings = settings => {
34
34
  this.hasAdaptiveThemes = settings?.adaptiveThemes ?? false;
35
35
  const themeNames = Array.from(this.themes.keys());
36
-
37
36
  // Single theme + no settings
38
37
  if (!settings?.adaptiveThemes && !settings?.initialTheme && themeNames.length === 1) {
39
38
  this.themeName = themeNames[0];
40
39
  return;
41
40
  }
42
-
43
41
  // No settings
44
42
  if (!settings?.adaptiveThemes && !settings?.initialTheme) {
45
43
  throw new Error('🦄 You need to specify either "initialTheme" or "adaptiveThemes" in your config');
46
44
  }
47
-
48
45
  // Adaptive themes
49
46
  if (settings.adaptiveThemes) {
50
47
  this.themeName = (0, _utils.schemeToTheme)(_runtime.UnistylesRuntime.colorScheme);
51
48
  return;
52
49
  }
53
-
54
50
  // Initial theme
55
51
  this.themeName = typeof settings.initialTheme === 'function' ? settings.initialTheme() : settings.initialTheme;
56
52
  };
@@ -70,4 +66,4 @@ class UnistylesStateBuilder {
70
66
  };
71
67
  }
72
68
  const UnistylesState = exports.UnistylesState = new UnistylesStateBuilder();
73
- //# sourceMappingURL=state.js.map
69
+ //# sourceMappingURL=state.js.map.map
@@ -1 +1,2 @@
1
- {"version":3,"names":["_runtime","require","_utils","_listener","_NativePlatform","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","initSettings","settings","isServer","UnistylesListener","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","themeNames","keys","initialTheme","length","Error","schemeToTheme","UnistylesRuntime","colorScheme","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","UnistyleDependency","Breakpoints","UnistylesState","exports"],"sourceRoot":"../../../src","sources":["web/state.ts"],"mappings":";;;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,CAAC;MAE5DH,UAAU,CAACI,gBAAgB,CAAC,QAAQ,EAAEC,KAAK,IAAI;QAC3C,IAAI,CAAC3C,mBAAmB,CAACyB,GAAG,CAACxB,UAAU,EAAE0C,KAAK,CAACF,OAAO,CAAC;QACvDvB,2BAAiB,CAAC0B,UAAU,CAACC,kCAAkB,CAACC,WAAW,CAAC;MAChE,CAAC,CAAC;IACN,CAAC,CAAC;EACV,CAAC;AACL;AAEO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAIlD,qBAAqB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_runtime","require","_utils","_listener","_NativePlatform","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","initSettings","settings","isServer","UnistylesListener","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","themeNames","keys","initialTheme","length","Error","schemeToTheme","UnistylesRuntime","colorScheme","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","UnistyleDependency","Breakpoints","UnistylesState","exports"],"sourceRoot":"../../../src","sources":["web/state.js"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,MAAMI,qBAAqB,CAAC;EACxBC,MAAM,GAAG,IAAIC,GAAG,CAAC,CAAC;EAElBC,mBAAmB,GAAG,IAAID,GAAG,CAAC,CAAC;EAC/B,IAAIE,UAAUA,CAAA,EAAG;IACb,MAAM,CAACC,iBAAiB,CAAC,GAAGC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACJ,mBAAmB,CAAC,CAC3DK,OAAO,CAAC,CAAC,CACTC,IAAI,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,KAAKA,KAAK,CAAC,IAAI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AS,oBAAa,EAACC,yBAAgB,CAACC,WAAW,CAAC;MAC5D;IACJ;IACA;IACA,IAAI,CAACX,SAAS,GAAG,OAAOP,QAAQ,CAACa,YAAY,KAAK,UAAU,GAAGb,QAAQ,CAACa,YAAY,CAAC,CAAC,GAAGb,QAAQ,CAACa,YAAY;EAClH,CAAC;EACDhB,eAAe,GAAGA,CAACC,WAAW,GAAG,CAAC,CAAC,KAAK;IACpC,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9BM,MAAM,CAACC,OAAO,CAACP,WAAW,CAAC,CACtBqB,IAAI,CAAC,CAAC,GAAGC,CAAC,CAAC,EAAE,GAAGC,CAAC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC,CAC7Bf,OAAO,CAAC,CAAC,CAACrB,UAAU,EAAEO,KAAK,CAAC,KAAK;MAClC,IAAI,IAAAS,eAAQ,EAAC,CAAC,EAAE;QACZ;MACJ;MACA,MAAMqB,UAAU,GAAGC,MAAM,CAACC,UAAU,CAAC,eAAehC,KAAK,KAAK,CAAC;MAC/D,IAAI,CAACR,mBAAmB,CAACyB,GAAG,CAACxB,UAAU,EAAEqC,UAAU,CAACG,OAAO,CAAC;MAC5DH,UAAU,CAACI,gBAAgB,CAAC,QAAQ,EAAEC,KAAK,IAAI;QAC3C,IAAI,CAAC3C,mBAAmB,CAACyB,GAAG,CAACxB,UAAU,EAAE0C,KAAK,CAACF,OAAO,CAAC;QACvDvB,2BAAiB,CAAC0B,UAAU,CAACC,kCAAkB,CAACC,WAAW,CAAC;MAChE,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC;AACL;AACO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAIlD,qBAAqB,CAAC,CAAC","ignoreList":[]}
2
+ noreList":[]}
@@ -9,7 +9,6 @@ exports.reduceObject = reduceObject;
9
9
  const keyInObject = (obj, key) => key in obj;
10
10
  exports.keyInObject = keyInObject;
11
11
  const isServer = () => typeof window === 'undefined';
12
-
13
12
  /**
14
13
  * Deeply merges properties of passed object
15
14
  */
@@ -25,7 +24,6 @@ const deepMergeObjects = (...sources) => {
25
24
  target[key] = deepMergeObjects(targetValue, sourceValue);
26
25
  return;
27
26
  }
28
-
29
27
  // @ts-expect-error - can't assign to generic
30
28
  target[key] = sourceValue;
31
29
  });
@@ -89,4 +87,4 @@ const createDoubleMap = () => {
89
87
  };
90
88
  };
91
89
  exports.createDoubleMap = createDoubleMap;
92
- //# sourceMappingURL=common.js.map
90
+ //# sourceMappingURL=common.js.mapap
@@ -1 +1,2 @@
1
- {"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","exports","keyInObject","isServer","window","deepMergeObjects","sources","target","forEach","source","keys","sourceValue","targetValue","warn","message","console","equal","a","b","is","keysA","length","every","prototype","hasOwnProperty","call","generateHash","str","JSON","stringify","hasher","charCodeAt","toString","createDoubleMap","Map","get","secondKey","mapForKey","undefined","set","delete","callback"],"sourceRoot":"../../../../src","sources":["web/utils/common.ts"],"mappings":";;;;;;AAAO,MAAMA,YAAY,GAAGA,CACxBC,GAAS,EACTC,OAA+D,KAC9DC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACJ,GAAG,CAAC,CAACK,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEL,OAAO,CAACM,KAAK,EAAsBD,GAAG,CAAC,CAAC,CAAC,CAAoC;AAAAE,OAAA,CAAAT,YAAA,GAAAA,YAAA;AAE9I,MAAMU,WAAW,GAAGA,CAAgCT,GAAM,EAAEM,GAAgB,KAAqBA,GAAG,IAAIN,GAAG;AAAAQ,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAE3G,MAAMC,QAAQ,GAAGA,CAAA,KAAM,OAAOC,MAAM,KAAK,WAAW;;AAE3D;AACA;AACA;AAFAH,OAAA,CAAAE,QAAA,GAAAA,QAAA;AAGO,MAAME,gBAAgB,GAAGA,CAAqC,GAAGC,OAAi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CAAqB,CAAC;MAE/DpC,GAAG,CAACyC,GAAG,CAACxC,GAAG,EAAEsC,SAAS,CAAC;MACvBA,SAAS,CAACE,GAAG,CAACH,SAAS,EAAEpC,KAAK,CAAC;IACnC,CAAC;IACDwC,MAAM,EAAEA,CAACzC,GAAS,EAAEqC,SAAqB,KAAK;MAC1C,MAAMC,SAAS,GAAGvC,GAAG,CAACqC,GAAG,CAACpC,GAAG,CAAC;MAE9B,IAAI,CAACsC,SAAS,EAAE;QACZ;MACJ;MAEAA,SAAS,CAACG,MAAM,CAACJ,SAAS,CAAC;IAC/B,CAAC;IACD5B,OAAO,EAAGiC,QAAmE,IAAK;MAC9E3C,GAAG,CAACU,OAAO,CAAC,CAAC6B,SAAS,EAAEtC,GAAG,KAAK;QAC5BsC,SAAS,CAAC7B,OAAO,CAAC,CAACR,KAAK,EAAEoC,SAAS,KAAK;UACpCK,QAAQ,CAAC1C,GAAG,EAAEqC,SAAS,EAAEpC,KAAK,CAAC;QACnC,CAAC,CAAC;MACN,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAAAC,OAAA,CAAAgC,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","exports","keyInObject","isServer","window","deepMergeObjects","sources","target","forEach","source","keys","sourceValue","targetValue","warn","message","console","equal","a","b","is","keysA","length","every","prototype","hasOwnProperty","call","generateHash","str","JSON","stringify","hasher","charCodeAt","toString","createDoubleMap","Map","get","secondKey","mapForKey","undefined","set","delete","callback"],"sourceRoot":"../../../../src","sources":["web/utils/common.js"],"mappings":";;;;;;AAAO,MAAMA,YAAY,GAAGA,CAACC,GAAG,EAAEC,OAAO,KAAKC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACJ,GAAG,CAAC,CAACK,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEL,OAAO,CAACM,KAAK,EAA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AAMC,SAAS,GAAGvC,GAAG,CAACqC,GAAG,CAACpC,GAAG,CAAC;MAC9B,IAAI,CAACsC,SAAS,EAAE;QACZ,OAAOC,SAAS;MACpB;MACA,OAAOD,SAAS,CAACF,GAAG,CAACC,SAAS,CAAC;IACnC,CAAC;IACDG,GAAG,EAAEA,CAACxC,GAAG,EAAEqC,SAAS,EAAEpC,KAAK,KAAK;MAC5B,MAAMqC,SAAS,GAAGvC,GAAG,CAACqC,GAAG,CAACpC,GAAG,CAAC,IAAI,IAAImC,GAAG,CAAC,CAAC;MAC3CpC,GAAG,CAACyC,GAAG,CAACxC,GAAG,EAAEsC,SAAS,CAAC;MACvBA,SAAS,CAACE,GAAG,CAACH,SAAS,EAAEpC,KAAK,CAAC;IACnC,CAAC;IACDwC,MAAM,EAAEA,CAACzC,GAAG,EAAEqC,SAAS,KAAK;MACxB,MAAMC,SAAS,GAAGvC,GAAG,CAACqC,GAAG,CAACpC,GAAG,CAAC;MAC9B,IAAI,CAACsC,SAAS,EAAE;QACZ;MACJ;MACAA,SAAS,CAACG,MAAM,CAACJ,SAAS,CAAC;IAC/B,CAAC;IACD5B,OAAO,EAAGiC,QAAQ,IAAK;MACnB3C,GAAG,CAACU,OAAO,CAAC,CAAC6B,SAAS,EAAEtC,GAAG,KAAK;QAC5BsC,SAAS,CAAC7B,OAAO,CAAC,CAACR,KAAK,EAAEoC,SAAS,KAAK;UACpCK,QAAQ,CAAC1C,GAAG,EAAEqC,SAAS,EAAEpC,KAAK,CAAC;QACnC,CAAC,CAAC;MACN,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAACC,OAAA,CAAAgC,eAAA,GAAAA,eAAA","ignoreList":[]}
2
+ A","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_unistyle"],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_unistyle"],"sourceRoot":"../../../../src","sources":["web/utils/index.js"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1 +1,2 @@
1
- {"version":3,"names":["_types","require","_mq","_state","_common","schemeToTheme","scheme","ColorScheme","Dark","Light","exports","hexToRGBA","hex","opacity","replace","split","map","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","reduceObject","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","getMediaQuery","Orientation","includes","isUnistylesMq","minWidth","maxWidth","minHeight","maxHeight","parseMq","Boolean","join","UnistylesState","breakpoints","keyInObject","extractUnistyleDependencies","dependencies","uni__dependencies"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEO,MAAMI,aAAa,GAAIC,MAAmB,IAAa;EAC1D,QAAQA,MAAM;IACV,KAAKC,kBAAW,CAACC,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKD,kBAAW,CAACE,KAAK;IACtB;MACI,OAAO,OAAO;EACtB;AACJ,CAAC;AAAAC,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEM,MAAMM,SAAS,GAAGA,CAACC,GAAW,EAAEC,OAAe,KAAKD,GAAG,CACzDE,OAAO,CAAC,GAAG,EAAE,EAAE,CAA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,CACzD,CAACtC,MAAM,CAACiD,OAAO,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACnC;EAEA,MAAMN,QAAQ,GAAGO,qBAAc,CAACC,WAAW,IAAI,IAAAC,mBAAW,EAACF,qBAAc,CAACC,WAAW,EAAElB,KAAK,CAAC,GAAGiB,qBAAc,CAACC,WAAW,CAAClB,KAAK,CAAC,GAAGI,SAAS;EAE7I,OAAO,eAAeM,QAAQ,IAAI,CAAC,KAAK;AAC5C,CAAC;AAAArD,OAAA,CAAAiD,aAAA,GAAAA,aAAA;AAEM,MAAMc,2BAA2B,GAAIpC,KAAU,IAAK;EACvD,MAAMqC,YAAuC,GAAG,IAAAF,mBAAW,EAACnC,KAAK,EAAE,mBAAmB,CAAC,GAAGA,KAAK,CAACsC,iBAAiB,GAAG,EAAE;EAEtH,OAAOD,YAAY;AACvB,CAAC;AAAAhE,OAAA,CAAA+D,2BAAA,GAAAA,2BAAA","ignoreList":[]}
1
+ {"version":3,"names":["_types","require","_mq","_state","_common","schemeToTheme","scheme","ColorScheme","Dark","Light","exports","hexToRGBA","hex","opacity","replace","split","map","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","reduceObject","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","getMediaQuery","Orientation","includes","isUnistylesMq","minWidth","maxWidth","minHeight","maxHeight","parseMq","Boolean","join","UnistylesState","breakpoints","keyInObject","extractUnistyleDependencies","dependencies","uni__dependencies"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.js"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACO,MAAMI,aAAa,GAAIC,MAAM,IAAK;EACrC,QAAQA,MAAM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K,CAAC;IACnE,OAAO,CACHU,QAAQ,GAAG,eAAeA,QAAQ,KAAK,GAAGN,SAAS,EACnDO,QAAQ,GAAG,eAAeA,QAAQ,KAAK,GAAGP,SAAS,EACnDQ,SAAS,GAAG,gBAAgBA,SAAS,KAAK,GAAGR,SAAS,EACtDS,SAAS,GAAG,gBAAgBA,SAAS,KAAK,GAAGT,SAAS,CACzD,CAACtC,MAAM,CAACiD,OAAO,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACnC;EACA,MAAMN,QAAQ,GAAGO,qBAAc,CAACC,WAAW,IAAI,IAAAC,mBAAW,EAACF,qBAAc,CAACC,WAAW,EAAElB,KAAK,CAAC,GAAGiB,qBAAc,CAACC,WAAW,CAAClB,KAAK,CAAC,GAAGI,SAAS;EAC7I,OAAO,eAAeM,QAAQ,IAAI,CAAC,KAAK;AAC5C,CAAC;AAACrD,OAAA,CAAAiD,aAAA,GAAAA,aAAA;AACK,MAAMc,2BAA2B,GAAIpC,KAAK,IAAK;EAClD,MAAMqC,YAAY,GAAG,IAAAF,mBAAW,EAACnC,KAAK,EAAE,mBAAmB,CAAC,GAAGA,KAAK,CAACsC,iBAAiB,GAAG,EAAE;EAC3F,OAAOD,YAAY;AACvB,CAAC;AAAChE,OAAA,CAAA+D,2BAAA,GAAAA,2BAAA","ignoreList":[]}
2
+ ist":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_useVariants","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getVariants"],"sourceRoot":"../../../../src","sources":["web/variants/index.ts"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_useVariants","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getVariants"],"sourceRoot":"../../../../src","sources":["web/variants/index.js"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -35,7 +35,6 @@ const createUseVariants = (styles, setSelectedVariants) => {
35
35
  enumerable: false,
36
36
  configurable: true
37
37
  })));
38
-
39
38
  // Add __uni__variants to static styles
40
39
  Object.keys(styleEntry).forEach(key => {
41
40
  if (!key.startsWith('__uni__secrets__')) {
@@ -56,4 +55,4 @@ const createUseVariants = (styles, setSelectedVariants) => {
56
55
  });
57
56
  };
58
57
  exports.createUseVariants = createUseVariants;
59
- //# sourceMappingURL=useVariants.js.map
58
+ //# sourceMappingURL=useVariants.js.mapp
@@ -1 +1,2 @@
1
- {"version":3,"names":["_react","require","_utils","_getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","useState","Map","lastSelectedVariantsRef","useRef","variantsChanged","equal","current","combinedVariantStyles","useMemo","result","getVariants","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","reduceObject","enumerable","configurable","keys","startsWith","secret","keyInObject","undefined","defineProperty","exports"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEO,MAAMG,iBAAiB,GAAGA,CAACC,MAAyC,EAAEC,mBAA4D,KAAK;EAC1I,MAAMC,WAAW,GAAIC,gBAAqC,IAAK;IAC3D,MAAM,CAACC,wBAAwB,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAAM,IAAIC,GAAG,CAA8B,CAAC,CAAC;IACzF,MAAMC,uBAAuB,GAAG,IAAAC,aAAM,EAAsB,CAAC;IAC7D;IACA,MAAMC,eAAe,GAAG,CAAC,IAAAC,YAAK,EAACH,uBAAuB,CAACI,OAAO,EAAER,gBAAgB,CAAC;IAEjF,IAAIM,eAAe,EAAE;MACjBF,uBAAuB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AE;UAC7CZ,KAAK,EAAEf;QACX,CAAC,CAAC;MACN,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC;EAEDoB,MAAM,CAACU,cAAc,CAACjC,MAAM,EAAE,aAAa,EAAE;IACzCkB,KAAK,EAAEhB;EACX,CAAC,CAAC;AACN,CAAC;AAAAgC,OAAA,CAAAnC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_utils","_getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","useState","Map","lastSelectedVariantsRef","useRef","variantsChanged","equal","current","combinedVariantStyles","useMemo","result","getVariants","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","reduceObject","enumerable","configurable","keys","startsWith","secret","keyInObject","undefined","defineProperty","exports"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.js"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACO,MAAMG,iBAAiB,GAAGA,CAACC,MAAM,EAAEC,mBAAmB,KAAK;EAC9D,MAAMC,WAAW,GAAIC,gBAAgB,IAAK;IACtC,MAAM,CAACC,wBAAwB,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAAM,IAAIC,GAAG,CAAC,CAAC,CAAC;IAC5D,MAAMC,uBAAuB,GAAG,IAAAC,aAAM,EAAC,CAAC;IACxC;IACA,MAAMC,eAAe,GAAG,CAAC,IAAAC,YAAK,EAACH,uBAAuB,CAACI,OAAO,EAAER,gBAAgB,CAAC;IACjF,IAAIM,eAAe,EAAE;MACjBF,uBAAuB,CAACI,OAAO,GAAGR,gBAAgB;MAClDF,mBAAmB,CAACE,gBAAgB,CAAC;IACzC;IACA,MAAMS,qBAAqB,GAAG,IAAAC,cAAO,EAAC,MAAM;MACxC,MAAMC,MAAM,GAAG,IAAAC,wBAAW,EAACf,MAAM,EAAEG,gBAAg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gC,OAAA,CAAAnC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
2
+ []}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ export const createUnistylesComponent = (Component, mappings) => {
5
+ return props => {
6
+ return /*#__PURE__*/React.createElement(Component, {
7
+ ...props
8
+ });
9
+ };
10
+ };
11
+ //# sourceMappingURL=createUnistylesComponent.js.mapteUnistylesComponent.js.map
@@ -0,0 +1,2 @@
1
+ {"version":3,"names":["React","createUnistylesComponent","Component","mappings","props","createElement"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.js"],"mappings":";;AAAA,OAAOA,KAAK,MAAU,OAAO;AAC7B,OAAO,MAAMC,wBAAwB,GAAGA,CAACC,SAAS,EAAEC,QAAQ,KAAK;EAC7D,OAAQC,KAAK,IAAK;IACd,oBAAOJ,KAAK,CAACK,aAAa,CAACH,SAAS,EAAE;MAAE,GAAGE;IAAM,CAAC,CAAC;EACvD,CAAC;AACL,CAAC","ignoreList":[]}
2
+ ":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useState } from 'react';
4
+ import { StyleSheet, UnistyleDependency, UnistylesRuntime } from '../specs';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export const createUnistylesComponent = (Component, mappings) => {
7
+ return props => {
8
+ const [theme, setTheme] = useState(UnistylesRuntime.getTheme());
9
+ const [, setRt] = useState(0);
10
+ useEffect(() => {
11
+ const removeChangeListener = StyleSheet.addChangeListener(dependencies => {
12
+ const componentDependencies = props.style?.uni__dependencies || mappings(theme).style?.uni__dependencies;
13
+ if (dependencies.includes(UnistyleDependency.Theme) && (!componentDependencies || componentDependencies.includes(UnistyleDependency.Theme))) {
14
+ setTheme(UnistylesRuntime.getTheme());
15
+ }
16
+ if (dependencies.some(dependency => dependency >= 2) && (!componentDependencies || componentDependencies.some(dependency => dependency >= 2))) {
17
+ setRt(prevState => prevState + 1);
18
+ }
19
+ });
20
+ return () => {
21
+ removeChangeListener();
22
+ };
23
+ }, []);
24
+ const mergedProps = {
25
+ ...mappings(theme)
26
+ };
27
+ Object.keys(props).forEach(key => {
28
+ if (key in mergedProps) {
29
+ mergedProps[key] = Object.assign(props[key], mergedProps[key]);
30
+ return;
31
+ }
32
+ mergedProps[key] = props[key];
33
+ });
34
+ return /*#__PURE__*/_jsx(Component, {
35
+ ...mergedProps
36
+ });
37
+ };
38
+ };
39
+ //# sourceMappingURL=createUnistylesComponent.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","jsx","_jsx","createUnistylesComponent","Component","mappings","props","theme","setTheme","getTheme","setRt","removeChangeListener","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","Theme","some","dependency","prevState","mergedProps","Object","keys","forEach","key","assign"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAA6CC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3F,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrG,OAAO,MAAMC,wBAAwB,GAAGA,CAA+BC,SAAY,EAAEC,QAAqB,KAAK;EAC3G,OAAQC,KAAwB,IAAK;IACjC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGX,QAAQ,CAAiBG,gBAAgB,CAACS,QAAQ,CAAC,CAAC,CAAC;IAC/E,MAAM,GAAGC,KAAK,CAAC,GAAGb,QAAQ,CAAC,CAAC,CAAC;IAE7BD,SAAS,CAAC,MAAM;MACZ,MAAMe,oBAAoB,GAAIb,UAAU,CAAyBc,iBAAiB,CAACC,YAAY,IAAI;QAC/F,MAAMC,qBAAqB,GAAIR,KAAK,CAACS,KAAK,EAAEC,iBAAiB,IAAIX,QAAQ,CAACE,KAAK,CAAC,CAACQ,KAAK,EAAEC,iBAA+C;QAEvI,IAAIH,YAAY,CAACI,QAAQ,CAAClB,kBAAkB,CAACmB,KAAK,CAAC,KAAK,CAACJ,qBAAqB,IAAGA,qBAAqB,CAACG,QAAQ,CAAClB,kBAAkB,CAACmB,KAAK,CAAC,CAAC,EAAE;UACxIV,QAAQ,CAACR,gBAAgB,CAACS,QAAQ,CAAC,CAAC,CAAC;QACzC;QAEA,IAAII,YAAY,CAACM,IAAI,CAACC,UAAU,IAAIA,UAAU,IAAI,CAAC,CAAC,KAAK,CAACN,qBAAqB,IAAIA,qBAAqB,CAACK,IAAI,CAACC,UAAU,IAAIA,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;UAC3IV,KAAK,CAACW,SAAS,IAAIA,SAAS,GAAG,CAAC,CAAC;QACrC;MACJ,CAAC,CAAC;MAEF,OAAO,MAAM;QACTV,oBAAoB,CAAC,CAAC;MAC1B,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;IAEN,MAAMW,WAAW,GAAG;MAAE,GAAGjB,QAAQ,CAACE,KAAK;IAAE,CAAsB;IAE/DgB,MAAM,CAACC,IAAI,CAAClB,KAAK,CAAC,CAACmB,OAAO,CAACC,GAAG,IAAI;MAC9B,IAAIA,GAAG,IAAIJ,WAAW,EAAE;QACpBA,WAAW,CAACI,GAAG,CAAC,GAAGH,MAAM,CAACI,MAAM,CAACrB,KAAK,CAACoB,GAAG,CAAC,EAAEJ,WAAW,CAACI,GAAG,CAAC,CAAC;QAE9D;MACJ;MAEAJ,WAAW,CAACI,GAAG,CAAC,GAAGpB,KAAK,CAACoB,GAAG,CAAC;IACjC,CAAC,CAAC;IAEF,oBAAOxB,IAAA,CAACE,SAAS;MAAA,GAAKkB;IAAW,CAAG,CAAC;EACzC,CAAC;AACL,CAAC","ignoreList":[]}
@@ -2,4 +2,5 @@
2
2
 
3
3
  export { useBreakpoint } from './useBreakpoint';
4
4
  export { useTheme } from './useTheme';
5
+ export { createUnistylesComponent } from './createUnistylesComponent';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useBreakpoint","useTheme"],"sourceRoot":"../../../src","sources":["core/index.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,QAAQ,QAAQ,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["useBreakpoint","useTheme","createUnistylesComponent"],"sourceRoot":"../../../src","sources":["core/index.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,wBAAwB,QAAQ,4BAA4B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useState","UnistylesRuntime","UnistylesListener","UnistyleDependency","useBreakpoint","breakpoint","setBreakpoint","removeChangeListener","addListeners","Breakpoints"],"sourceRoot":"../../../src","sources":["core/useBreakpoint.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,gBAAgB,QAAQ,QAAQ;AACzC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGN,QAAQ,CAACC,gBAAgB,CAACI,UAAU,CAAC;EAEzEN,SAAS,CAAC,MAAM;IACZ,MAAMQ,oBAAoB,GAAGL,iBAAiB,CAACM,YAAY,CAAC,CAACL,kBAAkB,CAACM,WAAW,CAAC,EAAE,MAAMH,aAAa,CAACL,gBAAgB,CAACI,UAAU,CAAC,CAAC;IAE/I,OAAO,MAAM;MACTE,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,UAAU;AACrB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useState","UnistylesRuntime","UnistylesListener","UnistyleDependency","useBreakpoint","breakpoint","setBreakpoint","removeChangeListener","addListeners","Breakpoints"],"sourceRoot":"../../../src","sources":["core/useBreakpoint.js"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,gBAAgB,QAAQ,QAAQ;AACzC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGN,QAAQ,CAACC,gBAAgB,CAACI,UAAU,CAAC;EACzEN,SAAS,CAAC,MAAM;IACZ,MAAMQ,oBAAoB,GAAGL,iBAAiB,CAACM,YAAY,CAAC,CAACL,kBAAkB,CAACM,WAAW,CAAC,EAAE,MAAMH,aAAa,CAACL,gBAAgB,CAACI,UAAU,CAAC,CAAC;IAC/I,OAAO,MAAM;MACTE,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EACN,OAAOF,UAAU;AACrB,CAAC","ignoreList":[]}
@@ -1 +1,2 @@
1
- {"version":3,"names":["useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","useBreakpoint","breakpoint","setBreakpoint","removeChangeListener","addChangeListener","dependencies","includes","Breakpoints"],"sourceRoot":"../../../src","sources":["core/useBreakpoint.native.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,UAAU;AAG3E,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGN,QAAQ,CAACG,gBAAgB,CAACE,UAAU,CAAC;EAEzEN,SAAS,CAAC,MAAM;IACZ,MAAMQ,oBAAoB,GAAIN,UAAU,CAAyBO,iBAAiB,CAACC,YAAY,IAAI;MAC/F,IAAIA,YAAY,CAACC,QAAQ,CAACR,kBAAkB,CAACS,WAAW,CAAC,EAAE;QACvDL,aAAa,CAACH,gBAAgB,CAACE,UAAU,CAAC;MAC9C;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM;MACTE,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,UAAU;AACrB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","useBreakpoint","breakpoint","setBreakpoint","removeChangeListener","addChangeListener","dependencies","includes","Breakpoints"],"sourceRoot":"../../../src","sources":["core/useBreakpoint.native.js"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,UAAU;AAC3E,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EAC/B,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGN,QAAQ,CAACG,gBAAgB,CAACE,UAAU,CAAC;EACzEN,SAAS,CAAC,MAAM;IACZ,MAAMQ,oBAAoB,GAAGN,UAAU,CAACO,iBAAiB,CAACC,YAAY,IAAI;MACtE,IAAIA,YAAY,CAACC,QAAQ,CAACR,kBAAkB,CAACS,WAAW,CAAC,EAAE;QACvDL,aAAa,CAACH,gBAAgB,CAACE,UAAU,CAAC;MAC9C;IACJ,CAAC,CAAC;IACF,OAAO,MAAM;MACTE,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EACN,OAAOF,UAAU;AACrB,CAAC","ignoreList":[]}
2
+
@@ -1 +1,2 @@
1
- {"version":3,"names":["useEffect","useState","UnistylesRuntime","UnistylesListener","UnistyleDependency","useTheme","theme","setTheme","getTheme","removeChangeListener","addListeners","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,gBAAgB,QAAQ,QAAQ;AACzC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,kBAAkB,QAAQ,yBAAyB;AAG5D,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAsB;EAC1C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAACC,gBAAgB,CAACM,QAAQ,CAAC,CAAC,CAAC;EAE/DR,SAAS,CAAC,MAAM;IACZ,MAAMS,oBAAoB,GAAGN,iBAAiB,CAACO,YAAY,CAAC,CAACN,kBAAkB,CAACO,KAAK,CAAC,EAAE,MAAMJ,QAAQ,CAACL,gBAAgB,CAACM,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEpI,OAAO,MAAM;MACTC,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useState","UnistylesRuntime","UnistylesListener","UnistyleDependency","useTheme","theme","setTheme","getTheme","removeChangeListener","addListeners","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.js"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,gBAAgB,QAAQ,QAAQ;AACzC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC1B,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAACC,gBAAgB,CAACM,QAAQ,CAAC,CAAC,CAAC;EAC/DR,SAAS,CAAC,MAAM;IACZ,MAAMS,oBAAoB,GAAGN,iBAAiB,CAACO,YAAY,CAAC,CAACN,kBAAkB,CAACO,KAAK,CAAC,EAAE,MAAMJ,QAAQ,CAACL,gBAAgB,CAACM,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpI,OAAO,MAAM;MACTC,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EACN,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
2
+
@@ -1 +1,2 @@
1
- {"version":3,"names":["useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","useTheme","theme","setTheme","getTheme","removeChangeListener","addChangeListener","dependencies","includes","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.native.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,UAAU;AAI3E,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAsB;EAC1C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAACG,gBAAgB,CAACI,QAAQ,CAAC,CAAC,CAAC;EAE/DR,SAAS,CAAC,MAAM;IACZ,MAAMS,oBAAoB,GAAIP,UAAU,CAAyBQ,iBAAiB,CAACC,YAAY,IAAI;MAC/F,IAAIA,YAAY,CAACC,QAAQ,CAACT,kBAAkB,CAACU,KAAK,CAAC,EAAE;QACjDN,QAAQ,CAACH,gBAAgB,CAACI,QAAQ,CAAC,CAAC,CAAC;MACzC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM;MACTC,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","useTheme","theme","setTheme","getTheme","removeChangeListener","addChangeListener","dependencies","includes","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.native.js"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,UAAU;AAC3E,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC1B,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAACG,gBAAgB,CAACI,QAAQ,CAAC,CAAC,CAAC;EAC/DR,SAAS,CAAC,MAAM;IACZ,MAAMS,oBAAoB,GAAGP,UAAU,CAACQ,iBAAiB,CAACC,YAAY,IAAI;MACtE,IAAIA,YAAY,CAACC,QAAQ,CAACT,kBAAkB,CAACU,KAAK,CAAC,EAAE;QACjDN,QAAQ,CAACH,gBAAgB,CAACI,QAAQ,CAAC,CAAC,CAAC;MACzC;IACJ,CAAC,CAAC;IACF,OAAO,MAAM;MACTC,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EACN,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
2
+ }
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- //# sourceMappingURL=global.js.map
2
+ //# sourceMappingURL=global.js.maplobal.js.map
@@ -1 +1,2 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../src","sources":["global.ts"],"mappings":"","ignoreList":[]}
2
+ ":[]}
@@ -2,5 +2,5 @@
2
2
 
3
3
  export * from './specs';
4
4
  export { mq } from './mq';
5
- export { useTheme, useBreakpoint } from './core';
5
+ export { useTheme, useBreakpoint, createUnistylesComponent } from './core';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["mq","useTheme","useBreakpoint"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,SAASA,EAAE,QAAQ,MAAM;AAEzB,SAASC,QAAQ,EAAEC,aAAa,QAAQ,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["mq","useTheme","useBreakpoint","createUnistylesComponent"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,SAASA,EAAE,QAAQ,MAAM;AAEzB,SAASC,QAAQ,EAAEC,aAAa,EAAEC,wBAAwB,QAAQ,QAAQ","ignoreList":[]}
package/lib/module/mq.js CHANGED
@@ -7,7 +7,6 @@ const getMQValue = value => {
7
7
  if (value === null) {
8
8
  return 0;
9
9
  }
10
-
11
10
  // todo take it from js
12
11
  const breakpoints = {
13
12
  xs: 0,
@@ -16,11 +15,9 @@ const getMQValue = value => {
16
15
  lg: 800,
17
16
  xl: 1200
18
17
  };
19
-
20
18
  // @ts-ignore
21
19
  return breakpoints[value] ?? 0;
22
20
  };
23
-
24
21
  /**
25
22
  * Utility to create cross-platform media queries
26
23
  * @returns - JavaScript symbol to be used in your stylesheet
@@ -41,4 +38,4 @@ export const mq = {
41
38
  }
42
39
  })
43
40
  };
44
- //# sourceMappingURL=mq.js.map
41
+ //# sourceMappingURL=mq.js.mapmap
@@ -1 +1,2 @@
1
- {"version":3,"names":["getMQValue","value","breakpoints","xs","sm","md","lg","xl","mq","only","width","wMin","wMax","Infinity","height","hMin","hMax","and"],"sourceRoot":"../../src","sources":["mq.ts"],"mappings":";;AAsBA,MAAMA,UAAU,GAAIC,KAAwB,IAAK;EAC7C,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOA,KAAK;EAChB;EAEA,IAAIA,KAAK,KAAK,IAAI,EAAE;IAChB,OAAO,CAAC;EACZ;;EAEA;EACA,MAAMC,WAAW,GAAG;IAChBC,EAAE,EAAE,CAAC;IACLC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE;EACR,CAAC;;EAED;EACA,OAAOL,WAAW,CAACD,KAAK,CAAC,IAAI,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMO,EAAa,GAAG;EACzBC,IAAI,EAAE;IACFC,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KAAM,MAAMb,UAAU,CAACW,IAAI,CAAC,KAAKX,UAAU,CAACY,IAAI,CAAC,GAAyB;IACvIE,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KAAM,MAAMb,UAAU,CAACe,IAAI,CAAC,KAAKf,UAAU,CAACgB,IAAI,CAAC;EACnH,CAAC;EACDN,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,MAAM;IAC/DI,GAAG,EAAE;MACDH,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KACzD,MAAMb,UAAU,CAACW,IAAI,CAAC,KAAKX,UAAU,CAACY,IAAI,CAAC,OAAOZ,UAAU,CAACe,IAAI,CAAC,KAAKf,UAAU,CAACgB,IAAI,CAAC;IAChG;EACJ,CAAC,CAAC;EACFF,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,MAAM;IAChEI,GAAG,EAAE;MACDP,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KACxD,MAAMb,UAAU,CAACW,IAAI,CAAC,KAAKX,UAAU,CAACY,IAAI,CAAC,OAAOZ,UAAU,CAACe,IAAI,CAAC,KAAKf,UAAU,CAACgB,IAAI,CAAC;IAChG;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getMQValue","value","breakpoints","xs","sm","md","lg","xl","mq","only","width","wMin","wMax","Infinity","height","hMin","hMax","and"],"sourceRoot":"../../src","sources":["mq.js"],"mappings":";;AAAA,MAAMA,UAAU,GAAIC,KAAK,IAAK;EAC1B,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOA,KAAK;EAChB;EACA,IAAIA,KAAK,KAAK,IAAI,EAAE;IAChB,OAAO,CAAC;EACZ;EACA;EACA,MAAMC,WAAW,GAAG;IAChBC,EAAE,EAAE,CAAC;IACLC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,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e;AAClF,CAAC,EAAEA,kBAAkB,KAAKA,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
2
+ AY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY;EACvEA,kBAAkB,CAACA,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;EACzEA,kBAAkB,CAACA,kBAAkB,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;EACzFA,kBAAkB,CAACA,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ;EAC/DA,kBAAkB,CAACA,kBAAkB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY;EACxEA,kBAAkB,CAACA,kBAAkB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW;EACtEA,kBAAkB,CAACA,kBAAkB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW;EACtEA,kBAAkB,CAACA,kBAAkB,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe;EAC9EA,kBAAkB,CAACA,kBAAkB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK;AAC9D,CAAC,EAAEA,kBAAkB,KAAKA,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["UnistyleDependency"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/index.ts"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":["UnistyleDependency"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/index.js"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,wBAAwB","ignoreList":[]}
@@ -1 +1,2 @@
1
- {"version":3,"names":["processColor","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAc3C,OAAO,MAAMC,4BAA4B,GAAIC,YAAoC,IAAK;EAClF,MAAMC,aAAa,GAAGD,YAA6C;EAEnEC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAGP,YAAY,CAACM,KAAK,CAAC,IAAI,CAAC;IAE5CH,aAAa,CAACC,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["processColor","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.js"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAC3C,OAAO,MAAMC,4BAA4B,GAAIC,YAAY,IAAK;EAC1D,MAAMC,aAAa,GAAGD,YAAY;EAClCC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAK,IAAK;IACzC,MAAMC,WAAW,GAAGP,YAAY,CAACM,KAAK,CAAC,IAAI,CAAC;IAC5CH,aAAa,CAACC,mBAAmB,CAACG,WAAW,CAAC;EAClD,CAAC;AACL,CAAC","ignoreList":[]}
2
+ ]}
@@ -1,2 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/ShadowRegistry.nitro.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/ShadowRegistry.nitro.js"],"mappings":";;AAAA","ignoreList":[]}
@@ -1 +1,2 @@
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","link","remove","unlink","UnistylesShadowRegistry"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.js"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,MAAMC,oBAAoB,GAAGD,YAAY,CAACE,kBAAkB,CAAC,yBAAyB,CAAC;AACvF,MAAMC,uBAAuB,GAAIC,MAAM,IAAK;EACxC,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;EAChF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EACA,OAAOL,IAAI;AACf,CAAC;AACDJ,oBAAoB,CAACU,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,KAAK;EAC1D;EACA,IAAI,CAACV,MAAM,IAAI,CAACQ,KAAK,EAAE;IACnB;EACJ;EACAX,oBAAoB,CAACc,IAAI,CAACZ,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AACjG,CAAC;AACDb,oBAAoB,CAACe,MAAM,GAAGZ,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EACAH,oBAAoB,CAACgB,MAAM,CAACd,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AACD,OAAO,MAAMc,uBAAuB,GAAGjB,oBAAoB","ignoreList":[]}
2
+ }
@@ -1 +1,2 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/types.js"],"mappings":";;AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/types.ts"],"mappings":"","ignoreList":[]}
2
+ ":[]}
@@ -1,2 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/StatusBar/UnistylesStatusBar.nitro.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/StatusBar/UnistylesStatusBar.nitro.js"],"mappings":";;AAAA","ignoreList":[]}