@proulr/sdui-components 0.1.46 → 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.46",
3
+ "version": "0.1.48",
4
4
  "type": "module",
5
5
  "main": "./src/renderer/index.ts",
6
6
  "types": "./src/renderer/index.ts",
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@proulr/sdui-contract": "^0.1.10",
40
+ "@proulr/sdui-contract": "^0.1.12",
41
41
  "react-native-qrcode-svg": "^6.3.21"
42
42
  },
43
43
  "peerDependencies": {
@@ -121,6 +121,35 @@ describe('compileBdcToWire', () => {
121
121
  expect(wire.meta).toMatchObject({ cache_ttl_ms: 30_000, offline_policy: 'cache_only' });
122
122
  });
123
123
 
124
+ it('passes meta.chrome through to wire unchanged (snake_case)', () => {
125
+ const wire = compileBdcToWire(
126
+ screen(
127
+ {
128
+ id: 'discover.home',
129
+ meta: {
130
+ cache_ttl_ms: 45_000,
131
+ chrome: {
132
+ full_bleed_scroll: true,
133
+ header_slot: true,
134
+ pull_refresh: true,
135
+ surface: 'discover',
136
+ },
137
+ },
138
+ },
139
+ [],
140
+ ),
141
+ );
142
+ expect(wire.meta).toMatchObject({
143
+ cache_ttl_ms: 45_000,
144
+ chrome: {
145
+ full_bleed_scroll: true,
146
+ header_slot: true,
147
+ pull_refresh: true,
148
+ surface: 'discover',
149
+ },
150
+ });
151
+ });
152
+
124
153
  it('accepts headerSlot arrays and maps header camelCase', () => {
125
154
  const wire = compileBdcToWire(
126
155
  screen(
@@ -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
  },