@adminide-stack/yantra-mobile 12.0.148-alpha.0 → 12.0.149-alpha.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 (25) hide show
  1. package/lib/features/webbuilder/WebBuilderExperience.js +38 -56
  2. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  3. package/lib/features/webbuilder/buildFragments.js +4 -4
  4. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  5. package/lib/features/webbuilder/components/PreviewScreen.js +28 -2
  6. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  7. package/lib/features/webbuilder/components/ProjectChat.js +190 -85
  8. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  9. package/lib/features/webbuilder/components/ProjectSheets.js +10 -4
  10. package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -1
  11. package/lib/features/webbuilder/components/PublishSheet.js +90 -14
  12. package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
  13. package/lib/features/webbuilder/components/ui.js +9 -2
  14. package/lib/features/webbuilder/components/ui.js.map +1 -1
  15. package/lib/features/webbuilder/followUps.js +19 -1
  16. package/lib/features/webbuilder/followUps.js.map +1 -1
  17. package/lib/features/webbuilder/webbuilderPrompts.js +3 -2
  18. package/lib/features/webbuilder/webbuilderPrompts.js.map +1 -1
  19. package/lib/hooks/useChatApi.js +4 -3
  20. package/lib/hooks/useChatApi.js.map +1 -1
  21. package/lib/screens/WebBuilderNative/agentBusyRetry.js +24 -0
  22. package/lib/screens/WebBuilderNative/agentBusyRetry.js.map +1 -0
  23. package/lib/screens/WebBuilderNative/useWebBuilderHost.js +166 -44
  24. package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
  25. package/package.json +4 -4
@@ -1,4 +1,6 @@
1
1
  import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useMemo,useState,useCallback,useRef,useEffect}from'react';import {StyleSheet,Keyboard,BackHandler,View,Text,Share,Linking,Alert}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {GestureHandlerRootView}from'react-native-gesture-handler';import {useSafeInsets}from'../canvas/withRemoteSafeArea.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {Tap,DIM}from'../inbox/components/Tap.js';import {isBareSeed,studioTurnText,brandKitNote,siteScoreTurn}from'./studioCatalog.js';import {titleFromPrompt}from'./buildFragments.js';import {useBrandKit}from'./brandKitStorage.js';import {parseToolActivity}from'../chat/toolActivity.js';import {friendlySteps,firstContentLanded}from'./stepLabels.js';import {restoreTurnNote}from'./webbuilderPrompts.js';import {webbuilderTheme}from'./webbuilderTheme.js';import {BrandKitSheet}from'./components/BrandKitSheet.js';import {CodeView}from'./components/CodeView.js';import {ProjectChat}from'./components/ProjectChat.js';import {ViewportToggle,PreviewScreen,ViewPicker}from'./components/PreviewScreen.js';import {PublishSheet}from'./components/PublishSheet.js';import {BOTTOM_TABS_SPACE,BottomTabs}from'./components/BottomTabs.js';import {SiteScoreSheet}from'./components/SiteScoreSheet.js';import {ProjectsScreen}from'./components/ProjectsScreen.js';import {TemplatesSheet}from'./components/TemplatesSheet.js';import {StudioHome}from'./components/StudioHome.js';import {VersionsSheet}from'./components/VersionsSheet.js';import {IconButton,Sheet,Toast}from'./components/ui.js';import {exportTurn,exportMessage}from'./exportCode.js';import {ownCloudflareTurn}from'./publishTools.js';import {ProjectMenuSheet,ProjectSettingsSheet,GithubPushSheet,IntegrationsSheet,ImportProjectSheet}from'./components/ProjectSheets.js';import {demoVideoSource,webbuilderDemoHandoff,encodeCodezenHandoff}from'./codezenHandoff.js';var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
17
20
  const TOAST_MS = 2400;
18
21
  const TOAST_ACTION_MS = 6e3;
19
22
  const PUBLISH_WATCH_MS = 10 * 60 * 1e3;
@@ -47,15 +50,13 @@ function WebBuilderExperience({
47
50
  onRestorePreview,
48
51
  goneSandboxIds,
49
52
  onOpenCodezen,
50
- onUndo,
51
- onRedo,
52
53
  onDownloadCode,
53
54
  publishTools,
54
55
  projectTools,
55
56
  code,
56
57
  initialAgentSeed = null
57
58
  }) {
58
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
59
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
59
60
  const appTheme = useAppTheme();
60
61
  const isDark = hostIsDark != null ? hostIsDark : appTheme.isDark;
61
62
  const theme = useMemo(() => webbuilderTheme(isDark), [isDark]);
@@ -247,31 +248,46 @@ ${restoreTurnNote({
247
248
  const [versionsOpen, setVersionsOpen] = useState(false);
248
249
  const [publishStarted, setPublishStarted] = useState(null);
249
250
  useEffect(() => setPublishStarted(null), [activeChannelId]);
251
+ const siteLive = (_d = (_c = builds.find((b) => b.liveUrl)) == null ? void 0 : _c.liveUrl) != null ? _d : null;
250
252
  useEffect(() => {
251
253
  if (!publishStarted) return;
252
- const target = builds.find((b) => b.key === publishStarted.key);
253
- if ((target == null ? void 0 : target.liveUrl) && target.liveUrl !== publishStarted.live) {
254
+ if (siteLive && siteLive !== publishStarted.live) {
254
255
  setPublishStarted(null);
255
256
  showToast("Your site is live");
256
257
  }
257
- }, [builds, publishStarted, showToast]);
258
+ }, [siteLive, publishStarted, showToast]);
259
+ const agentWorking = Boolean(hostChat == null ? void 0 : hostChat.busy);
260
+ useEffect(() => {
261
+ if (!(publishStarted == null ? void 0 : publishStarted.agent)) return;
262
+ if (agentWorking && !publishStarted.seenBusy) {
263
+ setPublishStarted(__spreadProps(__spreadValues({}, publishStarted), {
264
+ seenBusy: true
265
+ }));
266
+ return;
267
+ }
268
+ if (!agentWorking && publishStarted.seenBusy && !(siteLive && siteLive !== publishStarted.live)) {
269
+ setPublishStarted(null);
270
+ showToast("Publishing didn't finish - the chat says why.");
271
+ }
272
+ }, [agentWorking, publishStarted, siteLive, showToast]);
258
273
  const publishing = publishingOnChat || Boolean(publishStarted && Date.now() - publishStarted.at < PUBLISH_WATCH_MS);
259
- const publish = useCallback(async (target, projectName, customDomain) => {
274
+ const publish = useCallback(async (target, projectName, customDomain, force) => {
260
275
  if (!onPublish) return {
261
276
  ok: false,
262
277
  message: "Publishing is not available here."
263
278
  };
264
- const result = await onPublish(target, projectName, customDomain);
279
+ const result = await onPublish(target, projectName, customDomain, force);
265
280
  if (result.ok) {
266
281
  setPublishStarted({
267
282
  key: target.key,
268
- live: target.liveUrl,
269
- at: Date.now()
283
+ live: siteLive,
284
+ at: Date.now(),
285
+ agent: target.origin === "agent"
270
286
  });
271
287
  showToast("Publishing started");
272
288
  }
273
289
  return result;
274
- }, [onPublish, showToast]);
290
+ }, [onPublish, showToast, siteLive]);
275
291
  const back = useCallback(() => {
276
292
  if (activeChannelId && mode !== "chat") {
277
293
  setMode("chat");
@@ -295,7 +311,7 @@ ${restoreTurnNote({
295
311
  });
296
312
  return () => sub.remove();
297
313
  }, [back]);
298
- const live = (_d = (_c = build == null ? void 0 : build.liveUrl) != null ? _c : project == null ? void 0 : project.liveUrl) != null ? _d : null;
314
+ const live = (_f = (_e = build == null ? void 0 : build.liveUrl) != null ? _e : project == null ? void 0 : project.liveUrl) != null ? _f : null;
299
315
  let statusText = "New";
300
316
  let statusTone = theme.muted;
301
317
  if (building || (hostChat == null ? void 0 : hostChat.busy)) {
@@ -323,7 +339,7 @@ ${restoreTurnNote({
323
339
  const coverSteps = friendlySteps(liveSteps);
324
340
  const buildingCover = turnBusy && build && !hadBuildsAtTurnStart.current && !firstContentLanded(liveSteps) ? {
325
341
  title: siteTitle || build.title,
326
- step: (_f = (_e = coverSteps[coverSteps.length - 1]) == null ? void 0 : _e.label) != null ? _f : null
342
+ step: (_h = (_g = coverSteps[coverSteps.length - 1]) == null ? void 0 : _g.label) != null ? _h : null
327
343
  } : null;
328
344
  let publishLabel = "Publish";
329
345
  if (publishing) publishLabel = "Publishing\u2026";
@@ -334,34 +350,6 @@ ${restoreTurnNote({
334
350
  url: shareUrl
335
351
  }).catch(() => void 0);
336
352
  };
337
- const [undoing, setUndoing] = useState(false);
338
- const undoLast = () => {
339
- if (!build || !onUndo || undoing) return;
340
- const target = build;
341
- setUndoing(true);
342
- onUndo(target).then((result) => {
343
- if (result.ok) {
344
- setPreviewNonce((n) => n + 1);
345
- const redo = result.canRedo && onRedo ? () => {
346
- onRedo(target).then((again) => {
347
- if (again.ok) setPreviewNonce((n) => n + 1);
348
- showToast(again.ok ? "Redone" : again.message);
349
- }).catch(() => showToast("Couldn't redo that change."));
350
- } : void 0;
351
- showToast("Undone", redo ? {
352
- label: "Redo",
353
- onPress: redo
354
- } : void 0);
355
- return;
356
- }
357
- if (result.askAgent && hostChat && !hostChat.busy) {
358
- hostChat.send(`Undo the last change to "${siteTitle || target.title || "this site"}"`, void 0, target);
359
- setMode("chat");
360
- return;
361
- }
362
- showToast(result.message);
363
- }).catch(() => showToast("Couldn't undo that change.")).finally(() => setUndoing(false));
364
- };
365
353
  const [menu, setMenu] = useState(null);
366
354
  const chooseMenu = (action) => {
367
355
  setMenu(null);
@@ -420,12 +408,6 @@ ${restoreTurnNote({
420
408
  };
421
409
  const projectMenu = () => {
422
410
  const view = [];
423
- if (mode !== "chat") view.push({
424
- key: "chat",
425
- icon: "message-outline",
426
- label: "Back to the chat",
427
- run: () => setMode("chat")
428
- });
429
411
  if ((build == null ? void 0 : build.previewUrl) && mode !== "preview") {
430
412
  view.push({
431
413
  key: "preview",
@@ -517,7 +499,6 @@ ${restoreTurnNote({
517
499
  }];
518
500
  };
519
501
  const openMore = () => setProjectMenuOpen(true);
520
- const canUndo = Boolean((build == null ? void 0 : build.sandboxId) && onUndo && !building);
521
502
  return /* @__PURE__ */ jsxs(GestureHandlerRootView, { style: [styles.fill, {
522
503
  backgroundColor: theme.screen
523
504
  }], children: [
@@ -536,7 +517,6 @@ ${restoreTurnNote({
536
517
  }], numberOfLines: 1, children: statusText })
537
518
  ] }),
538
519
  /* @__PURE__ */ jsxs(View, { style: [styles.actionPill, floating], children: [
539
- canUndo ? /* @__PURE__ */ jsx(Tap, { onPress: undoLast, disabled: undoing, accessibilityRole: "button", accessibilityLabel: "Undo the last change", style: [styles.pillBtn, undoing && styles.disabled], pressedStyle: DIM, testID: "webbuilder-undo", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "undo-variant", size: 24, color: theme.ink }) }) : null,
540
520
  /* @__PURE__ */ jsx(Tap, { onPress: shareSite, disabled: !shareUrl, accessibilityRole: "button", accessibilityLabel: "Share", style: [styles.pillBtn, !shareUrl && styles.disabled], pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "share-outline", size: 24, color: theme.ink }) }),
541
521
  /* @__PURE__ */ jsx(Tap, { onPress: openMore, accessibilityRole: "button", accessibilityLabel: "More", style: styles.pillBtn, pressedStyle: DIM, testID: "webbuilder-more", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "dots-horizontal", size: 24, color: theme.ink }) })
542
522
  ] })
@@ -546,14 +526,16 @@ ${restoreTurnNote({
546
526
  }], numberOfLines: 1, children: mode === "code" ? "Code" : siteTitle || "Preview" }),
547
527
  /* @__PURE__ */ jsxs(View, { style: [styles.actionPill, floating], children: [
548
528
  mode === "preview" ? /* @__PURE__ */ jsx(ViewportToggle, { viewport, onViewport: setViewport, disabled: !(build == null ? void 0 : build.previewUrl), theme, style: styles.pillBtn }) : null,
549
- canUndo ? /* @__PURE__ */ jsx(Tap, { onPress: undoLast, disabled: undoing, accessibilityRole: "button", accessibilityLabel: "Undo the last change", style: [styles.pillBtn, undoing && styles.disabled], pressedStyle: DIM, testID: "webbuilder-undo", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "undo-variant", size: 24, color: theme.ink }) }) : null,
550
529
  /* @__PURE__ */ jsx(Tap, { onPress: shareSite, disabled: !shareUrl, accessibilityRole: "button", accessibilityLabel: "Share", style: [styles.pillBtn, !shareUrl && styles.disabled], pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "share-outline", size: 24, color: theme.ink }) }),
551
530
  /* @__PURE__ */ jsx(Tap, { onPress: openMore, accessibilityRole: "button", accessibilityLabel: "More", style: styles.pillBtn, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "dots-horizontal", size: 24, color: theme.ink }) })
552
531
  ] })
553
532
  ] })
554
533
  ] }),
555
- mode === "chat" ? /* @__PURE__ */ jsx(ProjectChat, { messages: (_g = hostChat == null ? void 0 : hostChat.messages) != null ? _g : [], streaming: (_h = hostChat == null ? void 0 : hostChat.streaming) != null ? _h : null, busy: Boolean(hostChat == null ? void 0 : hostChat.busy), error: (_i = hostChat == null ? void 0 : hostChat.error) != null ? _i : null, connected: Boolean(hostChat == null ? void 0 : hostChat.connected), building, build, siteTitle: siteTitle || "Your site", onSend: (text, files) => sendToAgent(text, files), onOpenPreview: () => setMode("preview"), onPublish: () => setPublishOpen(true), onPreviewAsleep: () => wakePreview(), previewDown: Boolean(previewTrouble && previewTrouble.kind !== "restoring"), ask: (_j = hostChat == null ? void 0 : hostChat.ask) != null ? _j : null, onAnswerAsk: (formatted) => hostChat == null ? void 0 : hostChat.send(formatted), loading: historyLoading, steering: hostChat == null ? void 0 : hostChat.steering, renderConnectorCard: hostChat == null ? void 0 : hostChat.renderConnectorCard, theme, bottomInset: insets.bottom }) : null,
556
- mode === "preview" ? /* @__PURE__ */ jsx(PreviewScreen, { build, building, loading: buildsLoading, previewNonce, onReload: () => setPreviewNonce((n) => n + 1), onWake: () => wakePreview(), waking, trouble: previewTrouble, onRetry: () => wakePreview(true), onRestore: restoreFromSavedCopy, onAskAiRestore: hostChat ? askAiToRestore : void 0, agentBusy: Boolean(building) || Boolean(hostChat == null ? void 0 : hostChat.busy), steps: liveSteps, onPublish: () => setPublishOpen(true), publishLabel, error: (_k = hostChat == null ? void 0 : hostChat.error) != null ? _k : null, theme, bottomInset: insets.bottom, viewport, unpublished: Boolean(build == null ? void 0 : build.sandboxId) && !(build == null ? void 0 : build.liveUrl), onShowCode: canShowCode ? () => setMode("code") : void 0, buildingCover }) : null,
534
+ mode === "chat" ? /* @__PURE__ */ jsx(ProjectChat, { messages: (_i = hostChat == null ? void 0 : hostChat.messages) != null ? _i : [], streaming: (_j = hostChat == null ? void 0 : hostChat.streaming) != null ? _j : null, busy: Boolean(hostChat == null ? void 0 : hostChat.busy), error: (_k = hostChat == null ? void 0 : hostChat.error) != null ? _k : null, connected: Boolean(hostChat == null ? void 0 : hostChat.connected), building, build, siteTitle: siteTitle || "Your site", onSend: (text, files) => sendToAgent(text, files), onOpenPreview: () => setMode("preview"), onPublish: () => setPublishOpen(true), onPreviewAsleep: () => wakePreview(), previewDown: Boolean(previewTrouble && previewTrouble.kind !== "restoring"), ask: (_l = hostChat == null ? void 0 : hostChat.ask) != null ? _l : null, onAnswerAsk: (formatted) => hostChat == null ? void 0 : hostChat.send(formatted), loading: historyLoading, steering: hostChat == null ? void 0 : hostChat.steering, renderConnectorCard: hostChat == null ? void 0 : hostChat.renderConnectorCard, theme, bottomInset: insets.bottom }) : null,
535
+ mode === "preview" ? /* @__PURE__ */ jsx(PreviewScreen, { build, building, loading: buildsLoading, previewNonce, onReload: () => setPreviewNonce((n) => n + 1), onWake: () => wakePreview(), waking, trouble: previewTrouble, onRetry: () => wakePreview(true), onRestore: restoreFromSavedCopy, onAskAiRestore: hostChat ? askAiToRestore : void 0, agentBusy: Boolean(building) || Boolean(hostChat == null ? void 0 : hostChat.busy), steps: liveSteps, onPublish: () => setPublishOpen(true), publishLabel, error: (_m = hostChat == null ? void 0 : hostChat.error) != null ? _m : null, theme, bottomInset: insets.bottom, viewport, unpublished: Boolean(build == null ? void 0 : build.sandboxId) && !(build == null ? void 0 : build.liveUrl), readSourceFile: code && build ? (path) => code.readFile(build, path, false).then((r) => {
536
+ var _a2;
537
+ return r.ok ? (_a2 = r.content) != null ? _a2 : null : null;
538
+ }) : void 0, onShowCode: canShowCode ? () => setMode("code") : void 0, buildingCover }) : null,
557
539
  mode === "code" ? /* @__PURE__ */ jsxs(View, { style: [styles.fill, {
558
540
  backgroundColor: theme.card,
559
541
  paddingBottom: insets.bottom
@@ -568,7 +550,7 @@ ${restoreTurnNote({
568
550
  color: theme.ink
569
551
  }], numberOfLines: 1, children: "Code" })
570
552
  ] }),
571
- /* @__PURE__ */ jsx(CodeView, { files: (_l = build == null ? void 0 : build.files) != null ? _l : null, build, code, busy: Boolean(building) || Boolean(hostChat == null ? void 0 : hostChat.busy), onWake: build && onResumePreview ? () => onResumePreview(build).then((outcome) => {
553
+ /* @__PURE__ */ jsx(CodeView, { files: (_n = build == null ? void 0 : build.files) != null ? _n : null, build, code, busy: Boolean(building) || Boolean(hostChat == null ? void 0 : hostChat.busy), onWake: build && onResumePreview ? () => onResumePreview(build).then((outcome) => {
572
554
  if (outcome === "ok") setPreviewNonce((n) => n + 1);
573
555
  return outcome;
574
556
  }) : void 0, theme, onAsk: openChat })
@@ -581,7 +563,7 @@ ${restoreTurnNote({
581
563
  /* @__PURE__ */ jsx(View, { style: styles.fill, children: homeTab === "create" ? /* @__PURE__ */ jsx(StudioHome, { draft, onDraft: setDraft, template, onClearTemplate: () => setTemplate(null), onBrowseTemplates: () => setTemplatesOpen(true), brand, onBrand: () => setBrandOpen(true), onSiteScore: () => setScoreOpen(true), onStart: startSite, connecting: startBlocked, startNotice, theme, bottomInset: BOTTOM_TABS_SPACE + insets.bottom }) : /* @__PURE__ */ jsx(ProjectsScreen, { projects, loading: projectsLoading, error: projectsError, hasMore: projectsHasMore, onRefresh: onRefreshProjects, onLoadMore: onLoadMoreProjects, onOpen: (p) => onOpenProject(p.channelId), onNewProject: () => setHomeTab("create"), topInset: insets.top + 12, bottomInset: BOTTOM_TABS_SPACE + insets.bottom, theme }) }),
582
564
  /* @__PURE__ */ jsx(BottomTabs, { tab: homeTab, onTab: setHomeTab, theme, bottomInset: insets.bottom })
583
565
  ] }),
584
- /* @__PURE__ */ jsx(TemplatesSheet, { visible: templatesOpen, onClose: () => setTemplatesOpen(false), templates, loading: templatesLoading, error: templatesError, onReload: onReloadTemplates, selectedId: (_m = template == null ? void 0 : template.id) != null ? _m : null, onPick: pickTemplate, theme }),
566
+ /* @__PURE__ */ jsx(TemplatesSheet, { visible: templatesOpen, onClose: () => setTemplatesOpen(false), templates, loading: templatesLoading, error: templatesError, onReload: onReloadTemplates, selectedId: (_o = template == null ? void 0 : template.id) != null ? _o : null, onPick: pickTemplate, theme }),
585
567
  /* @__PURE__ */ jsx(SiteScoreSheet, { visible: scoreOpen, onClose: () => setScoreOpen(false), blocked: startBlocked, onCheck: (url) => {
586
568
  setScoreOpen(false);
587
569
  onStartProject({
@@ -617,9 +599,9 @@ ${restoreTurnNote({
617
599
  setSelectedKey(picked.key === (latest == null ? void 0 : latest.key) ? null : picked.key);
618
600
  setVersionsOpen(false);
619
601
  }, onClose: () => setVersionsOpen(false), theme }),
620
- /* @__PURE__ */ jsx(Sheet, { visible: menu !== null, title: (_n = menu == null ? void 0 : menu.title) != null ? _n : "", onClose: () => setMenu(null), theme, children: /* @__PURE__ */ jsx(View, { style: [styles.menuList, {
602
+ /* @__PURE__ */ jsx(Sheet, { visible: menu !== null, title: (_p = menu == null ? void 0 : menu.title) != null ? _p : "", onClose: () => setMenu(null), theme, children: /* @__PURE__ */ jsx(View, { style: [styles.menuList, {
621
603
  paddingBottom: insets.bottom + 8
622
- }], children: ((_o = menu == null ? void 0 : menu.actions) != null ? _o : []).map((action) => /* @__PURE__ */ jsx(Tap, { onPress: () => chooseMenu(action), accessibilityRole: "button", style: [styles.menuRow, {
604
+ }], children: ((_q = menu == null ? void 0 : menu.actions) != null ? _q : []).map((action) => /* @__PURE__ */ jsx(Tap, { onPress: () => chooseMenu(action), accessibilityRole: "button", style: [styles.menuRow, {
623
605
  borderBottomColor: theme.border
624
606
  }], pressedStyle: DIM, children: /* @__PURE__ */ jsx(Text, { style: [styles.menuLabel, {
625
607
  color: action.destructive ? theme.crit : theme.ink