@wix/agent-skills 1.17.0 → 1.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) 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 +74 -83
  9. package/skills/wix-app/references/SITE_PLUGIN.md +12 -0
  10. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +74 -68
  11. package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +79 -0
  12. package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +73 -0
  13. package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +52 -0
  14. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +184 -0
  15. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +12 -11
  16. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +1 -0
  17. package/skills/wix-app/references/editor-react-component/BROWSER-SUPPORT.md +56 -0
  18. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +16 -8
  19. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +47 -14
  20. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +3 -0
  21. package/skills/wix-base44-connector/SKILL.md +133 -44
  22. package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +78 -0
  23. package/skills/wix-base44-connector/scripts/utils.js +216 -30
  24. package/skills/wix-headless/entry/skill.md +1 -1
  25. package/skills/wix-headless/references/CAPABILITIES.md +9 -1
  26. package/skills/wix-headless/references/DESIGN.md +1 -0
  27. package/skills/wix-headless/references/DISCOVERY.md +2 -1
  28. package/skills/wix-headless/references/IMAGE_GENERATION.md +1 -0
  29. package/skills/wix-headless/references/SDK_HANDOFF.md +4 -1
  30. package/skills/wix-headless/references/SEED.md +2 -1
  31. package/skills/wix-headless/references/SETUP.md +1 -0
  32. package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +2 -2
  33. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +26 -8
  34. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +26 -10
  35. package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +8 -8
  36. package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +1 -1
  37. package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +1 -1
  38. package/skills/wix-headless/references/inline-recipes/how-to-code-rentals.md +254 -0
  39. package/skills/wix-headless/references/inline-recipes/setup-forms.md +57 -10
  40. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +13 -0
  41. package/skills/wix-headless/references/inline-recipes/setup-rentals.md +254 -0
  42. package/skills/wix-headless/references/non-astro.md +1 -1
  43. package/skills/wix-headless-fast/SKILL.md +166 -0
  44. package/skills/wix-headless-fast/entry/skill.md +99 -0
  45. package/skills/wix-headless-fast/install/deploy.mjs +433 -0
  46. package/skills/wix-headless-fast/install/fast-path.mjs +141 -0
  47. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +137 -0
  48. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +137 -0
  49. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +113 -0
  50. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +42 -0
  51. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +123 -0
  52. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +70 -0
  53. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +99 -0
  54. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +76 -0
  55. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +62 -0
  56. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +40 -0
  57. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +99 -0
  58. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +24 -0
  59. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +16156 -0
  60. package/skills/wix-headless-fast/references/blog/seed/SEED.md +72 -0
  61. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +287 -0
  62. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +129 -0
  63. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +143 -0
  64. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +119 -0
  65. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +138 -0
  66. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +54 -0
  67. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +206 -0
  68. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +96 -0
  69. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +70 -0
  70. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +40 -0
  71. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +76 -0
  72. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +22 -0
  73. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +11962 -0
  74. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +61 -0
  75. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +302 -0
  76. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +179 -0
  77. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +83 -0
  78. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +57 -0
  79. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +151 -0
  80. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +75 -0
  81. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +41 -0
  82. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +11262 -0
  83. package/skills/wix-headless-fast/references/cms/seed/SEED.md +103 -0
  84. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +324 -0
  85. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +149 -0
  86. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +66 -0
  87. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +176 -0
  88. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +118 -0
  89. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +117 -0
  90. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +59 -0
  91. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +136 -0
  92. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +128 -0
  93. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +61 -0
  94. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +40 -0
  95. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +12 -0
  96. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +80 -0
  97. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +21 -0
  98. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +11884 -0
  99. package/skills/wix-headless-fast/references/events/seed/SEED.md +86 -0
  100. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +276 -0
  101. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +150 -0
  102. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +317 -0
  103. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +269 -0
  104. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +231 -0
  105. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +135 -0
  106. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +10593 -0
  107. package/skills/wix-headless-fast/references/forms/seed/SEED.md +108 -0
  108. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +320 -0
  109. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +63 -0
  110. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +60 -0
  111. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +155 -0
  112. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +78 -0
  113. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +47 -0
  114. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +66 -0
  115. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +88 -0
  116. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +53 -0
  117. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +122 -0
  118. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +50 -0
  119. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +21 -0
  120. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +42 -0
  121. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +10 -0
  122. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +11 -0
  123. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +10329 -0
  124. package/skills/wix-headless-fast/references/members/seed/SEED.md +39 -0
  125. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +94 -0
  126. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +134 -0
  127. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
  128. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
  129. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +115 -0
  130. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +59 -0
  131. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +39 -0
  132. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +58 -0
  133. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +165 -0
  134. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +55 -0
  135. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
  136. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
  137. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +21 -0
  138. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +29 -0
  139. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +10197 -0
  140. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +78 -0
  141. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +258 -0
  142. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +133 -0
  143. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +58 -0
  144. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +126 -0
  145. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +37 -0
  146. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +39 -0
  147. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +75 -0
  148. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +45 -0
  149. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +30 -0
  150. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
  151. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +40 -0
  152. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +21 -0
  153. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +11226 -0
  154. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +71 -0
  155. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +279 -0
  156. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +165 -0
  157. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +142 -0
  158. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
  159. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
  160. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +155 -0
  161. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +55 -0
  162. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +43 -0
  163. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +177 -0
  164. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +165 -0
  165. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +103 -0
  166. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +254 -0
  167. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +146 -0
  168. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +168 -0
  169. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
  170. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +22 -0
  171. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +12 -0
  172. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +12560 -0
  173. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +81 -0
  174. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +479 -0
  175. package/skills/wix-headless-fast/references/shared/CONTENT.md +22 -0
  176. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +73 -0
  177. package/skills/wix-headless-fast/references/shared/DESIGN.md +26 -0
  178. package/skills/wix-headless-fast/references/shared/app/styles/global.css +52 -0
  179. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +15 -0
  180. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +27 -0
  181. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +24 -0
  182. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +76 -0
  183. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
  184. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +46 -0
  185. package/skills/wix-headless-fast/references/shared/seed/images.mjs +145 -0
  186. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +149 -0
  187. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +26 -0
  188. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +121 -0
  189. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +100 -0
  190. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +130 -0
  191. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +48 -0
  192. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +66 -0
  193. package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +103 -0
  194. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +48 -0
  195. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +140 -0
  196. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +80 -0
  197. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +101 -0
  198. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +221 -0
  199. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +215 -0
  200. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +109 -0
  201. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +46 -0
  202. package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +56 -0
  203. package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +23 -0
  204. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +12247 -0
  205. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +85 -0
  206. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +415 -0
  207. package/skills/wix-manage/SKILL.md +113 -89
  208. package/skills/wix-manage/references/dashboard-navigation/routes.json +12 -52
  209. package/skills/wix-manage/references/ecommerce/shipping/ecom-shipping-api.md +0 -2
  210. package/skills/wix-manage/references/forms/create-form.md +272 -184
  211. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +13 -10
  212. package/skills/wix-manage/references/forms/update-form.md +122 -0
  213. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +141 -0
  214. package/skills/wix-manage/references/google-business-profile/connect-google-business-profile.md +134 -0
  215. package/skills/wix-manage/references/google-business-profile/manage-google-business-profile-locations.md +182 -0
  216. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +3 -0
  217. package/skills/wix-manage/references/media/generate-image-with-ai.md +86 -0
  218. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +37 -7
  219. package/skills/wix-manage/references/stores/update-product-with-options.md +83 -0
  220. package/skills/wix-vibe-headless/SKILL.md +18 -4
  221. package/skills/wix-vibe-headless/install/deploy.cjs +12 -4
  222. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +2 -1
  223. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +3 -1
  224. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +3 -1
  225. package/skills/wix-vibe-headless/platforms/base44.md +27 -61
  226. package/skills/wix-vibe-headless/platforms/generic.md +6 -3
  227. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +43 -0
  228. package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +67 -0
  229. package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +128 -0
  230. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +5 -3
  231. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +250 -0
  232. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +12 -5
  233. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +41 -0
  234. package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.js +267 -0
  235. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +6 -3
  236. package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +486 -0
  237. package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +425 -0
  238. package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +187 -0
  239. package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +238 -0
  240. package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +108 -0
  241. package/skills/wix-vibe-headless/references/forms/seed/SEED.md +1836 -0
  242. package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +13 -0
  243. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +137 -84
  244. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +15 -8
  245. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +37 -0
  246. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +18 -6
  247. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +30 -7
  248. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +46 -10
  249. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +0 -110
  250. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +0 -51
  251. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +0 -49
  252. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +0 -92
  253. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +0 -139
@@ -1,32 +1,26 @@
1
1
  # Wix Editor React Component Builder
2
2
 
3
- Build Editor React Components for Harmony Editor and Studio2 in Wix CLI
4
- applications. These components are not supported in other Wix editors.
5
-
6
- ## Before You Start
7
-
8
- Determine whether the request creates a component or edits an existing one.
9
- Inspect the existing component before changing it.
3
+ Build Editor React Components for Harmony/Studio2 Wix CLI apps only. First
4
+ determine **create vs edit**; for edits, inspect the existing component and
5
+ never re-scaffold.
10
6
 
11
7
  ## File Contract
12
8
 
13
9
  Use the Wix CLI scaffold as the source of truth. Do not replace it with a custom
14
- layout or a hand-written manifest. After applying this workflow, preserve these
15
- file responsibilities:
10
+ layout or a hand-written manifest. Preserve these file responsibilities:
16
11
 
17
12
  | File | Ownership | Purpose |
18
13
  | --- | --- | --- |
19
- | `<component-name>.props.ts` | Edit | Export the props type and `defaultProps` from one shared source. |
20
- | `<component-name>.tsx` | Edit | Implement the component UI and behavior. |
21
- | `<component-name>.module.css` | Edit | Define scoped component styles. |
22
- | `component.tsx` | Keep generated | Wire the component and `defaultProps` with `withDefaults`. |
23
- | `component.preview.tsx` | Usually keep generated | Customize only for editor-specific behavior, such as suppressing autoplay. |
24
- | `<component-name>.generated.ts` | NEVER edit | Generated manifest consumed by the editor. |
25
- | `<component-name>.extension.ts` | Edit narrowly | Apply supported partial manifest overrides. |
26
-
27
- Supplementary files such as `constants.ts`, hooks, or internal sub-components
28
- are allowed when the implementation needs them. Keep the scaffolded files and
29
- their responsibilities intact.
14
+ | `<component-name>.props.ts` | Edit | Props type + `defaultProps` |
15
+ | `<component-name>.tsx` | Edit | Component UI and behavior |
16
+ | `<component-name>.module.css` | Edit | Scoped component styles |
17
+ | `component.tsx` | Keep generated | Wire component and `defaultProps` with `withDefaults` |
18
+ | `component.preview.tsx` | Edit narrowly | Sync preview adapter, one crucial data field, root class |
19
+ | `<component-name>.generated.ts` | NEVER edit | Generated manifest — do not edit |
20
+ | `<component-name>.extension.ts` | Edit narrowly | Supported partial manifest overrides |
21
+
22
+ Supplementary files (constants, hooks, sub-components) are allowed; keep scaffold
23
+ roles intact.
30
24
 
31
25
  ## Workflow
32
26
 
@@ -36,9 +30,8 @@ their responsibilities intact.
36
30
  npx wix generate --params '{"extensionType":"EDITOR_REACT_COMPONENT","name":"ComponentName","folder":"component-name","description":"A brief description"}'
37
31
  ```
38
32
 
39
- The command creates `src/extensions/site/components/<component-name>/` and
40
- registers the extension in `src/extensions.ts`. Do not rerun it for an
41
- existing component.
33
+ Creates `src/extensions/site/components/<component-name>/` and registers the
34
+ extension in `src/extensions.ts`. Do not rerun for an existing component.
42
35
 
43
36
  2. **Run the dependency preflight.** Verify that all component creation and
44
37
  accessibility-review dependencies are installed:
@@ -47,24 +40,24 @@ their responsibilities intact.
47
40
  node -e "const fs=require('fs'),path=require('path'),ps=['@wix/react-component-schema','@wix/react-component-utils','@wix/editor-react-types','@babel/parser','@babel/traverse','@babel/types','eslint','eslint-plugin-jsx-a11y','@typescript-eslint/parser','typescript','@types/eslint-plugin-jsx-a11y'];const missing=ps.filter(p=>!(require.resolve.paths(p)||[]).some(d=>fs.existsSync(path.join(d,p,'package.json'))));if(missing.length){console.error('Missing dependencies: '+missing.join(', '));process.exit(1)}" || { d="$PWD"; while [ "$d" != "/" ] && [ ! -f "$d/yarn.lock" ]; do d="${d%/*}"; done; if [ -f "$d/yarn.lock" ]; then yarn add @wix/react-component-schema @wix/react-component-utils @wix/editor-react-types && yarn add -D @babel/parser @babel/traverse @babel/types eslint eslint-plugin-jsx-a11y @typescript-eslint/parser 'typescript@<7' @types/eslint-plugin-jsx-a11y; else npm install @wix/react-component-schema @wix/react-component-utils @wix/editor-react-types && npm install --save-dev @babel/parser @babel/traverse @babel/types eslint eslint-plugin-jsx-a11y @typescript-eslint/parser 'typescript@<7' @types/eslint-plugin-jsx-a11y; fi; }
48
41
  ```
49
42
 
50
- 3. **Plan the contract and structure.** Identify content and behavior props,
51
- elect the semantic root, identify named inner parts, and decide which design
52
- states each part supports. Read the relevant references from the routing
53
- table below before writing code.
43
+ 3. **Plan the contract and structure.** Identify props, semantic root, named
44
+ parts, and design states; read routed references below before writing code.
54
45
 
55
- 4. **Implement the editable sources.** Preserve the scaffold contract. Keep
56
- props/defaults in the props file, component logic in the main TSX file, and
57
- static styling in the CSS Module. Do not edit `*.generated.ts`.
46
+ 4. **Implement the editable sources.** Preserve the scaffold contract: props in
47
+ the props file, logic in TSX, styles in the CSS Module. Do not edit
48
+ `*.generated.ts`.
58
49
 
59
50
  5. **Run the accessibility review.** Follow
60
- [`editor-react-component/ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md): run both bundled
61
- scanners, triage their output, complete the manual semantic checklist, fix
62
- confirmed issues, and rerun the scanners on changed JSX files.
51
+ [`editor-react-component/ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md): run scanners,
52
+ triage output, complete the manual checklist, fix issues, rerun on changed
53
+ JSX.
63
54
 
64
55
  6. **Configure the editor extension when required.** For a new component or a
65
56
  requested sizing, installation, or manifest change, apply
66
57
  [`editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md)
67
- to `<component-name>.extension.ts`. Otherwise preserve the existing file.
58
+ to `<component-name>.extension.ts`. Otherwise leave the file unchanged.
59
+ Synchronize `requiredDataFields` and `rootClassName` in
60
+ `component.preview.tsx`.
68
61
 
69
62
  7. **Generate and validate.** Run:
70
63
 
@@ -73,73 +66,71 @@ their responsibilities intact.
73
66
  npx tsc --noEmit
74
67
  ```
75
68
 
76
- Run relevant project tests and lint commands when available. Inspect the
77
- regenerated manifest; never repair it by hand. Design-state generation needs
78
- `@wix/cli` 1.1.210 or newer, and prop-triggered `ElementState` generation
79
- needs 1.1.215 or newer. If expected states are absent on an older CLI, report
80
- the version constraint and let the user decide whether to upgrade. If the
81
- build or manifest command exits with an error, diagnose it with
82
- [`editor-react-component/MANIFEST-ERRORS.md`](editor-react-component/MANIFEST-ERRORS.md), apply the
83
- matching fix, and rerun both commands.
69
+ Run relevant tests and lint when available. Inspect the regenerated manifest;
70
+ never repair it by hand. On failure, diagnose with
71
+ [`editor-react-component/MANIFEST-ERRORS.md`](editor-react-component/MANIFEST-ERRORS.md).
84
72
 
85
73
  8. **Report the result.** Summarize edited files and checks. Call out any
86
- unresolved instruction conflict, missing dependency, unsupported CLI
87
- version, or check that could not run.
74
+ unresolved conflict, missing dependency, unsupported CLI version, or check
75
+ that could not run.
88
76
 
89
77
  ## Reference Policy
90
78
 
91
- Read every reference required for the current scope. Read an optional reference
92
- only when its trigger applies; when it does, that reference becomes required.
93
- Apply every matching row; do not load the entire reference set by default.
79
+ - Read **only** matching required + triggered optional rows; optional triggers
80
+ become required when they match.
81
+ - References refine the active step; they do not restart workflow or expand scope.
82
+ - Never re-scaffold an existing component or edit `*.generated.ts`.
94
83
 
95
- References refine the active workflow step; they do not restart the workflow or
96
- expand the user's requested scope. `SKILL.md` is the only reference router;
97
- reference files are self-contained leaves and do not route to other references.
98
- For an existing component, preserve out-of-scope public props, styling,
99
- extension configuration, and supporting files. Never re-scaffold an existing
100
- component or edit `*.generated.ts` as a reference-driven fix.
84
+ `SKILL.md` is the only reference router; reference files are self-contained
85
+ leaves. For existing components, preserve out-of-scope public props, styling,
86
+ extension configuration, and supporting files.
101
87
 
102
88
  ### Required References
103
89
 
104
90
  | Scope | Required references |
105
91
  | --- | --- |
106
- | Creating a component | [`REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md), [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PARTS.md`](editor-react-component/PARTS.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md), [`CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md), [`DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md), and [`EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md) |
107
- | Editing React or JSX | [`REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md) and [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md) |
108
- | Changing the public contract, semantic root, or named parts | [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PARTS.md`](editor-react-component/PARTS.md), and [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md) |
109
- | Creating or changing an item array where only one body is visible | [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md), and [`DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) |
92
+ | Creating a component | [`REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md), [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PARTS.md`](editor-react-component/PARTS.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md), [`CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md), [`DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md), [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md), [`EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md) |
93
+ | Editing React or JSX | [`REACT-GUIDELINES.md`](editor-react-component/REACT-GUIDELINES.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md) |
94
+ | Changing public contract, semantic root, or named parts | [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PARTS.md`](editor-react-component/PARTS.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md) |
95
+ | Changing public data props or elected root global class | [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) |
96
+ | Item array where only one body is visible | [`COMPONENT-CONTRACT.md`](editor-react-component/COMPONENT-CONTRACT.md), [`PROPS-VS-CSS.md`](editor-react-component/PROPS-VS-CSS.md), [`ACCESSIBILITY.md`](editor-react-component/ACCESSIBILITY.md), [`DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) |
110
97
  | Creating or changing CSS | [`CSS-GUIDELINES.md`](editor-react-component/CSS-GUIDELINES.md) |
111
- | Changing the root direction contract, direction-sensitive behavior, or a `ReactNode` slot | [`DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md) |
112
- | Changing sizing, installation, or manifest overrides | [`EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md) |
98
+ | Root direction contract, direction-sensitive behavior, or `ReactNode` slot | [`DIRECTIONALITY.md`](editor-react-component/DIRECTIONALITY.md) |
99
+ | Sizing, installation, or manifest overrides | [`EDITOR-EXTENSION-CONFIGURATION.md`](editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md) |
113
100
 
114
101
  ### Optional References
115
102
 
116
103
  | Trigger | Read |
117
104
  | --- | --- |
118
- | An interactive or selectable part is created or changed—for example a button, link, input, tab, accordion trigger, or carousel control—or a custom state is added | [`DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) |
119
- | Public event callbacks are added or changed | [`FUNCTION-HANDLERS.md`](editor-react-component/FUNCTION-HANDLERS.md) |
120
- | Browser APIs, effects, or time-dependent output are introduced | [`SSR.md`](editor-react-component/SSR.md) |
105
+ | Interactive/selectable part or custom state | [`DESIGN-STATES.md`](editor-react-component/DESIGN-STATES.md) |
106
+ | Public event callbacks added or changed | [`FUNCTION-HANDLERS.md`](editor-react-component/FUNCTION-HANDLERS.md) |
107
+ | Browser APIs, effects, or time-dependent output | [`SSR.md`](editor-react-component/SSR.md) |
108
+ | Non-established CSS feature or DOM API, or user asks for one by name | [`BROWSER-SUPPORT.md`](editor-react-component/BROWSER-SUPPORT.md) |
121
109
  | `npx wix build` or manifest generation exits with an error | [`MANIFEST-ERRORS.md`](editor-react-component/MANIFEST-ERRORS.md) |
122
- | Primary content is playable, looped, or autoplaying | [`ANIMATED-COMPONENTS.md`](editor-react-component/ANIMATED-COMPONENTS.md) and [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) |
123
- | Runtime site pages, URLs, JavaScript direction, or reduced-motion context is needed | [`SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md) |
124
- | Non-animation behavior must differ in editor design mode | [`SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md) and [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) |
125
- | The prompt explicitly requests a branded, themed, or brand-aware component | [`BRANDED-COMPONENTS.md`](editor-react-component/BRANDED-COMPONENTS.md) |
110
+ | Animation, video, carousel, or other playable/looped/autoplaying content | [`ANIMATED-COMPONENTS.md`](editor-react-component/ANIMATED-COMPONENTS.md), [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) |
111
+ | Site/runtime/editor context hooks needed | [`SITE-CONTEXT-HOOKS.md`](editor-react-component/SITE-CONTEXT-HOOKS.md) (+ [`COMPONENT-PREVIEW.md`](editor-react-component/COMPONENT-PREVIEW.md) when design-mode behavior differs) |
112
+ | Branded, themed, or brand-aware component requested | [`BRANDED-COMPONENTS.md`](editor-react-component/BRANDED-COMPONENTS.md) |
126
113
 
127
- ## Core Invariants
114
+ ## Non-Negotiables
128
115
 
129
- - Use React 18-compatible APIs; do not assume React 19 runtime features.
116
+ - React 18 only; do not assume React 19 runtime features.
130
117
  - Include typed `id`, `className`, `direction`, and `a11y` support.
131
- - Apply `dir={direction}` and the unconditional fallback-direction class to the
132
- elected root. Use logical CSS properties for direction-sensitive layout.
133
- - Keep render output deterministic and avoid browser globals during render.
134
- - Route ARIA through the typed `a11y` contract; do not add one-off ARIA props.
135
- - Give every named inner part a global class, a CSS Module class, and a matching
136
- `elementProps` entry. The elected root uses top-level props instead.
137
- - Pair each eligible native editor design-state selector with its
138
- editor-injected global modifier. Keep a non-input control's keyboard-only
139
- `:focus-visible` indicator standalone unless editable focus styling is
140
- explicitly requested. Toggle custom global state classes from data.
141
- - For an item array where only one body is visible, give every item a `name`,
142
- use `ActiveItemIndex<'arrayPropName'>`, render every body, and hide inactive
143
- bodies accessibly.
144
- - If primary content autoplays or loops, provide an accessible play/pause
145
- control, honor reduced motion, and suppress autoplay in editor design mode.
118
+ - Elected root: `dir={direction}`, fallback-direction class, logical CSS for
119
+ direction-sensitive layout.
120
+ - Deterministic render; no browser globals during render.
121
+ - Explicit foreground colors need a known contrasting background; transparent
122
+ roots inherit from the host.
123
+ - Baseline Widely Available CSS/DOM only, or supported fallbacks.
124
+ - Route ARIA through `a11y`; no one-off ARIA props.
125
+ - Named parts: global class, module class, and `elementProps` (root uses
126
+ top-level props).
127
+ - Native design states: pair selectors with injected modifiers; keep non-input
128
+ `:focus-visible` standalone unless editable focus is requested; toggle custom
129
+ state classes from data.
130
+ - Single-visible-body arrays: `name` per item, `ActiveItemIndex<'prop'>`, render
131
+ all bodies, hide inactive accessibly.
132
+ - Autoplay/loop: play/pause control, honor reduced motion, suppress autoplay in
133
+ editor design mode.
134
+ - `component.preview.tsx`: keep `withDefaults` and `withFallbackPlaceholder`,
135
+ wrap the preview adapter when present, one crucial `requiredDataFields`
136
+ entry, and `rootClassName` matching the root global class.
@@ -344,6 +344,18 @@ const wixClient = createClient({ modules: { items, products } });
344
344
  await wixClient.items.query(...); // Wrong — API surface differs through client
345
345
  ```
346
346
 
347
+ ### Identity of SDK Calls in Site Plugins
348
+
349
+ A plugin runs as the **site visitor or member**, never as the app — see [Identity and Elevation Requirement](../SKILL.md#identity-and-elevation-requirement) before routing any SDK call out to a backend endpoint.
350
+
351
+ The three calls above are correct exactly as written, and each for a different reason:
352
+
353
+ | Call | Why it works directly |
354
+ | --- | --- |
355
+ | `items.query(...)` | Wix Data enforces the collection's `dataPermissions` per caller — the scaffolded default reads as `ANYONE`. See [Permissions](DATA_COLLECTION.md#permissions) |
356
+ | `currentCartV2.getCurrentCart()` | Resolves the cart from the caller's session. Elevating it would return the app's cart, not the visitor's |
357
+ | `products.queryProducts()` | Catalog base fields are public. `MERCHANT_DATA` and non-visible products are withheld unless the app holds `SCOPE.STORES.PRODUCT_READ_ADMIN` — don't request them from a plugin |
358
+
347
359
  ### Performance Considerations
348
360
 
349
361
  - Keep bundle size small - plugins load on user-facing pages
@@ -2,18 +2,49 @@
2
2
 
3
3
  ## Prerequisites
4
4
 
5
- The docs are pre-built at `node_modules/@wix/patterns/dist/docs/` (160+ markdown files + `index.json`). This requires `@wix/patterns` version **1.367.0** or later. Verify they exist:
5
+ Lookups here are direct file reads — no script. Resolve the installed package root once per session and reuse it:
6
6
 
7
7
  ```bash
8
- ls node_modules/@wix/patterns/dist/docs/ # expect ~165 .md files + index.json
8
+ node -e "
9
+ const fs = require('fs'), path = require('path');
10
+ function tryEnablePnp() {
11
+ let dir = process.cwd();
12
+ for (;;) {
13
+ const pnp = path.join(dir, '.pnp.cjs');
14
+ if (fs.existsSync(pnp)) { try { require(pnp).setup(); } catch {} return; }
15
+ const parent = path.dirname(dir);
16
+ if (parent === dir) return;
17
+ dir = parent;
18
+ }
19
+ }
20
+ tryEnablePnp();
21
+ try {
22
+ console.log(path.dirname(require.resolve('@wix/patterns/package.json', { paths: [process.cwd()] })));
23
+ } catch {
24
+ let dir = process.cwd();
25
+ for (;;) {
26
+ const candidate = path.join(dir, 'node_modules', '@wix', 'patterns');
27
+ if (fs.existsSync(path.join(candidate, 'package.json'))) { console.log(candidate); process.exit(0); }
28
+ const parent = path.dirname(dir);
29
+ if (parent === dir) { console.error('@wix/patterns not found'); process.exit(1); }
30
+ dir = parent;
31
+ }
32
+ }
33
+ "
9
34
  ```
10
35
 
11
- If the directory is missing, install the package at the minimum version:
36
+ A bare `require.resolve` without the PnP-activation step throws in a Yarn Berry project even when the package is installed — run the whole snippet, not a shortened version.
37
+
38
+ Then confirm the installed version actually ships the bundle index:
12
39
 
13
40
  ```bash
14
- npm install @wix/patterns@^1.367.0
41
+ ls <pkgRoot>/dist/dts-bundle/index.json
15
42
  ```
16
43
 
44
+ **If it's missing, stop — do not look elsewhere for types or docs.** The installed `@wix/patterns` predates the index; it ships from **1.458.0** onward, so upgrade to at least that and re-run the check. A missing *file* is not the same as a name not being covered (see below): the mechanism itself isn't available yet.
45
+
46
+ **Never inspect `node_modules` by hand** — no `ls`, no `find`, no `cat` of an arbitrary path, and that includes the sanctioned directories: never browse `dist/dts-bundle/` or `dist/docs/` looking around. Every lookup below names the exact file to `Read` — go straight to it.
47
+
17
48
  ## Library Architecture
18
49
 
19
50
  ### Composition Hierarchy
@@ -29,55 +60,33 @@ Provider <- WixPatternsProvider or WixPatternsBMProvider
29
60
 
30
61
  Each collection type follows the same Component + State + Hook pattern:
31
62
 
32
- | Collection | Component | State Type | Hook |
33
- |------------------|--------------------|-------------------------|---------------------------------|
34
- | Table | `Table` | `TableState` | `useTableCollection()` |
35
- | Grid | `Grid` | `GridState` | `useGridCollection()` |
36
- | TableGridSwitch | `TableGridSwitch` | `TableGridSwitchState` | `useTableGridSwitchCollection()`|
37
- | TableFolders | `TableFolders` | `TableFoldersState` | `useTableFolders()` |
38
- | GridFolders | `GridFolders` | `GridFoldersState` | `useGridFolders()` |
39
-
40
- This table covers the common collection types — the full, authoritative list is in `node_modules/@wix/patterns/dist/docs/index.json`.
63
+ | Component | State Type | Hook |
64
+ | --- | --- | --- |
65
+ | `Table` | `TableState` | `useTableCollection()` |
66
+ | `Grid` | `GridState` | `useGridCollection()` |
67
+ | `TableGridSwitch` | `TableGridSwitchState` | `useTableGridSwitchCollection()` |
68
+ | `TableFolders` | `TableFoldersState` | `useTableFolders()` |
69
+ | `GridFolders` | `GridFoldersState` | `useGridFolders()` |
41
70
 
42
- Create state with the hook -> pass it to the component's `state` prop -> wrap in a page component.
71
+ Common types only; `dist/dts-bundle/index.json` has the authoritative set. Create state with the hook -> pass it to the component's `state` prop -> wrap in a page component.
43
72
 
44
73
  ### Choosing the Right Provider
45
74
 
46
- | Provider | When to Use |
47
- |---------------------------------|--------------------------------------------------------------------------------------|
48
- | `WixPatternsProvider` | **Default — start here.** Auto-detects the environment (BM, Essentials, Giza) and supplies the right context. |
49
- | `WixPatternsBMProvider` | Optional alternative for Yoshi BM Flow over Business Manager. |
50
- | `WixPatternsGizaProvider` | Optional alternative for Yoshi BM Flow over Giza. |
51
- | `WixPatternsEssentialsProvider` | Yoshi Fullstack. |
52
- | `WixPatternsBaseProvider` | App does **not** run under a Giza/WixEssentials environment and you inject services (i18n, sentry) yourself. |
53
-
54
- Prefer `WixPatternsProvider` unless the project is on one of the specific Yoshi flows above — it is the documented recommendation for most apps, and it resolves the environment for you rather than making you pick.
75
+ | Provider | When to Use |
76
+ | --- | --- |
77
+ | `WixPatternsProvider` | **Default — start here.** Auto-detects the environment (BM, Essentials, Giza). |
78
+ | `WixPatternsBMProvider` | Optional alternative for Yoshi BM Flow over Business Manager. |
79
+ | `WixPatternsGizaProvider` | Optional alternative for Yoshi BM Flow over Giza. |
80
+ | `WixPatternsEssentialsProvider` | Yoshi Fullstack. |
81
+ | `WixPatternsBaseProvider` | App does **not** run under Giza/WixEssentials and you inject services (i18n, sentry) yourself. |
55
82
 
56
- **Confirm the import path in the provider's own doc file** — these do not all come from the same subpath (`WixPatternsEssentialsProvider` and `WixPatternsBaseProvider` are under `@wix/patterns/essentials`, for instance). Check the project's `package.json` to identify the flow.
83
+ **Confirm the import path in the provider's own bundle** — they don't all share a subpath (`WixPatternsEssentialsProvider` and `WixPatternsBaseProvider` are under `@wix/patterns/essentials`). The project's `package.json` identifies the flow.
57
84
 
58
85
  ### Keep Provider and Page Separate
59
86
 
60
- The provider **must** be in a separate parent component from the page content. Hooks like `useTableCollection` require the provider's context to already exist above them in the React tree.
87
+ The provider **must** live in a parent component of the page content: hooks like `useTableCollection` need its context to already exist above them in the React tree.
61
88
 
62
- **Wrong — provider and page in the same component:**
63
- ```tsx
64
- function BadApp() {
65
- const state = useTableCollection({
66
- queryName: 'my-items',
67
- itemKey: (item) => item.id,
68
- itemName: (item) => item.name,
69
- fetchData: async () => ({ items: [], total: 0 }),
70
- filters: {},
71
- }); // fails at runtime — no provider context above this component
72
- return (
73
- <WixPatternsProvider>
74
- <CollectionPage>
75
- <Table state={state} columns={[{ title: 'Name', render: (item) => item.name }]} />
76
- </CollectionPage>
77
- </WixPatternsProvider>
78
- );
79
- }
80
- ```
89
+ **Wrong:** calling `useTableCollection` in the same component that renders `WixPatternsProvider`. The hook runs before the provider exists above it, so it throws at runtime — and the JSX nesting looks right, which is what makes this hard to spot.
81
90
 
82
91
  **Correct — provider in root, page in a separate file:**
83
92
  ```tsx
@@ -97,13 +106,14 @@ import { Table, useTableCollection } from '@wix/patterns';
97
106
  import { CollectionPage } from '@wix/patterns/page';
98
107
 
99
108
  function MyCollectionPage() {
109
+ // works — the provider context exists above this component
100
110
  const state = useTableCollection({
101
111
  queryName: 'my-items',
102
112
  itemKey: (item) => item.id,
103
113
  itemName: (item) => item.name,
104
114
  fetchData: async () => ({ items: [], total: 0 }),
105
115
  filters: {},
106
- }); // works — the provider context exists above this component
116
+ });
107
117
  return (
108
118
  <CollectionPage>
109
119
  <Table state={state} columns={[{ title: 'Name', render: (item) => item.name }]} />
@@ -112,33 +122,33 @@ function MyCollectionPage() {
112
122
  }
113
123
  ```
114
124
 
115
- Always keep the provider (and router if needed) in the app's root component, and each page in its own file.
125
+ Keep the provider (and router, if any) in the app's root component and each page in its own file.
116
126
 
117
- When the user needs **multiple pages**, use the `@wix/patterns` routing solution (`PatternsReactRouter`, `PatternsReactRoute`, `usePatternsNavigate`) instead of a separate router. Look up the relevant doc files for setup details.
127
+ For **multiple pages**, use the `@wix/patterns` routing solution (`PatternsReactRouter`, `PatternsReactRoute`, `usePatternsNavigate`) rather than a separate router; look the doc files up for setup.
118
128
 
119
129
  ## How to Look Things Up
120
130
 
121
131
  **Don't guess which components or props exist — read the doc files first.**
122
132
 
123
- ### Finding the right file
133
+ ### Finding the right name
134
+
135
+ `Read <pkgRoot>/dist/dts-bundle/index.json` — one entry per name, grouped implicitly by its `category` field. Lookup is **exact-match only**: no fuzzy matching, no typo suggestions. If the exact key isn't there, scan the index you already hold for something close before concluding the name isn't covered.
124
136
 
125
- - **By name:** Read `node_modules/@wix/patterns/dist/docs/index.json` — it maps every component name to its doc file and category.
126
- - **By browsing:** List the `dist/docs/` folder. Filenames match component names directly (e.g., `Table.md`, `useTableCollection.md`). Note some names contain spaces (`AI Assistant.md`) or dots (`CollectionPage.Header.md`) — quote paths when searching.
127
- - **By concept:** Search filenames for keywords (e.g., "filter"). Check `index.json` categories — related components share a category prefix.
137
+ Not every real `@wix/patterns` export is in this index — only the names these guides actually reference. If a name you need genuinely isn't there, **stop and say so rather than falling back to `node_modules`.**
128
138
 
129
139
  ### Reading doc files
130
140
 
131
- Each doc contains the component's category, import path, description, code examples, and API props table. **Always check the import statement** — not everything comes from `@wix/patterns` (some use subpaths like `@wix/patterns/provider`).
141
+ `Read <pkgRoot>/dist/docs/index.json` to resolve a name to its doc file — or a `symbols` alias, for the cases where the Storybook title doesn't match the export (`ExportTo.md` documents `ExportButton`) — then `Read <pkgRoot>/dist/docs/<file>.md` directly, the whole file, not piped through `head`. It covers more names than the bundle index above: it's produced for every documented component, not just the curated ones.
132
142
 
133
- ### Following cross-references
143
+ **Always check the import statement inside the doc** — not everything comes from `@wix/patterns` (some use subpaths like `@wix/patterns/provider`).
134
144
 
135
- Docs contain relative Storybook URLs like `[TableState](./?path=/story/...--tablestate)`. To resolve these, **use the link text as the filename**: `[TableState](...)` -> read `TableState.md`.
145
+ ### Reading the file the index names
136
146
 
137
- Links to `https://www.docs.wixdesignsystem.com/` are external (Wix Design System) — not part of `@wix/patterns` docs.
147
+ The mechanics of the file an index names — types the docs don't cover, which one-line stubs are answers rather than truncation, subpath entry points, cross-references, split compound-component docs — are in [Reading bundles and docs](dashboard-page/PATTERNS_BUNDLE_READING.md). Read it before your first `dist/dts-bundle/*.d.ts` of the session.
138
148
 
139
149
  ## The Collection → Entity Flow
140
150
 
141
- A collection page and its item form are **two patterns pages**, not a page plus a modal. Getting the table right and then hand-building the "add item" form in a dashboard modal is the most common way this goes wrong.
151
+ A collection page and its item form are **two patterns pages**, not a page plus a modal. Getting the table right and then hand-building the "add item" form as a dashboard modal is the most common way this goes wrong.
142
152
 
143
153
  | Step | What owns it |
144
154
  | --- | --- |
@@ -149,24 +159,20 @@ A collection page and its item form are **two patterns pages**, not a page plus
149
159
  | Body layout | `EntityPage.Header`, `.MainContent`, `.AdditionalContent`, `.Card` |
150
160
  | The individual fields inside those cards | `@wix/design-system` (`FormField`, `Input`, `Text`) |
151
161
 
152
- `navigateToEntityPage` is preferred over a plain route change because the entity header (title, subtitle, breadcrumbs) renders immediately, without waiting for the fetch.
162
+ Prefer `navigateToEntityPage` over a plain route change: the entity header (title, subtitle, breadcrumbs) renders immediately, without waiting for the fetch.
153
163
 
154
- Read `EntityPage.md`, `useEntityPage.md`, and `usePatternsNavigate.md` before implementing — and note that `useCreateCollection` is **not** about creating items; it returns a function that initializes collection state.
164
+ Read `EntityPage.md`, `useEntityPage.md`, and `usePatternsNavigate.md` before implementing — and note `useCreateCollection` is **not** about creating items; it returns a function that initializes collection state.
155
165
 
156
- Reserve dashboard modals for genuine dialogs — delete confirmations, short prompts — not entity editing.
166
+ Three things about the `useEntityPage` call are worth getting right first time — both generics, what `onSave` receives, which params exist: [ENTITY_PAGE_TOOLKIT.md](dashboard-page/ENTITY_PAGE_TOOLKIT.md).
167
+
168
+ Reserve dashboard modals for dialogs that neither write nor display a listed record — a delete or discard confirmation, an unsaved-changes prompt. **A create / "add new" form is not one of them**: it writes the record, so it is an `EntityPage` even though nothing is being edited yet. Size and field count are not exceptions — a one-field create form is still an `EntityPage`. A page that lists no records is outside this rule.
157
169
 
158
170
  ## When Patterns Has No Equivalent
159
171
 
160
- A concept is only "missing" from patterns after you've checked `index.json` **and** searched the docs folder by keyword. Then, and only then:
172
+ A concept is only "missing" from patterns after you've checked `dist/dts-bundle/index.json` and `dist/docs/index.json` **and** searched by keyword within what you've read. Then, and only then:
161
173
 
162
174
  1. Look the component up in `@wix/design-system` via the `wix-design-system` skill.
163
175
  2. Render it *inside* the patterns page shell / collection, not as a replacement for it.
164
- 3. If WDS lacks it too, compose from WDS primitives (`Box`, `Card`, `Text`) — never restyle patterns internals or add another UI library.
165
-
166
- Anything page- or collection-shaped (page shell, header, table, grid, filters, sorting, paging, row actions, bulk actions) is patterns' territory. If you're about to build one of those from WDS parts, you skipped a lookup.
167
-
168
- ## Tips
176
+ 3. If WDS lacks it too, compose from WDS primitives (`Box`, `Card`, `Text`) — never restyle patterns internals, never add another UI library.
169
177
 
170
- - **Compound components** have separate docs per sub-part: `CollectionPage.md`, `CollectionPage.Header.md`, `CollectionPage.Content.md`.
171
- - **Hook docs** list configuration options as props in the API table.
172
- - **Type docs** (e.g., `TableState.md`) describe the shape of state objects.
178
+ Anything page- or collection-shaped (page shell, header, table, grid, filters, sorting, paging, row and bulk actions) is patterns' territory. If you're about to build one from WDS parts, you skipped a lookup.
@@ -0,0 +1,79 @@
1
+ # Collection Toolkit — what to reach for, per user need
2
+
3
+ [UX_SUCCESS_MODEL.md](UX_SUCCESS_MODEL.md) says what a dashboard must do for the person using it. This file says which component does it, so the stage list resolves to real names instead of a hand-rolled approximation.
4
+
5
+ Everything below is a real name in the installed `@wix/patterns`. Confirm the props before writing JSX by reading its doc from `dist/docs/index.json` — and if a name is missing from `dist/dts-bundle/index.json`, the installed version is older than this file; work from that inventory, not from memory.
6
+
7
+ > **The two requirements below are not suggestions.** A page that renders a filtered table and nothing else is the single most common failure of a generated dashboard: it answers "what are all the records" and nothing about how many, which one needs attention, or why something happened. Measured runs produce exactly that page unless the requirement is stated.
8
+ >
9
+ > 1. **A dashboard that reports on records shows aggregate numbers**, not only rows.
10
+ > 2. **A dashboard whose rows represent real business records lets the user open one**, unless the prompt is explicitly a report or an export.
11
+
12
+ ## Understand — the aggregate
13
+
14
+ | Need | Component |
15
+ | --- | --- |
16
+ | Totals, counts, status breakdown above the table | `SummaryBar` |
17
+ | Which subset the numbers describe | wire each metric to the collection's filter state so the count follows the filters |
18
+
19
+ `SummaryBar` sits inside the page shell, above the collection. Compute the values from the same query the table uses, or a count query alongside it — a metric that disagrees with the visible rows is worse than no metric.
20
+
21
+ ## Focus — narrowing
22
+
23
+ | Need | Component |
24
+ | --- | --- |
25
+ | Free-text search | `CollectionSearch` |
26
+ | The filter bar itself | `CollectionToolbarFilters` |
27
+ | Pick several values from a known list | `MultiSelectCheckboxFilter`, `MultiInlineCheckboxFilter`, `MultiAutoInlineCheckboxFilter` |
28
+ | Pick one value | `SingleSelectFilter`, `RadioGroupFilter`, `TabsFilter` |
29
+ | Values fetched from an API, not a fixed list | `MultiSelectCollectionFilter` + `useFilterCollection` |
30
+ | Type-ahead over many values | `AutoCompleteFilter` |
31
+ | Date or number ranges | `DateRangeFilter`, `NumberRangeFilter` |
32
+ | Comparison operators (greater than, contains) | `OperatorFilterPicker` + `operatorFilter` |
33
+ | The filter's state object | `idNameArrayFilter`, `stringFilter`, `stringsArrayFilter`, `arrayFilter`, `dateRangeFilter`, `customFilter` |
34
+ | A fixed in-memory option list for a filter | `useStaticListFilterCollection` |
35
+ | Sorting | `Sortable Columns`, `MultiLevelSorting` |
36
+
37
+ **Ask for several names at once.** `docs`, `types` and `exports` all take a list — `types ComputedQuery OffsetQuery RangeItem`, `exports page form router` — and each call is a full model turn, so five one-name calls cost five turns for one call's worth of answer. `exports` with no argument lists the 31 entry points; that is a one-off orientation, not something to re-run.
38
+
39
+ **A factory or hook's doc is often empty where its signature should be** — `docs idNameArrayFilter` prints an `## API` heading with nothing under it, because the props table only exists for components. Ask `types idNameArrayFilter` instead and you get the signature: `<T extends { id: string; name: string }>(params?) => ArrayFilterState<T>`. That applies to every `use…` hook and every `…Filter` factory in the table above, and it is the difference between knowing the name and being able to call it.
40
+
41
+ **A filter must narrow the result.** Declare it in the collection hook's `filters` map and read it inside `fetchData`, so the value reaches the query. Filter UI that renders but never changes the rows is a defect that looks like a feature — and it is the failure mode these components exist to prevent.
42
+
43
+ ## Investigate — opening one record
44
+
45
+ | Surface | Use when | Built from |
46
+ | --- | --- | --- |
47
+ | **Side panel** | Inspect or lightly edit one record while keeping the filtered list on screen. The V1 default for review dashboards. | WDS `SidePanel` — patterns has no side panel |
48
+ | **Entity page** | Multi-section detail, editing, history, or a link someone can share. | `EntityPage` + `useEntityPage`, reached with `usePatternsNavigate().navigateToEntityPage`, form state from `@wix/patterns/form`. The call itself: [ENTITY_PAGE_TOOLKIT.md](ENTITY_PAGE_TOOLKIT.md) |
49
+ | **Expanded row** | A couple of extra fields, no separate workspace needed. | The collection's own row expansion |
50
+ | **Picker / bulk confirm** | Choosing records, or confirming an action on many. | `PickerModal` + `usePickerModal`, `bulkActionModal` |
51
+
52
+ A dialog that creates, updates or displays one listed record is **not** a dashboard modal — a create / "add new" form included, since it writes the record. See [DASHBOARD_MODAL.md](../DASHBOARD_MODAL.md). A row the user cannot open is the second most common failure after the missing aggregate.
53
+
54
+ **Form state on an entity page** comes from `@wix/patterns/form` — `useForm` for the form, `useController` for a single field. That subpath re-exports `@wix/bex-core/form`, which wraps `react-hook-form`, so its API is react-hook-form's and only a handful of its names appear in the patterns docs: `FieldValues`, `ControllerProps` and most of the rest are documented by react-hook-form, not here. `Read <pkgRoot>/dist/dts-bundle/exports/form.d.ts` to see what the subpath actually gives you.
55
+
56
+ ## Act and confirm
57
+
58
+ | Need | Component |
59
+ | --- | --- |
60
+ | Row actions | `PrimaryActions`, `SecondaryActions`, `More Actions`, `deleteSecondaryAction` |
61
+ | Page-level button | `PrimaryPageButton`, `PrimaryActionButton` |
62
+ | Acting on a multi-row selection | `MultiBulkActionToolbar`, `bulkActionModal` |
63
+ | Immediate feedback, then reconcile | `useOptimisticActions`, `CollectionOptimisticActions` |
64
+ | A banner above the table | `TableTopNotification` |
65
+
66
+ ## The states that are not the happy path
67
+
68
+ | State | Component |
69
+ | --- | --- |
70
+ | Collection is genuinely empty | `CollectionEmptyState` |
71
+ | Filters or search matched nothing | `CollectionNoResultsState` |
72
+ | Feature needs a paid plan | `CollectionPremiumEmptyState` |
73
+ | Load failed | the collection state's error handling — give the user a way to retry |
74
+
75
+ Empty and no-results are different messages: one means "add your first record", the other means "loosen the filters". Shipping only the first makes a working filter look broken.
76
+
77
+ ## Export
78
+
79
+ `ExportButton` (its doc is `ExportTo`) for CSV and similar. Reach for it when the prompt mentions exporting, downloading, or sending records elsewhere.