@getuserfeedback/react-native 1.3.24 → 2.0.0
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.
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { type WidgetLayoutSizeUpdate } from "@getuserfeedback/protocol/host";
|
|
1
2
|
import { type ComponentType, type ReactElement, type ReactNode } from "react";
|
|
2
3
|
import type { WidgetHostProps } from "./widget-host.js";
|
|
3
4
|
type NativeViewComponent = ComponentType<Record<string, unknown>>;
|
|
4
5
|
export declare function toProviderWidgetSheetHostViewport(viewport: WidgetHostProps["hostViewport"], flowSize?: {
|
|
5
6
|
height?: number;
|
|
6
7
|
}): WidgetHostProps["hostViewport"];
|
|
8
|
+
export declare function toProviderWidgetSheetHostLayoutUpdate(viewport: WidgetHostProps["hostViewport"], flowSize?: {
|
|
9
|
+
height?: number;
|
|
10
|
+
}): WidgetLayoutSizeUpdate | undefined;
|
|
7
11
|
export declare function toProviderWidgetHostStyle({ isVisible, webViewStyle, }: {
|
|
8
12
|
isVisible: boolean;
|
|
9
13
|
webViewStyle: unknown;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toInstantWidgetLayoutSizeUpdate, } from "@getuserfeedback/protocol/host";
|
|
1
2
|
import { createElement, useCallback, useMemo, useRef, } from "react";
|
|
2
3
|
const HIDDEN_WIDGET_HOST_STYLE = {
|
|
3
4
|
bottom: 0,
|
|
@@ -109,6 +110,10 @@ function toResponderPageY(event) {
|
|
|
109
110
|
: undefined;
|
|
110
111
|
}
|
|
111
112
|
export function toProviderWidgetSheetHostViewport(viewport, flowSize) {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = toProviderWidgetSheetHostLayoutUpdate(viewport, flowSize)) === null || _a === void 0 ? void 0 : _a.size;
|
|
115
|
+
}
|
|
116
|
+
export function toProviderWidgetSheetHostLayoutUpdate(viewport, flowSize) {
|
|
112
117
|
if (!viewport) {
|
|
113
118
|
return undefined;
|
|
114
119
|
}
|
|
@@ -117,12 +122,12 @@ export function toProviderWidgetSheetHostViewport(viewport, flowSize) {
|
|
|
117
122
|
flowSize.height > 0
|
|
118
123
|
? flowSize.height
|
|
119
124
|
: undefined;
|
|
120
|
-
return {
|
|
125
|
+
return toInstantWidgetLayoutSizeUpdate({
|
|
121
126
|
width: viewport.width,
|
|
122
127
|
height: Math.min(viewport.height, measuredHeight === undefined
|
|
123
128
|
? LOADER_FLOATING_CONTAINER_MIN_HEIGHT
|
|
124
129
|
: Math.max(LOADER_FLOATING_CONTAINER_MIN_HEIGHT, Math.ceil(measuredHeight))),
|
|
125
|
-
};
|
|
130
|
+
});
|
|
126
131
|
}
|
|
127
132
|
function toVisibleWidgetHostPresentationStyle(style) {
|
|
128
133
|
if (style === undefined || style === null) {
|
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 : "
|
|
6
|
+
export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "2.0.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "getuserfeedback React Native SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"lint": "ultracite check ."
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@getuserfeedback/protocol": "^3.0.
|
|
48
|
-
"@getuserfeedback/sdk": "^0.8.
|
|
47
|
+
"@getuserfeedback/protocol": "^3.0.6",
|
|
48
|
+
"@getuserfeedback/sdk": "^0.8.8",
|
|
49
49
|
"robot3": "^1.2.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
@@ -53,14 +53,6 @@
|
|
|
53
53
|
"react-native": ">=0.73.0",
|
|
54
54
|
"react-native-webview": ">=13.0.0"
|
|
55
55
|
},
|
|
56
|
-
"peerDependenciesMeta": {
|
|
57
|
-
"react-native": {
|
|
58
|
-
"optional": true
|
|
59
|
-
},
|
|
60
|
-
"react-native-webview": {
|
|
61
|
-
"optional": true
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
56
|
"devDependencies": {
|
|
65
57
|
"typescript": "^5.8.3"
|
|
66
58
|
}
|