@wix/agent-skills 1.15.1 → 1.16.1
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.
- package/README.md +3 -7
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -1
- package/skills/wix-app/references/APP_TOOLS.md +134 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
- package/skills/wix-app/references/DATA_COLLECTION.md +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +42 -8
- package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
- package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +143 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +23 -2
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +27 -2
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +24 -7
- package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -3
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
- package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
- package/skills/wix-app/references/stores/QUERY.md +32 -0
- package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
- package/skills/wix-docs/SKILL.md +35 -3
- package/skills/wix-headless/SKILL.md +3 -1
- package/skills/wix-headless/references/CAPABILITIES.md +16 -3
- package/skills/wix-headless/references/CONTENT.md +36 -0
- package/skills/wix-headless/references/DESIGN.md +54 -0
- package/skills/wix-headless/references/DISCOVERY.md +24 -0
- package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/SEED.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +32 -23
- package/skills/wix-headless/references/managed/CONNECT.md +1 -1
- package/skills/wix-headless/references/managed/CREATE.md +14 -0
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +25 -0
- package/skills/wix-manage/SKILL.md +130 -7
- package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +40 -0
- package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
- package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
- package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +10 -1
- package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
- package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +27 -1
- package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
- package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
- package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
- package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
- package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
- package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
- package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
- package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
- package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
- package/skills/wix-manage/references/events/create-wix-event.md +176 -0
- package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
- package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
- package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
- package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
- package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
- package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
- package/skills/wix-manage/references/sites/site-import.md +217 -192
- package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
- package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
- package/skills/wix-replatform/.publish-manifest.json +8 -0
- package/skills/wix-replatform/SKILL.md +693 -0
- package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
- package/skills/wix-replatform/lib/completion-report.js +200 -0
- package/skills/wix-replatform/lib/config-env.js +59 -0
- package/skills/wix-replatform/lib/execution-manifest.js +185 -0
- package/skills/wix-replatform/lib/execution-state.js +173 -0
- package/skills/wix-replatform/lib/import-recovery.js +313 -0
- package/skills/wix-replatform/lib/local-state.js +642 -0
- package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
- package/skills/wix-replatform/lib/orchestration-router.js +122 -0
- package/skills/wix-replatform/lib/orchestration-state.js +455 -0
- package/skills/wix-replatform/lib/progress-log.js +224 -0
- package/skills/wix-replatform/lib/progress-log.sh +140 -0
- package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
- package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
- package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
- package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
- package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
- package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
- package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
- package/skills/wix-vibe-headless/SKILL.md +49 -25
- package/skills/wix-vibe-headless/install/deploy.cjs +156 -0
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
- package/skills/wix-vibe-headless/platforms/README.md +8 -4
- package/skills/wix-vibe-headless/platforms/base44.md +111 -101
- package/skills/wix-vibe-headless/platforms/generic.md +99 -64
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +226 -119
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +256 -149
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +87 -11
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +168 -147
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
- package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +223 -131
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
- package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +1 -1
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
- package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +272 -188
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
- package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +229 -104
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +236 -117
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +244 -124
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
- package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +8 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +259 -157
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
- package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
- package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +20 -1
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +338 -0
- /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
- /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
- /package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +0 -0
- /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
|
@@ -1,138 +1,258 @@
|
|
|
1
|
+
# Wix Restaurants — ready-made client
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
The restaurant client is **shipped as real files**, not snippets to regenerate. It's a complete
|
|
4
|
+
menu + item ordering + server-cart + checkout, plus a table-reservation flow, styled with your app's
|
|
5
|
+
design tokens (base44's `src/index.css` — the shadcn palette the design phase already set). Copy it
|
|
6
|
+
into the app and wire the routes — you generate almost none of the restaurant code (the menu tree
|
|
7
|
+
join, the order cart, the reservation hold→reserve flow all ship and are correct).
|
|
3
8
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> |---|---|
|
|
8
|
-
> | Menu display (always) | `wix-restaurants-menu.js` |
|
|
9
|
-
> | Online ordering (cart + checkout) | `wix-restaurants-ordering.js` |
|
|
10
|
-
> | Table reservations | `wix-restaurants-reservations.js` |
|
|
9
|
+
Talks to Wix directly over the public `WIX_CLIENT_ID` (anonymous visitor tokens). Never mock the
|
|
10
|
+
menu; never hand-build `/checkout` or reservation URLs — the shipped cart goes through the eCom
|
|
11
|
+
redirect-session and reservations go through the hold/reserve flow.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
## Prerequisites
|
|
14
|
+
- The site's **Wix Restaurants Menus** app is the read target for the menu; **Restaurant Orders**
|
|
15
|
+
backs online ordering; **Table Reservations** backs the booking page. They're installed and seeded
|
|
16
|
+
separately (see **Seeding** below), in parallel with this build — so the menu may be empty and
|
|
17
|
+
ordering / reservations may be unconfigured at build time. The client renders the shipped empty /
|
|
18
|
+
"unavailable" states until content and operations land.
|
|
19
|
+
- The public headless **`WIX_CLIENT_ID`** from your prompt (buyer-facing, safe to hardcode/commit).
|
|
20
|
+
- For Wix-hosted checkout to return, the deployed app domain must be allow-listed on the OAuth
|
|
21
|
+
client — a **separate Wix setup the user completes later**, out of scope here. If checkout return
|
|
22
|
+
fails before that, it's expected; flag it and continue.
|
|
15
23
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
## STEP 1 — The client is already in `src/`
|
|
25
|
+
The install step (base44.md STEP 1) deployed the whole restaurant UI client + REST scaffolds into
|
|
26
|
+
`src/` (imports use the `@/` alias → `src/`). Here's every file and what it is — **this is your map,
|
|
27
|
+
so you don't need to open them:**
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- `
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
the
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
the
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
29
|
+
| file | what it is |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `context/OrderCartContext.jsx` | `useOrderCart()` provider: resolves the ordering Operation, server cart, add/update/remove, checkout, `ordering` flag |
|
|
32
|
+
| `hooks/useItemOrder.js` | item-dialog add-to-order logic (stock + ordering-available gating, quantity) |
|
|
33
|
+
| `hooks/useReservation.js` | reservation flow (locations → date/party → AVAILABLE slots → hold → reserve) |
|
|
34
|
+
| `components/MenuItemCard.jsx`, `MenuList.jsx` | menu render UI (dish card + the menus→sections→items tree, with empty state) |
|
|
35
|
+
| `components/ItemDialog.jsx` | dish detail modal — description, price/variants, modifier groups (display), quantity, add-to-order |
|
|
36
|
+
| `components/OrderCartButton.jsx` | header order **icon** button with a live-count badge |
|
|
37
|
+
| `components/OrderCartDrawer.jsx` | slide-over order cart (mount once; opens from `useOrderCart`) |
|
|
38
|
+
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP 3) |
|
|
39
|
+
| `pages/Menu.jsx`, `pages/Reservations.jsx` | the two shipped routes (`/menu`, `/reservations`) |
|
|
40
|
+
| `rest/wix-config.js` | the two ids, written by the install step |
|
|
41
|
+
| `rest/wix-client.js` | REST transport + visitor-token mint/refresh (the refresh token IS the cart identity) |
|
|
42
|
+
| `rest/wix-restaurants-menu.js` | menu read helpers — `getFullMenu` (the assembled tree; start here) + raw `list*` |
|
|
43
|
+
| `rest/wix-restaurants-ordering.js` | ordering — operations, add/update/remove, `checkout` |
|
|
44
|
+
| `rest/wix-restaurants-reservations.js` | reservations — locations, time slots, hold, reserve |
|
|
45
|
+
|
|
46
|
+
They're already in place — go **straight to theming + wiring**, nothing to verify first. **Don't
|
|
47
|
+
`read_file` the shipped page/component/hook source to inspect it** — the table above says what each is
|
|
48
|
+
and every field shape you need is in the snippets below. Read a shipped file's source **only** on a
|
|
49
|
+
real fallback — a runtime error, or a field the snippets don't cover (see "Fallback only" at the
|
|
50
|
+
end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
|
|
51
|
+
`references/restaurants/app/` → `src/`.)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## STEP 2 — Theme (nothing to style on the shipped components)
|
|
55
|
+
The shipped components (menu, item dialog, order cart, reservations) carry **no palette of their
|
|
56
|
+
own** — they render from base44's design tokens in `src/index.css` (`:root`/`.dark`: `--background`,
|
|
57
|
+
`--foreground`, `--card`, `--primary`, `--muted`, `--border`, `--radius`, `--font-*`) via shadcn
|
|
58
|
+
Tailwind classes (`bg-card`, `text-foreground`, `bg-primary`, `text-muted-foreground`,
|
|
59
|
+
`border-border`, `rounded-lg`, `font-display`). Those tokens are **already set to the brand by the
|
|
60
|
+
design phase**, so the shipped pages are themed with zero work here. To adjust the palette, edit
|
|
61
|
+
`index.css` (`:root` **and** `.dark`) — the base44 way; **never add a parallel theme file (e.g. a
|
|
62
|
+
`theme.css`) or restyle the shipped JSX.** Build the Home/Header you add (STEP 3) from the **same**
|
|
63
|
+
base44 tokens/classes so it matches automatically. A dark brand is just base44's dark palette in
|
|
64
|
+
`index.css` — no per-component work.
|
|
65
|
+
|
|
66
|
+
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
67
|
+
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
68
|
+
`App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
|
|
69
|
+
replace it.
|
|
70
|
+
- Wrap the routed tree in `<OrderCartProvider>` (from `@/context/OrderCartContext`).
|
|
71
|
+
- Put your **header + footer in a `Layout`** that renders `<Outlet/>` between them, and nest every
|
|
72
|
+
route under one pathless `<Route element={<Layout/>}>`. Your brand chrome then wraps **every** page
|
|
73
|
+
— including the shipped `Menu` / `Reservations` — so you **never edit the shipped pages to add a
|
|
74
|
+
header/footer** (they render inside `<Outlet/>` as-is). Mount `<OrderCartDrawer/>` once in the Layout.
|
|
75
|
+
- **Pin the top chrome as one fixed block.** Put `<WixManageBanner/>` (shipped, preview-only) **above**
|
|
76
|
+
your `<Header/>` inside a single `position:fixed` top region — the header itself is plain in-flow
|
|
77
|
+
markup, the region owns the fixing — so banner + header ride together (no scroll drift/gap). Pad
|
|
78
|
+
the content by the region's measured height so it clears the chrome and self-corrects when the
|
|
79
|
+
banner is dismissed.
|
|
80
|
+
- Routes under the Layout: `/menu` → `Menu`, `/reservations` → `Reservations` (both shipped, as-is).
|
|
81
|
+
**You add `/` → your own Home** page.
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
import { useRef, useState, useEffect } from "react";
|
|
85
|
+
import { Routes, Route, Outlet } from "react-router-dom";
|
|
86
|
+
import { OrderCartProvider } from "@/context/OrderCartContext";
|
|
87
|
+
import OrderCartDrawer from "@/components/OrderCartDrawer";
|
|
88
|
+
import WixManageBanner from "@/components/WixManageBanner"; // shipped, preview-only · default export, no props
|
|
89
|
+
import Menu from "@/pages/Menu"; // shipped · default export, no props
|
|
90
|
+
import Reservations from "@/pages/Reservations"; // shipped · default export, no props
|
|
91
|
+
import Home from "@/pages/Home"; // YOU build
|
|
92
|
+
import Header from "@/components/Header"; // YOU build — plain in-flow markup, NOT position:fixed
|
|
93
|
+
import Footer from "@/components/Footer"; // YOU build
|
|
94
|
+
|
|
95
|
+
function Layout() {
|
|
96
|
+
const topRef = useRef(null);
|
|
97
|
+
const [offset, setOffset] = useState(0);
|
|
98
|
+
useEffect(() => { // measure the fixed region → pad content below it
|
|
99
|
+
const ro = new ResizeObserver(() => setOffset(topRef.current?.offsetHeight ?? 0));
|
|
100
|
+
if (topRef.current) ro.observe(topRef.current);
|
|
101
|
+
return () => ro.disconnect();
|
|
102
|
+
}, []);
|
|
103
|
+
return (<>
|
|
104
|
+
<div ref={topRef} style={{ position: "fixed", top: 0, left: 0, right: 0, zIndex: 50 }}>
|
|
105
|
+
<WixManageBanner /> {/* null on the published site / when dismissed */}
|
|
106
|
+
<Header /> {/* your brand header, in-flow inside this fixed block */}
|
|
107
|
+
</div>
|
|
108
|
+
<div style={{ paddingTop: offset }}> {/* clears the chrome; shrinks when the banner is dismissed */}
|
|
109
|
+
<Outlet /> {/* shipped Menu/Reservations render here, untouched */}
|
|
110
|
+
<Footer />
|
|
111
|
+
</div>
|
|
112
|
+
<OrderCartDrawer /> {/* overlays every page */}
|
|
113
|
+
</>);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
<OrderCartProvider>
|
|
117
|
+
<Routes>
|
|
118
|
+
<Route element={<Layout />}> {/* chrome wraps all */}
|
|
119
|
+
<Route path="/" element={<Home />} /> {/* yours */}
|
|
120
|
+
<Route path="/menu" element={<Menu />} /> {/* shipped, as-is */}
|
|
121
|
+
<Route path="/reservations" element={<Reservations />} /> {/* shipped, as-is */}
|
|
122
|
+
</Route>
|
|
123
|
+
</Routes>
|
|
124
|
+
</OrderCartProvider>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## What you build (not shipped)
|
|
128
|
+
The **home / landing page**, the **`Header`** (mount `<OrderCartButton/>` in it) and a **`Footer`** —
|
|
129
|
+
the two you drop into the `Layout` (STEP 3) so they wrap every route — plus the overall brand story,
|
|
130
|
+
styled with the same base44 tokens/classes. The nav is an `<OrderCartButton/>` (a clean order-**icon**
|
|
131
|
+
button with a live-count badge — render it as-is, don't wrap it in your own text button) + links to
|
|
132
|
+
`/menu` and `/reservations`:
|
|
133
|
+
|
|
134
|
+
```jsx
|
|
135
|
+
import { useState, useEffect } from "react";
|
|
136
|
+
import { Link } from "react-router-dom";
|
|
137
|
+
import OrderCartButton from "@/components/OrderCartButton";
|
|
138
|
+
|
|
139
|
+
// Responsive header: choose ONE branch with a state flag, so <OrderCartButton/> mounts once.
|
|
140
|
+
// Do NOT render a desktop nav AND a mobile nav toggled by `hidden md:flex` / `md:hidden`:
|
|
141
|
+
// these navs are inline-styled, and an inline `display` beats a Tailwind class, so `hidden`
|
|
142
|
+
// never applies — BOTH branches render and you get two order buttons. One branch = one button.
|
|
143
|
+
export function Header() {
|
|
144
|
+
const [mobile, setMobile] = useState(() => window.innerWidth < 768);
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
const onResize = () => setMobile(window.innerWidth < 768);
|
|
147
|
+
window.addEventListener("resize", onResize); // keep it reactive to viewport changes
|
|
148
|
+
return () => window.removeEventListener("resize", onResize);
|
|
149
|
+
}, []);
|
|
150
|
+
return (
|
|
151
|
+
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between" }}>
|
|
152
|
+
{/* brand/logo */}
|
|
153
|
+
{mobile
|
|
154
|
+
? <YourMenu /> // your hamburger + <OrderCartButton/> here
|
|
155
|
+
: <div style={{ display: "flex", gap: 24, alignItems: "center" }}>
|
|
156
|
+
<Link to="/menu">Menu</Link><Link to="/reservations">Reserve</Link><OrderCartButton />
|
|
157
|
+
</div>}
|
|
158
|
+
</nav>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Everything visual reads base44's design tokens (`index.css`), so your home/nav match the shipped pages automatically.
|
|
164
|
+
`<OrderCartButton/>` is an icon button (live-count badge) — drop it in as-is, it inherits `currentColor`.
|
|
165
|
+
|
|
166
|
+
**Editing a component and the change doesn't show? It's the preview, not your code.** The dev preview
|
|
167
|
+
can serve a stale module after a write. Before diagnosing a visual bug you just "fixed", do a fresh
|
|
168
|
+
full navigate/reload of the preview and re-check — don't keep rewriting correct code against a stale
|
|
169
|
+
render.
|
|
170
|
+
|
|
171
|
+
## Using the client from your own UI (menu, order cart)
|
|
172
|
+
|
|
173
|
+
```jsx
|
|
174
|
+
import { getFullMenu } from "@/rest/wix-restaurants-menu";
|
|
175
|
+
import { useOrderCart } from "@/context/OrderCartContext";
|
|
176
|
+
|
|
177
|
+
// getFullMenu() is the ONLY pre-joined shape and the entry point for any menu surface. It returns
|
|
178
|
+
// { menus: [{ ...menu, sections: [{ ...section, items: [assembledItem] }] }] }, already ordered.
|
|
179
|
+
// Each item is enriched with a resolved price / variants, modifierGroups, and labels.
|
|
180
|
+
const { menus } = await getFullMenu(); // [] when no menus → show the shipped empty state
|
|
181
|
+
|
|
182
|
+
// useOrderCart() gives:
|
|
183
|
+
// { cart, operation, ordering, itemCount, isOpen, setIsOpen, loading,
|
|
184
|
+
// addItem(item, { menuId, sectionId }, qty=1), // needs the menu/section the item was shown under
|
|
185
|
+
// removeItem(lineItemId), updateQuantity(lineItemId, qty), checkout(), refreshCart() }
|
|
186
|
+
// `ordering` is false when no ordering Operation is configured — show an "ordering unavailable" state.
|
|
187
|
+
|
|
188
|
+
// Load-bearing field paths (the shipped components already do these):
|
|
189
|
+
// - item.image / section.image / label.icon are OBJECTS → render `.url`, never the object; //-urls → https:
|
|
190
|
+
// - MENU prices are plain decimal strings with NO currency symbol ("12.50") — format in the UI.
|
|
191
|
+
// The eCom cart line price (line.price.formattedAmount) DOES include the symbol.
|
|
192
|
+
// - an item is priced by EITHER item.price (single) OR item.variants[] (one-of, each { name, price }).
|
|
193
|
+
// - a cart mutation uses cart.lineItems[].id (the lineItemId), NOT the menu item id.
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Buying happens in the shipped `ItemDialog` (opened from `MenuList`) — it owns quantity + add-to-order
|
|
197
|
+
and surfaces out-of-stock / ordering-unavailable errors. Compose a featured strip on your Home from
|
|
198
|
+
`getFullMenu()` + the shipped `MenuItemCard` if you want.
|
|
199
|
+
|
|
200
|
+
## Extending the client
|
|
201
|
+
Building something beyond the shipped pages, or need a path these snippets don't cover?
|
|
202
|
+
|
|
203
|
+
```jsx
|
|
204
|
+
// The raw list* helpers return UNRESOLVED refs and INCONSISTENT shapes (listMenus → { menus,
|
|
205
|
+
// nextCursor }; listSections/listItems/listVariants/listModifierGroups/listModifiers → bare arrays).
|
|
206
|
+
// Don't re-join them by hand — build on getFullMenu(). If you truly need a partial fetch, note they
|
|
207
|
+
// take an array of GUIDs: listSections(sectionIds), listItems(itemIds).
|
|
208
|
+
|
|
209
|
+
// Reservation status after reserve: RESERVED = confirmed, REQUESTED = manual approval pending
|
|
210
|
+
// (tell the user). firstName + phone (E.164, e.g. "+15551234567") are mandatory; a HELD reservation
|
|
211
|
+
// expires in 10 minutes — the hook passes the hold's { id, revision } into reserve for you.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Modifier up-charges / price-variant selection / special requests on the **cart line** are **not**
|
|
215
|
+
wired into `addItemToCart` — the restaurants `catalogReference.options` shape for these isn't
|
|
216
|
+
documented for client add-to-cart, so `ItemDialog` displays modifier groups for the diner but sends
|
|
217
|
+
only quantity. To wire them, confirm the shape via the **`wix-docs`** skill / the reference first,
|
|
218
|
+
never guess:
|
|
106
219
|
- Restaurants API reference: https://dev.wix.com/docs/api-reference/business-solutions/restaurants.md
|
|
107
|
-
-
|
|
108
|
-
restaurants `catalogReference.options` shape for these is not documented for client add-to-cart.
|
|
109
|
-
The menu UI still displays them; confirm the shape before wiring them into `addItemToCart`:
|
|
110
|
-
https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/sample-flows.md
|
|
111
|
-
- Fulfillment methods, delivery-address validation, scheduled (preorder) time slots, service fees:
|
|
112
|
-
see the Online Orders section of the reference.
|
|
220
|
+
- Sample flows (cart options): https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/sample-flows.md
|
|
113
221
|
- **Member login + a "my orders" account view** → the **members** vertical
|
|
114
222
|
(`references/members/INSTRUCTIONS.md`): ordering/reserving works anonymously, but signing a member
|
|
115
|
-
in
|
|
223
|
+
in lets them see their own order/reservation history.
|
|
116
224
|
|
|
117
|
-
|
|
118
|
-
|
|
225
|
+
Fallback only — when you hit an error or need something not shown here: read the relevant shipped
|
|
226
|
+
file under `src/`, or look it up via the **`wix-docs`** skill.
|
|
227
|
+
|
|
228
|
+
## Hard rules
|
|
229
|
+
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
230
|
+
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped `Menu`/`Reservations` to add chrome.
|
|
231
|
+
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your `Header` is plain in-flow markup (not `position:fixed`).
|
|
232
|
+
- Order through the shipped cart: `addItem()` → `checkout()` (redirect-session) — never a hand-built `/checkout`, ordering, or reservation URL.
|
|
233
|
+
- Reservations: offer only `AVAILABLE` slots; pass the hold's `revision` into reserve; `firstName` + `phone` (E.164) are mandatory.
|
|
234
|
+
- Render live Wix data or the shipped empty / "unavailable" state — never mock menus, items, prices, operations, locations, slots, or reviews.
|
|
119
235
|
|
|
120
236
|
## Point the user to their dashboard
|
|
121
|
-
|
|
237
|
+
Provide deep links so the owner can edit content across the apps they actually use (substitute the
|
|
238
|
+
site's `metaSiteId` from the handoff / `ListWixSites`):
|
|
122
239
|
- **Menu** (always) — `https://manage.wix.com/dashboard/{metaSiteId}/wix-restaurants-menus-new` (`Dashboard → Restaurant Menus`; click **Manage Items** to add dishes; only visible menus appear in the app)
|
|
123
|
-
- **Online ordering** (if wired) — `https://manage.wix.com/dashboard/{metaSiteId}/wix-restaurants-orders-new/settings` (`Dashboard → Restaurant Orders → Settings`). Enable at least one fulfillment method before the site accepts orders
|
|
240
|
+
- **Online ordering** (if wired) — `https://manage.wix.com/dashboard/{metaSiteId}/wix-restaurants-orders-new/settings` (`Dashboard → Restaurant Orders → Settings`). Enable at least one fulfillment method before the site accepts orders: pickup `.../wix-restaurants-orders-new/settings/pickup`, delivery `.../settings/delivery`, dine-in `.../settings/dine-in`.
|
|
124
241
|
- **Table reservations** (if wired) — `https://manage.wix.com/dashboard/{metaSiteId}/wix-table-reservations/table-reservations` (`Dashboard → Table Reservations` → **Settings**; configure tables, availability, and enable online reservations)
|
|
125
242
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- [ ]
|
|
135
|
-
- [ ]
|
|
136
|
-
- [ ]
|
|
137
|
-
- [ ]
|
|
138
|
-
- [ ]
|
|
243
|
+
Tell the user at least once that they can keep setting up their restaurant (menu / ordering /
|
|
244
|
+
reservations) in the dashboard, and include the in-dashboard navigation as a fallback.
|
|
245
|
+
|
|
246
|
+
## Seeding
|
|
247
|
+
Seed the menu (and ordering/reservation setup) per `seed/SEED.md` — separate from this client build;
|
|
248
|
+
run in parallel.
|
|
249
|
+
|
|
250
|
+
## Verify (before declaring done)
|
|
251
|
+
- [ ] Client files copied into `src/`; `WIX_CLIENT_ID` set (not the placeholder).
|
|
252
|
+
- [ ] Brand palette lives in `index.css` (`:root`/`.dark`); no parallel theme file; shipped components/pages not restyled or rewritten.
|
|
253
|
+
- [ ] Opened `/menu` and `/reservations` (not just the home page) and confirmed the shipped components render themed (surface, text, brand) with images.
|
|
254
|
+
- [ ] `Layout` (fixed `<WixManageBanner/>` + `<Header/>` region, then `<Outlet/>` + Footer) wraps all routes; shipped `Menu`/`Reservations` untouched; content clears the fixed chrome; `<OrderCartProvider>` wraps the tree; `<OrderCartDrawer/>` mounted; `<OrderCartButton/>` in the header.
|
|
255
|
+
- [ ] `getFullMenu()` renders real sections/items with prices, variants, modifiers, and labels; empty catalog shows the shipped empty state (no mock items).
|
|
256
|
+
- [ ] Add to order works with a real operation (or shows "ordering unavailable"); order survives reload (same visitor); update-qty / remove work; checkout redirects and re-fetches on return.
|
|
257
|
+
- [ ] Reservations: only `AVAILABLE` slots offered; hold → reserve produces `RESERVED`/`REQUESTED`; no locations shows the shipped empty state.
|
|
258
|
+
- [ ] Told the user they can continue setting up in the dashboard, with deep links.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Item detail modal — thin view over useItemOrder (all add-to-cart logic lives in the hook). Shows
|
|
2
|
+
// the dish's image, description, price/variants, and modifier groups (name + rule + each modifier's
|
|
3
|
+
// up-charge / stock), a quantity stepper, and an add-to-cart button. Modifier groups are shown for
|
|
4
|
+
// the diner's information only — the shipped addItemToCart does not send selections (see the hook).
|
|
5
|
+
// Styled with base44 design tokens (shadcn Tailwind classes). Pass the item plus the { menuId, sectionId } it was shown under.
|
|
6
|
+
import { useItemOrder } from "@/hooks/useItemOrder";
|
|
7
|
+
|
|
8
|
+
function imageUrl(img) {
|
|
9
|
+
const url = img?.url;
|
|
10
|
+
return url ? (url.startsWith("//") ? `https:${url}` : url) : null;
|
|
11
|
+
}
|
|
12
|
+
function formatPrice(price) {
|
|
13
|
+
return price == null ? "" : `$${price}`; // swap "$" for the site's currency
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function ItemDialog({ item, menuId, sectionId, onClose }) {
|
|
17
|
+
const d = useItemOrder(item, { menuId, sectionId });
|
|
18
|
+
if (!item) return null;
|
|
19
|
+
const image = imageUrl(item.image);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div onClick={onClose} className="fixed inset-0 z-[60] bg-black/45 flex items-end justify-center">
|
|
23
|
+
<div onClick={(e) => e.stopPropagation()}
|
|
24
|
+
className="w-[min(560px,100%)] max-h-[92vh] overflow-y-auto bg-background text-foreground rounded-t-lg font-body">
|
|
25
|
+
{image && (
|
|
26
|
+
<div className="aspect-[16/9] bg-card">
|
|
27
|
+
<img src={image} alt={item.name} className="w-full h-full object-cover" />
|
|
28
|
+
</div>
|
|
29
|
+
)}
|
|
30
|
+
<div className="p-4 flex flex-col gap-4">
|
|
31
|
+
<div className="flex justify-between items-start gap-3">
|
|
32
|
+
<h2 className="m-0 font-display">{item.name}</h2>
|
|
33
|
+
<button onClick={onClose} aria-label="Close"
|
|
34
|
+
className="border-none bg-transparent cursor-pointer text-[22px] leading-none text-muted-foreground">×</button>
|
|
35
|
+
</div>
|
|
36
|
+
{item.description && <p className="m-0 text-muted-foreground leading-[1.55]">{item.description}</p>}
|
|
37
|
+
|
|
38
|
+
{/* price: single string OR one-of variants — neither carries a currency symbol */}
|
|
39
|
+
{item.price != null
|
|
40
|
+
? <p className="m-0 text-xl font-semibold">{formatPrice(item.price)}</p>
|
|
41
|
+
: item.variants?.length > 0 && (
|
|
42
|
+
<div className="flex flex-wrap gap-3">
|
|
43
|
+
{item.variants.map((v) => (
|
|
44
|
+
<span key={v.variantId}>{v.name}: <strong>{formatPrice(v.price)}</strong></span>
|
|
45
|
+
))}
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
|
|
49
|
+
{/* modifier groups — displayed for the diner; selections are not sent by the shipped add-to-cart */}
|
|
50
|
+
{item.modifierGroups?.map((group) => (
|
|
51
|
+
<div key={group.id} className="border-t border-border pt-4">
|
|
52
|
+
<h4 className="m-0 mb-2 font-display">
|
|
53
|
+
{group.name}
|
|
54
|
+
{group.rule?.required && <span className="text-primary text-[13px]"> · required</span>}
|
|
55
|
+
</h4>
|
|
56
|
+
<div className="flex flex-col gap-1">
|
|
57
|
+
{group.modifiers.map((m) => (
|
|
58
|
+
<div key={m.id} className={`flex justify-between ${m.inStock ? "text-foreground" : "text-muted-foreground"}`}>
|
|
59
|
+
<span>{m.name}{!m.inStock && " (sold out)"}</span>
|
|
60
|
+
{m.additionalCharge && m.additionalCharge !== "0" && <span>+{formatPrice(m.additionalCharge)}</span>}
|
|
61
|
+
</div>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
))}
|
|
66
|
+
|
|
67
|
+
<div className="flex items-center gap-3 mt-1">
|
|
68
|
+
<input type="number" min={1} value={d.quantity}
|
|
69
|
+
onChange={(e) => d.setQuantity(Math.max(1, Number(e.target.value) || 1))}
|
|
70
|
+
className="w-[72px] p-2.5 text-center border border-input rounded-sm bg-background text-foreground" />
|
|
71
|
+
<button disabled={!d.canAdd} onClick={d.submit}
|
|
72
|
+
className="flex-1 py-3 px-6 cursor-pointer bg-primary text-primary-foreground border-none rounded-sm text-[15px] font-semibold disabled:opacity-50 disabled:cursor-not-allowed">
|
|
73
|
+
{!d.ordering ? "Ordering unavailable" : d.inStock ? (d.adding ? "Adding…" : "Add to order") : "Sold out"}
|
|
74
|
+
</button>
|
|
75
|
+
</div>
|
|
76
|
+
{d.error && <p className="m-0 text-destructive text-sm">{d.error}</p>}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// One dish/drink tile. Styled with base44 design tokens (shadcn Tailwind classes) — re-skin via the
|
|
2
|
+
// app's design tokens (src/index.css :root/.dark), not this JSX. The load-bearing bits: item.image is
|
|
3
|
+
// an OBJECT (render .url, never the object) with a `//`-protocol fix; price is EITHER item.price
|
|
4
|
+
// (single) OR item.variants[] (one-of, each { name, price }); MENU prices carry NO currency symbol
|
|
5
|
+
// (formatPrice adds one — swap it for the site's currency). Clicking the card opens the item dialog
|
|
6
|
+
// (add-to-cart lives there).
|
|
7
|
+
function imageUrl(img) {
|
|
8
|
+
const url = img?.url;
|
|
9
|
+
return url ? (url.startsWith("//") ? `https:${url}` : url) : null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Restaurants MENU prices are plain decimal strings with NO currency symbol ("12.50").
|
|
13
|
+
function formatPrice(price) {
|
|
14
|
+
return price == null ? "" : `$${price}`; // swap "$" for the site's currency
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function MenuItemCard({ item, onOpen }) {
|
|
18
|
+
const image = imageUrl(item.image);
|
|
19
|
+
const soldOut = item.orderSettings?.inStock === false;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<article
|
|
23
|
+
onClick={() => onOpen?.(item)}
|
|
24
|
+
className={`flex flex-col text-foreground bg-card border border-border rounded-lg overflow-hidden shadow-sm ${onOpen ? "cursor-pointer" : "cursor-default"}`}>
|
|
25
|
+
{image && (
|
|
26
|
+
<div className="relative aspect-[4/3] bg-background">
|
|
27
|
+
<img src={image} alt={item.name} loading="lazy"
|
|
28
|
+
className="w-full h-full object-cover" />
|
|
29
|
+
{soldOut && (
|
|
30
|
+
<span className="absolute top-2 left-2 py-0.5 px-2 text-xs bg-destructive text-destructive-foreground rounded-sm">Sold out</span>
|
|
31
|
+
)}
|
|
32
|
+
</div>
|
|
33
|
+
)}
|
|
34
|
+
<div className="p-3 flex flex-col gap-1.5">
|
|
35
|
+
<div className="flex justify-between items-baseline gap-2">
|
|
36
|
+
{/* Clamped like the storefront tile: the same title-beside-price row turns a long name
|
|
37
|
+
into three ragged lines. */}
|
|
38
|
+
<h3 className="m-0 font-display text-base font-semibold line-clamp-2">
|
|
39
|
+
{item.name}{item.featured && <span className="text-primary"> ★</span>}
|
|
40
|
+
</h3>
|
|
41
|
+
{/* price: single string, OR one-of variants — render one label per variant */}
|
|
42
|
+
{item.price != null
|
|
43
|
+
? <span className="font-semibold whitespace-nowrap">{formatPrice(item.price)}</span>
|
|
44
|
+
: null}
|
|
45
|
+
</div>
|
|
46
|
+
{item.description && (
|
|
47
|
+
<p className="m-0 text-muted-foreground text-sm leading-[1.45]">{item.description}</p>
|
|
48
|
+
)}
|
|
49
|
+
{item.price == null && item.variants?.length > 0 && (
|
|
50
|
+
<div className="flex flex-wrap gap-2">
|
|
51
|
+
{item.variants.map((v) => (
|
|
52
|
+
<span key={v.variantId} className="text-[13px] text-foreground">
|
|
53
|
+
{v.name}: <strong>{formatPrice(v.price)}</strong>
|
|
54
|
+
</span>
|
|
55
|
+
))}
|
|
56
|
+
</div>
|
|
57
|
+
)}
|
|
58
|
+
{item.labels?.length > 0 && (
|
|
59
|
+
<div className="flex flex-wrap gap-2 mt-0.5">
|
|
60
|
+
{item.labels.map((label) => (
|
|
61
|
+
<span key={label.id} className="inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded-full py-0.5 px-2">
|
|
62
|
+
{imageUrl(label.icon) && <img src={imageUrl(label.icon)} alt="" className="w-3 h-3" />}
|
|
63
|
+
{label.name}
|
|
64
|
+
</span>
|
|
65
|
+
))}
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
</article>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Renders the assembled getFullMenu() tree: menus → sections → item cards, with the empty state.
|
|
2
|
+
// This is the menu render surface's body (the Menu page is a thin wrapper). Ordered already by
|
|
3
|
+
// the helper (sectionIds / itemIds). Styled with base44 design tokens (shadcn Tailwind classes). Each
|
|
4
|
+
// card's onOpen gets the item plus the menuId/sectionId it was shown under — ordering needs both.
|
|
5
|
+
import MenuItemCard from "./MenuItemCard";
|
|
6
|
+
|
|
7
|
+
function imageUrl(img) {
|
|
8
|
+
const url = img?.url;
|
|
9
|
+
return url ? (url.startsWith("//") ? `https:${url}` : url) : null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function MenuList({ menus, onOpenItem, empty = "No menu yet — add one from your Wix dashboard." }) {
|
|
13
|
+
if (!menus?.length) {
|
|
14
|
+
return <p className="text-muted-foreground p-4 text-center">{empty}</p>;
|
|
15
|
+
}
|
|
16
|
+
return (
|
|
17
|
+
<div className="flex flex-col gap-8">
|
|
18
|
+
{menus.map((menu) => (
|
|
19
|
+
<section key={menu.id}>
|
|
20
|
+
<h2 className="font-display mb-1">{menu.name}</h2>
|
|
21
|
+
{menu.description && (
|
|
22
|
+
<p className="text-muted-foreground mb-4">{menu.description}</p>
|
|
23
|
+
)}
|
|
24
|
+
{menu.sections.map((section) => (
|
|
25
|
+
<div key={section.id} className="mb-6">
|
|
26
|
+
<h3 className="font-display mb-4">{section.name}</h3>
|
|
27
|
+
{imageUrl(section.image) && (
|
|
28
|
+
<img src={imageUrl(section.image)} alt={section.name} loading="lazy"
|
|
29
|
+
className="w-full max-h-[220px] object-cover rounded-lg mb-4" />
|
|
30
|
+
)}
|
|
31
|
+
<div className="grid gap-4 [grid-template-columns:repeat(auto-fill,minmax(260px,1fr))]">
|
|
32
|
+
{section.items.map((item) => (
|
|
33
|
+
<MenuItemCard key={item.id} item={item}
|
|
34
|
+
onOpen={() => onOpenItem?.(item, { menuId: menu.id, sectionId: section.id })} />
|
|
35
|
+
))}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
))}
|
|
39
|
+
</section>
|
|
40
|
+
))}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|