@getuserfeedback/react-native 3.0.41 → 3.0.42

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.
@@ -24,11 +24,14 @@ export declare function toProviderWidgetHostStyle({ isVisible, webViewStyle, }:
24
24
  isVisible: boolean;
25
25
  webViewStyle: unknown;
26
26
  }): unknown;
27
- export declare function toProviderWidgetSheetStyle(input: {
27
+ export declare function toProviderWidgetSheetSurfaceStyles(input: {
28
28
  frameAppearance?: WidgetFrameAppearance;
29
29
  isVisible: boolean;
30
30
  sheetHostLayoutUpdate: WidgetLayoutComparableSizeUpdate | undefined;
31
- }): unknown;
31
+ }): {
32
+ contentStyle: unknown;
33
+ sheetStyle: unknown;
34
+ };
32
35
  export declare function ProviderWidgetHostOverlay({ children, frameAppearance, isVisible, nativeView, onRequestDismiss, sheetHostLayoutUpdate, }: {
33
36
  children?: ReactNode;
34
37
  frameAppearance?: WidgetFrameAppearance;
@@ -24,23 +24,29 @@ const WIDGET_SHEET_BACKDROP_STYLE = {
24
24
  right: 0,
25
25
  top: 0,
26
26
  };
27
- const WIDGET_SHEET_BASE_STYLE = {
27
+ const WIDGET_SHEET_LAYOUT_STYLE = {
28
28
  backgroundColor: "#ffffff",
29
29
  bottom: 0,
30
30
  left: 0,
31
- overflow: "hidden",
32
31
  position: "absolute",
33
32
  right: 0,
34
33
  };
35
34
  const WIDGET_SHEET_FRAME_STYLE = {
36
- borderTopLeftRadius: 24,
37
- borderTopRightRadius: 24,
38
35
  shadowColor: "#000000",
39
36
  shadowOffset: { height: -4, width: 0 },
40
37
  shadowOpacity: 0.16,
41
38
  shadowRadius: 18,
42
39
  elevation: 18,
43
40
  };
41
+ const WIDGET_SHEET_CONTENT_BASE_STYLE = {
42
+ backgroundColor: "#ffffff",
43
+ flex: 1,
44
+ overflow: "hidden",
45
+ };
46
+ const WIDGET_SHEET_RADIUS_STYLE = {
47
+ borderTopLeftRadius: 24,
48
+ borderTopRightRadius: 24,
49
+ };
44
50
  const WIDGET_SHEET_DRAG_HANDLE_TOUCH_STYLE = {
45
51
  alignItems: "center",
46
52
  elevation: 19,
@@ -192,13 +198,16 @@ export function toProviderWidgetHostStyle({ isVisible, webViewStyle, }) {
192
198
  ? [visiblePresentationStyle, VISIBLE_WIDGET_HOST_STYLE]
193
199
  : VISIBLE_WIDGET_HOST_STYLE;
194
200
  }
195
- export function toProviderWidgetSheetStyle(input) {
201
+ export function toProviderWidgetSheetSurfaceStyles(input) {
196
202
  var _a, _b;
197
203
  const sheetHostViewport = (_a = input.sheetHostLayoutUpdate) === null || _a === void 0 ? void 0 : _a.size;
198
- return input.isVisible && sheetHostViewport !== undefined
199
- ? Object.assign(Object.assign(Object.assign({}, WIDGET_SHEET_BASE_STYLE), (((_b = input.frameAppearance) === null || _b === void 0 ? void 0 : _b.kind) === "none"
200
- ? {}
201
- : WIDGET_SHEET_FRAME_STYLE)), { height: sheetHostViewport.height }) : HIDDEN_WIDGET_HOST_STYLE;
204
+ const hasFrame = ((_b = input.frameAppearance) === null || _b === void 0 ? void 0 : _b.kind) !== "none";
205
+ return {
206
+ contentStyle: Object.assign(Object.assign({}, WIDGET_SHEET_CONTENT_BASE_STYLE), (hasFrame ? WIDGET_SHEET_RADIUS_STYLE : {})),
207
+ sheetStyle: input.isVisible && sheetHostViewport !== undefined
208
+ ? Object.assign(Object.assign(Object.assign({}, WIDGET_SHEET_LAYOUT_STYLE), (hasFrame
209
+ ? Object.assign(Object.assign({}, WIDGET_SHEET_RADIUS_STYLE), WIDGET_SHEET_FRAME_STYLE) : {})), { height: sheetHostViewport.height }) : HIDDEN_WIDGET_HOST_STYLE,
210
+ };
202
211
  }
203
212
  function useProviderWidgetSheetPresentation(input) {
204
213
  var _a, _b, _c, _d;
@@ -209,11 +218,6 @@ function useProviderWidgetSheetPresentation(input) {
209
218
  const animatedSheetView = useMemo(() => animationRuntime
210
219
  ? animationRuntime.Animated.createAnimatedComponent(input.nativeView)
211
220
  : input.nativeView, [animationRuntime, input.nativeView]);
212
- const staticStyle = toProviderWidgetSheetStyle({
213
- frameAppearance: input.frameAppearance,
214
- isVisible: input.isVisible,
215
- sheetHostLayoutUpdate: input.sheetHostLayoutUpdate,
216
- });
217
221
  const sheetHostViewport = (_a = input.sheetHostLayoutUpdate) === null || _a === void 0 ? void 0 : _a.size;
218
222
  const height = sheetHostViewport === null || sheetHostViewport === void 0 ? void 0 : sheetHostViewport.height;
219
223
  const shouldUseAnimatedStyle = animationRuntime !== null &&
@@ -274,12 +278,12 @@ function useProviderWidgetSheetPresentation(input) {
274
278
  if (!shouldUseAnimatedStyle) {
275
279
  return {
276
280
  sheetView,
277
- style: staticStyle,
281
+ style: input.staticStyle,
278
282
  };
279
283
  }
280
284
  return {
281
285
  sheetView,
282
- style: Object.assign(Object.assign({}, staticStyle), { height: (_d = animatedHeightRef.current) !== null && _d !== void 0 ? _d : height }),
286
+ style: Object.assign(Object.assign({}, input.staticStyle), { height: (_d = animatedHeightRef.current) !== null && _d !== void 0 ? _d : height }),
283
287
  };
284
288
  }
285
289
  export function ProviderWidgetHostOverlay({ children, frameAppearance, isVisible, nativeView, onRequestDismiss, sheetHostLayoutUpdate, }) {
@@ -336,11 +340,16 @@ export function ProviderWidgetHostOverlay({ children, frameAppearance, isVisible
336
340
  const sheetHostViewport = sheetHostLayoutUpdate === null || sheetHostLayoutUpdate === void 0 ? void 0 : sheetHostLayoutUpdate.size;
337
341
  const isSheetVisible = isVisible && sheetHostViewport !== undefined;
338
342
  const pointerEvents = isSheetVisible ? "auto" : "none";
339
- const sheetPresentation = useProviderWidgetSheetPresentation({
343
+ const surfaceStyles = toProviderWidgetSheetSurfaceStyles({
340
344
  frameAppearance,
345
+ isVisible,
346
+ sheetHostLayoutUpdate,
347
+ });
348
+ const sheetPresentation = useProviderWidgetSheetPresentation({
341
349
  isVisible,
342
350
  nativeView,
343
351
  sheetHostLayoutUpdate,
352
+ staticStyle: surfaceStyles.sheetStyle,
344
353
  });
345
354
  return createElement(nativeView, {
346
355
  pointerEvents,
@@ -358,10 +367,14 @@ export function ProviderWidgetHostOverlay({ children, frameAppearance, isVisible
358
367
  pointerEvents,
359
368
  style: sheetPresentation.style,
360
369
  testID: "gx-widget-host-sheet",
370
+ }, createElement(nativeView, {
371
+ pointerEvents,
372
+ style: surfaceStyles.contentStyle,
373
+ testID: "gx-widget-host-sheet-content",
361
374
  }, children, isSheetVisible
362
375
  ? createElement(nativeView, Object.assign(Object.assign({}, dragHandleGestureProps), { style: WIDGET_SHEET_DRAG_HANDLE_TOUCH_STYLE, testID: "gx-widget-host-drag-handle" }), createElement(nativeView, {
363
376
  style: WIDGET_SHEET_DRAG_HANDLE_INDICATOR_STYLE,
364
377
  testID: "gx-widget-host-drag-handle-indicator",
365
378
  }))
366
- : null));
379
+ : null)));
367
380
  }
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@ const reactNativeSdkVersion = typeof __GX_REACT_NATIVE_SDK_VERSION__ === "string
3
3
  : "";
4
4
  // Build scripts patch this fallback to the package version for published artifacts.
5
5
  // Source-linked workspace usage keeps the local fallback.
6
- export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.41";
6
+ export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.42";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getuserfeedback/react-native",
3
- "version": "3.0.41",
3
+ "version": "3.0.42",
4
4
  "description": "getuserfeedback React Native SDK",
5
5
  "keywords": [
6
6
  "getuserfeedback",
@@ -44,8 +44,8 @@
44
44
  "lint": "biome check ."
45
45
  },
46
46
  "dependencies": {
47
- "@getuserfeedback/protocol": "^3.11.1",
48
- "@getuserfeedback/sdk": "^0.10.9",
47
+ "@getuserfeedback/protocol": "^3.12.0",
48
+ "@getuserfeedback/sdk": "^0.10.10",
49
49
  "robot3": "^1.2.0"
50
50
  },
51
51
  "peerDependencies": {