@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,94 +0,0 @@
1
- // Table-reservation rules and DTO mapping — transport-agnostic, imported by both
2
- // ./reservations.ts (SDK) and the REST twin in references/restaurants/rest/reservations.ts (fetch).
3
- // The flow is location → AVAILABLE slots → hold (10-minute temporary reservation) → reserve with
4
- // the visitor's details; a reservation is a hold, not a purchase. Raw entities carry `_id` (SDK)
5
- // or `id` (REST); slot dates arrive as Date (SDK) or ISO string (REST). Imports are type-only.
6
- import type {
7
- ReservationConfirmation,
8
- ReservationHold,
9
- ReservationLocationInfo,
10
- ReservationReservee,
11
- ReservationSlot,
12
- } from "./types";
13
- import type { Raw } from "./menu-core";
14
-
15
- export const rawId = (raw: Raw | undefined | null): string => raw?._id ?? raw?.id ?? "";
16
-
17
- export function toLocation(raw: Raw): ReservationLocationInfo {
18
- const online = raw.configuration?.onlineReservations ?? {};
19
- return {
20
- id: rawId(raw),
21
- default: raw.default === true,
22
- partySizeMin: online.partySize?.min ?? 1,
23
- partySizeMax: online.partySize?.max ?? 20,
24
- approvalMode: online.approval?.mode ?? "AUTOMATIC",
25
- onlineReservationsEnabled: online.onlineReservationsEnabled === true,
26
- };
27
- }
28
-
29
- /** Active (non-archived) locations, default first. `onlineReservationsEnabled: false` → the premium-gated toggle is off. */
30
- export function toLocations(raws: Raw[]): ReservationLocationInfo[] {
31
- return raws
32
- .filter((l) => l.archived !== true)
33
- .map(toLocation)
34
- .filter((l) => l.id)
35
- .sort((a, b) => Number(b.default) - Number(a.default));
36
- }
37
-
38
- export function toSlot(raw: Raw): ReservationSlot {
39
- const start: Date = raw.startDate instanceof Date ? raw.startDate : new Date(raw.startDate);
40
- let label = "";
41
- let dayKey = "";
42
- try {
43
- label = start.toLocaleTimeString(undefined, { hour: "numeric", minute: "2-digit" });
44
- const pad = (n: number) => String(n).padStart(2, "0");
45
- dayKey = `${start.getFullYear()}-${pad(start.getMonth() + 1)}-${pad(start.getDate())}`;
46
- } catch {
47
- /* label/dayKey stay "" — startIso still books */
48
- }
49
- return {
50
- startIso: start.toISOString(),
51
- label,
52
- dayKey,
53
- durationMinutes: raw.duration ?? 0,
54
- manualApproval: raw.manualApproval === true,
55
- };
56
- }
57
-
58
- /** AVAILABLE slots only — UNAVAILABLE and NON_WORKING_HOURS are dropped (offering them makes the hold fail). */
59
- export function availableSlots(raws: Raw[]): ReservationSlot[] {
60
- return raws.filter((s) => s.status === "AVAILABLE").map(toSlot);
61
- }
62
-
63
- /** The hold's { reservationId, revision } that completeReservation NEEDS; throws when the slot wasn't held. */
64
- export function toHold(res: Raw | null | undefined, startIso: string, partySize: number): ReservationHold {
65
- const reservationId = rawId(res?.reservation);
66
- const revision = res?.reservation?.revision;
67
- if (!reservationId || !revision) {
68
- throw new Error("That time couldn't be held — it may have just been taken. Pick another slot.");
69
- }
70
- return { reservationId, revision: String(revision), startIso, partySize };
71
- }
72
-
73
- /** The reservee body of a reserve: firstName + phone (E.164) REQUIRED, trimmed; optional fields only when filled. */
74
- export function reserveeBody(reservee: ReservationReservee): Raw {
75
- if (!reservee.firstName?.trim() || !reservee.phone?.trim()) {
76
- throw new Error("First name and phone number are required.");
77
- }
78
- return {
79
- firstName: reservee.firstName.trim(),
80
- phone: reservee.phone.trim(),
81
- ...(reservee.lastName?.trim() ? { lastName: reservee.lastName.trim() } : {}),
82
- ...(reservee.email?.trim() ? { email: reservee.email.trim() } : {}),
83
- };
84
- }
85
-
86
- /** RESERVED = confirmed; REQUESTED = pending approval. Throws when the hold expired (no reservation back). */
87
- export function toConfirmation(res: Raw | null | undefined): ReservationConfirmation {
88
- const reservation = res?.reservation;
89
- const reservationId = rawId(reservation);
90
- if (!reservationId) {
91
- throw new Error("The reservation couldn't be completed — the hold may have expired. Start over.");
92
- }
93
- return { reservationId, status: reservation.status === "REQUESTED" ? "REQUESTED" : "RESERVED" };
94
- }
@@ -1,74 +0,0 @@
1
- // Table reservations (@wix/table-reservations) over the SDK — the only file that touches raw
2
- // reservation entities on this transport. Rules and mappers live in ./reservations-core (shared
3
- // with the REST twin in references/restaurants/rest/); this file is the transport only. Copy
4
- // as-is; extend by calling these exports, never by editing them.
5
- //
6
- // getTimeSlots takes POSITIONAL args and a Date (not an ISO string); reserveReservation takes
7
- // THREE positional args (id, reservee, revision) and the only exit from HELD is reserve.
8
- // Failures are loud — surface the message, don't swallow it.
9
- // docs: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservation-locations/list-reservation-locations.md
10
- // docs: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/time-slots/get-time-slots.md
11
- // docs: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservations/create-held-reservation.md
12
- // docs: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservations/reserve-reservation.md
13
- import { reservationLocations, timeSlots, reservations as reservationsModule } from "@wix/table-reservations";
14
- import { wixModule } from "../sdk";
15
- import { availableSlots, reserveeBody, toConfirmation, toHold, toLocations } from "./reservations-core";
16
- import type { Raw } from "./menu-core";
17
- import type { ReservationConfirmation, ReservationHold, ReservationLocationInfo, ReservationReservee, ReservationSlot } from "./types";
18
-
19
- const locationsApi = wixModule(reservationLocations);
20
- const timeSlotsApi = wixModule(timeSlots);
21
- const reservationsApi = wixModule(reservationsModule);
22
-
23
- /**
24
- * Active (non-archived) reservation locations, default first. [] when Table Reservations
25
- * isn't set up. `onlineReservationsEnabled: false` means the premium-gated toggle is off —
26
- * slots and booking won't work; render an honest "reservations aren't open yet" state.
27
- */
28
- export async function fetchReservationLocations(): Promise<ReservationLocationInfo[]> {
29
- const res: Raw = await locationsApi.listReservationLocations();
30
- return toLocations(res.reservationLocations ?? []);
31
- }
32
-
33
- /**
34
- * AVAILABLE reservation slots around a moment for a party size — UNAVAILABLE and
35
- * NON_WORKING_HOURS slots are already filtered out (offering them makes the hold fail).
36
- * `aroundIso` anchors the fan-out: slotsBefore/slotsAfter extra slots on each side.
37
- */
38
- export async function fetchReservationSlots(
39
- locationId: string,
40
- aroundIso: string,
41
- partySize: number,
42
- { slotsBefore = 6, slotsAfter = 6 }: { slotsBefore?: number; slotsAfter?: number } = {},
43
- ): Promise<ReservationSlot[]> {
44
- // The date param is a Date — the SDK types it as Date, not the ISO string the docs show.
45
- const res: Raw = await timeSlotsApi.getTimeSlots(locationId, new Date(aroundIso), partySize, { slotsBefore, slotsAfter });
46
- return availableSlots(res.timeSlots ?? []);
47
- }
48
-
49
- /**
50
- * Hold a slot for 10 minutes while the visitor enters their details. The returned hold
51
- * carries the { reservationId, revision } that completeReservation NEEDS — keep both.
52
- */
53
- export async function holdReservation(locationId: string, startIso: string, partySize: number): Promise<ReservationHold> {
54
- const res: Raw = await reservationsApi.createHeldReservation({
55
- reservationLocationId: locationId,
56
- startDate: new Date(startIso),
57
- partySize,
58
- });
59
- return toHold(res, startIso, partySize);
60
- }
61
-
62
- /**
63
- * Complete a held reservation with the visitor's details. firstName and phone (E.164, e.g.
64
- * "+15551234567") are REQUIRED. A hold expires after 10 minutes — on failure, start a fresh
65
- * hold; never try to update a HELD reservation by other means.
66
- */
67
- export async function completeReservation(
68
- hold: Pick<ReservationHold, "reservationId" | "revision">,
69
- reservee: ReservationReservee,
70
- ): Promise<ReservationConfirmation> {
71
- const body = reserveeBody(reservee);
72
- const res: Raw = await reservationsApi.reserveReservation(hold.reservationId, body, hold.revision);
73
- return toConfirmation(res);
74
- }
@@ -1,168 +0,0 @@
1
- // Restaurants 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. MENU prices come from the Menus API as decimal strings in the site
4
- // currency with NO symbol ("12.50") — the DTO carries the platform's formatted string when
5
- // the response includes one, else the plain decimal (prefix your brand's currency in the UI).
6
- // Order-cart prices (eCom) ARE fully formatted strings.
7
-
8
- /** A dietary/style label on a menu item (e.g. "Vegan", "Spicy"). */
9
- export interface MenuItemLabel {
10
- id: string;
11
- name: string;
12
- /** Resolved https URL ("" when the label has no icon). */
13
- iconUrl: string;
14
- }
15
-
16
- /** One price variant of an item ("Glass" / "Bottle"). An item has price OR variants. */
17
- export interface MenuItemVariant {
18
- variantId: string;
19
- name: string;
20
- /** Display price — formatted when the API provides it, else the decimal amount. */
21
- price: string;
22
- }
23
-
24
- /** One choice inside a modifier group ("Extra cheese"). */
25
- export interface MenuModifier {
26
- id: string;
27
- name: string;
28
- preSelected: boolean;
29
- /** Decimal up-charge amount ("0" = free), site currency, no symbol. */
30
- additionalCharge: string;
31
- inStock: boolean;
32
- }
33
-
34
- /** A modifier group on an item ("Toppings", choose 0–3). DISPLAY-ONLY: modifier
35
- * selections are not sent on the cart line (the API doesn't document that shape). */
36
- export interface MenuModifierGroup {
37
- id: string;
38
- name: string;
39
- required: boolean;
40
- minSelections: number;
41
- maxSelections: number | null;
42
- modifiers: MenuModifier[];
43
- }
44
-
45
- /** A dish/drink as the menu page needs it. */
46
- export interface MenuItem {
47
- id: string;
48
- name: string;
49
- description: string;
50
- /** Display price; null when the item is variant-priced or market-priced. */
51
- price: string | null;
52
- /** True → show "Market price"; the item can't be ordered online. */
53
- marketPrice: boolean;
54
- /** Non-empty exactly when price is null and not marketPrice. */
55
- variants: MenuItemVariant[];
56
- /** Resolved https URL ("" when the item has no image). */
57
- imageUrl: string;
58
- labels: MenuItemLabel[];
59
- modifierGroups: MenuModifierGroup[];
60
- /** False → render "Sold out" and disable add-to-order. */
61
- inStock: boolean;
62
- featured: boolean;
63
- }
64
-
65
- /** A section of a menu ("Appetizers"), items already in display order. */
66
- export interface MenuSection {
67
- id: string;
68
- name: string;
69
- description: string;
70
- /** Resolved https URL ("" when none). */
71
- imageUrl: string;
72
- items: MenuItem[];
73
- }
74
-
75
- /** A whole menu ("Dinner"), sections already in display order. */
76
- export interface MenuData {
77
- id: string;
78
- name: string;
79
- description: string;
80
- /** URL fragment (urlQueryParam), e.g. "dinner". */
81
- slug: string;
82
- sections: MenuSection[];
83
- }
84
-
85
- /** A pickup/delivery method to display (the buyer picks one on the hosted checkout). */
86
- export interface FulfillmentMethodInfo {
87
- id: string;
88
- type: "PICKUP" | "DELIVERY";
89
- name: string;
90
- /** Decimal amounts, site currency, no symbol ("0", "5"). */
91
- fee: string;
92
- minOrderPrice: string;
93
- }
94
-
95
- export interface OrderLine {
96
- /** The cart line id — what update/remove take (NOT the menu item id). */
97
- lineItemId: string;
98
- itemName: string;
99
- quantity: number;
100
- /** Per-unit price, formatted. */
101
- unitPrice: string;
102
- /** Line total, formatted. */
103
- linePrice: string;
104
- /** Resolved https URL ("" when none). */
105
- imageUrl: string;
106
- /** Human-readable selection labels the platform attached (may be empty). */
107
- descriptionLines: string[];
108
- /** Not IN_STOCK → the line can't be checked out as-is. */
109
- status: string;
110
- }
111
-
112
- export interface OrderCart {
113
- lines: OrderLine[];
114
- /** Sum of line quantities. */
115
- itemCount: number;
116
- /** Formatted subtotal (after discounts) — from the cart estimate, not hand-summed. */
117
- subtotal: string;
118
- currency: string;
119
- }
120
-
121
- /** A reservation location as the booking form needs it. */
122
- export interface ReservationLocationInfo {
123
- id: string;
124
- default: boolean;
125
- /** Bound the party-size input to [partySizeMin, partySizeMax]. */
126
- partySizeMin: number;
127
- partySizeMax: number;
128
- /** "AUTOMATIC" confirms instantly; "MANUAL"/"MANUAL_FOR_LARGE_PARTIES" may end REQUESTED. */
129
- approvalMode: "AUTOMATIC" | "MANUAL" | "MANUAL_FOR_LARGE_PARTIES";
130
- /** False (premium-gated toggle off) → slots/booking won't work; show an honest notice. */
131
- onlineReservationsEnabled: boolean;
132
- }
133
-
134
- /** One AVAILABLE reservation time slot. */
135
- export interface ReservationSlot {
136
- /** ISO datetime — pass to holdSlot as-is. */
137
- startIso: string;
138
- /** Display label, e.g. "7:00 PM". */
139
- label: string;
140
- /** "YYYY-MM-DD" in the visitor's timezone — for grouping/labeling. */
141
- dayKey: string;
142
- durationMinutes: number;
143
- /** This slot needs staff approval → the reservation will end REQUESTED, not RESERVED. */
144
- manualApproval: boolean;
145
- }
146
-
147
- /** A 10-minute hold on a slot; completeReservation needs BOTH ids. */
148
- export interface ReservationHold {
149
- reservationId: string;
150
- revision: string;
151
- startIso: string;
152
- partySize: number;
153
- }
154
-
155
- /** The visitor's details. firstName + phone (E.164, e.g. "+15551234567") are REQUIRED. */
156
- export interface ReservationReservee {
157
- firstName: string;
158
- phone: string;
159
- lastName?: string;
160
- email?: string;
161
- }
162
-
163
- /** The outcome of completing a reservation. */
164
- export interface ReservationConfirmation {
165
- reservationId: string;
166
- /** RESERVED = confirmed; REQUESTED = pending the restaurant's approval — tell the visitor. */
167
- status: "RESERVED" | "REQUESTED";
168
- }
@@ -1,47 +0,0 @@
1
- ---
2
- // The site chrome for every restaurant page — THIS file (header/footer/nav) plus the @theme
3
- // token block in src/styles/global.css are what you brand. Keep the <slot name="seo-tags" />
4
- // in <head>, the global.css import, and one OrderCartButton in the header + one
5
- // OrderCartDrawer per page (both client:only — they read browser cart state and must not
6
- // server-render). (If another vertical is also deployed, its SiteLayout may have won; merge
7
- // the Menu/Reservations nav links and the order-cart mounts there instead.)
8
- import OrderCartButton from "../components/restaurants/OrderCartButton";
9
- import OrderCartDrawer from "../components/restaurants/OrderCartDrawer";
10
- import "../styles/global.css";
11
-
12
- interface Props {
13
- title: string;
14
- description?: string;
15
- }
16
- const { title, description } = Astro.props;
17
- ---
18
-
19
- <!doctype html>
20
- <html lang="en">
21
- <head>
22
- <meta charset="UTF-8" />
23
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
24
- <title>{title}</title>
25
- {description && <meta name="description" content={description} />}
26
- <slot name="seo-tags" />
27
- </head>
28
- <body>
29
- <header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
30
- <div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
31
- <a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
32
- <nav class="flex items-center gap-6 text-sm">
33
- <a href="/menu" class="text-foreground no-underline transition-colors hover:text-muted-foreground">Menu</a>
34
- <a href="/reservations" class="text-foreground no-underline transition-colors hover:text-muted-foreground">Reservations</a>
35
- <OrderCartButton client:only="react" />
36
- </nav>
37
- </div>
38
- </header>
39
- <main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
40
- <slot />
41
- </main>
42
- <footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
43
- © Brand Name
44
- </footer>
45
- <OrderCartDrawer client:only="react" />
46
- </body>
47
- </html>
@@ -1,22 +0,0 @@
1
- ---
2
- // Menu page — the full menu tree fetched SERVER-SIDE (SEO: dish names in view-source) and
3
- // handed to the island as DTO props. Keep this frontmatter; swap the island import to YOUR
4
- // menu component. The island is client:load — add-to-order needs the browser.
5
- import SiteLayout from "../layouts/SiteLayout.astro";
6
- import MenuView from "../components/restaurants/MenuView";
7
- import { fetchMenus } from "../wix/restaurants/menu";
8
- import type { MenuData } from "../wix/restaurants/types";
9
-
10
- let menus: MenuData[] = [];
11
- try {
12
- menus = await fetchMenus();
13
- } catch {
14
- // An unguarded SSR throw truncates the response mid-stream; the island renders the
15
- // empty state instead.
16
- }
17
- ---
18
-
19
- <SiteLayout title="Menu">
20
- <h1 class="mb-8 text-2xl font-semibold tracking-tight">Menu</h1>
21
- <MenuView client:load initialMenus={menus} />
22
- </SiteLayout>
@@ -1,12 +0,0 @@
1
- ---
2
- // Reservations page. The surface is client:only — availability is timezone- and
3
- // party-specific, so nothing useful can server-render. Swap the island import to YOUR
4
- // reservation component.
5
- import SiteLayout from "../layouts/SiteLayout.astro";
6
- import ReservationView from "../components/restaurants/ReservationView";
7
- ---
8
-
9
- <SiteLayout title="Reservations" description="Reserve a table">
10
- <h1 class="mb-8 text-2xl font-semibold tracking-tight">Reserve a table</h1>
11
- <ReservationView client:only="react" />
12
- </SiteLayout>