expo-blur 13.0.0 → 13.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 13.0.2 — 2024-05-01
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 13.0.1 — 2024-04-23
18
+
19
+ _This version does not introduce any user-facing changes._
20
+
13
21
  ## 13.0.0 — 2024-04-18
14
22
 
15
23
  ### 🎉 New features
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '13.0.0'
4
+ version = '13.0.2'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -14,7 +14,7 @@ android {
14
14
  namespace "expo.modules.blur"
15
15
  defaultConfig {
16
16
  versionCode 1
17
- versionName "13.0.0"
17
+ versionName "13.0.2"
18
18
  }
19
19
  }
20
20
 
@@ -7,7 +7,6 @@ import android.os.Build
7
7
  import android.view.ViewGroup
8
8
  import eightbitlab.com.blurview.BlurView
9
9
  import eightbitlab.com.blurview.RenderEffectBlur
10
- import eightbitlab.com.blurview.RenderScriptBlur
11
10
  import expo.modules.blur.enums.BlurMethod
12
11
  import expo.modules.blur.enums.TintStyle
13
12
  import expo.modules.kotlin.AppContext
@@ -25,12 +24,13 @@ class ExpoBlurView(context: Context, appContext: AppContext) : ExpoView(context,
25
24
  it.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
26
25
 
27
26
  val decorView = (appContext.currentActivity ?: throw Exceptions.MissingActivity()).window?.decorView
28
- val rootView = decorView?.findViewById(android.R.id.content) as ViewGroup
27
+ val rootView = decorView?.findViewById<ViewGroup>(android.R.id.content) ?: throw Exceptions.MissingRootView()
29
28
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
30
29
  it.setupWith(rootView, RenderEffectBlur())
31
30
  .setFrameClearDrawable(decorView.background)
32
31
  } else {
33
- it.setupWith(rootView, RenderScriptBlur(context))
32
+ @Suppress("DEPRECATION")
33
+ it.setupWith(rootView, eightbitlab.com.blurview.RenderScriptBlur(context))
34
34
  .setFrameClearDrawable(decorView.background)
35
35
  }
36
36
  addView(it)
@@ -1 +1 @@
1
- {"version":3,"file":"BlurView.web.d.ts","sourceRoot":"","sources":["../src/BlurView.web.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,QAAA,MAAM,QAAQ;;;;;;oBAAgC,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI;GAyC3E,CAAC;AAcF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"BlurView.web.d.ts","sourceRoot":"","sources":["../src/BlurView.web.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,QAAA,MAAM,QAAQ;;;;;;4BAAwC,aAAa,KAAK,IAAI;GAyC3E,CAAC;AAcF,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BlurView.web.js","sourceRoot":"","sources":["../src/BlurView.web.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,YAAY,CAAC;AACb,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,MAAM,QAAQ,GAAG,UAAU,CACzB,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC7D,MAAM,WAAW,GAAG,MAAM,CA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AAC,WAAW,CAAC,EACjB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAI,GACgD;IACpD,MAAM,IAAI,GAAG,uBAAuB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC;IACxE,OAAO;QACL,eAAe,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC;QACnE,cAAc,EAAE,IAAI;QACpB,oBAAoB,EAAE,IAAI;KAC3B,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n'use client';\nimport { forwardRef, useImperativeHandle, useRef } from 'react';\nimport { View } from 'react-native';\n\nimport { BlurViewProps } from './BlurView.types';\nimport getBackgroundColor from './getBackgroundColor';\n\nconst BlurView = forwardRef<{ setNativeProps: (props: BlurViewProps) => void }, BlurViewProps>(\n ({ tint = 'default', intensity = 50, style, ...props }, ref) => {\n const blurViewRef = useRef<HTMLDivElement>(null);\n const blurStyle = getBlurStyle({ tint, intensity });\n\n useImperativeHandle(\n ref,\n () => ({\n setNativeProps: (nativeProps: BlurViewProps) => {\n if (!blurViewRef.current?.style) {\n return;\n }\n\n // @ts-expect-error: `style.intensity` is not defined in the types\n const nextIntensity = nativeProps.style?.intensity ?? intensity;\n const blurStyle = getBlurStyle({ intensity: nextIntensity, tint: tint ?? 'default' });\n if (nativeProps.style) {\n for (const key in nativeProps.style) {\n if (key !== 'intensity') {\n blurViewRef.current.style[key] = nativeProps.style[key];\n }\n }\n }\n\n blurViewRef.current.style.backgroundColor = blurStyle.backgroundColor;\n blurViewRef.current.style.backdropFilter = blurStyle.backdropFilter;\n blurViewRef.current.style['webkitBackdropFilter'] = blurStyle.WebkitBackdropFilter;\n },\n }),\n [intensity, tint]\n );\n\n return (\n <View\n {...props}\n style={[style, blurStyle]}\n /** @ts-expect-error: mismatch in ref type to support manually setting style props. */\n ref={blurViewRef}\n />\n );\n }\n);\n\nfunction getBlurStyle({\n intensity,\n tint,\n}: Required<Pick<BlurViewProps, 'intensity' | 'tint'>>): Record<string, string> {\n const blur = `saturate(180%) blur(${Math.min(intensity, 100) * 0.2}px)`;\n return {\n backgroundColor: getBackgroundColor(Math.min(intensity, 100), tint),\n backdropFilter: blur,\n WebkitBackdropFilter: blur,\n };\n}\n\nexport default BlurView;\n"]}
1
+ {"version":3,"file":"BlurView.web.js","sourceRoot":"","sources":["../src/BlurView.web.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,YAAY,CAAC;AACb,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,MAAM,QAAQ,GAAG,UAAU,CACzB,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC7D,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;IAEpD,mBAAmB,CACjB,GAAG,EACH,GAAG,EAAE,CAAC,CAAC;QACL,cAAc,EAAE,CAAC,WAA0B,EAAE,EAAE;YAC7C,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE;gBAC/B,OAAO;aACR;YAED,kEAAkE;YAClE,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,EAAE,SAAS,IAAI,SAAS,CAAC;YAChE,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC;YACtF,IAAI,WAAW,CAAC,KAAK,EAAE;gBACrB,KAAK,MAAM,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;oBACnC,IAAI,GAAG,KAAK,WAAW,EAAE;wBACvB,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACzD;iBACF;aACF;YAED,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;YACtE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC;YACpE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAAC,oBAAoB,CAAC;QACrF,CAAC;KACF,CAAC,EACF,CAAC,SAAS,EAAE,IAAI,CAAC,CAClB,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC1B,sFAAsF;IACtF,GAAG,CAAC,CAAC,WAAW,CAAC,EACjB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAI,GACgD;IACpD,MAAM,IAAI,GAAG,uBAAuB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC;IACxE,OAAO;QACL,eAAe,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC;QACnE,cAAc,EAAE,IAAI;QACpB,oBAAoB,EAAE,IAAI;KAC3B,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n'use client';\nimport { forwardRef, useImperativeHandle, useRef } from 'react';\nimport { View } from 'react-native';\n\nimport { BlurViewProps } from './BlurView.types';\nimport getBackgroundColor from './getBackgroundColor';\n\nconst BlurView = forwardRef<{ setNativeProps: (props: BlurViewProps) => void }, BlurViewProps>(\n ({ tint = 'default', intensity = 50, style, ...props }, ref) => {\n const blurViewRef = useRef<HTMLDivElement>(null);\n const blurStyle = getBlurStyle({ tint, intensity });\n\n useImperativeHandle(\n ref,\n () => ({\n setNativeProps: (nativeProps: BlurViewProps) => {\n if (!blurViewRef.current?.style) {\n return;\n }\n\n // @ts-expect-error: `style.intensity` is not defined in the types\n const nextIntensity = nativeProps.style?.intensity ?? intensity;\n const blurStyle = getBlurStyle({ intensity: nextIntensity, tint: tint ?? 'default' });\n if (nativeProps.style) {\n for (const key in nativeProps.style) {\n if (key !== 'intensity') {\n blurViewRef.current.style[key] = nativeProps.style[key];\n }\n }\n }\n\n blurViewRef.current.style.backgroundColor = blurStyle.backgroundColor;\n blurViewRef.current.style.backdropFilter = blurStyle.backdropFilter;\n blurViewRef.current.style['webkitBackdropFilter'] = blurStyle.WebkitBackdropFilter;\n },\n }),\n [intensity, tint]\n );\n\n return (\n <View\n {...props}\n style={[style, blurStyle]}\n /** @ts-expect-error: mismatch in ref type to support manually setting style props. */\n ref={blurViewRef}\n />\n );\n }\n);\n\nfunction getBlurStyle({\n intensity,\n tint,\n}: Required<Pick<BlurViewProps, 'intensity' | 'tint'>>): Record<string, string> {\n const blur = `saturate(180%) blur(${Math.min(intensity, 100) * 0.2}px)`;\n return {\n backgroundColor: getBackgroundColor(Math.min(intensity, 100), tint),\n backdropFilter: blur,\n WebkitBackdropFilter: blur,\n };\n}\n\nexport default BlurView;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getBackgroundColor.js","sourceRoot":"","sources":["../src/getBackgroundColor.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAiB,EAAE,IAAc;IAC1E,MAAM,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC;IAChC,QAAQ,IAAI,EAAE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;AACH,CAAC","sourcesContent":["import { BlurTint } from './BlurView.types';\n\nexport default function getBackgroundColor(intensity: number, tint: BlurTint): string {\n const opacity = intensity / 100;\n switch (tint) {\n // From Apple iOS 14 Sketch Kit - https://developer.apple.com/design/resources/\n // From Apple iOS 14 Sketch Kit - https://developer.apple.com/design/resources/\n case 'dark':\n case 'systemMaterialDark':\n return `rgba(25,25,25,${opacity * 0.78})`;\n case 'light':\n case 'extraLight':\n case 'systemMaterialLight':\n case 'systemUltraThinMaterialLight':\n case 'systemThickMaterialLight':\n return `rgba(249,249,249,${opacity * 0.78})`;\n\n case 'default':\n case 'prominent':\n case 'systemMaterial':\n return `rgba(255,255,255,${opacity * 0.3})`;\n case 'regular':\n return `rgba(179,179,179,${opacity * 0.82})`;\n case 'systemThinMaterial':\n return `rgba(199,199,199,${opacity * 0.97})`;\n case 'systemChromeMaterial':\n return `rgba(255,255,255,${opacity * 0.75})`;\n case 'systemChromeMaterialLight':\n return `rgba(255,255,255,${opacity * 0.97})`;\n case 'systemUltraThinMaterial':\n return `rgba(191,191,191,${opacity * 0.44})`;\n case 'systemThickMaterial':\n return `rgba(191,191,191,${opacity * 0.44})`;\n case 'systemThickMaterialDark':\n return `rgba(37,37,37,${opacity * 0.9})`;\n case 'systemThinMaterialDark':\n return `rgba(37,37,37,${opacity * 0.7})`;\n case 'systemUltraThinMaterialDark':\n return `rgba(37,37,37,${opacity * 0.55})`;\n case 'systemChromeMaterialDark':\n return `rgba(0,0,0,${opacity * 0.75})`;\n case 'systemThinMaterialLight':\n return `rgba(199,199,199,${opacity * 0.78})`;\n }\n}\n"]}
1
+ {"version":3,"file":"getBackgroundColor.js","sourceRoot":"","sources":["../src/getBackgroundColor.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAiB,EAAE,IAAc;IAC1E,MAAM,OAAO,GAAG,SAAS,GAAG,GAAG,CAAC;IAChC,QAAQ,IAAI,EAAE;QACZ,+EAA+E;QAC/E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'./BlurView.types';\n\nexport default function getBackgroundColor(intensity: number, tint: BlurTint): string {\n const opacity = intensity / 100;\n switch (tint) {\n // From Apple iOS 14 Sketch Kit - https://developer.apple.com/design/resources/\n // From Apple iOS 14 Sketch Kit - https://developer.apple.com/design/resources/\n case 'dark':\n case 'systemMaterialDark':\n return `rgba(25,25,25,${opacity * 0.78})`;\n case 'light':\n case 'extraLight':\n case 'systemMaterialLight':\n case 'systemUltraThinMaterialLight':\n case 'systemThickMaterialLight':\n return `rgba(249,249,249,${opacity * 0.78})`;\n\n case 'default':\n case 'prominent':\n case 'systemMaterial':\n return `rgba(255,255,255,${opacity * 0.3})`;\n case 'regular':\n return `rgba(179,179,179,${opacity * 0.82})`;\n case 'systemThinMaterial':\n return `rgba(199,199,199,${opacity * 0.97})`;\n case 'systemChromeMaterial':\n return `rgba(255,255,255,${opacity * 0.75})`;\n case 'systemChromeMaterialLight':\n return `rgba(255,255,255,${opacity * 0.97})`;\n case 'systemUltraThinMaterial':\n return `rgba(191,191,191,${opacity * 0.44})`;\n case 'systemThickMaterial':\n return `rgba(191,191,191,${opacity * 0.44})`;\n case 'systemThickMaterialDark':\n return `rgba(37,37,37,${opacity * 0.9})`;\n case 'systemThinMaterialDark':\n return `rgba(37,37,37,${opacity * 0.7})`;\n case 'systemUltraThinMaterialDark':\n return `rgba(37,37,37,${opacity * 0.55})`;\n case 'systemChromeMaterialDark':\n return `rgba(0,0,0,${opacity * 0.75})`;\n case 'systemThinMaterialLight':\n return `rgba(199,199,199,${opacity * 0.78})`;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-blur",
3
- "version": "13.0.0",
3
+ "version": "13.0.2",
4
4
  "description": "A component that renders a native blur view on iOS and falls back to a semi-transparent view on Android. A common usage of this is for navigation bars, tab bars, and modals.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -43,5 +43,5 @@
43
43
  "peerDependencies": {
44
44
  "expo": "*"
45
45
  },
46
- "gitHead": "4165b8d72e1b9a1889c2767534cc619e21468110"
46
+ "gitHead": "87bd0dfa8b784a834191195ca174a00dd30ee5b7"
47
47
  }