react-native-unistyles 3.0.0-alpha.41 → 3.0.0-alpha.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. package/README.md +7 -1
  2. package/cxx/common/Constants.h +0 -1
  3. package/cxx/core/UnistylesRegistry.cpp +10 -4
  4. package/cxx/core/UnistylesRegistry.h +1 -1
  5. package/cxx/hybridObjects/HybridShadowRegistry.cpp +2 -2
  6. package/cxx/parser/Parser.cpp +7 -22
  7. package/cxx/parser/Parser.h +0 -1
  8. package/lib/commonjs/components/Display.js +2 -2
  9. package/lib/commonjs/components/Display.js.map +1 -1
  10. package/lib/commonjs/components/Hide.js +2 -2
  11. package/lib/commonjs/components/Hide.js.map +1 -1
  12. package/lib/commonjs/components/Pressable.js +64 -0
  13. package/lib/commonjs/components/Pressable.js.map +1 -0
  14. package/lib/commonjs/components/Pressable.web.js +97 -0
  15. package/lib/commonjs/components/Pressable.web.js.map +1 -0
  16. package/lib/commonjs/components/index.js +7 -0
  17. package/lib/commonjs/components/index.js.map +1 -1
  18. package/lib/commonjs/core/getBoundArgs.js +18 -0
  19. package/lib/commonjs/core/getBoundArgs.js.map +1 -0
  20. package/lib/commonjs/core/getId.js +9 -0
  21. package/lib/commonjs/core/getId.js.map +1 -0
  22. package/lib/commonjs/core/index.js +14 -0
  23. package/lib/commonjs/core/index.js.map +1 -1
  24. package/lib/commonjs/hooks/index.js +13 -0
  25. package/lib/commonjs/hooks/index.js.map +1 -0
  26. package/lib/commonjs/hooks/useMedia.js.map +1 -0
  27. package/lib/commonjs/hooks/useMedia.web.js.map +1 -0
  28. package/lib/commonjs/index.js +8 -1
  29. package/lib/commonjs/index.js.map +1 -1
  30. package/lib/commonjs/mq.js +6 -6
  31. package/lib/commonjs/mq.js.map +1 -1
  32. package/lib/commonjs/specs/ShadowRegistry/index.js +3 -4
  33. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  34. package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
  35. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -2
  36. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
  37. package/lib/commonjs/specs/index.web.js +0 -7
  38. package/lib/commonjs/specs/index.web.js.map +1 -1
  39. package/lib/commonjs/utils.js +1 -1
  40. package/lib/commonjs/utils.js.map +1 -1
  41. package/lib/commonjs/web/convert/types.js.map +1 -1
  42. package/lib/commonjs/web/convert/utils.js +1 -1
  43. package/lib/commonjs/web/convert/utils.js.map +1 -1
  44. package/lib/commonjs/web/create.js +4 -1
  45. package/lib/commonjs/web/create.js.map +1 -1
  46. package/lib/commonjs/web/index.js +7 -5
  47. package/lib/commonjs/web/index.js.map +1 -1
  48. package/lib/commonjs/web/listener.js.map +1 -1
  49. package/lib/commonjs/web/runtime.js +7 -7
  50. package/lib/commonjs/web/runtime.js.map +1 -1
  51. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  52. package/lib/commonjs/web/state.js +23 -16
  53. package/lib/commonjs/web/state.js.map +1 -1
  54. package/lib/commonjs/web/utils/common.js +3 -3
  55. package/lib/commonjs/web/utils/common.js.map +1 -1
  56. package/lib/commonjs/web/utils/unistyle.js +2 -4
  57. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  58. package/lib/commonjs/web/variants/getVariants.js +1 -1
  59. package/lib/commonjs/web/variants/getVariants.js.map +1 -1
  60. package/lib/commonjs/web/variants/useVariants.js +1 -1
  61. package/lib/module/components/Display.js +1 -1
  62. package/lib/module/components/Display.js.map +1 -1
  63. package/lib/module/components/Hide.js +1 -1
  64. package/lib/module/components/Hide.js.map +1 -1
  65. package/lib/module/components/Pressable.js +58 -0
  66. package/lib/module/components/Pressable.js.map +1 -0
  67. package/lib/module/components/Pressable.web.js +91 -0
  68. package/lib/module/components/Pressable.web.js.map +1 -0
  69. package/lib/module/components/index.js +1 -0
  70. package/lib/module/components/index.js.map +1 -1
  71. package/lib/module/core/getBoundArgs.js +13 -0
  72. package/lib/module/core/getBoundArgs.js.map +1 -0
  73. package/lib/module/core/getId.js +4 -0
  74. package/lib/module/core/getId.js.map +1 -0
  75. package/lib/module/core/index.js +2 -0
  76. package/lib/module/core/index.js.map +1 -1
  77. package/lib/module/hooks/index.js +4 -0
  78. package/lib/module/hooks/index.js.map +1 -0
  79. package/lib/module/hooks/useMedia.js.map +1 -0
  80. package/lib/module/hooks/useMedia.web.js.map +1 -0
  81. package/lib/module/index.js +1 -1
  82. package/lib/module/index.js.map +1 -1
  83. package/lib/module/mq.js +6 -6
  84. package/lib/module/mq.js.map +1 -1
  85. package/lib/module/specs/ShadowRegistry/index.js +3 -4
  86. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  87. package/lib/module/specs/StyleSheet/index.js.map +1 -1
  88. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -2
  89. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
  90. package/lib/module/specs/index.web.js +0 -1
  91. package/lib/module/specs/index.web.js.map +1 -1
  92. package/lib/module/utils.js +1 -1
  93. package/lib/module/utils.js.map +1 -1
  94. package/lib/module/web/convert/types.js.map +1 -1
  95. package/lib/module/web/convert/utils.js +1 -1
  96. package/lib/module/web/convert/utils.js.map +1 -1
  97. package/lib/module/web/create.js +5 -2
  98. package/lib/module/web/create.js.map +1 -1
  99. package/lib/module/web/index.js +7 -3
  100. package/lib/module/web/index.js.map +1 -1
  101. package/lib/module/web/listener.js.map +1 -1
  102. package/lib/module/web/runtime.js +8 -8
  103. package/lib/module/web/runtime.js.map +1 -1
  104. package/lib/module/web/shadowRegistry.js.map +1 -1
  105. package/lib/module/web/state.js +24 -17
  106. package/lib/module/web/state.js.map +1 -1
  107. package/lib/module/web/utils/common.js +1 -1
  108. package/lib/module/web/utils/common.js.map +1 -1
  109. package/lib/module/web/utils/unistyle.js +1 -2
  110. package/lib/module/web/utils/unistyle.js.map +1 -1
  111. package/lib/module/web/variants/getVariants.js +1 -1
  112. package/lib/module/web/variants/getVariants.js.map +1 -1
  113. package/lib/module/web/variants/useVariants.js +1 -1
  114. package/lib/typescript/src/components/Pressable.d.ts +7 -0
  115. package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
  116. package/lib/typescript/src/components/Pressable.web.d.ts +13 -0
  117. package/lib/typescript/src/components/Pressable.web.d.ts.map +1 -0
  118. package/lib/typescript/src/components/index.d.ts +1 -0
  119. package/lib/typescript/src/components/index.d.ts.map +1 -1
  120. package/lib/typescript/src/core/getBoundArgs.d.ts +2 -0
  121. package/lib/typescript/src/core/getBoundArgs.d.ts.map +1 -0
  122. package/lib/typescript/src/core/getId.d.ts +2 -0
  123. package/lib/typescript/src/core/getId.d.ts.map +1 -0
  124. package/lib/typescript/src/core/index.d.ts +2 -0
  125. package/lib/typescript/src/core/index.d.ts.map +1 -1
  126. package/lib/typescript/src/hooks/index.d.ts +2 -0
  127. package/lib/typescript/src/hooks/index.d.ts.map +1 -0
  128. package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -0
  129. package/lib/typescript/src/hooks/useMedia.web.d.ts.map +1 -0
  130. package/lib/typescript/src/index.d.ts +1 -1
  131. package/lib/typescript/src/index.d.ts.map +1 -1
  132. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +1 -1
  133. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  134. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
  135. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  136. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +1 -0
  137. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
  138. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +1 -1
  139. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
  140. package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -2
  141. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  142. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +1 -1
  143. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
  144. package/lib/typescript/src/specs/index.web.d.ts +0 -2
  145. package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
  146. package/lib/typescript/src/types/common.d.ts +1 -0
  147. package/lib/typescript/src/types/common.d.ts.map +1 -1
  148. package/lib/typescript/src/types/index.d.ts +1 -1
  149. package/lib/typescript/src/types/index.d.ts.map +1 -1
  150. package/lib/typescript/src/web/convert/types.d.ts +1 -1
  151. package/lib/typescript/src/web/convert/types.d.ts.map +1 -1
  152. package/lib/typescript/src/web/create.d.ts +1 -1
  153. package/lib/typescript/src/web/create.d.ts.map +1 -1
  154. package/lib/typescript/src/web/index.d.ts +8 -2
  155. package/lib/typescript/src/web/index.d.ts.map +1 -1
  156. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  157. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  158. package/lib/typescript/src/web/state.d.ts.map +1 -1
  159. package/lib/typescript/src/web/utils/common.d.ts +1 -1
  160. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  161. package/lib/typescript/src/web/utils/unistyle.d.ts +0 -1
  162. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  163. package/package.json +12 -16
  164. package/plugin/common.js +1 -4
  165. package/plugin/import.js +29 -3
  166. package/plugin/index.js +18 -8
  167. package/plugin/ref.js +14 -74
  168. package/plugin/style.js +117 -63
  169. package/src/components/Display.tsx +1 -1
  170. package/src/components/Hide.tsx +1 -1
  171. package/src/components/Pressable.tsx +72 -0
  172. package/src/components/Pressable.web.tsx +103 -0
  173. package/src/components/index.ts +1 -0
  174. package/src/core/getBoundArgs.ts +15 -0
  175. package/src/core/getId.ts +1 -0
  176. package/src/core/index.ts +2 -0
  177. package/src/hooks/index.ts +1 -0
  178. package/src/index.ts +1 -1
  179. package/src/mq.ts +6 -6
  180. package/src/specs/NativePlatform/NativePlatform.nitro.ts +1 -1
  181. package/src/specs/ShadowRegistry/index.ts +5 -6
  182. package/src/specs/ShadowRegistry/types.ts +2 -1
  183. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +1 -1
  184. package/src/specs/StyleSheet/index.ts +3 -2
  185. package/src/specs/TurboUnistyles/NativeTurboUnistyles.ts +1 -2
  186. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +1 -1
  187. package/src/specs/UnistylesRuntime/index.ts +1 -1
  188. package/src/specs/index.web.ts +0 -4
  189. package/src/types/common.ts +1 -0
  190. package/src/types/index.ts +1 -1
  191. package/src/utils.ts +1 -1
  192. package/src/web/convert/types.ts +1 -1
  193. package/src/web/convert/utils.ts +2 -2
  194. package/src/web/create.ts +6 -2
  195. package/src/web/index.ts +7 -3
  196. package/src/web/listener.ts +2 -0
  197. package/src/web/registry.ts +1 -1
  198. package/src/web/runtime.ts +9 -9
  199. package/src/web/shadowRegistry.ts +2 -2
  200. package/src/web/state.ts +36 -17
  201. package/src/web/utils/common.ts +1 -1
  202. package/src/web/utils/unistyle.ts +3 -9
  203. package/src/web/variants/getVariants.ts +1 -1
  204. package/src/web/variants/useVariants.ts +1 -1
  205. package/lib/commonjs/components/useMedia.js.map +0 -1
  206. package/lib/commonjs/components/useMedia.web.js.map +0 -1
  207. package/lib/module/components/useMedia.js.map +0 -1
  208. package/lib/module/components/useMedia.web.js.map +0 -1
  209. package/lib/typescript/src/components/useMedia.d.ts.map +0 -1
  210. package/lib/typescript/src/components/useMedia.web.d.ts.map +0 -1
  211. /package/lib/commonjs/{components → hooks}/useMedia.js +0 -0
  212. /package/lib/commonjs/{components → hooks}/useMedia.web.js +0 -0
  213. /package/lib/module/{components → hooks}/useMedia.js +0 -0
  214. /package/lib/module/{components → hooks}/useMedia.web.js +0 -0
  215. /package/lib/typescript/src/{components → hooks}/useMedia.d.ts +0 -0
  216. /package/lib/typescript/src/{components → hooks}/useMedia.web.d.ts +0 -0
  217. /package/src/{components → hooks}/useMedia.ts +0 -0
  218. /package/src/{components → hooks}/useMedia.web.ts +0 -0
@@ -15,14 +15,6 @@ export const schemeToTheme = (scheme: ColorScheme) => {
15
15
  }
16
16
  }
17
17
 
18
- export const hexToRGBA = (hex: string, opacity: number) => hex
19
- .replace('#', '')
20
- .split(/(?=(?:..)*$)/)
21
- .map(x => parseInt(x, 16))
22
- .filter(num => !isNaN(num))
23
- .reduce((acc, color) => `${acc}${color},`, 'rgba(')
24
- .concat(`${opacity})`)
25
-
26
18
  export type UnistyleSecrets = {
27
19
  __uni__stylesheet: StyleSheetWithSuperPowers<StyleSheet>,
28
20
  __uni__key: string,
@@ -73,7 +65,9 @@ export const extractMediaQueryValue = (query: string) => {
73
65
 
74
66
  const value = Number(px)
75
67
 
76
- return isNaN(value) ? undefined : value
68
+ return Number.isNaN(value)
69
+ ? undefined
70
+ : value
77
71
  }
78
72
 
79
73
  export const getMediaQuery = (query: string) => {
@@ -16,7 +16,7 @@ export const getVariants = (styles: ReactNativeStyleSheet<StyleSheet>, selectedV
16
16
  .map(([key, { variants, compoundVariants = [] }]) => {
17
17
  const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
18
18
  const selectedVariant = selectedVariants[variant]
19
- const selectedVariantStyles = styles[selectedVariant] ?? styles['default']
19
+ const selectedVariantStyles = styles[selectedVariant] ?? styles.default
20
20
 
21
21
  if (!selectedVariantStyles) {
22
22
  return []
@@ -7,7 +7,7 @@ export const createUseVariants = (styles: ReactNativeStyleSheet<StyleSheet>, set
7
7
  const useVariants = (selectedVariants: Record<string, any>) => {
8
8
  const [selectedVariantStylesMap] = useState(() => new Map<string, Record<string, any>>())
9
9
  const lastSelectedVariantsRef = useRef<Record<string, any>>()
10
- // Variable that determines if variants have changed and we need to recalculate styles
10
+ // Variable that determines if variants have changed, and we need to recalculate styles
11
11
  const variantsChanged = !equal(lastSelectedVariantsRef.current, selectedVariants)
12
12
 
13
13
  if (variantsChanged) {
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_specs","_mq","useMedia","config","computeIsVisible","maybeMq","mq","isUnistylesMq","console","error","parsedMq","parseMq","isValidMq","width","height","UnistylesRuntime","screen","minWidth","undefined","maxWidth","minHeight","maxHeight","isVisible","setIsVisible","useState","useEffect","useLayoutEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","includes","UnistyleDependency","Breakpoints","exports"],"sourceRoot":"../../../src","sources":["components/useMedia.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAF,OAAA;AAEO,MAAMG,QAAQ,GAAIC,MAAsB,IAAK;EAChD,MAAMC,gBAAgB,GAAGA,CAAA,KAAe;IACpC,MAAMC,OAAO,GAAGF,MAAM,CAACG,EAAuB;IAE9C,IAAI,CAAC,IAAAC,iBAAa,EAACF,OAAO,CAAC,EAAE;MACzBG,OAAO,CAACC,KAAK,CAAC,sCAAsCJ,OAAO,EAAE,CAAC;MAE9D,OAAO,KAAK;IAChB;IAEA,MAAMK,QAAQ,GAAG,IAAAC,WAAO,EAACN,OAAO,CAAC;IAEjC,IAAI,CAAC,IAAAO,aAAS,EAACF,QAAQ,CAAC,EAAE;MACtBF,OAAO,CAACC,KAAK,CAAC,oEAAoEJ,OAAO,EAAE,CAAC;MAE5F,OAAO,KAAK;IAChB;IAEA,MAAM;MAAEQ,KAAK;MAAEC;IAAO,CAAC,GAAGC,uBAAgB,CAACC,MAAM;IAEjD,IAAIN,QAAQ,CAACO,QAAQ,KAAKC,SAAS,IAAIL,KAAK,GAAGH,QAAQ,CAACO,QAAQ,EAAE;MAC9D,OAAO,KAAK;IAChB;IAEA,IAAIP,QAAQ,CAACS,QAAQ,KAAKD,SAAS,IAAIL,KAAK,GAAGH,QAAQ,CAACS,QAAQ,EAAE;MAC9D,OAAO,KAAK;IAChB;IAEA,IAAIT,QAAQ,CAACU,SAAS,KAAKF,SAAS,IAAIJ,MAAM,GAAGJ,QAAQ,CAACU,SAAS,EAAE;MACjE,OAAO,KAAK;IAChB;IAEA,IAAIV,QAAQ,CAACW,SAAS,KAAKH,SAAS,IAAIJ,MAAM,GAAGJ,QAAQ,CAACW,SAAS,EAAE;MACjE,OAAO,KAAK;IAChB;IAEA,OAAO,IAAI;EACf,CAAC;EACD,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EAAiBpB,gBAAgB,CAAC,CAAC,CAAC;EAE9E,IAAAqB,gBAAS,EAAC,MAAM;IACZF,YAAY,CAACnB,gBAAgB,CAAC,CAAC,CAAC;EACpC,CAAC,EAAE,CAACD,MAAM,CAACG,EAAE,CAAC,CAAC;EAEf,IAAAoB,sBAAe,EAAC,MAAM;IAClB,MAAMC,oBAAoB,GAAIC,iBAAU,CAAyBC,iBAAiB,CAACC,YAAY,IAAI;MAC/F,IAAIA,YAAY,CAACC,QAAQ,CAACC,yBAAkB,CAACC,WAAW,CAAC,EAAE;QACvDV,YAAY,CAACnB,gBAAgB,CAAC,CAAC,CAAC;MACpC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM;MACTuB,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,CAACxB,MAAM,CAACG,EAAE,CAAC,CAAC;EAEf,OAAO;IACHgB;EACJ,CAAC;AACL,CAAC;AAAAY,OAAA,CAAAhC,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_mq","useMedia","config","disposeRef","useRef","isVisible","setIsVisible","useState","maybeMq","mq","isUnistylesMq","console","error","parsedMq","parseMq","isValidMq","minWidth","maxWidth","minHeight","maxHeight","mediaQuery","undefined","filter","Boolean","join","media","window","matchMedia","handler","event","matches","addEventListener","current","removeEventListener","useEffect","exports"],"sourceRoot":"../../../src","sources":["components/useMedia.web.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AAEO,MAAME,QAAQ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,CAAC6B,OAAO,GAAG,MAAMP,KAAK,CAACQ,mBAAmB,CAAC,QAAQ,EAAEL,OAAO,CAAC;IAEvE,OAAOH,KAAK,CAACK,OAAO;EACxB,CAAC,CAAC;;EAEF;EACA,IAAAI,gBAAS,EAAC,MAAM,MAAM/B,UAAU,CAAC6B,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC;EAE/C,OAAO;IACH3B;EACJ,CAAC;AACL,CAAC;AAAA8B,OAAA,CAAAlC,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useLayoutEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","isValidMq","parseMq","isUnistylesMq","useMedia","config","computeIsVisible","maybeMq","mq","console","error","parsedMq","width","height","screen","minWidth","undefined","maxWidth","minHeight","maxHeight","isVisible","setIsVisible","removeChangeListener","addChangeListener","dependencies","includes","Breakpoints"],"sourceRoot":"../../../src","sources":["components/useMedia.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AACrG,SAASC,SAAS,EAAEC,OAAO,EAAEC,aAAa,QAAQ,OAAO;AAEzD,OAAO,MAAMC,QAAQ,GAAIC,MAAsB,IAAK;EAChD,MAAMC,gBAAgB,GAAGA,CAAA,KAAe;IACpC,MAAMC,OAAO,GAAGF,MAAM,CAACG,EAAuB;IAE9C,IAAI,CAACL,aAAa,CAACI,OAAO,CAAC,EAAE;MACzBE,OAAO,CAACC,KAAK,CAAC,sCAAsCH,OAAO,EAAE,CAAC;MAE9D,OAAO,KAAK;IAChB;IAEA,MAAMI,QAAQ,GAAGT,OAAO,CAACK,OAAO,CAAC;IAEjC,IAAI,CAACN,SAAS,CAACU,QAAQ,CAAC,EAAE;MACtBF,OAAO,CAACC,KAAK,CAAC,oEAAoEH,OAAO,EAAE,CAAC;MAE5F,OA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+0,0 @@
1
- {"version":3,"names":["useEffect","useRef","useState","isUnistylesMq","isValidMq","parseMq","useMedia","config","disposeRef","isVisible","setIsVisible","maybeMq","mq","console","error","parsedMq","minWidth","maxWidth","minHeight","maxHeight","mediaQuery","undefined","filter","Boolean","join","media","window","matchMedia","handler","event","matches","addEventListener","current","removeEventListener"],"sourceRoot":"../../../src","sources":["components/useMedia.web.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,aAAa,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAEzD,OAAO,MAAMC,QAAQ,GAAIC,MAAsB,IAAK;EAChD,MAAMC,UAAU,GAAGP,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;EACnC,MAAM,CAACQ,SAAS,EAAEC,YAAY,CAAC,GAAGR,QAAQ,CAAC,MAAM;IAC7C,MAAMS,OAAO,GAAGJ,MAAM,CAACK,EAAuB;IAE9C,IAAI,CAACT,aAAa,CAACQ,OAAO,CAAC,EAAE;MACzBE,OAAO,CAACC,KAAK,CAAC,sCAAsCH,OAAO,EAAE,CAAC;MAE9D,OAAO,KAAK;IAChB;IAEA,MAAMI,QAAQ,GAAGV,OAAO,CAACM,OAAO,CAAC;IAEjC,IAAI,CAACP,SAAS,CAACW,QAAQ,CAAC,EAAE;MACtBF,OAAO,CAACC,KAAK,CAAC,oEAAoEH,OAAO,EAAE,CAAC;MAE5F,OAAO,KAAK;IAChB;IAEA,MAAM;MAAEK,QAAQ;MAAEC,QAAQ;MAAEC,SAAS;MAAEC;IAAU,CAAC,GAAGJ,QAAQ;IAE7D,MAAMK,UAAU,GAAG,CACfJ,QAAQ,KAAKK,SAAS,GAAG,eAAeL,QAAQ,KAAK,GAAGK,SAAS,EACjEJ,QAAQ,KAAKI,SAAS,GAAG,eAAeJ,QAAQ,KAAK,GAAGI,SAAS,EACjEH,SAAS,KAAKG,SAAS,GAAG,gBAAgBH,SAAS,KAAK,GAAGG,SAAS,EACpEF,SAAS,KAAKE,SAAS,GAAG,gBAAgBF,SAAS,KAAK,GAAGE,SAAS,CACvE,CAACC,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;IAE/B,MAAMC,KAAK,GAAGC,MAAM,CAACC,UAAU,CAACP,UAAU,CAAC;IAC3C,MAAMQ,OAAO,GAAIC,KAA0B,IAAKnB,YAAY,CAACmB,KAAK,CAACC,OAAO,CAAC;IAE3EL,KAAK,CAACM,gBAAgB,CAAC,QAAQ,EAAEH,OAAO,CAAC;IACzCpB,UAAU,CAACwB,OAAO,GAAG,MAAMP,KAAK,CAACQ,mBAAmB,CAAC,QAAQ,EAAEL,OAAO,CAAC;IAEvE,OAAOH,KAAK,CAACK,OAAO;EACxB,CAAC,CAAC;;EAEF;EACA9B,SAAS,CAAC,MAAM,MAAMQ,UAAU,CAACwB,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC;EAE/C,OAAO;IACHvB;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../../src/components/useMedia.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2D9C,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMedia.web.d.ts","sourceRoot":"","sources":["../../../../src/components/useMedia.web.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2C9C,CAAA"}
File without changes
File without changes
File without changes
File without changes