@getuserfeedback/react-native 2.0.8 → 2.0.10
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,10 +1,13 @@
|
|
|
1
|
-
import { type WidgetLayoutComparableSizeUpdate, type WidgetLayoutSizeUpdate, type WidgetLayoutTimedCapableTransitionPlan } from "@getuserfeedback/protocol/host";
|
|
1
|
+
import { type WidgetLayoutComparableSizeUpdate, type WidgetLayoutSizeUpdate, type WidgetLayoutTimedCapableTransitionPlan, type WidgetLayoutTransitionPolicy } from "@getuserfeedback/protocol/host";
|
|
2
2
|
import { type ComponentType, type ReactElement, type ReactNode } from "react";
|
|
3
3
|
import type { WidgetHostProps } from "./widget-host.js";
|
|
4
4
|
type NativeViewComponent = ComponentType<Record<string, unknown>>;
|
|
5
5
|
export declare function toProviderWidgetSheetHostViewport(viewport: WidgetHostProps["hostViewport"], flowSize?: {
|
|
6
6
|
height?: number;
|
|
7
7
|
}): WidgetHostProps["hostViewport"];
|
|
8
|
+
export declare function toProviderWidgetSheetHostLayoutSize(viewport: WidgetHostProps["hostViewport"], flowSize?: {
|
|
9
|
+
height?: number;
|
|
10
|
+
}): WidgetHostProps["hostViewport"];
|
|
8
11
|
export declare function toProviderWidgetSheetHostLayoutUpdate(viewport: WidgetHostProps["hostViewport"], flowSize?: {
|
|
9
12
|
height?: number;
|
|
10
13
|
}): WidgetLayoutSizeUpdate | undefined;
|
|
@@ -14,6 +17,7 @@ export declare function toProviderWidgetSheetHostLayoutPlan(input: {
|
|
|
14
17
|
};
|
|
15
18
|
nowMs: number;
|
|
16
19
|
previous?: WidgetLayoutComparableSizeUpdate;
|
|
20
|
+
transitionPolicy?: WidgetLayoutTransitionPolicy;
|
|
17
21
|
viewport: WidgetHostProps["hostViewport"];
|
|
18
22
|
}): WidgetLayoutTimedCapableTransitionPlan | undefined;
|
|
19
23
|
export declare function toProviderWidgetHostStyle({ isVisible, webViewStyle, }: {
|
|
@@ -110,10 +110,9 @@ function toResponderPageY(event) {
|
|
|
110
110
|
: undefined;
|
|
111
111
|
}
|
|
112
112
|
export function toProviderWidgetSheetHostViewport(viewport, flowSize) {
|
|
113
|
-
|
|
114
|
-
return (_a = toProviderWidgetSheetHostLayoutUpdate(viewport, flowSize)) === null || _a === void 0 ? void 0 : _a.size;
|
|
113
|
+
return toProviderWidgetSheetHostLayoutSize(viewport, flowSize);
|
|
115
114
|
}
|
|
116
|
-
export function
|
|
115
|
+
export function toProviderWidgetSheetHostLayoutSize(viewport, flowSize) {
|
|
117
116
|
if (!viewport) {
|
|
118
117
|
return undefined;
|
|
119
118
|
}
|
|
@@ -122,22 +121,27 @@ export function toProviderWidgetSheetHostLayoutUpdate(viewport, flowSize) {
|
|
|
122
121
|
flowSize.height > 0
|
|
123
122
|
? flowSize.height
|
|
124
123
|
: undefined;
|
|
125
|
-
return
|
|
124
|
+
return {
|
|
126
125
|
width: viewport.width,
|
|
127
126
|
height: Math.min(viewport.height, measuredHeight === undefined
|
|
128
127
|
? LOADER_FLOATING_CONTAINER_MIN_HEIGHT
|
|
129
128
|
: Math.max(LOADER_FLOATING_CONTAINER_MIN_HEIGHT, Math.ceil(measuredHeight))),
|
|
130
|
-
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export function toProviderWidgetSheetHostLayoutUpdate(viewport, flowSize) {
|
|
132
|
+
const size = toProviderWidgetSheetHostLayoutSize(viewport, flowSize);
|
|
133
|
+
return size === undefined ? undefined : toInstantWidgetLayoutSizeUpdate(size);
|
|
131
134
|
}
|
|
132
135
|
export function toProviderWidgetSheetHostLayoutPlan(input) {
|
|
133
|
-
const
|
|
134
|
-
if (!
|
|
136
|
+
const size = toProviderWidgetSheetHostLayoutSize(input.viewport, input.flowSize);
|
|
137
|
+
if (!size) {
|
|
135
138
|
return undefined;
|
|
136
139
|
}
|
|
137
140
|
return planWidgetLayoutTransition({
|
|
138
141
|
previous: input.previous,
|
|
139
|
-
|
|
142
|
+
size,
|
|
140
143
|
nowMs: input.nowMs,
|
|
144
|
+
transitionPolicy: input.transitionPolicy,
|
|
141
145
|
});
|
|
142
146
|
}
|
|
143
147
|
function toVisibleWidgetHostPresentationStyle(style) {
|
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.10";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/react-native",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "getuserfeedback React Native SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"typecheck": "tsc -b tsconfig.json",
|
|
42
42
|
"test": "bun test --dots",
|
|
43
43
|
"test:changed": "bun test --changed=${TEST_CHANGED_BASE:-HEAD} --pass-with-no-tests --dots",
|
|
44
|
-
"lint": "
|
|
44
|
+
"lint": "biome check ."
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@getuserfeedback/protocol": "^3.0.
|
|
48
|
-
"@getuserfeedback/sdk": "^0.8.
|
|
47
|
+
"@getuserfeedback/protocol": "^3.0.14",
|
|
48
|
+
"@getuserfeedback/sdk": "^0.8.16",
|
|
49
49
|
"robot3": "^1.2.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|