@wix/agent-skills 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) 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 +14 -3
  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 +19 -1
  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-online-store.md +13 -0
  40. package/skills/wix-headless/references/inline-recipes/setup-rentals.md +254 -0
  41. package/skills/wix-headless/references/non-astro.md +1 -1
  42. package/skills/wix-headless-fast/SKILL.md +166 -0
  43. package/skills/wix-headless-fast/entry/skill.md +99 -0
  44. package/skills/wix-headless-fast/install/deploy.mjs +433 -0
  45. package/skills/wix-headless-fast/install/fast-path.mjs +141 -0
  46. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +137 -0
  47. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +137 -0
  48. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +113 -0
  49. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +42 -0
  50. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +123 -0
  51. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +70 -0
  52. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +99 -0
  53. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +76 -0
  54. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +62 -0
  55. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +40 -0
  56. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +99 -0
  57. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +24 -0
  58. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +16156 -0
  59. package/skills/wix-headless-fast/references/blog/seed/SEED.md +72 -0
  60. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +287 -0
  61. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +129 -0
  62. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +143 -0
  63. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +119 -0
  64. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +138 -0
  65. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +54 -0
  66. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +206 -0
  67. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +96 -0
  68. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +70 -0
  69. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +40 -0
  70. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +76 -0
  71. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +22 -0
  72. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +11962 -0
  73. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +61 -0
  74. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +302 -0
  75. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +179 -0
  76. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +83 -0
  77. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +57 -0
  78. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +151 -0
  79. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +75 -0
  80. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +41 -0
  81. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +11262 -0
  82. package/skills/wix-headless-fast/references/cms/seed/SEED.md +103 -0
  83. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +324 -0
  84. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +149 -0
  85. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +66 -0
  86. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +176 -0
  87. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +118 -0
  88. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +117 -0
  89. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +59 -0
  90. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +136 -0
  91. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +128 -0
  92. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +61 -0
  93. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +40 -0
  94. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +12 -0
  95. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +80 -0
  96. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +21 -0
  97. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +11884 -0
  98. package/skills/wix-headless-fast/references/events/seed/SEED.md +86 -0
  99. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +276 -0
  100. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +150 -0
  101. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +317 -0
  102. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +269 -0
  103. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +231 -0
  104. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +135 -0
  105. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +10593 -0
  106. package/skills/wix-headless-fast/references/forms/seed/SEED.md +108 -0
  107. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +320 -0
  108. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +63 -0
  109. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +60 -0
  110. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +155 -0
  111. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +78 -0
  112. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +47 -0
  113. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +66 -0
  114. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +88 -0
  115. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +53 -0
  116. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +122 -0
  117. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +50 -0
  118. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +21 -0
  119. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +42 -0
  120. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +10 -0
  121. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +11 -0
  122. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +10329 -0
  123. package/skills/wix-headless-fast/references/members/seed/SEED.md +39 -0
  124. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +94 -0
  125. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +134 -0
  126. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
  127. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
  128. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +115 -0
  129. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +59 -0
  130. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +39 -0
  131. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +58 -0
  132. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +165 -0
  133. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +55 -0
  134. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
  135. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
  136. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +21 -0
  137. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +29 -0
  138. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +10197 -0
  139. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +78 -0
  140. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +258 -0
  141. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +133 -0
  142. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +58 -0
  143. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +126 -0
  144. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +37 -0
  145. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +39 -0
  146. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +75 -0
  147. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +45 -0
  148. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +30 -0
  149. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
  150. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +40 -0
  151. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +21 -0
  152. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +11226 -0
  153. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +71 -0
  154. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +279 -0
  155. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +165 -0
  156. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +142 -0
  157. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
  158. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
  159. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +155 -0
  160. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +55 -0
  161. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +43 -0
  162. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +177 -0
  163. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +165 -0
  164. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +103 -0
  165. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +254 -0
  166. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +146 -0
  167. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +168 -0
  168. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
  169. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +22 -0
  170. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +12 -0
  171. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +12560 -0
  172. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +81 -0
  173. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +479 -0
  174. package/skills/wix-headless-fast/references/shared/CONTENT.md +22 -0
  175. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +73 -0
  176. package/skills/wix-headless-fast/references/shared/DESIGN.md +26 -0
  177. package/skills/wix-headless-fast/references/shared/app/styles/global.css +52 -0
  178. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +15 -0
  179. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +27 -0
  180. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +24 -0
  181. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +76 -0
  182. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
  183. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +46 -0
  184. package/skills/wix-headless-fast/references/shared/seed/images.mjs +145 -0
  185. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +149 -0
  186. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +26 -0
  187. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +121 -0
  188. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +100 -0
  189. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +130 -0
  190. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +48 -0
  191. package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +66 -0
  192. package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +103 -0
  193. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +48 -0
  194. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +140 -0
  195. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +80 -0
  196. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +101 -0
  197. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +221 -0
  198. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +215 -0
  199. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +109 -0
  200. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +46 -0
  201. package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +56 -0
  202. package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +23 -0
  203. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +12247 -0
  204. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +85 -0
  205. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +415 -0
  206. package/skills/wix-manage/SKILL.md +18 -2
  207. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +141 -0
  208. package/skills/wix-manage/references/google-business-profile/connect-google-business-profile.md +134 -0
  209. package/skills/wix-manage/references/google-business-profile/manage-google-business-profile-locations.md +182 -0
  210. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +3 -0
  211. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +21 -6
  212. package/skills/wix-manage/references/stores/update-product-with-options.md +83 -0
  213. package/skills/wix-vibe-headless/SKILL.md +18 -4
  214. package/skills/wix-vibe-headless/install/deploy.cjs +12 -4
  215. package/skills/wix-vibe-headless/install/pin-agents-md.cjs +2 -1
  216. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +3 -1
  217. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +3 -1
  218. package/skills/wix-vibe-headless/platforms/base44.md +23 -61
  219. package/skills/wix-vibe-headless/platforms/generic.md +6 -3
  220. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +43 -0
  221. package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +67 -0
  222. package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +128 -0
  223. package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +5 -3
  224. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +250 -0
  225. package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +12 -5
  226. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +41 -0
  227. package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.js +267 -0
  228. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +6 -3
  229. package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +470 -0
  230. package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +425 -0
  231. package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +187 -0
  232. package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +238 -0
  233. package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +108 -0
  234. package/skills/wix-vibe-headless/references/forms/seed/SEED.md +1762 -0
  235. package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +13 -0
  236. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +137 -84
  237. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +15 -8
  238. package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +37 -0
  239. package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +18 -6
  240. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +30 -7
  241. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +46 -10
  242. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +0 -110
  243. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +0 -51
  244. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +0 -49
  245. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +0 -92
  246. package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +0 -139
@@ -0,0 +1,99 @@
1
+ // Post reads (Wix Blog V3) — the only file that touches raw post entities. Everything it
2
+ // returns is a plain DTO from ./types. Copy as-is; extend by adding functions, not by editing
3
+ // these. Blog posts are NOT CMS collections — always @wix/blog, never @wix/data.
4
+ // docs: https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/query-posts.md
5
+ // docs: https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/get-post-by-slug.md
6
+ import { posts as postsModule } from "@wix/blog";
7
+ import { wixModule } from "../sdk";
8
+ import { imgSrc } from "../media";
9
+ import type { PostDetail, PostPage, PostSummary } from "./types";
10
+
11
+ const posts = wixModule(postsModule);
12
+
13
+ /** The Wix Blog app id (Astro item-page routing; comments use it as appId). */
14
+ export const BLOG_APP_ID = "14bcded7-0066-7c35-14d7-466cb3f09103";
15
+
16
+ type Raw = Record<string, any>;
17
+
18
+ function dateParts(value: unknown): { dateLabel: string; dateISO: string } {
19
+ if (!value) return { dateLabel: "", dateISO: "" };
20
+ const d = value instanceof Date ? value : new Date(String(value));
21
+ if (Number.isNaN(d.getTime())) return { dateLabel: "", dateISO: "" };
22
+ return {
23
+ dateLabel: d.toLocaleDateString(undefined, { year: "numeric", month: "short", day: "numeric" }),
24
+ dateISO: d.toISOString(),
25
+ };
26
+ }
27
+
28
+ function toSummary(raw: Raw): PostSummary {
29
+ return {
30
+ id: raw._id ?? "",
31
+ slug: raw.slug ?? "",
32
+ title: raw.title ?? "",
33
+ excerpt: raw.excerpt ?? "",
34
+ ...dateParts(raw.firstPublishedDate),
35
+ minutesToRead: raw.minutesToRead ?? 0,
36
+ featured: raw.featured === true,
37
+ pinned: raw.pinned === true,
38
+ // The cover is a media STRING (wix:image:// or https) at media.wixMedia.image.
39
+ coverUrl: imgSrc(raw.media?.wixMedia?.image, 1200, 675),
40
+ categoryIds: raw.categoryIds ?? [],
41
+ tagIds: raw.tagIds ?? [],
42
+ };
43
+ }
44
+
45
+ function toDetail(raw: Raw): PostDetail {
46
+ return {
47
+ ...toSummary(raw),
48
+ richContent: raw.richContent ?? null,
49
+ // contentText is plain text — split on newlines for the fallback body.
50
+ paragraphs: String(raw.contentText ?? "")
51
+ .split("\n")
52
+ .map((s: string) => s.trim())
53
+ .filter(Boolean),
54
+ };
55
+ }
56
+
57
+ export interface FetchPostsOptions {
58
+ limit?: number;
59
+ /** `nextCursor` from a previous page. */
60
+ cursor?: string | null;
61
+ /** Server-side filters (first page only — the cursor carries them on later pages). */
62
+ categoryId?: string | null;
63
+ tagId?: string | null;
64
+ }
65
+
66
+ /**
67
+ * One page of published posts, newest first (pinned posts lead). Only published posts come
68
+ * back to a visitor token — a "missing" post usually wasn't published, not a query bug.
69
+ */
70
+ export async function fetchPosts({ limit = 20, cursor, categoryId, tagId }: FetchPostsOptions = {}): Promise<PostPage> {
71
+ let q = posts.queryPosts().limit(limit);
72
+ if (cursor) {
73
+ // A cursor encodes the original filter+sort — re-sending them alongside it is rejected.
74
+ q = q.skipTo(cursor);
75
+ } else {
76
+ q = q.descending("firstPublishedDate");
77
+ if (categoryId) q = q.hasSome("categoryIds", [categoryId]);
78
+ if (tagId) q = q.hasSome("tagIds", [tagId]);
79
+ }
80
+ const res = await q.find();
81
+ return {
82
+ posts: (res.items ?? []).map((p: Raw) => toSummary(p)),
83
+ nextCursor: res.hasNext() ? (res.cursors?.next ?? null) : null,
84
+ };
85
+ }
86
+
87
+ /**
88
+ * Fetch one post by its URL slug with the full body (RICH_CONTENT + CONTENT_TEXT fieldsets —
89
+ * without them the body fields come back undefined). Null when not found.
90
+ */
91
+ export async function fetchPostBySlug(slug: string): Promise<PostDetail | null> {
92
+ const res = await posts
93
+ .queryPosts({ fieldsets: ["RICH_CONTENT", "CONTENT_TEXT"] })
94
+ .eq("slug", slug)
95
+ .limit(1)
96
+ .find();
97
+ const raw = res.items?.[0];
98
+ return raw ? toDetail(raw as Raw) : null;
99
+ }
@@ -0,0 +1,76 @@
1
+ // Category + tag reads (Wix Blog V3) — the only file that touches raw taxonomy entities.
2
+ // Everything it returns is a plain DTO from ./types. Copy as-is; extend by adding functions.
3
+ // docs: https://dev.wix.com/docs/api-reference/business-solutions/blog/category/query-categories.md
4
+ // docs: https://dev.wix.com/docs/api-reference/business-solutions/blog/tags/query-tags.md
5
+ import { categories as categoriesModule, tags as tagsModule } from "@wix/blog";
6
+ import { wixModule } from "../sdk";
7
+ import { imgSrc } from "../media";
8
+ import type { BlogCategory, BlogTag } from "./types";
9
+
10
+ const categories = wixModule(categoriesModule);
11
+ const tags = wixModule(tagsModule);
12
+
13
+ type Raw = Record<string, any>;
14
+
15
+ function toCategory(raw: Raw): BlogCategory {
16
+ return {
17
+ id: raw._id ?? "",
18
+ slug: raw.slug ?? "",
19
+ label: raw.label ?? "",
20
+ description: raw.description ?? "",
21
+ postCount: raw.postCount ?? 0,
22
+ coverUrl: imgSrc(raw.coverImage, 1200, 675),
23
+ };
24
+ }
25
+
26
+ function toTag(raw: Raw): BlogTag {
27
+ return {
28
+ id: raw._id ?? "",
29
+ slug: raw.slug ?? "",
30
+ label: raw.label ?? "",
31
+ postCount: raw.publishedPostCount ?? 0,
32
+ };
33
+ }
34
+
35
+ /** Categories in menu order (displayPosition) — non-fatal (empty array on failure). */
36
+ export async function fetchBlogCategories(): Promise<BlogCategory[]> {
37
+ try {
38
+ const res = await categories.queryCategories().ascending("displayPosition").limit(100).find();
39
+ return (res.items ?? []).map((c: Raw) => toCategory(c)).filter((c) => c.id);
40
+ } catch {
41
+ return [];
42
+ }
43
+ }
44
+
45
+ /** Tags, most-published-posts first — non-fatal (empty array on failure). */
46
+ export async function fetchBlogTags(): Promise<BlogTag[]> {
47
+ try {
48
+ const res = await tags.queryTags().descending("publishedPostCount").limit(100).find();
49
+ return (res.items ?? []).map((t: Raw) => toTag(t)).filter((t) => t.id);
50
+ } catch {
51
+ return [];
52
+ }
53
+ }
54
+
55
+ // The two by-slug getters return DIFFERENT envelopes upstream ({ category } vs { tag } here;
56
+ // getTag(id) even returns the tag bare) — the mapping below absorbs that asymmetry once.
57
+
58
+ /** One category by its URL slug. Null when not found. */
59
+ export async function fetchCategoryBySlug(slug: string): Promise<BlogCategory | null> {
60
+ try {
61
+ const res = await categories.getCategoryBySlug(slug);
62
+ return res.category ? toCategory(res.category as Raw) : null;
63
+ } catch {
64
+ return null;
65
+ }
66
+ }
67
+
68
+ /** One tag by its URL slug. Null when not found. */
69
+ export async function fetchTagBySlug(slug: string): Promise<BlogTag | null> {
70
+ try {
71
+ const res = await tags.getTagBySlug(slug);
72
+ return res.tag ? toTag(res.tag as Raw) : null;
73
+ } catch {
74
+ return null;
75
+ }
76
+ }
@@ -0,0 +1,62 @@
1
+ // Blog DTOs — the serializable shapes every hook, component, and page consumes.
2
+ // Plain JSON: safe as Astro island props or across server/client boundaries. Cover images are
3
+ // resolved https URLs; dates are pre-formatted display strings plus an ISO value for <time>.
4
+
5
+ /** A post as a feed/grid tile needs it. */
6
+ export interface PostSummary {
7
+ id: string;
8
+ slug: string;
9
+ title: string;
10
+ /** Short summary (≤500 chars) — the card body. May be "". */
11
+ excerpt: string;
12
+ /** Display-ready publish date, e.g. "Aug 26, 2026" ("" when missing). */
13
+ dateLabel: string;
14
+ /** ISO publish date for <time datetime> ("" when missing). */
15
+ dateISO: string;
16
+ /** Estimated reading time in minutes (0 when unknown). */
17
+ minutesToRead: number;
18
+ featured: boolean;
19
+ /** Pinned posts lead the default feed order. */
20
+ pinned: boolean;
21
+ /** Resolved https cover URL ("" when the post has no cover). */
22
+ coverUrl: string;
23
+ categoryIds: string[];
24
+ tagIds: string[];
25
+ }
26
+
27
+ /** A post as the post page needs it. */
28
+ export interface PostDetail extends PostSummary {
29
+ /**
30
+ * Ricos rich-content document (plain JSON) — the real post body. Render it ONLY through
31
+ * the shipped RichContent component (@wix/ricos viewer); it is not HTML and not text.
32
+ */
33
+ richContent: Record<string, unknown> | null;
34
+ /** Plain-text body split into paragraphs — the honest fallback when richContent is null. */
35
+ paragraphs: string[];
36
+ }
37
+
38
+ export interface BlogCategory {
39
+ id: string;
40
+ slug: string;
41
+ /** Display name (the API calls it `label`, never `name`). */
42
+ label: string;
43
+ description: string;
44
+ /** Number of posts in the category (hide empty categories with it). */
45
+ postCount: number;
46
+ /** Resolved https cover URL ("" when none). */
47
+ coverUrl: string;
48
+ }
49
+
50
+ export interface BlogTag {
51
+ id: string;
52
+ slug: string;
53
+ label: string;
54
+ /** Number of PUBLISHED posts with this tag. */
55
+ postCount: number;
56
+ }
57
+
58
+ /** One feed page; pass `nextCursor` back to fetch the next (null → no more). */
59
+ export interface PostPage {
60
+ posts: PostSummary[];
61
+ nextCursor: string | null;
62
+ }
@@ -0,0 +1,40 @@
1
+ ---
2
+ // The site chrome for every blog page — THIS file (header/footer/nav) plus the @theme
3
+ // token block in src/styles/global.css are what you brand. Keep the <slot name="seo-tags" />
4
+ // in <head> and the global.css import. (If another vertical is also deployed, its SiteLayout
5
+ // won; merge a Blog nav link there instead.)
6
+ import "../styles/global.css";
7
+
8
+ interface Props {
9
+ title: string;
10
+ description?: string;
11
+ }
12
+ const { title, description } = Astro.props;
13
+ ---
14
+
15
+ <!doctype html>
16
+ <html lang="en">
17
+ <head>
18
+ <meta charset="UTF-8" />
19
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
20
+ <title>{title}</title>
21
+ {description && <meta name="description" content={description} />}
22
+ <slot name="seo-tags" />
23
+ </head>
24
+ <body>
25
+ <header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
26
+ <div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
27
+ <a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
28
+ <nav class="flex items-center gap-6 text-sm">
29
+ <a href="/blog" class="text-foreground no-underline transition-colors hover:text-muted-foreground">Blog</a>
30
+ </nav>
31
+ </div>
32
+ </header>
33
+ <main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
34
+ <slot />
35
+ </main>
36
+ <footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
37
+ © Brand Name
38
+ </footer>
39
+ </body>
40
+ </html>
@@ -0,0 +1,99 @@
1
+ ---
2
+ // Post page.
3
+ //
4
+ // This is a Wix ITEM PAGE: the wixMetadata export + <SEO.Tags> below let the site owner edit
5
+ // this page's title/description/OG in the dashboard and register the route in the sitemap.
6
+ // Keep all three SEO pieces, the [...slug] rest param, and this frontmatter; restyle the
7
+ // template below freely. The body island is client:only — the ricos viewer breaks under SSR.
8
+ import SiteLayout from "../../layouts/SiteLayout.astro";
9
+ import RichContent from "../../components/blog/RichContent";
10
+ import { fetchPostBySlug } from "../../wix/blog/posts";
11
+ import { fetchBlogCategories, fetchBlogTags } from "../../wix/blog/taxonomy";
12
+ import type { BlogCategory, BlogTag } from "../../wix/blog/types";
13
+ import { WIX_APPS } from "@wix/essentials";
14
+ import { SEO } from "@wix/seo/components";
15
+ import { loadSEOTagsServiceConfig } from "@wix/seo/services";
16
+ import { seoTags } from "@wix/seo";
17
+
18
+ export const wixMetadata = {
19
+ appDefId: WIX_APPS.blogs.id,
20
+ pageIdentifier: WIX_APPS.blogs.postPageMetadata.pageIdentifier,
21
+ identifiers: {
22
+ slug: WIX_APPS.blogs.postPageMetadata.identifiers.slug,
23
+ },
24
+ };
25
+
26
+ const slug = Astro.params.slug;
27
+ if (!slug) {
28
+ return new Response(null, { status: 404 });
29
+ }
30
+
31
+ // Behind Wix's proxy the request URL is internal — the real public page URL arrives on
32
+ // x-wix-forwarded-url; the SEO service needs the public one.
33
+ const forwardedUrl = Astro.request.headers.get("x-wix-forwarded-url");
34
+ const pageUrl =
35
+ forwardedUrl && URL.canParse(forwardedUrl) && /^https?:$/.test(new URL(forwardedUrl).protocol)
36
+ ? forwardedUrl
37
+ : Astro.url.href;
38
+
39
+ let post = null;
40
+ let allCategories: BlogCategory[] = [];
41
+ let allTags: BlogTag[] = [];
42
+ let seoTagsServiceConfig = null;
43
+ try {
44
+ [post, allCategories, allTags, seoTagsServiceConfig] = await Promise.all([
45
+ fetchPostBySlug(slug),
46
+ fetchBlogCategories(),
47
+ fetchBlogTags(),
48
+ loadSEOTagsServiceConfig({
49
+ pageUrl,
50
+ itemType: seoTags.ItemType.BLOG_POST,
51
+ itemData: { slug },
52
+ }).catch(() => null),
53
+ ]);
54
+ } catch {
55
+ // Guarded: an unhandled SSR throw truncates the response mid-stream.
56
+ }
57
+
58
+ if (!post) {
59
+ return new Response(null, { status: 404 });
60
+ }
61
+
62
+ const postCategories = allCategories.filter((c) => post!.categoryIds.includes(c.id));
63
+ const postTags = allTags.filter((t) => post!.tagIds.includes(t.id));
64
+ ---
65
+
66
+ <SiteLayout title={post.title} description={post.excerpt}>
67
+ <SEO.Tags seoTagsServiceConfig={seoTagsServiceConfig} slot="seo-tags" />
68
+
69
+ <article class="mx-auto max-w-3xl">
70
+ {postCategories.length > 0 && <p class="eyebrow">{postCategories.map((c) => c.label).join(" · ")}</p>}
71
+ <h1 class="mt-2 text-3xl font-semibold tracking-tight">{post.title}</h1>
72
+ <p class="mt-3 text-sm text-muted-foreground">
73
+ {post.dateLabel && <time datetime={post.dateISO}>{post.dateLabel}</time>}
74
+ {post.dateLabel && post.minutesToRead > 0 ? " · " : ""}
75
+ {post.minutesToRead > 0 ? `${post.minutesToRead} min read` : ""}
76
+ </p>
77
+ {
78
+ post.coverUrl && (
79
+ <div class="mt-6 aspect-[16/9] overflow-hidden rounded-xl bg-secondary">
80
+ <img src={post.coverUrl} alt={post.title} class="h-full w-full object-cover" />
81
+ </div>
82
+ )
83
+ }
84
+ <div class="mt-8">
85
+ <RichContent client:only="react" content={post.richContent} fallbackParagraphs={post.paragraphs} />
86
+ </div>
87
+ {
88
+ postTags.length > 0 && (
89
+ <div class="mt-10 flex flex-wrap gap-2">
90
+ {postTags.map((t) => (
91
+ <span class="rounded-full border border-border px-3 py-1 text-xs font-medium text-muted-foreground">
92
+ {t.label}
93
+ </span>
94
+ ))}
95
+ </div>
96
+ )
97
+ }
98
+ </article>
99
+ </SiteLayout>
@@ -0,0 +1,24 @@
1
+ ---
2
+ // Blog index — data fetched SERVER-SIDE (SEO) and handed to the island as DTO props.
3
+ // Keep this frontmatter; swap the island import to YOUR feed component.
4
+ import SiteLayout from "../layouts/SiteLayout.astro";
5
+ import BlogFeedView from "../components/blog/BlogFeedView";
6
+ import { fetchPosts } from "../wix/blog/posts";
7
+ import { fetchBlogCategories, fetchBlogTags } from "../wix/blog/taxonomy";
8
+ import type { BlogCategory, BlogTag, PostPage } from "../wix/blog/types";
9
+
10
+ let page: PostPage = { posts: [], nextCursor: null };
11
+ let categories: BlogCategory[] = [];
12
+ let tags: BlogTag[] = [];
13
+ try {
14
+ [page, categories, tags] = await Promise.all([fetchPosts(), fetchBlogCategories(), fetchBlogTags()]);
15
+ } catch {
16
+ // An unguarded SSR throw truncates the response mid-stream; the island renders the
17
+ // empty state instead.
18
+ }
19
+ ---
20
+
21
+ <SiteLayout title="Blog">
22
+ <h1 class="mb-8 text-2xl font-semibold tracking-tight">Blog</h1>
23
+ <BlogFeedView client:load initialPage={page} initialCategories={categories} initialTags={tags} />
24
+ </SiteLayout>