@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/index.js
CHANGED
|
@@ -2246,6 +2246,15 @@ async function executeWorkflowStep(step, registry, executor) {
|
|
|
2246
2246
|
};
|
|
2247
2247
|
}
|
|
2248
2248
|
}
|
|
2249
|
+
function getWindowDimensions() {
|
|
2250
|
+
try {
|
|
2251
|
+
const { Dimensions: Dimensions2 } = __require("react-native");
|
|
2252
|
+
const win = Dimensions2.get("window");
|
|
2253
|
+
return { width: win.width, height: win.height };
|
|
2254
|
+
} catch {
|
|
2255
|
+
return { width: 0, height: 0 };
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2249
2258
|
function success2(data) {
|
|
2250
2259
|
return {
|
|
2251
2260
|
success: true,
|
|
@@ -2453,16 +2462,7 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2453
2462
|
},
|
|
2454
2463
|
getPageHealth: async (ctx) => {
|
|
2455
2464
|
const bodyViewport = ctx.body?.viewport;
|
|
2456
|
-
|
|
2457
|
-
if (!viewport) {
|
|
2458
|
-
try {
|
|
2459
|
-
const { Dimensions: Dimensions2 } = __require("react-native");
|
|
2460
|
-
const win = Dimensions2.get("window");
|
|
2461
|
-
viewport = { width: win.width, height: win.height };
|
|
2462
|
-
} catch {
|
|
2463
|
-
viewport = { width: 0, height: 0 };
|
|
2464
|
-
}
|
|
2465
|
-
}
|
|
2465
|
+
const viewport = bodyViewport ?? getWindowDimensions();
|
|
2466
2466
|
const elements = registry.getAllElements().map((e) => ({
|
|
2467
2467
|
type: e.type,
|
|
2468
2468
|
state: e.getState()
|