@qontinui/ui-bridge-native 0.6.3 → 0.6.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 +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.js +10 -10
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +10 -10
- package/dist/react/index.mjs.map +1 -1
- package/dist/server/handlers.d.ts.map +1 -1
- package/dist/server/index.js +10 -10
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +10 -10
- package/dist/server/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/server/index.mjs
CHANGED
|
@@ -1092,6 +1092,15 @@ async function executeWorkflowStep(step, registry, executor) {
|
|
|
1092
1092
|
};
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
|
+
function getWindowDimensions() {
|
|
1096
|
+
try {
|
|
1097
|
+
const { Dimensions } = __require("react-native");
|
|
1098
|
+
const win = Dimensions.get("window");
|
|
1099
|
+
return { width: win.width, height: win.height };
|
|
1100
|
+
} catch {
|
|
1101
|
+
return { width: 0, height: 0 };
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1095
1104
|
function success2(data) {
|
|
1096
1105
|
return {
|
|
1097
1106
|
success: true,
|
|
@@ -1299,16 +1308,7 @@ function createServerHandlers(registry, executor, config) {
|
|
|
1299
1308
|
},
|
|
1300
1309
|
getPageHealth: async (ctx) => {
|
|
1301
1310
|
const bodyViewport = ctx.body?.viewport;
|
|
1302
|
-
|
|
1303
|
-
if (!viewport) {
|
|
1304
|
-
try {
|
|
1305
|
-
const { Dimensions } = __require("react-native");
|
|
1306
|
-
const win = Dimensions.get("window");
|
|
1307
|
-
viewport = { width: win.width, height: win.height };
|
|
1308
|
-
} catch {
|
|
1309
|
-
viewport = { width: 0, height: 0 };
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1311
|
+
const viewport = bodyViewport ?? getWindowDimensions();
|
|
1312
1312
|
const elements = registry.getAllElements().map((e) => ({
|
|
1313
1313
|
type: e.type,
|
|
1314
1314
|
state: e.getState()
|