@adminide-stack/clock-tik-mobile 0.0.0-stage → 12.0.37-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 (378) hide show
  1. package/.claude-flow/data/pending-insights.jsonl +43 -0
  2. package/.claude-flow/sessions/session-1794323376548.json +14 -0
  3. package/CHANGELOG.md +41 -0
  4. package/jest.config.cjs +22 -0
  5. package/lib/assets/home/loop-day.jpg +0 -0
  6. package/lib/assets/home/loop-day.mp4 +0 -0
  7. package/lib/assets/home/loop-time-back.jpg +0 -0
  8. package/lib/assets/home/loop-time-back.mp4 +0 -0
  9. package/lib/assets/home/loop-where.jpg +0 -0
  10. package/lib/assets/home/loop-where.mp4 +0 -0
  11. package/lib/assets/home/reel-gym.jpg +0 -0
  12. package/lib/assets/home/reel-gym.mp4 +0 -0
  13. package/lib/assets/home/reel-internet.jpg +0 -0
  14. package/lib/assets/home/reel-internet.mp4 +0 -0
  15. package/lib/assets/icon.png +0 -0
  16. package/lib/assets/lottie/.claude-flow/data/pending-insights.jsonl +1 -0
  17. package/lib/assets/lottie/lucy-mark-calendar.json +1827 -0
  18. package/lib/assets/lottie/lucy-mark-call.json +1470 -0
  19. package/lib/assets/lottie/lucy-mark-connect.json +2552 -0
  20. package/lib/assets/lottie/lucy-mark-details.json +1735 -0
  21. package/lib/assets/lottie/lucy-mark-email.json +1363 -0
  22. package/lib/assets/lottie/lucy-mark-message.json +1154 -0
  23. package/lib/assets/lottie/lucy-mark-search.json +1067 -0
  24. package/lib/assets/lottie/lucy-mark-think.json +1253 -0
  25. package/lib/assets/lottie/lucy-mark-write.json +1532 -0
  26. package/lib/assets/lottie/time-back.json +16458 -0
  27. package/lib/assets/lottie/where-lucy-works-chat.json +6170 -0
  28. package/lib/assets/lottie/where-lucy-works-cloud.json +10066 -0
  29. package/lib/assets/lottie/where-lucy-works-mine-none.json +2478 -0
  30. package/lib/assets/lottie/where-lucy-works-mine-offline.json +2373 -0
  31. package/lib/assets/lottie/where-lucy-works-mine-online.json +7881 -0
  32. package/lib/assets/sounds/hours-back.m4a +0 -0
  33. package/lib/assets/sounds/meet-lucy.m4a +0 -0
  34. package/lib/assets/sounds/power-on.m4a +0 -0
  35. package/lib/assets/sounds/wind-back.m4a +0 -0
  36. package/lib/assets/sounds/youre-in.m4a +0 -0
  37. package/lib/chat/agent.js +358 -0
  38. package/lib/chat/agent.js.map +1 -0
  39. package/lib/chat/appFront.js +32 -0
  40. package/lib/chat/appFront.js.map +1 -0
  41. package/lib/chat/auth.js +370 -0
  42. package/lib/chat/auth.js.map +1 -0
  43. package/lib/chat/chores.js +360 -0
  44. package/lib/chat/chores.js.map +1 -0
  45. package/lib/chat/connectors.js +45 -0
  46. package/lib/chat/connectors.js.map +1 -0
  47. package/lib/chat/jobs.js +223 -0
  48. package/lib/chat/jobs.js.map +1 -0
  49. package/lib/chat/lucyMotion.js +6 -0
  50. package/lib/chat/lucyMotion.js.map +1 -0
  51. package/lib/chat/protocol.js +111 -0
  52. package/lib/chat/protocol.js.map +1 -0
  53. package/lib/chat/results.js +133 -0
  54. package/lib/chat/results.js.map +1 -0
  55. package/lib/chat/store.js +81 -0
  56. package/lib/chat/store.js.map +1 -0
  57. package/lib/chat/useDictation.js +168 -0
  58. package/lib/chat/useDictation.js.map +1 -0
  59. package/lib/chat/useLucyChat.js +451 -0
  60. package/lib/chat/useLucyChat.js.map +1 -0
  61. package/lib/chat/useMyComputer.js +32 -0
  62. package/lib/chat/useMyComputer.js.map +1 -0
  63. package/lib/chat/whereLucyWorks.js +52 -0
  64. package/lib/chat/whereLucyWorks.js.map +1 -0
  65. package/lib/chat/workspace.js +124 -0
  66. package/lib/chat/workspace.js.map +1 -0
  67. package/lib/components/AreaShot.js +289 -0
  68. package/lib/components/AreaShot.js.map +1 -0
  69. package/lib/components/Backdrops.js +262 -0
  70. package/lib/components/Backdrops.js.map +1 -0
  71. package/lib/components/BottomSheet.js +61 -0
  72. package/lib/components/BottomSheet.js.map +1 -0
  73. package/lib/components/ChatSheets.js +429 -0
  74. package/lib/components/ChatSheets.js.map +1 -0
  75. package/lib/components/ConnectorLogo.js +91 -0
  76. package/lib/components/ConnectorLogo.js.map +1 -0
  77. package/lib/components/CustomDrawer.js +534 -0
  78. package/lib/components/CustomDrawer.js.map +1 -0
  79. package/lib/components/IdeasPane.js +394 -0
  80. package/lib/components/IdeasPane.js.map +1 -0
  81. package/lib/components/ImessageSheet.js +261 -0
  82. package/lib/components/ImessageSheet.js.map +1 -0
  83. package/lib/components/KeyboardAvoider.js +29 -0
  84. package/lib/components/KeyboardAvoider.js.map +1 -0
  85. package/lib/components/Logo.js +81 -0
  86. package/lib/components/Logo.js.map +1 -0
  87. package/lib/components/LucyWorking.js +67 -0
  88. package/lib/components/LucyWorking.js.map +1 -0
  89. package/lib/components/Markdown.js +260 -0
  90. package/lib/components/Markdown.js.map +1 -0
  91. package/lib/components/Media.js +93 -0
  92. package/lib/components/Media.js.map +1 -0
  93. package/lib/components/MessagesAppIcon.js +23 -0
  94. package/lib/components/MessagesAppIcon.js.map +1 -0
  95. package/lib/components/MicButton.js +71 -0
  96. package/lib/components/MicButton.js.map +1 -0
  97. package/lib/components/ResultCards.js +974 -0
  98. package/lib/components/ResultCards.js.map +1 -0
  99. package/lib/components/SignInPrompt.js +148 -0
  100. package/lib/components/SignInPrompt.js.map +1 -0
  101. package/lib/components/SignedOut.js +38 -0
  102. package/lib/components/SignedOut.js.map +1 -0
  103. package/lib/components/TalkToLucyHero.js +487 -0
  104. package/lib/components/TalkToLucyHero.js.map +1 -0
  105. package/lib/components/TalkToLucySheet.js +182 -0
  106. package/lib/components/TalkToLucySheet.js.map +1 -0
  107. package/lib/components/WhereLucyWorks.js +277 -0
  108. package/lib/components/WhereLucyWorks.js.map +1 -0
  109. package/lib/components/WorkspaceSection.js +271 -0
  110. package/lib/components/WorkspaceSection.js.map +1 -0
  111. package/lib/components/YantraMark.js +13 -0
  112. package/lib/components/YantraMark.js.map +1 -0
  113. package/lib/components/drawerHeader.js +38 -0
  114. package/lib/components/drawerHeader.js.map +1 -0
  115. package/lib/components/lottieInstalled.js +6 -0
  116. package/lib/components/lottieInstalled.js.map +1 -0
  117. package/lib/components/ui.js +550 -0
  118. package/lib/components/ui.js.map +1 -0
  119. package/lib/components/useSignOut.js +7 -0
  120. package/lib/components/useSignOut.js.map +1 -0
  121. package/lib/components/viewport.js +121 -0
  122. package/lib/components/viewport.js.map +1 -0
  123. package/lib/components/voiceDial.js +10 -0
  124. package/lib/components/voiceDial.js.map +1 -0
  125. package/lib/compute.js +157 -0
  126. package/lib/compute.js.map +1 -0
  127. package/lib/config/env-config.js +27 -0
  128. package/lib/config/env-config.js.map +1 -0
  129. package/lib/config/routes.js +15 -0
  130. package/lib/config/routes.js.map +1 -0
  131. package/lib/content.js +25 -0
  132. package/lib/content.js.map +1 -0
  133. package/lib/hooks/keyboardCover.js +39 -0
  134. package/lib/hooks/keyboardCover.js.map +1 -0
  135. package/lib/hooks/useKeyboard.js +121 -0
  136. package/lib/hooks/useKeyboard.js.map +1 -0
  137. package/lib/hooks/useReducedMotion.js +13 -0
  138. package/lib/hooks/useReducedMotion.js.map +1 -0
  139. package/lib/imessage/openMessages.js +25 -0
  140. package/lib/imessage/openMessages.js.map +1 -0
  141. package/lib/imessage/platform.js +12 -0
  142. package/lib/imessage/platform.js.map +1 -0
  143. package/lib/imessage/textLink.js +262 -0
  144. package/lib/imessage/textLink.js.map +1 -0
  145. package/lib/index.js +1 -0
  146. package/lib/index.js.map +1 -0
  147. package/lib/live/card.js +28 -0
  148. package/lib/live/card.js.map +1 -0
  149. package/lib/live/liveActivity.js +144 -0
  150. package/lib/live/liveActivity.js.map +1 -0
  151. package/lib/module.js +3 -0
  152. package/lib/module.js.map +1 -0
  153. package/lib/offer/BlackFridayOffer.js +378 -0
  154. package/lib/offer/BlackFridayOffer.js.map +1 -0
  155. package/lib/offer/blackFriday.js +78 -0
  156. package/lib/offer/blackFriday.js.map +1 -0
  157. package/lib/offer/parts.js +624 -0
  158. package/lib/offer/parts.js.map +1 -0
  159. package/lib/offer/state.js +63 -0
  160. package/lib/offer/state.js.map +1 -0
  161. package/lib/push/push.js +142 -0
  162. package/lib/push/push.js.map +1 -0
  163. package/lib/push/usePushNotifications.js +39 -0
  164. package/lib/push/usePushNotifications.js.map +1 -0
  165. package/lib/routes.json +175 -0
  166. package/lib/screens/Account/index.js +209 -0
  167. package/lib/screens/Account/index.js.map +1 -0
  168. package/lib/screens/Chat/index.js +710 -0
  169. package/lib/screens/Chat/index.js.map +1 -0
  170. package/lib/screens/Chores/index.js +18 -0
  171. package/lib/screens/Chores/index.js.map +1 -0
  172. package/lib/screens/Connectors/index.js +17 -0
  173. package/lib/screens/Connectors/index.js.map +1 -0
  174. package/lib/screens/History/index.js +380 -0
  175. package/lib/screens/History/index.js.map +1 -0
  176. package/lib/screens/Home/index.js +2715 -0
  177. package/lib/screens/Home/index.js.map +1 -0
  178. package/lib/screens/Home/media.js +25 -0
  179. package/lib/screens/Home/media.js.map +1 -0
  180. package/lib/screens/Welcome/index.js +1066 -0
  181. package/lib/screens/Welcome/index.js.map +1 -0
  182. package/lib/talk/talkToLucy.js +139 -0
  183. package/lib/talk/talkToLucy.js.map +1 -0
  184. package/lib/theme/colors.js +29 -0
  185. package/lib/theme/colors.js.map +1 -0
  186. package/lib/theme/fonts.js +17 -0
  187. package/lib/theme/fonts.js.map +1 -0
  188. package/lib/theme/muse.js +134 -0
  189. package/lib/theme/muse.js.map +1 -0
  190. package/lib/utils/links.js +54 -0
  191. package/lib/utils/links.js.map +1 -0
  192. package/lib/utils/yantraLinks.js +68 -0
  193. package/lib/utils/yantraLinks.js.map +1 -0
  194. package/lib/welcome/flow.js +375 -0
  195. package/lib/welcome/flow.js.map +1 -0
  196. package/lib/welcome/haptics.js +125 -0
  197. package/lib/welcome/haptics.js.map +1 -0
  198. package/lib/welcome/parts.js +1996 -0
  199. package/lib/welcome/parts.js.map +1 -0
  200. package/lib/welcome/powerOn.js +29 -0
  201. package/lib/welcome/powerOn.js.map +1 -0
  202. package/lib/welcome/seen.js +41 -0
  203. package/lib/welcome/seen.js.map +1 -0
  204. package/lib/welcome/sound.js +110 -0
  205. package/lib/welcome/sound.js.map +1 -0
  206. package/package.json +66 -5
  207. package/rollup.config.mjs +42 -0
  208. package/src/.claude-flow/data/pending-insights.jsonl +19 -0
  209. package/src/.claude-flow/sessions/session-1795013028422.json +14 -0
  210. package/src/__tests__/auth.test.ts +94 -0
  211. package/src/__tests__/blackFriday.test.ts +75 -0
  212. package/src/__tests__/cardTokens.test.ts +77 -0
  213. package/src/__tests__/chores.test.ts +188 -0
  214. package/src/__tests__/choresList.test.ts +100 -0
  215. package/src/__tests__/connectLink.test.ts +21 -0
  216. package/src/__tests__/content.test.ts +54 -0
  217. package/src/__tests__/dictation.test.ts +186 -0
  218. package/src/__tests__/envConfig.test.ts +14 -0
  219. package/src/__tests__/haptics.test.ts +202 -0
  220. package/src/__tests__/jobs.test.ts +130 -0
  221. package/src/__tests__/keyboardCover.test.ts +84 -0
  222. package/src/__tests__/liveCard.test.ts +39 -0
  223. package/src/__tests__/lockedPhone.test.ts +355 -0
  224. package/src/__tests__/lucyMotion.test.ts +34 -0
  225. package/src/__tests__/platform.test.ts +32 -0
  226. package/src/__tests__/powerOn.test.ts +62 -0
  227. package/src/__tests__/protocol.test.ts +125 -0
  228. package/src/__tests__/push.test.ts +111 -0
  229. package/src/__tests__/results.test.ts +256 -0
  230. package/src/__tests__/sound.test.ts +248 -0
  231. package/src/__tests__/talkToLucy.test.ts +205 -0
  232. package/src/__tests__/textLink.test.ts +91 -0
  233. package/src/__tests__/voiceDial.test.ts +53 -0
  234. package/src/__tests__/welcomeFlow.test.ts +157 -0
  235. package/src/__tests__/whereLucyWorks.test.ts +81 -0
  236. package/src/__tests__/yantraLinks.test.ts +96 -0
  237. package/src/assets/home/loop-day.jpg +0 -0
  238. package/src/assets/home/loop-day.mp4 +0 -0
  239. package/src/assets/home/loop-time-back.jpg +0 -0
  240. package/src/assets/home/loop-time-back.mp4 +0 -0
  241. package/src/assets/home/loop-where.jpg +0 -0
  242. package/src/assets/home/loop-where.mp4 +0 -0
  243. package/src/assets/home/reel-gym.jpg +0 -0
  244. package/src/assets/home/reel-gym.mp4 +0 -0
  245. package/src/assets/home/reel-internet.jpg +0 -0
  246. package/src/assets/home/reel-internet.mp4 +0 -0
  247. package/src/assets/icon.png +0 -0
  248. package/src/assets/lottie/.claude-flow/data/pending-insights.jsonl +1 -0
  249. package/src/assets/lottie/lucy-mark-calendar.json +1827 -0
  250. package/src/assets/lottie/lucy-mark-call.json +1470 -0
  251. package/src/assets/lottie/lucy-mark-connect.json +2552 -0
  252. package/src/assets/lottie/lucy-mark-details.json +1735 -0
  253. package/src/assets/lottie/lucy-mark-email.json +1363 -0
  254. package/src/assets/lottie/lucy-mark-message.json +1154 -0
  255. package/src/assets/lottie/lucy-mark-search.json +1067 -0
  256. package/src/assets/lottie/lucy-mark-think.json +1253 -0
  257. package/src/assets/lottie/lucy-mark-write.json +1532 -0
  258. package/src/assets/lottie/time-back.json +16458 -0
  259. package/src/assets/lottie/where-lucy-works-chat.json +6170 -0
  260. package/src/assets/lottie/where-lucy-works-cloud.json +10066 -0
  261. package/src/assets/lottie/where-lucy-works-mine-none.json +2478 -0
  262. package/src/assets/lottie/where-lucy-works-mine-offline.json +2373 -0
  263. package/src/assets/lottie/where-lucy-works-mine-online.json +7881 -0
  264. package/src/assets/sounds/hours-back.m4a +0 -0
  265. package/src/assets/sounds/meet-lucy.m4a +0 -0
  266. package/src/assets/sounds/power-on.m4a +0 -0
  267. package/src/assets/sounds/wind-back.m4a +0 -0
  268. package/src/assets/sounds/youre-in.m4a +0 -0
  269. package/src/chat/.claude-flow/data/pending-insights.jsonl +1 -0
  270. package/src/chat/agent.ts +376 -0
  271. package/src/chat/appFront.ts +39 -0
  272. package/src/chat/auth.ts +433 -0
  273. package/src/chat/chores.ts +394 -0
  274. package/src/chat/connectors.ts +75 -0
  275. package/src/chat/jobs.ts +228 -0
  276. package/src/chat/lucyMotion.ts +33 -0
  277. package/src/chat/protocol.ts +192 -0
  278. package/src/chat/results.ts +224 -0
  279. package/src/chat/store.ts +87 -0
  280. package/src/chat/useDictation.ts +201 -0
  281. package/src/chat/useLucyChat.ts +458 -0
  282. package/src/chat/useMyComputer.ts +41 -0
  283. package/src/chat/whereLucyWorks.ts +97 -0
  284. package/src/chat/workspace.ts +127 -0
  285. package/src/components/.claude-flow/data/pending-insights.jsonl +3 -0
  286. package/src/components/AreaShot.tsx +239 -0
  287. package/src/components/Backdrops.tsx +323 -0
  288. package/src/components/BottomSheet.tsx +96 -0
  289. package/src/components/ChatSheets.tsx +565 -0
  290. package/src/components/ConnectorLogo.tsx +116 -0
  291. package/src/components/CustomDrawer.tsx +526 -0
  292. package/src/components/IdeasPane.tsx +318 -0
  293. package/src/components/ImessageSheet.tsx +280 -0
  294. package/src/components/KeyboardAvoider.tsx +45 -0
  295. package/src/components/Logo.tsx +97 -0
  296. package/src/components/LucyWorking.tsx +122 -0
  297. package/src/components/Markdown.tsx +219 -0
  298. package/src/components/Media.tsx +173 -0
  299. package/src/components/MessagesAppIcon.tsx +51 -0
  300. package/src/components/MicButton.tsx +92 -0
  301. package/src/components/ResultCards.tsx +1067 -0
  302. package/src/components/SignInPrompt.tsx +182 -0
  303. package/src/components/SignedOut.tsx +47 -0
  304. package/src/components/TalkToLucyHero.tsx +540 -0
  305. package/src/components/TalkToLucySheet.tsx +208 -0
  306. package/src/components/VoiceOrb.tsx +364 -0
  307. package/src/components/WhereLucyWorks.tsx +261 -0
  308. package/src/components/WorkspaceSection.tsx +307 -0
  309. package/src/components/YantraMark.tsx +30 -0
  310. package/src/components/drawerHeader.tsx +46 -0
  311. package/src/components/kit.tsx +309 -0
  312. package/src/components/lottieInstalled.ts +7 -0
  313. package/src/components/ui.tsx +700 -0
  314. package/src/components/useSignOut.ts +21 -0
  315. package/src/components/viewport.tsx +166 -0
  316. package/src/components/voiceDial.ts +45 -0
  317. package/src/compute.ts +168 -0
  318. package/src/config/env-config.ts +50 -0
  319. package/src/config/routes.ts +28 -0
  320. package/src/content.ts +217 -0
  321. package/src/hooks/keyboardCover.ts +70 -0
  322. package/src/hooks/useKeyboard.ts +135 -0
  323. package/src/hooks/useReducedMotion.ts +19 -0
  324. package/src/imessage/openMessages.ts +53 -0
  325. package/src/imessage/platform.ts +32 -0
  326. package/src/imessage/textLink.ts +307 -0
  327. package/src/index.ts +24 -0
  328. package/src/live/card.ts +62 -0
  329. package/src/live/liveActivity.ts +192 -0
  330. package/src/module.ts +8 -0
  331. package/src/offer/BlackFridayOffer.tsx +394 -0
  332. package/src/offer/blackFriday.ts +109 -0
  333. package/src/offer/parts.tsx +650 -0
  334. package/src/offer/state.ts +78 -0
  335. package/src/push/push.ts +171 -0
  336. package/src/push/usePushNotifications.ts +47 -0
  337. package/src/screens/Account/index.tsx +310 -0
  338. package/src/screens/Chat/.claude-flow/data/pending-insights.jsonl +4 -0
  339. package/src/screens/Chat/index.tsx +891 -0
  340. package/src/screens/Chores/index.tsx +35 -0
  341. package/src/screens/Connectors/index.tsx +35 -0
  342. package/src/screens/History/index.tsx +346 -0
  343. package/src/screens/Home/index.tsx +2776 -0
  344. package/src/screens/Home/media.ts +31 -0
  345. package/src/screens/Welcome/index.tsx +1182 -0
  346. package/src/talk/talkToLucy.ts +187 -0
  347. package/src/theme/colors.ts +38 -0
  348. package/src/theme/fonts.ts +30 -0
  349. package/src/theme/muse.ts +86 -0
  350. package/src/utils/links.ts +84 -0
  351. package/src/utils/yantraLinks.ts +94 -0
  352. package/src/welcome/flow.ts +418 -0
  353. package/src/welcome/haptics.ts +179 -0
  354. package/src/welcome/parts.tsx +2160 -0
  355. package/src/welcome/powerOn.ts +84 -0
  356. package/src/welcome/seen.ts +68 -0
  357. package/src/welcome/sound.ts +173 -0
  358. package/tools/lottie/chat.motion +0 -0
  359. package/tools/lottie/cloud.motion +0 -0
  360. package/tools/lottie/generate.mjs +1209 -0
  361. package/tools/lottie/inter-glyphs.json +4416 -0
  362. package/tools/lottie/lucy-mark-calendar.motion +0 -0
  363. package/tools/lottie/lucy-mark-call.motion +0 -0
  364. package/tools/lottie/lucy-mark-connect.motion +0 -0
  365. package/tools/lottie/lucy-mark-details.motion +0 -0
  366. package/tools/lottie/lucy-mark-email.motion +0 -0
  367. package/tools/lottie/lucy-mark-message.motion +0 -0
  368. package/tools/lottie/lucy-mark-search.motion +0 -0
  369. package/tools/lottie/lucy-mark-think.motion +0 -0
  370. package/tools/lottie/lucy-mark-write.motion +0 -0
  371. package/tools/lottie/mark.json +1 -0
  372. package/tools/lottie/mine-none.motion +0 -0
  373. package/tools/lottie/mine-offline.motion +0 -0
  374. package/tools/lottie/mine-online.motion +0 -0
  375. package/tools/lottie/time-back.mjs +604 -0
  376. package/tools/sounds/render.mjs +730 -0
  377. package/tsconfig.json +17 -0
  378. package/README.md +0 -3
@@ -0,0 +1,1182 @@
1
+ /**
2
+ * The welcome: the first thing a new phone sees (Home opens it until welcome/seen.ts says it has been seen). An intro
3
+ * on the Clockbook clock, then Lucy introduces herself and asks four quick questions, shows what life admin costs and
4
+ * what she hands back (the web home's numbers, with their footnotes), connects the calendar and asks for
5
+ * notifications, and ends on a first chore, which opens her chat. The design is the Clockbook mobile onboarding canvas,
6
+ * in its Paper theme.
7
+ *
8
+ * Real where the app already is: sign-in is Yantra's Login and SignUp (as SignInPrompt), the calendar is the Google
9
+ * Calendar connector (chat/connectors.ts), notifications are push/push.ts, and the first chore goes through the same
10
+ * sign-in gate as Home's. The free week and its reminder only show in development builds (TRIAL) until Clockbook sells
11
+ * a subscription. The script and timings are welcome/flow.ts; the drawn pieces welcome/parts.tsx.
12
+ */
13
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
14
+ import {
15
+ Animated,
16
+ Easing,
17
+ KeyboardAvoidingView,
18
+ Platform,
19
+ Pressable,
20
+ ScrollView,
21
+ StatusBar,
22
+ StyleSheet,
23
+ Text,
24
+ TextInput,
25
+ View,
26
+ useWindowDimensions,
27
+ } from 'react-native';
28
+ import { useNavigation } from '@react-navigation/native';
29
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
30
+ import { Ionicons } from '@expo/vector-icons';
31
+ import { AuthMobileNavigationRoutesEnum, useIsUserAuthenticated } from '@adminide-stack/user-auth0-client';
32
+ import { BottomSheet } from '../../components/BottomSheet';
33
+ import { displayName, PersonAvatar, type Person } from '../../components/ChatSheets';
34
+ import { ConnectorLogo } from '../../components/ConnectorLogo';
35
+ import { useSignInGate } from '../../components/SignInPrompt';
36
+ import { connectLink } from '../../chat/connectors';
37
+ import { CLOCKBOOK_ROUTES, drawerRoute } from '../../config/routes';
38
+ import { HERO_CHORES, type Chore } from '../../content';
39
+ import { useReducedMotion } from '../../hooks/useReducedMotion';
40
+ import { notifications, registerForPush } from '../../push/push';
41
+ import { fonts, useClockbookFonts } from '../../theme/fonts';
42
+ import { ui } from '../../theme/muse';
43
+ import { yantraAppUrl } from '../../utils/links';
44
+ import { openYantraUrl } from '../../utils/yantraLinks';
45
+ import {
46
+ DEFAULT_ANSWERS,
47
+ FILL_MS,
48
+ FIRST_CHORES,
49
+ HOME,
50
+ HOME_SIZES,
51
+ PAIN,
52
+ PAIN_KEYS,
53
+ TAP_NEXT,
54
+ TIME,
55
+ TIME_KEYS,
56
+ autoAdvance,
57
+ buildChat,
58
+ cleanName,
59
+ controlsDelay,
60
+ isChat,
61
+ isIntro,
62
+ lifeAdmin,
63
+ longDate,
64
+ reminderDates,
65
+ type Answers,
66
+ type ChatLine,
67
+ type StepId,
68
+ } from '../../welcome/flow';
69
+ import {
70
+ Burst,
71
+ Dial,
72
+ DrawnArrow,
73
+ FillBar,
74
+ Glow,
75
+ GlowButton,
76
+ LinkButton,
77
+ LockPreview,
78
+ LucyOrb,
79
+ NumberChip,
80
+ Odometer,
81
+ OptionRow,
82
+ PowerOn,
83
+ PrimeFrame,
84
+ Reveal,
85
+ Roller,
86
+ SoftButton,
87
+ StaticWords,
88
+ Sunset,
89
+ SystemPrompt,
90
+ Words,
91
+ text,
92
+ type GlowMode,
93
+ type IconName,
94
+ } from '../../welcome/parts';
95
+ import { tap, thud } from '../../welcome/haptics';
96
+ import { markWelcomeSeen } from '../../welcome/seen';
97
+ import { play, prepare, release } from '../../welcome/sound';
98
+
99
+ /** The free week and its reminder: development builds only, until there is a subscription to start. */
100
+ const TRIAL = __DEV__;
101
+ const OPTS = { trial: TRIAL };
102
+
103
+ const ORB = 92;
104
+ const EASE = Easing.bezier(0.2, 0.7, 0.2, 1);
105
+
106
+ const CHORE_ICONS: Record<string, IconName> = {
107
+ 'Cancel my gym': 'call-outline',
108
+ 'Lower my internet bill': 'receipt-outline',
109
+ 'Book the dentist': 'calendar-outline',
110
+ 'Get my flight refund': 'airplane-outline',
111
+ };
112
+
113
+ const BEATS: Partial<Record<StepId, { title: string; sub: string }>> = {
114
+ i1: { title: 'Every week, hours slip away.', sub: 'On hold. On forms. On to-do lists.' },
115
+ i2: { title: 'Watch the hands.', sub: 'Each one is a minute you meant to spend on something else.' },
116
+ i3: { title: 'Now, wind them back.', sub: 'That’s what Clockbook is for.' },
117
+ };
118
+
119
+ function glowFor(step: StepId): GlowMode {
120
+ if (step === 'i1' || step === 'i2') return 'dim';
121
+ if (step === 'i3' || step === 'i4') return 'lit';
122
+ if (step === 'news' || step === 'bad' || step === 'good') return 'wide';
123
+ if (step === 'yay') return 'yay';
124
+ if (step === 'pay') return 'off';
125
+ return 'on';
126
+ }
127
+
128
+ /** A line of the conversation: Lucy's newest written word by word, the lines before it faded and drifting up. */
129
+ function ChatLineView({ line, still }: { line: ChatLine; still: boolean }) {
130
+ const style = line.who === 'you' ? text.you : text.lucy;
131
+ const gap = line.who === 'you' ? 7 : 5;
132
+ if (line.age > 0) {
133
+ return (
134
+ <Reveal still={still} rise={28} from={line.age === 1 ? 1 : 0.58} to={line.age === 1 ? 0.58 : 0.24}>
135
+ <StaticWords words={line.words} label={line.plain} style={style} accent={text.accent} gap={gap} />
136
+ </Reveal>
137
+ );
138
+ }
139
+ if (line.who === 'you') {
140
+ return (
141
+ <Reveal delay={line.start} still={still} rise={14}>
142
+ <StaticWords words={line.words} label={line.plain} style={style} accent={text.accent} gap={gap} />
143
+ </Reveal>
144
+ );
145
+ }
146
+ return (
147
+ <Words
148
+ words={line.words}
149
+ label={line.plain}
150
+ start={line.start}
151
+ still={still}
152
+ style={style}
153
+ accent={text.accent}
154
+ gap={gap}
155
+ />
156
+ );
157
+ }
158
+
159
+ export default function WelcomeScreen({
160
+ initialStep = 'i1',
161
+ initialAnswers,
162
+ }: {
163
+ /** Where it opens: the start, unless a preview or a test asks for a step directly (the app never does). */
164
+ initialStep?: StepId;
165
+ initialAnswers?: Partial<Answers>;
166
+ } = {}) {
167
+ const navigation = useNavigation<{
168
+ navigate: (route: string, params?: object) => void;
169
+ goBack: () => void;
170
+ canGoBack: () => boolean;
171
+ }>();
172
+ const insets = useSafeAreaInsets();
173
+ const { width, height } = useWindowDimensions();
174
+ const fontsReady = useClockbookFonts();
175
+ const still = useReducedMotion();
176
+ const { authenticated, user } = useIsUserAuthenticated();
177
+ const person = (user ?? null) as Person | null;
178
+ const { gate, prompt } = useSignInGate((route, params) => navigation.navigate(route, params));
179
+
180
+ const [step, setStep] = useState<StepId>(initialStep);
181
+ const [answers, setAnswers] = useState<Answers>({ ...DEFAULT_ANSWERS, ...initialAnswers });
182
+ const [draft, setDraft] = useState('');
183
+ const [picking, setPicking] = useState<string | null>(null);
184
+ const [sheet, setSheet] = useState(false);
185
+ const [busy, setBusy] = useState<'cal' | 'notif' | null>(null);
186
+ const [remind, setRemind] = useState<2 | 3>(2);
187
+ // The power-on (welcome/powerOn.ts) plays as the welcome opens, and again on a replay.
188
+ const [powering, setPowering] = useState(initialStep === 'i1');
189
+ const powered = useCallback(() => setPowering(false), []);
190
+ // With Reduce Motion it doesn't play: one gentle tap says the welcome has opened instead.
191
+ useEffect(() => {
192
+ if (!still || !powering) return;
193
+ setPowering(false);
194
+ tap();
195
+ }, [powering, still]);
196
+
197
+ const timers = useRef<ReturnType<typeof setTimeout>[]>([]);
198
+ const later = useCallback((fn: () => void, ms: number) => {
199
+ timers.current.push(setTimeout(fn, ms));
200
+ }, []);
201
+ useEffect(() => () => timers.current.forEach(clearTimeout), []);
202
+
203
+ // Its sounds (welcome/sound.ts), loaded as it opens so each starts on its moment, and let go as it closes.
204
+ useEffect(() => {
205
+ prepare();
206
+ return release;
207
+ }, []);
208
+
209
+ // The chat keeps its newest line in view while Lucy types; earlier lines are a scroll up.
210
+ const chatScroll = useRef<ScrollView>(null);
211
+
212
+ const go = useCallback((next: StepId) => {
213
+ setPicking(null);
214
+ setBusy(null);
215
+ setSheet(false);
216
+ setStep(next);
217
+ }, []);
218
+
219
+ // Signed in already: offer their first name.
220
+ const accountFirst = person?.given_name || (person?.name && !person.name.includes('@') ? person.name : '') || '';
221
+ const offered = useRef(false);
222
+ useEffect(() => {
223
+ if (offered.current || !accountFirst) return;
224
+ offered.current = true;
225
+ setDraft((d) => d || cleanName(accountFirst));
226
+ }, [accountFirst]);
227
+
228
+ // The orb lighting up, felt and heard as well as seen.
229
+ useEffect(() => {
230
+ if (step !== 'i4') return;
231
+ thud();
232
+ play('meetLucy');
233
+ }, [step]);
234
+
235
+ // Steps that move on by themselves.
236
+ useEffect(() => {
237
+ const auto = autoAdvance(step, answers, OPTS);
238
+ if (!auto) return undefined;
239
+ const t = setTimeout(() => go(auto.to), still ? Math.min(auto.after, 1400) : auto.after);
240
+ return () => clearTimeout(t);
241
+ // The answers do not change while a step waits.
242
+ // eslint-disable-next-line react-hooks/exhaustive-deps
243
+ }, [step, go, still]);
244
+
245
+ // Back from Login or SignUp, signed in: on to the questions.
246
+ const wasSignedIn = useRef(authenticated);
247
+ useEffect(() => {
248
+ const justSignedIn = authenticated && !wasSignedIn.current;
249
+ wasSignedIn.current = authenticated;
250
+ if (!justSignedIn || step !== 'signin') return undefined;
251
+ const t = setTimeout(() => go('pain'), 700);
252
+ return () => clearTimeout(t);
253
+ }, [authenticated, go, step]);
254
+
255
+ // Lucy's orb: where it sits, how big, whether it shows, for each step.
256
+ const top = insets.top;
257
+ const orbTop = top + 18;
258
+ const dialSize = Math.min(280, width * 0.72);
259
+ const dialY = height * 0.54;
260
+ const yayY = height * 0.42;
261
+ const place = (() => {
262
+ if (step === 'i1' || step === 'i2' || step === 'i3') return { y: dialY - ORB / 2, s: 0.3, o: 0 };
263
+ if (step === 'i4') return { y: dialY - ORB / 2, s: 1.55, o: 1 };
264
+ if (step === 'yay') return { y: yayY - ORB / 2, s: 1.75, o: 1 };
265
+ if (isChat(step) || step === 'done') return { y: orbTop, s: 1, o: 1 };
266
+ return { y: top - 30, s: 0.6, o: 0 };
267
+ })();
268
+ const orbY = useRef(new Animated.Value(place.y)).current;
269
+ const orbS = useRef(new Animated.Value(place.s)).current;
270
+ const orbO = useRef(new Animated.Value(place.o)).current;
271
+ useEffect(() => {
272
+ const cfg = { duration: still ? 0 : 1100, easing: EASE, useNativeDriver: true };
273
+ const anim = Animated.parallel([
274
+ Animated.timing(orbY, { ...cfg, toValue: place.y }),
275
+ Animated.timing(orbS, { ...cfg, toValue: place.s }),
276
+ Animated.timing(orbO, { ...cfg, duration: still ? 0 : 700, toValue: place.o }),
277
+ ]);
278
+ anim.start();
279
+ return () => anim.stop();
280
+ }, [orbO, orbS, orbY, place.o, place.s, place.y, still]);
281
+
282
+ const choose = (key: string, patch: Partial<Answers>, next: StepId) => {
283
+ if (picking) return;
284
+ setPicking(key);
285
+ setAnswers((a) => ({ ...a, ...patch }));
286
+ later(() => go(next), 340);
287
+ };
288
+
289
+ const submitName = () => {
290
+ const name = cleanName(draft);
291
+ if (!name) return;
292
+ setAnswers((a) => ({ ...a, name }));
293
+ go('hello');
294
+ };
295
+
296
+ const connectCalendar = async () => {
297
+ setBusy('cal');
298
+ try {
299
+ const url = connectLink(yantraAppUrl(), 'google-calendar');
300
+ if (url) await openYantraUrl(url);
301
+ } catch {
302
+ /* they can connect it later, in Connectors */
303
+ }
304
+ go('notif');
305
+ };
306
+
307
+ const allowNotifications = async () => {
308
+ setBusy('notif');
309
+ try {
310
+ if (authenticated) await registerForPush({ ask: true });
311
+ else
312
+ await notifications()?.requestPermissionsAsync({
313
+ ios: { allowAlert: true, allowBadge: true, allowSound: true },
314
+ });
315
+ } catch {
316
+ /* their answer stands either way */
317
+ }
318
+ go('plan');
319
+ };
320
+
321
+ const leave = () => {
322
+ void markWelcomeSeen();
323
+ if (navigation.canGoBack()) navigation.goBack();
324
+ else navigation.navigate(...drawerRoute(CLOCKBOOK_ROUTES.HOME, { at: Date.now() }));
325
+ };
326
+
327
+ const startChore = (chore: Chore) => {
328
+ void markWelcomeSeen();
329
+ gate(
330
+ 'chat',
331
+ () => navigation.navigate(...drawerRoute(CLOCKBOOK_ROUTES.CHAT, { prompt: chore.prompt, at: Date.now() })),
332
+ chore.prompt,
333
+ );
334
+ };
335
+
336
+ const replay = () => {
337
+ if (!still) setPowering(true);
338
+ setAnswers(DEFAULT_ANSWERS);
339
+ setDraft('');
340
+ setRemind(2);
341
+ go('i1');
342
+ };
343
+
344
+ // Dark while the fonts load, if the power-on is about to play, so it opens dark rather than cream then dark.
345
+ if (!fontsReady) {
346
+ return (
347
+ <View style={[styles.root, powering && styles.dark]}>
348
+ {powering ? <StatusBar barStyle="light-content" /> : null}
349
+ </View>
350
+ );
351
+ }
352
+
353
+ const chat = buildChat(step, answers);
354
+ const ctl = controlsDelay(step, answers);
355
+ const n = lifeAdmin(TIME[answers.time].min);
356
+ const name = answers.name;
357
+ const beat = step === 'i2' ? 2 : step === 'i3' ? 3 : step === 'i4' ? 4 : 1;
358
+ const tapNext = TAP_NEXT[step];
359
+ const trial = reminderDates(new Date());
360
+ const remindOn = trial.options.find((o) => o.daysBefore === remind) ?? trial.options[0];
361
+ const firstChores = FIRST_CHORES.map((label) => HERO_CHORES.find((c) => c.label === label)).filter(
362
+ (c): c is Chore => Boolean(c),
363
+ );
364
+ const pain = PAIN[answers.pain];
365
+ const other = answers.pain === 'calls' ? PAIN.bills : PAIN.calls;
366
+ const plan: { icon: IconName; title: string; body: string }[] = [
367
+ { icon: pain.icon as IconName, title: pain.title, body: pain.body },
368
+ { icon: other.icon as IconName, title: other.title, body: other.body },
369
+ {
370
+ icon: 'time-outline',
371
+ title: `${n.week} hours back every week`,
372
+ body: `About ${n.yearHours} hours this year, for the things you’d rather do.`,
373
+ },
374
+ ];
375
+ const page = { paddingTop: top + 48, paddingBottom: insets.bottom + 20 };
376
+
377
+ return (
378
+ <View style={styles.root}>
379
+ <StatusBar barStyle="dark-content" />
380
+ <Glow
381
+ mode={powering ? 'off' : glowFor(step)}
382
+ width={width}
383
+ top={orbTop + ORB / 2}
384
+ dialY={dialY}
385
+ yayY={yayY}
386
+ still={still}
387
+ />
388
+
389
+ {isIntro(step) && !powering ? (
390
+ <View style={StyleSheet.absoluteFill}>
391
+ <View style={[styles.dial, { top: dialY - dialSize / 2, left: (width - dialSize) / 2 }]}>
392
+ <Dial beat={beat} size={dialSize} still={still} />
393
+ </View>
394
+ {BEATS[step] ? (
395
+ <View key={step} style={[styles.beat, { top: top + 56 }]}>
396
+ <Words
397
+ words={BEATS[step]!.title.split(' ').map((b) => ({ a: '', b }))}
398
+ label={BEATS[step]!.title}
399
+ start={200}
400
+ still={still}
401
+ style={[text.beat, styles.center]}
402
+ center
403
+ gap={9}
404
+ />
405
+ <Reveal delay={700} still={still}>
406
+ <Text style={[text.sub, styles.center, styles.beatSub]}>{BEATS[step]!.sub}</Text>
407
+ </Reveal>
408
+ </View>
409
+ ) : null}
410
+ {step === 'i4' ? (
411
+ <Reveal delay={700} still={still} style={[styles.meet, { top: dialY + ORB * 0.85 + 24 }]}>
412
+ <Text style={[styles.meetText, styles.center]}>Meet Lucy.</Text>
413
+ </Reveal>
414
+ ) : null}
415
+ {tapNext ? (
416
+ <Pressable
417
+ style={StyleSheet.absoluteFill}
418
+ onPress={() => {
419
+ tap();
420
+ go(tapNext);
421
+ }}
422
+ accessibilityRole="button"
423
+ accessibilityLabel="Tap to continue"
424
+ >
425
+ <Reveal
426
+ key={`cue-${step}`}
427
+ delay={1400}
428
+ still={still}
429
+ style={[styles.cue, { bottom: insets.bottom + 44 }]}
430
+ >
431
+ <Text style={[text.cue, styles.center]}>TAP TO CONTINUE</Text>
432
+ </Reveal>
433
+ </Pressable>
434
+ ) : null}
435
+ {tapNext ? (
436
+ <LinkButton label="Skip" onPress={leave} style={[styles.skip, { top: top + 6 }]} />
437
+ ) : null}
438
+ </View>
439
+ ) : null}
440
+
441
+ {isChat(step) ? (
442
+ <KeyboardAvoidingView
443
+ behavior={Platform.OS === 'ios' ? 'padding' : undefined}
444
+ style={[styles.chat, { paddingTop: orbTop + ORB + 26 }]}
445
+ >
446
+ {/* The bottom inset goes on the scroll content: the padding behaviour above writes its own
447
+ paddingBottom over the style it is given. A long step scrolls; a short one stays at the bottom.
448
+ The keyboard shrinks the scroll without changing what's in it, so a resize goes back to the
449
+ newest line too: on a short phone the name field stays in view as the keyboard opens. */}
450
+ <ScrollView
451
+ ref={chatScroll}
452
+ style={styles.flex}
453
+ contentContainerStyle={[styles.chatBody, { paddingBottom: insets.bottom + 20 }]}
454
+ keyboardShouldPersistTaps="handled"
455
+ showsVerticalScrollIndicator={false}
456
+ alwaysBounceVertical={false}
457
+ onContentSizeChange={() => chatScroll.current?.scrollToEnd({ animated: !still })}
458
+ onLayout={() => chatScroll.current?.scrollToEnd({ animated: false })}
459
+ >
460
+ <View key={`lines-${step}`} style={styles.stack}>
461
+ {chat.lines.map((line) => (
462
+ <ChatLineView key={line.key} line={line} still={still} />
463
+ ))}
464
+ </View>
465
+ <View key={`controls-${step}`} style={styles.controls}>
466
+ {step === 'name' ? (
467
+ <Reveal delay={ctl} still={still} rise={18} style={styles.stackGap}>
468
+ <TextInput
469
+ value={draft}
470
+ onChangeText={setDraft}
471
+ placeholder="Your first name"
472
+ placeholderTextColor={ui.muted}
473
+ style={styles.input}
474
+ autoCapitalize="words"
475
+ autoCorrect={false}
476
+ autoComplete="given-name"
477
+ textContentType="givenName"
478
+ returnKeyType="next"
479
+ onSubmitEditing={submitName}
480
+ maxLength={40}
481
+ accessibilityLabel="Your first name"
482
+ />
483
+ <GlowButton label="Continue" onPress={submitName} disabled={!cleanName(draft)} />
484
+ </Reveal>
485
+ ) : null}
486
+
487
+ {step === 'signin' && authenticated ? (
488
+ <Reveal delay={ctl} still={still} rise={18}>
489
+ <Pressable
490
+ onPress={() => go('pain')}
491
+ accessibilityRole="button"
492
+ accessibilityLabel={`Continue as ${displayName(person)}`}
493
+ style={({ pressed }) => [styles.account, pressed && styles.pressed]}
494
+ >
495
+ <PersonAvatar person={person} size={42} />
496
+ <View style={styles.flex}>
497
+ <Text style={styles.accountName} numberOfLines={1}>
498
+ Continue as {displayName(person)}
499
+ </Text>
500
+ <Text style={styles.accountSub}>Signed in on this phone</Text>
501
+ </View>
502
+ <Ionicons name="chevron-forward" size={18} color={ui.muted} />
503
+ </Pressable>
504
+ </Reveal>
505
+ ) : null}
506
+ {step === 'signin' && !authenticated ? (
507
+ <Reveal delay={ctl} still={still} rise={18} style={styles.stackGap}>
508
+ <GlowButton
509
+ label="Sign in"
510
+ icon="log-in-outline"
511
+ onPress={() =>
512
+ navigation.navigate(AuthMobileNavigationRoutesEnum.Login, {
513
+ redirect: 'back',
514
+ })
515
+ }
516
+ />
517
+ <SoftButton
518
+ label="Create an account"
519
+ icon="person-add-outline"
520
+ onPress={() =>
521
+ navigation.navigate(AuthMobileNavigationRoutesEnum.SignUp, {
522
+ redirect: 'back',
523
+ })
524
+ }
525
+ />
526
+ <LinkButton label="Not now" onPress={() => go('pain')} />
527
+ <Text style={[text.foot, styles.center]}>
528
+ You sign in with Yantra, which Clockbook runs on, then come straight back here.
529
+ </Text>
530
+ </Reveal>
531
+ ) : null}
532
+
533
+ {step === 'pain' ? (
534
+ <View style={styles.options}>
535
+ {PAIN_KEYS.map((key, i) => (
536
+ <OptionRow
537
+ key={key}
538
+ label={PAIN[key].label}
539
+ icon={PAIN[key].icon as IconName}
540
+ selected={picking === key}
541
+ onPress={() => choose(key, { pain: key }, 'pain2')}
542
+ delay={ctl + i * 60}
543
+ still={still}
544
+ />
545
+ ))}
546
+ </View>
547
+ ) : null}
548
+
549
+ {step === 'home' ? (
550
+ <View style={styles.stackGap}>
551
+ <View
552
+ style={styles.nums}
553
+ accessibilityRole="radiogroup"
554
+ accessibilityLabel="People at home"
555
+ >
556
+ {HOME_SIZES.map((size, i) => (
557
+ <NumberChip
558
+ key={size}
559
+ label={size === 6 ? '6+' : String(size)}
560
+ a11y={HOME[size].label}
561
+ selected={picking === String(size)}
562
+ onPress={() => choose(String(size), { home: size }, 'home2')}
563
+ delay={ctl + i * 50}
564
+ still={still}
565
+ />
566
+ ))}
567
+ </View>
568
+ <Reveal delay={ctl + 380} still={still}>
569
+ <Text style={[text.note, styles.hint]}>
570
+ Count everyone whose admin lands on you, you included.
571
+ </Text>
572
+ </Reveal>
573
+ </View>
574
+ ) : null}
575
+
576
+ {step === 'time' ? (
577
+ <View style={styles.options}>
578
+ {TIME_KEYS.map((key, i) => (
579
+ <OptionRow
580
+ key={key}
581
+ label={TIME[key].label}
582
+ selected={picking === key}
583
+ onPress={() => choose(key, { time: key }, 'time2')}
584
+ delay={ctl + i * 60}
585
+ still={still}
586
+ />
587
+ ))}
588
+ </View>
589
+ ) : null}
590
+
591
+ {step === 'review' ? (
592
+ <Reveal delay={ctl} still={still} rise={8}>
593
+ <FillBar delay={ctl} duration={FILL_MS} still={still} />
594
+ </Reveal>
595
+ ) : null}
596
+
597
+ {step === 'help' ? (
598
+ <Reveal delay={ctl} still={still} rise={18}>
599
+ <GlowButton label="Show me" onPress={() => go('news')} />
600
+ </Reveal>
601
+ ) : null}
602
+ </View>
603
+ </ScrollView>
604
+ </KeyboardAvoidingView>
605
+ ) : null}
606
+
607
+ {step === 'news' ? (
608
+ <View style={[StyleSheet.absoluteFill, styles.centered]}>
609
+ <Reveal delay={150} still={still}>
610
+ <Text style={[styles.newsLine, styles.center]}>First the bad news.</Text>
611
+ </Reveal>
612
+ <Reveal delay={1000} still={still}>
613
+ <Text style={[styles.newsLine, styles.newsAccent, styles.center]}>Then the good.</Text>
614
+ </Reveal>
615
+ </View>
616
+ ) : null}
617
+
618
+ {step === 'bad' ? (
619
+ <View style={[styles.page, page]}>
620
+ <Reveal delay={120} still={still}>
621
+ <Text style={[text.lead, styles.center]}>
622
+ At this pace, life admin will take <Text style={text.accent}>{n.wakingDays} days</Text> of
623
+ your waking time this year.
624
+ </Text>
625
+ </Reveal>
626
+ <Reveal delay={900} still={still}>
627
+ <Text style={[text.sub, styles.center, styles.gapTop]}>Over a lifetime, that adds up to</Text>
628
+ </Reveal>
629
+ <Reveal delay={1200} still={still}>
630
+ <Roller years={n.lifetimeYears} still={still} />
631
+ </Reveal>
632
+ <Reveal delay={3500} still={still}>
633
+ <Text style={[text.body, styles.center]}>
634
+ of your waking life, spent on hold, on forms and on to-do lists.
635
+ </Text>
636
+ </Reveal>
637
+ <View style={styles.flex} />
638
+ <Reveal delay={3900} still={still}>
639
+ <Text style={[text.foot, styles.center, styles.foot]}>
640
+ Projection of about {n.min} minutes a day, counted in 16-hour waking days over the next 50
641
+ years. Illustrative, based on the U.S. BLS American Time Use Survey 2025.
642
+ </Text>
643
+ </Reveal>
644
+ <Reveal delay={4200} still={still}>
645
+ <GlowButton label="Now the good news" onPress={() => go('good')} />
646
+ </Reveal>
647
+ </View>
648
+ ) : null}
649
+
650
+ {step === 'good' ? (
651
+ <View style={[styles.page, page]}>
652
+ <Reveal delay={120} still={still}>
653
+ <Text style={[text.lead, styles.center]}>Here’s the good news. Lucy can hand you back</Text>
654
+ </Reveal>
655
+ <Reveal delay={700} still={still} style={styles.odometer}>
656
+ <Odometer value={n.yearHours} still={still} />
657
+ </Reveal>
658
+ <Reveal delay={3300} still={still}>
659
+ <Text style={[text.body, styles.center, styles.gapTopSmall]}>
660
+ every year. That’s about {n.week} hours a week, starting with this one.
661
+ </Text>
662
+ </Reveal>
663
+ <View style={styles.flex} />
664
+ <Reveal delay={3700} still={still}>
665
+ <Text style={[text.foot, styles.center, styles.foot]}>
666
+ Illustrative estimate: about {n.backMin} of {n.min} minutes a day handed to Lucy, based on
667
+ the U.S. BLS American Time Use Survey 2025. Results vary by household.
668
+ </Text>
669
+ </Reveal>
670
+ <Reveal delay={4000} still={still}>
671
+ <GlowButton label="Get my time back" onPress={() => go('cal')} />
672
+ </Reveal>
673
+ </View>
674
+ ) : null}
675
+
676
+ {step === 'cal' ? (
677
+ <View style={[styles.page, page]}>
678
+ <Reveal delay={80} still={still}>
679
+ <Text style={[text.lead, styles.center, styles.primeTitle]}>
680
+ Connect your calendar, so Lucy can book around your life.
681
+ </Text>
682
+ </Reveal>
683
+ <Reveal delay={380} still={still}>
684
+ <PrimeFrame still={still}>
685
+ <View style={styles.connect}>
686
+ <View style={styles.connectRow}>
687
+ <ConnectorLogo id="google-calendar" size={44} />
688
+ <View style={styles.flex}>
689
+ <Text style={styles.connectTitle}>Google Calendar</Text>
690
+ <Text style={styles.connectBody}>
691
+ Lucy checks when you’re free, so calls and appointments land where they fit.
692
+ </Text>
693
+ </View>
694
+ </View>
695
+ <Pressable
696
+ onPress={() => setSheet(true)}
697
+ accessibilityRole="button"
698
+ accessibilityLabel="Connect Google Calendar"
699
+ style={({ pressed }) => [styles.connectBtn, pressed && styles.pressed]}
700
+ >
701
+ <Text style={styles.connectBtnLabel}>Connect</Text>
702
+ </Pressable>
703
+ </View>
704
+ </PrimeFrame>
705
+ </Reveal>
706
+ <DrawnArrow delay={1000} still={still} />
707
+ <Reveal delay={1500} still={still}>
708
+ <Text style={[text.note, styles.center]}>
709
+ Lucy never books, pays or changes anything without your yes.
710
+ </Text>
711
+ </Reveal>
712
+ <View style={styles.flex} />
713
+ <Reveal delay={1700} still={still} style={styles.stackGapSmall}>
714
+ <GlowButton label="Continue" onPress={() => setSheet(true)} />
715
+ <LinkButton label="Not now" onPress={() => go('notif')} />
716
+ </Reveal>
717
+ <BottomSheet
718
+ visible={sheet}
719
+ onClose={() => setSheet(false)}
720
+ style={[styles.sheet, { paddingBottom: Math.max(insets.bottom, 14) + 8 }]}
721
+ >
722
+ <View style={styles.grabber} />
723
+ <Text accessibilityRole="header" style={[styles.sheetTitle, styles.center]}>
724
+ Your yes comes first.
725
+ </Text>
726
+ <View style={styles.sheetCard}>
727
+ <Text style={styles.sheetKicker}>LUCY NEVER</Text>
728
+ {[
729
+ 'Pays for anything without your approval',
730
+ 'Changes an account without asking you first',
731
+ 'Asks for your passwords or card numbers',
732
+ ].map((line, i) => (
733
+ <View key={line} style={[styles.sheetRow, i > 0 && styles.sheetRowLine]}>
734
+ <View style={styles.sheetX}>
735
+ <Ionicons name="close" size={14} color={ui.accentText} />
736
+ </View>
737
+ <Text style={styles.sheetRowText}>{line}</Text>
738
+ </View>
739
+ ))}
740
+ </View>
741
+ <Text style={[text.foot, styles.center, styles.sheetNote]}>
742
+ You can disconnect it any time in Connectors.
743
+ </Text>
744
+ <GlowButton label="Connect Google Calendar" busy={busy === 'cal'} onPress={connectCalendar} />
745
+ </BottomSheet>
746
+ </View>
747
+ ) : null}
748
+
749
+ {step === 'notif' ? (
750
+ <View style={[styles.page, page]}>
751
+ <Reveal delay={80} still={still}>
752
+ <Text style={[text.lead, styles.center, styles.primeTitle]}>
753
+ Get a nudge when something needs your yes.
754
+ </Text>
755
+ </Reveal>
756
+ <Reveal delay={380} still={still}>
757
+ <PrimeFrame still={still}>
758
+ <SystemPrompt
759
+ title={
760
+ Platform.OS === 'ios'
761
+ ? '“Clockbook” Would Like to Send You Notifications'
762
+ : 'Allow Clockbook to send you notifications?'
763
+ }
764
+ body="Notifications may include alerts, sounds and icon badges. These can be configured in Settings."
765
+ deny={Platform.OS === 'ios' ? 'Don’t Allow' : 'Don’t allow'}
766
+ allow="Allow"
767
+ onDeny={() => go('plan')}
768
+ onAllow={allowNotifications}
769
+ />
770
+ </PrimeFrame>
771
+ </Reveal>
772
+ <DrawnArrow delay={1000} still={still} />
773
+ <Reveal delay={1500} still={still}>
774
+ <Text style={[text.note, styles.center]}>
775
+ Only for approvals, call updates and the reminders you ask for.
776
+ </Text>
777
+ </Reveal>
778
+ <View style={styles.flex} />
779
+ <Reveal delay={1700} still={still}>
780
+ <GlowButton label="Continue" busy={busy === 'notif'} onPress={allowNotifications} />
781
+ </Reveal>
782
+ </View>
783
+ ) : null}
784
+
785
+ {step === 'plan' ? (
786
+ <View style={[styles.page, page]}>
787
+ <Reveal delay={80} still={still}>
788
+ <Text style={[text.display, styles.center, styles.planTitle]}>
789
+ {name ? `${name}, here’s` : 'Here’s'} your plan to win back{' '}
790
+ <Text style={styles.displayAccent}>{n.yearHours} hours</Text> this year.
791
+ </Text>
792
+ </Reveal>
793
+ <View style={styles.planRows}>
794
+ {plan.map((row, i) => (
795
+ <Reveal key={row.title} delay={480 + i * 240} still={still} style={styles.planRow}>
796
+ <View style={styles.planIcon}>
797
+ <Ionicons name={row.icon} size={21} color={ui.accentText} />
798
+ </View>
799
+ <View style={styles.flex}>
800
+ <Text style={styles.planHead}>{row.title}</Text>
801
+ <Text style={styles.planBody}>{row.body}</Text>
802
+ </View>
803
+ </Reveal>
804
+ ))}
805
+ </View>
806
+ <View style={styles.flex} />
807
+ <Reveal delay={1400} still={still}>
808
+ <Text style={[text.note, styles.center, styles.planCaption]}>
809
+ One tap and Lucy gets to work.
810
+ </Text>
811
+ </Reveal>
812
+ <Reveal delay={1500} still={still}>
813
+ <GlowButton label="Let’s go" icon="sparkles-outline" onPress={() => go('yay')} />
814
+ </Reveal>
815
+ </View>
816
+ ) : null}
817
+
818
+ {step === 'yay' ? (
819
+ <View style={StyleSheet.absoluteFill}>
820
+ <Burst centerY={yayY} still={still} />
821
+ <Reveal delay={650} still={still} style={[styles.yayText, { top: yayY + ORB * 0.9 + 40 }]}>
822
+ <Text style={[text.display, styles.center]}>You’re in{name ? `, ${name}` : ''}.</Text>
823
+ <Text style={[text.sub, styles.center, styles.yaySub]}>Let’s get your evenings back.</Text>
824
+ </Reveal>
825
+ </View>
826
+ ) : null}
827
+
828
+ {step === 'pay' ? (
829
+ <View style={StyleSheet.absoluteFill}>
830
+ <Sunset width={width} height={height * 0.66} still={still} />
831
+ <View style={[styles.payBody, { paddingBottom: insets.bottom + 20 }]}>
832
+ <Reveal delay={200} still={still}>
833
+ <Text style={[styles.payTitle, styles.center]}>
834
+ Take your <Text style={styles.displayAccent}>evenings</Text> back.
835
+ </Text>
836
+ </Reveal>
837
+ <Reveal delay={420} still={still}>
838
+ <Text style={[text.sub, styles.center, styles.paySub]}>
839
+ Hand Lucy the life admin, about {n.week} hours a week of it. Your first week is free.
840
+ </Text>
841
+ </Reveal>
842
+ <Reveal delay={620} still={still}>
843
+ <GlowButton variant="orange" label="Start my free week" onPress={() => go('remind')} />
844
+ </Reveal>
845
+ <Reveal delay={760} still={still} style={styles.payNote}>
846
+ <Ionicons name="checkmark" size={15} color={ui.accentText} />
847
+ <Text style={text.foot}>No payment due now. Cancel anytime.</Text>
848
+ </Reveal>
849
+ </View>
850
+ </View>
851
+ ) : null}
852
+
853
+ {step === 'remind' ? (
854
+ <View style={[styles.page, { paddingTop: top + 40, paddingBottom: insets.bottom + 20 }]}>
855
+ <Reveal delay={80} still={still}>
856
+ <Text style={[styles.remindTitle, styles.center]}>
857
+ When should we remind you that your free week is ending?
858
+ </Text>
859
+ </Reveal>
860
+ <Reveal delay={300} still={still} style={styles.lock}>
861
+ <LockPreview date={longDate(remindOn.date)} days={remind} />
862
+ </Reveal>
863
+ <Reveal delay={520} still={still} style={styles.choices}>
864
+ <View accessibilityRole="radiogroup" accessibilityLabel="Reminder">
865
+ {trial.options.map((o, i) => {
866
+ const on = remind === o.daysBefore;
867
+ return (
868
+ <Pressable
869
+ key={o.daysBefore}
870
+ onPress={() => setRemind(o.daysBefore)}
871
+ accessibilityRole="radio"
872
+ accessibilityState={{ checked: on }}
873
+ accessibilityLabel={`${o.daysBefore} days before, ${longDate(o.date)}`}
874
+ style={[styles.choice, i > 0 && styles.choiceLine]}
875
+ >
876
+ <View style={styles.flex}>
877
+ <Text style={styles.choiceTitle}>{o.daysBefore} days before</Text>
878
+ <Text style={styles.choiceDate}>{longDate(o.date)}</Text>
879
+ </View>
880
+ <View style={[styles.radio, on && styles.radioOn]}>
881
+ {on ? <Ionicons name="checkmark" size={15} color={ui.ink} /> : null}
882
+ </View>
883
+ </Pressable>
884
+ );
885
+ })}
886
+ </View>
887
+ </Reveal>
888
+ <View style={styles.flex} />
889
+ <Reveal delay={700} still={still}>
890
+ <GlowButton label="Continue" onPress={() => go('done')} />
891
+ <Text style={[text.foot, styles.center, styles.remindNote]}>
892
+ Turn on notifications to get this reminder.
893
+ </Text>
894
+ </Reveal>
895
+ </View>
896
+ ) : null}
897
+
898
+ {step === 'done' ? (
899
+ <View
900
+ style={[
901
+ styles.page,
902
+ styles.done,
903
+ { paddingTop: orbTop + ORB + 40, paddingBottom: insets.bottom + 12 },
904
+ ]}
905
+ >
906
+ <Reveal delay={300} still={still}>
907
+ <Text style={styles.doneTitle}>You’re all set{name ? `, ${name}` : ''}.</Text>
908
+ </Reveal>
909
+ <Reveal delay={500} still={still}>
910
+ <Text style={[text.body, styles.doneSub]}>What should I take off your plate first?</Text>
911
+ </Reveal>
912
+ <Reveal delay={700} still={still} style={styles.chips}>
913
+ {firstChores.map((chore) => (
914
+ <Pressable
915
+ key={chore.label}
916
+ onPress={() => {
917
+ tap();
918
+ startChore(chore);
919
+ }}
920
+ accessibilityRole="button"
921
+ accessibilityLabel={chore.label}
922
+ style={({ pressed }) => [styles.chip, pressed && styles.pressed]}
923
+ >
924
+ <Ionicons
925
+ name={CHORE_ICONS[chore.label] ?? 'sparkles-outline'}
926
+ size={18}
927
+ color={ui.accentText}
928
+ />
929
+ <Text style={styles.chipLabel}>{chore.label}</Text>
930
+ </Pressable>
931
+ ))}
932
+ </Reveal>
933
+ <View style={styles.flex} />
934
+ <LinkButton label="I’ll look around first" onPress={leave} />
935
+ {__DEV__ ? <LinkButton label="Replay the welcome" icon="refresh-outline" onPress={replay} /> : null}
936
+ </View>
937
+ ) : null}
938
+
939
+ <Animated.View
940
+ pointerEvents="none"
941
+ style={[
942
+ styles.orb,
943
+ { left: (width - ORB) / 2, opacity: orbO, transform: [{ translateY: orbY }, { scale: orbS }] },
944
+ ]}
945
+ >
946
+ <LucyOrb size={ORB} think={step === 'review' || step === 'yay'} still={still} />
947
+ </Animated.View>
948
+
949
+ {/* Over everything until it has played; its last frame is the intro clock's first. */}
950
+ {powering ? (
951
+ <PowerOn
952
+ size={dialSize}
953
+ center={{ x: width / 2, y: dialY }}
954
+ width={width}
955
+ height={height}
956
+ onDone={powered}
957
+ />
958
+ ) : null}
959
+
960
+ {prompt}
961
+ </View>
962
+ );
963
+ }
964
+
965
+ const styles = StyleSheet.create({
966
+ root: { flex: 1, backgroundColor: ui.bg, overflow: 'hidden' },
967
+ dark: { backgroundColor: '#0E0B09' },
968
+ flex: { flex: 1 },
969
+ center: { textAlign: 'center' },
970
+ centered: { alignItems: 'center', justifyContent: 'center', paddingHorizontal: 36 },
971
+ pressed: { transform: [{ scale: 0.985 }] },
972
+ orb: { position: 'absolute', top: 0, width: ORB, height: ORB },
973
+
974
+ dial: { position: 'absolute' },
975
+ beat: { position: 'absolute', left: 28, right: 28 },
976
+ beatSub: { marginTop: 14 },
977
+ meet: { position: 'absolute', left: 0, right: 0 },
978
+ meetText: { fontFamily: fonts.serifItalic, fontSize: 40, lineHeight: 46, color: ui.ink },
979
+ cue: { position: 'absolute', left: 0, right: 0 },
980
+ skip: { position: 'absolute', right: 12 },
981
+
982
+ chat: { flex: 1 },
983
+ chatBody: { flexGrow: 1, justifyContent: 'flex-end' },
984
+ stack: {
985
+ flexGrow: 1,
986
+ justifyContent: 'flex-end',
987
+ paddingHorizontal: 28,
988
+ paddingBottom: 22,
989
+ rowGap: 16,
990
+ },
991
+ controls: { minHeight: 176, paddingHorizontal: 20 },
992
+ stackGap: { rowGap: 12 },
993
+ stackGapSmall: { rowGap: 4 },
994
+ options: { rowGap: 10 },
995
+ nums: { flexDirection: 'row', justifyContent: 'space-between' },
996
+ hint: { paddingHorizontal: 8 },
997
+ input: {
998
+ height: 58,
999
+ borderRadius: 20,
1000
+ paddingHorizontal: 20,
1001
+ backgroundColor: ui.surface,
1002
+ borderWidth: 1,
1003
+ borderColor: 'rgba(26,23,20,0.14)',
1004
+ fontFamily: fonts.sans,
1005
+ fontSize: 18,
1006
+ color: ui.ink,
1007
+ },
1008
+ account: {
1009
+ height: 68,
1010
+ borderRadius: 22,
1011
+ flexDirection: 'row',
1012
+ alignItems: 'center',
1013
+ columnGap: 12,
1014
+ paddingLeft: 12,
1015
+ paddingRight: 16,
1016
+ backgroundColor: ui.surface,
1017
+ borderWidth: StyleSheet.hairlineWidth,
1018
+ borderColor: 'rgba(26,23,20,0.1)',
1019
+ },
1020
+ accountName: { fontFamily: fonts.sansSemi, fontSize: 16, color: ui.ink },
1021
+ accountSub: { fontFamily: fonts.sans, fontSize: 13, color: ui.muted, marginTop: 3 },
1022
+
1023
+ page: { flex: 1, paddingHorizontal: 26, alignItems: 'stretch' },
1024
+ gapTop: { marginTop: 26 },
1025
+ gapTopSmall: { marginTop: 18 },
1026
+ foot: { marginBottom: 16, paddingHorizontal: 6 },
1027
+ newsLine: { fontFamily: fonts.serif, fontSize: 40, lineHeight: 44, letterSpacing: -0.8, color: ui.ink },
1028
+ newsAccent: { fontFamily: fonts.serifItalic, color: ui.accentText },
1029
+ odometer: { marginTop: 70 },
1030
+
1031
+ primeTitle: { marginBottom: 34, paddingHorizontal: 8 },
1032
+ connect: {
1033
+ borderRadius: 26,
1034
+ backgroundColor: ui.surface,
1035
+ padding: 16,
1036
+ rowGap: 14,
1037
+ borderWidth: StyleSheet.hairlineWidth,
1038
+ borderColor: 'rgba(26,23,20,0.08)',
1039
+ },
1040
+ connectRow: { flexDirection: 'row', columnGap: 12, alignItems: 'flex-start' },
1041
+ connectTitle: { fontFamily: fonts.sansSemi, fontSize: 17, color: ui.ink },
1042
+ connectBody: { fontFamily: fonts.sans, fontSize: 14.5, lineHeight: 20, color: ui.ink2, marginTop: 4 },
1043
+ connectBtn: {
1044
+ alignSelf: 'flex-end',
1045
+ height: 44,
1046
+ minWidth: 120,
1047
+ paddingHorizontal: 20,
1048
+ borderRadius: 22,
1049
+ backgroundColor: ui.ink,
1050
+ alignItems: 'center',
1051
+ justifyContent: 'center',
1052
+ },
1053
+ connectBtnLabel: { fontFamily: fonts.sansSemi, fontSize: 15.5, color: '#FFFAF5' },
1054
+ sheet: {
1055
+ backgroundColor: ui.surface,
1056
+ borderTopLeftRadius: 28,
1057
+ borderTopRightRadius: 28,
1058
+ paddingHorizontal: 20,
1059
+ paddingTop: 10,
1060
+ },
1061
+ grabber: { alignSelf: 'center', width: 36, height: 5, borderRadius: 3, backgroundColor: ui.fill, marginBottom: 18 },
1062
+ sheetTitle: {
1063
+ fontFamily: fonts.serif,
1064
+ fontSize: 34,
1065
+ lineHeight: 38,
1066
+ letterSpacing: -0.6,
1067
+ color: ui.ink,
1068
+ marginBottom: 18,
1069
+ },
1070
+ sheetCard: {
1071
+ borderRadius: 24,
1072
+ backgroundColor: ui.soft,
1073
+ paddingHorizontal: 16,
1074
+ paddingTop: 16,
1075
+ paddingBottom: 4,
1076
+ marginBottom: 14,
1077
+ },
1078
+ sheetKicker: { fontFamily: fonts.sansSemi, fontSize: 12, letterSpacing: 1.2, color: ui.muted, marginBottom: 4 },
1079
+ sheetRow: { flexDirection: 'row', alignItems: 'center', columnGap: 12, paddingVertical: 12 },
1080
+ sheetRowLine: { borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: 'rgba(26,23,20,0.1)' },
1081
+ sheetX: {
1082
+ width: 26,
1083
+ height: 26,
1084
+ borderRadius: 13,
1085
+ backgroundColor: ui.accentSoft,
1086
+ alignItems: 'center',
1087
+ justifyContent: 'center',
1088
+ },
1089
+ sheetRowText: { flex: 1, fontFamily: fonts.sans, fontSize: 15.5, lineHeight: 21, color: ui.ink },
1090
+ sheetNote: { marginBottom: 14 },
1091
+
1092
+ planTitle: { marginBottom: 34 },
1093
+ displayAccent: { fontFamily: fonts.serifItalic, color: ui.accentText },
1094
+ planRows: { rowGap: 24 },
1095
+ planRow: { flexDirection: 'row', columnGap: 16, alignItems: 'flex-start' },
1096
+ planIcon: {
1097
+ width: 46,
1098
+ height: 46,
1099
+ borderRadius: 15,
1100
+ backgroundColor: ui.accentSoft,
1101
+ alignItems: 'center',
1102
+ justifyContent: 'center',
1103
+ },
1104
+ planHead: { fontFamily: fonts.sansSemi, fontSize: 17, lineHeight: 22, color: ui.ink, marginTop: 2 },
1105
+ planBody: { fontFamily: fonts.sans, fontSize: 15, lineHeight: 21, color: ui.muted, marginTop: 4 },
1106
+ planCaption: { marginBottom: 14 },
1107
+
1108
+ yayText: { position: 'absolute', left: 26, right: 26 },
1109
+ yaySub: { marginTop: 10 },
1110
+
1111
+ payBody: { position: 'absolute', left: 0, right: 0, bottom: 0, paddingHorizontal: 26, alignItems: 'stretch' },
1112
+ payTitle: {
1113
+ fontFamily: fonts.serif,
1114
+ fontSize: 50,
1115
+ lineHeight: 52,
1116
+ letterSpacing: -1.2,
1117
+ color: ui.ink,
1118
+ marginBottom: 14,
1119
+ },
1120
+ paySub: { marginBottom: 26, paddingHorizontal: 10 },
1121
+ payNote: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center', columnGap: 6, marginTop: 14 },
1122
+
1123
+ remindTitle: {
1124
+ fontFamily: fonts.sansSemi,
1125
+ fontSize: 24,
1126
+ lineHeight: 30,
1127
+ letterSpacing: -0.4,
1128
+ color: ui.ink,
1129
+ paddingHorizontal: 10,
1130
+ },
1131
+ lock: { marginTop: 26 },
1132
+ choices: {
1133
+ marginTop: -56,
1134
+ borderRadius: 26,
1135
+ backgroundColor: ui.surface,
1136
+ overflow: 'hidden',
1137
+ borderWidth: StyleSheet.hairlineWidth,
1138
+ borderColor: 'rgba(26,23,20,0.08)',
1139
+ ...Platform.select({
1140
+ ios: {
1141
+ shadowColor: '#2B1A0C',
1142
+ shadowOpacity: 0.1,
1143
+ shadowRadius: 22,
1144
+ shadowOffset: { width: 0, height: 14 },
1145
+ },
1146
+ default: { elevation: 3 },
1147
+ }),
1148
+ },
1149
+ choice: { height: 70, flexDirection: 'row', alignItems: 'center', columnGap: 12, paddingHorizontal: 18 },
1150
+ choiceLine: { borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: 'rgba(26,23,20,0.1)' },
1151
+ choiceTitle: { fontFamily: fonts.sansSemi, fontSize: 17, color: ui.ink },
1152
+ choiceDate: { fontFamily: fonts.sans, fontSize: 14, color: ui.muted, marginTop: 4 },
1153
+ radio: {
1154
+ width: 26,
1155
+ height: 26,
1156
+ borderRadius: 13,
1157
+ borderWidth: 1.5,
1158
+ borderColor: 'rgba(26,23,20,0.18)',
1159
+ alignItems: 'center',
1160
+ justifyContent: 'center',
1161
+ },
1162
+ radioOn: { backgroundColor: ui.accent, borderColor: ui.accent },
1163
+ remindNote: { marginTop: 10 },
1164
+
1165
+ done: { paddingHorizontal: 24 },
1166
+ doneTitle: { fontFamily: fonts.serif, fontSize: 44, lineHeight: 46, letterSpacing: -1.1, color: ui.ink },
1167
+ doneSub: { marginTop: 10, marginBottom: 24 },
1168
+ chips: { flexDirection: 'row', flexWrap: 'wrap', gap: 10 },
1169
+ chip: {
1170
+ height: 46,
1171
+ borderRadius: 23,
1172
+ flexDirection: 'row',
1173
+ alignItems: 'center',
1174
+ columnGap: 8,
1175
+ paddingLeft: 13,
1176
+ paddingRight: 16,
1177
+ backgroundColor: ui.surface,
1178
+ borderWidth: StyleSheet.hairlineWidth,
1179
+ borderColor: 'rgba(26,23,20,0.12)',
1180
+ },
1181
+ chipLabel: { fontFamily: fonts.sansMedium, fontSize: 15, color: ui.ink },
1182
+ });