sootsim 0.1.128 → 0.1.130
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-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-KVBASG57.js → agent-KNT2MNHS.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-CSUCCH35.js → agent-wrapper-OQ6MXYSM.js} +2 -2
- package/dist-cli/chunks/{app-fonts-LK57Q63V.js → app-fonts-5YH5C37X.js} +2 -2
- package/dist-cli/chunks/{assert-LMMXHK7P.js → assert-7GTOVITS.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-7QUYTCK3.js +2 -0
- package/dist-cli/chunks/beta-TKYV2VUL.js +2 -0
- package/dist-cli/chunks/{chunk-TT5RWL45.js → chunk-3QB2RIJ3.js} +2 -2
- package/dist-cli/chunks/{chunk-7SSQQWXI.js → chunk-4A5BPDNH.js} +2 -2
- package/dist-cli/chunks/{chunk-KABJPUT4.js → chunk-4KQKAI4R.js} +1 -1
- package/dist-cli/chunks/chunk-4TWK4GWQ.js +2 -0
- package/dist-cli/chunks/chunk-544KNXXS.js +1 -0
- package/dist-cli/chunks/{chunk-PINZJVS6.js → chunk-5IYZIY67.js} +1 -1
- package/dist-cli/chunks/{chunk-KBW2VI34.js → chunk-5QO3N7MG.js} +1 -1
- package/dist-cli/chunks/{chunk-X33P2PIG.js → chunk-6YFOOGMX.js} +1 -1
- package/dist-cli/chunks/{chunk-TGMTCNZ2.js → chunk-6YKC2PAW.js} +2 -2
- package/dist-cli/chunks/{chunk-PSL42AVT.js → chunk-77BLGF7T.js} +2 -2
- package/dist-cli/chunks/{chunk-P4W42H4A.js → chunk-7NG5U6NK.js} +3 -3
- package/dist-cli/chunks/{chunk-JBVHVSVC.js → chunk-7YASUTHS.js} +2 -2
- package/dist-cli/chunks/{chunk-ZTHTQNVD.js → chunk-BIWTU6Y6.js} +6 -6
- package/dist-cli/chunks/{chunk-XF5W3CGA.js → chunk-DLYAXBRT.js} +2 -2
- package/dist-cli/chunks/{chunk-DTHD7QGU.js → chunk-DRHDI7V4.js} +2 -2
- package/dist-cli/chunks/{chunk-HTFFTIEU.js → chunk-FGMOSDCQ.js} +1 -1
- package/dist-cli/chunks/{chunk-YKUW3QNP.js → chunk-H6WPFY4K.js} +2 -2
- package/dist-cli/chunks/{chunk-MQFUXG7V.js → chunk-HCGT7RFQ.js} +1 -1
- package/dist-cli/chunks/chunk-HKKCAEKK.js +1 -0
- package/dist-cli/chunks/{chunk-AJ34QMR4.js → chunk-IGQ54SMC.js} +2 -2
- package/dist-cli/chunks/{chunk-KG3XVCAL.js → chunk-JALLIXYA.js} +2 -2
- package/dist-cli/chunks/{chunk-SKW6NBUP.js → chunk-K5N6S6MK.js} +2 -2
- package/dist-cli/chunks/{chunk-B3HLOZ3N.js → chunk-KYJJSQWY.js} +2 -2
- package/dist-cli/chunks/{chunk-E3NRRI4M.js → chunk-LBRLBJAS.js} +1 -1
- package/dist-cli/chunks/{chunk-J7TYQVOU.js → chunk-MOO23TCK.js} +1 -1
- package/dist-cli/chunks/{chunk-374XJJVQ.js → chunk-MWZ2K75V.js} +1 -1
- package/dist-cli/chunks/{chunk-OAZYZXMH.js → chunk-NEXDOXJ3.js} +1 -1
- package/dist-cli/chunks/{chunk-CYKPWI35.js → chunk-OHPV4WP2.js} +1 -1
- package/dist-cli/chunks/{chunk-DKK3CC3D.js → chunk-OOTZNIHU.js} +2 -2
- package/dist-cli/chunks/{chunk-H7O2EPCU.js → chunk-OP5XM4ED.js} +2 -2
- package/dist-cli/chunks/{chunk-ASKSZHOR.js → chunk-PBYFOCRO.js} +3 -3
- package/dist-cli/chunks/{chunk-HMBYOS66.js → chunk-QDMM6U4X.js} +2 -2
- package/dist-cli/chunks/{chunk-OULIZJPC.js → chunk-R35KFNWH.js} +2 -2
- package/dist-cli/chunks/{chunk-QNKKUBAX.js → chunk-RSJKAVWL.js} +2 -2
- package/dist-cli/chunks/{chunk-HDW4B3FW.js → chunk-SK4G3KBR.js} +2 -2
- package/dist-cli/chunks/{chunk-3AAJ272V.js → chunk-SPJXGCEP.js} +1 -1
- package/dist-cli/chunks/{chunk-OLXRO2UE.js → chunk-T77EKSH4.js} +1 -1
- package/dist-cli/chunks/{chunk-HNRZM6GI.js → chunk-TCYVPNQO.js} +3 -3
- package/dist-cli/chunks/chunk-TOPGPGVZ.js +1 -0
- package/dist-cli/chunks/{chunk-ZB2LBNNH.js → chunk-VGCTSDGM.js} +54 -14
- package/dist-cli/chunks/{chunk-WCJMLITZ.js → chunk-XPYODDHV.js} +1 -1
- package/dist-cli/chunks/{chunk-WBVNZ7R3.js → chunk-XRIPNBCE.js} +2 -2
- package/dist-cli/chunks/{chunk-SQRVXVCM.js → chunk-YRRFLKL4.js} +1 -1
- package/dist-cli/chunks/{chunk-WEGRCMET.js → chunk-YYCJASBO.js} +2 -2
- package/dist-cli/chunks/cli-version-SHSHHYXU.js +2 -0
- package/dist-cli/chunks/{compat-WT4WILUH.js → compat-NXBN3X4Z.js} +3 -3
- package/dist-cli/chunks/{config-GKCHSOOI.js → config-TBUMHWAL.js} +2 -2
- package/dist-cli/chunks/control-CAPNUH2B.js +2 -0
- package/dist-cli/chunks/{cpu-profile-HAHWXEDN.js → cpu-profile-UFGS2RPI.js} +2 -2
- package/dist-cli/chunks/{daemon-Z2O7JY3O.js → daemon-BUW7GFTP.js} +2 -2
- package/dist-cli/chunks/{debug-C7NG2DAG.js → debug-7TLF5GM5.js} +3 -3
- package/dist-cli/chunks/{detox-Q45XNNH3.js → detox-MPVMCPWZ.js} +2 -2
- package/dist-cli/chunks/{device-55XBOVDK.js → device-APKKBXMJ.js} +2 -2
- package/dist-cli/chunks/{diagnose-I44BNF4T.js → diagnose-FVLVFNDW.js} +2 -2
- package/dist-cli/chunks/drivers-QQJOT5IF.js +2 -0
- package/dist-cli/chunks/{electron-XR7UGDZD.js → electron-X2DEUVXA.js} +3 -3
- package/dist-cli/chunks/flow-SOFJ7QI3.js +2 -0
- package/dist-cli/chunks/help-ZFJBFDNU.js +2 -0
- package/dist-cli/chunks/{hints-GTUK7PES.js → hints-D47SYWGV.js} +2 -2
- package/dist-cli/chunks/{home-paths-N6TCKIQQ.js → home-paths-23FGUKN4.js} +2 -2
- package/dist-cli/chunks/{inspect-7WV43JZ3.js → inspect-HEJB6NB6.js} +4 -4
- package/dist-cli/chunks/install-5XBIUQGH.js +2 -0
- package/dist-cli/chunks/{install-desktop-GFQYXJVD.js → install-desktop-5ZBMF444.js} +3 -3
- package/dist-cli/chunks/{keys-KHRGMVKB.js → keys-CI2XOBPT.js} +2 -2
- package/dist-cli/chunks/{launch-EXL7RKQ7.js → launch-6R6RY6R5.js} +3 -3
- package/dist-cli/chunks/{login-VCD33FX6.js → login-VLLUNVK7.js} +4 -4
- package/dist-cli/chunks/{logout-E2T66AOL.js → logout-D4YKYIDG.js} +2 -2
- package/dist-cli/chunks/{maestro-ZANP2BL4.js → maestro-KLROSFMP.js} +2 -2
- package/dist-cli/chunks/{preview-UBXWRORY.js → preview-O4365QYC.js} +2 -2
- package/dist-cli/chunks/{profile-XMGEEZ5K.js → profile-VAEKDLEX.js} +2 -2
- package/dist-cli/chunks/{react-D6L6HQOQ.js → react-MMA3LE34.js} +2 -2
- package/dist-cli/chunks/{record-JOHCXOWR.js → record-GVWF4BNF.js} +2 -2
- package/dist-cli/chunks/runtime-ZE6YLTHF.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-HERSJG4G.js → runtime-delivery-4SSWMW25.js} +2 -2
- package/dist-cli/chunks/{screenshot-B7OWAB6E.js → screenshot-C72QGUMV.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-Z5BJFBTW.js → screenshot-mode-OCTJDADF.js} +2 -2
- package/dist-cli/chunks/{screenshots-XV6WVUPL.js → screenshots-AWDE4NDZ.js} +2 -2
- package/dist-cli/chunks/{server-GKB36CKN.js → server-K6KOFHSQ.js} +12 -12
- package/dist-cli/chunks/setup-repo-KZDLN5I2.js +2 -0
- package/dist-cli/chunks/{skills-KZMAEPI7.js → skills-DIETG7L3.js} +2 -2
- package/dist-cli/chunks/{start-U476YCIN.js → start-R54AVUYP.js} +4 -4
- package/dist-cli/chunks/store-3I5TVDYR.js +2 -0
- package/dist-cli/chunks/telemetry-MZWJNMXL.js +2 -0
- package/dist-cli/chunks/{test-KZKN34BL.js → test-6EZ2YHEN.js} +3 -3
- package/dist-cli/chunks/{three-mode-HCUMT2OW.js → three-mode-FWE57WZP.js} +2 -2
- package/dist-cli/chunks/{timeline-EVARJJIQ.js → timeline-4FFLAGNO.js} +2 -2
- package/dist-cli/chunks/{upgrade-NJMIIBUR.js → upgrade-RI62D65F.js} +2 -2
- package/dist-cli/chunks/upload-2OQWKQOR.js +2 -0
- package/dist-cli/chunks/{version-VENV6XNR.js → version-RHWBKIPW.js} +2 -2
- package/dist-cli/chunks/web-U4RROYGL.js +2 -0
- package/dist-cli/chunks/{what-happened-P6T4UG2I.js → what-happened-QYK3MLTS.js} +2 -2
- package/dist-cli/chunks/{whoami-MVMHRDM6.js → whoami-XO5L3YTX.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +20 -7
- package/dist-lib/host/fetch-proxy-handler.cjs +20 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +10 -6
- package/dist-lib/host/fetch-proxy-overrides.mjs +10 -6
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/demo-app-registry.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +51 -2
- package/dist-lib/sdk.mjs +51 -2
- package/dist-lib/skills.cjs +27 -13
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/host/fetch-proxy-handler.ts +23 -2
- package/src/host/fetch-proxy-overrides.ts +17 -5
- package/dist-cli/chunks/auto-bootstrap-CTWKEM4V.js +0 -2
- package/dist-cli/chunks/beta-KGUBAGXH.js +0 -2
- package/dist-cli/chunks/chunk-3TDPLIKL.js +0 -2
- package/dist-cli/chunks/chunk-N2VJC564.js +0 -1
- package/dist-cli/chunks/chunk-UNV6BGOP.js +0 -1
- package/dist-cli/chunks/chunk-ZE7W2MTD.js +0 -1
- package/dist-cli/chunks/cli-version-INZLODFN.js +0 -2
- package/dist-cli/chunks/control-MSK5L3VF.js +0 -2
- package/dist-cli/chunks/drivers-SYUDXJZK.js +0 -2
- package/dist-cli/chunks/flow-66GRPHHA.js +0 -2
- package/dist-cli/chunks/help-4VBCUZAR.js +0 -2
- package/dist-cli/chunks/install-55EDLMPA.js +0 -2
- package/dist-cli/chunks/runtime-SX4NL3N4.js +0 -2
- package/dist-cli/chunks/setup-repo-UKVZZ52B.js +0 -2
- package/dist-cli/chunks/store-JUR4T52G.js +0 -2
- package/dist-cli/chunks/telemetry-BZJQZXB2.js +0 -2
- package/dist-cli/chunks/upload-INJR46LD.js +0 -2
- package/dist-cli/chunks/web-2ZJXPNQQ.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{B as T,C as A,D as y,O as _,P as b,Q as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{B as T,C as A,D as y,O as _,P as b,Q as S}from"./chunk-VGCTSDGM.js";import{c as N,e as F}from"./chunk-R35KFNWH.js";import{b as k}from"./chunk-OHPV4WP2.js";import"./chunk-5IYZIY67.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=N(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim what-happened \u2014 show recent events from the semantic timeline
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as i}from"./chunk-OOTZNIHU.js";import{d as n}from"./chunk-OP5XM4ED.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -2873,23 +2873,27 @@ var HOST_HEADER_OVERRIDES = [
|
|
|
2873
2873
|
headers: {
|
|
2874
2874
|
origin: "https://app.uniswap.org",
|
|
2875
2875
|
referer: "https://app.uniswap.org/"
|
|
2876
|
-
}
|
|
2876
|
+
},
|
|
2877
|
+
// uniswap's native gateway accepts the app origin, but forcing a desktop
|
|
2878
|
+
// browser ua on native api posts returns a bogus 414/tcp-stack response.
|
|
2879
|
+
suppressBrowserUserAgent: true
|
|
2877
2880
|
}
|
|
2878
2881
|
];
|
|
2879
2882
|
function headerOverridesFor(hostname) {
|
|
2880
2883
|
const host = hostname.toLowerCase();
|
|
2881
2884
|
for (const override of HOST_HEADER_OVERRIDES) {
|
|
2882
2885
|
if (host === override.hostSuffix || host.endsWith(`.${override.hostSuffix}`)) {
|
|
2883
|
-
return override
|
|
2886
|
+
return override;
|
|
2884
2887
|
}
|
|
2885
2888
|
}
|
|
2886
|
-
return
|
|
2889
|
+
return void 0;
|
|
2887
2890
|
}
|
|
2888
2891
|
function getFetchProxyTargetHeaders(targetUrl) {
|
|
2892
|
+
const hostOverrides = headerOverridesFor(targetUrl.hostname);
|
|
2889
2893
|
return {
|
|
2890
2894
|
"accept-encoding": "identity",
|
|
2891
|
-
"user-agent": FETCH_PROXY_BROWSER_USER_AGENT,
|
|
2892
|
-
...
|
|
2895
|
+
...hostOverrides?.suppressBrowserUserAgent ? {} : { "user-agent": FETCH_PROXY_BROWSER_USER_AGENT },
|
|
2896
|
+
...hostOverrides?.headers
|
|
2893
2897
|
};
|
|
2894
2898
|
}
|
|
2895
2899
|
|
|
@@ -2947,6 +2951,12 @@ function formatFetchProxyError(targetUrl, err) {
|
|
|
2947
2951
|
}
|
|
2948
2952
|
return message;
|
|
2949
2953
|
}
|
|
2954
|
+
function isTextProxyContentType(contentType) {
|
|
2955
|
+
const value = Array.isArray(contentType) ? contentType[0] : contentType;
|
|
2956
|
+
const normalized = value?.split(";", 1)[0]?.trim().toLowerCase();
|
|
2957
|
+
if (!normalized) return false;
|
|
2958
|
+
return normalized.startsWith("text/") || normalized === "application/json" || normalized.endsWith("+json") || normalized === "application/x-www-form-urlencoded" || normalized === "application/xml" || normalized.endsWith("+xml") || normalized === "application/javascript" || normalized === "application/graphql";
|
|
2959
|
+
}
|
|
2950
2960
|
function buildFetchProxyHeaders(reqHeaders, targetUrl) {
|
|
2951
2961
|
const headers = {};
|
|
2952
2962
|
for (const [key, value] of Object.entries(reqHeaders)) {
|
|
@@ -3012,7 +3022,10 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
3012
3022
|
for await (const chunk of req) {
|
|
3013
3023
|
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
3014
3024
|
}
|
|
3015
|
-
if (chunks.length > 0)
|
|
3025
|
+
if (chunks.length > 0) {
|
|
3026
|
+
const bytes = Buffer.concat(chunks);
|
|
3027
|
+
body = isTextProxyContentType(req.headers["content-type"]) ? bytes.toString("utf8") : bytes;
|
|
3028
|
+
}
|
|
3016
3029
|
}
|
|
3017
3030
|
let upstream;
|
|
3018
3031
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -51,23 +51,27 @@ var HOST_HEADER_OVERRIDES = [
|
|
|
51
51
|
headers: {
|
|
52
52
|
origin: "https://app.uniswap.org",
|
|
53
53
|
referer: "https://app.uniswap.org/"
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
|
+
// uniswap's native gateway accepts the app origin, but forcing a desktop
|
|
56
|
+
// browser ua on native api posts returns a bogus 414/tcp-stack response.
|
|
57
|
+
suppressBrowserUserAgent: true
|
|
55
58
|
}
|
|
56
59
|
];
|
|
57
60
|
function headerOverridesFor(hostname) {
|
|
58
61
|
const host = hostname.toLowerCase();
|
|
59
62
|
for (const override of HOST_HEADER_OVERRIDES) {
|
|
60
63
|
if (host === override.hostSuffix || host.endsWith(`.${override.hostSuffix}`)) {
|
|
61
|
-
return override
|
|
64
|
+
return override;
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
|
-
return
|
|
67
|
+
return void 0;
|
|
65
68
|
}
|
|
66
69
|
function getFetchProxyTargetHeaders(targetUrl) {
|
|
70
|
+
const hostOverrides = headerOverridesFor(targetUrl.hostname);
|
|
67
71
|
return {
|
|
68
72
|
"accept-encoding": "identity",
|
|
69
|
-
"user-agent": FETCH_PROXY_BROWSER_USER_AGENT,
|
|
70
|
-
...
|
|
73
|
+
...hostOverrides?.suppressBrowserUserAgent ? {} : { "user-agent": FETCH_PROXY_BROWSER_USER_AGENT },
|
|
74
|
+
...hostOverrides?.headers
|
|
71
75
|
};
|
|
72
76
|
}
|
|
73
77
|
|
|
@@ -125,6 +129,12 @@ function formatFetchProxyError(targetUrl, err) {
|
|
|
125
129
|
}
|
|
126
130
|
return message;
|
|
127
131
|
}
|
|
132
|
+
function isTextProxyContentType(contentType) {
|
|
133
|
+
const value = Array.isArray(contentType) ? contentType[0] : contentType;
|
|
134
|
+
const normalized = value?.split(";", 1)[0]?.trim().toLowerCase();
|
|
135
|
+
if (!normalized) return false;
|
|
136
|
+
return normalized.startsWith("text/") || normalized === "application/json" || normalized.endsWith("+json") || normalized === "application/x-www-form-urlencoded" || normalized === "application/xml" || normalized.endsWith("+xml") || normalized === "application/javascript" || normalized === "application/graphql";
|
|
137
|
+
}
|
|
128
138
|
function buildFetchProxyHeaders(reqHeaders, targetUrl) {
|
|
129
139
|
const headers = {};
|
|
130
140
|
for (const [key, value] of Object.entries(reqHeaders)) {
|
|
@@ -190,7 +200,10 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
190
200
|
for await (const chunk of req) {
|
|
191
201
|
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
192
202
|
}
|
|
193
|
-
if (chunks.length > 0)
|
|
203
|
+
if (chunks.length > 0) {
|
|
204
|
+
const bytes = Buffer.concat(chunks);
|
|
205
|
+
body = isTextProxyContentType(req.headers["content-type"]) ? bytes.toString("utf8") : bytes;
|
|
206
|
+
}
|
|
194
207
|
}
|
|
195
208
|
let upstream;
|
|
196
209
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -33,23 +33,27 @@ var HOST_HEADER_OVERRIDES = [
|
|
|
33
33
|
headers: {
|
|
34
34
|
origin: "https://app.uniswap.org",
|
|
35
35
|
referer: "https://app.uniswap.org/"
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
// uniswap's native gateway accepts the app origin, but forcing a desktop
|
|
38
|
+
// browser ua on native api posts returns a bogus 414/tcp-stack response.
|
|
39
|
+
suppressBrowserUserAgent: true
|
|
37
40
|
}
|
|
38
41
|
];
|
|
39
42
|
function headerOverridesFor(hostname) {
|
|
40
43
|
const host = hostname.toLowerCase();
|
|
41
44
|
for (const override of HOST_HEADER_OVERRIDES) {
|
|
42
45
|
if (host === override.hostSuffix || host.endsWith(`.${override.hostSuffix}`)) {
|
|
43
|
-
return override
|
|
46
|
+
return override;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
|
-
return
|
|
49
|
+
return void 0;
|
|
47
50
|
}
|
|
48
51
|
function getFetchProxyTargetHeaders(targetUrl) {
|
|
52
|
+
const hostOverrides = headerOverridesFor(targetUrl.hostname);
|
|
49
53
|
return {
|
|
50
54
|
"accept-encoding": "identity",
|
|
51
|
-
"user-agent": FETCH_PROXY_BROWSER_USER_AGENT,
|
|
52
|
-
...
|
|
55
|
+
...hostOverrides?.suppressBrowserUserAgent ? {} : { "user-agent": FETCH_PROXY_BROWSER_USER_AGENT },
|
|
56
|
+
...hostOverrides?.headers
|
|
53
57
|
};
|
|
54
58
|
}
|
|
55
59
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/host/fetch-proxy-overrides.ts
|
|
4
4
|
var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
|
|
@@ -8,23 +8,27 @@ var HOST_HEADER_OVERRIDES = [
|
|
|
8
8
|
headers: {
|
|
9
9
|
origin: "https://app.uniswap.org",
|
|
10
10
|
referer: "https://app.uniswap.org/"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
// uniswap's native gateway accepts the app origin, but forcing a desktop
|
|
13
|
+
// browser ua on native api posts returns a bogus 414/tcp-stack response.
|
|
14
|
+
suppressBrowserUserAgent: true
|
|
12
15
|
}
|
|
13
16
|
];
|
|
14
17
|
function headerOverridesFor(hostname) {
|
|
15
18
|
const host = hostname.toLowerCase();
|
|
16
19
|
for (const override of HOST_HEADER_OVERRIDES) {
|
|
17
20
|
if (host === override.hostSuffix || host.endsWith(`.${override.hostSuffix}`)) {
|
|
18
|
-
return override
|
|
21
|
+
return override;
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
|
-
return
|
|
24
|
+
return void 0;
|
|
22
25
|
}
|
|
23
26
|
function getFetchProxyTargetHeaders(targetUrl) {
|
|
27
|
+
const hostOverrides = headerOverridesFor(targetUrl.hostname);
|
|
24
28
|
return {
|
|
25
29
|
"accept-encoding": "identity",
|
|
26
|
-
"user-agent": FETCH_PROXY_BROWSER_USER_AGENT,
|
|
27
|
-
...
|
|
30
|
+
...hostOverrides?.suppressBrowserUserAgent ? {} : { "user-agent": FETCH_PROXY_BROWSER_USER_AGENT },
|
|
31
|
+
...hostOverrides?.headers
|
|
28
32
|
};
|
|
29
33
|
}
|
|
30
34
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -254,6 +254,39 @@ var LAYOUT_GET_NATIVE_EVAL = `(async () => {
|
|
|
254
254
|
const n = typeof raw === 'number' ? raw : (typeof raw === 'string' ? parseFloat(raw) : NaN)
|
|
255
255
|
return Number.isFinite(n) ? Math.round(n) : 0
|
|
256
256
|
}
|
|
257
|
+
// styling extractors \u2014 omit boring defaults so the agent only sees notable
|
|
258
|
+
// styling (low opacity, struck text, clipping, a real border/color).
|
|
259
|
+
const colorStr = (v) => {
|
|
260
|
+
if (v == null) return undefined
|
|
261
|
+
const s = String(v).split(' ').join('')
|
|
262
|
+
return s && s !== 'transparent' && s !== 'rgba(0,0,0,0)' ? s : undefined
|
|
263
|
+
}
|
|
264
|
+
const opacityOf = (style) => {
|
|
265
|
+
const o = style && style.opacity
|
|
266
|
+
const n = typeof o === 'number' ? o : (typeof o === 'string' ? parseFloat(o) : NaN)
|
|
267
|
+
return Number.isFinite(n) && n < 1 ? Math.round(n * 100) / 100 : undefined
|
|
268
|
+
}
|
|
269
|
+
const weightOf = (style) => {
|
|
270
|
+
const w = style && style.fontWeight
|
|
271
|
+
const n = typeof w === 'number' ? w : (typeof w === 'string' ? parseInt(w, 10) : NaN)
|
|
272
|
+
return Number.isFinite(n) && n >= 600 ? n : undefined
|
|
273
|
+
}
|
|
274
|
+
const decoOf = (style) => {
|
|
275
|
+
const d = style && (style.textDecorationLine || style.textDecoration)
|
|
276
|
+
return d && d !== 'none' && d !== 'normal' ? String(d).split(' ')[0] : undefined
|
|
277
|
+
}
|
|
278
|
+
const overflowOf = (style) => (style && style.overflow === 'hidden' ? 'hidden' : undefined)
|
|
279
|
+
const borderWOf = (style) => {
|
|
280
|
+
if (!style) return undefined
|
|
281
|
+
const keys = ['borderWidth','borderTopWidth','borderBottomWidth','borderLeftWidth','borderRightWidth']
|
|
282
|
+
let max = 0
|
|
283
|
+
for (const k of keys) {
|
|
284
|
+
const r = style[k]
|
|
285
|
+
const n = typeof r === 'number' ? r : (typeof r === 'string' ? parseFloat(r) : NaN)
|
|
286
|
+
if (Number.isFinite(n)) max = Math.max(max, n)
|
|
287
|
+
}
|
|
288
|
+
return max > 0 ? Math.round(max) : undefined
|
|
289
|
+
}
|
|
257
290
|
|
|
258
291
|
const isVisible = (n) => {
|
|
259
292
|
const layout = n && n.layout
|
|
@@ -284,6 +317,13 @@ var LAYOUT_GET_NATIVE_EVAL = `(async () => {
|
|
|
284
317
|
borderRadius: radiusOf(style),
|
|
285
318
|
padding: { t: round(pad.top), r: round(pad.right), b: round(pad.bottom), l: round(pad.left) },
|
|
286
319
|
fontSize: fontSizeOf(style),
|
|
320
|
+
color: text ? colorStr(style.color) : undefined,
|
|
321
|
+
bg: colorStr(style.backgroundColor),
|
|
322
|
+
opacity: opacityOf(style),
|
|
323
|
+
fontWeight: weightOf(style),
|
|
324
|
+
textDecoration: decoOf(style),
|
|
325
|
+
overflow: overflowOf(style),
|
|
326
|
+
borderWidth: borderWOf(style),
|
|
287
327
|
}
|
|
288
328
|
})
|
|
289
329
|
})()`;
|
|
@@ -291,7 +331,7 @@ async function inspectGetLayout(bridge) {
|
|
|
291
331
|
const raw = await bridge.send({ type: "evaluate", code: LAYOUT_GET_NATIVE_EVAL });
|
|
292
332
|
return Array.isArray(raw) ? raw : [];
|
|
293
333
|
}
|
|
294
|
-
function formatLayoutElements(elements) {
|
|
334
|
+
function formatLayoutElements(elements, opts) {
|
|
295
335
|
if (elements.length === 0) return " no visible elements found";
|
|
296
336
|
const lines = elements.map((el) => {
|
|
297
337
|
const ident = el.testID ? `#${el.testID}` : el.selector ? el.selector : el.role ? `[${el.role}]` : `<${el.type}>`;
|
|
@@ -303,6 +343,15 @@ function formatLayoutElements(elements) {
|
|
|
303
343
|
parts.push(uniform ? `pad:${p.t}` : `pad:${p.t},${p.r},${p.b},${p.l}`);
|
|
304
344
|
}
|
|
305
345
|
if (el.fontSize > 0) parts.push(`font:${el.fontSize}`);
|
|
346
|
+
if (opts?.styling) {
|
|
347
|
+
if (el.fontWeight) parts.push(`weight:${el.fontWeight}`);
|
|
348
|
+
if (el.color) parts.push(`color:${el.color}`);
|
|
349
|
+
if (el.bg) parts.push(`bg:${el.bg}`);
|
|
350
|
+
if (el.opacity != null) parts.push(`opacity:${el.opacity}`);
|
|
351
|
+
if (el.textDecoration) parts.push(`deco:${el.textDecoration}`);
|
|
352
|
+
if (el.overflow) parts.push(`overflow:${el.overflow}`);
|
|
353
|
+
if (el.borderWidth) parts.push(`border:${el.borderWidth}`);
|
|
354
|
+
}
|
|
306
355
|
if (el.text) {
|
|
307
356
|
const text = el.text.length > 40 ? `${el.text.slice(0, 39)}\u2026` : el.text;
|
|
308
357
|
parts.push(`"${text}"`);
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// cli/commands/inspect/core.ts
|
|
4
4
|
function resolveMaxMsFlag(args, fallbackMs) {
|
|
@@ -166,6 +166,39 @@ var LAYOUT_GET_NATIVE_EVAL = `(async () => {
|
|
|
166
166
|
const n = typeof raw === 'number' ? raw : (typeof raw === 'string' ? parseFloat(raw) : NaN)
|
|
167
167
|
return Number.isFinite(n) ? Math.round(n) : 0
|
|
168
168
|
}
|
|
169
|
+
// styling extractors \u2014 omit boring defaults so the agent only sees notable
|
|
170
|
+
// styling (low opacity, struck text, clipping, a real border/color).
|
|
171
|
+
const colorStr = (v) => {
|
|
172
|
+
if (v == null) return undefined
|
|
173
|
+
const s = String(v).split(' ').join('')
|
|
174
|
+
return s && s !== 'transparent' && s !== 'rgba(0,0,0,0)' ? s : undefined
|
|
175
|
+
}
|
|
176
|
+
const opacityOf = (style) => {
|
|
177
|
+
const o = style && style.opacity
|
|
178
|
+
const n = typeof o === 'number' ? o : (typeof o === 'string' ? parseFloat(o) : NaN)
|
|
179
|
+
return Number.isFinite(n) && n < 1 ? Math.round(n * 100) / 100 : undefined
|
|
180
|
+
}
|
|
181
|
+
const weightOf = (style) => {
|
|
182
|
+
const w = style && style.fontWeight
|
|
183
|
+
const n = typeof w === 'number' ? w : (typeof w === 'string' ? parseInt(w, 10) : NaN)
|
|
184
|
+
return Number.isFinite(n) && n >= 600 ? n : undefined
|
|
185
|
+
}
|
|
186
|
+
const decoOf = (style) => {
|
|
187
|
+
const d = style && (style.textDecorationLine || style.textDecoration)
|
|
188
|
+
return d && d !== 'none' && d !== 'normal' ? String(d).split(' ')[0] : undefined
|
|
189
|
+
}
|
|
190
|
+
const overflowOf = (style) => (style && style.overflow === 'hidden' ? 'hidden' : undefined)
|
|
191
|
+
const borderWOf = (style) => {
|
|
192
|
+
if (!style) return undefined
|
|
193
|
+
const keys = ['borderWidth','borderTopWidth','borderBottomWidth','borderLeftWidth','borderRightWidth']
|
|
194
|
+
let max = 0
|
|
195
|
+
for (const k of keys) {
|
|
196
|
+
const r = style[k]
|
|
197
|
+
const n = typeof r === 'number' ? r : (typeof r === 'string' ? parseFloat(r) : NaN)
|
|
198
|
+
if (Number.isFinite(n)) max = Math.max(max, n)
|
|
199
|
+
}
|
|
200
|
+
return max > 0 ? Math.round(max) : undefined
|
|
201
|
+
}
|
|
169
202
|
|
|
170
203
|
const isVisible = (n) => {
|
|
171
204
|
const layout = n && n.layout
|
|
@@ -196,6 +229,13 @@ var LAYOUT_GET_NATIVE_EVAL = `(async () => {
|
|
|
196
229
|
borderRadius: radiusOf(style),
|
|
197
230
|
padding: { t: round(pad.top), r: round(pad.right), b: round(pad.bottom), l: round(pad.left) },
|
|
198
231
|
fontSize: fontSizeOf(style),
|
|
232
|
+
color: text ? colorStr(style.color) : undefined,
|
|
233
|
+
bg: colorStr(style.backgroundColor),
|
|
234
|
+
opacity: opacityOf(style),
|
|
235
|
+
fontWeight: weightOf(style),
|
|
236
|
+
textDecoration: decoOf(style),
|
|
237
|
+
overflow: overflowOf(style),
|
|
238
|
+
borderWidth: borderWOf(style),
|
|
199
239
|
}
|
|
200
240
|
})
|
|
201
241
|
})()`;
|
|
@@ -203,7 +243,7 @@ async function inspectGetLayout(bridge) {
|
|
|
203
243
|
const raw = await bridge.send({ type: "evaluate", code: LAYOUT_GET_NATIVE_EVAL });
|
|
204
244
|
return Array.isArray(raw) ? raw : [];
|
|
205
245
|
}
|
|
206
|
-
function formatLayoutElements(elements) {
|
|
246
|
+
function formatLayoutElements(elements, opts) {
|
|
207
247
|
if (elements.length === 0) return " no visible elements found";
|
|
208
248
|
const lines = elements.map((el) => {
|
|
209
249
|
const ident = el.testID ? `#${el.testID}` : el.selector ? el.selector : el.role ? `[${el.role}]` : `<${el.type}>`;
|
|
@@ -215,6 +255,15 @@ function formatLayoutElements(elements) {
|
|
|
215
255
|
parts.push(uniform ? `pad:${p.t}` : `pad:${p.t},${p.r},${p.b},${p.l}`);
|
|
216
256
|
}
|
|
217
257
|
if (el.fontSize > 0) parts.push(`font:${el.fontSize}`);
|
|
258
|
+
if (opts?.styling) {
|
|
259
|
+
if (el.fontWeight) parts.push(`weight:${el.fontWeight}`);
|
|
260
|
+
if (el.color) parts.push(`color:${el.color}`);
|
|
261
|
+
if (el.bg) parts.push(`bg:${el.bg}`);
|
|
262
|
+
if (el.opacity != null) parts.push(`opacity:${el.opacity}`);
|
|
263
|
+
if (el.textDecoration) parts.push(`deco:${el.textDecoration}`);
|
|
264
|
+
if (el.overflow) parts.push(`overflow:${el.overflow}`);
|
|
265
|
+
if (el.borderWidth) parts.push(`border:${el.borderWidth}`);
|
|
266
|
+
}
|
|
218
267
|
if (el.text) {
|
|
219
268
|
const text = el.text.length > 40 ? `${el.text.slice(0, 39)}\u2026` : el.text;
|
|
220
269
|
parts.push(`"${text}"`);
|