@proulr/sdui-components 0.1.47 → 0.1.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proulr/sdui-components",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "type": "module",
5
5
  "main": "./src/renderer/index.ts",
6
6
  "types": "./src/renderer/index.ts",
@@ -25,23 +25,34 @@ const absoluteFill: ViewStyle = {
25
25
  type ChromeGlassLayerProps = {
26
26
  style?: StyleProp<ViewStyle>;
27
27
  pointerEvents?: ViewProps['pointerEvents'];
28
+ /**
29
+ * When false, skip BlurView and keep the solid OLED pill base.
30
+ * Use on Android surfaces that animate (drawer slide) — BlurView + transform
31
+ * over image-heavy screens flashes black.
32
+ */
33
+ blurEnabled?: boolean;
28
34
  };
29
35
 
30
36
  /**
31
37
  * Camada de frost única do sistema (igual AppSideDrawer topo/base).
32
- * BlurView + `colors.chromeGlassOverlay` — sem cast cinza.
38
+ * Solid `chromePillBackground` under BlurView so failed Android blur frames
39
+ * never flash pure black. Overlay tint stays transparent (frost limpo).
33
40
  */
34
41
  export function ChromeGlassLayer({
35
42
  style,
36
43
  pointerEvents = 'none',
44
+ blurEnabled = true,
37
45
  }: ChromeGlassLayerProps) {
38
46
  return (
39
47
  <View style={[absoluteFill, style]} pointerEvents={pointerEvents}>
40
- <BlurView
41
- intensity={CHROME_GLASS_BLUR_INTENSITY}
42
- tint={CHROME_GLASS_BLUR_TINT}
43
- style={StyleSheet.absoluteFill}
44
- />
48
+ <View style={[absoluteFill, styles.solidBase]} />
49
+ {blurEnabled ? (
50
+ <BlurView
51
+ intensity={CHROME_GLASS_BLUR_INTENSITY}
52
+ tint={CHROME_GLASS_BLUR_TINT}
53
+ style={StyleSheet.absoluteFill}
54
+ />
55
+ ) : null}
45
56
  <View style={[absoluteFill, styles.tint]} />
46
57
  </View>
47
58
  );
@@ -51,21 +62,31 @@ type ChromeGlassShellProps = {
51
62
  children: ReactNode;
52
63
  style?: StyleProp<ViewStyle>;
53
64
  contentStyle?: StyleProp<ViewStyle>;
65
+ /** Forwarded to `ChromeGlassLayer` — disable during slide animations on Android. */
66
+ blurEnabled?: boolean;
54
67
  };
55
68
 
56
69
  /**
57
70
  * Pílula chrome com o mesmo glass do drawer (shell + blur + overlay).
58
71
  */
59
- export function ChromeGlassShell({ children, style, contentStyle }: ChromeGlassShellProps) {
72
+ export function ChromeGlassShell({
73
+ children,
74
+ style,
75
+ contentStyle,
76
+ blurEnabled = true,
77
+ }: ChromeGlassShellProps) {
60
78
  return (
61
79
  <View style={[chromePillStyles.shell, styles.shellTransparent, style]}>
62
- <ChromeGlassLayer />
80
+ <ChromeGlassLayer blurEnabled={blurEnabled} />
63
81
  <View style={[styles.content, contentStyle]}>{children}</View>
64
82
  </View>
65
83
  );
66
84
  }
67
85
 
68
86
  const styles = StyleSheet.create({
87
+ solidBase: {
88
+ backgroundColor: colors.chromePillBackground,
89
+ },
69
90
  tint: {
70
91
  backgroundColor: colors.chromeGlassOverlay,
71
92
  },