@wix/himalaya-cli 0.1851.0 → 0.1853.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 (510) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +13 -3
  3. package/dist/browser-plane/assets.json +5 -5
  4. package/dist/browser-plane/preview-deferred/{166f7ee733ea8d0fe7bba8b796232efd4f5413e22af4a8aeee20cae1069b2fd6.bin → fb500748f6c4768468f2e7f985aa67c38633077c7a98caaa6b500c7b00eea8e9.bin} +1 -1
  5. package/dist/browser-plane/sw.js +7 -7
  6. package/dist/cli.mjs +10136 -9601
  7. package/dist/preview-assets.generated.bin +0 -0
  8. package/guides/component-index.md +1 -1
  9. package/guides/component-reference.json +2 -2
  10. package/guides/component-reference.md +8 -1
  11. package/guides/designing-himi-screens.md +5 -1
  12. package/guides/himi-json-output.md +13 -3
  13. package/guides/one-app-section-mappings.md +1 -1
  14. package/guides/one-app-to-himi-app.md +60 -10
  15. package/guides/sdk-reference.json +2 -2
  16. package/package.json +2 -2
  17. package/template-icons/bare-fashion.png +0 -0
  18. package/templates/bare-fashion/README.md +52 -0
  19. package/templates/bare-fashion/config.ts +474 -0
  20. package/templates/bare-fashion/dev/index.ts +16526 -0
  21. package/templates/bare-fashion/himalaya.content.json +70 -0
  22. package/templates/bare-fashion/himalaya.template.json +18 -0
  23. package/templates/bare-fashion/icon.png +0 -0
  24. package/templates/bare-fashion/platforms.json +3 -0
  25. package/templates/bare-fashion/tier5-src/_shared/app-locale.ts +70 -0
  26. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-address-book.ts +116 -0
  27. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-address-countries.ts +261 -0
  28. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-bag-count.ts +24 -0
  29. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-categories.ts +48 -0
  30. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-facets.ts +265 -0
  31. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-load-error.ts +38 -0
  32. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-product-card.ts +136 -0
  33. package/templates/bare-fashion/tier5-src/_shared/bare-fashion-store-options.ts +129 -0
  34. package/templates/bare-fashion/tier5-src/_shared/branded-lite-hosted.ts +282 -0
  35. package/templates/bare-fashion/tier5-src/_shared/collection-contract.ts +228 -0
  36. package/templates/bare-fashion/tier5-src/_shared/collection-query.ts +201 -0
  37. package/templates/bare-fashion/tier5-src/_shared/collection-service.ts +429 -0
  38. package/templates/bare-fashion/tier5-src/_shared/engine-intl.ts +529 -0
  39. package/templates/bare-fashion/tier5-src/_shared/himi-account.ts +209 -0
  40. package/templates/bare-fashion/tier5-src/_shared/himi-copy.ts +123 -0
  41. package/templates/bare-fashion/tier5-src/_shared/himi-layouts.ts +142 -0
  42. package/templates/bare-fashion/tier5-src/_shared/himi-store-categories.ts +108 -0
  43. package/templates/bare-fashion/tier5-src/_shared/himi-store-saved.ts +57 -0
  44. package/templates/bare-fashion/tier5-src/_shared/himi-store.ts +7 -0
  45. package/templates/bare-fashion/tier5-src/_shared/himi-text.ts +24 -0
  46. package/templates/bare-fashion/tier5-src/_shared/hosted-checkout.ts +70 -0
  47. package/templates/bare-fashion/tier5-src/_shared/live-session.ts +172 -0
  48. package/templates/bare-fashion/tier5-src/_shared/local-preferences.ts +38 -0
  49. package/templates/bare-fashion/tier5-src/_shared/member-access.ts +63 -0
  50. package/templates/bare-fashion/tier5-src/_shared/member-avatar.ts +76 -0
  51. package/templates/bare-fashion/tier5-src/_shared/member-orders.ts +8 -0
  52. package/templates/bare-fashion/tier5-src/_shared/online-actions.ts +76 -0
  53. package/templates/bare-fashion/tier5-src/_shared/owner-load-error.ts +348 -0
  54. package/templates/bare-fashion/tier5-src/himi-bare-fashion-account/index.ts +127 -0
  55. package/templates/bare-fashion/tier5-src/himi-bare-fashion-address-form/index.ts +367 -0
  56. package/templates/bare-fashion/tier5-src/himi-bare-fashion-addresses/index.ts +202 -0
  57. package/templates/bare-fashion/tier5-src/himi-bare-fashion-appearance/index.ts +73 -0
  58. package/templates/bare-fashion/tier5-src/himi-bare-fashion-cart/index.ts +540 -0
  59. package/templates/bare-fashion/tier5-src/himi-bare-fashion-collection/index.ts +111 -0
  60. package/templates/bare-fashion/tier5-src/himi-bare-fashion-home/index.ts +241 -0
  61. package/templates/bare-fashion/tier5-src/himi-bare-fashion-nav/index.ts +56 -0
  62. package/templates/bare-fashion/tier5-src/himi-bare-fashion-order/index.ts +437 -0
  63. package/templates/bare-fashion/tier5-src/himi-bare-fashion-product/index.ts +650 -0
  64. package/templates/bare-fashion/tier5-src/himi-bare-fashion-products/index.ts +142 -0
  65. package/templates/bare-fashion/tier5-src/himi-bare-fashion-saved/index.ts +45 -0
  66. package/templates/bare-fashion/tier5-src/himi-bare-fashion-search/index.ts +199 -0
  67. package/templates/bare-fashion/tier5-src/himi-bare-fashion-shop/index.ts +79 -0
  68. package/templates/bare-fashion/tier5-src/himi-bare-fashion-sign-in/index.ts +269 -0
  69. package/templates/bare-fashion/tier5-src/himi-bare-fashion-wallet/index.ts +224 -0
  70. package/templates/bare-fashion/tier5-src/himi-branded-lite-info/index.ts +209 -0
  71. package/templates/bare-fashion/tier5-src/himi-branded-lite-orders/index.ts +327 -0
  72. package/templates/bare-fashion/tier5-src/wix-spaces-collections/index.ts +48 -0
  73. package/templates/bare-fashion/tier5-src/wix-spaces-delete-account/index.ts +59 -0
  74. package/templates/bare-fashion/tier5-src/wix-spaces-view-profile/index.ts +119 -0
  75. package/templates/bare-fashion/tokens.json +348 -0
  76. package/templates/beauty-salon/dev/index.ts +223 -0
  77. package/templates/beauty-salon/l10n/ar.json +6 -0
  78. package/templates/beauty-salon/l10n/cs.json +6 -0
  79. package/templates/beauty-salon/l10n/da.json +6 -0
  80. package/templates/beauty-salon/l10n/de.json +6 -0
  81. package/templates/beauty-salon/l10n/el.json +6 -0
  82. package/templates/beauty-salon/l10n/en.json +9 -2
  83. package/templates/beauty-salon/l10n/es.json +6 -0
  84. package/templates/beauty-salon/l10n/fi.json +6 -0
  85. package/templates/beauty-salon/l10n/fr.json +6 -0
  86. package/templates/beauty-salon/l10n/he.json +5 -0
  87. package/templates/beauty-salon/l10n/hu.json +6 -0
  88. package/templates/beauty-salon/l10n/id.json +6 -0
  89. package/templates/beauty-salon/l10n/it.json +6 -0
  90. package/templates/beauty-salon/l10n/ja.json +6 -0
  91. package/templates/beauty-salon/l10n/ko.json +6 -0
  92. package/templates/beauty-salon/l10n/lt.json +6 -0
  93. package/templates/beauty-salon/l10n/nl.json +6 -0
  94. package/templates/beauty-salon/l10n/no.json +6 -0
  95. package/templates/beauty-salon/l10n/pl.json +6 -0
  96. package/templates/beauty-salon/l10n/pt.json +6 -0
  97. package/templates/beauty-salon/l10n/ru.json +6 -0
  98. package/templates/beauty-salon/l10n/sv.json +6 -0
  99. package/templates/beauty-salon/l10n/th.json +6 -0
  100. package/templates/beauty-salon/l10n/tr.json +6 -0
  101. package/templates/beauty-salon/l10n/uk.json +6 -0
  102. package/templates/beauty-salon/l10n/vi.json +6 -0
  103. package/templates/beauty-salon/l10n/zh.json +6 -0
  104. package/templates/beauty-salon/tier5-src/_shared/collection-query.ts +8 -0
  105. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +7 -1
  106. package/templates/beauty-salon/tier5-src/_shared/lifecycle.ts +15 -0
  107. package/templates/beauty-salon/tier5-src/_shared/nav-member-avatar.ts +92 -0
  108. package/templates/beauty-salon/tier5-src/himi-branded-lite-nav/index.ts +15 -6
  109. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +26 -1
  110. package/templates/beauty-salon-owner/tier5-src/_shared/collection-query.ts +8 -0
  111. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +7 -1
  112. package/templates/branded-lite/dev/index.ts +2167 -0
  113. package/templates/branded-lite/l10n/ar.json +6 -0
  114. package/templates/branded-lite/l10n/cs.json +6 -0
  115. package/templates/branded-lite/l10n/da.json +6 -0
  116. package/templates/branded-lite/l10n/de.json +6 -0
  117. package/templates/branded-lite/l10n/el.json +6 -0
  118. package/templates/branded-lite/l10n/en.json +12 -5
  119. package/templates/branded-lite/l10n/es.json +6 -0
  120. package/templates/branded-lite/l10n/fi.json +6 -0
  121. package/templates/branded-lite/l10n/fr.json +6 -0
  122. package/templates/branded-lite/l10n/he.json +5 -0
  123. package/templates/branded-lite/l10n/hu.json +6 -0
  124. package/templates/branded-lite/l10n/id.json +6 -0
  125. package/templates/branded-lite/l10n/it.json +6 -0
  126. package/templates/branded-lite/l10n/ja.json +6 -0
  127. package/templates/branded-lite/l10n/ko.json +6 -0
  128. package/templates/branded-lite/l10n/lt.json +6 -0
  129. package/templates/branded-lite/l10n/nl.json +6 -0
  130. package/templates/branded-lite/l10n/no.json +6 -0
  131. package/templates/branded-lite/l10n/pl.json +6 -0
  132. package/templates/branded-lite/l10n/pt.json +6 -0
  133. package/templates/branded-lite/l10n/ru.json +6 -0
  134. package/templates/branded-lite/l10n/sv.json +6 -0
  135. package/templates/branded-lite/l10n/th.json +6 -0
  136. package/templates/branded-lite/l10n/tr.json +6 -0
  137. package/templates/branded-lite/l10n/uk.json +6 -0
  138. package/templates/branded-lite/l10n/vi.json +6 -0
  139. package/templates/branded-lite/l10n/zh.json +6 -0
  140. package/templates/branded-lite/recipes/upcoming-bookings.json +118 -6
  141. package/templates/branded-lite/tier5-src/_shared/access-gates.ts +0 -13
  142. package/templates/branded-lite/tier5-src/_shared/collection-query-legacy.ts +7 -0
  143. package/templates/branded-lite/tier5-src/_shared/collection-query.ts +7 -0
  144. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +7 -1
  145. package/templates/branded-lite/tier5-src/_shared/events-inline-options.ts +55 -3
  146. package/templates/branded-lite/tier5-src/_shared/events-inline.ts +5 -3
  147. package/templates/branded-lite/tier5-src/_shared/guest-sign-in.ts +36 -0
  148. package/templates/branded-lite/tier5-src/_shared/lifecycle.ts +15 -0
  149. package/templates/branded-lite/tier5-src/_shared/nav-member-avatar.ts +92 -0
  150. package/templates/branded-lite/tier5-src/_shared/upcoming-bookings-section.ts +15 -4
  151. package/templates/branded-lite/tier5-src/himi-branded-lite-access-nav/index.ts +14 -9
  152. package/templates/branded-lite/tier5-src/himi-branded-lite-inbox/index.ts +6 -1
  153. package/templates/branded-lite/tier5-src/himi-branded-lite-nav/index.ts +15 -6
  154. package/templates/branded-lite/tier5-src/himi-branded-lite-notifications/index.ts +8 -1
  155. package/templates/branded-lite/tier5-src/himi-events-list/index.ts +17 -0
  156. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +26 -1
  157. package/templates/brandy/tier5-src/_shared/collection-query-legacy.ts +7 -0
  158. package/templates/brandy/tier5-src/_shared/collection-query.ts +7 -0
  159. package/templates/brandy/tier5-src/_shared/collection-service.ts +7 -1
  160. package/templates/brandy/tier5-src/_shared/guest-sign-in.ts +36 -0
  161. package/templates/brandy/tier5-src/himi-branded-lite-inbox/index.ts +6 -1
  162. package/templates/brandy/tier5-src/himi-branded-lite-notifications/index.ts +8 -1
  163. package/templates/brandy/tier5-src/himi-store-account/index.ts +26 -1
  164. package/templates/community-club/dev/index.ts +223 -0
  165. package/templates/community-club/l10n/ar.json +6 -0
  166. package/templates/community-club/l10n/cs.json +6 -0
  167. package/templates/community-club/l10n/da.json +6 -0
  168. package/templates/community-club/l10n/de.json +6 -0
  169. package/templates/community-club/l10n/el.json +6 -0
  170. package/templates/community-club/l10n/en.json +9 -2
  171. package/templates/community-club/l10n/es.json +6 -0
  172. package/templates/community-club/l10n/fi.json +6 -0
  173. package/templates/community-club/l10n/fr.json +6 -0
  174. package/templates/community-club/l10n/he.json +5 -0
  175. package/templates/community-club/l10n/hu.json +6 -0
  176. package/templates/community-club/l10n/id.json +6 -0
  177. package/templates/community-club/l10n/it.json +6 -0
  178. package/templates/community-club/l10n/ja.json +6 -0
  179. package/templates/community-club/l10n/ko.json +6 -0
  180. package/templates/community-club/l10n/lt.json +6 -0
  181. package/templates/community-club/l10n/nl.json +6 -0
  182. package/templates/community-club/l10n/no.json +6 -0
  183. package/templates/community-club/l10n/pl.json +6 -0
  184. package/templates/community-club/l10n/pt.json +6 -0
  185. package/templates/community-club/l10n/ru.json +6 -0
  186. package/templates/community-club/l10n/sv.json +6 -0
  187. package/templates/community-club/l10n/th.json +6 -0
  188. package/templates/community-club/l10n/tr.json +6 -0
  189. package/templates/community-club/l10n/uk.json +6 -0
  190. package/templates/community-club/l10n/vi.json +6 -0
  191. package/templates/community-club/l10n/zh.json +6 -0
  192. package/templates/community-club/tier5-src/_shared/collection-query.ts +8 -0
  193. package/templates/community-club/tier5-src/_shared/collection-service.ts +7 -1
  194. package/templates/community-club/tier5-src/_shared/events-inline-options.ts +77 -0
  195. package/templates/community-club/tier5-src/himi-events-list/index.ts +17 -0
  196. package/templates/community-club/tier5-src/himi-store-account/index.ts +26 -1
  197. package/templates/community-club-owner/tier5-src/_shared/collection-query.ts +8 -0
  198. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +7 -1
  199. package/templates/conference/tier5-src/_shared/collection-query.ts +8 -0
  200. package/templates/conference/tier5-src/_shared/collection-service.ts +7 -1
  201. package/templates/conference/tier5-src/_shared/events-inline-options.ts +77 -0
  202. package/templates/conference/tier5-src/himi-events-list/index.ts +17 -0
  203. package/templates/conference/tier5-src/himi-store-account/index.ts +26 -1
  204. package/templates/events-meetups/dev/index.ts +142 -0
  205. package/templates/events-meetups/l10n/ar.json +6 -0
  206. package/templates/events-meetups/l10n/cs.json +6 -0
  207. package/templates/events-meetups/l10n/da.json +6 -0
  208. package/templates/events-meetups/l10n/de.json +6 -0
  209. package/templates/events-meetups/l10n/el.json +6 -0
  210. package/templates/events-meetups/l10n/en.json +8 -1
  211. package/templates/events-meetups/l10n/es.json +6 -0
  212. package/templates/events-meetups/l10n/fi.json +6 -0
  213. package/templates/events-meetups/l10n/fr.json +6 -0
  214. package/templates/events-meetups/l10n/he.json +5 -0
  215. package/templates/events-meetups/l10n/hu.json +6 -0
  216. package/templates/events-meetups/l10n/id.json +6 -0
  217. package/templates/events-meetups/l10n/it.json +6 -0
  218. package/templates/events-meetups/l10n/ja.json +6 -0
  219. package/templates/events-meetups/l10n/ko.json +6 -0
  220. package/templates/events-meetups/l10n/lt.json +6 -0
  221. package/templates/events-meetups/l10n/nl.json +6 -0
  222. package/templates/events-meetups/l10n/no.json +6 -0
  223. package/templates/events-meetups/l10n/pl.json +6 -0
  224. package/templates/events-meetups/l10n/pt.json +6 -0
  225. package/templates/events-meetups/l10n/ru.json +6 -0
  226. package/templates/events-meetups/l10n/sv.json +6 -0
  227. package/templates/events-meetups/l10n/th.json +6 -0
  228. package/templates/events-meetups/l10n/tr.json +6 -0
  229. package/templates/events-meetups/l10n/uk.json +6 -0
  230. package/templates/events-meetups/l10n/vi.json +6 -0
  231. package/templates/events-meetups/l10n/zh.json +6 -0
  232. package/templates/events-meetups/tier5-src/_shared/collection-query.ts +8 -0
  233. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +7 -1
  234. package/templates/events-meetups/tier5-src/_shared/events-inline-options.ts +77 -0
  235. package/templates/events-meetups/tier5-src/himi-events-list/index.ts +17 -0
  236. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +26 -1
  237. package/templates/events-meetups-owner/tier5-src/_shared/collection-query.ts +8 -0
  238. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +7 -1
  239. package/templates/fitness-gym/tier5-src/_shared/collection-query.ts +8 -0
  240. package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +7 -1
  241. package/templates/fitness-gym/tier5-src/_shared/guest-sign-in.ts +36 -0
  242. package/templates/fitness-gym/tier5-src/himi-branded-lite-notifications/index.ts +8 -1
  243. package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +26 -1
  244. package/templates/gym-fitness/dev/index.ts +385 -0
  245. package/templates/gym-fitness/l10n/ar.json +6 -0
  246. package/templates/gym-fitness/l10n/cs.json +6 -0
  247. package/templates/gym-fitness/l10n/da.json +6 -0
  248. package/templates/gym-fitness/l10n/de.json +6 -0
  249. package/templates/gym-fitness/l10n/el.json +6 -0
  250. package/templates/gym-fitness/l10n/en.json +9 -2
  251. package/templates/gym-fitness/l10n/es.json +6 -0
  252. package/templates/gym-fitness/l10n/fi.json +6 -0
  253. package/templates/gym-fitness/l10n/fr.json +6 -0
  254. package/templates/gym-fitness/l10n/he.json +5 -0
  255. package/templates/gym-fitness/l10n/hu.json +6 -0
  256. package/templates/gym-fitness/l10n/id.json +6 -0
  257. package/templates/gym-fitness/l10n/it.json +6 -0
  258. package/templates/gym-fitness/l10n/ja.json +6 -0
  259. package/templates/gym-fitness/l10n/ko.json +6 -0
  260. package/templates/gym-fitness/l10n/lt.json +6 -0
  261. package/templates/gym-fitness/l10n/nl.json +6 -0
  262. package/templates/gym-fitness/l10n/no.json +6 -0
  263. package/templates/gym-fitness/l10n/pl.json +6 -0
  264. package/templates/gym-fitness/l10n/pt.json +6 -0
  265. package/templates/gym-fitness/l10n/ru.json +6 -0
  266. package/templates/gym-fitness/l10n/sv.json +6 -0
  267. package/templates/gym-fitness/l10n/th.json +6 -0
  268. package/templates/gym-fitness/l10n/tr.json +6 -0
  269. package/templates/gym-fitness/l10n/uk.json +6 -0
  270. package/templates/gym-fitness/l10n/vi.json +6 -0
  271. package/templates/gym-fitness/l10n/zh.json +6 -0
  272. package/templates/gym-fitness/tier5-src/_shared/collection-query.ts +8 -0
  273. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +7 -1
  274. package/templates/gym-fitness/tier5-src/_shared/events-inline-options.ts +77 -0
  275. package/templates/gym-fitness/tier5-src/_shared/lifecycle.ts +15 -0
  276. package/templates/gym-fitness/tier5-src/_shared/nav-member-avatar.ts +92 -0
  277. package/templates/gym-fitness/tier5-src/himi-branded-lite-nav/index.ts +15 -6
  278. package/templates/gym-fitness/tier5-src/himi-events-list/index.ts +17 -0
  279. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +26 -1
  280. package/templates/gym-fitness-owner/tier5-src/_shared/collection-query.ts +8 -0
  281. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +7 -1
  282. package/templates/medical-services/tier5-src/_shared/collection-query.ts +8 -0
  283. package/templates/medical-services/tier5-src/_shared/collection-service.ts +7 -1
  284. package/templates/medical-services/tier5-src/_shared/guest-sign-in.ts +36 -0
  285. package/templates/medical-services/tier5-src/himi-branded-lite-notifications/index.ts +8 -1
  286. package/templates/medical-services/tier5-src/himi-store-account/index.ts +26 -1
  287. package/templates/nonprofit-cause/dev/index.ts +223 -0
  288. package/templates/nonprofit-cause/l10n/ar.json +6 -0
  289. package/templates/nonprofit-cause/l10n/cs.json +6 -0
  290. package/templates/nonprofit-cause/l10n/da.json +6 -0
  291. package/templates/nonprofit-cause/l10n/de.json +6 -0
  292. package/templates/nonprofit-cause/l10n/el.json +6 -0
  293. package/templates/nonprofit-cause/l10n/en.json +8 -1
  294. package/templates/nonprofit-cause/l10n/es.json +6 -0
  295. package/templates/nonprofit-cause/l10n/fi.json +6 -0
  296. package/templates/nonprofit-cause/l10n/fr.json +6 -0
  297. package/templates/nonprofit-cause/l10n/he.json +5 -0
  298. package/templates/nonprofit-cause/l10n/hu.json +6 -0
  299. package/templates/nonprofit-cause/l10n/id.json +6 -0
  300. package/templates/nonprofit-cause/l10n/it.json +6 -0
  301. package/templates/nonprofit-cause/l10n/ja.json +6 -0
  302. package/templates/nonprofit-cause/l10n/ko.json +6 -0
  303. package/templates/nonprofit-cause/l10n/lt.json +6 -0
  304. package/templates/nonprofit-cause/l10n/nl.json +6 -0
  305. package/templates/nonprofit-cause/l10n/no.json +6 -0
  306. package/templates/nonprofit-cause/l10n/pl.json +6 -0
  307. package/templates/nonprofit-cause/l10n/pt.json +6 -0
  308. package/templates/nonprofit-cause/l10n/ru.json +6 -0
  309. package/templates/nonprofit-cause/l10n/sv.json +6 -0
  310. package/templates/nonprofit-cause/l10n/th.json +6 -0
  311. package/templates/nonprofit-cause/l10n/tr.json +6 -0
  312. package/templates/nonprofit-cause/l10n/uk.json +6 -0
  313. package/templates/nonprofit-cause/l10n/vi.json +6 -0
  314. package/templates/nonprofit-cause/l10n/zh.json +6 -0
  315. package/templates/nonprofit-cause/tier5-src/_shared/collection-query.ts +8 -0
  316. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +7 -1
  317. package/templates/nonprofit-cause/tier5-src/_shared/events-inline-options.ts +77 -0
  318. package/templates/nonprofit-cause/tier5-src/himi-events-list/index.ts +17 -0
  319. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +26 -1
  320. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-query.ts +8 -0
  321. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +7 -1
  322. package/templates/owner-lite/tier5-src/_shared/collection-query.ts +8 -0
  323. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +7 -1
  324. package/templates/personal-fitness-trainer/tier5-src/_shared/collection-query.ts +8 -0
  325. package/templates/personal-fitness-trainer/tier5-src/_shared/collection-service.ts +7 -1
  326. package/templates/personal-fitness-trainer/tier5-src/himi-store-account/index.ts +26 -1
  327. package/templates/podcast-creator/dev/index.ts +223 -0
  328. package/templates/podcast-creator/l10n/ar.json +6 -0
  329. package/templates/podcast-creator/l10n/cs.json +6 -0
  330. package/templates/podcast-creator/l10n/da.json +6 -0
  331. package/templates/podcast-creator/l10n/de.json +6 -0
  332. package/templates/podcast-creator/l10n/el.json +6 -0
  333. package/templates/podcast-creator/l10n/en.json +8 -1
  334. package/templates/podcast-creator/l10n/es.json +6 -0
  335. package/templates/podcast-creator/l10n/fi.json +6 -0
  336. package/templates/podcast-creator/l10n/fr.json +6 -0
  337. package/templates/podcast-creator/l10n/he.json +5 -0
  338. package/templates/podcast-creator/l10n/hu.json +6 -0
  339. package/templates/podcast-creator/l10n/id.json +6 -0
  340. package/templates/podcast-creator/l10n/it.json +6 -0
  341. package/templates/podcast-creator/l10n/ja.json +6 -0
  342. package/templates/podcast-creator/l10n/ko.json +6 -0
  343. package/templates/podcast-creator/l10n/lt.json +6 -0
  344. package/templates/podcast-creator/l10n/nl.json +6 -0
  345. package/templates/podcast-creator/l10n/no.json +6 -0
  346. package/templates/podcast-creator/l10n/pl.json +6 -0
  347. package/templates/podcast-creator/l10n/pt.json +6 -0
  348. package/templates/podcast-creator/l10n/ru.json +6 -0
  349. package/templates/podcast-creator/l10n/sv.json +6 -0
  350. package/templates/podcast-creator/l10n/th.json +6 -0
  351. package/templates/podcast-creator/l10n/tr.json +6 -0
  352. package/templates/podcast-creator/l10n/uk.json +6 -0
  353. package/templates/podcast-creator/l10n/vi.json +6 -0
  354. package/templates/podcast-creator/l10n/zh.json +6 -0
  355. package/templates/podcast-creator/tier5-src/_shared/collection-query.ts +8 -0
  356. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +7 -1
  357. package/templates/podcast-creator/tier5-src/_shared/events-inline-options.ts +77 -0
  358. package/templates/podcast-creator/tier5-src/himi-events-list/index.ts +17 -0
  359. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +26 -1
  360. package/templates/podcast-creator-owner/tier5-src/_shared/collection-query.ts +8 -0
  361. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +7 -1
  362. package/templates/portfolio-creative/dev/index.ts +142 -0
  363. package/templates/portfolio-creative/l10n/ar.json +6 -0
  364. package/templates/portfolio-creative/l10n/cs.json +6 -0
  365. package/templates/portfolio-creative/l10n/da.json +6 -0
  366. package/templates/portfolio-creative/l10n/de.json +6 -0
  367. package/templates/portfolio-creative/l10n/el.json +6 -0
  368. package/templates/portfolio-creative/l10n/en.json +8 -1
  369. package/templates/portfolio-creative/l10n/es.json +6 -0
  370. package/templates/portfolio-creative/l10n/fi.json +6 -0
  371. package/templates/portfolio-creative/l10n/fr.json +6 -0
  372. package/templates/portfolio-creative/l10n/he.json +5 -0
  373. package/templates/portfolio-creative/l10n/hu.json +6 -0
  374. package/templates/portfolio-creative/l10n/id.json +6 -0
  375. package/templates/portfolio-creative/l10n/it.json +6 -0
  376. package/templates/portfolio-creative/l10n/ja.json +6 -0
  377. package/templates/portfolio-creative/l10n/ko.json +6 -0
  378. package/templates/portfolio-creative/l10n/lt.json +6 -0
  379. package/templates/portfolio-creative/l10n/nl.json +6 -0
  380. package/templates/portfolio-creative/l10n/no.json +6 -0
  381. package/templates/portfolio-creative/l10n/pl.json +6 -0
  382. package/templates/portfolio-creative/l10n/pt.json +6 -0
  383. package/templates/portfolio-creative/l10n/ru.json +6 -0
  384. package/templates/portfolio-creative/l10n/sv.json +6 -0
  385. package/templates/portfolio-creative/l10n/th.json +6 -0
  386. package/templates/portfolio-creative/l10n/tr.json +6 -0
  387. package/templates/portfolio-creative/l10n/uk.json +6 -0
  388. package/templates/portfolio-creative/l10n/vi.json +6 -0
  389. package/templates/portfolio-creative/l10n/zh.json +6 -0
  390. package/templates/portfolio-creative/tier5-src/_shared/collection-query.ts +8 -0
  391. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +7 -1
  392. package/templates/portfolio-creative/tier5-src/_shared/events-inline-options.ts +77 -0
  393. package/templates/portfolio-creative/tier5-src/himi-events-list/index.ts +17 -0
  394. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +26 -1
  395. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-query.ts +8 -0
  396. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +7 -1
  397. package/templates/restaurant/dev/index.ts +142 -0
  398. package/templates/restaurant/l10n/ar.json +6 -0
  399. package/templates/restaurant/l10n/cs.json +6 -0
  400. package/templates/restaurant/l10n/da.json +6 -0
  401. package/templates/restaurant/l10n/de.json +6 -0
  402. package/templates/restaurant/l10n/el.json +6 -0
  403. package/templates/restaurant/l10n/en.json +9 -2
  404. package/templates/restaurant/l10n/es.json +6 -0
  405. package/templates/restaurant/l10n/fi.json +6 -0
  406. package/templates/restaurant/l10n/fr.json +6 -0
  407. package/templates/restaurant/l10n/he.json +5 -0
  408. package/templates/restaurant/l10n/hu.json +6 -0
  409. package/templates/restaurant/l10n/id.json +6 -0
  410. package/templates/restaurant/l10n/it.json +6 -0
  411. package/templates/restaurant/l10n/ja.json +6 -0
  412. package/templates/restaurant/l10n/ko.json +6 -0
  413. package/templates/restaurant/l10n/lt.json +6 -0
  414. package/templates/restaurant/l10n/nl.json +6 -0
  415. package/templates/restaurant/l10n/no.json +6 -0
  416. package/templates/restaurant/l10n/pl.json +6 -0
  417. package/templates/restaurant/l10n/pt.json +6 -0
  418. package/templates/restaurant/l10n/ru.json +6 -0
  419. package/templates/restaurant/l10n/sv.json +6 -0
  420. package/templates/restaurant/l10n/th.json +6 -0
  421. package/templates/restaurant/l10n/tr.json +6 -0
  422. package/templates/restaurant/l10n/uk.json +6 -0
  423. package/templates/restaurant/l10n/vi.json +6 -0
  424. package/templates/restaurant/l10n/zh.json +6 -0
  425. package/templates/restaurant/tier5-src/_shared/collection-query.ts +8 -0
  426. package/templates/restaurant/tier5-src/_shared/collection-service.ts +7 -1
  427. package/templates/restaurant/tier5-src/_shared/events-inline-options.ts +77 -0
  428. package/templates/restaurant/tier5-src/himi-events-list/index.ts +17 -0
  429. package/templates/restaurant/tier5-src/himi-store-account/index.ts +26 -1
  430. package/templates/restaurant-owner/tier5-src/_shared/collection-query.ts +8 -0
  431. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +7 -1
  432. package/templates/retail-store/dev/index.ts +142 -0
  433. package/templates/retail-store/l10n/ar.json +6 -0
  434. package/templates/retail-store/l10n/cs.json +6 -0
  435. package/templates/retail-store/l10n/da.json +6 -0
  436. package/templates/retail-store/l10n/de.json +6 -0
  437. package/templates/retail-store/l10n/el.json +6 -0
  438. package/templates/retail-store/l10n/en.json +8 -1
  439. package/templates/retail-store/l10n/es.json +6 -0
  440. package/templates/retail-store/l10n/fi.json +6 -0
  441. package/templates/retail-store/l10n/fr.json +6 -0
  442. package/templates/retail-store/l10n/he.json +5 -0
  443. package/templates/retail-store/l10n/hu.json +6 -0
  444. package/templates/retail-store/l10n/id.json +6 -0
  445. package/templates/retail-store/l10n/it.json +6 -0
  446. package/templates/retail-store/l10n/ja.json +6 -0
  447. package/templates/retail-store/l10n/ko.json +6 -0
  448. package/templates/retail-store/l10n/lt.json +6 -0
  449. package/templates/retail-store/l10n/nl.json +6 -0
  450. package/templates/retail-store/l10n/no.json +6 -0
  451. package/templates/retail-store/l10n/pl.json +6 -0
  452. package/templates/retail-store/l10n/pt.json +6 -0
  453. package/templates/retail-store/l10n/ru.json +6 -0
  454. package/templates/retail-store/l10n/sv.json +6 -0
  455. package/templates/retail-store/l10n/th.json +6 -0
  456. package/templates/retail-store/l10n/tr.json +6 -0
  457. package/templates/retail-store/l10n/uk.json +6 -0
  458. package/templates/retail-store/l10n/vi.json +6 -0
  459. package/templates/retail-store/l10n/zh.json +6 -0
  460. package/templates/retail-store/tier5-src/_shared/collection-query-legacy.ts +7 -0
  461. package/templates/retail-store/tier5-src/_shared/collection-query.ts +7 -0
  462. package/templates/retail-store/tier5-src/_shared/collection-service.ts +7 -1
  463. package/templates/retail-store/tier5-src/himi-store-account/index.ts +26 -1
  464. package/templates/retail-store-owner/tier5-src/_shared/collection-query.ts +8 -0
  465. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +7 -1
  466. package/templates/salon-spa/tier5-src/_shared/collection-query.ts +8 -0
  467. package/templates/salon-spa/tier5-src/_shared/collection-service.ts +7 -1
  468. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +26 -1
  469. package/templates/wholesale-store/tier5-src/_shared/collection-query-legacy.ts +7 -0
  470. package/templates/wholesale-store/tier5-src/_shared/collection-query.ts +7 -0
  471. package/templates/wholesale-store/tier5-src/_shared/collection-service.ts +7 -1
  472. package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +26 -1
  473. package/templates/yoga-studio/dev/index.ts +304 -0
  474. package/templates/yoga-studio/l10n/ar.json +6 -0
  475. package/templates/yoga-studio/l10n/cs.json +6 -0
  476. package/templates/yoga-studio/l10n/da.json +6 -0
  477. package/templates/yoga-studio/l10n/de.json +6 -0
  478. package/templates/yoga-studio/l10n/el.json +6 -0
  479. package/templates/yoga-studio/l10n/en.json +10 -3
  480. package/templates/yoga-studio/l10n/es.json +6 -0
  481. package/templates/yoga-studio/l10n/fi.json +6 -0
  482. package/templates/yoga-studio/l10n/fr.json +6 -0
  483. package/templates/yoga-studio/l10n/he.json +5 -0
  484. package/templates/yoga-studio/l10n/hu.json +6 -0
  485. package/templates/yoga-studio/l10n/id.json +6 -0
  486. package/templates/yoga-studio/l10n/it.json +6 -0
  487. package/templates/yoga-studio/l10n/ja.json +6 -0
  488. package/templates/yoga-studio/l10n/ko.json +6 -0
  489. package/templates/yoga-studio/l10n/lt.json +6 -0
  490. package/templates/yoga-studio/l10n/nl.json +6 -0
  491. package/templates/yoga-studio/l10n/no.json +6 -0
  492. package/templates/yoga-studio/l10n/pl.json +6 -0
  493. package/templates/yoga-studio/l10n/pt.json +6 -0
  494. package/templates/yoga-studio/l10n/ru.json +6 -0
  495. package/templates/yoga-studio/l10n/sv.json +6 -0
  496. package/templates/yoga-studio/l10n/th.json +6 -0
  497. package/templates/yoga-studio/l10n/tr.json +6 -0
  498. package/templates/yoga-studio/l10n/uk.json +6 -0
  499. package/templates/yoga-studio/l10n/vi.json +6 -0
  500. package/templates/yoga-studio/l10n/zh.json +6 -0
  501. package/templates/yoga-studio/tier5-src/_shared/collection-query.ts +8 -0
  502. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +7 -1
  503. package/templates/yoga-studio/tier5-src/_shared/events-inline-options.ts +77 -0
  504. package/templates/yoga-studio/tier5-src/_shared/lifecycle.ts +15 -0
  505. package/templates/yoga-studio/tier5-src/_shared/nav-member-avatar.ts +92 -0
  506. package/templates/yoga-studio/tier5-src/himi-branded-lite-nav/index.ts +15 -6
  507. package/templates/yoga-studio/tier5-src/himi-events-list/index.ts +17 -0
  508. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +26 -1
  509. package/templates/yoga-studio-owner/tier5-src/_shared/collection-query.ts +8 -0
  510. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +7 -1
@@ -262,7 +262,20 @@ function settle(next: S, arg: unknown, latest = true): S {
262
262
  }
263
263
  // Account forwards only on an appear refresh: the boot `load()` has no params and its
264
264
  // navigation is dropped, so a forward there was lost and used up the one forward.
265
- return strField(arg, "signInScreen") ? forwardToSignIn(next) : next;
265
+ if (!strField(arg, "signInScreen")) return next;
266
+ const forwarded = forwardToSignIn(next);
267
+ return forwarded === next ? offerSignIn(next, arg) : forwarded;
268
+ }
269
+
270
+ /** Profile (appear param `signInOnAppear: "1"`, set by an app whose top bar leads with the profile avatar): a guest who opens it is
271
+ * offered the standalone sign-in as a sheet, once. The sheet closes by itself or by the guest: either way this screen is under it, so
272
+ * a guest who only closes it stays on the guest Profile. A reload that follows is not a second offer; a member resets it. */
273
+ let signInOffered = false;
274
+ function offerSignIn(next: S, arg: unknown): S {
275
+ if (next.isMember) { signInOffered = false; return next; }
276
+ if (strField(arg, "signInOnAppear") !== "1" || signInOffered || next.standalone) return next;
277
+ signInOffered = true;
278
+ return openSignIn(next, { mode: "signin" }, null);
266
279
  }
267
280
 
268
281
  // A tick reads only the session. The profile is read again only when the signed-in email
@@ -325,6 +338,9 @@ let pollIdentityRequested = false;
325
338
  // iOS can start the arg-less boot load after the appear refresh that asks for the row; the
326
339
  // newer boot probe must not land, or be kept, without it.
327
340
  let restorePurchasesRequested = false;
341
+ /** Profile's "Pages" group (appear param `showPages: "1"`): set on the screen's load by whoever knows the app's top bar
342
+ * leads with the profile avatar, so the drawer's pages stay reachable. Off, the group is hidden. */
343
+ let showPagesRequested = false;
328
344
  /** An app's sign-in form that carries the ended-session notice (appear param `sessionEndedNotice: "1"`).
329
345
  * Only that form gets the signed-out headline, whose copy only that app's pack translates, and the ended
330
346
  * session's address, which only its email field shows, so no form submits it unseen. */
@@ -342,6 +358,7 @@ function appearBase(): Partial<S> {
342
358
  standalone: standaloneRequested,
343
359
  pollIdentity: pollIdentityRequested,
344
360
  restorePurchases: restorePurchasesRequested,
361
+ showPages: showPagesRequested,
345
362
  // One `_poll` per state: Account polls identity and never shows the social block.
346
363
  ...(pollIdentityRequested ? { _poll: { ...IDENTITY_POLL } } : socialRetriesLeft > 0 || flowsRetriesLeft > 0 ? { _poll: { ...SOCIAL_POLL } } : {}),
347
364
  };
@@ -370,6 +387,7 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
370
387
  standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
371
388
  pollIdentityRequested ||= s.pollIdentity || strField(arg, "pollIdentity") === "1";
372
389
  restorePurchasesRequested ||= s.restorePurchases || strField(arg, "restorePurchases") === "1";
390
+ showPagesRequested ||= s.showPages || strField(arg, "showPages") === "1";
373
391
  sessionEndedNoticeRequested ||= strField(arg, "sessionEndedNotice") === "1";
374
392
  // The form opens on the mode its route asked for each time it appears, sign-in by
375
393
  // default: a pooled worker reopened with the same params must not open on the mode the
@@ -832,6 +850,10 @@ interface S extends IapRestoreFields {
832
850
  * `restorePurchases: "1"`). Only then does the worker reach the App Store layer, so a
833
851
  * descriptor that renders no such row need not declare `iap`. */
834
852
  restorePurchases: boolean;
853
+ /** Set once a descriptor asks for Profile's "Pages" group (appear param `showPages: "1"`). */
854
+ showPages: boolean;
855
+ /** Hides Profile's "Pages" group until then. */
856
+ hidePages: boolean;
835
857
  /** Top-bar cart badge, read only once a descriptor asks for it (appear param
836
858
  * `cartCount: "1"`), so an app with no store never reads a cart. A guest has a
837
859
  * visitor cart too, so this is read for members and guests alike. */
@@ -899,6 +921,7 @@ function derive(s: S): S {
899
921
  hideGuest: loading || !!s.isMember,
900
922
  hideMember: loading || !s.isMember,
901
923
  hideSessionEnded: loading || !!s.isMember || !s.sessionEnded,
924
+ hidePages: !s.showPages,
902
925
  password: "",
903
926
  busyMessage: s.authBusy ? translated("auth.feedback.busy") : "",
904
927
  isLoading: s.status === "loading",
@@ -1164,6 +1187,8 @@ const svc = defineService<S, {
1164
1187
  noMemberAddresses: true,
1165
1188
  noMemberWallet: true,
1166
1189
  restorePurchases: false,
1190
+ showPages: false,
1191
+ hidePages: true,
1167
1192
  cartCount: 0,
1168
1193
  greeting: "Hey, guest",
1169
1194
  greetingFirstName: "",
@@ -5,6 +5,10 @@ export interface CollectionQuery {
5
5
  filter: string;
6
6
  sort: 'default' | 'az' | 'za';
7
7
  savedIds: string[];
8
+ /** What the list is limited to beyond the controls above (a domain's own selection, e.g. the events of some categories), as one
9
+ * canonical string. Part of the criteria, so a list opened on another selection never shows or restores this one's rows. Absent
10
+ * when there is none: criteria without it keep the key they always had. */
11
+ scope?: string;
8
12
  }
9
13
  export interface CollectionPage<Row> {
10
14
  items: Row[];
@@ -39,11 +43,15 @@ export interface CollectionQuerySource<Row> {
39
43
  * key carries the account, and a purge tears parked workers down). */
40
44
  clearOnError?(error: unknown): boolean;
41
45
  }
46
+ /** A scope is read back by its domain, so it is never cut: this exceeds the largest selection the events list encodes (100 ids of 64 characters, about 6.9k). */
47
+ const SCOPE_MAX = 8192;
42
48
  const normalize = (q: Partial<CollectionQuery>): CollectionQuery => ({
43
49
  query: typeof q.query === 'string' ? q.query.trim().slice(0, 256) : '',
44
50
  filter: typeof q.filter === 'string' ? q.filter.slice(0, 256) : 'all',
45
51
  sort: q.sort === 'az' || q.sort === 'za' ? q.sort : 'default',
46
52
  savedIds: Array.isArray(q.savedIds) ? [...new Set(q.savedIds.filter(id => typeof id === 'string' && id.length > 0 && id.length <= 256))].slice(0, 500) : [],
53
+
54
+ ...(typeof q.scope === 'string' && q.scope ? { scope: q.scope.slice(0, SCOPE_MAX) } : {}),
47
55
  });
48
56
  const copyQuery = (q: CollectionQuery): CollectionQuery => ({ ...q, savedIds: [...q.savedIds] });
49
57
 
@@ -23,6 +23,8 @@ interface BackendCollection {
23
23
  /** Sees the load action's argument (the screen's onAppear params) BEFORE the query runs. A returned
24
24
  * `{ filter, sort }` resets the criteria for that load (a screen that always opens on one view). */
25
25
  onLoad?(arg: unknown): CollectionCriteriaReset | void;
26
+ /** The collection's own selection as part of every query's criteria (see `CollectionQuery.scope`); "" for none. */
27
+ scope?(): string;
26
28
  controller: ReturnType<typeof createCollectionQuery<CollectionRow>>;
27
29
  apply(state: State, page: CollectionQueryState<CollectionRow>): State;
28
30
  }
@@ -284,7 +286,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
284
286
  // A screen with no search field clears a query an older screen persisted, or it narrows every view for good.
285
287
  if (typeof input.query === 'string') prefs.query = input.query.slice(0, 256);
286
288
  };
287
- const criteria = () => ({ query: prefs.query, sort: prefs.sort, filter: prefs.filter, savedIds: prefs.filter === 'saved' ? prefs.savedIds : [] });
289
+ const criteria = () => ({ query: prefs.query, sort: prefs.sort, filter: prefs.filter, savedIds: prefs.filter === 'saved' ? prefs.savedIds : [], ...(backend?.scope ? { scope: backend.scope() } : {}) });
288
290
  const criteriaKey = () => JSON.stringify(criteria());
289
291
  actions.collectionDismissFilters = change(() => { filtersPresented = false; });
290
292
  actions.collectionFilters = change(() => { filtersPresented = !filtersPresented; });
@@ -365,6 +367,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
365
367
  /** The load action's argument (onAppear params beyond `copy`), before the query runs — for a
366
368
  * domain setting that rides the descriptor, e.g. My Bookings' `weeklyGoal`. */
367
369
  onLoad?(arg: unknown): CollectionCriteriaReset | void;
370
+ /** A selection the list is limited to, as one canonical string ("" for none): it joins the criteria, so another selection is another
371
+ * result set (no stale rows behind a revalidation, no restore of another selection's pages) and `source` reads it off `criteria.scope`. */
372
+ scope?(): string;
368
373
  state: S;
369
374
  source: CollectionQuerySource<Row>;
370
375
  apply(state: S, page: CollectionQueryState<Row>): S;
@@ -380,6 +385,7 @@ export function defineBackendCollection<S extends object, Row extends object>(na
380
385
  const definition = decorateCollection(name, { state: options.state as State, actions: options.actions as Record<string, Reducer> | undefined }, options.saving, {
381
386
  restorePagesOnLoad: options.restorePagesOnLoad,
382
387
  onLoad: avatar ? arg => { avatar.onLoad(arg); return options.onLoad?.(arg); } : options.onLoad,
388
+ scope: options.scope,
383
389
  controller: controller as unknown as BackendCollection['controller'],
384
390
  apply: (state, page) => {
385
391
  const applied = options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State;
@@ -5,6 +5,10 @@ export interface CollectionQuery {
5
5
  filter: string;
6
6
  sort: 'default' | 'az' | 'za';
7
7
  savedIds: string[];
8
+ /** What the list is limited to beyond the controls above (a domain's own selection, e.g. the events of some categories), as one
9
+ * canonical string. Part of the criteria, so a list opened on another selection never shows or restores this one's rows. Absent
10
+ * when there is none: criteria without it keep the key they always had. */
11
+ scope?: string;
8
12
  }
9
13
  export interface CollectionPage<Row> {
10
14
  items: Row[];
@@ -39,11 +43,15 @@ export interface CollectionQuerySource<Row> {
39
43
  * key carries the account, and a purge tears parked workers down). */
40
44
  clearOnError?(error: unknown): boolean;
41
45
  }
46
+ /** A scope is read back by its domain, so it is never cut: this exceeds the largest selection the events list encodes (100 ids of 64 characters, about 6.9k). */
47
+ const SCOPE_MAX = 8192;
42
48
  const normalize = (q: Partial<CollectionQuery>): CollectionQuery => ({
43
49
  query: typeof q.query === 'string' ? q.query.trim().slice(0, 256) : '',
44
50
  filter: typeof q.filter === 'string' ? q.filter.slice(0, 256) : 'all',
45
51
  sort: q.sort === 'az' || q.sort === 'za' ? q.sort : 'default',
46
52
  savedIds: Array.isArray(q.savedIds) ? [...new Set(q.savedIds.filter(id => typeof id === 'string' && id.length > 0 && id.length <= 256))].slice(0, 500) : [],
53
+
54
+ ...(typeof q.scope === 'string' && q.scope ? { scope: q.scope.slice(0, SCOPE_MAX) } : {}),
47
55
  });
48
56
  const copyQuery = (q: CollectionQuery): CollectionQuery => ({ ...q, savedIds: [...q.savedIds] });
49
57
 
@@ -23,6 +23,8 @@ interface BackendCollection {
23
23
  /** Sees the load action's argument (the screen's onAppear params) BEFORE the query runs. A returned
24
24
  * `{ filter, sort }` resets the criteria for that load (a screen that always opens on one view). */
25
25
  onLoad?(arg: unknown): CollectionCriteriaReset | void;
26
+ /** The collection's own selection as part of every query's criteria (see `CollectionQuery.scope`); "" for none. */
27
+ scope?(): string;
26
28
  controller: ReturnType<typeof createCollectionQuery<CollectionRow>>;
27
29
  apply(state: State, page: CollectionQueryState<CollectionRow>): State;
28
30
  }
@@ -284,7 +286,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
284
286
  // A screen with no search field clears a query an older screen persisted, or it narrows every view for good.
285
287
  if (typeof input.query === 'string') prefs.query = input.query.slice(0, 256);
286
288
  };
287
- const criteria = () => ({ query: prefs.query, sort: prefs.sort, filter: prefs.filter, savedIds: prefs.filter === 'saved' ? prefs.savedIds : [] });
289
+ const criteria = () => ({ query: prefs.query, sort: prefs.sort, filter: prefs.filter, savedIds: prefs.filter === 'saved' ? prefs.savedIds : [], ...(backend?.scope ? { scope: backend.scope() } : {}) });
288
290
  const criteriaKey = () => JSON.stringify(criteria());
289
291
  actions.collectionDismissFilters = change(() => { filtersPresented = false; });
290
292
  actions.collectionFilters = change(() => { filtersPresented = !filtersPresented; });
@@ -365,6 +367,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
365
367
  /** The load action's argument (onAppear params beyond `copy`), before the query runs — for a
366
368
  * domain setting that rides the descriptor, e.g. My Bookings' `weeklyGoal`. */
367
369
  onLoad?(arg: unknown): CollectionCriteriaReset | void;
370
+ /** A selection the list is limited to, as one canonical string ("" for none): it joins the criteria, so another selection is another
371
+ * result set (no stale rows behind a revalidation, no restore of another selection's pages) and `source` reads it off `criteria.scope`. */
372
+ scope?(): string;
368
373
  state: S;
369
374
  source: CollectionQuerySource<Row>;
370
375
  apply(state: S, page: CollectionQueryState<Row>): S;
@@ -380,6 +385,7 @@ export function defineBackendCollection<S extends object, Row extends object>(na
380
385
  const definition = decorateCollection(name, { state: options.state as State, actions: options.actions as Record<string, Reducer> | undefined }, options.saving, {
381
386
  restorePagesOnLoad: options.restorePagesOnLoad,
382
387
  onLoad: avatar ? arg => { avatar.onLoad(arg); return options.onLoad?.(arg); } : options.onLoad,
388
+ scope: options.scope,
383
389
  controller: controller as unknown as BackendCollection['controller'],
384
390
  apply: (state, page) => {
385
391
  const applied = options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State;
@@ -0,0 +1,36 @@
1
+ // A member-only screen that a guest opens offers the app's sign-in at once, as the sheet the app's other
2
+ // screens use (`signInPresentation`, and `signInSheetStyle: "page"` where the app asks for it). Opt-in: the
3
+ // screen's load params must name `signInScreenId`, so an app that passes none keeps the screen's own Sign in state.
4
+ //
5
+ // The sheet is a modal with no return path: closing it, signed in or not, leaves the guest on this screen, which
6
+ // loads again and shows the member's content, or its Sign in state when the sheet was only closed. One offer per
7
+ // guest: a reload that follows a dismissed sheet does not open a second one, and a member's visit resets it.
8
+ import { dispatch } from "@himalaya/dispatch";
9
+ import { signInPageStyle, signInSheetStyle } from "./sign-in-sheet.js";
10
+
11
+ const field = (arg: unknown, key: string): string => {
12
+ const value = (arg as Record<string, unknown> | null | undefined)?.[key];
13
+ return typeof value === "string" ? value.trim() : "";
14
+ };
15
+
16
+ export interface GuestSignIn {
17
+ /** The screen loaded for a guest: open the sign-in sheet, once. */
18
+ offer(arg: unknown): void;
19
+ /** The screen loaded for a member: the next guest is offered the sheet again. */
20
+ member(): void;
21
+ }
22
+
23
+ export function guestSignIn(): GuestSignIn {
24
+ let offered = false;
25
+ return {
26
+ offer(arg) {
27
+ const screenId = field(arg, "signInScreenId");
28
+ const presentation = field(arg, "signInPresentation");
29
+ if (!screenId || offered || (presentation !== "sheet" && presentation !== "full_screen")) return;
30
+ offered = true;
31
+ const args = { screenId, mode: "signin", presentation, modal: "1", ...signInSheetStyle(presentation, signInPageStyle(field(arg, "signInSheetStyle"))) };
32
+ void Promise.resolve(dispatch("himi.open", args)).catch(() => undefined);
33
+ },
34
+ member() { offered = false; },
35
+ };
36
+ }
@@ -14,6 +14,7 @@ import { navigate } from "@himalaya/state";
14
14
  import { notificationOpen, urlHost, type NotificationOpen } from "../_shared/notification-target.js";
15
15
  import { openRichLink } from "../_shared/rich-content-link.js";
16
16
  import { copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
+ import { guestSignIn } from "../_shared/guest-sign-in.js";
17
18
 
18
19
  interface Row {
19
20
  id: string;
@@ -147,6 +148,8 @@ function currentInbox(s: S): S | undefined {
147
148
  }
148
149
 
149
150
  const defineService = withOnlineWrites(registerService, ["markOneRead","markAll"], { messageFields: ["actionMessage"] });
151
+ /** A guest who opened Notifications is offered the app's sign-in at once (the load params opt in: `signInScreenId`). */
152
+ const guest = guestSignIn();
150
153
  const INITIAL = { ...LOADING, items: [] as Row[], emptyText: "", actionMessage: "", pendingUrl: "", inboxMember: null };
151
154
  const svc = defineService<S, {
152
155
  prepare: (s: S) => S;
@@ -166,11 +169,15 @@ const svc = defineService<S, {
166
169
  const served = servedScreens(arg);
167
170
  try {
168
171
  const member = await requireMember();
172
+ // At once, not after the read: a signed-in load whose read fails would otherwise leave the one-shot offer consumed for the next guest.
173
+ guest.member();
169
174
  const items = (await queryNotifications(25)).map((n) => norm(n, served));
170
175
  await assertMemberAccess(member);
171
176
  return { ...s, ...loaded("items", items, COPY), inboxMember: member, actionMessage: "", pendingUrl: "" };
172
177
  } catch (err) {
173
- return { ...s, ...loadFailed("items", (await memberAccess()).email ? err : signInRequired(), COPY), inboxMember: null, actionMessage: "", pendingUrl: "" };
178
+ const signedIn = !!(await memberAccess()).email;
179
+ if (!signedIn) guest.offer(arg);
180
+ return { ...s, ...loadFailed("items", signedIn ? err : signInRequired(), COPY), inboxMember: null, actionMessage: "", pendingUrl: "" };
174
181
  }
175
182
  },
176
183
  // Mark one read; optimistically clear its dot. Real write is best-effort and
@@ -262,7 +262,20 @@ function settle(next: S, arg: unknown, latest = true): S {
262
262
  }
263
263
  // Account forwards only on an appear refresh: the boot `load()` has no params and its
264
264
  // navigation is dropped, so a forward there was lost and used up the one forward.
265
- return strField(arg, "signInScreen") ? forwardToSignIn(next) : next;
265
+ if (!strField(arg, "signInScreen")) return next;
266
+ const forwarded = forwardToSignIn(next);
267
+ return forwarded === next ? offerSignIn(next, arg) : forwarded;
268
+ }
269
+
270
+ /** Profile (appear param `signInOnAppear: "1"`, set by an app whose top bar leads with the profile avatar): a guest who opens it is
271
+ * offered the standalone sign-in as a sheet, once. The sheet closes by itself or by the guest: either way this screen is under it, so
272
+ * a guest who only closes it stays on the guest Profile. A reload that follows is not a second offer; a member resets it. */
273
+ let signInOffered = false;
274
+ function offerSignIn(next: S, arg: unknown): S {
275
+ if (next.isMember) { signInOffered = false; return next; }
276
+ if (strField(arg, "signInOnAppear") !== "1" || signInOffered || next.standalone) return next;
277
+ signInOffered = true;
278
+ return openSignIn(next, { mode: "signin" }, null);
266
279
  }
267
280
 
268
281
  // A tick reads only the session. The profile is read again only when the signed-in email
@@ -325,6 +338,9 @@ let pollIdentityRequested = false;
325
338
  // iOS can start the arg-less boot load after the appear refresh that asks for the row; the
326
339
  // newer boot probe must not land, or be kept, without it.
327
340
  let restorePurchasesRequested = false;
341
+ /** Profile's "Pages" group (appear param `showPages: "1"`): set on the screen's load by whoever knows the app's top bar
342
+ * leads with the profile avatar, so the drawer's pages stay reachable. Off, the group is hidden. */
343
+ let showPagesRequested = false;
328
344
  /** An app's sign-in form that carries the ended-session notice (appear param `sessionEndedNotice: "1"`).
329
345
  * Only that form gets the signed-out headline, whose copy only that app's pack translates, and the ended
330
346
  * session's address, which only its email field shows, so no form submits it unseen. */
@@ -342,6 +358,7 @@ function appearBase(): Partial<S> {
342
358
  standalone: standaloneRequested,
343
359
  pollIdentity: pollIdentityRequested,
344
360
  restorePurchases: restorePurchasesRequested,
361
+ showPages: showPagesRequested,
345
362
  // One `_poll` per state: Account polls identity and never shows the social block.
346
363
  ...(pollIdentityRequested ? { _poll: { ...IDENTITY_POLL } } : socialRetriesLeft > 0 || flowsRetriesLeft > 0 ? { _poll: { ...SOCIAL_POLL } } : {}),
347
364
  };
@@ -370,6 +387,7 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
370
387
  standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
371
388
  pollIdentityRequested ||= s.pollIdentity || strField(arg, "pollIdentity") === "1";
372
389
  restorePurchasesRequested ||= s.restorePurchases || strField(arg, "restorePurchases") === "1";
390
+ showPagesRequested ||= s.showPages || strField(arg, "showPages") === "1";
373
391
  sessionEndedNoticeRequested ||= strField(arg, "sessionEndedNotice") === "1";
374
392
  // The form opens on the mode its route asked for each time it appears, sign-in by
375
393
  // default: a pooled worker reopened with the same params must not open on the mode the
@@ -832,6 +850,10 @@ interface S extends IapRestoreFields {
832
850
  * `restorePurchases: "1"`). Only then does the worker reach the App Store layer, so a
833
851
  * descriptor that renders no such row need not declare `iap`. */
834
852
  restorePurchases: boolean;
853
+ /** Set once a descriptor asks for Profile's "Pages" group (appear param `showPages: "1"`). */
854
+ showPages: boolean;
855
+ /** Hides Profile's "Pages" group until then. */
856
+ hidePages: boolean;
835
857
  /** Top-bar cart badge, read only once a descriptor asks for it (appear param
836
858
  * `cartCount: "1"`), so an app with no store never reads a cart. A guest has a
837
859
  * visitor cart too, so this is read for members and guests alike. */
@@ -899,6 +921,7 @@ function derive(s: S): S {
899
921
  hideGuest: loading || !!s.isMember,
900
922
  hideMember: loading || !s.isMember,
901
923
  hideSessionEnded: loading || !!s.isMember || !s.sessionEnded,
924
+ hidePages: !s.showPages,
902
925
  password: "",
903
926
  busyMessage: s.authBusy ? translated("auth.feedback.busy") : "",
904
927
  isLoading: s.status === "loading",
@@ -1164,6 +1187,8 @@ const svc = defineService<S, {
1164
1187
  noMemberAddresses: true,
1165
1188
  noMemberWallet: true,
1166
1189
  restorePurchases: false,
1190
+ showPages: false,
1191
+ hidePages: true,
1167
1192
  cartCount: 0,
1168
1193
  greeting: "Hey, guest",
1169
1194
  greetingFirstName: "",
@@ -3472,6 +3472,229 @@ const SCREENS = runtimeSetting({
3472
3472
  }
3473
3473
  }
3474
3474
  },
3475
+ {
3476
+ "id": "",
3477
+ "body": {
3478
+ "package": "himalaya",
3479
+ "type": "VStack",
3480
+ "props": {
3481
+ "spacing": 0,
3482
+ "alignment": "leading",
3483
+ "children": [
3484
+ {
3485
+ "id": "himi_account.pages_heading",
3486
+ "body": {
3487
+ "package": "himalaya",
3488
+ "type": "Text",
3489
+ "props": {
3490
+ "text": "Pages",
3491
+ "style": "footnote",
3492
+ "color": "textSecondary"
3493
+ }
3494
+ },
3495
+ "modifiers": {
3496
+ "padding": {
3497
+ "top": 8,
3498
+ "bottom": 4
3499
+ }
3500
+ }
3501
+ },
3502
+ {
3503
+ "id": "himi_account.page_groups",
3504
+ "body": {
3505
+ "package": "himalaya",
3506
+ "type": "HStack",
3507
+ "props": {
3508
+ "spacing": 12,
3509
+ "alignment": "center",
3510
+ "children": [
3511
+ {
3512
+ "id": "",
3513
+ "body": {
3514
+ "package": "himalaya",
3515
+ "type": "ZStack",
3516
+ "props": {
3517
+ "alignment": "center",
3518
+ "children": [
3519
+ {
3520
+ "id": "",
3521
+ "body": {
3522
+ "package": "himalaya",
3523
+ "type": "Icon",
3524
+ "props": {
3525
+ "name": "people",
3526
+ "size": 20,
3527
+ "tint": "textPrimary"
3528
+ }
3529
+ },
3530
+ "modifiers": {
3531
+ "accessibilityRole": "decorative"
3532
+ }
3533
+ }
3534
+ ]
3535
+ }
3536
+ },
3537
+ "modifiers": {
3538
+ "width": 24,
3539
+ "height": 24
3540
+ }
3541
+ },
3542
+ {
3543
+ "id": "",
3544
+ "body": {
3545
+ "package": "himalaya",
3546
+ "type": "Text",
3547
+ "props": {
3548
+ "text": "Groups",
3549
+ "style": "body",
3550
+ "maxLines": 1
3551
+ }
3552
+ }
3553
+ },
3554
+ {
3555
+ "id": "",
3556
+ "body": {
3557
+ "package": "himalaya",
3558
+ "type": "Spacer",
3559
+ "props": {}
3560
+ }
3561
+ }
3562
+ ]
3563
+ }
3564
+ },
3565
+ "modifiers": {
3566
+ "fillMaxWidth": true,
3567
+ "padding": {
3568
+ "top": 12,
3569
+ "bottom": 12
3570
+ },
3571
+ "onTap": {
3572
+ "actionId": "himi.open",
3573
+ "params": {
3574
+ "screenId": "himi_groups"
3575
+ }
3576
+ },
3577
+ "pressFeedback": "highlight",
3578
+ "haptic": "light",
3579
+ "accessibilityRole": "button",
3580
+ "accessibilityLabel": "Groups"
3581
+ }
3582
+ },
3583
+ {
3584
+ "id": "himi_account.page_blog",
3585
+ "body": {
3586
+ "package": "himalaya",
3587
+ "type": "HStack",
3588
+ "props": {
3589
+ "spacing": 12,
3590
+ "alignment": "center",
3591
+ "children": [
3592
+ {
3593
+ "id": "",
3594
+ "body": {
3595
+ "package": "himalaya",
3596
+ "type": "ZStack",
3597
+ "props": {
3598
+ "alignment": "center",
3599
+ "children": [
3600
+ {
3601
+ "id": "",
3602
+ "body": {
3603
+ "package": "himalaya",
3604
+ "type": "Icon",
3605
+ "props": {
3606
+ "name": "newspaper",
3607
+ "size": 20,
3608
+ "tint": "textPrimary"
3609
+ }
3610
+ },
3611
+ "modifiers": {
3612
+ "accessibilityRole": "decorative"
3613
+ }
3614
+ }
3615
+ ]
3616
+ }
3617
+ },
3618
+ "modifiers": {
3619
+ "width": 24,
3620
+ "height": 24
3621
+ }
3622
+ },
3623
+ {
3624
+ "id": "",
3625
+ "body": {
3626
+ "package": "himalaya",
3627
+ "type": "Text",
3628
+ "props": {
3629
+ "text": "Blog",
3630
+ "style": "body",
3631
+ "maxLines": 1
3632
+ }
3633
+ }
3634
+ },
3635
+ {
3636
+ "id": "",
3637
+ "body": {
3638
+ "package": "himalaya",
3639
+ "type": "Spacer",
3640
+ "props": {}
3641
+ }
3642
+ }
3643
+ ]
3644
+ }
3645
+ },
3646
+ "modifiers": {
3647
+ "fillMaxWidth": true,
3648
+ "padding": {
3649
+ "top": 12,
3650
+ "bottom": 12
3651
+ },
3652
+ "onTap": {
3653
+ "actionId": "himi.open",
3654
+ "params": {
3655
+ "screenId": "himi_blog"
3656
+ }
3657
+ },
3658
+ "pressFeedback": "highlight",
3659
+ "haptic": "light",
3660
+ "accessibilityRole": "button",
3661
+ "accessibilityLabel": "Blog"
3662
+ }
3663
+ },
3664
+ {
3665
+ "id": "",
3666
+ "body": {
3667
+ "package": "himalaya",
3668
+ "type": "VStack",
3669
+ "props": {
3670
+ "spacing": 0,
3671
+ "children": [
3672
+ {
3673
+ "id": "",
3674
+ "body": {
3675
+ "package": "himalaya",
3676
+ "type": "Divider",
3677
+ "props": {}
3678
+ }
3679
+ }
3680
+ ]
3681
+ }
3682
+ },
3683
+ "modifiers": {
3684
+ "fillMaxWidth": true,
3685
+ "padding": {
3686
+ "top": 8,
3687
+ "bottom": 8
3688
+ }
3689
+ }
3690
+ }
3691
+ ]
3692
+ }
3693
+ },
3694
+ "modifiers": {
3695
+ "hiddenPath": "$service:himiStoreAccount.hidePages"
3696
+ }
3697
+ },
3475
3698
  {
3476
3699
  "id": "himi_account.language",
3477
3700
  "body": {
@@ -1628,6 +1628,12 @@
1628
1628
  "translation": "إغلاق",
1629
1629
  "origin": "machine"
1630
1630
  },
1631
+ "h_600584c2d5cc": {
1632
+ "key": "account.pagesHeading",
1633
+ "source": "Pages",
1634
+ "translation": "الصفحات",
1635
+ "origin": "machine"
1636
+ },
1631
1637
  "h_1e9b74b4dda5": {
1632
1638
  "source": "Show all ({count})",
1633
1639
  "translation": "عرض الكل ({count})",
@@ -1628,6 +1628,12 @@
1628
1628
  "translation": "Zavřít",
1629
1629
  "origin": "machine"
1630
1630
  },
1631
+ "h_600584c2d5cc": {
1632
+ "key": "account.pagesHeading",
1633
+ "source": "Pages",
1634
+ "translation": "Stránky",
1635
+ "origin": "machine"
1636
+ },
1631
1637
  "h_1e9b74b4dda5": {
1632
1638
  "source": "Show all ({count})",
1633
1639
  "translation": "Zobrazit vše ({count})",
@@ -1628,6 +1628,12 @@
1628
1628
  "translation": "Luk",
1629
1629
  "origin": "machine"
1630
1630
  },
1631
+ "h_600584c2d5cc": {
1632
+ "key": "account.pagesHeading",
1633
+ "source": "Pages",
1634
+ "translation": "Sider",
1635
+ "origin": "machine"
1636
+ },
1631
1637
  "h_1e9b74b4dda5": {
1632
1638
  "source": "Show all ({count})",
1633
1639
  "translation": "Vis alle ({count})",
@@ -1628,6 +1628,12 @@
1628
1628
  "translation": "Schließen",
1629
1629
  "origin": "machine"
1630
1630
  },
1631
+ "h_600584c2d5cc": {
1632
+ "key": "account.pagesHeading",
1633
+ "source": "Pages",
1634
+ "translation": "Seiten",
1635
+ "origin": "machine"
1636
+ },
1631
1637
  "h_1e9b74b4dda5": {
1632
1638
  "source": "Show all ({count})",
1633
1639
  "translation": "Alle anzeigen ({count})",
@@ -1628,6 +1628,12 @@
1628
1628
  "translation": "Κλείσιμο",
1629
1629
  "origin": "machine"
1630
1630
  },
1631
+ "h_600584c2d5cc": {
1632
+ "key": "account.pagesHeading",
1633
+ "source": "Pages",
1634
+ "translation": "Σελίδες",
1635
+ "origin": "machine"
1636
+ },
1631
1637
  "h_1e9b74b4dda5": {
1632
1638
  "source": "Show all ({count})",
1633
1639
  "translation": "Εμφάνιση όλων ({count})",