@wix/agent-skills 1.16.3 → 1.18.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 (283) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +115 -12
  3. package/skills/wix-app/references/APP_MARKET_REVIEW.md +1 -1
  4. package/skills/wix-app/references/BACKEND_API.md +18 -0
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +6 -0
  6. package/skills/wix-app/references/DASHBOARD_MODAL.md +10 -2
  7. package/skills/wix-app/references/DASHBOARD_PAGE.md +32 -70
  8. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +145 -127
  9. package/skills/wix-app/references/SITE_PLUGIN.md +14 -2
  10. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +74 -68
  11. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
  12. package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +79 -0
  13. package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +73 -0
  14. package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +52 -0
  15. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +184 -0
  16. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
  17. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +94 -49
  18. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +16 -6
  19. package/skills/wix-app/references/editor-react-component/BROWSER-SUPPORT.md +56 -0
  20. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
  21. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +35 -40
  22. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +167 -445
  23. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +56 -29
  24. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
  25. package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
  26. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
  27. package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +11 -3
  28. package/skills/wix-app/references/editor-react-component/PARTS.md +46 -24
  29. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
  30. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
  31. package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
  32. package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
  33. package/skills/wix-base44-connector/SKILL.md +156 -50
  34. package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +78 -0
  35. package/skills/wix-base44-connector/scripts/utils.js +239 -45
  36. package/skills/wix-headless/entry/bootstrap.mjs +9 -2
  37. package/skills/wix-headless/entry/skill.md +1 -1
  38. package/skills/wix-headless/references/CAPABILITIES.md +9 -1
  39. package/skills/wix-headless/references/DESIGN.md +1 -0
  40. package/skills/wix-headless/references/DISCOVERY.md +2 -1
  41. package/skills/wix-headless/references/IMAGE_GENERATION.md +1 -0
  42. package/skills/wix-headless/references/SDK_HANDOFF.md +5 -2
  43. package/skills/wix-headless/references/SEED.md +2 -1
  44. package/skills/wix-headless/references/SETUP.md +1 -0
  45. package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +2 -2
  46. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +68 -31
  47. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +26 -10
  48. package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +8 -8
  49. package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +1 -1
  50. package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +1 -1
  51. package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
  52. package/skills/wix-headless/references/inline-recipes/how-to-code-rentals.md +254 -0
  53. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
  54. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +13 -0
  55. package/skills/wix-headless/references/inline-recipes/setup-rentals.md +254 -0
  56. package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
  57. package/skills/wix-headless/references/non-astro.md +1 -1
  58. package/skills/wix-headless-fast/SKILL.md +166 -0
  59. package/skills/wix-headless-fast/entry/skill.md +99 -0
  60. package/skills/wix-headless-fast/install/deploy.mjs +433 -0
  61. package/skills/wix-headless-fast/install/fast-path.mjs +141 -0
  62. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +137 -0
  63. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +137 -0
  64. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +113 -0
  65. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +42 -0
  66. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +123 -0
  67. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +70 -0
  68. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +99 -0
  69. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +76 -0
  70. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +62 -0
  71. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +40 -0
  72. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +99 -0
  73. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +24 -0
  74. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +16156 -0
  75. package/skills/wix-headless-fast/references/blog/seed/SEED.md +72 -0
  76. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +287 -0
  77. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +129 -0
  78. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +143 -0
  79. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +119 -0
  80. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +138 -0
  81. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +54 -0
  82. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +206 -0
  83. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +96 -0
  84. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +70 -0
  85. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +40 -0
  86. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +76 -0
  87. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +22 -0
  88. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +11962 -0
  89. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +61 -0
  90. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +302 -0
  91. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +179 -0
  92. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +83 -0
  93. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +57 -0
  94. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +151 -0
  95. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +75 -0
  96. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +41 -0
  97. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +11262 -0
  98. package/skills/wix-headless-fast/references/cms/seed/SEED.md +103 -0
  99. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +324 -0
  100. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +149 -0
  101. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +66 -0
  102. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +176 -0
  103. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +118 -0
  104. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +117 -0
  105. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +59 -0
  106. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +136 -0
  107. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +128 -0
  108. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +61 -0
  109. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +40 -0
  110. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +12 -0
  111. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +80 -0
  112. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +21 -0
  113. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +11884 -0
  114. package/skills/wix-headless-fast/references/events/seed/SEED.md +86 -0
  115. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +276 -0
  116. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +150 -0
  117. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +317 -0
  118. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +269 -0
  119. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +231 -0
  120. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +135 -0
  121. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +10593 -0
  122. package/skills/wix-headless-fast/references/forms/seed/SEED.md +108 -0
  123. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +320 -0
  124. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +63 -0
  125. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +60 -0
  126. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +155 -0
  127. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +78 -0
  128. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +47 -0
  129. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +66 -0
  130. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +88 -0
  131. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +53 -0
  132. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +122 -0
  133. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +50 -0
  134. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +21 -0
  135. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +42 -0
  136. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +10 -0
  137. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +11 -0
  138. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +10329 -0
  139. package/skills/wix-headless-fast/references/members/seed/SEED.md +39 -0
  140. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +94 -0
  141. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +134 -0
  142. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
  143. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
  144. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +115 -0
  145. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +59 -0
  146. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +39 -0
  147. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +58 -0
  148. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +165 -0
  149. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +55 -0
  150. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
  151. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
  152. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +21 -0
  153. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +29 -0
  154. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +10197 -0
  155. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +78 -0
  156. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +258 -0
  157. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +133 -0
  158. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +58 -0
  159. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +126 -0
  160. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +37 -0
  161. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +39 -0
  162. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +75 -0
  163. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +45 -0
  164. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +30 -0
  165. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
  166. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +40 -0
  167. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +21 -0
  168. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +11226 -0
  169. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +71 -0
  170. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +279 -0
  171. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +165 -0
  172. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +142 -0
  173. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
  174. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
  175. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +155 -0
  176. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +55 -0
  177. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +43 -0
  178. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +177 -0
  179. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +165 -0
  180. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +103 -0
  181. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +254 -0
  182. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +146 -0
  183. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +168 -0
  184. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
  185. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +22 -0
  186. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +12 -0
  187. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +12560 -0
  188. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +81 -0
  189. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +479 -0
  190. package/skills/wix-headless-fast/references/shared/CONTENT.md +22 -0
  191. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +73 -0
  192. package/skills/wix-headless-fast/references/shared/DESIGN.md +26 -0
  193. package/skills/wix-headless-fast/references/shared/app/styles/global.css +52 -0
  194. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +15 -0
  195. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +27 -0
  196. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +24 -0
  197. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +76 -0
  198. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
  199. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +46 -0
  200. package/skills/wix-headless-fast/references/shared/seed/images.mjs +145 -0
  201. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +149 -0
  202. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +26 -0
  203. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +121 -0
  204. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +100 -0
  205. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +130 -0
  206. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +48 -0
  207. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +66 -0
  208. package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +103 -0
  209. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +48 -0
  210. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +140 -0
  211. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +80 -0
  212. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +101 -0
  213. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +221 -0
  214. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +215 -0
  215. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +109 -0
  216. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +46 -0
  217. package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +56 -0
  218. package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +23 -0
  219. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +12247 -0
  220. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +85 -0
  221. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +415 -0
  222. package/skills/wix-manage/SKILL.md +28 -2
  223. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
  224. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
  225. package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
  226. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +141 -0
  227. package/skills/wix-manage/references/google-business-profile/connect-google-business-profile.md +134 -0
  228. package/skills/wix-manage/references/google-business-profile/manage-google-business-profile-locations.md +182 -0
  229. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +3 -0
  230. package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
  231. package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
  232. package/skills/wix-manage/references/sites/query-sites.md +72 -161
  233. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +21 -6
  234. package/skills/wix-manage/references/stores/update-product-with-options.md +83 -0
  235. package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
  236. package/skills/wix-vibe-headless/SKILL.md +18 -4
  237. package/skills/wix-vibe-headless/install/deploy.cjs +12 -4
  238. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +2 -1
  239. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +16 -10
  240. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +13 -8
  241. package/skills/wix-vibe-headless/platforms/base44.md +27 -62
  242. package/skills/wix-vibe-headless/platforms/generic.md +6 -3
  243. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +45 -0
  244. package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +67 -0
  245. package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +128 -0
  246. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +5 -3
  247. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
  248. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +250 -0
  249. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +12 -5
  250. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +41 -0
  251. package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.js +267 -0
  252. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +6 -3
  253. package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +470 -0
  254. package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +425 -0
  255. package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +187 -0
  256. package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +238 -0
  257. package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +108 -0
  258. package/skills/wix-vibe-headless/references/forms/seed/SEED.md +1762 -0
  259. package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +13 -0
  260. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
  261. package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
  262. package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
  263. package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
  264. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +152 -92
  265. package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
  266. package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
  267. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +15 -8
  268. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +37 -0
  269. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
  270. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +18 -6
  271. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +30 -7
  272. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +46 -10
  273. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
  274. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
  275. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -516
  276. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
  277. package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
  278. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
  279. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +0 -110
  280. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +0 -51
  281. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +0 -49
  282. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +0 -92
  283. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +0 -139
@@ -1,139 +1,222 @@
1
- # Accessibility (ARIA)
1
+ # Accessibility Implementation and Review
2
2
 
3
- Rules and patterns for ARIA accessibility support in Editor React components.
3
+ Use this reference while authoring Editor React Component props and JSX and
4
+ after every JSX edit.
4
5
 
5
- ---
6
+ ## Contents
6
7
 
7
- ## Rules
8
+ - [Implementation Contract](#implementation-contract)
9
+ - [Review Scope](#review-scope)
10
+ - [Automated Scanners](#automated-scanners)
11
+ - [Finding Triage](#finding-triage)
12
+ - [Manual Review](#manual-review)
13
+ - [Pre-Fix Checks for Non-Interactive Controls](#pre-fix-checks-for-non-interactive-controls)
14
+ - [Completion Criteria](#completion-criteria)
8
15
 
9
- ### All ARIA Attributes Through the `a11y` Prop
16
+ ## Implementation Contract
10
17
 
11
- - **NEVER** add individual ARIA properties like `ariaLabel?: string`, `ariaDescribedBy?: string`, `role?: string`, etc. to a component's props interface.
12
- - **ALL** accessibility attributes MUST come through the `a11y?: A11y` prop.
13
- - The `A11y` type includes: `ariaLabel`, `ariaDescribedBy`, `ariaLabelledBy`, `role`, `ariaHidden`, `ariaLive`, and all other ARIA attributes.
14
- - Users provide ARIA values through the `a11y` prop: `<Component a11y={{ ariaLabel: "..." }} />`
18
+ ### Route ARIA Through `a11y`
15
19
 
16
- ### ARIA Label Rules
20
+ Do not add individual public props such as `ariaLabel`, `ariaDescribedBy`, or
21
+ `role`. Use the platform `A11y` type and convert it at the semantic target.
17
22
 
18
- ARIA labels are user-facing content and must NEVER be hardcoded as string literals in JSX.
23
+ ```tsx
24
+ import type { A11y, Direction } from '@wix/editor-react-types';
25
+ import { convertA11yKeysToHtmlFormat } from '@wix/react-component-utils';
19
26
 
20
- **Three patterns (in order of preference):**
27
+ export type TabsProps = {
28
+ id?: string;
29
+ className?: string;
30
+ direction?: Direction;
31
+ a11y?: A11y;
32
+ };
21
33
 
22
- 1. **No aria-label (preferred)** — Visible text content is sufficient:
34
+ <nav {...(a11y && convertA11yKeysToHtmlFormat(a11y))}>{tabs}</nav>;
35
+ ```
23
36
 
24
- ```tsx
25
- <Button>Play</Button> // Visible text ✅
26
- ```
37
+ Apply root accessibility to the elected root. If requirements assign
38
+ accessibility to a named inner part, route it through that part's
39
+ `elementProps.<name>.a11y` contract and convert it on the actual semantic
40
+ element.
27
41
 
28
- 2. **User-configurable** — Via a11y prop (for root or element-specific labels, per requirements):
42
+ ### Provide Accessible Names
29
43
 
30
- ```tsx
31
- // User provides: <ComponentName a11y={{ ariaLabel: "Background music" }} />
32
- // Component applies to root (using the a11y-to-HTML conversion utility):
33
- {...(a11y && convertA11yKeysToHtmlFormat(a11y))}
44
+ Use this priority order:
34
45
 
35
- // Or for inner elements (if requirements specify):
36
- // elementProps.button.a11y gets passed to the button element
37
- ```
46
+ 1. Prefer visible text that already names the control.
47
+ 2. Use user-configurable `a11y` when the name depends on site-owner content.
48
+ 3. Use the project's translation mechanism or a `constants.ts` value only for a
49
+ stable system-owned label required by the component contract.
38
50
 
39
- 3. **System-required** — Via constants.ts (when requirements specify non-configurable label):
51
+ Never hardcode an `aria-label` string directly in JSX.
40
52
 
41
- ```tsx
42
- // constants.ts
43
- export const ARIA_LABELS = {
44
- playButton: 'Play audio',
45
- muteButton: 'Mute audio',
46
- } as const;
53
+ ```tsx
54
+ // constants.ts
55
+ export const ARIA_LABELS = {
56
+ playButton: 'Play animation',
57
+ pauseButton: 'Pause animation',
58
+ } as const;
47
59
 
48
- // component.tsx
49
- import { ARIA_LABELS } from './constants';
50
- <Button aria-label={ARIA_LABELS.playButton}>▶</Button>;
51
- ```
60
+ // component JSX
61
+ <button
62
+ aria-label={isPlaying ? ARIA_LABELS.pauseButton : ARIA_LABELS.playButton}
63
+ >
64
+ {isPlaying ? <PauseIcon /> : <PlayIcon />}
65
+ </button>;
66
+ ```
52
67
 
53
- **❌ NEVER hardcode string literals:**
68
+ Icon-only controls require an accessible name. Controls with visible text,
69
+ including an icon plus visible text, usually do not need another ARIA label.
54
70
 
55
- ```tsx
56
- // ❌ WRONG - hardcoded strings
57
- <Button aria-label="Play">▶</Button>
58
- <Button aria-label={isPlaying ? "Pause" : "Play"}>▶</Button>
59
- <Slider aria-label="Volume" />
71
+ ### Preserve Semantic Ownership
72
+
73
+ - Put roles, labels, descriptions, keyboard handling, and focusability on the
74
+ element that owns the behavior, not on a layout wrapper.
75
+ - Prefer native elements over recreating their semantics with `role`.
76
+ - Hide decorative-only output with `aria-hidden="true"` when appropriate.
77
+ - Preserve heading, list, navigation, and landmark semantics through wrappers.
78
+ - Keep hidden or collapsed state consistent across visuals, focusability, and
79
+ the accessibility tree.
80
+
81
+ ## Review Scope
82
+
83
+ Run this review after creating or editing JSX.
84
+
85
+ | Request | Scan and inspect |
86
+ | --- | --- |
87
+ | Specific file | That file and rendered wrappers or shared components it imports |
88
+ | A component name or "this component" | All hand-edited files in its component folder plus relevant shared imports |
89
+ | Full audit | Every component under `src/extensions/site/components/` plus relevant shared imports |
90
+
91
+ Exclude `*.generated.ts`; it is regenerated from JSX and CSS.
92
+ Imported shared components are inspection context, not automatic edit scope.
93
+ Report a confirmed shared-component issue instead of changing a broadly reused
94
+ primitive unless the requested fix requires that shared change and its impact is
95
+ understood.
96
+
97
+ ## Automated Scanners
98
+
99
+ `<SKILL_ROOT>` is the absolute directory containing the active `SKILL.md`. Run
100
+ both commands from the consumer Wix package so dependencies resolve from that
101
+ project. Pass `.tsx` or `.jsx` paths relative to the current directory.
102
+
103
+ ```bash
104
+ node <SKILL_ROOT>/scripts/scan-a11y-eslint.cjs <file1> [file2] ...
105
+ node <SKILL_ROOT>/scripts/scan-a11y-code.cjs <file1> [file2] ...
60
106
  ```
61
107
 
62
- **Why this matters:**
108
+ Do not treat scanner startup failure as a clean result. The ESLint scanner
109
+ reports JSX accessibility rules. The semantic scanner follows imports up to
110
+ four levels and emits resolution evidence and confidence. Neither scanner
111
+ covers every Editor React Component contract, so complete the manual review
112
+ even when both return zero findings.
63
113
 
64
- - Hardcoded strings cannot be translated or customized
65
- - User-provided labels take precedence when available
66
- - Constants allow centralized management and potential future translation
114
+ ## Finding Triage
67
115
 
68
- ### Detecting Icon-Only Interactive Elements
116
+ For every finding:
69
117
 
70
- **Icon-only elements require aria-labels.** Detect with this checklist:
118
+ 1. Trace the rendered semantic element through local and shared components.
119
+ 2. Deduplicate findings for the same issue and location; keep the finding with
120
+ stronger evidence.
121
+ 3. Assign `confirmed`, `false-positive`, or `not-relevant`.
122
+ 4. Fix only confirmed findings.
71
123
 
72
- | Element Content | Needs aria-label? | Example |
73
- | --------------------- | ----------------- | ----------------------------------------- |
74
- | Visible text only | ❌ No | `<Button>Play</Button>` |
75
- | Icon component + text | ❌ No | `<Button><PlayIcon />Play</Button>` |
76
- | Icon/emoji only | ✅ YES | `<Button>▶</Button>` |
77
- | Image only | ✅ YES | `<Button><img src="play.png" /></Button>` |
78
- | SVG only | ✅ YES | `<Button><svg>...</svg></Button>` |
124
+ Scanner output is a lead, not permission to edit blindly.
79
125
 
80
- **Critical:** If button/link contains ONLY visual elements (icons, emojis, images, SVG) with NO text node, it MUST have aria-label from constants.
126
+ ### Confidence and Action
81
127
 
82
- **Pattern for dynamic labels:**
128
+ | Confidence | Evidence | Action |
129
+ | --- | --- | --- |
130
+ | High | The rendered element and static props directly establish the issue. | Confirm and fix when the change is safe and local. |
131
+ | Medium | Props or partial component resolution strongly imply the semantics. | Inspect surrounding code, then confirm or discard. |
132
+ | Low | Heuristics or unresolved runtime spreads are the main evidence. | Trace further and fix only after confirmation. |
133
+ | Unknown | The semantic target cannot be resolved. | Leave unchanged and report the ambiguity when material. |
83
134
 
84
- ```tsx
85
- // constants.ts
86
- export const ARIA_LABELS = {
87
- playButton: 'Play audio',
88
- pauseButton: 'Pause audio',
89
- } as const;
135
+ Confidence establishes whether a finding is real, not whether its fix is safe.
136
+ Apply confirmed local, behavior-preserving fixes. Leave a confirmed issue
137
+ unchanged only when product intent is unknowable or the fix requires risky,
138
+ non-local behavior changes.
90
139
 
91
- // component.tsx
92
- <Button
93
- aria-label={isPlaying ? ARIA_LABELS.pauseButton : ARIA_LABELS.playButton}
94
- >
95
- {isPlaying ? '⏸' : '▶'}
96
- </Button>;
97
- ```
140
+ ### Semantic Resolution Order
98
141
 
99
- ---
142
+ Resolve rendered behavior in this order:
100
143
 
101
- ## Common Mistake: Individual ARIA Properties Instead of A11y Type
144
+ 1. Flagged JSX element and static props
145
+ 2. Explicit polymorphic props such as `as="a"` or `component="button"`
146
+ 3. Local component implementation
147
+ 4. Installed package source or declarations
148
+ 5. Prop evidence such as `href`, `to`, `src`, `alt`, and `role`
149
+ 6. Component-name heuristics
102
150
 
103
- **❌ Wrong:**
151
+ Follow local imports to their rendered root. For package imports, inspect the
152
+ resolved package entry when available. Do not assign more confidence than the
153
+ evidence supports.
104
154
 
105
- ```typescript
106
- import type { Direction } from '@wix/editor-react-types';
155
+ ## Manual Review
107
156
 
108
- export interface TabsProps {
109
- id?: string;
110
- className?: string;
111
- direction?: Direction;
112
- ariaLabel?: string; // ❌ Individual ARIA prop
113
- ariaDescribedBy?: string; // ❌ Individual ARIA prop
114
- role?: string; // ❌ Individual ARIA prop
115
- }
116
- ```
157
+ Verify all of the following after triaging scanner output.
117
158
 
118
- **✅ Correct:**
159
+ ### Semantic Targeting
119
160
 
120
- ```typescript
121
- import type { A11y, Direction } from '@wix/editor-react-types';
122
- import { convertA11yKeysToHtmlFormat } from '@wix/react-component-utils';
161
+ - `a11y` is typed and converted on the correct semantic element.
162
+ - Wrappers and polymorphic components preserve their documented semantics.
163
+ - Configurable heading or tag choices reach the rendered element.
164
+ - Extension overrides preserve generated accessibility fields.
123
165
 
124
- export interface TabsProps {
125
- id?: string;
126
- className?: string;
127
- direction?: Direction;
128
- a11y?: A11y; // ✅ All ARIA attributes through this prop
129
- }
166
+ ### Names and Visual Content
130
167
 
131
- // Usage:
132
- <Tabs a11y={{ ariaLabel: "Navigation", role: "navigation" }} />
168
+ - Icon-only controls have configurable or stable system-owned names.
169
+ - Visually hidden text remains in the accessibility tree when needed.
170
+ - Meaningful images and icons are named; decorative repetitions are hidden.
171
+ - Accessibility strings are not hardcoded directly in JSX.
133
172
 
134
- // In component:
135
- {...(a11y && convertA11yKeysToHtmlFormat(a11y))}
136
- ```
173
+ ### Hidden Content and Focus
174
+
175
+ - Hidden or collapsed state agrees across visuals, focusability, and the
176
+ accessibility tree.
177
+ - Invisible content cannot receive focus unless the interaction requires it.
178
+ - Disabled and inert states behave consistently for keyboard and assistive
179
+ technology users.
180
+
181
+ ### Interaction and Structure
182
+
183
+ - Interactive-looking elements use native semantics or complete role, focus,
184
+ and keyboard behavior.
185
+ - `onClick` on a non-interactive tag is checked, including conditional spreads.
186
+ - Nested interactive children and existing focus management are inspected
187
+ before semantics are added to a wrapper.
188
+ - Lists, headings, landmarks, tabs, menus, dialogs, and breadcrumbs keep their
189
+ intended structure.
190
+ - The root implements the direction contract, and every `ReactNode` slot
191
+ isolates nested content with `dir="ltr"`.
192
+
193
+ ## Pre-Fix Checks for Non-Interactive Controls
194
+
195
+ Before adding `role="button"`, `tabIndex`, and keyboard handlers to a non-native
196
+ control, verify:
197
+
198
+ 1. **Interactive children:** it cannot contain a link, button, input, or another
199
+ interactive component in the active branch.
200
+ 2. **Focus ownership:** existing `tabIndex` or accessibility spreads have a
201
+ clear merge order and one authoritative source.
202
+ 3. **Interaction condition:** the same condition gates pointer, focus, and
203
+ keyboard behavior and excludes disabled or editor-controlled states when
204
+ needed.
205
+ 4. **Accessible-name scope:** the label intentionally names the component or
206
+ action and persists in every state where it is needed.
207
+
208
+ Prefer a native element when it preserves product behavior.
209
+
210
+ ## Completion Criteria
211
+
212
+ The accessibility review is complete only when:
137
213
 
138
- **Why:** The `A11y` type from `@wix/editor-react-types` provides a standardized way to handle ALL ARIA attributes (ariaLabel, ariaDescribedBy, ariaLabelledBy, role, ariaHidden, ariaLive, etc.). Individual ARIA props fragment the API and make it harder to use.
214
+ - both scanners start successfully;
215
+ - every finding is triaged;
216
+ - confirmed issues are fixed when safe;
217
+ - the manual review is complete; and
218
+ - both scanners are rerun on every changed `.tsx` or `.jsx` file.
139
219
 
220
+ Preserve visual and runtime behavior. Fix the semantic owner: root, named inner
221
+ part, shared primitive, or call site. Then return to the main workflow for the
222
+ Wix build, manifest generation, TypeScript check, and relevant project tests.
@@ -1,14 +1,22 @@
1
- # Animated Components (Play/Pause Control)
1
+ # Animated Components
2
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.
3
+ Use this reference when the component's primary content is a **playable
4
+ animation**—a Lottie/JSON animation, an animated GIF/SVG, a canvas/WebGL loop,
5
+ or a video-like surface.
6
6
 
7
- Every such component MUST ship an on-stage **play/pause button**.
7
+ Every such component must ship an on-stage **play/pause button**.
8
8
 
9
- ---
9
+ ## Contents
10
10
 
11
- ## When this applies
11
+ - [Apply When](#apply-when)
12
+ - [Required Contract](#required-contract)
13
+ - [Define Props](#1-define-props)
14
+ - [Manage Playback State](#2-manage-playback-state)
15
+ - [Add the Play/Pause Button](#3-add-the-playpause-button)
16
+ - [Suppress Autoplay in `component.preview.tsx`](#4-suppress-autoplay-in-componentpreviewtsx)
17
+ - [Checklist](#checklist)
18
+
19
+ ## Apply When
12
20
 
13
21
  Apply automatically — without being asked — whenever the component has an
14
22
  `autoPlay` prop **or** its primary content is a **startable / loopable**
@@ -22,25 +30,28 @@ animation a visitor would reasonably want to start or stop:
22
30
 
23
31
  **Key rule:** If the component accepts an `autoPlay` prop — even if the
24
32
  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
33
+ player, it must expose a play/pause button so visitors can stop the
26
34
  auto-advancing behavior. "Autoplay" is a behavior contract, not an
27
35
  implementation detail.
28
36
 
29
- ---
30
-
31
- ## What to add (checklist)
37
+ ## Required Contract
32
38
 
33
- 1. **Props** — `autoPlay`, `loop`, `pauseButtonVisibility`
39
+ 1. **Props** — for a new component, use `autoPlay` when it can start
40
+ automatically, `loop` only when repeat behavior is supported, and
41
+ `pauseButtonVisibility` for the on-stage control. When editing, preserve
42
+ existing playback prop names and add only the missing safety contract.
34
43
  2. **Playback state** — `isPlaying` + `handlePause` / `handleResume`
35
- 3. **Play/pause button** — overlay `<button>` with inline SVG icon + CSS positioning and optional hover-only visibility; **must be a named part** (`classNames('component-name-play-button', styles.playButton)`) with a hover design state and a standalone `:focus-visible` keyboard indicator
44
+ 3. **Play/pause button** — overlay `<button>` with inline SVG icon and CSS
45
+ positioning; it must be a named part with `elementProps` wiring, a hover
46
+ design state, and a standalone `:focus-visible` keyboard indicator
36
47
  4. **Modify `component.preview.tsx`** — suppress autoplay in editor design mode
37
48
  5. **Respect `prefers-reduced-motion`** — suppress autoplay when the OS requests reduced motion
38
49
 
39
- ---
40
-
41
- ## 1. Props
50
+ ## 1. Define Props
42
51
 
43
- Playback controls are **behavior** props (see [`PROPS-VS-CSS.md`](PROPS-VS-CSS.md)):
52
+ Playback controls are behavior props. `pauseButtonVisibility` is the documented
53
+ exception to the usual visual-visibility rule because editor preview must be
54
+ able to force the safety control visible.
44
55
 
45
56
  ```typescript
46
57
  import type { A11y, Direction } from '@wix/editor-react-types';
@@ -59,12 +70,17 @@ export interface MyAnimationProps {
59
70
 
60
71
  /** Show play/pause button. Default `'showOnHover'`. */
61
72
  pauseButtonVisibility?: 'showAlways' | 'showOnHover';
73
+
74
+ elementProps?: {
75
+ playButton?: { className?: string };
76
+ };
62
77
  }
63
78
  ```
64
79
 
65
- ---
80
+ The example shows a looping animation. Omit `loop` when the component does not
81
+ support repeat behavior; do not add it only to match the example.
66
82
 
67
- ## 2. Playback state
83
+ ## 2. Manage Playback State
68
84
 
69
85
  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
86
 
@@ -97,9 +113,7 @@ const handleResume = () => setIsPlaying(true);
97
113
 
98
114
  Pass `isPlaying` to the animation renderer and toggle between `handlePause` / `handleResume` on button click.
99
115
 
100
- ---
101
-
102
- ## 3. Play/pause button
116
+ ## 3. Add the Play/Pause Button
103
117
 
104
118
  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
119
 
@@ -126,31 +140,54 @@ Position the button absolutely so it overlays the content without pushing other
126
140
  /* e.g. background: rgba(255, 255, 255, 1); */
127
141
  }
128
142
 
129
- /* Keyboard indicator only — deliberately unpaired: focus is not an editor
130
- design state on a non-input control. Do not add a --focus modifier here. */
143
+ /* Keyboard indicator only: focus is not an editor design state on a non-input
144
+ control unless editable focus styling was explicitly requested. */
131
145
  .playButton:focus-visible {
132
146
  outline: 2px solid currentColor;
133
147
  outline-offset: 2px;
134
148
  }
135
149
  ```
136
150
 
151
+ Define stable system-owned labels outside JSX:
152
+
153
+ ```ts
154
+ // constants.ts
155
+ export const ARIA_LABELS = {
156
+ playButton: 'Play animation',
157
+ pauseButton: 'Pause animation',
158
+ } as const;
159
+ ```
160
+
161
+ Set the visibility data attribute on the existing elected root, preserving its
162
+ full root contract:
163
+
164
+ ```tsx
165
+ data-pause-button-visibility={pauseButtonVisibility ?? 'showOnHover'}
166
+ ```
167
+
168
+ Wire the named part completely:
169
+
137
170
  ```tsx
138
- {/* ✅ Named part: play/pause is always a named part — site owners can style it independently */}
139
171
  <button
140
172
  type="button"
141
- className={classNames('my-animation-play-button', styles.playButton)}
173
+ {...elementProps?.playButton}
174
+ className={classNames(
175
+ 'my-animation-play-button',
176
+ styles.playButton,
177
+ elementProps?.playButton?.className,
178
+ )}
142
179
  onClick={isPlaying ? handlePause : handleResume}
143
- aria-label={isPlaying ? 'Pause' : 'Play'}
180
+ aria-label={
181
+ isPlaying ? ARIA_LABELS.pauseButton : ARIA_LABELS.playButton
182
+ }
144
183
  >
145
184
  {isPlaying ? <PauseIcon /> : <PlayIcon />}
146
185
  </button>
147
186
  ```
148
187
 
149
188
  ```css
150
- /* pauseButtonVisibility visibility behavior — descendant CSS is allowed here
151
- because these rules control the button's *visibility*, not its styling surface.
152
- The button itself is a named part (classNames('...-play-button', styles.playButton))
153
- and must carry both a global class and design-state selectors (see above). */
189
+ /* Narrow behavior-only exception documented in CSS-GUIDELINES.md. Keep editable
190
+ appearance on .playButton and use this relationship only for visibility. */
154
191
 
155
192
  /* showOnHover (default) */
156
193
  .root[data-pause-button-visibility="showOnHover"] .playButton {
@@ -166,37 +203,45 @@ Position the button absolutely so it overlays the content without pushing other
166
203
  /* showAlways — no extra CSS needed; button is visible by default */
167
204
  ```
168
205
 
169
- ---
206
+ ## 4. Suppress Autoplay in `component.preview.tsx`
170
207
 
171
- ## 4. Modify `component.preview.tsx` for autoplay suppression
208
+ The Wix CLI scaffold generates `component.preview.tsx`. Read the file first,
209
+ then edit only the body of the existing preview component. Do not overwrite
210
+ the file from scratch.
172
211
 
173
- 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.
212
+ ### Edit the generated `component.preview.tsx`
174
213
 
175
- ### Target state of `component.preview.tsx`
176
-
177
- Replace the generated passthrough with the following. Replace `MyComponent` with the real component name.
214
+ Add `useIsEditMode` to the existing `@wix/react-component-utils` import. Then
215
+ edit only the body of the existing `ComponentNamePreview` function — add the
216
+ `isEditMode` check and gate the autoplay props. Do not touch the
217
+ `withFallbackPlaceholder` call, the `withDefaults` export, or any other part
218
+ of the file.
178
219
 
179
220
  ```tsx
180
- import React from 'react';
181
- import MyComponent from './component';
182
- import { useIsEditMode } from '@wix/react-component-utils';
183
-
184
- export default function MyComponentPreview(
185
- props: React.ComponentProps<typeof MyComponent>,
186
- ) {
221
+ const ComponentNamePreview: FC<ComponentProps<typeof Component>> = (props) => {
187
222
  const isEditMode = useIsEditMode();
188
-
189
223
  return (
190
- <MyComponent
224
+ <Component
191
225
  {...props}
192
226
  autoPlay={isEditMode ? false : props.autoPlay}
193
227
  pauseButtonVisibility={isEditMode ? 'showAlways' : props.pauseButtonVisibility}
194
228
  />
195
229
  );
196
- }
230
+ };
197
231
  ```
198
232
 
199
- 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.
233
+ 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.
200
234
  In preview mode (`isEditMode` is `false`) → both use the user's configured values.
201
235
 
202
- ---
236
+ ## Checklist
237
+
238
+ - [ ] Autoplaying or loopable primary content has an on-stage play/pause control.
239
+ - [ ] Autoplay and pause-control props use the documented contract; `loop` is
240
+ present only when repeat behavior is supported.
241
+ - [ ] Reduced motion starts paused and never restarts playback automatically.
242
+ - [ ] The play/pause button is a fully wired named part with a stable accessible name.
243
+ - [ ] Hover has a paired editor design state; `:focus-visible` remains a
244
+ standalone keyboard indicator.
245
+ - [ ] Hover-only visibility changes behavior, not the button's editable styling surface.
246
+ - [ ] The preview exports the adapter with synchronized fallback metadata and
247
+ disables autoplay in design mode.
@@ -1,9 +1,10 @@
1
1
  # Branded / Themed Components
2
2
 
3
- Apply automatically — without being asked — whenever the user requests a
4
- **branded**, **themed**, or **brand-aware** component.
3
+ Use this reference only when the prompt explicitly requests a **branded**,
4
+ **themed**, or **brand-aware** component. Do not infer this requirement from a
5
+ generic request for polished styling.
5
6
 
6
- ---
7
+ ## Rules
7
8
 
8
9
  Import theme tokens from `@wix/react-component-schema/theme-variables.module.css`
9
10
  using CSS Modules `@value`, then consume with `var()`.
@@ -24,6 +25,15 @@ using CSS Modules `@value`, then consume with `var()`.
24
25
 
25
26
  **Body:** `wst-paragraph-1..3-font` / `wst-paragraph-1..3-color`
26
27
 
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.
28
+ - Do not use `var(--wst-*)` directly; import the `@value` alias first.
29
+ - Do not pass a fallback as `var()`'s second argument
30
+ - Do not use `@import`; CSS Modules resolves theme aliases through `@value`.
31
+ - Do not use `wst-base-1-color` for text. Prefer heading/paragraph color tokens,
32
+ or `wst-base-2-color` when a base contrast color is required.
33
+
34
+ ## Checklist
35
+
36
+ - [ ] Theme values are imported from `theme-variables.module.css` with `@value`.
37
+ - [ ] Imported aliases are consumed through `var()`.
38
+ - [ ] Typography uses heading/paragraph font and color token pairs.
39
+ - [ ] Text colors remain legible on the selected background token.
@@ -0,0 +1,56 @@
1
+ # Browser Support
2
+
3
+ Which CSS features and DOM APIs an Editor React Component may use. This is about
4
+ support in the visitor's browser, a separate question from whether an API exists
5
+ during server rendering.
6
+
7
+ ## The rule
8
+
9
+ **Use only features at Baseline "Widely Available", or ones that fall back to it** —
10
+ supported for 30+ months in every browser [Wix
11
+ supports](https://support.wix.com/en/article/supported-devices-browsers-and-operating-systems):
12
+ Chrome (desktop + Android), Edge, Firefox (desktop + Android), Safari (macOS +
13
+ iOS/iPadOS).
14
+
15
+ A fallback must genuinely degrade rather than break: the unsupported path still
16
+ has to render a usable component.
17
+
18
+ ## Deciding, without looking it up
19
+
20
+ These rules resolve nearly everything. Stop at the first step that answers:
21
+
22
+ 1. **Named literally in the skill or repository instructions?** → pre-authorized:
23
+ use it, no warning. A string test, not a judgment call — `@property` in your
24
+ instructions authorizes it, a general endorsement of modern CSS authorizes
25
+ nothing. A feature named only in the *user's* request is **not** pre-authorized;
26
+ run the steps below, then the [insist protocol](#insist-protocol).
27
+ 2. **Date arithmetic.** Subtract 30 months from today's real date. Was it already
28
+ shipping in every browser above by then? Mobile lags — iOS Safari and Firefox
29
+ Android are the usual holdouts.
30
+ 3. **Smell test**, when that's inconclusive. Widely Available means *boring* for 2.5
31
+ years. Learned it as "the modern way", or would enjoy showing it off → no. Plain
32
+ CSS or DOM you'd have written five years ago → yes. Called "now Baseline"
33
+ anywhere → that phrasing marks *newly* available → no.
34
+ 4. **Still unsure → not permitted.** Permitting wrongly ships a component that is
35
+ broken for real visitors; denying wrongly costs only a slightly plainer
36
+ implementation the user can ask you to change.
37
+
38
+ Search only when it earns the cost — the user asks about support directly, or the
39
+ feature is central enough that deny-and-offer would waste a real round trip. Prefer
40
+ fetching an MDN or caniuse page over driving a browser.
41
+
42
+ **Standing exception:** `@property` is always fine for design tokens, generated or
43
+ hand-written — rewriting a token registration, or warning about one, breaks the
44
+ component.
45
+
46
+ **Feels new, is not** — run the arithmetic, not the reputation: `:has()`,
47
+ `@container` size queries, `subgrid`, `color-mix()`, `inert`,
48
+ `Array.prototype.toSorted`.
49
+
50
+ ## Insist protocol
51
+
52
+ 1. **Build the widely-supported alternative** by default. Don't ask first, and don't
53
+ leave the component unbuilt.
54
+ 2. **Use the feature only if the user then asks for it explicitly**, and guard it so
55
+ it degrades rather than breaks — `@supports` for CSS, `CSS.supports()` or a
56
+ capability check for JS.