@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
@@ -0,0 +1,379 @@
1
+ {
2
+ "_recipe": "A Pro Gallery section's single-gallery collage, as the source shows it with one gallery: the gallery's name and View All, then its first pictures as one big tile and a 2x2 block of small ones, the last small tile carrying a +N pill for the pictures past the five. A tap on a tile or View All opens the gallery. ONE node, always mounted. Service: registerGalleriesSection(svc, { collage: true, showName }); the section has no title of its own and no separate View All button (the header has it).",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerGalleriesSection",
5
+ "id": "unique node id prefix for this section"
6
+ },
7
+ "node": {
8
+ "id": "{{id}}.galleries",
9
+ "body": {
10
+ "package": "himalaya",
11
+ "type": "VStack",
12
+ "props": {
13
+ "spacing": 12,
14
+ "alignment": "leading",
15
+ "children": [
16
+ {
17
+ "id": "{{id}}.loading",
18
+ "body": {
19
+ "package": "himalaya",
20
+ "type": "Skeleton",
21
+ "props": {
22
+ "height": 180,
23
+ "count": 1,
24
+ "cornerRadius": 8
25
+ }
26
+ },
27
+ "modifiers": {
28
+ "padding": {
29
+ "leading": 0,
30
+ "trailing": 0,
31
+ "top": 0,
32
+ "bottom": 0
33
+ },
34
+ "hiddenPath": "$service:{{svc}}.notLoading"
35
+ }
36
+ },
37
+ {
38
+ "id": "{{id}}.header",
39
+ "body": {
40
+ "package": "himalaya",
41
+ "type": "Grid",
42
+ "props": {
43
+ "columns": 1,
44
+ "spacing": 0,
45
+ "itemsPath": "$service:{{svc}}.rows",
46
+ "items": [
47
+ {
48
+ "id": "{{id}}.headerRow",
49
+ "body": {
50
+ "package": "himalaya",
51
+ "type": "HStack",
52
+ "props": {
53
+ "spacing": 12,
54
+ "alignment": "center",
55
+ "children": [
56
+ {
57
+ "id": "",
58
+ "body": {
59
+ "package": "himalaya",
60
+ "type": "Text",
61
+ "props": {
62
+ "text": "$item.name",
63
+ "style": "title3",
64
+ "maxLines": 2,
65
+ "collapseWhenEmpty": true
66
+ }
67
+ },
68
+ "modifiers": {
69
+ "weight": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "",
74
+ "body": {
75
+ "package": "himalaya",
76
+ "type": "Button",
77
+ "props": {
78
+ "title": "View All",
79
+ "style": "link",
80
+ "size": "sm",
81
+ "action": {
82
+ "actionId": "himi.open",
83
+ "params": {
84
+ "screenId": "$item.detailScreenId",
85
+ "id": "$item.id",
86
+ "name": "$item.label",
87
+ "source": "$item.source"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ },
96
+ "modifiers": {
97
+ "fillMaxWidth": true
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ "modifiers": {
104
+ "hiddenPath": "$service:{{svc}}.noRows"
105
+ }
106
+ },
107
+ {
108
+ "id": "{{id}}.mosaic",
109
+ "body": {
110
+ "package": "himalaya",
111
+ "type": "HStack",
112
+ "props": {
113
+ "spacing": 8,
114
+ "alignment": "leading",
115
+ "children": [
116
+ {
117
+ "id": "{{id}}.big",
118
+ "body": {
119
+ "package": "himalaya",
120
+ "type": "Grid",
121
+ "props": {
122
+ "columns": 1,
123
+ "spacing": 8,
124
+ "itemsPath": "$service:{{svc}}.bigTile",
125
+ "items": [
126
+ {
127
+ "id": "{{id}}.bigTile",
128
+ "body": {
129
+ "package": "himalaya",
130
+ "type": "VStack",
131
+ "props": {
132
+ "spacing": 0,
133
+ "alignment": "leading",
134
+ "children": [
135
+ {
136
+ "id": "",
137
+ "body": {
138
+ "package": "himalaya",
139
+ "type": "ZStack",
140
+ "props": {
141
+ "alignment": "center",
142
+ "children": [
143
+ {
144
+ "id": "",
145
+ "body": {
146
+ "package": "himalaya",
147
+ "type": "Image",
148
+ "props": {
149
+ "url": "$item.image",
150
+ "fillWidth": true,
151
+ "contentMode": "fill",
152
+ "aspectRatio": 1,
153
+ "contentDescription": "$item.label",
154
+ "shape": "rounded"
155
+ }
156
+ },
157
+ "modifiers": {
158
+ "cornerRadius": 8,
159
+ "fillMaxWidth": true
160
+ }
161
+ },
162
+ {
163
+ "id": "",
164
+ "body": {
165
+ "package": "himalaya",
166
+ "type": "VStack",
167
+ "props": {
168
+ "spacing": 0,
169
+ "alignment": "center",
170
+ "children": [
171
+ {
172
+ "id": "",
173
+ "body": {
174
+ "package": "himalaya",
175
+ "type": "Text",
176
+ "props": {
177
+ "text": "$item.more",
178
+ "style": "bodyEmphasis",
179
+ "maxLines": 1,
180
+ "color": "textOnAccent"
181
+ }
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ },
187
+ "modifiers": {
188
+ "background": {
189
+ "token": "accentPrimary"
190
+ },
191
+ "cornerRadius": 10,
192
+ "padding": {
193
+ "leading": 12,
194
+ "trailing": 12,
195
+ "top": 6,
196
+ "bottom": 6
197
+ },
198
+ "hiddenPath": "$item.noMore"
199
+ }
200
+ }
201
+ ]
202
+ }
203
+ },
204
+ "modifiers": {
205
+ "fillMaxWidth": true
206
+ }
207
+ }
208
+ ]
209
+ }
210
+ },
211
+ "modifiers": {
212
+ "fillMaxWidth": true,
213
+ "onTap": {
214
+ "actionId": "himi.open",
215
+ "params": {
216
+ "screenId": "$item.detailScreenId",
217
+ "id": "$item.id",
218
+ "name": "$item.label",
219
+ "source": "$item.source"
220
+ }
221
+ },
222
+ "pressFeedback": "scale",
223
+ "haptic": "light",
224
+ "accessibilityLabel": "$item.label"
225
+ }
226
+ }
227
+ ]
228
+ }
229
+ },
230
+ "modifiers": {
231
+ "weight": 1
232
+ }
233
+ },
234
+ {
235
+ "id": "{{id}}.small",
236
+ "body": {
237
+ "package": "himalaya",
238
+ "type": "Grid",
239
+ "props": {
240
+ "columns": 2,
241
+ "spacing": 8,
242
+ "itemsPath": "$service:{{svc}}.smallTiles",
243
+ "items": [
244
+ {
245
+ "id": "{{id}}.smallTile",
246
+ "body": {
247
+ "package": "himalaya",
248
+ "type": "VStack",
249
+ "props": {
250
+ "spacing": 0,
251
+ "alignment": "leading",
252
+ "children": [
253
+ {
254
+ "id": "",
255
+ "body": {
256
+ "package": "himalaya",
257
+ "type": "ZStack",
258
+ "props": {
259
+ "alignment": "center",
260
+ "children": [
261
+ {
262
+ "id": "",
263
+ "body": {
264
+ "package": "himalaya",
265
+ "type": "Image",
266
+ "props": {
267
+ "url": "$item.image",
268
+ "fillWidth": true,
269
+ "contentMode": "fill",
270
+ "aspectRatio": 1,
271
+ "contentDescription": "$item.label",
272
+ "shape": "rounded"
273
+ }
274
+ },
275
+ "modifiers": {
276
+ "cornerRadius": 8,
277
+ "fillMaxWidth": true
278
+ }
279
+ },
280
+ {
281
+ "id": "",
282
+ "body": {
283
+ "package": "himalaya",
284
+ "type": "VStack",
285
+ "props": {
286
+ "spacing": 0,
287
+ "alignment": "center",
288
+ "children": [
289
+ {
290
+ "id": "",
291
+ "body": {
292
+ "package": "himalaya",
293
+ "type": "Text",
294
+ "props": {
295
+ "text": "$item.more",
296
+ "style": "bodyEmphasis",
297
+ "maxLines": 1,
298
+ "color": "textOnAccent"
299
+ }
300
+ }
301
+ }
302
+ ]
303
+ }
304
+ },
305
+ "modifiers": {
306
+ "background": {
307
+ "token": "accentPrimary"
308
+ },
309
+ "cornerRadius": 10,
310
+ "padding": {
311
+ "leading": 12,
312
+ "trailing": 12,
313
+ "top": 6,
314
+ "bottom": 6
315
+ },
316
+ "hiddenPath": "$item.noMore"
317
+ }
318
+ }
319
+ ]
320
+ }
321
+ },
322
+ "modifiers": {
323
+ "fillMaxWidth": true
324
+ }
325
+ }
326
+ ]
327
+ }
328
+ },
329
+ "modifiers": {
330
+ "fillMaxWidth": true,
331
+ "onTap": {
332
+ "actionId": "himi.open",
333
+ "params": {
334
+ "screenId": "$item.detailScreenId",
335
+ "id": "$item.id",
336
+ "name": "$item.label",
337
+ "source": "$item.source"
338
+ }
339
+ },
340
+ "pressFeedback": "scale",
341
+ "haptic": "light",
342
+ "accessibilityLabel": "$item.label"
343
+ }
344
+ }
345
+ ]
346
+ }
347
+ },
348
+ "modifiers": {
349
+ "weight": 1
350
+ }
351
+ }
352
+ ]
353
+ }
354
+ },
355
+ "modifiers": {
356
+ "fillMaxWidth": true,
357
+ "hiddenPath": "$service:{{svc}}.noCollage"
358
+ }
359
+ },
360
+ {
361
+ "id": "{{id}}.empty",
362
+ "body": {
363
+ "package": "himalaya",
364
+ "type": "Text",
365
+ "props": {
366
+ "text": "$service:{{svc}}.emptyText",
367
+ "style": "body",
368
+ "color": "textSecondary"
369
+ }
370
+ },
371
+ "modifiers": {
372
+ "hiddenPath": "$service:{{svc}}.noEmpty"
373
+ }
374
+ }
375
+ ]
376
+ }
377
+ }
378
+ }
379
+ }
@@ -554,6 +554,17 @@ export function presentBusinessMessages<T extends Pick<BusinessMessage, "id" | "
554
554
  });
555
555
  }
556
556
 
557
+ /** The business's avatar sits only on the last bubble of a run of its messages, as in the member chat thread
558
+ * (member-thread-rows.ts): nothing follows, the member's own message follows, or the next message opens a new day.
559
+ * Every incoming message is the business's (staff and AI sign as the business), so a run is consecutive incoming rows. */
560
+ export function withBusinessAvatarRuns<T extends { mine: boolean; startsDay?: boolean }>(rows: T[]): (T & { showAvatar: boolean; hideAvatar: boolean })[] {
561
+ return rows.map((row, at) => {
562
+ const next = rows[at + 1];
563
+ const showAvatar = !row.mine && (!next || next.mine || !!next.startsDay);
564
+ return { ...row, showAvatar, hideAvatar: !showAvatar };
565
+ });
566
+ }
567
+
557
568
  /** Resolve a suggestion only from the currently normalized rows and only when the server supplied both postback fields. */
558
569
  export function findBusinessSuggestion<T extends { suggestions?: BusinessSuggestion[] }>(rows: T[], suggestionId: string): BusinessSuggestion | undefined {
559
570
  if (!suggestionId) return undefined;
@@ -9,6 +9,8 @@
9
9
  // - a member reads that service (`photography-one-app-viewer/galleries`), which a native host reaches;
10
10
  // - where it cannot be read (the published web bridge refuses that host) the member gets the empty state too: a hidden gallery must never show.
11
11
  // A page worker registers it under a service name; the descriptor binds `$service:<serviceName>.*` (recipes galleries-carousel / galleries-list).
12
+ // `collage: true` is the source's single-gallery mode (`maxGalleries: 1`): the first gallery's name, View All, and its first five pictures as one
13
+ // big tile and four small ones, the last small tile carrying "+N" for the pictures past the five (recipe galleries-collage).
12
14
  import { defineService } from "@himalaya/state";
13
15
  import { wixMediaUrl } from "@himalaya/wix-media";
14
16
  import { copyParam, stashCopy, copyTemplate } from "./himi-copy.js";
@@ -19,6 +21,17 @@ export interface GalleriesSectionOptions {
19
21
  limit?: number;
20
22
  /** Whether a card shows the gallery's name. */
21
23
  showName?: boolean;
24
+ /** The single-gallery collage: the first visible gallery's first pictures as tiles (and `limit` is 1). */
25
+ collage?: boolean;
26
+ }
27
+
28
+ /** A tile of the collage: a picture of the gallery, opening it. The last small tile carries the count of pictures past the tiles. */
29
+ export interface CollageTile {
30
+ image: string; hasImage: boolean; noImage: boolean;
31
+ /** "+16" on the last small tile when the gallery has pictures past the five shown; "" on every other tile. */
32
+ more: string; hasMore: boolean; noMore: boolean;
33
+ /** The gallery the tile opens (a tile opens its gallery, not the picture): the same params as a card. */
34
+ id: string; label: string; detailScreenId: string; source: string;
22
35
  }
23
36
 
24
37
  export interface GalleryRow {
@@ -41,6 +54,11 @@ export interface GalleriesSectionState {
41
54
  notLoading: boolean; notErrored: boolean; noRows: boolean; noEmpty: boolean;
42
55
  /** false when the site has more galleries than the section shows. */
43
56
  noMore: boolean;
57
+ /** The collage's tiles: the first one, and up to four after it (both empty outside `collage`). */
58
+ bigTile: CollageTile[];
59
+ smallTiles: CollageTile[];
60
+ /** true when there is no collage to show (not in `collage` mode, or the gallery has no pictures). */
61
+ noCollage: boolean;
44
62
  }
45
63
 
46
64
  /** The One App's own list: what the source section reads (its `API_BASE_URL` + `/galleries`), as a member, without hidden galleries. */
@@ -50,17 +68,26 @@ const DEFAULT_LIMIT = 10;
50
68
  const PAGE_SIZE = 10, MAX_GALLERIES = 30;
51
69
  /** A 240pt card at 3x: the shared list size (1000px) would ship far more pixels than a rail shows. */
52
70
  const CARD_IMAGE = { width: 720, height: 540, quality: 85 };
71
+ /** The collage shows the first five pictures: one big tile and four small ones. */
72
+ const COLLAGE_TILES = 5;
73
+ /** A big tile is about half the screen wide at 3x, a small one a quarter. */
74
+ const BIG_TILE_IMAGE = { width: 720, height: 720, quality: 85 };
75
+ const SMALL_TILE_IMAGE = { width: 360, height: 360, quality: 85 };
53
76
 
54
77
  type WixApi = { call: (method: string, path: string) => Promise<unknown> };
55
78
  interface RawItem { mediaUrl?: unknown; dataType?: unknown; videoMetadata?: { posters?: Array<{ url?: unknown }> } }
56
79
  /** A gallery of the One App's list. */
57
80
  interface RawGallery { id?: unknown; name?: unknown; items?: RawItem[]; totalItemsCount?: unknown; isHidden?: unknown }
58
81
 
59
- /** A gallery's cover: the first item's picture (a video gives its poster). */
60
- function coverOf(gallery: RawGallery): string {
61
- const item = Array.isArray(gallery.items) ? gallery.items[0] : undefined;
82
+ /** An item's picture (a video gives its poster), sized for its tile. */
83
+ function pictureOf(item: RawItem | undefined, size: { width: number; height: number; quality: number }): string {
62
84
  const poster = item?.dataType === "Video" ? item.videoMetadata?.posters?.find((p) => typeof p?.url === "string" && p.url)?.url : undefined;
63
- return wixMediaUrl(poster ?? item?.mediaUrl, CARD_IMAGE);
85
+ return wixMediaUrl(poster ?? item?.mediaUrl, size);
86
+ }
87
+
88
+ /** A gallery's cover: the first item's picture. */
89
+ function coverOf(gallery: RawGallery): string {
90
+ return pictureOf(Array.isArray(gallery.items) ? gallery.items[0] : undefined, CARD_IMAGE);
64
91
  }
65
92
 
66
93
  function rowOf(gallery: RawGallery, index: number, showName: boolean): GalleryRow {
@@ -74,6 +101,26 @@ function rowOf(gallery: RawGallery, index: number, showName: boolean): GalleryRo
74
101
  };
75
102
  }
76
103
 
104
+ /**
105
+ * The collage's tiles of one gallery: its first five pictures that have a url (a picture with none is skipped), the first as the big tile and
106
+ * the rest as the small ones, the last small tile carrying "+N" for the pictures past the ones looked at. Size and "+N" go by a tile's place
107
+ * among the SHOWN ones, never by the picture's original index: a skipped first picture must not leave the big tile at a small size, and a
108
+ * skipped fifth one must not take the "+N" away.
109
+ */
110
+ function collageOf(gallery: RawGallery, row: GalleryRow): { big: CollageTile[]; small: CollageTile[] } {
111
+ const looked = (Array.isArray(gallery.items) ? gallery.items : []).slice(0, COLLAGE_TILES);
112
+ const total = typeof gallery.totalItemsCount === "number" ? gallery.totalItemsCount : looked.length;
113
+ const past = Math.max(0, total - looked.length);
114
+ const shown = looked.filter((item) => pictureOf(item, SMALL_TILE_IMAGE));
115
+ const tiles = shown.map((item, place): CollageTile => {
116
+ const image = pictureOf(item, place === 0 ? BIG_TILE_IMAGE : SMALL_TILE_IMAGE);
117
+ const last = place >= 1 && place === shown.length - 1 && past > 0;
118
+ return { image, hasImage: true, noImage: false, more: last ? `+${past}` : "", hasMore: last, noMore: !last,
119
+ id: row.id, label: row.label, detailScreenId: row.detailScreenId, source: row.source };
120
+ });
121
+ return { big: tiles.slice(0, 1), small: tiles.slice(1) };
122
+ }
123
+
77
124
  /** A gallery the section may show: the source drops hidden and empty galleries. An unknown count is not "empty". */
78
125
  function visible(gallery: RawGallery): boolean {
79
126
  const count = gallery.totalItemsCount;
@@ -85,8 +132,8 @@ const MAX_SCANNED = 200;
85
132
 
86
133
  /** One page of the One App's list, as the source section reads it (`withHidden=false`). A native transport may hand the body over bare or wrapped as
87
134
  * `{ data }`. The service drops hidden galleries after it pages, so only its `totalGalleriesCount` says where the list ends: a body without one is not read. */
88
- async function readPage(api: WixApi, offset: number): Promise<{ galleries: RawGallery[]; total: number }> {
89
- const res = await api.call("GET", `${ONE_APP_GALLERIES_URL}?itemsPerGallery=1&offset=${offset}&limit=${PAGE_SIZE}&withHidden=false&useNew=true`);
135
+ async function readPage(api: WixApi, offset: number, itemsPerGallery: number): Promise<{ galleries: RawGallery[]; total: number }> {
136
+ const res = await api.call("GET", `${ONE_APP_GALLERIES_URL}?itemsPerGallery=${itemsPerGallery}&offset=${offset}&limit=${PAGE_SIZE}&withHidden=false&useNew=true`);
90
137
  const body = (res as { data?: unknown } | null)?.data ?? res;
91
138
  const { galleries, totalGalleriesCount } = (body ?? {}) as { galleries?: unknown; totalGalleriesCount?: unknown };
92
139
  if (!Array.isArray(galleries) || typeof totalGalleriesCount !== "number") throw new Error("Malformed One App galleries response");
@@ -94,12 +141,12 @@ async function readPage(api: WixApi, offset: number): Promise<{ galleries: RawGa
94
141
  }
95
142
 
96
143
  /** The first `limit` visible galleries, page by page, and whether there are more. A page can hold fewer than `PAGE_SIZE` visible galleries, so paging goes by the offset and the total. */
97
- async function readGalleries(api: WixApi, limit: number): Promise<{ galleries: RawGallery[]; more: boolean }> {
144
+ async function readGalleries(api: WixApi, limit: number, itemsPerGallery: number): Promise<{ galleries: RawGallery[]; more: boolean }> {
98
145
  const galleries: RawGallery[] = [];
99
146
  let offset = 0, total = Infinity;
100
147
  // One more than the section shows, so "more" is known without a second read.
101
148
  while (galleries.length <= limit && offset < total && offset < MAX_SCANNED) {
102
- const page = await readPage(api, offset);
149
+ const page = await readPage(api, offset, itemsPerGallery);
103
150
  galleries.push(...page.galleries.filter(visible));
104
151
  total = page.total;
105
152
  offset += PAGE_SIZE;
@@ -108,10 +155,11 @@ async function readGalleries(api: WixApi, limit: number): Promise<{ galleries: R
108
155
  }
109
156
 
110
157
  export function registerGalleriesSection(serviceName: string, options: GalleriesSectionOptions = {}) {
111
- const limit = Math.min(Math.max(Math.floor(options.limit ?? DEFAULT_LIMIT), 1), MAX_GALLERIES);
158
+ const collage = options.collage === true;
159
+ const limit = collage ? 1 : Math.min(Math.max(Math.floor(options.limit ?? DEFAULT_LIMIT), 1), MAX_GALLERIES);
112
160
  const showName = options.showName !== false;
113
- const view = (status: GalleriesSectionState["status"], rows: GalleryRow[], more: boolean): GalleriesSectionState => ({
114
- status, rows,
161
+ const view = (status: GalleriesSectionState["status"], rows: GalleryRow[], more: boolean, tiles: { big: CollageTile[]; small: CollageTile[] } = { big: [], small: [] }): GalleriesSectionState => ({
162
+ status, rows, bigTile: tiles.big, smallTiles: tiles.small, noCollage: !tiles.big.length,
115
163
  emptyText: status === "ready" && !rows.length ? copyParam("galleries.sectionEmptyText", "No galleries yet.") : "",
116
164
  notLoading: status !== "loading", notErrored: status !== "error",
117
165
  noRows: !rows.length, noEmpty: !(status === "ready" && !rows.length),
@@ -127,13 +175,13 @@ export function registerGalleriesSection(serviceName: string, options: Galleries
127
175
  if (!(await memberAccess()).signedIn) return view("ready", [], false);
128
176
  const api = (globalThis as { himalaya?: { wixApi?: WixApi } }).himalaya?.wixApi;
129
177
  if (!api) throw new Error("Wix bridge unavailable");
130
- const { galleries, more } = await readGalleries(api, limit).catch((oneAppError) => {
178
+ const { galleries, more } = await readGalleries(api, limit, collage ? COLLAGE_TILES : 1).catch((oneAppError) => {
131
179
  // As in the source, a list that cannot be read is its "no galleries" state (and it is never replaced by the public list: that one cannot tell a hidden gallery).
132
180
  console.warn("galleries_section: the One App galleries service could not be read", oneAppError);
133
181
  return { galleries: [] as RawGallery[], more: false };
134
182
  });
135
183
  const rows = galleries.slice(0, limit).map((gallery, index) => rowOf(gallery, index, showName));
136
- return view("ready", rows, more);
184
+ return view("ready", rows, more, collage && rows[0] && galleries[0] ? collageOf(galleries[0], rows[0]) : undefined);
137
185
  } catch (error) {
138
186
  console.warn("galleries_section: the galleries could not be read", error);
139
187
  return view("error", [], false);
@@ -87,9 +87,22 @@ function profileFromData(data: WixMyData, fallbackEmail = ""): AccountProfile {
87
87
 
88
88
  /** The signed-in site member's name and photo from their member record, or undefined when it
89
89
  * cannot be read or names nobody (the caller then shows the email). */
90
+ /** The host refused a read because the signed-in principal changed while it was in flight. Right
91
+ * after a sign-in on Android, the account screen's first read races the session switch this way. */
92
+ const PRINCIPAL_CHANGED = /PRINCIPAL_CHANGED/;
93
+
90
94
  async function siteMemberProfile(email: string): Promise<AccountProfile | undefined> {
91
95
  try {
92
- const member = (await getMyMember({ fieldsets: ["FULL"] }))?.member;
96
+ const read = () => getMyMember({ fieldsets: ["FULL"] });
97
+ // Asked again once, as the member who is signed in now; otherwise a fresh sign-in shows the
98
+ // member's email where their name belongs until the next refresh. Only for the same member:
99
+ // the name must never come from another account than `email`.
100
+ const member = (await read().catch(async (error: unknown) => {
101
+ if (!PRINCIPAL_CHANGED.test(String((error as { message?: unknown })?.message ?? error))) throw error;
102
+ const now = await memberIdentity();
103
+ if (!now.signedIn || (email && now.email !== email)) throw error;
104
+ return read();
105
+ }))?.member;
93
106
  const name = [member?.contact?.firstName, member?.contact?.lastName].map((part) => (part ?? "").trim()).filter(Boolean).join(" ")
94
107
  || (member?.profile?.nickname ?? "").trim();
95
108
  if (!name) return undefined;