@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# App Tools Extension Reference
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The `APP_TOOLS` extension declares the tools your app exposes to the Wix AI assistant. Each tool entry tells the AI assistant what the tool does, what it accepts, and what it returns — so the assistant can discover and invoke it at runtime.
|
|
6
|
+
|
|
7
|
+
The AI assistant does NOT call these tools directly. It uses the declarations here to understand the tool's purpose and invoke your **Tools Provider service plugin** at runtime. See [TOOLS_PROVIDER.md](../service-plugin/TOOLS_PROVIDER.md) for the runtime handler.
|
|
8
|
+
|
|
9
|
+
## Registration
|
|
10
|
+
|
|
11
|
+
Scaffold the extension with the CLI — it creates the `.extension.ts` file and registers it in `src/extensions.ts` automatically:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
wix generate --params '{"extensionType":"APP_TOOLS","name":"my-tools"}'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The generated file lives at `src/extensions/backend/app-tools/my-tools/my-tools.extension.ts`. Replace the stub tool with your own:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { extensions } from '@wix/astro/builders';
|
|
21
|
+
|
|
22
|
+
export default extensions.appTools({
|
|
23
|
+
id: '<generated-uuid>',
|
|
24
|
+
name: 'my-tools',
|
|
25
|
+
tools: [
|
|
26
|
+
{
|
|
27
|
+
methodName: 'get-order-status',
|
|
28
|
+
description: 'Returns the current fulfillment status, shipping carrier, and tracking number for a customer order. Use this tool when a collaborator or customer asks where their order is, whether it has shipped, when it will arrive, or needs a tracking number. Requires a valid orderId.',
|
|
29
|
+
requestSchema: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
orderId: { type: 'string', description: 'The order ID to look up.' }
|
|
33
|
+
},
|
|
34
|
+
required: ['orderId']
|
|
35
|
+
},
|
|
36
|
+
responseSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
status: { type: 'string' },
|
|
40
|
+
trackingNumber: { type: 'string' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
activated: true
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## `AppToolConfig` Fields
|
|
50
|
+
|
|
51
|
+
| Field | Type | Required | Description |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| `methodName` | `string` | Yes | Unique word identifying the tool. Used to route calls in the service plugin handler. 1–30 characters. |
|
|
54
|
+
| `description` | `string` | Yes | Natural-language description the AI assistant uses to decide when to invoke this tool. Write it like a prompt: state what the tool does, list the user intents or trigger phrases that should activate it, and describe what it returns. A narrow one-liner reduces relevance matching — prefer 2–4 sentences covering intent, triggers, and output. 10–1000 characters. |
|
|
55
|
+
| `requestSchema` | `Record<string, any>` | No | JSON Schema describing the tool's request payload. The AI assistant uses this for context — it is NOT validated by Wix at call time. |
|
|
56
|
+
| `responseSchema` | `Record<string, any>` | No | JSON Schema describing the tool's response payload. |
|
|
57
|
+
| `activated` | `boolean` | Yes | Only tools with `activated: true` are called by the AI assistant. |
|
|
58
|
+
|
|
59
|
+
## Important Constraints
|
|
60
|
+
|
|
61
|
+
- `tools` array: min 1, max 100 tools per extension.
|
|
62
|
+
- `methodName` must be unique across all tools in the extension — it is the routing key in the service plugin handler.
|
|
63
|
+
- Schemas are advisory for the AI assistant; your handler must still validate inputs defensively.
|
|
64
|
+
- Only `activated: true` tools are invoked. Use `activated: false` to temporarily disable a tool without removing it.
|
|
65
|
+
|
|
66
|
+
## Relationship to the Tools Provider
|
|
67
|
+
|
|
68
|
+
The `APP_TOOLS` extension is the **declaration** side. The **execution** side is the Tools Provider service plugin registered with `toolsProviderConfig`:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
APP_TOOLS (declaration) → AI assistant discovers & selects a tool
|
|
72
|
+
toolsProviderConfig (SPI) → Wix calls your runTool handler at runtime
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Both extensions must be registered for the feature to work end-to-end. See [APP_TOOLS.md](../APP_TOOLS.md) for the full picture and [TOOLS_PROVIDER.md](../service-plugin/TOOLS_PROVIDER.md) for the handler implementation.
|
|
@@ -12,10 +12,15 @@ This reference lists common event types, SDK imports, permissions, and links. Fo
|
|
|
12
12
|
|
|
13
13
|
## eCommerce Events
|
|
14
14
|
|
|
15
|
+
Order events use **`@wix/ecom`** (namespace `orders`). Order **refund** events are the exception: they live in **`@wix/payments`** (namespace `refunds`), not `@wix/ecom`.
|
|
16
|
+
|
|
15
17
|
| Event | Import | Handler Call | Permission | API Reference |
|
|
16
18
|
| --- | --- | --- | --- | --- |
|
|
17
19
|
| Order created | `import { orders } from "@wix/ecom"` | `orders.onOrderCreated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onOrderCreated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-created?apiView=SDK) |
|
|
18
20
|
| Order approved | `import { orders } from "@wix/ecom"` | `orders.onOrderApproved(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onOrderApproved](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-approved?apiView=SDK) |
|
|
21
|
+
| Order canceled | `import { orders } from "@wix/ecom"` | `orders.onOrderCanceled(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onOrderCanceled](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/order-canceled?apiView=SDK) |
|
|
22
|
+
| Refund created | `import { refunds } from "@wix/payments"` | `refunds.onRefundCreated(handler)` | `SCOPE.DC-PAYMENTS.READ-REFUNDS` | [onRefundCreated](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/refund-created?apiView=SDK) |
|
|
23
|
+
| Refund updated | `import { refunds } from "@wix/payments"` | `refunds.onRefundUpdated(handler)` | `SCOPE.DC-PAYMENTS.READ-REFUNDS` | [onRefundUpdated](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/refund-updated?apiView=SDK) |
|
|
19
24
|
| Cart created | `import { cart } from "@wix/ecom"` | `cart.onCartCreated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onCartCreated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/cart/cart-created?apiView=SDK) |
|
|
20
25
|
| Cart updated | `import { cart } from "@wix/ecom"` | `cart.onCartUpdated(handler)` | `SCOPE.DC-STORES.READ-ORDERS` | [onCartUpdated](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/cart/cart-updated?apiView=SDK) |
|
|
21
26
|
|
|
@@ -23,8 +23,8 @@ Host Module '@wix/dashboard' 'navigate()' method for navigating between dashboar
|
|
|
23
23
|
import { dashboard } from '@wix/dashboard';
|
|
24
24
|
// Navigate to your own app's page with some internal state
|
|
25
25
|
dashboard.navigate({pageId: <your-page-id>, relativeUrl: "/an/internal/state?param=value"})
|
|
26
|
-
// Navigate to a relative
|
|
27
|
-
dashboard.navigate({ relativeUrl: "/some/internal/route" });
|
|
26
|
+
// Navigate to a relative URL within a page (pageId required even for relative paths)
|
|
27
|
+
dashboard.navigate({ pageId: '<your-page-id>', relativeUrl: "/some/internal/route" });
|
|
28
28
|
// Navigate to the Products List page
|
|
29
29
|
dashboard.navigate({ pageId: "0845ada2-467f-4cab-ba40-2f07c812343d" });
|
|
30
30
|
// Add a button that navigates to the Products List page (React/TSX)
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Editor React Component A11y Review Reference
|
|
2
|
+
|
|
3
|
+
Use this reference for decisions that require code inspection after running the scanners in [`A11Y-REVIEW.md`](A11Y-REVIEW.md). The scanner output owns rule-specific context: rule ID, location, message, resolution path, evidence, and confidence. Do not maintain a separate rule catalog here.
|
|
4
|
+
|
|
5
|
+
## Scanner Result Handling
|
|
6
|
+
|
|
7
|
+
Treat every scanner finding as a lead until the component implementation confirms how the flagged behavior reaches the rendered element.
|
|
8
|
+
|
|
9
|
+
1. Read the full finding, including evidence and confidence when present.
|
|
10
|
+
2. Trace the component topology through local wrappers, shared primitives, and package implementations.
|
|
11
|
+
3. Deduplicate findings that identify the same issue at the same location.
|
|
12
|
+
4. Assign a verdict: `confirmed`, `false-positive`, or `not-relevant`.
|
|
13
|
+
5. Fix confirmed issues inline, then re-run both scanners on changed JSX files.
|
|
14
|
+
|
|
15
|
+
When both scanners flag the same issue, keep the finding with the strongest semantic evidence. The scanners complement each other; a finding from one scanner is not automatically stronger because of its tier.
|
|
16
|
+
|
|
17
|
+
## Confidence Model
|
|
18
|
+
|
|
19
|
+
### High
|
|
20
|
+
|
|
21
|
+
Use high confidence when the code and scanner evidence unambiguously show the violation, for example:
|
|
22
|
+
|
|
23
|
+
- the flagged rendered element and static props establish the behavior directly
|
|
24
|
+
- the component implementation resolves to the flagged semantic element
|
|
25
|
+
- an explicit polymorphic prop establishes the rendered element
|
|
26
|
+
|
|
27
|
+
Fix high-confidence findings immediately.
|
|
28
|
+
|
|
29
|
+
### Medium
|
|
30
|
+
|
|
31
|
+
Use medium confidence when:
|
|
32
|
+
|
|
33
|
+
- props strongly imply the rendered semantics
|
|
34
|
+
- the implementation only partially resolves but preserves likely semantics
|
|
35
|
+
- the component name, props, and surrounding evidence strongly agree
|
|
36
|
+
|
|
37
|
+
Read the surrounding code. If it confirms the inference, fix the issue. If it contradicts the inference, discard the finding. If the implementation remains unresolved, treat it as low confidence.
|
|
38
|
+
|
|
39
|
+
### Low
|
|
40
|
+
|
|
41
|
+
Use low confidence when:
|
|
42
|
+
|
|
43
|
+
- only weak heuristics support the semantic guess
|
|
44
|
+
- the implementation cannot be resolved
|
|
45
|
+
- runtime props or spreads can materially change the rendered semantics
|
|
46
|
+
|
|
47
|
+
Continue tracing the code. Fix only after the issue is confirmed; otherwise leave the code unchanged.
|
|
48
|
+
|
|
49
|
+
### Confidence vs. Actionability
|
|
50
|
+
|
|
51
|
+
Confidence answers whether the issue is real. It does not decide whether a confirmed fix is safe.
|
|
52
|
+
|
|
53
|
+
- Confirmed + safe/local fix: fix now.
|
|
54
|
+
- Confirmed + risky behavior change or non-local refactor: leave unchanged.
|
|
55
|
+
- Unconfirmed or ambiguous: leave unchanged.
|
|
56
|
+
|
|
57
|
+
If the violation is visible in the code and has a localized, behavior-preserving fix, treat it as confirmed and apply the fix.
|
|
58
|
+
|
|
59
|
+
Valid reasons to leave code unchanged:
|
|
60
|
+
|
|
61
|
+
- semantics remain ambiguous after reading the available code
|
|
62
|
+
- product intent cannot be derived from the code
|
|
63
|
+
- the fix requires a risky behavior change or a non-local refactor
|
|
64
|
+
|
|
65
|
+
Do not leave a confirmed safe/local issue unchanged because it is low severity, secondary, shared, or outside the first file in scope.
|
|
66
|
+
|
|
67
|
+
## Semantic Resolution
|
|
68
|
+
|
|
69
|
+
Resolve the rendered behavior in this order:
|
|
70
|
+
|
|
71
|
+
1. The flagged JSX element and its static props
|
|
72
|
+
2. Explicit polymorphic props such as `as="a"` or `component="button"`
|
|
73
|
+
3. The local component implementation
|
|
74
|
+
4. Installed package source or declarations in `node_modules`
|
|
75
|
+
5. Prop evidence such as `href`, `to`, `src`, `alt`, and `role`
|
|
76
|
+
6. Component-name heuristics
|
|
77
|
+
|
|
78
|
+
For local imports, follow the exported component's rendered root. Continue through local or package components until the semantics resolve or the evidence becomes too weak.
|
|
79
|
+
|
|
80
|
+
For package imports, resolve the import from `node_modules` and inspect its exported entry point. If the package hides its rendered semantics, use prop and naming evidence without assigning more confidence than the evidence supports.
|
|
81
|
+
|
|
82
|
+
## Tier 2 Manual Review Checklist
|
|
83
|
+
|
|
84
|
+
Run this checklist after scanner findings are triaged. Tier 2 is required even when both scanners return zero findings.
|
|
85
|
+
|
|
86
|
+
### Semantic Targeting
|
|
87
|
+
|
|
88
|
+
- Do ARIA attributes land on the semantically correct element instead of a layout wrapper?
|
|
89
|
+
- Do labels, descriptions, and roles reach the actual interactive or landmark element?
|
|
90
|
+
- Do wrappers preserve the semantics exposed by their API?
|
|
91
|
+
|
|
92
|
+
### Icon-Only and Visual-Only States
|
|
93
|
+
|
|
94
|
+
- Do icon-only buttons, links, or controls have an accessible name?
|
|
95
|
+
- If visible text is hidden, is it visually hidden in an accessibility-safe way instead of removed from the accessibility tree?
|
|
96
|
+
- Do meaningful icons or images expose accessible text when needed?
|
|
97
|
+
|
|
98
|
+
### CSS and Hidden Content
|
|
99
|
+
|
|
100
|
+
- Does `display: none` remove content that should remain available to assistive technology?
|
|
101
|
+
- Are hidden or collapsed states consistent across visuals, focusability, and the accessibility tree?
|
|
102
|
+
- Do conditional classes or CSS variables create states where labels or instructions disappear from assistive technology?
|
|
103
|
+
|
|
104
|
+
### Decorative vs. Meaningful Content
|
|
105
|
+
|
|
106
|
+
- Are decorative separators, ornaments, and repeated icons hidden from assistive technology?
|
|
107
|
+
- Are meaningful visuals, status icons, or graphics named appropriately?
|
|
108
|
+
|
|
109
|
+
### Focus and Interaction Consistency
|
|
110
|
+
|
|
111
|
+
- Can hidden or collapsed items still receive focus?
|
|
112
|
+
- Do interactive-looking elements expose the correct role and keyboard behavior?
|
|
113
|
+
- Do disabled, inert, or collapsed states behave consistently for keyboard users and assistive technology?
|
|
114
|
+
- Search all in-scope files for `onClick` on elements without built-in interaction (`div`, `span`, `section`, `header`, `footer`, `li`, `td`, and similar tags). Include conditional patterns such as `{...(condition && { onClick: handler })}`. Verify that each match also has the required `role`, `tabIndex`, and keyboard handler (`onKeyDown` or `onKeyUp`). A missing combination is a high-confidence finding.
|
|
115
|
+
- Before fixing missing keyboard semantics, check for nested interactive children, existing focus management, and the condition that enables interaction. Use the [pre-fix checks](#pre-fix-checks-for-adding-button-semantics-to-a-non-interactive-element).
|
|
116
|
+
|
|
117
|
+
### Structural Semantics
|
|
118
|
+
|
|
119
|
+
- Are landmarks, headings, and list semantics preserved through wrappers and layout components?
|
|
120
|
+
- When the component implements breadcrumbs, tabs, menus, dialogs, or similar patterns, do the expected semantics reach the rendered structure?
|
|
121
|
+
|
|
122
|
+
### Editor React Component Contracts
|
|
123
|
+
|
|
124
|
+
- Are ARIA attributes routed through the typed `a11y` prop and converted at the correct element?
|
|
125
|
+
- Do icon-only labels come from `constants.ts` or user-configurable `a11y` instead of hardcoded strings?
|
|
126
|
+
- Does the component preserve direction support and isolate each `ReactNode` content prop with `dir="ltr"`?
|
|
127
|
+
- Do extension overrides preserve a11y-relevant manifest fields generated from JSX?
|
|
128
|
+
|
|
129
|
+
## Fix Principles
|
|
130
|
+
|
|
131
|
+
- Use the rule ID, message, and evidence emitted by the scanner as the rule-specific fix context.
|
|
132
|
+
- Read the surrounding code before editing.
|
|
133
|
+
- Preserve visual and runtime behavior.
|
|
134
|
+
- Prefer the smallest correct change and avoid unrelated refactors.
|
|
135
|
+
- Fix the semantic owner: the component root, the correct inner element, a shared base, or the call site that supplies the value.
|
|
136
|
+
- When a wrapper already accepts and forwards a required prop, fix the call site. When it does not, update the wrapper contract and forwarding before fixing the call site.
|
|
137
|
+
- Do not hardcode reusable accessibility values such as alternative text. Accept them through the component API when they depend on consumer content.
|
|
138
|
+
- Route Editor React Component ARIA through `a11y` and `convertA11yKeysToHtmlFormat(a11y)` according to [`ACCESSIBILITY.md`](ACCESSIBILITY.md).
|
|
139
|
+
|
|
140
|
+
## Pre-Fix Checks for Adding Button Semantics to a Non-Interactive Element
|
|
141
|
+
|
|
142
|
+
Before adding `role="button"`, `tabIndex`, and keyboard handlers to an element such as `<div>`, verify all four conditions below.
|
|
143
|
+
|
|
144
|
+
### 1. Interactive Children
|
|
145
|
+
|
|
146
|
+
Check whether the element conditionally or unconditionally contains `<a>`, `<button>`, `<input>`, `<Link>`, or a component that resolves to an interactive element. Button semantics on the parent would create nested interaction.
|
|
147
|
+
|
|
148
|
+
If interactive children are possible, either exclude that branch from the parent's interaction condition or use a separate control element.
|
|
149
|
+
|
|
150
|
+
### 2. Existing Focus Management
|
|
151
|
+
|
|
152
|
+
Check whether the element already receives `tabIndex` from another source, such as `getTabIndexAttribute`, an a11y prop spread, or an interactions framework. Determine the prop merge order and keep one source authoritative.
|
|
153
|
+
|
|
154
|
+
When an existing a11y spread should win, place the conditional interaction spread before it so `tabIndex: 0` only acts as a fallback.
|
|
155
|
+
|
|
156
|
+
### 3. Interaction Condition
|
|
157
|
+
|
|
158
|
+
Read the full boolean expression that enables interaction. Verify that it:
|
|
159
|
+
|
|
160
|
+
- excludes states that already render an interactive child
|
|
161
|
+
- excludes editor preview, externally controlled, disabled, or reduced-motion states when required
|
|
162
|
+
- uses explicit comparisons such as `=== undefined` or `=== true` when `true`, `false`, and `undefined` have different meanings
|
|
163
|
+
|
|
164
|
+
Fix a fragile condition as part of the accessibility change. Correct semantics attached to the wrong state are still incorrect behavior.
|
|
165
|
+
|
|
166
|
+
### 4. Accessible Name Scope
|
|
167
|
+
|
|
168
|
+
Decide whether an accessible label names the interaction or the component as a whole. Keep a component-level label outside the interaction condition so it persists in non-interactive states. Apply an action-specific label only while that action is available.
|
|
169
|
+
|
|
170
|
+
## After Fixing
|
|
171
|
+
|
|
172
|
+
Re-run both scanners on changed `.tsx` / `.jsx` files. Continue with `npx wix build`, `npx wix generate manifest`, and the project's TypeScript check as required by [`A11Y-REVIEW.md`](A11Y-REVIEW.md#phase-5-verify).
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Editor React Component A11y Review
|
|
2
|
+
|
|
3
|
+
Use this reference to audit and fix accessibility issues in an Editor React Component. This complements [`ACCESSIBILITY.md`](ACCESSIBILITY.md), which covers ARIA prop conventions and patterns, with an automated scan and triage workflow over the component's runtime, manifest extension, and shared code.
|
|
4
|
+
|
|
5
|
+
This is not a separate skill. It runs as part of the Editor React Component workflow described in [`../SKILL.md`](../SKILL.md). Run it after editing the React/CSS sources and before `npx wix build && npx wix generate manifest`.
|
|
6
|
+
|
|
7
|
+
## Scanner Invocation
|
|
8
|
+
|
|
9
|
+
Two scanners live at the Editor React Component skill root:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node scripts/scan-a11y-eslint.cjs <file1> [file2] ...
|
|
13
|
+
node scripts/scan-a11y-code.cjs <file1> [file2] ...
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Run them from the consumer project root (the Wix CLI app's working directory) so dependencies resolve from the project's `package.json`. Pass paths relative to that cwd. The dependency preflight is part of the workflow in [`../SKILL.md`](../SKILL.md).
|
|
17
|
+
|
|
18
|
+
The ESLint scanner uses the explicitly declared `eslint-plugin-jsx-a11y` dev dependency. The semantic scanner follows imports up to four levels deep and adds resolution evidence and confidence to its findings.
|
|
19
|
+
|
|
20
|
+
## When To Run
|
|
21
|
+
|
|
22
|
+
Run the review when:
|
|
23
|
+
|
|
24
|
+
- You finished editing an Editor React Component's `.tsx` / `.module.css` files.
|
|
25
|
+
- The user asks for an a11y audit, accessibility review, or a11y fix on an Editor React Component.
|
|
26
|
+
- The user mentions missing alt text, invalid ARIA, broken semantics, direction issues, icon-only controls, or wrappers that hide accessibility issues.
|
|
27
|
+
|
|
28
|
+
Do not run on generated files (`*.generated.ts`); they are regenerated from JSX and CSS Modules.
|
|
29
|
+
|
|
30
|
+
## Target Resolution
|
|
31
|
+
|
|
32
|
+
Resolve scope before scanning:
|
|
33
|
+
|
|
34
|
+
| User says | Required scope |
|
|
35
|
+
|-----------|----------------|
|
|
36
|
+
| Specific file | That file plus any imported wrappers / shared components it renders |
|
|
37
|
+
| "this component" | `<componentName>.tsx`, `component.tsx`, `<componentName>.extension.ts`, plus shared imports |
|
|
38
|
+
| A component name | All in-component files (excluding `*.generated.ts`) |
|
|
39
|
+
| "full audit" | Every Editor React Component folder under `src/extensions/site/components/`, excluding `*.generated.ts` |
|
|
40
|
+
|
|
41
|
+
## Workflow
|
|
42
|
+
|
|
43
|
+
Execute every phase inline while editing. Do not pause for approval or add a separate summary phase.
|
|
44
|
+
|
|
45
|
+
### Phase 1: Resolve Topology
|
|
46
|
+
|
|
47
|
+
1. Enumerate in-scope files under `src/extensions/site/components/<componentName>/`.
|
|
48
|
+
2. Include imported shared components or utilities that affect rendered semantics.
|
|
49
|
+
3. Exclude `*.generated.ts`.
|
|
50
|
+
4. Trace the topology from the component through wrappers and shared primitives to the rendered element.
|
|
51
|
+
|
|
52
|
+
### Phase 2a: ESLint JSX A11y Scan (Tier 0)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
node scripts/scan-a11y-eslint.cjs <file1> [file2] ...
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use each finding's rule ID, message, and location as the rule-specific context. Validate the finding against the component implementation before editing.
|
|
59
|
+
|
|
60
|
+
### Phase 2b: Semantic Scan (Tier 1)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
node scripts/scan-a11y-code.cjs <file1> [file2] ...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Use the emitted resolution path, evidence, and confidence to trace each finding. The scanner output is the source of rule-specific details; the reference only defines how to evaluate and act on those details.
|
|
67
|
+
|
|
68
|
+
Neither scanner validates manifest contracts or all Editor React Component patterns. Complete Phase 3 even when both scanners return zero findings.
|
|
69
|
+
|
|
70
|
+
### Deduplication and Triage
|
|
71
|
+
|
|
72
|
+
Evaluate every finding before fixing it.
|
|
73
|
+
|
|
74
|
+
**Deduplicate.** When both scanners flag the same location for the same issue, keep the finding with richer evidence. Prefer the semantic scanner when it resolved the component topology; prefer ESLint when the issue is outside the semantic scanner's scope.
|
|
75
|
+
|
|
76
|
+
| Verdict | Meaning | Action |
|
|
77
|
+
|---------|---------|--------|
|
|
78
|
+
| `confirmed` | The violation is real | Fix it |
|
|
79
|
+
| `false-positive` | The rule fires but the rendered behavior is correct | Discard it |
|
|
80
|
+
| `not-relevant` | The rule does not apply to this architecture | Discard it |
|
|
81
|
+
|
|
82
|
+
Use this order to evaluate a finding:
|
|
83
|
+
|
|
84
|
+
1. Trace the component implementation and confirm that the flagged behavior reaches the rendered element.
|
|
85
|
+
2. Check delegated semantics. Editor React Components route ARIA through the typed `a11y` prop and `convertA11yKeysToHtmlFormat(a11y)` (see [`ACCESSIBILITY.md`](ACCESSIBILITY.md)). If the attributes reach the correct element through a runtime path the scanner cannot see, discard the finding as a false positive.
|
|
86
|
+
3. Check conditional interactivity. When `onClick` is spread conditionally with `role`, `tabIndex`, and `onKeyDown`, discard the finding as a false positive. If only `onClick` is conditional, confirm it.
|
|
87
|
+
4. Apply the semantic checks in [`A11Y-REVIEW-REFERENCE.md`](A11Y-REVIEW-REFERENCE.md#tier-2-manual-review-checklist).
|
|
88
|
+
5. When uncertain, continue tracing the implementation. Default to `confirmed` only after checking the available code and evidence.
|
|
89
|
+
|
|
90
|
+
Only confirmed findings proceed to edits.
|
|
91
|
+
|
|
92
|
+
### Phase 3: Editor React Component Semantic Review
|
|
93
|
+
|
|
94
|
+
Perform a manual semantic review even when scanners return zero findings.
|
|
95
|
+
|
|
96
|
+
- All ARIA attributes come through the typed `a11y?: A11y` prop, never individual `ariaLabel?: string`, `role?: string`, and similar props. See [`ACCESSIBILITY.md`](ACCESSIBILITY.md).
|
|
97
|
+
- `a11y` is forwarded to the root via `{...(a11y && convertA11yKeysToHtmlFormat(a11y))}`, or to an inner element via `elementProps.<name>.a11y` when requirements specify.
|
|
98
|
+
- Icon-only interactive elements (icon/emoji/image/svg with no text node) have an accessible name from `constants.ts` or user-configurable `a11y`, never a hardcoded string literal.
|
|
99
|
+
- Direction support is mandatory: props include `direction?: Direction`, the root applies `dir={direction}` and the unconditional `fallbackDirection` class, and CSS defines `.fallbackDirection:not([dir])`. See [`DIRECTIONALITY.md`](DIRECTIONALITY.md).
|
|
100
|
+
- Every `ReactNode` content prop is rendered inside an element with `dir="ltr"` so user-provided nested content does not inherit the component direction.
|
|
101
|
+
- `<componentName>.extension.ts` overrides do not strip a11y-relevant manifest fields generated from the JSX.
|
|
102
|
+
- Decorative-only output is hidden with `aria-hidden` when appropriate.
|
|
103
|
+
- Heading/tag selection, when configurable, reaches the rendered semantic element.
|
|
104
|
+
- Interactive-looking elements expose the required keyboard behavior and roles.
|
|
105
|
+
|
|
106
|
+
Use the full Tier 2 checklist in [`A11Y-REVIEW-REFERENCE.md`](A11Y-REVIEW-REFERENCE.md#tier-2-manual-review-checklist).
|
|
107
|
+
|
|
108
|
+
### Phase 4: Fix
|
|
109
|
+
|
|
110
|
+
Apply fixes only to findings that survived triage:
|
|
111
|
+
|
|
112
|
+
- `high`: fix immediately
|
|
113
|
+
- `medium`: read the surrounding code, confirm, then fix
|
|
114
|
+
- `low`: resolve the semantics from code and evidence; fix only when confirmed
|
|
115
|
+
|
|
116
|
+
Confirmed safe/local fixes must be applied. Leave code unchanged only when the semantics remain ambiguous or the fix requires a risky, non-local behavior change. See [`A11Y-REVIEW-REFERENCE.md`](A11Y-REVIEW-REFERENCE.md#confidence-model).
|
|
117
|
+
|
|
118
|
+
Fix principles:
|
|
119
|
+
|
|
120
|
+
- Preserve intended visual and runtime behavior.
|
|
121
|
+
- Fix the real semantic owner: component root, inner element via `elementProps`, or shared base.
|
|
122
|
+
- Follow established Editor React Component patterns: route ARIA through `a11y`, use `constants.ts` for required labels, and never hardcode string literals.
|
|
123
|
+
- Before adding `role`, `tabIndex`, or keyboard handlers to a non-interactive element, run the [pre-fix checks](A11Y-REVIEW-REFERENCE.md#pre-fix-checks-for-adding-button-semantics-to-a-non-interactive-element).
|
|
124
|
+
|
|
125
|
+
### Phase 5: Verify
|
|
126
|
+
|
|
127
|
+
If any `.tsx` / `.jsx` file was edited:
|
|
128
|
+
|
|
129
|
+
1. Re-run both scanners on the modified files.
|
|
130
|
+
2. Run `npx wix build && npx wix generate manifest` so the manifest reflects any JSX changes.
|
|
131
|
+
3. Run the project's TypeScript check (`npx tsc --noEmit`), which is already part of the wix-app validation flow.
|
|
132
|
+
|
|
133
|
+
Verification is mandatory after edits. Continue directly from fixes to verification, and do not consider the workflow complete while a required check remains unrun.
|
|
134
|
+
|
|
135
|
+
## References
|
|
136
|
+
|
|
137
|
+
- [`A11Y-REVIEW-REFERENCE.md`](A11Y-REVIEW-REFERENCE.md) - triage, confidence, semantic resolution, Tier 2 checks, and pre-fix safeguards
|
|
138
|
+
- [`ACCESSIBILITY.md`](ACCESSIBILITY.md) - ARIA conventions for Editor React Components
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Animated Components (Play/Pause Control)
|
|
2
|
+
|
|
3
|
+
Rules and patterns for components whose primary content is a **playable
|
|
4
|
+
animation** — a Lottie/JSON animation, an animated GIF/SVG, a canvas/WebGL
|
|
5
|
+
loop, or a video-like surface.
|
|
6
|
+
|
|
7
|
+
Every such component MUST ship an on-stage **play/pause button**.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## When this applies
|
|
12
|
+
|
|
13
|
+
Apply automatically — without being asked — whenever the component has an
|
|
14
|
+
`autoPlay` prop **or** its primary content is a **startable / loopable**
|
|
15
|
+
animation a visitor would reasonably want to start or stop:
|
|
16
|
+
|
|
17
|
+
- Any component with an `autoPlay` prop (gallery, slider, carousel, etc.)
|
|
18
|
+
- Lottie / JSON vector animations
|
|
19
|
+
- Animated GIFs or animated SVGs
|
|
20
|
+
- Canvas / WebGL animation loops
|
|
21
|
+
- Any video-like playing surface
|
|
22
|
+
|
|
23
|
+
**Key rule:** If the component accepts an `autoPlay` prop — even if the
|
|
24
|
+
underlying mechanism is a `setInterval` advancing an index rather than a media
|
|
25
|
+
player — it MUST expose a play/pause button so visitors can stop the
|
|
26
|
+
auto-advancing behavior. "Autoplay" is a behavior contract, not an
|
|
27
|
+
implementation detail.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## What to add (checklist)
|
|
32
|
+
|
|
33
|
+
1. **Props** — `autoPlay`, `loop`, `pauseButtonVisibility`
|
|
34
|
+
2. **Playback state** — `isPlaying` + `handlePause` / `handleResume`
|
|
35
|
+
3. **Play/pause button** — overlay `<button>` with inline SVG icon + CSS positioning and optional hover-only visibility
|
|
36
|
+
4. **Modify `component.preview.tsx`** — suppress autoplay in editor design mode
|
|
37
|
+
5. **Respect `prefers-reduced-motion`** — suppress autoplay when the OS requests reduced motion
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 1. Props
|
|
42
|
+
|
|
43
|
+
Playback controls are **behavior** props (see [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md)):
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import type { A11y, Direction } from '@wix/editor-react-types';
|
|
47
|
+
|
|
48
|
+
export interface MyAnimationProps {
|
|
49
|
+
id?: string;
|
|
50
|
+
className?: string;
|
|
51
|
+
direction?: Direction;
|
|
52
|
+
a11y?: A11y;
|
|
53
|
+
|
|
54
|
+
/** Start playing on load. Default `true`. */
|
|
55
|
+
autoPlay?: boolean;
|
|
56
|
+
|
|
57
|
+
/** Repeat when finished. Default `true`. */
|
|
58
|
+
loop?: boolean;
|
|
59
|
+
|
|
60
|
+
/** Show play/pause button. Default `'showOnHover'`. */
|
|
61
|
+
pauseButtonVisibility?: 'showAlways' | 'showOnHover';
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 2. Playback state
|
|
68
|
+
|
|
69
|
+
Track play/pause state with `useState`. Initialize it from `autoPlay` and the OS reduced-motion preference — when the visitor has requested reduced motion, the animation starts paused:
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { useReducedMotion } from '@wix/react-component-utils';
|
|
73
|
+
|
|
74
|
+
// inside the component:
|
|
75
|
+
const reducedMotion = useReducedMotion();
|
|
76
|
+
|
|
77
|
+
const [isPlaying, setIsPlaying] = React.useState((autoPlay ?? true) && !reducedMotion);
|
|
78
|
+
|
|
79
|
+
// when autoPlay prop changes, re-sync (but still respect reduced motion)
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
setIsPlaying((autoPlay ?? true) && !reducedMotion);
|
|
82
|
+
}, [autoPlay]);
|
|
83
|
+
|
|
84
|
+
// when reduced motion is enabled, suppress playback; never re-enable on its own
|
|
85
|
+
// (visitor may have manually paused — don't restart against their will)
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
if (reducedMotion) {
|
|
88
|
+
setIsPlaying(false);
|
|
89
|
+
}
|
|
90
|
+
}, [reducedMotion]);
|
|
91
|
+
|
|
92
|
+
const handlePause = () => setIsPlaying(false);
|
|
93
|
+
const handleResume = () => setIsPlaying(true);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**`reducedMotion`** is `true` when the hook reports that reduced motion is enabled. When active, the animation starts paused — the visitor can still press the play button to start it manually. It is a runtime browser signal, not a manifest/data prop; never expose it as a component prop or in the manifest.
|
|
97
|
+
|
|
98
|
+
Pass `isPlaying` to the animation renderer and toggle between `handlePause` / `handleResume` on button click.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 3. Play/pause button
|
|
103
|
+
|
|
104
|
+
Create play/pause icons that visually match the component's style. Use simple recognizable shapes — a triangle for play, two rectangles for pause — implemented as inline SVG so there is no external icon dependency. Size, stroke, and fill should feel native to the component's design.
|
|
105
|
+
|
|
106
|
+
Position the button absolutely so it overlays the content without pushing other elements out of place:
|
|
107
|
+
|
|
108
|
+
```css
|
|
109
|
+
.animationContainer {
|
|
110
|
+
position: relative;
|
|
111
|
+
block-size: 100%;
|
|
112
|
+
inline-size: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.playButton {
|
|
116
|
+
position: absolute;
|
|
117
|
+
inset-inline-end: 5px;
|
|
118
|
+
inset-block-start: 5px;
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```css
|
|
123
|
+
/* pauseButtonVisibility variants — structural CSS, not named-part rules */
|
|
124
|
+
|
|
125
|
+
/* showOnHover (default) */
|
|
126
|
+
.root[data-pause-button-visibility="showOnHover"] .playButton {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.root[data-pause-button-visibility="showOnHover"]:hover .playButton {
|
|
132
|
+
opacity: 1;
|
|
133
|
+
pointer-events: auto;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* showAlways — no extra CSS needed; button is visible by default */
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 4. Modify `component.preview.tsx` for autoplay suppression
|
|
142
|
+
|
|
143
|
+
For animated components, modify the generated `component.preview.tsx` to suppress autoplay in editor design mode. See [`COMPONENT-PREVIEW.md`](COMPONENT-PREVIEW.md) for how the preview file works.
|
|
144
|
+
|
|
145
|
+
### Target state of `component.preview.tsx`
|
|
146
|
+
|
|
147
|
+
Replace the generated passthrough with the following. Replace `MyComponent` with the real component name.
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
import React from 'react';
|
|
151
|
+
import MyComponent from './component';
|
|
152
|
+
import { useIsEditMode } from '@wix/react-component-utils';
|
|
153
|
+
|
|
154
|
+
export default function MyComponentPreview(
|
|
155
|
+
props: React.ComponentProps<typeof MyComponent>,
|
|
156
|
+
) {
|
|
157
|
+
const isEditMode = useIsEditMode();
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<MyComponent
|
|
161
|
+
{...props}
|
|
162
|
+
autoPlay={isEditMode ? false : props.autoPlay}
|
|
163
|
+
pauseButtonVisibility={isEditMode ? 'showAlways' : props.pauseButtonVisibility}
|
|
164
|
+
/>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
In editor design mode (`isEditMode` is `true`) → `autoPlay` is forced to `false` and `pauseButtonVisibility` is forced to `'showAlways'` so the site owner can always see and interact with the button.
|
|
170
|
+
In preview mode (`isEditMode` is `false`) → both use the user's configured values.
|
|
171
|
+
|
|
172
|
+
---
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Branded / Themed Components
|
|
2
|
+
|
|
3
|
+
Apply automatically — without being asked — whenever the user requests a
|
|
4
|
+
**branded**, **themed**, or **brand-aware** component.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Import theme tokens from `@wix/react-component-schema/theme-variables.module.css`
|
|
9
|
+
using CSS Modules `@value`, then consume with `var()`.
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
@value wst-primary-background-color from "@wix/react-component-schema/theme-variables.module.css";
|
|
13
|
+
@value wst-heading-3-font, wst-heading-3-color from "@wix/react-component-schema/theme-variables.module.css";
|
|
14
|
+
@value wst-paragraph-1-font, wst-paragraph-1-color from "@wix/react-component-schema/theme-variables.module.css";
|
|
15
|
+
|
|
16
|
+
.root { background: var(wst-primary-background-color); }
|
|
17
|
+
.heading { font: var(wst-heading-3-font); color: var(wst-heading-3-color); }
|
|
18
|
+
.body { font: var(wst-paragraph-1-font); color: var(wst-paragraph-1-color); }
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Colors:** `wst-primary-background-color`, `wst-secondary-background-color`, `wst-base-1-color`, `wst-base-2-color`, `wst-shade-1/2/3-color`, `wst-accent-1/2/3/4-color`, `wst-links-and-actions-color`
|
|
22
|
+
|
|
23
|
+
**Headings:** `wst-heading-1..6-font` / `wst-heading-1..6-color`
|
|
24
|
+
|
|
25
|
+
**Body:** `wst-paragraph-1..3-font` / `wst-paragraph-1..3-color`
|
|
26
|
+
|
|
27
|
+
❌ Don't use `var(--wst-*)` directly — import the `@value` alias first.
|
|
28
|
+
❌ Don't use `@import` — CSS Modules doesn't process `@value` aliases from `@import`; `@value` is the only mechanism that resolves them at build time.
|
|
29
|
+
❌ Don't use `wst-base-1-color` for text — it typically resolves to white and is invisible on the default white background. Use `wst-heading-*-color` / `wst-paragraph-*-color` for text, or `wst-base-2-color` if you need a base contrast color.
|
|
@@ -102,7 +102,7 @@ exists because the element is a named part.
|
|
|
102
102
|
|
|
103
103
|
### What Qualifies as a Part
|
|
104
104
|
|
|
105
|
-
See [`PARTS.md`](PARTS.md) for the mandatory filter and full rules.
|
|
105
|
+
See [`PARTS.md`](PARTS.md) for root election (Step 0), the mandatory filter, and full rules. The root gets no `elementProps` entry — its `className`, `a11y`, and `direction` arrive as top-level props.
|
|
106
106
|
|
|
107
107
|
### Derived values are not props
|
|
108
108
|
|