@wix/himalaya-cli 0.1865.0 → 0.1867.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 (393) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/copy.generated.d.ts +17 -7
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/feedback.d.ts +1 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +55 -11
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +55 -11
  5. package/dist/browser-plane/assets.json +5 -5
  6. package/dist/browser-plane/preview-deferred/{a60c092217d4c21970ff66e8b63221007e49d0792eb9d5fe66238f8efbce884a.bin → 4a8928bb82fc0db03269e14445bfc09155ceb3cde1f268162ac70b7ceb097b1f.bin} +1 -1
  7. package/dist/browser-plane/sw.js +9 -9
  8. package/dist/cli.mjs +55 -42
  9. package/dist/preview-assets.generated.bin +0 -0
  10. package/guides/designing-himi-screens.md +1 -0
  11. package/guides/one-app-to-himi-app.md +1 -0
  12. package/package.json +2 -2
  13. package/templates/bare-fashion/tier5-src/_shared/himi-account.ts +14 -1
  14. package/templates/beauty-salon/dev/index.ts +122 -8
  15. package/templates/beauty-salon/l10n/ar.json +5 -0
  16. package/templates/beauty-salon/l10n/cs.json +5 -0
  17. package/templates/beauty-salon/l10n/da.json +5 -0
  18. package/templates/beauty-salon/l10n/de.json +5 -0
  19. package/templates/beauty-salon/l10n/el.json +5 -0
  20. package/templates/beauty-salon/l10n/en.json +1 -1
  21. package/templates/beauty-salon/l10n/es.json +5 -0
  22. package/templates/beauty-salon/l10n/fi.json +5 -0
  23. package/templates/beauty-salon/l10n/fr.json +5 -0
  24. package/templates/beauty-salon/l10n/he.json +4 -0
  25. package/templates/beauty-salon/l10n/hu.json +5 -0
  26. package/templates/beauty-salon/l10n/id.json +5 -0
  27. package/templates/beauty-salon/l10n/it.json +5 -0
  28. package/templates/beauty-salon/l10n/ja.json +5 -0
  29. package/templates/beauty-salon/l10n/ko.json +5 -0
  30. package/templates/beauty-salon/l10n/lt.json +5 -0
  31. package/templates/beauty-salon/l10n/nl.json +5 -0
  32. package/templates/beauty-salon/l10n/no.json +5 -0
  33. package/templates/beauty-salon/l10n/pl.json +5 -0
  34. package/templates/beauty-salon/l10n/pt.json +5 -0
  35. package/templates/beauty-salon/l10n/ru.json +5 -0
  36. package/templates/beauty-salon/l10n/sv.json +5 -0
  37. package/templates/beauty-salon/l10n/th.json +5 -0
  38. package/templates/beauty-salon/l10n/tr.json +5 -0
  39. package/templates/beauty-salon/l10n/uk.json +5 -0
  40. package/templates/beauty-salon/l10n/vi.json +5 -0
  41. package/templates/beauty-salon/l10n/zh.json +5 -0
  42. package/templates/beauty-salon/tier5-src/_shared/himi-account.ts +14 -1
  43. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +192 -28
  44. package/templates/beauty-salon-owner/tier5-src/_shared/himi-account.ts +14 -1
  45. package/templates/branded-lite/dev/index.ts +732 -583
  46. package/templates/branded-lite/l10n/ar.json +5 -0
  47. package/templates/branded-lite/l10n/cs.json +5 -0
  48. package/templates/branded-lite/l10n/da.json +5 -0
  49. package/templates/branded-lite/l10n/de.json +5 -0
  50. package/templates/branded-lite/l10n/el.json +5 -0
  51. package/templates/branded-lite/l10n/en.json +2 -2
  52. package/templates/branded-lite/l10n/es.json +5 -0
  53. package/templates/branded-lite/l10n/fi.json +5 -0
  54. package/templates/branded-lite/l10n/fr.json +5 -0
  55. package/templates/branded-lite/l10n/he.json +4 -0
  56. package/templates/branded-lite/l10n/hu.json +5 -0
  57. package/templates/branded-lite/l10n/id.json +5 -0
  58. package/templates/branded-lite/l10n/it.json +5 -0
  59. package/templates/branded-lite/l10n/ja.json +5 -0
  60. package/templates/branded-lite/l10n/ko.json +5 -0
  61. package/templates/branded-lite/l10n/lt.json +5 -0
  62. package/templates/branded-lite/l10n/nl.json +5 -0
  63. package/templates/branded-lite/l10n/no.json +5 -0
  64. package/templates/branded-lite/l10n/pl.json +5 -0
  65. package/templates/branded-lite/l10n/pt.json +5 -0
  66. package/templates/branded-lite/l10n/ru.json +5 -0
  67. package/templates/branded-lite/l10n/sv.json +5 -0
  68. package/templates/branded-lite/l10n/th.json +5 -0
  69. package/templates/branded-lite/l10n/tr.json +5 -0
  70. package/templates/branded-lite/l10n/uk.json +5 -0
  71. package/templates/branded-lite/l10n/vi.json +5 -0
  72. package/templates/branded-lite/l10n/zh.json +5 -0
  73. package/templates/branded-lite/recipes/galleries-collage.json +379 -0
  74. package/templates/branded-lite/tier5-src/_shared/business-chat-presenter.ts +11 -0
  75. package/templates/branded-lite/tier5-src/_shared/galleries-section.ts +61 -13
  76. package/templates/branded-lite/tier5-src/_shared/himi-account.ts +14 -1
  77. package/templates/branded-lite/tier5-src/business-chat/index.ts +20 -6
  78. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +192 -28
  79. package/templates/brandy/tier5-src/_shared/himi-account.ts +14 -1
  80. package/templates/brandy/tier5-src/himi-store-account/index.ts +192 -28
  81. package/templates/community-club/dev/index.ts +122 -8
  82. package/templates/community-club/l10n/ar.json +10 -0
  83. package/templates/community-club/l10n/cs.json +10 -0
  84. package/templates/community-club/l10n/da.json +10 -0
  85. package/templates/community-club/l10n/de.json +10 -0
  86. package/templates/community-club/l10n/el.json +10 -0
  87. package/templates/community-club/l10n/en.json +1 -1
  88. package/templates/community-club/l10n/es.json +10 -0
  89. package/templates/community-club/l10n/fi.json +10 -0
  90. package/templates/community-club/l10n/fr.json +10 -0
  91. package/templates/community-club/l10n/he.json +8 -0
  92. package/templates/community-club/l10n/hu.json +10 -0
  93. package/templates/community-club/l10n/id.json +10 -0
  94. package/templates/community-club/l10n/it.json +10 -0
  95. package/templates/community-club/l10n/ja.json +10 -0
  96. package/templates/community-club/l10n/ko.json +10 -0
  97. package/templates/community-club/l10n/lt.json +10 -0
  98. package/templates/community-club/l10n/nl.json +10 -0
  99. package/templates/community-club/l10n/no.json +10 -0
  100. package/templates/community-club/l10n/pl.json +10 -0
  101. package/templates/community-club/l10n/pt.json +10 -0
  102. package/templates/community-club/l10n/ru.json +10 -0
  103. package/templates/community-club/l10n/sv.json +10 -0
  104. package/templates/community-club/l10n/th.json +10 -0
  105. package/templates/community-club/l10n/tr.json +10 -0
  106. package/templates/community-club/l10n/uk.json +10 -0
  107. package/templates/community-club/l10n/vi.json +10 -0
  108. package/templates/community-club/l10n/zh.json +10 -0
  109. package/templates/community-club/tier5-src/_shared/himi-account.ts +14 -1
  110. package/templates/community-club/tier5-src/himi-store-account/index.ts +192 -28
  111. package/templates/community-club-owner/tier5-src/_shared/himi-account.ts +14 -1
  112. package/templates/conference/dev/index.ts +744 -595
  113. package/templates/conference/tier5-src/_shared/business-chat-presenter.ts +11 -0
  114. package/templates/conference/tier5-src/_shared/himi-account.ts +14 -1
  115. package/templates/conference/tier5-src/business-chat/index.ts +20 -6
  116. package/templates/conference/tier5-src/himi-store-account/index.ts +192 -28
  117. package/templates/events-meetups/dev/index.ts +122 -8
  118. package/templates/events-meetups/l10n/ar.json +10 -0
  119. package/templates/events-meetups/l10n/cs.json +10 -0
  120. package/templates/events-meetups/l10n/da.json +10 -0
  121. package/templates/events-meetups/l10n/de.json +10 -0
  122. package/templates/events-meetups/l10n/el.json +10 -0
  123. package/templates/events-meetups/l10n/en.json +1 -1
  124. package/templates/events-meetups/l10n/es.json +10 -0
  125. package/templates/events-meetups/l10n/fi.json +10 -0
  126. package/templates/events-meetups/l10n/fr.json +10 -0
  127. package/templates/events-meetups/l10n/he.json +8 -0
  128. package/templates/events-meetups/l10n/hu.json +10 -0
  129. package/templates/events-meetups/l10n/id.json +10 -0
  130. package/templates/events-meetups/l10n/it.json +10 -0
  131. package/templates/events-meetups/l10n/ja.json +10 -0
  132. package/templates/events-meetups/l10n/ko.json +10 -0
  133. package/templates/events-meetups/l10n/lt.json +10 -0
  134. package/templates/events-meetups/l10n/nl.json +10 -0
  135. package/templates/events-meetups/l10n/no.json +10 -0
  136. package/templates/events-meetups/l10n/pl.json +10 -0
  137. package/templates/events-meetups/l10n/pt.json +10 -0
  138. package/templates/events-meetups/l10n/ru.json +10 -0
  139. package/templates/events-meetups/l10n/sv.json +10 -0
  140. package/templates/events-meetups/l10n/th.json +10 -0
  141. package/templates/events-meetups/l10n/tr.json +10 -0
  142. package/templates/events-meetups/l10n/uk.json +10 -0
  143. package/templates/events-meetups/l10n/vi.json +10 -0
  144. package/templates/events-meetups/l10n/zh.json +10 -0
  145. package/templates/events-meetups/tier5-src/_shared/himi-account.ts +14 -1
  146. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +192 -28
  147. package/templates/events-meetups-owner/tier5-src/_shared/himi-account.ts +14 -1
  148. package/templates/fitness-gym/dev/index.ts +743 -507
  149. package/templates/fitness-gym/tier5-src/_shared/business-chat-presenter.ts +11 -0
  150. package/templates/fitness-gym/tier5-src/_shared/himi-account.ts +14 -1
  151. package/templates/fitness-gym/tier5-src/business-chat/index.ts +20 -6
  152. package/templates/fitness-gym/tier5-src/himi-booking-account/index.ts +14 -3
  153. package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +192 -28
  154. package/templates/gym-fitness/dev/index.ts +122 -8
  155. package/templates/gym-fitness/l10n/ar.json +5 -0
  156. package/templates/gym-fitness/l10n/cs.json +5 -0
  157. package/templates/gym-fitness/l10n/da.json +5 -0
  158. package/templates/gym-fitness/l10n/de.json +5 -0
  159. package/templates/gym-fitness/l10n/el.json +5 -0
  160. package/templates/gym-fitness/l10n/en.json +1 -1
  161. package/templates/gym-fitness/l10n/es.json +5 -0
  162. package/templates/gym-fitness/l10n/fi.json +5 -0
  163. package/templates/gym-fitness/l10n/fr.json +5 -0
  164. package/templates/gym-fitness/l10n/he.json +4 -0
  165. package/templates/gym-fitness/l10n/hu.json +5 -0
  166. package/templates/gym-fitness/l10n/id.json +5 -0
  167. package/templates/gym-fitness/l10n/it.json +5 -0
  168. package/templates/gym-fitness/l10n/ja.json +5 -0
  169. package/templates/gym-fitness/l10n/ko.json +5 -0
  170. package/templates/gym-fitness/l10n/lt.json +5 -0
  171. package/templates/gym-fitness/l10n/nl.json +5 -0
  172. package/templates/gym-fitness/l10n/no.json +5 -0
  173. package/templates/gym-fitness/l10n/pl.json +5 -0
  174. package/templates/gym-fitness/l10n/pt.json +5 -0
  175. package/templates/gym-fitness/l10n/ru.json +5 -0
  176. package/templates/gym-fitness/l10n/sv.json +5 -0
  177. package/templates/gym-fitness/l10n/th.json +5 -0
  178. package/templates/gym-fitness/l10n/tr.json +5 -0
  179. package/templates/gym-fitness/l10n/uk.json +5 -0
  180. package/templates/gym-fitness/l10n/vi.json +5 -0
  181. package/templates/gym-fitness/l10n/zh.json +5 -0
  182. package/templates/gym-fitness/tier5-src/_shared/himi-account.ts +14 -1
  183. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +192 -28
  184. package/templates/gym-fitness-owner/tier5-src/_shared/himi-account.ts +14 -1
  185. package/templates/medical-services/dev/index.ts +747 -595
  186. package/templates/medical-services/tier5-src/_shared/business-chat-presenter.ts +11 -0
  187. package/templates/medical-services/tier5-src/_shared/himi-account.ts +14 -1
  188. package/templates/medical-services/tier5-src/business-chat/index.ts +20 -6
  189. package/templates/medical-services/tier5-src/himi-booking-account/index.ts +14 -3
  190. package/templates/medical-services/tier5-src/himi-store-account/index.ts +192 -28
  191. package/templates/nonprofit-cause/dev/index.ts +122 -8
  192. package/templates/nonprofit-cause/l10n/ar.json +10 -0
  193. package/templates/nonprofit-cause/l10n/cs.json +10 -0
  194. package/templates/nonprofit-cause/l10n/da.json +10 -0
  195. package/templates/nonprofit-cause/l10n/de.json +10 -0
  196. package/templates/nonprofit-cause/l10n/el.json +10 -0
  197. package/templates/nonprofit-cause/l10n/en.json +1 -1
  198. package/templates/nonprofit-cause/l10n/es.json +10 -0
  199. package/templates/nonprofit-cause/l10n/fi.json +10 -0
  200. package/templates/nonprofit-cause/l10n/fr.json +10 -0
  201. package/templates/nonprofit-cause/l10n/he.json +8 -0
  202. package/templates/nonprofit-cause/l10n/hu.json +10 -0
  203. package/templates/nonprofit-cause/l10n/id.json +10 -0
  204. package/templates/nonprofit-cause/l10n/it.json +10 -0
  205. package/templates/nonprofit-cause/l10n/ja.json +10 -0
  206. package/templates/nonprofit-cause/l10n/ko.json +10 -0
  207. package/templates/nonprofit-cause/l10n/lt.json +10 -0
  208. package/templates/nonprofit-cause/l10n/nl.json +10 -0
  209. package/templates/nonprofit-cause/l10n/no.json +10 -0
  210. package/templates/nonprofit-cause/l10n/pl.json +10 -0
  211. package/templates/nonprofit-cause/l10n/pt.json +10 -0
  212. package/templates/nonprofit-cause/l10n/ru.json +10 -0
  213. package/templates/nonprofit-cause/l10n/sv.json +10 -0
  214. package/templates/nonprofit-cause/l10n/th.json +10 -0
  215. package/templates/nonprofit-cause/l10n/tr.json +10 -0
  216. package/templates/nonprofit-cause/l10n/uk.json +10 -0
  217. package/templates/nonprofit-cause/l10n/vi.json +10 -0
  218. package/templates/nonprofit-cause/l10n/zh.json +10 -0
  219. package/templates/nonprofit-cause/tier5-src/_shared/himi-account.ts +14 -1
  220. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +192 -28
  221. package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-account.ts +14 -1
  222. package/templates/owner-lite/tier5-src/_shared/himi-account.ts +14 -1
  223. package/templates/personal-fitness-trainer/dev/index.ts +760 -602
  224. package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-presenter.ts +11 -0
  225. package/templates/personal-fitness-trainer/tier5-src/_shared/himi-account.ts +14 -1
  226. package/templates/personal-fitness-trainer/tier5-src/business-chat/index.ts +20 -6
  227. package/templates/personal-fitness-trainer/tier5-src/himi-store-account/index.ts +192 -28
  228. package/templates/podcast-creator/dev/index.ts +122 -8
  229. package/templates/podcast-creator/l10n/ar.json +10 -0
  230. package/templates/podcast-creator/l10n/cs.json +10 -0
  231. package/templates/podcast-creator/l10n/da.json +10 -0
  232. package/templates/podcast-creator/l10n/de.json +10 -0
  233. package/templates/podcast-creator/l10n/el.json +10 -0
  234. package/templates/podcast-creator/l10n/en.json +1 -1
  235. package/templates/podcast-creator/l10n/es.json +10 -0
  236. package/templates/podcast-creator/l10n/fi.json +10 -0
  237. package/templates/podcast-creator/l10n/fr.json +10 -0
  238. package/templates/podcast-creator/l10n/he.json +8 -0
  239. package/templates/podcast-creator/l10n/hu.json +10 -0
  240. package/templates/podcast-creator/l10n/id.json +10 -0
  241. package/templates/podcast-creator/l10n/it.json +10 -0
  242. package/templates/podcast-creator/l10n/ja.json +10 -0
  243. package/templates/podcast-creator/l10n/ko.json +10 -0
  244. package/templates/podcast-creator/l10n/lt.json +10 -0
  245. package/templates/podcast-creator/l10n/nl.json +10 -0
  246. package/templates/podcast-creator/l10n/no.json +10 -0
  247. package/templates/podcast-creator/l10n/pl.json +10 -0
  248. package/templates/podcast-creator/l10n/pt.json +10 -0
  249. package/templates/podcast-creator/l10n/ru.json +10 -0
  250. package/templates/podcast-creator/l10n/sv.json +10 -0
  251. package/templates/podcast-creator/l10n/th.json +10 -0
  252. package/templates/podcast-creator/l10n/tr.json +10 -0
  253. package/templates/podcast-creator/l10n/uk.json +10 -0
  254. package/templates/podcast-creator/l10n/vi.json +10 -0
  255. package/templates/podcast-creator/l10n/zh.json +10 -0
  256. package/templates/podcast-creator/tier5-src/_shared/himi-account.ts +14 -1
  257. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +192 -28
  258. package/templates/podcast-creator-owner/tier5-src/_shared/himi-account.ts +14 -1
  259. package/templates/portfolio-creative/dev/index.ts +122 -8
  260. package/templates/portfolio-creative/l10n/ar.json +10 -0
  261. package/templates/portfolio-creative/l10n/cs.json +10 -0
  262. package/templates/portfolio-creative/l10n/da.json +10 -0
  263. package/templates/portfolio-creative/l10n/de.json +10 -0
  264. package/templates/portfolio-creative/l10n/el.json +10 -0
  265. package/templates/portfolio-creative/l10n/en.json +1 -1
  266. package/templates/portfolio-creative/l10n/es.json +10 -0
  267. package/templates/portfolio-creative/l10n/fi.json +10 -0
  268. package/templates/portfolio-creative/l10n/fr.json +10 -0
  269. package/templates/portfolio-creative/l10n/he.json +8 -0
  270. package/templates/portfolio-creative/l10n/hu.json +10 -0
  271. package/templates/portfolio-creative/l10n/id.json +10 -0
  272. package/templates/portfolio-creative/l10n/it.json +10 -0
  273. package/templates/portfolio-creative/l10n/ja.json +10 -0
  274. package/templates/portfolio-creative/l10n/ko.json +10 -0
  275. package/templates/portfolio-creative/l10n/lt.json +10 -0
  276. package/templates/portfolio-creative/l10n/nl.json +10 -0
  277. package/templates/portfolio-creative/l10n/no.json +10 -0
  278. package/templates/portfolio-creative/l10n/pl.json +10 -0
  279. package/templates/portfolio-creative/l10n/pt.json +10 -0
  280. package/templates/portfolio-creative/l10n/ru.json +10 -0
  281. package/templates/portfolio-creative/l10n/sv.json +10 -0
  282. package/templates/portfolio-creative/l10n/th.json +10 -0
  283. package/templates/portfolio-creative/l10n/tr.json +10 -0
  284. package/templates/portfolio-creative/l10n/uk.json +10 -0
  285. package/templates/portfolio-creative/l10n/vi.json +10 -0
  286. package/templates/portfolio-creative/l10n/zh.json +10 -0
  287. package/templates/portfolio-creative/tier5-src/_shared/himi-account.ts +14 -1
  288. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +192 -28
  289. package/templates/portfolio-creative-owner/tier5-src/_shared/himi-account.ts +14 -1
  290. package/templates/restaurant/dev/index.ts +122 -8
  291. package/templates/restaurant/l10n/ar.json +10 -0
  292. package/templates/restaurant/l10n/cs.json +10 -0
  293. package/templates/restaurant/l10n/da.json +10 -0
  294. package/templates/restaurant/l10n/de.json +10 -0
  295. package/templates/restaurant/l10n/el.json +10 -0
  296. package/templates/restaurant/l10n/en.json +1 -1
  297. package/templates/restaurant/l10n/es.json +10 -0
  298. package/templates/restaurant/l10n/fi.json +10 -0
  299. package/templates/restaurant/l10n/fr.json +10 -0
  300. package/templates/restaurant/l10n/he.json +8 -0
  301. package/templates/restaurant/l10n/hu.json +10 -0
  302. package/templates/restaurant/l10n/id.json +10 -0
  303. package/templates/restaurant/l10n/it.json +10 -0
  304. package/templates/restaurant/l10n/ja.json +10 -0
  305. package/templates/restaurant/l10n/ko.json +10 -0
  306. package/templates/restaurant/l10n/lt.json +10 -0
  307. package/templates/restaurant/l10n/nl.json +10 -0
  308. package/templates/restaurant/l10n/no.json +10 -0
  309. package/templates/restaurant/l10n/pl.json +10 -0
  310. package/templates/restaurant/l10n/pt.json +10 -0
  311. package/templates/restaurant/l10n/ru.json +10 -0
  312. package/templates/restaurant/l10n/sv.json +10 -0
  313. package/templates/restaurant/l10n/th.json +10 -0
  314. package/templates/restaurant/l10n/tr.json +10 -0
  315. package/templates/restaurant/l10n/uk.json +10 -0
  316. package/templates/restaurant/l10n/vi.json +10 -0
  317. package/templates/restaurant/l10n/zh.json +10 -0
  318. package/templates/restaurant/tier5-src/_shared/himi-account.ts +14 -1
  319. package/templates/restaurant/tier5-src/himi-store-account/index.ts +192 -28
  320. package/templates/restaurant-owner/tier5-src/_shared/himi-account.ts +14 -1
  321. package/templates/retail-store/dev/index.ts +122 -8
  322. package/templates/retail-store/l10n/ar.json +10 -0
  323. package/templates/retail-store/l10n/cs.json +10 -0
  324. package/templates/retail-store/l10n/da.json +10 -0
  325. package/templates/retail-store/l10n/de.json +10 -0
  326. package/templates/retail-store/l10n/el.json +10 -0
  327. package/templates/retail-store/l10n/en.json +1 -1
  328. package/templates/retail-store/l10n/es.json +10 -0
  329. package/templates/retail-store/l10n/fi.json +10 -0
  330. package/templates/retail-store/l10n/fr.json +10 -0
  331. package/templates/retail-store/l10n/he.json +8 -0
  332. package/templates/retail-store/l10n/hu.json +10 -0
  333. package/templates/retail-store/l10n/id.json +10 -0
  334. package/templates/retail-store/l10n/it.json +10 -0
  335. package/templates/retail-store/l10n/ja.json +10 -0
  336. package/templates/retail-store/l10n/ko.json +10 -0
  337. package/templates/retail-store/l10n/lt.json +10 -0
  338. package/templates/retail-store/l10n/nl.json +10 -0
  339. package/templates/retail-store/l10n/no.json +10 -0
  340. package/templates/retail-store/l10n/pl.json +10 -0
  341. package/templates/retail-store/l10n/pt.json +10 -0
  342. package/templates/retail-store/l10n/ru.json +10 -0
  343. package/templates/retail-store/l10n/sv.json +10 -0
  344. package/templates/retail-store/l10n/th.json +10 -0
  345. package/templates/retail-store/l10n/tr.json +10 -0
  346. package/templates/retail-store/l10n/uk.json +10 -0
  347. package/templates/retail-store/l10n/vi.json +10 -0
  348. package/templates/retail-store/l10n/zh.json +10 -0
  349. package/templates/retail-store/tier5-src/_shared/himi-account.ts +14 -1
  350. package/templates/retail-store/tier5-src/himi-store-account/index.ts +192 -28
  351. package/templates/retail-store-owner/tier5-src/_shared/himi-account.ts +14 -1
  352. package/templates/salon-spa/dev/index.ts +744 -595
  353. package/templates/salon-spa/tier5-src/_shared/business-chat-presenter.ts +11 -0
  354. package/templates/salon-spa/tier5-src/_shared/himi-account.ts +14 -1
  355. package/templates/salon-spa/tier5-src/business-chat/index.ts +20 -6
  356. package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +14 -3
  357. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +192 -28
  358. package/templates/wholesale-store/dev/index.ts +751 -602
  359. package/templates/wholesale-store/tier5-src/_shared/business-chat-presenter.ts +11 -0
  360. package/templates/wholesale-store/tier5-src/_shared/himi-account.ts +14 -1
  361. package/templates/wholesale-store/tier5-src/business-chat/index.ts +20 -6
  362. package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +192 -28
  363. package/templates/yoga-studio/dev/index.ts +122 -8
  364. package/templates/yoga-studio/l10n/ar.json +5 -0
  365. package/templates/yoga-studio/l10n/cs.json +5 -0
  366. package/templates/yoga-studio/l10n/da.json +5 -0
  367. package/templates/yoga-studio/l10n/de.json +5 -0
  368. package/templates/yoga-studio/l10n/el.json +5 -0
  369. package/templates/yoga-studio/l10n/en.json +1 -1
  370. package/templates/yoga-studio/l10n/es.json +5 -0
  371. package/templates/yoga-studio/l10n/fi.json +5 -0
  372. package/templates/yoga-studio/l10n/fr.json +5 -0
  373. package/templates/yoga-studio/l10n/he.json +4 -0
  374. package/templates/yoga-studio/l10n/hu.json +5 -0
  375. package/templates/yoga-studio/l10n/id.json +5 -0
  376. package/templates/yoga-studio/l10n/it.json +5 -0
  377. package/templates/yoga-studio/l10n/ja.json +5 -0
  378. package/templates/yoga-studio/l10n/ko.json +5 -0
  379. package/templates/yoga-studio/l10n/lt.json +5 -0
  380. package/templates/yoga-studio/l10n/nl.json +5 -0
  381. package/templates/yoga-studio/l10n/no.json +5 -0
  382. package/templates/yoga-studio/l10n/pl.json +5 -0
  383. package/templates/yoga-studio/l10n/pt.json +5 -0
  384. package/templates/yoga-studio/l10n/ru.json +5 -0
  385. package/templates/yoga-studio/l10n/sv.json +5 -0
  386. package/templates/yoga-studio/l10n/th.json +5 -0
  387. package/templates/yoga-studio/l10n/tr.json +5 -0
  388. package/templates/yoga-studio/l10n/uk.json +5 -0
  389. package/templates/yoga-studio/l10n/vi.json +5 -0
  390. package/templates/yoga-studio/l10n/zh.json +5 -0
  391. package/templates/yoga-studio/tier5-src/_shared/himi-account.ts +14 -1
  392. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +192 -28
  393. package/templates/yoga-studio-owner/tier5-src/_shared/himi-account.ts +14 -1
@@ -13,7 +13,7 @@ import { defineService, navigate } from "@himalaya/state";
13
13
  import { dispatch } from "@himalaya/dispatch";
14
14
  import { get as getAppInfo } from "@himalaya/app-info";
15
15
  import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
16
- import { guestProfile, loadMemberProfile, memberIdentity, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
16
+ import { guestProfile, loadMemberProfile, memberIdentity, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow, type AccountProfile, type MemberIdentity } from "../_shared/himi-account";
17
17
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
18
18
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
19
19
  import { atLeast, memberAccountRoutes } from "../_shared/member-account-routes.js";
@@ -246,7 +246,13 @@ function settle(next: S, arg: unknown, latest = true): S {
246
246
  // sends it.
247
247
  if (next.standalone && next.isMember) {
248
248
  routeInputConsumed = true;
249
- const cleared = derive({ ...next, ...NO_VISIT });
249
+ // The form is on its way out: it shows nothing, and "You're signed in" only if it is still
250
+ // here after SIGNED_IN_FALLBACK_MS (a form no refresh sends back).
251
+ // A form already closing after its own sign-in keeps its busy form until it is gone.
252
+ const closing = !!next.leaving;
253
+ // A closing form also keeps its visit: Create account must not turn into Sign in, nor a gate lose its heading.
254
+ const cleared = derive({ ...next, ...(closing ? {} : NO_VISIT), leaving: closing, authBusy: closing || (authInFlight && next.authBusy),
255
+ ...(next.signedInFallback ? {} : armSignedInFallback()) });
250
256
  // Only the newest probe moves: web re-shows a form with an arg-less load AND the appear
251
257
  // refresh, and both may land, any time apart. The boot load never moves.
252
258
  if (!latest || strField(arg, "boot") === "1") return cleared;
@@ -278,6 +284,17 @@ function offerSignIn(next: S, arg: unknown): S {
278
284
  return openSignIn(next, { mode: "signin" }, null);
279
285
  }
280
286
 
287
+ /** Reveal "You're signed in" with Continue if a member is still on the form a moment from now: a
288
+ * one-shot host `_poll` (worker timers are not on every host; the Android WebView worker has none).
289
+ * The visit it was armed for is remembered, so a later visit's form is never revealed by it. */
290
+ const SIGNED_IN_POLL_ID = "himi-sign-in-fallback";
291
+ let fallbackVisit = -1;
292
+ function armSignedInFallback(): Partial<S> {
293
+ fallbackVisit = visitSeq;
294
+ return { _poll: { id: SIGNED_IN_POLL_ID, intervalMs: SIGNED_IN_FALLBACK_MS, action: "himiStoreAccount.revealSignedIn", immediate: false } } as Partial<S>;
295
+ }
296
+ const STOP_SIGNED_IN_POLL = { _poll: { id: SIGNED_IN_POLL_ID, stop: true } } as Partial<S>;
297
+
281
298
  // A tick reads only the session. The profile is read again only when the signed-in email
282
299
  // changes, so an idle tick costs no profile read and no re-render. Account opts in
283
300
  // (`pollIdentity`): a sign-in on the standalone screen changes the session while Account
@@ -301,6 +318,9 @@ const NO_VISIT = {
301
318
  authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "",
302
319
  };
303
320
  const VISIT_KEYS = Object.keys(NO_VISIT) as (keyof typeof NO_VISIT)[];
321
+ /** The form's own view of this worker session (never restored: a snapshot's would show a form, or a
322
+ * signed-in view, that this worker has not confirmed). */
323
+ const FORM_VIEW_KEYS = ["leaving", "signedInFallback", "hideSignInForm", "hideSignedIn", "hideFormSkeleton", "credentialError", "errorMessage", "noticeMessage", "pendingApproval", "hidePendingApproval", "pendingTitle", "pendingBody"] as const;
304
324
  /** What derive() computes from the visit keys. Hydration copies keys without re-deriving,
305
325
  * so these stay out of the snapshot with them, or the first paint mixes two visits. */
306
326
  const VISIT_DERIVED_KEYS = ["notRegistering", "notRecovering", "hideSignInChoices", "hideShowRegister", "hideShowRecovery", "authTitle", "authBody",
@@ -309,6 +329,15 @@ const VISIT_DERIVED_KEYS = ["notRegistering", "notRecovering", "hideSignInChoice
309
329
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
310
330
  // state, so without this both would submit credentials and both would resume.
311
331
  let authInFlight = false;
332
+ // The sign-in form shows only once a probe of THIS worker has found a guest. Android boots a new
333
+ // worker for the open form when a sign-in changes the account; that worker's first states are a
334
+ // member's, and painting the form for them showed an empty form just before the sheet closed.
335
+ let guestSeen = false;
336
+ // Bumped by every visit to the form, so a fallback timer an earlier visit armed never fires on this one.
337
+ let visitSeq = 0;
338
+ /** How long a member may sit on the form before it says "You're signed in" with Continue. A form
339
+ * that closes by itself (every sign-in made on it, every appear refresh) is gone well before. */
340
+ const SIGNED_IN_FALLBACK_MS = 1500;
312
341
  // Never projected or persisted. The renderer retains its own masked draft for retry.
313
342
  let passwordDraft = "";
314
343
  let editRevision = 0;
@@ -372,6 +401,7 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
372
401
  if (appearing) {
373
402
  routeInputConsumed = false;
374
403
  formShownAt = Date.now();
404
+ visitSeq++;
375
405
  // A pooled worker serves the next visitor too: the fields mount empty, so the last
376
406
  // visit's draft must not be what Sign in submits.
377
407
  passwordDraft = "";
@@ -404,7 +434,8 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
404
434
  const visit: Partial<S> = appearing
405
435
  // The route's own intent and return path too: a dropped probe must not keep the last
406
436
  // visit's (an abandoned gate) for the next Sign in to resume.
407
- ? { email: "", emailTyped: false, firstName: "", lastName: "", password: "", emailError: "", passwordError: "", message: "", lastNameFocus: "", emailFocus: "", passwordFocus: "", ...authIntentFromArg(arg, NO_VISIT) }
437
+ ? { email: "", emailTyped: false, firstName: "", lastName: "", password: "", emailError: "", passwordError: "", credentialError: false, message: "", lastNameFocus: "", emailFocus: "", passwordFocus: "",
438
+ leaving: false, signedInFallback: false, pendingApproval: false, ...(authInFlight ? {} : { authBusy: false }), ...authIntentFromArg(arg, NO_VISIT) }
408
439
  : {};
409
440
  return { mode, visit };
410
441
  }
@@ -628,7 +659,10 @@ async function signInWithSocial(arg: unknown): Promise<S | undefined> {
628
659
  passwordDraft = "";
629
660
  return await resumeAfterAuth(completedAuth(next));
630
661
  } catch (error) {
631
- return derive({ ...svc.getState(), authBusy: false, message: socialCancelled(error) || socialBusy(error) ? "" : socialFailureMessage(error) });
662
+ const quiet = socialCancelled(error) || socialBusy(error);
663
+ // A member waiting for the owner's approval gets the Pending approval panel, as on the email path.
664
+ const pending = !quiet && authFailure(error, "signIn", translated).code === "pending_approval";
665
+ return derive({ ...svc.getState(), authBusy: false, message: quiet ? "" : socialFailureMessage(error), ...(pending ? { pendingApproval: true } : {}) });
632
666
  } finally { authInFlight = false; }
633
667
  }
634
668
 
@@ -638,7 +672,7 @@ function validateAuth(s: S, operation: AuthOperation): S {
638
672
  passwordError: errors.password ? translated(errors.password) : "",
639
673
  emailFocus: errors.email ? bumpToken(s.emailFocus) : s.emailFocus,
640
674
  passwordFocus: !errors.email && errors.password ? bumpToken(s.passwordFocus) : s.passwordFocus,
641
- message: "" });
675
+ credentialError: false, message: "" });
642
676
  }
643
677
  function rejectResult(raw: unknown, operation: AuthOperation) {
644
678
  const value = raw as { status?: string; error?: unknown; payload?: { error?: unknown } } | null;
@@ -661,18 +695,48 @@ async function authenticate(s: S, operation: "signIn" | "register"): Promise<S |
661
695
  ...(operation === "register" ? { firstName: s.firstName, lastName: s.lastName } : {}),
662
696
  });
663
697
  rejectResult(raw, operation);
664
- if (revision !== editRevision) return derive({ ...svc.getState(), authBusy: false });
698
+ // The host has signed the member in: an edit typed meanwhile cannot undo that, so the form
699
+ // completes. (Android keeps this worker across the account change, so nothing else would.)
665
700
  const next = await probe(svc.getState());
666
- if (revision !== editRevision) return derive({ ...svc.getState(), authBusy: false });
667
- if (!next.isMember) throw { code: "unknown" };
701
+ if (!next.isMember) {
702
+ if (revision !== editRevision) return derive({ ...svc.getState(), authBusy: false });
703
+ throw { code: "unknown" };
704
+ }
668
705
  passwordDraft = "";
669
706
  return await resumeAfterAuth(completedAuth(next));
670
707
  } catch (error) {
671
- return derive({ ...svc.getState(), authBusy: false,
672
- message: revision === editRevision ? authFailure(error, operation, translated).reason : "" });
708
+ const current = svc.getState();
709
+ if (revision !== editRevision) return derive({ ...current, authBusy: false, message: "" });
710
+ return failedAuth(current, authFailure(error, operation, translated));
673
711
  } finally { authInFlight = false; }
674
712
  }
675
713
 
714
+ /** A failure goes where the visitor fixes it, as the Wix branded app routes it: a wrong password
715
+ * under Password (focused, to retype); a taken email, or one with no account, under Email; a
716
+ * member waiting for the owner's approval to the "Pending approval" panel; a password Wix reset
717
+ * to Reset password, with the email kept; anything else (network, too many attempts) above the
718
+ * buttons. */
719
+ function failedAuth(s: S, failure: { code: string; reason: string }): S {
720
+ const base = { ...s, authBusy: false, leaving: false, message: "", credentialError: false };
721
+ if (failure.code === "invalid_credentials") {
722
+ return derive({ ...base, passwordError: failure.reason, credentialError: true, passwordFocus: bumpToken(s.passwordFocus) });
723
+ }
724
+ if (failure.code === "email_in_use" || failure.code === "account_not_found") {
725
+ return derive({ ...base, emailError: failure.reason, emailFocus: bumpToken(s.emailFocus) });
726
+ }
727
+ if (failure.code === "pending_approval") {
728
+ passwordDraft = "";
729
+ // The sheet's panel says it; a form with no panel (Account's inline login) shows the line.
730
+ return derive({ ...base, password: "", pendingApproval: true, message: failure.reason });
731
+ }
732
+ if (failure.code === "password_reset_required") {
733
+ editRevision++; modeSwitches++; passwordDraft = "";
734
+ return derive({ ...base, isRegistering: false, isRecovering: true, password: "", passwordError: "", emailError: "",
735
+ resetSent: false, message: failure.reason, ...NO_FOCUS_MODE_SWITCH });
736
+ }
737
+ return derive({ ...base, message: failure.reason });
738
+ }
739
+
676
740
  // Next value of a focus token: never empty once requested, and never a value this worker
677
741
  // issued before — one counter for every token, not "previous + 1". A visit reset puts a
678
742
  // token back to "" while a pooled form's field may still be mounted; "previous + 1" would
@@ -779,6 +843,10 @@ interface S extends IapRestoreFields {
779
843
  noMemberImage: boolean;
780
844
  authTitle: string;
781
845
  authBody: string;
846
+ /** The plain sign-in heading this form last showed with the app's copy. Kept across runs: a form
847
+ * opened again shows it until this visit's copy arrives, instead of a form with no title. */
848
+ signInTitle: string;
849
+ signInBody: string;
782
850
  /** Mid-flow gate intent (`join_group` | `rsvp` | `book` | `post` | ""). */
783
851
  authIntent: string;
784
852
  authContextName: string;
@@ -795,7 +863,31 @@ interface S extends IapRestoreFields {
795
863
  * transient memory for retry; hydration never restores a persisted secret. */
796
864
  password: string;
797
865
  authBusy: boolean;
866
+ /** Legacy binding, always empty: the busy button's spinner says it, not a "Please wait…" line. */
798
867
  busyMessage?: string;
868
+ /** A sign-in made on this form succeeded and the form is closing: it stays on screen as it was,
869
+ * its button busy, instead of switching to a signed-in view for the length of the close. */
870
+ leaving: boolean;
871
+ /** A member is still on the form SIGNED_IN_FALLBACK_MS later: show "You're signed in" + Continue. */
872
+ signedInFallback: boolean;
873
+ /** The form: hidden until this worker has seen a guest, and for a member unless leaving. */
874
+ hideSignInForm: boolean;
875
+ /** "You're signed in" + Continue: only the late fallback. */
876
+ hideSignedIn: boolean;
877
+ /** The form's skeleton: shown until this worker knows a guest (form) or a member (nothing) is here. */
878
+ hideFormSkeleton: boolean;
879
+ /** `passwordError` holds "wrong email or password", which an edit to the email clears too. */
880
+ credentialError: boolean;
881
+ /** `message` when it is a failure, for the error line (danger color). */
882
+ errorMessage: string;
883
+ /** `message` when it is good news (reset link sent), for the notice line. */
884
+ noticeMessage: string;
885
+ /** The site approves its members, and this one's request waits for the owner: the form gives way
886
+ * to a "Pending approval" panel, as the Wix branded app's screen of that name does. */
887
+ pendingApproval: boolean;
888
+ hidePendingApproval: boolean;
889
+ pendingTitle: string;
890
+ pendingBody: string;
799
891
  emailError: string;
800
892
  passwordError: string;
801
893
  passwordFocus: string;
@@ -811,7 +903,8 @@ interface S extends IapRestoreFields {
811
903
  emailFocus: string;
812
904
  message: string;
813
905
  hideMessage: boolean;
814
- messageKind: "error" | "success";
906
+ /** "none" when there is no line, so a slot keyed on it draws nothing on a paint from the saved state. */
907
+ messageKind: "error" | "success" | "none";
815
908
  resetSent: boolean;
816
909
  isLoading: boolean;
817
910
  notLoading: boolean;
@@ -903,16 +996,21 @@ function derive(s: S): S {
903
996
  const isRegistering = !!s.isRegistering;
904
997
  const isRecovering = !!s.isRecovering;
905
998
  const hasActivity = s.activityRows.length > 0;
906
- // Empty until the screen's copy pack (or a probe) arrives: the boot state is built before
907
- // any copy, and its English default would paint first in a translated app.
908
- const headline = headingReady ? authHeadline(s, isRegistering, isRecovering) : { authTitle: "", authBody: "" };
999
+ // Until the screen's copy pack (or a probe) arrives: the boot state is built before any copy, and
1000
+ // its English default would paint first in a translated app. A plain sign-in shows the heading
1001
+ // this form last showed with the copy; anything else shows none.
1002
+ const signInMode = !isRegistering && !isRecovering && !s.authIntent;
1003
+ const headline = headingReady ? authHeadline(s, isRegistering, isRecovering)
1004
+ : signInMode ? { authTitle: s.signInTitle ?? "", authBody: s.signInBody ?? "" } : { authTitle: "", authBody: "" };
1005
+ // The heading saved for the next visit: never the ended-session one ("You've been signed out").
1006
+ const savesHeading = headingReady && signInMode && !s.sessionEnded;
909
1007
  const hasReturnPath = !!s.isMember && !!s.returnScreenId;
910
1008
  const loading = s.status === "loading";
911
1009
  const name = s.isMember ? greetingName(s.memberName) : "";
912
1010
  return {
913
1011
  ...s,
914
1012
  hideMessage: !s.message,
915
- messageKind: s.resetSent ? "success" : "error",
1013
+ messageKind: !s.message ? "none" : s.resetSent ? "success" : "error",
916
1014
  resetSent: !!s.message && !!s.resetSent,
917
1015
  greeting: name
918
1016
  ? copyTemplate("storeAccount.greetingMember", "Hey, {name}", { name })
@@ -923,7 +1021,19 @@ function derive(s: S): S {
923
1021
  hideSessionEnded: loading || !!s.isMember || !s.sessionEnded,
924
1022
  hidePages: !s.showPages,
925
1023
  password: "",
926
- busyMessage: s.authBusy ? translated("auth.feedback.busy") : "",
1024
+ busyMessage: "",
1025
+ leaving: !!s.leaving,
1026
+ signedInFallback: !!s.signedInFallback,
1027
+ credentialError: !!s.credentialError,
1028
+ pendingApproval: !!s.pendingApproval && !s.isMember,
1029
+ hidePendingApproval: !s.pendingApproval || !!s.isMember,
1030
+ pendingTitle: s.pendingApproval ? translated("auth.gate.pendingApproval.title") : "",
1031
+ pendingBody: s.pendingApproval ? translated("auth.feedback.pending_approval") : "",
1032
+ hideSignInForm: !guestSeen || (!!s.isMember && !s.leaving) || (!!s.pendingApproval && !s.isMember),
1033
+ hideSignedIn: !s.isMember || !!s.leaving || !s.signedInFallback,
1034
+ hideFormSkeleton: guestSeen || !!s.isMember,
1035
+ errorMessage: s.message && !s.resetSent ? s.message : "",
1036
+ noticeMessage: s.message && s.resetSent ? s.message : "",
927
1037
  isLoading: s.status === "loading",
928
1038
  notLoading: s.status !== "loading",
929
1039
  notMember: !s.isMember,
@@ -944,6 +1054,8 @@ function derive(s: S): S {
944
1054
  ...restore.fields(s.restorePurchases && commerce.readiness().status === "ready"),
945
1055
  authTitle: headline.authTitle,
946
1056
  authBody: headline.authBody,
1057
+ signInTitle: savesHeading ? headline.authTitle : s.signInTitle ?? "",
1058
+ signInBody: savesHeading ? headline.authBody : s.signInBody ?? "",
947
1059
  hasReturnPath,
948
1060
  noReturnPath: !hasReturnPath,
949
1061
  returnCta: s.authIntent === "join_group"
@@ -1017,7 +1129,12 @@ async function probe(s: S, arg?: unknown, config: AppearConfig = appearConfig(s,
1017
1129
  const socialRead: Promise<SocialProvidersRead> = standaloneRequested ? readSocialProviders() : Promise.resolve({ ok: false });
1018
1130
  const flowsRead: Promise<MemberFlowsRead> = standaloneRequested ? readMemberFlows() : Promise.resolve({ ok: false, notReady: false });
1019
1131
  const identity = await memberIdentity();
1020
- const profile = await loadMemberProfile(copyParam("storeAccount.guestDetail", "Sign in to keep your cart and orders connected."), identity);
1132
+ const guestLine = copyParam("storeAccount.guestDetail", "Sign in to keep your cart and orders connected.");
1133
+ // The sign-in form only needs to know whether someone is signed in: a member is sent on at once.
1134
+ // The member's profile and orders are Account's, two network reads the form would make a member
1135
+ // wait for (a sign-in on the form, or the form Android re-boots for the new account).
1136
+ const profile = standaloneRequested ? sessionProfile(guestLine, identity) : await loadMemberProfile(guestLine, identity);
1137
+ if (!profile.isMember) guestSeen = true;
1021
1138
  const social = await socialRead;
1022
1139
  applySocialProviders(social);
1023
1140
  const flows = await flowsRead;
@@ -1030,7 +1147,7 @@ async function probe(s: S, arg?: unknown, config: AppearConfig = appearConfig(s,
1030
1147
  if (restorePurchasesRequested) enterCommerce();
1031
1148
  const routes = memberAccountLinks ? await memberAccountRoutes() : { addresses: false, wallet: false };
1032
1149
  let activityRows: AccountActivityRow[] = [];
1033
- if (profile.isMember) {
1150
+ if (profile.isMember && !standaloneRequested) {
1034
1151
  try {
1035
1152
  activityRows = await orderRows(profile.memberEmail);
1036
1153
  } catch {
@@ -1077,6 +1194,13 @@ async function probe(s: S, arg?: unknown, config: AppearConfig = appearConfig(s,
1077
1194
  });
1078
1195
  }
1079
1196
 
1197
+ /** The session alone (`himi.wix.memberIdentity`, answered by the host with no network read). */
1198
+ function sessionProfile(guestLine: string, identity: MemberIdentity): AccountProfile {
1199
+ if (!identity.signedIn) return guestProfile(guestLine);
1200
+ return { ...guestProfile(guestLine), isMember: true, identityLine: "", detailLine: identity.email,
1201
+ memberName: identity.email, memberEmail: identity.email };
1202
+ }
1203
+
1080
1204
  /** An ended session's email fills the field until the visitor edits it in this visit (`setEmail`, a
1081
1205
  * clear included); state, so a discarded probe changes nothing. */
1082
1206
  function endedSessionEmail(sessionEnded: boolean, typed: boolean, lastEmail: string): Partial<S> {
@@ -1084,13 +1208,19 @@ function endedSessionEmail(sessionEnded: boolean, typed: boolean, lastEmail: str
1084
1208
  }
1085
1209
 
1086
1210
  function completedAuth(s: S): S {
1211
+ // The standalone form closes next (resumeAfterAuth): it keeps the form and its busy button on
1212
+ // screen while it does. If it is somehow still here a moment later, the fallback says so.
1213
+ const leaving = !!s.standalone;
1087
1214
  return derive({
1088
1215
  ...s,
1216
+ ...(leaving ? armSignedInFallback() : {}),
1089
1217
  password: "",
1090
- authBusy: false, emailError: "", passwordError: "", passwordFocus: "",
1218
+ authBusy: leaving, leaving, signedInFallback: false,
1219
+ emailError: "", passwordError: "", passwordFocus: "", credentialError: false,
1091
1220
  firstName: "",
1092
1221
  lastName: "",
1093
- isRegistering: false,
1222
+ // A form that is closing keeps its mode: Create account must not turn into Sign in on the way out.
1223
+ isRegistering: leaving ? !!s.isRegistering : false,
1094
1224
  isRecovering: false,
1095
1225
  message: "",
1096
1226
  });
@@ -1122,13 +1252,19 @@ const svc = defineService<S, {
1122
1252
  openMember: (s: S, arg?: unknown) => Promise<S>;
1123
1253
  leave: (s: S) => S;
1124
1254
  restorePublish: (s: S) => S;
1255
+ revealSignedIn: (s: S) => S;
1256
+ closePendingApproval: (s: S) => S;
1125
1257
  iapRestore: (s: S) => Promise<undefined>;
1126
1258
  }>("himiStoreAccount", {
1127
1259
  // The form's email is never stored: after an ended session it is the former member's address, and a
1128
1260
  // visitor's snapshot is the shared `default` account's.
1129
1261
  // Nor the headline: a stored "You've been signed out" would paint again after a dismissal.
1130
- notPersisted: ["email", "emailTyped", "authTitle", "authBody"],
1131
- notHydrated: ["sessionEnded", "hideSessionEnded", "email", "emailTyped", "message", "hideMessage", "messageKind", "resetSent", "password", "authBusy", "hideAppleSignIn", "hideAppleSystemButton", "hideAppleLegacyButton", "hideGoogleSignIn", "hideSocialSignIn", "emailError", "passwordError", "passwordFocus", "lastNameFocus", "emailFocus", ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, ...IAP_RESTORE_KEYS],
1262
+ // Nor the lines: "We sent a reset link to <address>" names what the visitor typed.
1263
+ // Nor a visit's field errors: a reopened sheet must not paint the last visit's "Wrong password".
1264
+ // (The view keys that hide or show a part stay stored: unstored, every part would paint at once,
1265
+ // since a node's hiddenPath fails open while unbound.)
1266
+ notPersisted: ["email", "emailTyped", "authTitle", "authBody", "message", "messageKind", "errorMessage", "noticeMessage", "emailError", "passwordError", "credentialError"],
1267
+ notHydrated: ["sessionEnded", "hideSessionEnded", "email", "emailTyped", "message", "hideMessage", "messageKind", "resetSent", "password", "authBusy", ...FORM_VIEW_KEYS, "hideAppleSignIn", "hideAppleSystemButton", "hideAppleLegacyButton", "hideGoogleSignIn", "hideSocialSignIn", "emailError", "passwordError", "passwordFocus", "lastNameFocus", "emailFocus", ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, ...IAP_RESTORE_KEYS],
1132
1268
  state: derive({
1133
1269
  status: "loading",
1134
1270
  isMember: false,
@@ -1143,6 +1279,8 @@ const svc = defineService<S, {
1143
1279
  noMemberImage: true,
1144
1280
  authTitle: "Welcome",
1145
1281
  authBody: "Sign in to continue — cart, bookings, RSVPs, and memberships stay with you.",
1282
+ signInTitle: "",
1283
+ signInBody: "",
1146
1284
  authIntent: "",
1147
1285
  authContextName: "",
1148
1286
  returnScreenId: "",
@@ -1154,6 +1292,9 @@ const svc = defineService<S, {
1154
1292
  email: "",
1155
1293
  password: "",
1156
1294
  authBusy: false, emailError: "", passwordError: "", passwordFocus: "",
1295
+ leaving: false, signedInFallback: false, hideSignInForm: true, hideSignedIn: true, hideFormSkeleton: false,
1296
+ credentialError: false, errorMessage: "", noticeMessage: "",
1297
+ pendingApproval: false, hidePendingApproval: true, pendingTitle: "", pendingBody: "",
1157
1298
  firstName: "",
1158
1299
  lastName: "",
1159
1300
  lastNameFocus: "",
@@ -1253,8 +1394,8 @@ const svc = defineService<S, {
1253
1394
  // A setter given the value it already has is not an edit: a hidden form's secure field
1254
1395
  // clears itself on unmount (setPassword("")), and counting that would drop the probe
1255
1396
  // that is about to move a member off the form.
1256
- setEmail: (s, arg) => { if (strOf(arg).trim() === s.email) return s; editRevision++; const next = { ...s, ...TYPED, email: strOf(arg).trim(), emailTyped: true, message: "" }; emailEdits++; return derive({ ...next, emailError: s.emailError ? (identityErrors({ email: next.email }, "reset").email ? translated(identityErrors({ email: next.email }, "reset").email!) : "") : "" }); },
1257
- setPassword: (s, arg) => { if (strOf(arg) === passwordDraft) return s; editRevision++; passwordDraft = strOf(arg); return derive({ ...s, ...TYPED, message: "", passwordError: s.passwordError && !passwordDraft ? translated("auth.validation.passwordRequired") : "" }); },
1397
+ setEmail: (s, arg) => { if (strOf(arg).trim() === s.email) return s; editRevision++; const next = { ...s, ...TYPED, email: strOf(arg).trim(), emailTyped: true, message: "", ...(s.credentialError ? { passwordError: "", credentialError: false } : {}) }; emailEdits++; return derive({ ...next, emailError: s.emailError ? (identityErrors({ email: next.email }, "reset").email ? translated(identityErrors({ email: next.email }, "reset").email!) : "") : "" }); },
1398
+ setPassword: (s, arg) => { if (strOf(arg) === passwordDraft) return s; editRevision++; passwordDraft = strOf(arg); return derive({ ...s, ...TYPED, message: "", credentialError: false, passwordError: s.passwordError && !passwordDraft ? translated("auth.validation.passwordRequired") : "" }); },
1258
1399
  setFirstName: (s, arg) => { if (strOf(arg) === s.firstName) return s; editRevision++; return derive({ ...s, ...TYPED, firstName: strOf(arg), message: "" }); },
1259
1400
  setLastName: (s, arg) => { if (strOf(arg) === s.lastName) return s; editRevision++; return derive({ ...s, ...TYPED, lastName: strOf(arg), message: "" }); },
1260
1401
  // The register form's Next keys. Only first/last name carry one: they share a
@@ -1284,12 +1425,20 @@ const svc = defineService<S, {
1284
1425
  rejectResult(raw, "reset");
1285
1426
  if (revision !== editRevision) return derive({ ...svc.getState(), authBusy: false });
1286
1427
  return derive({ ...svc.getState(), authBusy: false, isRecovering: false,
1287
- resetSent: true, message: copyParam("storeAccount.resetSent", "If that email is registered, a reset link is on its way.") });
1428
+ resetSent: true, message: copyTemplate("storeAccount.resetSentTo", "We sent a reset link to {email}. Check your inbox.", { email: s.email.trim() }) });
1288
1429
  } catch (error) {
1289
- return derive({ ...svc.getState(), authBusy: false,
1290
- resetSent: false, message: revision === editRevision ? authFailure(error, "reset", translated).reason : "" });
1430
+ if (revision !== editRevision) return derive({ ...svc.getState(), authBusy: false, resetSent: false, message: "" });
1431
+ const failure = authFailure(error, "reset", translated);
1432
+ const current = svc.getState();
1433
+ // No account for this email: said under Email, as at sign in.
1434
+ if (failure.code === "account_not_found") {
1435
+ return derive({ ...current, authBusy: false, resetSent: false, message: "", emailError: failure.reason, emailFocus: bumpToken(current.emailFocus) });
1436
+ }
1437
+ return derive({ ...current, authBusy: false, resetSent: false, message: failure.reason });
1291
1438
  } finally { authInFlight = false; }
1292
1439
  },
1440
+ /** "Back to sign in" on the Pending approval panel. */
1441
+ closePendingApproval: (s) => { editRevision++; modeSwitches++; return derive({ ...s, pendingApproval: false, isRegistering: false, isRecovering: false, message: "", emailError: "", passwordError: "", ...NO_FOCUS_MODE_SWITCH }) },
1293
1442
  signIn: (s) => authenticate(s, "signIn"),
1294
1443
  register: (s) => authenticate(s, "register"),
1295
1444
  signInWithSocial: (_s, arg) => signInWithSocial(arg),
@@ -1303,6 +1452,7 @@ const svc = defineService<S, {
1303
1452
  // still return a site nickname and resurrect isMember (BUG-3). Trust the
1304
1453
  // cleared session and paint the guest form immediately.
1305
1454
  const guest = guestProfile(copyParam("storeAccount.guestDetail", "Sign in to keep your cart and orders connected."));
1455
+ guestSeen = true;
1306
1456
  const cleared = {
1307
1457
  ...s,
1308
1458
  ...guest,
@@ -1339,11 +1489,25 @@ const svc = defineService<S, {
1339
1489
  return derive({ ...svc.getState(), sessionEnded: false });
1340
1490
  },
1341
1491
  restorePublish: (s) => derive(s),
1492
+ // The fallback timer (armSignedInFallback): a member the form did not send back gets Continue.
1493
+ revealSignedIn: (s) => fallbackVisit === visitSeq && s.standalone && s.isMember && !s.signedInFallback
1494
+ ? derive({ ...s, ...STOP_SIGNED_IN_POLL, signedInFallback: true, leaving: false, authBusy: false })
1495
+ : derive({ ...s, ...STOP_SIGNED_IN_POLL }),
1342
1496
  iapRestore: async () => { await restore.run(); return undefined; },
1343
1497
  },
1344
1498
  });
1345
1499
 
1346
- resetUnhydratedKeysOnOlderRuntime(svc, derive({ ...svc.getState(), ...NO_IAP_RESTORE, ...NO_VISIT, ...NO_FOCUS_ALL, message: "", resetSent: false, passwordFocus: "", isRegistering: ROUTE_ASKS_REGISTER, sessionEnded: false }), ["sessionEnded", "hideSessionEnded", "message", "hideMessage", "messageKind", "resetSent", "hideAppleSignIn", "hideAppleSystemButton", "hideAppleLegacyButton", "hideGoogleSignIn", "hideSocialSignIn", ...IAP_RESTORE_KEYS, ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, "lastNameFocus", "emailFocus", "passwordFocus"]);
1500
+ resetUnhydratedKeysOnOlderRuntime(svc, derive({ ...svc.getState(), ...NO_IAP_RESTORE, ...NO_VISIT, ...NO_FOCUS_ALL, message: "", resetSent: false, passwordFocus: "", leaving: false, signedInFallback: false, credentialError: false, pendingApproval: false, isRegistering: ROUTE_ASKS_REGISTER, sessionEnded: false }), ["sessionEnded", "hideSessionEnded", "message", "hideMessage", "messageKind", "resetSent", ...FORM_VIEW_KEYS, "hideAppleSignIn", "hideAppleSystemButton", "hideAppleLegacyButton", "hideGoogleSignIn", "hideSocialSignIn", ...IAP_RESTORE_KEYS, ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, "lastNameFocus", "emailFocus", "passwordFocus"]);
1501
+ // The host paints this form from the last run's saved state (a guest's form) before this worker
1502
+ // boots. Starting from the skeleton would replace that form and then paint it again: the form, a
1503
+ // skeleton, a form with no title, the title. A guest seen in that run is a guest here until the
1504
+ // probe says otherwise, and the form keeps its last plain heading (`signInTitle`).
1505
+ const booted = svc.getState();
1506
+ if (booted && booted.status === "ready" && !booted.isMember) {
1507
+ guestSeen = true;
1508
+ // This visit's route intent first: a sheet a gate opened ("Sign in to join") never shows the plain heading.
1509
+ Object.assign(booted, derive({ ...booted, ...authIntentFromArg(undefined, NO_VISIT) }));
1510
+ }
1347
1511
  // `boot` tells settle this is not a visit: the host drops this call's navigation, and the
1348
1512
  // appear refresh does the visit's moves.
1349
1513
  svc.load({ boot: "1" });
@@ -7919,6 +7919,67 @@ const SCREENS = runtimeSetting({
7919
7919
  "spacing": 12,
7920
7920
  "alignment": "leading",
7921
7921
  "children": [
7922
+ {
7923
+ "id": "himi_sign_in.loading",
7924
+ "body": {
7925
+ "package": "himalaya",
7926
+ "type": "VStack",
7927
+ "props": {
7928
+ "spacing": 12,
7929
+ "alignment": "leading",
7930
+ "children": [
7931
+ {
7932
+ "id": "",
7933
+ "body": {
7934
+ "package": "himalaya",
7935
+ "type": "Skeleton",
7936
+ "props": {
7937
+ "width": 160,
7938
+ "height": 28,
7939
+ "cornerRadius": 6
7940
+ }
7941
+ }
7942
+ },
7943
+ {
7944
+ "id": "",
7945
+ "body": {
7946
+ "package": "himalaya",
7947
+ "type": "Skeleton",
7948
+ "props": {
7949
+ "height": 52,
7950
+ "cornerRadius": 8
7951
+ }
7952
+ }
7953
+ },
7954
+ {
7955
+ "id": "",
7956
+ "body": {
7957
+ "package": "himalaya",
7958
+ "type": "Skeleton",
7959
+ "props": {
7960
+ "height": 52,
7961
+ "cornerRadius": 8
7962
+ }
7963
+ }
7964
+ },
7965
+ {
7966
+ "id": "",
7967
+ "body": {
7968
+ "package": "himalaya",
7969
+ "type": "Skeleton",
7970
+ "props": {
7971
+ "height": 48,
7972
+ "cornerRadius": 24
7973
+ }
7974
+ }
7975
+ }
7976
+ ]
7977
+ }
7978
+ },
7979
+ "modifiers": {
7980
+ "hiddenPath": "$service:himiStoreAccount.hideFormSkeleton"
7981
+ }
7982
+ },
7922
7983
  {
7923
7984
  "id": "",
7924
7985
  "body": {
@@ -8179,7 +8240,6 @@ const SCREENS = runtimeSetting({
8179
8240
  "keyboard": "email",
8180
8241
  "contentType": "username",
8181
8242
  "validation": {
8182
- "required": true,
8183
8243
  "type": "email",
8184
8244
  "mode": "on_blur"
8185
8245
  },
@@ -8229,26 +8289,27 @@ const SCREENS = runtimeSetting({
8229
8289
  }
8230
8290
  },
8231
8291
  {
8232
- "id": "",
8292
+ "id": "himi_sign_in.message",
8233
8293
  "body": {
8234
8294
  "package": "himalaya",
8235
8295
  "type": "Text",
8236
8296
  "props": {
8237
- "text": "$service:himiStoreAccount.busyMessage",
8297
+ "text": "$service:himiStoreAccount.errorMessage",
8238
8298
  "style": "footnote",
8299
+ "color": "danger",
8239
8300
  "collapseWhenEmpty": true
8240
8301
  }
8241
8302
  }
8242
8303
  },
8243
8304
  {
8244
- "id": "himi_sign_in.message",
8305
+ "id": "himi_sign_in.notice",
8245
8306
  "body": {
8246
8307
  "package": "himalaya",
8247
8308
  "type": "Text",
8248
8309
  "props": {
8249
- "text": "$service:himiStoreAccount.message",
8310
+ "text": "$service:himiStoreAccount.noticeMessage",
8250
8311
  "style": "footnote",
8251
- "color": "textPrimary",
8312
+ "color": "success",
8252
8313
  "collapseWhenEmpty": true
8253
8314
  }
8254
8315
  }
@@ -8390,7 +8451,60 @@ const SCREENS = runtimeSetting({
8390
8451
  }
8391
8452
  },
8392
8453
  "modifiers": {
8393
- "hiddenPath": "$service:himiStoreAccount.isMember"
8454
+ "hiddenPath": "$service:himiStoreAccount.hideSignInForm"
8455
+ }
8456
+ },
8457
+ {
8458
+ "id": "",
8459
+ "body": {
8460
+ "package": "himalaya",
8461
+ "type": "VStack",
8462
+ "props": {
8463
+ "spacing": 12,
8464
+ "alignment": "leading",
8465
+ "children": [
8466
+ {
8467
+ "id": "himi_sign_in.pending_title",
8468
+ "body": {
8469
+ "package": "himalaya",
8470
+ "type": "Text",
8471
+ "props": {
8472
+ "text": "$service:himiStoreAccount.pendingTitle",
8473
+ "style": "title1"
8474
+ }
8475
+ }
8476
+ },
8477
+ {
8478
+ "id": "himi_sign_in.pending_body",
8479
+ "body": {
8480
+ "package": "himalaya",
8481
+ "type": "Text",
8482
+ "props": {
8483
+ "text": "$service:himiStoreAccount.pendingBody",
8484
+ "style": "body"
8485
+ }
8486
+ }
8487
+ },
8488
+ {
8489
+ "id": "himi_sign_in.pending_back",
8490
+ "body": {
8491
+ "package": "himalaya",
8492
+ "type": "Button",
8493
+ "props": {
8494
+ "title": "Back to sign in",
8495
+ "style": "secondary",
8496
+ "fullWidth": true,
8497
+ "action": {
8498
+ "actionId": "tier5.himiStoreAccount.closePendingApproval"
8499
+ }
8500
+ }
8501
+ }
8502
+ }
8503
+ ]
8504
+ }
8505
+ },
8506
+ "modifiers": {
8507
+ "hiddenPath": "$service:himiStoreAccount.hidePendingApproval"
8394
8508
  }
8395
8509
  },
8396
8510
  {
@@ -8432,7 +8546,7 @@ const SCREENS = runtimeSetting({
8432
8546
  }
8433
8547
  },
8434
8548
  "modifiers": {
8435
- "hiddenPath": "$service:himiStoreAccount.notMember"
8549
+ "hiddenPath": "$service:himiStoreAccount.hideSignedIn"
8436
8550
  }
8437
8551
  }
8438
8552
  ]
@@ -2567,6 +2567,11 @@
2567
2567
  "translation": "تعذّر تحميل المنشورات المحفوظة.",
2568
2568
  "origin": "machine"
2569
2569
  },
2570
+ "h_25d1b4bbf113": {
2571
+ "source": "Pending approval",
2572
+ "translation": "قيد الموافقة",
2573
+ "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2574
+ },
2570
2575
  "h_dc9d4584a554": {
2571
2576
  "source": "Paid",
2572
2577
  "translation": "مدفوع",
@@ -3216,6 +3221,11 @@
3216
3221
  "source": "You've been signed out. Sign in again, then we’ll bring you back.",
3217
3222
  "translation": "تم تسجيل خروجك. سجّل الدخول مرة أخرى، ثم سنعيدك إلى هنا.",
3218
3223
  "origin": "machine"
3224
+ },
3225
+ "h_617d49f47351": {
3226
+ "source": "We sent a reset link to {email}. Check your inbox.",
3227
+ "translation": "أرسلنا رابط إعادة التعيين إلى {email}. تحقّق من بريدك الوارد.",
3228
+ "origin": "machine"
3219
3229
  }
3220
3230
  }
3221
3231
  }