@wix/himalaya-cli 0.1847.0 → 0.1849.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +12 -5
  3. package/dist/browser-plane/assets.json +5 -5
  4. package/dist/browser-plane/preview-deferred/{33204224f8dccbd7094c8b6cb3df3995758bb67e81b987f4e6843897987e39f9.bin → 166f7ee733ea8d0fe7bba8b796232efd4f5413e22af4a8aeee20cae1069b2fd6.bin} +1 -1
  5. package/dist/browser-plane/sw.js +7 -7
  6. package/dist/cli.mjs +2016 -1428
  7. package/dist/preview-assets.generated.bin +0 -0
  8. package/guides/designing-himi-screens.md +5 -0
  9. package/guides/himi-json-output.md +17 -0
  10. package/guides/mobile-ux.md +8 -4
  11. package/guides/release-notes.md +13 -0
  12. package/guides/skill.md +1 -1
  13. package/package.json +2 -2
  14. package/templates/beauty-salon/dev/index.ts +7 -3
  15. package/templates/beauty-salon/l10n/ar.json +10 -0
  16. package/templates/beauty-salon/l10n/cs.json +10 -0
  17. package/templates/beauty-salon/l10n/da.json +10 -0
  18. package/templates/beauty-salon/l10n/de.json +10 -0
  19. package/templates/beauty-salon/l10n/el.json +10 -0
  20. package/templates/beauty-salon/l10n/es.json +10 -0
  21. package/templates/beauty-salon/l10n/fi.json +10 -0
  22. package/templates/beauty-salon/l10n/fr.json +10 -0
  23. package/templates/beauty-salon/l10n/he.json +8 -0
  24. package/templates/beauty-salon/l10n/hu.json +10 -0
  25. package/templates/beauty-salon/l10n/id.json +10 -0
  26. package/templates/beauty-salon/l10n/it.json +10 -0
  27. package/templates/beauty-salon/l10n/ja.json +10 -0
  28. package/templates/beauty-salon/l10n/ko.json +10 -0
  29. package/templates/beauty-salon/l10n/lt.json +10 -0
  30. package/templates/beauty-salon/l10n/nl.json +10 -0
  31. package/templates/beauty-salon/l10n/no.json +10 -0
  32. package/templates/beauty-salon/l10n/pl.json +10 -0
  33. package/templates/beauty-salon/l10n/pt.json +10 -0
  34. package/templates/beauty-salon/l10n/ru.json +10 -0
  35. package/templates/beauty-salon/l10n/sv.json +10 -0
  36. package/templates/beauty-salon/l10n/th.json +10 -0
  37. package/templates/beauty-salon/l10n/tr.json +10 -0
  38. package/templates/beauty-salon/l10n/uk.json +10 -0
  39. package/templates/beauty-salon/l10n/vi.json +10 -0
  40. package/templates/beauty-salon/l10n/zh.json +10 -0
  41. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +26 -3
  42. package/templates/beauty-salon/tier5-src/_shared/member-avatar.ts +76 -0
  43. package/templates/beauty-salon/tier5-src/_shared/result-snackbar.ts +26 -0
  44. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +9 -2
  45. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +11 -4
  46. package/templates/beauty-salon/tier5-src/himi-booking-services/index.ts +6 -2
  47. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +70 -3
  48. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  49. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  50. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +13 -2
  51. package/templates/beauty-salon-owner/dev/index.ts +1 -0
  52. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +26 -3
  53. package/templates/beauty-salon-owner/tier5-src/_shared/himi-account.ts +209 -0
  54. package/templates/beauty-salon-owner/tier5-src/_shared/member-avatar.ts +76 -0
  55. package/templates/branded-lite/dev/index.ts +7 -3
  56. package/templates/branded-lite/l10n/ar.json +10 -0
  57. package/templates/branded-lite/l10n/cs.json +10 -0
  58. package/templates/branded-lite/l10n/da.json +10 -0
  59. package/templates/branded-lite/l10n/de.json +10 -0
  60. package/templates/branded-lite/l10n/el.json +10 -0
  61. package/templates/branded-lite/l10n/es.json +10 -0
  62. package/templates/branded-lite/l10n/fi.json +10 -0
  63. package/templates/branded-lite/l10n/fr.json +10 -0
  64. package/templates/branded-lite/l10n/he.json +8 -0
  65. package/templates/branded-lite/l10n/hu.json +10 -0
  66. package/templates/branded-lite/l10n/id.json +10 -0
  67. package/templates/branded-lite/l10n/it.json +10 -0
  68. package/templates/branded-lite/l10n/ja.json +10 -0
  69. package/templates/branded-lite/l10n/ko.json +10 -0
  70. package/templates/branded-lite/l10n/lt.json +10 -0
  71. package/templates/branded-lite/l10n/nl.json +10 -0
  72. package/templates/branded-lite/l10n/no.json +10 -0
  73. package/templates/branded-lite/l10n/pl.json +10 -0
  74. package/templates/branded-lite/l10n/pt.json +10 -0
  75. package/templates/branded-lite/l10n/ru.json +10 -0
  76. package/templates/branded-lite/l10n/sv.json +10 -0
  77. package/templates/branded-lite/l10n/th.json +10 -0
  78. package/templates/branded-lite/l10n/tr.json +10 -0
  79. package/templates/branded-lite/l10n/uk.json +10 -0
  80. package/templates/branded-lite/l10n/vi.json +10 -0
  81. package/templates/branded-lite/l10n/zh.json +10 -0
  82. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +19 -3
  83. package/templates/branded-lite/tier5-src/_shared/member-avatar.ts +76 -0
  84. package/templates/branded-lite/tier5-src/_shared/result-snackbar.ts +26 -0
  85. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +9 -2
  86. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +11 -4
  87. package/templates/branded-lite/tier5-src/himi-booking-services/index.ts +6 -2
  88. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +70 -3
  89. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  90. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  91. package/templates/branded-lite/tier5-src/himi-branded-lite-member-programs/index.ts +15 -4
  92. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +13 -2
  93. package/templates/brandy/tier5-src/_shared/collection-service.ts +19 -3
  94. package/templates/brandy/tier5-src/_shared/member-avatar.ts +76 -0
  95. package/templates/brandy/tier5-src/himi-store-account/index.ts +13 -2
  96. package/templates/community-club/dev/index.ts +2 -1
  97. package/templates/community-club/l10n/ar.json +10 -0
  98. package/templates/community-club/l10n/cs.json +10 -0
  99. package/templates/community-club/l10n/da.json +10 -0
  100. package/templates/community-club/l10n/de.json +10 -0
  101. package/templates/community-club/l10n/el.json +10 -0
  102. package/templates/community-club/l10n/es.json +10 -0
  103. package/templates/community-club/l10n/fi.json +10 -0
  104. package/templates/community-club/l10n/fr.json +10 -0
  105. package/templates/community-club/l10n/he.json +8 -0
  106. package/templates/community-club/l10n/hu.json +10 -0
  107. package/templates/community-club/l10n/id.json +10 -0
  108. package/templates/community-club/l10n/it.json +10 -0
  109. package/templates/community-club/l10n/ja.json +10 -0
  110. package/templates/community-club/l10n/ko.json +10 -0
  111. package/templates/community-club/l10n/lt.json +10 -0
  112. package/templates/community-club/l10n/nl.json +10 -0
  113. package/templates/community-club/l10n/no.json +10 -0
  114. package/templates/community-club/l10n/pl.json +10 -0
  115. package/templates/community-club/l10n/pt.json +10 -0
  116. package/templates/community-club/l10n/ru.json +10 -0
  117. package/templates/community-club/l10n/sv.json +10 -0
  118. package/templates/community-club/l10n/th.json +10 -0
  119. package/templates/community-club/l10n/tr.json +10 -0
  120. package/templates/community-club/l10n/uk.json +10 -0
  121. package/templates/community-club/l10n/vi.json +10 -0
  122. package/templates/community-club/l10n/zh.json +10 -0
  123. package/templates/community-club/tier5-src/_shared/collection-service.ts +26 -3
  124. package/templates/community-club/tier5-src/_shared/member-avatar.ts +76 -0
  125. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  126. package/templates/community-club/tier5-src/himi-store-account/index.ts +13 -2
  127. package/templates/community-club-owner/dev/index.ts +1 -0
  128. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +26 -3
  129. package/templates/community-club-owner/tier5-src/_shared/himi-account.ts +209 -0
  130. package/templates/community-club-owner/tier5-src/_shared/member-avatar.ts +76 -0
  131. package/templates/conference/tier5-src/_shared/collection-service.ts +26 -3
  132. package/templates/conference/tier5-src/_shared/member-avatar.ts +76 -0
  133. package/templates/conference/tier5-src/himi-store-account/index.ts +13 -2
  134. package/templates/events-meetups/dev/index.ts +2 -1
  135. package/templates/events-meetups/l10n/ar.json +10 -0
  136. package/templates/events-meetups/l10n/cs.json +10 -0
  137. package/templates/events-meetups/l10n/da.json +10 -0
  138. package/templates/events-meetups/l10n/de.json +10 -0
  139. package/templates/events-meetups/l10n/el.json +10 -0
  140. package/templates/events-meetups/l10n/es.json +10 -0
  141. package/templates/events-meetups/l10n/fi.json +10 -0
  142. package/templates/events-meetups/l10n/fr.json +10 -0
  143. package/templates/events-meetups/l10n/he.json +8 -0
  144. package/templates/events-meetups/l10n/hu.json +10 -0
  145. package/templates/events-meetups/l10n/id.json +10 -0
  146. package/templates/events-meetups/l10n/it.json +10 -0
  147. package/templates/events-meetups/l10n/ja.json +10 -0
  148. package/templates/events-meetups/l10n/ko.json +10 -0
  149. package/templates/events-meetups/l10n/lt.json +10 -0
  150. package/templates/events-meetups/l10n/nl.json +10 -0
  151. package/templates/events-meetups/l10n/no.json +10 -0
  152. package/templates/events-meetups/l10n/pl.json +10 -0
  153. package/templates/events-meetups/l10n/pt.json +10 -0
  154. package/templates/events-meetups/l10n/ru.json +10 -0
  155. package/templates/events-meetups/l10n/sv.json +10 -0
  156. package/templates/events-meetups/l10n/th.json +10 -0
  157. package/templates/events-meetups/l10n/tr.json +10 -0
  158. package/templates/events-meetups/l10n/uk.json +10 -0
  159. package/templates/events-meetups/l10n/vi.json +10 -0
  160. package/templates/events-meetups/l10n/zh.json +10 -0
  161. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +26 -3
  162. package/templates/events-meetups/tier5-src/_shared/member-avatar.ts +76 -0
  163. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  164. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +13 -2
  165. package/templates/events-meetups-owner/dev/index.ts +1 -0
  166. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +26 -3
  167. package/templates/events-meetups-owner/tier5-src/_shared/himi-account.ts +209 -0
  168. package/templates/events-meetups-owner/tier5-src/_shared/member-avatar.ts +76 -0
  169. package/templates/fitness-gym/config.ts +55 -17
  170. package/templates/fitness-gym/dev/index.ts +5784 -2453
  171. package/templates/fitness-gym/himalaya.content.json +19 -1
  172. package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +26 -3
  173. package/templates/fitness-gym/tier5-src/_shared/member-avatar.ts +76 -0
  174. package/templates/fitness-gym/tier5-src/_shared/result-snackbar.ts +26 -0
  175. package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +9 -2
  176. package/templates/fitness-gym/tier5-src/himi-booking-service/index.ts +11 -4
  177. package/templates/fitness-gym/tier5-src/himi-booking-services/index.ts +6 -2
  178. package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +70 -3
  179. package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +295 -0
  180. package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/index.ts +58 -0
  181. package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/login-info.ts +274 -0
  182. package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  183. package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  184. package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  185. package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  186. package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +15 -4
  187. package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +5 -2
  188. package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +57 -6
  189. package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +13 -2
  190. package/templates/fitness-gym/tier5-src/wix-spaces-delete-account/index.ts +59 -0
  191. package/templates/fitness-gym/tokens.json +6 -0
  192. package/templates/gym-fitness/dev/index.ts +7 -3
  193. package/templates/gym-fitness/l10n/ar.json +10 -0
  194. package/templates/gym-fitness/l10n/cs.json +10 -0
  195. package/templates/gym-fitness/l10n/da.json +10 -0
  196. package/templates/gym-fitness/l10n/de.json +10 -0
  197. package/templates/gym-fitness/l10n/el.json +10 -0
  198. package/templates/gym-fitness/l10n/es.json +10 -0
  199. package/templates/gym-fitness/l10n/fi.json +10 -0
  200. package/templates/gym-fitness/l10n/fr.json +10 -0
  201. package/templates/gym-fitness/l10n/he.json +8 -0
  202. package/templates/gym-fitness/l10n/hu.json +10 -0
  203. package/templates/gym-fitness/l10n/id.json +10 -0
  204. package/templates/gym-fitness/l10n/it.json +10 -0
  205. package/templates/gym-fitness/l10n/ja.json +10 -0
  206. package/templates/gym-fitness/l10n/ko.json +10 -0
  207. package/templates/gym-fitness/l10n/lt.json +10 -0
  208. package/templates/gym-fitness/l10n/nl.json +10 -0
  209. package/templates/gym-fitness/l10n/no.json +10 -0
  210. package/templates/gym-fitness/l10n/pl.json +10 -0
  211. package/templates/gym-fitness/l10n/pt.json +10 -0
  212. package/templates/gym-fitness/l10n/ru.json +10 -0
  213. package/templates/gym-fitness/l10n/sv.json +10 -0
  214. package/templates/gym-fitness/l10n/th.json +10 -0
  215. package/templates/gym-fitness/l10n/tr.json +10 -0
  216. package/templates/gym-fitness/l10n/uk.json +10 -0
  217. package/templates/gym-fitness/l10n/vi.json +10 -0
  218. package/templates/gym-fitness/l10n/zh.json +10 -0
  219. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +26 -3
  220. package/templates/gym-fitness/tier5-src/_shared/member-avatar.ts +76 -0
  221. package/templates/gym-fitness/tier5-src/_shared/result-snackbar.ts +26 -0
  222. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +9 -2
  223. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +11 -4
  224. package/templates/gym-fitness/tier5-src/himi-booking-services/index.ts +6 -2
  225. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +70 -3
  226. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  227. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  228. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +13 -2
  229. package/templates/gym-fitness-owner/dev/index.ts +1 -0
  230. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +26 -3
  231. package/templates/gym-fitness-owner/tier5-src/_shared/himi-account.ts +209 -0
  232. package/templates/gym-fitness-owner/tier5-src/_shared/member-avatar.ts +76 -0
  233. package/templates/medical-services/config.ts +1 -1
  234. package/templates/medical-services/dev/index.ts +3 -1
  235. package/templates/medical-services/tier5-src/_shared/collection-service.ts +26 -3
  236. package/templates/medical-services/tier5-src/_shared/member-avatar.ts +76 -0
  237. package/templates/medical-services/tier5-src/_shared/result-snackbar.ts +26 -0
  238. package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +9 -2
  239. package/templates/medical-services/tier5-src/himi-booking-service/index.ts +11 -4
  240. package/templates/medical-services/tier5-src/himi-booking-services/index.ts +6 -2
  241. package/templates/medical-services/tier5-src/himi-booking-time/index.ts +70 -3
  242. package/templates/medical-services/tier5-src/himi-store-account/index.ts +13 -2
  243. package/templates/nonprofit-cause/dev/index.ts +2 -1
  244. package/templates/nonprofit-cause/l10n/ar.json +10 -0
  245. package/templates/nonprofit-cause/l10n/cs.json +10 -0
  246. package/templates/nonprofit-cause/l10n/da.json +10 -0
  247. package/templates/nonprofit-cause/l10n/de.json +10 -0
  248. package/templates/nonprofit-cause/l10n/el.json +10 -0
  249. package/templates/nonprofit-cause/l10n/es.json +10 -0
  250. package/templates/nonprofit-cause/l10n/fi.json +10 -0
  251. package/templates/nonprofit-cause/l10n/fr.json +10 -0
  252. package/templates/nonprofit-cause/l10n/he.json +8 -0
  253. package/templates/nonprofit-cause/l10n/hu.json +10 -0
  254. package/templates/nonprofit-cause/l10n/id.json +10 -0
  255. package/templates/nonprofit-cause/l10n/it.json +10 -0
  256. package/templates/nonprofit-cause/l10n/ja.json +10 -0
  257. package/templates/nonprofit-cause/l10n/ko.json +10 -0
  258. package/templates/nonprofit-cause/l10n/lt.json +10 -0
  259. package/templates/nonprofit-cause/l10n/nl.json +10 -0
  260. package/templates/nonprofit-cause/l10n/no.json +10 -0
  261. package/templates/nonprofit-cause/l10n/pl.json +10 -0
  262. package/templates/nonprofit-cause/l10n/pt.json +10 -0
  263. package/templates/nonprofit-cause/l10n/ru.json +10 -0
  264. package/templates/nonprofit-cause/l10n/sv.json +10 -0
  265. package/templates/nonprofit-cause/l10n/th.json +10 -0
  266. package/templates/nonprofit-cause/l10n/tr.json +10 -0
  267. package/templates/nonprofit-cause/l10n/uk.json +10 -0
  268. package/templates/nonprofit-cause/l10n/vi.json +10 -0
  269. package/templates/nonprofit-cause/l10n/zh.json +10 -0
  270. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +26 -3
  271. package/templates/nonprofit-cause/tier5-src/_shared/member-avatar.ts +76 -0
  272. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  273. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +13 -2
  274. package/templates/nonprofit-cause-owner/dev/index.ts +1 -0
  275. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +26 -3
  276. package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-account.ts +209 -0
  277. package/templates/nonprofit-cause-owner/tier5-src/_shared/member-avatar.ts +76 -0
  278. package/templates/owner-lite/dev/index.ts +1 -0
  279. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +26 -3
  280. package/templates/owner-lite/tier5-src/_shared/himi-account.ts +209 -0
  281. package/templates/owner-lite/tier5-src/_shared/member-avatar.ts +76 -0
  282. package/templates/personal-fitness-trainer/dev/index.ts +7 -3
  283. package/templates/personal-fitness-trainer/tier5-src/_shared/collection-service.ts +26 -3
  284. package/templates/personal-fitness-trainer/tier5-src/_shared/member-avatar.ts +76 -0
  285. package/templates/personal-fitness-trainer/tier5-src/_shared/result-snackbar.ts +26 -0
  286. package/templates/personal-fitness-trainer/tier5-src/himi-booking-bookings/index.ts +9 -2
  287. package/templates/personal-fitness-trainer/tier5-src/himi-booking-service/index.ts +11 -4
  288. package/templates/personal-fitness-trainer/tier5-src/himi-booking-services/index.ts +6 -2
  289. package/templates/personal-fitness-trainer/tier5-src/himi-booking-time/index.ts +70 -3
  290. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  291. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  292. package/templates/personal-fitness-trainer/tier5-src/himi-store-account/index.ts +13 -2
  293. package/templates/podcast-creator/dev/index.ts +2 -1
  294. package/templates/podcast-creator/l10n/ar.json +10 -0
  295. package/templates/podcast-creator/l10n/cs.json +10 -0
  296. package/templates/podcast-creator/l10n/da.json +10 -0
  297. package/templates/podcast-creator/l10n/de.json +10 -0
  298. package/templates/podcast-creator/l10n/el.json +10 -0
  299. package/templates/podcast-creator/l10n/es.json +10 -0
  300. package/templates/podcast-creator/l10n/fi.json +10 -0
  301. package/templates/podcast-creator/l10n/fr.json +10 -0
  302. package/templates/podcast-creator/l10n/he.json +8 -0
  303. package/templates/podcast-creator/l10n/hu.json +10 -0
  304. package/templates/podcast-creator/l10n/id.json +10 -0
  305. package/templates/podcast-creator/l10n/it.json +10 -0
  306. package/templates/podcast-creator/l10n/ja.json +10 -0
  307. package/templates/podcast-creator/l10n/ko.json +10 -0
  308. package/templates/podcast-creator/l10n/lt.json +10 -0
  309. package/templates/podcast-creator/l10n/nl.json +10 -0
  310. package/templates/podcast-creator/l10n/no.json +10 -0
  311. package/templates/podcast-creator/l10n/pl.json +10 -0
  312. package/templates/podcast-creator/l10n/pt.json +10 -0
  313. package/templates/podcast-creator/l10n/ru.json +10 -0
  314. package/templates/podcast-creator/l10n/sv.json +10 -0
  315. package/templates/podcast-creator/l10n/th.json +10 -0
  316. package/templates/podcast-creator/l10n/tr.json +10 -0
  317. package/templates/podcast-creator/l10n/uk.json +10 -0
  318. package/templates/podcast-creator/l10n/vi.json +10 -0
  319. package/templates/podcast-creator/l10n/zh.json +10 -0
  320. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +26 -3
  321. package/templates/podcast-creator/tier5-src/_shared/member-avatar.ts +76 -0
  322. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  323. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +13 -2
  324. package/templates/podcast-creator-owner/dev/index.ts +1 -0
  325. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +26 -3
  326. package/templates/podcast-creator-owner/tier5-src/_shared/himi-account.ts +209 -0
  327. package/templates/podcast-creator-owner/tier5-src/_shared/member-avatar.ts +76 -0
  328. package/templates/portfolio-creative/dev/index.ts +2 -1
  329. package/templates/portfolio-creative/l10n/ar.json +10 -0
  330. package/templates/portfolio-creative/l10n/cs.json +10 -0
  331. package/templates/portfolio-creative/l10n/da.json +10 -0
  332. package/templates/portfolio-creative/l10n/de.json +10 -0
  333. package/templates/portfolio-creative/l10n/el.json +10 -0
  334. package/templates/portfolio-creative/l10n/es.json +10 -0
  335. package/templates/portfolio-creative/l10n/fi.json +10 -0
  336. package/templates/portfolio-creative/l10n/fr.json +10 -0
  337. package/templates/portfolio-creative/l10n/he.json +8 -0
  338. package/templates/portfolio-creative/l10n/hu.json +10 -0
  339. package/templates/portfolio-creative/l10n/id.json +10 -0
  340. package/templates/portfolio-creative/l10n/it.json +10 -0
  341. package/templates/portfolio-creative/l10n/ja.json +10 -0
  342. package/templates/portfolio-creative/l10n/ko.json +10 -0
  343. package/templates/portfolio-creative/l10n/lt.json +10 -0
  344. package/templates/portfolio-creative/l10n/nl.json +10 -0
  345. package/templates/portfolio-creative/l10n/no.json +10 -0
  346. package/templates/portfolio-creative/l10n/pl.json +10 -0
  347. package/templates/portfolio-creative/l10n/pt.json +10 -0
  348. package/templates/portfolio-creative/l10n/ru.json +10 -0
  349. package/templates/portfolio-creative/l10n/sv.json +10 -0
  350. package/templates/portfolio-creative/l10n/th.json +10 -0
  351. package/templates/portfolio-creative/l10n/tr.json +10 -0
  352. package/templates/portfolio-creative/l10n/uk.json +10 -0
  353. package/templates/portfolio-creative/l10n/vi.json +10 -0
  354. package/templates/portfolio-creative/l10n/zh.json +10 -0
  355. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +26 -3
  356. package/templates/portfolio-creative/tier5-src/_shared/member-avatar.ts +76 -0
  357. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  358. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +13 -2
  359. package/templates/portfolio-creative-owner/dev/index.ts +1 -0
  360. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +26 -3
  361. package/templates/portfolio-creative-owner/tier5-src/_shared/himi-account.ts +209 -0
  362. package/templates/portfolio-creative-owner/tier5-src/_shared/member-avatar.ts +76 -0
  363. package/templates/restaurant/dev/index.ts +2 -1
  364. package/templates/restaurant/l10n/ar.json +10 -0
  365. package/templates/restaurant/l10n/cs.json +10 -0
  366. package/templates/restaurant/l10n/da.json +10 -0
  367. package/templates/restaurant/l10n/de.json +10 -0
  368. package/templates/restaurant/l10n/el.json +10 -0
  369. package/templates/restaurant/l10n/es.json +10 -0
  370. package/templates/restaurant/l10n/fi.json +10 -0
  371. package/templates/restaurant/l10n/fr.json +10 -0
  372. package/templates/restaurant/l10n/he.json +8 -0
  373. package/templates/restaurant/l10n/hu.json +10 -0
  374. package/templates/restaurant/l10n/id.json +10 -0
  375. package/templates/restaurant/l10n/it.json +10 -0
  376. package/templates/restaurant/l10n/ja.json +10 -0
  377. package/templates/restaurant/l10n/ko.json +10 -0
  378. package/templates/restaurant/l10n/lt.json +10 -0
  379. package/templates/restaurant/l10n/nl.json +10 -0
  380. package/templates/restaurant/l10n/no.json +10 -0
  381. package/templates/restaurant/l10n/pl.json +10 -0
  382. package/templates/restaurant/l10n/pt.json +10 -0
  383. package/templates/restaurant/l10n/ru.json +10 -0
  384. package/templates/restaurant/l10n/sv.json +10 -0
  385. package/templates/restaurant/l10n/th.json +10 -0
  386. package/templates/restaurant/l10n/tr.json +10 -0
  387. package/templates/restaurant/l10n/uk.json +10 -0
  388. package/templates/restaurant/l10n/vi.json +10 -0
  389. package/templates/restaurant/l10n/zh.json +10 -0
  390. package/templates/restaurant/tier5-src/_shared/collection-service.ts +26 -3
  391. package/templates/restaurant/tier5-src/_shared/member-avatar.ts +76 -0
  392. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  393. package/templates/restaurant/tier5-src/himi-store-account/index.ts +13 -2
  394. package/templates/restaurant-owner/dev/index.ts +1 -0
  395. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +26 -3
  396. package/templates/restaurant-owner/tier5-src/_shared/himi-account.ts +209 -0
  397. package/templates/restaurant-owner/tier5-src/_shared/member-avatar.ts +76 -0
  398. package/templates/retail-store/dev/index.ts +2 -1
  399. package/templates/retail-store/l10n/ar.json +10 -0
  400. package/templates/retail-store/l10n/cs.json +10 -0
  401. package/templates/retail-store/l10n/da.json +10 -0
  402. package/templates/retail-store/l10n/de.json +10 -0
  403. package/templates/retail-store/l10n/el.json +10 -0
  404. package/templates/retail-store/l10n/es.json +10 -0
  405. package/templates/retail-store/l10n/fi.json +10 -0
  406. package/templates/retail-store/l10n/fr.json +10 -0
  407. package/templates/retail-store/l10n/he.json +8 -0
  408. package/templates/retail-store/l10n/hu.json +10 -0
  409. package/templates/retail-store/l10n/id.json +10 -0
  410. package/templates/retail-store/l10n/it.json +10 -0
  411. package/templates/retail-store/l10n/ja.json +10 -0
  412. package/templates/retail-store/l10n/ko.json +10 -0
  413. package/templates/retail-store/l10n/lt.json +10 -0
  414. package/templates/retail-store/l10n/nl.json +10 -0
  415. package/templates/retail-store/l10n/no.json +10 -0
  416. package/templates/retail-store/l10n/pl.json +10 -0
  417. package/templates/retail-store/l10n/pt.json +10 -0
  418. package/templates/retail-store/l10n/ru.json +10 -0
  419. package/templates/retail-store/l10n/sv.json +10 -0
  420. package/templates/retail-store/l10n/th.json +10 -0
  421. package/templates/retail-store/l10n/tr.json +10 -0
  422. package/templates/retail-store/l10n/uk.json +10 -0
  423. package/templates/retail-store/l10n/vi.json +10 -0
  424. package/templates/retail-store/l10n/zh.json +10 -0
  425. package/templates/retail-store/tier5-src/_shared/collection-service.ts +19 -3
  426. package/templates/retail-store/tier5-src/_shared/member-avatar.ts +76 -0
  427. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  428. package/templates/retail-store/tier5-src/himi-store-account/index.ts +13 -2
  429. package/templates/retail-store-owner/dev/index.ts +1 -0
  430. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +26 -3
  431. package/templates/retail-store-owner/tier5-src/_shared/himi-account.ts +209 -0
  432. package/templates/retail-store-owner/tier5-src/_shared/member-avatar.ts +76 -0
  433. package/templates/salon-spa/config.ts +1 -1
  434. package/templates/salon-spa/dev/index.ts +5 -2
  435. package/templates/salon-spa/tier5-src/_shared/collection-service.ts +26 -3
  436. package/templates/salon-spa/tier5-src/_shared/member-avatar.ts +76 -0
  437. package/templates/salon-spa/tier5-src/_shared/result-snackbar.ts +26 -0
  438. package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +9 -2
  439. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +11 -4
  440. package/templates/salon-spa/tier5-src/himi-booking-services/index.ts +6 -2
  441. package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +70 -3
  442. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  443. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +13 -2
  444. package/templates/wholesale-store/tier5-src/_shared/collection-service.ts +19 -3
  445. package/templates/wholesale-store/tier5-src/_shared/member-avatar.ts +76 -0
  446. package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +13 -2
  447. package/templates/yoga-studio/dev/index.ts +7 -3
  448. package/templates/yoga-studio/l10n/ar.json +10 -0
  449. package/templates/yoga-studio/l10n/cs.json +10 -0
  450. package/templates/yoga-studio/l10n/da.json +10 -0
  451. package/templates/yoga-studio/l10n/de.json +10 -0
  452. package/templates/yoga-studio/l10n/el.json +10 -0
  453. package/templates/yoga-studio/l10n/es.json +10 -0
  454. package/templates/yoga-studio/l10n/fi.json +10 -0
  455. package/templates/yoga-studio/l10n/fr.json +10 -0
  456. package/templates/yoga-studio/l10n/he.json +8 -0
  457. package/templates/yoga-studio/l10n/hu.json +10 -0
  458. package/templates/yoga-studio/l10n/id.json +10 -0
  459. package/templates/yoga-studio/l10n/it.json +10 -0
  460. package/templates/yoga-studio/l10n/ja.json +10 -0
  461. package/templates/yoga-studio/l10n/ko.json +10 -0
  462. package/templates/yoga-studio/l10n/lt.json +10 -0
  463. package/templates/yoga-studio/l10n/nl.json +10 -0
  464. package/templates/yoga-studio/l10n/no.json +10 -0
  465. package/templates/yoga-studio/l10n/pl.json +10 -0
  466. package/templates/yoga-studio/l10n/pt.json +10 -0
  467. package/templates/yoga-studio/l10n/ru.json +10 -0
  468. package/templates/yoga-studio/l10n/sv.json +10 -0
  469. package/templates/yoga-studio/l10n/th.json +10 -0
  470. package/templates/yoga-studio/l10n/tr.json +10 -0
  471. package/templates/yoga-studio/l10n/uk.json +10 -0
  472. package/templates/yoga-studio/l10n/vi.json +10 -0
  473. package/templates/yoga-studio/l10n/zh.json +10 -0
  474. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +26 -3
  475. package/templates/yoga-studio/tier5-src/_shared/member-avatar.ts +76 -0
  476. package/templates/yoga-studio/tier5-src/_shared/result-snackbar.ts +26 -0
  477. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +9 -2
  478. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +11 -4
  479. package/templates/yoga-studio/tier5-src/himi-booking-services/index.ts +6 -2
  480. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +70 -3
  481. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/login-info.ts +16 -4
  482. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +33 -6
  483. package/templates/yoga-studio/tier5-src/himi-branded-lite-member-programs/index.ts +15 -4
  484. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +13 -2
  485. package/templates/yoga-studio-owner/dev/index.ts +1 -0
  486. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +26 -3
  487. package/templates/yoga-studio-owner/tier5-src/_shared/himi-account.ts +209 -0
  488. package/templates/yoga-studio-owner/tier5-src/_shared/member-avatar.ts +76 -0
@@ -3,6 +3,15 @@ import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeC
3
3
  import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
4
4
  import { copyParam, stashCopy } from './himi-copy.js';
5
5
  import { createCollectionQuery, type CollectionQuerySource, type CollectionQueryState } from './collection-query.js';
6
+ // The shape `memberAvatarSource` (member-avatar.ts) returns, declared here rather than imported:
7
+ // a starter that never asks for the avatar does not ship member-avatar.ts, and a type import of a
8
+ // missing file fails its strict type check.
9
+ type MemberAvatarFactory = (changed: () => void) => {
10
+ readonly keys: readonly string[];
11
+ onLoad(arg: unknown): void;
12
+ merge<T extends object>(state: T): T;
13
+ resetRestored(svc: { getState(): unknown }): void;
14
+ };
6
15
 
7
16
  export interface CollectionSaving {
8
17
  read(): string[];
@@ -361,18 +370,32 @@ export function defineBackendCollection<S extends object, Row extends object>(na
361
370
  apply(state: S, page: CollectionQueryState<Row>): S;
362
371
  saving?: CollectionSaving;
363
372
  actions?: Record<string, (state: S, ...args: unknown[]) => S | undefined | Promise<S | undefined>>;
373
+ /** A top-bar avatar for the signed-in member: `memberAvatarSource` from `member-avatar.ts`. Off
374
+ * until the screen's onAppear asks for it (`memberAvatar: "1"`); the fields are never persisted. */
375
+ memberAvatar?: MemberAvatarFactory;
364
376
  }) {
365
377
  let publish: (() => unknown) | undefined;
378
+ const avatar = options.memberAvatar?.(() => { publish?.(); });
366
379
  const controller = createCollectionQuery(options.source, () => { publish?.(); });
367
380
  const definition = decorateCollection(name, { state: options.state as State, actions: options.actions as Record<string, Reducer> | undefined }, options.saving, {
368
381
  restorePagesOnLoad: options.restorePagesOnLoad,
369
- onLoad: options.onLoad,
382
+ onLoad: avatar ? arg => { avatar.onLoad(arg); return options.onLoad?.(arg); } : options.onLoad,
370
383
  controller: controller as unknown as BackendCollection['controller'],
371
- apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
384
+ apply: (state, page) => {
385
+ const applied = options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State;
386
+ return avatar ? avatar.merge(applied) : applied;
387
+ },
372
388
  });
389
+ // The member's photo belongs to this run's account: a cold boot never restores it.
390
+ const baseRegister = options.register ?? register;
391
+ const registerService = (avatar ? ((n: string, def: ServiceDefinition<unknown>) => {
392
+ const own = def as { notHydrated?: string[]; notPersisted?: string[] };
393
+ return baseRegister(n, { ...def, notHydrated: [...(own.notHydrated ?? []), ...avatar.keys], notPersisted: [...(own.notPersisted ?? []), ...avatar.keys] } as never);
394
+ }) : baseRegister) as typeof register;
373
395
  // Compatibility starters retain their existing mutation behavior; accept the
374
396
  // current authoring contract without enabling the offline-write rollout.
375
- const handle = (options.register ?? register)(name, definition);
397
+ const handle = registerService(name, definition);
398
+ avatar?.resetRestored(handle as unknown as { getState(): unknown });
376
399
  // Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
377
400
  // when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
378
401
  // starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
@@ -0,0 +1,209 @@
1
+ import { dispatch } from "@himalaya/dispatch";
2
+ // Relative for node resolution (see himi-store.ts note); rewritten off-repo.
3
+ import { displayName, getMyData, initials, type WixMyData } from "@himalaya/wix-users";
4
+ import { getMyMember } from "@himalaya/wix-members";
5
+ import { wixMediaUrl } from "@himalaya/wix-media";
6
+ import { formatDateMedium, formatWeekdayDateTime } from "../_shared/engine-intl.js";
7
+ import { copyParam } from "./himi-copy.js";
8
+
9
+ export interface AccountProfile {
10
+ isMember: boolean;
11
+ identityLine: string;
12
+ detailLine: string;
13
+ memberName: string;
14
+ memberEmail: string;
15
+ memberImage: string;
16
+ memberInitials: string;
17
+ hasMemberImage: boolean;
18
+ noMemberImage: boolean;
19
+ }
20
+
21
+ export interface AccountActivityRow {
22
+ id: string;
23
+ title: string;
24
+ subtitle: string;
25
+ meta: string;
26
+ status: string;
27
+ }
28
+
29
+ export function strOf(arg: unknown): string {
30
+ if (typeof arg === "string") return arg;
31
+ const a = arg as { value?: string; text?: string } | undefined;
32
+ return a?.value ?? a?.text ?? "";
33
+ }
34
+
35
+ export function titleCase(value?: string): string {
36
+ return (value || "")
37
+ .toLowerCase()
38
+ .split(/[_\s-]+/)
39
+ .filter(Boolean)
40
+ .map((part) => part[0].toUpperCase() + part.slice(1))
41
+ .join(" ");
42
+ }
43
+
44
+ export function fmtDate(value?: string): string {
45
+ if (!value) return "";
46
+ const date = new Date(value);
47
+ if (Number.isNaN(date.getTime())) return "";
48
+ return formatDateMedium(date);
49
+ }
50
+
51
+ export function fmtDateTime(value?: string): string {
52
+ if (!value) return "";
53
+ const date = new Date(value);
54
+ if (Number.isNaN(date.getTime())) return "";
55
+ return formatWeekdayDateTime(date);
56
+ }
57
+
58
+ function initialsFromName(value: string): string {
59
+ const parts = value.trim().split(/\s+/).filter(Boolean);
60
+ if (!parts.length) return "";
61
+ const first = parts[0]?.[0] ?? "";
62
+ const last = parts.length > 1 ? parts[parts.length - 1]?.[0] ?? "" : "";
63
+ return (first + last).toUpperCase();
64
+ }
65
+
66
+ function profileImage(data: WixMyData): string {
67
+ const profile = data.profile as { profileImage?: string; photo?: { url?: string }; imageUrl?: string } | undefined;
68
+ return profile?.profileImage || profile?.photo?.url || profile?.imageUrl || "";
69
+ }
70
+
71
+ function profileFromData(data: WixMyData, fallbackEmail = ""): AccountProfile {
72
+ const email = fallbackEmail || data.email || data.contactEmail || "";
73
+ const name = displayName(data) || email || "Member";
74
+ const image = profileImage(data);
75
+ return {
76
+ isMember: true,
77
+ identityLine: copyParam("account.signedIn", "Signed in"),
78
+ detailLine: email || name,
79
+ memberName: name,
80
+ memberEmail: email,
81
+ memberImage: image,
82
+ memberInitials: initials(data) || initialsFromName(name) || "M",
83
+ hasMemberImage: !!image,
84
+ noMemberImage: !image,
85
+ };
86
+ }
87
+
88
+ /** The signed-in site member's name and photo from their member record, or undefined when it
89
+ * cannot be read or names nobody (the caller then shows the email). */
90
+ async function siteMemberProfile(email: string): Promise<AccountProfile | undefined> {
91
+ try {
92
+ const member = (await getMyMember({ fieldsets: ["FULL"] }))?.member;
93
+ const name = [member?.contact?.firstName, member?.contact?.lastName].map((part) => (part ?? "").trim()).filter(Boolean).join(" ")
94
+ || (member?.profile?.nickname ?? "").trim();
95
+ if (!name) return undefined;
96
+ const image = wixMediaUrl(member?.profile?.photo?.url) || wixMediaUrl(member?.profile?.photo?.id) || "";
97
+ return {
98
+ isMember: true,
99
+ identityLine: copyParam("account.signedIn", "Signed in"),
100
+ detailLine: email || name,
101
+ memberName: name,
102
+ memberEmail: email || member?.loginEmail || "",
103
+ memberImage: image,
104
+ memberInitials: initialsFromName(name) || "M",
105
+ hasMemberImage: !!image,
106
+ noMemberImage: !image,
107
+ };
108
+ } catch {
109
+ return undefined;
110
+ }
111
+ }
112
+
113
+ export function guestProfile(detailLine: string): AccountProfile {
114
+ return {
115
+ isMember: false,
116
+ identityLine: copyParam("account.guestIdentity", "Browsing as a guest"),
117
+ detailLine,
118
+ memberName: "",
119
+ memberEmail: "",
120
+ memberImage: "",
121
+ memberInitials: "M",
122
+ hasMemberImage: false,
123
+ noMemberImage: true,
124
+ };
125
+ }
126
+
127
+ export interface MemberIdentity {
128
+ email: string;
129
+ signedIn: boolean;
130
+ /** The member's session ended on its own (not their sign-out) and they are a visitor now. */
131
+ sessionEnded: boolean;
132
+ /** That member's email, to pre-fill sign-in; "" when unknown or when `sessionEnded` is false. */
133
+ lastEmail: string;
134
+ }
135
+
136
+ const NO_IDENTITY: MemberIdentity = { email: "", signedIn: false, sessionEnded: false, lastEmail: "" };
137
+
138
+ /** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
139
+ * signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
140
+ * for a member whose email is not known yet (an injected or hosted session before `members/my`
141
+ * answers); hosts that predate it answer the email alone. `sessionEnded` / `lastEmail` come from
142
+ * native hosts only, for a visitor whose member session could not be refreshed. */
143
+ export async function memberIdentity(): Promise<MemberIdentity> {
144
+ try {
145
+ const identity = await dispatch("himi.wix.memberIdentity") as unknown;
146
+ type Answer = { email?: unknown; signedIn?: unknown; sessionEnded?: unknown; lastEmail?: unknown } | null | undefined;
147
+ const direct = identity as Answer;
148
+ const wrapped = (identity as { payload?: Answer } | null)?.payload;
149
+ const field = (key: keyof NonNullable<Answer>) => direct?.[key] ?? wrapped?.[key];
150
+ const text = (value: unknown) => (typeof value === "string" ? value : "");
151
+ const email = text(field("email"));
152
+ const signedIn = field("signedIn") === true || !!email;
153
+ const sessionEnded = !signedIn && field("sessionEnded") === true;
154
+ return { email, signedIn, sessionEnded, lastEmail: sessionEnded ? text(field("lastEmail")) : "" };
155
+ } catch {
156
+ return NO_IDENTITY;
157
+ }
158
+ }
159
+
160
+ export async function signedInEmail(): Promise<string> {
161
+ return (await memberIdentity()).email;
162
+ }
163
+
164
+ /** A signed-in member nothing names yet: signed in, with a neutral label rather than another
165
+ * member's name or the sign-in form. */
166
+ function neutralMemberProfile(): AccountProfile {
167
+ const name = copyParam("account.member", "Member");
168
+ return {
169
+ isMember: true,
170
+ identityLine: copyParam("account.signedIn", "Signed in"),
171
+ detailLine: name,
172
+ memberName: name,
173
+ memberEmail: "",
174
+ memberImage: "",
175
+ memberInitials: "M",
176
+ hasMemberImage: false,
177
+ noMemberImage: true,
178
+ };
179
+ }
180
+
181
+ export async function loadMemberProfile(guestDetailLine: string, known?: MemberIdentity): Promise<AccountProfile> {
182
+ // `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
183
+ // getMyData can still return a site/account nickname (e.g. apptestercoowner)
184
+ // after sign-out or for anonymous — never treat that as a signed-in member.
185
+ const identity = known ?? await memberIdentity();
186
+ if (!identity.signedIn) return guestProfile(guestDetailLine);
187
+ const storedEmail = identity.email;
188
+ if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
189
+ try {
190
+ const data = await getMyData();
191
+ return profileFromData(data, storedEmail);
192
+ } catch {
193
+ // The account profile is an owner endpoint: the web host refuses it, and a site member need
194
+ // not have one. The member's own record (the Members API) still names them.
195
+ const member = await siteMemberProfile(storedEmail);
196
+ if (member) return member;
197
+ return {
198
+ isMember: true,
199
+ identityLine: copyParam("account.signedIn", "Signed in"),
200
+ detailLine: storedEmail,
201
+ memberName: storedEmail,
202
+ memberEmail: storedEmail,
203
+ memberImage: "",
204
+ memberInitials: initialsFromName(storedEmail) || "M",
205
+ hasMemberImage: false,
206
+ noMemberImage: true,
207
+ };
208
+ }
209
+ }
@@ -0,0 +1,76 @@
1
+ // The signed-in member's photo and initials for a top-bar avatar on a SHARED list screen
2
+ // (`defineBackendCollection({ memberAvatar })`). A screen opts in with the onAppear param
3
+ // `memberAvatar: "1"`; a screen that does not ask pays nothing. A visitor costs one local
4
+ // identity read per load. A member's profile is read again on each visit, while the last photo
5
+ // stays on screen, so a photo or name saved in Personal info reaches this bar on the next visit.
6
+ import { loadMemberProfile, memberIdentity } from "./himi-account.js";
7
+
8
+ /** The state keys the avatar item binds (`$service:<name>.memberImage` / `.memberInitials`). */
9
+ export const MEMBER_AVATAR_KEYS = ["memberImage", "memberInitials"] as const;
10
+ export interface MemberAvatarFields { memberImage: string; memberInitials: string }
11
+ const NONE: MemberAvatarFields = { memberImage: "", memberInitials: "" };
12
+
13
+ export interface MemberAvatarSource {
14
+ /** The state keys this source writes: kept out of a persisted or restored snapshot. */
15
+ readonly keys: readonly string[];
16
+ /** The load action's argument: starts a read when the screen asked for the avatar. */
17
+ onLoad(arg: unknown): void;
18
+ /** The state with the avatar fields, once the screen asked for them. */
19
+ merge<T extends object>(state: T): T;
20
+ /** Call once after registration. A runtime that ignores `notHydrated` restored the last run's
21
+ * photo on a cold boot (maybe another member's): clear it until this run reads its own. */
22
+ resetRestored(svc: { getState(): unknown }): void;
23
+ }
24
+ export type MemberAvatarFactory = (changed: () => void) => MemberAvatarSource;
25
+
26
+ export interface MemberAvatarReads {
27
+ identity(): Promise<{ email: string; signedIn: boolean }>;
28
+ profile(): Promise<{ isMember: boolean; memberImage: string; memberInitials: string } | undefined>;
29
+ }
30
+ const LIVE: MemberAvatarReads = { identity: memberIdentity, profile: () => loadMemberProfile("").catch(() => undefined) };
31
+
32
+ const asked = (arg: unknown): boolean => {
33
+ const value = arg && typeof arg === "object" ? (arg as { memberAvatar?: unknown }).memberAvatar : undefined;
34
+ return value === "1" || value === true;
35
+ };
36
+
37
+ /** `changed` republishes the list's state (the collection's `collectionDataChanged`). */
38
+ export function memberAvatarSource(changed: () => void, reads: MemberAvatarReads = LIVE): MemberAvatarSource {
39
+ let wanted = false;
40
+ let fields = NONE;
41
+ let seq = 0;
42
+ async function read(): Promise<MemberAvatarFields> {
43
+ const who = await reads.identity();
44
+ if (!who.signedIn) return NONE;
45
+ // No per-account cache: no worker is told when Personal info saves a new photo or name, so
46
+ // only a fresh read sees it. The last fields stay on screen until this read answers.
47
+ const profile = await reads.profile();
48
+ if (!profile?.isMember) return NONE;
49
+ return { memberImage: profile.memberImage, memberInitials: profile.memberInitials };
50
+ }
51
+ return {
52
+ keys: MEMBER_AVATAR_KEYS,
53
+ onLoad(arg) {
54
+ if (!asked(arg)) return;
55
+ wanted = true;
56
+ const mine = ++seq;
57
+ void read().then((next) => {
58
+ // A later load (a sign-out, another account) owns the result.
59
+ if (mine !== seq) return;
60
+ if (next.memberImage === fields.memberImage && next.memberInitials === fields.memberInitials) return;
61
+ fields = next;
62
+ changed();
63
+ }, () => undefined);
64
+ },
65
+ merge(state) {
66
+ return wanted ? { ...state, ...fields } : state;
67
+ },
68
+ resetRestored(svc) {
69
+ // The same signal `resetUnhydratedKeysOnOlderRuntime` (iap-worker.ts) reads.
70
+ if ((globalThis as { himalaya?: { hydrationOptOut?: unknown } }).himalaya?.hydrationOptOut === true) return;
71
+ const booted = svc.getState();
72
+ if (!booted || typeof booted !== "object") return;
73
+ for (const key of MEMBER_AVATAR_KEYS) (booted as Record<string, unknown>)[key] = "";
74
+ },
75
+ };
76
+ }
@@ -2508,7 +2508,8 @@ const SCREENS = runtimeSetting({
2508
2508
  "app_info",
2509
2509
  "calendar",
2510
2510
  "open_url",
2511
- "local_database"
2511
+ "local_database",
2512
+ "ui"
2512
2513
  ],
2513
2514
  "minBinaryVersion": "0.1.0",
2514
2515
  "bundleVersion": "0.0.1"
@@ -6673,7 +6674,8 @@ const SCREENS = runtimeSetting({
6673
6674
  "wix_api",
6674
6675
  "local_database",
6675
6676
  "calendar",
6676
- "open_url"
6677
+ "open_url",
6678
+ "ui"
6677
6679
  ],
6678
6680
  "minBinaryVersion": "0.1.0",
6679
6681
  "bundleVersion": "0.0.1"
@@ -14352,7 +14354,8 @@ const SCREENS = runtimeSetting({
14352
14354
  "suggestions": "off",
14353
14355
  "onChange": {
14354
14356
  "actionId": "tier5.himiBrandedAccountPassword.setNewPassword"
14355
- }
14357
+ },
14358
+ "errorPath": "$service:himiBrandedAccountPassword.newError"
14356
14359
  }
14357
14360
  },
14358
14361
  "modifiers": {
@@ -27237,6 +27240,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
27237
27240
  "local_database",
27238
27241
  "app_info",
27239
27242
  "iap",
27243
+ "ui",
27240
27244
  "wix_cashier",
27241
27245
  "open_url",
27242
27246
  "wix_platform"
@@ -3,6 +3,15 @@ import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeC
3
3
  import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
4
4
  import { copyParam, stashCopy } from './himi-copy.js';
5
5
  import { createCollectionQuery, type CollectionQuerySource, type CollectionQueryState } from './collection-query.js';
6
+ // The shape `memberAvatarSource` (member-avatar.ts) returns, declared here rather than imported:
7
+ // a starter that never asks for the avatar does not ship member-avatar.ts, and a type import of a
8
+ // missing file fails its strict type check.
9
+ type MemberAvatarFactory = (changed: () => void) => {
10
+ readonly keys: readonly string[];
11
+ onLoad(arg: unknown): void;
12
+ merge<T extends object>(state: T): T;
13
+ resetRestored(svc: { getState(): unknown }): void;
14
+ };
6
15
 
7
16
  export interface CollectionSaving {
8
17
  read(): string[];
@@ -361,18 +370,32 @@ export function defineBackendCollection<S extends object, Row extends object>(na
361
370
  apply(state: S, page: CollectionQueryState<Row>): S;
362
371
  saving?: CollectionSaving;
363
372
  actions?: Record<string, (state: S, ...args: unknown[]) => S | undefined | Promise<S | undefined>>;
373
+ /** A top-bar avatar for the signed-in member: `memberAvatarSource` from `member-avatar.ts`. Off
374
+ * until the screen's onAppear asks for it (`memberAvatar: "1"`); the fields are never persisted. */
375
+ memberAvatar?: MemberAvatarFactory;
364
376
  }) {
365
377
  let publish: (() => unknown) | undefined;
378
+ const avatar = options.memberAvatar?.(() => { publish?.(); });
366
379
  const controller = createCollectionQuery(options.source, () => { publish?.(); });
367
380
  const definition = decorateCollection(name, { state: options.state as State, actions: options.actions as Record<string, Reducer> | undefined }, options.saving, {
368
381
  restorePagesOnLoad: options.restorePagesOnLoad,
369
- onLoad: options.onLoad,
382
+ onLoad: avatar ? arg => { avatar.onLoad(arg); return options.onLoad?.(arg); } : options.onLoad,
370
383
  controller: controller as unknown as BackendCollection['controller'],
371
- apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
384
+ apply: (state, page) => {
385
+ const applied = options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State;
386
+ return avatar ? avatar.merge(applied) : applied;
387
+ },
372
388
  });
389
+ // The member's photo belongs to this run's account: a cold boot never restores it.
390
+ const baseRegister = options.register ?? register;
391
+ const registerService = (avatar ? ((n: string, def: ServiceDefinition<unknown>) => {
392
+ const own = def as { notHydrated?: string[]; notPersisted?: string[] };
393
+ return baseRegister(n, { ...def, notHydrated: [...(own.notHydrated ?? []), ...avatar.keys], notPersisted: [...(own.notPersisted ?? []), ...avatar.keys] } as never);
394
+ }) : baseRegister) as typeof register;
373
395
  // Compatibility starters retain their existing mutation behavior; accept the
374
396
  // current authoring contract without enabling the offline-write rollout.
375
- const handle = (options.register ?? register)(name, definition);
397
+ const handle = registerService(name, definition);
398
+ avatar?.resetRestored(handle as unknown as { getState(): unknown });
376
399
  // Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
377
400
  // when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
378
401
  // starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
@@ -0,0 +1,76 @@
1
+ // The signed-in member's photo and initials for a top-bar avatar on a SHARED list screen
2
+ // (`defineBackendCollection({ memberAvatar })`). A screen opts in with the onAppear param
3
+ // `memberAvatar: "1"`; a screen that does not ask pays nothing. A visitor costs one local
4
+ // identity read per load. A member's profile is read again on each visit, while the last photo
5
+ // stays on screen, so a photo or name saved in Personal info reaches this bar on the next visit.
6
+ import { loadMemberProfile, memberIdentity } from "./himi-account.js";
7
+
8
+ /** The state keys the avatar item binds (`$service:<name>.memberImage` / `.memberInitials`). */
9
+ export const MEMBER_AVATAR_KEYS = ["memberImage", "memberInitials"] as const;
10
+ export interface MemberAvatarFields { memberImage: string; memberInitials: string }
11
+ const NONE: MemberAvatarFields = { memberImage: "", memberInitials: "" };
12
+
13
+ export interface MemberAvatarSource {
14
+ /** The state keys this source writes: kept out of a persisted or restored snapshot. */
15
+ readonly keys: readonly string[];
16
+ /** The load action's argument: starts a read when the screen asked for the avatar. */
17
+ onLoad(arg: unknown): void;
18
+ /** The state with the avatar fields, once the screen asked for them. */
19
+ merge<T extends object>(state: T): T;
20
+ /** Call once after registration. A runtime that ignores `notHydrated` restored the last run's
21
+ * photo on a cold boot (maybe another member's): clear it until this run reads its own. */
22
+ resetRestored(svc: { getState(): unknown }): void;
23
+ }
24
+ export type MemberAvatarFactory = (changed: () => void) => MemberAvatarSource;
25
+
26
+ export interface MemberAvatarReads {
27
+ identity(): Promise<{ email: string; signedIn: boolean }>;
28
+ profile(): Promise<{ isMember: boolean; memberImage: string; memberInitials: string } | undefined>;
29
+ }
30
+ const LIVE: MemberAvatarReads = { identity: memberIdentity, profile: () => loadMemberProfile("").catch(() => undefined) };
31
+
32
+ const asked = (arg: unknown): boolean => {
33
+ const value = arg && typeof arg === "object" ? (arg as { memberAvatar?: unknown }).memberAvatar : undefined;
34
+ return value === "1" || value === true;
35
+ };
36
+
37
+ /** `changed` republishes the list's state (the collection's `collectionDataChanged`). */
38
+ export function memberAvatarSource(changed: () => void, reads: MemberAvatarReads = LIVE): MemberAvatarSource {
39
+ let wanted = false;
40
+ let fields = NONE;
41
+ let seq = 0;
42
+ async function read(): Promise<MemberAvatarFields> {
43
+ const who = await reads.identity();
44
+ if (!who.signedIn) return NONE;
45
+ // No per-account cache: no worker is told when Personal info saves a new photo or name, so
46
+ // only a fresh read sees it. The last fields stay on screen until this read answers.
47
+ const profile = await reads.profile();
48
+ if (!profile?.isMember) return NONE;
49
+ return { memberImage: profile.memberImage, memberInitials: profile.memberInitials };
50
+ }
51
+ return {
52
+ keys: MEMBER_AVATAR_KEYS,
53
+ onLoad(arg) {
54
+ if (!asked(arg)) return;
55
+ wanted = true;
56
+ const mine = ++seq;
57
+ void read().then((next) => {
58
+ // A later load (a sign-out, another account) owns the result.
59
+ if (mine !== seq) return;
60
+ if (next.memberImage === fields.memberImage && next.memberInitials === fields.memberInitials) return;
61
+ fields = next;
62
+ changed();
63
+ }, () => undefined);
64
+ },
65
+ merge(state) {
66
+ return wanted ? { ...state, ...fields } : state;
67
+ },
68
+ resetRestored(svc) {
69
+ // The same signal `resetUnhydratedKeysOnOlderRuntime` (iap-worker.ts) reads.
70
+ if ((globalThis as { himalaya?: { hydrationOptOut?: unknown } }).himalaya?.hydrationOptOut === true) return;
71
+ const booted = svc.getState();
72
+ if (!booted || typeof booted !== "object") return;
73
+ for (const key of MEMBER_AVATAR_KEYS) (booted as Record<string, unknown>)[key] = "";
74
+ },
75
+ };
76
+ }
@@ -0,0 +1,26 @@
1
+ // An action's outcome as the platform snackbar (`@himalaya/ui` `snackbar`, `capability.ui.snackbar`)
2
+ // instead of a screen's own result sheet (a non-modal inline BottomSheet drawn to look like one).
3
+ //
4
+ // Opt-in, per screen: the screen's load params carry `resultSnackbar: "1"` (an app that also drops
5
+ // the screen's result sheets from its descriptors, e.g. Fitness Coach). Without it the worker keeps
6
+ // presenting its sheet, so apps that did not opt in are unchanged.
7
+ import { snackbar, type SnackbarAction, type SnackbarTone } from "@himalaya/ui";
8
+
9
+ let enabled = false;
10
+
11
+ /** Reads the opt-in from a load's params. Once on, it stays on for this worker. */
12
+ export function readResultSnackbar(arg: unknown): void {
13
+ const value = (arg as { resultSnackbar?: unknown } | null | undefined)?.resultSnackbar;
14
+ if (value === "1" || value === true) enabled = true;
15
+ }
16
+
17
+ /** True when this screen shows its outcomes as snackbars. */
18
+ export function resultSnackbarOn(): boolean {
19
+ return enabled;
20
+ }
21
+
22
+ /** Shows `message` as the platform snackbar. Never throws: a host with no snackbar drops it. */
23
+ export function showResultSnackbar(message: string, tone: SnackbarTone, action?: SnackbarAction): void {
24
+ if (!message) return;
25
+ void snackbar({ message, tone, ...(action ? { action } : {}) }).catch(() => undefined);
26
+ }
@@ -5,6 +5,7 @@ import { open } from "@himalaya/open-url";
5
5
  import { wixMediaUrl, WIX_LIST_IMAGE } from "@himalaya/wix-media";
6
6
  import { navigate } from "@himalaya/state";
7
7
  import { copyParam, copyTemplate } from "../_shared/himi-copy.js";
8
+ import { readResultSnackbar, resultSnackbarOn, showResultSnackbar } from "../_shared/result-snackbar.js";
8
9
  import { memberAccess, assertMemberAccess, memberAccessChanged, memberAccessDenied, type MemberAccess } from "../_shared/member-access.js";
9
10
  import { fetchMemberBookings, CANCELLED_STATUSES, UNCONFIRMED_STATUSES, type MemberBookingRow } from "../_shared/member-bookings.js";
10
11
  import { emitHostEvent } from "../_shared/host-events.js";
@@ -277,7 +278,12 @@ function derive(s: S): S {
277
278
  }
278
279
 
279
280
  const closeSheet = () => { openId = ""; confirming = false; sheetMessage = ""; };
280
- const showResult = (s: S, text: string, done: boolean): S => { closeSheet(); result = { text, done }; return derive(s); };
281
+ /** An action's outcome: the result sheet, or (opted in, `resultSnackbar`) the platform snackbar. */
282
+ function setResult(text: string, done: boolean): void {
283
+ if (resultSnackbarOn()) { showResultSnackbar(text, done ? "success" : "info"); result = null; return; }
284
+ result = { text, done };
285
+ }
286
+ const showResult = (s: S, text: string, done: boolean): S => { closeSheet(); setResult(text, done); return derive(s); };
281
287
 
282
288
  const svc = defineBackendCollection<S, MemberBookingRow>("himiBookingBookings", {
283
289
  onlineWrites: true,
@@ -295,6 +301,7 @@ const svc = defineBackendCollection<S, MemberBookingRow>("himiBookingBookings",
295
301
  sheetLine: "", sheetMessage: "", cancelling: false, resultOpen: false, resultText: "", resultDone: false, resultNotDone: true,
296
302
  weeklyLabel: "", weeklyRemainingLabel: "", weeklyPct: 0, weeklyMet: false, hideTracker: true, nextCursor: "" }),
297
303
  onLoad(arg) {
304
+ readResultSnackbar(arg);
298
305
  const goal = parseWeeklyGoal((arg as Record<string, unknown> | undefined)?.weeklyGoal);
299
306
  if (goal) weeklyGoal = goal;
300
307
  // A deep link (the home "next booking", the place summary) names a booking: open its sheet once
@@ -397,7 +404,7 @@ const svc = defineBackendCollection<S, MemberBookingRow>("himiBookingBookings",
397
404
  // Told to the app hosting this screen (an embed's `onAction`); dropped where nothing hosts it.
398
405
  await emitHostEvent("booking.cancelled", { bookingId: row.id, serviceId: row.serviceId,
399
406
  serviceName: row.title, start: row.start, end: row.end });
400
- result = { text: copyParam("bookings.cancelDone", "Booking canceled."), done: true };
407
+ setResult(copyParam("bookings.cancelDone", "Booking canceled."), true);
401
408
  await svc.refresh();
402
409
  return derive(svc.getState() as unknown as S);
403
410
  } catch (error) {
@@ -215,6 +215,13 @@ function inputSession(): { sessionId: string; start: string } {
215
215
  return { sessionId: start && typeof input?.sessionId === "string" ? input.sessionId.trim() : "", start };
216
216
  }
217
217
 
218
+ /** `{ doneTab }` when this screen was opened with one (`himalaya.input.doneTab`): Choose Time gets it,
219
+ * so a confirmed booking returns to the tab the flow started in. `{}` otherwise. */
220
+ function doneTabArg(): { doneTab?: string } {
221
+ const tab = (globalThis as { himalaya?: { input?: { doneTab?: unknown } } }).himalaya?.input?.doneTab;
222
+ return typeof tab === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(tab) ? { doneTab: tab } : {};
223
+ }
224
+
218
225
  function stringOf(value: unknown): string {
219
226
  return typeof value === "string" ? value.trim() : "";
220
227
  }
@@ -1126,14 +1133,14 @@ const svc = defineService<S, {
1126
1133
  const current: S = svc.getState?.() ?? s;
1127
1134
  return nav ? navigate(current, nav) : current;
1128
1135
  },
1129
- chooseTime: (s) => (s.id && s.hasService ? navigate(s, { screenId: "himi_time", args: { id: s.id, ...(s.isCourse ? { course: "true" } : {}) } }) : s),
1136
+ chooseTime: (s) => (s.id && s.hasService ? navigate(s, { screenId: "himi_time", args: { id: s.id, ...(s.isCourse ? { course: "true" } : {}), ...doneTabArg() } }) : s),
1130
1137
  // Book the session the screen opened on: Choose Time opens with it picked — the Agenda row's
1131
1138
  // own Book (`{ id, start, sessionId }`), so the member does not choose the time again.
1132
1139
  book: (s) => (s.id && s.hasService && s.sessionControl === "book"
1133
- ? navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId } })
1140
+ ? navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId, ...doneTabArg() } })
1134
1141
  : s),
1135
1142
  // "Change time": Choose Time for the service, with nothing picked.
1136
- changeTime: (s) => (s.id && s.hasService ? navigate(s, { screenId: "himi_time", args: { id: s.id } }) : s),
1143
+ changeTime: (s) => (s.id && s.hasService ? navigate(s, { screenId: "himi_time", args: { id: s.id, ...doneTabArg() } }) : s),
1137
1144
  // Join the session's waitlist from here — the Agenda row's join: a visitor signs in first; the
1138
1145
  // member's email and name are read, and the registration goes out only while the member is the
1139
1146
  // one the session's place was read for. The screen then shows "On waitlist".
@@ -1148,7 +1155,7 @@ const svc = defineService<S, {
1148
1155
  joining = false;
1149
1156
  // Without a sign-in screen, Choose Time opens on the session: it signs a guest in and
1150
1157
  // joins the waitlist itself. A sign-in sheet only closes, and this screen loads again.
1151
- if (!signInScreenId) return navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId } });
1158
+ if (!signInScreenId) return navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId, ...doneTabArg() } });
1152
1159
  return navigate(s, signInPresentation
1153
1160
  ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
1154
1161
  : { screenId: signInScreenId, args: { mode: "signin" } });
@@ -25,6 +25,7 @@ import { initials } from "../_shared/himi-text.js";
25
25
  import { copyParam, copyTemplate } from "../_shared/himi-copy.js";
26
26
  import { offsetPage } from "../_shared/offset-page.js";
27
27
  import { wixMediaUrl } from "@himalaya/wix-media";
28
+ import { memberAvatarSource } from "../_shared/member-avatar.js";
28
29
  import {
29
30
  distinctChoices, effectiveLocation, locationMenu, readSharedLocation, serviceLocationChoices, writeSharedLocation,
30
31
  type LocationChoice, type LocationOptionRow, type SharedLocation,
@@ -99,6 +100,8 @@ interface CategoryChip { id: string; label: string }
99
100
 
100
101
  interface S {
101
102
  status: "loading" | "ready";
103
+ /** The signed-in member's photo and initials, for a screen that asks for its top-bar avatar. */
104
+ memberImage: string; memberInitials: string;
102
105
  query: string;
103
106
  nextCursor?: string;
104
107
  complete?: boolean;
@@ -606,11 +609,12 @@ const MAX_PAGES = 10;
606
609
  // A cold boot takes these from `state`, never from the last run: a jump the last run asked for
607
610
  // would scroll the restored list on its first frame, and a sheet would reopen.
608
611
  const registerServices = ((name: string, def: Parameters<typeof defineService>[1]) =>
609
- defineService(name, { ...def, notHydrated: ["scrollTo", "locationSheetOpen"], perVisit: ["scrollTo", "locationSheetOpen"] } as never)) as typeof defineService;
612
+ defineService(name, { ...def, notHydrated: [...((def as { notHydrated?: string[] }).notHydrated ?? []), "scrollTo", "locationSheetOpen"], perVisit: ["scrollTo", "locationSheetOpen"] } as never)) as typeof defineService;
610
613
 
611
614
  const svc = defineBackendCollection<S, Row>("himiBookingServices", {
612
615
  register: registerServices,
613
616
  restorePagesOnLoad: true,
617
+ memberAvatar: memberAvatarSource,
614
618
  onLoad() {
615
619
  let reset: { query: string } | undefined;
616
620
  if (bootLoad) bootLoad = false;
@@ -622,7 +626,7 @@ const svc = defineBackendCollection<S, Row>("himiBookingServices", {
622
626
  (svc as unknown as { normalizeRestored?: () => unknown }).normalizeRestored?.();
623
627
  return reset;
624
628
  },
625
- state: { status: "loading", query: "", all: [], results: [], listRows: [], emptyText: "", countLabel: "", errored: false,
629
+ state: { status: "loading", memberImage: "", memberInitials: "", query: "", all: [], results: [], listRows: [], emptyText: "", countLabel: "", errored: false,
626
630
  notErrored: true, isLoading: true, notLoading: false, hasResults: false, noEmpty: true,
627
631
  categoryChips: [], hideCategories: true, activeCategory: "", scrollTo: "", hideRows: false, noMatchText: "", hasQuery: false, noQuery: true,
628
632
  categoriesLabel: "", locationOptions: [], locationLabel: "", locationA11y: "", hasLocationMenu: false, noLocationMenu: true,