@wix/agent-skills 1.21.0 → 1.23.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 (269) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +71 -7
  3. package/skills/wix-app/references/APP_VALIDATION.md +16 -10
  4. package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
  5. package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
  6. package/skills/wix-app/references/SDK_MODULE_MAP.md +2 -0
  7. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
  8. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
  9. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
  10. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
  11. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
  12. package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
  13. package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
  14. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
  15. package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
  16. package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
  17. package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
  18. package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
  19. package/skills/wix-headless-fast/SKILL.md +95 -230
  20. package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
  21. package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +17 -14
  22. package/skills/wix-headless-fast/guides/existing-site.md +78 -0
  23. package/skills/wix-headless-fast/guides/migration.md +43 -0
  24. package/skills/wix-headless-fast/guides/reference-mode.md +100 -0
  25. package/skills/wix-headless-fast/install/AGENTS.md +9 -4
  26. package/skills/wix-headless-fast/install/agents-md.mjs +5 -1
  27. package/skills/wix-headless-fast/install/attach.mjs +25 -47
  28. package/skills/wix-headless-fast/install/check.mjs +87 -0
  29. package/skills/wix-headless-fast/install/context.mjs +126 -0
  30. package/skills/wix-headless-fast/install/deploy.mjs +106 -80
  31. package/skills/wix-headless-fast/install/lock.mjs +55 -0
  32. package/skills/wix-headless-fast/install/setup.mjs +83 -23
  33. package/skills/wix-headless-fast/install/templates.mjs +168 -0
  34. package/skills/wix-manage/SKILL.md +3 -3
  35. package/skills/wix-manage/references/app-installation/install-wix-apps.md +68 -2
  36. package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +37 -4
  37. package/skills/wix-manage/references/ecommerce/ecom-pricing.md +29 -3
  38. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
  39. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
  40. package/skills/wix-manage/references/sites/site-import.md +101 -37
  41. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -303
  42. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
  43. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
  44. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
  45. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
  46. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
  47. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
  48. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
  49. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
  50. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
  51. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
  52. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
  53. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
  54. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
  55. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
  56. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
  57. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
  58. package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
  59. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
  60. package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
  61. package/skills/wix-headless-fast/references/blog/seed/read-site.mjs +0 -22
  62. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
  63. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -277
  64. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
  65. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
  66. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
  67. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
  68. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
  69. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
  70. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
  71. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
  72. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
  73. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
  74. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
  75. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
  76. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
  77. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
  78. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
  79. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
  80. package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
  81. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
  82. package/skills/wix-headless-fast/references/bookings/seed/read-site.mjs +0 -28
  83. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
  84. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -355
  85. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
  86. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
  87. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
  88. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
  89. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
  90. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
  91. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
  92. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
  93. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
  94. package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
  95. package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
  96. package/skills/wix-headless-fast/references/cms/seed/read-site.mjs +0 -20
  97. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
  98. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -307
  99. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
  100. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
  101. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
  102. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
  103. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
  104. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
  105. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
  106. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
  107. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
  108. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
  109. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
  110. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
  111. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
  112. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
  113. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
  114. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
  115. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
  116. package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
  117. package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
  118. package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
  119. package/skills/wix-headless-fast/references/events/seed/read-site.mjs +0 -26
  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 -340
  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/read-site.mjs +0 -20
  134. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
  135. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -316
  136. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
  137. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
  138. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
  139. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
  140. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
  141. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
  142. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
  143. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
  144. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
  145. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
  146. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
  147. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
  148. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
  149. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
  150. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
  151. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
  152. package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
  153. package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
  154. package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
  155. package/skills/wix-headless-fast/references/members/seed/read-site.mjs +0 -15
  156. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
  157. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -315
  158. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
  159. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
  160. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
  161. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
  162. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
  163. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
  164. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
  165. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
  166. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
  167. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
  168. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
  169. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
  170. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
  171. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
  172. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
  173. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
  174. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
  175. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
  176. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
  177. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
  178. package/skills/wix-headless-fast/references/portfolio/seed/read-site.mjs +0 -20
  179. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -256
  180. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -296
  181. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
  182. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
  183. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
  184. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
  185. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
  186. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
  187. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
  188. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
  189. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
  190. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
  191. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
  192. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
  193. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
  194. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
  195. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
  196. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
  197. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
  198. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
  199. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
  200. package/skills/wix-headless-fast/references/pricing-plans/seed/read-site.mjs +0 -21
  201. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
  202. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -360
  203. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
  204. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
  205. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
  206. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
  207. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
  208. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
  209. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
  210. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
  211. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
  212. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
  213. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
  214. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
  215. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
  216. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
  217. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
  218. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
  219. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
  220. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
  221. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
  222. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
  223. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
  224. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
  225. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
  226. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
  227. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
  228. package/skills/wix-headless-fast/references/restaurants/seed/read-site.mjs +0 -25
  229. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -499
  230. package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
  231. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
  232. package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
  233. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
  234. package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
  235. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
  236. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
  237. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
  238. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
  239. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
  240. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
  241. package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
  242. package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
  243. package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
  244. package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
  245. package/skills/wix-headless-fast/references/shared/seed/read-site.mjs +0 -99
  246. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -612
  247. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
  248. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
  249. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
  250. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
  251. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
  252. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
  253. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
  254. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
  255. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
  256. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
  257. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
  258. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -314
  259. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
  260. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
  261. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
  262. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -169
  263. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
  264. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
  265. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
  266. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
  267. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -130
  268. package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +0 -38
  269. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -561
@@ -1,93 +0,0 @@
1
- // One item as a framework-free store — the logic behind useItem: by `_id` or by a field match
2
- // (slug routing), usable from React (useItem wraps it), from a static page's item view, from
3
- // Vue/Svelte, or as the specification for a port.
4
- //
5
- // SSR-friendly: pass the server-fetched item as `initialItem` and start() fetches nothing.
6
- // One store per item surface: createItemStore(), not a singleton.
7
- import { getItemBy, getItemById } from "./items";
8
- import type { CmsItem } from "./types";
9
-
10
- /** Exactly one of `id` / `by`. */
11
- export interface ItemRef {
12
- id?: string;
13
- by?: { field: string; value: string | number };
14
- }
15
-
16
- export interface ItemStoreOptions {
17
- collectionId: string;
18
- ref: ItemRef;
19
- initialItem?: CmsItem;
20
- /** Reference field keys to inline as full items. */
21
- include?: string[];
22
- }
23
-
24
- export interface ItemState {
25
- /** null while loading OR when not found — branch on notFound for the miss state. */
26
- item: CmsItem | null;
27
- notFound: boolean;
28
- error: string | null;
29
- /** True until the fetch settles (false at once with an initialItem). */
30
- loading: boolean;
31
- }
32
-
33
- export interface ItemStore {
34
- getState(): ItemState;
35
- subscribe(listener: () => void): () => void;
36
- /** Fetch by ref when no `initialItem` was given. Call once when mounted. */
37
- start(): void;
38
- stop(): void;
39
- /** Fetch again (after an error, or when the item may have changed). */
40
- retry(): void;
41
- }
42
-
43
- export function createItemStore({ collectionId, ref, initialItem, include }: ItemStoreOptions): ItemStore {
44
- let item: CmsItem | null = initialItem ?? null;
45
- let notFound = false;
46
- let error: string | null = null;
47
- let loading = !initialItem;
48
- let started = false;
49
- let generation = 0;
50
- const listeners = new Set<() => void>();
51
- let snapshot: ItemState | null = null;
52
- const emit = () => { snapshot = null; for (const fn of listeners) fn(); };
53
-
54
- function getState(): ItemState {
55
- if (snapshot) return snapshot;
56
- snapshot = { item, notFound, error, loading };
57
- return snapshot;
58
- }
59
-
60
- function load(): void {
61
- const id = ++generation;
62
- loading = true; error = null; emit();
63
- const fetching = ref.id
64
- ? getItemById(collectionId, ref.id, { include })
65
- : ref.by
66
- ? getItemBy(collectionId, ref.by.field, ref.by.value, { include })
67
- : Promise.reject(new Error("useItem: pass ref.id or ref.by"));
68
- fetching
69
- .then((found) => {
70
- if (generation !== id || !started) return;
71
- item = found; notFound = found === null; loading = false;
72
- emit();
73
- })
74
- .catch((e) => {
75
- if (generation !== id || !started) return;
76
- error = e instanceof Error ? e.message : String(e); loading = false;
77
- emit();
78
- });
79
- }
80
-
81
- return {
82
- getState,
83
- subscribe(fn) { listeners.add(fn); return () => listeners.delete(fn); },
84
- start() {
85
- if (started) return;
86
- started = true;
87
- if (initialItem) return;
88
- load();
89
- },
90
- stop() { started = false; generation++; },
91
- retry() { if (started) load(); },
92
- };
93
- }
@@ -1,177 +0,0 @@
1
- // Wix Data rules and DTO mapping — transport-agnostic, imported by BOTH transports: ./items.ts
2
- // (the SDK, managed Astro and React) and the REST twin in references/cms/rest/items.ts (fetch, a
3
- // static site or a port to another language). Every rule about normalizing an item, validating a
4
- // filter, and spelling a query for the wire lives HERE, once. A raw item may come from the SDK
5
- // (dates as Date objects) or from REST (dates as `{ "$date": iso }`); the mappers accept both.
6
- // Imports are type-only so a strip to JS emits no imports.
7
- import type { CmsFilter, CmsItem, CmsPage, CmsQuery, CmsSort } from "./types";
8
-
9
- /** A raw data item's payload as either transport returns it (fields flat, `_id` included). */
10
- export type Raw = Record<string, any>;
11
- /** Media value + size → https URL. Injected: the SDK transport scales through @wix/sdk, REST through the URL form. */
12
- export type ImgSrc = (value: any, width: number, height: number) => string;
13
-
14
- /** Page size when a query names none. */
15
- export const DEFAULT_LIMIT = 20;
16
- /** The size every IMAGE field is resolved at — one URL per item, large enough for a detail page. */
17
- export const IMAGE_WIDTH = 1200;
18
- export const IMAGE_HEIGHT = 900;
19
-
20
- // ---- DTO normalization ---------------------------------------------------------------------------
21
-
22
- /** REST spells DATE/DATETIME fields as `{ "$date": "<iso>" }`; the SDK decodes them into Date objects. */
23
- function isDateWrapper(v: unknown): v is { $date: string } {
24
- if (!v || typeof v !== "object" || Array.isArray(v)) return false;
25
- const keys = Object.keys(v as Raw);
26
- return keys.length === 1 && keys[0] === "$date" && typeof (v as Raw).$date === "string";
27
- }
28
-
29
- /**
30
- * Raw → DTO value: dates become ISO strings (Date objects aren't serializable as island props;
31
- * `{ $date }` wrappers aren't dates at all), IMAGE fields holding a `wix:image://` identifier
32
- * become https URLs a browser can load. Recursive — included reference items too.
33
- */
34
- export function toValue(v: unknown, imgSrc: ImgSrc): unknown {
35
- if (v instanceof Date) return v.toISOString();
36
- if (isDateWrapper(v)) {
37
- // Same spelling as the SDK path (REST omits the milliseconds: "…T00:00:00Z").
38
- const t = new Date(v.$date);
39
- return Number.isNaN(t.getTime()) ? v.$date : t.toISOString();
40
- }
41
- if (typeof v === "string" && v.startsWith("wix:image://")) return imgSrc(v, IMAGE_WIDTH, IMAGE_HEIGHT);
42
- if (Array.isArray(v)) return v.map((x) => toValue(x, imgSrc));
43
- if (v && typeof v === "object") {
44
- const out: Raw = {};
45
- for (const [k, val] of Object.entries(v as Raw)) out[k] = toValue(val, imgSrc);
46
- return out;
47
- }
48
- return v;
49
- }
50
-
51
- export const toItem = (raw: Raw, imgSrc: ImgSrc): CmsItem => toValue(raw, imgSrc) as CmsItem;
52
-
53
- export function toPage(items: Raw[], hasNext: boolean, total: number | null | undefined, imgSrc: ImgSrc): CmsPage {
54
- return { items: items.map((r) => toItem(r, imgSrc)), hasNext, total: total ?? null };
55
- }
56
-
57
- /**
58
- * A DATE/DATETIME field for display — the DTO carries an ISO string; this is the one place it
59
- * becomes copy. "" for an absent or unparseable value (never "Invalid Date", never the raw ISO).
60
- * formatDate(item.publishDate) → "August 20, 2026"
61
- * formatDate(item.publishDate, "en-GB", { dateStyle: "medium" })
62
- */
63
- export function formatDate(iso: unknown, locale = "en-US", options: Intl.DateTimeFormatOptions = { dateStyle: "long" }): string {
64
- if (typeof iso !== "string" || !iso) return "";
65
- const t = new Date(iso);
66
- return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat(locale, options).format(t);
67
- }
68
-
69
- // ---- filter rules --------------------------------------------------------------------------------
70
-
71
- /**
72
- * An undefined comparand silently changes what a query matches (every row, or none) with no
73
- * server error — the classic "my items shows everyone's items" bug. Throw at the call site;
74
- * omit the filter entirely when you don't hold a value yet.
75
- */
76
- export function assertFilterValue(f: CmsFilter): void {
77
- if (f.op !== "isEmpty" && f.op !== "isNotEmpty" && f.value === undefined) {
78
- throw new Error(
79
- `cms: filter on "${f.field}" (${f.op}) has an undefined value — pass a real value or omit the filter.`,
80
- );
81
- }
82
- }
83
-
84
- // ---- the REST spelling of a query ---------------------------------------------------------------
85
- // The SDK's query builder serializes these itself; the REST twin sends them literally. Proven live:
86
- // a DATE comparand must travel as `{ "$date": iso }` (a plain ISO string compares as text and
87
- // matches nothing); isEmpty is `{ field: null }` and isNotEmpty `{ field: { $ne: null } }` — the
88
- // `$isEmpty` keyword is rejected (WDE0076).
89
-
90
- /** A comparand on the wire: Date → `{ $date }`, arrays element-wise, everything else as-is. */
91
- export function restValue(v: unknown): unknown {
92
- if (v instanceof Date) return { $date: v.toISOString() };
93
- if (Array.isArray(v)) return v.map(restValue);
94
- return v;
95
- }
96
-
97
- const REST_OPS: Record<Exclude<CmsFilter["op"], "isEmpty" | "isNotEmpty">, string> = {
98
- eq: "$eq",
99
- ne: "$ne",
100
- gt: "$gt",
101
- ge: "$gte",
102
- lt: "$lt",
103
- le: "$lte",
104
- contains: "$contains",
105
- startsWith: "$startsWith",
106
- hasSome: "$hasSome",
107
- hasAll: "$hasAll",
108
- };
109
-
110
- /** One predicate → one filter object `{ field: condition }`. */
111
- export function restCondition(f: CmsFilter): Raw {
112
- assertFilterValue(f);
113
- if (f.op === "isEmpty") return { [f.field]: null };
114
- if (f.op === "isNotEmpty") return { [f.field]: { $ne: null } };
115
- return { [f.field]: { [REST_OPS[f.op]]: restValue(f.value) } };
116
- }
117
-
118
- /** All predicates AND-ed: `{}` for none, the one object for one, `{ $and: [...] }` otherwise. */
119
- export function restFilter(filters: CmsFilter[] = []): Raw {
120
- const conditions = filters.map(restCondition);
121
- if (conditions.length === 0) return {};
122
- if (conditions.length === 1) return conditions[0];
123
- return { $and: conditions };
124
- }
125
-
126
- export function restSort(sort: CmsSort[] = []): { fieldName: string; order: "ASC" | "DESC" }[] {
127
- return sort.map((s) => ({ fieldName: s.field, order: s.direction === "desc" ? "DESC" : "ASC" }));
128
- }
129
-
130
- /**
131
- * The full Query Data Items body. Offset paging (`skip` = page N × limit) so every page can carry
132
- * its own filter/sort and `returnTotalCount` works; `includeReferences[].field` inlines reference
133
- * items. POST /wix-data/v2/items/query
134
- */
135
- export function queryBody(collectionId: string, query: CmsQuery = {}): Raw {
136
- const { filters = [], sort = [], limit = DEFAULT_LIMIT, skip = 0, include = [], withTotal = false } = query;
137
- return {
138
- dataCollectionId: collectionId,
139
- query: {
140
- filter: restFilter(filters),
141
- ...(sort.length ? { sort: restSort(sort) } : {}),
142
- paging: { limit, offset: skip },
143
- },
144
- ...(include.length ? { includeReferences: include.map((field) => ({ field })) } : {}),
145
- ...(withTotal ? { returnTotalCount: true } : {}),
146
- };
147
- }
148
-
149
- /** Whether another page follows — the response says so; the arithmetic is the fallback. */
150
- export function restHasNext(pagingMetadata: Raw | undefined, offset: number, limit: number): boolean {
151
- if (typeof pagingMetadata?.hasNext === "boolean") return pagingMetadata.hasNext;
152
- if (typeof pagingMetadata?.total === "number") return offset + (pagingMetadata.count ?? 0) < pagingMetadata.total;
153
- return (pagingMetadata?.count ?? 0) >= limit;
154
- }
155
-
156
- // ---- the REST spelling of a write ---------------------------------------------------------------
157
-
158
- /**
159
- * Field values for an insert/update body. A DATE field must arrive as `{ $date }` — JSON.stringify
160
- * turns a Date into a plain ISO string, which Wix stores as TEXT and never matches a date query.
161
- * The read-only system fields are Wix's to stamp, never sent.
162
- */
163
- export function restWriteData(data: Record<string, unknown>): Raw {
164
- const out: Raw = {};
165
- for (const [k, v] of Object.entries(data)) {
166
- if (k === "_createdDate" || k === "_updatedDate" || k === "_owner") continue;
167
- out[k] = restValue(v);
168
- }
169
- return out;
170
- }
171
-
172
- /** The Patch Data Item modifications for "set these fields" — one SET_FIELD per key. PATCH /wix-data/v2/items/{id} */
173
- export function patchModifications(fields: Record<string, unknown>): Raw[] {
174
- const entries = Object.entries(fields);
175
- if (!entries.length) throw new Error("cms: patchItemFields called with no fields.");
176
- return entries.map(([fieldPath, value]) => ({ fieldPath, action: "SET_FIELD", setFieldOptions: { value: restValue(value) } }));
177
- }
@@ -1,123 +0,0 @@
1
- // Wix Data reads/writes (@wix/data `items`) over the SDK — the only file that touches raw data
2
- // items on this transport. CMS is schema-generic: every function takes the collection id from the
3
- // seed plan (seed/SEED.md) and returns plain CmsItem DTOs from ./types. The rules and mappers live
4
- // in ./items-core (shared with the REST twin in references/cms/rest/); this file is the transport
5
- // only. Copy as-is; extend by adding functions, not by editing these.
6
- // docs: https://dev.wix.com/docs/sdk/business-solutions/data/items/query.md
7
- // docs: https://dev.wix.com/docs/sdk/business-solutions/data/items/update.md
8
- import { items as itemsModule } from "@wix/data";
9
- import { wixModule } from "../sdk";
10
- import { imgSrc } from "../media";
11
- import { DEFAULT_LIMIT, assertFilterValue, toItem, type Raw } from "./items-core";
12
- import type { CmsFilter, CmsItem, CmsPage, CmsQuery } from "./types";
13
-
14
- const items = wixModule(itemsModule);
15
-
16
- /**
17
- * Query one page of a collection. An empty result on a PUBLIC collection is a seed
18
- * permissions bug (read must be "ANYONE"), not a query bug — never reach for auth.elevate.
19
- */
20
- export async function queryItems(collectionId: string, query: CmsQuery = {}): Promise<CmsPage> {
21
- const { filters = [], sort = [], limit = DEFAULT_LIMIT, skip = 0, include = [], withTotal = false } = query;
22
- let q = items.query(collectionId);
23
- for (const f of filters) {
24
- assertFilterValue(f);
25
- const v = f.value as any;
26
- switch (f.op) {
27
- case "eq": q = q.eq(f.field, v); break;
28
- case "ne": q = q.ne(f.field, v); break;
29
- case "gt": q = q.gt(f.field, v); break;
30
- case "ge": q = q.ge(f.field, v); break;
31
- case "lt": q = q.lt(f.field, v); break;
32
- case "le": q = q.le(f.field, v); break;
33
- case "contains": q = q.contains(f.field, v); break;
34
- case "startsWith": q = q.startsWith(f.field, v); break;
35
- case "hasSome": q = q.hasSome(f.field, v); break;
36
- case "hasAll": q = q.hasAll(f.field, v); break;
37
- case "isEmpty": q = q.isEmpty(f.field); break;
38
- case "isNotEmpty": q = q.isNotEmpty(f.field); break;
39
- }
40
- }
41
- for (const s of sort) q = s.direction === "desc" ? q.descending(s.field) : q.ascending(s.field);
42
- if (include.length) q = q.include(...include);
43
- const res = await q.limit(limit).skip(skip).find(withTotal ? { returnTotalCount: true } : undefined);
44
- return {
45
- items: (res.items ?? []).map((r: Raw) => toItem(r, imgSrc)),
46
- hasNext: res.hasNext(),
47
- total: res.totalCount ?? null,
48
- };
49
- }
50
-
51
- /** Fetch one item by `_id`. Null when not found. */
52
- export async function getItemById(
53
- collectionId: string,
54
- itemId: string,
55
- { include = [] }: { include?: string[] } = {},
56
- ): Promise<CmsItem | null> {
57
- const raw = await items.get(collectionId, itemId, {
58
- ...(include.length ? { includeReferences: include.map((field) => ({ field })) } : {}),
59
- });
60
- return raw ? toItem(raw as Raw, imgSrc) : null;
61
- }
62
-
63
- /**
64
- * Fetch the first item whose `field` equals `value` — slug-style routing (Wix Data has no
65
- * native get-by-slug). Null when not found → render a not-found state, never invent an item.
66
- */
67
- export async function getItemBy(
68
- collectionId: string,
69
- field: string,
70
- value: string | number,
71
- { include = [] }: { include?: string[] } = {},
72
- ): Promise<CmsItem | null> {
73
- const page = await queryItems(collectionId, { filters: [{ field, op: "eq", value }], limit: 1, include });
74
- return page.items[0] ?? null;
75
- }
76
-
77
- /** Count items matching the filters — empty-state logic and result counts. */
78
- export async function countItems(collectionId: string, filters: CmsFilter[] = []): Promise<number> {
79
- const page = await queryItems(collectionId, { filters, limit: 1, withTotal: true });
80
- return page.total ?? page.items.length;
81
- }
82
-
83
- /**
84
- * Insert an item (visitor form / member submission). Succeeds only when the collection's
85
- * insert permission covers the caller (403 otherwise — a seed permissions step, not a code
86
- * bug). Never set `_owner` — Wix stamps it from the caller's identity.
87
- * Date fields must be Date objects (an ISO string is stored as text and breaks date queries).
88
- */
89
- export async function insertItem(collectionId: string, data: Record<string, unknown>): Promise<CmsItem> {
90
- const created = await items.insert(collectionId, data as Raw);
91
- return toItem(created as Raw, imgSrc);
92
- }
93
-
94
- /**
95
- * REPLACE an item — fields omitted from `item` are WIPED (update does not patch). Spread the
96
- * full item you hold and override; for an id + a few changed fields use patchItemFields.
97
- * A round-tripped DTO carries dates as ISO strings — wrap each date field back
98
- * (`new Date(iso)`) before updating, or the DATE field is silently rewritten as text.
99
- */
100
- export async function updateItem(collectionId: string, item: CmsItem): Promise<CmsItem> {
101
- const updated = await items.update(collectionId, item as Raw & { _id: string });
102
- return toItem(updated as Raw, imgSrc);
103
- }
104
-
105
- /** Patch only the named fields — the safe partial change (no replace-wipes-fields footgun). */
106
- export async function patchItemFields(
107
- collectionId: string,
108
- itemId: string,
109
- fields: Record<string, unknown>,
110
- ): Promise<CmsItem> {
111
- const entries = Object.entries(fields);
112
- if (!entries.length) throw new Error("cms: patchItemFields called with no fields.");
113
- let p = items.patch(collectionId, itemId);
114
- for (const [k, v] of entries) p = p.setField(k, v);
115
- const patched = await p.run();
116
- return toItem(patched as Raw, imgSrc);
117
- }
118
-
119
- /** Remove an item by `_id`. Irreversible. Returns the removed item (null if it didn't exist). */
120
- export async function removeItem(collectionId: string, itemId: string): Promise<CmsItem | null> {
121
- const removed = await items.remove(collectionId, itemId);
122
- return removed ? toItem(removed as Raw, imgSrc) : null;
123
- }
@@ -1,75 +0,0 @@
1
- // CMS DTOs — the serializable shapes every hook, component, and page consumes. CMS is
2
- // schema-generic: field keys come from the seed plan (seed/SEED.md), so an item is a flat
3
- // field map rather than a fixed interface. Plain JSON: safe as Astro island props or across
4
- // server/client boundaries. By the time an item leaves the data layer, Date fields are ISO
5
- // strings and IMAGE fields are resolved https URLs.
6
-
7
- /**
8
- * One collection item: `_id` plus the collection's fields, flat on the item (there is no
9
- * `item.data.*` — that is the REST shape and reads undefined here).
10
- * Field values by type: TEXT/URL/EMAIL → string, NUMBER → number, BOOLEAN → boolean,
11
- * DATE/DATETIME → ISO string, IMAGE → https URL ("" never happens — absent fields are
12
- * undefined), RICH_TEXT → the stored HTML string, REFERENCE/MULTI_REFERENCE → id(s), or
13
- * full CmsItem(s) when the query included the field.
14
- */
15
- export interface CmsItem {
16
- _id: string;
17
- /** ISO string (the SDK's Date objects are serialized by the data layer). */
18
- _createdDate?: string;
19
- _updatedDate?: string;
20
- /** Id of the member who created the row (member-scoped collections). */
21
- _owner?: string;
22
- [key: string]: unknown;
23
- }
24
-
25
- export type CmsFilterOp =
26
- | "eq"
27
- | "ne"
28
- | "gt"
29
- | "ge"
30
- | "lt"
31
- | "le"
32
- | "contains"
33
- | "startsWith"
34
- | "hasSome"
35
- | "hasAll"
36
- | "isEmpty"
37
- | "isNotEmpty";
38
-
39
- /**
40
- * One query predicate. Comparands must match the field's stored type — a DATE/DATETIME
41
- * field only matches a Date object (an ISO string compares as text and matches nothing).
42
- */
43
- export interface CmsFilter {
44
- field: string;
45
- op: CmsFilterOp;
46
- /** Required except for isEmpty/isNotEmpty; hasSome/hasAll take an array. */
47
- value?: string | number | boolean | Date | (string | number | Date)[];
48
- }
49
-
50
- export interface CmsSort {
51
- field: string;
52
- /** Default "asc". */
53
- direction?: "asc" | "desc";
54
- }
55
-
56
- export interface CmsQuery {
57
- filters?: CmsFilter[];
58
- sort?: CmsSort[];
59
- /** Page size (default 20). */
60
- limit?: number;
61
- /** Items to skip — page N is skip = N * limit. */
62
- skip?: number;
63
- /** Reference field keys to inline as full items (otherwise the field holds ids). */
64
- include?: string[];
65
- /** true → the page carries `total` (slower query; for counts/empty-state logic). */
66
- withTotal?: boolean;
67
- }
68
-
69
- /** One page of items. Load the next page with skip = items shown so far. */
70
- export interface CmsPage {
71
- items: CmsItem[];
72
- hasNext: boolean;
73
- /** Total matching items — only when the query asked `withTotal`, else null. */
74
- total: number | null;
75
- }
@@ -1,41 +0,0 @@
1
- ---
2
- // The site chrome for every CMS page — THIS file (header/footer/nav) plus the @theme token
3
- // block in src/styles/global.css are what you brand. Keep the <slot name="seo-tags" /> in
4
- // <head> and the global.css import. Add one nav link per content surface you build (the
5
- // routes are yours — CMS ships no fixed pages). (If another vertical is also deployed, its
6
- // SiteLayout won; merge nav links there instead.)
7
- import "../styles/global.css";
8
-
9
- interface Props {
10
- title: string;
11
- description?: string;
12
- }
13
- const { title, description } = Astro.props;
14
- ---
15
-
16
- <!doctype html>
17
- <html lang="en">
18
- <head>
19
- <meta charset="UTF-8" />
20
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
21
- <title>{title}</title>
22
- {description && <meta name="description" content={description} />}
23
- <slot name="seo-tags" />
24
- </head>
25
- <body>
26
- <header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
27
- <div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
28
- <a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
29
- <nav class="flex items-center gap-6 text-sm">
30
- <!-- one link per content surface you build, e.g. <a href="/recipes">Recipes</a> -->
31
- </nav>
32
- </div>
33
- </header>
34
- <main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
35
- <slot />
36
- </main>
37
- <footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
38
- © Brand Name
39
- </footer>
40
- </body>
41
- </html>