@qontinui/ui-bridge-native 0.8.0 → 0.11.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.
Files changed (39) hide show
  1. package/README.md +50 -2
  2. package/dist/core/index.js +13 -3
  3. package/dist/core/index.js.map +1 -1
  4. package/dist/core/index.mjs +13 -3
  5. package/dist/core/index.mjs.map +1 -1
  6. package/dist/core/sha256.d.ts +29 -7
  7. package/dist/core/sha256.d.ts.map +1 -1
  8. package/dist/debug/index.js.map +1 -1
  9. package/dist/debug/index.mjs.map +1 -1
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +996 -32
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +986 -34
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/observation/observation.d.ts +15 -1
  17. package/dist/observation/observation.d.ts.map +1 -1
  18. package/dist/react/UIBridgeNativeProvider.d.ts +25 -3
  19. package/dist/react/UIBridgeNativeProvider.d.ts.map +1 -1
  20. package/dist/react/index.js +967 -32
  21. package/dist/react/index.js.map +1 -1
  22. package/dist/react/index.mjs +968 -33
  23. package/dist/react/index.mjs.map +1 -1
  24. package/dist/server/handlers.d.ts.map +1 -1
  25. package/dist/server/http-server.d.ts +120 -2
  26. package/dist/server/http-server.d.ts.map +1 -1
  27. package/dist/server/index.d.ts +1 -0
  28. package/dist/server/index.d.ts.map +1 -1
  29. package/dist/server/index.js +934 -16
  30. package/dist/server/index.js.map +1 -1
  31. package/dist/server/index.mjs +916 -17
  32. package/dist/server/index.mjs.map +1 -1
  33. package/dist/server/pairing.d.ts +295 -0
  34. package/dist/server/pairing.d.ts.map +1 -0
  35. package/dist/server/types.d.ts +20 -0
  36. package/dist/server/types.d.ts.map +1 -1
  37. package/dist/transport/DeviceAnnouncer.d.ts +0 -2
  38. package/dist/transport/DeviceAnnouncer.d.ts.map +1 -1
  39. package/package.json +2 -2
@@ -570,8 +570,7 @@ function utf8Bytes(input) {
570
570
  return Uint8Array.from(out);
571
571
  }
572
572
  var rotr = (x, n) => x >>> n | x << 32 - n;
573
- function sha256Hex(input) {
574
- const bytes = utf8Bytes(input);
573
+ function sha256Bytes(bytes) {
575
574
  const blockBytes = Math.ceil((bytes.length + 9) / 64) * 64;
576
575
  const buffer = new Uint8Array(blockBytes);
577
576
  buffer.set(bytes);
@@ -615,7 +614,18 @@ function sha256Hex(input) {
615
614
  h[6] = h[6] + g | 0;
616
615
  h[7] = h[7] + hh | 0;
617
616
  }
618
- return h.map((word) => (word >>> 0).toString(16).padStart(8, "0")).join("");
617
+ const digest = new Uint8Array(32);
618
+ const digestView = new DataView(digest.buffer);
619
+ h.forEach((word, i) => digestView.setUint32(i * 4, word >>> 0));
620
+ return digest;
621
+ }
622
+ function bytesToHex(bytes) {
623
+ let out = "";
624
+ for (let i = 0; i < bytes.length; i++) out += bytes[i].toString(16).padStart(2, "0");
625
+ return out;
626
+ }
627
+ function sha256Hex(input) {
628
+ return bytesToHex(sha256Bytes(utf8Bytes(input)));
619
629
  }
620
630
 
621
631
  // src/core/vision-fields.ts