@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.
- package/README.md +5 -1
- 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 +6 -4
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +28 -7
- package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
- package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
- package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -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 +138 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +172 -0
- 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-PREVIEW.md +57 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +33 -2
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +18 -1
- package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -3
- 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/CATEGORIES.md +22 -0
- package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
- package/skills/wix-app/references/stores/INVENTORY.md +37 -0
- package/skills/wix-app/references/stores/QUERY.md +119 -0
- package/skills/wix-app/references/stores/WRITE.md +55 -0
- package/skills/wix-docs/SKILL.md +35 -3
- package/skills/wix-headless/SKILL.md +9 -2
- package/skills/wix-headless/entry/bootstrap.mjs +2 -2
- package/skills/wix-headless/entry/skill.md +0 -2
- package/skills/wix-headless/references/CAPABILITIES.md +6 -4
- 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 +25 -1
- package/skills/wix-headless/references/FEEDBACK.md +16 -5
- package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +2 -0
- package/skills/wix-headless/references/SEED.md +3 -1
- package/skills/wix-headless/references/SETUP.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-restaurant-reservations.md +42 -2
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +5 -1
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +1 -1
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +33 -8
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +3 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +38 -2
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +20 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +1 -1
- package/skills/wix-headless/references/managed/CONNECT.md +2 -2
- package/skills/wix-headless/references/managed/CREATE.md +15 -1
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +47 -0
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +8 -0
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +8 -0
- package/skills/wix-manage/SKILL.md +131 -12
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +41 -0
- package/skills/wix-manage/references/analytics/query-site-analytics.md +66 -9
- package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -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/create-booking-service-from-prompt.md +6 -5
- package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +85 -42
- 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 +33 -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/get-paid/how-to-setup-wix-payments.md +30 -7
- 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/create-and-publish-social-post.md +225 -144
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +19 -10
- 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 +243 -0
- 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/create-product-from-image.md +8 -6
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +16 -10
- 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 +54 -25
- package/skills/wix-vibe-headless/install/deploy.cjs +95 -0
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
- package/skills/wix-vibe-headless/platforms/README.md +26 -0
- package/skills/wix-vibe-headless/platforms/base44.md +177 -0
- package/skills/wix-vibe-headless/platforms/generic.md +122 -0
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +230 -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 +260 -145
- 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} +90 -12
- 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 +169 -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 +228 -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} +3 -2
- 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 +276 -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 +233 -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/{wix-portfolio.js → app/rest/wix-portfolio.js} +84 -55
- 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 +240 -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 +248 -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 +6 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +263 -148
- 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} +25 -2
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +299 -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/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,127 +1,250 @@
|
|
|
1
|
+
# Wix Pricing Plans — ready-made client
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
The Plans & Pricing client is **shipped as real files**, not snippets to regenerate. It's a complete
|
|
4
|
+
plans table + plan detail + members-only hosted checkout + "my plans" area, 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 plans code (the destructure
|
|
7
|
+
shapes, the price/billing-cycle field paths, the hosted checkout redirect, the anonymous `[]` case
|
|
8
|
+
all ship and are correct).
|
|
3
9
|
|
|
4
|
-
|
|
10
|
+
Talks to Wix directly over the public `WIX_CLIENT_ID` (anonymous visitor tokens). Never mock plans;
|
|
11
|
+
never hand-build a `/checkout` or purchase URL — purchasing always goes through the Wix-hosted
|
|
12
|
+
**redirect-session** (which also handles member login/signup and payment).
|
|
5
13
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
## Prerequisites
|
|
15
|
+
- The site's **Wix Pricing Plans** app is the read/checkout target. It's installed and seeded
|
|
16
|
+
separately (see **Seeding** below), in parallel with this build — so it may have no plans at build
|
|
17
|
+
time; the client renders the shipped empty state until plans land.
|
|
18
|
+
- The public headless **`WIX_CLIENT_ID`** from your prompt (buyer-facing, safe to hardcode/commit).
|
|
19
|
+
- **Purchasing is members-only, via Wix-hosted checkout.** The hosted flow handles member
|
|
20
|
+
login/signup + the order form + payment, then returns to your site. The deployed app domain must
|
|
21
|
+
be allow-listed on the OAuth client for that return to work — a **separate Wix setup flow the user
|
|
22
|
+
completes later**, out of scope here. If the return fails before that setup is done, that's
|
|
23
|
+
expected; flag it and continue.
|
|
10
24
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Adding a plan detail page, a buy/subscribe button, or a "my plans" area over existing plans.
|
|
25
|
+
## STEP 1 — The client is already in `src/`
|
|
26
|
+
The install step (base44.md STEP 1) deployed the whole Plans & Pricing UI client + REST scaffolds
|
|
27
|
+
into `src/` (imports use the `@/` alias → `src/`). Here's every file and what it is — **this is your
|
|
28
|
+
map, so you don't need to open them:**
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
The
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- **
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
30
|
+
| file | what it is |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `hooks/usePlans.js` | plans-listing data — first page, cursor paging, `subscribe(plan)` checkout |
|
|
33
|
+
| `hooks/usePlanDetail.js` | plan-detail data — plan-by-slug + `notFound` + `subscribe()` checkout |
|
|
34
|
+
| `hooks/useMyPlans.js` | member's orders + auto re-sync on return from checkout |
|
|
35
|
+
| `components/PlanPrice.jsx` | price label — reads amount / cycle / free-trial (display only) |
|
|
36
|
+
| `components/PlanCard.jsx` | plan card — name, description, price, perks, Subscribe (when `buyable`) |
|
|
37
|
+
| `components/PlanGrid.jsx` | responsive plans grid + empty state |
|
|
38
|
+
| `components/OrderCard.jsx` | one member order row for the "my plans" list |
|
|
39
|
+
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP 4) |
|
|
40
|
+
| `pages/Plans.jsx` | the plans-table route (`/plans`) — grid + paging + checkout |
|
|
41
|
+
| `pages/PlanDetail.jsx` | the plan-detail route (`/plans/:slug`) — perks, terms, checkout |
|
|
42
|
+
| `pages/MyPlans.jsx` | the member's memberships + post-checkout confirmation (`/my-plans`) |
|
|
43
|
+
| `rest/wix-config.js` | **you set the ids here** (STEP 2) |
|
|
44
|
+
| `rest/wix-client.js` + `rest/wix-pricing-plans.js` | REST transport + plans/orders/checkout helpers |
|
|
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
|
|
48
|
+
is and every field shape you need is in the snippets below. Read a shipped file's source **only** on
|
|
49
|
+
a 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/pricing-plans/app/` → `src/`.)
|
|
52
|
+
|
|
53
|
+
## STEP 2 — Credentials
|
|
54
|
+
Write `src/rest/wix-config.js` with your `WIX_CLIENT_ID` and `WIX_METASITE_ID` from the prompt — the
|
|
55
|
+
one place both ids live.
|
|
56
|
+
|
|
57
|
+
## STEP 3 — Theme (nothing to style on the shipped components)
|
|
58
|
+
The shipped components carry **no palette of their own** — they render from base44's design tokens
|
|
59
|
+
in `src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `--primary`,
|
|
60
|
+
`--muted`, `--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`,
|
|
61
|
+
`text-foreground`, `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg`,
|
|
62
|
+
`font-display`). Those tokens are **already set to the brand by the design phase**, so the shipped
|
|
63
|
+
pages are themed with zero work here. To adjust the palette, edit `index.css` (`:root` **and**
|
|
64
|
+
`.dark`) — the base44 way; **never add a parallel theme file (e.g. a `theme.css`) or restyle the
|
|
65
|
+
shipped JSX.** Build the Home/Header you add (STEP 4) from the **same** base44 tokens/classes so it
|
|
66
|
+
matches automatically. A dark brand is just base44's dark palette in `index.css` — no per-component work.
|
|
67
|
+
|
|
68
|
+
## STEP 4 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
69
|
+
**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.
|
|
70
|
+
`App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
|
|
71
|
+
replace it. Pricing Plans needs **no** cross-page provider (checkout is a redirect, not client
|
|
72
|
+
state) — so unlike the storefront there's no `<CartProvider>` to wrap.
|
|
73
|
+
- Put your **header + footer in a `Layout`** that renders `<Outlet/>` between them, and nest every
|
|
74
|
+
route under one pathless `<Route element={<Layout/>}>`. Your brand chrome then wraps **every**
|
|
75
|
+
page — including the shipped `Plans` / `PlanDetail` / `MyPlans` — so you **never edit the shipped
|
|
76
|
+
pages to add a header/footer** (they render inside `<Outlet/>` as-is).
|
|
77
|
+
- **Pin the top chrome as one fixed block.** Put `<WixManageBanner/>` (shipped, preview-only) **above**
|
|
78
|
+
your `<Header/>` inside a single `position:fixed` top region — the header itself is plain in-flow
|
|
79
|
+
markup, the region owns the fixing — so banner + header ride together (no scroll drift/gap). Pad
|
|
80
|
+
the content by the region's **ResizeObserver-measured** height so it clears the chrome and
|
|
81
|
+
self-corrects when the banner is dismissed.
|
|
82
|
+
- Routes under the Layout: `/plans` → `Plans`, `/plans/:slug` → `PlanDetail`, `/my-plans` →
|
|
83
|
+
`MyPlans` (all shipped, as-is). **You add `/` → your own Home** page.
|
|
84
|
+
|
|
85
|
+
```jsx
|
|
86
|
+
import { useRef, useState, useEffect } from "react";
|
|
87
|
+
import { Routes, Route, Outlet } from "react-router-dom";
|
|
88
|
+
import WixManageBanner from "@/components/WixManageBanner"; // shipped, preview-only · default export, no props
|
|
89
|
+
import Plans from "@/pages/Plans"; // shipped · default export, no props
|
|
90
|
+
import PlanDetail from "@/pages/PlanDetail"; // shipped · default export, no props
|
|
91
|
+
import MyPlans from "@/pages/MyPlans"; // shipped · default export, no props
|
|
92
|
+
import Home from "@/pages/Home"; // YOU build
|
|
93
|
+
import Header from "@/components/Header"; // YOU build — plain in-flow markup, NOT position:fixed
|
|
94
|
+
import Footer from "@/components/Footer"; // YOU build
|
|
95
|
+
|
|
96
|
+
function Layout() {
|
|
97
|
+
const topRef = useRef(null);
|
|
98
|
+
const [offset, setOffset] = useState(0);
|
|
99
|
+
useEffect(() => { // measure the fixed region → pad content below it
|
|
100
|
+
const ro = new ResizeObserver(() => setOffset(topRef.current?.offsetHeight ?? 0));
|
|
101
|
+
if (topRef.current) ro.observe(topRef.current);
|
|
102
|
+
return () => ro.disconnect();
|
|
103
|
+
}, []);
|
|
104
|
+
return (<>
|
|
105
|
+
<div ref={topRef} style={{ position: "fixed", top: 0, left: 0, right: 0, zIndex: 50 }}>
|
|
106
|
+
<WixManageBanner /> {/* null on the published site / when dismissed */}
|
|
107
|
+
<Header /> {/* your brand header, in-flow inside this fixed block */}
|
|
108
|
+
</div>
|
|
109
|
+
<div style={{ paddingTop: offset }}> {/* clears the chrome; shrinks when the banner is dismissed */}
|
|
110
|
+
<Outlet /> {/* shipped Plans/PlanDetail/MyPlans render here, untouched */}
|
|
111
|
+
<Footer />
|
|
112
|
+
</div>
|
|
113
|
+
</>);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
<Routes>
|
|
117
|
+
<Route element={<Layout />}> {/* chrome wraps all */}
|
|
118
|
+
<Route path="/" element={<Home />} /> {/* yours */}
|
|
119
|
+
<Route path="/plans" element={<Plans />} /> {/* shipped, as-is */}
|
|
120
|
+
<Route path="/plans/:slug" element={<PlanDetail />} /> {/* shipped, as-is */}
|
|
121
|
+
<Route path="/my-plans" element={<MyPlans />} /> {/* shipped, as-is */}
|
|
122
|
+
</Route>
|
|
123
|
+
</Routes>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## What you build (not shipped)
|
|
127
|
+
The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the
|
|
128
|
+
`Layout` (STEP 4) so they wrap every route — plus the overall brand story, styled with the same
|
|
129
|
+
base44 tokens/classes. **Compose the shipped pieces** — a "featured plans" strip is just `queryPlans` +
|
|
130
|
+
the shipped `PlanGrid`; the nav is links to `/plans` and `/my-plans`:
|
|
131
|
+
|
|
132
|
+
```jsx
|
|
133
|
+
import { useState, useEffect } from "react";
|
|
134
|
+
import { Link } from "react-router-dom";
|
|
135
|
+
import { queryPlans, checkout } from "@/rest/wix-pricing-plans";
|
|
136
|
+
import PlanGrid from "@/components/PlanGrid";
|
|
137
|
+
|
|
138
|
+
// Responsive header: choose ONE branch with a state flag (mount each nav item once).
|
|
139
|
+
// Do NOT render a desktop nav AND a mobile nav toggled by `hidden md:flex` / `md:hidden`:
|
|
140
|
+
// these navs are inline-styled, and an inline `display` beats a Tailwind class, so `hidden`
|
|
141
|
+
// never applies — BOTH branches render. One branch = one nav.
|
|
142
|
+
export function Header() {
|
|
143
|
+
const [mobile, setMobile] = useState(() => window.innerWidth < 768);
|
|
144
|
+
useEffect(() => {
|
|
145
|
+
const onResize = () => setMobile(window.innerWidth < 768);
|
|
146
|
+
window.addEventListener("resize", onResize); // keep it reactive to viewport changes
|
|
147
|
+
return () => window.removeEventListener("resize", onResize);
|
|
148
|
+
}, []);
|
|
149
|
+
return (
|
|
150
|
+
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between" }}>
|
|
151
|
+
{/* brand/logo */}
|
|
152
|
+
{mobile
|
|
153
|
+
? <YourMenu /> // your hamburger + the same links
|
|
154
|
+
: <div style={{ display: "flex", gap: 24 }}><Link to="/plans">Plans</Link><Link to="/my-plans">My plans</Link></div>}
|
|
155
|
+
</nav>
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function Featured() { // on your home page
|
|
160
|
+
const [plans, setPlans] = useState([]);
|
|
161
|
+
// NB: queryPlans returns { plans, nextCursor } — destructure the array.
|
|
162
|
+
useEffect(() => { queryPlans({ limit: 3 }).then(({ plans }) => setPlans(plans)); }, []);
|
|
163
|
+
const subscribe = async (plan) =>
|
|
164
|
+
{ window.location.href = await checkout(plan.id, { thankYouPageUrl: `${window.location.origin}/my-plans` }); };
|
|
165
|
+
return <PlanGrid plans={plans} onSubscribe={subscribe} empty="Plans coming soon." />;
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
Everything reads base44's design tokens (`index.css`), so your home/nav match the shipped pages automatically.
|
|
169
|
+
|
|
170
|
+
**Editing a component and the change doesn't show? It's the preview, not your code.** The dev
|
|
171
|
+
preview can serve a stale module after a write. Before diagnosing a visual bug you just "fixed", do
|
|
172
|
+
a fresh full navigate/reload of the preview and re-check — don't keep rewriting correct code against
|
|
173
|
+
a stale render.
|
|
174
|
+
|
|
175
|
+
## Using the client from your own UI
|
|
176
|
+
|
|
177
|
+
```jsx
|
|
178
|
+
// Every list helper returns an object — destructure it (a bare `.map` on the return throws):
|
|
179
|
+
const { plans, nextCursor } = await queryPlans({ limit: 24 }); // PUBLIC plans only
|
|
180
|
+
// Page: pass nextCursor back as `cursor`.
|
|
181
|
+
const { plans: more } = await queryPlans({ cursor: nextCursor });
|
|
182
|
+
|
|
183
|
+
// Price is DISPLAY-ONLY — never compute a final charge (Wix settles price, tax, schedule at checkout):
|
|
184
|
+
const v = plan.pricingVariants[0];
|
|
185
|
+
const amount = v.pricingStrategies[0].flatRate.amount; // decimal STRING e.g. "20.00"; "0" = free (a string — don't === 0)
|
|
186
|
+
const cycle = v.billingTerms.billingCycle; // { period:"DAY"|"WEEK"|"MONTH"|"YEAR", count } — recurring only
|
|
187
|
+
const trial = v.freeTrialDays; // free-trial length
|
|
188
|
+
// Pair `amount` with `plan.currency` (ISO-4217, e.g. "USD"). Show the buy button only when plan.buyable.
|
|
189
|
+
|
|
190
|
+
// Purchase — members-only, hosted; redirect to the returned URL, never hand-build it:
|
|
191
|
+
window.location.href = await checkout(plan.id, { thankYouPageUrl: `${window.location.origin}/my-plans` });
|
|
192
|
+
// On success Wix returns to thankYouPageUrl with ?planOrderId=<GUID> (+ wixMemberLoggedIn); on abandon → postFlowUrl.
|
|
193
|
+
|
|
194
|
+
// Member's memberships — resolves to [] for anonymous visitors (never throws):
|
|
195
|
+
const orders = await getMyPlanOrders({ orderStatuses: ["ACTIVE"] }); // omit orderStatuses for all
|
|
196
|
+
|
|
197
|
+
// Plan image: plan.image is a WixMedia object { id, width, height, altText } with NO .url. The shipped
|
|
198
|
+
// cards render text only to avoid this. To show it, resolve the WixMedia `id` to a URL (wix-docs),
|
|
199
|
+
// or omit — never <img src={plan.image}> / <img src={plan.image.url}> (undefined / [object Object]).
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Extending the client
|
|
203
|
+
Beyond the shipped pages: **cancel / pause / resume** a member's subscription → Orders API
|
|
204
|
+
(`request-cancellation`, `pause-order`, `resume-order`); gate on `plan.buyerCanCancel`. **Custom
|
|
205
|
+
member login / logout** (so a member can log in *before* subscribing and see "my plans" without a
|
|
206
|
+
purchase) → pair the **members** vertical (`references/members/INSTRUCTIONS.md`). For anything the
|
|
207
|
+
snippets don't cover, make the call yourself with `wixApiRequest` — but look up the exact endpoint,
|
|
208
|
+
method, and body first (never guess):
|
|
209
|
+
- Pricing Plans: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans.md
|
|
210
|
+
- Orders: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/orders.md
|
|
211
|
+
- Headless redirect session: https://dev.wix.com/docs/api-reference/business-management/headless/redirects/create-redirect-session.md
|
|
212
|
+
|
|
213
|
+
Fallback only — when you hit an error or need something not shown here: read the relevant shipped
|
|
214
|
+
file under `src/`, or look it up via the **`wix-docs`** skill.
|
|
215
|
+
|
|
216
|
+
## Hard rules
|
|
217
|
+
- Set `WIX_CLIENT_ID` (STEP 2) — not the placeholder.
|
|
218
|
+
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
219
|
+
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 4) — never edit the shipped
|
|
220
|
+
`Plans`/`PlanDetail`/`MyPlans` to add chrome.
|
|
221
|
+
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your
|
|
222
|
+
`Header` is plain in-flow markup (not `position:fixed`).
|
|
223
|
+
- Purchase goes through the shipped `checkout()` (redirect-session) — never a hand-built URL.
|
|
224
|
+
- Treat plan objects as display-only — show the buy button only when `plan.buyable`; never compute
|
|
225
|
+
the final charge. Never invent perks, prices, trials, testimonials, or member counts.
|
|
226
|
+
- Render live Wix data or the shipped empty state — never mock plans.
|
|
108
227
|
|
|
109
228
|
## Point the user to their dashboard
|
|
110
|
-
|
|
111
|
-
- **Pricing Plans** — `https://manage.wix.com/dashboard/{metaSiteId}/pricing-plans` (`Dashboard →
|
|
229
|
+
Provide deep links so the owner can edit content (substitute the site's `metaSiteId`):
|
|
230
|
+
- **Pricing Plans** — `https://manage.wix.com/dashboard/{metaSiteId}/pricing-plans` (`Dashboard →
|
|
231
|
+
Pricing Plans`) → **+ Create Plan** (set the name, pricing model, perks, and connect the plan to
|
|
232
|
+
the content/services it unlocks)
|
|
112
233
|
|
|
113
|
-
|
|
234
|
+
## Seeding
|
|
235
|
+
Seed plans per `seed/SEED.md` (the build-time setup module) — separate from this client build; run
|
|
236
|
+
in parallel.
|
|
114
237
|
|
|
115
|
-
##
|
|
116
|
-
- [ ] `WIX_CLIENT_ID` set
|
|
238
|
+
## Verify (before declaring done)
|
|
239
|
+
- [ ] Client files copied into `src/`; `WIX_CLIENT_ID` set (not the placeholder).
|
|
240
|
+
- [ ] Brand palette lives in `index.css` (`:root`/`.dark`); no parallel theme file; shipped components/pages not restyled or rewritten.
|
|
241
|
+
- [ ] Opened the vertical's data route(s) (not just the home page) and confirmed the shipped
|
|
242
|
+
components render themed (surface, text, brand) with images.
|
|
243
|
+
- [ ] `Layout` (fixed `<WixManageBanner/>` + `<Header/>` region, then `<Outlet/>` + Footer) wraps
|
|
244
|
+
all routes; shipped `Plans`/`PlanDetail`/`MyPlans` untouched; content clears the fixed chrome.
|
|
117
245
|
- [ ] Plans list renders live data; price, billing cycle, and free trial read correctly across
|
|
118
|
-
pricing models (recurring, single-payment, free)
|
|
119
|
-
- [ ] Plan detail loads by slug and shows a not-found state on a bad slug
|
|
120
|
-
- [ ]
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
- [ ] On return, the new order appears via `getMyPlanOrders()` (and a "log in" state shows for
|
|
124
|
-
anonymous visitors)
|
|
125
|
-
- [ ] Empty state shown when `queryPlans()` returns no plans
|
|
126
|
-
- [ ] No mock plans, perks, or prices anywhere
|
|
127
|
-
- [ ] Told the user at least once that they can continue setting up their plans in the dashboard and provided deep links.
|
|
246
|
+
pricing models (recurring, single-payment, free); buy button only for `buyable` plans.
|
|
247
|
+
- [ ] Plan detail loads by slug and shows a not-found state on a bad slug.
|
|
248
|
+
- [ ] Purchase redirects via the redirect-session `fullUrl` (no hand-built URL) and reaches
|
|
249
|
+
Wix-hosted login + payment; on return the new order appears on `/my-plans`.
|
|
250
|
+
- [ ] Empty catalog shows the shipped empty state; no mock plans anywhere.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Member plan-order row — pure UI for the "My plans" screen. Renders only fields the Order object
|
|
2
|
+
// actually returns (planName, status, start/end dates); for anything else (amount paid, next-billing)
|
|
3
|
+
// look it up in the Orders API reference (wix-docs) — never invent it. Styled with base44 design
|
|
4
|
+
// tokens (shadcn Tailwind classes).
|
|
5
|
+
|
|
6
|
+
// Each status carries its OWN text colour: a shared `text-primary-foreground` over a varying
|
|
7
|
+
// background is unreadable the moment the two tokens are close in value — on the default light
|
|
8
|
+
// palette --primary-foreground (98%) over --muted (96.1%) is white on white, so PAUSED and ENDED
|
|
9
|
+
// vanished. A background token and its foreground token always travel together.
|
|
10
|
+
const STATUS_STYLE = {
|
|
11
|
+
ACTIVE: "bg-primary text-primary-foreground",
|
|
12
|
+
PAUSED: "bg-muted text-foreground",
|
|
13
|
+
ENDED: "bg-muted text-foreground",
|
|
14
|
+
CANCELED: "bg-destructive text-destructive-foreground",
|
|
15
|
+
};
|
|
16
|
+
const STATUS_FALLBACK = "bg-muted text-foreground";
|
|
17
|
+
|
|
18
|
+
export default function OrderCard({ order }) {
|
|
19
|
+
return (
|
|
20
|
+
<li className="list-none flex flex-wrap items-center gap-3 bg-card text-foreground border border-border rounded-lg shadow-sm p-4">
|
|
21
|
+
<span className="font-display font-semibold flex-1">{order.planName}</span>
|
|
22
|
+
<span className={`text-[13px] font-semibold px-2.5 py-0.5 rounded-full ${STATUS_STYLE[order.status] || STATUS_FALLBACK}`}>{order.status}</span>
|
|
23
|
+
{order.startDate && (
|
|
24
|
+
<span className="text-muted-foreground text-[13px]">
|
|
25
|
+
from {new Date(order.startDate).toLocaleDateString()}
|
|
26
|
+
</span>
|
|
27
|
+
)}
|
|
28
|
+
{order.endDate && (
|
|
29
|
+
<span className="text-muted-foreground text-[13px]">
|
|
30
|
+
until {new Date(order.endDate).toLocaleDateString()}
|
|
31
|
+
</span>
|
|
32
|
+
)}
|
|
33
|
+
</li>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Plan card — pure UI. 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. Renders name, description, price,
|
|
3
|
+
// perks as feature bullets, and a Subscribe button ONLY when plan.buyable is true (otherwise the
|
|
4
|
+
// plan is merchant-assigned). The card links to the plan detail route by slug. `onSubscribe(plan)`
|
|
5
|
+
// runs the hosted checkout.
|
|
6
|
+
//
|
|
7
|
+
// plan.image is a WixMedia object { id, width, height, altText } with NO .url — its id must be
|
|
8
|
+
// resolved to a URL before it can render. Rendering plan text only here avoids that trap; see
|
|
9
|
+
// INSTRUCTIONS ("Plan image") for the resolve-or-omit fallback if you want the image.
|
|
10
|
+
import { Link } from "react-router-dom";
|
|
11
|
+
import PlanPrice from "./PlanPrice";
|
|
12
|
+
|
|
13
|
+
export default function PlanCard({ plan, onSubscribe, featured = false }) {
|
|
14
|
+
return (
|
|
15
|
+
<div className={`flex flex-col gap-4 bg-card text-foreground border ${featured ? "border-primary" : "border-border"} rounded-lg overflow-hidden shadow-sm p-6`}>
|
|
16
|
+
<div>
|
|
17
|
+
<h3 className="m-0 mb-1 font-display text-[20px] font-bold">
|
|
18
|
+
{plan.name}
|
|
19
|
+
</h3>
|
|
20
|
+
{plan.description && (
|
|
21
|
+
<p className="m-0 text-muted-foreground leading-[1.5]">{plan.description}</p>
|
|
22
|
+
)}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<PlanPrice plan={plan} />
|
|
26
|
+
|
|
27
|
+
{(plan.perks || []).length > 0 && (
|
|
28
|
+
<ul className="m-0 p-0 list-none flex flex-col gap-2">
|
|
29
|
+
{plan.perks.map((perk) => (
|
|
30
|
+
<li key={perk.id} className="flex gap-2 text-foreground leading-[1.4]">
|
|
31
|
+
<span className="text-primary" aria-hidden>✓</span>
|
|
32
|
+
<span>{perk.description}</span>
|
|
33
|
+
</li>
|
|
34
|
+
))}
|
|
35
|
+
</ul>
|
|
36
|
+
)}
|
|
37
|
+
|
|
38
|
+
<div className="mt-auto flex flex-col gap-2">
|
|
39
|
+
{plan.buyable && (
|
|
40
|
+
<button onClick={() => onSubscribe?.(plan)}
|
|
41
|
+
className="py-3 px-6 cursor-pointer bg-primary text-primary-foreground rounded-sm text-[15px] font-semibold">Subscribe</button>
|
|
42
|
+
)}
|
|
43
|
+
<Link to={`/plans/${plan.slug}`}
|
|
44
|
+
className="text-center py-2.5 px-6 no-underline text-foreground border border-border rounded-sm text-sm font-semibold">View details</Link>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Responsive plans grid + empty state. Styled with base44 design tokens (shadcn Tailwind classes).
|
|
2
|
+
// Renders the shipped empty state when there are no plans — never invent plans.
|
|
3
|
+
import PlanCard from "./PlanCard";
|
|
4
|
+
|
|
5
|
+
export default function PlanGrid({ plans, onSubscribe, empty = "No plans yet." }) {
|
|
6
|
+
if (!plans?.length) {
|
|
7
|
+
return (
|
|
8
|
+
<p className="text-muted-foreground p-4 text-center">{empty}</p>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
return (
|
|
12
|
+
<div className="grid gap-4 items-stretch [grid-template-columns:repeat(auto-fill,minmax(280px,1fr))]">
|
|
13
|
+
{plans.map((plan) => <PlanCard key={plan.id} plan={plan} onSubscribe={onSubscribe} />)}
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Plan price label — display only. The price is a decimal STRING at
|
|
2
|
+
// pricingVariants[0].pricingStrategies[0].flatRate.amount ("0" = free); the recurring cycle is
|
|
3
|
+
// nested at billingTerms.billingCycle; free-trial length at pricingVariants[0].freeTrialDays. These
|
|
4
|
+
// exact paths are load-bearing — keep them. Never compute a final charge (Wix settles price, tax,
|
|
5
|
+
// and schedule at hosted checkout). Styled with base44 design tokens (shadcn Tailwind classes).
|
|
6
|
+
|
|
7
|
+
function readPrice(plan) {
|
|
8
|
+
const v = plan?.pricingVariants?.[0];
|
|
9
|
+
const amount = v?.pricingStrategies?.[0]?.flatRate?.amount; // decimal STRING e.g. "20.00"; "0" = free
|
|
10
|
+
if (amount == null) return null;
|
|
11
|
+
const cycle = v?.billingTerms?.billingCycle; // { period, count } for recurring; absent otherwise
|
|
12
|
+
return { amount, isFree: amount === "0", cycle, freeTrialDays: v?.freeTrialDays };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default function PlanPrice({ plan }) {
|
|
16
|
+
const p = readPrice(plan);
|
|
17
|
+
if (!p) return null;
|
|
18
|
+
if (p.isFree) {
|
|
19
|
+
return <span className="font-display text-[28px] font-bold">Free</span>;
|
|
20
|
+
}
|
|
21
|
+
const per = p.cycle ? ` / ${p.cycle.count} ${p.cycle.period.toLowerCase()}` : ""; // e.g. "/ 1 month"
|
|
22
|
+
return (
|
|
23
|
+
<span>
|
|
24
|
+
<span className="font-display text-[28px] font-bold">
|
|
25
|
+
{p.amount} {plan.currency}
|
|
26
|
+
</span>
|
|
27
|
+
{per && <span className="text-muted-foreground text-sm">{per}</span>}
|
|
28
|
+
{p.freeTrialDays ? (
|
|
29
|
+
<span className="block text-primary text-[13px] mt-1">
|
|
30
|
+
{p.freeTrialDays}-day free trial
|
|
31
|
+
</span>
|
|
32
|
+
) : null}
|
|
33
|
+
</span>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// useMyPlans — "My plans" logic, no markup: load the logged-in member's orders and re-sync on
|
|
2
|
+
// visibilitychange so a plan bought via hosted checkout shows up on return. getMyPlanOrders()
|
|
3
|
+
// resolves to an ARRAY ([] for anonymous visitors — never throws), so the view can show a
|
|
4
|
+
// "log in to see your plans" state. Keep the visibilitychange re-sync — it is load-bearing.
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
import { getMyPlanOrders } from "@/rest/wix-pricing-plans";
|
|
7
|
+
|
|
8
|
+
export function useMyPlans({ orderStatuses = ["ACTIVE"] } = {}) {
|
|
9
|
+
const [orders, setOrders] = useState([]);
|
|
10
|
+
const [loaded, setLoaded] = useState(false);
|
|
11
|
+
|
|
12
|
+
const refresh = useCallback(() => {
|
|
13
|
+
// [] for anonymous visitors (no member context) — never throws.
|
|
14
|
+
getMyPlanOrders({ orderStatuses }).then((o) => { setOrders(o); setLoaded(true); });
|
|
15
|
+
}, [orderStatuses]);
|
|
16
|
+
|
|
17
|
+
useEffect(() => { // load once + re-sync on return from hosted checkout
|
|
18
|
+
refresh();
|
|
19
|
+
const onVisible = () => document.visibilityState === "visible" && refresh();
|
|
20
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
21
|
+
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
22
|
+
}, [refresh]);
|
|
23
|
+
|
|
24
|
+
return { orders, loaded, refresh };
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// usePlanDetail — plan-detail logic, no markup: load a single PUBLIC plan by its URL slug, expose a
|
|
2
|
+
// notFound flag (getPlanBySlug returns null on a miss — show a not-found state, never invent a
|
|
3
|
+
// plan), and start the members-only hosted checkout. Mirrors the storefront's useProductDetail.
|
|
4
|
+
// The detail page only renders what this returns.
|
|
5
|
+
import { useState, useEffect } from "react";
|
|
6
|
+
import { getPlanBySlug, checkout } from "@/rest/wix-pricing-plans";
|
|
7
|
+
|
|
8
|
+
export function usePlanDetail(slug) {
|
|
9
|
+
const [plan, setPlan] = useState(null);
|
|
10
|
+
const [notFound, setNotFound] = useState(false);
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
setPlan(null);
|
|
14
|
+
setNotFound(false);
|
|
15
|
+
getPlanBySlug(slug).then((p) => {
|
|
16
|
+
if (!p) return setNotFound(true);
|
|
17
|
+
setPlan(p);
|
|
18
|
+
});
|
|
19
|
+
}, [slug]);
|
|
20
|
+
|
|
21
|
+
// members-only, Wix-hosted checkout; on success Wix returns to thankYouPageUrl with ?planOrderId=<GUID>
|
|
22
|
+
async function subscribe() {
|
|
23
|
+
if (!plan) return;
|
|
24
|
+
window.location.href = await checkout(plan.id, { thankYouPageUrl: `${window.location.origin}/my-plans` });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return { plan, notFound, subscribe };
|
|
28
|
+
}
|