@wix/agent-skills 1.21.0 → 1.23.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 (269) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +71 -7
  3. package/skills/wix-app/references/APP_VALIDATION.md +16 -10
  4. package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
  5. package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
  6. package/skills/wix-app/references/SDK_MODULE_MAP.md +2 -0
  7. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
  8. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
  9. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
  10. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
  11. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
  12. package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
  13. package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
  14. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
  15. package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
  16. package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
  17. package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
  18. package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
  19. package/skills/wix-headless-fast/SKILL.md +95 -230
  20. package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
  21. package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +17 -14
  22. package/skills/wix-headless-fast/guides/existing-site.md +78 -0
  23. package/skills/wix-headless-fast/guides/migration.md +43 -0
  24. package/skills/wix-headless-fast/guides/reference-mode.md +100 -0
  25. package/skills/wix-headless-fast/install/AGENTS.md +9 -4
  26. package/skills/wix-headless-fast/install/agents-md.mjs +5 -1
  27. package/skills/wix-headless-fast/install/attach.mjs +25 -47
  28. package/skills/wix-headless-fast/install/check.mjs +87 -0
  29. package/skills/wix-headless-fast/install/context.mjs +126 -0
  30. package/skills/wix-headless-fast/install/deploy.mjs +106 -80
  31. package/skills/wix-headless-fast/install/lock.mjs +55 -0
  32. package/skills/wix-headless-fast/install/setup.mjs +83 -23
  33. package/skills/wix-headless-fast/install/templates.mjs +168 -0
  34. package/skills/wix-manage/SKILL.md +3 -3
  35. package/skills/wix-manage/references/app-installation/install-wix-apps.md +68 -2
  36. package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +37 -4
  37. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +29 -3
  38. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
  39. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
  40. package/skills/wix-manage/references/sites/site-import.md +101 -37
  41. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -303
  42. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
  43. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
  44. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
  45. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
  46. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
  47. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
  48. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
  49. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
  50. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
  51. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
  52. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
  53. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
  54. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
  55. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
  56. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
  57. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
  58. package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
  59. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
  60. package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
  61. package/skills/wix-headless-fast/references/blog/seed/read-site.mjs +0 -22
  62. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
  63. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -277
  64. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
  65. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
  66. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
  67. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
  68. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
  69. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
  70. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
  71. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
  72. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
  73. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
  74. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
  75. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
  76. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
  77. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
  78. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
  79. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
  80. package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
  81. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
  82. package/skills/wix-headless-fast/references/bookings/seed/read-site.mjs +0 -28
  83. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
  84. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -355
  85. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
  86. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
  87. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
  88. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
  89. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
  90. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
  91. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
  92. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
  93. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
  94. package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
  95. package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
  96. package/skills/wix-headless-fast/references/cms/seed/read-site.mjs +0 -20
  97. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
  98. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -307
  99. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
  100. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
  101. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
  102. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
  103. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
  104. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
  105. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
  106. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
  107. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
  108. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
  109. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
  110. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
  111. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
  112. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
  113. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
  114. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
  115. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
  116. package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
  117. package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
  118. package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
  119. package/skills/wix-headless-fast/references/events/seed/read-site.mjs +0 -26
  120. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
  121. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -340
  122. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
  123. package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
  124. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
  125. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
  126. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
  127. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
  128. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
  129. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
  130. package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
  131. package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
  132. package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
  133. package/skills/wix-headless-fast/references/forms/seed/read-site.mjs +0 -20
  134. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
  135. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -316
  136. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
  137. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
  138. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
  139. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
  140. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
  141. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
  142. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
  143. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
  144. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
  145. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
  146. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
  147. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
  148. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
  149. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
  150. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
  151. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
  152. package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
  153. package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
  154. package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
  155. package/skills/wix-headless-fast/references/members/seed/read-site.mjs +0 -15
  156. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
  157. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -315
  158. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
  159. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
  160. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
  161. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
  162. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
  163. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
  164. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
  165. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
  166. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
  167. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
  168. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
  169. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
  170. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
  171. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
  172. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
  173. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
  174. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
  175. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
  176. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
  177. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
  178. package/skills/wix-headless-fast/references/portfolio/seed/read-site.mjs +0 -20
  179. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -256
  180. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -296
  181. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
  182. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
  183. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
  184. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
  185. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
  186. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
  187. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
  188. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
  189. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
  190. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
  191. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
  192. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
  193. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
  194. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
  195. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
  196. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
  197. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
  198. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
  199. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
  200. package/skills/wix-headless-fast/references/pricing-plans/seed/read-site.mjs +0 -21
  201. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
  202. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -360
  203. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
  204. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
  205. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
  206. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
  207. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
  208. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
  209. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
  210. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
  211. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
  212. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
  213. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
  214. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
  215. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
  216. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
  217. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
  218. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
  219. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
  220. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
  221. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
  222. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
  223. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
  224. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
  225. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
  226. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
  227. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
  228. package/skills/wix-headless-fast/references/restaurants/seed/read-site.mjs +0 -25
  229. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -499
  230. package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
  231. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
  232. package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
  233. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
  234. package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
  235. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
  236. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
  237. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
  238. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
  239. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
  240. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
  241. package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
  242. package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
  243. package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
  244. package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
  245. package/skills/wix-headless-fast/references/shared/seed/read-site.mjs +0 -99
  246. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -612
  247. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
  248. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
  249. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
  250. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
  251. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
  252. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
  253. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
  254. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
  255. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
  256. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
  257. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
  258. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -314
  259. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
  260. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
  261. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
  262. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -169
  263. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
  264. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
  265. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
  266. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
  267. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -130
  268. package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +0 -38
  269. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -561
@@ -1,106 +0,0 @@
1
- // Plan rules and DTO mapping — transport-agnostic, imported by BOTH transports: ./plans.ts (the
2
- // SDK, managed Astro and React) and the REST twin in references/pricing-plans/rest/plans.ts
3
- // (fetch, a static site or a port to another language). Every rule about prices, billing labels,
4
- // perks, buyability, images lives HERE, once. A raw plan may come from the SDK (`_id`, image as a
5
- // `wix:image://` string) or from REST (`id`, image as { id, url }); the mappers accept both.
6
- // Imports are type-only so a strip to JS emits no imports.
7
- import type { PlanDetail, PlanSummary } from "./types";
8
-
9
- /** A raw Plans V3 entity as either transport returns it. */
10
- export type Raw = Record<string, any>;
11
- /** Media value + size → https URL. Injected: the SDK transport scales through @wix/sdk, REST through the URL form. */
12
- export type ImgSrc = (value: any, width: number, height: number) => string;
13
-
14
- const id = (raw: Raw | undefined): string => raw?._id ?? raw?.id ?? "";
15
-
16
- // ---- query ----------------------------------------------------------------------------------------
17
-
18
- export interface PlansQueryOptions {
19
- /** 1–100, default 100 (the grid shows every public plan). */
20
- limit?: number;
21
- /** One plan by URL slug (the detail page). */
22
- slug?: string;
23
- }
24
-
25
- /**
26
- * The Query Plans body both transports send: only PUBLIC plans (a HIDDEN plan is merchant-assigned
27
- * and never listed), cursor paging, and the slug when one plan is wanted. The SDK builder spells the
28
- * same filter as `.eq("visibility", "PUBLIC")`.
29
- */
30
- export function plansQuery({ limit = 100, slug }: PlansQueryOptions = {}): Raw {
31
- if (!Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error("limit must be between 1 and 100.");
32
- const filter: Raw = { visibility: "PUBLIC" };
33
- if (slug) filter.slug = slug;
34
- return { filter, cursorPaging: { limit } };
35
- }
36
-
37
- // ---- price rules ----------------------------------------------------------------------------------
38
-
39
- /** "€29.00" in the visitor's locale for the plan's currency; "Free" for no or zero amount. Never assume USD. */
40
- export function formatPrice(value: string | undefined, currency: string | undefined): string {
41
- if (value == null || value === "" || Number(value) === 0) return "Free";
42
- try {
43
- return new Intl.NumberFormat(undefined, { style: "currency", currency: currency || "USD" }).format(Number(value));
44
- } catch {
45
- return `${value} ${currency ?? ""}`.trim();
46
- }
47
- }
48
-
49
- /**
50
- * billingTerms → a display label. billingCycle.count is a STRING on both transports ("1") — Number()
51
- * it. No billingCycle → a one-time payment; endType CYCLES_COMPLETED with billingCycleCount 1 also
52
- * bills once; more cycles read "per month × 6".
53
- */
54
- export function billingLabel(terms: Raw | undefined): string {
55
- const cycle = terms?.billingCycle;
56
- if (!cycle) return "one-time";
57
- const cyclesTotal = Number(terms?.cyclesCompletedDetails?.billingCycleCount ?? 0);
58
- if (terms?.endType === "CYCLES_COMPLETED" && cyclesTotal === 1) return "one-time";
59
- const count = Number(cycle.count ?? 1) || 1;
60
- const period = String(cycle.period ?? "MONTH").toLowerCase();
61
- const base = count === 1 ? `per ${period}` : `every ${count} ${period}s`;
62
- return terms?.endType === "CYCLES_COMPLETED" && cyclesTotal > 1 ? `${base} × ${cyclesTotal}` : base;
63
- }
64
-
65
- /**
66
- * The plan's image as a value imgSrc resolves: the SDK hands a `wix:image://…` string; REST hands
67
- * an Image object { id, url } — its url when present, else the media id in the wix:image form the
68
- * URL builder scales. "" when the plan has no image.
69
- */
70
- export function planImage(raw: Raw): string {
71
- const img = raw.image;
72
- if (!img) return "";
73
- if (typeof img === "string") return img;
74
- if (img.url) return String(img.url);
75
- return img.id ? `wix:image://v1/${img.id}/${img.id}` : "";
76
- }
77
-
78
- // ---- DTO mappers -----------------------------------------------------------------------------------
79
-
80
- /**
81
- * The price is DISPLAY-ONLY: a decimal string at pricingVariants[0].pricingStrategies[0]
82
- * .flatRate.amount ("0" = free), paired with plan.currency (site-derived). Wix settles the actual
83
- * charge, tax, and schedule at the hosted checkout.
84
- */
85
- export function toSummary(raw: Raw, imgSrc: ImgSrc): PlanSummary {
86
- const variant: Raw = raw.pricingVariants?.[0] ?? {};
87
- const amount: string | undefined = variant.pricingStrategies?.[0]?.flatRate?.amount;
88
- const free = amount == null || Number(amount) === 0;
89
- return {
90
- id: id(raw),
91
- slug: raw.slug ?? "",
92
- name: raw.name ?? "",
93
- description: raw.description ?? "",
94
- price: free ? "Free" : formatPrice(amount, raw.currency),
95
- free,
96
- billing: free ? "" : billingLabel(variant.billingTerms),
97
- freeTrialDays: variant.freeTrialDays || null,
98
- perks: ((raw.perks ?? []) as Raw[]).map((p) => p.description ?? "").filter((d: string) => d),
99
- buyable: raw.buyable === true, // a PUBLIC plan can still be merchant-assigned — no CTA then
100
- imageUrl: imgSrc(planImage(raw), 800, 800),
101
- };
102
- }
103
-
104
- export function toDetail(raw: Raw, imgSrc: ImgSrc): PlanDetail {
105
- return { ...toSummary(raw, imgSrc), termsAndConditions: raw.termsAndConditions ?? "" };
106
- }
@@ -1,64 +0,0 @@
1
- // The plans listing as a framework-free store — the logic behind usePlans, usable from React
2
- // (usePlans wraps it with useSyncExternalStore), from a static page or Vue/Svelte (subscribe and
3
- // render), or as the specification for a port. State, subscribe/getState, start/stop, emit after
4
- // every change.
5
- //
6
- // SSR-friendly: seed with `initialPlans` and they render at once with no client fetch; without a
7
- // seed `start()` fetches the public plans. A failed load leaves `plans: []` with the message in
8
- // `error`, so the surface renders its empty state and the message, never a skeleton forever.
9
- //
10
- // One store per mounted listing (a pricing page and a home-page strip can coexist): createPlansStore(),
11
- // not a singleton. It imports the data layer by names the REST twin exports identically, so the
12
- // same file runs over the SDK in Astro and over REST on a static page.
13
- import { fetchPlans } from "./plans";
14
- import type { PlanSummary } from "./types";
15
-
16
- export interface PlansStoreOptions {
17
- initialPlans?: PlanSummary[];
18
- }
19
-
20
- /** Everything a pricing grid renders from. Read it with getState() or through a subscription. */
21
- export interface PlansState {
22
- /** null while the first load is in flight — render skeletons, not an empty state. */
23
- plans: PlanSummary[] | null;
24
- error: string | null;
25
- }
26
-
27
- export interface PlansStore {
28
- getState(): PlansState;
29
- subscribe(listener: () => void): () => void;
30
- /** Fetch the plans when no `initialPlans` were given. Call once when mounted (a browser). */
31
- start(): void;
32
- /** Stop reacting; drop a late response. */
33
- stop(): void;
34
- }
35
-
36
- export function createPlansStore({ initialPlans }: PlansStoreOptions = {}): PlansStore {
37
- let state: PlansState = { plans: initialPlans ?? null, error: null };
38
- let started = false;
39
- const listeners = new Set<() => void>();
40
-
41
- function setState(patch: Partial<PlansState>): void {
42
- state = { ...state, ...patch };
43
- for (const fn of listeners) fn();
44
- }
45
-
46
- return {
47
- getState: () => state,
48
- subscribe(fn) {
49
- listeners.add(fn);
50
- return () => listeners.delete(fn);
51
- },
52
- start() {
53
- if (started) return;
54
- started = true;
55
- if (initialPlans) return;
56
- fetchPlans()
57
- .then((plans) => { if (started) setState({ plans }); })
58
- .catch((e) => { if (started) setState({ plans: [], error: e instanceof Error ? e.message : String(e) }); });
59
- },
60
- stop() {
61
- started = false;
62
- },
63
- };
64
- }
@@ -1,27 +0,0 @@
1
- // Plan reads (Wix Pricing Plans, Plans V3) over the SDK — the only file that touches raw plan
2
- // entities on this transport. Everything it returns is a plain DTO from ./types. The rules and
3
- // mappers live in ./plans-core (shared with the REST twin in references/pricing-plans/rest/);
4
- // this file is the transport only. Copy as-is; extend by adding functions, not by editing these.
5
- //
6
- // The read module is plansV3 — NOT `plans` (that's the V2 namespace; it has no queryPlans).
7
- // docs: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/plans-v3/query-plans.md
8
- import { plansV3 } from "@wix/pricing-plans";
9
- import { wixModule } from "../sdk";
10
- import { imgSrc } from "../media";
11
- import { toDetail, toSummary, type Raw } from "./plans-core";
12
- import type { PlanDetail, PlanSummary } from "./types";
13
-
14
- const plans = wixModule(plansV3);
15
-
16
- /** List the public plans for the pricing grid, as card-ready DTOs. */
17
- export async function fetchPlans({ limit = 100 } = {}): Promise<PlanSummary[]> {
18
- const res = await plans.queryPlans().eq("visibility", "PUBLIC").limit(limit).find();
19
- return (res.items ?? []).map((p) => toSummary(p as Raw, imgSrc));
20
- }
21
-
22
- /** Fetch one public plan by its URL slug. Null when not found. */
23
- export async function fetchPlanBySlug(slug: string): Promise<PlanDetail | null> {
24
- const res = await plans.queryPlans().eq("visibility", "PUBLIC").eq("slug", slug).limit(1).find();
25
- const raw = res.items?.[0];
26
- return raw ? toDetail(raw as Raw, imgSrc) : null;
27
- }
@@ -1,43 +0,0 @@
1
- // Purchase rules — transport-agnostic, imported by both ./purchase.ts (SDK) and the REST twin in
2
- // references/pricing-plans/rest/purchase.ts (fetch). The redirect-session body for a plan and the
3
- // reading of its result live HERE, once. Type-only imports: a strip to JS emits none.
4
- import type { Raw } from "./plans-core";
5
-
6
- export interface PurchaseOptions {
7
- /**
8
- * Success-only return URL — Wix appends `?planOrderId=<GUID>` to it. Omit → Wix shows its
9
- * hosted thank-you page, then returns to postFlowUrl. Point it at a page of yours only if
10
- * that page reads the param and renders a real confirmation.
11
- */
12
- thankYouPageUrl?: string;
13
- /**
14
- * Where a completed, abandoned, or interrupted flow returns (default: the current page).
15
- * Landing here is NOT a success signal — only thankYouPageUrl carries one.
16
- */
17
- postFlowUrl?: string;
18
- }
19
-
20
- /**
21
- * The Create Redirect Session body for a plan: `paidPlansCheckout: { planId }` plus the callbacks.
22
- * postFlowUrl defaults to the current page (browser); a server caller passes it explicitly.
23
- * The return origin must be the site's real https origin as registered on the OAuth app's allowed
24
- * domains — an unlisted or http origin 403s on return.
25
- */
26
- export function purchaseBody(planId: string, { thankYouPageUrl, postFlowUrl }: PurchaseOptions = {}): Raw {
27
- if (!planId) throw new Error("A plan id is required to start checkout.");
28
- const href = typeof window !== "undefined" ? window.location.href : "";
29
- return {
30
- paidPlansCheckout: { planId },
31
- callbacks: {
32
- postFlowUrl: postFlowUrl ?? (href || undefined),
33
- ...(thankYouPageUrl ? { thankYouPageUrl } : {}),
34
- },
35
- };
36
- }
37
-
38
- /** The hosted checkout URL out of a redirect-session response; throws when there is none. */
39
- export function redirectUrl(session: Raw | null | undefined): string {
40
- const url = session?.redirectSession?.fullUrl;
41
- if (!url) throw new Error("Checkout couldn't start — please try again.");
42
- return url;
43
- }
@@ -1,22 +0,0 @@
1
- // The purchase flow over the SDK: one call that turns a plan id into a Wix-hosted checkout URL.
2
- // Purchasing a plan is a MEMBER action, but the hosted flow handles member login/signup,
3
- // the order form, and payment itself — so this works from an anonymous visitor session.
4
- // Never create the order yourself (orders.createOnlineOrder needs a logged-in member and
5
- // still leaves payment unhandled); never hand-build a checkout URL. The body and the result
6
- // reading live in ./purchase-core (shared with the REST twin); this file is the transport only.
7
- // Copy as-is.
8
- // docs: https://dev.wix.com/docs/api-reference/business-management/headless/redirects/create-redirect-session.md
9
- import { redirects as redirectsModule } from "@wix/redirects";
10
- import { wixModule } from "../sdk";
11
- import { purchaseBody, redirectUrl, type PurchaseOptions } from "./purchase-core";
12
- import type { Raw } from "./plans-core";
13
-
14
- export type { PurchaseOptions };
15
-
16
- const redirects = wixModule(redirectsModule);
17
-
18
- /** Start the hosted purchase for a plan; resolves to the URL to send the browser to. */
19
- export async function purchasePlan(planId: string, options: PurchaseOptions = {}): Promise<string> {
20
- const session: Raw = await redirects.createRedirectSession(purchaseBody(planId, options) as any);
21
- return redirectUrl(session);
22
- }
@@ -1,30 +0,0 @@
1
- // Pricing Plans DTOs — the serializable shapes every hook, component, and page consumes.
2
- // Plain JSON: safe as Astro island props or across server/client boundaries. Images are
3
- // resolved https URLs; every displayable price is a ready formatted string.
4
-
5
- /** A plan as a pricing-grid card needs it. */
6
- export interface PlanSummary {
7
- id: string;
8
- slug: string;
9
- name: string;
10
- description: string;
11
- /** Formatted price (e.g. "$29.00"); "Free" when the plan costs nothing. */
12
- price: string;
13
- free: boolean;
14
- /** Display-ready cadence: "per month", "every 3 months", "one-time"; "" for free plans. */
15
- billing: string;
16
- /** Free-trial length in days (null when the plan has none). */
17
- freeTrialDays: number | null;
18
- /** Display-only feature bullets, in order. */
19
- perks: string[];
20
- /** False → a PUBLIC but merchant-assigned plan: show it without a subscribe CTA. */
21
- buyable: boolean;
22
- /** Resolved https URL ("" when the plan has no image). */
23
- imageUrl: string;
24
- }
25
-
26
- /** A plan as the detail page needs it. */
27
- export interface PlanDetail extends PlanSummary {
28
- /** Terms & conditions as plain text ("" when not set) — render as-is (pre-wrap). */
29
- termsAndConditions: string;
30
- }
@@ -1,41 +0,0 @@
1
- ---
2
- // The site chrome for every pricing-plans page — THIS file (header/footer/nav) plus the
3
- // @theme token block in src/styles/global.css are what you brand. Keep the
4
- // <slot name="seo-tags" /> in <head> and the global.css import. (Deploy is fill-only: if
5
- // another vertical is already deployed, its SiteLayout won — merge a Plans nav link there
6
- // instead.)
7
- import "../styles/global.css";
8
-
9
- interface Props {
10
- title: string;
11
- description?: string;
12
- }
13
- const { title, description } = Astro.props;
14
- ---
15
-
16
- <!doctype html>
17
- <html lang="en">
18
- <head>
19
- <meta charset="UTF-8" />
20
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
21
- <title>{title}</title>
22
- {description && <meta name="description" content={description} />}
23
- <slot name="seo-tags" />
24
- </head>
25
- <body>
26
- <header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
27
- <div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
28
- <a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
29
- <nav class="flex items-center gap-6 text-sm">
30
- <a href="/plans" class="text-foreground no-underline transition-colors hover:text-muted-foreground">Plans</a>
31
- </nav>
32
- </div>
33
- </header>
34
- <main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
35
- <slot />
36
- </main>
37
- <footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
38
- © Brand Name
39
- </footer>
40
- </body>
41
- </html>
@@ -1,40 +0,0 @@
1
- ---
2
- // Plan detail page.
3
- //
4
- // Pricing Plans has no documented owner-editable SEO item type (unlike bookings services /
5
- // store products), so this page carries plain <title>/<meta> from the DTO — no wixMetadata,
6
- // no <SEO.Tags>. The island is client:load: the plan arrives as an SSR-fetched prop; only
7
- // the purchase action runs client-side.
8
- import SiteLayout from "../../layouts/SiteLayout.astro";
9
- import PlanDetailView from "../../components/pricing-plans/PlanDetailView";
10
- import { fetchPlanBySlug } from "../../wix/pricing-plans/plans";
11
- import type { PlanDetail } from "../../wix/pricing-plans/types";
12
-
13
- const slug = Astro.params.slug!;
14
-
15
- let plan: PlanDetail | null = null;
16
- try {
17
- plan = await fetchPlanBySlug(slug);
18
- } catch {
19
- // Guarded: an unhandled SSR throw truncates the response mid-stream.
20
- }
21
-
22
- if (!plan) {
23
- return new Response(null, { status: 404 });
24
- }
25
- ---
26
-
27
- <SiteLayout title={plan.name} description={plan.description || undefined}>
28
- <div class="mx-auto max-w-2xl">
29
- {plan.imageUrl && (
30
- <div class="mb-6 aspect-[16/9] overflow-hidden rounded-xl bg-secondary">
31
- <img src={plan.imageUrl} alt={plan.name} class="h-full w-full object-cover" />
32
- </div>
33
- )}
34
- <h1 class="text-2xl font-semibold tracking-tight">{plan.name}</h1>
35
- {plan.description && <p class="mt-2 text-muted-foreground">{plan.description}</p>}
36
- <div class="mt-6">
37
- <PlanDetailView client:load plan={plan} />
38
- </div>
39
- </div>
40
- </SiteLayout>
@@ -1,21 +0,0 @@
1
- ---
2
- // Plans & Pricing — data fetched SERVER-SIDE (SEO) and handed to the island as DTO props.
3
- // Keep this frontmatter; swap the island import to YOUR pricing component.
4
- import SiteLayout from "../layouts/SiteLayout.astro";
5
- import PlansView from "../components/pricing-plans/PlansView";
6
- import { fetchPlans } from "../wix/pricing-plans/plans";
7
- import type { PlanSummary } from "../wix/pricing-plans/types";
8
-
9
- let plans: PlanSummary[] = [];
10
- try {
11
- plans = await fetchPlans();
12
- } catch {
13
- // An unguarded SSR throw truncates the response mid-stream; the island renders the
14
- // empty state instead.
15
- }
16
- ---
17
-
18
- <SiteLayout title="Plans & Pricing">
19
- <h1 class="mb-8 text-2xl font-semibold tracking-tight">Plans &amp; Pricing</h1>
20
- <PlansView client:load initialPlans={plans} />
21
- </SiteLayout>