@wix/himalaya-cli 0.1747.0 → 0.1748.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 (221) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +34 -8
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +45 -18
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +36 -14
  4. package/dist/cli.mjs +2498 -1816
  5. package/guides/one-app-to-himi-app.md +11 -6
  6. package/guides/wix-business-context.md +25 -1
  7. package/guides/wix-site-to-himi-app.md +2 -1
  8. package/package.json +2 -2
  9. package/templates/beauty-salon/l10n/fr.json +25 -5
  10. package/templates/beauty-salon/l10n/he.json +20 -4
  11. package/templates/beauty-salon/recipes/blog-hero.json +95 -0
  12. package/templates/beauty-salon/recipes/blog-list-thumb-start.json +177 -147
  13. package/templates/beauty-salon/recipes/blog-list.json +172 -142
  14. package/templates/beauty-salon/recipes/events-inline-list.json +30 -5
  15. package/templates/beauty-salon/recipes/events-inline.json +30 -5
  16. package/templates/beauty-salon/recipes/faq-list.json +503 -0
  17. package/templates/beauty-salon/recipes/groups-list.json +196 -0
  18. package/templates/beauty-salon/recipes/products-carousel.json +141 -0
  19. package/templates/beauty-salon/recipes/products-grid.json +143 -0
  20. package/templates/beauty-salon/tier5-src/_shared/blog-list.ts +9 -9
  21. package/templates/beauty-salon/tier5-src/_shared/events-inline.ts +7 -5
  22. package/templates/beauty-salon/tier5-src/_shared/faq-list.ts +405 -0
  23. package/templates/beauty-salon/tier5-src/_shared/groups-section.ts +110 -0
  24. package/templates/beauty-salon/tier5-src/_shared/member-row-extras.ts +10 -2
  25. package/templates/beauty-salon/tier5-src/_shared/members-directory.ts +9 -5
  26. package/templates/beauty-salon/tier5-src/_shared/products-section.ts +76 -0
  27. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +2 -2
  28. package/templates/branded-lite/l10n/fr.json +10 -5
  29. package/templates/branded-lite/l10n/he.json +8 -4
  30. package/templates/branded-lite/recipes/blog-hero.json +95 -0
  31. package/templates/branded-lite/recipes/blog-list-thumb-start.json +177 -147
  32. package/templates/branded-lite/recipes/blog-list.json +172 -142
  33. package/templates/branded-lite/recipes/events-inline-list.json +30 -5
  34. package/templates/branded-lite/recipes/events-inline.json +30 -5
  35. package/templates/branded-lite/recipes/faq-list.json +503 -0
  36. package/templates/branded-lite/recipes/groups-list.json +196 -0
  37. package/templates/branded-lite/recipes/products-carousel.json +141 -0
  38. package/templates/branded-lite/recipes/products-grid.json +143 -0
  39. package/templates/branded-lite/tier5-src/_shared/blog-list.ts +9 -9
  40. package/templates/branded-lite/tier5-src/_shared/events-inline.ts +7 -5
  41. package/templates/branded-lite/tier5-src/_shared/faq-list.ts +405 -0
  42. package/templates/branded-lite/tier5-src/_shared/groups-section.ts +110 -0
  43. package/templates/branded-lite/tier5-src/_shared/member-row-extras.ts +10 -2
  44. package/templates/branded-lite/tier5-src/_shared/members-directory.ts +9 -5
  45. package/templates/branded-lite/tier5-src/_shared/products-section.ts +76 -0
  46. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +2 -2
  47. package/templates/branded-lite/tier5-src/himi-branded-lite-faq/index.ts +5 -369
  48. package/templates/brandy/README.md +46 -5
  49. package/templates/brandy/config.ts +11 -0
  50. package/templates/brandy/himalaya.template.json +1 -1
  51. package/templates/community-club/l10n/fr.json +25 -5
  52. package/templates/community-club/l10n/he.json +20 -4
  53. package/templates/community-club/recipes/blog-hero.json +95 -0
  54. package/templates/community-club/recipes/blog-list-thumb-start.json +177 -147
  55. package/templates/community-club/recipes/blog-list.json +172 -142
  56. package/templates/community-club/recipes/events-inline-list.json +30 -5
  57. package/templates/community-club/recipes/events-inline.json +30 -5
  58. package/templates/community-club/recipes/faq-list.json +503 -0
  59. package/templates/community-club/recipes/groups-list.json +196 -0
  60. package/templates/community-club/recipes/products-carousel.json +141 -0
  61. package/templates/community-club/recipes/products-grid.json +143 -0
  62. package/templates/community-club/tier5-src/_shared/blog-list.ts +9 -9
  63. package/templates/community-club/tier5-src/_shared/events-inline.ts +7 -5
  64. package/templates/community-club/tier5-src/_shared/faq-list.ts +405 -0
  65. package/templates/community-club/tier5-src/_shared/groups-section.ts +110 -0
  66. package/templates/community-club/tier5-src/_shared/member-row-extras.ts +10 -2
  67. package/templates/community-club/tier5-src/_shared/members-directory.ts +9 -5
  68. package/templates/community-club/tier5-src/_shared/products-section.ts +76 -0
  69. package/templates/community-club/tier5-src/_shared/programs-section.ts +2 -2
  70. package/templates/events-meetups/l10n/fr.json +25 -5
  71. package/templates/events-meetups/l10n/he.json +20 -4
  72. package/templates/events-meetups/recipes/blog-hero.json +95 -0
  73. package/templates/events-meetups/recipes/blog-list-thumb-start.json +177 -147
  74. package/templates/events-meetups/recipes/blog-list.json +172 -142
  75. package/templates/events-meetups/recipes/events-inline-list.json +30 -5
  76. package/templates/events-meetups/recipes/events-inline.json +30 -5
  77. package/templates/events-meetups/recipes/faq-list.json +503 -0
  78. package/templates/events-meetups/recipes/groups-list.json +196 -0
  79. package/templates/events-meetups/recipes/products-carousel.json +141 -0
  80. package/templates/events-meetups/recipes/products-grid.json +143 -0
  81. package/templates/events-meetups/tier5-src/_shared/blog-list.ts +9 -9
  82. package/templates/events-meetups/tier5-src/_shared/events-inline.ts +7 -5
  83. package/templates/events-meetups/tier5-src/_shared/faq-list.ts +405 -0
  84. package/templates/events-meetups/tier5-src/_shared/groups-section.ts +110 -0
  85. package/templates/events-meetups/tier5-src/_shared/member-row-extras.ts +10 -2
  86. package/templates/events-meetups/tier5-src/_shared/members-directory.ts +9 -5
  87. package/templates/events-meetups/tier5-src/_shared/products-section.ts +76 -0
  88. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +2 -2
  89. package/templates/gym-fitness/l10n/fr.json +25 -5
  90. package/templates/gym-fitness/l10n/he.json +20 -4
  91. package/templates/gym-fitness/recipes/blog-hero.json +95 -0
  92. package/templates/gym-fitness/recipes/blog-list-thumb-start.json +177 -147
  93. package/templates/gym-fitness/recipes/blog-list.json +172 -142
  94. package/templates/gym-fitness/recipes/events-inline-list.json +30 -5
  95. package/templates/gym-fitness/recipes/events-inline.json +30 -5
  96. package/templates/gym-fitness/recipes/faq-list.json +503 -0
  97. package/templates/gym-fitness/recipes/groups-list.json +196 -0
  98. package/templates/gym-fitness/recipes/products-carousel.json +141 -0
  99. package/templates/gym-fitness/recipes/products-grid.json +143 -0
  100. package/templates/gym-fitness/tier5-src/_shared/blog-list.ts +9 -9
  101. package/templates/gym-fitness/tier5-src/_shared/events-inline.ts +7 -5
  102. package/templates/gym-fitness/tier5-src/_shared/faq-list.ts +405 -0
  103. package/templates/gym-fitness/tier5-src/_shared/groups-section.ts +110 -0
  104. package/templates/gym-fitness/tier5-src/_shared/member-row-extras.ts +10 -2
  105. package/templates/gym-fitness/tier5-src/_shared/members-directory.ts +9 -5
  106. package/templates/gym-fitness/tier5-src/_shared/products-section.ts +76 -0
  107. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +2 -2
  108. package/templates/nonprofit-cause/l10n/fr.json +25 -5
  109. package/templates/nonprofit-cause/l10n/he.json +20 -4
  110. package/templates/nonprofit-cause/recipes/blog-hero.json +95 -0
  111. package/templates/nonprofit-cause/recipes/blog-list-thumb-start.json +177 -147
  112. package/templates/nonprofit-cause/recipes/blog-list.json +172 -142
  113. package/templates/nonprofit-cause/recipes/events-inline-list.json +30 -5
  114. package/templates/nonprofit-cause/recipes/events-inline.json +30 -5
  115. package/templates/nonprofit-cause/recipes/faq-list.json +503 -0
  116. package/templates/nonprofit-cause/recipes/groups-list.json +196 -0
  117. package/templates/nonprofit-cause/recipes/products-carousel.json +141 -0
  118. package/templates/nonprofit-cause/recipes/products-grid.json +143 -0
  119. package/templates/nonprofit-cause/tier5-src/_shared/blog-list.ts +9 -9
  120. package/templates/nonprofit-cause/tier5-src/_shared/events-inline.ts +7 -5
  121. package/templates/nonprofit-cause/tier5-src/_shared/faq-list.ts +405 -0
  122. package/templates/nonprofit-cause/tier5-src/_shared/groups-section.ts +110 -0
  123. package/templates/nonprofit-cause/tier5-src/_shared/member-row-extras.ts +10 -2
  124. package/templates/nonprofit-cause/tier5-src/_shared/members-directory.ts +9 -5
  125. package/templates/nonprofit-cause/tier5-src/_shared/products-section.ts +76 -0
  126. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +2 -2
  127. package/templates/podcast-creator/l10n/fr.json +35 -5
  128. package/templates/podcast-creator/l10n/he.json +28 -4
  129. package/templates/podcast-creator/recipes/blog-hero.json +95 -0
  130. package/templates/podcast-creator/recipes/blog-list-thumb-start.json +177 -147
  131. package/templates/podcast-creator/recipes/blog-list.json +172 -142
  132. package/templates/podcast-creator/recipes/events-inline-list.json +30 -5
  133. package/templates/podcast-creator/recipes/events-inline.json +30 -5
  134. package/templates/podcast-creator/recipes/faq-list.json +503 -0
  135. package/templates/podcast-creator/recipes/groups-list.json +196 -0
  136. package/templates/podcast-creator/recipes/products-carousel.json +141 -0
  137. package/templates/podcast-creator/recipes/products-grid.json +143 -0
  138. package/templates/podcast-creator/tier5-src/_shared/blog-list.ts +9 -9
  139. package/templates/podcast-creator/tier5-src/_shared/events-inline.ts +7 -5
  140. package/templates/podcast-creator/tier5-src/_shared/faq-list.ts +405 -0
  141. package/templates/podcast-creator/tier5-src/_shared/groups-section.ts +110 -0
  142. package/templates/podcast-creator/tier5-src/_shared/member-row-extras.ts +10 -2
  143. package/templates/podcast-creator/tier5-src/_shared/members-directory.ts +9 -5
  144. package/templates/podcast-creator/tier5-src/_shared/products-section.ts +76 -0
  145. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +2 -2
  146. package/templates/portfolio-creative/l10n/fr.json +25 -5
  147. package/templates/portfolio-creative/l10n/he.json +20 -4
  148. package/templates/portfolio-creative/recipes/blog-hero.json +95 -0
  149. package/templates/portfolio-creative/recipes/blog-list-thumb-start.json +177 -147
  150. package/templates/portfolio-creative/recipes/blog-list.json +172 -142
  151. package/templates/portfolio-creative/recipes/events-inline-list.json +30 -5
  152. package/templates/portfolio-creative/recipes/events-inline.json +30 -5
  153. package/templates/portfolio-creative/recipes/faq-list.json +503 -0
  154. package/templates/portfolio-creative/recipes/groups-list.json +196 -0
  155. package/templates/portfolio-creative/recipes/products-carousel.json +141 -0
  156. package/templates/portfolio-creative/recipes/products-grid.json +143 -0
  157. package/templates/portfolio-creative/tier5-src/_shared/blog-list.ts +9 -9
  158. package/templates/portfolio-creative/tier5-src/_shared/events-inline.ts +7 -5
  159. package/templates/portfolio-creative/tier5-src/_shared/faq-list.ts +405 -0
  160. package/templates/portfolio-creative/tier5-src/_shared/groups-section.ts +110 -0
  161. package/templates/portfolio-creative/tier5-src/_shared/member-row-extras.ts +10 -2
  162. package/templates/portfolio-creative/tier5-src/_shared/members-directory.ts +9 -5
  163. package/templates/portfolio-creative/tier5-src/_shared/products-section.ts +76 -0
  164. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +2 -2
  165. package/templates/restaurant/l10n/fr.json +35 -5
  166. package/templates/restaurant/l10n/he.json +28 -4
  167. package/templates/restaurant/recipes/blog-hero.json +95 -0
  168. package/templates/restaurant/recipes/blog-list-thumb-start.json +177 -147
  169. package/templates/restaurant/recipes/blog-list.json +172 -142
  170. package/templates/restaurant/recipes/events-inline-list.json +30 -5
  171. package/templates/restaurant/recipes/events-inline.json +30 -5
  172. package/templates/restaurant/recipes/faq-list.json +503 -0
  173. package/templates/restaurant/recipes/groups-list.json +196 -0
  174. package/templates/restaurant/recipes/products-carousel.json +141 -0
  175. package/templates/restaurant/recipes/products-grid.json +143 -0
  176. package/templates/restaurant/tier5-src/_shared/blog-list.ts +9 -9
  177. package/templates/restaurant/tier5-src/_shared/events-inline.ts +7 -5
  178. package/templates/restaurant/tier5-src/_shared/faq-list.ts +405 -0
  179. package/templates/restaurant/tier5-src/_shared/groups-section.ts +110 -0
  180. package/templates/restaurant/tier5-src/_shared/member-row-extras.ts +10 -2
  181. package/templates/restaurant/tier5-src/_shared/members-directory.ts +9 -5
  182. package/templates/restaurant/tier5-src/_shared/products-section.ts +76 -0
  183. package/templates/restaurant/tier5-src/_shared/programs-section.ts +2 -2
  184. package/templates/retail-store/l10n/fr.json +25 -5
  185. package/templates/retail-store/l10n/he.json +20 -4
  186. package/templates/retail-store/recipes/blog-hero.json +95 -0
  187. package/templates/retail-store/recipes/blog-list-thumb-start.json +177 -147
  188. package/templates/retail-store/recipes/blog-list.json +172 -142
  189. package/templates/retail-store/recipes/events-inline-list.json +30 -5
  190. package/templates/retail-store/recipes/events-inline.json +30 -5
  191. package/templates/retail-store/recipes/faq-list.json +503 -0
  192. package/templates/retail-store/recipes/groups-list.json +196 -0
  193. package/templates/retail-store/recipes/products-carousel.json +141 -0
  194. package/templates/retail-store/recipes/products-grid.json +143 -0
  195. package/templates/retail-store/tier5-src/_shared/blog-list.ts +9 -9
  196. package/templates/retail-store/tier5-src/_shared/events-inline.ts +7 -5
  197. package/templates/retail-store/tier5-src/_shared/faq-list.ts +405 -0
  198. package/templates/retail-store/tier5-src/_shared/groups-section.ts +110 -0
  199. package/templates/retail-store/tier5-src/_shared/member-row-extras.ts +10 -2
  200. package/templates/retail-store/tier5-src/_shared/members-directory.ts +9 -5
  201. package/templates/retail-store/tier5-src/_shared/products-section.ts +76 -0
  202. package/templates/retail-store/tier5-src/_shared/programs-section.ts +2 -2
  203. package/templates/yoga-studio/l10n/fr.json +35 -5
  204. package/templates/yoga-studio/l10n/he.json +28 -4
  205. package/templates/yoga-studio/recipes/blog-hero.json +95 -0
  206. package/templates/yoga-studio/recipes/blog-list-thumb-start.json +177 -147
  207. package/templates/yoga-studio/recipes/blog-list.json +172 -142
  208. package/templates/yoga-studio/recipes/events-inline-list.json +30 -5
  209. package/templates/yoga-studio/recipes/events-inline.json +30 -5
  210. package/templates/yoga-studio/recipes/faq-list.json +503 -0
  211. package/templates/yoga-studio/recipes/groups-list.json +196 -0
  212. package/templates/yoga-studio/recipes/products-carousel.json +141 -0
  213. package/templates/yoga-studio/recipes/products-grid.json +143 -0
  214. package/templates/yoga-studio/tier5-src/_shared/blog-list.ts +9 -9
  215. package/templates/yoga-studio/tier5-src/_shared/events-inline.ts +7 -5
  216. package/templates/yoga-studio/tier5-src/_shared/faq-list.ts +405 -0
  217. package/templates/yoga-studio/tier5-src/_shared/groups-section.ts +110 -0
  218. package/templates/yoga-studio/tier5-src/_shared/member-row-extras.ts +10 -2
  219. package/templates/yoga-studio/tier5-src/_shared/members-directory.ts +9 -5
  220. package/templates/yoga-studio/tier5-src/_shared/products-section.ts +76 -0
  221. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +2 -2
@@ -0,0 +1,196 @@
1
+ {
2
+ "_recipe": "A page's groups: a list of rows (cover, name, teaser, member count; a tap opens the group), the section's own View All button when there are more groups than it shows, and the empty text. ONE node, always mounted. Service: registerGroupsSection(svc, { groupIds, limit }).",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerGroupsSection",
5
+ "id": "unique node id prefix for this section",
6
+ "detailScreen": "group screen id, himi_group",
7
+ "seeAllLabel": "the View All button's label (the source's own expand text)",
8
+ "seeAllScreen": "the screen View All opens, himi_groups"
9
+ },
10
+ "node": {
11
+ "id": "{{id}}.groups",
12
+ "body": {
13
+ "package": "himalaya",
14
+ "type": "VStack",
15
+ "props": {
16
+ "spacing": 12,
17
+ "alignment": "leading",
18
+ "children": [
19
+ {
20
+ "id": "{{id}}.loading",
21
+ "body": {
22
+ "package": "himalaya",
23
+ "type": "Skeleton",
24
+ "props": {
25
+ "height": 72,
26
+ "count": 3,
27
+ "cornerRadius": 12
28
+ }
29
+ },
30
+ "modifiers": {
31
+ "padding": {
32
+ "leading": 0,
33
+ "trailing": 0,
34
+ "top": 0,
35
+ "bottom": 0
36
+ },
37
+ "hiddenPath": "$service:{{svc}}.notLoading"
38
+ }
39
+ },
40
+ {
41
+ "id": "{{id}}.list",
42
+ "body": {
43
+ "package": "himalaya",
44
+ "type": "LazyList",
45
+ "props": {
46
+ "spacing": 12,
47
+ "itemsPath": "$service:{{svc}}.rows",
48
+ "items": [
49
+ {
50
+ "id": "{{id}}.row",
51
+ "body": {
52
+ "package": "himalaya",
53
+ "type": "HStack",
54
+ "props": {
55
+ "spacing": 12,
56
+ "alignment": "center",
57
+ "children": [
58
+ {
59
+ "id": "{{id}}.cover",
60
+ "body": {
61
+ "package": "himalaya",
62
+ "type": "Image",
63
+ "props": {
64
+ "url": "$item.image",
65
+ "initials": "$item.initial",
66
+ "width": 72,
67
+ "height": 72,
68
+ "shape": "rounded",
69
+ "contentMode": "fill",
70
+ "contentDescription": "$item.title"
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "id": "{{id}}.text",
76
+ "body": {
77
+ "package": "himalaya",
78
+ "type": "VStack",
79
+ "props": {
80
+ "spacing": 4,
81
+ "alignment": "leading",
82
+ "children": [
83
+ {
84
+ "id": "{{id}}.title",
85
+ "body": {
86
+ "package": "himalaya",
87
+ "type": "Text",
88
+ "props": {
89
+ "text": "$item.title",
90
+ "style": "bodyEmphasis",
91
+ "maxLines": 2
92
+ }
93
+ }
94
+ },
95
+ {
96
+ "id": "{{id}}.subtitle",
97
+ "body": {
98
+ "package": "himalaya",
99
+ "type": "Text",
100
+ "props": {
101
+ "text": "$item.subtitle",
102
+ "style": "caption",
103
+ "maxLines": 2,
104
+ "color": "textSecondary"
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "id": "{{id}}.meta",
110
+ "body": {
111
+ "package": "himalaya",
112
+ "type": "Text",
113
+ "props": {
114
+ "text": "$item.meta",
115
+ "style": "caption",
116
+ "maxLines": 1,
117
+ "color": "textSecondary",
118
+ "collapseWhenEmpty": true
119
+ }
120
+ },
121
+ "modifiers": {
122
+ "hiddenPath": "$item.noMeta"
123
+ }
124
+ }
125
+ ]
126
+ }
127
+ },
128
+ "modifiers": {
129
+ "weight": 1
130
+ }
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ "modifiers": {
136
+ "fillMaxWidth": true,
137
+ "onTap": {
138
+ "actionId": "himi.open",
139
+ "params": {
140
+ "screenId": "{{detailScreen}}",
141
+ "id": "$item.id"
142
+ }
143
+ },
144
+ "pressFeedback": "scale",
145
+ "accessibilityLabel": "$item.title"
146
+ }
147
+ }
148
+ ]
149
+ }
150
+ }
151
+ },
152
+ {
153
+ "id": "{{id}}.more",
154
+ "body": {
155
+ "package": "himalaya",
156
+ "type": "Button",
157
+ "props": {
158
+ "title": "{{seeAllLabel}}",
159
+ "style": "secondary",
160
+ "size": "md",
161
+ "fullWidth": true,
162
+ "action": {
163
+ "actionId": "himi.open",
164
+ "params": {
165
+ "screenId": "{{seeAllScreen}}"
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "modifiers": {
171
+ "hiddenPath": "$service:{{svc}}.noMore"
172
+ }
173
+ },
174
+ {
175
+ "id": "{{id}}.empty",
176
+ "body": {
177
+ "package": "himalaya",
178
+ "type": "Text",
179
+ "props": {
180
+ "text": "$service:{{svc}}.emptyText",
181
+ "style": "body",
182
+ "color": "textSecondary"
183
+ }
184
+ },
185
+ "modifiers": {
186
+ "hiddenPath": "$service:{{svc}}.noEmpty"
187
+ }
188
+ }
189
+ ]
190
+ }
191
+ },
192
+ "modifiers": {
193
+ "fillMaxWidth": true
194
+ }
195
+ }
196
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "_recipe": "A rail of a collection's products, scrolling sideways. Tiles: image (initials when none), name, price; a tap opens the product. ONE node, always mounted. Service: registerProductsSection(svc, { categoryId, limit }); the section's See All button is placed beside it by the generator.",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerProductsSection",
5
+ "id": "unique node id prefix for this section"
6
+ },
7
+ "node": {
8
+ "id": "{{id}}.products",
9
+ "body": {
10
+ "package": "himalaya",
11
+ "type": "VStack",
12
+ "props": {
13
+ "spacing": 12,
14
+ "alignment": "leading",
15
+ "children": [
16
+ {
17
+ "id": "{{id}}.loading",
18
+ "body": {
19
+ "package": "himalaya",
20
+ "type": "Skeleton",
21
+ "props": {
22
+ "height": 220,
23
+ "count": 1,
24
+ "cornerRadius": 8
25
+ }
26
+ },
27
+ "modifiers": {
28
+ "padding": {
29
+ "leading": 0,
30
+ "trailing": 0,
31
+ "top": 0,
32
+ "bottom": 0
33
+ },
34
+ "hiddenPath": "$service:{{svc}}.notLoading"
35
+ }
36
+ },
37
+ {
38
+ "id": "{{id}}.rail",
39
+ "body": {
40
+ "package": "himalaya",
41
+ "type": "Carousel",
42
+ "props": {
43
+ "itemsPath": "$service:{{svc}}.rows",
44
+ "items": [
45
+ {
46
+ "id": "{{id}}.tile",
47
+ "body": {
48
+ "package": "himalaya",
49
+ "type": "VStack",
50
+ "props": {
51
+ "spacing": 8,
52
+ "alignment": "leading",
53
+ "children": [
54
+ {
55
+ "id": "",
56
+ "body": {
57
+ "package": "himalaya",
58
+ "type": "Image",
59
+ "props": {
60
+ "url": "$item.image",
61
+ "initials": "$item.initial",
62
+ "fillWidth": true,
63
+ "contentMode": "fill",
64
+ "contentDescription": "$item.name",
65
+ "aspectRatio": 1,
66
+ "shape": "rect"
67
+ }
68
+ },
69
+ "modifiers": {
70
+ "fillMaxWidth": true
71
+ }
72
+ },
73
+ {
74
+ "id": "",
75
+ "body": {
76
+ "package": "himalaya",
77
+ "type": "Text",
78
+ "props": {
79
+ "text": "$item.name",
80
+ "style": "bodyEmphasis",
81
+ "maxLines": 2
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "id": "",
87
+ "body": {
88
+ "package": "himalaya",
89
+ "type": "Text",
90
+ "props": {
91
+ "text": "$item.price",
92
+ "style": "caption",
93
+ "color": "accentPrimary",
94
+ "collapseWhenEmpty": true
95
+ }
96
+ }
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ "modifiers": {
102
+ "width": 156,
103
+ "onTap": {
104
+ "actionId": "himi.open",
105
+ "params": {
106
+ "screenId": "$item.detailScreenId",
107
+ "id": "$item.id"
108
+ }
109
+ },
110
+ "pressFeedback": "scale",
111
+ "haptic": "light",
112
+ "accessibilityLabel": "$item.name"
113
+ }
114
+ }
115
+ ]
116
+ }
117
+ },
118
+ "modifiers": {
119
+ "hiddenPath": "$service:{{svc}}.noRows"
120
+ }
121
+ },
122
+ {
123
+ "id": "{{id}}.empty",
124
+ "body": {
125
+ "package": "himalaya",
126
+ "type": "Text",
127
+ "props": {
128
+ "text": "$service:{{svc}}.emptyText",
129
+ "style": "body",
130
+ "color": "textSecondary"
131
+ }
132
+ },
133
+ "modifiers": {
134
+ "hiddenPath": "$service:{{svc}}.noEmpty"
135
+ }
136
+ }
137
+ ]
138
+ }
139
+ }
140
+ }
141
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "_recipe": "A two-column grid of a collection's first products. Tiles: image (initials when none), name, price; a tap opens the product. ONE node, always mounted. Service: registerProductsSection(svc, { categoryId, limit }); the section's See All button is placed beside it by the generator.",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerProductsSection",
5
+ "id": "unique node id prefix for this section"
6
+ },
7
+ "node": {
8
+ "id": "{{id}}.products",
9
+ "body": {
10
+ "package": "himalaya",
11
+ "type": "VStack",
12
+ "props": {
13
+ "spacing": 12,
14
+ "alignment": "leading",
15
+ "children": [
16
+ {
17
+ "id": "{{id}}.loading",
18
+ "body": {
19
+ "package": "himalaya",
20
+ "type": "Skeleton",
21
+ "props": {
22
+ "height": 220,
23
+ "count": 2,
24
+ "cornerRadius": 8
25
+ }
26
+ },
27
+ "modifiers": {
28
+ "padding": {
29
+ "leading": 0,
30
+ "trailing": 0,
31
+ "top": 0,
32
+ "bottom": 0
33
+ },
34
+ "hiddenPath": "$service:{{svc}}.notLoading"
35
+ }
36
+ },
37
+ {
38
+ "id": "{{id}}.grid",
39
+ "body": {
40
+ "package": "himalaya",
41
+ "type": "Grid",
42
+ "props": {
43
+ "columns": 2,
44
+ "spacing": 12,
45
+ "itemsPath": "$service:{{svc}}.rows",
46
+ "items": [
47
+ {
48
+ "id": "{{id}}.tile",
49
+ "body": {
50
+ "package": "himalaya",
51
+ "type": "VStack",
52
+ "props": {
53
+ "spacing": 8,
54
+ "alignment": "leading",
55
+ "children": [
56
+ {
57
+ "id": "",
58
+ "body": {
59
+ "package": "himalaya",
60
+ "type": "Image",
61
+ "props": {
62
+ "url": "$item.image",
63
+ "initials": "$item.initial",
64
+ "fillWidth": true,
65
+ "contentMode": "fill",
66
+ "contentDescription": "$item.name",
67
+ "aspectRatio": 1,
68
+ "shape": "rect"
69
+ }
70
+ },
71
+ "modifiers": {
72
+ "fillMaxWidth": true
73
+ }
74
+ },
75
+ {
76
+ "id": "",
77
+ "body": {
78
+ "package": "himalaya",
79
+ "type": "Text",
80
+ "props": {
81
+ "text": "$item.name",
82
+ "style": "bodyEmphasis",
83
+ "maxLines": 2
84
+ }
85
+ }
86
+ },
87
+ {
88
+ "id": "",
89
+ "body": {
90
+ "package": "himalaya",
91
+ "type": "Text",
92
+ "props": {
93
+ "text": "$item.price",
94
+ "style": "caption",
95
+ "color": "accentPrimary",
96
+ "collapseWhenEmpty": true
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ "modifiers": {
104
+ "fillMaxWidth": true,
105
+ "onTap": {
106
+ "actionId": "himi.open",
107
+ "params": {
108
+ "screenId": "$item.detailScreenId",
109
+ "id": "$item.id"
110
+ }
111
+ },
112
+ "pressFeedback": "scale",
113
+ "haptic": "light",
114
+ "accessibilityLabel": "$item.name"
115
+ }
116
+ }
117
+ ]
118
+ }
119
+ },
120
+ "modifiers": {
121
+ "hiddenPath": "$service:{{svc}}.noRows"
122
+ }
123
+ },
124
+ {
125
+ "id": "{{id}}.empty",
126
+ "body": {
127
+ "package": "himalaya",
128
+ "type": "Text",
129
+ "props": {
130
+ "text": "$service:{{svc}}.emptyText",
131
+ "style": "body",
132
+ "color": "textSecondary"
133
+ }
134
+ },
135
+ "modifiers": {
136
+ "hiddenPath": "$service:{{svc}}.noEmpty"
137
+ }
138
+ }
139
+ ]
140
+ }
141
+ }
142
+ }
143
+ }
@@ -8,7 +8,7 @@ import { defineService as register } from "@himalaya/state";
8
8
  import { queryPosts, type WixPost, type WixQueryPostsRequest } from "@himalaya/wix-blog";
9
9
  import { getPublicMember } from "@himalaya/wix-members";
10
10
  import { stashCopy, copyParam, copyPlural } from "./himi-copy.js";
11
- import { formatDateMedium } from "./engine-intl.js";
11
+ import { formatDateMedium, formatNumber } from "./engine-intl.js";
12
12
  import { relativeTime } from "./relative-time.js";
13
13
  import { coverOf } from "./himi-blog-post-row.js";
14
14
 
@@ -28,7 +28,7 @@ export interface BlogListOptions {
28
28
  }
29
29
 
30
30
  export interface Count { key: CountKey; icon: string; value: number; text: string }
31
- interface CountSlot { Icon: string; Text: string; has: boolean; no: boolean }
31
+ interface CountSlot { Icon: string; Text: string; Num: string; has: boolean; no: boolean }
32
32
 
33
33
  export interface BlogRow {
34
34
  id: string; title: string; cover: string; hasCover: boolean; noCover: boolean; initial: string;
@@ -36,9 +36,9 @@ export interface BlogRow {
36
36
  meta: string; hasMeta: boolean; noMeta: boolean;
37
37
  authorName: string; hasAuthor: boolean; noAuthor: boolean;
38
38
  counts: Count[]; hasCounts: boolean; noCounts: boolean;
39
- count1Icon: string; count1Text: string; hasCount1: boolean; noCount1: boolean;
40
- count2Icon: string; count2Text: string; hasCount2: boolean; noCount2: boolean;
41
- count3Icon: string; count3Text: string; hasCount3: boolean; noCount3: boolean;
39
+ count1Icon: string; count1Text: string; count1Num: string; hasCount1: boolean; noCount1: boolean;
40
+ count2Icon: string; count2Text: string; count2Num: string; hasCount2: boolean; noCount2: boolean;
41
+ count3Icon: string; count3Text: string; count3Num: string; hasCount3: boolean; noCount3: boolean;
42
42
  detailScreenId: string;
43
43
  }
44
44
 
@@ -88,7 +88,7 @@ export function countsOf(post: Post, show: BlogListOptions["show"], order: reado
88
88
 
89
89
  const slotOf = (counts: Count[], index: number): CountSlot => {
90
90
  const count = counts[index];
91
- return { Icon: count?.icon ?? "", Text: count?.text ?? "", has: !!count, no: !count };
91
+ return { Icon: count?.icon ?? "", Text: count?.text ?? "", Num: count ? formatNumber(count.value) : "", has: !!count, no: !count };
92
92
  };
93
93
 
94
94
  export function registerBlogList(serviceName: string, options: BlogListOptions) {
@@ -125,9 +125,9 @@ export function registerBlogList(serviceName: string, options: BlogListOptions)
125
125
  meta, hasMeta: !!meta, noMeta: !meta,
126
126
  authorName, hasAuthor: !!authorName, noAuthor: !authorName,
127
127
  counts, hasCounts: counts.length > 0, noCounts: counts.length === 0,
128
- count1Icon: one.Icon, count1Text: one.Text, hasCount1: one.has, noCount1: one.no,
129
- count2Icon: two.Icon, count2Text: two.Text, hasCount2: two.has, noCount2: two.no,
130
- count3Icon: three.Icon, count3Text: three.Text, hasCount3: three.has, noCount3: three.no,
128
+ count1Icon: one.Icon, count1Text: one.Text, count1Num: one.Num, hasCount1: one.has, noCount1: one.no,
129
+ count2Icon: two.Icon, count2Text: two.Text, count2Num: two.Num, hasCount2: two.has, noCount2: two.no,
130
+ count3Icon: three.Icon, count3Text: three.Text, count3Num: three.Num, hasCount3: three.has, noCount3: three.no,
131
131
  detailScreenId,
132
132
  };
133
133
  }
@@ -23,8 +23,8 @@ export interface EventsInlineState {
23
23
  isLoading: boolean; notLoading: boolean;
24
24
  isErrored: boolean; notErrored: boolean;
25
25
  hasRows: boolean; noRows: boolean;
26
- /** The empty line, "" while there are rows (the section collapses it). */
27
- emptyText: string; noEmpty: boolean;
26
+ /** The empty state's title and the line under it, "" while there are rows (the section collapses them). */
27
+ emptyText: string; emptyBody: string; noEmpty: boolean;
28
28
  noMore: boolean;
29
29
  }
30
30
 
@@ -42,7 +42,7 @@ function derive(state: Omit<EventsInlineState, "isLoading" | "notLoading" | "isE
42
42
 
43
43
  export function registerEventsInline(serviceName: string, options: EventsInlineOptions = {}) {
44
44
  const limit = eventsInlineLimit(options.limit);
45
- const initial = derive({ status: "loading", rows: [], hasMore: false, emptyText: "" });
45
+ const initial = derive({ status: "loading", rows: [], hasMore: false, emptyText: "", emptyBody: "" });
46
46
  return defineService<EventsInlineState, {
47
47
  load: (state: EventsInlineState, arg?: unknown) => Promise<EventsInlineState>;
48
48
  share: (state: EventsInlineState, arg?: unknown) => Promise<EventsInlineState>;
@@ -62,11 +62,13 @@ export function registerEventsInline(serviceName: string, options: EventsInlineO
62
62
  const total = (res as { pagingMetadata?: { total?: number } }).pagingMetadata?.total;
63
63
  return derive({
64
64
  status: "ready", rows, hasMore: typeof total === "number" ? total > rows.length : false,
65
- emptyText: rows.length ? "" : copyParam("eventsInline.empty", "No upcoming events."),
65
+ // The original One App's own empty state: a title and what the section will offer once there are events.
66
+ emptyText: rows.length ? "" : copyParam("eventsInline.emptyTitle", "No Events Yet"),
67
+ emptyBody: rows.length ? "" : copyParam("eventsInline.emptyBody", "Once we add new events you'll be able to RSVP and buy tickets for them here."),
66
68
  });
67
69
  } catch (error) {
68
70
  console.warn("events_inline: the events could not be read", error);
69
- return derive({ ...state, status: "error", rows: [], hasMore: false, emptyText: "" });
71
+ return derive({ ...state, status: "error", rows: [], hasMore: false, emptyText: "", emptyBody: "" });
70
72
  }
71
73
  },
72
74
  // Share one card's event: its title and date line, plus the event page when the payload carried one.