@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 @@
1
+ {"back": "M2.6909 12.4321C4.83798 15.1892 9.10828 16.9676 12.1883 15.2973C15.9348 13.2649 16.5859 6.85417 13.5848 3.18198C11.1612 0.215315 6.16615 -1.19508 3.02576 1.24708C-0.275768 3.82054 0.246747 9.29302 2.6909 12.4321Z", "face": "M3.65431 2.48441C0.852759 4.57381 -1.0145 8.80565 0.59548 11.9202C2.54894 15.7078 8.94577 16.4915 12.679 13.568C15.692 11.2047 17.2099 6.23883 14.8294 3.0487C12.3249 -0.303215 6.84311 0.105248 3.65431 2.48441Z", "hands": "M11.0318 12.4421C10.9331 12.4414 10.8376 12.4065 10.7617 12.3434C10.6858 12.2803 10.6341 12.1929 10.6154 12.0959C10.0796 9.31957 7.58042 8.7261 7.47433 8.70223C7.411 8.68796 7.35176 8.65947 7.30108 8.61891C7.2504 8.57836 7.20962 8.52679 7.18182 8.46814C7.15403 8.40948 7.13995 8.34526 7.14065 8.28036C7.14135 8.21545 7.15682 8.15155 7.18588 8.09351C8.09829 6.27665 7.19715 3.72309 7.18588 3.69723C7.14737 3.59083 7.1527 3.47349 7.2007 3.37102C7.2487 3.26856 7.33544 3.18935 7.44184 3.15084C7.54823 3.11233 7.66557 3.11766 7.76804 3.16566C7.8705 3.21366 7.94971 3.3004 7.98822 3.40679C8.02801 3.51687 8.89135 5.95107 8.14272 8.01925C9.05248 8.35941 10.9549 9.36598 11.4509 11.9315C11.4723 12.0426 11.4487 12.1577 11.3853 12.2514C11.3219 12.3452 11.2238 12.4099 11.1127 12.4314C11.0861 12.4374 11.059 12.4409 11.0318 12.4421Z", "hour": "M7.62 8.30 C 8.45 6.10 7.62 3.70 7.585 3.55", "minute": "M7.62 8.30 C 8.35 8.55 10.55 9.35 11.03 12.02", "pivot": [7.62, 8.3], "handWidth": 0.86}
Binary file
Binary file
Binary file
@@ -0,0 +1,604 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * clockbook.com's time-back animation (pages/Home loop-time-back.mp4) rebuilt as Lottie, scene for scene, so the app
4
+ * plays the web's animation as sharp vectors instead of a video:
5
+ *
6
+ * 0.1 s Lucy's clock pops in, its hands draw in
7
+ * 0.9 s "0 min, back, every day"; it counts to 38 while a lighter wedge sweeps the face and the hands wind back
8
+ * 2.9 s "every week", counting to 4.4 hrs
9
+ * 4.4 s "every year", counting to 229 hrs, then "≈ 28 workdays"
10
+ * 6.4 s the counter goes, the hands come home, the clock shrinks to the left
11
+ * 7.0 s "Clockbook", then "Time back, every day." and the footnote; it fades and starts again at 8.9 s
12
+ *
13
+ * Measured from the video's frames (720 x 720, 30 fps). Text is drawn as Inter outlines (inter-glyphs.json), so no
14
+ * font is needed on the device; each character is a small precomposition used by reference.
15
+ *
16
+ * node packages-modules/clock-tik/mobile/tools/lottie/time-back.mjs
17
+ *
18
+ * writes src/assets/lottie/time-back.json.
19
+ */
20
+ import { readFileSync, writeFileSync } from 'node:fs';
21
+ import { dirname, join } from 'node:path';
22
+ import { fileURLToPath } from 'node:url';
23
+
24
+ const here = dirname(fileURLToPath(import.meta.url));
25
+ const GLYPHS = JSON.parse(readFileSync(join(here, 'inter-glyphs.json'), 'utf8')).fonts;
26
+ const OUT = join(here, '../../src/assets/lottie/time-back.json');
27
+
28
+ /* ---------------------------------------------------------------------------------------------- the video */
29
+
30
+ const FPS = 60;
31
+ const SIZE = 720;
32
+ const DURATION = 8.9;
33
+ const OP = Math.round(DURATION * FPS);
34
+ /** Seconds to frames. */
35
+ const T = (s) => Math.round(s * FPS);
36
+
37
+ const BG = '#FFF7F2';
38
+ const INK = '#1A1714';
39
+ const INK2 = '#45403A';
40
+ const ORANGE = '#FF5A00';
41
+ const ORANGE2 = '#FF8A3D';
42
+ const FOOT = '#A0958B';
43
+ const WHITE = '#FFFFFF';
44
+
45
+ /** The clock: centre and size of the mark's 18-unit box, while counting and once beside the wordmark. */
46
+ const CLOCK_BIG = { x: 360, y: 255, box: 350 };
47
+ const CLOCK_SMALL = { x: 139, y: 312, box: 158 };
48
+
49
+ /** The three figures. `count` is when the number climbs; the block fades in and out around it. */
50
+ const STATS = [
51
+ {
52
+ id: 'day',
53
+ to: 38,
54
+ decimals: 0,
55
+ unit: 'min',
56
+ label: 'back, every day',
57
+ baseline: 525,
58
+ labelBaseline: 573,
59
+ fadeIn: [0.85, 1.1],
60
+ count: [1.2, 2.4],
61
+ fadeOut: [2.75, 2.9],
62
+ },
63
+ {
64
+ id: 'week',
65
+ to: 4.4,
66
+ decimals: 1,
67
+ unit: 'hrs',
68
+ label: 'every week',
69
+ baseline: 525,
70
+ labelBaseline: 573,
71
+ fadeIn: [2.85, 3.0],
72
+ count: [2.9, 4.0],
73
+ fadeOut: [4.3, 4.45],
74
+ },
75
+ {
76
+ id: 'year',
77
+ to: 229,
78
+ decimals: 0,
79
+ unit: 'hrs',
80
+ label: 'every year',
81
+ baseline: 505,
82
+ labelBaseline: 555,
83
+ fadeIn: [4.4, 4.5],
84
+ count: [4.45, 5.3],
85
+ fadeOut: [6.35, 6.55],
86
+ extra: { text: '≈ 28 workdays', baseline: 590, fadeIn: [5.3, 5.5] },
87
+ },
88
+ ];
89
+ const NUMBER_SIZE = 103;
90
+ const UNIT_SIZE = 50;
91
+ const UNIT_GAP = 8;
92
+ const LABEL_SIZE = 27;
93
+ const EXTRA_SIZE = 22;
94
+
95
+ /** The hands wind back as the figures climb (minutes; the hour hand turns a sixth as far), then come home. */
96
+ const MINUTE_TURNS = [
97
+ [0, 0],
98
+ [1.2, 0],
99
+ [2.4, -228],
100
+ [2.9, -228],
101
+ [4.0, -948],
102
+ [4.45, -948],
103
+ [5.3, -2028],
104
+ [6.0, -2028],
105
+ [6.4, -2160],
106
+ ];
107
+
108
+ /** The end card. Widths are fitted to the video's. */
109
+ const WORDMARK = { text: 'Clockbook', x: 232, baseline: 352, width: 420, at: 7.0 };
110
+ const TAGLINE = { lead: 'Time back, ', em: 'every day.', baseline: 441, width: 330, at: 7.35 };
111
+ const FOOTNOTE = {
112
+ text: 'Illustrative estimate based on the U.S. BLS American Time Use Survey 2025',
113
+ baseline: 694,
114
+ width: 576,
115
+ at: 7.5,
116
+ };
117
+ const END_FADE = [8.7, 8.9];
118
+
119
+ /* ---------------------------------------------------------------------------------------------- the mark */
120
+
121
+ // The mark's paths (components/Logo.tsx): the back, the face, and the two hands.
122
+ const BACK =
123
+ 'M2.6909 12.4321C4.83798 15.1892 9.10828 16.9676 12.1883 15.2973C15.9348 13.2649 16.5859 6.85417 13.5848 3.18198C11.1612 0.215315 6.16615 -1.19508 3.02576 1.24708C-0.275768 3.82054 0.246747 9.29302 2.6909 12.4321Z';
124
+ const FACE =
125
+ 'M3.65431 2.48441C0.852759 4.57381 -1.0145 8.80565 0.59548 11.9202C2.54894 15.7078 8.94577 16.4915 12.679 13.568C15.692 11.2047 17.2099 6.23883 14.8294 3.0487C12.3249 -0.303215 6.84311 0.105248 3.65431 2.48441Z';
126
+ const HOUR = 'M7.62 8.30 C 8.45 6.10 7.62 3.70 7.585 3.55';
127
+ const MINUTE = 'M7.62 8.30 C 8.35 8.55 10.55 9.35 11.03 12.02';
128
+ const PIVOT = [7.62, 8.3];
129
+ /** The middle of the mark's 18-unit box (-1..17), which the clock is placed by. */
130
+ const MARK_CENTRE = [8, 8];
131
+
132
+ /** An SVG path of absolute M, C and Z (all the mark uses) as Lottie contours. */
133
+ function svgContours(d) {
134
+ const tokens = d.match(/[MCZ]|-?\d*\.?\d+(?:e-?\d+)?/gi);
135
+ const out = [];
136
+ let cur = null;
137
+ let i = 0;
138
+ const num = () => Number(tokens[i++]);
139
+ while (i < tokens.length) {
140
+ const cmd = tokens[i++];
141
+ if (cmd === 'M') {
142
+ cur = { c: false, v: [[num(), num()]], i: [[0, 0]], o: [[0, 0]] };
143
+ out.push(cur);
144
+ } else if (cmd === 'C') {
145
+ while (i < tokens.length && !/[MCZ]/i.test(tokens[i])) {
146
+ const c1 = [num(), num()];
147
+ const c2 = [num(), num()];
148
+ const p = [num(), num()];
149
+ const last = cur.v[cur.v.length - 1];
150
+ cur.o[cur.o.length - 1] = [c1[0] - last[0], c1[1] - last[1]];
151
+ cur.v.push(p);
152
+ cur.i.push([c2[0] - p[0], c2[1] - p[1]]);
153
+ cur.o.push([0, 0]);
154
+ }
155
+ } else if (cmd === 'Z') {
156
+ cur.c = true;
157
+ const a = cur.v[0];
158
+ const b = cur.v[cur.v.length - 1];
159
+ if (Math.abs(a[0] - b[0]) < 1e-3 && Math.abs(a[1] - b[1]) < 1e-3) {
160
+ cur.i[0] = cur.i.pop();
161
+ cur.v.pop();
162
+ cur.o.pop();
163
+ }
164
+ }
165
+ }
166
+ return out;
167
+ }
168
+
169
+ /* ---------------------------------------------------------------------------------------------- lottie bits */
170
+
171
+ const still = (k) => ({ a: 0, k });
172
+ const rgb = (hex) => [1, 3, 5].map((n) => parseInt(hex.slice(n, n + 2), 16) / 255);
173
+ const rgba = (hex) => [...rgb(hex), 1];
174
+ const EASE_IN_OUT = { o: { x: [0.65], y: [0] }, i: { x: [0.35], y: [1] } };
175
+ const EASE_OUT = { o: { x: [0.33], y: [1] }, i: { x: [0.68], y: [1] } };
176
+ const OVERSHOOT = { o: { x: [0.34], y: [1.56] }, i: { x: [0.64], y: [1] } };
177
+
178
+ /** Animated property from [seconds, value] pairs; `ease` is used into every key but the first. */
179
+ function anim(keys, ease = EASE_IN_OUT) {
180
+ const k = keys.map(([s, v], n) => {
181
+ const value = Array.isArray(v) ? v : [v];
182
+ return n < keys.length - 1 ? { t: T(s), s: value, ...ease } : { t: T(s), s: value };
183
+ });
184
+ return { a: 1, k };
185
+ }
186
+ const transform = ({ p = [0, 0], a = [0, 0], s = [100, 100], r = 0, o = 100 } = {}) => ({
187
+ o: typeof o === 'number' ? still(o) : o,
188
+ r: typeof r === 'number' ? still(r) : r,
189
+ p: Array.isArray(p) ? still([...p, 0]) : p,
190
+ a: still([...a, 0]),
191
+ s: Array.isArray(s) ? still([...s, 100]) : s,
192
+ });
193
+ const groupTransform = (extra = {}) => ({
194
+ ty: 'tr',
195
+ p: still([0, 0]),
196
+ a: still([0, 0]),
197
+ s: still([100, 100]),
198
+ r: still(0),
199
+ o: still(100),
200
+ sk: still(0),
201
+ sa: still(0),
202
+ ...extra,
203
+ });
204
+ const paths = (contours) => contours.map((k) => ({ ty: 'sh', ks: still({ i: k.i, o: k.o, v: k.v, c: k.c }) }));
205
+ const fill = (hex, opacity = 100) => ({ ty: 'fl', c: still(rgba(hex)), o: still(opacity), r: 1 });
206
+ const stroke = (hex, width) => ({ ty: 'st', c: still(rgba(hex)), o: still(100), w: still(width), lc: 2, lj: 2, ml: 4 });
207
+ const fade = (from, to, inAt, outAt) => anim([...(inAt ? [[inAt[0], from], [inAt[1], to]] : [[0, to]]), ...(outAt ? [[outAt[0], to], [outAt[1], from]] : [])]);
208
+
209
+ let ind = 0;
210
+ const base = (extra) => ({ ddd: 0, ind: ++ind, sr: 1, ao: 0, bm: 0, st: 0, ip: 0, op: OP, ...extra });
211
+
212
+ /* ---------------------------------------------------------------------------------------------- text */
213
+
214
+ /** Where a glyph's baseline sits inside its precomposition (glyphs reach above it, so it starts low). */
215
+ const GLYPH_BASE = 2900;
216
+ const assets = new Map();
217
+
218
+ function glyphAsset(font, ch, color) {
219
+ const id = `g_${font}_${color.slice(1)}_${ch.codePointAt(0)}`;
220
+ if (!assets.has(id)) {
221
+ const g = GLYPHS[font].glyphs[ch];
222
+ if (!g) throw new Error(`no glyph for "${ch}" in ${font}`);
223
+ assets.set(id, {
224
+ id,
225
+ w: 3200,
226
+ h: 3400,
227
+ layers: [
228
+ {
229
+ ddd: 0,
230
+ ind: 1,
231
+ ty: 4,
232
+ nm: ch,
233
+ sr: 1,
234
+ ks: transform({ p: [0, GLYPH_BASE] }),
235
+ ao: 0,
236
+ shapes: [{ ty: 'gr', it: [...paths(g.contours), fill(color), groupTransform()] }],
237
+ ip: 0,
238
+ op: OP,
239
+ st: 0,
240
+ bm: 0,
241
+ },
242
+ ],
243
+ });
244
+ }
245
+ return id;
246
+ }
247
+
248
+ const advance = (font, ch) => GLYPHS[font].glyphs[ch].adv;
249
+ const scaleOf = (font, size) => size / GLYPHS[font].upm;
250
+ const widthOf = (font, text, size) => [...text].reduce((w, ch) => w + advance(font, ch), 0) * scaleOf(font, size);
251
+ /** The size at which `text` is `width` wide. */
252
+ const fitted = (font, text, width) => (width / widthOf(font, text, 1000)) * 1000;
253
+
254
+ /** One character, placed by its baseline, from ip to op (seconds), with optional animated opacity and position. */
255
+ function glyphLayer({ font, ch, color, size, x, baseline, ip = 0, op = DURATION, o, p }) {
256
+ const k = scaleOf(font, size) * 100;
257
+ return base({
258
+ ty: 0,
259
+ nm: ch,
260
+ refId: glyphAsset(font, ch, color),
261
+ w: 3200,
262
+ h: 3400,
263
+ ip: T(ip),
264
+ op: T(op),
265
+ ks: transform({ p: p ?? [x, baseline], a: [0, GLYPH_BASE], s: [k, k], o: o ?? 100 }),
266
+ });
267
+ }
268
+
269
+ /** A run of text from x; each character can be given its own entrance. */
270
+ function textLayers({ text, font, color, size, x, baseline, ip, op, each }) {
271
+ const out = [];
272
+ let cursor = x;
273
+ [...text].forEach((ch, n) => {
274
+ if (ch !== ' ') out.push(glyphLayer({ font, ch, color, size, x: cursor, baseline, ip, op, ...(each ? each(n, cursor) : {}) }));
275
+ cursor += advance(font, ch) * scaleOf(font, size);
276
+ });
277
+ return out;
278
+ }
279
+
280
+ /** A group of layers that fades in and out as one: a precomposition, placed for its time. */
281
+ function block(id, layers, { ip, op, opacity }) {
282
+ assets.set(id, { id, w: SIZE, h: SIZE, layers });
283
+ return base({ ty: 0, nm: id, refId: id, w: SIZE, h: SIZE, ip: T(ip), op: T(op), ks: transform({ o: opacity }) });
284
+ }
285
+
286
+ /* ---------------------------------------------------------------------------------------------- the counter */
287
+
288
+ const DIGIT = Math.max(...'0123456789'.split('').map((d) => advance('extrabold', d)));
289
+
290
+ function counterBlock(stat) {
291
+ const layers = [];
292
+ const scale = scaleOf('extrabold', NUMBER_SIZE);
293
+ const final = stat.to.toFixed(stat.decimals);
294
+ // Digits in equal slots, right-aligned, so the unit holds still while the number climbs.
295
+ const slots = [...final].map((ch) => (ch === '.' ? advance('extrabold', '.') : DIGIT) * scale);
296
+ const numberWidth = slots.reduce((a, b) => a + b, 0);
297
+ const unitWidth = widthOf('extrabold', stat.unit, UNIT_SIZE);
298
+ const left = SIZE / 2 - (numberWidth + UNIT_GAP + unitWidth) / 2;
299
+
300
+ const [c0, c1] = stat.count;
301
+ const start = stat.fadeIn[0];
302
+ const end = stat.fadeOut[1];
303
+ // The number on every frame, updated at the video's 30 fps, easing out.
304
+ const shown = [];
305
+ for (let f = T(start); f < T(end); f++) {
306
+ const t = Math.floor((f / FPS) * 30) / 30;
307
+ const p = Math.min(1, Math.max(0, (t - c0) / (c1 - c0)));
308
+ shown.push((stat.to * (1 - (1 - p) ** 3)).toFixed(stat.decimals).padStart(final.length, ' '));
309
+ }
310
+ slots.forEach((slot, s) => {
311
+ const slotLeft = left + slots.slice(0, s).reduce((a, b) => a + b, 0);
312
+ let run = 0;
313
+ for (let f = 1; f <= shown.length; f++) {
314
+ const ch = shown[run][s];
315
+ if (f < shown.length && shown[f][s] === ch) continue;
316
+ if (ch !== ' ') {
317
+ const x = slotLeft + (slot - advance('extrabold', ch) * scale) / 2;
318
+ layers.push(
319
+ glyphLayer({
320
+ font: 'extrabold',
321
+ ch,
322
+ color: INK,
323
+ size: NUMBER_SIZE,
324
+ x,
325
+ baseline: stat.baseline,
326
+ ip: (T(start) + run) / FPS,
327
+ op: (T(start) + f) / FPS,
328
+ }),
329
+ );
330
+ }
331
+ run = f;
332
+ }
333
+ });
334
+ layers.push(
335
+ ...textLayers({
336
+ text: stat.unit,
337
+ font: 'extrabold',
338
+ color: ORANGE,
339
+ size: UNIT_SIZE,
340
+ x: left + numberWidth + UNIT_GAP,
341
+ baseline: stat.baseline,
342
+ ip: start,
343
+ op: end,
344
+ }),
345
+ ...textLayers({
346
+ text: stat.label,
347
+ font: 'semibold',
348
+ color: INK2,
349
+ size: LABEL_SIZE,
350
+ x: SIZE / 2 - widthOf('semibold', stat.label, LABEL_SIZE) / 2,
351
+ baseline: stat.labelBaseline,
352
+ ip: start,
353
+ op: end,
354
+ }),
355
+ );
356
+ if (stat.extra) {
357
+ const e = stat.extra;
358
+ layers.push(
359
+ ...textLayers({
360
+ text: e.text,
361
+ font: 'semibold',
362
+ color: ORANGE,
363
+ size: EXTRA_SIZE,
364
+ x: SIZE / 2 - widthOf('semibold', e.text, EXTRA_SIZE) / 2,
365
+ baseline: e.baseline,
366
+ ip: start,
367
+ op: end,
368
+ each: () => ({ o: anim([[e.fadeIn[0], 0], [e.fadeIn[1], 100]]) }),
369
+ }),
370
+ );
371
+ }
372
+ return block(`counter_${stat.id}`, layers, {
373
+ ip: start,
374
+ op: end,
375
+ opacity: anim([
376
+ [stat.fadeIn[0], 0],
377
+ [stat.fadeIn[1], 100],
378
+ [stat.fadeOut[0], 100],
379
+ [stat.fadeOut[1], 0],
380
+ ]),
381
+ });
382
+ }
383
+
384
+ /* ---------------------------------------------------------------------------------------------- the end card */
385
+
386
+ function endCard() {
387
+ const layers = [];
388
+ const wordSize = fitted('extrabold', WORDMARK.text, WORDMARK.width);
389
+ // "Clockbook" comes in letter by letter from the left, as the video wipes it in.
390
+ layers.push(
391
+ ...textLayers({
392
+ text: WORDMARK.text,
393
+ font: 'extrabold',
394
+ color: INK,
395
+ size: wordSize,
396
+ x: WORDMARK.x,
397
+ baseline: WORDMARK.baseline,
398
+ ip: WORDMARK.at,
399
+ op: DURATION,
400
+ each: (n, x) => {
401
+ const at = WORDMARK.at + n * 0.035;
402
+ return {
403
+ o: anim([[at, 0], [at + 0.16, 100]], EASE_OUT),
404
+ p: anim([[at, [x - 14, WORDMARK.baseline, 0]], [at + 0.22, [x, WORDMARK.baseline, 0]]], EASE_OUT),
405
+ };
406
+ },
407
+ }),
408
+ );
409
+ // "Time back, every day.", the last two words in orange.
410
+ const tagSize = fitted('bold', TAGLINE.lead + TAGLINE.em, TAGLINE.width);
411
+ const tagLeft = SIZE / 2 - TAGLINE.width / 2;
412
+ const rise = (x) => ({
413
+ o: anim([[TAGLINE.at, 0], [TAGLINE.at + 0.25, 100]], EASE_OUT),
414
+ p: anim([[TAGLINE.at, [x, TAGLINE.baseline + 10, 0]], [TAGLINE.at + 0.3, [x, TAGLINE.baseline, 0]]], EASE_OUT),
415
+ });
416
+ layers.push(
417
+ ...textLayers({
418
+ text: TAGLINE.lead,
419
+ font: 'bold',
420
+ color: INK2,
421
+ size: tagSize,
422
+ x: tagLeft,
423
+ baseline: TAGLINE.baseline,
424
+ ip: TAGLINE.at,
425
+ op: DURATION,
426
+ each: (_, x) => rise(x),
427
+ }),
428
+ ...textLayers({
429
+ text: TAGLINE.em,
430
+ font: 'bold',
431
+ color: ORANGE,
432
+ size: tagSize,
433
+ x: tagLeft + widthOf('bold', TAGLINE.lead, tagSize),
434
+ baseline: TAGLINE.baseline,
435
+ ip: TAGLINE.at,
436
+ op: DURATION,
437
+ each: (_, x) => rise(x),
438
+ }),
439
+ );
440
+ // The footnote, small and quiet at the bottom.
441
+ const footSize = fitted('regular', FOOTNOTE.text, FOOTNOTE.width);
442
+ layers.push(
443
+ ...textLayers({
444
+ text: FOOTNOTE.text,
445
+ font: 'regular',
446
+ color: FOOT,
447
+ size: footSize,
448
+ x: SIZE / 2 - FOOTNOTE.width / 2,
449
+ baseline: FOOTNOTE.baseline,
450
+ ip: FOOTNOTE.at,
451
+ op: DURATION,
452
+ each: () => ({ o: anim([[FOOTNOTE.at, 0], [FOOTNOTE.at + 0.3, 100]], EASE_OUT) }),
453
+ }),
454
+ );
455
+ return block('end_card', layers, {
456
+ ip: WORDMARK.at,
457
+ op: DURATION,
458
+ opacity: anim([
459
+ [WORDMARK.at, 100],
460
+ [END_FADE[0], 100],
461
+ [END_FADE[1], 0],
462
+ ]),
463
+ });
464
+ }
465
+
466
+ /* ---------------------------------------------------------------------------------------------- the clock */
467
+
468
+ function clockLayers() {
469
+ const big = (CLOCK_BIG.box / 18) * 100;
470
+ const small = (CLOCK_SMALL.box / 18) * 100;
471
+ const rig = base({
472
+ ty: 3,
473
+ nm: 'clock',
474
+ ks: transform({
475
+ a: MARK_CENTRE,
476
+ p: anim([
477
+ [0, [CLOCK_BIG.x, CLOCK_BIG.y, 0]],
478
+ [6.55, [CLOCK_BIG.x, CLOCK_BIG.y, 0]],
479
+ [7.05, [CLOCK_SMALL.x, CLOCK_SMALL.y, 0]],
480
+ ]),
481
+ s: {
482
+ a: 1,
483
+ k: [
484
+ { t: T(0.08), s: [0, 0, 100], ...EASE_OUT },
485
+ { t: T(0.1), s: [big * 0.15, big * 0.15, 100], ...OVERSHOOT },
486
+ { t: T(0.42), s: [big, big, 100], ...EASE_IN_OUT },
487
+ { t: T(6.55), s: [big, big, 100], ...EASE_IN_OUT },
488
+ { t: T(7.05), s: [small, small, 100] },
489
+ ],
490
+ },
491
+ }),
492
+ });
493
+ const gone = (inAt) => fade(0, 100, inAt, END_FADE);
494
+ const child = (extra) => base({ parent: rig.ind, ...extra });
495
+
496
+ const turns = (factor) =>
497
+ anim(MINUTE_TURNS.map(([s, deg], n) => [s, deg * factor]), EASE_OUT);
498
+ const drawIn = { ty: 'tm', s: still(0), e: anim([[0.33, 0], [0.5, 100]], EASE_OUT), o: still(0), m: 1 };
499
+ const hand = (d, factor) => ({
500
+ ty: 'gr',
501
+ it: [...paths(svgContours(d)), drawIn, stroke(WHITE, 0.86), groupTransform({ p: still(PIVOT), a: still(PIVOT), r: turns(factor) })],
502
+ });
503
+
504
+ // The minutes so far, as a lighter wedge from twelve o'clock, clipped to the face: a ring as thick as its
505
+ // radius, trimmed to the share of the hour.
506
+ const [c0, c1] = STATS[0].count;
507
+ const wedge = child({
508
+ ty: 4,
509
+ nm: 'minutes wedge',
510
+ ip: T(STATS[0].fadeIn[0]),
511
+ op: T(STATS[0].fadeOut[1]),
512
+ ks: transform({ o: anim([[STATS[0].fadeOut[0], 100], [STATS[0].fadeOut[1], 0]]) }),
513
+ hasMask: true,
514
+ masksProperties: [
515
+ { inv: false, mode: 'a', pt: still(svgContours(FACE)[0]), o: still(100), x: still(0), nm: 'face' },
516
+ ],
517
+ shapes: [
518
+ {
519
+ ty: 'gr',
520
+ it: [
521
+ { ty: 'el', p: still(PIVOT), s: still([12, 12]), d: 1 },
522
+ {
523
+ ty: 'tm',
524
+ s: still(0),
525
+ e: anim([[c0, 0], [c1, (STATS[0].to / 60) * 100]], EASE_OUT),
526
+ o: still(0),
527
+ m: 1,
528
+ },
529
+ stroke(ORANGE2, 12),
530
+ groupTransform(),
531
+ ],
532
+ },
533
+ ],
534
+ });
535
+
536
+ return [
537
+ child({ ty: 4, nm: 'hands', ks: transform({ o: gone([0.3, 0.32]) }), shapes: [hand(MINUTE, 1), hand(HOUR, 1 / 6)] }),
538
+ wedge,
539
+ child({ ty: 4, nm: 'face', ks: transform({ o: gone(null) }), shapes: [{ ty: 'gr', it: [...paths(svgContours(FACE)), fill(ORANGE), groupTransform()] }] }),
540
+ child({ ty: 4, nm: 'back', ks: transform({ o: gone([0.38, 0.55]) }), shapes: [{ ty: 'gr', it: [...paths(svgContours(BACK)), fill(ORANGE, 25), groupTransform()] }] }),
541
+ rig,
542
+ ];
543
+ }
544
+
545
+ /* ---------------------------------------------------------------------------------------------- the page */
546
+
547
+ function backdrop() {
548
+ const glow = rgb('#FFD5B5');
549
+ return [
550
+ base({
551
+ ty: 4,
552
+ nm: 'glow',
553
+ ks: transform(),
554
+ shapes: [
555
+ {
556
+ ty: 'gr',
557
+ it: [
558
+ { ty: 'el', p: still([SIZE / 2, 300]), s: still([700, 640]), d: 1 },
559
+ {
560
+ ty: 'gf',
561
+ o: still(100),
562
+ r: 1,
563
+ t: 2,
564
+ s: still([SIZE / 2, 300]),
565
+ e: still([SIZE / 2 + 340, 300]),
566
+ h: still(0),
567
+ a: still(0),
568
+ g: { p: 2, k: still([0, ...glow, 1, ...glow, 0, 0.55, 1, 0]) },
569
+ },
570
+ groupTransform(),
571
+ ],
572
+ },
573
+ ],
574
+ }),
575
+ base({
576
+ ty: 4,
577
+ nm: 'page',
578
+ ks: transform(),
579
+ shapes: [{ ty: 'gr', it: [{ ty: 'rc', p: still([SIZE / 2, SIZE / 2]), s: still([SIZE, SIZE]), r: still(0), d: 1 }, fill(BG), groupTransform()] }],
580
+ }),
581
+ ];
582
+ }
583
+
584
+ /* ---------------------------------------------------------------------------------------------- build */
585
+
586
+ const layers = [endCard(), ...STATS.map(counterBlock), ...clockLayers(), ...backdrop()];
587
+
588
+ const lottie = {
589
+ v: '5.12.0',
590
+ fr: FPS,
591
+ ip: 0,
592
+ op: OP,
593
+ w: SIZE,
594
+ h: SIZE,
595
+ nm: 'time-back',
596
+ ddd: 0,
597
+ assets: [...assets.values()],
598
+ layers,
599
+ markers: [],
600
+ };
601
+ // Three decimals is well under a pixel at any size the app draws it.
602
+ const json = JSON.stringify(lottie, (_, v) => (typeof v === 'number' ? Math.round(v * 1000) / 1000 : v));
603
+ writeFileSync(OUT, json);
604
+ console.log(`time-back.json: ${DURATION}s, ${assets.size} assets, ${(json.length / 1024).toFixed(1)} KB`);