@wix/agent-skills 1.25.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 (812) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +18 -17
  4. package/skills/wix-app/references/BUSINESS_MANAGER_THEME.md +1 -2
  5. package/skills/wix-app/references/BUSINESS_MANAGER_TOKENS.md +1 -1
  6. package/skills/wix-app/references/DASHBOARD_PAGE.md +12 -12
  7. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +3 -2
  8. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +75 -66
  9. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +4 -5
  10. package/skills/wix-app/references/data-collection/LIFECYCLE.md +6 -4
  11. package/skills/wix-headless-kit/SKILL.md +31 -14
  12. package/skills/wix-headless-kit/guides/existing-site.md +12 -5
  13. package/skills/wix-headless-kit/install/attach.mjs +55 -10
  14. package/skills/wix-headless-kit/install/check.mjs +5 -5
  15. package/skills/wix-headless-kit/install/deploy.mjs +7 -3
  16. package/skills/wix-headless-kit/install/templates.mjs +21 -17
  17. package/skills/wix-headless-templates/SKILL.md +43 -0
  18. package/skills/wix-headless-templates/blank/project/README.md +15 -0
  19. package/skills/wix-headless-templates/blank/project/astro.config.mjs +20 -0
  20. package/skills/wix-headless-templates/blank/project/package.json +34 -0
  21. package/skills/wix-headless-templates/blank/project/public/favicon.svg +9 -0
  22. package/skills/wix-headless-templates/blank/project/src/assets/astro.svg +1 -0
  23. package/skills/wix-headless-templates/blank/project/src/assets/background.svg +1 -0
  24. package/skills/wix-headless-templates/blank/project/src/assets/wix.svg +18 -0
  25. package/skills/wix-headless-templates/blank/project/src/components/Hero.astro +77 -0
  26. package/skills/wix-headless-templates/blank/project/src/components/Welcome.astro +95 -0
  27. package/skills/wix-headless-templates/blank/project/src/layouts/Layout.astro +22 -0
  28. package/skills/wix-headless-templates/blank/project/src/pages/index.astro +8 -0
  29. package/skills/wix-headless-templates/blank/project/tsconfig.json +5 -0
  30. package/skills/wix-headless-templates/blog/INSTRUCTIONS.md +418 -0
  31. package/skills/wix-headless-templates/blog/app/components/blog/BlogFeedView.tsx +191 -0
  32. package/skills/wix-headless-templates/blog/app/components/blog/CommentsView.tsx +206 -0
  33. package/skills/wix-headless-templates/blog/app/components/blog/PostLikeButton.tsx +62 -0
  34. package/skills/wix-headless-templates/blog/app/components/blog/PostView.tsx +139 -0
  35. package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +42 -0
  36. package/skills/wix-headless-templates/blog/app/hooks/blog/useBlogFeed.ts +31 -0
  37. package/skills/wix-headless-templates/blog/app/hooks/blog/useComments.ts +26 -0
  38. package/skills/wix-headless-templates/blog/app/hooks/blog/usePost.ts +25 -0
  39. package/skills/wix-headless-templates/blog/app/wix/blog/authors-core.ts +51 -0
  40. package/skills/wix-headless-templates/blog/app/wix/blog/authors.ts +50 -0
  41. package/skills/wix-headless-templates/blog/app/wix/blog/blog-feed-store.ts +156 -0
  42. package/skills/wix-headless-templates/blog/app/wix/blog/comments-core.ts +189 -0
  43. package/skills/wix-headless-templates/blog/app/wix/blog/comments-store.ts +214 -0
  44. package/skills/wix-headless-templates/blog/app/wix/blog/comments.ts +84 -0
  45. package/skills/wix-headless-templates/blog/app/wix/blog/post-likes.ts +42 -0
  46. package/skills/wix-headless-templates/blog/app/wix/blog/post-store.ts +158 -0
  47. package/skills/wix-headless-templates/blog/app/wix/blog/posts-core.ts +347 -0
  48. package/skills/wix-headless-templates/blog/app/wix/blog/posts.ts +132 -0
  49. package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy-core.ts +80 -0
  50. package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy.ts +78 -0
  51. package/skills/wix-headless-templates/blog/app/wix/blog/types.ts +161 -0
  52. package/skills/wix-headless-templates/blog/app-astro/layouts/SiteLayout.astro +44 -0
  53. package/skills/wix-headless-templates/blog/app-astro/pages/blog/[...slug].astro +148 -0
  54. package/skills/wix-headless-templates/blog/app-astro/pages/blog/category/[slug].astro +97 -0
  55. package/skills/wix-headless-templates/blog/app-astro/pages/blog/tag/[slug].astro +51 -0
  56. package/skills/wix-headless-templates/blog/app-astro/pages/blog.astro +34 -0
  57. package/skills/wix-headless-templates/blog/project/README.md +15 -0
  58. package/skills/wix-headless-templates/blog/project/astro.config.mjs +22 -0
  59. package/skills/wix-headless-templates/blog/project/package-lock.json +14699 -0
  60. package/skills/wix-headless-templates/blog/project/package.json +39 -0
  61. package/skills/wix-headless-templates/blog/project/public/favicon.svg +9 -0
  62. package/skills/wix-headless-templates/blog/project/src/assets/astro.svg +1 -0
  63. package/skills/wix-headless-templates/blog/project/src/assets/background.svg +1 -0
  64. package/skills/wix-headless-templates/blog/project/src/assets/wix.svg +18 -0
  65. package/skills/wix-headless-templates/blog/project/src/components/Hero.astro +77 -0
  66. package/skills/wix-headless-templates/blog/project/src/components/Welcome.astro +95 -0
  67. package/skills/wix-headless-templates/blog/project/src/components/blog/BlogFeedView.tsx +191 -0
  68. package/skills/wix-headless-templates/blog/project/src/components/blog/CommentsView.tsx +206 -0
  69. package/skills/wix-headless-templates/blog/project/src/components/blog/PostLikeButton.tsx +62 -0
  70. package/skills/wix-headless-templates/blog/project/src/components/blog/PostView.tsx +139 -0
  71. package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +42 -0
  72. package/skills/wix-headless-templates/blog/project/src/hooks/blog/useBlogFeed.ts +31 -0
  73. package/skills/wix-headless-templates/blog/project/src/hooks/blog/useComments.ts +26 -0
  74. package/skills/wix-headless-templates/blog/project/src/hooks/blog/usePost.ts +25 -0
  75. package/skills/wix-headless-templates/blog/project/src/layouts/Layout.astro +22 -0
  76. package/skills/wix-headless-templates/blog/project/src/layouts/SiteLayout.astro +44 -0
  77. package/skills/wix-headless-templates/blog/project/src/pages/blog/[...slug].astro +148 -0
  78. package/skills/wix-headless-templates/blog/project/src/pages/blog/category/[slug].astro +97 -0
  79. package/skills/wix-headless-templates/blog/project/src/pages/blog/tag/[slug].astro +51 -0
  80. package/skills/wix-headless-templates/blog/project/src/pages/blog.astro +34 -0
  81. package/skills/wix-headless-templates/blog/project/src/pages/index.astro +8 -0
  82. package/skills/wix-headless-templates/blog/project/src/styles/global.css +57 -0
  83. package/skills/wix-headless-templates/blog/project/src/wix/blog/authors-core.ts +51 -0
  84. package/skills/wix-headless-templates/blog/project/src/wix/blog/authors.ts +50 -0
  85. package/skills/wix-headless-templates/blog/project/src/wix/blog/blog-feed-store.ts +156 -0
  86. package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-core.ts +189 -0
  87. package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-store.ts +214 -0
  88. package/skills/wix-headless-templates/blog/project/src/wix/blog/comments.ts +84 -0
  89. package/skills/wix-headless-templates/blog/project/src/wix/blog/post-likes.ts +42 -0
  90. package/skills/wix-headless-templates/blog/project/src/wix/blog/post-store.ts +158 -0
  91. package/skills/wix-headless-templates/blog/project/src/wix/blog/posts-core.ts +347 -0
  92. package/skills/wix-headless-templates/blog/project/src/wix/blog/posts.ts +132 -0
  93. package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy-core.ts +80 -0
  94. package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy.ts +78 -0
  95. package/skills/wix-headless-templates/blog/project/src/wix/blog/types.ts +161 -0
  96. package/skills/wix-headless-templates/blog/project/src/wix/config.ts +16 -0
  97. package/skills/wix-headless-templates/blog/project/src/wix/media.ts +106 -0
  98. package/skills/wix-headless-templates/blog/project/src/wix/money.ts +24 -0
  99. package/skills/wix-headless-templates/blog/project/src/wix/sdk.ts +89 -0
  100. package/skills/wix-headless-templates/blog/project/tsconfig.json +5 -0
  101. package/skills/wix-headless-templates/blog/rest/authors.ts +39 -0
  102. package/skills/wix-headless-templates/blog/rest/comments.ts +64 -0
  103. package/skills/wix-headless-templates/blog/rest/post-likes.ts +37 -0
  104. package/skills/wix-headless-templates/blog/rest/posts.ts +123 -0
  105. package/skills/wix-headless-templates/blog/rest/taxonomy.ts +79 -0
  106. package/skills/wix-headless-templates/blog/seed/SEED.md +81 -0
  107. package/skills/wix-headless-templates/blog/seed/read-site.mjs +33 -0
  108. package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +337 -0
  109. package/skills/wix-headless-templates/bookings/INSTRUCTIONS.md +356 -0
  110. package/skills/wix-headless-templates/bookings/app/components/bookings/ServiceBookingView.tsx +369 -0
  111. package/skills/wix-headless-templates/bookings/app/components/bookings/ServicesView.tsx +193 -0
  112. package/skills/wix-headless-templates/bookings/app/hooks/bookings/useBookingFlow.ts +56 -0
  113. package/skills/wix-headless-templates/bookings/app/hooks/bookings/useServices.ts +23 -0
  114. package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-core.ts +614 -0
  115. package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-flow-store.ts +410 -0
  116. package/skills/wix-headless-templates/bookings/app/wix/bookings/booking.ts +227 -0
  117. package/skills/wix-headless-templates/bookings/app/wix/bookings/services-core.ts +366 -0
  118. package/skills/wix-headless-templates/bookings/app/wix/bookings/services-store.ts +213 -0
  119. package/skills/wix-headless-templates/bookings/app/wix/bookings/services.ts +100 -0
  120. package/skills/wix-headless-templates/bookings/app/wix/bookings/types.ts +236 -0
  121. package/skills/wix-headless-templates/bookings/app-astro/layouts/SiteLayout.astro +40 -0
  122. package/skills/wix-headless-templates/bookings/app-astro/pages/services/[slug].astro +81 -0
  123. package/skills/wix-headless-templates/bookings/app-astro/pages/services.astro +40 -0
  124. package/skills/wix-headless-templates/bookings/project/README.md +15 -0
  125. package/skills/wix-headless-templates/bookings/project/astro.config.mjs +22 -0
  126. package/skills/wix-headless-templates/bookings/project/package-lock.json +10546 -0
  127. package/skills/wix-headless-templates/bookings/project/package.json +41 -0
  128. package/skills/wix-headless-templates/bookings/project/public/favicon.svg +9 -0
  129. package/skills/wix-headless-templates/bookings/project/src/assets/astro.svg +1 -0
  130. package/skills/wix-headless-templates/bookings/project/src/assets/background.svg +1 -0
  131. package/skills/wix-headless-templates/bookings/project/src/assets/wix.svg +18 -0
  132. package/skills/wix-headless-templates/bookings/project/src/components/Hero.astro +77 -0
  133. package/skills/wix-headless-templates/bookings/project/src/components/Welcome.astro +95 -0
  134. package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServiceBookingView.tsx +369 -0
  135. package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServicesView.tsx +193 -0
  136. package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useBookingFlow.ts +56 -0
  137. package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useServices.ts +23 -0
  138. package/skills/wix-headless-templates/bookings/project/src/layouts/Layout.astro +22 -0
  139. package/skills/wix-headless-templates/bookings/project/src/layouts/SiteLayout.astro +40 -0
  140. package/skills/wix-headless-templates/bookings/project/src/pages/index.astro +8 -0
  141. package/skills/wix-headless-templates/bookings/project/src/pages/services/[slug].astro +81 -0
  142. package/skills/wix-headless-templates/bookings/project/src/pages/services.astro +40 -0
  143. package/skills/wix-headless-templates/bookings/project/src/styles/global.css +57 -0
  144. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-core.ts +614 -0
  145. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-flow-store.ts +410 -0
  146. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking.ts +227 -0
  147. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-core.ts +366 -0
  148. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-store.ts +213 -0
  149. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services.ts +100 -0
  150. package/skills/wix-headless-templates/bookings/project/src/wix/bookings/types.ts +236 -0
  151. package/skills/wix-headless-templates/bookings/project/src/wix/config.ts +16 -0
  152. package/skills/wix-headless-templates/bookings/project/src/wix/media.ts +106 -0
  153. package/skills/wix-headless-templates/bookings/project/src/wix/money.ts +24 -0
  154. package/skills/wix-headless-templates/bookings/project/src/wix/sdk.ts +89 -0
  155. package/skills/wix-headless-templates/bookings/project/tsconfig.json +5 -0
  156. package/skills/wix-headless-templates/bookings/rest/booking.ts +227 -0
  157. package/skills/wix-headless-templates/bookings/rest/services.ts +94 -0
  158. package/skills/wix-headless-templates/bookings/seed/SEED.md +109 -0
  159. package/skills/wix-headless-templates/bookings/seed/read-site.mjs +28 -0
  160. package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +407 -0
  161. package/skills/wix-headless-templates/cms/INSTRUCTIONS.md +399 -0
  162. package/skills/wix-headless-templates/cms/app/hooks/cms/useCollection.ts +82 -0
  163. package/skills/wix-headless-templates/cms/app/hooks/cms/useItem.ts +37 -0
  164. package/skills/wix-headless-templates/cms/app/wix/cms/collection-store.ts +220 -0
  165. package/skills/wix-headless-templates/cms/app/wix/cms/collections-core.ts +41 -0
  166. package/skills/wix-headless-templates/cms/app/wix/cms/collections.ts +28 -0
  167. package/skills/wix-headless-templates/cms/app/wix/cms/item-store.ts +93 -0
  168. package/skills/wix-headless-templates/cms/app/wix/cms/items-core.ts +259 -0
  169. package/skills/wix-headless-templates/cms/app/wix/cms/items.ts +182 -0
  170. package/skills/wix-headless-templates/cms/app/wix/cms/types.ts +138 -0
  171. package/skills/wix-headless-templates/cms/app-astro/layouts/SiteLayout.astro +41 -0
  172. package/skills/wix-headless-templates/cms/project/README.md +15 -0
  173. package/skills/wix-headless-templates/cms/project/astro.config.mjs +22 -0
  174. package/skills/wix-headless-templates/cms/project/package-lock.json +9798 -0
  175. package/skills/wix-headless-templates/cms/project/package.json +37 -0
  176. package/skills/wix-headless-templates/cms/project/public/favicon.svg +9 -0
  177. package/skills/wix-headless-templates/cms/project/src/assets/astro.svg +1 -0
  178. package/skills/wix-headless-templates/cms/project/src/assets/background.svg +1 -0
  179. package/skills/wix-headless-templates/cms/project/src/assets/wix.svg +18 -0
  180. package/skills/wix-headless-templates/cms/project/src/components/Hero.astro +77 -0
  181. package/skills/wix-headless-templates/cms/project/src/components/Welcome.astro +95 -0
  182. package/skills/wix-headless-templates/cms/project/src/hooks/cms/useCollection.ts +82 -0
  183. package/skills/wix-headless-templates/cms/project/src/hooks/cms/useItem.ts +37 -0
  184. package/skills/wix-headless-templates/cms/project/src/layouts/Layout.astro +22 -0
  185. package/skills/wix-headless-templates/cms/project/src/layouts/SiteLayout.astro +41 -0
  186. package/skills/wix-headless-templates/cms/project/src/pages/index.astro +8 -0
  187. package/skills/wix-headless-templates/cms/project/src/styles/global.css +57 -0
  188. package/skills/wix-headless-templates/cms/project/src/wix/cms/collection-store.ts +220 -0
  189. package/skills/wix-headless-templates/cms/project/src/wix/cms/collections-core.ts +41 -0
  190. package/skills/wix-headless-templates/cms/project/src/wix/cms/collections.ts +28 -0
  191. package/skills/wix-headless-templates/cms/project/src/wix/cms/item-store.ts +93 -0
  192. package/skills/wix-headless-templates/cms/project/src/wix/cms/items-core.ts +259 -0
  193. package/skills/wix-headless-templates/cms/project/src/wix/cms/items.ts +182 -0
  194. package/skills/wix-headless-templates/cms/project/src/wix/cms/types.ts +138 -0
  195. package/skills/wix-headless-templates/cms/project/src/wix/config.ts +16 -0
  196. package/skills/wix-headless-templates/cms/project/src/wix/media.ts +106 -0
  197. package/skills/wix-headless-templates/cms/project/src/wix/money.ts +24 -0
  198. package/skills/wix-headless-templates/cms/project/src/wix/sdk.ts +89 -0
  199. package/skills/wix-headless-templates/cms/project/tsconfig.json +5 -0
  200. package/skills/wix-headless-templates/cms/rest/collections.ts +25 -0
  201. package/skills/wix-headless-templates/cms/rest/items.ts +189 -0
  202. package/skills/wix-headless-templates/cms/seed/SEED.md +116 -0
  203. package/skills/wix-headless-templates/cms/seed/read-site.mjs +20 -0
  204. package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +321 -0
  205. package/skills/wix-headless-templates/compose.mjs +83 -0
  206. package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +349 -0
  207. package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +155 -0
  208. package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +46 -0
  209. package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +49 -0
  210. package/skills/wix-headless-templates/donations/app/hooks/donations/useCampaigns.ts +21 -0
  211. package/skills/wix-headless-templates/donations/app/hooks/donations/useDonation.ts +27 -0
  212. package/skills/wix-headless-templates/donations/app/hooks/donations/useDonationReceipt.ts +19 -0
  213. package/skills/wix-headless-templates/donations/app/wix/donations/campaigns-store.ts +59 -0
  214. package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +83 -0
  215. package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +95 -0
  216. package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +163 -0
  217. package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +466 -0
  218. package/skills/wix-headless-templates/donations/app/wix/donations/receipt-store.ts +55 -0
  219. package/skills/wix-headless-templates/donations/app/wix/donations/types.ts +121 -0
  220. package/skills/wix-headless-templates/donations/app-astro/components/donations/CampaignPage.astro +43 -0
  221. package/skills/wix-headless-templates/donations/app-astro/layouts/SiteLayout.astro +45 -0
  222. package/skills/wix-headless-templates/donations/app-astro/pages/donate/[id].astro +28 -0
  223. package/skills/wix-headless-templates/donations/app-astro/pages/donate/index.astro +51 -0
  224. package/skills/wix-headless-templates/donations/app-astro/pages/donate/thank-you.astro +13 -0
  225. package/skills/wix-headless-templates/donations/project/README.md +15 -0
  226. package/skills/wix-headless-templates/donations/project/astro.config.mjs +22 -0
  227. package/skills/wix-headless-templates/donations/project/package-lock.json +10266 -0
  228. package/skills/wix-headless-templates/donations/project/package.json +39 -0
  229. package/skills/wix-headless-templates/donations/project/public/favicon.svg +9 -0
  230. package/skills/wix-headless-templates/donations/project/src/assets/astro.svg +1 -0
  231. package/skills/wix-headless-templates/donations/project/src/assets/background.svg +1 -0
  232. package/skills/wix-headless-templates/donations/project/src/assets/wix.svg +18 -0
  233. package/skills/wix-headless-templates/donations/project/src/components/Hero.astro +77 -0
  234. package/skills/wix-headless-templates/donations/project/src/components/Welcome.astro +95 -0
  235. package/skills/wix-headless-templates/donations/project/src/components/donations/CampaignPage.astro +43 -0
  236. package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +155 -0
  237. package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +46 -0
  238. package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +49 -0
  239. package/skills/wix-headless-templates/donations/project/src/hooks/donations/useCampaigns.ts +21 -0
  240. package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonation.ts +27 -0
  241. package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonationReceipt.ts +19 -0
  242. package/skills/wix-headless-templates/donations/project/src/layouts/Layout.astro +22 -0
  243. package/skills/wix-headless-templates/donations/project/src/layouts/SiteLayout.astro +45 -0
  244. package/skills/wix-headless-templates/donations/project/src/pages/donate/[id].astro +28 -0
  245. package/skills/wix-headless-templates/donations/project/src/pages/donate/index.astro +51 -0
  246. package/skills/wix-headless-templates/donations/project/src/pages/donate/thank-you.astro +13 -0
  247. package/skills/wix-headless-templates/donations/project/src/pages/index.astro +8 -0
  248. package/skills/wix-headless-templates/donations/project/src/styles/global.css +57 -0
  249. package/skills/wix-headless-templates/donations/project/src/wix/config.ts +16 -0
  250. package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns-store.ts +59 -0
  251. package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +83 -0
  252. package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +95 -0
  253. package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +163 -0
  254. package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +466 -0
  255. package/skills/wix-headless-templates/donations/project/src/wix/donations/receipt-store.ts +55 -0
  256. package/skills/wix-headless-templates/donations/project/src/wix/donations/types.ts +121 -0
  257. package/skills/wix-headless-templates/donations/project/src/wix/media.ts +106 -0
  258. package/skills/wix-headless-templates/donations/project/src/wix/money.ts +24 -0
  259. package/skills/wix-headless-templates/donations/project/src/wix/sdk.ts +89 -0
  260. package/skills/wix-headless-templates/donations/project/tsconfig.json +5 -0
  261. package/skills/wix-headless-templates/donations/rest/campaigns.ts +76 -0
  262. package/skills/wix-headless-templates/donations/rest/donate.ts +90 -0
  263. package/skills/wix-headless-templates/donations/seed/SEED.md +90 -0
  264. package/skills/wix-headless-templates/donations/seed/read-site.mjs +33 -0
  265. package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +250 -0
  266. package/skills/wix-headless-templates/events/INSTRUCTIONS.md +387 -0
  267. package/skills/wix-headless-templates/events/app/components/events/EventConfirmationView.tsx +139 -0
  268. package/skills/wix-headless-templates/events/app/components/events/EventRegistrationView.tsx +375 -0
  269. package/skills/wix-headless-templates/events/app/components/events/EventsView.tsx +134 -0
  270. package/skills/wix-headless-templates/events/app/hooks/events/useEventConfirmation.ts +21 -0
  271. package/skills/wix-headless-templates/events/app/hooks/events/useEventRegistration.ts +40 -0
  272. package/skills/wix-headless-templates/events/app/hooks/events/useEvents.ts +24 -0
  273. package/skills/wix-headless-templates/events/app/wix/events/events-core.ts +379 -0
  274. package/skills/wix-headless-templates/events/app/wix/events/events-store.ts +175 -0
  275. package/skills/wix-headless-templates/events/app/wix/events/events.ts +124 -0
  276. package/skills/wix-headless-templates/events/app/wix/events/order-store.ts +143 -0
  277. package/skills/wix-headless-templates/events/app/wix/events/orders-core.ts +86 -0
  278. package/skills/wix-headless-templates/events/app/wix/events/orders.ts +30 -0
  279. package/skills/wix-headless-templates/events/app/wix/events/registration-core.ts +415 -0
  280. package/skills/wix-headless-templates/events/app/wix/events/registration-store.ts +237 -0
  281. package/skills/wix-headless-templates/events/app/wix/events/registration.ts +109 -0
  282. package/skills/wix-headless-templates/events/app/wix/events/types.ts +249 -0
  283. package/skills/wix-headless-templates/events/app-astro/layouts/SiteLayout.astro +40 -0
  284. package/skills/wix-headless-templates/events/app-astro/pages/event-confirmation.astro +12 -0
  285. package/skills/wix-headless-templates/events/app-astro/pages/events/[slug].astro +104 -0
  286. package/skills/wix-headless-templates/events/app-astro/pages/events.astro +23 -0
  287. package/skills/wix-headless-templates/events/project/README.md +15 -0
  288. package/skills/wix-headless-templates/events/project/astro.config.mjs +22 -0
  289. package/skills/wix-headless-templates/events/project/package-lock.json +10497 -0
  290. package/skills/wix-headless-templates/events/project/package.json +39 -0
  291. package/skills/wix-headless-templates/events/project/public/favicon.svg +9 -0
  292. package/skills/wix-headless-templates/events/project/src/assets/astro.svg +1 -0
  293. package/skills/wix-headless-templates/events/project/src/assets/background.svg +1 -0
  294. package/skills/wix-headless-templates/events/project/src/assets/wix.svg +18 -0
  295. package/skills/wix-headless-templates/events/project/src/components/Hero.astro +77 -0
  296. package/skills/wix-headless-templates/events/project/src/components/Welcome.astro +95 -0
  297. package/skills/wix-headless-templates/events/project/src/components/events/EventConfirmationView.tsx +139 -0
  298. package/skills/wix-headless-templates/events/project/src/components/events/EventRegistrationView.tsx +375 -0
  299. package/skills/wix-headless-templates/events/project/src/components/events/EventsView.tsx +134 -0
  300. package/skills/wix-headless-templates/events/project/src/hooks/events/useEventConfirmation.ts +21 -0
  301. package/skills/wix-headless-templates/events/project/src/hooks/events/useEventRegistration.ts +40 -0
  302. package/skills/wix-headless-templates/events/project/src/hooks/events/useEvents.ts +24 -0
  303. package/skills/wix-headless-templates/events/project/src/layouts/Layout.astro +22 -0
  304. package/skills/wix-headless-templates/events/project/src/layouts/SiteLayout.astro +40 -0
  305. package/skills/wix-headless-templates/events/project/src/pages/event-confirmation.astro +12 -0
  306. package/skills/wix-headless-templates/events/project/src/pages/events/[slug].astro +104 -0
  307. package/skills/wix-headless-templates/events/project/src/pages/events.astro +23 -0
  308. package/skills/wix-headless-templates/events/project/src/pages/index.astro +8 -0
  309. package/skills/wix-headless-templates/events/project/src/styles/global.css +57 -0
  310. package/skills/wix-headless-templates/events/project/src/wix/config.ts +16 -0
  311. package/skills/wix-headless-templates/events/project/src/wix/events/events-core.ts +379 -0
  312. package/skills/wix-headless-templates/events/project/src/wix/events/events-store.ts +175 -0
  313. package/skills/wix-headless-templates/events/project/src/wix/events/events.ts +124 -0
  314. package/skills/wix-headless-templates/events/project/src/wix/events/order-store.ts +143 -0
  315. package/skills/wix-headless-templates/events/project/src/wix/events/orders-core.ts +86 -0
  316. package/skills/wix-headless-templates/events/project/src/wix/events/orders.ts +30 -0
  317. package/skills/wix-headless-templates/events/project/src/wix/events/registration-core.ts +415 -0
  318. package/skills/wix-headless-templates/events/project/src/wix/events/registration-store.ts +237 -0
  319. package/skills/wix-headless-templates/events/project/src/wix/events/registration.ts +109 -0
  320. package/skills/wix-headless-templates/events/project/src/wix/events/types.ts +249 -0
  321. package/skills/wix-headless-templates/events/project/src/wix/media.ts +106 -0
  322. package/skills/wix-headless-templates/events/project/src/wix/money.ts +24 -0
  323. package/skills/wix-headless-templates/events/project/src/wix/sdk.ts +89 -0
  324. package/skills/wix-headless-templates/events/project/tsconfig.json +5 -0
  325. package/skills/wix-headless-templates/events/rest/events.ts +112 -0
  326. package/skills/wix-headless-templates/events/rest/orders.ts +28 -0
  327. package/skills/wix-headless-templates/events/rest/registration.ts +96 -0
  328. package/skills/wix-headless-templates/events/seed/SEED.md +115 -0
  329. package/skills/wix-headless-templates/events/seed/read-site.mjs +26 -0
  330. package/skills/wix-headless-templates/events/seed/seed-events.mjs +322 -0
  331. package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +317 -0
  332. package/skills/wix-headless-templates/faq/app/components/faq/FaqAccordion.tsx +159 -0
  333. package/skills/wix-headless-templates/faq/app/components/faq/FaqCategoryNav.tsx +46 -0
  334. package/skills/wix-headless-templates/faq/app/components/faq/FaqSearch.tsx +56 -0
  335. package/skills/wix-headless-templates/faq/app/hooks/faq/useFaq.ts +53 -0
  336. package/skills/wix-headless-templates/faq/app/wix/faq/faq-core.ts +428 -0
  337. package/skills/wix-headless-templates/faq/app/wix/faq/faq-store.ts +212 -0
  338. package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +72 -0
  339. package/skills/wix-headless-templates/faq/app/wix/faq/types.ts +63 -0
  340. package/skills/wix-headless-templates/faq/app-astro/layouts/SiteLayout.astro +40 -0
  341. package/skills/wix-headless-templates/faq/app-astro/pages/faq.astro +39 -0
  342. package/skills/wix-headless-templates/faq/project/README.md +15 -0
  343. package/skills/wix-headless-templates/faq/project/astro.config.mjs +22 -0
  344. package/skills/wix-headless-templates/faq/project/package-lock.json +8837 -0
  345. package/skills/wix-headless-templates/faq/project/package.json +37 -0
  346. package/skills/wix-headless-templates/faq/project/public/favicon.svg +9 -0
  347. package/skills/wix-headless-templates/faq/project/src/assets/astro.svg +1 -0
  348. package/skills/wix-headless-templates/faq/project/src/assets/background.svg +1 -0
  349. package/skills/wix-headless-templates/faq/project/src/assets/wix.svg +18 -0
  350. package/skills/wix-headless-templates/faq/project/src/components/Hero.astro +77 -0
  351. package/skills/wix-headless-templates/faq/project/src/components/Welcome.astro +95 -0
  352. package/skills/wix-headless-templates/faq/project/src/components/faq/FaqAccordion.tsx +159 -0
  353. package/skills/wix-headless-templates/faq/project/src/components/faq/FaqCategoryNav.tsx +46 -0
  354. package/skills/wix-headless-templates/faq/project/src/components/faq/FaqSearch.tsx +56 -0
  355. package/skills/wix-headless-templates/faq/project/src/hooks/faq/useFaq.ts +53 -0
  356. package/skills/wix-headless-templates/faq/project/src/layouts/Layout.astro +22 -0
  357. package/skills/wix-headless-templates/faq/project/src/layouts/SiteLayout.astro +40 -0
  358. package/skills/wix-headless-templates/faq/project/src/pages/faq.astro +39 -0
  359. package/skills/wix-headless-templates/faq/project/src/pages/index.astro +8 -0
  360. package/skills/wix-headless-templates/faq/project/src/styles/global.css +57 -0
  361. package/skills/wix-headless-templates/faq/project/src/wix/config.ts +16 -0
  362. package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-core.ts +428 -0
  363. package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-store.ts +212 -0
  364. package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +72 -0
  365. package/skills/wix-headless-templates/faq/project/src/wix/faq/types.ts +63 -0
  366. package/skills/wix-headless-templates/faq/project/src/wix/media.ts +106 -0
  367. package/skills/wix-headless-templates/faq/project/src/wix/money.ts +24 -0
  368. package/skills/wix-headless-templates/faq/project/src/wix/sdk.ts +89 -0
  369. package/skills/wix-headless-templates/faq/project/tsconfig.json +5 -0
  370. package/skills/wix-headless-templates/faq/rest/faq.ts +71 -0
  371. package/skills/wix-headless-templates/faq/seed/SEED.md +104 -0
  372. package/skills/wix-headless-templates/faq/seed/read-site.mjs +23 -0
  373. package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +302 -0
  374. package/skills/wix-headless-templates/forms/INSTRUCTIONS.md +417 -0
  375. package/skills/wix-headless-templates/forms/app/hooks/forms/useWixForm.ts +108 -0
  376. package/skills/wix-headless-templates/forms/app/wix/forms/address-templates.generated.ts +13 -0
  377. package/skills/wix-headless-templates/forms/app/wix/forms/form-store.ts +533 -0
  378. package/skills/wix-headless-templates/forms/app/wix/forms/forms-core.ts +671 -0
  379. package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +57 -0
  380. package/skills/wix-headless-templates/forms/app/wix/forms/submissions-core.ts +423 -0
  381. package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +95 -0
  382. package/skills/wix-headless-templates/forms/app/wix/forms/types.ts +284 -0
  383. package/skills/wix-headless-templates/forms/project/README.md +15 -0
  384. package/skills/wix-headless-templates/forms/project/astro.config.mjs +22 -0
  385. package/skills/wix-headless-templates/forms/project/package-lock.json +9102 -0
  386. package/skills/wix-headless-templates/forms/project/package.json +37 -0
  387. package/skills/wix-headless-templates/forms/project/public/favicon.svg +9 -0
  388. package/skills/wix-headless-templates/forms/project/src/assets/astro.svg +1 -0
  389. package/skills/wix-headless-templates/forms/project/src/assets/background.svg +1 -0
  390. package/skills/wix-headless-templates/forms/project/src/assets/wix.svg +18 -0
  391. package/skills/wix-headless-templates/forms/project/src/components/Hero.astro +77 -0
  392. package/skills/wix-headless-templates/forms/project/src/components/Welcome.astro +95 -0
  393. package/skills/wix-headless-templates/forms/project/src/hooks/forms/useWixForm.ts +108 -0
  394. package/skills/wix-headless-templates/forms/project/src/layouts/Layout.astro +22 -0
  395. package/skills/wix-headless-templates/forms/project/src/pages/index.astro +8 -0
  396. package/skills/wix-headless-templates/forms/project/src/styles/global.css +57 -0
  397. package/skills/wix-headless-templates/forms/project/src/wix/config.ts +16 -0
  398. package/skills/wix-headless-templates/forms/project/src/wix/forms/address-templates.generated.ts +13 -0
  399. package/skills/wix-headless-templates/forms/project/src/wix/forms/form-store.ts +533 -0
  400. package/skills/wix-headless-templates/forms/project/src/wix/forms/forms-core.ts +671 -0
  401. package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +57 -0
  402. package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions-core.ts +423 -0
  403. package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +95 -0
  404. package/skills/wix-headless-templates/forms/project/src/wix/forms/types.ts +284 -0
  405. package/skills/wix-headless-templates/forms/project/src/wix/media.ts +106 -0
  406. package/skills/wix-headless-templates/forms/project/src/wix/money.ts +24 -0
  407. package/skills/wix-headless-templates/forms/project/src/wix/sdk.ts +89 -0
  408. package/skills/wix-headless-templates/forms/project/tsconfig.json +5 -0
  409. package/skills/wix-headless-templates/forms/rest/forms.ts +37 -0
  410. package/skills/wix-headless-templates/forms/rest/submissions.ts +83 -0
  411. package/skills/wix-headless-templates/forms/seed/SEED.md +225 -0
  412. package/skills/wix-headless-templates/forms/seed/read-site.mjs +53 -0
  413. package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +574 -0
  414. package/skills/wix-headless-templates/forms/tooling/address-templates.mjs +96 -0
  415. package/skills/wix-headless-templates/members/INSTRUCTIONS.md +345 -0
  416. package/skills/wix-headless-templates/members/app/components/members/AccountPage.tsx +16 -0
  417. package/skills/wix-headless-templates/members/app/components/members/AccountView.tsx +60 -0
  418. package/skills/wix-headless-templates/members/app/components/members/LoginForm.tsx +165 -0
  419. package/skills/wix-headless-templates/members/app/components/members/MemberMenu.tsx +78 -0
  420. package/skills/wix-headless-templates/members/app/components/members/RequireAuth.tsx +47 -0
  421. package/skills/wix-headless-templates/members/app/hooks/members/useMember.ts +67 -0
  422. package/skills/wix-headless-templates/members/app/wix/members/auth-core.ts +160 -0
  423. package/skills/wix-headless-templates/members/app/wix/members/auth.ts +117 -0
  424. package/skills/wix-headless-templates/members/app/wix/members/client.ts +27 -0
  425. package/skills/wix-headless-templates/members/app/wix/members/member-store.ts +133 -0
  426. package/skills/wix-headless-templates/members/app/wix/members/members-core.ts +43 -0
  427. package/skills/wix-headless-templates/members/app/wix/members/members.ts +29 -0
  428. package/skills/wix-headless-templates/members/app/wix/members/types.ts +21 -0
  429. package/skills/wix-headless-templates/members/app-astro/layouts/SiteLayout.astro +42 -0
  430. package/skills/wix-headless-templates/members/app-astro/pages/account.astro +9 -0
  431. package/skills/wix-headless-templates/members/app-astro/pages/login.astro +11 -0
  432. package/skills/wix-headless-templates/members/project/README.md +15 -0
  433. package/skills/wix-headless-templates/members/project/astro.config.mjs +22 -0
  434. package/skills/wix-headless-templates/members/project/package-lock.json +8892 -0
  435. package/skills/wix-headless-templates/members/project/package.json +37 -0
  436. package/skills/wix-headless-templates/members/project/public/favicon.svg +9 -0
  437. package/skills/wix-headless-templates/members/project/src/assets/astro.svg +1 -0
  438. package/skills/wix-headless-templates/members/project/src/assets/background.svg +1 -0
  439. package/skills/wix-headless-templates/members/project/src/assets/wix.svg +18 -0
  440. package/skills/wix-headless-templates/members/project/src/components/Hero.astro +77 -0
  441. package/skills/wix-headless-templates/members/project/src/components/Welcome.astro +95 -0
  442. package/skills/wix-headless-templates/members/project/src/components/members/AccountPage.tsx +16 -0
  443. package/skills/wix-headless-templates/members/project/src/components/members/AccountView.tsx +60 -0
  444. package/skills/wix-headless-templates/members/project/src/components/members/LoginForm.tsx +165 -0
  445. package/skills/wix-headless-templates/members/project/src/components/members/MemberMenu.tsx +78 -0
  446. package/skills/wix-headless-templates/members/project/src/components/members/RequireAuth.tsx +47 -0
  447. package/skills/wix-headless-templates/members/project/src/hooks/members/useMember.ts +67 -0
  448. package/skills/wix-headless-templates/members/project/src/layouts/Layout.astro +22 -0
  449. package/skills/wix-headless-templates/members/project/src/layouts/SiteLayout.astro +42 -0
  450. package/skills/wix-headless-templates/members/project/src/pages/account.astro +9 -0
  451. package/skills/wix-headless-templates/members/project/src/pages/index.astro +8 -0
  452. package/skills/wix-headless-templates/members/project/src/pages/login.astro +11 -0
  453. package/skills/wix-headless-templates/members/project/src/styles/global.css +57 -0
  454. package/skills/wix-headless-templates/members/project/src/wix/config.ts +16 -0
  455. package/skills/wix-headless-templates/members/project/src/wix/media.ts +106 -0
  456. package/skills/wix-headless-templates/members/project/src/wix/members/auth-core.ts +160 -0
  457. package/skills/wix-headless-templates/members/project/src/wix/members/auth.ts +117 -0
  458. package/skills/wix-headless-templates/members/project/src/wix/members/client.ts +27 -0
  459. package/skills/wix-headless-templates/members/project/src/wix/members/member-store.ts +133 -0
  460. package/skills/wix-headless-templates/members/project/src/wix/members/members-core.ts +43 -0
  461. package/skills/wix-headless-templates/members/project/src/wix/members/members.ts +29 -0
  462. package/skills/wix-headless-templates/members/project/src/wix/members/types.ts +21 -0
  463. package/skills/wix-headless-templates/members/project/src/wix/money.ts +24 -0
  464. package/skills/wix-headless-templates/members/project/src/wix/sdk.ts +89 -0
  465. package/skills/wix-headless-templates/members/project/tsconfig.json +5 -0
  466. package/skills/wix-headless-templates/members/rest/auth.ts +224 -0
  467. package/skills/wix-headless-templates/members/rest/members.ts +26 -0
  468. package/skills/wix-headless-templates/members/seed/SEED.md +39 -0
  469. package/skills/wix-headless-templates/members/seed/read-site.mjs +15 -0
  470. package/skills/wix-headless-templates/members/seed/seed-members.mjs +91 -0
  471. package/skills/wix-headless-templates/portfolio/INSTRUCTIONS.md +315 -0
  472. package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
  473. package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
  474. package/skills/wix-headless-templates/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
  475. package/skills/wix-headless-templates/portfolio/app/components/portfolio/ProjectDetailView.tsx +85 -0
  476. package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollectionProjects.ts +32 -0
  477. package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollections.ts +21 -0
  478. package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useProjectDetail.ts +31 -0
  479. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
  480. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collections-store.ts +58 -0
  481. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
  482. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio.ts +78 -0
  483. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
  484. package/skills/wix-headless-templates/portfolio/app/wix/portfolio/types.ts +55 -0
  485. package/skills/wix-headless-templates/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
  486. package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
  487. package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio.astro +21 -0
  488. package/skills/wix-headless-templates/portfolio/app-astro/pages/projects/[slug].astro +29 -0
  489. package/skills/wix-headless-templates/portfolio/project/README.md +15 -0
  490. package/skills/wix-headless-templates/portfolio/project/astro.config.mjs +22 -0
  491. package/skills/wix-headless-templates/portfolio/project/package-lock.json +8760 -0
  492. package/skills/wix-headless-templates/portfolio/project/package.json +37 -0
  493. package/skills/wix-headless-templates/portfolio/project/public/favicon.svg +9 -0
  494. package/skills/wix-headless-templates/portfolio/project/src/assets/astro.svg +1 -0
  495. package/skills/wix-headless-templates/portfolio/project/src/assets/background.svg +1 -0
  496. package/skills/wix-headless-templates/portfolio/project/src/assets/wix.svg +18 -0
  497. package/skills/wix-headless-templates/portfolio/project/src/components/Hero.astro +77 -0
  498. package/skills/wix-headless-templates/portfolio/project/src/components/Welcome.astro +95 -0
  499. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionProjectsView.tsx +110 -0
  500. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionsView.tsx +90 -0
  501. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/GalleryMedia.tsx +35 -0
  502. package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/ProjectDetailView.tsx +85 -0
  503. package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollectionProjects.ts +32 -0
  504. package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollections.ts +21 -0
  505. package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useProjectDetail.ts +31 -0
  506. package/skills/wix-headless-templates/portfolio/project/src/layouts/Layout.astro +22 -0
  507. package/skills/wix-headless-templates/portfolio/project/src/layouts/SiteLayout.astro +40 -0
  508. package/skills/wix-headless-templates/portfolio/project/src/pages/index.astro +8 -0
  509. package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio/[slug].astro +30 -0
  510. package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro +21 -0
  511. package/skills/wix-headless-templates/portfolio/project/src/pages/projects/[slug].astro +29 -0
  512. package/skills/wix-headless-templates/portfolio/project/src/styles/global.css +57 -0
  513. package/skills/wix-headless-templates/portfolio/project/src/wix/config.ts +16 -0
  514. package/skills/wix-headless-templates/portfolio/project/src/wix/media.ts +106 -0
  515. package/skills/wix-headless-templates/portfolio/project/src/wix/money.ts +24 -0
  516. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collection-projects-store.ts +82 -0
  517. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collections-store.ts +58 -0
  518. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio-core.ts +177 -0
  519. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio.ts +78 -0
  520. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts +81 -0
  521. package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/types.ts +55 -0
  522. package/skills/wix-headless-templates/portfolio/project/src/wix/sdk.ts +89 -0
  523. package/skills/wix-headless-templates/portfolio/project/tsconfig.json +5 -0
  524. package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +75 -0
  525. package/skills/wix-headless-templates/portfolio/seed/SEED.md +86 -0
  526. package/skills/wix-headless-templates/portfolio/seed/read-site.mjs +20 -0
  527. package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +253 -0
  528. package/skills/wix-headless-templates/pricing-plans/INSTRUCTIONS.md +376 -0
  529. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +54 -0
  530. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlansView.tsx +108 -0
  531. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/RequirePlan.tsx +87 -0
  532. package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
  533. package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanAccess.ts +31 -0
  534. package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +16 -0
  535. package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlans.ts +22 -0
  536. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-core.ts +29 -0
  537. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-store.ts +92 -0
  538. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +37 -0
  539. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
  540. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-core.ts +212 -0
  541. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
  542. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans.ts +54 -0
  543. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
  544. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase.ts +22 -0
  545. package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/types.ts +52 -0
  546. package/skills/wix-headless-templates/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
  547. package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans/[slug].astro +43 -0
  548. package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans.astro +21 -0
  549. package/skills/wix-headless-templates/pricing-plans/project/README.md +15 -0
  550. package/skills/wix-headless-templates/pricing-plans/project/astro.config.mjs +22 -0
  551. package/skills/wix-headless-templates/pricing-plans/project/package-lock.json +9799 -0
  552. package/skills/wix-headless-templates/pricing-plans/project/package.json +38 -0
  553. package/skills/wix-headless-templates/pricing-plans/project/public/favicon.svg +9 -0
  554. package/skills/wix-headless-templates/pricing-plans/project/src/assets/astro.svg +1 -0
  555. package/skills/wix-headless-templates/pricing-plans/project/src/assets/background.svg +1 -0
  556. package/skills/wix-headless-templates/pricing-plans/project/src/assets/wix.svg +18 -0
  557. package/skills/wix-headless-templates/pricing-plans/project/src/components/Hero.astro +77 -0
  558. package/skills/wix-headless-templates/pricing-plans/project/src/components/Welcome.astro +95 -0
  559. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlanDetailView.tsx +54 -0
  560. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlansView.tsx +108 -0
  561. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/RequirePlan.tsx +87 -0
  562. package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/SubscribeButton.tsx +41 -0
  563. package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanAccess.ts +31 -0
  564. package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanPurchase.ts +16 -0
  565. package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlans.ts +22 -0
  566. package/skills/wix-headless-templates/pricing-plans/project/src/layouts/Layout.astro +22 -0
  567. package/skills/wix-headless-templates/pricing-plans/project/src/layouts/SiteLayout.astro +41 -0
  568. package/skills/wix-headless-templates/pricing-plans/project/src/pages/index.astro +8 -0
  569. package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans/[slug].astro +43 -0
  570. package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans.astro +21 -0
  571. package/skills/wix-headless-templates/pricing-plans/project/src/styles/global.css +57 -0
  572. package/skills/wix-headless-templates/pricing-plans/project/src/wix/config.ts +16 -0
  573. package/skills/wix-headless-templates/pricing-plans/project/src/wix/media.ts +106 -0
  574. package/skills/wix-headless-templates/pricing-plans/project/src/wix/money.ts +24 -0
  575. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-core.ts +29 -0
  576. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-store.ts +92 -0
  577. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +37 -0
  578. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-purchase-store.ts +54 -0
  579. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-core.ts +212 -0
  580. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-store.ts +64 -0
  581. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans.ts +54 -0
  582. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase-core.ts +43 -0
  583. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase.ts +22 -0
  584. package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/types.ts +52 -0
  585. package/skills/wix-headless-templates/pricing-plans/project/src/wix/sdk.ts +89 -0
  586. package/skills/wix-headless-templates/pricing-plans/project/tsconfig.json +5 -0
  587. package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +31 -0
  588. package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +58 -0
  589. package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +20 -0
  590. package/skills/wix-headless-templates/pricing-plans/seed/SEED.md +93 -0
  591. package/skills/wix-headless-templates/pricing-plans/seed/read-site.mjs +22 -0
  592. package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +301 -0
  593. package/skills/wix-headless-templates/rentals/INSTRUCTIONS.md +309 -0
  594. package/skills/wix-headless-templates/rentals/app/components/rentals/RentalBookingView.tsx +195 -0
  595. package/skills/wix-headless-templates/rentals/app/components/rentals/RentalsView.tsx +89 -0
  596. package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentalFlow.ts +31 -0
  597. package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentals.ts +23 -0
  598. package/skills/wix-headless-templates/rentals/app/wix/rentals/rental-flow-store.ts +283 -0
  599. package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-core.ts +435 -0
  600. package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-store.ts +112 -0
  601. package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals.ts +173 -0
  602. package/skills/wix-headless-templates/rentals/app/wix/rentals/types.ts +113 -0
  603. package/skills/wix-headless-templates/rentals/app-astro/layouts/SiteLayout.astro +40 -0
  604. package/skills/wix-headless-templates/rentals/app-astro/pages/rentals/[slug].astro +81 -0
  605. package/skills/wix-headless-templates/rentals/app-astro/pages/rentals.astro +24 -0
  606. package/skills/wix-headless-templates/rentals/project/README.md +15 -0
  607. package/skills/wix-headless-templates/rentals/project/astro.config.mjs +22 -0
  608. package/skills/wix-headless-templates/rentals/project/package-lock.json +10545 -0
  609. package/skills/wix-headless-templates/rentals/project/package.json +40 -0
  610. package/skills/wix-headless-templates/rentals/project/public/favicon.svg +9 -0
  611. package/skills/wix-headless-templates/rentals/project/src/assets/astro.svg +1 -0
  612. package/skills/wix-headless-templates/rentals/project/src/assets/background.svg +1 -0
  613. package/skills/wix-headless-templates/rentals/project/src/assets/wix.svg +18 -0
  614. package/skills/wix-headless-templates/rentals/project/src/components/Hero.astro +77 -0
  615. package/skills/wix-headless-templates/rentals/project/src/components/Welcome.astro +95 -0
  616. package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalBookingView.tsx +195 -0
  617. package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalsView.tsx +89 -0
  618. package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentalFlow.ts +31 -0
  619. package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentals.ts +23 -0
  620. package/skills/wix-headless-templates/rentals/project/src/layouts/Layout.astro +22 -0
  621. package/skills/wix-headless-templates/rentals/project/src/layouts/SiteLayout.astro +40 -0
  622. package/skills/wix-headless-templates/rentals/project/src/pages/index.astro +8 -0
  623. package/skills/wix-headless-templates/rentals/project/src/pages/rentals/[slug].astro +81 -0
  624. package/skills/wix-headless-templates/rentals/project/src/pages/rentals.astro +24 -0
  625. package/skills/wix-headless-templates/rentals/project/src/styles/global.css +57 -0
  626. package/skills/wix-headless-templates/rentals/project/src/wix/config.ts +16 -0
  627. package/skills/wix-headless-templates/rentals/project/src/wix/media.ts +106 -0
  628. package/skills/wix-headless-templates/rentals/project/src/wix/money.ts +24 -0
  629. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rental-flow-store.ts +283 -0
  630. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-core.ts +435 -0
  631. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-store.ts +112 -0
  632. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals.ts +173 -0
  633. package/skills/wix-headless-templates/rentals/project/src/wix/rentals/types.ts +113 -0
  634. package/skills/wix-headless-templates/rentals/project/src/wix/sdk.ts +89 -0
  635. package/skills/wix-headless-templates/rentals/project/tsconfig.json +5 -0
  636. package/skills/wix-headless-templates/rentals/rest/rentals.ts +153 -0
  637. package/skills/wix-headless-templates/rentals/seed/SEED.md +95 -0
  638. package/skills/wix-headless-templates/rentals/seed/read-site.mjs +34 -0
  639. package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +321 -0
  640. package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +468 -0
  641. package/skills/wix-headless-templates/restaurants/app/components/restaurants/MenuView.tsx +257 -0
  642. package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
  643. package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
  644. package/skills/wix-headless-templates/restaurants/app/components/restaurants/ReservationView.tsx +212 -0
  645. package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useMenus.ts +34 -0
  646. package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +52 -0
  647. package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useReservation.ts +49 -0
  648. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-core.ts +333 -0
  649. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-store.ts +89 -0
  650. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +109 -0
  651. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +141 -0
  652. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +287 -0
  653. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +237 -0
  654. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservation-store.ts +279 -0
  655. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations-core.ts +218 -0
  656. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations.ts +109 -0
  657. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/time-core.ts +118 -0
  658. package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +337 -0
  659. package/skills/wix-headless-templates/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
  660. package/skills/wix-headless-templates/restaurants/app-astro/pages/menu.astro +22 -0
  661. package/skills/wix-headless-templates/restaurants/app-astro/pages/reservations.astro +12 -0
  662. package/skills/wix-headless-templates/restaurants/project/README.md +15 -0
  663. package/skills/wix-headless-templates/restaurants/project/astro.config.mjs +22 -0
  664. package/skills/wix-headless-templates/restaurants/project/package-lock.json +11038 -0
  665. package/skills/wix-headless-templates/restaurants/project/package.json +40 -0
  666. package/skills/wix-headless-templates/restaurants/project/public/favicon.svg +9 -0
  667. package/skills/wix-headless-templates/restaurants/project/src/assets/astro.svg +1 -0
  668. package/skills/wix-headless-templates/restaurants/project/src/assets/background.svg +1 -0
  669. package/skills/wix-headless-templates/restaurants/project/src/assets/wix.svg +18 -0
  670. package/skills/wix-headless-templates/restaurants/project/src/components/Hero.astro +77 -0
  671. package/skills/wix-headless-templates/restaurants/project/src/components/Welcome.astro +95 -0
  672. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/MenuView.tsx +257 -0
  673. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartButton.tsx +26 -0
  674. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +121 -0
  675. package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/ReservationView.tsx +212 -0
  676. package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useMenus.ts +34 -0
  677. package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +52 -0
  678. package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useReservation.ts +49 -0
  679. package/skills/wix-headless-templates/restaurants/project/src/layouts/Layout.astro +22 -0
  680. package/skills/wix-headless-templates/restaurants/project/src/layouts/SiteLayout.astro +47 -0
  681. package/skills/wix-headless-templates/restaurants/project/src/pages/index.astro +8 -0
  682. package/skills/wix-headless-templates/restaurants/project/src/pages/menu.astro +22 -0
  683. package/skills/wix-headless-templates/restaurants/project/src/pages/reservations.astro +12 -0
  684. package/skills/wix-headless-templates/restaurants/project/src/styles/global.css +57 -0
  685. package/skills/wix-headless-templates/restaurants/project/src/wix/config.ts +16 -0
  686. package/skills/wix-headless-templates/restaurants/project/src/wix/media.ts +106 -0
  687. package/skills/wix-headless-templates/restaurants/project/src/wix/money.ts +24 -0
  688. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-core.ts +333 -0
  689. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-store.ts +89 -0
  690. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +109 -0
  691. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +141 -0
  692. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +287 -0
  693. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +237 -0
  694. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservation-store.ts +279 -0
  695. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations-core.ts +218 -0
  696. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations.ts +109 -0
  697. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/time-core.ts +118 -0
  698. package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +337 -0
  699. package/skills/wix-headless-templates/restaurants/project/src/wix/sdk.ts +89 -0
  700. package/skills/wix-headless-templates/restaurants/project/tsconfig.json +5 -0
  701. package/skills/wix-headless-templates/restaurants/rest/menu.ts +96 -0
  702. package/skills/wix-headless-templates/restaurants/rest/ordering.ts +222 -0
  703. package/skills/wix-headless-templates/restaurants/rest/reservations.ts +102 -0
  704. package/skills/wix-headless-templates/restaurants/seed/SEED.md +118 -0
  705. package/skills/wix-headless-templates/restaurants/seed/read-site.mjs +25 -0
  706. package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +577 -0
  707. package/skills/wix-headless-templates/shared/CONTENT.md +22 -0
  708. package/skills/wix-headless-templates/shared/CUSTOM_OPERATIONS.md +100 -0
  709. package/skills/wix-headless-templates/shared/DESIGN.md +37 -0
  710. package/skills/wix-headless-templates/shared/SUPPLIED-CONTENT.md +27 -0
  711. package/skills/wix-headless-templates/shared/app/styles/global.css +57 -0
  712. package/skills/wix-headless-templates/shared/app/wix/config.ts +16 -0
  713. package/skills/wix-headless-templates/shared/app/wix/media.ts +106 -0
  714. package/skills/wix-headless-templates/shared/app/wix/money.ts +24 -0
  715. package/skills/wix-headless-templates/shared/app/wix/sdk.ts +89 -0
  716. package/skills/wix-headless-templates/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
  717. package/skills/wix-headless-templates/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +69 -0
  718. package/skills/wix-headless-templates/shared/capabilities/site-search/INSTRUCTIONS.md +194 -0
  719. package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchBox.tsx +136 -0
  720. package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchHit.tsx +50 -0
  721. package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchResults.tsx +300 -0
  722. package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSearch.ts +31 -0
  723. package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSuggest.ts +26 -0
  724. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-core.ts +520 -0
  725. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-store.ts +235 -0
  726. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts +80 -0
  727. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/suggest-store.ts +178 -0
  728. package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts +158 -0
  729. package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro +33 -0
  730. package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +82 -0
  731. package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +43 -0
  732. package/skills/wix-headless-templates/shared/rest/client.ts +155 -0
  733. package/skills/wix-headless-templates/shared/rest/config.ts +4 -0
  734. package/skills/wix-headless-templates/shared/rest/media.ts +92 -0
  735. package/skills/wix-headless-templates/shared/seed/images.mjs +183 -0
  736. package/skills/wix-headless-templates/shared/seed/read-site.mjs +97 -0
  737. package/skills/wix-headless-templates/shared/seed/site-context.mjs +70 -0
  738. package/skills/wix-headless-templates/shared/seed/site.mjs +48 -0
  739. package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +44 -0
  740. package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +685 -0
  741. package/skills/wix-headless-templates/storefront/app/components/storefront/CartButton.tsx +26 -0
  742. package/skills/wix-headless-templates/storefront/app/components/storefront/CartDrawer.tsx +239 -0
  743. package/skills/wix-headless-templates/storefront/app/components/storefront/FilterPanel.tsx +267 -0
  744. package/skills/wix-headless-templates/storefront/app/components/storefront/OptionPicker.tsx +171 -0
  745. package/skills/wix-headless-templates/storefront/app/components/storefront/QuickAdd.tsx +148 -0
  746. package/skills/wix-headless-templates/storefront/app/hooks/storefront/useCart.ts +59 -0
  747. package/skills/wix-headless-templates/storefront/app/hooks/storefront/useProductDetail.ts +42 -0
  748. package/skills/wix-headless-templates/storefront/app/hooks/storefront/useShop.ts +34 -0
  749. package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-core.ts +220 -0
  750. package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-store.ts +134 -0
  751. package/skills/wix-headless-templates/storefront/app/wix/storefront/cart.ts +187 -0
  752. package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog-core.ts +698 -0
  753. package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog.ts +260 -0
  754. package/skills/wix-headless-templates/storefront/app/wix/storefront/product-detail-store.ts +280 -0
  755. package/skills/wix-headless-templates/storefront/app/wix/storefront/shop-store.ts +341 -0
  756. package/skills/wix-headless-templates/storefront/app/wix/storefront/types.ts +305 -0
  757. package/skills/wix-headless-templates/storefront/app-astro/layouts/SiteLayout.astro +65 -0
  758. package/skills/wix-headless-templates/storefront/project/README.md +15 -0
  759. package/skills/wix-headless-templates/storefront/project/astro.config.mjs +22 -0
  760. package/skills/wix-headless-templates/storefront/project/package-lock.json +10786 -0
  761. package/skills/wix-headless-templates/storefront/project/package.json +41 -0
  762. package/skills/wix-headless-templates/storefront/project/public/favicon.svg +9 -0
  763. package/skills/wix-headless-templates/storefront/project/src/assets/astro.svg +1 -0
  764. package/skills/wix-headless-templates/storefront/project/src/assets/background.svg +1 -0
  765. package/skills/wix-headless-templates/storefront/project/src/assets/wix.svg +18 -0
  766. package/skills/wix-headless-templates/storefront/project/src/components/Hero.astro +77 -0
  767. package/skills/wix-headless-templates/storefront/project/src/components/Welcome.astro +95 -0
  768. package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartButton.tsx +26 -0
  769. package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartDrawer.tsx +239 -0
  770. package/skills/wix-headless-templates/storefront/project/src/components/storefront/FilterPanel.tsx +267 -0
  771. package/skills/wix-headless-templates/storefront/project/src/components/storefront/OptionPicker.tsx +171 -0
  772. package/skills/wix-headless-templates/storefront/project/src/components/storefront/QuickAdd.tsx +148 -0
  773. package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useCart.ts +59 -0
  774. package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useProductDetail.ts +42 -0
  775. package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useShop.ts +34 -0
  776. package/skills/wix-headless-templates/storefront/project/src/layouts/Layout.astro +22 -0
  777. package/skills/wix-headless-templates/storefront/project/src/layouts/SiteLayout.astro +65 -0
  778. package/skills/wix-headless-templates/storefront/project/src/pages/index.astro +8 -0
  779. package/skills/wix-headless-templates/storefront/project/src/styles/global.css +57 -0
  780. package/skills/wix-headless-templates/storefront/project/src/wix/config.ts +16 -0
  781. package/skills/wix-headless-templates/storefront/project/src/wix/media.ts +106 -0
  782. package/skills/wix-headless-templates/storefront/project/src/wix/money.ts +24 -0
  783. package/skills/wix-headless-templates/storefront/project/src/wix/sdk.ts +89 -0
  784. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-core.ts +220 -0
  785. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-store.ts +134 -0
  786. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart.ts +187 -0
  787. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog-core.ts +698 -0
  788. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog.ts +260 -0
  789. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/product-detail-store.ts +280 -0
  790. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/shop-store.ts +341 -0
  791. package/skills/wix-headless-templates/storefront/project/src/wix/storefront/types.ts +305 -0
  792. package/skills/wix-headless-templates/storefront/project/tsconfig.json +5 -0
  793. package/skills/wix-headless-templates/storefront/rest/cart.ts +183 -0
  794. package/skills/wix-headless-templates/storefront/rest/catalog.ts +267 -0
  795. package/skills/wix-headless-templates/storefront/seed/SEED.md +169 -0
  796. package/skills/wix-headless-templates/storefront/seed/read-site.mjs +38 -0
  797. package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +839 -0
  798. package/skills/wix-manage/SKILL.md +11 -7
  799. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +1 -1
  800. package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +206 -0
  801. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +17 -24
  802. package/skills/wix-manage/references/sites/create-headless-site.md +2 -0
  803. package/skills/wix-manage/references/sites/upload-static-site.md +262 -171
  804. package/skills/wix-manage/references/stores/update-product-with-options.md +1 -1
  805. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +0 -184
  806. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +0 -204
  807. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +0 -44
  808. package/skills/wix-headless/entry/bootstrap.mjs +0 -156
  809. package/skills/wix-headless/entry/skill.md +0 -78
  810. package/skills/wix-headless-kit/cold-start/bootstrap.mjs +0 -156
  811. package/skills/wix-headless-kit/cold-start/cold-start.md +0 -111
  812. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +0 -423
@@ -0,0 +1,83 @@
1
+ // Compose a vertical's project: the blank scaffold (`blank/project`, what `wix create` copies plus
2
+ // what the CLI's extender adds), the vertical deployed into it by the skill's own deploy script,
3
+ // and a package-lock.json, so `wix create --template-path skills/wix-headless-templates/<vertical>/project`
4
+ // yields the whole first vertical and `npm ci` installs it without resolving.
5
+ //
6
+ // node skills/wix-headless-templates/compose.mjs [<vertical> …] [--relock] [--lock-from <package-lock.json>]
7
+ //
8
+ // no vertical every vertical (a folder with an app/)
9
+ // default the project's existing lock is kept; a project without one gets a fresh
10
+ // resolution (`npm install --package-lock-only`)
11
+ // --relock resolve a fresh lock even when one exists
12
+ // --lock-from use this lock (one vertical only)
13
+ // Tarball URLs are written in registry.npmjs.org form whatever registry resolved them; npm
14
+ // substitutes the configured registry at install time. The root entry of the lock is brought in
15
+ // line with package.json (install/lock.mjs), and the result is checked: every dependency in
16
+ // package.json is in the lock's root entry with the same range, or the script exits 1.
17
+ import { cpSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
18
+ import { tmpdir } from "node:os";
19
+ import { basename, dirname, join, resolve } from "node:path";
20
+ import { spawnSync } from "node:child_process";
21
+ import { fileURLToPath } from "node:url";
22
+ import { listVerticals } from "../wix-headless-kit/install/templates.mjs";
23
+ import { syncLockRoot } from "../wix-headless-kit/install/lock.mjs";
24
+
25
+ const TEMPLATES = dirname(fileURLToPath(import.meta.url));
26
+ const DEPLOY = resolve(TEMPLATES, "..", "wix-headless-kit", "install", "deploy.mjs");
27
+ const argv = process.argv.slice(2);
28
+ const flag = (n) => { const i = argv.indexOf(`--${n}`); return i !== -1 && argv[i + 1] && !argv[i + 1].startsWith("--") ? argv[i + 1] : null; };
29
+ const relock = argv.includes("--relock");
30
+ const lockFrom = flag("lock-from");
31
+ const skip = new Set(["--relock", "--lock-from", lockFrom].filter(Boolean));
32
+ const requested = argv.filter((a) => !skip.has(a));
33
+ const all = listVerticals(TEMPLATES);
34
+ const verticals = requested.length ? requested : all;
35
+ for (const v of verticals) if (!all.includes(v)) { console.error(`unknown vertical "${v}" — ${all.join(", ")}`); process.exit(1); }
36
+ if (lockFrom && verticals.length !== 1) { console.error("--lock-from takes exactly one vertical"); process.exit(1); }
37
+
38
+ const canonical = (lock) => {
39
+ for (const [key, p] of Object.entries(lock.packages ?? {})) {
40
+ if (!key || !p.resolved || !/^https?:\/\//.test(p.resolved)) continue;
41
+ const name = key.slice(key.lastIndexOf("node_modules/") + "node_modules/".length);
42
+ p.resolved = `https://registry.npmjs.org/${name}/-/${basename(new URL(p.resolved).pathname)}`;
43
+ }
44
+ return lock;
45
+ };
46
+
47
+ let failed = false;
48
+ for (const v of verticals) {
49
+ const project = join(TEMPLATES, v, "project");
50
+ const lockPath = join(project, "package-lock.json");
51
+ const kept = !relock && !lockFrom && existsSync(lockPath) ? readFileSync(lockPath, "utf8") : null;
52
+ rmSync(project, { recursive: true, force: true });
53
+ cpSync(join(TEMPLATES, "blank", "project"), project, { recursive: true });
54
+ const d = spawnSync("node", [DEPLOY, v, "--stack", "astro"], { cwd: project, encoding: "utf8" });
55
+ let deployed = {};
56
+ try { deployed = JSON.parse(d.stdout); } catch { /* below */ }
57
+ if (d.status !== 0 || deployed.error) { console.log(JSON.stringify({ vertical: v, error: deployed.error ?? (d.stderr || d.stdout).slice(-400) })); failed = true; continue; }
58
+ let lock = "kept";
59
+ if (kept) writeFileSync(lockPath, kept);
60
+ else if (lockFrom) { cpSync(resolve(lockFrom), lockPath); lock = `from ${lockFrom}`; }
61
+ else {
62
+ const tmp = mkdtempSync(join(tmpdir(), "compose-"));
63
+ cpSync(join(project, "package.json"), join(tmp, "package.json"));
64
+ const r = spawnSync("npm", ["install", "--package-lock-only", "--ignore-scripts", "--no-audit", "--no-fund"], { cwd: tmp, encoding: "utf8", timeout: 600_000 });
65
+ if (r.status !== 0) { console.log(JSON.stringify({ vertical: v, error: `lock resolution failed: ${(r.stderr || r.stdout).slice(-400)}` })); failed = true; rmSync(tmp, { recursive: true, force: true }); continue; }
66
+ writeFileSync(lockPath, JSON.stringify(canonical(JSON.parse(readFileSync(join(tmp, "package-lock.json"), "utf8"))), null, 2) + "\n");
67
+ rmSync(tmp, { recursive: true, force: true });
68
+ lock = "resolved";
69
+ }
70
+ const sync = syncLockRoot(project);
71
+ // the project is a template: nothing site-specific, nothing generated
72
+ for (const f of ["wix.config.json", ".env.local", ".env", "AGENTS.md", "CLAUDE.md", ".gemini", "node_modules", ".wix", ".astro", "dist"]) rmSync(join(project, f), { recursive: true, force: true });
73
+ const lockRoot = JSON.parse(readFileSync(lockPath, "utf8")).packages?.[""] ?? {};
74
+ const pkg = JSON.parse(readFileSync(join(project, "package.json"), "utf8"));
75
+ const diff = [];
76
+ for (const field of ["dependencies", "devDependencies"]) {
77
+ for (const [n, r] of Object.entries(pkg[field] ?? {})) if (lockRoot[field]?.[n] !== r) diff.push(`${n}: package.json ${r}, lock ${lockRoot[field]?.[n] ?? "absent"}`);
78
+ for (const n of Object.keys(lockRoot[field] ?? {})) if (!(n in (pkg[field] ?? {}))) diff.push(`${n}: only in the lock`);
79
+ }
80
+ if (diff.length) failed = true;
81
+ console.log(JSON.stringify({ vertical: v, lock, promoted: sync?.promoted ?? [], packages: Object.keys(JSON.parse(readFileSync(lockPath, "utf8")).packages ?? {}).length, depsAdded: deployed.depsAdded, astroConfig: deployed.astroConfig, ...(diff.length ? { error: `lock root out of line: ${diff.join("; ")}` } : {}) }));
82
+ }
83
+ process.exit(failed ? 1 : 0);
@@ -0,0 +1,349 @@
1
+ # Donations — playbook
2
+
3
+ The donations machinery ships as files — campaign reads (list + by id, with goal progress), the exact
4
+ donation → hosted-checkout sequence, the donate form, the goal progress block, the thank-you island,
5
+ typed end-to-end. **The presentation is yours**: you design and implement the campaign card and the
6
+ campaigns index, the campaign page's layout around the shipped form, the home page and the brand. You
7
+ never write checkout logic; you never skip designing.
8
+
9
+ A donation is an eCom checkout with one line that references the campaign; Wix's hosted checkout takes
10
+ the payment and the donor's details, and the eCom order is the receipt. The campaign entity carries
11
+ **no description and no slug**: the story on a campaign page is the site's own copy, and routes key by
12
+ the campaign id (`/donate/<id>`).
13
+
14
+ ## The file map (deployed into `src/`)
15
+
16
+ **On Astro and React the shipped files are tested and work as they are** — this table and the
17
+ contracts below are everything you need to use them, so don't spend the run reading their source;
18
+ wire them and build your surfaces. Reading them is the right move when something is off (a runtime
19
+ error, a field this playbook doesn't cover) or when the brief wants a behaviour they don't offer —
20
+ then read the file that owns it and change or extend it. On `lib`, `static`, and a port the
21
+ components don't deploy at all, and each wiring section below opens with the files to read before
22
+ writing their equivalents. Files you edit: `SiteLayout.astro`, `styles/global.css`, and the story
23
+ copy on the campaign page. Files you **create** (skeletons below): your campaigns index island (or
24
+ Astro markup), your campaign page layout, and your home page.
25
+
26
+ | file | what it is |
27
+ |---|---|
28
+ | `wix/config.ts` · `wix/sdk.ts` | shared auth seam (deploy configures it — nothing to set by hand) |
29
+ | `wix/media.ts` · `wix/money.ts` | `imgAttrs(url, sizes, ratio)` — every `<img>` attribute for a DTO image: `<img {...imgAttrs(c.imageUrl, "50vw", 9 / 16)} alt={c.name} />`; `imgSrc()` / `imgSrcSet()` underneath |
30
+ | `wix/donations/types.ts` | the DTOs (`CampaignSummary`, `CampaignDetail`, `GoalProgress`, `DonationOptions`, `DonationReceipt`) — contracts inlined below |
31
+ | `wix/donations/campaigns.ts` | `fetchCampaigns`, `fetchCampaign(id)`, `fetchDefaultCampaign` — the transport; the rules and DTO mappers are in `donations-core.ts` beside it (shared with the REST layer) |
32
+ | `wix/donations/donate.ts` | `donationCheckoutUrl(campaignId, input)` — the checkout line + hosted redirect session; `fetchDonationReceipt(orderId)` — the thank-you page's order read; bodies in `donations-core.ts` |
33
+ | `wix/donations/donation-store.ts` · `campaigns-store.ts` · `receipt-store.ts` | the form, listing and receipt state machines, framework-free (`createDonationStore(campaign)`, `createCampaignsStore()`, `createReceiptStore()` — `getState`/`subscribe` + actions, one instance per surface); the hooks below bind them to React, every other stack uses them directly |
34
+ | `hooks/donations/useDonation.ts` | React binding of `donation-store.ts`: the donate form's state and actions — contract below |
35
+ | `hooks/donations/useCampaigns.ts` | React binding of `campaigns-store.ts`: the listing — contract below |
36
+ | `hooks/donations/useDonationReceipt.ts` | React binding of `receipt-store.ts`: reads `?orderId=` and the order — contract below |
37
+ | `components/donations/DonateForm.tsx` | the donate form for one campaign — frequency picker only when > 1 frequency, presets with impact text, "Other amount" only when enabled (min/max messages), the cover-fee checkbox with the computed 2.9% only when asked, the note only when enabled, the live "Donate $25 Monthly" label, "Redirecting…" in flight, errors after the first attempt, the closed state as `children` — **wire as-is** (`<DonateForm client:load campaign={campaign}>closing message</DonateForm>`) |
38
+ | `components/donations/GoalProgress.tsx` | raised of target, the bar at Wix's rounded percent, donation count, time left ("3 days left" / hours on the last day / "Ended") — renders nothing without a goal; no hooks, so it renders on the server — **wire as-is** on cards, the campaign page, a home strip (`compact` for cards) |
39
+ | `components/donations/DonationReceipt.tsx` | the hosted checkout's thank-you island — reads `?orderId=`, shows the order's facts only when the order could be read, an honest thank-you otherwise, a neutral page on a direct visit — **wire as-is** (`client:only="react"`) |
40
+ | `styles/global.css` | **the design system**: Tailwind v4 + the `@theme` token block (colors, radii, fonts — shared across verticals). Everything, shipped and yours, styles from these tokens |
41
+
42
+ Astro stack additionally gets:
43
+
44
+ | file | what it is |
45
+ |---|---|
46
+ | `layouts/SiteLayout.astro` | site chrome — **yours to brand** (keep the `seo-tags` slot + global.css import; it takes `image` for `og:image`). If another vertical is also deployed, its layout won — add a Donate nav link there |
47
+ | `components/donations/CampaignPage.astro` | **REFERENCE** campaign surface: cover, name, `story` prop, `GoalProgress`, `DonateForm` with the closed-state message — redesign it (it is mounted by both pages below); pass the campaign's story copy through `story` |
48
+ | `pages/donate/index.astro` | SSR campaigns index — **keep the frontmatter** (one campaign → renders `CampaignPage` directly, the Wix widget's default-campaign rule); the card markup is yours |
49
+ | `pages/donate/[id].astro` | SSR campaign page, a real 404 on a missing or archived id — **keep the frontmatter** (plain `<title>`/`<meta>`/`og:image` from the DTO: Donations has no owner-editable SEO item type, so campaign pages don't appear in the Wix SEO panel or sitemap) |
50
+ | `pages/donate/thank-you.astro` | the hosted checkout's return (`?orderId=`) — **keep the route**; the shipped redirect callbacks point at it |
51
+
52
+ ## What you build — the design job
53
+
54
+ 1. **The campaign card + campaigns index** — your tile (cover, name, the shipped `GoalProgress compact`,
55
+ a Donate link; a closed campaign reads "Goal reached" / "Ended", never "Donate") and grid rhythm, an
56
+ honest empty state. The index page ships with SSR data; render it in Astro markup or swap in an
57
+ island on `useCampaigns`.
58
+ 2. **The campaign page's layout** — cover, name, the story (your copy from the brief — the API has none),
59
+ `GoalProgress`, and the shipped `DonateForm` as the giving column; design it for the brand (a
60
+ sticky form column, an editorial split, a full-bleed cover). Donation logic never leaves the shipped
61
+ component and hook.
62
+ 3. **The home page** — hero, a featured campaign strip (`fetchCampaigns({ limit: 1 })` in frontmatter →
63
+ name, `GoalProgress`, CTA to `/donate/<id>`), brand story.
64
+
65
+ Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass).
66
+
67
+ ### What a complete donations site shows (recommended defaults)
68
+
69
+ Defaults for a brief that says nothing about them; the prompt wins where it differs. Look at the
70
+ campaigns before designing (how many, goals or not, frequencies, presets, images).
71
+
72
+ - **Campaign page:** the Donate CTA and the amount picker in the first screen at 390px wide; the
73
+ frequency picker only when the campaign offers more than one frequency (the form decides); the
74
+ custom amount only when enabled; the story after the form on phones, beside it on desktop.
75
+ - **Closed campaigns** (goal reached / expired): the progress and a closing message — never a Donate
76
+ button. `DonateForm` renders your `children` then; the card shows the state, not a CTA.
77
+ - **Goal figures only from the DTO:** raised, target, percent, count, time left come from the metrics
78
+ API and the owner's goal. A campaign without a goal shows no progress; a goal whose raised total
79
+ couldn't be read shows the target alone.
80
+ - **Copy:** nothing the owner didn't supply — no donor counts beyond `donationCount`, no "tax
81
+ deductible", no urgency the owner didn't set, no Wix IDs in visible text.
82
+ - **Thank-you page:** the shipped island's rules — thanks with the order's facts when they can be
83
+ read, thanks without them otherwise, never "paid" unless the order says so.
84
+
85
+ ### The contracts your components consume (tested and work as they are; read the source when something is off or the brief wants more)
86
+
87
+ ```ts
88
+ // CampaignSummary (cards, strips) — display-ready:
89
+ // { id, name, status /* "collecting" | "goalReached" | "expired" */, acceptsDonations,
90
+ // imageUrl /* "" when none */,
91
+ // goal: GoalProgress | null /* null = no goal */ }
92
+ // GoalProgress: { raised /* "$1,250" | "" when unreadable */, target /* "$20,000" */,
93
+ // raisedAmount, targetAmount /* numbers for bar math only */, percent /* may exceed 100 */,
94
+ // donationCount, reached, endDate /* ISO | null */, ended, lastDay, daysLeft, hoursLeft }
95
+ // CampaignDetail adds options: { currency /* "" when unknown */, presets: [{ amount, label, impact }],
96
+ // customAmount: { enabled, min, max, minLabel, maxLabel }, frequencies: [{ value, label }],
97
+ // askCoverFee, feeRate /* 0.029 */, commentsEnabled, commentMaxLength /* 100 */ }
98
+
99
+ // useCampaigns({ initialCampaigns? }) →
100
+ // { campaigns: CampaignSummary[]|null /* null = loading → skeletons; [] after a failed load, with error */, error }
101
+
102
+ // useDonation(campaign, { origin?, paths? }?) →
103
+ // { frequency, presetAmount, customMode, customAmount /* text */, coverFee, note,
104
+ // amount, fee, feeLabel, total, totalLabel, buttonLabel /* "Donate $25 Monthly" */,
105
+ // errors, messages /* per field, visitor-facing */, showErrors /* after the first attempt */, valid,
106
+ // submitting, error, available /* campaign.acceptsDonations */,
107
+ // selectPreset(n), selectCustom(), setCustomAmount(text), setFrequency(f), setCoverFee(b), setNote(s),
108
+ // donate(): Promise<void> } // resolves as the browser navigates to the hosted checkout (or with
109
+ // // messages showing); rejects with a visitor-facing message — surface it
110
+ // <DonateForm campaign={c} options? children? className? buttonClassName? /> wraps it: you only place
111
+ // it; it decides what to render, what to say, and shows its own errors.
112
+
113
+ // useDonationReceipt(orderId?) → { orderId /* "" on a direct visit */, loading, receipt: DonationReceipt|null }
114
+ // DonationReceipt: { orderNumber, donorFirstName, donorLastName, amount /* formatted */, paid, campaignId }
115
+ ```
116
+
117
+ ### The islands you create — skeletons
118
+
119
+ The pages ship; the surfaces they render are yours. Hooks first, branches after (an early return
120
+ above a hook changes hook order between renders and React throws). `client:load` islands render on
121
+ the server too — render every state totally; nothing in a render path may throw.
122
+
123
+ ```tsx
124
+ // src/components/donations/CampaignsGrid.tsx — YOU build it when the index wants client state;
125
+ // pages/donate/index.astro can mount it with the SSR campaigns instead of its Astro card markup.
126
+ import { useCampaigns } from "../../hooks/donations/useCampaigns";
127
+ import GoalProgress from "./GoalProgress";
128
+ import type { CampaignSummary } from "../../wix/donations/types";
129
+
130
+ export default function CampaignsGrid(props: { initialCampaigns?: CampaignSummary[] /* SSR prop — pass straight to useCampaigns */ }) {
131
+ const { campaigns, error } = useCampaigns(props);
132
+ // …you implement the render:
133
+ // • error → a short inline message
134
+ // • campaigns === null → skeleton cards; [] → your honest empty state
135
+ // • else YOUR grid of YOUR cards: cover via imgAttrs(c.imageUrl, "33vw", 9 / 16) only when
136
+ // non-empty, the name (wraps — `min-w-0 break-words`), <GoalProgress goal={c.goal} compact />,
137
+ // a link to `/donate/${c.id}` reading "Donate" only when c.acceptsDonations ("Goal reached" /
138
+ // "Ended" otherwise) as the card's LAST ROW (`mt-auto`); never a button inside the card's <a>.
139
+ }
140
+ ```
141
+
142
+ ```astro
143
+ // src/components/donations/CampaignPage.astro — ships as a reference; REDESIGN it in place (both
144
+ // pages mount it). Keep: <GoalProgress goal={campaign.goal} /> and
145
+ // <DonateForm client:load campaign={campaign}>{closing message}</DonateForm>. Yours: the cover
146
+ // (a bounded band on phones — `max-h-[40vh]`, not a full-screen hero), the name, the story prop
147
+ // (your copy), the arrangement (the form in the first screen at 390px).
148
+ ```
149
+
150
+ ### The reference files for stacks where the components don't deploy
151
+
152
+ On `lib`, `static`, and a port, nothing under `components/` or `hooks/` arrives. The state machines
153
+ behind the hooks do arrive — `wix/donations/donation-store.ts`, `campaigns-store.ts`,
154
+ `receipt-store.ts` — so you never rewrite them: create a store per surface, `subscribe`, render from
155
+ `getState()`, call its actions. Their `*State` interfaces are the render contract; read those. What
156
+ you write is the rendering — grid, card, campaign page, the form, the thank-you page — and for that
157
+ read first:
158
+
159
+ 1. `components/donations/DonateForm.tsx` — the form as working code: which controls appear for which
160
+ options, the preset/custom switch, the fee line, the note counter, when messages show, the
161
+ in-flight label, the inline error, the closed state.
162
+ 2. `components/donations/GoalProgress.tsx` — the progress block's text rules (`timeLeftLabel`).
163
+ 3. `components/donations/DonationReceipt.tsx` — the thank-you page's three honest states.
164
+
165
+ Under `templates/donations/app/`.
166
+
167
+ ### Wiring — Astro (default)
168
+
169
+ 1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass — merge into the other
170
+ vertical's layout instead if both are deployed).
171
+ 2. Redesign `components/donations/CampaignPage.astro` around the two shipped components and pass the
172
+ campaign's story through `story`; restyle the card markup in `pages/donate/index.astro` (or mount
173
+ your `CampaignsGrid` there with `initialCampaigns`). Author your surfaces in as few messages as
174
+ possible — batch multiple Writes per message.
175
+ 3. Write `pages/index.astro` (home) — it exists from the scaffold; Read it before overwriting.
176
+
177
+ ### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
178
+
179
+ Read the reference files listed above before writing any surface.
180
+
181
+ `deploy.mjs donations --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts` (the
182
+ visitor client, configured with the public client id), `media.ts`, `money.ts`, and `wix/donations/` —
183
+ `campaigns.ts`, `donate.ts`, `types.ts`, `donations-core.ts`, and the three stores. None of it is
184
+ React. The hooks and components don't ship on this stack; the stores replace the hooks, and you write
185
+ the components in your framework to the contracts on this page:
186
+
187
+ - bind the stores with your framework's external-store primitive (Vue: `shallowRef` updated in
188
+ `subscribe`; Svelte: `readable(store.getState(), (set) => store.subscribe(() => set(store.getState())))`;
189
+ Solid: a signal set in `subscribe`). `createCampaignsStore({ initialCampaigns? })` per listing
190
+ (`start()` when mounted, `stop()` when unmounted), `createDonationStore(campaign, { paths? })` per
191
+ campaign surface (`donate()` navigates the document itself), `createReceiptStore()` on the thank-you
192
+ page (`start()` once mounted). State in, actions out — exactly the hooks' contracts above;
193
+ - your form to the `DonateForm.tsx` contract: the controls the options allow, `buttonLabel` on the
194
+ CTA, disabled with "Redirecting…" while `submitting`, `messages` once `showErrors`, `error` inline,
195
+ the closed state when `available` is false.
196
+
197
+ Routes `/donate`, `/donate/:id` (via `fetchCampaign`, null → your 404), `/donate/thank-you`; dev server
198
+ on 4321; a static build goes through `npx @wix/cli@latest release` with `site.outputDirectory` pointing
199
+ at the build folder, an SSR build is hosted by you. Page title from the DTO's `name`; the description
200
+ is your copy — campaigns carry no `seoData`.
201
+
202
+ ### Wiring — static site (`--stack static`, no bundler)
203
+
204
+ Read the reference files listed above before writing any surface.
205
+
206
+ `deploy.mjs donations --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM,
207
+ the `.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` — pages,
208
+ styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project root
209
+ (config, plan, seed output) is never the upload. Same function names and DTOs as the table above, so
210
+ the contracts on this page hold unchanged: `fetchCampaigns`, `fetchCampaign` from
211
+ `./js/wix/campaigns.js`; `donationCheckoutUrl`, `fetchDonationReceipt` from `./js/wix/donate.js`. The
212
+ state machines ship too: `createCampaignsStore` from `./js/wix/campaigns-store.js`,
213
+ `createDonationStore` from `./js/wix/donation-store.js`, `createReceiptStore` from
214
+ `./js/wix/receipt-store.js`. No components ship — you write the rendering in plain JS: one render
215
+ function per surface that reads `getState()`, called from `subscribe`, with the CTA calling
216
+ `donate()`. Pages are `donate.html`, `campaign.html?id=…` and `thank-you.html` (Wix static hosting
217
+ serves files, not directories — name the file and link to it); pass
218
+ `createDonationStore(campaign, { paths: { thankYou: "/thank-you.html", campaign: "/campaign.html?id=" + id } })`
219
+ so the hosted checkout returns to your files; the campaign page reads the id, `fetchCampaign`, renders
220
+ its not-found state on null, and sets `document.title` from the DTO's `name`. The visitor token
221
+ persists in `localStorage` on its own; never mint per page. `npx @wix/cli@latest release` uploads `site/`.
222
+
223
+ ### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
224
+
225
+ Read the reference files listed above before writing any surface.
226
+
227
+ Run `deploy.mjs donations --stack static` in the project folder anyway: `js/wix/` is both the
228
+ browser-side code and the readable spec. Then split by where the call runs. **Reads on the server:**
229
+ port `js/wix/campaigns.ts` and `donations-core.ts` to your language — the same functions returning
230
+ the same DTO shapes as dicts (the literal bodies are in the file), one anonymous visitor token per
231
+ process for these public reads (mint and refresh per `client.ts`) — and render the index and the
232
+ campaign page in your templates to the contracts above, so campaign names and goals are in the HTML.
233
+ **Donating in the browser:** the form on `./js/wix/donation-store.js` (pass the campaign DTO rendered
234
+ into the page as JSON), exactly as the static wiring above — the checkout and the redirect session are
235
+ created by the visitor's own token from the page, so the server never handles per-visitor tokens; the
236
+ thank-you page mounts `createReceiptStore()` the same way. Routes stay `/donate`, `/donate/<id>`,
237
+ `/donate/thank-you`. Add your public https origin to the OAuth app's allowed domains before the hosted
238
+ checkout can return.
239
+
240
+ **Pre-rendered (Frozen-Flask, Pelican, any static-site generator) → Wix-hosted.** Same port for the
241
+ reads, run at build time with one anonymous token; the generator emits `/donate` and one page per
242
+ campaign from `fetchCampaigns()` (at most 100 — one call). Goal progress is frozen at build time —
243
+ say so to the owner, or render `GoalProgress` client-side from a `fetchCampaign` on load. Run
244
+ `deploy.mjs donations --stack static --out <build dir>` so `js/wix/` is inside the output the pages
245
+ import from, point `site.outputDirectory` at that folder, `wix release`. Pages sit at different depths
246
+ (`/`, `/donate/…`): give the templates one base path to `js/wix/` (root-relative `/js/wix/…`), never a
247
+ relative `./js/wix/`. The frozen page is the first paint; the form still runs client-side through
248
+ `createDonationStore()`. Close with the live URL, the rebuild + release command, and one line for the
249
+ owner: dashboard edits to campaigns reach the site when that command runs; donating is live regardless.
250
+
251
+ ### Wiring — React SPA (Vite etc.)
252
+
253
+ Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite plugins —
254
+ deploy added the dep). Routes: `/donate` → your grid (`useCampaigns()` fetches client-side when no
255
+ `initialCampaigns` is passed); `/donate/:id` → `fetchCampaign(id)` client-side, then your page around
256
+ `<DonateForm campaign={c} />` (null → your not-found state); `/donate/thank-you` → `<DonationReceipt />`.
257
+ Deploy wrote the public client id into `wix/config.ts`; nothing else to configure.
258
+
259
+ Routes on Wix hosting: the host serves files only, so a clean route answers 404 when loaded directly —
260
+ hash routes, or one HTML file per route, decided before the first route is written; any URL handed to
261
+ Wix as a return target must be one the host serves (SKILL.md step 1) — pass it through `paths`.
262
+
263
+ ## Hard rules
264
+
265
+ - **Donate only through the shipped exports** — `DonateForm` / `useDonation` / `donationCheckoutUrl`
266
+ own the checkout line and the hosted redirect session. Never hand-build a checkout URL, never create
267
+ an order, never mark anything paid.
268
+ - **Never promise a completed donation from the return URL.** `postFlowUrl` (the campaign page) is
269
+ hit on abandon too; landing on `/donate/thank-you?orderId=` is the success redirect. The thank-you
270
+ page reads the order when it can and degrades to a thank-you without order facts otherwise — never
271
+ an invented amount, name or "paid".
272
+ - **Amounts are display-only.** `label`, `target`, `raised`, `amount` come pre-formatted from the API;
273
+ the only computed money is the fee preview — Wix's fixed 2.9% — and the button total. Wix prices
274
+ the line, tax and schedule at the hosted checkout.
275
+ - **No invented goal numbers.** Progress renders only from `goal`; a campaign without one has none.
276
+ - **The form is the shipped `DonateForm`** — it alone decides which controls appear (frequencies,
277
+ presets, custom amount, fee, note) and when a campaign is closed; a page never rebuilds that.
278
+ - **The story copy is yours, the campaign data isn't.** The API has no description: write the cause's
279
+ story from the brief; never fabricate figures, beneficiaries or urgency.
280
+ - Don't wrap shipped calls in your own API routes — they run client-side by design.
281
+ - Where the shipped components deploy (Astro, React): theme via the `@theme` tokens, and your markup
282
+ uses Tailwind utilities on the same tokens — one design system across shipped and written code. No
283
+ parallel theme files, no hardcoded palette values. Where they don't (`lib`, `static`, a port): style
284
+ with whatever your stack does well, on one token set of your own.
285
+ - Live data or an honest empty state — never mock campaigns, amounts, or progress.
286
+ - **Call every hook before any conditional return.** Hooks first, branches after.
287
+ - **Browsing and donating need no login.** They run on the visitor session the shipped client already
288
+ holds; don't gate campaigns behind sign-in.
289
+
290
+ ## Out of scope (don't improvise these)
291
+
292
+ A donor's history or receipts page (member-only order reads), managing a recurring donation (Wix's
293
+ emails and hosted member flows do that), campaign creation or editing from the site (owner-only —
294
+ server-side per `templates/shared/CUSTOM_OPERATIONS.md`, or the dashboard). If the user asks for a
295
+ donor account area, deploy the `members` vertical beside this one rather than shipping code that
296
+ returns nothing for visitors.
297
+
298
+ ## Point the user to their dashboard
299
+
300
+ Hand the owner these links — `{siteId}` is `siteId` in `wix.config.json` (the deploy JSON prints it as
301
+ `dashboardUrl`).
302
+
303
+ | page | `https://manage.wix.com/dashboard/{siteId}/` + |
304
+ |---|---|
305
+ | Donations (campaigns, settings) | `app/333b456e-dd48-4d6b-b32b-9fd48d74e163` (redirects to the app's own route) |
306
+ | Orders — every donation is an eCom order | `ecom-platform/orders-list` |
307
+ | Accept payments — connect a payment method | `wix-cashier/payments` |
308
+ | Upgrade the plan — online payments need premium | full URL: `https://www.wix.com/upgrade/website?metaSiteId={siteId}` |
309
+
310
+ **Taking real donations needs a connected payment method plus a premium plan.** Until both are done, a visitor who reaches hosted checkout sees **"We can't accept online payments. Contact us for help with your order."** Recurring frequencies (`WEEK`/`MONTH`/`YEAR`) additionally need a
311
+ payment provider that supports recurring payments. Mention it; don't treat it as a code failure. The
312
+ cover-fee 2.9% is added to every recurring charge.
313
+
314
+ ## Seeding
315
+
316
+ Per `seed/SEED.md` — plain-data `plan.json` into `seed-donations.mjs` from the project root. Seed one
317
+ campaign that exercises every form branch (3 presets with impact text, one-time + monthly, a goal with
318
+ an end date, a custom amount with a minimum, note and cover-fee on, a cover image); a second campaign
319
+ only when the brief lists several causes.
320
+
321
+ ## Caveats — verified against the SDK, not yet against a live site
322
+
323
+ The shipped code guards each of these, so a refusal degrades instead of breaking; confirm them on the
324
+ first real site and read the owning file if one bites.
325
+
326
+ - **Visitor reads.** Whether an anonymous visitor token may query campaigns and read `/metrics` is
327
+ unverified. Metrics are caught per campaign: a refusal leaves `goal.raised` "" (the target still
328
+ shows) and `options.currency` "" (the button reads "Donate" without an amount; preset labels still
329
+ carry the API's own formatted amounts). If the campaign query itself is refused, the pages render
330
+ their empty state.
331
+ - **Direct Create Checkout vs the Wix widget's cart route.** The default creates the checkout directly
332
+ (a donation must never merge into a storefront visitor's cart); if the Donations catalog refuses to
333
+ price that line, `donationCheckoutUrl` falls back to the widget's own Create Cart → Create Checkout
334
+ (`channelType: OTHER_PLATFORM`), reachable by name as `createDonationCheckoutViaCart`. The cart route
335
+ can answer `CURRENT_CART_ALREADY_EXISTS` for a visitor who already holds a cart — surfaced as the
336
+ form's error.
337
+ - **Site currency.** Comes from the metrics response ("returns only the site's default currency");
338
+ On a campaign nobody has donated to yet the metrics carry no currency either, so the transports read the site's currency once from the eCommerce settings (BUSINESS_INFO); unknown → "".
339
+ - **Reading the order on the thank-you page.** `GET /ecom/v1/orders/{id}` with the visitor's token is
340
+ unverified; any failure → `receipt` null and the page thanks without order facts.
341
+ - **`orderId` spelling.** The redirect-session contract appends `orderId`; the Wix widget's own success
342
+ URL uses `orderid`. Both are read.
343
+ - **Cover image update shape** (seed) — inferred from the SDK; a failed attach is reported, never fatal.
344
+ - **App installation** (seed) — installing Donations through the installer API, and whether it
345
+ provisions eCom, is unverified; the seed installs both and reports each result.
346
+ - **Dashboard route.** The `app/<appDefId>` link redirects to the app's slug route; the slug itself
347
+ was not resolved live.
348
+ - The `donorCoveringFees` option key and the fixed 2.9% come from the Wix widget's source, not a
349
+ public reference page.
@@ -0,0 +1,155 @@
1
+ // The donate form for one campaign — wire as-is on the campaign page (and a home strip). It owns
2
+ // the rules a rewritten form gets wrong: the frequency picker only when the campaign offers more
3
+ // than one frequency, the preset amounts with the owner's impact text, "Other amount" only when
4
+ // the owner enabled it (with the campaign's min/max in the messages), the cover-fee checkbox with
5
+ // the computed 2.9% only when the owner asks, the note only when comments are enabled (with its
6
+ // counter), the live "Donate $25 Monthly" label, "Redirecting…" while the hosted checkout starts,
7
+ // errors shown after the first attempt, the failure inline. For a campaign that isn't accepting
8
+ // donations (goal reached / expired) it renders `children` — your closing message — or nothing.
9
+ // The redirect itself is useDonation → donationCheckoutUrl; nothing here builds a URL or marks
10
+ // anything paid.
11
+ import type { ReactNode } from "react";
12
+ import { useDonation, type UseDonationOptions } from "../../hooks/donations/useDonation";
13
+ import type { CampaignDetail } from "../../wix/donations/types";
14
+
15
+ export interface DonateFormProps {
16
+ campaign: CampaignDetail;
17
+ /** origin / return paths for the hosted flow — see donate.ts; omit for the defaults. */
18
+ options?: UseDonationOptions;
19
+ /** Rendered instead of the form when the campaign isn't accepting donations. */
20
+ children?: ReactNode;
21
+ className?: string;
22
+ buttonClassName?: string;
23
+ }
24
+
25
+ const choice = (selected: boolean) =>
26
+ `cursor-pointer rounded-md border px-4 py-3 text-sm transition-colors ${
27
+ selected ? "border-primary bg-primary text-primary-foreground" : "border-border bg-background text-foreground hover:bg-secondary"
28
+ }`;
29
+
30
+ export default function DonateForm({
31
+ campaign,
32
+ options,
33
+ children,
34
+ className = "grid gap-6",
35
+ buttonClassName = "w-full rounded-control bg-primary px-8 py-3 text-sm font-semibold text-primary-foreground transition-opacity hover:opacity-90 disabled:opacity-50",
36
+ }: DonateFormProps) {
37
+ const d = useDonation(campaign, options);
38
+ const o = campaign.options;
39
+ if (!d.available) return children ? <>{children}</> : null;
40
+
41
+ const show = (field: keyof typeof d.messages) => (d.showErrors && d.messages[field] ? d.messages[field] : null);
42
+ const fid = `donate-${campaign.id}`;
43
+
44
+ return (
45
+ <form
46
+ className={className}
47
+ noValidate
48
+ onSubmit={(e) => {
49
+ e.preventDefault();
50
+ void d.donate().catch(() => {});
51
+ }}
52
+ >
53
+ {o.frequencies.length > 1 && (
54
+ <fieldset>
55
+ <legend className="eyebrow mb-2">How often</legend>
56
+ <div className="grid grid-cols-2 gap-2 sm:grid-cols-4" role="radiogroup">
57
+ {o.frequencies.map((f) => (
58
+ <button key={f.value} type="button" role="radio" aria-checked={d.frequency === f.value} className={choice(d.frequency === f.value)} onClick={() => d.setFrequency(f.value)}>
59
+ {f.label}
60
+ </button>
61
+ ))}
62
+ </div>
63
+ {show("frequency") && <p className="mt-2 text-sm text-destructive" role="alert">{show("frequency")}</p>}
64
+ </fieldset>
65
+ )}
66
+
67
+ {(o.presets.length > 0 || o.customAmount.enabled) && (
68
+ <fieldset>
69
+ <legend className="eyebrow mb-2">Amount</legend>
70
+ <div className="grid grid-cols-2 gap-2 sm:grid-cols-3" role="radiogroup">
71
+ {o.presets.map((p) => {
72
+ const selected = !d.customMode && d.presetAmount === p.amount;
73
+ return (
74
+ <button key={p.amount} type="button" role="radio" aria-checked={selected} className={`${choice(selected)} text-left`} onClick={() => d.selectPreset(p.amount)}>
75
+ <span className="block text-base font-semibold">{p.label}</span>
76
+ {p.impact && <span className={`mt-0.5 block text-xs ${selected ? "opacity-80" : "text-muted-foreground"}`}>{p.impact}</span>}
77
+ </button>
78
+ );
79
+ })}
80
+ {o.customAmount.enabled && o.presets.length > 0 && (
81
+ <button type="button" role="radio" aria-checked={d.customMode} className={choice(d.customMode)} onClick={() => d.selectCustom()}>
82
+ Other amount
83
+ </button>
84
+ )}
85
+ </div>
86
+ {show("amount") && <p className="mt-2 text-sm text-destructive" role="alert">{show("amount")}</p>}
87
+ {d.customMode && (
88
+ <div className="mt-3">
89
+ <label htmlFor={`${fid}-amount`} className="sr-only">
90
+ Amount{o.currency ? ` in ${o.currency}` : ""}
91
+ </label>
92
+ <div className="flex items-center gap-2 rounded-md border border-border bg-background px-3">
93
+ {o.currency && <span className="text-sm text-muted-foreground">{o.currency}</span>}
94
+ <input
95
+ id={`${fid}-amount`}
96
+ inputMode="decimal"
97
+ autoComplete="off"
98
+ className="w-full bg-transparent py-3 text-base text-foreground outline-none"
99
+ placeholder={o.customAmount.minLabel ? `${o.customAmount.minLabel} or more` : "Enter an amount"}
100
+ value={d.customAmount}
101
+ onChange={(e) => d.setCustomAmount(e.target.value)}
102
+ aria-invalid={!!show("customAmount")}
103
+ />
104
+ </div>
105
+ {(o.customAmount.minLabel || o.customAmount.maxLabel) && !show("customAmount") && (
106
+ <p className="mt-1 text-xs text-muted-foreground">
107
+ {[o.customAmount.minLabel && `Minimum ${o.customAmount.minLabel}`, o.customAmount.maxLabel && `Maximum ${o.customAmount.maxLabel}`].filter(Boolean).join(" · ")}
108
+ </p>
109
+ )}
110
+ {show("customAmount") && <p className="mt-1 text-sm text-destructive" role="alert">{show("customAmount")}</p>}
111
+ </div>
112
+ )}
113
+ </fieldset>
114
+ )}
115
+
116
+ {o.askCoverFee && (
117
+ <label className="flex items-start gap-3 text-sm text-foreground">
118
+ <input type="checkbox" className="mt-0.5" checked={d.coverFee} onChange={(e) => d.setCoverFee(e.target.checked)} />
119
+ <span>
120
+ {d.feeLabel ? `Add ${d.feeLabel} to cover the processing fees` : "Cover the processing fees (2.9%)"}
121
+ {d.frequency && d.frequency !== "ONE_TIME" && <span className="text-muted-foreground"> — on every payment</span>}
122
+ </span>
123
+ </label>
124
+ )}
125
+
126
+ {o.commentsEnabled && (
127
+ <div>
128
+ <label htmlFor={`${fid}-note`} className="eyebrow mb-2 block">
129
+ Leave a note <span className="font-normal normal-case tracking-normal">(optional)</span>
130
+ </label>
131
+ <textarea
132
+ id={`${fid}-note`}
133
+ rows={3}
134
+ maxLength={o.commentMaxLength}
135
+ className="w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none"
136
+ value={d.note}
137
+ onChange={(e) => d.setNote(e.target.value)}
138
+ />
139
+ <p className="mt-1 text-right text-xs text-muted-foreground">
140
+ {d.note.length}/{o.commentMaxLength}
141
+ </p>
142
+ {show("note") && <p className="text-sm text-destructive" role="alert">{show("note")}</p>}
143
+ </div>
144
+ )}
145
+
146
+ <div className="grid gap-2">
147
+ <button type="submit" disabled={d.submitting} aria-busy={d.submitting} className={buttonClassName}>
148
+ {d.submitting ? "Redirecting…" : d.buttonLabel}
149
+ </button>
150
+ {d.error && <p className="text-sm text-destructive" role="alert">{d.error}</p>}
151
+ <p className="text-center text-xs text-muted-foreground">Secure payment on the next step.</p>
152
+ </div>
153
+ </form>
154
+ );
155
+ }
@@ -0,0 +1,46 @@
1
+ // The hosted checkout's thank-you island — wire as-is on /donate/thank-you (mount client:only: it
2
+ // reads the browser URL). It owns the honesty rules: landing here with `?orderId=` is Wix's
3
+ // success redirect, so it thanks the donor; the order's facts (name, amount, order number, paid or
4
+ // pending) appear only when the order could be read; a direct visit with no order id gets a neutral
5
+ // thank-you and a link back — never an invented receipt, never "paid" unless the order says PAID.
6
+ import { useDonationReceipt } from "../../hooks/donations/useDonationReceipt";
7
+
8
+ export interface DonationReceiptProps {
9
+ /** Where "Back to campaigns" points. */
10
+ campaignsHref?: string;
11
+ className?: string;
12
+ }
13
+
14
+ export default function DonationReceipt({ campaignsHref = "/donate", className = "mx-auto max-w-lg py-16 text-center" }: DonationReceiptProps) {
15
+ const { orderId, loading, receipt } = useDonationReceipt();
16
+
17
+ if (!orderId) {
18
+ return (
19
+ <div className={className}>
20
+ <h1 className="text-2xl font-semibold tracking-tight">Thank you for your support</h1>
21
+ <a href={campaignsHref} className="mt-6 inline-block text-sm text-foreground underline">
22
+ See the campaigns
23
+ </a>
24
+ </div>
25
+ );
26
+ }
27
+
28
+ return (
29
+ <div className={className} aria-busy={loading}>
30
+ {receipt?.orderNumber && <p className="eyebrow">Order {receipt.orderNumber}</p>}
31
+ <h1 className="mt-2 text-2xl font-semibold tracking-tight">
32
+ {receipt?.donorFirstName ? `Thank you, ${receipt.donorFirstName}` : "Thank you for your donation"}
33
+ </h1>
34
+ {receipt && (
35
+ <p className="mt-3 text-sm text-muted-foreground">
36
+ {receipt.amount ? `Your donation of ${receipt.amount} ` : "Your donation "}
37
+ {receipt.paid ? "has been received." : "is being processed — payment is pending."}
38
+ </p>
39
+ )}
40
+ {!receipt && !loading && <p className="mt-3 text-sm text-muted-foreground">Your donation has been submitted.</p>}
41
+ <a href={campaignsHref} className="mt-6 inline-block text-sm text-muted-foreground underline">
42
+ Back to campaigns
43
+ </a>
44
+ </div>
45
+ );
46
+ }