@wix/agent-skills 1.20.1 → 1.22.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 (262) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +71 -113
  3. package/skills/wix-app/references/APP_TOOLS.md +2 -1
  4. package/skills/wix-app/references/BACKEND_EVENT.md +3 -3
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +41 -152
  6. package/skills/wix-app/references/DASHBOARD_MODAL.md +4 -4
  7. package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
  8. package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
  9. package/skills/wix-app/references/SDK_MODULE_MAP.md +44 -0
  10. package/skills/wix-app/references/SITE_PLUGIN.md +36 -190
  11. package/skills/wix-app/references/app-tools/TOOLS.md +3 -1
  12. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +21 -0
  13. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
  14. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
  15. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
  16. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
  17. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
  18. package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +17 -0
  19. package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
  20. package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
  21. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
  22. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +4 -18
  23. package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
  24. package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
  25. package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
  26. package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
  27. package/skills/wix-app/references/site-plugin/EXAMPLES.md +1 -1
  28. package/skills/wix-headless-fast/SKILL.md +144 -221
  29. package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
  30. package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +15 -15
  31. package/skills/wix-headless-fast/guides/existing-site.md +76 -0
  32. package/skills/wix-headless-fast/guides/reference-mode.md +97 -0
  33. package/skills/wix-headless-fast/install/AGENTS.md +35 -0
  34. package/skills/wix-headless-fast/install/agents-md.mjs +39 -0
  35. package/skills/wix-headless-fast/install/attach.mjs +161 -86
  36. package/skills/wix-headless-fast/install/deploy.mjs +21 -60
  37. package/skills/wix-headless-fast/install/lock.mjs +55 -0
  38. package/skills/wix-headless-fast/install/setup.mjs +259 -0
  39. package/skills/wix-headless-fast/install/templates.mjs +168 -0
  40. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md +10 -19
  41. package/skills/wix-manage/references/events/create-wix-event.md +5 -1
  42. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
  43. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
  44. package/skills/wix-headless-fast/install/fast-path.mjs +0 -181
  45. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -301
  46. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
  47. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
  48. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
  49. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
  50. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
  51. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
  52. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
  53. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
  54. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
  55. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
  56. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
  57. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
  58. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
  59. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
  60. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
  61. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
  62. package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
  63. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
  64. package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
  65. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
  66. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -275
  67. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
  68. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
  69. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
  70. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
  71. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
  72. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
  73. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
  74. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
  75. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
  76. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
  77. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
  78. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
  79. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
  80. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
  81. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
  82. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
  83. package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
  84. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
  85. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
  86. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -353
  87. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
  88. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
  89. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
  90. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
  91. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
  92. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
  93. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
  94. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
  95. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
  96. package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
  97. package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
  98. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
  99. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -305
  100. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
  101. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
  102. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
  103. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
  104. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
  105. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
  106. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
  107. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
  108. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
  109. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
  110. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
  111. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
  112. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
  113. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
  114. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
  115. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
  116. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
  117. package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
  118. package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
  119. package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
  120. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
  121. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -338
  122. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
  123. package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
  124. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
  125. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
  126. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
  127. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
  128. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
  129. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
  130. package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
  131. package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
  132. package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
  133. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
  134. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -314
  135. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
  136. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
  137. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
  138. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
  139. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
  140. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
  141. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
  142. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
  143. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
  144. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
  145. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
  146. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
  147. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
  148. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
  149. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
  150. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
  151. package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
  152. package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
  153. package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
  154. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
  155. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -313
  156. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
  157. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
  158. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
  159. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
  160. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
  161. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
  162. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
  163. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
  164. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
  165. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
  166. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
  167. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
  168. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
  169. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
  170. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
  171. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
  172. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
  173. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
  174. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
  175. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
  176. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -258
  177. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -294
  178. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
  179. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
  180. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
  181. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
  182. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
  183. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
  184. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
  185. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
  186. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
  187. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
  188. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
  189. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
  190. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
  191. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
  192. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
  193. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
  194. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
  195. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
  196. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
  197. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
  198. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -358
  199. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
  200. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
  201. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
  202. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
  203. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
  204. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
  205. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
  206. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
  207. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
  208. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
  209. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
  210. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
  211. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
  212. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
  213. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
  214. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
  215. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
  216. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
  217. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
  218. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
  219. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
  220. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
  221. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
  222. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
  223. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
  224. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -479
  225. package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
  226. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
  227. package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
  228. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
  229. package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
  230. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
  231. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
  232. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
  233. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
  234. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
  235. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
  236. package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
  237. package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
  238. package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
  239. package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
  240. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -608
  241. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
  242. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
  243. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
  244. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
  245. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
  246. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
  247. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
  248. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
  249. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
  250. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
  251. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
  252. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -309
  253. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
  254. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
  255. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
  256. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -167
  257. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
  258. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
  259. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
  260. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
  261. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -124
  262. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -525
@@ -5,7 +5,7 @@ Custom element widgets are native web components (HTML custom elements) that app
5
5
 
6
6
  ## Scaffold
7
7
 
8
- Use `wix generate --params` with `extensionType: CUSTOM_ELEMENT`. `folder` must be a valid custom-element tag name (lowercase, starts with a letter, contains at least one hyphen). The CLI generates 4 files plus the `src/extensions.ts` registration:
8
+ Use `wix generate --params '{"extensionType":"CUSTOM_ELEMENT","name":"<Display Name>"}'` — `name` is the required param (a human-readable name, e.g. `"Countdown Timer"`), **not `folder`**: the CLI derives the folder/tag name from it (kebab-cased, `-element` suffix added if needed for the hyphen requirement). The CLI generates 4 files plus the `src/extensions.ts` registration:
9
9
 
10
10
  | File | Purpose |
11
11
  |------|---------|
@@ -14,13 +14,13 @@ Use `wix generate --params` with `extensionType: CUSTOM_ELEMENT`. `folder` must
14
14
  | `<name>.module.css` | CSS Modules stylesheet pre-wired with a `.root` class and CSS custom-property tokens |
15
15
  | `<name>.extension.ts` | Builder file (UUID, name, sizing defaults, auto-add, presets, tagName, file paths) |
16
16
 
17
- After scaffolding, edit `<name>.tsx` for the widget logic, `<name>.panel.tsx` for the settings UI, `<name>.module.css` for the visual design, and the builder file only for non-default sizing, auto-add, or preset behavior.
17
+ Edit `<name>.tsx`/`.panel.tsx`/`.module.css` for logic/settings-UI/styling; touch the builder file only for non-default sizing, auto-add, or presets.
18
18
 
19
19
  ## Widget Component (`<name>.tsx`)
20
20
 
21
21
  Wix calls `customElements.define()` for you using the builder's `tagName`; do NOT call it in your code.
22
22
 
23
- Two valid patterns exist: the **native class** component (CLI default) and the **React function component** via `react-to-webcomponent`.
23
+ Two patterns: **native class** (CLI default) and **React function component** via `react-to-webcomponent`.
24
24
 
25
25
  ### Native class component (CLI default)
26
26
 
@@ -29,9 +29,6 @@ import styles from './<name>.module.css';
29
29
 
30
30
  class MyWidget extends HTMLElement {
31
31
  static get observedAttributes() { return ['display-name']; }
32
-
33
- constructor() { super(); }
34
-
35
32
  connectedCallback() { this.render(); }
36
33
  disconnectedCallback() { /* tear down timers, listeners */ }
37
34
  attributeChangedCallback() { this.render(); }
@@ -45,14 +42,14 @@ class MyWidget extends HTMLElement {
45
42
  export default MyWidget;
46
43
  ```
47
44
 
48
- Key authoring rules:
45
+ Key rules:
49
46
 
50
47
  - Extend `HTMLElement`; export the class as the default export.
51
48
  - `observedAttributes` must return **kebab-case** strings — HTML attributes don't preserve camelCase.
52
49
  - Start side effects in `connectedCallback`, tear them down in `disconnectedCallback`.
53
50
  - Call `this.render()` from `attributeChangedCallback`; always provide defaults via `getAttribute` — attributes may be `null` on first paint.
54
51
  - Render via `this.innerHTML` (template strings) or imperative DOM, not JSX.
55
- - Apply the `.root` class from `<name>.module.css` rather than hard-coding colors inline.
52
+ - Apply the `.root` class from `<name>.module.css` rather than hard-coding colors inline — don't import other global CSS.
56
53
 
57
54
  ### React function component alternative (react-to-webcomponent)
58
55
 
@@ -77,9 +74,9 @@ export default reactToWebComponent(MyWidget, React, ReactDOM as any, {
77
74
  });
78
75
  ```
79
76
 
80
- Key authoring rules for the function component pattern:
77
+ Key rules for this pattern:
81
78
 
82
- - Define props in the `props` option of `reactToWebComponent` using **camelCase** keys. The library automatically maps kebab-case HTML attributes (e.g., `display-name`) to camelCase React props — you do not need `observedAttributes` or `attributeChangedCallback`.
79
+ - Define props in camelCase (see [Props Naming Convention](#props-naming-convention) below) — you do not need `observedAttributes` or `attributeChangedCallback`.
83
80
  - Use React hooks (`useState`, `useEffect`) for state and side effects.
84
81
  - Render with JSX; use `<name>.module.css` for styles via `className`.
85
82
 
@@ -92,8 +89,8 @@ React component shown in the Wix Editor sidebar.
92
89
  - Loads initial values with `widget.getProp('kebab-case-name')`.
93
90
  - Updates properties with `widget.setProp('kebab-case-name', value)`. Always update both local React state AND the widget prop in onChange handlers.
94
91
  - Wrapped in `WixDesignSystemProvider > SidePanel > SidePanel.Content`.
95
- - For color pickers, use `inputs.selectColor()` from `@wix/editor` with `FillPreview` — NOT `<Input type="color">`.
96
- - For font pickers, use `inputs.selectFont()` from `@wix/editor` with a `Button` — NOT a text Input.
92
+ - For color/font fields, see [Color & Font Pickers](#color--font-pickers) below — never a plain `<Input>`.
93
+ - For date/time fields, see [Date & Time Fields](custom-element-widget/SETTINGS_PANEL.md#date--time-fields) — `DatePicker`/`TimeInput` `onChange` shapes differ.
97
94
 
98
95
  ## Builder file (`<name>.extension.ts`)
99
96
 
@@ -102,106 +99,57 @@ The CLI scaffolds the builder file with sensible defaults — edit it only to cu
102
99
  | Field | Type | Default | Purpose |
103
100
  |---|---|---|---|
104
101
  | `id` | UUID | generated | Extension ID. Don't change after scaffolding. |
105
- | `name` | string | from scaffold param | Display name. **Maximum 30 characters** — longer names cause a platform validation error on deployment. |
106
- | `tagName` | kebab-case | derived from `folder` | Custom-element tag the widget is registered under. Used by the Editor and by `customElements.define()`. |
107
- | `width.defaultWidth` | number (px) | `450` | Initial width when the widget is added to a page. |
108
- | `width.allowStretch` | boolean | `true` | Whether the site owner can stretch the widget to the page width. |
102
+ | `name` | string | from scaffold param | Display name, **max 30 chars** — longer fails platform validation on deploy. |
103
+ | `tagName` | kebab-case | derived from `folder` | Custom-element tag used by the Editor and `customElements.define()`. |
104
+ | `width.defaultWidth` | number (px) | `450` | Initial width when added to a page. |
105
+ | `width.allowStretch` | boolean | `true` | Whether the site owner can stretch the widget's width. |
109
106
  | `height.defaultHeight` | number (px) | `250` | Initial height. |
110
- | `installation.autoAdd` | boolean | `true` | If true, the widget is auto-added to the site when the app is installed. Set to `false` for opt-in widgets. |
111
- | `presets` | array | one default preset | Editor presets (saved configurations) the site owner can pick from. Each preset has its own `id`, `name`, and `thumbnailUrl`. |
112
- | `presets[].thumbnailUrl` | string | `{{BASE_URL}}/<name>-thumbnail.png` | Path to a preview image. `{{BASE_URL}}` is resolved at build time. Replace the placeholder image at the same relative path with your actual asset. |
113
- | `element` | path | `./extensions/site/widgets/<name>/<name>.tsx` | Path to the widget custom element file. Don't change unless renaming files. |
114
- | `settings` | path | `./extensions/site/widgets/<name>/<name>.panel.tsx` | Path to the settings panel file. Don't change unless renaming files. |
107
+ | `installation.autoAdd` | boolean | `true` | Auto-added on app install if true; set `false` for opt-in widgets. |
108
+ | `presets` | array | one default preset | Editor presets the site owner can pick, each with its own `id`/`name`/`thumbnailUrl`. |
109
+ | `presets[].thumbnailUrl` | string | `{{BASE_URL}}/<name>-thumbnail.png` | Preview image path; `{{BASE_URL}}` resolves at build time — replace the placeholder asset there. |
110
+ | `element` / `settings` | path | generated paths | Widget/panel file paths. Don't change unless renaming files. |
115
111
 
116
112
  - Import `@wix/design-system/styles.global.css` for styles
117
- - For colors, use `ColorPickerField` with `inputs.selectColor()` from `@wix/editor` — NOT `<Input type="color">`
118
- - For fonts, use `FontPickerField` with `inputs.selectFont()` from `@wix/editor` — NOT a text Input
119
- - Font values are stored as JSON strings via `JSON.stringify()` / `JSON.parse()`
120
113
 
121
114
  ## Props Naming Convention
122
115
 
123
- The convention differs by pattern, but the settings panel side is always kebab-case.
124
-
125
- **Native class component:**
126
-
127
- | Side | Convention | Example |
128
- | ---- | ---------- | ------- |
129
- | `<name>.tsx` — `observedAttributes`, `getAttribute` | kebab-case | `"display-name"`, `"bg-color"` |
130
- | `<name>.panel.tsx` — `widget.getProp` / `widget.setProp` | kebab-case | `"display-name"`, `"bg-color"` |
131
- | Local TypeScript variables | camelCase | `displayName`, `bgColor` |
132
-
133
- **React function component (react-to-webcomponent):** Define props with camelCase keys in the `props` option. The library handles the kebab-case ↔ camelCase mapping at the HTML attribute boundary automatically.
116
+ The convention differs by pattern, but the settings panel side is always kebab-case:
134
117
 
135
- | Side | Convention | Example |
136
- | ---- | ---------- | ------- |
137
- | `reactToWebComponent` `props` option | camelCase | `{ displayName: 'string' }` |
138
- | React component props interface | camelCase | `displayName?: string` |
139
- | `<name>.panel.tsx` — `widget.getProp` / `widget.setProp` | kebab-case | `"display-name"`, `"bg-color"` |
118
+ | Pattern | Side | Convention | Example |
119
+ | --- | --- | --- | --- |
120
+ | Native class | `<name>.tsx` (`observedAttributes`, `getAttribute`) | kebab-case | `"display-name"`, `"bg-color"` |
121
+ | Native class | Local TypeScript variables | camelCase | `displayName`, `bgColor` |
122
+ | React FC | `reactToWebComponent` `props` option | camelCase | `{ displayName: 'string' }` |
123
+ | React FC | Component props interface | camelCase | `displayName?: string` |
124
+ | Both | `<name>.panel.tsx` (`widget.getProp`/`setProp`) | kebab-case | `"display-name"`, `"bg-color"` |
140
125
 
141
126
  ## Identity and SDK Calls
142
127
 
143
- A widget runs on the live site 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.
128
+ A widget 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.
144
129
 
145
- A widget's collection reads also need permissions that admit an anonymous visitor — see [Permissions](DATA_COLLECTION.md#permissions), since the scaffolded default allows `ANYONE` to read but only `PRIVILEGED` to write.
130
+ A widget's collection reads need permissions admitting an anonymous visitor — see [Permissions](DATA_COLLECTION.md#permissions); the scaffolded default is `ANYONE` read, `PRIVILEGED` write.
146
131
 
147
132
  ## Wix Data API Integration
148
133
 
149
134
  When using the Wix Data API in widgets, you **must** handle the Wix Editor environment gracefully — fetching data inside the Editor produces empty results and noisy errors.
150
135
 
151
- **Requirements (both patterns):**
136
+ **Requirements (both patterns):** install `@wix/site-window` first (not part of the CLI's base scaffold), check `await wixWindow.viewMode()` before fetching, render a placeholder if `'Editor'`, as below.
152
137
 
153
- - Import `{ window as wixWindow }` from `'@wix/site-window'`.
154
- - Check `await wixWindow.viewMode()` before fetching data.
155
- - If `viewMode === 'Editor'`, render a placeholder instead of fetching.
156
- - Only query and render real data when NOT in Editor mode.
157
-
158
- **Native class component:**
138
+ **Native class component** — same class shape as [above](#native-class-component-cli-default), `observedAttributes` returning `['collection-id']`, with this `render()`:
159
139
 
160
140
  ```typescript
161
141
  import { items } from '@wix/data';
162
142
  import { window as wixWindow } from '@wix/site-window';
163
143
 
164
- class MyWidget extends HTMLElement {
165
- static get observedAttributes() {
166
- return ['collection-id'];
167
- }
168
-
169
- constructor() {
170
- super();
171
- }
172
-
173
- connectedCallback() {
174
- this.render();
175
- }
176
-
177
- attributeChangedCallback() {
178
- this.render();
179
- }
180
-
181
- async render() {
182
- const collectionId = this.getAttribute('collection-id') || '';
183
- const viewMode = await wixWindow.viewMode();
184
-
185
- if (viewMode === 'Editor') {
186
- this.innerHTML = `
187
- <div style="padding: 20px; border: 2px dashed #ccc">
188
- <p>Widget will display data on the live site</p>
189
- <p>Collection: ${collectionId}</p>
190
- </div>
191
- `;
192
- return;
193
- }
194
-
195
- try {
196
- const { items: results } = await items.query(collectionId).limit(10).find();
197
- this.innerHTML = results.map((item) => `<div>${item.title}</div>`).join('');
198
- } catch (error) {
199
- console.error('Failed to load data:', error);
200
- }
144
+ async render() {
145
+ const collectionId = this.getAttribute('collection-id') || '';
146
+ if ((await wixWindow.viewMode()) === 'Editor') {
147
+ this.innerHTML = `<div style="padding: 20px; border: 2px dashed #ccc"><p>Widget will display data on the live site</p></div>`;
148
+ return;
201
149
  }
150
+ const { items: results } = await items.query(collectionId).limit(10).find();
151
+ this.innerHTML = results.map((item) => `<div>${item.title}</div>`).join('');
202
152
  }
203
-
204
- export default MyWidget;
205
153
  ```
206
154
 
207
155
  **React function component** — use `useEffect` for the viewMode check and data fetch:
@@ -224,74 +172,15 @@ useEffect(() => {
224
172
 
225
173
  ## Color & Font Pickers
226
174
 
227
- Use native Wix pickers — never `<Input type="color">` or a plain text input.
228
-
229
- | Picker | API | Preview component | Value type |
230
- |--------|-----|-------------------|------------|
231
- | Color | `inputs.selectColor(value, { onChange })` from `@wix/editor` | `<FillPreview fill={value} onClick={...} />` | `string` |
232
- | Font | `inputs.selectFont(value, { onChange })` from `@wix/editor` | `<Button onClick={...}>Change Font</Button>` | `{ font: string; textDecoration: string }` — store as `JSON.stringify()` |
233
-
234
- ```typescript
235
- // Color — inside a SidePanel.Field > FormField
236
- <FillPreview
237
- fill={bgColor}
238
- onClick={() => inputs.selectColor(bgColor, {
239
- onChange: (val) => { if (val) { setBgColor(val); widget.setProp('bg-color', val); } }
240
- })}
241
- />
242
-
243
- // Font — inside a SidePanel.Field > FormField
244
- <Button onClick={() => inputs.selectFont(font, {
245
- onChange: (val) => {
246
- const next = { font: val.font, textDecoration: val.textDecoration || '' };
247
- setFont(next);
248
- widget.setProp('font', JSON.stringify(next));
249
- }
250
- })}>Change Font</Button>
251
- ```
175
+ See [SETTINGS_PANEL.md § Color & Font Picker Fields](custom-element-widget/SETTINGS_PANEL.md#color--font-picker-fields) for the API, value types, and wiring — never `<Input type="color">` or a plain text input. Call `widget.setProp('bg-color', val)` / `widget.setProp('font', JSON.stringify(val))` from the `onChange` shown there to persist the value.
252
176
 
253
177
  ## Examples
254
178
 
255
- ### Countdown Timer Widget
256
-
257
- **Request:** "Create a countdown timer widget"
258
-
259
- **Output:**
260
-
261
- - Widget with configurable title, target date/time, colors, and font
262
- - Settings panel with date picker, time input, color pickers, font picker
263
- - Real-time countdown display with days, hours, minutes, seconds
264
-
265
- ### Product Showcase Widget
266
-
267
- **Request:** "Create a widget that displays products from a collection"
268
-
269
- **Output:**
270
-
271
- - Widget that queries Wix Data collection
272
- - Editor environment handling (shows placeholder in editor)
273
- - Settings panel for collection selection, display options, styling
274
- - Responsive grid layout with product cards
275
-
276
- ### Interactive Calculator Widget
277
-
278
- **Request:** "Create a calculator widget with customizable colors"
279
-
280
- **Output:**
281
-
282
- - Functional calculator component
283
- - Settings panel for color customization (background, buttons, text)
284
- - Inline styles for all styling
285
- - No external dependencies
179
+ - **"Create a countdown timer widget"** → title/date/colors/font settings (see [Date & Time Fields](custom-element-widget/SETTINGS_PANEL.md#date--time-fields)), a live days/hours/minutes/seconds display.
180
+ - **"Create a widget that displays products from a collection"** → Wix Data query with [Editor-mode handling](#wix-data-api-integration), a responsive product-card grid.
181
+ - **"Create a calculator widget with customizable colors"** → a functional calculator, color-customization settings, inline styles, no external dependencies.
286
182
 
287
183
  ## Frontend Aesthetics
288
184
 
289
- Avoid generic aesthetics. Create distinctive designs with unique fonts (avoid Inter, Roboto, Arial), cohesive color palettes, CSS animations for micro-interactions, and context-specific choices. Don't use clichéd color schemes or predictable layouts.
290
-
291
- ## Custom-element-specific Conventions
185
+ Avoid generic aesthetics — distinctive fonts (not Inter, Roboto, Arial), a cohesive color palette, and CSS micro-interactions, not a predictable clichéd layout.
292
186
 
293
- - **Native class (CLI default):** Widget extends `HTMLElement` and renders via `this.innerHTML`. Use kebab-case throughout (`observedAttributes`, `getAttribute`, `getProp`, `setProp`).
294
- - **React function component alternative:** Widget uses a React FC converted via `react-to-webcomponent`. Use camelCase in the `props` option; the library handles kebab-case HTML attributes automatically. The settings panel side still uses kebab-case with `getProp`/`setProp`.
295
- - The settings panel (`<name>.panel.tsx`) is always a functional React component with hooks, regardless of which widget pattern is used.
296
- - Style via the generated `<name>.module.css` (preferred) or inline styles. Don't import other global CSS.
297
- - Handle the Wix Editor environment when using the Wix Data API.
@@ -67,12 +67,12 @@ const result = await modalClosed; // Resolves with data from closeModal()
67
67
 
68
68
  ## Receiving Data in Modal
69
69
 
70
- Inside the modal, subscribe via `dashboard.observeState()` to access whatever was passed in `openModal({ params })`. The callback receives the params object as `state`:
70
+ Inside the modal, subscribe via `dashboard.observeState()` to access whatever was passed in `openModal({ params })`. The callback receives the params object as `state`. `observeState` is generic (`state`'s type defaults to `{}`), so **pass the params shape explicitly as a type argument** — without it, `tsc` fails every property access on `state` with "Property 'x' does not exist on type '{}'":
71
71
 
72
72
  ```typescript
73
73
  import { dashboard } from "@wix/dashboard";
74
74
 
75
- dashboard.observeState((state) => {
75
+ dashboard.observeState<{ userId: string; itemData: unknown }>((state) => {
76
76
  // state contains the keys you passed in `openModal({ params: { ... } })`
77
77
  console.log(state.userId, state.itemData);
78
78
  });
@@ -109,7 +109,7 @@ export default {
109
109
 
110
110
  | Mistake | Fix |
111
111
  |---------|-----|
112
- | Can't find modal ID | Check the modal's generated builder file (`extensions.ts`) `id` field |
112
+ | Can't find modal ID | Check the modal's generated builder file's `id` field (not `src/extensions.ts`, which only registers the extension) |
113
113
  | Using `extensionId` instead of `modalId` | Use `modalId` in `openModal()` |
114
114
  | Can't access params in modal | Use `dashboard.observeState()` to read passed data |
115
115
  | Modal won't close | Use `dashboard.closeModal()` from `@wix/dashboard` |
@@ -137,7 +137,7 @@ const handleDelete = async (item: Item) => {
137
137
  const [itemName, setItemName] = useState<string | null>(null);
138
138
 
139
139
  useEffect(() => {
140
- dashboard.observeState((state) => {
140
+ dashboard.observeState<{ itemName?: string }>((state) => {
141
141
  if (state.itemName) setItemName(state.itemName);
142
142
  });
143
143
  }, []);
@@ -31,7 +31,9 @@ The CLI generates the folder, `page.tsx`, the builder file, the UUID, and the `s
31
31
 
32
32
  **Never reuse `<route>` as a path prefix inside this page's `PatternsReactRouter`** — its location is already page-scoped, so a page scaffolded `route: "shifts"` still routes from `path="/"`, and `path="/shifts"` silently never matches. Page-relative paths: `<pkgRoot>/dist/docs/Collection to Entity Flow.md`.
33
33
 
34
- **Then, before writing UI:** resolve the package root and probe `<pkgRoot>/dist/docs/index.json` once with `grep`/`python3` — not a whole-file `Read`, which truncates it silently — per [Prerequisites](WIX_PATTERNS_DOCS.md#prerequisites). That index carries each symbol's `importPath`, `examples` and `bundle`, which is what decides whether you need to open anything else at all. Each Bash call is a fresh shell — re-set the path variable in every call.
34
+ **Before writing that UI:** pick the matching case in [DRAFT_TEMPLATE.md](dashboard-page/DRAFT_TEMPLATE.md#which-case-matches-the-request) and copy its files in over the generated stub — don't compose the shell from scratch.
35
+
36
+ **Then, for whatever the template case doesn't already cover:** resolve the package root and probe `<pkgRoot>/dist/docs/index.json` once with `grep`/`python3` — not a whole-file `Read`, which truncates it silently — per [Prerequisites](WIX_PATTERNS_DOCS.md#prerequisites). That index carries each symbol's `importPath`, `examples` and `bundle`, which is what decides whether you need to open anything else at all. Each Bash call is a fresh shell — re-set the path variable in every call.
35
37
 
36
38
  ## Capabilities
37
39
 
@@ -86,31 +88,15 @@ When building a dashboard page to configure an embedded script, see [Dynamic Par
86
88
 
87
89
  ## Examples
88
90
 
89
- Each output below names the library that owns each part. Confirm every patterns component and prop by reading its doc from `dist/docs/index.json` before use — these examples name the shape, not a verified API.
90
-
91
- ### Data Management Table
92
-
93
- **Request:** "Create a dashboard page to manage blog posts"
94
-
95
- **Output:** A `@wix/patterns` `CollectionPage` wrapping a `Table` driven by `useTableCollection`, with search, row actions, and empty state from the collection's own APIs. Add and edit navigate to an `EntityPage`. WDS only for leaf UI inside cells and entity-page cards; the provider sits in a parent component, in its own file.
96
-
97
- ### Settings Form
98
-
99
- **Request:** "Build a settings page for notification preferences"
100
-
101
- **Output:** A `@wix/patterns` `SettingsPage` shell. WDS form fields inside it (`FormField`, `Input`, `ToggleSwitch`), save button with `dashboard.showToast()` confirmation, and `dashboard.onBeforeUnload()` for the unsaved-changes warning. No collection here, so no table hook.
102
-
103
- ### Order Management
104
-
105
- **Request:** "Create an admin panel for customer orders"
106
-
107
- **Output:** A `@wix/patterns` `CollectionPage` + `Table`, with filters, sorting, and row actions from the collection APIs — **not** a hand-built WDS filter bar. Status badges are WDS leaf UI in a cell. Viewing or editing an order opens an `EntityPage` via `navigateToEntityPage`, not a modal; a Dashboard Modal appears only for the delete confirmation.
108
-
109
- ### Embedded Script Configuration
110
-
111
- **Request:** "Create a settings page for the coupon popup embedded script"
91
+ Each starts from a case in [DRAFT_TEMPLATE.md](dashboard-page/DRAFT_TEMPLATE.md) — copy that case's files, then adapt. Only what differs per request is listed below; the wiring lives solely in the template.
112
92
 
113
- **Output:** A `@wix/patterns` `SettingsPage` with WDS form fields (popup headline, coupon code, minimum cart value, enable toggle). `embeddedScripts.getEmbeddedScript()` loads the parameters on mount, `embeddedScripts.embedScript()` saves them back — both sides string-converted, per [Dynamic Parameters](dashboard-page/DYNAMIC_PARAMETERS.md).
93
+ | Request | Case | Adapt |
94
+ | --- | --- | --- |
95
+ | "Dashboard page to manage blog posts" | B | Columns for the post fields named; search, row actions and empty state from the collection's own APIs; add/edit navigate to the `EntityPage`; `{feature}-api.ts` calls `@wix/blog` |
96
+ | "Settings page for notification preferences" | C | `SettingsPage` shell with a WDS field per preference (`FormField`, `Input`, `ToggleSwitch`); save confirms with `dashboard.showToast()`, and `dashboard.onBeforeUnload()` warns on unsaved changes — no collection, no table hook, no router |
97
+ | "Admin panel for customer orders" | B | Filters, sorting and row actions from the collection APIs — **not** a hand-built WDS filter bar; status `Badge` is leaf UI in a cell; data source is `@wix/ecom`, never CMS (see [SDK-First Rule](../SKILL.md#sdk-first-rule-existing-wix-app-data-is-never-cms)); viewing or editing opens the `EntityPage`, and a Dashboard Modal appears only for the delete confirmation (see [Entity create and edit](../SKILL.md#entity-create-and-edit)) |
98
+ | "Settings page for the coupon popup embedded script" | C | Fields for headline, coupon code, min cart value, enable toggle; swap `fetch`/`onSave` for `embeddedScripts.getEmbeddedScript()`/`embedScript()`, string-converted both ways (see [Dynamic Parameters](dashboard-page/DYNAMIC_PARAMETERS.md)); use `withProviders` in place of the template's plain provider |
99
+ | "Admin page to manage fees, with an app settings section" | D | One extension, not several — fee fields/calls into all four route components. Skipping the router's `location` plumbing here passes `tsc`/`wix build` silently and fails only in a browser |
114
100
 
115
101
 
116
102
  ## API Spec Support
@@ -33,10 +33,15 @@ The CLI manages a shared aggregator file (`data-collections.extension.ts`) that
33
33
 
34
34
  ## Collection File Shape
35
35
 
36
- The CLI scaffolds `<CollectionName>.ts` as a `satisfies DataCollection` default export. The scaffolded `fields` and `dataPermissions` are placeholders — replace them with your real schema, and set permissions per the [Context-Based Permission Rules](#context-based-permission-rules) before shipping.
36
+ The CLI scaffolds `<CollectionName>.ts` as a `satisfies DataCollection` default export. The scaffolded `fields` and `dataPermissions` are placeholders — replace them with your real schema, and set permissions per [Permissions](data-collection/PERMISSIONS.md) before shipping.
37
+
38
+ **Import `DataCollection` from the package this project actually uses.** A standalone
39
+ `@wix/custom-extensions` project — what `wix generate` scaffolds today — emits
40
+ `from '@wix/custom-extensions'`; only an Astro project uses `'@wix/astro/builders'`. The scaffolded
41
+ file already has the right one: keep the import the CLI wrote and replace the body around it.
37
42
 
38
43
  ```typescript
39
- import type { DataCollection } from '@wix/astro/builders';
44
+ import type { DataCollection } from '@wix/custom-extensions'; // or '@wix/astro/builders' in an Astro project
40
45
 
41
46
  export const collectionIdSuffix = '<CollectionName>';
42
47
 
@@ -51,227 +56,19 @@ export default {
51
56
  } satisfies DataCollection;
52
57
  ```
53
58
 
54
- ## Field Types
55
-
56
- | Type | Description | Use Case |
57
- | ----------------- | -------------------------------- | ---------------------- |
58
- | `TEXT` | Single-line text | Names, titles |
59
- | `RICH_TEXT` | Formatted HTML text | Blog content |
60
- | `RICH_CONTENT` | Rich content with embedded media | Complex blog posts |
61
- | `NUMBER` | Decimal numbers | Prices, quantities |
62
- | `BOOLEAN` | True/false | Toggles, flags |
63
- | `DATE` | Date only | Birthdays |
64
- | `DATETIME` | Date with time | Timestamps |
65
- | `TIME` | Time only | Schedules |
66
- | `IMAGE` | Single image | Thumbnails |
67
- | `DOCUMENT` | File attachment | PDFs |
68
- | `VIDEO` | Video file | Media |
69
- | `AUDIO` | Audio file | Podcasts |
70
- | `MEDIA_GALLERY` | Multiple media | Galleries |
71
- | `REFERENCE` | Link to one item | Author → User |
72
- | `MULTI_REFERENCE` | Link to many items | Post → Tags |
73
- | `ADDRESS` | Structured address | Locations |
74
- | `URL` | URL validation | Links |
75
- | `PAGE_LINK` | Link to Wix page | Internal navigation |
76
- | `LANGUAGE` | Language code | Multi-language content |
77
- | `OBJECT` | JSON object | Flexible data |
78
- | `ARRAY` | Array of values | Generic arrays |
79
- | `ARRAY_STRING` | Array of strings | Tags list |
80
- | `ARRAY_DOCUMENT` | Array of documents | File collections |
81
- | `ANY` | Any type | Most flexible |
82
-
83
- **CRITICAL: OBJECT fields require `objectOptions` with a `fields` array.** When using `type: "OBJECT"`, you MUST include `objectOptions: { fields: [] }` — the API will reject OBJECT fields without it. Use an empty `fields` array if you don't need a fixed schema (the object will still accept arbitrary JSON):
84
-
85
- ```json
86
- {
87
- "key": "settings",
88
- "displayName": "Settings",
89
- "type": "OBJECT",
90
- "objectOptions": { "fields": [] }
91
- }
92
- ```
93
-
94
- > ⚠️ `objectOptions: {}` (without the `fields` key) is **not valid** and will cause a runtime error. Always include `fields`, even as an empty array.
95
-
96
- For structured objects with a defined schema, list the nested fields inside `objectOptions.fields`:
97
-
98
- ```json
99
- {
100
- "key": "triggerRules",
101
- "displayName": "Trigger Rules",
102
- "type": "OBJECT",
103
- "objectOptions": {
104
- "fields": [
105
- { "key": "url", "displayName": "URL Condition", "type": "TEXT" },
106
- {
107
- "key": "scrollDepth",
108
- "displayName": "Scroll Depth %",
109
- "type": "NUMBER"
110
- },
111
- { "key": "dateStart", "displayName": "Start Date", "type": "DATE" }
112
- ]
113
- }
114
- }
115
- ```
116
-
117
- ## Field Properties
118
-
119
- ```ts
120
- {
121
- key: 'email', // required, lowerCamelCase ASCII
122
- type: 'TEXT', // required, see Field Types above
123
- displayName: 'Email Address', // optional, CMS label
124
- description: "User's primary email", // optional, help text
125
- encrypted: false, // optional, encrypt value at rest
126
- // arrayOptions / objectOptions / referenceOptions / multiReferenceOptions
127
- // only when type is ARRAY / OBJECT / REFERENCE / MULTI_REFERENCE
128
- }
129
- ```
130
-
131
- | Property | Required | Description |
132
- | ------------- | -------- | ------------------------------------ |
133
- | `key` | yes | Field identifier (lowerCamelCase) |
134
- | `type` | yes | Field data type (see Field Types) |
135
- | `displayName` | no | Label shown in CMS |
136
- | `description` | no | Help text |
137
- | `encrypted` | no | Encrypt value at rest |
138
-
139
- **There is no field-level `required`, `defaultValue`, or `unique`.** The `DevCenterDataCollectionField` type does not accept them and TypeScript will reject the build. Use these alternatives instead:
59
+ ## The rest of this extension
140
60
 
141
- - **Required values:** Validate in the dashboard form and/or service-plugin handler before inserting. Do not rely on the collection schema to enforce presence.
142
- - **Defaults:** Set defaults in the insert path (dashboard handler, service plugin) or via the collection's `initialData` for seeded rows.
143
- - **Uniqueness:** Declare a unique index in the collection's `indexes` array (see [Indexes](#indexes)). Uniqueness is an index-level concern, not a field-level one.
144
-
145
- ## Indexes
146
-
147
- The `indexes` array on the collection accepts entries shaped like:
148
-
149
- ```ts
150
- indexes: [
151
- {
152
- fields: [{ path: 'email', order: 'ASC' }], // order is optional: 'ASC' | 'DESC'
153
- unique: true, // optional, enforces uniqueness across items
154
- },
155
- {
156
- fields: [
157
- { path: 'category' },
158
- { path: '_createdDate', order: 'DESC' },
159
- ],
160
- },
161
- ],
162
- ```
163
-
164
- | Property | Required | Description |
165
- | --------------- | -------- | ------------------------------------------------------ |
166
- | `fields` | yes | One or more `{ path, order? }` entries (composite index when more than one) |
167
- | `fields[].path` | yes | Field key to index |
168
- | `fields[].order`| no | `'ASC'` (default) or `'DESC'` |
169
- | `unique` | no | Enforce uniqueness on the indexed field(s) |
170
-
171
- Leave `indexes: []` when no custom indexing is needed; the `_id` index is created automatically.
172
-
173
- ## Naming Conventions
174
-
175
- - **Field keys:** `lowerCamelCase`, ASCII only (e.g., `productName`, `isActive`, `createdAt`)
176
- - **Collection IDs (`idSuffix`):** `lower-kebab-case` or `lower_underscore` (e.g., `product-categories`, `blog_posts`)
177
- - **Display names:** Human-readable, can contain spaces (e.g., `"Product Name"`, `"Is Active"`)
178
-
179
- ## System Fields (Automatic)
180
-
181
- Every collection includes: `_id`, `_createdDate`, `_updatedDate`, `_owner`
61
+ | Topic | File |
62
+ | --- | --- |
63
+ | Field types, field properties, indexes, naming, system fields, relationships | [data-collection/SCHEMA.md](data-collection/SCHEMA.md) |
64
+ | Releasing, updating the site, the CMS prerequisite, item vs. management access | [data-collection/LIFECYCLE.md](data-collection/LIFECYCLE.md) |
65
+ | Reading and writing items at runtime (Wix Data SDK) | [data-collection/WIX_DATA.md](data-collection/WIX_DATA.md) |
182
66
 
183
67
  ## Permissions
184
68
 
185
- Access levels control who can read, create, update, and delete items in collections.
186
-
187
- | Level | Description |
188
- | -------------------- | -------------------------------------------------- |
189
- | `UNDEFINED` | Not set (inherits defaults) |
190
- | `ANYONE` | Public access (including visitors) |
191
- | `SITE_MEMBER` | Any signed-in user (members and collaborators) |
192
- | `SITE_MEMBER_AUTHOR` | Signed-in users, but members only access own items |
193
- | `CMS_EDITOR` | Site collaborators with CMS Access permission |
194
- | `PRIVILEGED` | CMS administrators and privileged users |
195
-
196
- **Common patterns:**
197
-
198
- - Public content (default, recommended): `read: ANYONE, write: PRIVILEGED`
199
- - User-generated content: `read: SITE_MEMBER, write: SITE_MEMBER_AUTHOR`
200
- - Editorial workflow: `read: ANYONE, write: CMS_EDITOR`
201
- - Private/admin: `read: PRIVILEGED, write: PRIVILEGED`
202
-
203
- **Permission hierarchy** (most to least restrictive): `PRIVILEGED` > `CMS_EDITOR` > `SITE_MEMBER_AUTHOR` > `SITE_MEMBER` > `ANYONE` > `UNDEFINED`
204
-
205
- ### Context-Based Permission Rules
206
-
207
- **CRITICAL: Permissions must match where and how the data is accessed.** The consumer of the data determines the minimum permission level — setting permissions more restrictive than the access context will cause runtime failures (empty results or permission-denied errors).
208
-
209
- **Determine permissions by asking: "Who interacts with this data, and from where?"**
210
-
211
- | Access Context | Who Sees / Uses It | Implication |
212
- |---|---|---|
213
- | **Custom element widget** (`CUSTOM_ELEMENT_WIDGET`) | Any site visitor (public) | Reads must be `ANYONE`. If the widget accepts input (e.g., reviews, submissions), inserts must also be `ANYONE` or `SITE_MEMBER`. |
214
- | **Embedded Script** | Any site visitor (public) | Same as custom element widget — reads must be `ANYONE`. Writes depend on whether visitors can submit data. |
215
- | **Dashboard Page** (`DASHBOARD_PAGE`) | Site owner / collaborators only | Can use `CMS_EDITOR` or `PRIVILEGED` for all operations since only authorized users access the dashboard. |
216
- | **Backend code (site-side)** | Runs in visitor context | If called from page code or site-side modules, the caller has visitor-level permissions — data must be readable/writable at the appropriate public level. |
217
- | **Backend code (elevated)** | Runs with `auth.elevate()` from `@wix/essentials` | Can bypass permissions, but the collection still needs correct defaults for any non-elevated callers. |
218
-
219
- Use `SITE_MEMBER_AUTHOR` on `itemUpdate` / `itemRemove` when members should only modify their **own** items (e.g., a member can edit only their own reviews).
220
-
221
- **How to apply this:**
222
-
223
- 1. **Identify every place the collection is read or written** — custom element widgets, dashboard pages, embedded scripts, backend APIs.
224
- 2. **Use the least restrictive context as the floor.** If a custom element widget reads the data AND a dashboard page also reads it, `itemRead` must be `ANYONE` (because the widget is public).
225
- 3. **Apply per-operation.** A collection can have `itemRead: ANYONE` (widget displays it) but `itemInsert: CMS_EDITOR` (only dashboard users add items). Each operation is independent.
226
-
227
- ## Relationships
228
-
229
- **One-to-One / Many-to-One (REFERENCE):**
230
-
231
- ```json
232
- {
233
- "key": "category",
234
- "displayName": "Category",
235
- "type": "REFERENCE",
236
- "referenceOptions": {
237
- "referencedCollectionId": "categories"
238
- }
239
- }
240
- ```
241
-
242
- **Many-to-Many (MULTI_REFERENCE):**
243
-
244
- ```json
245
- {
246
- "key": "tags",
247
- "displayName": "Tags",
248
- "type": "MULTI_REFERENCE",
249
- "multiReferenceOptions": {
250
- "referencedCollectionId": "tags"
251
- }
252
- }
253
- ```
254
-
255
- **CRITICAL Constraints:**
256
-
257
- - REFERENCE/MULTI_REFERENCE fields can ONLY link to other custom CMS collections defined in your app
258
- - The `referencedCollectionId` MUST be the `idSuffix` of another collection in the same plan
259
- - **NEVER use REFERENCE fields to link to Wix business entities** (Products, Orders, Contacts, Members, etc.)
260
- - Use Wix SDK APIs to access Wix business entities instead
261
-
262
- ## App Version Updates
263
-
264
- Changes to your data collections extension require releasing a new major version of your app. When a user updates to the new major version, their collections are updated as follows:
265
-
266
- - **Adding a new collection:** The new collection is created on the site.
267
- - **Removing a collection:** If the old app version defined a collection and the new version doesn't, the collection is removed from the site.
268
- - **Modifying a collection schema:** Field additions, removals, and type changes are applied to the collection. Existing data is preserved.
269
-
270
- **Important notes:**
271
-
272
- - Collection changes only affect users who update to the new major version. Users who don't update retain their current collections.
273
- - Collection changes take up to 5 minutes to propagate after an update.
274
- - **Initial data is only imported when a collection is first created.** If a collection already contains data, `initialData` is ignored during updates.
69
+ The four contexts, what each admits, and the `SITE_MEMBER_AUTHOR` rule are in
70
+ [data-collection/PERMISSIONS.md](data-collection/PERMISSIONS.md). The scaffolded `dataPermissions`
71
+ are placeholders — `ANYONE` to read, `PRIVILEGED` to write — so set them before shipping.
275
72
 
276
73
  ## Wix CLI-Specific Constraints
277
74