@wix/agent-skills 1.15.1 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +4 -1
  4. package/skills/wix-app/references/APP_TOOLS.md +134 -0
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
  6. package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
  7. package/skills/wix-app/references/DATA_COLLECTION.md +1 -1
  8. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +28 -9
  9. package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
  10. package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
  11. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
  12. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
  13. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +138 -0
  14. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +23 -2
  15. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
  16. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
  17. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +27 -2
  18. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
  19. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +18 -1
  20. package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
  21. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -3
  22. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
  23. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
  24. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  25. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
  26. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
  27. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
  28. package/skills/wix-app/references/stores/QUERY.md +32 -0
  29. package/skills/wix-docs/SKILL.md +35 -3
  30. package/skills/wix-headless/SKILL.md +3 -1
  31. package/skills/wix-headless/references/CONTENT.md +36 -0
  32. package/skills/wix-headless/references/DESIGN.md +54 -0
  33. package/skills/wix-headless/references/DISCOVERY.md +24 -0
  34. package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
  35. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
  36. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +32 -23
  37. package/skills/wix-headless/references/managed/CONNECT.md +1 -1
  38. package/skills/wix-headless/references/managed/CREATE.md +14 -0
  39. package/skills/wix-headless/references/managed/DEPLOYMENT.md +25 -0
  40. package/skills/wix-manage/SKILL.md +123 -7
  41. package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +41 -0
  42. package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
  43. package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
  44. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
  45. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
  46. package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
  47. package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +10 -1
  48. package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
  49. package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
  50. package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
  51. package/skills/wix-manage/references/cms/cms-schema-management.md +27 -1
  52. package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
  53. package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
  54. package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
  55. package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
  56. package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
  57. package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
  58. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
  59. package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
  60. package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
  61. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
  62. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
  63. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
  64. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
  65. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
  66. package/skills/wix-manage/references/events/create-wix-event.md +176 -0
  67. package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
  68. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
  69. package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
  70. package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
  71. package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
  72. package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
  73. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
  74. package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
  75. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
  76. package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
  77. package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
  78. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
  79. package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
  80. package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
  81. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
  82. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
  83. package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
  84. package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
  85. package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
  86. package/skills/wix-manage/references/sites/site-import.md +163 -190
  87. package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
  88. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
  89. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
  90. package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
  91. package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
  92. package/skills/wix-replatform/.publish-manifest.json +8 -0
  93. package/skills/wix-replatform/SKILL.md +693 -0
  94. package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
  95. package/skills/wix-replatform/lib/completion-report.js +200 -0
  96. package/skills/wix-replatform/lib/config-env.js +59 -0
  97. package/skills/wix-replatform/lib/execution-manifest.js +185 -0
  98. package/skills/wix-replatform/lib/execution-state.js +173 -0
  99. package/skills/wix-replatform/lib/import-recovery.js +313 -0
  100. package/skills/wix-replatform/lib/local-state.js +642 -0
  101. package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
  102. package/skills/wix-replatform/lib/orchestration-router.js +122 -0
  103. package/skills/wix-replatform/lib/orchestration-state.js +455 -0
  104. package/skills/wix-replatform/lib/progress-log.js +224 -0
  105. package/skills/wix-replatform/lib/progress-log.sh +140 -0
  106. package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
  107. package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
  108. package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
  109. package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
  110. package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
  111. package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
  112. package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
  113. package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
  114. package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
  115. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
  116. package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
  117. package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
  118. package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
  119. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
  120. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
  121. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
  122. package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
  123. package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
  124. package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
  125. package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
  126. package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
  127. package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
  128. package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
  129. package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
  130. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
  131. package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
  132. package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
  133. package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
  134. package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
  135. package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
  136. package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
  137. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
  138. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
  139. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
  140. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
  141. package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
  142. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
  143. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
  144. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
  145. package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
  146. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
  147. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
  148. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
  149. package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
  150. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
  151. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
  152. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
  153. package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
  154. package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
  155. package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
  156. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
  157. package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
  158. package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
  159. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
  160. package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
  161. package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
  162. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
  163. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
  164. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
  165. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
  166. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
  167. package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
  168. package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
  169. package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
  170. package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
  171. package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
  172. package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
  173. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
  174. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
  175. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
  176. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
  177. package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
  178. package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
  179. package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
  180. package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
  181. package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
  182. package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
  183. package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
  184. package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
  185. package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
  186. package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
  187. package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
  188. package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
  189. package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
  190. package/skills/wix-vibe-headless/SKILL.md +48 -25
  191. package/skills/wix-vibe-headless/install/deploy.cjs +95 -0
  192. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
  193. package/skills/wix-vibe-headless/platforms/README.md +8 -4
  194. package/skills/wix-vibe-headless/platforms/base44.md +133 -98
  195. package/skills/wix-vibe-headless/platforms/generic.md +99 -64
  196. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +230 -119
  197. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
  198. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
  199. package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
  200. package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
  201. package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
  202. package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
  203. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
  204. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
  205. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
  206. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
  207. package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
  208. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +260 -149
  209. package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
  210. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
  211. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
  212. package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
  213. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
  214. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
  215. package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
  216. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
  217. package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
  218. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
  219. package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +87 -11
  220. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
  221. package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
  222. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +169 -147
  223. package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
  224. package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
  225. package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
  226. package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
  227. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +228 -131
  228. package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
  229. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
  230. package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
  231. package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
  232. package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
  233. package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
  234. package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
  235. package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
  236. package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
  237. package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
  238. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
  239. package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
  240. package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +1 -1
  241. package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
  242. package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
  243. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +276 -188
  244. package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
  245. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
  246. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
  247. package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
  248. package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
  249. package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
  250. package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
  251. package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
  252. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
  253. package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
  254. package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
  255. package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
  256. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +233 -104
  257. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
  258. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
  259. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
  260. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
  261. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
  262. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
  263. package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
  264. package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
  265. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
  266. package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
  267. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
  268. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
  269. package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
  270. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +240 -117
  271. package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
  272. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
  273. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
  274. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
  275. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
  276. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
  277. package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
  278. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
  279. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
  280. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
  281. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
  282. package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
  283. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +248 -124
  284. package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
  285. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
  286. package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
  287. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
  288. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
  289. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
  290. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
  291. package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
  292. package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
  293. package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
  294. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
  295. package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
  296. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
  297. package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
  298. package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +6 -0
  299. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +263 -157
  300. package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
  301. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
  302. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
  303. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
  304. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
  305. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
  306. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
  307. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
  308. package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
  309. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
  310. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
  311. package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
  312. package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
  313. package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +20 -1
  314. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
  315. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +299 -0
  316. /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
  317. /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
  318. /package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +0 -0
  319. /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
  320. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
  321. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
  322. /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
@@ -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
@@ -34,6 +34,7 @@ implementation detail.
34
34
  2. **Playback state** — `isPlaying` + `handlePause` / `handleResume`
35
35
  3. **Play/pause button** — overlay `<button>` with inline SVG icon + CSS positioning and optional hover-only visibility
36
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
37
38
 
38
39
  ---
39
40
 
@@ -65,15 +66,35 @@ export interface MyAnimationProps {
65
66
 
66
67
  ## 2. Playback state
67
68
 
68
- Track play/pause state with `useState`, initialized from the `autoPlay` prop:
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:
69
70
 
70
71
  ```tsx
71
- const [isPlaying, setIsPlaying] = React.useState(autoPlay ?? true);
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]);
72
91
 
73
92
  const handlePause = () => setIsPlaying(false);
74
93
  const handleResume = () => setIsPlaying(true);
75
94
  ```
76
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
+
77
98
  Pass `isPlaying` to the animation renderer and toggle between `handlePause` / `handleResume` on button click.
78
99
 
79
100
  ---
@@ -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
 
@@ -19,7 +19,7 @@ There are two kinds of classes, determined by whether the element is a named par
19
19
  | Named part | `classNames('profile-card-heading', styles.heading)` | Global string → zeroConfig creates an editor element; module class → applies the component's own CSS |
20
20
  | Non-part (layout/structural) | `styles.contentWrapper` | Module class only — invisible to zeroConfig, no spurious editor element created |
21
21
 
22
- **Named parts** get both a global plain string and a module class. The global string is what zeroConfig scans: use `'<component-name>'` for the root and **`'<component-name>-<part-name>'` for every inner part** (kebab-case) — always prefix inner parts with the component name. The module class is what carries the component's structural CSS for that element; it stays short (`styles.heading`) because module classes are hashed and scoped, so they never need the prefix.
22
+ **Named parts** get both a global plain string and a module class. The global string is what zeroConfig scans: use `'<component-name>'` for the root and **`'<component-name>-<part-name>'` for every inner part** (kebab-case) — always prefix inner parts with the component name. The root here is the element elected per [`PARTS.md`](PARTS.md) Step 0, which is the component's own semantic element (`<button>`, `<a>`, `<ul>`) when the component reduces to one. The module class is what carries the component's structural CSS for that element; it stays short (`styles.heading`) because module classes are hashed and scoped, so they never need the prefix.
23
23
 
24
24
  **Why prefix inner parts:** the global string is a literal class that ends up on the live page, and its design-state variants are derived from it (`<component-name>-<part>--<state>`, e.g. `profile-card-cta--hover`). Those state classes are applied at runtime as global literals, so they must be unique across every component that can share a page — a bare `cta--hover` would collide between two different components. Prefixing with the component name guarantees uniqueness.
25
25
 
@@ -27,18 +27,24 @@ There are two kinds of classes, determined by whether the element is a named par
27
27
 
28
28
  The root also merges the consumer-provided `className` prop via the `classnames` helper.
29
29
 
30
- **Why:** zeroConfig creates one editor element per global class. A global class on a non-part produces a spurious editor element with no meaningful surface.
30
+ **Why:** zeroConfig creates one editor element per global class. A global class on a non-part produces a spurious editor element with no meaningful surface. The root's global class is unavoidable, which is why the root must be an element that deserves it.
31
31
 
32
32
  ```tsx
33
33
  import classNames from 'classnames';
34
34
  import styles from './ProfileCard.module.css';
35
35
 
36
36
  // ✅ Root: global string + module class + consumer className
37
+ // (a <div> here only because this component lays out several sibling parts)
37
38
  <div className={classNames(className, 'profile-card', styles.root)} id={id}>
38
39
 
39
40
  {/* ✅ Named part: prefixed global string + short module class */}
40
41
  <h2 className={classNames('profile-card-heading', styles.heading)}>{heading}</h2>
41
42
 
43
+ {/* ✅ Named part: interactive elements always get both classes */}
44
+ <button type="button" className={classNames('profile-card-cta', styles.cta)}>
45
+ {ctaLabel}
46
+ </button>
47
+
42
48
  {/* ✅ Non-part layout wrapper: module class only */}
43
49
  <div className={styles.contentWrapper}>
44
50
  <span className={classNames('profile-card-label', styles.label)}>{label}</span>
@@ -51,6 +57,25 @@ import styles from './ProfileCard.module.css';
51
57
  </CardHeader>
52
58
  ```
53
59
 
60
+ A component that reduces to one control is the other shape, and it has exactly one
61
+ part — its root ([`PARTS.md`](PARTS.md) Step 0). The text it renders and any decoration
62
+ stay inside that root, on module classes:
63
+
64
+ ```tsx
65
+ // ✅ The <button> is the root: unprefixed global string, no elementProps entry
66
+ <button
67
+ type="button"
68
+ id={id}
69
+ dir={direction}
70
+ className={classNames('like-button', styles.root, className, styles.fallbackDirection)}
71
+ >
72
+ {label}
73
+
74
+ {/* ✅ Decoration: module class only, out of the a11y tree, not a part */}
75
+ <span className={styles.burst} aria-hidden="true" />
76
+ </button>
77
+ ```
78
+
54
79
  ### Use single-class selectors
55
80
 
56
81
  Every selector is exactly one class, written as a flat top-level
@@ -31,7 +31,9 @@ nested (`card__row--selected`).
31
31
  Put the resting value in the bare class; put only the state override in the
32
32
  state selector.
33
33
 
34
- - **Native** — pair the pseudo-class with the `:global` modifier.
34
+ - **Native** — pair the pseudo-class with the `:global` modifier. Every native
35
+ state needs both selectors in the same rule; do not split the pair across
36
+ states (for example, pseudo-only `hover` plus global-only `disabled`).
35
37
  - **Custom** — the `:global` modifier alone.
36
38
 
37
39
  The bare selector is the short **module** class (`.cta`); the `:global(...)`
@@ -45,7 +47,8 @@ state class is the **prefixed** global one.
45
47
  .cta:hover {
46
48
  background: #4f46e5;
47
49
  }
48
- .cta:global(.pricing-card-cta--disabled) {
50
+ .cta:global(.pricing-card-cta--disabled),
51
+ .cta:disabled {
49
52
  opacity: 0.5;
50
53
  }
51
54
  .plan-row:global(.pricing-card-plan-row--selected) {
@@ -124,4 +127,3 @@ Rules:
124
127
  Prefer a native state (interactive markup) or a class trigger (per-item data
125
128
  such as `row.selected`) whenever one fits — those are the common cases and work
126
129
  at any depth. Reach for a prop trigger only for a root-level boolean switch.
127
-
@@ -42,12 +42,29 @@ Use logical CSS properties — never physical `left`/`right`-only layouts. See
42
42
 
43
43
  ### Root Element Pattern
44
44
 
45
- Apply on main component only:
45
+ Apply on main component only. `dir` and the fallback class go on whatever element is the root — never add a wrapper `<div>` to host them (see [`PARTS.md`](PARTS.md) Step 0).
46
46
 
47
47
  ```typescript
48
48
  <div
49
+ id={id}
49
50
  dir={direction}
50
51
  className={classNames(
52
+ 'profile-card',
53
+ styles.root,
54
+ className,
55
+ styles.fallbackDirection,
56
+ )}
57
+ >
58
+ ```
59
+
60
+ ```typescript
61
+ /* Root is the component's own semantic element — same attribute, same classes */
62
+ <button
63
+ type="button"
64
+ id={id}
65
+ dir={direction}
66
+ className={classNames(
67
+ 'like-button',
51
68
  styles.root,
52
69
  className,
53
70
  styles.fallbackDirection,
@@ -1,5 +1,16 @@
1
1
  # What Qualifies as a Part
2
2
 
3
+ ## Step 0 — Elect the root element
4
+
5
+ The root always becomes the component's editor element: it carries the `'<component-name>'` global class and gets a name and design capabilities either way. So elect a root that deserves them, before enumerating inner parts.
6
+
7
+ - ✅ **The component reduces to one meaningful element** (a single control, link, media surface, or list) — that element **is** the root. It takes `id`, `dir`, the `fallbackDirection` class, the merged `className`, the `a11y` spread, `'<component-name>'`, and the root CSS rule. All of these are attributes and classes, so they sit on a `<button>` or `<a>` exactly as on a `<div>` — needing them is never a reason to add a wrapper.
8
+ - ✅ **The elected root is the root, not an inner part** — it carries the **unprefixed** `'<component-name>'` class and gets no `elementProps` entry. A single-control component therefore has exactly one named part: its root.
9
+ - ❌ **Wrapper `<div>` holding only root plumbing** — the editor element is then a transparent box and the real element is demoted to a nested part. A root wrapper is justified only when it lays out two or more sibling parts, is the sizing/scroll/clipping container, or hosts a root-level prop-triggered state ([`DESIGN-STATES.md`](DESIGN-STATES.md) §5). Anchoring absolutely positioned decoration is not a justification — `position: relative` works on any element.
10
+ - **Stutter test** — a part class repeating the component's own noun (`confetti-button-button`) means the wrapper took the root's name. Collapse it and promote the real element.
11
+
12
+ ## Inner parts
13
+
3
14
  A **named part** is an element that a site owner would plausibly want to control independently in the editor. Zero config scans global class names and creates an editor element for each one. Each editor element can surface:
4
15
 
5
16
  - **CSS properties** — styling controls (fill, typography, border, etc.)
@@ -12,7 +23,7 @@ An element deserves its own named part if a site owner would plausibly need to i
12
23
  - ❌ **State or variant** (`active`, `selected`, `current`, `disabled`, `open`, `checked`) — not a part, it's a **design state** of a part. Implement it per [`DESIGN-STATES.md`](DESIGN-STATES.md): native states from interactive markup; custom states as a flat global modifier on the element's own (component-name-prefixed) class (e.g. `carousel-slide--active`, toggled in JSX) plus a `:global(.carousel-slide--active)` CSS rule. The modifier is a state, not a named part.
13
24
  - ❌ **Hidden/shown state of an existing part** — the hidden and shown states of a part are not separate parts. The element itself should be a named part (so the editor can control its visibility per breakpoint); creating an additional part to represent its hidden or shown variant is wrong.
14
25
  - ❌ **Pure grouping wrapper** — not a part. A `<div>` whose only role is to hold already-named siblings has no independent editor surface; let layout live in the parent's CSS.
15
- - ❌ **Child with no independent editor surface** — not a part if its styling and data are already fully owned by the parent. This applies regardless of how many siblings it has. Two ways a child's editor surface can already be covered by the parent: (1) its CSS properties are inherited or set via the parent's rule; (2) its data is defined on the parent. **Canonical example:** an `<img>` inside a carousel slide whose `src` and `alt` come from the parent slide's data, and whose visual properties (object-fit, border-radius) could equally be set on the slide's own CSS rule — the slide already owns both data and styling, so the `<img>` is not a named part. Use a CSS module class for any structural CSS it needs.
26
+ - ❌ **Child with no independent editor surface** — not a part if its styling and data are already fully owned by the parent. This applies regardless of how many siblings it has. Two ways a child's editor surface can already be covered by the parent: (1) its CSS properties are inherited or set via the parent's rule; (2) its data is defined on the parent. **Canonical example:** an `<img>` inside a carousel slide whose `src` and `alt` come from the parent slide's data, and whose visual properties (object-fit, border-radius) could equally be set on the slide's own CSS rule — the slide already owns both data and styling, so the `<img>` is not a named part. Use a CSS module class for any structural CSS it needs. **Exception — interactive HTML elements (`<button>`, `<a>`, `<input>`) are never excluded by this criterion.** They always carry an independent styling surface: background, border, border-radius, hover/focus states, color, and typography are all meaningfully tunable per element in the editor. Apply this exclusion only to purely static structural elements (layout wrappers, grouping containers, decorative dividers). This makes an interactive element a named part **when it is an inner element** — if it is the elected root (Step 0), it is already named by `'<component-name>'` and must not be given a prefixed inner-part class as well.
16
27
  - ❌ **Positional duplicate** — not separate parts. Elements that are semantically identical and differ only in position (e.g. prev/next buttons) are one part; differentiate position with CSS (`:first-of-type` / `:last-of-type`, `data-` attribute, or `:nth-child`).
17
28
  - ✅ **Passes all checks** — a named part. Classify as **Semantic** (needs `elementProps`: data, behavior, direction, event handlers) or **Styling-only** (CSS class is sufficient).
18
29
 
@@ -22,5 +33,7 @@ Before finalising, verify each proposed part against its parent:
22
33
 
23
34
  > Would the editor controls generated for this part be a strict subset of its parent's controls?
24
35
 
25
- If yes — the part adds no independent editor surface and should be removed. This catches rationalisation after-the-fact ("the parent *could* expose this CSS property too, but so could the child separately"). When in doubt, fewer parts is usully better.
36
+ If yes — the part adds no independent editor surface and should be removed. This catches rationalisation after-the-fact ("the parent *could* expose this CSS property too, but so could the child separately"). When in doubt, fewer parts is usually better.
37
+
38
+ Then run the same question in reverse, on the root: if the root has exactly one child part and no editor surface of its own, it is a plumbing wrapper — delete it and promote the child per Step 0.
26
39
 
@@ -10,7 +10,6 @@ This guide defines rules and guidance on **how to implement** production-quality
10
10
  - [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md) — What should be a React prop vs CSS
11
11
  - [`COMPONENT-API.md`](COMPONENT-API.md) — Props structure, elementProps, data types, file splitting, containers, array props
12
12
  - [`ANIMATED-COMPONENTS.md`](ANIMATED-COMPONENTS.md) — Play/pause control and autoplay for animated/playable components
13
- - [`COMPONENT-PREVIEW.md`](COMPONENT-PREVIEW.md) — `component.preview.tsx` patterns and `useIsEditMode()` usage
14
13
  - [`REACT-PATTERNS.md`](REACT-PATTERNS.md) — SSR-safe patterns, CSS rules, common mistakes
15
14
 
16
15
  ## React 18 features are not supported
@@ -24,7 +23,7 @@ React 18 features.
24
23
  Understand the component and infer its behavior. Extract what is provided; use reasonable defaults for anything not specified.
25
24
 
26
25
  1. **Identity** — Component name.
27
- 2. **Structure** — Identify named parts by applying the mandatory filter in [`PARTS.md`](PARTS.md) to every candidate element before accepting it as a part. Include content/data props (labels, items, types, required vs optional) and configuration (toggles, choices, ranges, modes).
26
+ 2. **Structure** — Elect the root element per [`PARTS.md`](PARTS.md) Step 0, then identify named inner parts by applying the mandatory filter in [`PARTS.md`](PARTS.md) to every candidate element before accepting it as a part. Include content/data props (labels, items, types, required vs optional) and configuration (toggles, choices, ranges, modes).
28
27
  3. **Interactions** — Clicks, hover/focus; what is exposed as event props vs handled internally. If the component's primary content is a **playable animation** (Lottie/JSON, animated GIF/SVG, canvas/WebGL loop, video-like surface), it gets a play/pause control — follow [`ANIMATED-COMPONENTS.md`](ANIMATED-COMPONENTS.md).
29
28
  4. **States** — For every part, decide which design states it supports (native: `hover`/`focus`/`disabled`/`invalid`; custom: `selected`/`active`/`open`/… ) by applying the heuristic in [`DESIGN-STATES.md`](DESIGN-STATES.md), and record them in the plan. These become the editor's per-element state styling controls.
30
29
 
@@ -170,5 +169,5 @@ See [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md) and [`COMPONENT-API.md`](COMPONENT-API.
170
169
 
171
170
  **Phase 2: Component File** — Apply all §1.1 mandatory features and §1.2 implementation standards; toggle custom-state classes from data ([`DESIGN-STATES.md`](DESIGN-STATES.md))
172
171
 
173
- **Phase 3: Styles** — Apply Part 2 SCSS rules, including state styles ([`DESIGN-STATES.md`](DESIGN-STATES.md))
172
+ **Phase 3: Styles** — Apply Part 2 SCSS rules, including state styles ([`DESIGN-STATES.md`](DESIGN-STATES.md)). If the request uses the words **branded**, **themed**, or **brand-aware**, also apply [`BRANDED-COMPONENTS.md`](BRANDED-COMPONENTS.md) before writing CSS.
174
173
 
@@ -31,27 +31,31 @@ This example sorts staff members to balance workload by prioritizing those with
31
31
  ```typescript
32
32
  import { staffSorting } from "@wix/bookings/service-plugins";
33
33
  import { auth } from "@wix/essentials";
34
- import { bookings } from "@wix/bookings";
34
+ import { extendedBookings } from "@wix/bookings";
35
35
 
36
36
  staffSorting.provideHandlers({
37
37
  sortStaffMembers: async (payload) => {
38
38
  const { request } = payload;
39
39
  const { availableResourceIds, slot } = request;
40
40
 
41
- // Query recent bookings for each available staff member
42
- const elevatedQuery = auth.elevate(bookings.queryBookings);
43
- const recentBookings = await elevatedQuery()
44
- .eq("resource.id", availableResourceIds)
45
- .ge("start.timestamp", new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString())
46
- .find();
41
+ const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
42
+ const elevatedQuery = auth.elevate(extendedBookings.query);
43
+ const result = await elevatedQuery({
44
+ filter: {
45
+ "bookedEntity.item.slot.resource.id": { "$in": availableResourceIds },
46
+ "startDate": { "$gte": sevenDaysAgo },
47
+ },
48
+ cursorPaging: { limit: 100 },
49
+ });
50
+ const recentBookings = result.extendedBookings ?? [];
47
51
 
48
52
  // Count bookings per staff member
49
53
  const bookingCounts = new Map<string, number>();
50
54
  for (const id of availableResourceIds) {
51
55
  bookingCounts.set(id, 0);
52
56
  }
53
- for (const booking of recentBookings.items) {
54
- const resourceId = booking.resource?.id;
57
+ for (const booking of recentBookings) {
58
+ const resourceId = booking.booking?.bookedEntity?.slot?.resource?._id;
55
59
  if (resourceId && bookingCounts.has(resourceId)) {
56
60
  bookingCounts.set(resourceId, (bookingCounts.get(resourceId) ?? 0) + 1);
57
61
  }
@@ -69,6 +69,10 @@ customTriggers.provideHandlers({
69
69
  });
70
70
  ```
71
71
 
72
+ ## Singular Constraint
73
+
74
+ `ECOM_DISCOUNTS_TRIGGER` is **singular** — only one component of this type is allowed per app. Do not scaffold or include two Discount Triggers service plugins in the same app.
75
+
72
76
  ## Key Implementation Notes
73
77
 
74
78
  1. **Trigger IDs must match** - The `customTriggerId` in `getEligibleTriggers` must match an `_id` from `listTriggers`
@@ -67,6 +67,10 @@ giftVouchersProvider.provideHandlers({
67
67
  });
68
68
  ```
69
69
 
70
+ ## Singular Constraint
71
+
72
+ `GIFT_CARDS_PROVIDER` is **singular** — only one component of this type is allowed per app. Do not scaffold or include two Gift Cards service plugins in the same app.
73
+
70
74
  ## Key Implementation Notes
71
75
 
72
76
  1. **All three handlers required** - You must implement `redeem`, `getBalance`, and `_void`
@@ -26,7 +26,7 @@ paymentSettings.provideHandlers({
26
26
  getPaymentSettings: async ({ request, metadata }) => {
27
27
  try {
28
28
  // Get the order total
29
- const orderTotal = request.order?.totals?.total || 0;
29
+ const orderTotal = Number(request.order?.priceSummary?.total?.amount) || 0;
30
30
 
31
31
  // Determine if 3DS is required based on order value
32
32
  const require3DS = orderTotal >= HIGH_VALUE_THRESHOLD;
@@ -45,6 +45,7 @@ paymentSettings.provideHandlers({
45
45
  };
46
46
  }
47
47
  },
48
+ getPaymentSettingsForCheckout: async () => ({ blockedPaymentOptions: [] }),
48
49
  });
49
50
  ```
50
51
 
@@ -83,6 +84,7 @@ paymentSettings.provideHandlers({
83
84
  };
84
85
  }
85
86
  },
87
+ getPaymentSettingsForCheckout: async () => ({ blockedPaymentOptions: [] }),
86
88
  });
87
89
  ```
88
90
 
@@ -53,6 +53,10 @@ shippingRates.provideHandlers({
53
53
  });
54
54
  ```
55
55
 
56
+ ## Singular Constraint
57
+
58
+ `ECOM_SHIPPING_RATES` is **singular** — only one component of this type is allowed per app. Do not scaffold or include two Shipping Rates service plugins in the same app.
59
+
56
60
  ## Key Implementation Notes
57
61
 
58
62
  1. **Price as string** - All price values must be strings, not numbers
@@ -0,0 +1,54 @@
1
+ # Tools Provider Service Plugin Reference
2
+
3
+ ## Overview
4
+
5
+ The Tools Provider SPI lets your app handle tool invocations from the Wix AI assistant. Implement the `runTool` handler — it receives the tool's `methodName` and a JSON `payload`, runs your business logic, and returns a response the AI assistant uses to answer the user.
6
+
7
+ This is the execution side of the App Tools feature. The declaration side lives in the `APP_TOOLS` extension. See [APP_TOOLS.md](../APP_TOOLS.md) for the full picture.
8
+
9
+ ## Request and Response Schema
10
+
11
+ Before implementing, call `ReadFullDocsMethodSchema` on the docs URL to get the full request/response types.
12
+
13
+ | Handler | Docs URL |
14
+ | --- | --- |
15
+ | `runTool` | https://dev.wix.com/docs/api-reference/app-management/app-tools/tools-provider-v1/run-tool?apiView=SDK |
16
+
17
+ ## Example: Routing Tool Calls by methodName
18
+
19
+ ```typescript
20
+ import { toolsProvider } from '@wix/app-tools/service-plugins';
21
+
22
+ toolsProvider.provideHandlers({
23
+ runTool: async ({ request, metadata }) => {
24
+ const { methodName, payload } = request;
25
+
26
+ switch (methodName) {
27
+ case 'get-order-status': {
28
+ const orderId = payload?.['orderId'];
29
+ if (typeof orderId !== 'string' || !orderId) {
30
+ throw new Error('orderId is required');
31
+ }
32
+ // fetch order status...
33
+ return {
34
+ response: {
35
+ status: 'shipped',
36
+ trackingNumber: 'TRACK123'
37
+ }
38
+ };
39
+ }
40
+
41
+ default:
42
+ throw new Error(`Unknown tool: ${methodName}`);
43
+ }
44
+ }
45
+ });
46
+ ```
47
+
48
+ ## Key Implementation Notes
49
+
50
+ 1. **Route on `methodName`** — use a `switch` or map to dispatch to the right handler logic
51
+ 2. **Validate inputs defensively** — `requestSchema` is advisory for the AI assistant; Wix does not validate the payload before calling your handler
52
+ 3. **Handle all activated tools** — cover every `methodName` with `activated: true` in your `APP_TOOLS` declaration; unhandled names should throw a clear error
53
+ 4. **Respond quickly** — the AI assistant is waiting; slow responses degrade the user experience
54
+ 5. **Elevate permissions for Wix API calls** — wrap SDK methods with `auth.elevate` from `@wix/essentials`
@@ -60,6 +60,38 @@ export async function listProductsPage(
60
60
 
61
61
  ---
62
62
 
63
+ ## Search products by name
64
+
65
+ V3 `queryProducts` filters only on `_id`, `slug`, `options.id` and `handle` — `name` is a
66
+ compile error. Use `productsV3.searchProducts()`, a direct call rather than a builder. V1 has
67
+ no search method; its builder accepts `name` via `startsWith` (prefix match only, no `fuzzy`).
68
+
69
+ Imports come from the first example in this file.
70
+
71
+ ```typescript
72
+ // `v` comes from getVersion() — see STORES_VERSIONING.md.
73
+ export async function searchByName(
74
+ term: string,
75
+ limit: number,
76
+ v: 'V1_CATALOG' | 'V3_CATALOG' | 'STORES_NOT_INSTALLED',
77
+ ) {
78
+ if (v === 'V3_CATALOG') {
79
+ const res = await productsV3.searchProducts({
80
+ cursorPaging: { limit },
81
+ // `fields` is required for free-text search. Searchable: 'name', 'description',
82
+ // 'variantsInfo.variants.sku', 'minVariantPriceInfo.sku'.
83
+ search: { expression: term, fields: ['name'], fuzzy: true },
84
+ });
85
+ // Note `products` (not `items`) and `pagingMetadata.hasNext` (a property, not a method).
86
+ return res.products ?? [];
87
+ }
88
+ const res = await products.queryProducts().startsWith('name', term).limit(limit).find();
89
+ return res.items;
90
+ }
91
+ ```
92
+
93
+ ---
94
+
63
95
  ## Display price/stock without fetching variants
64
96
 
65
97
  V3 `queryProducts` does not return variants. Read product-level rollup fields instead: