@wix/agent-skills 1.15.0 → 1.16.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 (355) hide show
  1. package/README.md +5 -1
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +4 -1
  4. package/skills/wix-app/references/APP_TOOLS.md +134 -0
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
  6. package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
  7. package/skills/wix-app/references/DATA_COLLECTION.md +6 -4
  8. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +28 -7
  9. package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
  10. package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
  11. package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
  12. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
  13. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
  14. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
  15. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +138 -0
  16. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +172 -0
  17. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
  18. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
  19. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
  20. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +33 -2
  21. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
  22. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +18 -1
  23. package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
  24. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -3
  25. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
  26. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
  27. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  28. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
  29. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
  30. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
  31. package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
  32. package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
  33. package/skills/wix-app/references/stores/INVENTORY.md +37 -0
  34. package/skills/wix-app/references/stores/QUERY.md +119 -0
  35. package/skills/wix-app/references/stores/WRITE.md +55 -0
  36. package/skills/wix-docs/SKILL.md +35 -3
  37. package/skills/wix-headless/SKILL.md +9 -2
  38. package/skills/wix-headless/entry/bootstrap.mjs +2 -2
  39. package/skills/wix-headless/entry/skill.md +0 -2
  40. package/skills/wix-headless/references/CAPABILITIES.md +6 -4
  41. package/skills/wix-headless/references/CONTENT.md +36 -0
  42. package/skills/wix-headless/references/DESIGN.md +54 -0
  43. package/skills/wix-headless/references/DISCOVERY.md +25 -1
  44. package/skills/wix-headless/references/FEEDBACK.md +16 -5
  45. package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
  46. package/skills/wix-headless/references/SDK_HANDOFF.md +2 -0
  47. package/skills/wix-headless/references/SEED.md +3 -1
  48. package/skills/wix-headless/references/SETUP.md +1 -1
  49. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
  50. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +42 -2
  51. package/skills/wix-headless/references/inline-recipes/setup-bookings.md +5 -1
  52. package/skills/wix-headless/references/inline-recipes/setup-forms.md +1 -1
  53. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +33 -8
  54. package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +3 -1
  55. package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
  56. package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +38 -2
  57. package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +20 -1
  58. package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +1 -1
  59. package/skills/wix-headless/references/managed/CONNECT.md +2 -2
  60. package/skills/wix-headless/references/managed/CREATE.md +15 -1
  61. package/skills/wix-headless/references/managed/DEPLOYMENT.md +47 -0
  62. package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +8 -0
  63. package/skills/wix-headless/references/stripe/DEPLOYMENT.md +8 -0
  64. package/skills/wix-manage/SKILL.md +131 -12
  65. package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +41 -0
  66. package/skills/wix-manage/references/analytics/query-site-analytics.md +66 -9
  67. package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
  68. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
  69. package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
  70. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
  71. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
  72. package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
  73. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
  74. package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
  75. package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +85 -42
  76. package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
  77. package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
  78. package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
  79. package/skills/wix-manage/references/cms/cms-schema-management.md +33 -1
  80. package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
  81. package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
  82. package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
  83. package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
  84. package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
  85. package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
  86. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
  87. package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
  88. package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
  89. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
  90. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
  91. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
  92. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
  93. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
  94. package/skills/wix-manage/references/events/create-wix-event.md +176 -0
  95. package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
  96. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
  97. package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
  98. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
  99. package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
  100. package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
  101. package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
  102. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
  103. package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
  104. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
  105. package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
  106. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +225 -144
  107. package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +19 -10
  108. package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
  109. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
  110. package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
  111. package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
  112. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
  113. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
  114. package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
  115. package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
  116. package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
  117. package/skills/wix-manage/references/sites/site-import.md +243 -0
  118. package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
  119. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
  120. package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
  121. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +16 -10
  122. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
  123. package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
  124. package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
  125. package/skills/wix-replatform/.publish-manifest.json +8 -0
  126. package/skills/wix-replatform/SKILL.md +693 -0
  127. package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
  128. package/skills/wix-replatform/lib/completion-report.js +200 -0
  129. package/skills/wix-replatform/lib/config-env.js +59 -0
  130. package/skills/wix-replatform/lib/execution-manifest.js +185 -0
  131. package/skills/wix-replatform/lib/execution-state.js +173 -0
  132. package/skills/wix-replatform/lib/import-recovery.js +313 -0
  133. package/skills/wix-replatform/lib/local-state.js +642 -0
  134. package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
  135. package/skills/wix-replatform/lib/orchestration-router.js +122 -0
  136. package/skills/wix-replatform/lib/orchestration-state.js +455 -0
  137. package/skills/wix-replatform/lib/progress-log.js +224 -0
  138. package/skills/wix-replatform/lib/progress-log.sh +140 -0
  139. package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
  140. package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
  141. package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
  142. package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
  143. package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
  144. package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
  145. package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
  146. package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
  147. package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
  148. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
  149. package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
  150. package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
  151. package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
  152. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
  153. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
  154. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
  155. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
  156. package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
  157. package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
  158. package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
  159. package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
  160. package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
  161. package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
  162. package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
  163. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
  164. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
  165. package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
  166. package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
  167. package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
  168. package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
  169. package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
  170. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
  171. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
  172. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
  173. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
  174. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
  175. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
  176. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
  177. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
  178. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
  179. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
  180. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
  181. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
  182. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
  183. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
  184. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
  185. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
  186. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
  187. package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
  188. package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
  189. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
  190. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
  191. package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
  192. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
  193. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
  194. package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
  195. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
  196. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
  197. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
  198. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
  199. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
  200. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
  201. package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
  202. package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
  203. package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
  204. package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
  205. package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
  206. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
  207. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
  208. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
  209. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
  210. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
  211. package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
  212. package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
  213. package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
  214. package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
  215. package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
  216. package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
  217. package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
  218. package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
  219. package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
  220. package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
  221. package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
  222. package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
  223. package/skills/wix-vibe-headless/SKILL.md +54 -25
  224. package/skills/wix-vibe-headless/install/deploy.cjs +95 -0
  225. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
  226. package/skills/wix-vibe-headless/platforms/README.md +26 -0
  227. package/skills/wix-vibe-headless/platforms/base44.md +177 -0
  228. package/skills/wix-vibe-headless/platforms/generic.md +122 -0
  229. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +230 -119
  230. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
  231. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
  232. package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
  233. package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
  234. package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
  235. package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
  236. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
  237. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
  238. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
  239. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
  240. package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
  241. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +260 -145
  242. package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
  243. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
  244. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
  245. package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
  246. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
  247. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
  248. package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
  249. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
  250. package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
  251. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
  252. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +90 -12
  253. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
  254. package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
  255. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +169 -147
  256. package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
  257. package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
  258. package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
  259. package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
  260. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +228 -131
  261. package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
  262. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
  263. package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
  264. package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
  265. package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
  266. package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
  267. package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
  268. package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
  269. package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
  270. package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
  271. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
  272. package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
  273. package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +3 -2
  274. package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
  275. package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
  276. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +276 -188
  277. package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
  278. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
  279. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
  280. package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
  281. package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
  282. package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
  283. package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
  284. package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
  285. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
  286. package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
  287. package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
  288. package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
  289. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +233 -104
  290. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
  291. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
  292. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
  293. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
  294. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
  295. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
  296. package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
  297. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
  298. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
  299. package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
  300. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
  301. package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +84 -55
  302. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
  303. package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
  304. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +240 -117
  305. package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
  306. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
  307. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
  308. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
  309. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
  310. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
  311. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
  312. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
  313. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
  314. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
  315. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
  316. package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
  317. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +248 -124
  318. package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
  319. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
  320. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
  321. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
  322. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
  323. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
  324. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
  325. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
  326. package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
  327. package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
  328. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
  329. package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
  330. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
  331. package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
  332. package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +6 -0
  333. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +263 -148
  334. package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
  335. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
  336. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
  337. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
  338. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
  339. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
  340. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
  341. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
  342. package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
  343. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
  344. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
  345. package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
  346. package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
  347. package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +25 -2
  348. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
  349. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +299 -0
  350. /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
  351. /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
  352. /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
  353. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
  354. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
  355. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
@@ -0,0 +1,21 @@
1
+ // Header order trigger — an icon button with a live item-count badge. Drop into the app header;
2
+ // opens the OrderCartDrawer. Icon-only by design (no text): reads the header's currentColor, so it
3
+ // inherits the brand automatically.
4
+ import { useOrderCart } from "@/context/OrderCartContext";
5
+
6
+ export default function OrderCartButton() {
7
+ const { itemCount, setIsOpen } = useOrderCart();
8
+ return (
9
+ <button onClick={() => setIsOpen(true)} aria-label={`Open order${itemCount ? `, ${itemCount} item${itemCount > 1 ? "s" : ""}` : ""}`}
10
+ className="relative inline-flex items-center justify-center w-10 h-10 p-0 cursor-pointer bg-transparent text-current border-none rounded-sm">
11
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
12
+ <path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" />
13
+ <path d="M3 6h18" />
14
+ <path d="M16 10a4 4 0 0 1-8 0" />
15
+ </svg>
16
+ {itemCount > 0 && (
17
+ <span className="absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-[5px] inline-flex items-center justify-center text-[11px] font-semibold bg-primary text-primary-foreground rounded-full">{itemCount}</span>
18
+ )}
19
+ </button>
20
+ );
21
+ }
@@ -0,0 +1,60 @@
1
+ // Slide-over order cart. Reads everything from useOrderCart(); mutate by lineItem.id (NOT the menu
2
+ // item id), check out via the context (redirect-session URL). The eCom cart price
3
+ // (line.price.formattedAmount) DOES include the currency symbol, unlike menu prices. Styled with
4
+ // base44 design tokens (shadcn Tailwind classes). Mount it once in the Layout.
5
+ import { useOrderCart } from "@/context/OrderCartContext";
6
+
7
+ export default function OrderCartDrawer() {
8
+ const { cart, isOpen, setIsOpen, removeItem, updateQuantity, checkout, loading } = useOrderCart();
9
+ const lineItems = cart?.lineItems ?? [];
10
+ if (!isOpen) return null;
11
+
12
+ return (
13
+ <div onClick={() => setIsOpen(false)} className="fixed inset-0 z-50 bg-black/40 flex justify-end">
14
+ <aside onClick={(e) => e.stopPropagation()}
15
+ className="w-[min(420px,100%)] h-full flex flex-col bg-background text-foreground border-l border-border font-body">
16
+ <header className="flex justify-between items-center p-4 border-b border-border">
17
+ <strong className="font-display">Your order</strong>
18
+ <button onClick={() => setIsOpen(false)} aria-label="Close order"
19
+ className="border-none bg-transparent cursor-pointer text-xl text-muted-foreground">×</button>
20
+ </header>
21
+
22
+ <div className="flex-1 overflow-y-auto p-4">
23
+ {lineItems.length === 0 ? (
24
+ <p className="text-muted-foreground">Your order is empty.</p>
25
+ ) : lineItems.map((line) => (
26
+ <div key={line.id} className="flex gap-3 py-3 border-b border-border">
27
+ {/* line.id is the lineItemId for mutations — NOT the menu item id */}
28
+ <div className="flex-1 flex flex-col gap-1">
29
+ <span className="font-semibold">{line.productName?.original}</span>
30
+ <div className="flex items-center gap-2 mt-1">
31
+ <QtyButton onClick={() => updateQuantity(line.id, Math.max(1, line.quantity - 1))}>−</QtyButton>
32
+ <span className="min-w-[20px] text-center">{line.quantity}</span>
33
+ <QtyButton onClick={() => updateQuantity(line.id, line.quantity + 1)}>+</QtyButton>
34
+ <button onClick={() => removeItem(line.id)}
35
+ className="ml-auto border-none bg-transparent cursor-pointer text-muted-foreground text-[13px] underline">Remove</button>
36
+ </div>
37
+ </div>
38
+ {/* eCom cart price DOES include the currency symbol (unlike menu prices) */}
39
+ <span className="font-semibold">{line.price?.formattedAmount}</span>
40
+ </div>
41
+ ))}
42
+ </div>
43
+
44
+ {lineItems.length > 0 && (
45
+ <footer className="p-4 border-t border-border">
46
+ <button disabled={loading} onClick={checkout}
47
+ className="w-full p-3 cursor-pointer bg-primary text-primary-foreground border-none rounded-sm text-[15px] font-semibold disabled:opacity-60 disabled:cursor-wait">Checkout</button>
48
+ </footer>
49
+ )}
50
+ </aside>
51
+ </div>
52
+ );
53
+ }
54
+
55
+ function QtyButton({ children, onClick }) {
56
+ return (
57
+ <button onClick={onClick}
58
+ className="w-7 h-7 cursor-pointer leading-none bg-card text-foreground border border-border rounded-sm">{children}</button>
59
+ );
60
+ }
@@ -0,0 +1,63 @@
1
+ // Order-cart state — mirrors the Wix SERVER cart (never a local copy). Wrap the app in
2
+ // <OrderCartProvider>; every component reads useOrderCart(). It also resolves the ordering
3
+ // Operation once on mount (restaurant lines REQUIRE an operationId) and exposes `ordering` — false
4
+ // when no operation is configured, so the UI shows an "ordering unavailable" state instead of
5
+ // throwing. Data wiring is correct as-is — do not restyle or re-derive it.
6
+ import { createContext, useContext, useState, useEffect, useCallback } from "react";
7
+ import {
8
+ getCurrentCart,
9
+ getDefaultOperation,
10
+ addItemToCart,
11
+ removeFromCart as apiRemove,
12
+ updateCartItemQuantity as apiQty,
13
+ checkout as apiCheckout,
14
+ } from "@/rest/wix-restaurants-ordering";
15
+
16
+ const OrderCartContext = createContext(null);
17
+
18
+ export function OrderCartProvider({ children }) {
19
+ const [cart, setCart] = useState(null);
20
+ const [operation, setOperation] = useState(null);
21
+ const [isOpen, setIsOpen] = useState(false);
22
+ const [loading, setLoading] = useState(false);
23
+
24
+ const refreshCart = useCallback(async () => setCart(await getCurrentCart()), []);
25
+ useEffect(() => {
26
+ getDefaultOperation().then(setOperation); // null when no operation is configured
27
+ refreshCart();
28
+ const onVisible = () => document.visibilityState === "visible" && refreshCart();
29
+ document.addEventListener("visibilitychange", onVisible);
30
+ return () => document.removeEventListener("visibilitychange", onVisible);
31
+ }, [refreshCart]);
32
+
33
+ const itemCount = (cart?.lineItems ?? []).reduce((n, li) => n + (li.quantity || 0), 0);
34
+
35
+ // A menu item carries its menuId/sectionId from the getFullMenu tree — the caller passes both.
36
+ // addItemToCart throws on a missing operation/menu/section or an unavailable line; let it propagate.
37
+ const addItem = async (item, { menuId, sectionId }, qty = 1) => {
38
+ if (!operation) throw new Error("Online ordering isn't available for this restaurant right now.");
39
+ setLoading(true);
40
+ try {
41
+ setCart(await addItemToCart(item.id, { operationId: operation.id, menuId, sectionId, quantity: qty }));
42
+ setIsOpen(true);
43
+ } finally { setLoading(false); }
44
+ };
45
+ const removeItem = async (lineItemId) => { setLoading(true); try { setCart(await apiRemove(lineItemId)); } finally { setLoading(false); } };
46
+ const updateQuantity = async (lineItemId, qty) => { setLoading(true); try { setCart(await apiQty(lineItemId, qty)); } finally { setLoading(false); } };
47
+ const checkout = async () => { setLoading(true); try { window.location.href = await apiCheckout(); } finally { setLoading(false); } };
48
+
49
+ return (
50
+ <OrderCartContext.Provider value={{
51
+ cart, operation, ordering: Boolean(operation), itemCount, isOpen, setIsOpen, loading,
52
+ addItem, removeItem, updateQuantity, checkout, refreshCart,
53
+ }}>
54
+ {children}
55
+ </OrderCartContext.Provider>
56
+ );
57
+ }
58
+
59
+ export function useOrderCart() {
60
+ const ctx = useContext(OrderCartContext);
61
+ if (!ctx) throw new Error("useOrderCart must be used within <OrderCartProvider>");
62
+ return ctx;
63
+ }
@@ -0,0 +1,32 @@
1
+ // useItemOrder — the item-dialog's add-to-cart logic, no markup: gate on stock + whether ordering
2
+ // is available, hold the quantity, and add the line through the order cart. The shipped
3
+ // addItemToCart sends operationId + menuId + sectionId + quantity only — the restaurants
4
+ // catalogReference.options shape for price-variant / modifier selections is NOT documented for
5
+ // client add-to-cart, so modifier groups are DISPLAYED for the diner but not sent (see the dialog
6
+ // and INSTRUCTIONS "Extending"). Keep this gating verbatim; the dialog only renders what it returns.
7
+ import { useState } from "react";
8
+ import { useOrderCart } from "@/context/OrderCartContext";
9
+
10
+ export function useItemOrder(item, { menuId, sectionId }) {
11
+ const { addItem, ordering } = useOrderCart();
12
+ const [quantity, setQuantity] = useState(1);
13
+ const [adding, setAdding] = useState(false);
14
+ const [error, setError] = useState(null);
15
+
16
+ const inStock = item?.orderSettings?.inStock !== false;
17
+ const canAdd = ordering && inStock && !adding;
18
+
19
+ async function submit() {
20
+ setError(null);
21
+ setAdding(true);
22
+ try {
23
+ await addItem(item, { menuId, sectionId }, quantity); // opens the cart drawer on success
24
+ } catch (e) {
25
+ setError(e.message); // out-of-stock / no operation surfaces here
26
+ } finally {
27
+ setAdding(false);
28
+ }
29
+ }
30
+
31
+ return { quantity, setQuantity, inStock, ordering, canAdd, adding, error, submit };
32
+ }
@@ -0,0 +1,73 @@
1
+ // useReservation — all table-reservation flow logic, no markup. The bug-prone parts are here and
2
+ // must stay verbatim: skip archived locations; offer only AVAILABLE slots; a HELD reservation
3
+ // carries the { id, revision } that reserveReservation NEEDS and expires in 10 minutes; the
4
+ // confirmed status is RESERVED (auto-approved) or REQUESTED (manual approval pending). firstName +
5
+ // phone (E.164, e.g. "+15551234567") are mandatory. The page only renders what this returns.
6
+ import { useState, useEffect, useCallback } from "react";
7
+ import {
8
+ listReservationLocations,
9
+ getTimeSlots,
10
+ createHeldReservation,
11
+ reserveReservation,
12
+ } from "@/rest/wix-restaurants-reservations";
13
+
14
+ const today = () => new Date().toISOString().slice(0, 10); // yyyy-mm-dd for the date input
15
+
16
+ export function useReservation() {
17
+ const [locations, setLocations] = useState(null);
18
+ const [locationId, setLocationId] = useState(null);
19
+ const [date, setDate] = useState(today());
20
+ const [partySize, setPartySize] = useState(2);
21
+ const [slots, setSlots] = useState(null); // AVAILABLE slots for the current query
22
+ const [held, setHeld] = useState(null); // { id, revision, ... } after hold
23
+ const [reservee, setReservee] = useState({ firstName: "", lastName: "", phone: "", email: "" });
24
+ const [confirmed, setConfirmed] = useState(null); // reservation after reserve
25
+ const [loading, setLoading] = useState(false);
26
+ const [error, setError] = useState(null);
27
+
28
+ useEffect(() => {
29
+ listReservationLocations().then((locs) => {
30
+ const active = locs.filter((l) => l.archived !== true); // archived locations are hidden
31
+ setLocations(active);
32
+ setLocationId(active.find((l) => l.default)?.id ?? active[0]?.id ?? null);
33
+ });
34
+ }, []);
35
+
36
+ // The chosen slot's ISO datetime is passed to hold (getTimeSlots wants an ISO datetime for `date`).
37
+ const findSlots = useCallback(async () => {
38
+ if (!locationId) return;
39
+ setError(null); setSlots(null); setHeld(null); setConfirmed(null); setLoading(true);
40
+ try {
41
+ const iso = new Date(`${date}T19:00:00`).toISOString();
42
+ const { availableTimeSlots } = await getTimeSlots(locationId, iso, partySize);
43
+ setSlots(availableTimeSlots);
44
+ } catch (e) { setError(e.message); } finally { setLoading(false); }
45
+ }, [locationId, date, partySize]);
46
+
47
+ const holdSlot = async (slot) => {
48
+ setError(null); setLoading(true);
49
+ try { setHeld(await createHeldReservation(locationId, slot.startDate, partySize)); }
50
+ catch (e) { setError(e.message); } finally { setLoading(false); }
51
+ };
52
+
53
+ const confirm = async () => {
54
+ if (!held) return;
55
+ setError(null); setLoading(true);
56
+ try {
57
+ const clean = { firstName: reservee.firstName, phone: reservee.phone };
58
+ if (reservee.lastName) clean.lastName = reservee.lastName;
59
+ if (reservee.email) clean.email = reservee.email;
60
+ setConfirmed(await reserveReservation(held.id, held.revision, clean));
61
+ } catch (e) { setError(e.message); setHeld(null); } finally { setLoading(false); }
62
+ };
63
+
64
+ const reset = () => { setHeld(null); setConfirmed(null); setSlots(null); setError(null); };
65
+
66
+ return {
67
+ locations, locationId, setLocationId,
68
+ date, setDate, partySize, setPartySize,
69
+ slots, findSlots, held, holdSlot,
70
+ reservee, setReservee, confirm, confirmed, reset,
71
+ loading, error,
72
+ };
73
+ }
@@ -0,0 +1,28 @@
1
+ // Menu page — the restaurant's main render surface. Loads the assembled getFullMenu() tree once,
2
+ // renders it via MenuList, and opens ItemDialog for a tapped dish (add-to-order lives there).
3
+ // Empty state when there are no menus. Styled with base44 design tokens (shadcn Tailwind classes).
4
+ import { useEffect, useState } from "react";
5
+ import { getFullMenu } from "@/rest/wix-restaurants-menu";
6
+ import MenuList from "@/components/MenuList";
7
+ import ItemDialog from "@/components/ItemDialog";
8
+
9
+ export default function Menu() {
10
+ const [menus, setMenus] = useState(null);
11
+ const [active, setActive] = useState(null); // { item, menuId, sectionId }
12
+
13
+ useEffect(() => { getFullMenu().then(({ menus }) => setMenus(menus)); }, []);
14
+
15
+ return (
16
+ <main className="max-w-[1040px] mx-auto p-4">
17
+ <h1 className="font-display mb-4">Menu</h1>
18
+ {menus === null
19
+ ? <p className="text-muted-foreground">Loading…</p>
20
+ : <MenuList menus={menus} onOpenItem={(item, ctx) => setActive({ item, ...ctx })}
21
+ empty="No menu yet — add one from your Wix dashboard." />}
22
+ {active && (
23
+ <ItemDialog item={active.item} menuId={active.menuId} sectionId={active.sectionId}
24
+ onClose={() => setActive(null)} />
25
+ )}
26
+ </main>
27
+ );
28
+ }
@@ -0,0 +1,102 @@
1
+ // Reservations page — thin view over useReservation (all flow logic lives in the hook). Location
2
+ // picker → date + party size → AVAILABLE slots → hold → details → confirm. Reads the confirmed
3
+ // reservation's top-level status: RESERVED is confirmed, REQUESTED means the location needs manual
4
+ // approval (pending). Styled with base44 design tokens (shadcn Tailwind classes).
5
+ import { useReservation } from "@/hooks/useReservation";
6
+
7
+ const field = "w-full py-2.5 px-3 box-border border border-input rounded-sm bg-background text-foreground font-body";
8
+ const primaryBtn = "py-3 px-6 cursor-pointer border-none rounded-sm bg-primary text-primary-foreground text-[15px] font-semibold";
9
+
10
+ function slotLabel(iso) {
11
+ return new Date(iso).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
12
+ }
13
+ function locationLabel(loc) {
14
+ return loc.location?.name || loc.location?.address?.formatted || "Main location";
15
+ }
16
+
17
+ export default function Reservations() {
18
+ const r = useReservation();
19
+
20
+ if (r.locations === null) return <Centered>Loading…</Centered>;
21
+ if (r.locations.length === 0) return <Centered>Reservations aren't set up yet — enable Table Reservations in your Wix dashboard.</Centered>;
22
+
23
+ if (r.confirmed) {
24
+ const d = r.confirmed.details || {};
25
+ const pending = r.confirmed.status === "REQUESTED";
26
+ return (
27
+ <main className={wrap}>
28
+ <h1 className="font-display">{pending ? "Reservation requested" : "You're booked!"}</h1>
29
+ <p className="text-muted-foreground">
30
+ {pending
31
+ ? "The restaurant will confirm your request shortly."
32
+ : "Your table is confirmed. See you soon!"}
33
+ </p>
34
+ <p>{d.partySize} guests · {d.startDate && new Date(d.startDate).toLocaleString()}</p>
35
+ <button className={primaryBtn} onClick={r.reset}>Make another reservation</button>
36
+ </main>
37
+ );
38
+ }
39
+
40
+ return (
41
+ <main className={wrap}>
42
+ <h1 className="font-display mb-4">Reserve a table</h1>
43
+
44
+ <div className="grid gap-4 [grid-template-columns:repeat(auto-fit,minmax(160px,1fr))]">
45
+ {r.locations.length > 1 && (
46
+ <label>Location
47
+ <select value={r.locationId ?? ""} onChange={(e) => r.setLocationId(e.target.value)} className={field}>
48
+ {r.locations.map((loc) => <option key={loc.id} value={loc.id}>{locationLabel(loc)}</option>)}
49
+ </select>
50
+ </label>
51
+ )}
52
+ <label>Date
53
+ <input type="date" value={r.date} onChange={(e) => r.setDate(e.target.value)} className={field} />
54
+ </label>
55
+ <label>Guests
56
+ <input type="number" min={1} value={r.partySize}
57
+ onChange={(e) => r.setPartySize(Math.max(1, Number(e.target.value) || 1))} className={field} />
58
+ </label>
59
+ </div>
60
+
61
+ <div className="mt-4">
62
+ <button className={primaryBtn} disabled={r.loading} onClick={r.findSlots}>Find a table</button>
63
+ </div>
64
+
65
+ {r.error && <p className="text-destructive">{r.error}</p>}
66
+
67
+ {r.slots && !r.held && (
68
+ r.slots.length === 0
69
+ ? <p className="text-muted-foreground mt-4">No tables available then — try another date or party size.</p>
70
+ : <div className="flex flex-wrap gap-2 mt-4">
71
+ {r.slots.map((slot) => (
72
+ <button key={slot.startDate} onClick={() => r.holdSlot(slot)} disabled={r.loading}
73
+ className="py-2.5 px-4 cursor-pointer border border-border rounded-sm bg-card text-foreground font-semibold">{slotLabel(slot.startDate)}</button>
74
+ ))}
75
+ </div>
76
+ )}
77
+
78
+ {r.held && (
79
+ <form onSubmit={(e) => { e.preventDefault(); r.confirm(); }}
80
+ className="mt-6 flex flex-col gap-3 max-w-[420px]">
81
+ <p className="m-0 text-muted-foreground">
82
+ Holding your table for 10 minutes — enter your details to confirm.
83
+ </p>
84
+ <input required placeholder="First name *" value={r.reservee.firstName}
85
+ onChange={(e) => r.setReservee({ ...r.reservee, firstName: e.target.value })} className={field} />
86
+ <input placeholder="Last name" value={r.reservee.lastName}
87
+ onChange={(e) => r.setReservee({ ...r.reservee, lastName: e.target.value })} className={field} />
88
+ <input required placeholder="Phone (e.g. +15551234567) *" value={r.reservee.phone}
89
+ onChange={(e) => r.setReservee({ ...r.reservee, phone: e.target.value })} className={field} />
90
+ <input type="email" placeholder="Email" value={r.reservee.email}
91
+ onChange={(e) => r.setReservee({ ...r.reservee, email: e.target.value })} className={field} />
92
+ <button type="submit" className={primaryBtn} disabled={r.loading}>Confirm reservation</button>
93
+ </form>
94
+ )}
95
+ </main>
96
+ );
97
+ }
98
+
99
+ const wrap = "max-w-[1040px] mx-auto p-4";
100
+ function Centered({ children }) {
101
+ return <div className="p-12 text-center text-muted-foreground">{children}</div>;
102
+ }
@@ -0,0 +1,180 @@
1
+ # Restaurants — seeding
2
+
3
+ Seed a Wix Restaurants site by **calling `seed-restaurants.js`** — don't hand-write the REST calls.
4
+ It's a build-time module (run via `exec_tool`, not shipped in the app) that abstracts every seed
5
+ operation across the vertical's four recipes: the **menu** (always) plus three on-demand add-ons —
6
+ **online ordering**, **table reservations**, and **experiences**. `require` it and call the functions
7
+ with plain data.
8
+
9
+ > **NOT yet live-verified — transcribed from `setup-restaurants.md`, `setup-restaurant-orders.md`,
10
+ > `setup-restaurant-reservations.md`, `setup-restaurant-experiences.md`.**
11
+
12
+ ## Default: one call
13
+
14
+ `setupRestaurants(ctx, plan)` does the whole seed in one call — installs the Menus app and builds the
15
+ menu **bottom-up (items → sections → menu)** with ids kept in memory, so you never hand-thread ids
16
+ across exec calls. Online ordering and table reservations run only when the plan asks for them.
17
+
18
+ ```js
19
+ // build-time exec_tool
20
+ const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix"); // Base44 (generic: use $TOKEN)
21
+ const fs = require("fs");
22
+ // exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
23
+ const seed = (() => { const m = { exports: {} };
24
+ new Function("module", "exports", "require", fs.readFileSync("/app/.agents/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js", "utf8"))(m, m.exports, require);
25
+ return m.exports; })();
26
+ const ctx = { token: accessToken, siteId: WIX_METASITE_ID };
27
+
28
+ const result = await seed.setupRestaurants(ctx, {
29
+ menu: {
30
+ name: "Dinner", description: "Evening menu",
31
+ sections: [
32
+ { name: "Antipasti", description: "To start", items: [
33
+ // imageUrl per item is optional and attached IN this one call. It must be the FINAL
34
+ // https://media.base44.com/... url from the COMPLETED generate_image (it runs in the background
35
+ // while you build — wait for it), never a still-generating /__generating__/<id>.png placeholder.
36
+ { name: "Bruschetta al Pomodoro", description: "Grilled sourdough, San Marzano tomatoes, basil.", price: 9.50, imageUrl: "https://media.base44.com/…" },
37
+ ] },
38
+ ],
39
+ },
40
+ ordering: { address }, // omit for menu-only; `true` skips the STEP 0 address (flag it)
41
+ reservations: { configuration: { onlineReservations: { partySize: { min: 2, max: 10 } } } },
42
+ });
43
+ // → { menuId, sectionIds, itemIds, orderingEnabled, reservationsEnabled, imagesAttached }
44
+ ```
45
+
46
+ **Seeding is additive — never delete or overwrite existing content.** Don't clean up, don't remove
47
+ "sample" data, don't reset. Just add.
48
+
49
+ ## Escape hatch — individual functions
50
+ Reach for the functions below only when the one-call `setupRestaurants` doesn't fit (partial re-seed,
51
+ custom fulfillment methods, experiences). `setupRestaurants` is built from them, in this order
52
+ (items → sections → menu — each child before its parent):
53
+
54
+ ```js
55
+ // ── MENU (always; the seedable core) ────────────────────────────────────────────────────────────
56
+ await seed.installMenusApp(ctx); // if the site doesn't have Wix Restaurants Menus yet
57
+
58
+ const menu = await seed.createMenu(ctx, { // builds items → sections → menu bottom-up
59
+ name: "Dinner", description: "Evening menu",
60
+ sections: [
61
+ { name: "Antipasti", description: "To start", items: [
62
+ { name: "Bruschetta al Pomodoro", description: "Grilled sourdough, San Marzano tomatoes, basil.", price: 9.50 },
63
+ ] },
64
+ ],
65
+ }); // → { menuId, sectionIds, itemIds }
66
+
67
+ // optional — import the url to Wix Media (restaurants binds by file id), then attach (full-replace — echo revision + price)
68
+ // const file = await seed.importImage(ctx, imageUrl); // → { id, url } (Wix Media file id + wixstatic url)
69
+ // await seed.attachItemImages(ctx, [{ id, revision, price, image: { id: file.id, url: file.url, height: 1024, width: 1024 } }]);
70
+
71
+ // ── ONLINE ORDERING (add-on, on demand; MENU-FIRST) ──────────────────────────────────────────────
72
+ await seed.installOrdersApp(ctx); // auto-provisions a working ordering setup
73
+ await seed.setBusinessLocation(ctx, address); // STEP 0 — REQUIRED (see preconditions)
74
+ const [op] = await seed.listOperations(ctx); // verify the auto-created operation (never create one)
75
+ // if (op.onlineOrderingStatus !== "ENABLED") await seed.enableOperation(ctx, op.id, op.revision);
76
+ const methods = await seed.listFulfillmentMethods(ctx); // reshape ONLY what the request names
77
+ // await seed.updateFulfillmentMethod(ctx, methods[0].id, { revision: methods[0].revision, name: "Delivery", fee: "5" });
78
+ const settings = await seed.queryMenuOrderingSettings(ctx); // confirm each menu is onlineOrderingEnabled
79
+
80
+ // ── TABLE RESERVATIONS (add-on, on demand; INDEPENDENT of menu/ordering) ─────────────────────────
81
+ await seed.installTableReservationsApp(ctx); // auto-provisions a default reservation location
82
+ await seed.setBusinessLocation(ctx, address); // STEP 0 — shared with ordering (do it once if both)
83
+ const [loc] = await seed.listReservationLocations(ctx); // discover the default (never create one)
84
+ // await seed.updateReservationLocation(ctx, loc.id, loc.revision, { onlineReservations: { partySize: { min: 2, max: 10 } } });
85
+ await seed.enableOnlineReservations(ctx, loc.id, loc.revision); // PREMIUM-GATED — 428 on a free site (record, don't fail)
86
+
87
+ // ── EXPERIENCES (add-on WITHIN Table Reservations, on demand) ────────────────────────────────────
88
+ await seed.createExperiences(ctx, loc.id, [{ configuration: { /* per Create-Experience doc */ } }]);
89
+ ```
90
+
91
+ ## Functions
92
+
93
+ **Menu** (`setup-restaurants.md`)
94
+ | fn | does |
95
+ |---|---|
96
+ | `installMenusApp(ctx)` | install the Wix Restaurants Menus app |
97
+ | `createMenu(ctx, {name,description?,sections})` | items → sections → menu bottom-up → `{menuId,sectionIds,itemIds}` |
98
+ | `importImage(ctx, url)` | import an external url into Wix Media → `{id,url}` (file id + wixstatic url); menu items bind by this file id |
99
+ | `attachItemImages(ctx, [{id,revision,price,image}])` | image pass — full-replace PATCH (echo revision + priceInfo); `image.id` = a Wix Media file id from `importImage` |
100
+
101
+ **Shared** (ordering + reservations STEP 0)
102
+ | fn | does |
103
+ |---|---|
104
+ | `setBusinessLocation(ctx, location)` | full-override Update Location (or create if none) — REQUIRED for ordering |
105
+
106
+ **Online ordering** (`setup-restaurant-orders.md`) — verify/reshape the auto-provisioned setup
107
+ | fn | does |
108
+ |---|---|
109
+ | `installOrdersApp(ctx)` | install the Orders app (auto-provisions operation + methods + per-menu settings) |
110
+ | `listOperations(ctx)` | the auto-created operation(s) — never create one |
111
+ | `enableOperation(ctx, id, revision)` | PATCH `onlineOrderingStatus:"ENABLED"` (only if not already) |
112
+ | `listFulfillmentMethods(ctx)` | the three auto-created methods |
113
+ | `updateFulfillmentMethod(ctx, id, patch)` | rename / re-fee / disable (partial; `fee`/`minOrderPrice` decimal strings) |
114
+ | `createFulfillmentMethod(ctx, method)` | add one beyond the defaults (NOT auto-attached) |
115
+ | `setOperationFulfillmentIds(ctx, id, revision, ids)` | attach a created method (full array) |
116
+ | `queryMenuOrderingSettings(ctx)` | confirm each menu `onlineOrderingEnabled` + bound to the operation |
117
+ | `updateMenuOrderingSettings(ctx, id, patch)` | flip a menu orderable / display-only |
118
+
119
+ **Table reservations** (`setup-restaurant-reservations.md`) — configure the auto-provisioned location
120
+ | fn | does |
121
+ |---|---|
122
+ | `installTableReservationsApp(ctx)` | install the app (auto-provisions the default reservation location) |
123
+ | `listReservationLocations(ctx)` | discover the default (never create one — API can't) |
124
+ | `updateReservationLocation(ctx, id, revision, configuration)` | party-size / hours / turnover (config only; `location` immutable) |
125
+ | `enableOnlineReservations(ctx, id, revision)` | turn online reservations on — PREMIUM-GATED (428 on free) |
126
+
127
+ **Experiences** (`setup-restaurant-experiences.md`) — feature of Table Reservations (no extra install)
128
+ | fn | does |
129
+ |---|---|
130
+ | `createExperiences(ctx, reservationLocationId, experiences)` | one experience per named dining occasion → `[{id,name}]` |
131
+
132
+ ## Ordering rules (do not violate)
133
+ - **Menu is bottom-up: items → sections → menu.** A section is created with its `itemIds`, a menu with
134
+ its `sectionIds`, so each child must exist before its parent. `createMenu` does this in three phases.
135
+ - **`visible: true` at every level** (item, section, menu) — storefront queries return only visible
136
+ entities. Baked in by `createMenu`.
137
+ - **Menu before ordering.** Seed the menu first, then the ordering add-on (as one unit) — each menu
138
+ binds to the operation via a menu-ordering-settings object. Ordering auto-provisions per menu either
139
+ way, but the verify step needs a menu to confirm against.
140
+ - **`setBusinessLocation` STEP 0 is required for ordering** — without a real address Wix limits ordering
141
+ to "testing only" and checkout breaks. Shared with reservations (do it once if both add-ons run).
142
+ - **Reservations are independent** — they bind to a location, not a menu; no menu-first rule, nothing to
143
+ bulk-seed (visitors create reservations at runtime).
144
+ - Operations and reservation locations are **auto-provisioned — never create them**; discover and PATCH.
145
+
146
+ ## Preconditions (record in the handoff, do NOT fail the seed)
147
+ - **Ordering address (STEP 0)** — required; if the brief names none, set a clearly-marked placeholder and
148
+ flag the owner to set their real business address before ordering works.
149
+ - **Paid checkout** needs a **premium plan + a configured payment method** (dashboard/premium — can't be
150
+ done headlessly).
151
+ - **`enableOnlineReservations` is premium-only** — throws `428 PREMIUM_ONLY` on a non-premium site;
152
+ expected and non-fatal, record it and continue (don't retry-spiral).
153
+ - **Booking an experience** is premium-gated the same way (create works on a free site; booking needs
154
+ premium + online reservations enabled).
155
+
156
+ ## Reference
157
+ If a call returns a shape you didn't expect, or you need an operation this module doesn't cover, use the
158
+ **`wix-docs`** skill to search + read the live Wix API reference — never guess. The **Experiences** create
159
+ payload especially lives in the docs (fields evolve). The authoritative source recipes are
160
+ `wix-headless/references/inline-recipes/setup-restaurants.md`, `setup-restaurant-orders.md`,
161
+ `setup-restaurant-reservations.md`, and `setup-restaurant-experiences.md`.
162
+
163
+ Read a method's page before writing its call: it carries the exact body shape, the required
164
+ permission scope, and the response envelope.
165
+ - Install a Wix app onto the site: https://dev.wix.com/docs/api-reference/business-management/app-installation/app-installation/install-app.md
166
+ - Import an image into Wix Media: https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/import-file.md
167
+ - Create Menu: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/menus/create-menu.md
168
+ - Create Section: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/sections/create-section.md
169
+ - Bulk Create Sections: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/sections/bulk-create-sections.md
170
+ - Create Item: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/items/items/create-item.md
171
+ - Bulk Create Items: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/items/items/bulk-create-items.md
172
+ - List Operations: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/operations/list-operations.md
173
+ - Update Operation: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/operations/update-operation.md
174
+ - Create Fulfillment Method: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/fulfillment-methods/create-fulfillment-method.md
175
+ - Create Location: https://dev.wix.com/docs/api-reference/business-management/locations/create-location.md
176
+ - List Reservation Locations: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservation-locations/list-reservation-locations.md
177
+ - Update Reservation Location: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservation-locations/update-reservation-location.md
178
+ - Query Menu Ordering Settings: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/menu-ordering-settings/query-menu-ordering-settings.md
179
+ - Upsert Menu Ordering Settings By Menu Id: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/menu-ordering-settings/upsert-menu-ordering-settings-by-menu-id.md
180
+ - Create Experience: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/experiences/create-experience.md