@wix/agent-skills 1.26.0 → 1.27.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 (805) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +7 -5
  4. package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
  5. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +14 -2
  6. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +4 -5
  7. package/skills/wix-headless-kit/SKILL.md +31 -14
  8. package/skills/wix-headless-kit/guides/existing-site.md +12 -5
  9. package/skills/wix-headless-kit/install/attach.mjs +55 -10
  10. package/skills/wix-headless-kit/install/check.mjs +5 -5
  11. package/skills/wix-headless-kit/install/deploy.mjs +7 -3
  12. package/skills/wix-headless-kit/install/templates.mjs +21 -17
  13. package/skills/wix-headless-templates/SKILL.md +43 -0
  14. package/skills/wix-headless-templates/blank/project/README.md +15 -0
  15. package/skills/wix-headless-templates/blank/project/astro.config.mjs +20 -0
  16. package/skills/wix-headless-templates/blank/project/package.json +34 -0
  17. package/skills/wix-headless-templates/blank/project/public/favicon.svg +9 -0
  18. package/skills/wix-headless-templates/blank/project/src/assets/astro.svg +1 -0
  19. package/skills/wix-headless-templates/blank/project/src/assets/background.svg +1 -0
  20. package/skills/wix-headless-templates/blank/project/src/assets/wix.svg +18 -0
  21. package/skills/wix-headless-templates/blank/project/src/components/Hero.astro +77 -0
  22. package/skills/wix-headless-templates/blank/project/src/components/Welcome.astro +95 -0
  23. package/skills/wix-headless-templates/blank/project/src/layouts/Layout.astro +22 -0
  24. package/skills/wix-headless-templates/blank/project/src/pages/index.astro +8 -0
  25. package/skills/wix-headless-templates/blank/project/tsconfig.json +5 -0
  26. package/skills/wix-headless-templates/blog/INSTRUCTIONS.md +418 -0
  27. package/skills/wix-headless-templates/blog/app/components/blog/BlogFeedView.tsx +191 -0
  28. package/skills/wix-headless-templates/blog/app/components/blog/CommentsView.tsx +206 -0
  29. package/skills/wix-headless-templates/blog/app/components/blog/PostLikeButton.tsx +62 -0
  30. package/skills/wix-headless-templates/blog/app/components/blog/PostView.tsx +139 -0
  31. package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +42 -0
  32. package/skills/wix-headless-templates/blog/app/hooks/blog/useBlogFeed.ts +31 -0
  33. package/skills/wix-headless-templates/blog/app/hooks/blog/useComments.ts +26 -0
  34. package/skills/wix-headless-templates/blog/app/hooks/blog/usePost.ts +25 -0
  35. package/skills/wix-headless-templates/blog/app/wix/blog/authors-core.ts +51 -0
  36. package/skills/wix-headless-templates/blog/app/wix/blog/authors.ts +50 -0
  37. package/skills/wix-headless-templates/blog/app/wix/blog/blog-feed-store.ts +156 -0
  38. package/skills/wix-headless-templates/blog/app/wix/blog/comments-core.ts +189 -0
  39. package/skills/wix-headless-templates/blog/app/wix/blog/comments-store.ts +214 -0
  40. package/skills/wix-headless-templates/blog/app/wix/blog/comments.ts +84 -0
  41. package/skills/wix-headless-templates/blog/app/wix/blog/post-likes.ts +42 -0
  42. package/skills/wix-headless-templates/blog/app/wix/blog/post-store.ts +158 -0
  43. package/skills/wix-headless-templates/blog/app/wix/blog/posts-core.ts +347 -0
  44. package/skills/wix-headless-templates/blog/app/wix/blog/posts.ts +132 -0
  45. package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy-core.ts +80 -0
  46. package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy.ts +78 -0
  47. package/skills/wix-headless-templates/blog/app/wix/blog/types.ts +161 -0
  48. package/skills/wix-headless-templates/blog/app-astro/layouts/SiteLayout.astro +44 -0
  49. package/skills/wix-headless-templates/blog/app-astro/pages/blog/[...slug].astro +148 -0
  50. package/skills/wix-headless-templates/blog/app-astro/pages/blog/category/[slug].astro +97 -0
  51. package/skills/wix-headless-templates/blog/app-astro/pages/blog/tag/[slug].astro +51 -0
  52. package/skills/wix-headless-templates/blog/app-astro/pages/blog.astro +34 -0
  53. package/skills/wix-headless-templates/blog/project/README.md +15 -0
  54. package/skills/wix-headless-templates/blog/project/astro.config.mjs +22 -0
  55. package/skills/wix-headless-templates/blog/project/package-lock.json +14699 -0
  56. package/skills/wix-headless-templates/blog/project/package.json +39 -0
  57. package/skills/wix-headless-templates/blog/project/public/favicon.svg +9 -0
  58. package/skills/wix-headless-templates/blog/project/src/assets/astro.svg +1 -0
  59. package/skills/wix-headless-templates/blog/project/src/assets/background.svg +1 -0
  60. package/skills/wix-headless-templates/blog/project/src/assets/wix.svg +18 -0
  61. package/skills/wix-headless-templates/blog/project/src/components/Hero.astro +77 -0
  62. package/skills/wix-headless-templates/blog/project/src/components/Welcome.astro +95 -0
  63. package/skills/wix-headless-templates/blog/project/src/components/blog/BlogFeedView.tsx +191 -0
  64. package/skills/wix-headless-templates/blog/project/src/components/blog/CommentsView.tsx +206 -0
  65. package/skills/wix-headless-templates/blog/project/src/components/blog/PostLikeButton.tsx +62 -0
  66. package/skills/wix-headless-templates/blog/project/src/components/blog/PostView.tsx +139 -0
  67. package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +42 -0
  68. package/skills/wix-headless-templates/blog/project/src/hooks/blog/useBlogFeed.ts +31 -0
  69. package/skills/wix-headless-templates/blog/project/src/hooks/blog/useComments.ts +26 -0
  70. package/skills/wix-headless-templates/blog/project/src/hooks/blog/usePost.ts +25 -0
  71. package/skills/wix-headless-templates/blog/project/src/layouts/Layout.astro +22 -0
  72. package/skills/wix-headless-templates/blog/project/src/layouts/SiteLayout.astro +44 -0
  73. package/skills/wix-headless-templates/blog/project/src/pages/blog/[...slug].astro +148 -0
  74. package/skills/wix-headless-templates/blog/project/src/pages/blog/category/[slug].astro +97 -0
  75. package/skills/wix-headless-templates/blog/project/src/pages/blog/tag/[slug].astro +51 -0
  76. package/skills/wix-headless-templates/blog/project/src/pages/blog.astro +34 -0
  77. package/skills/wix-headless-templates/blog/project/src/pages/index.astro +8 -0
  78. package/skills/wix-headless-templates/blog/project/src/styles/global.css +57 -0
  79. package/skills/wix-headless-templates/blog/project/src/wix/blog/authors-core.ts +51 -0
  80. package/skills/wix-headless-templates/blog/project/src/wix/blog/authors.ts +50 -0
  81. package/skills/wix-headless-templates/blog/project/src/wix/blog/blog-feed-store.ts +156 -0
  82. package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-core.ts +189 -0
  83. package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-store.ts +214 -0
  84. package/skills/wix-headless-templates/blog/project/src/wix/blog/comments.ts +84 -0
  85. package/skills/wix-headless-templates/blog/project/src/wix/blog/post-likes.ts +42 -0
  86. package/skills/wix-headless-templates/blog/project/src/wix/blog/post-store.ts +158 -0
  87. package/skills/wix-headless-templates/blog/project/src/wix/blog/posts-core.ts +347 -0
  88. package/skills/wix-headless-templates/blog/project/src/wix/blog/posts.ts +132 -0
  89. package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy-core.ts +80 -0
  90. package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy.ts +78 -0
  91. package/skills/wix-headless-templates/blog/project/src/wix/blog/types.ts +161 -0
  92. package/skills/wix-headless-templates/blog/project/src/wix/config.ts +16 -0
  93. package/skills/wix-headless-templates/blog/project/src/wix/media.ts +106 -0
  94. package/skills/wix-headless-templates/blog/project/src/wix/money.ts +24 -0
  95. package/skills/wix-headless-templates/blog/project/src/wix/sdk.ts +89 -0
  96. package/skills/wix-headless-templates/blog/project/tsconfig.json +5 -0
  97. package/skills/wix-headless-templates/blog/rest/authors.ts +39 -0
  98. package/skills/wix-headless-templates/blog/rest/comments.ts +64 -0
  99. package/skills/wix-headless-templates/blog/rest/post-likes.ts +37 -0
  100. package/skills/wix-headless-templates/blog/rest/posts.ts +123 -0
  101. package/skills/wix-headless-templates/blog/rest/taxonomy.ts +79 -0
  102. package/skills/wix-headless-templates/blog/seed/SEED.md +81 -0
  103. package/skills/wix-headless-templates/blog/seed/read-site.mjs +33 -0
  104. package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +337 -0
  105. package/skills/wix-headless-templates/bookings/INSTRUCTIONS.md +356 -0
  106. package/skills/wix-headless-templates/bookings/app/components/bookings/ServiceBookingView.tsx +369 -0
  107. package/skills/wix-headless-templates/bookings/app/components/bookings/ServicesView.tsx +193 -0
  108. package/skills/wix-headless-templates/bookings/app/hooks/bookings/useBookingFlow.ts +56 -0
  109. package/skills/wix-headless-templates/bookings/app/hooks/bookings/useServices.ts +23 -0
  110. package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-core.ts +614 -0
  111. package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-flow-store.ts +410 -0
  112. package/skills/wix-headless-templates/bookings/app/wix/bookings/booking.ts +227 -0
  113. package/skills/wix-headless-templates/bookings/app/wix/bookings/services-core.ts +366 -0
  114. package/skills/wix-headless-templates/bookings/app/wix/bookings/services-store.ts +213 -0
  115. package/skills/wix-headless-templates/bookings/app/wix/bookings/services.ts +100 -0
  116. package/skills/wix-headless-templates/bookings/app/wix/bookings/types.ts +236 -0
  117. package/skills/wix-headless-templates/bookings/app-astro/layouts/SiteLayout.astro +40 -0
  118. package/skills/wix-headless-templates/bookings/app-astro/pages/services/[slug].astro +81 -0
  119. package/skills/wix-headless-templates/bookings/app-astro/pages/services.astro +40 -0
  120. package/skills/wix-headless-templates/bookings/project/README.md +15 -0
  121. package/skills/wix-headless-templates/bookings/project/astro.config.mjs +22 -0
  122. package/skills/wix-headless-templates/bookings/project/package-lock.json +10546 -0
  123. package/skills/wix-headless-templates/bookings/project/package.json +41 -0
  124. package/skills/wix-headless-templates/bookings/project/public/favicon.svg +9 -0
  125. package/skills/wix-headless-templates/bookings/project/src/assets/astro.svg +1 -0
  126. package/skills/wix-headless-templates/bookings/project/src/assets/background.svg +1 -0
  127. package/skills/wix-headless-templates/bookings/project/src/assets/wix.svg +18 -0
  128. package/skills/wix-headless-templates/bookings/project/src/components/Hero.astro +77 -0
  129. package/skills/wix-headless-templates/bookings/project/src/components/Welcome.astro +95 -0
  130. package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServiceBookingView.tsx +369 -0
  131. package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServicesView.tsx +193 -0
  132. package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useBookingFlow.ts +56 -0
  133. package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useServices.ts +23 -0
  134. package/skills/wix-headless-templates/bookings/project/src/layouts/Layout.astro +22 -0
  135. package/skills/wix-headless-templates/bookings/project/src/layouts/SiteLayout.astro +40 -0
  136. package/skills/wix-headless-templates/bookings/project/src/pages/index.astro +8 -0
  137. package/skills/wix-headless-templates/bookings/project/src/pages/services/[slug].astro +81 -0
  138. package/skills/wix-headless-templates/bookings/project/src/pages/services.astro +40 -0
  139. package/skills/wix-headless-templates/bookings/project/src/styles/global.css +57 -0
  140. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-core.ts +614 -0
  141. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-flow-store.ts +410 -0
  142. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking.ts +227 -0
  143. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-core.ts +366 -0
  144. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-store.ts +213 -0
  145. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services.ts +100 -0
  146. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/types.ts +236 -0
  147. package/skills/wix-headless-templates/bookings/project/src/wix/config.ts +16 -0
  148. package/skills/wix-headless-templates/bookings/project/src/wix/media.ts +106 -0
  149. package/skills/wix-headless-templates/bookings/project/src/wix/money.ts +24 -0
  150. package/skills/wix-headless-templates/bookings/project/src/wix/sdk.ts +89 -0
  151. package/skills/wix-headless-templates/bookings/project/tsconfig.json +5 -0
  152. package/skills/wix-headless-templates/bookings/rest/booking.ts +227 -0
  153. package/skills/wix-headless-templates/bookings/rest/services.ts +94 -0
  154. package/skills/wix-headless-templates/bookings/seed/SEED.md +109 -0
  155. package/skills/wix-headless-templates/bookings/seed/read-site.mjs +28 -0
  156. package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +407 -0
  157. package/skills/wix-headless-templates/cms/INSTRUCTIONS.md +399 -0
  158. package/skills/wix-headless-templates/cms/app/hooks/cms/useCollection.ts +82 -0
  159. package/skills/wix-headless-templates/cms/app/hooks/cms/useItem.ts +37 -0
  160. package/skills/wix-headless-templates/cms/app/wix/cms/collection-store.ts +220 -0
  161. package/skills/wix-headless-templates/cms/app/wix/cms/collections-core.ts +41 -0
  162. package/skills/wix-headless-templates/cms/app/wix/cms/collections.ts +28 -0
  163. package/skills/wix-headless-templates/cms/app/wix/cms/item-store.ts +93 -0
  164. package/skills/wix-headless-templates/cms/app/wix/cms/items-core.ts +259 -0
  165. package/skills/wix-headless-templates/cms/app/wix/cms/items.ts +182 -0
  166. package/skills/wix-headless-templates/cms/app/wix/cms/types.ts +138 -0
  167. package/skills/wix-headless-templates/cms/app-astro/layouts/SiteLayout.astro +41 -0
  168. package/skills/wix-headless-templates/cms/project/README.md +15 -0
  169. package/skills/wix-headless-templates/cms/project/astro.config.mjs +22 -0
  170. package/skills/wix-headless-templates/cms/project/package-lock.json +9798 -0
  171. package/skills/wix-headless-templates/cms/project/package.json +37 -0
  172. package/skills/wix-headless-templates/cms/project/public/favicon.svg +9 -0
  173. package/skills/wix-headless-templates/cms/project/src/assets/astro.svg +1 -0
  174. package/skills/wix-headless-templates/cms/project/src/assets/background.svg +1 -0
  175. package/skills/wix-headless-templates/cms/project/src/assets/wix.svg +18 -0
  176. package/skills/wix-headless-templates/cms/project/src/components/Hero.astro +77 -0
  177. package/skills/wix-headless-templates/cms/project/src/components/Welcome.astro +95 -0
  178. package/skills/wix-headless-templates/cms/project/src/hooks/cms/useCollection.ts +82 -0
  179. package/skills/wix-headless-templates/cms/project/src/hooks/cms/useItem.ts +37 -0
  180. package/skills/wix-headless-templates/cms/project/src/layouts/Layout.astro +22 -0
  181. package/skills/wix-headless-templates/cms/project/src/layouts/SiteLayout.astro +41 -0
  182. package/skills/wix-headless-templates/cms/project/src/pages/index.astro +8 -0
  183. package/skills/wix-headless-templates/cms/project/src/styles/global.css +57 -0
  184. package/skills/wix-headless-templates/cms/project/src/wix/cms/collection-store.ts +220 -0
  185. package/skills/wix-headless-templates/cms/project/src/wix/cms/collections-core.ts +41 -0
  186. package/skills/wix-headless-templates/cms/project/src/wix/cms/collections.ts +28 -0
  187. package/skills/wix-headless-templates/cms/project/src/wix/cms/item-store.ts +93 -0
  188. package/skills/wix-headless-templates/cms/project/src/wix/cms/items-core.ts +259 -0
  189. package/skills/wix-headless-templates/cms/project/src/wix/cms/items.ts +182 -0
  190. package/skills/wix-headless-templates/cms/project/src/wix/cms/types.ts +138 -0
  191. package/skills/wix-headless-templates/cms/project/src/wix/config.ts +16 -0
  192. package/skills/wix-headless-templates/cms/project/src/wix/media.ts +106 -0
  193. package/skills/wix-headless-templates/cms/project/src/wix/money.ts +24 -0
  194. package/skills/wix-headless-templates/cms/project/src/wix/sdk.ts +89 -0
  195. package/skills/wix-headless-templates/cms/project/tsconfig.json +5 -0
  196. package/skills/wix-headless-templates/cms/rest/collections.ts +25 -0
  197. package/skills/wix-headless-templates/cms/rest/items.ts +189 -0
  198. package/skills/wix-headless-templates/cms/seed/SEED.md +116 -0
  199. package/skills/wix-headless-templates/cms/seed/read-site.mjs +20 -0
  200. package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +321 -0
  201. package/skills/wix-headless-templates/compose.mjs +83 -0
  202. package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +349 -0
  203. package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +155 -0
  204. package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +46 -0
  205. package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +49 -0
  206. package/skills/wix-headless-templates/donations/app/hooks/donations/useCampaigns.ts +21 -0
  207. package/skills/wix-headless-templates/donations/app/hooks/donations/useDonation.ts +27 -0
  208. package/skills/wix-headless-templates/donations/app/hooks/donations/useDonationReceipt.ts +19 -0
  209. package/skills/wix-headless-templates/donations/app/wix/donations/campaigns-store.ts +59 -0
  210. package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +83 -0
  211. package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +95 -0
  212. package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +163 -0
  213. package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +466 -0
  214. package/skills/wix-headless-templates/donations/app/wix/donations/receipt-store.ts +55 -0
  215. package/skills/wix-headless-templates/donations/app/wix/donations/types.ts +121 -0
  216. package/skills/wix-headless-templates/donations/app-astro/components/donations/CampaignPage.astro +43 -0
  217. package/skills/wix-headless-templates/donations/app-astro/layouts/SiteLayout.astro +45 -0
  218. package/skills/wix-headless-templates/donations/app-astro/pages/donate/[id].astro +28 -0
  219. package/skills/wix-headless-templates/donations/app-astro/pages/donate/index.astro +51 -0
  220. package/skills/wix-headless-templates/donations/app-astro/pages/donate/thank-you.astro +13 -0
  221. package/skills/wix-headless-templates/donations/project/README.md +15 -0
  222. package/skills/wix-headless-templates/donations/project/astro.config.mjs +22 -0
  223. package/skills/wix-headless-templates/donations/project/package-lock.json +10266 -0
  224. package/skills/wix-headless-templates/donations/project/package.json +39 -0
  225. package/skills/wix-headless-templates/donations/project/public/favicon.svg +9 -0
  226. package/skills/wix-headless-templates/donations/project/src/assets/astro.svg +1 -0
  227. package/skills/wix-headless-templates/donations/project/src/assets/background.svg +1 -0
  228. package/skills/wix-headless-templates/donations/project/src/assets/wix.svg +18 -0
  229. package/skills/wix-headless-templates/donations/project/src/components/Hero.astro +77 -0
  230. package/skills/wix-headless-templates/donations/project/src/components/Welcome.astro +95 -0
  231. package/skills/wix-headless-templates/donations/project/src/components/donations/CampaignPage.astro +43 -0
  232. package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +155 -0
  233. package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +46 -0
  234. package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +49 -0
  235. package/skills/wix-headless-templates/donations/project/src/hooks/donations/useCampaigns.ts +21 -0
  236. package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonation.ts +27 -0
  237. package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonationReceipt.ts +19 -0
  238. package/skills/wix-headless-templates/donations/project/src/layouts/Layout.astro +22 -0
  239. package/skills/wix-headless-templates/donations/project/src/layouts/SiteLayout.astro +45 -0
  240. package/skills/wix-headless-templates/donations/project/src/pages/donate/[id].astro +28 -0
  241. package/skills/wix-headless-templates/donations/project/src/pages/donate/index.astro +51 -0
  242. package/skills/wix-headless-templates/donations/project/src/pages/donate/thank-you.astro +13 -0
  243. package/skills/wix-headless-templates/donations/project/src/pages/index.astro +8 -0
  244. package/skills/wix-headless-templates/donations/project/src/styles/global.css +57 -0
  245. package/skills/wix-headless-templates/donations/project/src/wix/config.ts +16 -0
  246. package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns-store.ts +59 -0
  247. package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +83 -0
  248. package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +95 -0
  249. package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +163 -0
  250. package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +466 -0
  251. package/skills/wix-headless-templates/donations/project/src/wix/donations/receipt-store.ts +55 -0
  252. package/skills/wix-headless-templates/donations/project/src/wix/donations/types.ts +121 -0
  253. package/skills/wix-headless-templates/donations/project/src/wix/media.ts +106 -0
  254. package/skills/wix-headless-templates/donations/project/src/wix/money.ts +24 -0
  255. package/skills/wix-headless-templates/donations/project/src/wix/sdk.ts +89 -0
  256. package/skills/wix-headless-templates/donations/project/tsconfig.json +5 -0
  257. package/skills/wix-headless-templates/donations/rest/campaigns.ts +76 -0
  258. package/skills/wix-headless-templates/donations/rest/donate.ts +90 -0
  259. package/skills/wix-headless-templates/donations/seed/SEED.md +90 -0
  260. package/skills/wix-headless-templates/donations/seed/read-site.mjs +33 -0
  261. package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +250 -0
  262. package/skills/wix-headless-templates/events/INSTRUCTIONS.md +387 -0
  263. package/skills/wix-headless-templates/events/app/components/events/EventConfirmationView.tsx +139 -0
  264. package/skills/wix-headless-templates/events/app/components/events/EventRegistrationView.tsx +375 -0
  265. package/skills/wix-headless-templates/events/app/components/events/EventsView.tsx +134 -0
  266. package/skills/wix-headless-templates/events/app/hooks/events/useEventConfirmation.ts +21 -0
  267. package/skills/wix-headless-templates/events/app/hooks/events/useEventRegistration.ts +40 -0
  268. package/skills/wix-headless-templates/events/app/hooks/events/useEvents.ts +24 -0
  269. package/skills/wix-headless-templates/events/app/wix/events/events-core.ts +379 -0
  270. package/skills/wix-headless-templates/events/app/wix/events/events-store.ts +175 -0
  271. package/skills/wix-headless-templates/events/app/wix/events/events.ts +124 -0
  272. package/skills/wix-headless-templates/events/app/wix/events/order-store.ts +143 -0
  273. package/skills/wix-headless-templates/events/app/wix/events/orders-core.ts +86 -0
  274. package/skills/wix-headless-templates/events/app/wix/events/orders.ts +30 -0
  275. package/skills/wix-headless-templates/events/app/wix/events/registration-core.ts +415 -0
  276. package/skills/wix-headless-templates/events/app/wix/events/registration-store.ts +237 -0
  277. package/skills/wix-headless-templates/events/app/wix/events/registration.ts +109 -0
  278. package/skills/wix-headless-templates/events/app/wix/events/types.ts +249 -0
  279. package/skills/wix-headless-templates/events/app-astro/layouts/SiteLayout.astro +40 -0
  280. package/skills/wix-headless-templates/events/app-astro/pages/event-confirmation.astro +12 -0
  281. package/skills/wix-headless-templates/events/app-astro/pages/events/[slug].astro +104 -0
  282. package/skills/wix-headless-templates/events/app-astro/pages/events.astro +23 -0
  283. package/skills/wix-headless-templates/events/project/README.md +15 -0
  284. package/skills/wix-headless-templates/events/project/astro.config.mjs +22 -0
  285. package/skills/wix-headless-templates/events/project/package-lock.json +10497 -0
  286. package/skills/wix-headless-templates/events/project/package.json +39 -0
  287. package/skills/wix-headless-templates/events/project/public/favicon.svg +9 -0
  288. package/skills/wix-headless-templates/events/project/src/assets/astro.svg +1 -0
  289. package/skills/wix-headless-templates/events/project/src/assets/background.svg +1 -0
  290. package/skills/wix-headless-templates/events/project/src/assets/wix.svg +18 -0
  291. package/skills/wix-headless-templates/events/project/src/components/Hero.astro +77 -0
  292. package/skills/wix-headless-templates/events/project/src/components/Welcome.astro +95 -0
  293. package/skills/wix-headless-templates/events/project/src/components/events/EventConfirmationView.tsx +139 -0
  294. package/skills/wix-headless-templates/events/project/src/components/events/EventRegistrationView.tsx +375 -0
  295. package/skills/wix-headless-templates/events/project/src/components/events/EventsView.tsx +134 -0
  296. package/skills/wix-headless-templates/events/project/src/hooks/events/useEventConfirmation.ts +21 -0
  297. package/skills/wix-headless-templates/events/project/src/hooks/events/useEventRegistration.ts +40 -0
  298. package/skills/wix-headless-templates/events/project/src/hooks/events/useEvents.ts +24 -0
  299. package/skills/wix-headless-templates/events/project/src/layouts/Layout.astro +22 -0
  300. package/skills/wix-headless-templates/events/project/src/layouts/SiteLayout.astro +40 -0
  301. package/skills/wix-headless-templates/events/project/src/pages/event-confirmation.astro +12 -0
  302. package/skills/wix-headless-templates/events/project/src/pages/events/[slug].astro +104 -0
  303. package/skills/wix-headless-templates/events/project/src/pages/events.astro +23 -0
  304. package/skills/wix-headless-templates/events/project/src/pages/index.astro +8 -0
  305. package/skills/wix-headless-templates/events/project/src/styles/global.css +57 -0
  306. package/skills/wix-headless-templates/events/project/src/wix/config.ts +16 -0
  307. package/skills/wix-headless-templates/events/project/src/wix/events/events-core.ts +379 -0
  308. package/skills/wix-headless-templates/events/project/src/wix/events/events-store.ts +175 -0
  309. package/skills/wix-headless-templates/events/project/src/wix/events/events.ts +124 -0
  310. package/skills/wix-headless-templates/events/project/src/wix/events/order-store.ts +143 -0
  311. package/skills/wix-headless-templates/events/project/src/wix/events/orders-core.ts +86 -0
  312. package/skills/wix-headless-templates/events/project/src/wix/events/orders.ts +30 -0
  313. package/skills/wix-headless-templates/events/project/src/wix/events/registration-core.ts +415 -0
  314. package/skills/wix-headless-templates/events/project/src/wix/events/registration-store.ts +237 -0
  315. package/skills/wix-headless-templates/events/project/src/wix/events/registration.ts +109 -0
  316. package/skills/wix-headless-templates/events/project/src/wix/events/types.ts +249 -0
  317. package/skills/wix-headless-templates/events/project/src/wix/media.ts +106 -0
  318. package/skills/wix-headless-templates/events/project/src/wix/money.ts +24 -0
  319. package/skills/wix-headless-templates/events/project/src/wix/sdk.ts +89 -0
  320. package/skills/wix-headless-templates/events/project/tsconfig.json +5 -0
  321. package/skills/wix-headless-templates/events/rest/events.ts +112 -0
  322. package/skills/wix-headless-templates/events/rest/orders.ts +28 -0
  323. package/skills/wix-headless-templates/events/rest/registration.ts +96 -0
  324. package/skills/wix-headless-templates/events/seed/SEED.md +115 -0
  325. package/skills/wix-headless-templates/events/seed/read-site.mjs +26 -0
  326. package/skills/wix-headless-templates/events/seed/seed-events.mjs +322 -0
  327. package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +317 -0
  328. package/skills/wix-headless-templates/faq/app/components/faq/FaqAccordion.tsx +159 -0
  329. package/skills/wix-headless-templates/faq/app/components/faq/FaqCategoryNav.tsx +46 -0
  330. package/skills/wix-headless-templates/faq/app/components/faq/FaqSearch.tsx +56 -0
  331. package/skills/wix-headless-templates/faq/app/hooks/faq/useFaq.ts +53 -0
  332. package/skills/wix-headless-templates/faq/app/wix/faq/faq-core.ts +428 -0
  333. package/skills/wix-headless-templates/faq/app/wix/faq/faq-store.ts +212 -0
  334. package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +72 -0
  335. package/skills/wix-headless-templates/faq/app/wix/faq/types.ts +63 -0
  336. package/skills/wix-headless-templates/faq/app-astro/layouts/SiteLayout.astro +40 -0
  337. package/skills/wix-headless-templates/faq/app-astro/pages/faq.astro +39 -0
  338. package/skills/wix-headless-templates/faq/project/README.md +15 -0
  339. package/skills/wix-headless-templates/faq/project/astro.config.mjs +22 -0
  340. package/skills/wix-headless-templates/faq/project/package-lock.json +8837 -0
  341. package/skills/wix-headless-templates/faq/project/package.json +37 -0
  342. package/skills/wix-headless-templates/faq/project/public/favicon.svg +9 -0
  343. package/skills/wix-headless-templates/faq/project/src/assets/astro.svg +1 -0
  344. package/skills/wix-headless-templates/faq/project/src/assets/background.svg +1 -0
  345. package/skills/wix-headless-templates/faq/project/src/assets/wix.svg +18 -0
  346. package/skills/wix-headless-templates/faq/project/src/components/Hero.astro +77 -0
  347. package/skills/wix-headless-templates/faq/project/src/components/Welcome.astro +95 -0
  348. package/skills/wix-headless-templates/faq/project/src/components/faq/FaqAccordion.tsx +159 -0
  349. package/skills/wix-headless-templates/faq/project/src/components/faq/FaqCategoryNav.tsx +46 -0
  350. package/skills/wix-headless-templates/faq/project/src/components/faq/FaqSearch.tsx +56 -0
  351. package/skills/wix-headless-templates/faq/project/src/hooks/faq/useFaq.ts +53 -0
  352. package/skills/wix-headless-templates/faq/project/src/layouts/Layout.astro +22 -0
  353. package/skills/wix-headless-templates/faq/project/src/layouts/SiteLayout.astro +40 -0
  354. package/skills/wix-headless-templates/faq/project/src/pages/faq.astro +39 -0
  355. package/skills/wix-headless-templates/faq/project/src/pages/index.astro +8 -0
  356. package/skills/wix-headless-templates/faq/project/src/styles/global.css +57 -0
  357. package/skills/wix-headless-templates/faq/project/src/wix/config.ts +16 -0
  358. package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-core.ts +428 -0
  359. package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-store.ts +212 -0
  360. package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +72 -0
  361. package/skills/wix-headless-templates/faq/project/src/wix/faq/types.ts +63 -0
  362. package/skills/wix-headless-templates/faq/project/src/wix/media.ts +106 -0
  363. package/skills/wix-headless-templates/faq/project/src/wix/money.ts +24 -0
  364. package/skills/wix-headless-templates/faq/project/src/wix/sdk.ts +89 -0
  365. package/skills/wix-headless-templates/faq/project/tsconfig.json +5 -0
  366. package/skills/wix-headless-templates/faq/rest/faq.ts +71 -0
  367. package/skills/wix-headless-templates/faq/seed/SEED.md +104 -0
  368. package/skills/wix-headless-templates/faq/seed/read-site.mjs +23 -0
  369. package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +302 -0
  370. package/skills/wix-headless-templates/forms/INSTRUCTIONS.md +417 -0
  371. package/skills/wix-headless-templates/forms/app/hooks/forms/useWixForm.ts +108 -0
  372. package/skills/wix-headless-templates/forms/app/wix/forms/address-templates.generated.ts +13 -0
  373. package/skills/wix-headless-templates/forms/app/wix/forms/form-store.ts +533 -0
  374. package/skills/wix-headless-templates/forms/app/wix/forms/forms-core.ts +671 -0
  375. package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +57 -0
  376. package/skills/wix-headless-templates/forms/app/wix/forms/submissions-core.ts +423 -0
  377. package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +95 -0
  378. package/skills/wix-headless-templates/forms/app/wix/forms/types.ts +284 -0
  379. package/skills/wix-headless-templates/forms/project/README.md +15 -0
  380. package/skills/wix-headless-templates/forms/project/astro.config.mjs +22 -0
  381. package/skills/wix-headless-templates/forms/project/package-lock.json +9102 -0
  382. package/skills/wix-headless-templates/forms/project/package.json +37 -0
  383. package/skills/wix-headless-templates/forms/project/public/favicon.svg +9 -0
  384. package/skills/wix-headless-templates/forms/project/src/assets/astro.svg +1 -0
  385. package/skills/wix-headless-templates/forms/project/src/assets/background.svg +1 -0
  386. package/skills/wix-headless-templates/forms/project/src/assets/wix.svg +18 -0
  387. package/skills/wix-headless-templates/forms/project/src/components/Hero.astro +77 -0
  388. package/skills/wix-headless-templates/forms/project/src/components/Welcome.astro +95 -0
  389. package/skills/wix-headless-templates/forms/project/src/hooks/forms/useWixForm.ts +108 -0
  390. package/skills/wix-headless-templates/forms/project/src/layouts/Layout.astro +22 -0
  391. package/skills/wix-headless-templates/forms/project/src/pages/index.astro +8 -0
  392. package/skills/wix-headless-templates/forms/project/src/styles/global.css +57 -0
  393. package/skills/wix-headless-templates/forms/project/src/wix/config.ts +16 -0
  394. package/skills/wix-headless-templates/forms/project/src/wix/forms/address-templates.generated.ts +13 -0
  395. package/skills/wix-headless-templates/forms/project/src/wix/forms/form-store.ts +533 -0
  396. package/skills/wix-headless-templates/forms/project/src/wix/forms/forms-core.ts +671 -0
  397. package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +57 -0
  398. package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions-core.ts +423 -0
  399. package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +95 -0
  400. package/skills/wix-headless-templates/forms/project/src/wix/forms/types.ts +284 -0
  401. package/skills/wix-headless-templates/forms/project/src/wix/media.ts +106 -0
  402. package/skills/wix-headless-templates/forms/project/src/wix/money.ts +24 -0
  403. package/skills/wix-headless-templates/forms/project/src/wix/sdk.ts +89 -0
  404. package/skills/wix-headless-templates/forms/project/tsconfig.json +5 -0
  405. package/skills/wix-headless-templates/forms/rest/forms.ts +37 -0
  406. package/skills/wix-headless-templates/forms/rest/submissions.ts +83 -0
  407. package/skills/wix-headless-templates/forms/seed/SEED.md +225 -0
  408. package/skills/wix-headless-templates/forms/seed/read-site.mjs +53 -0
  409. package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +574 -0
  410. package/skills/wix-headless-templates/forms/tooling/address-templates.mjs +96 -0
  411. package/skills/wix-headless-templates/members/INSTRUCTIONS.md +345 -0
  412. package/skills/wix-headless-templates/members/app/components/members/AccountPage.tsx +16 -0
  413. package/skills/wix-headless-templates/members/app/components/members/AccountView.tsx +60 -0
  414. package/skills/wix-headless-templates/members/app/components/members/LoginForm.tsx +165 -0
  415. package/skills/wix-headless-templates/members/app/components/members/MemberMenu.tsx +78 -0
  416. package/skills/wix-headless-templates/members/app/components/members/RequireAuth.tsx +47 -0
  417. package/skills/wix-headless-templates/members/app/hooks/members/useMember.ts +67 -0
  418. package/skills/wix-headless-templates/members/app/wix/members/auth-core.ts +160 -0
  419. package/skills/wix-headless-templates/members/app/wix/members/auth.ts +117 -0
  420. package/skills/wix-headless-templates/members/app/wix/members/client.ts +27 -0
  421. package/skills/wix-headless-templates/members/app/wix/members/member-store.ts +133 -0
  422. package/skills/wix-headless-templates/members/app/wix/members/members-core.ts +43 -0
  423. package/skills/wix-headless-templates/members/app/wix/members/members.ts +29 -0
  424. package/skills/wix-headless-templates/members/app/wix/members/types.ts +21 -0
  425. package/skills/wix-headless-templates/members/app-astro/layouts/SiteLayout.astro +42 -0
  426. package/skills/wix-headless-templates/members/app-astro/pages/account.astro +9 -0
  427. package/skills/wix-headless-templates/members/app-astro/pages/login.astro +11 -0
  428. package/skills/wix-headless-templates/members/project/README.md +15 -0
  429. package/skills/wix-headless-templates/members/project/astro.config.mjs +22 -0
  430. package/skills/wix-headless-templates/members/project/package-lock.json +8892 -0
  431. package/skills/wix-headless-templates/members/project/package.json +37 -0
  432. package/skills/wix-headless-templates/members/project/public/favicon.svg +9 -0
  433. package/skills/wix-headless-templates/members/project/src/assets/astro.svg +1 -0
  434. package/skills/wix-headless-templates/members/project/src/assets/background.svg +1 -0
  435. package/skills/wix-headless-templates/members/project/src/assets/wix.svg +18 -0
  436. package/skills/wix-headless-templates/members/project/src/components/Hero.astro +77 -0
  437. package/skills/wix-headless-templates/members/project/src/components/Welcome.astro +95 -0
  438. package/skills/wix-headless-templates/members/project/src/components/members/AccountPage.tsx +16 -0
  439. package/skills/wix-headless-templates/members/project/src/components/members/AccountView.tsx +60 -0
  440. package/skills/wix-headless-templates/members/project/src/components/members/LoginForm.tsx +165 -0
  441. package/skills/wix-headless-templates/members/project/src/components/members/MemberMenu.tsx +78 -0
  442. package/skills/wix-headless-templates/members/project/src/components/members/RequireAuth.tsx +47 -0
  443. package/skills/wix-headless-templates/members/project/src/hooks/members/useMember.ts +67 -0
  444. package/skills/wix-headless-templates/members/project/src/layouts/Layout.astro +22 -0
  445. package/skills/wix-headless-templates/members/project/src/layouts/SiteLayout.astro +42 -0
  446. package/skills/wix-headless-templates/members/project/src/pages/account.astro +9 -0
  447. package/skills/wix-headless-templates/members/project/src/pages/index.astro +8 -0
  448. package/skills/wix-headless-templates/members/project/src/pages/login.astro +11 -0
  449. package/skills/wix-headless-templates/members/project/src/styles/global.css +57 -0
  450. package/skills/wix-headless-templates/members/project/src/wix/config.ts +16 -0
  451. package/skills/wix-headless-templates/members/project/src/wix/media.ts +106 -0
  452. package/skills/wix-headless-templates/members/project/src/wix/members/auth-core.ts +160 -0
  453. package/skills/wix-headless-templates/members/project/src/wix/members/auth.ts +117 -0
  454. package/skills/wix-headless-templates/members/project/src/wix/members/client.ts +27 -0
  455. package/skills/wix-headless-templates/members/project/src/wix/members/member-store.ts +133 -0
  456. package/skills/wix-headless-templates/members/project/src/wix/members/members-core.ts +43 -0
  457. package/skills/wix-headless-templates/members/project/src/wix/members/members.ts +29 -0
  458. package/skills/wix-headless-templates/members/project/src/wix/members/types.ts +21 -0
  459. package/skills/wix-headless-templates/members/project/src/wix/money.ts +24 -0
  460. package/skills/wix-headless-templates/members/project/src/wix/sdk.ts +89 -0
  461. package/skills/wix-headless-templates/members/project/tsconfig.json +5 -0
  462. package/skills/wix-headless-templates/members/rest/auth.ts +224 -0
  463. package/skills/wix-headless-templates/members/rest/members.ts +26 -0
  464. package/skills/wix-headless-templates/members/seed/SEED.md +39 -0
  465. package/skills/wix-headless-templates/members/seed/read-site.mjs +15 -0
  466. package/skills/wix-headless-templates/members/seed/seed-members.mjs +91 -0
  467. package/skills/wix-headless-templates/portfolio/INSTRUCTIONS.md +315 -0
  468. package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
  469. package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
  470. package/skills/wix-headless-templates/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
  471. package/skills/wix-headless-templates/portfolio/app/components/portfolio/ProjectDetailView.tsx +85 -0
  472. package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollectionProjects.ts +32 -0
  473. package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollections.ts +21 -0
  474. package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useProjectDetail.ts +31 -0
  475. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
  476. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collections-store.ts +58 -0
  477. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
  478. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio.ts +78 -0
  479. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
  480. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/types.ts +55 -0
  481. package/skills/wix-headless-templates/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
  482. package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
  483. package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio.astro +21 -0
  484. package/skills/wix-headless-templates/portfolio/app-astro/pages/projects/[slug].astro +29 -0
  485. package/skills/wix-headless-templates/portfolio/project/README.md +15 -0
  486. package/skills/wix-headless-templates/portfolio/project/astro.config.mjs +22 -0
  487. package/skills/wix-headless-templates/portfolio/project/package-lock.json +8760 -0
  488. package/skills/wix-headless-templates/portfolio/project/package.json +37 -0
  489. package/skills/wix-headless-templates/portfolio/project/public/favicon.svg +9 -0
  490. package/skills/wix-headless-templates/portfolio/project/src/assets/astro.svg +1 -0
  491. package/skills/wix-headless-templates/portfolio/project/src/assets/background.svg +1 -0
  492. package/skills/wix-headless-templates/portfolio/project/src/assets/wix.svg +18 -0
  493. package/skills/wix-headless-templates/portfolio/project/src/components/Hero.astro +77 -0
  494. package/skills/wix-headless-templates/portfolio/project/src/components/Welcome.astro +95 -0
  495. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionProjectsView.tsx +110 -0
  496. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionsView.tsx +90 -0
  497. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/GalleryMedia.tsx +35 -0
  498. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/ProjectDetailView.tsx +85 -0
  499. package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollectionProjects.ts +32 -0
  500. package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollections.ts +21 -0
  501. package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useProjectDetail.ts +31 -0
  502. package/skills/wix-headless-templates/portfolio/project/src/layouts/Layout.astro +22 -0
  503. package/skills/wix-headless-templates/portfolio/project/src/layouts/SiteLayout.astro +40 -0
  504. package/skills/wix-headless-templates/portfolio/project/src/pages/index.astro +8 -0
  505. package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio/[slug].astro +30 -0
  506. package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro +21 -0
  507. package/skills/wix-headless-templates/portfolio/project/src/pages/projects/[slug].astro +29 -0
  508. package/skills/wix-headless-templates/portfolio/project/src/styles/global.css +57 -0
  509. package/skills/wix-headless-templates/portfolio/project/src/wix/config.ts +16 -0
  510. package/skills/wix-headless-templates/portfolio/project/src/wix/media.ts +106 -0
  511. package/skills/wix-headless-templates/portfolio/project/src/wix/money.ts +24 -0
  512. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collection-projects-store.ts +82 -0
  513. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collections-store.ts +58 -0
  514. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio-core.ts +177 -0
  515. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio.ts +78 -0
  516. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts +81 -0
  517. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/types.ts +55 -0
  518. package/skills/wix-headless-templates/portfolio/project/src/wix/sdk.ts +89 -0
  519. package/skills/wix-headless-templates/portfolio/project/tsconfig.json +5 -0
  520. package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +75 -0
  521. package/skills/wix-headless-templates/portfolio/seed/SEED.md +86 -0
  522. package/skills/wix-headless-templates/portfolio/seed/read-site.mjs +20 -0
  523. package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +253 -0
  524. package/skills/wix-headless-templates/pricing-plans/INSTRUCTIONS.md +376 -0
  525. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +54 -0
  526. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlansView.tsx +108 -0
  527. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/RequirePlan.tsx +87 -0
  528. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
  529. package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanAccess.ts +31 -0
  530. package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +16 -0
  531. package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlans.ts +22 -0
  532. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-core.ts +29 -0
  533. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-store.ts +92 -0
  534. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +37 -0
  535. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
  536. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-core.ts +212 -0
  537. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
  538. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans.ts +54 -0
  539. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
  540. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase.ts +22 -0
  541. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/types.ts +52 -0
  542. package/skills/wix-headless-templates/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
  543. package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans/[slug].astro +43 -0
  544. package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans.astro +21 -0
  545. package/skills/wix-headless-templates/pricing-plans/project/README.md +15 -0
  546. package/skills/wix-headless-templates/pricing-plans/project/astro.config.mjs +22 -0
  547. package/skills/wix-headless-templates/pricing-plans/project/package-lock.json +9799 -0
  548. package/skills/wix-headless-templates/pricing-plans/project/package.json +38 -0
  549. package/skills/wix-headless-templates/pricing-plans/project/public/favicon.svg +9 -0
  550. package/skills/wix-headless-templates/pricing-plans/project/src/assets/astro.svg +1 -0
  551. package/skills/wix-headless-templates/pricing-plans/project/src/assets/background.svg +1 -0
  552. package/skills/wix-headless-templates/pricing-plans/project/src/assets/wix.svg +18 -0
  553. package/skills/wix-headless-templates/pricing-plans/project/src/components/Hero.astro +77 -0
  554. package/skills/wix-headless-templates/pricing-plans/project/src/components/Welcome.astro +95 -0
  555. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlanDetailView.tsx +54 -0
  556. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlansView.tsx +108 -0
  557. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/RequirePlan.tsx +87 -0
  558. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/SubscribeButton.tsx +41 -0
  559. package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanAccess.ts +31 -0
  560. package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanPurchase.ts +16 -0
  561. package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlans.ts +22 -0
  562. package/skills/wix-headless-templates/pricing-plans/project/src/layouts/Layout.astro +22 -0
  563. package/skills/wix-headless-templates/pricing-plans/project/src/layouts/SiteLayout.astro +41 -0
  564. package/skills/wix-headless-templates/pricing-plans/project/src/pages/index.astro +8 -0
  565. package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans/[slug].astro +43 -0
  566. package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans.astro +21 -0
  567. package/skills/wix-headless-templates/pricing-plans/project/src/styles/global.css +57 -0
  568. package/skills/wix-headless-templates/pricing-plans/project/src/wix/config.ts +16 -0
  569. package/skills/wix-headless-templates/pricing-plans/project/src/wix/media.ts +106 -0
  570. package/skills/wix-headless-templates/pricing-plans/project/src/wix/money.ts +24 -0
  571. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-core.ts +29 -0
  572. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-store.ts +92 -0
  573. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +37 -0
  574. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-purchase-store.ts +54 -0
  575. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-core.ts +212 -0
  576. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-store.ts +64 -0
  577. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans.ts +54 -0
  578. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase-core.ts +43 -0
  579. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase.ts +22 -0
  580. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/types.ts +52 -0
  581. package/skills/wix-headless-templates/pricing-plans/project/src/wix/sdk.ts +89 -0
  582. package/skills/wix-headless-templates/pricing-plans/project/tsconfig.json +5 -0
  583. package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +31 -0
  584. package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +58 -0
  585. package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +20 -0
  586. package/skills/wix-headless-templates/pricing-plans/seed/SEED.md +93 -0
  587. package/skills/wix-headless-templates/pricing-plans/seed/read-site.mjs +22 -0
  588. package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +301 -0
  589. package/skills/wix-headless-templates/rentals/INSTRUCTIONS.md +309 -0
  590. package/skills/wix-headless-templates/rentals/app/components/rentals/RentalBookingView.tsx +195 -0
  591. package/skills/wix-headless-templates/rentals/app/components/rentals/RentalsView.tsx +89 -0
  592. package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentalFlow.ts +31 -0
  593. package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentals.ts +23 -0
  594. package/skills/wix-headless-templates/rentals/app/wix/rentals/rental-flow-store.ts +283 -0
  595. package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-core.ts +435 -0
  596. package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-store.ts +112 -0
  597. package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals.ts +173 -0
  598. package/skills/wix-headless-templates/rentals/app/wix/rentals/types.ts +113 -0
  599. package/skills/wix-headless-templates/rentals/app-astro/layouts/SiteLayout.astro +40 -0
  600. package/skills/wix-headless-templates/rentals/app-astro/pages/rentals/[slug].astro +81 -0
  601. package/skills/wix-headless-templates/rentals/app-astro/pages/rentals.astro +24 -0
  602. package/skills/wix-headless-templates/rentals/project/README.md +15 -0
  603. package/skills/wix-headless-templates/rentals/project/astro.config.mjs +22 -0
  604. package/skills/wix-headless-templates/rentals/project/package-lock.json +10545 -0
  605. package/skills/wix-headless-templates/rentals/project/package.json +40 -0
  606. package/skills/wix-headless-templates/rentals/project/public/favicon.svg +9 -0
  607. package/skills/wix-headless-templates/rentals/project/src/assets/astro.svg +1 -0
  608. package/skills/wix-headless-templates/rentals/project/src/assets/background.svg +1 -0
  609. package/skills/wix-headless-templates/rentals/project/src/assets/wix.svg +18 -0
  610. package/skills/wix-headless-templates/rentals/project/src/components/Hero.astro +77 -0
  611. package/skills/wix-headless-templates/rentals/project/src/components/Welcome.astro +95 -0
  612. package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalBookingView.tsx +195 -0
  613. package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalsView.tsx +89 -0
  614. package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentalFlow.ts +31 -0
  615. package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentals.ts +23 -0
  616. package/skills/wix-headless-templates/rentals/project/src/layouts/Layout.astro +22 -0
  617. package/skills/wix-headless-templates/rentals/project/src/layouts/SiteLayout.astro +40 -0
  618. package/skills/wix-headless-templates/rentals/project/src/pages/index.astro +8 -0
  619. package/skills/wix-headless-templates/rentals/project/src/pages/rentals/[slug].astro +81 -0
  620. package/skills/wix-headless-templates/rentals/project/src/pages/rentals.astro +24 -0
  621. package/skills/wix-headless-templates/rentals/project/src/styles/global.css +57 -0
  622. package/skills/wix-headless-templates/rentals/project/src/wix/config.ts +16 -0
  623. package/skills/wix-headless-templates/rentals/project/src/wix/media.ts +106 -0
  624. package/skills/wix-headless-templates/rentals/project/src/wix/money.ts +24 -0
  625. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rental-flow-store.ts +283 -0
  626. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-core.ts +435 -0
  627. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-store.ts +112 -0
  628. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals.ts +173 -0
  629. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/types.ts +113 -0
  630. package/skills/wix-headless-templates/rentals/project/src/wix/sdk.ts +89 -0
  631. package/skills/wix-headless-templates/rentals/project/tsconfig.json +5 -0
  632. package/skills/wix-headless-templates/rentals/rest/rentals.ts +153 -0
  633. package/skills/wix-headless-templates/rentals/seed/SEED.md +95 -0
  634. package/skills/wix-headless-templates/rentals/seed/read-site.mjs +34 -0
  635. package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +321 -0
  636. package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +468 -0
  637. package/skills/wix-headless-templates/restaurants/app/components/restaurants/MenuView.tsx +257 -0
  638. package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
  639. package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
  640. package/skills/wix-headless-templates/restaurants/app/components/restaurants/ReservationView.tsx +212 -0
  641. package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useMenus.ts +34 -0
  642. package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +52 -0
  643. package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useReservation.ts +49 -0
  644. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-core.ts +333 -0
  645. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-store.ts +89 -0
  646. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +109 -0
  647. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +141 -0
  648. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +287 -0
  649. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +237 -0
  650. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservation-store.ts +279 -0
  651. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations-core.ts +218 -0
  652. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations.ts +109 -0
  653. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/time-core.ts +118 -0
  654. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +337 -0
  655. package/skills/wix-headless-templates/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
  656. package/skills/wix-headless-templates/restaurants/app-astro/pages/menu.astro +22 -0
  657. package/skills/wix-headless-templates/restaurants/app-astro/pages/reservations.astro +12 -0
  658. package/skills/wix-headless-templates/restaurants/project/README.md +15 -0
  659. package/skills/wix-headless-templates/restaurants/project/astro.config.mjs +22 -0
  660. package/skills/wix-headless-templates/restaurants/project/package-lock.json +11038 -0
  661. package/skills/wix-headless-templates/restaurants/project/package.json +40 -0
  662. package/skills/wix-headless-templates/restaurants/project/public/favicon.svg +9 -0
  663. package/skills/wix-headless-templates/restaurants/project/src/assets/astro.svg +1 -0
  664. package/skills/wix-headless-templates/restaurants/project/src/assets/background.svg +1 -0
  665. package/skills/wix-headless-templates/restaurants/project/src/assets/wix.svg +18 -0
  666. package/skills/wix-headless-templates/restaurants/project/src/components/Hero.astro +77 -0
  667. package/skills/wix-headless-templates/restaurants/project/src/components/Welcome.astro +95 -0
  668. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/MenuView.tsx +257 -0
  669. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartButton.tsx +26 -0
  670. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +121 -0
  671. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/ReservationView.tsx +212 -0
  672. package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useMenus.ts +34 -0
  673. package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +52 -0
  674. package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useReservation.ts +49 -0
  675. package/skills/wix-headless-templates/restaurants/project/src/layouts/Layout.astro +22 -0
  676. package/skills/wix-headless-templates/restaurants/project/src/layouts/SiteLayout.astro +47 -0
  677. package/skills/wix-headless-templates/restaurants/project/src/pages/index.astro +8 -0
  678. package/skills/wix-headless-templates/restaurants/project/src/pages/menu.astro +22 -0
  679. package/skills/wix-headless-templates/restaurants/project/src/pages/reservations.astro +12 -0
  680. package/skills/wix-headless-templates/restaurants/project/src/styles/global.css +57 -0
  681. package/skills/wix-headless-templates/restaurants/project/src/wix/config.ts +16 -0
  682. package/skills/wix-headless-templates/restaurants/project/src/wix/media.ts +106 -0
  683. package/skills/wix-headless-templates/restaurants/project/src/wix/money.ts +24 -0
  684. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-core.ts +333 -0
  685. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-store.ts +89 -0
  686. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +109 -0
  687. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +141 -0
  688. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +287 -0
  689. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +237 -0
  690. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservation-store.ts +279 -0
  691. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations-core.ts +218 -0
  692. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations.ts +109 -0
  693. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/time-core.ts +118 -0
  694. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +337 -0
  695. package/skills/wix-headless-templates/restaurants/project/src/wix/sdk.ts +89 -0
  696. package/skills/wix-headless-templates/restaurants/project/tsconfig.json +5 -0
  697. package/skills/wix-headless-templates/restaurants/rest/menu.ts +96 -0
  698. package/skills/wix-headless-templates/restaurants/rest/ordering.ts +222 -0
  699. package/skills/wix-headless-templates/restaurants/rest/reservations.ts +102 -0
  700. package/skills/wix-headless-templates/restaurants/seed/SEED.md +118 -0
  701. package/skills/wix-headless-templates/restaurants/seed/read-site.mjs +25 -0
  702. package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +577 -0
  703. package/skills/wix-headless-templates/shared/CONTENT.md +22 -0
  704. package/skills/wix-headless-templates/shared/CUSTOM_OPERATIONS.md +100 -0
  705. package/skills/wix-headless-templates/shared/DESIGN.md +37 -0
  706. package/skills/wix-headless-templates/shared/SUPPLIED-CONTENT.md +27 -0
  707. package/skills/wix-headless-templates/shared/app/styles/global.css +57 -0
  708. package/skills/wix-headless-templates/shared/app/wix/config.ts +16 -0
  709. package/skills/wix-headless-templates/shared/app/wix/media.ts +106 -0
  710. package/skills/wix-headless-templates/shared/app/wix/money.ts +24 -0
  711. package/skills/wix-headless-templates/shared/app/wix/sdk.ts +89 -0
  712. package/skills/wix-headless-templates/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
  713. package/skills/wix-headless-templates/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +69 -0
  714. package/skills/wix-headless-templates/shared/capabilities/site-search/INSTRUCTIONS.md +194 -0
  715. package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchBox.tsx +136 -0
  716. package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchHit.tsx +50 -0
  717. package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchResults.tsx +300 -0
  718. package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSearch.ts +31 -0
  719. package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSuggest.ts +26 -0
  720. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-core.ts +520 -0
  721. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-store.ts +235 -0
  722. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts +80 -0
  723. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/suggest-store.ts +178 -0
  724. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts +158 -0
  725. package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro +33 -0
  726. package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +82 -0
  727. package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +43 -0
  728. package/skills/wix-headless-templates/shared/rest/client.ts +155 -0
  729. package/skills/wix-headless-templates/shared/rest/config.ts +4 -0
  730. package/skills/wix-headless-templates/shared/rest/media.ts +92 -0
  731. package/skills/wix-headless-templates/shared/seed/images.mjs +183 -0
  732. package/skills/wix-headless-templates/shared/seed/read-site.mjs +97 -0
  733. package/skills/wix-headless-templates/shared/seed/site-context.mjs +70 -0
  734. package/skills/wix-headless-templates/shared/seed/site.mjs +48 -0
  735. package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +44 -0
  736. package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +685 -0
  737. package/skills/wix-headless-templates/storefront/app/components/storefront/CartButton.tsx +26 -0
  738. package/skills/wix-headless-templates/storefront/app/components/storefront/CartDrawer.tsx +239 -0
  739. package/skills/wix-headless-templates/storefront/app/components/storefront/FilterPanel.tsx +267 -0
  740. package/skills/wix-headless-templates/storefront/app/components/storefront/OptionPicker.tsx +171 -0
  741. package/skills/wix-headless-templates/storefront/app/components/storefront/QuickAdd.tsx +148 -0
  742. package/skills/wix-headless-templates/storefront/app/hooks/storefront/useCart.ts +59 -0
  743. package/skills/wix-headless-templates/storefront/app/hooks/storefront/useProductDetail.ts +42 -0
  744. package/skills/wix-headless-templates/storefront/app/hooks/storefront/useShop.ts +34 -0
  745. package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-core.ts +220 -0
  746. package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-store.ts +134 -0
  747. package/skills/wix-headless-templates/storefront/app/wix/storefront/cart.ts +187 -0
  748. package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog-core.ts +698 -0
  749. package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog.ts +260 -0
  750. package/skills/wix-headless-templates/storefront/app/wix/storefront/product-detail-store.ts +280 -0
  751. package/skills/wix-headless-templates/storefront/app/wix/storefront/shop-store.ts +341 -0
  752. package/skills/wix-headless-templates/storefront/app/wix/storefront/types.ts +305 -0
  753. package/skills/wix-headless-templates/storefront/app-astro/layouts/SiteLayout.astro +65 -0
  754. package/skills/wix-headless-templates/storefront/project/README.md +15 -0
  755. package/skills/wix-headless-templates/storefront/project/astro.config.mjs +22 -0
  756. package/skills/wix-headless-templates/storefront/project/package-lock.json +10786 -0
  757. package/skills/wix-headless-templates/storefront/project/package.json +41 -0
  758. package/skills/wix-headless-templates/storefront/project/public/favicon.svg +9 -0
  759. package/skills/wix-headless-templates/storefront/project/src/assets/astro.svg +1 -0
  760. package/skills/wix-headless-templates/storefront/project/src/assets/background.svg +1 -0
  761. package/skills/wix-headless-templates/storefront/project/src/assets/wix.svg +18 -0
  762. package/skills/wix-headless-templates/storefront/project/src/components/Hero.astro +77 -0
  763. package/skills/wix-headless-templates/storefront/project/src/components/Welcome.astro +95 -0
  764. package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartButton.tsx +26 -0
  765. package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartDrawer.tsx +239 -0
  766. package/skills/wix-headless-templates/storefront/project/src/components/storefront/FilterPanel.tsx +267 -0
  767. package/skills/wix-headless-templates/storefront/project/src/components/storefront/OptionPicker.tsx +171 -0
  768. package/skills/wix-headless-templates/storefront/project/src/components/storefront/QuickAdd.tsx +148 -0
  769. package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useCart.ts +59 -0
  770. package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useProductDetail.ts +42 -0
  771. package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useShop.ts +34 -0
  772. package/skills/wix-headless-templates/storefront/project/src/layouts/Layout.astro +22 -0
  773. package/skills/wix-headless-templates/storefront/project/src/layouts/SiteLayout.astro +65 -0
  774. package/skills/wix-headless-templates/storefront/project/src/pages/index.astro +8 -0
  775. package/skills/wix-headless-templates/storefront/project/src/styles/global.css +57 -0
  776. package/skills/wix-headless-templates/storefront/project/src/wix/config.ts +16 -0
  777. package/skills/wix-headless-templates/storefront/project/src/wix/media.ts +106 -0
  778. package/skills/wix-headless-templates/storefront/project/src/wix/money.ts +24 -0
  779. package/skills/wix-headless-templates/storefront/project/src/wix/sdk.ts +89 -0
  780. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-core.ts +220 -0
  781. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-store.ts +134 -0
  782. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart.ts +187 -0
  783. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog-core.ts +698 -0
  784. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog.ts +260 -0
  785. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/product-detail-store.ts +280 -0
  786. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/shop-store.ts +341 -0
  787. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/types.ts +305 -0
  788. package/skills/wix-headless-templates/storefront/project/tsconfig.json +5 -0
  789. package/skills/wix-headless-templates/storefront/rest/cart.ts +183 -0
  790. package/skills/wix-headless-templates/storefront/rest/catalog.ts +267 -0
  791. package/skills/wix-headless-templates/storefront/seed/SEED.md +169 -0
  792. package/skills/wix-headless-templates/storefront/seed/read-site.mjs +38 -0
  793. package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +839 -0
  794. package/skills/wix-manage/SKILL.md +11 -7
  795. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +1 -1
  796. package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +206 -0
  797. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +17 -24
  798. package/skills/wix-manage/references/sites/create-headless-site.md +2 -0
  799. package/skills/wix-manage/references/sites/upload-static-site.md +262 -171
  800. package/skills/wix-manage/references/stores/update-product-with-options.md +1 -1
  801. package/skills/wix-headless/entry/bootstrap.mjs +0 -156
  802. package/skills/wix-headless/entry/skill.md +0 -78
  803. package/skills/wix-headless-kit/cold-start/bootstrap.mjs +0 -156
  804. package/skills/wix-headless-kit/cold-start/cold-start.md +0 -111
  805. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +0 -423
@@ -0,0 +1,67 @@
1
+ // React binding for the member store. Works in any React root — Astro islands (several on
2
+ // one page share the same session) and SPAs alike. SSR-friendly: pass a server-resolved
3
+ // member as `initialMember` (Astro island props) and no client re-fetch happens.
4
+ import { useRef, useSyncExternalStore } from "react";
5
+ import {
6
+ getMemberState,
7
+ hydrateMember,
8
+ login,
9
+ register,
10
+ logout,
11
+ refreshMember,
12
+ subscribeMember,
13
+ verifyEmail,
14
+ type MemberState,
15
+ } from "../../wix/members/member-store";
16
+ import type { LoginOptions, LoginResult } from "../../wix/members/auth";
17
+ import type { CurrentMember } from "../../wix/members/types";
18
+
19
+ export interface UseMemberOptions {
20
+ /** Server-resolved member (null = a known-anonymous visitor); omit to resolve client-side. */
21
+ initialMember?: CurrentMember | null;
22
+ }
23
+
24
+ export interface UseMember extends MemberState {
25
+ /** Submit the shipped in-app credential form; `returnTo` is where a SUCCESS lands. */
26
+ login: (email: string, password: string, options?: LoginOptions) => Promise<LoginResult>;
27
+ register: (
28
+ email: string,
29
+ password: string,
30
+ profile?: { firstName?: string; lastName?: string },
31
+ options?: LoginOptions,
32
+ ) => Promise<LoginResult>;
33
+ verifyEmail: (code: string) => Promise<LoginResult>;
34
+ /** Log out through the Wix logout flow; navigates away. */
35
+ logout: (returnTo?: string) => Promise<void>;
36
+ refresh: () => Promise<void>;
37
+ }
38
+
39
+ export function useMember({ initialMember }: UseMemberOptions = {}): UseMember {
40
+ // Adopt SSR props into the shared store before the first subscription (a no-op once any
41
+ // island has settled the session).
42
+ if (typeof window !== "undefined" && initialMember !== undefined)
43
+ hydrateMember(initialMember);
44
+ const server = useRef<MemberState | null>(null);
45
+ server.current ??=
46
+ initialMember !== undefined
47
+ ? {
48
+ member: initialMember,
49
+ loggedIn: initialMember !== null,
50
+ loading: false,
51
+ error: null,
52
+ }
53
+ : getMemberState();
54
+ const state = useSyncExternalStore(
55
+ subscribeMember,
56
+ getMemberState,
57
+ () => server.current as MemberState,
58
+ );
59
+ return {
60
+ ...state,
61
+ login,
62
+ register,
63
+ verifyEmail,
64
+ logout,
65
+ refresh: refreshMember,
66
+ };
67
+ }
@@ -0,0 +1,22 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width" />
6
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
+ <meta name="generator" content={Astro.generator} />
8
+ <title>Wix Astro Basics</title>
9
+ </head>
10
+ <body>
11
+ <slot />
12
+ </body>
13
+ </html>
14
+
15
+ <style>
16
+ html,
17
+ body {
18
+ margin: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ </style>
@@ -0,0 +1,42 @@
1
+ ---
2
+ // The site chrome for every members page — THIS file (header/footer/nav) plus the @theme
3
+ // token block in src/styles/global.css are what you brand. Keep the <slot name="seo-tags" />
4
+ // in <head>, the global.css import, and one <MemberMenu client:only="react"> in the header
5
+ // (it reads browser session state and must not server-render). (If another vertical is also
6
+ // deployed, its SiteLayout won — mount MemberMenu in that header instead.)
7
+ import MemberMenu from "../components/members/MemberMenu";
8
+ import "../styles/global.css";
9
+
10
+ interface Props {
11
+ title: string;
12
+ description?: string;
13
+ }
14
+ const { title, description } = Astro.props;
15
+ ---
16
+
17
+ <!doctype html>
18
+ <html lang="en">
19
+ <head>
20
+ <meta charset="UTF-8" />
21
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
22
+ <title>{title}</title>
23
+ {description && <meta name="description" content={description} />}
24
+ <slot name="seo-tags" />
25
+ </head>
26
+ <body>
27
+ <header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
28
+ <div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
29
+ <a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
30
+ <nav class="flex items-center gap-6 text-sm">
31
+ <MemberMenu client:only="react" />
32
+ </nav>
33
+ </div>
34
+ </header>
35
+ <main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
36
+ <slot />
37
+ </main>
38
+ <footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
39
+ © Brand Name
40
+ </footer>
41
+ </body>
42
+ </html>
@@ -0,0 +1,9 @@
1
+ ---
2
+ import SiteLayout from "../layouts/SiteLayout.astro";
3
+ import AccountPage from "../components/members/AccountPage";
4
+ ---
5
+
6
+ <SiteLayout title="My account">
7
+ <h1 class="mb-8 text-2xl font-semibold tracking-tight">My account</h1>
8
+ <AccountPage client:only="react" />
9
+ </SiteLayout>
@@ -0,0 +1,8 @@
1
+ ---
2
+ import Hero from '../components/Hero.astro';
3
+ import Layout from '../layouts/Layout.astro';
4
+ ---
5
+
6
+ <Layout>
7
+ <Hero />
8
+ </Layout>
@@ -0,0 +1,11 @@
1
+ ---
2
+ import SiteLayout from "../layouts/SiteLayout.astro";
3
+ import LoginForm from "../components/members/LoginForm";
4
+ ---
5
+
6
+ <SiteLayout title="Log in">
7
+ <section class="mx-auto max-w-md">
8
+ <h1 class="mb-6 text-2xl font-semibold">Welcome</h1>
9
+ <LoginForm client:only="react" />
10
+ </section>
11
+ </SiteLayout>
@@ -0,0 +1,57 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Wix+Madefor+Text:wght@400;500;600;700;800&display=swap');
2
+ @import 'tailwindcss';
3
+
4
+ /* ─── THE design system ─────────────────────────────────────────────────────────────────
5
+ Theme the entire store by editing THIS @theme block (same token family as the official
6
+ Wix headless templates). Every shipped component styles itself from these via Tailwind
7
+ utilities (bg-primary, text-muted-foreground, text-destructive, rounded-lg, …) — change a token, everything
8
+ follows. A dark theme is just flipped values (dark background/foreground, adjusted
9
+ secondary/border). Don't restyle shipped component markup; restyle the tokens.
10
+
11
+ Choosing values: argue polarity from the business — light is not "cheap" (wellness/food
12
+ usually read better light); never dark-by-default for "premium". Palette: one dominant +
13
+ accents from ADJACENT hues (~30° arc), 2-4 colors total. Every background/foreground pair
14
+ you set must hit WCAG 4.5:1 (3:1 for text ≥24px); body copy never below 16px/1.5. Derive
15
+ from THIS brand — a look repeated across projects is a failure, not a shortcut. The user's
16
+ explicit direction beats all of this except the contrast floor. */
17
+ @theme {
18
+ --color-background: hsl(0 0% 100%);
19
+ --color-foreground: hsl(230 24% 14%);
20
+ --color-primary: hsl(230 24% 14%);
21
+ --color-primary-foreground: hsl(0 0% 100%);
22
+ --color-secondary: hsl(228 24% 96%);
23
+ --color-secondary-foreground: hsl(230 24% 14%);
24
+ --color-muted-foreground: hsl(228 8% 46%);
25
+ --color-border: hsl(220 14% 90%);
26
+ --color-destructive: hsl(0 72% 51%);
27
+
28
+ --radius-lg: 12px;
29
+ --radius-md: 8px;
30
+ --radius-sm: 6px;
31
+ /* Buttons, chips, labels, steppers and the progress bar. Follows --radius-md unless the brand
32
+ wants otherwise: 9999px is the pill, 0 is square. Genuine circles (swatches, avatars, dots)
33
+ stay rounded-full and do not read this. */
34
+ --radius-control: var(--radius-md);
35
+
36
+ --font-sans: 'Wix Madefor Text', system-ui, sans-serif;
37
+ }
38
+
39
+ @layer base {
40
+ body {
41
+ background-color: var(--color-background);
42
+ color: var(--color-foreground);
43
+ font-family: var(--font-sans);
44
+ -webkit-font-smoothing: antialiased;
45
+ font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
46
+ }
47
+ }
48
+
49
+ @layer utilities {
50
+ .eyebrow {
51
+ font-size: 0.8125rem;
52
+ font-weight: 600;
53
+ letter-spacing: 0.1em;
54
+ text-transform: uppercase;
55
+ color: var(--color-muted-foreground);
56
+ }
57
+ }
@@ -0,0 +1,16 @@
1
+ // Wix connection config — written by the skill's deploy step (install/deploy.mjs).
2
+ //
3
+ // WIX_CLIENT_ID = null → ambient auth (a Wix-managed Astro project: `@wix/astro` authenticates
4
+ // every SDK call automatically; there is no client and nothing to set).
5
+ // WIX_CLIENT_ID = "..." → manual visitor client (any other React setup): the public OAuth client id.
6
+ // It is NOT a secret — it only mints anonymous visitor tokens — so
7
+ // hardcoding and committing it is fine. deploy.mjs copies it from `.env.local`
8
+ // (`WIX_CLIENT_ID`, what `wix env pull` writes): the CONTENT site's app — on a
9
+ // migration preview the site being migrated, while wix.config.json names
10
+ // only the deploy target.
11
+ export const WIX_CLIENT_ID: string | null = null;
12
+
13
+ // Kept for projects deployed before the Members vertical moved onto the shared seam; the shipped
14
+ // members code no longer reads it (ambient Astro uses the built-in /api/auth routes, manual mode
15
+ // uses the shared client above). deploy.mjs still fills it so older code keeps compiling.
16
+ export const WIX_MEMBERS_CLIENT_ID: string | null = null;
@@ -0,0 +1,106 @@
1
+ // Wix media resolution — define once, use on EVERY image render path. Copy as-is.
2
+ //
3
+ // SDK media fields come back either as an already-absolute https URL, or as a
4
+ // `wix:image://v1/<hash>/<file>#originWidth=…` identifier that a browser cannot load
5
+ // (ERR_UNKNOWN_URL_SCHEME). The wix:image:// form must go through the SDK media module;
6
+ // never hand-build a static.wixstatic.com URL (wrong format → 403).
7
+ // docs: https://dev.wix.com/docs/sdk/core-modules/sdk/media.md
8
+ import { media } from "@wix/sdk";
9
+
10
+ type MediaLike =
11
+ | string
12
+ | null
13
+ | undefined
14
+ | { image?: unknown; url?: string | null; id?: string | null };
15
+
16
+ /** A bare Wix media file id (`e6a89e_06cf…~mv2.png`): what REST-shaped media objects carry as `url` and `id`. */
17
+ const BARE_FILE_ID = /^[\w-]+~mv2\.[a-z0-9]+$/i;
18
+
19
+ function rawOf(value: MediaLike): string {
20
+ if (!value) return "";
21
+ if (typeof value === "string") return value;
22
+ if (value.image != null && typeof value.image === "object") return rawOf(value.image as MediaLike); // { image: { id, url } }
23
+ return (typeof value.image === "string" ? value.image : null) ?? value.url ?? value.id ?? "";
24
+ }
25
+
26
+ /** Resolve any Wix media value to a browser-loadable URL ("" when absent). */
27
+ export function imgSrc(value: MediaLike, width = 600, height = 600): string {
28
+ const v = rawOf(value);
29
+ if (!v) return "";
30
+ if (v.startsWith("wix:image://")) {
31
+ return media.getScaledToFillImageUrl(v, width, height, {});
32
+ }
33
+ // A bare file id (what REST-shaped media objects carry) or an absolute Wix media URL (bare, or
34
+ // already carrying a /v1/fill/ segment at some other size): re-issue it through the scaler at the
35
+ // requested size, so every image path lands on one shape.
36
+ const file = BARE_FILE_ID.test(v) ? v : v.match(/^https:\/\/static\.wixstatic\.com\/media\/([^/?#]+)/)?.[1];
37
+ if (file) return `https://static.wixstatic.com/media/${file}/v1/fill/w_${width},h_${height},al_c,q_90/${file}`;
38
+ return v;
39
+ }
40
+
41
+ /**
42
+ * Responsive candidates for `srcset`: the same image at several widths through Wix's scaler, so a
43
+ * card never downloads a hero-sized file. Pair with `sizes`:
44
+ * <img src={imgSrc(m, 640, 640)} srcSet={imgSrcSet(m)} sizes="(min-width: 1024px) 25vw, 50vw"
45
+ * width={640} height={640} loading="lazy" alt={…} />
46
+ * Accepts every form an image reaches you in: a raw `wix:image://` id, an ALREADY-RESOLVED Wix URL
47
+ * (what the DTOs carry — `imageUrl`, `gallery[]`; its `/v1/fill/w_…,h_…` segment is rewritten per
48
+ * width), or any other https URL (returned as the single candidate). `ratio` is height/width
49
+ * (1 = square). "" only when there is no image at all — still set `src` as well.
50
+ */
51
+ export function imgSrcSet(value: MediaLike, widths: number[] = [320, 480, 640, 960], ratio = 1): string {
52
+ const raw = rawOf(value);
53
+ if (!raw) return "";
54
+ if (raw.startsWith("wix:image://") || BARE_FILE_ID.test(raw)) {
55
+ return widths.map((w) => `${imgSrc(value, w, Math.round(w * ratio))} ${w}w`).join(", ");
56
+ }
57
+ // A resolved Wix URL: …/v1/fill/w_800,h_800,al_c,… — swap the size for each width.
58
+ const FILL = /\/v1\/fill\/w_\d+,h_\d+/;
59
+ if (/static\.wixstatic\.com\//.test(raw) && FILL.test(raw)) {
60
+ return widths.map((w) => `${raw.replace(FILL, `/v1/fill/w_${w},h_${Math.round(w * ratio)}`)} ${w}w`).join(", ");
61
+ }
62
+ return raw; // one candidate, never an empty srcset for a real image
63
+ }
64
+
65
+ /**
66
+ * Everything an <img> needs for one Wix image, so a tile can never ship `srcSet` without `src`:
67
+ * <img {...imgAttrs(p.imageUrl, "(min-width: 1024px) 25vw, 50vw")} alt={p.name} />
68
+ * `sizes` is the width the image renders at (a CSS length or media-query list); `ratio` is
69
+ * height/width. Returns an empty object when there is no image — render your placeholder then.
70
+ */
71
+ export function imgAttrs(value: MediaLike, sizes: string, ratio = 1): { src: string; srcSet: string; sizes: string; loading: "lazy"; decoding: "async" } | Record<string, never> {
72
+ const src = imgSrc(value, 640, Math.round(640 * ratio));
73
+ if (!src) return {};
74
+ return { src, srcSet: imgSrcSet(value, undefined, ratio), sizes, loading: "lazy", decoding: "async" };
75
+ }
76
+
77
+ /**
78
+ * Height/width of a Wix image when the value carries its size: a raw
79
+ * `wix:image://…#originWidth=W&originHeight=H` id (the natural size) or a resolved `/v1/fill/w_W,h_H/`
80
+ * URL (the size it was scaled to). null when neither is present. Pass it as `ratio` to keep a
81
+ * srcset at the image's own aspect instead of the square default:
82
+ * <img {...imgAttrs(item.photo, "33vw", imgRatio(item.photo) ?? 1)} alt={…} />
83
+ */
84
+ export function imgRatio(value: MediaLike): number | null {
85
+ const v = rawOf(value);
86
+ if (typeof v !== "string" || !v) return null;
87
+ const size = v.startsWith("wix:image://")
88
+ ? [v.match(/[#&]originWidth=(\d+)/)?.[1], v.match(/[#&]originHeight=(\d+)/)?.[1]]
89
+ : (v.match(/\/v1\/fill\/w_(\d+),h_(\d+)/)?.slice(1) ?? []);
90
+ const w = Number(size[0]);
91
+ const h = Number(size[1]);
92
+ return w > 0 && h > 0 ? h / w : null;
93
+ }
94
+
95
+ /**
96
+ * The identity of a media value BEFORE scaling — de-duplicate galleries on this, never on a
97
+ * resolved URL (two scaled URLs of one photo differ in their size parameters).
98
+ */
99
+ export function mediaKey(value: MediaLike): string {
100
+ const v = rawOf(value);
101
+ if (!v) return "";
102
+ // The file id, whichever form the value takes — a raw id and a resolved URL of one photo share it.
103
+ if (v.startsWith("wix:image://")) return v.slice("wix:image://v1/".length).split("/")[0].split("#")[0];
104
+ const m = v.match(/^https:\/\/static\.wixstatic\.com\/media\/([^/?#]+)/);
105
+ return m ? m[1] : v;
106
+ }
@@ -0,0 +1,160 @@
1
+ // Authentication rules — transport-agnostic, imported by EVERY transport: ./auth.ts (the SDK's
2
+ // OAuthStrategy, or the managed-Astro built-in auth routes) and the REST twin in
3
+ // templates/members/rest/auth.ts (the IAM authentication API over fetch). What a login/registration
4
+ // response MEANS — the four states, when a session token is expected, which Wix error code is which
5
+ // failure — lives HERE, once. No imports: a strip to JS emits a plain module.
6
+
7
+ /** The four outcomes every credential operation resolves to; the shipped LoginForm renders each. */
8
+ export type LoginState = "SUCCESS" | "EMAIL_VERIFICATION_REQUIRED" | "OWNER_APPROVAL_REQUIRED" | "FAILURE";
9
+
10
+ export interface LoginResult {
11
+ state: LoginState;
12
+ /** Continues an EMAIL_VERIFICATION_REQUIRED flow (the transport keeps it too — verifyMemberEmail needs no argument). */
13
+ stateToken?: string;
14
+ /** A stable name for a FAILURE: invalidPassword, invalidEmail, emailAlreadyExists, resetPassword, missingCaptchaToken, invalidCaptchaToken. */
15
+ errorCode?: string;
16
+ /** Wix's message for a FAILURE — render it. */
17
+ error?: string;
18
+ /**
19
+ * Managed Astro only: a SUCCESS is not a session yet — the browser must navigate here (the Wix
20
+ * authorization step), which returns through /api/auth/callback and lands on the requested page.
21
+ */
22
+ redirectUrl?: string;
23
+ }
24
+
25
+ /** A raw login/register/verify response as either transport returns it. */
26
+ export type RawAuth = Record<string, any>;
27
+
28
+ /** A LoginResult plus the one-shot session token a SUCCESS carries (5-minute life; exchanged, never shown). */
29
+ export interface AuthOutcome extends LoginResult {
30
+ sessionToken: string | null;
31
+ }
32
+
33
+ // REST spells the states differently from the SDK; both map onto LoginState.
34
+ const REST_STATES: Record<string, LoginState> = {
35
+ SUCCESS: "SUCCESS",
36
+ REQUIRE_EMAIL_VERIFICATION: "EMAIL_VERIFICATION_REQUIRED",
37
+ REQUIRE_OWNER_APPROVAL: "OWNER_APPROVAL_REQUIRED",
38
+ };
39
+
40
+ /**
41
+ * Normalize either transport's response — SDK `{ loginState, data: { sessionToken | stateToken },
42
+ * error?, errorCode? }` or REST `{ state, sessionToken?, stateToken? }`. Anything else is a FAILURE.
43
+ */
44
+ export function authOutcome(raw: RawAuth | null | undefined): AuthOutcome {
45
+ const state: LoginState = raw?.loginState ?? REST_STATES[raw?.state ?? ""] ?? "FAILURE";
46
+ const stateToken: string | undefined = raw?.stateToken ?? raw?.data?.stateToken;
47
+ return {
48
+ state,
49
+ sessionToken: raw?.data?.sessionToken ?? raw?.sessionToken ?? null,
50
+ ...(stateToken ? { stateToken } : {}),
51
+ ...(raw?.errorCode ? { errorCode: raw.errorCode } : {}),
52
+ ...(raw?.error ? { error: raw.error } : {}),
53
+ };
54
+ }
55
+
56
+ /** The outcome as callers see it — without the session token, which the transport has consumed. */
57
+ export function toLoginResult({ sessionToken: _consumed, ...result }: AuthOutcome): LoginResult {
58
+ return result;
59
+ }
60
+
61
+ export function failure(error: string, errorCode?: string): LoginResult {
62
+ return { state: "FAILURE", error, ...(errorCode ? { errorCode } : {}) };
63
+ }
64
+
65
+ /** A SUCCESS without a session token — the exchange can't run; surfaced as a FAILURE with this text. */
66
+ export const NO_SESSION_ERROR = "Wix did not return a member session.";
67
+
68
+ // The built-in auth routes' request-level error codes (body `{ error }`), in the words a form can show.
69
+ const AUTH_ROUTE_ERRORS: Record<string, string> = {
70
+ ALREADY_LOGGED_IN: "You are already signed in.",
71
+ AUTH_SERVICE_ERROR: "Wix could not process the sign-in right now. Try again.",
72
+ VERIFICATION_FAILED: "That code did not match. Check the email and try again.",
73
+ VERIFICATION_STATE_EXPIRED: "The verification code expired. Sign in again to get a new one.",
74
+ INVALID_REQUEST: "The form sent something Wix did not accept.",
75
+ FORBIDDEN: "This request was refused.",
76
+ };
77
+
78
+ /**
79
+ * A managed-Astro auth route answer → LoginResult. Success: `{ loginState: "SUCCESS", redirectUrl }`
80
+ * (200). Challenges: `{ loginState }` with 403 — verification and owner approval pass through; a
81
+ * CAPTCHA challenge (the site owner turned reCAPTCHA on) is a FAILURE the form cannot clear without
82
+ * a widget. Failure: `{ loginState: "FAILURE", errorCode }` (422, or 403 for resetPassword). Request
83
+ * errors: `{ error: CODE }` without a loginState.
84
+ */
85
+ export function fromAuthRoute(status: number, body: RawAuth | null): LoginResult {
86
+ const loginState: string | undefined = body?.loginState;
87
+ switch (loginState) {
88
+ case "SUCCESS":
89
+ return body?.redirectUrl ? { state: "SUCCESS", redirectUrl: body.redirectUrl } : failure(NO_SESSION_ERROR);
90
+ case "EMAIL_VERIFICATION_REQUIRED":
91
+ case "OWNER_APPROVAL_REQUIRED":
92
+ return { state: loginState };
93
+ case "SILENT_CAPTCHA_REQUIRED":
94
+ case "USER_CAPTCHA_REQUIRED":
95
+ return failure("This site requires a CAPTCHA to sign up; the form has no CAPTCHA widget yet.", "captchaRequired");
96
+ case "FAILURE":
97
+ return failure(body?.error ?? FAILURE_TEXT[body?.errorCode ?? ""] ?? "Could not sign in.", body?.errorCode ?? "unknown");
98
+ default: {
99
+ // No route at all: the project's @wix/astro predates the built-in credential routes (2.75).
100
+ if (status === 404 || status === 405) return failure("This site's @wix/astro has no /api/auth credential routes; update it to 2.75 or later.", "authRoutesMissing");
101
+ const code: string | undefined = body?.error;
102
+ return failure(AUTH_ROUTE_ERRORS[code ?? ""] ?? `Sign-in request failed (${status}).`, code);
103
+ }
104
+ }
105
+ }
106
+
107
+ /** Default wording per errorCode when the route sends none (the SDK sends none either). */
108
+ const FAILURE_TEXT: Record<string, string> = {
109
+ invalidCredentials: "Wrong email or password.",
110
+ invalidEmail: "That email is not valid here.",
111
+ invalidPassword: "Wrong password.",
112
+ emailAlreadyExists: "An account with this email already exists. Sign in instead.",
113
+ resetPassword: "You need to reset your password before signing in.",
114
+ missingCaptchaToken: "This site requires a CAPTCHA to sign up.",
115
+ invalidCaptchaToken: "The CAPTCHA check failed. Try again.",
116
+ };
117
+
118
+ // Wix IAM application-error codes, named as the SDK names them.
119
+ export const AUTH_ERROR_CODES = {
120
+ MISSING_CAPTCHA: "-19971",
121
+ INVALID_CAPTCHA: "-19970",
122
+ EMAIL_EXISTS: "-19995",
123
+ INVALID_PASSWORD: "-19976",
124
+ RESET_PASSWORD: "-19973",
125
+ } as const;
126
+
127
+ /** A failed login's applicationError code → the SDK's errorCode name (anything unrecognized is `invalidEmail`, as the SDK does). */
128
+ export function loginErrorCode(code: string | undefined): string {
129
+ switch (code) {
130
+ case AUTH_ERROR_CODES.MISSING_CAPTCHA:
131
+ return "missingCaptchaToken";
132
+ case AUTH_ERROR_CODES.INVALID_CAPTCHA:
133
+ return "invalidCaptchaToken";
134
+ case AUTH_ERROR_CODES.INVALID_PASSWORD:
135
+ return "invalidPassword";
136
+ case AUTH_ERROR_CODES.RESET_PASSWORD:
137
+ return "resetPassword";
138
+ default:
139
+ return "invalidEmail";
140
+ }
141
+ }
142
+
143
+ /**
144
+ * A failed registration's applicationError code (+ the response `details`) → the SDK's errorCode
145
+ * name; undefined when the SDK would name none. A validation error on the EMAIL field is `invalidEmail`.
146
+ */
147
+ export function registerErrorCode(code: string | undefined, details?: RawAuth): string | undefined {
148
+ const violations: RawAuth[] = details?.validationError?.fieldViolations ?? [];
149
+ if (violations.some((v) => v?.data?.type === "EMAIL")) return "invalidEmail";
150
+ switch (code) {
151
+ case AUTH_ERROR_CODES.MISSING_CAPTCHA:
152
+ return "missingCaptchaToken";
153
+ case AUTH_ERROR_CODES.EMAIL_EXISTS:
154
+ return "emailAlreadyExists";
155
+ case AUTH_ERROR_CODES.INVALID_CAPTCHA:
156
+ return "invalidCaptchaToken";
157
+ default:
158
+ return undefined;
159
+ }
160
+ }
@@ -0,0 +1,117 @@
1
+ // Member authentication — the transport only; what a response MEANS lives in ./auth-core (shared
2
+ // with the REST twin in templates/members/rest/auth.ts). Two transports behind one export list,
3
+ // switched by AMBIENT_AUTH from ./client:
4
+ //
5
+ // ambient (Wix-managed Astro): the integration's built-in auth routes. Credentials go to
6
+ // POST /api/auth/login or /api/auth/signup as JSON; a SUCCESS answers with `redirectUrl`, the
7
+ // Wix authorization step that the browser MUST navigate to — it bounces straight back through
8
+ // /api/auth/callback, which writes the member session cookie server-side (HttpOnly) and lands
9
+ // on `returnTo`. Email verification continues through POST /api/auth/verify-email (the pending
10
+ // state is a server cookie, nothing to keep here). Logout is a POST to /api/auth/logout.
11
+ // docs: @wix/astro docs/custom-login.md, docs/custom-signup.md, docs/email-verification.md
12
+ //
13
+ // manual (any other React setup): the SDK's OAuthStrategy in the browser — login/register/verify,
14
+ // then the one-shot session token is exchanged for member tokens that the client persists.
15
+ // docs: https://dev.wix.com/docs/go-headless/authentication/members/custom-login-page/build-a-custom-login-page-js-sdk.md
16
+ //
17
+ // Copy as-is; extend by adding functions, never by editing the exchange.
18
+ import { AMBIENT_AUTH, membersAuth } from "./client";
19
+ import {
20
+ NO_SESSION_ERROR,
21
+ authOutcome,
22
+ failure,
23
+ fromAuthRoute,
24
+ toLoginResult,
25
+ type LoginResult,
26
+ type LoginState,
27
+ type RawAuth,
28
+ } from "./auth-core";
29
+
30
+ export type { LoginResult, LoginState };
31
+
32
+ export interface LoginOptions {
33
+ /** Same-site path to land on after a SUCCESS (ambient: the callback's destination). Default "/". */
34
+ returnTo?: string;
35
+ }
36
+
37
+ /** Whether register() can carry first/last name. The built-in signup route takes credentials only. */
38
+ export const PROFILE_ON_SIGNUP = !AMBIENT_AUTH;
39
+
40
+ /**
41
+ * Session hint without a network call: manual mode knows from its tokens; ambient mode returns
42
+ * null — the current-member read IS the session check there (the store handles both).
43
+ */
44
+ export function loggedInHint(): boolean | null {
45
+ return membersAuth ? membersAuth.loggedIn() : null;
46
+ }
47
+
48
+ // ---- ambient: the built-in routes ----------------------------------------------------------------
49
+
50
+ function safeReturnTo(returnTo: string | undefined): string {
51
+ return returnTo && returnTo.startsWith("/") && !returnTo.startsWith("//") ? returnTo : "/";
52
+ }
53
+
54
+ async function postAuthRoute(path: string, body: Record<string, string>): Promise<LoginResult> {
55
+ const res = await fetch(path, {
56
+ method: "POST",
57
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
58
+ body: JSON.stringify(body),
59
+ credentials: "same-origin",
60
+ });
61
+ const json = (await res.json().catch(() => null)) as RawAuth | null;
62
+ return fromAuthRoute(res.status, json);
63
+ }
64
+
65
+ // ---- manual: the SDK strategy ----------------------------------------------------------------------
66
+
67
+ // A SUCCESS carries a one-shot session token; the strategy exchanges it for member tokens
68
+ // (getMemberTokensForDirectLogin) and setTokens persists them, so every later call runs as the member.
69
+ async function finish(raw: RawAuth): Promise<LoginResult> {
70
+ const outcome = authOutcome(raw);
71
+ if (outcome.state === "SUCCESS") {
72
+ if (!outcome.sessionToken || !membersAuth) return failure(NO_SESSION_ERROR);
73
+ const tokens = await membersAuth.getMemberTokensForDirectLogin(outcome.sessionToken);
74
+ membersAuth.setTokens(tokens);
75
+ return { state: "SUCCESS" };
76
+ }
77
+ return toLoginResult(outcome);
78
+ }
79
+
80
+ // ---- the exports (same on both transports) ---------------------------------------------------------
81
+
82
+ export async function loginMember(email: string, password: string, options: LoginOptions = {}): Promise<LoginResult> {
83
+ if (!membersAuth) return postAuthRoute("/api/auth/login", { email, password, returnToUrl: safeReturnTo(options.returnTo) });
84
+ return finish((await membersAuth.login({ email, password })) as RawAuth);
85
+ }
86
+
87
+ export async function registerMember(
88
+ email: string,
89
+ password: string,
90
+ profile?: { firstName?: string; lastName?: string },
91
+ options: LoginOptions = {},
92
+ ): Promise<LoginResult> {
93
+ if (!membersAuth) return postAuthRoute("/api/auth/signup", { email, password, returnToUrl: safeReturnTo(options.returnTo) });
94
+ return finish((await membersAuth.register({ email, password, ...(profile ? { profile } : {}) })) as RawAuth);
95
+ }
96
+
97
+ /** Continue an EMAIL_VERIFICATION_REQUIRED flow with the code from the email; the transport holds the state. */
98
+ export async function verifyMemberEmail(verificationCode: string): Promise<LoginResult> {
99
+ if (!membersAuth) return postAuthRoute("/api/auth/verify-email", { verificationCode });
100
+ return finish((await membersAuth.processVerification({ verificationCode })) as RawAuth);
101
+ }
102
+
103
+ /** Log out through Wix (clears the session) and land on `returnTo` — navigates away. */
104
+ export async function logoutMember(returnTo = "/"): Promise<void> {
105
+ const target = safeReturnTo(returnTo);
106
+ if (!membersAuth) {
107
+ // The built-in logout is a POST that answers with a redirect; a real form submit navigates.
108
+ const form = document.createElement("form");
109
+ form.method = "post";
110
+ form.action = `/api/auth/logout?returnToUrl=${encodeURIComponent(target)}`;
111
+ document.body.appendChild(form);
112
+ form.submit();
113
+ return;
114
+ }
115
+ const { logoutUrl } = await membersAuth.logout(new URL(target, window.location.origin).href);
116
+ window.location.assign(logoutUrl);
117
+ }
@@ -0,0 +1,27 @@
1
+ // The members auth seam — no client of its own. It reuses the shared seam in ../sdk, so the member
2
+ // identity and the app's data identity are the same thing:
3
+ //
4
+ // ambient (WIX_CLIENT_ID null — a Wix-managed Astro project): `membersAuth` is null. The raw
5
+ // `members` module is authenticated by `@wix/astro` in islands and on the server, and the
6
+ // credential flow runs through the integration's built-in routes (/api/auth/login, /signup,
7
+ // /verify-email, /logout, /callback — see ./auth.ts), which write the member session cookie
8
+ // server-side (HttpOnly). Nothing here touches cookies or tokens.
9
+ //
10
+ // manual (WIX_CLIENT_ID set — a Vite SPA, another framework): `membersAuth` is the shared
11
+ // client's OAuthStrategy. login/register/verify run on it in the browser and the one-shot
12
+ // session token is exchanged for member tokens that the SAME strategy persists — so the cart,
13
+ // the member's own records, everything the app reads, runs as the member from then on.
14
+ //
15
+ // Copy as-is; never instantiate another client, never one per component.
16
+ import type { IOAuthStrategy } from "@wix/sdk";
17
+ import { members } from "@wix/members";
18
+ import { wixAuth, wixModule } from "../sdk";
19
+
20
+ /** The manual-mode auth strategy (the shared client's); null under ambient auth, where the routes own the session. */
21
+ export const membersAuth: IOAuthStrategy | null = wixAuth();
22
+
23
+ /** True in a Wix-managed Astro project: the built-in auth routes carry the credential flow. */
24
+ export const AMBIENT_AUTH = membersAuth === null;
25
+
26
+ /** The members module under the app's auth, either mode. */
27
+ export const membersApi: typeof members = wixModule(members);