@codeam/shared 2.76.43 → 2.76.44
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 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3400,8 +3400,10 @@ function pointPickerScript(opts) {
|
|
|
3400
3400
|
|
|
3401
3401
|
// Inside a React Native WebView the document is TOP-LEVEL (window.parent ===
|
|
3402
3402
|
// window), so the only way out is the bridge RN injects. It carries STRINGS.
|
|
3403
|
+
// Any mode may answer through it: the host app owns the WebView, there is no
|
|
3404
|
+
// third party to keep out \u2014 only the control API (the door below) needs
|
|
3405
|
+
// \`globalName\`, because a global turns the picker on with nobody's permission.
|
|
3403
3406
|
function rnBridge() {
|
|
3404
|
-
if (!GLOBAL) return null;
|
|
3405
3407
|
var rn = W.ReactNativeWebView;
|
|
3406
3408
|
return rn && typeof rn.postMessage === 'function' ? rn : null;
|
|
3407
3409
|
}
|
|
@@ -3412,13 +3414,17 @@ function pointPickerScript(opts) {
|
|
|
3412
3414
|
msg[FIELD] = CH;
|
|
3413
3415
|
msg.type = type;
|
|
3414
3416
|
if (extra) for (var k in extra) msg[k] = extra[k];
|
|
3417
|
+
// A parent window first (the feed framing the app; a host that installed
|
|
3418
|
+
// one); only a top-level document falls back to the React Native bridge
|
|
3419
|
+
// (2026-11-01: Remix's phone app got no \`on\` and no \`pick\` here).
|
|
3420
|
+
if (W.parent !== W) {
|
|
3421
|
+
try { W.parent.postMessage(msg, driver); } catch (e) {}
|
|
3422
|
+
return;
|
|
3423
|
+
}
|
|
3415
3424
|
var rn = rnBridge();
|
|
3416
3425
|
if (rn) {
|
|
3417
3426
|
try { rn.postMessage(JSON.stringify(msg)); } catch (e) {}
|
|
3418
|
-
return;
|
|
3419
3427
|
}
|
|
3420
|
-
if (W.parent === W) return;
|
|
3421
|
-
try { W.parent.postMessage(msg, driver); } catch (e) {}
|
|
3422
3428
|
}
|
|
3423
3429
|
|
|
3424
3430
|
function clip(s, max) { return s.length > max ? s.slice(0, max - 1) + '\\u2026' : s; }
|