@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.
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAuB,MAAM,kBAAkB,CAAC;AAQpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAQV,oBAAoB,EAKrB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAgQhF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,CAAC,EAAE;IACP,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClF,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,GACA,oBAAoB,CAg1BtB"}
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAuB,MAAM,kBAAkB,CAAC;AAQpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAQV,oBAAoB,EAKrB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAuRhF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,CAAC,EAAE;IACP,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClF,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,GACA,oBAAoB,CA20BtB"}
@@ -1094,6 +1094,15 @@ async function executeWorkflowStep(step, registry, executor) {
1094
1094
  };
1095
1095
  }
1096
1096
  }
1097
+ function getWindowDimensions() {
1098
+ try {
1099
+ const { Dimensions } = __require("react-native");
1100
+ const win = Dimensions.get("window");
1101
+ return { width: win.width, height: win.height };
1102
+ } catch {
1103
+ return { width: 0, height: 0 };
1104
+ }
1105
+ }
1097
1106
  function success2(data) {
1098
1107
  return {
1099
1108
  success: true,
@@ -1301,16 +1310,7 @@ function createServerHandlers(registry, executor, config) {
1301
1310
  },
1302
1311
  getPageHealth: async (ctx) => {
1303
1312
  const bodyViewport = ctx.body?.viewport;
1304
- let viewport = bodyViewport;
1305
- if (!viewport) {
1306
- try {
1307
- const { Dimensions } = __require("react-native");
1308
- const win = Dimensions.get("window");
1309
- viewport = { width: win.width, height: win.height };
1310
- } catch {
1311
- viewport = { width: 0, height: 0 };
1312
- }
1313
- }
1313
+ const viewport = bodyViewport ?? getWindowDimensions();
1314
1314
  const elements = registry.getAllElements().map((e) => ({
1315
1315
  type: e.type,
1316
1316
  state: e.getState()