@wix/himalaya-cli 0.1856.0 → 0.1858.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 (345) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/copy.generated.d.ts +20 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/feedback.d.ts +9 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/index.d.ts +3 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +21 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +53 -16
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +94 -29
  7. package/dist/browser-plane/assets.json +5 -5
  8. package/dist/browser-plane/preview-deferred/{c1f008be31a41521c6de7c1afad419a1f4dad53cbc2701a14738d5b22f291463.bin → b2b76cc19f21f7c6d8b1a3cd6aa1ac0f194b052fa183761d08bd4f43fd46f844.bin} +1 -1
  9. package/dist/browser-plane/sw.js +9 -9
  10. package/dist/cli.mjs +1796 -1524
  11. package/dist/preview-assets.generated.bin +0 -0
  12. package/guides/one-app-section-mappings.md +2 -2
  13. package/guides/one-app-to-himi-app.md +11 -2
  14. package/guides/recipe-auth.md +18 -1
  15. package/guides/sdk-reference.json +4 -4
  16. package/package.json +2 -2
  17. package/templates/beauty-salon/l10n/ar.json +5 -0
  18. package/templates/beauty-salon/l10n/cs.json +5 -0
  19. package/templates/beauty-salon/l10n/da.json +5 -0
  20. package/templates/beauty-salon/l10n/de.json +5 -0
  21. package/templates/beauty-salon/l10n/el.json +5 -0
  22. package/templates/beauty-salon/l10n/es.json +5 -0
  23. package/templates/beauty-salon/l10n/fi.json +5 -0
  24. package/templates/beauty-salon/l10n/fr.json +5 -0
  25. package/templates/beauty-salon/l10n/he.json +4 -0
  26. package/templates/beauty-salon/l10n/hu.json +5 -0
  27. package/templates/beauty-salon/l10n/id.json +5 -0
  28. package/templates/beauty-salon/l10n/it.json +5 -0
  29. package/templates/beauty-salon/l10n/ja.json +5 -0
  30. package/templates/beauty-salon/l10n/ko.json +5 -0
  31. package/templates/beauty-salon/l10n/lt.json +5 -0
  32. package/templates/beauty-salon/l10n/nl.json +5 -0
  33. package/templates/beauty-salon/l10n/no.json +5 -0
  34. package/templates/beauty-salon/l10n/pl.json +5 -0
  35. package/templates/beauty-salon/l10n/pt.json +5 -0
  36. package/templates/beauty-salon/l10n/ru.json +5 -0
  37. package/templates/beauty-salon/l10n/sv.json +5 -0
  38. package/templates/beauty-salon/l10n/th.json +5 -0
  39. package/templates/beauty-salon/l10n/tr.json +5 -0
  40. package/templates/beauty-salon/l10n/uk.json +5 -0
  41. package/templates/beauty-salon/l10n/vi.json +5 -0
  42. package/templates/beauty-salon/l10n/zh.json +5 -0
  43. package/templates/beauty-salon/tier5-src/_shared/himi-media.ts +6 -2
  44. package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +18 -0
  45. package/templates/beauty-salon/tier5-src/_shared/program-standing.ts +24 -4
  46. package/templates/branded-lite/l10n/ar.json +10 -0
  47. package/templates/branded-lite/l10n/cs.json +10 -0
  48. package/templates/branded-lite/l10n/da.json +10 -0
  49. package/templates/branded-lite/l10n/de.json +10 -0
  50. package/templates/branded-lite/l10n/el.json +10 -0
  51. package/templates/branded-lite/l10n/es.json +10 -0
  52. package/templates/branded-lite/l10n/fi.json +10 -0
  53. package/templates/branded-lite/l10n/fr.json +10 -0
  54. package/templates/branded-lite/l10n/he.json +8 -0
  55. package/templates/branded-lite/l10n/hu.json +10 -0
  56. package/templates/branded-lite/l10n/id.json +10 -0
  57. package/templates/branded-lite/l10n/it.json +10 -0
  58. package/templates/branded-lite/l10n/ja.json +10 -0
  59. package/templates/branded-lite/l10n/ko.json +10 -0
  60. package/templates/branded-lite/l10n/lt.json +10 -0
  61. package/templates/branded-lite/l10n/nl.json +10 -0
  62. package/templates/branded-lite/l10n/no.json +10 -0
  63. package/templates/branded-lite/l10n/pl.json +10 -0
  64. package/templates/branded-lite/l10n/pt.json +10 -0
  65. package/templates/branded-lite/l10n/ru.json +10 -0
  66. package/templates/branded-lite/l10n/sv.json +10 -0
  67. package/templates/branded-lite/l10n/th.json +10 -0
  68. package/templates/branded-lite/l10n/tr.json +10 -0
  69. package/templates/branded-lite/l10n/uk.json +10 -0
  70. package/templates/branded-lite/l10n/vi.json +10 -0
  71. package/templates/branded-lite/l10n/zh.json +10 -0
  72. package/templates/branded-lite/tier5-src/_shared/himi-media.ts +6 -2
  73. package/templates/branded-lite/tier5-src/_shared/program-fields.ts +18 -0
  74. package/templates/branded-lite/tier5-src/_shared/program-standing.ts +24 -4
  75. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +53 -20
  76. package/templates/branded-lite/tier5-src/himi-branded-lite-member-programs/index.ts +3 -2
  77. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +48 -26
  78. package/templates/community-club/l10n/ar.json +5 -0
  79. package/templates/community-club/l10n/cs.json +5 -0
  80. package/templates/community-club/l10n/da.json +5 -0
  81. package/templates/community-club/l10n/de.json +5 -0
  82. package/templates/community-club/l10n/el.json +5 -0
  83. package/templates/community-club/l10n/es.json +5 -0
  84. package/templates/community-club/l10n/fi.json +5 -0
  85. package/templates/community-club/l10n/fr.json +5 -0
  86. package/templates/community-club/l10n/he.json +4 -0
  87. package/templates/community-club/l10n/hu.json +5 -0
  88. package/templates/community-club/l10n/id.json +5 -0
  89. package/templates/community-club/l10n/it.json +5 -0
  90. package/templates/community-club/l10n/ja.json +5 -0
  91. package/templates/community-club/l10n/ko.json +5 -0
  92. package/templates/community-club/l10n/lt.json +5 -0
  93. package/templates/community-club/l10n/nl.json +5 -0
  94. package/templates/community-club/l10n/no.json +5 -0
  95. package/templates/community-club/l10n/pl.json +5 -0
  96. package/templates/community-club/l10n/pt.json +5 -0
  97. package/templates/community-club/l10n/ru.json +5 -0
  98. package/templates/community-club/l10n/sv.json +5 -0
  99. package/templates/community-club/l10n/th.json +5 -0
  100. package/templates/community-club/l10n/tr.json +5 -0
  101. package/templates/community-club/l10n/uk.json +5 -0
  102. package/templates/community-club/l10n/vi.json +5 -0
  103. package/templates/community-club/l10n/zh.json +5 -0
  104. package/templates/community-club/tier5-src/_shared/himi-media.ts +6 -2
  105. package/templates/community-club/tier5-src/_shared/program-fields.ts +18 -0
  106. package/templates/community-club/tier5-src/_shared/program-standing.ts +24 -4
  107. package/templates/events-meetups/l10n/ar.json +5 -0
  108. package/templates/events-meetups/l10n/cs.json +5 -0
  109. package/templates/events-meetups/l10n/da.json +5 -0
  110. package/templates/events-meetups/l10n/de.json +5 -0
  111. package/templates/events-meetups/l10n/el.json +5 -0
  112. package/templates/events-meetups/l10n/es.json +5 -0
  113. package/templates/events-meetups/l10n/fi.json +5 -0
  114. package/templates/events-meetups/l10n/fr.json +5 -0
  115. package/templates/events-meetups/l10n/he.json +4 -0
  116. package/templates/events-meetups/l10n/hu.json +5 -0
  117. package/templates/events-meetups/l10n/id.json +5 -0
  118. package/templates/events-meetups/l10n/it.json +5 -0
  119. package/templates/events-meetups/l10n/ja.json +5 -0
  120. package/templates/events-meetups/l10n/ko.json +5 -0
  121. package/templates/events-meetups/l10n/lt.json +5 -0
  122. package/templates/events-meetups/l10n/nl.json +5 -0
  123. package/templates/events-meetups/l10n/no.json +5 -0
  124. package/templates/events-meetups/l10n/pl.json +5 -0
  125. package/templates/events-meetups/l10n/pt.json +5 -0
  126. package/templates/events-meetups/l10n/ru.json +5 -0
  127. package/templates/events-meetups/l10n/sv.json +5 -0
  128. package/templates/events-meetups/l10n/th.json +5 -0
  129. package/templates/events-meetups/l10n/tr.json +5 -0
  130. package/templates/events-meetups/l10n/uk.json +5 -0
  131. package/templates/events-meetups/l10n/vi.json +5 -0
  132. package/templates/events-meetups/l10n/zh.json +5 -0
  133. package/templates/events-meetups/tier5-src/_shared/himi-media.ts +6 -2
  134. package/templates/events-meetups/tier5-src/_shared/program-fields.ts +18 -0
  135. package/templates/events-meetups/tier5-src/_shared/program-standing.ts +24 -4
  136. package/templates/fitness-gym/tier5-src/_shared/himi-media.ts +6 -2
  137. package/templates/fitness-gym/tier5-src/_shared/program-fields.ts +18 -0
  138. package/templates/fitness-gym/tier5-src/_shared/program-standing.ts +24 -4
  139. package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +3 -2
  140. package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +48 -26
  141. package/templates/gym-fitness/l10n/ar.json +5 -0
  142. package/templates/gym-fitness/l10n/cs.json +5 -0
  143. package/templates/gym-fitness/l10n/da.json +5 -0
  144. package/templates/gym-fitness/l10n/de.json +5 -0
  145. package/templates/gym-fitness/l10n/el.json +5 -0
  146. package/templates/gym-fitness/l10n/es.json +5 -0
  147. package/templates/gym-fitness/l10n/fi.json +5 -0
  148. package/templates/gym-fitness/l10n/fr.json +5 -0
  149. package/templates/gym-fitness/l10n/he.json +4 -0
  150. package/templates/gym-fitness/l10n/hu.json +5 -0
  151. package/templates/gym-fitness/l10n/id.json +5 -0
  152. package/templates/gym-fitness/l10n/it.json +5 -0
  153. package/templates/gym-fitness/l10n/ja.json +5 -0
  154. package/templates/gym-fitness/l10n/ko.json +5 -0
  155. package/templates/gym-fitness/l10n/lt.json +5 -0
  156. package/templates/gym-fitness/l10n/nl.json +5 -0
  157. package/templates/gym-fitness/l10n/no.json +5 -0
  158. package/templates/gym-fitness/l10n/pl.json +5 -0
  159. package/templates/gym-fitness/l10n/pt.json +5 -0
  160. package/templates/gym-fitness/l10n/ru.json +5 -0
  161. package/templates/gym-fitness/l10n/sv.json +5 -0
  162. package/templates/gym-fitness/l10n/th.json +5 -0
  163. package/templates/gym-fitness/l10n/tr.json +5 -0
  164. package/templates/gym-fitness/l10n/uk.json +5 -0
  165. package/templates/gym-fitness/l10n/vi.json +5 -0
  166. package/templates/gym-fitness/l10n/zh.json +5 -0
  167. package/templates/gym-fitness/tier5-src/_shared/himi-media.ts +6 -2
  168. package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +18 -0
  169. package/templates/gym-fitness/tier5-src/_shared/program-standing.ts +24 -4
  170. package/templates/nonprofit-cause/l10n/ar.json +5 -0
  171. package/templates/nonprofit-cause/l10n/cs.json +5 -0
  172. package/templates/nonprofit-cause/l10n/da.json +5 -0
  173. package/templates/nonprofit-cause/l10n/de.json +5 -0
  174. package/templates/nonprofit-cause/l10n/el.json +5 -0
  175. package/templates/nonprofit-cause/l10n/es.json +5 -0
  176. package/templates/nonprofit-cause/l10n/fi.json +5 -0
  177. package/templates/nonprofit-cause/l10n/fr.json +5 -0
  178. package/templates/nonprofit-cause/l10n/he.json +4 -0
  179. package/templates/nonprofit-cause/l10n/hu.json +5 -0
  180. package/templates/nonprofit-cause/l10n/id.json +5 -0
  181. package/templates/nonprofit-cause/l10n/it.json +5 -0
  182. package/templates/nonprofit-cause/l10n/ja.json +5 -0
  183. package/templates/nonprofit-cause/l10n/ko.json +5 -0
  184. package/templates/nonprofit-cause/l10n/lt.json +5 -0
  185. package/templates/nonprofit-cause/l10n/nl.json +5 -0
  186. package/templates/nonprofit-cause/l10n/no.json +5 -0
  187. package/templates/nonprofit-cause/l10n/pl.json +5 -0
  188. package/templates/nonprofit-cause/l10n/pt.json +5 -0
  189. package/templates/nonprofit-cause/l10n/ru.json +5 -0
  190. package/templates/nonprofit-cause/l10n/sv.json +5 -0
  191. package/templates/nonprofit-cause/l10n/th.json +5 -0
  192. package/templates/nonprofit-cause/l10n/tr.json +5 -0
  193. package/templates/nonprofit-cause/l10n/uk.json +5 -0
  194. package/templates/nonprofit-cause/l10n/vi.json +5 -0
  195. package/templates/nonprofit-cause/l10n/zh.json +5 -0
  196. package/templates/nonprofit-cause/tier5-src/_shared/himi-media.ts +6 -2
  197. package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +18 -0
  198. package/templates/nonprofit-cause/tier5-src/_shared/program-standing.ts +24 -4
  199. package/templates/podcast-creator/l10n/ar.json +5 -0
  200. package/templates/podcast-creator/l10n/cs.json +5 -0
  201. package/templates/podcast-creator/l10n/da.json +5 -0
  202. package/templates/podcast-creator/l10n/de.json +5 -0
  203. package/templates/podcast-creator/l10n/el.json +5 -0
  204. package/templates/podcast-creator/l10n/es.json +5 -0
  205. package/templates/podcast-creator/l10n/fi.json +5 -0
  206. package/templates/podcast-creator/l10n/fr.json +5 -0
  207. package/templates/podcast-creator/l10n/he.json +4 -0
  208. package/templates/podcast-creator/l10n/hu.json +5 -0
  209. package/templates/podcast-creator/l10n/id.json +5 -0
  210. package/templates/podcast-creator/l10n/it.json +5 -0
  211. package/templates/podcast-creator/l10n/ja.json +5 -0
  212. package/templates/podcast-creator/l10n/ko.json +5 -0
  213. package/templates/podcast-creator/l10n/lt.json +5 -0
  214. package/templates/podcast-creator/l10n/nl.json +5 -0
  215. package/templates/podcast-creator/l10n/no.json +5 -0
  216. package/templates/podcast-creator/l10n/pl.json +5 -0
  217. package/templates/podcast-creator/l10n/pt.json +5 -0
  218. package/templates/podcast-creator/l10n/ru.json +5 -0
  219. package/templates/podcast-creator/l10n/sv.json +5 -0
  220. package/templates/podcast-creator/l10n/th.json +5 -0
  221. package/templates/podcast-creator/l10n/tr.json +5 -0
  222. package/templates/podcast-creator/l10n/uk.json +5 -0
  223. package/templates/podcast-creator/l10n/vi.json +5 -0
  224. package/templates/podcast-creator/l10n/zh.json +5 -0
  225. package/templates/podcast-creator/tier5-src/_shared/himi-media.ts +6 -2
  226. package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +18 -0
  227. package/templates/podcast-creator/tier5-src/_shared/program-standing.ts +24 -4
  228. package/templates/portfolio-creative/l10n/ar.json +5 -0
  229. package/templates/portfolio-creative/l10n/cs.json +5 -0
  230. package/templates/portfolio-creative/l10n/da.json +5 -0
  231. package/templates/portfolio-creative/l10n/de.json +5 -0
  232. package/templates/portfolio-creative/l10n/el.json +5 -0
  233. package/templates/portfolio-creative/l10n/es.json +5 -0
  234. package/templates/portfolio-creative/l10n/fi.json +5 -0
  235. package/templates/portfolio-creative/l10n/fr.json +5 -0
  236. package/templates/portfolio-creative/l10n/he.json +4 -0
  237. package/templates/portfolio-creative/l10n/hu.json +5 -0
  238. package/templates/portfolio-creative/l10n/id.json +5 -0
  239. package/templates/portfolio-creative/l10n/it.json +5 -0
  240. package/templates/portfolio-creative/l10n/ja.json +5 -0
  241. package/templates/portfolio-creative/l10n/ko.json +5 -0
  242. package/templates/portfolio-creative/l10n/lt.json +5 -0
  243. package/templates/portfolio-creative/l10n/nl.json +5 -0
  244. package/templates/portfolio-creative/l10n/no.json +5 -0
  245. package/templates/portfolio-creative/l10n/pl.json +5 -0
  246. package/templates/portfolio-creative/l10n/pt.json +5 -0
  247. package/templates/portfolio-creative/l10n/ru.json +5 -0
  248. package/templates/portfolio-creative/l10n/sv.json +5 -0
  249. package/templates/portfolio-creative/l10n/th.json +5 -0
  250. package/templates/portfolio-creative/l10n/tr.json +5 -0
  251. package/templates/portfolio-creative/l10n/uk.json +5 -0
  252. package/templates/portfolio-creative/l10n/vi.json +5 -0
  253. package/templates/portfolio-creative/l10n/zh.json +5 -0
  254. package/templates/portfolio-creative/tier5-src/_shared/himi-media.ts +6 -2
  255. package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +18 -0
  256. package/templates/portfolio-creative/tier5-src/_shared/program-standing.ts +24 -4
  257. package/templates/restaurant/l10n/ar.json +5 -0
  258. package/templates/restaurant/l10n/cs.json +5 -0
  259. package/templates/restaurant/l10n/da.json +5 -0
  260. package/templates/restaurant/l10n/de.json +5 -0
  261. package/templates/restaurant/l10n/el.json +5 -0
  262. package/templates/restaurant/l10n/es.json +5 -0
  263. package/templates/restaurant/l10n/fi.json +5 -0
  264. package/templates/restaurant/l10n/fr.json +5 -0
  265. package/templates/restaurant/l10n/he.json +4 -0
  266. package/templates/restaurant/l10n/hu.json +5 -0
  267. package/templates/restaurant/l10n/id.json +5 -0
  268. package/templates/restaurant/l10n/it.json +5 -0
  269. package/templates/restaurant/l10n/ja.json +5 -0
  270. package/templates/restaurant/l10n/ko.json +5 -0
  271. package/templates/restaurant/l10n/lt.json +5 -0
  272. package/templates/restaurant/l10n/nl.json +5 -0
  273. package/templates/restaurant/l10n/no.json +5 -0
  274. package/templates/restaurant/l10n/pl.json +5 -0
  275. package/templates/restaurant/l10n/pt.json +5 -0
  276. package/templates/restaurant/l10n/ru.json +5 -0
  277. package/templates/restaurant/l10n/sv.json +5 -0
  278. package/templates/restaurant/l10n/th.json +5 -0
  279. package/templates/restaurant/l10n/tr.json +5 -0
  280. package/templates/restaurant/l10n/uk.json +5 -0
  281. package/templates/restaurant/l10n/vi.json +5 -0
  282. package/templates/restaurant/l10n/zh.json +5 -0
  283. package/templates/restaurant/tier5-src/_shared/himi-media.ts +6 -2
  284. package/templates/restaurant/tier5-src/_shared/program-fields.ts +18 -0
  285. package/templates/restaurant/tier5-src/_shared/program-standing.ts +24 -4
  286. package/templates/retail-store/l10n/ar.json +5 -0
  287. package/templates/retail-store/l10n/cs.json +5 -0
  288. package/templates/retail-store/l10n/da.json +5 -0
  289. package/templates/retail-store/l10n/de.json +5 -0
  290. package/templates/retail-store/l10n/el.json +5 -0
  291. package/templates/retail-store/l10n/es.json +5 -0
  292. package/templates/retail-store/l10n/fi.json +5 -0
  293. package/templates/retail-store/l10n/fr.json +5 -0
  294. package/templates/retail-store/l10n/he.json +4 -0
  295. package/templates/retail-store/l10n/hu.json +5 -0
  296. package/templates/retail-store/l10n/id.json +5 -0
  297. package/templates/retail-store/l10n/it.json +5 -0
  298. package/templates/retail-store/l10n/ja.json +5 -0
  299. package/templates/retail-store/l10n/ko.json +5 -0
  300. package/templates/retail-store/l10n/lt.json +5 -0
  301. package/templates/retail-store/l10n/nl.json +5 -0
  302. package/templates/retail-store/l10n/no.json +5 -0
  303. package/templates/retail-store/l10n/pl.json +5 -0
  304. package/templates/retail-store/l10n/pt.json +5 -0
  305. package/templates/retail-store/l10n/ru.json +5 -0
  306. package/templates/retail-store/l10n/sv.json +5 -0
  307. package/templates/retail-store/l10n/th.json +5 -0
  308. package/templates/retail-store/l10n/tr.json +5 -0
  309. package/templates/retail-store/l10n/uk.json +5 -0
  310. package/templates/retail-store/l10n/vi.json +5 -0
  311. package/templates/retail-store/l10n/zh.json +5 -0
  312. package/templates/retail-store/tier5-src/_shared/himi-media.ts +6 -2
  313. package/templates/retail-store/tier5-src/_shared/program-fields.ts +18 -0
  314. package/templates/retail-store/tier5-src/_shared/program-standing.ts +24 -4
  315. package/templates/yoga-studio/l10n/ar.json +10 -0
  316. package/templates/yoga-studio/l10n/cs.json +10 -0
  317. package/templates/yoga-studio/l10n/da.json +10 -0
  318. package/templates/yoga-studio/l10n/de.json +10 -0
  319. package/templates/yoga-studio/l10n/el.json +10 -0
  320. package/templates/yoga-studio/l10n/es.json +10 -0
  321. package/templates/yoga-studio/l10n/fi.json +10 -0
  322. package/templates/yoga-studio/l10n/fr.json +10 -0
  323. package/templates/yoga-studio/l10n/he.json +8 -0
  324. package/templates/yoga-studio/l10n/hu.json +10 -0
  325. package/templates/yoga-studio/l10n/id.json +10 -0
  326. package/templates/yoga-studio/l10n/it.json +10 -0
  327. package/templates/yoga-studio/l10n/ja.json +10 -0
  328. package/templates/yoga-studio/l10n/ko.json +10 -0
  329. package/templates/yoga-studio/l10n/lt.json +10 -0
  330. package/templates/yoga-studio/l10n/nl.json +10 -0
  331. package/templates/yoga-studio/l10n/no.json +10 -0
  332. package/templates/yoga-studio/l10n/pl.json +10 -0
  333. package/templates/yoga-studio/l10n/pt.json +10 -0
  334. package/templates/yoga-studio/l10n/ru.json +10 -0
  335. package/templates/yoga-studio/l10n/sv.json +10 -0
  336. package/templates/yoga-studio/l10n/th.json +10 -0
  337. package/templates/yoga-studio/l10n/tr.json +10 -0
  338. package/templates/yoga-studio/l10n/uk.json +10 -0
  339. package/templates/yoga-studio/l10n/vi.json +10 -0
  340. package/templates/yoga-studio/l10n/zh.json +10 -0
  341. package/templates/yoga-studio/tier5-src/_shared/himi-media.ts +6 -2
  342. package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +18 -0
  343. package/templates/yoga-studio/tier5-src/_shared/program-standing.ts +24 -4
  344. package/templates/yoga-studio/tier5-src/himi-branded-lite-member-programs/index.ts +3 -2
  345. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +48 -26
@@ -125,5 +125,25 @@ declare const _default: {
125
125
  readonly "auth.gate.verify.body": "Enter the confirmation code sent to your email to finish signing in.";
126
126
  readonly "auth.gate.cancel": "Cancel";
127
127
  readonly "auth.gate.codePlaceholder": "Confirmation code";
128
+ readonly "auth.gate.close": "Close";
129
+ readonly "auth.gate.captcha.title": "Verification";
130
+ readonly "auth.gate.signingIn": "Signing in…";
131
+ readonly "auth.gate.account.subtitle": "Sign in with your Wix account to see the sites you belong to.";
132
+ readonly "auth.gate.account.failed": "Sign-in failed. Try again.";
133
+ readonly "auth.gate.account.unavailable": "Signing in isn't available on this website yet.";
134
+ readonly "auth.gate.account.upstreamFailed": "Wix could not confirm your account right now. Try again in a moment.";
135
+ readonly "auth.gate.account.unreachable": "Could not reach the sign-in service. Check your connection and try again.";
136
+ readonly "auth.feedback.notCompleted": "Sign-in did not complete. Please try again.";
137
+ readonly "auth.feedback.registerNotCompleted": "We could not create that account. Try a different email.";
138
+ readonly "auth.flow.registerTitle": "Create an account";
139
+ readonly "auth.flow.subhead": "Memberships belong to a member account.";
140
+ readonly "auth.flow.toRegister": "New here? Create an account";
141
+ readonly "auth.flow.toSignIn": "Already a member? Sign In";
142
+ readonly "auth.flow.signOut": "Sign out";
143
+ readonly "auth.flow.signedInTitle": "You're signed in";
144
+ readonly "auth.flow.signedInNotice": "Signed in.";
145
+ readonly "auth.flow.signedOutNotice": "Signed out.";
146
+ readonly "auth.flow.signOutFailed": "Sign-out did not complete. Try again.";
147
+ readonly "auth.flow.missingFields": "Enter your email and password.";
128
148
  };
129
149
  export default _default;
@@ -1,5 +1,14 @@
1
1
  export type AuthFailureCode = "invalid_input" | "invalid_credentials" | "registration_failed" | "email_in_use" | "invalid_code" | "expired_code" | "network" | "rate_limited" | "unavailable" | "cancelled" | "verification_required" | "delivery_failed" | "sms_region_unsupported" | "verification_expired" | "unknown";
2
2
  export type AuthOperation = "signIn" | "register" | "reset" | "verify";
3
+ /** The English default for a catalog key (`core/runtime/l10n/auth-gate/en.json`), or "" when none. */
4
+ export declare function authDefault(key: string): string;
5
+ /**
6
+ * The app catalog's answer for `key` through the host's `@himalaya/l10n` bridge, or undefined.
7
+ * Read from the host global rather than imported: `@himalaya/l10n` throws at import on a host
8
+ * without the catalog, and only a bundle that declared the `l10n` grant may call the bridge.
9
+ */
10
+ export declare function l10nTranslate(key: string): string | undefined;
11
+ /** key -> the translator's answer (an answer equal to the key is "no entry") -> English default. */
3
12
  export declare function authMessage(key: string, translate?: (key: string) => string | undefined): string;
4
13
  /** Only structured failure identities cross into UI copy. Never echo server/error text. */
5
14
  export declare function authFailure(raw: unknown, operation?: AuthOperation, translate?: (key: string) => string | undefined): {
@@ -6,6 +6,9 @@ export declare const DEFAULT_AUTH_PREFIX = "himi.wix";
6
6
  export interface AuthOptions {
7
7
  /** Override when the host registered a non-default prefix. */
8
8
  prefix?: string;
9
+ /** Resolves a catalog key (`auth.feedback.*`) to the app's translation, or undefined/the key
10
+ * when it has none. Defaults to `@himalaya/l10n` when the worker declared the `l10n` grant. */
11
+ translate?: (key: string) => string | undefined;
9
12
  }
10
13
  /** The outcome of an auth attempt. `ok: false` always carries a showable reason. */
11
14
  export type AuthResult = {
@@ -85,7 +85,18 @@ export interface AuthCopy {
85
85
  toSignInCta?: string;
86
86
  signOutCta?: string;
87
87
  signedInTitle?: string;
88
+ /** Notice after a successful sign-in. */
89
+ signedInNotice?: string;
90
+ /** Notice after a sign-out. */
91
+ signedOutNotice?: string;
92
+ /** Notice when a sign-out left the session alive. */
93
+ signOutFailed?: string;
94
+ /** Notice when email or password is empty. */
95
+ missingFields?: string;
88
96
  }
97
+ /** `text(key, fallback)`: the app catalog's raw entry, or `fallback` when it has none. An answer
98
+ * equal to the key counts as no entry (`t` answers its own key for a missing row). */
99
+ type AuthTextHook = (key: string, fallback: string) => string;
89
100
  export interface AuthScreenOptions {
90
101
  /** Where the built worker bundle is served from. */
91
102
  bundleUrl: string;
@@ -96,6 +107,11 @@ export interface AuthScreenOptions {
96
107
  /** Offer "create an account" alongside sign-in. Default true. */
97
108
  register?: boolean;
98
109
  copy?: AuthCopy;
110
+ /** Resolve copy from the app's catalog when the screen is built: `text("auth.gate.signIn", fallback)`. */
111
+ text?: AuthTextHook;
112
+ /** Extra capabilities the worker needs, e.g. `["l10n"]` so `createAuthService` can read the app
113
+ * catalog through `@himalaya/l10n` (its default `translate` is silent without that grant). */
114
+ capabilities?: string[];
99
115
  /** Buttons shown once signed in, as { label, screenId } — e.g. back to the library. */
100
116
  next?: Array<{
101
117
  label: string;
@@ -130,6 +146,11 @@ export interface AuthServiceOptions {
130
146
  service?: string;
131
147
  register?: boolean;
132
148
  copy?: AuthCopy;
149
+ /** Resolve copy from the app's catalog at action time: `text("auth.flow.signedInNotice", fallback)`.
150
+ * Defaults to the `@himalaya/l10n` bridge when the worker declared the `l10n` grant. */
151
+ text?: AuthTextHook;
152
+ /** Resolves a failure-reason key (`auth.feedback.*`); defaults to the same catalog. */
153
+ translate?: (key: string) => string | undefined;
133
154
  }
134
155
  /**
135
156
  * The worker behind `authScreen`. An app's whole worker file is:
@@ -249,7 +249,27 @@ var copy_generated_default = {
249
249
  "auth.gate.verify.title": "Verify your email",
250
250
  "auth.gate.verify.body": "Enter the confirmation code sent to your email to finish signing in.",
251
251
  "auth.gate.cancel": "Cancel",
252
- "auth.gate.codePlaceholder": "Confirmation code"
252
+ "auth.gate.codePlaceholder": "Confirmation code",
253
+ "auth.gate.close": "Close",
254
+ "auth.gate.captcha.title": "Verification",
255
+ "auth.gate.signingIn": "Signing in\u2026",
256
+ "auth.gate.account.subtitle": "Sign in with your Wix account to see the sites you belong to.",
257
+ "auth.gate.account.failed": "Sign-in failed. Try again.",
258
+ "auth.gate.account.unavailable": "Signing in isn't available on this website yet.",
259
+ "auth.gate.account.upstreamFailed": "Wix could not confirm your account right now. Try again in a moment.",
260
+ "auth.gate.account.unreachable": "Could not reach the sign-in service. Check your connection and try again.",
261
+ "auth.feedback.notCompleted": "Sign-in did not complete. Please try again.",
262
+ "auth.feedback.registerNotCompleted": "We could not create that account. Try a different email.",
263
+ "auth.flow.registerTitle": "Create an account",
264
+ "auth.flow.subhead": "Memberships belong to a member account.",
265
+ "auth.flow.toRegister": "New here? Create an account",
266
+ "auth.flow.toSignIn": "Already a member? Sign In",
267
+ "auth.flow.signOut": "Sign out",
268
+ "auth.flow.signedInTitle": "You're signed in",
269
+ "auth.flow.signedInNotice": "Signed in.",
270
+ "auth.flow.signedOutNotice": "Signed out.",
271
+ "auth.flow.signOutFailed": "Sign-out did not complete. Try again.",
272
+ "auth.flow.missingFields": "Enter your email and password."
253
273
  };
254
274
 
255
275
  // ../../stdlib/flows/auth/src/feedback.ts
@@ -296,9 +316,24 @@ var aliases = {
296
316
  };
297
317
  var iamCredentialCodes = /* @__PURE__ */ new Set(["-19999", "-19976"]);
298
318
  var iamEmailInUseCode = "-19995";
319
+ function authDefault(key) {
320
+ return copy_generated_default[key] ?? "";
321
+ }
322
+ function l10nTranslate(key) {
323
+ try {
324
+ const caps = globalThis.himalaya?.capabilities;
325
+ if (!Array.isArray(caps) || !caps.includes("l10n")) return void 0;
326
+ const lookup = "__himalaya_l10n" in globalThis ? globalThis.__himalaya_l10n : void 0;
327
+ if (typeof lookup !== "function") return void 0;
328
+ const data = JSON.parse(lookup(key));
329
+ return !data || typeof data !== "object" || data.error || typeof data.message !== "string" || !data.message ? void 0 : data.message;
330
+ } catch {
331
+ return void 0;
332
+ }
333
+ }
299
334
  function authMessage(key, translate) {
300
- const translated = translate?.(key);
301
- return translated && translated !== key ? translated : copy_generated_default[key] ?? copy_generated_default["auth.feedback.unknown"];
335
+ const translated = (translate ?? l10nTranslate)(key);
336
+ return translated && translated !== key ? translated : authDefault(key) || authDefault("auth.feedback.unknown");
302
337
  }
303
338
  function authFailure(raw, operation = "signIn", translate) {
304
339
  const value = raw && typeof raw === "object" ? raw : {};
@@ -334,7 +369,7 @@ function identityErrors(input, operation, requireName = false) {
334
369
  // ../../stdlib/flows/auth/src/index.ts
335
370
  async function dispatch(handlerId, params) {
336
371
  const fn = globalThis.himalaya?.dispatch;
337
- if (!fn) throw new Error("@himalaya/auth: host did not install the dispatch bridge");
372
+ if (!fn) throw new Error("auth_dispatch_bridge_missing");
338
373
  return await fn(handlerId, params);
339
374
  }
340
375
  var DEFAULT_AUTH_PREFIX = "himi.wix";
@@ -363,37 +398,37 @@ async function authState(opts) {
363
398
  async function signedInEmail(opts) {
364
399
  return (await authState(opts)).email;
365
400
  }
366
- async function attempt(action, params, failureText, opts) {
401
+ async function attempt(action, params, failureKey, opts) {
367
402
  let raw;
368
403
  try {
369
404
  raw = await dispatch(id(opts, action), params);
370
405
  } catch (e) {
371
- return { ok: false, ...authFailure(e, action === "registerDirect" ? "register" : "signIn") };
406
+ return { ok: false, ...authFailure(e, action === "registerDirect" ? "register" : "signIn", opts?.translate) };
372
407
  }
373
- if (!reportedOk(raw) || raw?.error || raw?.payload?.error) return { ok: false, ...authFailure(raw, action === "registerDirect" ? "register" : "signIn") };
408
+ if (!reportedOk(raw) || raw?.error || raw?.payload?.error) return { ok: false, ...authFailure(raw, action === "registerDirect" ? "register" : "signIn", opts?.translate) };
374
409
  const state = await authState(opts);
375
410
  if (!state.signedIn) {
376
- return { ok: false, reason: failureText };
411
+ return { ok: false, reason: authMessage(failureKey, opts?.translate) };
377
412
  }
378
413
  return { ok: true, email: state.email };
379
414
  }
380
415
  function signInDirect(email, password, opts) {
381
416
  if (Object.keys(identityErrors({ email: email.trim(), password }, "signIn")).length) {
382
- return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input") });
417
+ return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input", opts?.translate) });
383
418
  }
384
419
  return attempt(
385
420
  "signInDirect",
386
421
  { email: email.trim(), password },
387
- "Sign-in did not complete. Please try again.",
422
+ "auth.feedback.notCompleted",
388
423
  opts
389
424
  );
390
425
  }
391
426
  function signIn(opts) {
392
- return attempt("signIn", {}, "Sign-in did not complete. Please try again.", opts);
427
+ return attempt("signIn", {}, "auth.feedback.notCompleted", opts);
393
428
  }
394
429
  function registerMember(email, password, profile, opts) {
395
430
  if (Object.keys(identityErrors({ email: email.trim(), password }, "register")).length) {
396
- return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input") });
431
+ return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input", opts?.translate) });
397
432
  }
398
433
  return attempt(
399
434
  "registerDirect",
@@ -403,22 +438,22 @@ function registerMember(email, password, profile, opts) {
403
438
  ...profile?.firstName ? { firstName: profile.firstName } : {},
404
439
  ...profile?.lastName ? { lastName: profile.lastName } : {}
405
440
  },
406
- "We could not create that account. Try a different email.",
441
+ "auth.feedback.registerNotCompleted",
407
442
  opts
408
443
  );
409
444
  }
410
445
  async function resetPassword(email, opts) {
411
446
  const errors = identityErrors({ email }, "reset");
412
- if (errors.email) return { ok: false, code: "invalid_input", reason: authMessage(errors.email) };
447
+ if (errors.email) return { ok: false, code: "invalid_input", reason: authMessage(errors.email, opts?.translate) };
413
448
  email = email.trim();
414
449
  try {
415
450
  const raw = await dispatch(id(opts, "resetPassword"), { email });
416
451
  if (!reportedOk(raw) || raw?.error || raw?.payload?.error) {
417
- return { ok: false, ...authFailure(raw, "reset") };
452
+ return { ok: false, ...authFailure(raw, "reset", opts?.translate) };
418
453
  }
419
454
  return { ok: true, email };
420
455
  } catch (e) {
421
- return { ok: false, ...authFailure(e, "reset") };
456
+ return { ok: false, ...authFailure(e, "reset", opts?.translate) };
422
457
  }
423
458
  }
424
459
  async function signOut(opts) {
@@ -430,10 +465,12 @@ async function signOut(opts) {
430
465
  }
431
466
  export {
432
467
  DEFAULT_AUTH_PREFIX,
468
+ authDefault,
433
469
  authFailure,
434
470
  authMessage,
435
471
  authState,
436
472
  identityErrors,
473
+ l10nTranslate,
437
474
  registerMember,
438
475
  resetPassword,
439
476
  signIn,
@@ -2046,7 +2046,27 @@ var copy_generated_default = {
2046
2046
  "auth.gate.verify.title": "Verify your email",
2047
2047
  "auth.gate.verify.body": "Enter the confirmation code sent to your email to finish signing in.",
2048
2048
  "auth.gate.cancel": "Cancel",
2049
- "auth.gate.codePlaceholder": "Confirmation code"
2049
+ "auth.gate.codePlaceholder": "Confirmation code",
2050
+ "auth.gate.close": "Close",
2051
+ "auth.gate.captcha.title": "Verification",
2052
+ "auth.gate.signingIn": "Signing in\u2026",
2053
+ "auth.gate.account.subtitle": "Sign in with your Wix account to see the sites you belong to.",
2054
+ "auth.gate.account.failed": "Sign-in failed. Try again.",
2055
+ "auth.gate.account.unavailable": "Signing in isn't available on this website yet.",
2056
+ "auth.gate.account.upstreamFailed": "Wix could not confirm your account right now. Try again in a moment.",
2057
+ "auth.gate.account.unreachable": "Could not reach the sign-in service. Check your connection and try again.",
2058
+ "auth.feedback.notCompleted": "Sign-in did not complete. Please try again.",
2059
+ "auth.feedback.registerNotCompleted": "We could not create that account. Try a different email.",
2060
+ "auth.flow.registerTitle": "Create an account",
2061
+ "auth.flow.subhead": "Memberships belong to a member account.",
2062
+ "auth.flow.toRegister": "New here? Create an account",
2063
+ "auth.flow.toSignIn": "Already a member? Sign In",
2064
+ "auth.flow.signOut": "Sign out",
2065
+ "auth.flow.signedInTitle": "You're signed in",
2066
+ "auth.flow.signedInNotice": "Signed in.",
2067
+ "auth.flow.signedOutNotice": "Signed out.",
2068
+ "auth.flow.signOutFailed": "Sign-out did not complete. Try again.",
2069
+ "auth.flow.missingFields": "Enter your email and password."
2050
2070
  };
2051
2071
 
2052
2072
  // ../../stdlib/flows/auth/src/feedback.ts
@@ -2093,9 +2113,24 @@ var aliases = {
2093
2113
  };
2094
2114
  var iamCredentialCodes = /* @__PURE__ */ new Set(["-19999", "-19976"]);
2095
2115
  var iamEmailInUseCode = "-19995";
2116
+ function authDefault(key) {
2117
+ return copy_generated_default[key] ?? "";
2118
+ }
2119
+ function l10nTranslate(key) {
2120
+ try {
2121
+ const caps = globalThis.himalaya?.capabilities;
2122
+ if (!Array.isArray(caps) || !caps.includes("l10n")) return void 0;
2123
+ const lookup = "__himalaya_l10n" in globalThis ? globalThis.__himalaya_l10n : void 0;
2124
+ if (typeof lookup !== "function") return void 0;
2125
+ const data = JSON.parse(lookup(key));
2126
+ return !data || typeof data !== "object" || data.error || typeof data.message !== "string" || !data.message ? void 0 : data.message;
2127
+ } catch {
2128
+ return void 0;
2129
+ }
2130
+ }
2096
2131
  function authMessage(key, translate) {
2097
- const translated = translate?.(key);
2098
- return translated && translated !== key ? translated : copy_generated_default[key] ?? copy_generated_default["auth.feedback.unknown"];
2132
+ const translated = (translate ?? l10nTranslate)(key);
2133
+ return translated && translated !== key ? translated : authDefault(key) || authDefault("auth.feedback.unknown");
2099
2134
  }
2100
2135
  function authFailure(raw, operation = "signIn", translate) {
2101
2136
  const value = raw && typeof raw === "object" ? raw : {};
@@ -2131,7 +2166,7 @@ function identityErrors(input, operation, requireName = false) {
2131
2166
  // ../../stdlib/flows/auth/src/index.ts
2132
2167
  async function dispatch2(handlerId, params) {
2133
2168
  const fn = globalThis.himalaya?.dispatch;
2134
- if (!fn) throw new Error("@himalaya/auth: host did not install the dispatch bridge");
2169
+ if (!fn) throw new Error("auth_dispatch_bridge_missing");
2135
2170
  return await fn(handlerId, params);
2136
2171
  }
2137
2172
  var DEFAULT_AUTH_PREFIX = "himi.wix";
@@ -2157,34 +2192,34 @@ async function authState(opts) {
2157
2192
  return { signedIn: false, email: "" };
2158
2193
  }
2159
2194
  }
2160
- async function attempt(action2, params, failureText, opts) {
2195
+ async function attempt(action2, params, failureKey, opts) {
2161
2196
  let raw;
2162
2197
  try {
2163
2198
  raw = await dispatch2(id(opts, action2), params);
2164
2199
  } catch (e) {
2165
- return { ok: false, ...authFailure(e, action2 === "registerDirect" ? "register" : "signIn") };
2200
+ return { ok: false, ...authFailure(e, action2 === "registerDirect" ? "register" : "signIn", opts?.translate) };
2166
2201
  }
2167
- if (!reportedOk(raw) || raw?.error || raw?.payload?.error) return { ok: false, ...authFailure(raw, action2 === "registerDirect" ? "register" : "signIn") };
2202
+ if (!reportedOk(raw) || raw?.error || raw?.payload?.error) return { ok: false, ...authFailure(raw, action2 === "registerDirect" ? "register" : "signIn", opts?.translate) };
2168
2203
  const state = await authState(opts);
2169
2204
  if (!state.signedIn) {
2170
- return { ok: false, reason: failureText };
2205
+ return { ok: false, reason: authMessage(failureKey, opts?.translate) };
2171
2206
  }
2172
2207
  return { ok: true, email: state.email };
2173
2208
  }
2174
2209
  function signInDirect(email, password, opts) {
2175
2210
  if (Object.keys(identityErrors({ email: email.trim(), password }, "signIn")).length) {
2176
- return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input") });
2211
+ return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input", opts?.translate) });
2177
2212
  }
2178
2213
  return attempt(
2179
2214
  "signInDirect",
2180
2215
  { email: email.trim(), password },
2181
- "Sign-in did not complete. Please try again.",
2216
+ "auth.feedback.notCompleted",
2182
2217
  opts
2183
2218
  );
2184
2219
  }
2185
2220
  function registerMember(email, password, profile, opts) {
2186
2221
  if (Object.keys(identityErrors({ email: email.trim(), password }, "register")).length) {
2187
- return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input") });
2222
+ return Promise.resolve({ ok: false, code: "invalid_input", reason: authMessage("auth.feedback.invalid_input", opts?.translate) });
2188
2223
  }
2189
2224
  return attempt(
2190
2225
  "registerDirect",
@@ -2194,7 +2229,7 @@ function registerMember(email, password, profile, opts) {
2194
2229
  ...profile?.firstName ? { firstName: profile.firstName } : {},
2195
2230
  ...profile?.lastName ? { lastName: profile.lastName } : {}
2196
2231
  },
2197
- "We could not create that account. Try a different email.",
2232
+ "auth.feedback.registerNotCompleted",
2198
2233
  opts
2199
2234
  );
2200
2235
  }
@@ -7073,10 +7108,35 @@ function envelope(screenId, title, root, logic) {
7073
7108
  payload: { id: "root", body: root.body }
7074
7109
  };
7075
7110
  }
7111
+ var AUTH_COPY_KEYS = {
7112
+ signInTitle: "auth.gate.signIn",
7113
+ registerTitle: "auth.flow.registerTitle",
7114
+ subhead: "auth.flow.subhead",
7115
+ emailLabel: "auth.gate.field.email",
7116
+ passwordLabel: "auth.gate.field.password",
7117
+ signInCta: "auth.gate.signIn",
7118
+ registerCta: "auth.gate.createAccount",
7119
+ toRegisterCta: "auth.flow.toRegister",
7120
+ toSignInCta: "auth.flow.toSignIn",
7121
+ signOutCta: "auth.flow.signOut",
7122
+ signedInTitle: "auth.flow.signedInTitle",
7123
+ signedInNotice: "auth.flow.signedInNotice",
7124
+ signedOutNotice: "auth.flow.signedOutNotice",
7125
+ signOutFailed: "auth.flow.signOutFailed",
7126
+ missingFields: "auth.flow.missingFields"
7127
+ };
7128
+ function authCopyText(c, text2, field) {
7129
+ const key = AUTH_COPY_KEYS[field];
7130
+ if (c[field] !== void 0) return c[field];
7131
+ const base = authDefault(key);
7132
+ const v = text2 ? text2(key, base) : l10nTranslate(key);
7133
+ return typeof v === "string" && v !== "" && v !== key ? v : base;
7134
+ }
7076
7135
  function authScreen(opts) {
7077
7136
  const s2 = opts.service ?? "signin";
7078
7137
  const screenId = opts.screenId ?? "signin";
7079
7138
  const c = opts.copy ?? {};
7139
+ const copyOf = (field2) => authCopyText(c, opts.text, field2);
7080
7140
  const withRegister = opts.register !== false;
7081
7141
  const field = (key, label, action2, extra = {}) => node4(`${s2}.${key}`, "TextField", {
7082
7142
  label,
@@ -7090,11 +7150,11 @@ function authScreen(opts) {
7090
7150
  text(`${s2}.subhead`, `$service:${s2}.subhead`),
7091
7151
  hideWhen(text(`${s2}.notice`, `$service:${s2}.notice`, "bodyEmphasis"), `$service:${s2}.noNotice`),
7092
7152
  hideWhen(
7093
- field("email", c.emailLabel ?? "Email", `tier5.${s2}.setEmail`, { keyboard: "email" }),
7153
+ field("email", copyOf("emailLabel"), `tier5.${s2}.setEmail`, { keyboard: "email" }),
7094
7154
  `$service:${s2}.signedIn`
7095
7155
  ),
7096
7156
  hideWhen(
7097
- field("password", c.passwordLabel ?? "Password", `tier5.${s2}.setPassword`, { secure: true }),
7157
+ field("password", copyOf("passwordLabel"), `tier5.${s2}.setPassword`, { secure: true }),
7098
7158
  `$service:${s2}.signedIn`
7099
7159
  ),
7100
7160
  hideWhen(
@@ -7131,7 +7191,7 @@ function authScreen(opts) {
7131
7191
  children.push(
7132
7192
  hideWhen(
7133
7193
  node4(`${s2}.signout`, "Button", {
7134
- title: c.signOutCta ?? "Sign out",
7194
+ title: copyOf("signOutCta"),
7135
7195
  style: "secondary",
7136
7196
  fullWidth: true,
7137
7197
  action: { actionId: `tier5.${s2}.signOut` }
@@ -7139,22 +7199,27 @@ function authScreen(opts) {
7139
7199
  `$service:${s2}.notSignedIn`
7140
7200
  )
7141
7201
  );
7142
- return envelope(screenId, opts.title ?? "Sign in", vstack(`${s2}.root`, children, 14), {
7202
+ return envelope(screenId, opts.title ?? copyOf("signInTitle"), vstack(`${s2}.root`, children, 14), {
7143
7203
  url: opts.bundleUrl,
7144
- caps: ["wix_api"]
7204
+ caps: [.../* @__PURE__ */ new Set(["wix_api", ...opts.capabilities ?? []])]
7145
7205
  });
7146
7206
  }
7147
7207
  function createAuthService(opts = {}) {
7148
7208
  const c = opts.copy ?? {};
7209
+ const copyOf = (field) => authCopyText(c, opts.text, field);
7210
+ const translate = opts.translate ?? (opts.text ? (key) => {
7211
+ const v = opts.text(key, "");
7212
+ return v === "" ? void 0 : v;
7213
+ } : void 0);
7149
7214
  const withRegister = opts.register !== false;
7150
7215
  const name = opts.service ?? "signin";
7151
7216
  const forMode = (s2, mode) => ({
7152
7217
  ...s2,
7153
7218
  mode,
7154
- headline: mode === "signIn" ? c.signInTitle ?? "Sign in" : c.registerTitle ?? "Create an account",
7155
- subhead: c.subhead ?? "Memberships belong to a member account.",
7156
- submitCta: mode === "signIn" ? c.signInCta ?? "Sign in" : c.registerCta ?? "Create account",
7157
- switchCta: mode === "signIn" ? c.toRegisterCta ?? "New here? Create an account" : c.toSignInCta ?? "Already a member? Sign in"
7219
+ headline: mode === "signIn" ? copyOf("signInTitle") : copyOf("registerTitle"),
7220
+ subhead: copyOf("subhead"),
7221
+ submitCta: mode === "signIn" ? copyOf("signInCta") : copyOf("registerCta"),
7222
+ switchCta: mode === "signIn" ? copyOf("toRegisterCta") : copyOf("toSignInCta")
7158
7223
  });
7159
7224
  const BASE = forMode(
7160
7225
  {
@@ -7175,20 +7240,20 @@ function createAuthService(opts = {}) {
7175
7240
  },
7176
7241
  "signIn"
7177
7242
  );
7178
- const failureText = (mode) => mode === "signIn" ? "We could not sign you in. Check your email and password." : "We could not create that account. Try a different email.";
7243
+ const failureText = (mode) => authMessage(mode === "signIn" ? "auth.feedback.notCompleted" : "auth.feedback.registerNotCompleted", translate);
7179
7244
  const svc = defineService(name, {
7180
7245
  state: BASE,
7181
7246
  actions: {
7182
7247
  /** Reflect an existing session so a returning member is not asked twice. */
7183
7248
  load: async (s2) => {
7184
7249
  const who = await authState();
7185
- if (!who.signedIn) return s2;
7250
+ if (!who.signedIn) return forMode(s2, s2.mode);
7186
7251
  return {
7187
7252
  ...s2,
7188
7253
  signedIn: true,
7189
7254
  notSignedIn: false,
7190
7255
  signedInEmail: who.email,
7191
- headline: c.signedInTitle ?? "You're signed in",
7256
+ headline: copyOf("signedInTitle"),
7192
7257
  subhead: who.email
7193
7258
  };
7194
7259
  },
@@ -7198,10 +7263,10 @@ function createAuthService(opts = {}) {
7198
7263
  submit: async (s2) => {
7199
7264
  const email = s2.email.trim();
7200
7265
  if (!email || !s2.password) {
7201
- return { ...s2, notice: "Enter your email and password.", noNotice: false };
7266
+ return { ...s2, notice: copyOf("missingFields"), noNotice: false };
7202
7267
  }
7203
7268
  const busy = { ...s2, busy: true, notBusy: false, notice: "", noNotice: true };
7204
- const r = s2.mode === "signIn" ? await signInDirect(email, s2.password) : await registerMember(email, s2.password);
7269
+ const r = s2.mode === "signIn" ? await signInDirect(email, s2.password, { translate }) : await registerMember(email, s2.password, void 0, { translate });
7205
7270
  if (!r.ok) {
7206
7271
  return {
7207
7272
  ...busy,
@@ -7220,9 +7285,9 @@ function createAuthService(opts = {}) {
7220
7285
  signedIn: true,
7221
7286
  notSignedIn: false,
7222
7287
  signedInEmail: r.email,
7223
- headline: c.signedInTitle ?? "You're signed in",
7288
+ headline: copyOf("signedInTitle"),
7224
7289
  subhead: r.email,
7225
- notice: "Signed in.",
7290
+ notice: copyOf("signedInNotice"),
7226
7291
  noNotice: false
7227
7292
  };
7228
7293
  },
@@ -7230,7 +7295,7 @@ function createAuthService(opts = {}) {
7230
7295
  const gone = await signOut();
7231
7296
  return {
7232
7297
  ...forMode({ ...BASE }, "signIn"),
7233
- notice: gone ? "Signed out." : "Sign-out did not complete. Try again.",
7298
+ notice: gone ? copyOf("signedOutNotice") : copyOf("signOutFailed"),
7234
7299
  noNotice: false
7235
7300
  };
7236
7301
  }
@@ -2,7 +2,7 @@
2
2
  "files": [
3
3
  {
4
4
  "name": "sw.js",
5
- "bytes": 2706754
5
+ "bytes": 2711506
6
6
  },
7
7
  {
8
8
  "name": "host.html",
@@ -21,7 +21,7 @@
21
21
  "bytes": 24320
22
22
  },
23
23
  {
24
- "name": "preview-deferred/c1f008be31a41521c6de7c1afad419a1f4dad53cbc2701a14738d5b22f291463.bin",
24
+ "name": "preview-deferred/b2b76cc19f21f7c6d8b1a3cd6aa1ac0f194b052fa183761d08bd4f43fd46f844.bin",
25
25
  "bytes": 488215
26
26
  },
27
27
  {
@@ -79,10 +79,10 @@
79
79
  ],
80
80
  "deferred": [
81
81
  {
82
- "key": "assets/pdf-Dxze8Wox.js",
82
+ "key": "assets/pdf-DNqvPXXz.js",
83
83
  "contentType": "application/javascript; charset=utf-8",
84
- "sha256": "c1f008be31a41521c6de7c1afad419a1f4dad53cbc2701a14738d5b22f291463",
85
- "file": "preview-deferred/c1f008be31a41521c6de7c1afad419a1f4dad53cbc2701a14738d5b22f291463.bin"
84
+ "sha256": "b2b76cc19f21f7c6d8b1a3cd6aa1ac0f194b052fa183761d08bd4f43fd46f844",
85
+ "file": "preview-deferred/b2b76cc19f21f7c6d8b1a3cd6aa1ac0f194b052fa183761d08bd4f43fd46f844.bin"
86
86
  },
87
87
  {
88
88
  "key": "assets/pdf.worker.min-BGnVRhRG.js",