@wix/himalaya-cli 0.1762.0 → 0.1764.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 (693) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/file-share-client.d.ts +115 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/file-share-screen.d.ts +57 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/file-share-service.d.ts +441 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +1032 -117
  6. package/dist/cli.mjs +73447 -72087
  7. package/guides/base44-app-to-himi-app.md +56 -0
  8. package/guides/getting-started.md +2 -0
  9. package/guides/himi-json-output.md +35 -0
  10. package/guides/himi-skill.md +2 -0
  11. package/guides/index.json +6 -0
  12. package/guides/one-app-section-mappings.md +6 -6
  13. package/guides/one-app-to-himi-app.md +27 -4
  14. package/guides/push-cli-onboarding.md +25 -14
  15. package/guides/wix-file-share.md +168 -0
  16. package/guides/wix-site-to-himi-app.md +1 -0
  17. package/package.json +2 -2
  18. package/templates/beauty-salon/l10n/ar.json +9 -420
  19. package/templates/beauty-salon/l10n/cs.json +9 -420
  20. package/templates/beauty-salon/l10n/da.json +9 -420
  21. package/templates/beauty-salon/l10n/de.json +9 -420
  22. package/templates/beauty-salon/l10n/el.json +9 -420
  23. package/templates/beauty-salon/l10n/en.json +8 -61
  24. package/templates/beauty-salon/l10n/es.json +9 -420
  25. package/templates/beauty-salon/l10n/fi.json +9 -420
  26. package/templates/beauty-salon/l10n/fr.json +9 -420
  27. package/templates/beauty-salon/l10n/he.json +9 -338
  28. package/templates/beauty-salon/l10n/hu.json +9 -420
  29. package/templates/beauty-salon/l10n/id.json +9 -420
  30. package/templates/beauty-salon/l10n/it.json +9 -420
  31. package/templates/beauty-salon/l10n/ja.json +9 -420
  32. package/templates/beauty-salon/l10n/ko.json +9 -420
  33. package/templates/beauty-salon/l10n/lt.json +9 -420
  34. package/templates/beauty-salon/l10n/nl.json +9 -420
  35. package/templates/beauty-salon/l10n/no.json +9 -420
  36. package/templates/beauty-salon/l10n/pl.json +9 -420
  37. package/templates/beauty-salon/l10n/pt.json +9 -420
  38. package/templates/beauty-salon/l10n/ru.json +9 -420
  39. package/templates/beauty-salon/l10n/sv.json +9 -420
  40. package/templates/beauty-salon/l10n/th.json +9 -420
  41. package/templates/beauty-salon/l10n/tr.json +9 -420
  42. package/templates/beauty-salon/l10n/uk.json +9 -420
  43. package/templates/beauty-salon/l10n/vi.json +9 -420
  44. package/templates/beauty-salon/l10n/zh.json +9 -420
  45. package/templates/branded-lite/l10n/ar.json +31 -140
  46. package/templates/branded-lite/l10n/cs.json +31 -140
  47. package/templates/branded-lite/l10n/da.json +31 -140
  48. package/templates/branded-lite/l10n/de.json +31 -140
  49. package/templates/branded-lite/l10n/el.json +31 -140
  50. package/templates/branded-lite/l10n/en.json +8 -6
  51. package/templates/branded-lite/l10n/es.json +31 -140
  52. package/templates/branded-lite/l10n/fi.json +31 -140
  53. package/templates/branded-lite/l10n/fr.json +31 -140
  54. package/templates/branded-lite/l10n/he.json +27 -112
  55. package/templates/branded-lite/l10n/hu.json +31 -140
  56. package/templates/branded-lite/l10n/id.json +31 -140
  57. package/templates/branded-lite/l10n/it.json +31 -140
  58. package/templates/branded-lite/l10n/ja.json +31 -140
  59. package/templates/branded-lite/l10n/ko.json +31 -140
  60. package/templates/branded-lite/l10n/lt.json +31 -140
  61. package/templates/branded-lite/l10n/nl.json +31 -140
  62. package/templates/branded-lite/l10n/no.json +31 -140
  63. package/templates/branded-lite/l10n/pl.json +31 -140
  64. package/templates/branded-lite/l10n/pt.json +31 -140
  65. package/templates/branded-lite/l10n/ru.json +31 -140
  66. package/templates/branded-lite/l10n/sv.json +31 -140
  67. package/templates/branded-lite/l10n/th.json +31 -140
  68. package/templates/branded-lite/l10n/tr.json +31 -140
  69. package/templates/branded-lite/l10n/uk.json +31 -140
  70. package/templates/branded-lite/l10n/vi.json +31 -140
  71. package/templates/branded-lite/l10n/zh.json +31 -140
  72. package/templates/branded-lite/recipes/blog-search.json +45 -0
  73. package/templates/{beauty-salon/recipes/programs-participant-carousel.json → branded-lite/recipes/galleries-carousel.json} +39 -118
  74. package/templates/{gym-fitness/recipes/programs-participant-carousel.json → branded-lite/recipes/galleries-list.json} +43 -121
  75. package/templates/{beauty-salon/recipes/events-inline-list.json → branded-lite/recipes/group-feed.json} +112 -89
  76. package/templates/{events-meetups/recipes/programs-participant-carousel.json → branded-lite/recipes/groups-cards.json} +71 -93
  77. package/templates/{events-meetups/recipes/groups-list.json → branded-lite/recipes/services-list.json} +33 -9
  78. package/templates/{community-club/recipes/groups-list.json → branded-lite/recipes/subscriptions-list.json} +124 -60
  79. package/templates/branded-lite/recipes/upcoming-bookings.json +350 -0
  80. package/templates/branded-lite/recipes/videos-carousel.json +248 -0
  81. package/templates/branded-lite/tier5-src/_shared/blog-list.ts +75 -21
  82. package/templates/branded-lite/tier5-src/_shared/galleries-section.ts +115 -0
  83. package/templates/branded-lite/tier5-src/_shared/group-feed-section.ts +137 -0
  84. package/templates/branded-lite/tier5-src/_shared/groups-section.ts +7 -3
  85. package/templates/branded-lite/tier5-src/_shared/my-subscriptions-section.ts +107 -0
  86. package/templates/branded-lite/tier5-src/_shared/plans-section.ts +11 -3
  87. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +2 -0
  88. package/templates/branded-lite/tier5-src/_shared/services-section.ts +122 -0
  89. package/templates/branded-lite/tier5-src/_shared/upcoming-bookings-section.ts +102 -0
  90. package/templates/branded-lite/tier5-src/_shared/videos-section.ts +91 -0
  91. package/templates/branded-lite/tier5-src/himi-branded-lite-file-share/index.ts +8 -631
  92. package/templates/community-club/l10n/ar.json +0 -412
  93. package/templates/community-club/l10n/cs.json +0 -412
  94. package/templates/community-club/l10n/da.json +0 -412
  95. package/templates/community-club/l10n/de.json +0 -412
  96. package/templates/community-club/l10n/el.json +0 -412
  97. package/templates/community-club/l10n/en.json +1 -46
  98. package/templates/community-club/l10n/es.json +0 -412
  99. package/templates/community-club/l10n/fi.json +0 -412
  100. package/templates/community-club/l10n/fr.json +0 -412
  101. package/templates/community-club/l10n/he.json +0 -331
  102. package/templates/community-club/l10n/hu.json +0 -412
  103. package/templates/community-club/l10n/id.json +0 -412
  104. package/templates/community-club/l10n/it.json +0 -412
  105. package/templates/community-club/l10n/ja.json +0 -412
  106. package/templates/community-club/l10n/ko.json +0 -412
  107. package/templates/community-club/l10n/lt.json +0 -412
  108. package/templates/community-club/l10n/nl.json +0 -412
  109. package/templates/community-club/l10n/no.json +0 -412
  110. package/templates/community-club/l10n/pl.json +0 -412
  111. package/templates/community-club/l10n/pt.json +0 -412
  112. package/templates/community-club/l10n/ru.json +0 -412
  113. package/templates/community-club/l10n/sv.json +0 -412
  114. package/templates/community-club/l10n/th.json +0 -412
  115. package/templates/community-club/l10n/tr.json +0 -412
  116. package/templates/community-club/l10n/uk.json +0 -412
  117. package/templates/community-club/l10n/vi.json +0 -412
  118. package/templates/community-club/l10n/zh.json +0 -412
  119. package/templates/events-meetups/l10n/ar.json +0 -412
  120. package/templates/events-meetups/l10n/cs.json +0 -412
  121. package/templates/events-meetups/l10n/da.json +0 -412
  122. package/templates/events-meetups/l10n/de.json +0 -412
  123. package/templates/events-meetups/l10n/el.json +0 -412
  124. package/templates/events-meetups/l10n/en.json +1 -46
  125. package/templates/events-meetups/l10n/es.json +0 -412
  126. package/templates/events-meetups/l10n/fi.json +0 -412
  127. package/templates/events-meetups/l10n/fr.json +0 -412
  128. package/templates/events-meetups/l10n/he.json +0 -331
  129. package/templates/events-meetups/l10n/hu.json +0 -412
  130. package/templates/events-meetups/l10n/id.json +0 -412
  131. package/templates/events-meetups/l10n/it.json +0 -412
  132. package/templates/events-meetups/l10n/ja.json +0 -412
  133. package/templates/events-meetups/l10n/ko.json +0 -412
  134. package/templates/events-meetups/l10n/lt.json +0 -412
  135. package/templates/events-meetups/l10n/nl.json +0 -412
  136. package/templates/events-meetups/l10n/no.json +0 -412
  137. package/templates/events-meetups/l10n/pl.json +0 -412
  138. package/templates/events-meetups/l10n/pt.json +0 -412
  139. package/templates/events-meetups/l10n/ru.json +0 -412
  140. package/templates/events-meetups/l10n/sv.json +0 -412
  141. package/templates/events-meetups/l10n/th.json +0 -412
  142. package/templates/events-meetups/l10n/tr.json +0 -412
  143. package/templates/events-meetups/l10n/uk.json +0 -412
  144. package/templates/events-meetups/l10n/vi.json +0 -412
  145. package/templates/events-meetups/l10n/zh.json +0 -412
  146. package/templates/gym-fitness/l10n/ar.json +9 -405
  147. package/templates/gym-fitness/l10n/cs.json +9 -405
  148. package/templates/gym-fitness/l10n/da.json +9 -405
  149. package/templates/gym-fitness/l10n/de.json +9 -405
  150. package/templates/gym-fitness/l10n/el.json +9 -405
  151. package/templates/gym-fitness/l10n/en.json +8 -51
  152. package/templates/gym-fitness/l10n/es.json +9 -405
  153. package/templates/gym-fitness/l10n/fi.json +9 -405
  154. package/templates/gym-fitness/l10n/fr.json +9 -405
  155. package/templates/gym-fitness/l10n/he.json +9 -326
  156. package/templates/gym-fitness/l10n/hu.json +9 -405
  157. package/templates/gym-fitness/l10n/id.json +9 -405
  158. package/templates/gym-fitness/l10n/it.json +9 -405
  159. package/templates/gym-fitness/l10n/ja.json +9 -405
  160. package/templates/gym-fitness/l10n/ko.json +9 -405
  161. package/templates/gym-fitness/l10n/lt.json +9 -405
  162. package/templates/gym-fitness/l10n/nl.json +9 -405
  163. package/templates/gym-fitness/l10n/no.json +9 -405
  164. package/templates/gym-fitness/l10n/pl.json +9 -405
  165. package/templates/gym-fitness/l10n/pt.json +9 -405
  166. package/templates/gym-fitness/l10n/ru.json +9 -405
  167. package/templates/gym-fitness/l10n/sv.json +9 -405
  168. package/templates/gym-fitness/l10n/th.json +9 -405
  169. package/templates/gym-fitness/l10n/tr.json +9 -405
  170. package/templates/gym-fitness/l10n/uk.json +9 -405
  171. package/templates/gym-fitness/l10n/vi.json +9 -405
  172. package/templates/gym-fitness/l10n/zh.json +9 -405
  173. package/templates/nonprofit-cause/l10n/ar.json +0 -387
  174. package/templates/nonprofit-cause/l10n/cs.json +0 -387
  175. package/templates/nonprofit-cause/l10n/da.json +0 -387
  176. package/templates/nonprofit-cause/l10n/de.json +0 -387
  177. package/templates/nonprofit-cause/l10n/el.json +0 -387
  178. package/templates/nonprofit-cause/l10n/en.json +1 -46
  179. package/templates/nonprofit-cause/l10n/es.json +0 -387
  180. package/templates/nonprofit-cause/l10n/fi.json +0 -387
  181. package/templates/nonprofit-cause/l10n/fr.json +0 -387
  182. package/templates/nonprofit-cause/l10n/he.json +0 -311
  183. package/templates/nonprofit-cause/l10n/hu.json +0 -387
  184. package/templates/nonprofit-cause/l10n/id.json +0 -387
  185. package/templates/nonprofit-cause/l10n/it.json +0 -387
  186. package/templates/nonprofit-cause/l10n/ja.json +0 -387
  187. package/templates/nonprofit-cause/l10n/ko.json +0 -387
  188. package/templates/nonprofit-cause/l10n/lt.json +0 -387
  189. package/templates/nonprofit-cause/l10n/nl.json +0 -387
  190. package/templates/nonprofit-cause/l10n/no.json +0 -387
  191. package/templates/nonprofit-cause/l10n/pl.json +0 -387
  192. package/templates/nonprofit-cause/l10n/pt.json +0 -387
  193. package/templates/nonprofit-cause/l10n/ru.json +0 -387
  194. package/templates/nonprofit-cause/l10n/sv.json +0 -387
  195. package/templates/nonprofit-cause/l10n/th.json +0 -387
  196. package/templates/nonprofit-cause/l10n/tr.json +0 -387
  197. package/templates/nonprofit-cause/l10n/uk.json +0 -387
  198. package/templates/nonprofit-cause/l10n/vi.json +0 -387
  199. package/templates/nonprofit-cause/l10n/zh.json +0 -387
  200. package/templates/podcast-creator/l10n/ar.json +0 -417
  201. package/templates/podcast-creator/l10n/cs.json +0 -417
  202. package/templates/podcast-creator/l10n/da.json +0 -417
  203. package/templates/podcast-creator/l10n/de.json +0 -417
  204. package/templates/podcast-creator/l10n/el.json +0 -417
  205. package/templates/podcast-creator/l10n/en.json +1 -46
  206. package/templates/podcast-creator/l10n/es.json +0 -417
  207. package/templates/podcast-creator/l10n/fi.json +0 -417
  208. package/templates/podcast-creator/l10n/fr.json +0 -417
  209. package/templates/podcast-creator/l10n/he.json +0 -335
  210. package/templates/podcast-creator/l10n/hu.json +0 -417
  211. package/templates/podcast-creator/l10n/id.json +0 -417
  212. package/templates/podcast-creator/l10n/it.json +0 -417
  213. package/templates/podcast-creator/l10n/ja.json +0 -417
  214. package/templates/podcast-creator/l10n/ko.json +0 -417
  215. package/templates/podcast-creator/l10n/lt.json +0 -417
  216. package/templates/podcast-creator/l10n/nl.json +0 -417
  217. package/templates/podcast-creator/l10n/no.json +0 -417
  218. package/templates/podcast-creator/l10n/pl.json +0 -417
  219. package/templates/podcast-creator/l10n/pt.json +0 -417
  220. package/templates/podcast-creator/l10n/ru.json +0 -417
  221. package/templates/podcast-creator/l10n/sv.json +0 -417
  222. package/templates/podcast-creator/l10n/th.json +0 -417
  223. package/templates/podcast-creator/l10n/tr.json +0 -417
  224. package/templates/podcast-creator/l10n/uk.json +0 -417
  225. package/templates/podcast-creator/l10n/vi.json +0 -417
  226. package/templates/podcast-creator/l10n/zh.json +0 -417
  227. package/templates/portfolio-creative/l10n/ar.json +0 -437
  228. package/templates/portfolio-creative/l10n/cs.json +0 -437
  229. package/templates/portfolio-creative/l10n/da.json +0 -437
  230. package/templates/portfolio-creative/l10n/de.json +0 -437
  231. package/templates/portfolio-creative/l10n/el.json +0 -437
  232. package/templates/portfolio-creative/l10n/en.json +1 -46
  233. package/templates/portfolio-creative/l10n/es.json +0 -437
  234. package/templates/portfolio-creative/l10n/fi.json +0 -437
  235. package/templates/portfolio-creative/l10n/fr.json +0 -437
  236. package/templates/portfolio-creative/l10n/he.json +0 -351
  237. package/templates/portfolio-creative/l10n/hu.json +0 -437
  238. package/templates/portfolio-creative/l10n/id.json +0 -437
  239. package/templates/portfolio-creative/l10n/it.json +0 -437
  240. package/templates/portfolio-creative/l10n/ja.json +0 -437
  241. package/templates/portfolio-creative/l10n/ko.json +0 -437
  242. package/templates/portfolio-creative/l10n/lt.json +0 -437
  243. package/templates/portfolio-creative/l10n/nl.json +0 -437
  244. package/templates/portfolio-creative/l10n/no.json +0 -437
  245. package/templates/portfolio-creative/l10n/pl.json +0 -437
  246. package/templates/portfolio-creative/l10n/pt.json +0 -437
  247. package/templates/portfolio-creative/l10n/ru.json +0 -437
  248. package/templates/portfolio-creative/l10n/sv.json +0 -437
  249. package/templates/portfolio-creative/l10n/th.json +0 -437
  250. package/templates/portfolio-creative/l10n/tr.json +0 -437
  251. package/templates/portfolio-creative/l10n/uk.json +0 -437
  252. package/templates/portfolio-creative/l10n/vi.json +0 -437
  253. package/templates/portfolio-creative/l10n/zh.json +0 -437
  254. package/templates/restaurant/l10n/ar.json +0 -447
  255. package/templates/restaurant/l10n/cs.json +0 -447
  256. package/templates/restaurant/l10n/da.json +0 -447
  257. package/templates/restaurant/l10n/de.json +0 -447
  258. package/templates/restaurant/l10n/el.json +0 -447
  259. package/templates/restaurant/l10n/en.json +1 -46
  260. package/templates/restaurant/l10n/es.json +0 -447
  261. package/templates/restaurant/l10n/fi.json +0 -447
  262. package/templates/restaurant/l10n/fr.json +0 -447
  263. package/templates/restaurant/l10n/he.json +0 -359
  264. package/templates/restaurant/l10n/hu.json +0 -447
  265. package/templates/restaurant/l10n/id.json +0 -447
  266. package/templates/restaurant/l10n/it.json +0 -447
  267. package/templates/restaurant/l10n/ja.json +0 -447
  268. package/templates/restaurant/l10n/ko.json +0 -447
  269. package/templates/restaurant/l10n/lt.json +0 -447
  270. package/templates/restaurant/l10n/nl.json +0 -447
  271. package/templates/restaurant/l10n/no.json +0 -447
  272. package/templates/restaurant/l10n/pl.json +0 -447
  273. package/templates/restaurant/l10n/pt.json +0 -447
  274. package/templates/restaurant/l10n/ru.json +0 -447
  275. package/templates/restaurant/l10n/sv.json +0 -447
  276. package/templates/restaurant/l10n/th.json +0 -447
  277. package/templates/restaurant/l10n/tr.json +0 -447
  278. package/templates/restaurant/l10n/uk.json +0 -447
  279. package/templates/restaurant/l10n/vi.json +0 -447
  280. package/templates/restaurant/l10n/zh.json +0 -447
  281. package/templates/retail-store/l10n/ar.json +0 -462
  282. package/templates/retail-store/l10n/cs.json +0 -462
  283. package/templates/retail-store/l10n/da.json +0 -462
  284. package/templates/retail-store/l10n/de.json +0 -462
  285. package/templates/retail-store/l10n/el.json +0 -462
  286. package/templates/retail-store/l10n/en.json +1 -61
  287. package/templates/retail-store/l10n/es.json +0 -462
  288. package/templates/retail-store/l10n/fi.json +0 -462
  289. package/templates/retail-store/l10n/fr.json +0 -462
  290. package/templates/retail-store/l10n/he.json +0 -371
  291. package/templates/retail-store/l10n/hu.json +0 -462
  292. package/templates/retail-store/l10n/id.json +0 -462
  293. package/templates/retail-store/l10n/it.json +0 -462
  294. package/templates/retail-store/l10n/ja.json +0 -462
  295. package/templates/retail-store/l10n/ko.json +0 -462
  296. package/templates/retail-store/l10n/lt.json +0 -462
  297. package/templates/retail-store/l10n/nl.json +0 -462
  298. package/templates/retail-store/l10n/no.json +0 -462
  299. package/templates/retail-store/l10n/pl.json +0 -462
  300. package/templates/retail-store/l10n/pt.json +0 -462
  301. package/templates/retail-store/l10n/ru.json +0 -462
  302. package/templates/retail-store/l10n/sv.json +0 -462
  303. package/templates/retail-store/l10n/th.json +0 -462
  304. package/templates/retail-store/l10n/tr.json +0 -462
  305. package/templates/retail-store/l10n/uk.json +0 -462
  306. package/templates/retail-store/l10n/vi.json +0 -462
  307. package/templates/retail-store/l10n/zh.json +0 -462
  308. package/templates/yoga-studio/l10n/ar.json +9 -197
  309. package/templates/yoga-studio/l10n/cs.json +9 -197
  310. package/templates/yoga-studio/l10n/da.json +9 -197
  311. package/templates/yoga-studio/l10n/de.json +9 -197
  312. package/templates/yoga-studio/l10n/el.json +9 -197
  313. package/templates/yoga-studio/l10n/en.json +8 -30
  314. package/templates/yoga-studio/l10n/es.json +9 -197
  315. package/templates/yoga-studio/l10n/fi.json +9 -197
  316. package/templates/yoga-studio/l10n/fr.json +9 -197
  317. package/templates/yoga-studio/l10n/he.json +9 -159
  318. package/templates/yoga-studio/l10n/hu.json +9 -197
  319. package/templates/yoga-studio/l10n/id.json +9 -197
  320. package/templates/yoga-studio/l10n/it.json +9 -197
  321. package/templates/yoga-studio/l10n/ja.json +9 -197
  322. package/templates/yoga-studio/l10n/ko.json +9 -197
  323. package/templates/yoga-studio/l10n/lt.json +9 -197
  324. package/templates/yoga-studio/l10n/nl.json +9 -197
  325. package/templates/yoga-studio/l10n/no.json +9 -197
  326. package/templates/yoga-studio/l10n/pl.json +9 -197
  327. package/templates/yoga-studio/l10n/pt.json +9 -197
  328. package/templates/yoga-studio/l10n/ru.json +9 -197
  329. package/templates/yoga-studio/l10n/sv.json +9 -197
  330. package/templates/yoga-studio/l10n/th.json +9 -197
  331. package/templates/yoga-studio/l10n/tr.json +9 -197
  332. package/templates/yoga-studio/l10n/uk.json +9 -197
  333. package/templates/yoga-studio/l10n/vi.json +9 -197
  334. package/templates/yoga-studio/l10n/zh.json +9 -197
  335. package/templates/beauty-salon/recipes/announcement-card.json +0 -72
  336. package/templates/beauty-salon/recipes/blog-hero.json +0 -95
  337. package/templates/beauty-salon/recipes/blog-list-thumb-start.json +0 -394
  338. package/templates/beauty-salon/recipes/blog-list.json +0 -394
  339. package/templates/beauty-salon/recipes/blog-see-all.json +0 -50
  340. package/templates/beauty-salon/recipes/events-inline.json +0 -309
  341. package/templates/beauty-salon/recipes/faq-list.json +0 -503
  342. package/templates/beauty-salon/recipes/groups-list.json +0 -196
  343. package/templates/beauty-salon/recipes/members-list.json +0 -445
  344. package/templates/beauty-salon/recipes/plans-card.json +0 -811
  345. package/templates/beauty-salon/recipes/products-carousel.json +0 -141
  346. package/templates/beauty-salon/recipes/products-grid.json +0 -143
  347. package/templates/beauty-salon/recipes/programs-card.json +0 -254
  348. package/templates/beauty-salon/recipes/programs-carousel.json +0 -234
  349. package/templates/beauty-salon/recipes/programs-filters.json +0 -94
  350. package/templates/beauty-salon/recipes/programs-see-all.json +0 -43
  351. package/templates/beauty-salon/recipes/section-error.json +0 -58
  352. package/templates/beauty-salon/tier5-src/_shared/announcement-section.ts +0 -122
  353. package/templates/beauty-salon/tier5-src/_shared/blog-list.ts +0 -207
  354. package/templates/beauty-salon/tier5-src/_shared/event-registration.ts +0 -86
  355. package/templates/beauty-salon/tier5-src/_shared/events-card.ts +0 -33
  356. package/templates/beauty-salon/tier5-src/_shared/events-inline-options.ts +0 -25
  357. package/templates/beauty-salon/tier5-src/_shared/events-inline.ts +0 -84
  358. package/templates/beauty-salon/tier5-src/_shared/faq-list.ts +0 -405
  359. package/templates/beauty-salon/tier5-src/_shared/groups-section.ts +0 -110
  360. package/templates/beauty-salon/tier5-src/_shared/member-activity.ts +0 -34
  361. package/templates/beauty-salon/tier5-src/_shared/member-row-extras.ts +0 -175
  362. package/templates/beauty-salon/tier5-src/_shared/members-directory-view.ts +0 -39
  363. package/templates/beauty-salon/tier5-src/_shared/members-directory.ts +0 -271
  364. package/templates/beauty-salon/tier5-src/_shared/plan-facts.ts +0 -87
  365. package/templates/beauty-salon/tier5-src/_shared/plans-section.ts +0 -106
  366. package/templates/beauty-salon/tier5-src/_shared/products-section.ts +0 -76
  367. package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +0 -16
  368. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +0 -740
  369. package/templates/beauty-salon/tier5-src/_shared/relative-time.ts +0 -21
  370. package/templates/branded-lite/tier5-src/_shared/wix-file-share.ts +0 -332
  371. package/templates/community-club/recipes/announcement-card.json +0 -72
  372. package/templates/community-club/recipes/blog-hero.json +0 -95
  373. package/templates/community-club/recipes/blog-list-thumb-start.json +0 -394
  374. package/templates/community-club/recipes/blog-list.json +0 -394
  375. package/templates/community-club/recipes/blog-see-all.json +0 -50
  376. package/templates/community-club/recipes/events-inline-list.json +0 -228
  377. package/templates/community-club/recipes/events-inline.json +0 -309
  378. package/templates/community-club/recipes/faq-list.json +0 -503
  379. package/templates/community-club/recipes/members-list.json +0 -445
  380. package/templates/community-club/recipes/plans-card.json +0 -811
  381. package/templates/community-club/recipes/products-carousel.json +0 -141
  382. package/templates/community-club/recipes/products-grid.json +0 -143
  383. package/templates/community-club/recipes/programs-card.json +0 -254
  384. package/templates/community-club/recipes/programs-carousel.json +0 -234
  385. package/templates/community-club/recipes/programs-filters.json +0 -94
  386. package/templates/community-club/recipes/programs-participant-carousel.json +0 -257
  387. package/templates/community-club/recipes/programs-see-all.json +0 -43
  388. package/templates/community-club/recipes/section-error.json +0 -58
  389. package/templates/community-club/tier5-src/_shared/announcement-section.ts +0 -122
  390. package/templates/community-club/tier5-src/_shared/blog-list.ts +0 -207
  391. package/templates/community-club/tier5-src/_shared/detail-presence.ts +0 -51
  392. package/templates/community-club/tier5-src/_shared/events-card.ts +0 -33
  393. package/templates/community-club/tier5-src/_shared/events-inline-options.ts +0 -25
  394. package/templates/community-club/tier5-src/_shared/events-inline.ts +0 -84
  395. package/templates/community-club/tier5-src/_shared/faq-list.ts +0 -405
  396. package/templates/community-club/tier5-src/_shared/groups-section.ts +0 -110
  397. package/templates/community-club/tier5-src/_shared/member-activity.ts +0 -34
  398. package/templates/community-club/tier5-src/_shared/member-row-extras.ts +0 -175
  399. package/templates/community-club/tier5-src/_shared/members-directory-view.ts +0 -39
  400. package/templates/community-club/tier5-src/_shared/members-directory.ts +0 -271
  401. package/templates/community-club/tier5-src/_shared/plan-facts.ts +0 -87
  402. package/templates/community-club/tier5-src/_shared/plans-section.ts +0 -106
  403. package/templates/community-club/tier5-src/_shared/products-section.ts +0 -76
  404. package/templates/community-club/tier5-src/_shared/program-fields.ts +0 -16
  405. package/templates/community-club/tier5-src/_shared/programs-section.ts +0 -740
  406. package/templates/community-club/tier5-src/_shared/relative-time.ts +0 -21
  407. package/templates/events-meetups/recipes/announcement-card.json +0 -72
  408. package/templates/events-meetups/recipes/blog-hero.json +0 -95
  409. package/templates/events-meetups/recipes/blog-list-thumb-start.json +0 -394
  410. package/templates/events-meetups/recipes/blog-list.json +0 -394
  411. package/templates/events-meetups/recipes/blog-see-all.json +0 -50
  412. package/templates/events-meetups/recipes/events-inline-list.json +0 -228
  413. package/templates/events-meetups/recipes/events-inline.json +0 -309
  414. package/templates/events-meetups/recipes/faq-list.json +0 -503
  415. package/templates/events-meetups/recipes/members-list.json +0 -445
  416. package/templates/events-meetups/recipes/plans-card.json +0 -811
  417. package/templates/events-meetups/recipes/products-carousel.json +0 -141
  418. package/templates/events-meetups/recipes/products-grid.json +0 -143
  419. package/templates/events-meetups/recipes/programs-card.json +0 -254
  420. package/templates/events-meetups/recipes/programs-carousel.json +0 -234
  421. package/templates/events-meetups/recipes/programs-filters.json +0 -94
  422. package/templates/events-meetups/recipes/programs-see-all.json +0 -43
  423. package/templates/events-meetups/recipes/section-error.json +0 -58
  424. package/templates/events-meetups/tier5-src/_shared/announcement-section.ts +0 -122
  425. package/templates/events-meetups/tier5-src/_shared/blog-list.ts +0 -207
  426. package/templates/events-meetups/tier5-src/_shared/detail-presence.ts +0 -51
  427. package/templates/events-meetups/tier5-src/_shared/events-card.ts +0 -33
  428. package/templates/events-meetups/tier5-src/_shared/events-inline-options.ts +0 -25
  429. package/templates/events-meetups/tier5-src/_shared/events-inline.ts +0 -84
  430. package/templates/events-meetups/tier5-src/_shared/faq-list.ts +0 -405
  431. package/templates/events-meetups/tier5-src/_shared/groups-section.ts +0 -110
  432. package/templates/events-meetups/tier5-src/_shared/member-activity.ts +0 -34
  433. package/templates/events-meetups/tier5-src/_shared/member-row-extras.ts +0 -175
  434. package/templates/events-meetups/tier5-src/_shared/members-directory-view.ts +0 -39
  435. package/templates/events-meetups/tier5-src/_shared/members-directory.ts +0 -271
  436. package/templates/events-meetups/tier5-src/_shared/plan-facts.ts +0 -87
  437. package/templates/events-meetups/tier5-src/_shared/plans-section.ts +0 -106
  438. package/templates/events-meetups/tier5-src/_shared/products-section.ts +0 -76
  439. package/templates/events-meetups/tier5-src/_shared/program-fields.ts +0 -16
  440. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +0 -740
  441. package/templates/events-meetups/tier5-src/_shared/relative-time.ts +0 -21
  442. package/templates/gym-fitness/recipes/announcement-card.json +0 -72
  443. package/templates/gym-fitness/recipes/blog-hero.json +0 -95
  444. package/templates/gym-fitness/recipes/blog-list-thumb-start.json +0 -394
  445. package/templates/gym-fitness/recipes/blog-list.json +0 -394
  446. package/templates/gym-fitness/recipes/blog-see-all.json +0 -50
  447. package/templates/gym-fitness/recipes/events-inline-list.json +0 -228
  448. package/templates/gym-fitness/recipes/events-inline.json +0 -309
  449. package/templates/gym-fitness/recipes/faq-list.json +0 -503
  450. package/templates/gym-fitness/recipes/groups-list.json +0 -196
  451. package/templates/gym-fitness/recipes/members-list.json +0 -445
  452. package/templates/gym-fitness/recipes/plans-card.json +0 -811
  453. package/templates/gym-fitness/recipes/products-carousel.json +0 -141
  454. package/templates/gym-fitness/recipes/products-grid.json +0 -143
  455. package/templates/gym-fitness/recipes/programs-card.json +0 -254
  456. package/templates/gym-fitness/recipes/programs-carousel.json +0 -234
  457. package/templates/gym-fitness/recipes/programs-filters.json +0 -94
  458. package/templates/gym-fitness/recipes/programs-see-all.json +0 -43
  459. package/templates/gym-fitness/recipes/section-error.json +0 -58
  460. package/templates/gym-fitness/tier5-src/_shared/announcement-section.ts +0 -122
  461. package/templates/gym-fitness/tier5-src/_shared/blog-list.ts +0 -207
  462. package/templates/gym-fitness/tier5-src/_shared/events-card.ts +0 -33
  463. package/templates/gym-fitness/tier5-src/_shared/events-inline-options.ts +0 -25
  464. package/templates/gym-fitness/tier5-src/_shared/events-inline.ts +0 -84
  465. package/templates/gym-fitness/tier5-src/_shared/faq-list.ts +0 -405
  466. package/templates/gym-fitness/tier5-src/_shared/groups-section.ts +0 -110
  467. package/templates/gym-fitness/tier5-src/_shared/member-activity.ts +0 -34
  468. package/templates/gym-fitness/tier5-src/_shared/member-row-extras.ts +0 -175
  469. package/templates/gym-fitness/tier5-src/_shared/members-directory-view.ts +0 -39
  470. package/templates/gym-fitness/tier5-src/_shared/members-directory.ts +0 -271
  471. package/templates/gym-fitness/tier5-src/_shared/plan-facts.ts +0 -87
  472. package/templates/gym-fitness/tier5-src/_shared/plans-section.ts +0 -106
  473. package/templates/gym-fitness/tier5-src/_shared/products-section.ts +0 -76
  474. package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +0 -16
  475. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +0 -740
  476. package/templates/gym-fitness/tier5-src/_shared/relative-time.ts +0 -21
  477. package/templates/nonprofit-cause/recipes/announcement-card.json +0 -72
  478. package/templates/nonprofit-cause/recipes/blog-hero.json +0 -95
  479. package/templates/nonprofit-cause/recipes/blog-list-thumb-start.json +0 -394
  480. package/templates/nonprofit-cause/recipes/blog-list.json +0 -394
  481. package/templates/nonprofit-cause/recipes/blog-see-all.json +0 -50
  482. package/templates/nonprofit-cause/recipes/events-inline-list.json +0 -228
  483. package/templates/nonprofit-cause/recipes/events-inline.json +0 -309
  484. package/templates/nonprofit-cause/recipes/faq-list.json +0 -503
  485. package/templates/nonprofit-cause/recipes/groups-list.json +0 -196
  486. package/templates/nonprofit-cause/recipes/members-list.json +0 -445
  487. package/templates/nonprofit-cause/recipes/plans-card.json +0 -811
  488. package/templates/nonprofit-cause/recipes/products-carousel.json +0 -141
  489. package/templates/nonprofit-cause/recipes/products-grid.json +0 -143
  490. package/templates/nonprofit-cause/recipes/programs-card.json +0 -254
  491. package/templates/nonprofit-cause/recipes/programs-carousel.json +0 -234
  492. package/templates/nonprofit-cause/recipes/programs-filters.json +0 -94
  493. package/templates/nonprofit-cause/recipes/programs-participant-carousel.json +0 -257
  494. package/templates/nonprofit-cause/recipes/programs-see-all.json +0 -43
  495. package/templates/nonprofit-cause/recipes/section-error.json +0 -58
  496. package/templates/nonprofit-cause/tier5-src/_shared/announcement-section.ts +0 -122
  497. package/templates/nonprofit-cause/tier5-src/_shared/blog-list.ts +0 -207
  498. package/templates/nonprofit-cause/tier5-src/_shared/events-card.ts +0 -33
  499. package/templates/nonprofit-cause/tier5-src/_shared/events-inline-options.ts +0 -25
  500. package/templates/nonprofit-cause/tier5-src/_shared/events-inline.ts +0 -84
  501. package/templates/nonprofit-cause/tier5-src/_shared/faq-list.ts +0 -405
  502. package/templates/nonprofit-cause/tier5-src/_shared/groups-section.ts +0 -110
  503. package/templates/nonprofit-cause/tier5-src/_shared/member-activity.ts +0 -34
  504. package/templates/nonprofit-cause/tier5-src/_shared/member-row-extras.ts +0 -175
  505. package/templates/nonprofit-cause/tier5-src/_shared/members-directory-view.ts +0 -39
  506. package/templates/nonprofit-cause/tier5-src/_shared/members-directory.ts +0 -271
  507. package/templates/nonprofit-cause/tier5-src/_shared/plan-facts.ts +0 -87
  508. package/templates/nonprofit-cause/tier5-src/_shared/plans-section.ts +0 -106
  509. package/templates/nonprofit-cause/tier5-src/_shared/products-section.ts +0 -76
  510. package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +0 -16
  511. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +0 -740
  512. package/templates/nonprofit-cause/tier5-src/_shared/relative-time.ts +0 -21
  513. package/templates/podcast-creator/recipes/announcement-card.json +0 -72
  514. package/templates/podcast-creator/recipes/blog-hero.json +0 -95
  515. package/templates/podcast-creator/recipes/blog-list-thumb-start.json +0 -394
  516. package/templates/podcast-creator/recipes/blog-list.json +0 -394
  517. package/templates/podcast-creator/recipes/blog-see-all.json +0 -50
  518. package/templates/podcast-creator/recipes/events-inline-list.json +0 -228
  519. package/templates/podcast-creator/recipes/events-inline.json +0 -309
  520. package/templates/podcast-creator/recipes/faq-list.json +0 -503
  521. package/templates/podcast-creator/recipes/groups-list.json +0 -196
  522. package/templates/podcast-creator/recipes/members-list.json +0 -445
  523. package/templates/podcast-creator/recipes/plans-card.json +0 -811
  524. package/templates/podcast-creator/recipes/products-carousel.json +0 -141
  525. package/templates/podcast-creator/recipes/products-grid.json +0 -143
  526. package/templates/podcast-creator/recipes/programs-card.json +0 -254
  527. package/templates/podcast-creator/recipes/programs-carousel.json +0 -234
  528. package/templates/podcast-creator/recipes/programs-filters.json +0 -94
  529. package/templates/podcast-creator/recipes/programs-participant-carousel.json +0 -257
  530. package/templates/podcast-creator/recipes/programs-see-all.json +0 -43
  531. package/templates/podcast-creator/recipes/section-error.json +0 -58
  532. package/templates/podcast-creator/tier5-src/_shared/announcement-section.ts +0 -122
  533. package/templates/podcast-creator/tier5-src/_shared/blog-list.ts +0 -207
  534. package/templates/podcast-creator/tier5-src/_shared/events-card.ts +0 -33
  535. package/templates/podcast-creator/tier5-src/_shared/events-inline-options.ts +0 -25
  536. package/templates/podcast-creator/tier5-src/_shared/events-inline.ts +0 -84
  537. package/templates/podcast-creator/tier5-src/_shared/faq-list.ts +0 -405
  538. package/templates/podcast-creator/tier5-src/_shared/groups-section.ts +0 -110
  539. package/templates/podcast-creator/tier5-src/_shared/member-activity.ts +0 -34
  540. package/templates/podcast-creator/tier5-src/_shared/member-row-extras.ts +0 -175
  541. package/templates/podcast-creator/tier5-src/_shared/members-directory-view.ts +0 -39
  542. package/templates/podcast-creator/tier5-src/_shared/members-directory.ts +0 -271
  543. package/templates/podcast-creator/tier5-src/_shared/plan-facts.ts +0 -87
  544. package/templates/podcast-creator/tier5-src/_shared/plans-section.ts +0 -106
  545. package/templates/podcast-creator/tier5-src/_shared/products-section.ts +0 -76
  546. package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +0 -16
  547. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +0 -740
  548. package/templates/podcast-creator/tier5-src/_shared/relative-time.ts +0 -21
  549. package/templates/portfolio-creative/recipes/announcement-card.json +0 -72
  550. package/templates/portfolio-creative/recipes/blog-hero.json +0 -95
  551. package/templates/portfolio-creative/recipes/blog-list-thumb-start.json +0 -394
  552. package/templates/portfolio-creative/recipes/blog-list.json +0 -394
  553. package/templates/portfolio-creative/recipes/blog-see-all.json +0 -50
  554. package/templates/portfolio-creative/recipes/events-inline-list.json +0 -228
  555. package/templates/portfolio-creative/recipes/events-inline.json +0 -309
  556. package/templates/portfolio-creative/recipes/faq-list.json +0 -503
  557. package/templates/portfolio-creative/recipes/groups-list.json +0 -196
  558. package/templates/portfolio-creative/recipes/members-list.json +0 -445
  559. package/templates/portfolio-creative/recipes/plans-card.json +0 -811
  560. package/templates/portfolio-creative/recipes/products-carousel.json +0 -141
  561. package/templates/portfolio-creative/recipes/products-grid.json +0 -143
  562. package/templates/portfolio-creative/recipes/programs-card.json +0 -254
  563. package/templates/portfolio-creative/recipes/programs-carousel.json +0 -234
  564. package/templates/portfolio-creative/recipes/programs-filters.json +0 -94
  565. package/templates/portfolio-creative/recipes/programs-participant-carousel.json +0 -257
  566. package/templates/portfolio-creative/recipes/programs-see-all.json +0 -43
  567. package/templates/portfolio-creative/recipes/section-error.json +0 -58
  568. package/templates/portfolio-creative/tier5-src/_shared/announcement-section.ts +0 -122
  569. package/templates/portfolio-creative/tier5-src/_shared/blog-list.ts +0 -207
  570. package/templates/portfolio-creative/tier5-src/_shared/events-card.ts +0 -33
  571. package/templates/portfolio-creative/tier5-src/_shared/events-inline-options.ts +0 -25
  572. package/templates/portfolio-creative/tier5-src/_shared/events-inline.ts +0 -84
  573. package/templates/portfolio-creative/tier5-src/_shared/faq-list.ts +0 -405
  574. package/templates/portfolio-creative/tier5-src/_shared/groups-section.ts +0 -110
  575. package/templates/portfolio-creative/tier5-src/_shared/member-activity.ts +0 -34
  576. package/templates/portfolio-creative/tier5-src/_shared/member-row-extras.ts +0 -175
  577. package/templates/portfolio-creative/tier5-src/_shared/members-directory-view.ts +0 -39
  578. package/templates/portfolio-creative/tier5-src/_shared/members-directory.ts +0 -271
  579. package/templates/portfolio-creative/tier5-src/_shared/plan-facts.ts +0 -87
  580. package/templates/portfolio-creative/tier5-src/_shared/plans-section.ts +0 -106
  581. package/templates/portfolio-creative/tier5-src/_shared/products-section.ts +0 -76
  582. package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +0 -16
  583. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +0 -740
  584. package/templates/portfolio-creative/tier5-src/_shared/relative-time.ts +0 -21
  585. package/templates/restaurant/recipes/announcement-card.json +0 -72
  586. package/templates/restaurant/recipes/blog-hero.json +0 -95
  587. package/templates/restaurant/recipes/blog-list-thumb-start.json +0 -394
  588. package/templates/restaurant/recipes/blog-list.json +0 -394
  589. package/templates/restaurant/recipes/blog-see-all.json +0 -50
  590. package/templates/restaurant/recipes/events-inline-list.json +0 -228
  591. package/templates/restaurant/recipes/events-inline.json +0 -309
  592. package/templates/restaurant/recipes/faq-list.json +0 -503
  593. package/templates/restaurant/recipes/groups-list.json +0 -196
  594. package/templates/restaurant/recipes/members-list.json +0 -445
  595. package/templates/restaurant/recipes/plans-card.json +0 -811
  596. package/templates/restaurant/recipes/products-carousel.json +0 -141
  597. package/templates/restaurant/recipes/products-grid.json +0 -143
  598. package/templates/restaurant/recipes/programs-card.json +0 -254
  599. package/templates/restaurant/recipes/programs-carousel.json +0 -234
  600. package/templates/restaurant/recipes/programs-filters.json +0 -94
  601. package/templates/restaurant/recipes/programs-participant-carousel.json +0 -257
  602. package/templates/restaurant/recipes/programs-see-all.json +0 -43
  603. package/templates/restaurant/recipes/section-error.json +0 -58
  604. package/templates/restaurant/tier5-src/_shared/announcement-section.ts +0 -122
  605. package/templates/restaurant/tier5-src/_shared/blog-list.ts +0 -207
  606. package/templates/restaurant/tier5-src/_shared/events-card.ts +0 -33
  607. package/templates/restaurant/tier5-src/_shared/events-inline-options.ts +0 -25
  608. package/templates/restaurant/tier5-src/_shared/events-inline.ts +0 -84
  609. package/templates/restaurant/tier5-src/_shared/faq-list.ts +0 -405
  610. package/templates/restaurant/tier5-src/_shared/groups-section.ts +0 -110
  611. package/templates/restaurant/tier5-src/_shared/member-activity.ts +0 -34
  612. package/templates/restaurant/tier5-src/_shared/member-row-extras.ts +0 -175
  613. package/templates/restaurant/tier5-src/_shared/members-directory-view.ts +0 -39
  614. package/templates/restaurant/tier5-src/_shared/members-directory.ts +0 -271
  615. package/templates/restaurant/tier5-src/_shared/plan-facts.ts +0 -87
  616. package/templates/restaurant/tier5-src/_shared/plans-section.ts +0 -106
  617. package/templates/restaurant/tier5-src/_shared/products-section.ts +0 -76
  618. package/templates/restaurant/tier5-src/_shared/program-fields.ts +0 -16
  619. package/templates/restaurant/tier5-src/_shared/programs-section.ts +0 -740
  620. package/templates/restaurant/tier5-src/_shared/relative-time.ts +0 -21
  621. package/templates/retail-store/recipes/announcement-card.json +0 -72
  622. package/templates/retail-store/recipes/blog-hero.json +0 -95
  623. package/templates/retail-store/recipes/blog-list-thumb-start.json +0 -394
  624. package/templates/retail-store/recipes/blog-list.json +0 -394
  625. package/templates/retail-store/recipes/blog-see-all.json +0 -50
  626. package/templates/retail-store/recipes/events-inline-list.json +0 -228
  627. package/templates/retail-store/recipes/events-inline.json +0 -309
  628. package/templates/retail-store/recipes/faq-list.json +0 -503
  629. package/templates/retail-store/recipes/groups-list.json +0 -196
  630. package/templates/retail-store/recipes/members-list.json +0 -445
  631. package/templates/retail-store/recipes/plans-card.json +0 -811
  632. package/templates/retail-store/recipes/products-carousel.json +0 -141
  633. package/templates/retail-store/recipes/products-grid.json +0 -143
  634. package/templates/retail-store/recipes/programs-card.json +0 -254
  635. package/templates/retail-store/recipes/programs-carousel.json +0 -234
  636. package/templates/retail-store/recipes/programs-filters.json +0 -94
  637. package/templates/retail-store/recipes/programs-participant-carousel.json +0 -257
  638. package/templates/retail-store/recipes/programs-see-all.json +0 -43
  639. package/templates/retail-store/recipes/section-error.json +0 -58
  640. package/templates/retail-store/tier5-src/_shared/announcement-section.ts +0 -122
  641. package/templates/retail-store/tier5-src/_shared/blog-list.ts +0 -207
  642. package/templates/retail-store/tier5-src/_shared/event-registration.ts +0 -86
  643. package/templates/retail-store/tier5-src/_shared/events-card.ts +0 -33
  644. package/templates/retail-store/tier5-src/_shared/events-inline-options.ts +0 -25
  645. package/templates/retail-store/tier5-src/_shared/events-inline.ts +0 -84
  646. package/templates/retail-store/tier5-src/_shared/faq-list.ts +0 -405
  647. package/templates/retail-store/tier5-src/_shared/groups-section.ts +0 -110
  648. package/templates/retail-store/tier5-src/_shared/member-activity.ts +0 -34
  649. package/templates/retail-store/tier5-src/_shared/member-row-extras.ts +0 -175
  650. package/templates/retail-store/tier5-src/_shared/members-directory-view.ts +0 -39
  651. package/templates/retail-store/tier5-src/_shared/members-directory.ts +0 -271
  652. package/templates/retail-store/tier5-src/_shared/plan-facts.ts +0 -87
  653. package/templates/retail-store/tier5-src/_shared/plans-section.ts +0 -106
  654. package/templates/retail-store/tier5-src/_shared/products-section.ts +0 -76
  655. package/templates/retail-store/tier5-src/_shared/program-fields.ts +0 -16
  656. package/templates/retail-store/tier5-src/_shared/programs-section.ts +0 -740
  657. package/templates/retail-store/tier5-src/_shared/relative-time.ts +0 -21
  658. package/templates/yoga-studio/recipes/announcement-card.json +0 -72
  659. package/templates/yoga-studio/recipes/blog-hero.json +0 -95
  660. package/templates/yoga-studio/recipes/blog-list-thumb-start.json +0 -394
  661. package/templates/yoga-studio/recipes/blog-list.json +0 -394
  662. package/templates/yoga-studio/recipes/blog-see-all.json +0 -50
  663. package/templates/yoga-studio/recipes/events-inline-list.json +0 -228
  664. package/templates/yoga-studio/recipes/events-inline.json +0 -309
  665. package/templates/yoga-studio/recipes/faq-list.json +0 -503
  666. package/templates/yoga-studio/recipes/groups-list.json +0 -196
  667. package/templates/yoga-studio/recipes/members-list.json +0 -445
  668. package/templates/yoga-studio/recipes/plans-card.json +0 -811
  669. package/templates/yoga-studio/recipes/products-carousel.json +0 -141
  670. package/templates/yoga-studio/recipes/products-grid.json +0 -143
  671. package/templates/yoga-studio/recipes/programs-card.json +0 -254
  672. package/templates/yoga-studio/recipes/programs-carousel.json +0 -234
  673. package/templates/yoga-studio/recipes/programs-filters.json +0 -94
  674. package/templates/yoga-studio/recipes/programs-participant-carousel.json +0 -257
  675. package/templates/yoga-studio/recipes/programs-see-all.json +0 -43
  676. package/templates/yoga-studio/recipes/section-error.json +0 -58
  677. package/templates/yoga-studio/tier5-src/_shared/announcement-section.ts +0 -122
  678. package/templates/yoga-studio/tier5-src/_shared/blog-list.ts +0 -207
  679. package/templates/yoga-studio/tier5-src/_shared/events-card.ts +0 -33
  680. package/templates/yoga-studio/tier5-src/_shared/events-inline-options.ts +0 -25
  681. package/templates/yoga-studio/tier5-src/_shared/events-inline.ts +0 -84
  682. package/templates/yoga-studio/tier5-src/_shared/faq-list.ts +0 -405
  683. package/templates/yoga-studio/tier5-src/_shared/groups-section.ts +0 -110
  684. package/templates/yoga-studio/tier5-src/_shared/member-activity.ts +0 -34
  685. package/templates/yoga-studio/tier5-src/_shared/member-row-extras.ts +0 -175
  686. package/templates/yoga-studio/tier5-src/_shared/members-directory-view.ts +0 -39
  687. package/templates/yoga-studio/tier5-src/_shared/members-directory.ts +0 -271
  688. package/templates/yoga-studio/tier5-src/_shared/plan-facts.ts +0 -87
  689. package/templates/yoga-studio/tier5-src/_shared/plans-section.ts +0 -106
  690. package/templates/yoga-studio/tier5-src/_shared/products-section.ts +0 -76
  691. package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +0 -16
  692. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +0 -740
  693. package/templates/yoga-studio/tier5-src/_shared/relative-time.ts +0 -21
@@ -1,635 +1,12 @@
1
1
  // himi-branded-lite-file-share — branded-lite "Documents" worker (Wix File Share).
2
2
  //
3
- // Reads the bound site's real File Share library through `_shared/wix-file-share.ts` with the
4
- // visitor or member credential: folders and files, page by page, search, open, save, and upload
5
- // where the library allows it. What a reader may see and do is decided by the File Share server
6
- // on every call (folder permissions, member-only and paid-plan folders, who may download). The
7
- // worker asks `authorize-actions` only to leave out a Save or Upload button the server would
8
- // refuse; a hidden button is never the protection.
9
- //
10
- // IDENTITY. Every read captures who is signed in (`readAccess`) and drops its answer when the
11
- // account changed while it was in flight, then reloads for the new account at the root. A
12
- // reappearing screen keeps its folder only for the same reader. Download links are fetched at the
13
- // moment of the tap.
14
- //
15
- // STATE. The runtime applies what an action RETURNS. So navigation, Open, Save and Upload return
16
- // their in-progress state at once and finish in the background through `settleRead` / `settle`
17
- // (the account-settings pattern); `load` (onAppear) awaits its read, because the host paints the
18
- // state it returns. A newer read always wins: every answer carries its read's generation.
19
- //
20
- // NOT HERE, on purpose: creating, renaming, moving and deleting items, and folder permissions.
21
- // The service has those calls, but they belong to the library's managers, and Wix's own member
22
- // mobile section does not offer them either (wix-mobile-media-manager FileShare: list, search,
23
- // download).
24
- import { defineService } from "@himalaya/state";
25
- import { download as downloadFile, export as exportFile, isFilesError, readBase64, remove as removeFile, type FileHandle } from "@himalaya/files";
26
- import { pickDetailed } from "@himalaya/file-picker";
27
- import { open as openUrl } from "@himalaya/open-url";
28
- import { put as uploadPut } from "@himalaya/presigned-upload";
29
- import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
30
- import { assertReadAccess, readAccess, type ReadAccess } from "../_shared/member-read.js";
31
- import {
32
- UPLOAD_MAX_BYTES,
33
- UPLOAD_RESPONSE_MAX,
34
- appSettings,
35
- authorize,
36
- completeUpload,
37
- downloadUrl,
38
- formatSize,
39
- httpStatus,
40
- multipartBase64,
41
- queryFolder,
42
- searchLibrary,
43
- sizeOf,
44
- startUpload,
45
- viewUrl,
46
- type Authorization,
47
- type UploadRefusal,
48
- type WixLibraryItem,
49
- } from "../_shared/wix-file-share.js";
50
-
51
- /** `files.download`'s default cap. A larger file is offered to open in the browser instead. */
52
- const SAVE_MAX_BYTES = 100 * 1024 * 1024;
53
-
54
- interface Row {
55
- id: string;
56
- name: string;
57
- isFolder: boolean;
58
- subtitle: string;
59
- icon: string;
60
- sizeBytes: number;
61
- /** hiddenWhen gate for the row's Save button: true for folders, and for files the server
62
- * said this reader may not download. */
63
- saveHidden: boolean;
64
- }
65
-
66
- interface Crumb { id: string; name: string }
67
-
68
- type Status = "loading" | "ready" | "error" | "signIn" | "forbidden" | "notInstalled";
69
-
70
- export interface FileShareState {
71
- status: Status;
72
- /** "" is the library root. */
73
- folderId: string;
74
- trail: Crumb[];
75
- folderTitle: string;
76
- query: string;
77
- rows: Row[];
78
- nextCursor: string;
79
- canUpload: boolean;
80
- /** An open, save or upload is running: their buttons are disabled. */
81
- busy: boolean;
82
- /** A "Show more" page is being read. */
83
- moreBusy: boolean;
84
- /** One line about the last open, save, upload or page read. */
85
- message: string;
86
- emptyText: string;
87
- loadingHidden: boolean;
88
- contentHidden: boolean;
89
- emptyHidden: boolean;
90
- errorHidden: boolean;
91
- signInHidden: boolean;
92
- forbiddenHidden: boolean;
93
- notInstalledHidden: boolean;
94
- moreHidden: boolean;
95
- backHidden: boolean;
96
- uploadHidden: boolean;
97
- messageHidden: boolean;
98
- }
99
-
100
- export const INITIAL: FileShareState = {
101
- status: "loading",
102
- folderId: "",
103
- trail: [],
104
- folderTitle: "",
105
- query: "",
106
- rows: [],
107
- nextCursor: "",
108
- canUpload: false,
109
- busy: false,
110
- moreBusy: false,
111
- message: "",
112
- emptyText: "",
113
- loadingHidden: false,
114
- contentHidden: true,
115
- emptyHidden: true,
116
- errorHidden: true,
117
- signInHidden: true,
118
- forbiddenHidden: true,
119
- notInstalledHidden: true,
120
- moreHidden: true,
121
- backHidden: true,
122
- uploadHidden: true,
123
- messageHidden: true,
124
- };
125
-
126
- /** The newest read; an answer from an older one is dropped. */
127
- let generation = 0;
128
- /** Who the screen was last read for (`readerKey`), so a reappearing screen keeps its folder only
129
- * for the same reader. */
130
- let reader = "";
131
- /** The library root's id (app settings), for the same reader. */
132
- let rootFolderId = "";
133
- /** One open, save or upload at a time. A module flag, because the runtime state an action is
134
- * given does not change until a running action returns. */
135
- let actionInFlight = false;
136
- /** Files by id from the rows on screen: the size and name an action needs without a read. */
137
- let known = new Map<string, Row>();
138
-
139
- function readerKey(access: ReadAccess): string {
140
- return JSON.stringify([access.member.email, access.member.scope, access.tenant]);
141
- }
142
-
143
- function current(fallback: FileShareState): FileShareState {
144
- return (svc?.getState?.() as FileShareState | undefined) ?? fallback;
145
- }
146
-
147
- function iconOf(item: WixLibraryItem): string {
148
- if (item.folderFields || !item.fileFields) return "folder";
149
- const category = item.fileFields.category ?? "";
150
- if (category === "IMAGE") return "image";
151
- if (category === "VIDEO") return "play";
152
- if (category === "MUSIC") return "music";
153
- return "doc";
154
- }
155
-
156
- function subtitleOf(item: WixLibraryItem, searching: boolean): string {
157
- const parts: string[] = [];
158
- if (item.fileFields) {
159
- const ext = (item.fileFields.extension ?? "").trim().toUpperCase();
160
- if (ext) parts.push(ext);
161
- const size = sizeOf(item);
162
- if (size >= 0) parts.push(formatSize(size));
163
- } else {
164
- const count = Number(item.folderFields?.childrenCount);
165
- if (Number.isFinite(count) && count >= 0) {
166
- parts.push(count === 1 ? copyParam("fileShare.itemCountOne", "1 item") : copyTemplate("fileShare.itemCount", "{count} items", { count }));
167
- }
168
- }
169
- const availability = item.availability ?? item.folderFields?.availability;
170
- if (availability === "MEMBER") parts.push(copyParam("fileShare.membersOnly", "Members only"));
171
- if (availability === "PAID") parts.push(copyParam("fileShare.paidOnly", "Plan required"));
172
- if (searching) {
173
- const where = (item.path ?? []).map((p) => (p?.name ?? "").trim()).filter((name) => name && name !== "/");
174
- if (where.length) parts.push(where.join(" / "));
175
- }
176
- return parts.join(" · ");
177
- }
178
-
179
- /** What `authorize-actions` said. `unknown`: it failed or was not asked; the server still decides. */
180
- type Permissions = { known: true; auth: Authorization } | { known: false };
181
-
182
- function rowsOf(items: WixLibraryItem[], access: Permissions, searching: boolean): Row[] {
183
- return items.filter((item) => item.id && item.name).map((item) => {
184
- const isFolder = !item.fileFields;
185
- // An unknown answer keeps Save: the server still decides.
186
- const canSave = !isFolder && (!access.known || access.auth.items.get(item.id!)?.has("DOWNLOAD") === true);
187
- return {
188
- id: item.id!,
189
- name: item.name!,
190
- isFolder,
191
- subtitle: subtitleOf(item, searching),
192
- icon: iconOf(item),
193
- sizeBytes: sizeOf(item),
194
- saveHidden: !canSave,
195
- };
196
- });
197
- }
198
-
199
- function shown(state: FileShareState, rows: Row[], nextCursor: string, canUpload: boolean): FileShareState {
200
- known = new Map([...known, ...rows.map((row) => [row.id, row] as const)]);
201
- const searching = state.query.trim() !== "";
202
- return {
203
- ...state,
204
- status: "ready",
205
- rows,
206
- nextCursor,
207
- canUpload,
208
- moreBusy: false,
209
- emptyText: searching
210
- ? copyParam("fileShare.noResults", "No files match your search.")
211
- : state.folderId
212
- ? copyParam("fileShare.emptyFolder", "This folder is empty.")
213
- : copyParam("fileShare.emptyLibrary", "No documents have been shared yet."),
214
- loadingHidden: true,
215
- contentHidden: rows.length === 0,
216
- emptyHidden: rows.length > 0,
217
- errorHidden: true,
218
- signInHidden: true,
219
- forbiddenHidden: true,
220
- notInstalledHidden: true,
221
- moreHidden: !nextCursor,
222
- backHidden: state.trail.length === 0,
223
- uploadHidden: !canUpload || searching,
224
- };
225
- }
226
-
227
- function failedState(state: FileShareState, next: Exclude<Status, "loading" | "ready">): FileShareState {
228
- return {
229
- ...state,
230
- status: next,
231
- rows: [],
232
- nextCursor: "",
233
- canUpload: false,
234
- moreBusy: false,
235
- loadingHidden: true,
236
- contentHidden: true,
237
- emptyHidden: true,
238
- errorHidden: next !== "error",
239
- signInHidden: next !== "signIn",
240
- forbiddenHidden: next !== "forbidden",
241
- notInstalledHidden: next !== "notInstalled",
242
- moreHidden: true,
243
- backHidden: state.trail.length === 0,
244
- uploadHidden: true,
245
- };
246
- }
247
-
248
- /** Why a read failed, as the screen says it. Sign in helps only a visitor: a signed-in member who
249
- * is refused (401 or 403) lacks the folder's permission or plan, or their session is broken, and
250
- * the sign-in screen leads nowhere for them. */
251
- async function failureOf(error: unknown): Promise<Exclude<Status, "loading" | "ready">> {
252
- const status = httpStatus(error);
253
- if (status === 428) return "notInstalled";
254
- if (status === 401 || status === 403) {
255
- const signedIn = await readAccess().then((a) => !!a.member.email).catch(() => false);
256
- return signedIn ? "forbidden" : "signIn";
257
- }
258
- return "error";
259
- }
260
-
261
- async function authorizationFor(items: WixLibraryItem[], folderId: string): Promise<Permissions> {
262
- const files = items.filter((item) => item.id && item.fileFields).map((item) => item.id!);
263
- if (!files.length && !folderId) return { known: false };
264
- try {
265
- return { known: true, auth: await authorize(files, folderId) };
266
- } catch (error) {
267
- // Save stays (the server refuses it if it must) and Upload stays hidden.
268
- console.warn("[file-share] authorize-actions failed", error);
269
- return { known: false };
270
- }
271
- }
272
-
273
- /** What one read produced. Plain data: it crosses `svc.settleRead`. */
274
- interface ReadResult {
275
- generation: number;
276
- cursor: string;
277
- rows?: Row[];
278
- nextCursor?: string;
279
- canUpload?: boolean;
280
- failure?: Exclude<Status, "loading" | "ready">;
281
- /** The account changed while the read was in flight. */
282
- readerChanged?: boolean;
283
- }
284
-
285
- /** Read one page for `snapshot` (its folder or its search). Never throws. */
286
- async function fetchPage(snapshot: FileShareState, cursor: string, mine: number, given?: ReadAccess): Promise<ReadResult> {
287
- try {
288
- const access = given ?? await readAccess();
289
- const searching = snapshot.query.trim() !== "";
290
- // The root id and the page do not depend on each other: read them together.
291
- const [root, page] = await Promise.all([
292
- rootFolderId ? Promise.resolve(rootFolderId) : appSettings().then((s) => s.rootFolderId).catch(() => ""),
293
- searching ? searchLibrary(snapshot.query, snapshot.folderId, cursor) : queryFolder(snapshot.folderId, cursor),
294
- ]);
295
- // The root has an id of its own, and every root item names it as its parent.
296
- const authFolder = searching ? "" : snapshot.folderId || root || (page.items.find((item) => item.parentFolderId)?.parentFolderId ?? "");
297
- const auth = await authorizationFor(page.items, authFolder);
298
- await assertReadAccess(access);
299
- if (root && mine === generation) rootFolderId = root;
300
- return {
301
- generation: mine,
302
- cursor,
303
- rows: rowsOf(page.items, auth, searching),
304
- nextCursor: page.nextCursor,
305
- canUpload: !searching && auth.known && auth.auth.folder.has("UPLOAD_FILE"),
306
- };
307
- } catch (error) {
308
- if ((error as { name?: string })?.name === "MemberAccessChanged") return { generation: mine, cursor, readerChanged: true };
309
- return { generation: mine, cursor, failure: await failureOf(error) };
310
- }
311
- }
312
-
313
- /** Put a read's answer on `state` — unless a newer read started since. */
314
- async function applyRead(state: FileShareState, result: ReadResult): Promise<FileShareState> {
315
- if (result.generation !== generation) return state;
316
- // Start over as whoever is signed in now, at the root.
317
- if (result.readerChanged) return load(state);
318
- if (result.failure) {
319
- // A failed "Show more" keeps the rows already on screen and offers the page again.
320
- if (result.cursor) {
321
- return { ...state, moreBusy: false, message: copyParam("fileShare.moreFailed", "More files couldn't be loaded. Try again."), messageHidden: false };
322
- }
323
- return failedState(state, result.failure);
324
- }
325
- const rows = result.rows ?? [];
326
- return shown(
327
- state,
328
- result.cursor ? [...state.rows, ...rows] : rows,
329
- result.nextCursor ?? "",
330
- result.cursor ? state.canUpload || result.canUpload === true : result.canUpload === true,
331
- );
332
- }
333
-
334
- /** Start a read of `next` in the background and show `next` (its loading state) now. */
335
- function startRead(next: FileShareState, cursor = ""): FileShareState {
336
- const mine = ++generation;
337
- void fetchPage(next, cursor, mine).then((result) => svc.settleRead(result));
338
- return next;
339
- }
340
-
341
- function loading(state: FileShareState, patch: Partial<FileShareState>): FileShareState {
342
- return {
343
- ...state,
344
- ...patch,
345
- status: "loading",
346
- rows: [],
347
- nextCursor: "",
348
- canUpload: false,
349
- moreBusy: false,
350
- loadingHidden: false,
351
- contentHidden: true,
352
- emptyHidden: true,
353
- errorHidden: true,
354
- signInHidden: true,
355
- forbiddenHidden: true,
356
- notInstalledHidden: true,
357
- moreHidden: true,
358
- uploadHidden: true,
359
- message: "",
360
- messageHidden: true,
361
- backHidden: (patch.trail ?? state.trail).length === 0,
362
- };
363
- }
364
-
365
- function titleFor(trail: Crumb[]): string {
366
- return trail.length ? trail[trail.length - 1]!.name : "";
367
- }
368
-
369
- const ROOT_POSITION = { folderId: "", trail: [] as Crumb[], folderTitle: "", query: "" };
370
-
371
- /** onAppear. The same reader keeps the folder and search on screen, read again; a different
372
- * reader (sign-in, sign-out, another account or site) starts at the root with nothing of the
373
- * previous reader's kept. Awaited, because the host paints the state onAppear returns. */
374
- async function load(state: FileShareState, arg?: unknown): Promise<FileShareState> {
375
- if (arg !== undefined) stashCopy(arg);
376
- const access = await readAccess().catch(() => undefined);
377
- const key = access ? readerKey(access) : "";
378
- const same = key !== "" && key === reader;
379
- reader = key;
380
- if (!same) {
381
- rootFolderId = "";
382
- known = new Map();
383
- }
384
- // `busy` belongs to an action of this run, or to none.
385
- const next = { ...loading(state, same ? {} : ROOT_POSITION), busy: actionInFlight };
386
- const mine = ++generation;
387
- const result = await fetchPage(next, "", mine, access);
388
- return applyRead(result.generation === generation ? next : current(next), result);
389
- }
390
-
391
- function retry(state: FileShareState): FileShareState {
392
- return startRead(loading(state, {}));
393
- }
394
-
395
- function openFolder(state: FileShareState, id: string, name: string): FileShareState {
396
- const trail = [...state.trail, { id, name }];
397
- return startRead(loading(state, { folderId: id, trail, folderTitle: titleFor(trail), query: "" }));
398
- }
399
-
400
- function back(state: FileShareState): FileShareState {
401
- if (!state.trail.length || state.busy) return state;
402
- const trail = state.trail.slice(0, -1);
403
- return startRead(loading(state, { folderId: trail.length ? trail[trail.length - 1]!.id : "", trail, folderTitle: titleFor(trail), query: "" }));
404
- }
405
-
406
- function search(state: FileShareState, arg?: { value?: unknown }): FileShareState {
407
- const query = String(arg?.value ?? "").slice(0, 50);
408
- if (query.trim() === state.query.trim()) return { ...state, query };
409
- return startRead(loading(state, { query }));
410
- }
411
-
412
- function loadMore(state: FileShareState): FileShareState {
413
- if (!state.nextCursor || state.status !== "ready" || state.moreBusy) return state;
414
- return startRead({ ...state, moreBusy: true, message: "", messageHidden: true }, state.nextCursor);
415
- }
416
-
417
- /** An open, save or upload refusal, as the screen says it. Like a read refusal, "Sign in" is
418
- * only for a visitor: a signed-in member refused with 401 or 403 has no access. */
419
- async function actionError(error: unknown, fallback: string): Promise<string> {
420
- const status = httpStatus(error);
421
- if (status === 401 || status === 403) {
422
- const signedIn = await readAccess().then((a) => !!a.member.email).catch(() => false);
423
- return signedIn
424
- ? copyParam("fileShare.noAccess", "You don't have access to this file.")
425
- : copyParam("fileShare.signInToOpen", "Sign in to open this file.");
426
- }
427
- if (status === 404) return copyParam("fileShare.gone", "This file is no longer in the library.");
428
- return fallback;
429
- }
430
-
431
- /** Finish an open, save or upload: say how it went, and read the folder again after an upload
432
- * (without the loading skeleton) when it is still the one on screen. */
433
- function settle(state: FileShareState, arg?: { message?: unknown; refreshFolder?: unknown }): FileShareState {
434
- const message = typeof arg?.message === "string" ? arg.message : "";
435
- const next = { ...state, busy: false, message, messageHidden: !message };
436
- const folder = typeof arg?.refreshFolder === "string" ? arg.refreshFolder : undefined;
437
- return folder !== undefined && folder === state.folderId && !state.query.trim() && state.status === "ready" ? startRead(next) : next;
438
- }
439
-
440
- /** A running upload's progress line. */
441
- function progress(state: FileShareState, arg?: { message?: unknown }): FileShareState {
442
- const message = typeof arg?.message === "string" ? arg.message : "";
443
- return { ...state, message, messageHidden: !message };
444
- }
445
-
446
- /** Run one open, save or upload in the background, one at a time; `settle` always ends it. */
447
- function runAction(state: FileShareState, startMessage: string, work: () => Promise<{ message: string; refreshFolder?: string } | "reload">): FileShareState {
448
- actionInFlight = true;
449
- // The reader the action started for. When the screen was loaded for another reader meanwhile
450
- // (sign-out, account or site switch), the completion says nothing about the old reader's file.
451
- const startedFor = reader;
452
- void work()
453
- .catch((error) => ((error as { name?: string })?.name === "MemberAccessChanged"
454
- ? "reload" as const
455
- : { message: copyParam("fileShare.actionFailed", "That didn't work. Try again.") }))
456
- .then(async (outcome) => {
457
- actionInFlight = false;
458
- if (reader !== startedFor) {
459
- await svc.settle({ message: "" });
460
- return;
461
- }
462
- if (outcome === "reload") {
463
- await svc.settle({ message: "" });
464
- await svc.load();
465
- return;
466
- }
467
- await svc.settle(outcome);
468
- });
469
- return { ...state, busy: true, message: startMessage, messageHidden: !startMessage };
470
- }
471
-
472
- /** Tap on a row: a folder opens; a file opens in the browser from a fresh inline link. */
473
- function openItem(state: FileShareState, arg?: { id?: unknown }): FileShareState {
474
- const id = String(arg?.id ?? "");
475
- const row = state.rows.find((candidate) => candidate.id === id);
476
- if (!row || state.busy || actionInFlight) return state;
477
- if (row.isFolder) return openFolder(state, row.id, row.name);
478
- const failedText = copyParam("fileShare.openFailed", "This file couldn't be opened. Try Save instead.");
479
- return runAction(state, "", async () => {
480
- const access = await readAccess();
481
- try {
482
- const url = await viewUrl(row.id);
483
- // The link is the reader's own: never open it for whoever is signed in now.
484
- await assertReadAccess(access);
485
- const { opened } = await openUrl(url, "in_app_browser");
486
- return { message: opened ? "" : failedText };
487
- } catch (error) {
488
- if ((error as { name?: string })?.name === "MemberAccessChanged") return "reload";
489
- return { message: await actionError(error, failedText) };
490
- }
491
- });
492
- }
493
-
494
- function safeName(name: string): string {
495
- const cleaned = name.replace(/[\\/:*?"<>|\u0000-\u001f]+/g, "_").replace(/^\.+/, "").slice(0, 120);
496
- return cleaned || "file";
497
- }
498
-
499
- /** A sandbox copy is only a hand-off: deleted once the save picker or the upload is done with it,
500
- * so a reader's file does not stay on the device for the next account. */
501
- async function discard(handle: FileHandle | undefined): Promise<void> {
502
- if (handle) await removeFile(handle).catch(() => undefined);
503
- }
504
-
505
- /** Save: a fresh attachment link, streamed into the sandbox, handed to the OS save picker. An
506
- * expired link (410) is fetched again once. */
507
- function saveItem(state: FileShareState, arg?: { id?: unknown }): FileShareState {
508
- const id = String(arg?.id ?? "");
509
- const row = state.rows.find((candidate) => candidate.id === id) ?? known.get(id);
510
- if (!row || row.isFolder || state.busy || actionInFlight) return state;
511
- const tooLarge = copyParam("fileShare.tooLargeToSave", "This file is larger than 100 MB. Open it to view it in the browser.");
512
- if (row.sizeBytes > SAVE_MAX_BYTES) return { ...state, message: tooLarge, messageHidden: false };
513
- return runAction(state, copyParam("fileShare.saving", "Preparing the file…"), async () => {
514
- const access = await readAccess();
515
- let handle: FileHandle | undefined;
516
- // The link and the file are the reader's own: never fetched or exported for another reader.
517
- const fetchFile = async () => {
518
- const url = await downloadUrl(row.id);
519
- await assertReadAccess(access);
520
- return downloadFile(url, { name: `file-share/${row.id}/${safeName(row.name)}` });
521
- };
522
- try {
523
- try {
524
- handle = await fetchFile();
525
- } catch (error) {
526
- if (!(isFilesError(error) && error.code === "http_error" && error.status === 410)) throw error;
527
- handle = await fetchFile();
528
- }
529
- await assertReadAccess(access);
530
- const { exported } = await exportFile(handle);
531
- return { message: exported ? copyTemplate("fileShare.saved", "Saved {name}.", { name: row.name }) : "" };
532
- } catch (error) {
533
- if ((error as { name?: string })?.name === "MemberAccessChanged") return "reload";
534
- if (isFilesError(error)) {
535
- if (error.code === "too_large") return { message: tooLarge };
536
- if (error.code === "unavailable") return { message: copyParam("fileShare.saveUnavailable", "Saving files isn't available on this device. Open the file instead.") };
537
- return { message: copyParam("fileShare.saveFailed", "The file couldn't be saved. Try again.") };
538
- }
539
- return { message: await actionError(error, copyParam("fileShare.saveFailed", "The file couldn't be saved. Try again.")) };
540
- } finally {
541
- await discard(handle);
542
- }
543
- });
544
- }
545
-
546
- function refusalText(refusal: UploadRefusal): string {
547
- if (refusal.kind === "tooBig") {
548
- return refusal.maxSize
549
- ? copyTemplate("fileShare.uploadTooBigFor", "This file is too large for the library. The limit is {size}.", { size: formatSize(refusal.maxSize) })
550
- : copyParam("fileShare.uploadTooBig", "This file is too large for the library.");
551
- }
552
- if (refusal.kind === "extension") return copyParam("fileShare.uploadType", "The library doesn't accept this type of file.");
553
- if (refusal.kind === "quota") return copyParam("fileShare.uploadQuota", "The library is out of storage. Contact the business.");
554
- if (refusal.kind === "video") return copyParam("fileShare.uploadVideo", "The library doesn't accept videos.");
555
- return copyParam("fileShare.uploadFailed", "The upload didn't finish. Nothing was added. Try again.");
556
- }
557
-
558
- let uploadSeq = 0;
559
-
560
- const UPLOAD_FAILED = () => copyParam("fileShare.uploadFailed", "The upload didn't finish. Nothing was added. Try again.");
561
-
562
- /** Upload one file into the folder on screen, only where the server allows UPLOAD_FILE there.
563
- * It is reported as added only after `complete-upload` returns the new library item. */
564
- function upload(state: FileShareState): FileShareState {
565
- if (!state.canUpload || state.busy || actionInFlight || state.query.trim()) return state;
566
- const folderId = state.folderId;
567
- return runAction(state, "", async () => {
568
- const access = await readAccess();
569
- const picked = await pickDetailed({ maxBytes: UPLOAD_MAX_BYTES, maxItems: 1 }).catch(() => ({ items: [], rejected: [] }));
570
- const file = picked.items[0];
571
- if (!file) {
572
- const reason = picked.rejected[0]?.reason;
573
- if (!reason) return { message: "" };
574
- return {
575
- message: reason === "size"
576
- ? copyParam("fileShare.uploadAppLimit", "Files over 7 MB can't be uploaded from the app. Upload them from the website.")
577
- : copyParam("fileShare.uploadOne", "Pick one file at a time."),
578
- };
579
- }
580
- try {
581
- if (file.sizeBytes > UPLOAD_MAX_BYTES) {
582
- return { message: copyParam("fileShare.uploadAppLimit", "Files over 7 MB can't be uploaded from the app. Upload them from the website.") };
583
- }
584
- await svc.progress({ message: copyTemplate("fileShare.uploading", "Uploading {name}…", { name: file.name }) });
585
- const actionId = `himi-upload-${Date.now().toString(36)}-${(uploadSeq += 1)}`;
586
- const started = await startUpload({ name: file.name, sizeBytes: file.sizeBytes }, folderId, actionId);
587
- if (!started.target) return { message: refusalText(started.refusal ?? { kind: "unknown" }) };
588
- const boundary = `----himi${actionId.replace(/[^A-Za-z0-9]/g, "")}`;
589
- const body = multipartBase64(started.target.requestParameters, { name: file.name, mimeType: file.mimeType, base64: await readBase64(file) }, boundary);
590
- const sent = await uploadPut(started.target.url, { base64: body }, { method: "POST", contentType: `multipart/form-data; boundary=${boundary}` });
591
- if (!sent.ok || !sent.body || sent.body.length > UPLOAD_RESPONSE_MAX) return { message: UPLOAD_FAILED() };
592
- // The upload was made as one account; it is registered only for that same account.
593
- await assertReadAccess(access);
594
- const done = await completeUpload(sent.body, folderId, actionId);
595
- if (!done.item) return { message: refusalText(done.refusal ?? { kind: "unknown" }) };
596
- return { message: copyTemplate("fileShare.uploaded", "Added {name}.", { name: done.item.name ?? file.name }), refreshFolder: folderId };
597
- } catch (error) {
598
- if ((error as { name?: string })?.name === "MemberAccessChanged") return "reload";
599
- // presigned_upload refuses an upload host outside its allowlist before sending anything.
600
- if (/presigned_upload/i.test(String((error as { message?: unknown })?.message ?? ""))) {
601
- return { message: copyParam("fileShare.uploadUnsupported", "Uploading to this library isn't available in the app yet. Upload from the website.") };
602
- }
603
- return { message: await actionError(error, UPLOAD_FAILED()) };
604
- } finally {
605
- await discard(file);
606
- }
607
- });
608
- }
609
-
610
- /** Every key: a cold boot starts from INITIAL. The flags (`busy`, `moreBusy`) describe actions
611
- * of a run that is gone, and the rows, folder and search are a reader's restricted listing,
612
- * which is read again for whoever is signed in rather than kept on the device. */
613
- const RUN_ONLY_KEYS = Object.keys(INITIAL) as (keyof FileShareState)[];
3
+ // The worker is the shared `createFileShareService` from `@himalaya/screens`, the same service any
4
+ // generated app imports, so the File Share contract lives in one place. Branded Lite adds only its
5
+ // copy pack: the descriptor bakes the provisioned `fileShare.*` overrides into the onAppear params,
6
+ // and every service string is read through `copyParam`.
7
+ import { createFileShareService } from "@himalaya/screens";
8
+ import { copyParam, stashCopy } from "../_shared/himi-copy.js";
614
9
 
615
- const svc = defineService("himiBrandedFileShare", {
616
- state: INITIAL,
617
- notHydrated: RUN_ONLY_KEYS,
618
- notPersisted: RUN_ONLY_KEYS,
619
- actions: {
620
- load,
621
- retry,
622
- back,
623
- search,
624
- loadMore,
625
- open: openItem,
626
- save: saveItem,
627
- upload,
628
- // Background completions (see STATE above), not UI actions.
629
- settleRead: applyRead,
630
- settle,
631
- progress,
632
- },
633
- });
10
+ const svc = createFileShareService({ service: "himiBrandedFileShare", text: copyParam, onAppearArgs: stashCopy });
634
11
 
635
- export { svc, rowsOf, subtitleOf };
12
+ export { svc };