@vvedantb/native-ui 0.25.1 → 0.25.3

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.
@@ -10,6 +10,7 @@ import { useReduceMotion } from "../useReduceMotion";
10
10
  import { useScheme } from "../useScheme";
11
11
  import { chatTextSize } from "./chat-text";
12
12
  import { MESSAGE_MENU, messageContextMenuLayout } from "./message-menu-layout";
13
+ import { usePressed } from "../usePressed";
13
14
 
14
15
  /**
15
16
  * The iMessage hold menu for a chat message: the chat fades under a frosted
@@ -21,10 +22,11 @@ import { MESSAGE_MENU, messageContextMenuLayout } from "./message-menu-layout";
21
22
  * runs. `Message` opens it with `menu`.
22
23
  */
23
24
  export function MessageContextMenu(t0) {
24
- const $ = _c(103);
25
+ const $ = _c(78);
25
26
  const {
26
27
  open,
27
28
  onClose,
29
+ onDismissed,
28
30
  anchor,
29
31
  align,
30
32
  preview,
@@ -38,353 +40,429 @@ export function MessageContextMenu(t0) {
38
40
  const largerText = useLargerText();
39
41
  const reduceMotion = useReduceMotion();
40
42
  const rowHeight = largerText ? 56 : 48;
41
- let T0;
42
- let T1;
43
- let T2;
44
- let t10;
45
- let t11;
46
- let t12;
47
- let t13;
48
- let t14;
49
- let t15;
50
- let t16;
51
- let t17;
52
43
  let t2;
53
- let t3;
54
- let t4;
44
+ if ($[0] !== largerText) {
45
+ t2 = chatTextSize("body", largerText);
46
+ $[0] = largerText;
47
+ $[1] = t2;
48
+ } else {
49
+ t2 = $[1];
50
+ }
51
+ const body = t2;
52
+ if (!open || anchor === null) {
53
+ return null;
54
+ }
55
+ const t3 = menu.actions.length * rowHeight;
56
+ const t4 = menu.reactions !== undefined;
55
57
  let t5;
58
+ if ($[2] !== anchor || $[3] !== insets || $[4] !== t3 || $[5] !== t4 || $[6] !== window) {
59
+ t5 = messageContextMenuLayout({
60
+ anchor,
61
+ window,
62
+ insets,
63
+ menuHeight: t3,
64
+ hasReactions: t4
65
+ });
66
+ $[2] = anchor;
67
+ $[3] = insets;
68
+ $[4] = t3;
69
+ $[5] = t4;
70
+ $[6] = window;
71
+ $[7] = t5;
72
+ } else {
73
+ t5 = $[7];
74
+ }
75
+ const layout = t5;
56
76
  let t6;
77
+ if ($[8] !== onClose) {
78
+ t6 = action => {
79
+ onClose();
80
+ action();
81
+ };
82
+ $[8] = onClose;
83
+ $[9] = t6;
84
+ } else {
85
+ t6 = $[9];
86
+ }
87
+ const run = t6;
57
88
  let t7;
89
+ if ($[10] !== align || $[11] !== anchor.width || $[12] !== anchor.x || $[13] !== window.width) {
90
+ t7 = width => align === "end" ? {
91
+ left: Math.max(MESSAGE_MENU.edge, Math.min(anchor.x + anchor.width, window.width - MESSAGE_MENU.edge) - width)
92
+ } : {
93
+ left: Math.max(MESSAGE_MENU.edge, Math.min(anchor.x, window.width - MESSAGE_MENU.edge - width))
94
+ };
95
+ $[10] = align;
96
+ $[11] = anchor.width;
97
+ $[12] = anchor.x;
98
+ $[13] = window.width;
99
+ $[14] = t7;
100
+ } else {
101
+ t7 = $[14];
102
+ }
103
+ const side = t7;
104
+ const surface = tokens.color.surface[scheme];
58
105
  let t8;
59
- let t9;
60
- if ($[0] !== align || $[1] !== anchor || $[2] !== insets || $[3] !== largerText || $[4] !== menu || $[5] !== onClose || $[6] !== open || $[7] !== preview || $[8] !== reduceMotion || $[9] !== rowHeight || $[10] !== scheme || $[11] !== testID || $[12] !== window) {
61
- t17 = Symbol.for("react.early_return_sentinel");
62
- bb0: {
63
- const body = chatTextSize("body", largerText);
64
- if (!open || anchor === null) {
65
- t17 = null;
66
- break bb0;
67
- }
68
- const t18 = menu.actions.length * rowHeight;
69
- const t19 = menu.reactions !== undefined;
70
- let t20;
71
- if ($[32] !== anchor || $[33] !== insets || $[34] !== t18 || $[35] !== t19 || $[36] !== window) {
72
- t20 = messageContextMenuLayout({
73
- anchor,
74
- window,
75
- insets,
76
- menuHeight: t18,
77
- hasReactions: t19
78
- });
79
- $[32] = anchor;
80
- $[33] = insets;
81
- $[34] = t18;
82
- $[35] = t19;
83
- $[36] = window;
84
- $[37] = t20;
85
- } else {
86
- t20 = $[37];
87
- }
88
- const layout = t20;
89
- let t21;
90
- if ($[38] !== onClose) {
91
- t21 = action => {
92
- onClose();
93
- action();
94
- };
95
- $[38] = onClose;
96
- $[39] = t21;
97
- } else {
98
- t21 = $[39];
99
- }
100
- const run = t21;
101
- let t22;
102
- if ($[40] !== align || $[41] !== anchor.width || $[42] !== anchor.x || $[43] !== window.width) {
103
- t22 = width => align === "end" ? {
104
- left: Math.max(MESSAGE_MENU.edge, Math.min(anchor.x + anchor.width, window.width - MESSAGE_MENU.edge) - width)
105
- } : {
106
- left: Math.max(MESSAGE_MENU.edge, Math.min(anchor.x, window.width - MESSAGE_MENU.edge - width))
107
- };
108
- $[40] = align;
109
- $[41] = anchor.width;
110
- $[42] = anchor.x;
111
- $[43] = window.width;
112
- $[44] = t22;
113
- } else {
114
- t22 = $[44];
115
- }
116
- const side = t22;
117
- const surface = tokens.color.surface[scheme];
118
- let t23;
119
- if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
120
- t23 = {
121
- shadowColor: "#000",
122
- shadowOpacity: 0.18,
123
- shadowRadius: 16,
124
- shadowOffset: {
125
- width: 0,
126
- height: 6
127
- },
128
- elevation: 8
129
- };
130
- $[45] = t23;
131
- } else {
132
- t23 = $[45];
133
- }
134
- const shadow = t23;
135
- const pillWidth = Math.min(window.width - 2 * MESSAGE_MENU.edge, (menu.reactions?.items.length ?? 0) * 48 + 16);
136
- T2 = Modal;
137
- t12 = true;
138
- t13 = true;
139
- t14 = reduceMotion ? "none" : "fade";
140
- t15 = true;
141
- t16 = onClose;
142
- T1 = View;
143
- if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
144
- t5 = {
145
- flex: 1
146
- };
147
- $[46] = t5;
148
- } else {
149
- t5 = $[46];
150
- }
151
- t6 = testID;
152
- t7 = true;
153
- t8 = onClose;
154
- const t24 = `${testID}-backdrop`;
155
- const t25 = tokens.color.background[scheme];
156
- let t26;
157
- if ($[47] !== t25) {
158
- t26 = withAlpha(t25, 0.85);
159
- $[47] = t25;
160
- $[48] = t26;
161
- } else {
162
- t26 = $[48];
163
- }
164
- let t27;
165
- if ($[49] !== t26) {
166
- t27 = [StyleSheet.absoluteFill, {
167
- backgroundColor: t26
168
- }];
169
- $[49] = t26;
170
- $[50] = t27;
171
- } else {
172
- t27 = $[50];
173
- }
174
- if ($[51] !== onClose || $[52] !== t24 || $[53] !== t27) {
175
- t9 = <View style={StyleSheet.absoluteFill}><Pressable testID={t24} accessibilityRole="button" accessibilityLabel="Close menu" onPress={onClose} style={t27} /></View>;
176
- $[51] = onClose;
177
- $[52] = t24;
178
- $[53] = t27;
179
- $[54] = t9;
180
- } else {
181
- t9 = $[54];
182
- }
183
- const t28 = tokens.color.background[scheme];
184
- let t29;
185
- if ($[55] !== anchor.width || $[56] !== anchor.x || $[57] !== layout.previewHeight || $[58] !== layout.previewTop || $[59] !== t28) {
186
- t29 = {
187
- position: "absolute",
188
- top: layout.previewTop,
189
- left: anchor.x,
190
- width: anchor.width,
191
- height: layout.previewHeight,
192
- overflow: "hidden",
193
- backgroundColor: t28,
194
- borderRadius: tokens.radius.card,
195
- ...shadow
196
- };
197
- $[55] = anchor.width;
198
- $[56] = anchor.x;
199
- $[57] = layout.previewHeight;
200
- $[58] = layout.previewTop;
201
- $[59] = t28;
202
- $[60] = t29;
203
- } else {
204
- t29 = $[60];
205
- }
206
- if ($[61] !== preview || $[62] !== t29) {
207
- t10 = <View pointerEvents="none" style={t29}>{preview}</View>;
208
- $[61] = preview;
209
- $[62] = t29;
210
- $[63] = t10;
211
- } else {
212
- t10 = $[63];
213
- }
214
- if ($[64] !== layout.pillTop || $[65] !== menu.reactions || $[66] !== pillWidth || $[67] !== run || $[68] !== scheme || $[69] !== side || $[70] !== surface || $[71] !== testID) {
215
- t11 = menu.reactions ? <View accessibilityRole="toolbar" style={{
216
- position: "absolute",
217
- top: layout.pillTop,
218
- ...side(pillWidth),
219
- height: MESSAGE_MENU.pillHeight,
220
- borderRadius: MESSAGE_MENU.pillHeight / 2,
221
- backgroundColor: surface,
222
- ...shadow
223
- }} className="flex-row items-center px-2">{menu.reactions.items.map(item => {
224
- const selected = item.selected === true;
225
- return <Pressable key={item.key} testID={`${testID}-reaction-${item.key}`} accessibilityRole="button" accessibilityLabel={item.label} accessibilityState={{
226
- selected
227
- }} onPress={() => run(() => menu.reactions?.onPress(item.key))} className="size-11 items-center justify-center rounded-full active:opacity-70" style={{
228
- marginHorizontal: 2,
229
- backgroundColor: selected ? withAlpha(palette.primary[scheme], 0.12) : "transparent"
230
- }}>{item.render(selected)}</Pressable>;
231
- })}</View> : null;
232
- $[64] = layout.pillTop;
233
- $[65] = menu.reactions;
234
- $[66] = pillWidth;
235
- $[67] = run;
236
- $[68] = scheme;
237
- $[69] = side;
238
- $[70] = surface;
239
- $[71] = testID;
240
- $[72] = t11;
241
- } else {
242
- t11 = $[72];
243
- }
244
- T0 = View;
245
- t2 = "menu";
246
- const t30 = layout.menuTop;
247
- let t31;
248
- if ($[73] !== side) {
249
- t31 = side(MESSAGE_MENU.menuWidth);
250
- $[73] = side;
251
- $[74] = t31;
252
- } else {
253
- t31 = $[74];
254
- }
255
- const t32 = window.width - 2 * MESSAGE_MENU.edge;
256
- if ($[75] !== layout.menuTop || $[76] !== surface || $[77] !== t31 || $[78] !== t32) {
257
- t3 = {
258
- position: "absolute",
259
- top: t30,
260
- ...t31,
261
- width: MESSAGE_MENU.menuWidth,
262
- maxWidth: t32,
263
- borderRadius: tokens.radius.card,
264
- backgroundColor: surface,
265
- overflow: "hidden",
266
- ...shadow
267
- };
268
- $[75] = layout.menuTop;
269
- $[76] = surface;
270
- $[77] = t31;
271
- $[78] = t32;
272
- $[79] = t3;
273
- } else {
274
- t3 = $[79];
275
- }
276
- t4 = menu.actions.map((action_0, index) => {
277
- const Icon = action_0.icon;
278
- const color = action_0.destructive ? palette.danger[scheme] : tokens.color.foreground[scheme];
279
- return <Pressable key={action_0.key} testID={`${testID}-action-${action_0.key}`} accessibilityRole="menuitem" accessibilityLabel={action_0.label} accessibilityState={{
280
- disabled: action_0.disabled === true
281
- }} disabled={action_0.disabled === true} onPress={() => run(action_0.onPress)} className="flex-row items-center gap-3 px-4 active:opacity-70" style={[{
282
- minHeight: rowHeight,
283
- opacity: action_0.disabled ? 0.5 : 1
284
- }, index > 0 && {
285
- borderTopWidth: StyleSheet.hairlineWidth,
286
- borderTopColor: tokens.color.separator[scheme]
287
- }]}><Text numberOfLines={1} className={cn(body, "min-w-0 flex-1 font-instrument-sans")} style={[sizeStyle(body), typeStyle("medium"), {
288
- color
289
- }]}>{action_0.label}</Text>{Icon ? <Icon size={largerText ? 22 : 20} color={color} /> : null}</Pressable>;
290
- });
291
- }
292
- $[0] = align;
293
- $[1] = anchor;
294
- $[2] = insets;
295
- $[3] = largerText;
296
- $[4] = menu;
297
- $[5] = onClose;
298
- $[6] = open;
299
- $[7] = preview;
300
- $[8] = reduceMotion;
301
- $[9] = rowHeight;
302
- $[10] = scheme;
303
- $[11] = testID;
304
- $[12] = window;
305
- $[13] = T0;
306
- $[14] = T1;
307
- $[15] = T2;
106
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
107
+ t8 = {
108
+ shadowColor: "#000",
109
+ shadowOpacity: 0.18,
110
+ shadowRadius: 16,
111
+ shadowOffset: {
112
+ width: 0,
113
+ height: 6
114
+ },
115
+ elevation: 8
116
+ };
117
+ $[15] = t8;
118
+ } else {
119
+ t8 = $[15];
120
+ }
121
+ const shadow = t8;
122
+ const pillWidth = Math.min(window.width - 2 * MESSAGE_MENU.edge, (menu.reactions?.items.length ?? 0) * 48 + 16);
123
+ const t9 = reduceMotion ? "none" : "fade";
124
+ let t10;
125
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
126
+ t10 = {
127
+ flex: 1
128
+ };
308
129
  $[16] = t10;
309
- $[17] = t11;
310
- $[18] = t12;
130
+ } else {
131
+ t10 = $[16];
132
+ }
133
+ const t11 = `${testID}-backdrop`;
134
+ const t12 = tokens.color.background[scheme];
135
+ let t13;
136
+ if ($[17] !== t12) {
137
+ t13 = withAlpha(t12, 0.85);
138
+ $[17] = t12;
139
+ $[18] = t13;
140
+ } else {
141
+ t13 = $[18];
142
+ }
143
+ let t14;
144
+ if ($[19] !== t13) {
145
+ t14 = [StyleSheet.absoluteFill, {
146
+ backgroundColor: t13
147
+ }];
311
148
  $[19] = t13;
312
149
  $[20] = t14;
313
- $[21] = t15;
314
- $[22] = t16;
315
- $[23] = t17;
316
- $[24] = t2;
317
- $[25] = t3;
318
- $[26] = t4;
319
- $[27] = t5;
320
- $[28] = t6;
321
- $[29] = t7;
322
- $[30] = t8;
323
- $[31] = t9;
324
150
  } else {
325
- T0 = $[13];
326
- T1 = $[14];
327
- T2 = $[15];
328
- t10 = $[16];
329
- t11 = $[17];
330
- t12 = $[18];
331
- t13 = $[19];
332
151
  t14 = $[20];
333
- t15 = $[21];
334
- t16 = $[22];
335
- t17 = $[23];
336
- t2 = $[24];
337
- t3 = $[25];
338
- t4 = $[26];
339
- t5 = $[27];
340
- t6 = $[28];
341
- t7 = $[29];
342
- t8 = $[30];
343
- t9 = $[31];
344
152
  }
345
- if (t17 !== Symbol.for("react.early_return_sentinel")) {
346
- return t17;
153
+ let t15;
154
+ if ($[21] !== onClose || $[22] !== t11 || $[23] !== t14) {
155
+ t15 = <View style={StyleSheet.absoluteFill}><Pressable testID={t11} accessibilityRole="button" accessibilityLabel="Close menu" onPress={onClose} style={t14} /></View>;
156
+ $[21] = onClose;
157
+ $[22] = t11;
158
+ $[23] = t14;
159
+ $[24] = t15;
160
+ } else {
161
+ t15 = $[24];
162
+ }
163
+ const t16 = tokens.color.background[scheme];
164
+ let t17;
165
+ if ($[25] !== anchor.width || $[26] !== anchor.x || $[27] !== layout.previewHeight || $[28] !== layout.previewTop || $[29] !== t16) {
166
+ t17 = {
167
+ position: "absolute",
168
+ top: layout.previewTop,
169
+ left: anchor.x,
170
+ width: anchor.width,
171
+ height: layout.previewHeight,
172
+ overflow: "hidden",
173
+ backgroundColor: t16,
174
+ borderRadius: tokens.radius.card,
175
+ ...shadow
176
+ };
177
+ $[25] = anchor.width;
178
+ $[26] = anchor.x;
179
+ $[27] = layout.previewHeight;
180
+ $[28] = layout.previewTop;
181
+ $[29] = t16;
182
+ $[30] = t17;
183
+ } else {
184
+ t17 = $[30];
347
185
  }
348
186
  let t18;
349
- if ($[80] !== T0 || $[81] !== t2 || $[82] !== t3 || $[83] !== t4) {
350
- t18 = <T0 accessibilityRole={t2} style={t3}>{t4}</T0>;
351
- $[80] = T0;
352
- $[81] = t2;
353
- $[82] = t3;
354
- $[83] = t4;
355
- $[84] = t18;
187
+ if ($[31] !== preview || $[32] !== t17) {
188
+ t18 = <View pointerEvents="none" style={t17}>{preview}</View>;
189
+ $[31] = preview;
190
+ $[32] = t17;
191
+ $[33] = t18;
356
192
  } else {
357
- t18 = $[84];
193
+ t18 = $[33];
358
194
  }
359
195
  let t19;
360
- if ($[85] !== T1 || $[86] !== t10 || $[87] !== t11 || $[88] !== t18 || $[89] !== t5 || $[90] !== t6 || $[91] !== t7 || $[92] !== t8 || $[93] !== t9) {
361
- t19 = <T1 style={t5} testID={t6} accessibilityViewIsModal={t7} onAccessibilityEscape={t8}>{t9}{t10}{t11}{t18}</T1>;
362
- $[85] = T1;
363
- $[86] = t10;
364
- $[87] = t11;
365
- $[88] = t18;
366
- $[89] = t5;
367
- $[90] = t6;
368
- $[91] = t7;
369
- $[92] = t8;
370
- $[93] = t9;
371
- $[94] = t19;
196
+ if ($[34] !== layout.pillTop || $[35] !== menu.reactions || $[36] !== pillWidth || $[37] !== run || $[38] !== scheme || $[39] !== side || $[40] !== surface || $[41] !== testID) {
197
+ t19 = menu.reactions ? <View accessibilityRole="toolbar" style={{
198
+ position: "absolute",
199
+ top: layout.pillTop,
200
+ ...side(pillWidth),
201
+ height: MESSAGE_MENU.pillHeight,
202
+ borderRadius: MESSAGE_MENU.pillHeight / 2,
203
+ backgroundColor: surface,
204
+ ...shadow
205
+ }} className="flex-row items-center px-2">{menu.reactions.items.map(item => {
206
+ const selected = item.selected === true;
207
+ return <Pressable key={item.key} testID={`${testID}-reaction-${item.key}`} accessibilityRole="button" accessibilityLabel={item.label} accessibilityState={{
208
+ selected
209
+ }} onPress={() => run(() => menu.reactions?.onPress(item.key))} className="size-11 items-center justify-center rounded-full active:opacity-70" style={{
210
+ marginHorizontal: 2,
211
+ backgroundColor: selected ? withAlpha(palette.primary[scheme], 0.12) : "transparent"
212
+ }}>{item.render(selected)}</Pressable>;
213
+ })}</View> : null;
214
+ $[34] = layout.pillTop;
215
+ $[35] = menu.reactions;
216
+ $[36] = pillWidth;
217
+ $[37] = run;
218
+ $[38] = scheme;
219
+ $[39] = side;
220
+ $[40] = surface;
221
+ $[41] = testID;
222
+ $[42] = t19;
223
+ } else {
224
+ t19 = $[42];
225
+ }
226
+ const t20 = layout.menuTop;
227
+ let t21;
228
+ if ($[43] !== side) {
229
+ t21 = side(MESSAGE_MENU.menuWidth);
230
+ $[43] = side;
231
+ $[44] = t21;
372
232
  } else {
373
- t19 = $[94];
233
+ t21 = $[44];
374
234
  }
375
- let t20;
376
- if ($[95] !== T2 || $[96] !== t12 || $[97] !== t13 || $[98] !== t14 || $[99] !== t15 || $[100] !== t16 || $[101] !== t19) {
377
- t20 = <T2 visible={t12} transparent={t13} animationType={t14} statusBarTranslucent={t15} onRequestClose={t16}>{t19}</T2>;
378
- $[95] = T2;
379
- $[96] = t12;
380
- $[97] = t13;
381
- $[98] = t14;
382
- $[99] = t15;
383
- $[100] = t16;
384
- $[101] = t19;
385
- $[102] = t20;
235
+ const t22 = window.width - 2 * MESSAGE_MENU.edge;
236
+ let t23;
237
+ if ($[45] !== layout.menuTop || $[46] !== surface || $[47] !== t21 || $[48] !== t22) {
238
+ t23 = {
239
+ position: "absolute",
240
+ top: t20,
241
+ ...t21,
242
+ width: MESSAGE_MENU.menuWidth,
243
+ maxWidth: t22,
244
+ borderRadius: tokens.radius.card,
245
+ backgroundColor: surface,
246
+ overflow: "hidden",
247
+ ...shadow
248
+ };
249
+ $[45] = layout.menuTop;
250
+ $[46] = surface;
251
+ $[47] = t21;
252
+ $[48] = t22;
253
+ $[49] = t23;
254
+ } else {
255
+ t23 = $[49];
256
+ }
257
+ let t24;
258
+ if ($[50] !== body || $[51] !== largerText || $[52] !== menu.actions || $[53] !== rowHeight || $[54] !== run || $[55] !== testID) {
259
+ let t25;
260
+ if ($[57] !== body || $[58] !== largerText || $[59] !== rowHeight || $[60] !== run || $[61] !== testID) {
261
+ t25 = (action_0, index) => <MenuCardRow key={action_0.key} testID={`${testID}-action-${action_0.key}`} action={action_0} first={index === 0} rowHeight={rowHeight} body={body} iconSize={largerText ? 22 : 20} onPress={() => run(action_0.onPress)} />;
262
+ $[57] = body;
263
+ $[58] = largerText;
264
+ $[59] = rowHeight;
265
+ $[60] = run;
266
+ $[61] = testID;
267
+ $[62] = t25;
268
+ } else {
269
+ t25 = $[62];
270
+ }
271
+ t24 = menu.actions.map(t25);
272
+ $[50] = body;
273
+ $[51] = largerText;
274
+ $[52] = menu.actions;
275
+ $[53] = rowHeight;
276
+ $[54] = run;
277
+ $[55] = testID;
278
+ $[56] = t24;
279
+ } else {
280
+ t24 = $[56];
281
+ }
282
+ let t25;
283
+ if ($[63] !== t23 || $[64] !== t24) {
284
+ t25 = <View accessibilityRole="menu" style={t23}>{t24}</View>;
285
+ $[63] = t23;
286
+ $[64] = t24;
287
+ $[65] = t25;
288
+ } else {
289
+ t25 = $[65];
290
+ }
291
+ let t26;
292
+ if ($[66] !== onClose || $[67] !== t15 || $[68] !== t18 || $[69] !== t19 || $[70] !== t25 || $[71] !== testID) {
293
+ t26 = <View style={t10} testID={testID} accessibilityViewIsModal={true} onAccessibilityEscape={onClose}>{t15}{t18}{t19}{t25}</View>;
294
+ $[66] = onClose;
295
+ $[67] = t15;
296
+ $[68] = t18;
297
+ $[69] = t19;
298
+ $[70] = t25;
299
+ $[71] = testID;
300
+ $[72] = t26;
301
+ } else {
302
+ t26 = $[72];
303
+ }
304
+ let t27;
305
+ if ($[73] !== onClose || $[74] !== onDismissed || $[75] !== t26 || $[76] !== t9) {
306
+ t27 = <Modal visible={true} transparent={true} animationType={t9} statusBarTranslucent={true} onRequestClose={onClose} onDismiss={onDismissed}>{t26}</Modal>;
307
+ $[73] = onClose;
308
+ $[74] = onDismissed;
309
+ $[75] = t26;
310
+ $[76] = t9;
311
+ $[77] = t27;
312
+ } else {
313
+ t27 = $[77];
314
+ }
315
+ return t27;
316
+ }
317
+
318
+ /**
319
+ * One card row: label first, icon last. While pressed it takes the
320
+ * `SheetRow` pressed fill, so the finger sees which row it is on.
321
+ */
322
+ function MenuCardRow(t0) {
323
+ const $ = _c(41);
324
+ const {
325
+ testID,
326
+ action,
327
+ first,
328
+ rowHeight,
329
+ body,
330
+ iconSize,
331
+ onPress
332
+ } = t0;
333
+ const scheme = useScheme();
334
+ const press = usePressed();
335
+ const disabled = action.disabled === true;
336
+ const Icon = action.icon;
337
+ const color = action.destructive ? palette.danger[scheme] : tokens.color.foreground[scheme];
338
+ const t1 = action.label;
339
+ let t2;
340
+ if ($[0] !== disabled) {
341
+ t2 = {
342
+ disabled
343
+ };
344
+ $[0] = disabled;
345
+ $[1] = t2;
346
+ } else {
347
+ t2 = $[1];
348
+ }
349
+ const t3 = press.onPressIn;
350
+ const t4 = press.onPressOut;
351
+ const t5 = disabled ? 0.5 : 1;
352
+ const t6 = press.pressed && !disabled ? palette.default[scheme] : "transparent";
353
+ let t7;
354
+ if ($[2] !== rowHeight || $[3] !== t5 || $[4] !== t6) {
355
+ t7 = {
356
+ minHeight: rowHeight,
357
+ opacity: t5,
358
+ backgroundColor: t6
359
+ };
360
+ $[2] = rowHeight;
361
+ $[3] = t5;
362
+ $[4] = t6;
363
+ $[5] = t7;
364
+ } else {
365
+ t7 = $[5];
366
+ }
367
+ let t8;
368
+ if ($[6] !== first || $[7] !== scheme) {
369
+ t8 = !first && {
370
+ borderTopWidth: StyleSheet.hairlineWidth,
371
+ borderTopColor: tokens.color.separator[scheme]
372
+ };
373
+ $[6] = first;
374
+ $[7] = scheme;
375
+ $[8] = t8;
376
+ } else {
377
+ t8 = $[8];
378
+ }
379
+ let t9;
380
+ if ($[9] !== t7 || $[10] !== t8) {
381
+ t9 = [t7, t8];
382
+ $[9] = t7;
383
+ $[10] = t8;
384
+ $[11] = t9;
385
+ } else {
386
+ t9 = $[11];
387
+ }
388
+ let t10;
389
+ if ($[12] !== body) {
390
+ t10 = cn(body, "min-w-0 flex-1 font-instrument-sans");
391
+ $[12] = body;
392
+ $[13] = t10;
393
+ } else {
394
+ t10 = $[13];
395
+ }
396
+ let t11;
397
+ if ($[14] !== body) {
398
+ t11 = sizeStyle(body);
399
+ $[14] = body;
400
+ $[15] = t11;
401
+ } else {
402
+ t11 = $[15];
403
+ }
404
+ let t12;
405
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
406
+ t12 = typeStyle("medium");
407
+ $[16] = t12;
408
+ } else {
409
+ t12 = $[16];
410
+ }
411
+ let t13;
412
+ if ($[17] !== color) {
413
+ t13 = {
414
+ color
415
+ };
416
+ $[17] = color;
417
+ $[18] = t13;
418
+ } else {
419
+ t13 = $[18];
420
+ }
421
+ let t14;
422
+ if ($[19] !== t11 || $[20] !== t13) {
423
+ t14 = [t11, t12, t13];
424
+ $[19] = t11;
425
+ $[20] = t13;
426
+ $[21] = t14;
427
+ } else {
428
+ t14 = $[21];
429
+ }
430
+ let t15;
431
+ if ($[22] !== action.label || $[23] !== t10 || $[24] !== t14) {
432
+ t15 = <Text numberOfLines={1} className={t10} style={t14}>{action.label}</Text>;
433
+ $[22] = action.label;
434
+ $[23] = t10;
435
+ $[24] = t14;
436
+ $[25] = t15;
437
+ } else {
438
+ t15 = $[25];
439
+ }
440
+ let t16;
441
+ if ($[26] !== Icon || $[27] !== color || $[28] !== iconSize) {
442
+ t16 = Icon ? <Icon size={iconSize} color={color} /> : null;
443
+ $[26] = Icon;
444
+ $[27] = color;
445
+ $[28] = iconSize;
446
+ $[29] = t16;
447
+ } else {
448
+ t16 = $[29];
449
+ }
450
+ let t17;
451
+ if ($[30] !== action.label || $[31] !== disabled || $[32] !== onPress || $[33] !== press.onPressIn || $[34] !== press.onPressOut || $[35] !== t15 || $[36] !== t16 || $[37] !== t2 || $[38] !== t9 || $[39] !== testID) {
452
+ t17 = <Pressable testID={testID} accessibilityRole="menuitem" accessibilityLabel={t1} accessibilityState={t2} disabled={disabled} onPress={onPress} onPressIn={t3} onPressOut={t4} className="flex-row items-center gap-3 px-4" style={t9}>{t15}{t16}</Pressable>;
453
+ $[30] = action.label;
454
+ $[31] = disabled;
455
+ $[32] = onPress;
456
+ $[33] = press.onPressIn;
457
+ $[34] = press.onPressOut;
458
+ $[35] = t15;
459
+ $[36] = t16;
460
+ $[37] = t2;
461
+ $[38] = t9;
462
+ $[39] = testID;
463
+ $[40] = t17;
386
464
  } else {
387
- t20 = $[102];
465
+ t17 = $[40];
388
466
  }
389
- return t20;
467
+ return t17;
390
468
  }