execbro 1.10.12 → 1.10.14

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.
@@ -25,10 +25,41 @@ export interface ScreenStatePressable {
25
25
  /** What pressing triggers: "onPress=handleSubmit()", "onBack=goBack()", or "onPress→onBack" (prop route when the fn is anonymous). Absent when nothing meaningful survives Hermes. */
26
26
  onPressHint?: string | null;
27
27
  }
28
+ export interface ScreenStateText {
29
+ text: string;
30
+ center: {
31
+ x: number;
32
+ y: number;
33
+ };
34
+ bounds: {
35
+ x: number;
36
+ y: number;
37
+ width: number;
38
+ height: number;
39
+ };
40
+ blockedByOverlay?: boolean;
41
+ }
42
+ export interface ScreenStateImage {
43
+ src?: string | null;
44
+ alt?: string | null;
45
+ center: {
46
+ x: number;
47
+ y: number;
48
+ };
49
+ bounds: {
50
+ x: number;
51
+ y: number;
52
+ width: number;
53
+ height: number;
54
+ };
55
+ blockedByOverlay?: boolean;
56
+ }
28
57
  export interface ScreenStateOverlay {
29
58
  type: "BottomSheet" | "Modal" | "Alert" | "ActionSheet" | "Unknown";
30
59
  title: string | null;
31
60
  pressables: ScreenStatePressable[];
61
+ texts?: ScreenStateText[];
62
+ images?: ScreenStateImage[];
32
63
  }
33
64
  export interface ScreenStateRoute {
34
65
  name: string;
@@ -39,6 +70,8 @@ export interface ScreenState {
39
70
  route: ScreenStateRoute | null;
40
71
  overlays: ScreenStateOverlay[];
41
72
  pressables: ScreenStatePressable[];
73
+ texts: ScreenStateText[];
74
+ images: ScreenStateImage[];
42
75
  }
43
76
  export declare function markPressablesCoveredByOverlay(pressables: ScreenStatePressable[], overlayBounds: {
44
77
  x: number;
@@ -51,14 +84,30 @@ export declare function markPressablesCoveredByOverlay(pressables: ScreenStatePr
51
84
  * pressable's icon child name carries recognizable semantics:
52
85
  * { label: "[FloatingHeader]", icon: "SvgChevronBackward" }
53
86
  * → label "[SvgChevronBackward — possibly back button]"
87
+ * An icon button whose only text is a count badge (cart with "1") keeps that
88
+ * count as nearby context while the label is upgraded to the icon's meaning:
89
+ * { label: "1", icon: "SvgCartNew" } → label "[SvgCartNew — possibly cart button]", nearbyText "1"
54
90
  * Labels from text/a11y are never touched (icon is null for those).
55
91
  */
56
92
  export declare function applyIconHintToLabel(p: ScreenStatePressable): ScreenStatePressable;
57
93
  /**
58
- * Per-pressable coordinate converter — lets screenshot tools map points/dp into
59
- * screenshot pixels (including conditional shifts like the iOS safe-area band).
94
+ * Coordinate converter for any positioned item (pressable, text, image) — lets
95
+ * screenshot tools map points/dp into screenshot pixels (including conditional
96
+ * shifts like the iOS safe-area band). Reads only center/bounds, so it applies
97
+ * uniformly across item types.
60
98
  */
61
- export type PressableCoordConverter = (p: ScreenStatePressable) => {
99
+ export type ItemCoordConverter = (item: {
100
+ center: {
101
+ x: number;
102
+ y: number;
103
+ };
104
+ bounds: {
105
+ x: number;
106
+ y: number;
107
+ width: number;
108
+ height: number;
109
+ };
110
+ }) => {
62
111
  center: {
63
112
  x: number;
64
113
  y: number;
@@ -70,21 +119,40 @@ export type PressableCoordConverter = (p: ScreenStatePressable) => {
70
119
  height: number;
71
120
  };
72
121
  };
122
+ /** Alias kept for existing call sites; prefer ItemCoordConverter. */
123
+ export type PressableCoordConverter = ItemCoordConverter;
124
+ /** One merged-list line for a static text node — coordinates match pressable lines. */
125
+ export declare function formatTextEntry(t: ScreenStateText, convert?: ItemCoordConverter, opts?: {
126
+ fullText?: boolean;
127
+ }): string;
128
+ /** One merged-list line for an image node — coordinates match pressable lines. */
129
+ export declare function formatImageEntry(img: ScreenStateImage, convert?: ItemCoordConverter): string;
73
130
  /**
74
- * Render a ScreenState as the compact orientation summary used by
75
- * get_screen_state and the screenshot tools:
76
- * 📍 Checkout [Tabs > Cart > Checkout]
131
+ * Render a ScreenState as the orientation summary used by get_screen_state and the
132
+ * screenshot tools. By default it merges pressables, static text (📝), and images
133
+ * (🖼) into one spatially-ordered list per reachability group — enough to read and
134
+ * navigate the screen without a screenshot:
135
+ * 📍 Detail [Detail]
77
136
  * 🎯 Pressables:
78
- * (40, 100) <FloatingHeader /> "[SvgChevronBackward — possibly back button]" frame:(16,76 48x48)
137
+ * (210, 175) 🖼 Image 420x350 src="…"
138
+ * (146, 394) 📝 "Valya product" frame:(20,382 251x24)
139
+ * (210, 838) <Button /> "In cart" frame:(20,810 380x56)
140
+ * pressablesOnly restores the lean pressable-only snapshot; fullText disables the
141
+ * 80-char text truncation.
79
142
  */
80
- export declare function formatScreenStateSummary(ss: ScreenState, convert?: PressableCoordConverter): string;
143
+ export declare function formatScreenStateSummary(ss: ScreenState, convert?: ItemCoordConverter, opts?: {
144
+ pressablesOnly?: boolean;
145
+ fullText?: boolean;
146
+ }): string;
81
147
  export declare function describePressHandler(raw: unknown): string | null;
82
148
  /**
83
149
  * Fallback handler context from the custom component's on* props, for when the
84
150
  * direct onPress is anonymous (Hermes discards source even in dev bundles, and
85
151
  * names like navigation.goBack are lost to computed assignment):
86
- * - prefer the prop whose value IS the touchable's onPress (pass-through), else
87
- * the only on* function prop; ambiguity (several candidates) yields null
152
+ * - only trust the prop whose value IS the touchable's onPress (pass-through);
153
+ * a non-matched candidate is an unverifiable guess that mislabels every button
154
+ * in a multi-button container (FloatingHeader exposes only onBack, but its menu
155
+ * and cart buttons run internal handlers) — so it yields null
88
156
  * - named fn → "onBack=goBack()"; nameless → "onPress→onBack" (the prop name
89
157
  * alone is greppable context); a bare nameless "onPress" prop adds nothing → null
90
158
  */
@@ -1 +1 @@
1
- {"version":3,"file":"screenState.d.ts","sourceRoot":"","sources":["../../src/core/screenState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAQlD,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mGAAmG;IACnG,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;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