@adminide-stack/yantra-mobile 12.0.193 → 12.0.194-alpha.1

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 (132) hide show
  1. package/lib/bridge/handlers/NavigationBridgeHandler.js +6 -9
  2. package/lib/bridge/handlers/NavigationBridgeHandler.js.map +1 -1
  3. package/lib/components/BrandBar/BrandBarBackground.js +27 -0
  4. package/lib/components/BrandBar/BrandBarBackground.js.map +1 -0
  5. package/lib/components/BrandBar/MenuToggle.js +73 -0
  6. package/lib/components/BrandBar/MenuToggle.js.map +1 -0
  7. package/lib/components/CustomDrawer.js +6 -6
  8. package/lib/components/CustomDrawer.js.map +1 -1
  9. package/lib/components/GatewayConnector/GatewayConnector.js +3 -2
  10. package/lib/components/GatewayConnector/GatewayConnector.js.map +1 -1
  11. package/lib/components/GatewayToolbarButtonMobile.js +12 -2
  12. package/lib/components/GatewayToolbarButtonMobile.js.map +1 -1
  13. package/lib/components/NavigationHeader/HeaderChip.js +76 -0
  14. package/lib/components/NavigationHeader/HeaderChip.js.map +1 -0
  15. package/lib/components/NavigationHeader/HeaderSkillsButton.js +4 -3
  16. package/lib/components/NavigationHeader/HeaderSkillsButton.js.map +1 -1
  17. package/lib/components/NavigationHeader/HeaderTasksButton.js +4 -3
  18. package/lib/components/NavigationHeader/HeaderTasksButton.js.map +1 -1
  19. package/lib/components/NavigationHeader/NavigationHeader.js +96 -41
  20. package/lib/components/NavigationHeader/NavigationHeader.js.map +1 -1
  21. package/lib/components/YantraTopBar/YantraTopBar.js +98 -0
  22. package/lib/components/YantraTopBar/YantraTopBar.js.map +1 -0
  23. package/lib/compute.js +18 -25
  24. package/lib/compute.js.map +1 -1
  25. package/lib/features/apps/AppsCatalog.js +7 -4
  26. package/lib/features/apps/AppsCatalog.js.map +1 -1
  27. package/lib/features/apps/MarketplaceGallery.js +6 -3
  28. package/lib/features/apps/MarketplaceGallery.js.map +1 -1
  29. package/lib/features/apps/nativeSurfaceTwin.js +1 -1
  30. package/lib/features/apps/nativeSurfaceTwin.js.map +1 -1
  31. package/lib/features/apps/useMarketplaceApps.js +6 -2
  32. package/lib/features/apps/useMarketplaceApps.js.map +1 -1
  33. package/lib/features/attachments/useImageAttachments.js +44 -1
  34. package/lib/features/attachments/useImageAttachments.js.map +1 -1
  35. package/lib/features/credits/FreeCreditsPhoneStepHost.js +67 -0
  36. package/lib/features/credits/FreeCreditsPhoneStepHost.js.map +1 -0
  37. package/lib/features/credits/freeCredits.js +52 -13
  38. package/lib/features/credits/freeCredits.js.map +1 -1
  39. package/lib/features/credits/freeCreditsPhoneStep.js +55 -0
  40. package/lib/features/credits/freeCreditsPhoneStep.js.map +1 -0
  41. package/lib/features/credits/useFreeCredits.js +29 -3
  42. package/lib/features/credits/useFreeCredits.js.map +1 -1
  43. package/lib/features/links/openInApp.js +3 -6
  44. package/lib/features/links/openInApp.js.map +1 -1
  45. package/lib/features/webbuilder/WebBuilderExperience.js +88 -28
  46. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  47. package/lib/features/webbuilder/appPreview.js +70 -0
  48. package/lib/features/webbuilder/appPreview.js.map +1 -0
  49. package/lib/features/webbuilder/buildFragments.js +33 -12
  50. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  51. package/lib/features/webbuilder/components/AppPhoneSheet.js +127 -0
  52. package/lib/features/webbuilder/components/AppPhoneSheet.js.map +1 -0
  53. package/lib/features/webbuilder/components/BottomTabs.js +32 -21
  54. package/lib/features/webbuilder/components/BottomTabs.js.map +1 -1
  55. package/lib/features/webbuilder/components/Composer.js +144 -47
  56. package/lib/features/webbuilder/components/Composer.js.map +1 -1
  57. package/lib/features/webbuilder/components/PreviewFrame.js +1 -1
  58. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  59. package/lib/features/webbuilder/components/PreviewScreen.js +9 -4
  60. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  61. package/lib/features/webbuilder/components/ProjectSheets.js +76 -22
  62. package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -1
  63. package/lib/features/webbuilder/components/ProjectsScreen.js +30 -12
  64. package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
  65. package/lib/features/webbuilder/components/PublishSheet.js +2 -2
  66. package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
  67. package/lib/features/webbuilder/components/SiteUploadSheet.js +17 -2
  68. package/lib/features/webbuilder/components/SiteUploadSheet.js.map +1 -1
  69. package/lib/features/webbuilder/components/SocialExportPicker.js +253 -0
  70. package/lib/features/webbuilder/components/SocialExportPicker.js.map +1 -0
  71. package/lib/features/webbuilder/components/StudioHome.js +300 -185
  72. package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
  73. package/lib/features/webbuilder/components/TemplateCard.js +13 -5
  74. package/lib/features/webbuilder/components/TemplateCard.js.map +1 -1
  75. package/lib/features/webbuilder/connectorTemplates.js +3 -2
  76. package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
  77. package/lib/features/webbuilder/liveSiteDelete.js +58 -0
  78. package/lib/features/webbuilder/liveSiteDelete.js.map +1 -0
  79. package/lib/features/webbuilder/publishTools.js +3 -1
  80. package/lib/features/webbuilder/publishTools.js.map +1 -1
  81. package/lib/features/webbuilder/socialExportFile.js +84 -0
  82. package/lib/features/webbuilder/socialExportFile.js.map +1 -0
  83. package/lib/features/webbuilder/stepLabels.js +7 -7
  84. package/lib/features/webbuilder/stepLabels.js.map +1 -1
  85. package/lib/features/webbuilder/thumbSources.js +17 -3
  86. package/lib/features/webbuilder/thumbSources.js.map +1 -1
  87. package/lib/features/webbuilder/useVoiceTyping.js +169 -0
  88. package/lib/features/webbuilder/useVoiceTyping.js.map +1 -0
  89. package/lib/features/webbuilder/web/chat/connectRequest.js +17 -0
  90. package/lib/features/webbuilder/web/chat/connectRequest.js.map +1 -0
  91. package/lib/features/webbuilder/web/notify/turnDone.js +20 -0
  92. package/lib/features/webbuilder/web/notify/turnDone.js.map +1 -0
  93. package/lib/features/webbuilder/web/project/coverRequest.js +22 -0
  94. package/lib/features/webbuilder/web/project/coverRequest.js.map +1 -0
  95. package/lib/features/webbuilder/web/project/deleteFlow.js +57 -0
  96. package/lib/features/webbuilder/web/project/deleteFlow.js.map +1 -0
  97. package/lib/features/webbuilder/web/publish/siteAddress.js +5 -1
  98. package/lib/features/webbuilder/web/publish/siteAddress.js.map +1 -1
  99. package/lib/features/webbuilder/web/upload/sitePhotos.js +2 -2
  100. package/lib/features/webbuilder/web/upload/sitePhotos.js.map +1 -1
  101. package/lib/features/webbuilder/web/upload/socialExport.js +191 -0
  102. package/lib/features/webbuilder/web/upload/socialExport.js.map +1 -0
  103. package/lib/features/webbuilder/web/upload/zipRandomAccess.js +64 -0
  104. package/lib/features/webbuilder/web/upload/zipRandomAccess.js.map +1 -0
  105. package/lib/features/webbuilder/web/webServices.js +27 -3
  106. package/lib/features/webbuilder/web/webServices.js.map +1 -1
  107. package/lib/hooks/useHeaderProfile.js +25 -0
  108. package/lib/hooks/useHeaderProfile.js.map +1 -0
  109. package/lib/index.js +1 -1
  110. package/lib/index.js.map +1 -1
  111. package/lib/routes.json +21 -29
  112. package/lib/screens/Account/AccountSheets.js +140 -74
  113. package/lib/screens/Account/AccountSheets.js.map +1 -1
  114. package/lib/screens/Account/index.js +3 -3
  115. package/lib/screens/Account/index.js.map +1 -1
  116. package/lib/screens/Apps/index.js +1 -1
  117. package/lib/screens/Apps/index.js.map +1 -1
  118. package/lib/screens/ChatHistory/index.js +1 -1
  119. package/lib/screens/ChatHistory/index.js.map +1 -1
  120. package/lib/screens/ExpensesNative/index.js +3 -3
  121. package/lib/screens/ExpensesNative/index.js.map +1 -1
  122. package/lib/screens/Home/HomeScreen.js +11 -0
  123. package/lib/screens/Home/HomeScreen.js.map +1 -1
  124. package/lib/screens/Home/components/ChatHistoryLanding.js +3 -2
  125. package/lib/screens/Home/components/ChatHistoryLanding.js.map +1 -1
  126. package/lib/screens/WebBuilderNative/index.js +3 -2
  127. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  128. package/lib/screens/WebBuilderNative/useWebBuilderHost.js +2 -2
  129. package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
  130. package/lib/utils/drawerRoutes.js +13 -0
  131. package/lib/utils/drawerRoutes.js.map +1 -0
  132. package/package.json +4 -4
@@ -0,0 +1,127 @@
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useEffect}from'react';import {StyleSheet,View,Text,Linking,ActivityIndicator,Clipboard}from'react-native';import {SvgXml}from'react-native-svg';import {phoneWebLinkFor,readMobileQr,MOBILE_QR_ACTION}from'../appPreview.js';import {Sheet,PrimaryButton,SecondaryButton}from'./ui.js';var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ const QR_TIMEOUT_MS = 6e4;
21
+ function AppPhoneSheet({
22
+ visible,
23
+ previewUrl,
24
+ run,
25
+ onClose,
26
+ theme
27
+ }) {
28
+ const [state, setState] = useState("loading");
29
+ const [copied, setCopied] = useState(null);
30
+ const webLink = phoneWebLinkFor(previewUrl);
31
+ useEffect(() => {
32
+ if (!visible || !previewUrl) return void 0;
33
+ let alive = true;
34
+ setState("loading");
35
+ setCopied(null);
36
+ if (!run) {
37
+ setState(__spreadProps(__spreadValues({}, readMobileQr(null, previewUrl)), {
38
+ note: "The QR code needs the app to be running."
39
+ }));
40
+ return void 0;
41
+ }
42
+ run(MOBILE_QR_ACTION, {}, QR_TIMEOUT_MS).then((r) => alive && setState(readMobileQr(r, previewUrl))).catch(() => alive && setState(readMobileQr(null, previewUrl)));
43
+ return () => {
44
+ alive = false;
45
+ };
46
+ }, [visible, previewUrl, run]);
47
+ const copy = (kind, link) => {
48
+ Clipboard.setString(link);
49
+ setCopied(kind);
50
+ };
51
+ const ready = state === "loading" ? null : state;
52
+ return /* @__PURE__ */ jsx(Sheet, { visible, title: "Open on this phone", onClose, theme, testID: "webbuilder-app-phone", children: /* @__PURE__ */ jsxs(View, { style: styles.body, children: [
53
+ /* @__PURE__ */ jsx(Text, { style: [styles.heading, {
54
+ color: theme.ink
55
+ }], children: "In Expo Go, as a real app" }),
56
+ /* @__PURE__ */ jsx(Text, { style: [styles.help, {
57
+ color: theme.muted
58
+ }], children: "Install Expo Go and sign in with an Expo account. This link opens only in Expo Go, not in a browser." }),
59
+ ready ? /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx(PrimaryButton, { label: "Open in Expo Go", icon: "cellphone-arrow-down", onPress: () => {
61
+ if (ready.link) Linking.openURL(ready.link).catch(() => void 0);
62
+ }, disabled: !ready.link, theme, testID: "webbuilder-app-phone-expo" }),
63
+ ready.link ? /* @__PURE__ */ jsx(SecondaryButton, { label: copied === "expo" ? "Copied" : "Copy the Expo Go link", icon: copied === "expo" ? "check" : "content-copy", onPress: () => copy("expo", ready.link), theme }) : null,
64
+ ready.svg ? /* @__PURE__ */ jsxs(View, { style: styles.qrBlock, children: [
65
+ /* @__PURE__ */ jsx(Text, { style: [styles.help, {
66
+ color: theme.muted
67
+ }], children: "On another phone, scan this with Expo Go (or the iPhone camera)." }),
68
+ /* @__PURE__ */ jsx(View, { style: [styles.qr, {
69
+ borderColor: theme.border
70
+ }], accessibilityRole: "image", accessibilityLabel: "QR code for Expo Go", testID: "webbuilder-app-phone-qr", children: /* @__PURE__ */ jsx(SvgXml, { xml: ready.svg, width: "100%", height: "100%" }) })
71
+ ] }) : null,
72
+ ready.note ? /* @__PURE__ */ jsx(Text, { style: [styles.help, {
73
+ color: theme.muted
74
+ }], children: ready.note }) : null
75
+ ] }) : /* @__PURE__ */ jsxs(View, { style: styles.row, accessibilityLabel: "Making the QR code", children: [
76
+ /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: theme.muted }),
77
+ /* @__PURE__ */ jsx(Text, { style: [styles.help, {
78
+ color: theme.muted
79
+ }], children: "Getting the app's link\u2026" })
80
+ ] }),
81
+ webLink ? /* @__PURE__ */ jsxs(Fragment, { children: [
82
+ /* @__PURE__ */ jsx(Text, { style: [styles.heading, {
83
+ color: theme.ink
84
+ }], children: "In the browser" }),
85
+ /* @__PURE__ */ jsx(Text, { style: [styles.help, {
86
+ color: theme.muted
87
+ }], children: "Any browser works, with no app or account." }),
88
+ /* @__PURE__ */ jsx(SecondaryButton, { label: "Open in the browser", icon: "open-in-new", onPress: () => {
89
+ Linking.openURL(webLink).catch(() => void 0);
90
+ }, theme, testID: "webbuilder-app-phone-web" }),
91
+ /* @__PURE__ */ jsx(SecondaryButton, { label: copied === "web" ? "Copied" : "Copy the web link", icon: copied === "web" ? "check" : "content-copy", onPress: () => copy("web", webLink), theme })
92
+ ] }) : null
93
+ ] }) });
94
+ }
95
+ const styles = StyleSheet.create({
96
+ body: {
97
+ gap: 12,
98
+ paddingBottom: 8
99
+ },
100
+ heading: {
101
+ fontSize: 16,
102
+ fontWeight: "600",
103
+ marginTop: 4
104
+ },
105
+ help: {
106
+ fontSize: 14,
107
+ lineHeight: 20
108
+ },
109
+ row: {
110
+ flexDirection: "row",
111
+ alignItems: "center",
112
+ gap: 10
113
+ },
114
+ qrBlock: {
115
+ gap: 8,
116
+ alignItems: "center"
117
+ },
118
+ qr: {
119
+ width: 200,
120
+ height: 200,
121
+ padding: 6,
122
+ borderRadius: 14,
123
+ borderWidth: StyleSheet.hairlineWidth,
124
+ backgroundColor: "#fff",
125
+ overflow: "hidden"
126
+ }
127
+ });export{AppPhoneSheet};//# sourceMappingURL=AppPhoneSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppPhoneSheet.js","sources":["../../../../src/features/webbuilder/components/AppPhoneSheet.tsx"],"sourcesContent":["/**\n * \"Open on my phone\" for an Expo app - web 0.20.17/0.20.19 `AppPhoneButton`. The web shows a phone frame and a\n * QR code to scan; here the person is already on a phone, so the sheet opens the app directly: in Expo Go as a\n * real app (its exps:// link), or in the browser. The connector's QR code (WEBBUILDER_MOBILE_QR, drawn in the\n * sandbox) is still shown, for trying it on another phone. Each link can be copied.\n */\nimport React, { useEffect, useState } from 'react';\nimport { ActivityIndicator, Clipboard, Linking, StyleSheet, Text, View } from 'react-native';\nimport { SvgXml } from 'react-native-svg';\nimport { MOBILE_QR_ACTION, phoneWebLinkFor, readMobileQr, type AppPhoneLinks } from '../appPreview';\nimport type { WebBuilderActionResult } from '../types';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport { PrimaryButton, SecondaryButton, Sheet } from './ui';\n\nconst QR_TIMEOUT_MS = 60_000;\n\nexport function AppPhoneSheet({\n visible,\n previewUrl,\n run,\n onClose,\n theme,\n}: {\n visible: boolean;\n /** The app's preview link (https://8081-<sandbox>…). */\n previewUrl: string | null;\n /** Runs WEBBUILDER_MOBILE_QR on the open build's sandbox; without it only the links show. */\n run?: (action: string, params: Record<string, unknown>, timeoutMs: number) => Promise<WebBuilderActionResult>;\n onClose: () => void;\n theme: WebBuilderTheme;\n}) {\n const [state, setState] = useState<AppPhoneLinks | 'loading'>('loading');\n const [copied, setCopied] = useState<'web' | 'expo' | null>(null);\n const webLink = phoneWebLinkFor(previewUrl);\n\n useEffect(() => {\n if (!visible || !previewUrl) return undefined;\n let alive = true;\n setState('loading');\n setCopied(null);\n if (!run) {\n setState({ ...readMobileQr(null, previewUrl), note: 'The QR code needs the app to be running.' });\n return undefined;\n }\n run(MOBILE_QR_ACTION, {}, QR_TIMEOUT_MS)\n .then((r) => alive && setState(readMobileQr(r, previewUrl)))\n .catch(() => alive && setState(readMobileQr(null, previewUrl)));\n return () => {\n alive = false;\n };\n }, [visible, previewUrl, run]);\n\n const copy = (kind: 'web' | 'expo', link: string) => {\n Clipboard.setString(link);\n setCopied(kind);\n };\n const ready = state === 'loading' ? null : state;\n\n return (\n <Sheet\n visible={visible}\n title=\"Open on this phone\"\n onClose={onClose}\n theme={theme}\n testID=\"webbuilder-app-phone\"\n >\n <View style={styles.body}>\n <Text style={[styles.heading, { color: theme.ink }]}>In Expo Go, as a real app</Text>\n <Text style={[styles.help, { color: theme.muted }]}>\n Install Expo Go and sign in with an Expo account. This link opens only in Expo Go, not in a browser.\n </Text>\n {ready ? (\n <>\n <PrimaryButton\n label=\"Open in Expo Go\"\n icon=\"cellphone-arrow-down\"\n onPress={() => {\n if (ready.link) Linking.openURL(ready.link).catch(() => undefined);\n }}\n disabled={!ready.link}\n theme={theme}\n testID=\"webbuilder-app-phone-expo\"\n />\n {ready.link ? (\n <SecondaryButton\n label={copied === 'expo' ? 'Copied' : 'Copy the Expo Go link'}\n icon={copied === 'expo' ? 'check' : 'content-copy'}\n onPress={() => copy('expo', ready.link)}\n theme={theme}\n />\n ) : null}\n {ready.svg ? (\n <View style={styles.qrBlock}>\n <Text style={[styles.help, { color: theme.muted }]}>\n On another phone, scan this with Expo Go (or the iPhone camera).\n </Text>\n <View\n style={[styles.qr, { borderColor: theme.border }]}\n accessibilityRole=\"image\"\n accessibilityLabel=\"QR code for Expo Go\"\n testID=\"webbuilder-app-phone-qr\"\n >\n {/* safeQrSvg rebuilt this from plain squares only. */}\n <SvgXml xml={ready.svg} width=\"100%\" height=\"100%\" />\n </View>\n </View>\n ) : null}\n {ready.note ? <Text style={[styles.help, { color: theme.muted }]}>{ready.note}</Text> : null}\n </>\n ) : (\n <View style={styles.row} accessibilityLabel=\"Making the QR code\">\n <ActivityIndicator size=\"small\" color={theme.muted} />\n <Text style={[styles.help, { color: theme.muted }]}>Getting the app&apos;s link…</Text>\n </View>\n )}\n {webLink ? (\n <>\n <Text style={[styles.heading, { color: theme.ink }]}>In the browser</Text>\n <Text style={[styles.help, { color: theme.muted }]}>\n Any browser works, with no app or account.\n </Text>\n <SecondaryButton\n label=\"Open in the browser\"\n icon=\"open-in-new\"\n onPress={() => {\n Linking.openURL(webLink).catch(() => undefined);\n }}\n theme={theme}\n testID=\"webbuilder-app-phone-web\"\n />\n <SecondaryButton\n label={copied === 'web' ? 'Copied' : 'Copy the web link'}\n icon={copied === 'web' ? 'check' : 'content-copy'}\n onPress={() => copy('web', webLink)}\n theme={theme}\n />\n </>\n ) : null}\n </View>\n </Sheet>\n );\n}\n\nconst styles = StyleSheet.create({\n body: { gap: 12, paddingBottom: 8 },\n heading: { fontSize: 16, fontWeight: '600', marginTop: 4 },\n help: { fontSize: 14, lineHeight: 20 },\n row: { flexDirection: 'row', alignItems: 'center', gap: 10 },\n qrBlock: { gap: 8, alignItems: 'center' },\n qr: {\n width: 200,\n height: 200,\n padding: 6,\n borderRadius: 14,\n borderWidth: StyleSheet.hairlineWidth,\n backgroundColor: '#fff',\n overflow: 'hidden',\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAaA,MAAM,aAAgB,GAAA,GAAA;AACf,SAAS,aAAc,CAAA;AAAA,EAC5B,OAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAQG,EAAA;AACD,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAoC,SAAS,CAAA;AACvE,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAgC,IAAI,CAAA;AAChE,EAAM,MAAA,OAAA,GAAU,gBAAgB,UAAU,C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P,MAAQ,EAAA,GAAA;AAAA,IACR,OAAS,EAAA,CAAA;AAAA,IACT,YAAc,EAAA,EAAA;AAAA,IACd,aAAa,UAAW,CAAA,aAAA;AAAA,IACxB,eAAiB,EAAA,MAAA;AAAA,IACjB,QAAU,EAAA;AAAA;AAEd,CAAC,CAAA"}
@@ -1,14 +1,14 @@
1
- import {jsx}from'react/jsx-runtime';import {StyleSheet,View}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap}from'../../inbox/components/Tap.js';const BOTTOM_TABS_SPACE = 92;
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {StyleSheet,View,Text}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap}from'../../inbox/components/Tap.js';const BOTTOM_TABS_SPACE = 84;
2
2
  const TABS = [{
3
3
  id: "create",
4
4
  label: "Create",
5
- icon: "home-outline",
6
- iconActive: "home"
5
+ icon: "star-four-points-outline",
6
+ iconActive: "star-four-points"
7
7
  }, {
8
8
  id: "projects",
9
9
  label: "Projects",
10
- icon: "view-grid-outline",
11
- iconActive: "view-grid"
10
+ icon: "folder-outline",
11
+ iconActive: "folder"
12
12
  }];
13
13
  function BottomTabs({
14
14
  tab,
@@ -17,18 +17,23 @@ function BottomTabs({
17
17
  bottomInset
18
18
  }) {
19
19
  return /* @__PURE__ */ jsx(View, { pointerEvents: "box-none", style: [styles.dock, {
20
- bottom: Math.max(bottomInset, 12)
21
- }], children: /* @__PURE__ */ jsx(View, { style: [styles.pill, {
20
+ bottom: Math.max(bottomInset - 6, 14)
21
+ }], children: /* @__PURE__ */ jsx(View, { style: [styles.capsule, {
22
22
  backgroundColor: theme.card,
23
- borderColor: theme.border,
24
- shadowColor: theme.isDark ? "#000" : "#1c1917"
23
+ borderColor: theme.border
25
24
  }], accessibilityRole: "tablist", children: TABS.map((t) => {
26
25
  const active = t.id === tab;
27
- return /* @__PURE__ */ jsx(Tap, { onPress: () => onTab(t.id), accessibilityRole: "tab", accessibilityState: {
26
+ const color = active ? theme.accent : theme.muted;
27
+ return /* @__PURE__ */ jsxs(Tap, { onPress: () => onTab(t.id), accessibilityRole: "tab", accessibilityState: {
28
28
  selected: active
29
29
  }, accessibilityLabel: t.label, style: [styles.tab, active && {
30
- backgroundColor: theme.accent
31
- }], pressedStyle: styles.pressed, testID: `webbuilder-tab-${t.id}`, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: active ? t.iconActive : t.icon, size: 25, color: active ? theme.accentInk : theme.muted }) }, t.id);
30
+ backgroundColor: theme.accentSoft
31
+ }], pressedStyle: styles.pressed, testID: `webbuilder-tab-${t.id}`, children: [
32
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: active ? t.iconActive : t.icon, size: 22, color }),
33
+ /* @__PURE__ */ jsx(Text, { style: [styles.label, {
34
+ color
35
+ }], children: t.label })
36
+ ] }, t.id);
32
37
  }) }) });
33
38
  }
34
39
  const styles = StyleSheet.create({
@@ -38,26 +43,32 @@ const styles = StyleSheet.create({
38
43
  right: 0,
39
44
  alignItems: "center"
40
45
  },
41
- pill: {
46
+ capsule: {
42
47
  flexDirection: "row",
43
- gap: 6,
44
- padding: 6,
48
+ gap: 4,
49
+ padding: 5,
45
50
  borderRadius: 999,
46
51
  borderWidth: StyleSheet.hairlineWidth,
52
+ shadowColor: "#000",
47
53
  shadowOpacity: 0.12,
48
- shadowRadius: 20,
54
+ shadowRadius: 24,
49
55
  shadowOffset: {
50
56
  width: 0,
51
- height: 8
57
+ height: 10
52
58
  },
53
- elevation: 8
59
+ elevation: 10
54
60
  },
55
61
  tab: {
56
- width: 88,
57
- height: 52,
62
+ width: 104,
63
+ height: 54,
58
64
  borderRadius: 999,
59
65
  alignItems: "center",
60
- justifyContent: "center"
66
+ justifyContent: "center",
67
+ gap: 2
68
+ },
69
+ label: {
70
+ fontSize: 11,
71
+ fontWeight: "600"
61
72
  },
62
73
  pressed: {
63
74
  opacity: 0.6
@@ -1 +1 @@
1
- {"version":3,"file":"BottomTabs.js","sources":["../../../../src/features/webbuilder/components/BottomTabs.tsx"],"sourcesContent":["/**\n * Web Builder's two places - Create and Projects - as app builders show\n * them: an icon-only pill floating over the content, the current place on a\n * soft capsule. Labels stay for screen readers.\n */\nimport React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { Tap } from '../../inbox/components/Tap';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport type { IconName } from './ui';\n\nexport type HomeTab = 'create' | 'projects';\n\n/** Height the pill takes over the content, for the screens' bottom padding. */\nexport const BOTTOM_TABS_SPACE = 92;\n\nconst TABS: Array<{ id: HomeTab; label: string; icon: IconName; iconActive: IconName }> = [\n { id: 'create', label: 'Create', icon: 'home-outline', iconActive: 'home' },\n { id: 'projects', label: 'Projects', icon: 'view-grid-outline', iconActive: 'view-grid' },\n];\n\nexport function BottomTabs({\n tab,\n onTab,\n theme,\n bottomInset,\n}: {\n tab: HomeTab;\n onTab: (tab: HomeTab) => void;\n theme: WebBuilderTheme;\n bottomInset: number;\n}) {\n return (\n <View pointerEvents=\"box-none\" style={[styles.dock, { bottom: Math.max(bottomInset, 12) }]}>\n <View\n style={[\n styles.pill,\n {\n backgroundColor: theme.card,\n borderColor: theme.border,\n shadowColor: theme.isDark ? '#000' : '#1c1917',\n },\n ]}\n accessibilityRole=\"tablist\"\n >\n {TABS.map((t) => {\n const active = t.id === tab;\n return (\n <Tap\n key={t.id}\n onPress={() => onTab(t.id)}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: active }}\n accessibilityLabel={t.label}\n style={[styles.tab, active && { backgroundColor: theme.accent }]}\n pressedStyle={styles.pressed}\n testID={`webbuilder-tab-${t.id}`}\n >\n <MaterialCommunityIcons\n name={active ? t.iconActive : t.icon}\n size={25}\n color={active ? theme.accentInk : theme.muted}\n />\n </Tap>\n );\n })}\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n dock: { position: 'absolute', left: 0, right: 0, alignItems: 'center' },\n pill: {\n flexDirection: 'row',\n gap: 6,\n padding: 6,\n borderRadius: 999,\n borderWidth: StyleSheet.hairlineWidth,\n shadowOpacity: 0.12,\n shadowRadius: 20,\n shadowOffset: { width: 0, height: 8 },\n elevation: 8,\n },\n tab: { width: 88, height: 52, borderRadius: 999, alignItems: 'center', justifyContent: 'center' },\n pressed: { opacity: 0.6 },\n});\n"],"names":[],"mappings":"uLAcO,MAAM,iBAAoB,GAAA;AACjC,MAAM,OAKD,CAAC;AAAA,EACJ,EAAI,EAAA,QAAA;AAAA,EACJ,KAAO,EAAA,QAAA;AAAA,EACP,IAAM,EAAA,cAAA;AAAA,EACN,UAAY,EAAA;AACd,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,UAAA;AAAA,EACJ,KAAO,EAAA,UAAA;AAAA,EACP,IAAM,EAAA,mBAAA;AAAA,EACN,UAAY,EAAA;AACd,CAAC,CAAA;AACM,SAAS,UAAW,CAAA;AAAA,EACzB,GAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAKG,EAAA;AACD,EAAA,2BAAQ,IAAK,EAAA,EAAA,aAAA,EAAc,YAAW,KAAO,EAAA,CAAC,OAAO,IAAM,EAAA;AAAA,IACzD,MAAQ,EAAA,IAAA,CAAK,GAAI,CAAA,WAAA,EAAa,EAAE;AAAA,GACjC,CACS,EAAA,QAAA,kBAAA,GAAA,CAAC,QAAK,KAAO,EAAA,CAAC,OAAO,IAAM,EAAA;AAAA,IACjC,iBAAiB,KAAM,CAAA,IAAA;AAAA,IACvB,aAAa,KAAM,CAAA,MAAA;AAAA,IACnB,WAAA,EAAa,KAAM,CAAA,MAAA,GAAS,MAAS,GAAA;AAAA,GACtC,CAAG,EAAA,iBAAA,EAAkB,SACT,EAAA,QAAA,EAAA,IAAA,CAAK,IAAI,CAAK,CAAA,KAAA;AACvB,IAAM,MAAA,MAAA,GAAS,EAAE,EAAO,KAAA,GAAA;AACxB,IAAO,uBAAA,GAAA,CAAC,GAA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AAA,EACA,GAAK,EAAA;AAAA,IACH,KAAO,EAAA,EAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA,GAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,OAAS,EAAA;AAAA,IACP,OAAS,EAAA;AAAA;AAEb,CAAC,CAAA"}
1
+ {"version":3,"file":"BottomTabs.js","sources":["../../../../src/features/webbuilder/components/BottomTabs.tsx"],"sourcesContent":["/**\n * Web Builder's two places - Create and Projects - as a floating tab bar (the iOS 26 style): a capsule that hovers\n * above the content with a soft shadow, each tab an icon over its label, the current one on a tinted pill. The\n * screens leave room for it at the bottom (`BOTTOM_TABS_SPACE`).\n */\nimport React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { Tap } from '../../inbox/components/Tap';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport type { IconName } from './ui';\n\nexport type HomeTab = 'create' | 'projects';\n\n/** The room the floating bar takes over the content (its height and the gap under it), above the safe area. */\nexport const BOTTOM_TABS_SPACE = 84;\n\nconst TABS: Array<{ id: HomeTab; label: string; icon: IconName; iconActive: IconName }> = [\n { id: 'create', label: 'Create', icon: 'star-four-points-outline', iconActive: 'star-four-points' },\n { id: 'projects', label: 'Projects', icon: 'folder-outline', iconActive: 'folder' },\n];\n\nexport function BottomTabs({\n tab,\n onTab,\n theme,\n bottomInset,\n}: {\n tab: HomeTab;\n onTab: (tab: HomeTab) => void;\n theme: WebBuilderTheme;\n bottomInset: number;\n}) {\n return (\n <View pointerEvents=\"box-none\" style={[styles.dock, { bottom: Math.max(bottomInset - 6, 14) }]}>\n <View\n style={[\n styles.capsule,\n {\n backgroundColor: theme.card,\n borderColor: theme.border,\n },\n ]}\n accessibilityRole=\"tablist\"\n >\n {TABS.map((t) => {\n const active = t.id === tab;\n const color = active ? theme.accent : theme.muted;\n return (\n <Tap\n key={t.id}\n onPress={() => onTab(t.id)}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: active }}\n accessibilityLabel={t.label}\n style={[styles.tab, active && { backgroundColor: theme.accentSoft }]}\n pressedStyle={styles.pressed}\n testID={`webbuilder-tab-${t.id}`}\n >\n <MaterialCommunityIcons name={active ? t.iconActive : t.icon} size={22} color={color} />\n <Text style={[styles.label, { color }]}>{t.label}</Text>\n </Tap>\n );\n })}\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n dock: { position: 'absolute', left: 0, right: 0, alignItems: 'center' },\n capsule: {\n flexDirection: 'row',\n gap: 4,\n padding: 5,\n borderRadius: 999,\n borderWidth: StyleSheet.hairlineWidth,\n shadowColor: '#000',\n shadowOpacity: 0.12,\n shadowRadius: 24,\n shadowOffset: { width: 0, height: 10 },\n elevation: 10,\n },\n tab: {\n width: 104,\n height: 54,\n borderRadius: 999,\n alignItems: 'center',\n justifyContent: 'center',\n gap: 2,\n },\n label: { fontSize: 11, fontWeight: '600' },\n pressed: { opacity: 0.6 },\n});\n"],"names":[],"mappings":"iMAcO,MAAM,iBAAoB,GAAA;AACjC,MAAM,OAKD,CAAC;AAAA,EACJ,EAAI,EAAA,QAAA;AAAA,EACJ,KAAO,EAAA,QAAA;AAAA,EACP,IAAM,EAAA,0BAAA;AAAA,EACN,UAAY,EAAA;AACd,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,UAAA;AAAA,EACJ,KAAO,EAAA,UAAA;AAAA,EACP,IAAM,EAAA,gBAAA;AAAA,EACN,UAAY,EAAA;AACd,CAAC,CAAA;AACM,SAAS,UAAW,CAAA;AAAA,EACzB,GAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAKG,EAAA;AACD,EAAA,2BAAQ,IAAK,EAAA,EAAA,aAAA,EAAc,YAAW,KAAO,EAAA,CAAC,OAAO,IAAM,EAAA;AAAA,IACzD,MAAQ,EAAA,IAAA,CAAK,GAAI,CAAA,WAAA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MAAA,GAAS,WAAW,MAAO,CAAA;AAAA,EAC/B,IAAM,EAAA;AAAA,IACJ,QAAU,EAAA,UAAA;AAAA,IACV,IAAM,EAAA,CAAA;AAAA,IACN,KAAO,EAAA,CAAA;AAAA,IACP,UAAY,EAAA;AAAA,GACd;AAAA,EACA,OAAS,EAAA;AAAA,IACP,aAAe,EAAA,KAAA;AAAA,IACf,GAAK,EAAA,CAAA;AAAA,IACL,OAAS,EAAA,CAAA;AAAA,IACT,YAAc,EAAA,GAAA;AAAA,IACd,aAAa,UAAW,CAAA,aAAA;AAAA,IACxB,WAAa,EAAA,MAAA;AAAA,IACb,aAAe,EAAA,IAAA;AAAA,IACf,YAAc,EAAA,EAAA;AAAA,IACd,YAAc,EAAA;AAAA,MACZ,KAAO,EAAA,CAAA;AAAA,MACP,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,SAAW,EAAA;AAAA,GACb;AAAA,EACA,GAAK,EAAA;AAAA,IACH,KAAO,EAAA,GAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA,GAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,GAAK,EAAA;AAAA,GACP;AAAA,EACA,KAAO,EAAA;AAAA,IACL,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,OAAS,EAAA;AAAA,IACP,OAAS,EAAA;AAAA;AAEb,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {forwardRef}from'react';import {View,StyleSheet,TextInput,Text,ScrollView}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {hostLabel}from'../studioCatalog.js';import {templateName}from'../templateCatalog.js';function Tool({
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {forwardRef,useMemo,useState,useRef}from'react';import {View,StyleSheet,Text,ActivityIndicator,ScrollView,TextInput,Keyboard}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {hostLabel}from'../studioCatalog.js';import {templateName}from'../templateCatalog.js';import {NativeDictationBar}from'../../audio-input/NativeDictationBar.js';import {isNativeDictationAvailable}from'../../audio-input/nativeDictation.js';import {MicErrorBoundary}from'../../audio-input/MicErrorBoundary.js';import {useVoiceTyping}from'../useVoiceTyping.js';function Tool({
2
2
  icon,
3
3
  label,
4
4
  value,
@@ -6,16 +6,21 @@ import {jsxs,jsx}from'react/jsx-runtime';import {forwardRef}from'react';import {
6
6
  onClear,
7
7
  theme,
8
8
  leading,
9
+ short,
9
10
  testID
10
11
  }) {
11
12
  if (!value) {
12
- return /* @__PURE__ */ jsx(Tap, { onPress, accessibilityRole: "button", accessibilityLabel: label, hitSlop: 4, style: [styles.toolIcon, {
13
- borderColor: theme.border
14
- }], pressedStyle: DIM, testID, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 19, color: theme.muted }) });
13
+ return /* @__PURE__ */ jsxs(Tap, { onPress, accessibilityRole: "button", accessibilityLabel: label, hitSlop: 4, style: [styles.toolPill, {
14
+ backgroundColor: theme.chip
15
+ }], pressedStyle: DIM, testID, children: [
16
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 15, color: theme.muted }),
17
+ /* @__PURE__ */ jsx(Text, { style: [styles.toolPillLabel, {
18
+ color: theme.ink
19
+ }], numberOfLines: 1, children: short != null ? short : label })
20
+ ] });
15
21
  }
16
22
  return /* @__PURE__ */ jsxs(View, { style: [styles.toolChip, {
17
- backgroundColor: theme.accentSoft,
18
- borderColor: theme.accentBorder
23
+ backgroundColor: theme.accentSoft
19
24
  }], children: [
20
25
  /* @__PURE__ */ jsxs(Tap, { onPress, accessibilityRole: "button", accessibilityLabel: `${label}: ${value}`, style: styles.toolChipMain, pressedStyle: DIM, testID, children: [
21
26
  leading != null ? leading : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 16, color: theme.accent }),
@@ -46,10 +51,93 @@ const Composer = forwardRef(function Composer2({
46
51
  }, ref) {
47
52
  const lookHost = lookUrl && !lookInvalid ? hostLabel(lookUrl) : null;
48
53
  const ready = canSubmit && !connecting;
54
+ const nativeVoice = useMemo(() => isNativeDictationAvailable(), []);
55
+ const [voiceError, setVoiceError] = useState(null);
56
+ const latest = useRef(value);
57
+ latest.current = value;
58
+ const append = (base, said) => {
59
+ const t = (said != null ? said : "").trim();
60
+ if (!t) return base;
61
+ return base.trim() ? `${base.trim()} ${t}` : t;
62
+ };
63
+ const typing = useVoiceTyping({
64
+ onPhrase: (said) => onChangeText(append(latest.current, said)),
65
+ onError: setVoiceError
66
+ });
67
+ const [nativeOn, setNativeOn] = useState(false);
68
+ const nativeBase = useRef("");
69
+ const hasVoice = nativeVoice || typing.available;
70
+ const listening = nativeOn || typing.phase !== "off";
71
+ const showSend = !hasVoice || value.trim().length > 0 && !listening;
72
+ const startVoice = () => {
73
+ setVoiceError(null);
74
+ Keyboard.dismiss();
75
+ if (nativeVoice) {
76
+ nativeBase.current = latest.current;
77
+ setNativeOn(true);
78
+ return;
79
+ }
80
+ typing.start().catch(() => void 0);
81
+ };
82
+ const stopVoice = () => {
83
+ if (nativeOn) setNativeOn(false);
84
+ else typing.stop().catch(() => void 0);
85
+ };
86
+ const fallBack = () => {
87
+ setNativeOn(false);
88
+ onChangeText(nativeBase.current);
89
+ if (typing.available) typing.start().catch(() => void 0);
90
+ else setVoiceError("Dictation isn't available here. Type what you'd like to build.");
91
+ };
92
+ let bottomRow;
93
+ if (nativeOn) {
94
+ bottomRow = // Live dictation: each partial result is typed into the box as it is heard.
95
+ /* @__PURE__ */ jsx(View, { style: styles.dictation, testID: "webbuilder-dictation", children: /* @__PURE__ */ jsx(MicErrorBoundary, { onCancel: () => setNativeOn(false), onError: fallBack, children: /* @__PURE__ */ jsx(NativeDictationBar, { isDark: theme.isDark, onInterim: (text) => onChangeText(append(nativeBase.current, text)), onTranscriptionComplete: (text) => {
96
+ setNativeOn(false);
97
+ onChangeText(append(nativeBase.current, text));
98
+ }, onCancel: () => {
99
+ setNativeOn(false);
100
+ onChangeText(nativeBase.current);
101
+ }, onFallback: fallBack }) }) });
102
+ } else if (typing.phase !== "off") {
103
+ bottomRow = // Listening: each phrase is typed into the box when the person pauses; the round button stops.
104
+ /* @__PURE__ */ jsxs(View, { style: styles.toolbar, testID: "webbuilder-voice-typing", children: [
105
+ /* @__PURE__ */ jsxs(View, { style: styles.listening, accessibilityLiveRegion: "polite", children: [
106
+ /* @__PURE__ */ jsx(View, { style: [styles.liveDot, {
107
+ backgroundColor: theme.crit
108
+ }] }),
109
+ /* @__PURE__ */ jsx(Text, { style: [styles.listeningText, {
110
+ color: theme.ink
111
+ }], numberOfLines: 1, children: typing.phase === "listening" ? "Listening\u2026 speak, and it types" : "Typing what you said\u2026" }),
112
+ typing.pending > 0 ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: theme.muted }) : null
113
+ ] }),
114
+ /* @__PURE__ */ jsx(Tap, { onPress: stopVoice, disabled: typing.phase !== "listening", accessibilityRole: "button", accessibilityLabel: "Stop dictating", style: [styles.send, {
115
+ backgroundColor: theme.accent
116
+ }], pressedStyle: DIM, testID: "webbuilder-voice-stop", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "stop", size: 20, color: theme.accentInk }) })
117
+ ] });
118
+ } else {
119
+ bottomRow = /* @__PURE__ */ jsxs(View, { style: styles.toolbar, children: [
120
+ /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, keyboardShouldPersistTaps: "handled", style: styles.tools, contentContainerStyle: styles.toolsContent, children: [
121
+ /* @__PURE__ */ jsx(Tool, { icon: "view-grid-plus-outline", label: "Template", value: template ? templateName(template) : void 0, onPress: onTemplate, onClear: onClearTemplate, theme, testID: "webbuilder-composer-template" }),
122
+ /* @__PURE__ */ jsx(Tool, { icon: "web", label: "Look like", value: lookOpen ? null : lookHost, onPress: () => onLookOpen(true), onClear: () => onLookUrl(""), theme, testID: "webbuilder-composer-look" }),
123
+ /* @__PURE__ */ jsx(Tool, { icon: "palette-outline", label: "Brand kit", short: "Brand", value: brand ? brand.name || "Brand" : null, onPress: onBrand, theme, leading: (brand == null ? void 0 : brand.colors.length) ? /* @__PURE__ */ jsx(View, { style: styles.dots, children: brand.colors.slice(0, 3).map((c) => /* @__PURE__ */ jsx(View, { style: [styles.dot, {
124
+ backgroundColor: c,
125
+ borderColor: theme.card
126
+ }] }, c)) }) : void 0, testID: "webbuilder-composer-brand" })
127
+ ] }),
128
+ showSend ? /* @__PURE__ */ jsx(Tap, { onPress: onSubmit, disabled: !ready, accessibilityRole: "button", accessibilityLabel: "Start building", accessibilityState: {
129
+ disabled: !ready
130
+ }, style: [styles.send, {
131
+ backgroundColor: ready ? theme.accent : theme.chip
132
+ }], pressedStyle: DIM, testID: "webbuilder-start", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-up", size: 20, color: ready ? theme.accentInk : theme.faint }) }) : /* @__PURE__ */ jsx(Tap, { onPress: startVoice, accessibilityRole: "button", accessibilityLabel: "Dictate", style: [styles.send, {
133
+ backgroundColor: theme.ink
134
+ }], pressedStyle: DIM, testID: "webbuilder-mic", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "microphone", size: 19, color: theme.card }) })
135
+ ] });
136
+ }
49
137
  return /* @__PURE__ */ jsxs(View, { style: [styles.box, {
50
138
  backgroundColor: theme.card,
51
139
  borderColor: theme.border,
52
- shadowColor: theme.isDark ? "#000" : "#7c2d12"
140
+ shadowColor: "#000"
53
141
  }], children: [
54
142
  /* @__PURE__ */ jsx(TextInput, { ref, value, onChangeText, placeholder: "Describe the site you want to build\u2026", placeholderTextColor: theme.faint, multiline: true, style: [styles.input, {
55
143
  color: theme.ink
@@ -67,6 +155,9 @@ const Composer = forwardRef(function Composer2({
67
155
  onLookOpen(false);
68
156
  }, accessibilityRole: "button", accessibilityLabel: "Remove the look-alike site", hitSlop: 8, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 16, color: theme.muted }) })
69
157
  ] }) : null,
158
+ voiceError ? /* @__PURE__ */ jsx(Text, { style: [styles.statusText, {
159
+ color: theme.crit
160
+ }], accessibilityRole: "alert", children: voiceError }) : null,
70
161
  connecting ? /* @__PURE__ */ jsxs(View, { style: styles.status, accessibilityLiveRegion: "polite", children: [
71
162
  /* @__PURE__ */ jsx(View, { style: [styles.statusDot, {
72
163
  backgroundColor: theme.warn
@@ -75,43 +166,27 @@ const Composer = forwardRef(function Composer2({
75
166
  color: theme.muted
76
167
  }], numberOfLines: 1, children: connecting })
77
168
  ] }) : null,
78
- /* @__PURE__ */ jsxs(View, { style: [styles.toolbar, {
79
- borderTopColor: theme.border
80
- }], children: [
81
- /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, keyboardShouldPersistTaps: "handled", style: styles.tools, contentContainerStyle: styles.toolsContent, children: [
82
- /* @__PURE__ */ jsx(Tool, { icon: "view-grid-plus-outline", label: "Template", value: template ? templateName(template) : void 0, onPress: onTemplate, onClear: onClearTemplate, theme, testID: "webbuilder-composer-template" }),
83
- /* @__PURE__ */ jsx(Tool, { icon: "web", label: "Look like", value: lookOpen ? null : lookHost, onPress: () => onLookOpen(true), onClear: () => onLookUrl(""), theme, testID: "webbuilder-composer-look" }),
84
- /* @__PURE__ */ jsx(Tool, { icon: "palette-outline", label: "Brand kit", value: brand ? brand.name || "Brand" : null, onPress: onBrand, theme, leading: (brand == null ? void 0 : brand.colors.length) ? /* @__PURE__ */ jsx(View, { style: styles.dots, children: brand.colors.slice(0, 3).map((c) => /* @__PURE__ */ jsx(View, { style: [styles.dot, {
85
- backgroundColor: c,
86
- borderColor: theme.card
87
- }] }, c)) }) : void 0, testID: "webbuilder-composer-brand" })
88
- ] }),
89
- /* @__PURE__ */ jsx(Tap, { onPress: onSubmit, disabled: !ready, accessibilityRole: "button", accessibilityLabel: "Start building", accessibilityState: {
90
- disabled: !ready
91
- }, style: [styles.send, {
92
- backgroundColor: ready ? theme.accent : theme.chip
93
- }], pressedStyle: DIM, testID: "webbuilder-start", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-up", size: 21, color: ready ? theme.accentInk : theme.faint }) })
94
- ] })
169
+ bottomRow
95
170
  ] });
96
171
  });
97
172
  const styles = StyleSheet.create({
98
173
  box: {
99
- borderRadius: 22,
174
+ borderRadius: 16,
100
175
  borderWidth: StyleSheet.hairlineWidth,
101
176
  paddingTop: 14,
102
177
  paddingHorizontal: 14,
103
178
  paddingBottom: 10,
104
179
  gap: 10,
105
- shadowOpacity: 0.07,
106
- shadowRadius: 16,
180
+ shadowOpacity: 0.04,
181
+ shadowRadius: 8,
107
182
  shadowOffset: {
108
183
  width: 0,
109
- height: 6
184
+ height: 2
110
185
  },
111
- elevation: 3
186
+ elevation: 1
112
187
  },
113
188
  input: {
114
- minHeight: 64,
189
+ minHeight: 56,
115
190
  maxHeight: 160,
116
191
  fontSize: 17,
117
192
  lineHeight: 24,
@@ -145,35 +220,57 @@ const styles = StyleSheet.create({
145
220
  flex: 1,
146
221
  fontSize: 13
147
222
  },
223
+ dictation: {
224
+ minHeight: 44,
225
+ justifyContent: "center"
226
+ },
227
+ listening: {
228
+ flex: 1,
229
+ flexDirection: "row",
230
+ alignItems: "center",
231
+ gap: 8
232
+ },
233
+ liveDot: {
234
+ width: 9,
235
+ height: 9,
236
+ borderRadius: 5
237
+ },
238
+ listeningText: {
239
+ flexShrink: 1,
240
+ fontSize: 14,
241
+ fontWeight: "500"
242
+ },
148
243
  toolbar: {
149
244
  flexDirection: "row",
150
245
  alignItems: "center",
151
- gap: 10,
152
- paddingTop: 10,
153
- borderTopWidth: StyleSheet.hairlineWidth
246
+ gap: 8,
247
+ paddingTop: 2
154
248
  },
155
249
  tools: {
156
250
  flex: 1
157
251
  },
158
252
  toolsContent: {
159
- gap: 8,
253
+ gap: 6,
160
254
  alignItems: "center"
161
255
  },
162
- toolIcon: {
163
- width: 38,
164
- height: 38,
165
- borderRadius: 19,
166
- borderWidth: StyleSheet.hairlineWidth,
256
+ toolPill: {
257
+ flexDirection: "row",
167
258
  alignItems: "center",
168
- justifyContent: "center"
259
+ gap: 4,
260
+ height: 32,
261
+ paddingHorizontal: 10,
262
+ borderRadius: 16
263
+ },
264
+ toolPillLabel: {
265
+ fontSize: 13,
266
+ fontWeight: "500"
169
267
  },
170
268
  toolChip: {
171
269
  flexDirection: "row",
172
270
  alignItems: "center",
173
- height: 38,
271
+ height: 36,
174
272
  maxWidth: 200,
175
- borderRadius: 19,
176
- borderWidth: StyleSheet.hairlineWidth
273
+ borderRadius: 18
177
274
  },
178
275
  toolChipMain: {
179
276
  flexDirection: "row",
@@ -190,7 +287,7 @@ const styles = StyleSheet.create({
190
287
  toolChipClear: {
191
288
  paddingLeft: 6,
192
289
  paddingRight: 10,
193
- height: 38,
290
+ height: 36,
194
291
  justifyContent: "center"
195
292
  },
196
293
  toolChipEnd: {
@@ -208,9 +305,9 @@ const styles = StyleSheet.create({
208
305
  marginRight: -4
209
306
  },
210
307
  send: {
211
- width: 42,
212
- height: 42,
213
- borderRadius: 21,
308
+ width: 36,
309
+ height: 36,
310
+ borderRadius: 18,
214
311
  alignItems: "center",
215
312
  justifyContent: "center"
216
313
  }