@getuserfeedback/react-native 2.0.3 → 2.0.4
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/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { toCommandFlowId, toCommandSettlementError, toRetryWithoutFlowHandle, }
|
|
|
17
17
|
import { useProviderCommandTransport } from "./provider-command-transport.js";
|
|
18
18
|
import { clearProviderFlowHandleCache, createProviderFlowHandleCache, deleteCachedProviderFlowHandleId, deleteCachedProviderFlowId, getCachedProviderFlowHandleId, snapshotProviderFlowCommand, writeSettledProviderFlowHandleId, } from "./provider-flow-handle-cache.js";
|
|
19
19
|
import { createProviderWidgetHostLifecycleController, HIDDEN_PROVIDER_WIDGET_HOST_VISIBILITY, } from "./provider-widget-host-lifecycle.js";
|
|
20
|
-
import { ProviderWidgetHostOverlay, toProviderWidgetHostStyle,
|
|
20
|
+
import { ProviderWidgetHostOverlay, toProviderWidgetHostStyle, toProviderWidgetSheetHostLayoutUpdate, } from "./provider-widget-host-overlay.js";
|
|
21
21
|
import { REACT_NATIVE_SDK_VERSION } from "./version.js";
|
|
22
22
|
import { WidgetHost, } from "./widget-host.js";
|
|
23
23
|
export { REACT_NATIVE_SDK_VERSION } from "./version.js";
|
|
@@ -480,10 +480,10 @@ export function GetUserFeedbackProvider({ autoInit = true, children, commandTime
|
|
|
480
480
|
startupOptionsKey,
|
|
481
481
|
]);
|
|
482
482
|
const providerHostViewport = hostViewport !== null && hostViewport !== void 0 ? hostViewport : resolvedHostViewport;
|
|
483
|
-
const
|
|
483
|
+
const sheetHostLayoutUpdate = toProviderWidgetSheetHostLayoutUpdate(providerHostViewport, {
|
|
484
484
|
height: widgetHostVisibility.flowHeight,
|
|
485
485
|
});
|
|
486
|
-
const isWidgetHostVisible = resolveIsWidgetHostVisible(widgetHostVisibility,
|
|
486
|
+
const isWidgetHostVisible = resolveIsWidgetHostVisible(widgetHostVisibility, sheetHostLayoutUpdate !== undefined);
|
|
487
487
|
const widgetHostViewport = providerHostViewport;
|
|
488
488
|
const composedWebViewStyle = toProviderWidgetHostStyle({
|
|
489
489
|
isVisible: isWidgetHostVisible,
|
|
@@ -512,7 +512,7 @@ export function GetUserFeedbackProvider({ autoInit = true, children, commandTime
|
|
|
512
512
|
isVisible: isWidgetHostVisible,
|
|
513
513
|
nativeView: NativeView,
|
|
514
514
|
onRequestDismiss: handleWidgetHostDismiss,
|
|
515
|
-
|
|
515
|
+
sheetHostLayoutUpdate,
|
|
516
516
|
}, widgetHost));
|
|
517
517
|
}
|
|
518
518
|
export function useGetUserFeedbackNative() {
|
|
@@ -12,11 +12,11 @@ export declare function toProviderWidgetHostStyle({ isVisible, webViewStyle, }:
|
|
|
12
12
|
isVisible: boolean;
|
|
13
13
|
webViewStyle: unknown;
|
|
14
14
|
}): unknown;
|
|
15
|
-
export declare function ProviderWidgetHostOverlay({ children, isVisible, nativeView, onRequestDismiss,
|
|
15
|
+
export declare function ProviderWidgetHostOverlay({ children, isVisible, nativeView, onRequestDismiss, sheetHostLayoutUpdate, }: {
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
isVisible: boolean;
|
|
18
18
|
nativeView: NativeViewComponent;
|
|
19
19
|
onRequestDismiss: () => void;
|
|
20
|
-
|
|
20
|
+
sheetHostLayoutUpdate: WidgetLayoutSizeUpdate | undefined;
|
|
21
21
|
}): ReactElement;
|
|
22
22
|
export {};
|
|
@@ -161,7 +161,7 @@ export function toProviderWidgetHostStyle({ isVisible, webViewStyle, }) {
|
|
|
161
161
|
? [visiblePresentationStyle, VISIBLE_WIDGET_HOST_STYLE]
|
|
162
162
|
: VISIBLE_WIDGET_HOST_STYLE;
|
|
163
163
|
}
|
|
164
|
-
export function ProviderWidgetHostOverlay({ children, isVisible, nativeView, onRequestDismiss,
|
|
164
|
+
export function ProviderWidgetHostOverlay({ children, isVisible, nativeView, onRequestDismiss, sheetHostLayoutUpdate, }) {
|
|
165
165
|
const dragStartYRef = useRef(undefined);
|
|
166
166
|
const handleDragGrant = useCallback((event) => {
|
|
167
167
|
dragStartYRef.current = toResponderPageY(event);
|
|
@@ -212,6 +212,7 @@ export function ProviderWidgetHostOverlay({ children, isVisible, nativeView, onR
|
|
|
212
212
|
onTouchStart: handleDragGrant,
|
|
213
213
|
};
|
|
214
214
|
}, [handleDragGrant, handleDragRelease, onRequestDismiss]);
|
|
215
|
+
const sheetHostViewport = sheetHostLayoutUpdate === null || sheetHostLayoutUpdate === void 0 ? void 0 : sheetHostLayoutUpdate.size;
|
|
215
216
|
const widgetSheetStyle = sheetHostViewport
|
|
216
217
|
? Object.assign(Object.assign({}, WIDGET_SHEET_STYLE), { height: sheetHostViewport.height }) : HIDDEN_WIDGET_HOST_STYLE;
|
|
217
218
|
const isSheetVisible = isVisible && sheetHostViewport !== undefined;
|
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 : "2.0.
|
|
6
|
+
export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "2.0.4";
|