@wix/himalaya-cli 0.1544.0 → 0.1545.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 (225) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/agent/src/index.d.ts +5 -2
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +14 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/read.d.ts +60 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/activity-counters-v1/src/index.d.ts +19 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ai-site-chat/src/index.d.ts +19 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts +42 -2
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts +19 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +19 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/badges-v2/src/index.d.ts +19 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +19 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +5 -4
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/index.d.ts +19 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +4 -4
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +19 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-feed/src/index.d.ts +11 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +19 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +22 -1
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +19 -0
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/contacts/src/index.d.ts +19 -0
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/coupons/src/index.d.ts +24 -2
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/crm-tasks/src/index.d.ts +11 -0
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/dashboard-setup/src/index.d.ts +11 -0
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +19 -0
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +19 -0
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +6 -5
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/index.d.ts +19 -0
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +19 -0
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +24 -2
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +19 -0
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/index.d.ts +19 -0
  31. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forum/src/index.d.ts +19 -0
  32. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +11 -0
  33. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +19 -0
  34. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +19 -0
  35. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/extensions.d.ts +2 -1
  36. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/index.d.ts +19 -0
  37. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/invoices/src/index.d.ts +24 -2
  38. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +28 -4
  39. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/marketing-v1/src/index.d.ts +19 -0
  40. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-feed-viewer/src/index.d.ts +23 -1
  41. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +25 -3
  42. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/new-releases/src/index.d.ts +23 -1
  43. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notification-preferences/src/index.d.ts +23 -2
  44. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notifications-v3/src/index.d.ts +19 -0
  45. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +25 -3
  46. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +25 -3
  47. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +28 -6
  48. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +19 -0
  49. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/extensions.d.ts +2 -2
  50. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/index.d.ts +19 -0
  51. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/reviews/src/index.d.ts +24 -2
  52. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +19 -0
  53. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-list/src/index.d.ts +19 -0
  54. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +11 -0
  55. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +23 -1
  56. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/display.d.ts +3 -2
  57. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/index.d.ts +27 -3
  58. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/catalog.d.ts +7 -7
  59. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +4 -3
  60. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +2 -1
  61. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/index.d.ts +19 -0
  62. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/table-reservations/src/index.d.ts +25 -3
  63. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/users/src/index.d.ts +23 -1
  64. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/video/src/index.d.ts +19 -0
  65. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/wix-data/src/index.d.ts +27 -3
  66. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +19 -0
  67. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/runtime.generated.d.ts +8 -0
  68. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +12 -4
  69. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +36 -11
  70. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +206 -12
  71. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-activity-counters.mjs +19 -5
  72. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ai-site-chat.mjs +19 -5
  73. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-analytics.mjs +21 -7
  74. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-async-jobs.mjs +19 -5
  75. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-automations.mjs +19 -5
  76. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-badges.mjs +19 -5
  77. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-billing-tax.mjs +19 -5
  78. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +31 -14
  79. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +26 -12
  80. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +20 -6
  81. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +29 -7
  82. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +28 -5
  83. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-contacts.mjs +19 -5
  84. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-coupons.mjs +14 -6
  85. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +19 -5
  86. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data.mjs +15 -5
  87. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +19 -5
  88. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +33 -16
  89. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +19 -5
  90. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +14 -6
  91. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +20 -6
  92. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +19 -5
  93. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forum.mjs +19 -5
  94. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-gift-cards.mjs +19 -5
  95. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +19 -5
  96. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-inbox.mjs +21 -7
  97. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-invoices.mjs +14 -6
  98. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-loyalty.mjs +16 -8
  99. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-marketing.mjs +19 -5
  100. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members-feed-viewer.mjs +21 -10
  101. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +17 -8
  102. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-new-releases.mjs +17 -5
  103. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notification-preferences.mjs +20 -6
  104. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notifications.mjs +19 -5
  105. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +16 -8
  106. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-portfolio.mjs +16 -8
  107. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +22 -14
  108. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-redirects.mjs +19 -5
  109. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-restaurants.mjs +22 -7
  110. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-reviews.mjs +14 -6
  111. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-rich-content-editor.mjs +3 -0
  112. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-seo.mjs +19 -5
  113. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-list.mjs +19 -5
  114. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-social-feed.mjs +15 -5
  115. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores-collections.mjs +20 -10
  116. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +116 -83
  117. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-table-reservations.mjs +16 -8
  118. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-users.mjs +15 -5
  119. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-video.mjs +9 -1
  120. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-workflows.mjs +19 -5
  121. package/dist/cli.mjs +90 -57
  122. package/dist/preview-assets.generated.bin +0 -0
  123. package/fixtures/wix-canned.json +8 -8
  124. package/guides/dynamic-list.service.ts +38 -29
  125. package/guides/form-submit.service.ts +2 -1
  126. package/guides/index.json +6 -0
  127. package/guides/offline-reading.md +63 -0
  128. package/guides/recipe-dynamic-list.md +2 -0
  129. package/guides/recipe-four-state.md +1 -0
  130. package/guides/sdk-reference.json +225 -99
  131. package/guides/testing-himi-apps.md +2 -0
  132. package/guides/tier-5-add-a-screen.md +2 -0
  133. package/package.json +2 -2
  134. package/templates/beauty-salon/dev/index.ts +4 -3
  135. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +6 -9
  136. package/templates/beauty-salon/tier5-src/_shared/iap-presentation.ts +7 -3
  137. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +1 -1
  138. package/templates/beauty-salon/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  139. package/templates/beauty-salon-owner/dev/index.ts +19 -19
  140. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +6 -9
  141. package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  142. package/templates/branded-lite/dev/index.ts +38 -20
  143. package/templates/branded-lite/tier5-src/_shared/collection-query-legacy.ts +194 -0
  144. package/templates/branded-lite/tier5-src/_shared/collection-query.ts +158 -99
  145. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +31 -11
  146. package/templates/branded-lite/tier5-src/_shared/iap-presentation.ts +7 -3
  147. package/templates/branded-lite/tier5-src/_shared/read-service.ts +255 -0
  148. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +1 -1
  149. package/templates/branded-lite/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  150. package/templates/branded-lite/tier5-src/himi-branded-lite-shop/index.ts +202 -159
  151. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +130 -201
  152. package/templates/community-club/dev/index.ts +4 -4
  153. package/templates/community-club/tier5-src/_shared/collection-service.ts +6 -9
  154. package/templates/community-club/tier5-src/_shared/iap-presentation.ts +7 -3
  155. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +1 -1
  156. package/templates/community-club-owner/dev/index.ts +19 -19
  157. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +6 -9
  158. package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  159. package/templates/events-meetups/dev/index.ts +3 -3
  160. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +6 -9
  161. package/templates/events-meetups/tier5-src/_shared/iap-presentation.ts +7 -3
  162. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +1 -1
  163. package/templates/events-meetups-owner/dev/index.ts +17 -17
  164. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +6 -9
  165. package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  166. package/templates/gym-fitness/dev/index.ts +5 -4
  167. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +6 -9
  168. package/templates/gym-fitness/tier5-src/_shared/iap-presentation.ts +7 -3
  169. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +1 -1
  170. package/templates/gym-fitness/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  171. package/templates/gym-fitness-owner/dev/index.ts +20 -20
  172. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +6 -9
  173. package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  174. package/templates/nonprofit-cause/dev/index.ts +4 -4
  175. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +6 -9
  176. package/templates/nonprofit-cause/tier5-src/_shared/iap-presentation.ts +7 -3
  177. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +1 -1
  178. package/templates/nonprofit-cause-owner/dev/index.ts +18 -18
  179. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +6 -9
  180. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  181. package/templates/owner-lite/dev/index.ts +20 -20
  182. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +6 -9
  183. package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +1 -1
  184. package/templates/podcast-creator/dev/index.ts +4 -4
  185. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +6 -9
  186. package/templates/podcast-creator/tier5-src/_shared/iap-presentation.ts +7 -3
  187. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +1 -1
  188. package/templates/podcast-creator-owner/dev/index.ts +19 -19
  189. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +6 -9
  190. package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  191. package/templates/portfolio-creative/dev/index.ts +5 -4
  192. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +6 -9
  193. package/templates/portfolio-creative/tier5-src/_shared/iap-presentation.ts +7 -3
  194. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +1 -1
  195. package/templates/portfolio-creative/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  196. package/templates/portfolio-creative-owner/dev/index.ts +19 -19
  197. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +6 -9
  198. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  199. package/templates/restaurant/dev/index.ts +3 -3
  200. package/templates/restaurant/tier5-src/_shared/collection-service.ts +6 -9
  201. package/templates/restaurant/tier5-src/_shared/iap-presentation.ts +7 -3
  202. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +1 -1
  203. package/templates/restaurant-owner/dev/index.ts +20 -20
  204. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +6 -9
  205. package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  206. package/templates/retail-store/dev/index.ts +19 -1
  207. package/templates/retail-store/tier5-src/_shared/collection-query-legacy.ts +194 -0
  208. package/templates/retail-store/tier5-src/_shared/collection-query.ts +158 -99
  209. package/templates/retail-store/tier5-src/_shared/collection-service.ts +31 -11
  210. package/templates/retail-store/tier5-src/_shared/iap-presentation.ts +7 -3
  211. package/templates/retail-store/tier5-src/_shared/read-service.ts +255 -0
  212. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +1 -1
  213. package/templates/retail-store/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  214. package/templates/retail-store/tier5-src/himi-branded-lite-shop/index.ts +202 -159
  215. package/templates/retail-store/tier5-src/himi-store-product/index.ts +130 -201
  216. package/templates/retail-store-owner/dev/index.ts +18 -18
  217. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +6 -9
  218. package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  219. package/templates/yoga-studio/dev/index.ts +4 -4
  220. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +6 -9
  221. package/templates/yoga-studio/tier5-src/_shared/iap-presentation.ts +7 -3
  222. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +1 -1
  223. package/templates/yoga-studio-owner/dev/index.ts +18 -18
  224. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +6 -9
  225. package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +1 -1
@@ -1,4 +1,3 @@
1
- import { withOnlineWrites } from './online-actions.js';
2
1
  import { defineService as register, type ServiceDefinition } from '@himalaya/state';
3
2
  import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
4
3
  import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
95
94
  if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
96
95
  }
97
96
  if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
98
- const requestedFilter = String(input.collectionFilter ?? '');
99
- // Old links to Saved must migrate with the stored preference when this
100
- // collection no longer exposes that filter.
101
- const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
97
+ const filter = String(input.collectionFilter ?? '');
102
98
  const configured = config.filterValues ?? [];
103
99
  const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
104
100
  const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
142
138
  copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
143
139
  });
144
140
  if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
145
- const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, ...(config.rowStyle === 'flat' ? [] : [{ id: 'saved', label: copyParam('collection.saved', 'Saved') }]),
141
+ const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
146
142
  ...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
147
143
  const loading = s.status === 'loading' || s.isLoading === true;
148
144
  // Older domain reducers expose `errored` rather than `isErrored`; backend
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
223
219
  ? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
224
220
  selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
225
221
  filterChoices,
226
- chips: config.filterValues && config.rowStyle !== 'flat' ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
222
+ chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
227
223
  } };
228
224
  };
229
225
  const actions: Record<string, Reducer> = {};
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
374
370
  controller: controller as unknown as BackendCollection['controller'],
375
371
  apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
376
372
  });
377
- const registerService = options.onlineWrites ? withOnlineWrites(options.register ?? register, ['confirmCancel', 'confirmOperation', 'retryOperation', 'commitWrite'], { messageFields: options.onlineWriteMessageFields ?? ['actionMessage'] }) : (options.register ?? register);
378
- const handle = registerService(name, definition);
373
+ // Compatibility starters retain their existing mutation behavior; accept the
374
+ // current authoring contract without enabling the offline-write rollout.
375
+ const handle = (options.register ?? register)(name, definition);
379
376
  // Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
380
377
  // when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
381
378
  // starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
@@ -103,6 +103,8 @@ export function withIapPresentation<S extends object>(options: {
103
103
  // scopeLanded is the completion of the active load, not a stale load result. It
104
104
  // must publish even if another overlapping onAppear load advanced contentVersion.
105
105
  if (!next || (content && action !== "scopeLanded" && version !== contentVersion)) return undefined;
106
+ // A committed read projection supersedes older load results still carrying a skeleton.
107
+ if (action === "readChanged" && definition.readLifecycle) contentVersion++;
106
108
  if (content) {
107
109
  options.onContent?.(next);
108
110
  const nextItems = options.items(next);
@@ -130,9 +132,11 @@ export function withIapPresentation<S extends object>(options: {
130
132
  };
131
133
  try {
132
134
  const next = reduce(state, ...args);
133
- // Keep synchronous sidecars synchronous. Adding an await lets their old
134
- // catalog snapshot commit after a newer asynchronous refresh.
135
- if (content || (next && typeof (next as Promise<S | undefined>).then === "function")) {
135
+ // A cached read projection must commit before another onAppear can consume it.
136
+ // Other content actions retain their scheduling: shop filters and panels can
137
+ // change while a load is pending, and their existing completion order matters.
138
+ const synchronousReadProjection = action === "readChanged" && !!definition.readLifecycle;
139
+ if ((content && !synchronousReadProjection) || (next && typeof (next as Promise<S | undefined>).then === "function")) {
136
140
  return (async () => {
137
141
  try { return presentResult(await next); }
138
142
  finally { finished(); }
@@ -250,7 +250,7 @@ interface State {
250
250
  hideFeaturedSkeleton: boolean;
251
251
  welcome: string;
252
252
  refreshedAt: string;
253
- /** The resolved home layout preset (RFC 0045 FragmentSlot discriminator).
253
+ /** The resolved home layout preset (shared slot discriminator).
254
254
  * Plain string, never a proto enum — a `$service:` casePath decodes it as a
255
255
  * JSON string and unknown values fall through to the shipped defaultCase. */
256
256
  effectiveLayout: string;
@@ -161,6 +161,9 @@ function derive(state: State): State {
161
161
  });
162
162
  return {
163
163
  ...state,
164
+ nextCursor: state.nextCursor ?? "",
165
+ filterOptions: state.filterOptions ?? [{ id: "all", label: copyParam("collection.all", "All"), selected: true },
166
+ ...Object.keys(FULFILLMENT).map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label), selected: false }))],
164
167
  displayRows: rows.map((row, index, rows) => {
165
168
  // Older owned cache rows retain their original date in meta. Group only
166
169
  // adjacent days so pagination and an explicit backend sort remain authoritative.
@@ -584,7 +584,7 @@ const SCREENS = runtimeSetting({
584
584
  "package": "himalaya",
585
585
  "type": "Text",
586
586
  "props": {
587
- "text": "Showing saved offline results · may be outdated",
587
+ "text": "Showing previously loaded content · may be outdated",
588
588
  "style": "caption",
589
589
  "color": "textSecondary"
590
590
  }
@@ -3938,7 +3938,7 @@ const SCREENS = runtimeSetting({
3938
3938
  "package": "himalaya",
3939
3939
  "type": "Text",
3940
3940
  "props": {
3941
- "text": "Showing saved offline results · may be outdated",
3941
+ "text": "Showing previously loaded content · may be outdated",
3942
3942
  "style": "caption",
3943
3943
  "color": "textSecondary"
3944
3944
  }
@@ -7205,7 +7205,7 @@ const SCREENS = runtimeSetting({
7205
7205
  "package": "himalaya",
7206
7206
  "type": "Text",
7207
7207
  "props": {
7208
- "text": "Showing saved offline results · may be outdated",
7208
+ "text": "Showing previously loaded content · may be outdated",
7209
7209
  "style": "caption",
7210
7210
  "color": "textSecondary"
7211
7211
  }
@@ -10379,7 +10379,7 @@ const SCREENS = runtimeSetting({
10379
10379
  "package": "himalaya",
10380
10380
  "type": "Text",
10381
10381
  "props": {
10382
- "text": "Showing saved offline results · may be outdated",
10382
+ "text": "Showing previously loaded content · may be outdated",
10383
10383
  "style": "caption",
10384
10384
  "color": "textSecondary"
10385
10385
  }
@@ -13733,7 +13733,7 @@ const SCREENS = runtimeSetting({
13733
13733
  "package": "himalaya",
13734
13734
  "type": "Text",
13735
13735
  "props": {
13736
- "text": "Showing saved offline results · may be outdated",
13736
+ "text": "Showing previously loaded content · may be outdated",
13737
13737
  "style": "caption",
13738
13738
  "color": "textSecondary"
13739
13739
  }
@@ -17087,7 +17087,7 @@ const SCREENS = runtimeSetting({
17087
17087
  "package": "himalaya",
17088
17088
  "type": "Text",
17089
17089
  "props": {
17090
- "text": "Showing saved offline results · may be outdated",
17090
+ "text": "Showing previously loaded content · may be outdated",
17091
17091
  "style": "caption",
17092
17092
  "color": "textSecondary"
17093
17093
  }
@@ -20441,7 +20441,7 @@ const SCREENS = runtimeSetting({
20441
20441
  "package": "himalaya",
20442
20442
  "type": "Text",
20443
20443
  "props": {
20444
- "text": "Showing saved offline results · may be outdated",
20444
+ "text": "Showing previously loaded content · may be outdated",
20445
20445
  "style": "caption",
20446
20446
  "color": "textSecondary"
20447
20447
  }
@@ -23795,7 +23795,7 @@ const SCREENS = runtimeSetting({
23795
23795
  "package": "himalaya",
23796
23796
  "type": "Text",
23797
23797
  "props": {
23798
- "text": "Showing saved offline results · may be outdated",
23798
+ "text": "Showing previously loaded content · may be outdated",
23799
23799
  "style": "caption",
23800
23800
  "color": "textSecondary"
23801
23801
  }
@@ -27149,7 +27149,7 @@ const SCREENS = runtimeSetting({
27149
27149
  "package": "himalaya",
27150
27150
  "type": "Text",
27151
27151
  "props": {
27152
- "text": "Showing saved offline results · may be outdated",
27152
+ "text": "Showing previously loaded content · may be outdated",
27153
27153
  "style": "caption",
27154
27154
  "color": "textSecondary"
27155
27155
  }
@@ -30503,7 +30503,7 @@ const SCREENS = runtimeSetting({
30503
30503
  "package": "himalaya",
30504
30504
  "type": "Text",
30505
30505
  "props": {
30506
- "text": "Showing saved offline results · may be outdated",
30506
+ "text": "Showing previously loaded content · may be outdated",
30507
30507
  "style": "caption",
30508
30508
  "color": "textSecondary"
30509
30509
  }
@@ -33770,7 +33770,7 @@ const SCREENS = runtimeSetting({
33770
33770
  "package": "himalaya",
33771
33771
  "type": "Text",
33772
33772
  "props": {
33773
- "text": "Showing saved offline results · may be outdated",
33773
+ "text": "Showing previously loaded content · may be outdated",
33774
33774
  "style": "caption",
33775
33775
  "color": "textSecondary"
33776
33776
  }
@@ -36944,7 +36944,7 @@ const SCREENS = runtimeSetting({
36944
36944
  "package": "himalaya",
36945
36945
  "type": "Text",
36946
36946
  "props": {
36947
- "text": "Showing saved offline results · may be outdated",
36947
+ "text": "Showing previously loaded content · may be outdated",
36948
36948
  "style": "caption",
36949
36949
  "color": "textSecondary"
36950
36950
  }
@@ -40298,7 +40298,7 @@ const SCREENS = runtimeSetting({
40298
40298
  "package": "himalaya",
40299
40299
  "type": "Text",
40300
40300
  "props": {
40301
- "text": "Showing saved offline results · may be outdated",
40301
+ "text": "Showing previously loaded content · may be outdated",
40302
40302
  "style": "caption",
40303
40303
  "color": "textSecondary"
40304
40304
  }
@@ -43652,7 +43652,7 @@ const SCREENS = runtimeSetting({
43652
43652
  "package": "himalaya",
43653
43653
  "type": "Text",
43654
43654
  "props": {
43655
- "text": "Showing saved offline results · may be outdated",
43655
+ "text": "Showing previously loaded content · may be outdated",
43656
43656
  "style": "caption",
43657
43657
  "color": "textSecondary"
43658
43658
  }
@@ -46919,7 +46919,7 @@ const SCREENS = runtimeSetting({
46919
46919
  "package": "himalaya",
46920
46920
  "type": "Text",
46921
46921
  "props": {
46922
- "text": "Showing saved offline results · may be outdated",
46922
+ "text": "Showing previously loaded content · may be outdated",
46923
46923
  "style": "caption",
46924
46924
  "color": "textSecondary"
46925
46925
  }
@@ -68594,7 +68594,7 @@ const SCREENS = runtimeSetting({
68594
68594
  "package": "himalaya",
68595
68595
  "type": "Text",
68596
68596
  "props": {
68597
- "text": "Showing saved offline results · may be outdated",
68597
+ "text": "Showing previously loaded content · may be outdated",
68598
68598
  "style": "caption",
68599
68599
  "color": "textSecondary"
68600
68600
  }
@@ -71324,7 +71324,7 @@ const SCREENS = runtimeSetting({
71324
71324
  "package": "himalaya",
71325
71325
  "type": "Text",
71326
71326
  "props": {
71327
- "text": "Showing saved offline results · may be outdated",
71327
+ "text": "Showing previously loaded content · may be outdated",
71328
71328
  "style": "caption",
71329
71329
  "color": "textSecondary"
71330
71330
  }
@@ -73853,7 +73853,7 @@ const SCREENS = runtimeSetting({
73853
73853
  "package": "himalaya",
73854
73854
  "type": "Text",
73855
73855
  "props": {
73856
- "text": "Showing saved offline results · may be outdated",
73856
+ "text": "Showing previously loaded content · may be outdated",
73857
73857
  "style": "caption",
73858
73858
  "color": "textSecondary"
73859
73859
  }
@@ -76388,7 +76388,7 @@ const SCREENS = runtimeSetting({
76388
76388
  "package": "himalaya",
76389
76389
  "type": "Text",
76390
76390
  "props": {
76391
- "text": "Showing saved offline results · may be outdated",
76391
+ "text": "Showing previously loaded content · may be outdated",
76392
76392
  "style": "caption",
76393
76393
  "color": "textSecondary"
76394
76394
  }
@@ -79070,7 +79070,7 @@ const SCREENS = runtimeSetting({
79070
79070
  "package": "himalaya",
79071
79071
  "type": "Text",
79072
79072
  "props": {
79073
- "text": "Showing saved offline results · may be outdated",
79073
+ "text": "Showing previously loaded content · may be outdated",
79074
79074
  "style": "caption",
79075
79075
  "color": "textSecondary"
79076
79076
  }
@@ -1,4 +1,3 @@
1
- import { withOnlineWrites } from './online-actions.js';
2
1
  import { defineService as register, type ServiceDefinition } from '@himalaya/state';
3
2
  import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
4
3
  import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
95
94
  if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
96
95
  }
97
96
  if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
98
- const requestedFilter = String(input.collectionFilter ?? '');
99
- // Old links to Saved must migrate with the stored preference when this
100
- // collection no longer exposes that filter.
101
- const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
97
+ const filter = String(input.collectionFilter ?? '');
102
98
  const configured = config.filterValues ?? [];
103
99
  const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
104
100
  const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
142
138
  copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
143
139
  });
144
140
  if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
145
- const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, ...(config.rowStyle === 'flat' ? [] : [{ id: 'saved', label: copyParam('collection.saved', 'Saved') }]),
141
+ const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
146
142
  ...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
147
143
  const loading = s.status === 'loading' || s.isLoading === true;
148
144
  // Older domain reducers expose `errored` rather than `isErrored`; backend
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
223
219
  ? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
224
220
  selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
225
221
  filterChoices,
226
- chips: config.filterValues && config.rowStyle !== 'flat' ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
222
+ chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
227
223
  } };
228
224
  };
229
225
  const actions: Record<string, Reducer> = {};
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
374
370
  controller: controller as unknown as BackendCollection['controller'],
375
371
  apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
376
372
  });
377
- const registerService = options.onlineWrites ? withOnlineWrites(options.register ?? register, ['confirmCancel', 'confirmOperation', 'retryOperation', 'commitWrite'], { messageFields: options.onlineWriteMessageFields ?? ['actionMessage'] }) : (options.register ?? register);
378
- const handle = registerService(name, definition);
373
+ // Compatibility starters retain their existing mutation behavior; accept the
374
+ // current authoring contract without enabling the offline-write rollout.
375
+ const handle = (options.register ?? register)(name, definition);
379
376
  // Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
380
377
  // when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
381
378
  // starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
@@ -45,7 +45,7 @@ const LIMIT = 50;
45
45
  let zoneLookup: Promise<string | undefined> | undefined;
46
46
  function siteZone(): Promise<string | undefined> {
47
47
  // `Promise.resolve().then` so a bridge that throws synchronously is caught here too.
48
- zoneLookup ??= Promise.resolve().then(getSiteTimeZone).catch(() => undefined);
48
+ zoneLookup ??= Promise.resolve().then(() => getSiteTimeZone()).catch(() => undefined);
49
49
  return zoneLookup;
50
50
  }
51
51
 
@@ -8529,7 +8529,7 @@ const SCREENS = runtimeSetting({
8529
8529
  "package": "himalaya",
8530
8530
  "type": "Text",
8531
8531
  "props": {
8532
- "text": "Showing saved offline results · may be outdated",
8532
+ "text": "Showing previously loaded content · may be outdated",
8533
8533
  "style": "caption",
8534
8534
  "color": "textSecondary"
8535
8535
  }
@@ -12849,7 +12849,7 @@ const SCREENS = runtimeSetting({
12849
12849
  "package": "himalaya",
12850
12850
  "type": "Text",
12851
12851
  "props": {
12852
- "text": "Showing saved offline results · may be outdated",
12852
+ "text": "Showing previously loaded content · may be outdated",
12853
12853
  "style": "caption",
12854
12854
  "color": "textSecondary"
12855
12855
  }
@@ -16415,7 +16415,7 @@ const SCREENS = runtimeSetting({
16415
16415
  "package": "himalaya",
16416
16416
  "type": "Text",
16417
16417
  "props": {
16418
- "text": "Showing saved offline results · may be outdated",
16418
+ "text": "Showing previously loaded content · may be outdated",
16419
16419
  "style": "caption",
16420
16420
  "color": "textSecondary"
16421
16421
  }
@@ -19493,7 +19493,7 @@ const SCREENS = runtimeSetting({
19493
19493
  "package": "himalaya",
19494
19494
  "type": "Text",
19495
19495
  "props": {
19496
- "text": "Showing saved offline results · may be outdated",
19496
+ "text": "Showing previously loaded content · may be outdated",
19497
19497
  "style": "caption",
19498
19498
  "color": "textSecondary"
19499
19499
  }
@@ -1,4 +1,3 @@
1
- import { withOnlineWrites } from './online-actions.js';
2
1
  import { defineService as register, type ServiceDefinition } from '@himalaya/state';
3
2
  import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
4
3
  import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
95
94
  if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
96
95
  }
97
96
  if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
98
- const requestedFilter = String(input.collectionFilter ?? '');
99
- // Old links to Saved must migrate with the stored preference when this
100
- // collection no longer exposes that filter.
101
- const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
97
+ const filter = String(input.collectionFilter ?? '');
102
98
  const configured = config.filterValues ?? [];
103
99
  const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
104
100
  const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
142
138
  copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
143
139
  });
144
140
  if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
145
- const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, ...(config.rowStyle === 'flat' ? [] : [{ id: 'saved', label: copyParam('collection.saved', 'Saved') }]),
141
+ const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
146
142
  ...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
147
143
  const loading = s.status === 'loading' || s.isLoading === true;
148
144
  // Older domain reducers expose `errored` rather than `isErrored`; backend
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
223
219
  ? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
224
220
  selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
225
221
  filterChoices,
226
- chips: config.filterValues && config.rowStyle !== 'flat' ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
222
+ chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
227
223
  } };
228
224
  };
229
225
  const actions: Record<string, Reducer> = {};
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
374
370
  controller: controller as unknown as BackendCollection['controller'],
375
371
  apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
376
372
  });
377
- const registerService = options.onlineWrites ? withOnlineWrites(options.register ?? register, ['confirmCancel', 'confirmOperation', 'retryOperation', 'commitWrite'], { messageFields: options.onlineWriteMessageFields ?? ['actionMessage'] }) : (options.register ?? register);
378
- const handle = registerService(name, definition);
373
+ // Compatibility starters retain their existing mutation behavior; accept the
374
+ // current authoring contract without enabling the offline-write rollout.
375
+ const handle = (options.register ?? register)(name, definition);
379
376
  // Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
380
377
  // when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
381
378
  // starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
@@ -103,6 +103,8 @@ export function withIapPresentation<S extends object>(options: {
103
103
  // scopeLanded is the completion of the active load, not a stale load result. It
104
104
  // must publish even if another overlapping onAppear load advanced contentVersion.
105
105
  if (!next || (content && action !== "scopeLanded" && version !== contentVersion)) return undefined;
106
+ // A committed read projection supersedes older load results still carrying a skeleton.
107
+ if (action === "readChanged" && definition.readLifecycle) contentVersion++;
106
108
  if (content) {
107
109
  options.onContent?.(next);
108
110
  const nextItems = options.items(next);
@@ -130,9 +132,11 @@ export function withIapPresentation<S extends object>(options: {
130
132
  };
131
133
  try {
132
134
  const next = reduce(state, ...args);
133
- // Keep synchronous sidecars synchronous. Adding an await lets their old
134
- // catalog snapshot commit after a newer asynchronous refresh.
135
- if (content || (next && typeof (next as Promise<S | undefined>).then === "function")) {
135
+ // A cached read projection must commit before another onAppear can consume it.
136
+ // Other content actions retain their scheduling: shop filters and panels can
137
+ // change while a load is pending, and their existing completion order matters.
138
+ const synchronousReadProjection = action === "readChanged" && !!definition.readLifecycle;
139
+ if ((content && !synchronousReadProjection) || (next && typeof (next as Promise<S | undefined>).then === "function")) {
136
140
  return (async () => {
137
141
  try { return presentResult(await next); }
138
142
  finally { finished(); }
@@ -250,7 +250,7 @@ interface State {
250
250
  hideFeaturedSkeleton: boolean;
251
251
  welcome: string;
252
252
  refreshedAt: string;
253
- /** The resolved home layout preset (RFC 0045 FragmentSlot discriminator).
253
+ /** The resolved home layout preset (shared slot discriminator).
254
254
  * Plain string, never a proto enum — a `$service:` casePath decodes it as a
255
255
  * JSON string and unknown values fall through to the shipped defaultCase. */
256
256
  effectiveLayout: string;
@@ -584,7 +584,7 @@ const SCREENS = runtimeSetting({
584
584
  "package": "himalaya",
585
585
  "type": "Text",
586
586
  "props": {
587
- "text": "Showing saved offline results · may be outdated",
587
+ "text": "Showing previously loaded content · may be outdated",
588
588
  "style": "caption",
589
589
  "color": "textSecondary"
590
590
  }
@@ -3938,7 +3938,7 @@ const SCREENS = runtimeSetting({
3938
3938
  "package": "himalaya",
3939
3939
  "type": "Text",
3940
3940
  "props": {
3941
- "text": "Showing saved offline results · may be outdated",
3941
+ "text": "Showing previously loaded content · may be outdated",
3942
3942
  "style": "caption",
3943
3943
  "color": "textSecondary"
3944
3944
  }
@@ -7205,7 +7205,7 @@ const SCREENS = runtimeSetting({
7205
7205
  "package": "himalaya",
7206
7206
  "type": "Text",
7207
7207
  "props": {
7208
- "text": "Showing saved offline results · may be outdated",
7208
+ "text": "Showing previously loaded content · may be outdated",
7209
7209
  "style": "caption",
7210
7210
  "color": "textSecondary"
7211
7211
  }
@@ -10379,7 +10379,7 @@ const SCREENS = runtimeSetting({
10379
10379
  "package": "himalaya",
10380
10380
  "type": "Text",
10381
10381
  "props": {
10382
- "text": "Showing saved offline results · may be outdated",
10382
+ "text": "Showing previously loaded content · may be outdated",
10383
10383
  "style": "caption",
10384
10384
  "color": "textSecondary"
10385
10385
  }
@@ -13733,7 +13733,7 @@ const SCREENS = runtimeSetting({
13733
13733
  "package": "himalaya",
13734
13734
  "type": "Text",
13735
13735
  "props": {
13736
- "text": "Showing saved offline results · may be outdated",
13736
+ "text": "Showing previously loaded content · may be outdated",
13737
13737
  "style": "caption",
13738
13738
  "color": "textSecondary"
13739
13739
  }
@@ -17087,7 +17087,7 @@ const SCREENS = runtimeSetting({
17087
17087
  "package": "himalaya",
17088
17088
  "type": "Text",
17089
17089
  "props": {
17090
- "text": "Showing saved offline results · may be outdated",
17090
+ "text": "Showing previously loaded content · may be outdated",
17091
17091
  "style": "caption",
17092
17092
  "color": "textSecondary"
17093
17093
  }
@@ -20441,7 +20441,7 @@ const SCREENS = runtimeSetting({
20441
20441
  "package": "himalaya",
20442
20442
  "type": "Text",
20443
20443
  "props": {
20444
- "text": "Showing saved offline results · may be outdated",
20444
+ "text": "Showing previously loaded content · may be outdated",
20445
20445
  "style": "caption",
20446
20446
  "color": "textSecondary"
20447
20447
  }
@@ -23795,7 +23795,7 @@ const SCREENS = runtimeSetting({
23795
23795
  "package": "himalaya",
23796
23796
  "type": "Text",
23797
23797
  "props": {
23798
- "text": "Showing saved offline results · may be outdated",
23798
+ "text": "Showing previously loaded content · may be outdated",
23799
23799
  "style": "caption",
23800
23800
  "color": "textSecondary"
23801
23801
  }
@@ -27149,7 +27149,7 @@ const SCREENS = runtimeSetting({
27149
27149
  "package": "himalaya",
27150
27150
  "type": "Text",
27151
27151
  "props": {
27152
- "text": "Showing saved offline results · may be outdated",
27152
+ "text": "Showing previously loaded content · may be outdated",
27153
27153
  "style": "caption",
27154
27154
  "color": "textSecondary"
27155
27155
  }
@@ -30503,7 +30503,7 @@ const SCREENS = runtimeSetting({
30503
30503
  "package": "himalaya",
30504
30504
  "type": "Text",
30505
30505
  "props": {
30506
- "text": "Showing saved offline results · may be outdated",
30506
+ "text": "Showing previously loaded content · may be outdated",
30507
30507
  "style": "caption",
30508
30508
  "color": "textSecondary"
30509
30509
  }
@@ -33770,7 +33770,7 @@ const SCREENS = runtimeSetting({
33770
33770
  "package": "himalaya",
33771
33771
  "type": "Text",
33772
33772
  "props": {
33773
- "text": "Showing saved offline results · may be outdated",
33773
+ "text": "Showing previously loaded content · may be outdated",
33774
33774
  "style": "caption",
33775
33775
  "color": "textSecondary"
33776
33776
  }
@@ -36944,7 +36944,7 @@ const SCREENS = runtimeSetting({
36944
36944
  "package": "himalaya",
36945
36945
  "type": "Text",
36946
36946
  "props": {
36947
- "text": "Showing saved offline results · may be outdated",
36947
+ "text": "Showing previously loaded content · may be outdated",
36948
36948
  "style": "caption",
36949
36949
  "color": "textSecondary"
36950
36950
  }
@@ -40298,7 +40298,7 @@ const SCREENS = runtimeSetting({
40298
40298
  "package": "himalaya",
40299
40299
  "type": "Text",
40300
40300
  "props": {
40301
- "text": "Showing saved offline results · may be outdated",
40301
+ "text": "Showing previously loaded content · may be outdated",
40302
40302
  "style": "caption",
40303
40303
  "color": "textSecondary"
40304
40304
  }
@@ -43652,7 +43652,7 @@ const SCREENS = runtimeSetting({
43652
43652
  "package": "himalaya",
43653
43653
  "type": "Text",
43654
43654
  "props": {
43655
- "text": "Showing saved offline results · may be outdated",
43655
+ "text": "Showing previously loaded content · may be outdated",
43656
43656
  "style": "caption",
43657
43657
  "color": "textSecondary"
43658
43658
  }
@@ -46919,7 +46919,7 @@ const SCREENS = runtimeSetting({
46919
46919
  "package": "himalaya",
46920
46920
  "type": "Text",
46921
46921
  "props": {
46922
- "text": "Showing saved offline results · may be outdated",
46922
+ "text": "Showing previously loaded content · may be outdated",
46923
46923
  "style": "caption",
46924
46924
  "color": "textSecondary"
46925
46925
  }
@@ -68151,7 +68151,7 @@ const SCREENS = runtimeSetting({
68151
68151
  "package": "himalaya",
68152
68152
  "type": "Text",
68153
68153
  "props": {
68154
- "text": "Showing saved offline results · may be outdated",
68154
+ "text": "Showing previously loaded content · may be outdated",
68155
68155
  "style": "caption",
68156
68156
  "color": "textSecondary"
68157
68157
  }
@@ -70680,7 +70680,7 @@ const SCREENS = runtimeSetting({
70680
70680
  "package": "himalaya",
70681
70681
  "type": "Text",
70682
70682
  "props": {
70683
- "text": "Showing saved offline results · may be outdated",
70683
+ "text": "Showing previously loaded content · may be outdated",
70684
70684
  "style": "caption",
70685
70685
  "color": "textSecondary"
70686
70686
  }
@@ -73215,7 +73215,7 @@ const SCREENS = runtimeSetting({
73215
73215
  "package": "himalaya",
73216
73216
  "type": "Text",
73217
73217
  "props": {
73218
- "text": "Showing saved offline results · may be outdated",
73218
+ "text": "Showing previously loaded content · may be outdated",
73219
73219
  "style": "caption",
73220
73220
  "color": "textSecondary"
73221
73221
  }