@wix/agent-skills 1.26.0 → 1.27.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.
- package/README.md +1 -0
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +7 -5
- package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +14 -2
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +4 -5
- package/skills/wix-headless-kit/SKILL.md +31 -14
- package/skills/wix-headless-kit/guides/existing-site.md +12 -5
- package/skills/wix-headless-kit/install/attach.mjs +55 -10
- package/skills/wix-headless-kit/install/check.mjs +5 -5
- package/skills/wix-headless-kit/install/deploy.mjs +7 -3
- package/skills/wix-headless-kit/install/templates.mjs +21 -17
- package/skills/wix-headless-templates/SKILL.md +43 -0
- package/skills/wix-headless-templates/blank/project/README.md +15 -0
- package/skills/wix-headless-templates/blank/project/astro.config.mjs +20 -0
- package/skills/wix-headless-templates/blank/project/package.json +34 -0
- package/skills/wix-headless-templates/blank/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blank/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blank/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blank/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blank/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blank/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blank/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/INSTRUCTIONS.md +418 -0
- package/skills/wix-headless-templates/blog/app/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/app/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/app-astro/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/README.md +15 -0
- package/skills/wix-headless-templates/blog/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/blog/project/package-lock.json +14699 -0
- package/skills/wix-headless-templates/blog/project/package.json +39 -0
- package/skills/wix-headless-templates/blog/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blog/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blog/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blog/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blog/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/blog/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/blog/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/blog/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/blog/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/rest/authors.ts +39 -0
- package/skills/wix-headless-templates/blog/rest/comments.ts +64 -0
- package/skills/wix-headless-templates/blog/rest/post-likes.ts +37 -0
- package/skills/wix-headless-templates/blog/rest/posts.ts +123 -0
- package/skills/wix-headless-templates/blog/rest/taxonomy.ts +79 -0
- package/skills/wix-headless-templates/blog/seed/SEED.md +81 -0
- package/skills/wix-headless-templates/blog/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +337 -0
- package/skills/wix-headless-templates/bookings/INSTRUCTIONS.md +356 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/README.md +15 -0
- package/skills/wix-headless-templates/bookings/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/bookings/project/package-lock.json +10546 -0
- package/skills/wix-headless-templates/bookings/project/package.json +41 -0
- package/skills/wix-headless-templates/bookings/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/bookings/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/bookings/rest/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/rest/services.ts +94 -0
- package/skills/wix-headless-templates/bookings/seed/SEED.md +109 -0
- package/skills/wix-headless-templates/bookings/seed/read-site.mjs +28 -0
- package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +407 -0
- package/skills/wix-headless-templates/cms/INSTRUCTIONS.md +399 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/README.md +15 -0
- package/skills/wix-headless-templates/cms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/cms/project/package-lock.json +9798 -0
- package/skills/wix-headless-templates/cms/project/package.json +37 -0
- package/skills/wix-headless-templates/cms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/cms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/cms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/cms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/cms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/cms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/cms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/cms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/cms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/cms/rest/collections.ts +25 -0
- package/skills/wix-headless-templates/cms/rest/items.ts +189 -0
- package/skills/wix-headless-templates/cms/seed/SEED.md +116 -0
- package/skills/wix-headless-templates/cms/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +321 -0
- package/skills/wix-headless-templates/compose.mjs +83 -0
- package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +349 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +95 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +466 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/app-astro/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/app-astro/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/README.md +15 -0
- package/skills/wix-headless-templates/donations/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/donations/project/package-lock.json +10266 -0
- package/skills/wix-headless-templates/donations/project/package.json +39 -0
- package/skills/wix-headless-templates/donations/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/donations/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/donations/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/donations/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/donations/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/donations/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +95 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +466 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/donations/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/donations/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/donations/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +76 -0
- package/skills/wix-headless-templates/donations/rest/donate.ts +90 -0
- package/skills/wix-headless-templates/donations/seed/SEED.md +90 -0
- package/skills/wix-headless-templates/donations/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +250 -0
- package/skills/wix-headless-templates/events/INSTRUCTIONS.md +387 -0
- package/skills/wix-headless-templates/events/app/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/app/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/app/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/app/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/app/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/app/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/app-astro/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/README.md +15 -0
- package/skills/wix-headless-templates/events/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/events/project/package-lock.json +10497 -0
- package/skills/wix-headless-templates/events/project/package.json +39 -0
- package/skills/wix-headless-templates/events/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/events/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/events/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/events/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/events/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/project/src/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/project/src/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/project/src/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/events/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/events/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/events/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/events/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/events/rest/events.ts +112 -0
- package/skills/wix-headless-templates/events/rest/orders.ts +28 -0
- package/skills/wix-headless-templates/events/rest/registration.ts +96 -0
- package/skills/wix-headless-templates/events/seed/SEED.md +115 -0
- package/skills/wix-headless-templates/events/seed/read-site.mjs +26 -0
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +322 -0
- package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +317 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/app/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/app-astro/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/README.md +15 -0
- package/skills/wix-headless-templates/faq/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/faq/project/package-lock.json +8837 -0
- package/skills/wix-headless-templates/faq/project/package.json +37 -0
- package/skills/wix-headless-templates/faq/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/faq/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/faq/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/faq/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/project/src/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/project/src/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/faq/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/faq/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/faq/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/faq/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/faq/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/faq/rest/faq.ts +71 -0
- package/skills/wix-headless-templates/faq/seed/SEED.md +104 -0
- package/skills/wix-headless-templates/faq/seed/read-site.mjs +23 -0
- package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +302 -0
- package/skills/wix-headless-templates/forms/INSTRUCTIONS.md +417 -0
- package/skills/wix-headless-templates/forms/app/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/README.md +15 -0
- package/skills/wix-headless-templates/forms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/forms/project/package-lock.json +9102 -0
- package/skills/wix-headless-templates/forms/project/package.json +37 -0
- package/skills/wix-headless-templates/forms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/forms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/forms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/forms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/forms/project/src/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/forms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/forms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/forms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/forms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/forms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/forms/rest/forms.ts +37 -0
- package/skills/wix-headless-templates/forms/rest/submissions.ts +83 -0
- package/skills/wix-headless-templates/forms/seed/SEED.md +225 -0
- package/skills/wix-headless-templates/forms/seed/read-site.mjs +53 -0
- package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +574 -0
- package/skills/wix-headless-templates/forms/tooling/address-templates.mjs +96 -0
- package/skills/wix-headless-templates/members/INSTRUCTIONS.md +345 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/app/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/app/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/app/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/app/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/app/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/app/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/app/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/app/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/app/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/app-astro/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/app-astro/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/app-astro/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/README.md +15 -0
- package/skills/wix-headless-templates/members/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/members/project/package-lock.json +8892 -0
- package/skills/wix-headless-templates/members/project/package.json +37 -0
- package/skills/wix-headless-templates/members/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/members/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/members/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/members/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/project/src/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/project/src/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/project/src/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/project/src/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/members/project/src/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/project/src/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/members/project/src/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/members/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/members/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/members/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/members/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/members/rest/auth.ts +224 -0
- package/skills/wix-headless-templates/members/rest/members.ts +26 -0
- package/skills/wix-headless-templates/members/seed/SEED.md +39 -0
- package/skills/wix-headless-templates/members/seed/read-site.mjs +15 -0
- package/skills/wix-headless-templates/members/seed/seed-members.mjs +91 -0
- package/skills/wix-headless-templates/portfolio/INSTRUCTIONS.md +315 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/README.md +15 -0
- package/skills/wix-headless-templates/portfolio/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/portfolio/project/package-lock.json +8760 -0
- package/skills/wix-headless-templates/portfolio/project/package.json +37 -0
- package/skills/wix-headless-templates/portfolio/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/portfolio/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +75 -0
- package/skills/wix-headless-templates/portfolio/seed/SEED.md +86 -0
- package/skills/wix-headless-templates/portfolio/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +253 -0
- package/skills/wix-headless-templates/pricing-plans/INSTRUCTIONS.md +376 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/README.md +15 -0
- package/skills/wix-headless-templates/pricing-plans/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/package-lock.json +9799 -0
- package/skills/wix-headless-templates/pricing-plans/project/package.json +38 -0
- package/skills/wix-headless-templates/pricing-plans/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/pricing-plans/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +58 -0
- package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +20 -0
- package/skills/wix-headless-templates/pricing-plans/seed/SEED.md +93 -0
- package/skills/wix-headless-templates/pricing-plans/seed/read-site.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +301 -0
- package/skills/wix-headless-templates/rentals/INSTRUCTIONS.md +309 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/README.md +15 -0
- package/skills/wix-headless-templates/rentals/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/rentals/project/package-lock.json +10545 -0
- package/skills/wix-headless-templates/rentals/project/package.json +40 -0
- package/skills/wix-headless-templates/rentals/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/rentals/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/rentals/rest/rentals.ts +153 -0
- package/skills/wix-headless-templates/rentals/seed/SEED.md +95 -0
- package/skills/wix-headless-templates/rentals/seed/read-site.mjs +34 -0
- package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +321 -0
- package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +468 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/README.md +15 -0
- package/skills/wix-headless-templates/restaurants/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/restaurants/project/package-lock.json +11038 -0
- package/skills/wix-headless-templates/restaurants/project/package.json +40 -0
- package/skills/wix-headless-templates/restaurants/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/restaurants/rest/menu.ts +96 -0
- package/skills/wix-headless-templates/restaurants/rest/ordering.ts +222 -0
- package/skills/wix-headless-templates/restaurants/rest/reservations.ts +102 -0
- package/skills/wix-headless-templates/restaurants/seed/SEED.md +118 -0
- package/skills/wix-headless-templates/restaurants/seed/read-site.mjs +25 -0
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +577 -0
- package/skills/wix-headless-templates/shared/CONTENT.md +22 -0
- package/skills/wix-headless-templates/shared/CUSTOM_OPERATIONS.md +100 -0
- package/skills/wix-headless-templates/shared/DESIGN.md +37 -0
- package/skills/wix-headless-templates/shared/SUPPLIED-CONTENT.md +27 -0
- package/skills/wix-headless-templates/shared/app/styles/global.css +57 -0
- package/skills/wix-headless-templates/shared/app/wix/config.ts +16 -0
- package/skills/wix-headless-templates/shared/app/wix/media.ts +106 -0
- package/skills/wix-headless-templates/shared/app/wix/money.ts +24 -0
- package/skills/wix-headless-templates/shared/app/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +69 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/INSTRUCTIONS.md +194 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchBox.tsx +136 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchHit.tsx +50 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchResults.tsx +300 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSearch.ts +31 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSuggest.ts +26 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-core.ts +520 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-store.ts +235 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts +80 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/suggest-store.ts +178 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts +158 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro +33 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +82 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +43 -0
- package/skills/wix-headless-templates/shared/rest/client.ts +155 -0
- package/skills/wix-headless-templates/shared/rest/config.ts +4 -0
- package/skills/wix-headless-templates/shared/rest/media.ts +92 -0
- package/skills/wix-headless-templates/shared/seed/images.mjs +183 -0
- package/skills/wix-headless-templates/shared/seed/read-site.mjs +97 -0
- package/skills/wix-headless-templates/shared/seed/site-context.mjs +70 -0
- package/skills/wix-headless-templates/shared/seed/site.mjs +48 -0
- package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +44 -0
- package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +685 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart.ts +187 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/app-astro/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/README.md +15 -0
- package/skills/wix-headless-templates/storefront/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/storefront/project/package-lock.json +10786 -0
- package/skills/wix-headless-templates/storefront/project/package.json +41 -0
- package/skills/wix-headless-templates/storefront/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/storefront/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart.ts +187 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/storefront/rest/cart.ts +183 -0
- package/skills/wix-headless-templates/storefront/rest/catalog.ts +267 -0
- package/skills/wix-headless-templates/storefront/seed/SEED.md +169 -0
- package/skills/wix-headless-templates/storefront/seed/read-site.mjs +38 -0
- package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +839 -0
- package/skills/wix-manage/SKILL.md +11 -7
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +1 -1
- package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +206 -0
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +17 -24
- package/skills/wix-manage/references/sites/create-headless-site.md +2 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +262 -171
- package/skills/wix-manage/references/stores/update-product-with-options.md +1 -1
- package/skills/wix-headless/entry/bootstrap.mjs +0 -156
- package/skills/wix-headless/entry/skill.md +0 -78
- package/skills/wix-headless-kit/cold-start/bootstrap.mjs +0 -156
- package/skills/wix-headless-kit/cold-start/cold-start.md +0 -111
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +0 -423
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
# Blog — playbook
|
|
2
|
+
|
|
3
|
+
The blog machinery ships as files — post reads (feed paging with pinned-first order, slug lookup
|
|
4
|
+
with the body/SEO fieldsets, related posts, counters), author bylines, category/tag taxonomy, likes,
|
|
5
|
+
comments, the feed/post/comments state machines, and the Ricos body renderer, typed end-to-end.
|
|
6
|
+
**The presentation doesn't ship — you build it** on the shipped hooks/DTOs: the post card, the grid,
|
|
7
|
+
the blog index surface, the category and tag surfaces, the post page surface, the home page, and the
|
|
8
|
+
brand. You never write blog data logic; you never skip designing. Authoring stays in the dashboard;
|
|
9
|
+
visitors read, like, and comment.
|
|
10
|
+
|
|
11
|
+
## The file map (deployed into `src/`)
|
|
12
|
+
|
|
13
|
+
**On Astro and React the shipped files are tested and work as they are** — this table and the
|
|
14
|
+
contracts below are everything you need to use them, so don't spend the run reading their source;
|
|
15
|
+
wire them and build your surfaces. Reading them is the right move when something is off (a runtime
|
|
16
|
+
error, a field this playbook doesn't cover) or when the brief wants a behaviour they don't offer —
|
|
17
|
+
then read the file that owns it and change or extend it. On `lib`, `static`, and a port the
|
|
18
|
+
components don't deploy at all, and each wiring section below opens with the files to read before
|
|
19
|
+
writing their equivalents. Files you edit: `SiteLayout.astro`, `styles/global.css`, and the shipped
|
|
20
|
+
pages' templates. Files you **create**: your feed island (skeleton below), your post surface, and
|
|
21
|
+
your home page.
|
|
22
|
+
|
|
23
|
+
| file | what it is |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `wix/config.ts` · `wix/sdk.ts` | shared auth seam (deploy configures it — nothing to set by hand) |
|
|
26
|
+
| `wix/media.ts` · `wix/money.ts` | `imgAttrs(url, sizes, ratio)` — every `<img>` attribute for a DTO image (`src`, `srcSet`, `sizes`, lazy): `<img {...imgAttrs(post.coverUrl, "(min-width: 1024px) 33vw, 100vw", 9 / 16)} alt={post.coverAlt} />`; `imgSrc()` / `imgSrcSet()` underneath |
|
|
27
|
+
| `wix/blog/types.ts` | the DTOs (`PostSummary`, `PostDetail`, `BlogAuthor`, `PostMetrics`, `BlogCategory`, `BlogTag`, `PostPage`, `BlogComment`, `CommentPage`) — contracts inlined below |
|
|
28
|
+
| `wix/blog/posts.ts` | `fetchPosts` (cursor-paged, pinned first, category/tag filtered on Wix, authors joined), `fetchPostBySlug` (full body + SEO + comments fields), `fetchRelatedPosts`, `fetchPostsByIds`, `fetchPostMetrics`; the helpers `postMetaLine`, `relativeDateLabel`, `formatCount`, `postPath`, `categoryPath`, `tagPath` — the transport; the rules and DTO mappers are in `posts-core.ts` beside it (shared with the REST layer) |
|
|
29
|
+
| `wix/blog/taxonomy.ts` | `fetchBlogCategories({ withPosts? })`, `fetchBlogTags`, `fetchTagsByIds`, `fetchCategoryBySlug`, `fetchTagBySlug`, `inIdOrder` — the transport; mappers in `taxonomy-core.ts` |
|
|
30
|
+
| `wix/blog/authors.ts` | `fetchAuthorsByIds` (one batched Members read per page), `fetchCurrentMemberId` — over the SDK's authenticated fetch; mappers in `authors-core.ts` |
|
|
31
|
+
| `wix/blog/post-likes.ts` | `likePost`, `unlikePost`, `fetchLikeState` — the viewer's like, client-only |
|
|
32
|
+
| `wix/blog/comments.ts` | `fetchComments`, `fetchReplies`, `createComment`, `deleteComment` — the post's thread as the viewer; rules in `comments-core.ts` |
|
|
33
|
+
| `wix/blog/blog-feed-store.ts` · `post-store.ts` · `comments-store.ts` | the feed, post, and comments state machines, framework-free (`createBlogFeedStore()`, `createPostStore()`, `createCommentsStore()` — `getState`/`subscribe` + actions, one instance per surface); the hooks below bind them to React, every other stack uses them directly |
|
|
34
|
+
| `hooks/blog/useBlogFeed.ts` | React binding of `blog-feed-store.ts`: feed + taxonomy filter + load-more — contract below |
|
|
35
|
+
| `hooks/blog/usePost.ts` | React binding of `post-store.ts`: post by slug + resolved chips + related + like state — contract below |
|
|
36
|
+
| `hooks/blog/useComments.ts` | React binding of `comments-store.ts`: the thread, replies, create/delete — contract below |
|
|
37
|
+
| `components/blog/RichContent.tsx` | the post-body (and comment-body) renderer — **wire as-is** (machinery, not a reference) |
|
|
38
|
+
| `components/blog/BlogFeedView.tsx` (+ `PostCard`, `PostByline`) · `PostView.tsx` · `PostLikeButton.tsx` (+ `EngagementRow`) · `CommentsView.tsx` | **reference implementations** — correct, plain; build your own instead of shipping them |
|
|
39
|
+
| `styles/global.css` | **the design system**: Tailwind v4 + the `@theme` token block (shared across verticals). Everything, shipped and yours, styles from these tokens |
|
|
40
|
+
|
|
41
|
+
Astro stack additionally gets:
|
|
42
|
+
|
|
43
|
+
| file | what it is |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `layouts/SiteLayout.astro` | site chrome — **yours to brand** (keep the `seo-tags` slot + global.css import). `title`/`description` are optional: an item page whose `<SEO.Tags>` resolved passes neither (one source of head tags). If another vertical is also deployed, its layout won — add a Blog nav link there |
|
|
46
|
+
| `pages/blog.astro` | SSR feed — **keep the frontmatter**, swap the island import to YOUR component |
|
|
47
|
+
| `pages/blog/[...slug].astro` | SSR post page with owner-editable SEO — **keep the frontmatter, the `[...slug]` rest param, and the SEO pieces** (`wixMetadata`, `loadSEOTagsServiceConfig`, `<SEO.Tags>`) exactly; restyle the template. Chips in the post's order, tags read by id, related strip, the like row and the comments as `client:load` islands, the body island `client:only="react"` (the ricos viewer breaks under SSR). A slug that resolves to nothing returns a real 404 |
|
|
48
|
+
| `pages/blog/category/[slug].astro` | SSR category page (header: cover, label, description; the feed seeded with the category filter) with owner-editable SEO (`wixMetadata` on `categoryPageMetadata`, `BLOG_CATEGORY`) — same rules as the post page. Unknown slug → 404 |
|
|
49
|
+
| `pages/blog/tag/[slug].astro` | SSR tag page (header: label; the feed seeded with the tag filter). No SEO item type exists for tags — the layout's title is the label. Unknown slug → 404 |
|
|
50
|
+
|
|
51
|
+
## Routes
|
|
52
|
+
|
|
53
|
+
| path | page | notes |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| `/blog` | the feed | pinned first, newest first; category pills link to the category pages |
|
|
56
|
+
| `/blog/<slug>` | a post | `postPath(slug)` — a slug may contain `/`; the helper encodes per segment, the `[...slug]` param re-joins |
|
|
57
|
+
| `/blog/category/<slug>` | a category | `categoryPath(slug)`; 404 when the slug matches no category (Wix's own router answers 200 + empty feed; a headless page that exists for no category is a 404) |
|
|
58
|
+
| `/blog/tag/<slug>` | a tag | `tagPath(slug)`; 404 likewise; not in the sitemap (Wix lists no tag pages either) |
|
|
59
|
+
|
|
60
|
+
Never hand-build these — the three path helpers are the only source; `post.url` (the legacy blog's
|
|
61
|
+
page) is never used.
|
|
62
|
+
|
|
63
|
+
## What you build — the design job
|
|
64
|
+
|
|
65
|
+
1. **The post card + grid** — your tile (cover, title, excerpt, `postMetaLine(post)`, the byline and
|
|
66
|
+
counters when the DTO carries them) and rhythm, with skeletons while `posts === null`, an honest
|
|
67
|
+
empty state for `[]` when `error` is null, and a visibly different error state when it is not.
|
|
68
|
+
2. **The blog index surface** — the feed island on `useBlogFeed`: category row (only when >1
|
|
69
|
+
non-empty category; pills as links to the category pages, or client-side filters), the grid, and a
|
|
70
|
+
load-more control gated on `hasMore`.
|
|
71
|
+
3. **The category and tag surfaces** — the same island seeded with the filtered page, under a header
|
|
72
|
+
(category: cover, label, description; tag: label) — restyle the two shipped page templates.
|
|
73
|
+
4. **The post page surface** — header (categories eyebrow, title, byline + meta line, cover), the body
|
|
74
|
+
via the shipped `RichContent`, the engagement row (counters, like), the tag chips, the related strip,
|
|
75
|
+
and the comments thread — restyle the `[...slug].astro` template around it.
|
|
76
|
+
5. **The home page** — hero, latest posts (fetch in frontmatter → your components), brand story.
|
|
77
|
+
|
|
78
|
+
Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass).
|
|
79
|
+
Style everything with Tailwind utilities on the tokens. Dark theme: the ricos CSS hardcodes
|
|
80
|
+
near-black text — add a global override scoping `.ricos-content` to the foreground token
|
|
81
|
+
(in Astro use `<style is:global>`; React islands don't inherit scoped Astro styles).
|
|
82
|
+
|
|
83
|
+
### What a complete blog shows (recommended defaults)
|
|
84
|
+
|
|
85
|
+
Defaults for a blog whose brief says nothing about them; the prompt wins where it differs. Look at
|
|
86
|
+
the seeded content before designing (how many posts, categories, covers, body structure) and design
|
|
87
|
+
for this blog, not for a stereotype of one.
|
|
88
|
+
|
|
89
|
+
- **Home:** what the blog is about and the latest posts (real ones, under a truthful heading) in the
|
|
90
|
+
first screen; a category link goes to `categoryPath(slug)`, never to an anchor.
|
|
91
|
+
- **Index:** a real card — cover, title, meta line, byline — in the first screen at 390px too; the
|
|
92
|
+
category row only when more than one category has posts; loading, empty, and error states that look
|
|
93
|
+
different (the empty message only when `error` is null); load-more, never a raised page size.
|
|
94
|
+
- **Post page:** eyebrow, title, byline + meta line, cover as a bounded band on phones
|
|
95
|
+
(`max-h-[45vh]`), the body, the engagement row, the tags, the related strip, the comments; a slug
|
|
96
|
+
that resolves to nothing shows only the not-found state.
|
|
97
|
+
- **Copy:** render only what the DTO carries — a byline only with `authorName`, a counter only when
|
|
98
|
+
its number is defined, a comments section only when `commentingEnabled && referenceId`; no invented
|
|
99
|
+
authors, counts, or "trending" labels; no Wix IDs or technical words in visible text. A count that
|
|
100
|
+
is unknown renders nothing, never "0".
|
|
101
|
+
|
|
102
|
+
### The contracts your components consume
|
|
103
|
+
|
|
104
|
+
Tested and working as they are; read the source when something is off or the brief wants more.
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
// PostSummary (tiles) — display-ready:
|
|
108
|
+
// { id, slug, title, excerpt, dateLabel /* "Aug 26, 2026" | "" */, dateISO,
|
|
109
|
+
// minutesToRead /* 0 = unknown */, featured, pinned,
|
|
110
|
+
// coverUrl /* "" = no cover (or the author hid it); a video cover → its poster, an embed → its thumbnail */,
|
|
111
|
+
// coverAlt /* the author's alt text, else the title; "" with no cover */,
|
|
112
|
+
// categoryIds, tagIds,
|
|
113
|
+
// authorId, authorName /* "" = unresolved → no byline */, authorAvatarUrl /* "" = none */,
|
|
114
|
+
// viewCount?, likeCount?, commentCount? /* undefined = unknown → render nothing */ }
|
|
115
|
+
// postMetaLine(post) → "Aug 26, 2026 · 4 min read" (either half alone; "" when neither is known) —
|
|
116
|
+
// render it inside <time dateTime={post.dateISO}>; don't hand-assemble the separator.
|
|
117
|
+
// relativeDateLabel(post.dateISO, now?) → "3 days ago" under a week, "Aug 5" this year, "Aug 5, 2024"
|
|
118
|
+
// otherwise — pass the SAME `now` on the server and the client (put it in the island's props).
|
|
119
|
+
// formatCount(n) → "1.2K" (formatCount(n, "full") → "1,234"); "" for undefined.
|
|
120
|
+
// postPath(slug) · categoryPath(slug) · tagPath(slug) → the only hrefs (slugs may contain "/").
|
|
121
|
+
// PostDetail adds: richContent (Ricos JSON | null — render ONLY via RichContent),
|
|
122
|
+
// paragraphs (plain-text fallback body), updatedLabel/updatedISO ("" unless republished),
|
|
123
|
+
// seoTitle /* owner's override, else title */, seoDescription /* override → excerpt → body, 500 chars */,
|
|
124
|
+
// relatedPostIds, commentingEnabled, referenceId /* the comments thread; "" = none */.
|
|
125
|
+
// BlogAuthor: { id, name, avatarUrl }
|
|
126
|
+
// PostMetrics: { views?, likes?, comments? }
|
|
127
|
+
// BlogCategory: { id, slug, label, title /* SEO title, "" when unset */, description, postCount, coverUrl } // display .label
|
|
128
|
+
// BlogTag: { id, slug, label, postCount /* published posts */ }
|
|
129
|
+
// BlogComment: { id, topLevelId /* null = top-level */, parentId, parentAuthorName /* "replying to" */,
|
|
130
|
+
// authorId, authorName, authorAvatarUrl, isOwn /* the current member's → show delete */,
|
|
131
|
+
// dateLabel, dateISO, status /* PUBLISHED | PENDING (awaiting approval) | DELETED (placeholder) | HIDDEN */,
|
|
132
|
+
// content /* Ricos JSON | null → RichContent */, text /* plain text, for stacks without the viewer */, replyCount }
|
|
133
|
+
|
|
134
|
+
// useBlogFeed({ initialPage?, initialCategoryId?, initialTagId?, initialCategories?, initialTags?, pageSize? /* 20 */ }) →
|
|
135
|
+
// { posts: PostSummary[]|null /* null = loading → skeletons */,
|
|
136
|
+
// categories, tags,
|
|
137
|
+
// activeCategoryId, setActiveCategoryId(id|null), // server-side filter
|
|
138
|
+
// activeTagId, setActiveTagId(id|null), // mutually exclusive with category
|
|
139
|
+
// hasMore, loadMore(), loadingMore,
|
|
140
|
+
// error /* set → posts may be [] and that is NOT an empty blog: render the error, not the empty state */ }
|
|
141
|
+
// Filters and paging run on Wix (a changed filter restarts the list; a late response is dropped).
|
|
142
|
+
// A category/tag page seeds a FILTERED first page: pass initialCategoryId/initialTagId with initialPage.
|
|
143
|
+
|
|
144
|
+
// usePost({ slug, initialPost?, initialCategories?, initialTags?, initialRelated?, engagement? /* true */ }) →
|
|
145
|
+
// { post: PostDetail|null, notFound /* true = render a 404 state, never invent a post */,
|
|
146
|
+
// categories, tags /* THIS post's, in ITS order, resolved — display .label */,
|
|
147
|
+
// related: PostSummary[]|null /* curated, else same-category recents; max 3 */,
|
|
148
|
+
// isLiked, likeCount /* fresh count + this viewer's change; undefined = unknown */, likeCountLoaded,
|
|
149
|
+
// viewCount, commentCount, liking, toggleLike() /* optimistic, rolls back */, error }
|
|
150
|
+
// The like state is personal and read in the browser only; on the server it stays false/unloaded.
|
|
151
|
+
|
|
152
|
+
// useComments({ referenceId, pageSize? /* 10 */, sort? /* "NEWEST_FIRST" */ }) →
|
|
153
|
+
// { comments: BlogComment[]|null /* top-level; null = loading */,
|
|
154
|
+
// replies: { [topLevelId]: { comments, nextCursor, loading } } /* replies load on demand */,
|
|
155
|
+
// hasMore, loadMore(), loadingMore, loadReplies(topLevelId),
|
|
156
|
+
// sort, setSort("NEWEST_FIRST" | "OLDEST_FIRST"),
|
|
157
|
+
// create(text, { parentId?, topLevelId? }) → BlogComment|null, remove(id),
|
|
158
|
+
// saving, needsSignIn /* the server refused this identity → "sign in to comment" */,
|
|
159
|
+
// currentMemberId, error }
|
|
160
|
+
// Mount only when post.commentingEnabled && post.referenceId. Replies to replies keep parentId
|
|
161
|
+
// (render "replying to parentAuthorName") but sit in their top-level comment's thread (two levels).
|
|
162
|
+
|
|
163
|
+
// <RichContent content={post.richContent} fallbackParagraphs={post.paragraphs} />
|
|
164
|
+
// — the ONLY post-body render path; comments render their plain `text` (no viewer: their island is SSR'd). In Astro: client:only="react".
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### The island you create — skeleton
|
|
168
|
+
|
|
169
|
+
The Astro pages ship; their frontmatter is machinery (SSR fetch → DTO props → island; the item
|
|
170
|
+
pages' SEO blocks) and stays as shipped. What you create is the feed island `blog.astro` and the
|
|
171
|
+
category/tag pages mount (and, in a SPA, the post surface — `PostView.tsx` shows its shape). Hooks
|
|
172
|
+
first, branches after (an early return above a hook changes hook order and React throws). Islands
|
|
173
|
+
render on the server too, after the 200 is sent — nothing in a render path may throw.
|
|
174
|
+
|
|
175
|
+
```tsx
|
|
176
|
+
// src/components/blog/<YourFeed>.tsx — YOU build it; blog.astro and the category/tag pages mount it.
|
|
177
|
+
import { useBlogFeed } from "../../hooks/blog/useBlogFeed";
|
|
178
|
+
import { categoryPath, formatCount, postMetaLine, postPath } from "../../wix/blog/posts";
|
|
179
|
+
import { imgAttrs } from "../../wix/media";
|
|
180
|
+
import type { BlogCategory, BlogTag, PostPage } from "../../wix/blog/types";
|
|
181
|
+
|
|
182
|
+
export default function YourFeed(props: {
|
|
183
|
+
initialPage?: PostPage; // SSR props — pass straight to useBlogFeed; omitted in a SPA
|
|
184
|
+
initialCategoryId?: string | null; // the filter initialPage was fetched with (category page)
|
|
185
|
+
initialTagId?: string | null; // (tag page)
|
|
186
|
+
initialCategories?: BlogCategory[];
|
|
187
|
+
initialTags?: BlogTag[];
|
|
188
|
+
}) {
|
|
189
|
+
const feed = useBlogFeed(props);
|
|
190
|
+
const { posts, categories, activeCategoryId, hasMore, loadMore, loadingMore, error } = feed;
|
|
191
|
+
// …you implement the render:
|
|
192
|
+
// • a category row when more than one category has posts (categories.filter(c => c.postCount > 0)):
|
|
193
|
+
// "All" (href "/blog") first, then <a href={categoryPath(c.slug)}> per category, the active one
|
|
194
|
+
// marked by activeCategoryId (or buttons calling setActiveCategoryId for client-side filtering)
|
|
195
|
+
// • error → a short inline message; the empty state ONLY when !error
|
|
196
|
+
// • posts === null → skeleton tiles; [] → your honest empty state
|
|
197
|
+
// • else YOUR grid of YOUR tiles: cover via
|
|
198
|
+
// <img {...imgAttrs(p.coverUrl, "(min-width: 1024px) 33vw, 100vw", 9 / 16)} alt={p.coverAlt} /> — {} when
|
|
199
|
+
// there is no cover, render your placeholder then; title WRAPS (no truncate); excerpt clamped;
|
|
200
|
+
// <time dateTime={p.dateISO}>{postMetaLine(p)}</time>; byline only when p.authorName; counters only
|
|
201
|
+
// when defined (`${formatCount(p.viewCount)} views`); the tile links to postPath(p.slug)
|
|
202
|
+
// • hasMore → your "load more" control calling loadMore() (disabled while loadingMore)
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### The reference files for stacks where the components don't deploy
|
|
207
|
+
|
|
208
|
+
On `lib`, `static`, and a port, nothing under `components/` or `hooks/` arrives. The state
|
|
209
|
+
machines behind the hooks do arrive — `wix/blog/blog-feed-store.ts`, `post-store.ts`,
|
|
210
|
+
`comments-store.ts` — so you never rewrite them: create a store per surface, `subscribe`, render
|
|
211
|
+
from `getState()`, call its actions. Their `*State` interfaces are the render contract; read those.
|
|
212
|
+
What you write is the rendering — card, grid, filter row, post header, comment list — and for that
|
|
213
|
+
read these first; they are tested code for exactly that behaviour:
|
|
214
|
+
|
|
215
|
+
1. `components/blog/BlogFeedView.tsx` — the filter row (only categories with posts, "All" first,
|
|
216
|
+
one active pill, pills as links or buttons), the skeleton grid while `posts === null`, the empty
|
|
217
|
+
state only without an error, load-more disabled while loading; `PostCard` inside it is the tile:
|
|
218
|
+
16:9 cover with the DTO's alt, wrapping title, clamped excerpt, the meta line in a `<time>`, the
|
|
219
|
+
byline/counters only when present.
|
|
220
|
+
2. `components/blog/PostView.tsx` — the states in order (not found → error → loading → article),
|
|
221
|
+
the categories eyebrow by `.label` in the post's order, the byline, the engagement row, the tag
|
|
222
|
+
chips, the related strip, the comments gate.
|
|
223
|
+
3. `components/blog/PostLikeButton.tsx` — the like control: `aria-pressed`, disabled while `liking`,
|
|
224
|
+
a skeleton for the count until `likeCountLoaded`, counters only when defined.
|
|
225
|
+
4. `components/blog/CommentsView.tsx` — the thread: two levels, "replying to", PENDING badge,
|
|
226
|
+
DELETED placeholder, delete on `isOwn`, "Show N replies" on the seam, the sign-in prompt on
|
|
227
|
+
`needsSignIn`, the form disabled while `saving`.
|
|
228
|
+
5. `components/blog/RichContent.tsx` — what the body renderer is: the `@wix/ricos` viewer, a React
|
|
229
|
+
component that needs a bundler. On these stacks it doesn't run; the body renders from
|
|
230
|
+
`post.paragraphs` (one `<p>` per entry) and a comment from `comment.text`, and headings, lists,
|
|
231
|
+
quotes, and inline images flatten to text — say so in the closing message. A blog whose posts
|
|
232
|
+
carry structure stays on Astro.
|
|
233
|
+
|
|
234
|
+
All under `templates/blog/app/`.
|
|
235
|
+
|
|
236
|
+
### Wiring — Astro (default)
|
|
237
|
+
|
|
238
|
+
1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass — merge into the
|
|
239
|
+
other vertical's layout instead if both are deployed).
|
|
240
|
+
2. Write your feed island under `src/components/blog/` (a new name — don't overwrite the
|
|
241
|
+
references), swap the island import in `pages/blog.astro`, `pages/blog/category/[slug].astro`,
|
|
242
|
+
and `pages/blog/tag/[slug].astro`, and restyle the `pages/blog/[...slug].astro` template (keep its
|
|
243
|
+
frontmatter + SEO pieces + the `client:only="react"` RichContent island; the like row and
|
|
244
|
+
comments stay `client:load` islands — they read as the viewer). **Author your surfaces in as few
|
|
245
|
+
messages as possible** — batch multiple Writes per message.
|
|
246
|
+
3. Write `pages/index.astro` (home) — it exists from the scaffold; Read it before overwriting.
|
|
247
|
+
|
|
248
|
+
### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
|
|
249
|
+
|
|
250
|
+
Read the reference files listed above before writing any surface.
|
|
251
|
+
|
|
252
|
+
`deploy.mjs blog --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts` (the
|
|
253
|
+
visitor client, configured with the public client id), `media.ts`, `money.ts`, and `wix/blog/` —
|
|
254
|
+
`posts.ts`, `taxonomy.ts`, `authors.ts`, `post-likes.ts`, `comments.ts`, `types.ts`, the `*-core.ts`
|
|
255
|
+
rules, and the three stores `blog-feed-store.ts`, `post-store.ts`, `comments-store.ts`. None of it is
|
|
256
|
+
React. The hooks and components don't ship on this stack; the stores replace the hooks, and you write
|
|
257
|
+
the components in your framework to the contracts on this page:
|
|
258
|
+
|
|
259
|
+
- bind the stores with your framework's external-store primitive (Vue: `shallowRef` updated in
|
|
260
|
+
`subscribe`; Svelte: `readable(store.getState(), (set) => store.subscribe(() => set(store.getState())))`;
|
|
261
|
+
Solid: a signal set in `subscribe`). `createBlogFeedStore(options)` per feed (`start()` when
|
|
262
|
+
mounted, `stop()` when unmounted), `createPostStore({ slug, initialPost? })` per post surface,
|
|
263
|
+
`createCommentsStore({ referenceId })` per thread (only when `commentingEnabled && referenceId`).
|
|
264
|
+
State in, actions out — exactly the hooks' contracts above;
|
|
265
|
+
- the body: `@wix/ricos` is a React component — without React it doesn't render; use
|
|
266
|
+
`post.paragraphs` (and `comment.text`) and say so in the closing message.
|
|
267
|
+
|
|
268
|
+
Routes `/blog`, `/blog/:slug` (null → your 404 view), `/blog/category/:slug`, `/blog/tag/:slug`
|
|
269
|
+
(`fetchCategoryBySlug`/`fetchTagBySlug` → `createBlogFeedStore({ initialCategoryId })` or a plain
|
|
270
|
+
`setActiveCategoryId`); dev server on 4321; a static build goes through `npx @wix/cli@latest release`
|
|
271
|
+
with `site.outputDirectory` pointing at the build folder, an SSR build is hosted by you. Post-page
|
|
272
|
+
tags from `post.seoTitle` and `post.seoDescription`.
|
|
273
|
+
|
|
274
|
+
### Wiring — static site (`--stack static`, no bundler)
|
|
275
|
+
|
|
276
|
+
Read the reference files listed above before writing any surface.
|
|
277
|
+
|
|
278
|
+
`deploy.mjs blog --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM,
|
|
279
|
+
the `.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` —
|
|
280
|
+
pages, styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project
|
|
281
|
+
root (config, plan, seed output) is never the upload. Same function names and DTOs as the table
|
|
282
|
+
above, so the contracts on this page hold unchanged: `fetchPosts`, `fetchPostBySlug`,
|
|
283
|
+
`fetchRelatedPosts`, `postMetaLine`, `postPath`, `categoryPath`, `tagPath`, `formatCount` from
|
|
284
|
+
`./js/wix/posts.js`; `fetchBlogCategories`, `fetchBlogTags`, `fetchTagsByIds`, `fetchCategoryBySlug`,
|
|
285
|
+
`fetchTagBySlug` from `./js/wix/taxonomy.js`; `likePost`/`unlikePost`/`fetchLikeState` from
|
|
286
|
+
`./js/wix/post-likes.js`; the comments from `./js/wix/comments.js`; `imgAttrs` from
|
|
287
|
+
`./js/wix/media.js`. The state machines ship too: `createBlogFeedStore` from
|
|
288
|
+
`./js/wix/blog-feed-store.js` (the feed — filters, cursor paging; `start()` once the page is up),
|
|
289
|
+
`createPostStore` from `./js/wix/post-store.js` (the post, its resolved chips, related, the like
|
|
290
|
+
toggle), and `createCommentsStore` from `./js/wix/comments-store.js`. No components ship — you write
|
|
291
|
+
the rendering in plain JS: one render function per surface that reads `getState()`, called from
|
|
292
|
+
`subscribe`, with the surface's controls calling the store's actions. Pages are `blog.html`,
|
|
293
|
+
`post.html?slug=…`, `category.html?slug=…`, `tag.html?slug=…` (Wix static hosting serves files, not
|
|
294
|
+
directories — name the file and link to it; on this stack pass your own `postHref`-style helpers to
|
|
295
|
+
your renderers, the path helpers describe the Astro routes). The body renders from
|
|
296
|
+
`post.paragraphs` and a comment from `comment.text` (no Ricos viewer without a bundler — see the
|
|
297
|
+
reference files note). Set `document.title` and the meta description from `post.seoTitle` and
|
|
298
|
+
`post.seoDescription` once the post loads, as the Astro page does. The visitor token persists in
|
|
299
|
+
`localStorage` on its own; never mint per page. `npx @wix/cli@latest release` uploads `site/`.
|
|
300
|
+
|
|
301
|
+
### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
|
|
302
|
+
|
|
303
|
+
Read the reference files listed above before writing any surface.
|
|
304
|
+
|
|
305
|
+
Run `deploy.mjs blog --stack static` in the project folder anyway: `js/wix/` is both the
|
|
306
|
+
browser-side code and the readable spec. Reads render on the server: port `js/wix/posts.ts`,
|
|
307
|
+
`taxonomy.ts`, `authors.ts` and their `*-core.ts` to your language — the same functions returning
|
|
308
|
+
the same DTO shapes as dicts, one anonymous visitor token per process for these public reads (mint
|
|
309
|
+
and refresh per `client.ts`) — and render the feed, the category/tag pages, and the post page in your
|
|
310
|
+
templates to the contracts above, so titles and excerpts are in the HTML; post-page tags from
|
|
311
|
+
`post.seoTitle` and `post.seoDescription`. The body is `paragraphs` server-side too (the Ricos
|
|
312
|
+
viewer is React). Likes and comments run on the visitor's behalf — they are browser-side only, on
|
|
313
|
+
`./js/wix/post-store.js` and `./js/wix/comments-store.js` exactly as the static wiring above (never
|
|
314
|
+
through the process-wide token: a like or a comment would be attributed to it). The feed's category
|
|
315
|
+
filter and load-more can run client-side on `./js/wix/blog-feed-store.js` the same way, or as plain
|
|
316
|
+
server routes (`/blog/category/<slug>` via `fetchCategoryBySlug`, paging by cursor). Routes stay
|
|
317
|
+
`/blog`, `/blog/<slug>`, `/blog/category/<slug>`, `/blog/tag/<slug>`.
|
|
318
|
+
|
|
319
|
+
**Pre-rendered (Frozen-Flask, Pelican, any static-site generator) → Wix-hosted.** Same port for
|
|
320
|
+
the reads, run at build time with one anonymous token; the generator must emit a page for every
|
|
321
|
+
post and every category — walk `fetchPosts` by `nextCursor` until it is null, never only the first
|
|
322
|
+
page. Run `deploy.mjs blog --stack static --out <build dir>` so `js/wix/` is inside the output the
|
|
323
|
+
pages import from, point `site.outputDirectory` at that folder, `wix release`. Pages sit at
|
|
324
|
+
different depths (`/`, `/blog/…`): give the templates one base path to `js/wix/` (a template
|
|
325
|
+
variable, or root-relative `/js/wix/…`), never a relative `./js/wix/`. The frozen grid is the first
|
|
326
|
+
paint; the category filter, load-more, likes, and comments still run client-side on the stores
|
|
327
|
+
from `./js/wix/`. Close with the live URL, the rebuild + release command, and one line for the owner:
|
|
328
|
+
posts published in the dashboard reach the site when that command runs.
|
|
329
|
+
|
|
330
|
+
### Wiring — React SPA (Vite etc.)
|
|
331
|
+
|
|
332
|
+
Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite
|
|
333
|
+
plugins — deploy added the dep). Routes: `/blog` → your feed on `useBlogFeed`;
|
|
334
|
+
`/blog/category/:slug` and `/blog/tag/:slug` → the same feed with `initialCategoryId`/`initialTagId`
|
|
335
|
+
(resolve the slug with `fetchCategoryBySlug`/`fetchTagBySlug`); `/blog/:slug` → your post surface on
|
|
336
|
+
`usePost({ slug })` (the `PostView` reference shows the shape; `notFound` → your 404 view). Deploy
|
|
337
|
+
wrote the public client id into `wix/config.ts`; nothing else to configure.
|
|
338
|
+
|
|
339
|
+
Routes on Wix hosting: the host serves files only, so a clean route answers 404 when loaded directly — hash routes, or one HTML file per route, decided before the first route is written; any URL handed to Wix as a return target must be one the host serves (SKILL.md step 1).
|
|
340
|
+
|
|
341
|
+
## Likes, views, comments — what the shipped layer can and cannot do
|
|
342
|
+
|
|
343
|
+
- **Likes** run as the current identity (a member, or the anonymous visitor the token stands for):
|
|
344
|
+
optimistic toggle, rolled back on failure, in the browser only. The count shown is the fresh
|
|
345
|
+
metrics read (else the card's) plus this viewer's change.
|
|
346
|
+
- **View counting is not shipped**: `@wix/blog` in this template (1.0.645) has no `viewPost`; the
|
|
347
|
+
installed SDK has to expose it before a page can count a view. Views still display from METRICS.
|
|
348
|
+
- **Comments** address the thread by `referenceId` as both contextId and resourceId, with the Blog
|
|
349
|
+
app id — the public-SDK shape Wix's own headless blog uses. Verified live: the REFERENCE_ID
|
|
350
|
+
fieldset returns the post without that field, the INTERNAL_ID fieldset carries it, and it equalled
|
|
351
|
+
the post id on every post read — so the detail read asks for both and `posts-core.ts` falls back
|
|
352
|
+
to the post id (what Wix's classic Blog widget addresses the thread by). A post page that shows no
|
|
353
|
+
comments section therefore means `commentingEnabled` is off, not a missing id.
|
|
354
|
+
- Who may comment (members only, or guests too) is the dashboard's "Who can comment" setting,
|
|
355
|
+
decided by the server: submit as the current session; a refusal sets `needsSignIn`. Comments may
|
|
356
|
+
come back PENDING when the owner moderates — show "awaiting approval", never drop them.
|
|
357
|
+
- The site-wide comments master switch (Blog settings) has no public read: a post says
|
|
358
|
+
`commentingEnabled` even when the owner turned comments off for the whole blog. Say so in the
|
|
359
|
+
closing message when you ship comments.
|
|
360
|
+
- Members and comments go over the SDK's authenticated fetch (`wixFetch`) with literal REST paths —
|
|
361
|
+
the template does not depend on `@wix/members` or `@wix/comments`; the REST twins use the same paths.
|
|
362
|
+
|
|
363
|
+
## Hard rules
|
|
364
|
+
|
|
365
|
+
- **The body renders only through `RichContent`** where it deploys (Astro, React) — a post body
|
|
366
|
+
is a Ricos document, not HTML and not text: never `set:html`/innerHTML it, never stringify its
|
|
367
|
+
nodes, never write your own node walker. Where it doesn't deploy, `paragraphs` is the honest
|
|
368
|
+
body, and the closing message says so.
|
|
369
|
+
- **Data logic only through the shipped exports** — never rewrite their internals or re-derive a
|
|
370
|
+
request shape; extend by adding a function in `wix/blog/` (API contracts: the `wix-docs` skill).
|
|
371
|
+
- **Route by `slug` through the shipped path helpers** — `postPath`, `categoryPath`, `tagPath`;
|
|
372
|
+
never hand-build a post/category/tag URL from ids or from `post.url`; display taxonomy by `.label`
|
|
373
|
+
(the API has no `.name`).
|
|
374
|
+
- **`notFound` means not found** — render your 404 state; never invent a post. Only published
|
|
375
|
+
posts come back, so a "missing" post is usually an unseeded/unpublished one.
|
|
376
|
+
- **Filter and page at the source** — `useBlogFeed`'s filters and `fetchPosts` run on Wix before
|
|
377
|
+
cursor paging; never filter a loaded page client-side, never raise the page limit instead of
|
|
378
|
+
paging (`hasMore`/`loadMore`).
|
|
379
|
+
- **Never hand-build a wixstatic image URL** — `coverUrl` and `authorAvatarUrl` are already
|
|
380
|
+
resolved; anything else goes through `wix/media.ts`.
|
|
381
|
+
- **Error is not empty** — render the empty state only when `error` is null; a failed read shows the
|
|
382
|
+
error state.
|
|
383
|
+
- Where the shipped components deploy: theme via the `@theme` tokens, your markup in Tailwind
|
|
384
|
+
utilities on the same tokens; no parallel theme files, no hardcoded palettes. Where they don't
|
|
385
|
+
(`lib`, `static`, a port): style with what your stack does well, on one token set of your own.
|
|
386
|
+
- Live data or an honest empty state — never mock posts, authors, dates, counts, or read times; no
|
|
387
|
+
stock placeholder covers. **Render only what the DTO carries**: a byline needs `authorName`, a
|
|
388
|
+
counter needs a defined number, a like control needs the post, a comments section needs
|
|
389
|
+
`commentingEnabled && referenceId`.
|
|
390
|
+
- Keep the post and category pages' SEO pieces and the `[...slug]` rest param exactly as shipped;
|
|
391
|
+
an item page whose `<SEO.Tags>` resolved passes no title/description to the layout.
|
|
392
|
+
- Likes and comments are the viewer's — client-side only, never during SSR or through a shared
|
|
393
|
+
server token.
|
|
394
|
+
- **Call every hook before any conditional return.** Hooks first, branches after.
|
|
395
|
+
|
|
396
|
+
## Point the user to their dashboard
|
|
397
|
+
|
|
398
|
+
Hand the owner these links — `{siteId}` is `siteId` in `wix.config.json` (the deploy JSON prints it as
|
|
399
|
+
`dashboardUrl`).
|
|
400
|
+
|
|
401
|
+
| page | `https://manage.wix.com/dashboard/{siteId}/` + |
|
|
402
|
+
|---|---|
|
|
403
|
+
| Posts (published and drafts) | `blog/posts` |
|
|
404
|
+
| Categories | `blog/categories` |
|
|
405
|
+
| Tags | `blog/tags` |
|
|
406
|
+
| Writers | `blog/writers` |
|
|
407
|
+
| Comments | `blog/comments` |
|
|
408
|
+
| Blog settings | `blog/settings` |
|
|
409
|
+
|
|
410
|
+
Only published posts appear on the site. Pinned posts lead the feed; a post's related posts, cover
|
|
411
|
+
visibility, alt text, SEO title/description, and per-post comments switch are set on the post.
|
|
412
|
+
|
|
413
|
+
## Seeding
|
|
414
|
+
|
|
415
|
+
Per `seed/SEED.md` — plain-data `plan.json` into `seed-blog.mjs` from the project root.
|
|
416
|
+
Seed posts that exercise the UI (~3 posts, 2 categories when the brief has sections, varied
|
|
417
|
+
content blocks, a cover image per post). Authors resolve to the site owner's member profile — set a
|
|
418
|
+
nickname and photo in the dashboard for a real byline.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// REFERENCE feed surface: taxonomy filter chips + post grid + load-more on the @theme tokens.
|
|
2
|
+
// Correct and complete; per the skill's model you design and build your own on useBlogFeed.
|
|
3
|
+
// What it gets right that yours must too: the empty state renders only when there is NO error; a
|
|
4
|
+
// byline, a counter, or a cover appears only when the DTO carries one; hrefs come from the path
|
|
5
|
+
// helpers (slugs may contain "/"); the cover's alt is the DTO's.
|
|
6
|
+
import type { ComponentType, ReactNode } from "react";
|
|
7
|
+
import { useBlogFeed } from "../../hooks/blog/useBlogFeed";
|
|
8
|
+
import { formatCount, postMetaLine, postPath } from "../../wix/blog/posts";
|
|
9
|
+
import type { BlogCategory, BlogTag, PostPage, PostSummary } from "../../wix/blog/types";
|
|
10
|
+
|
|
11
|
+
export interface LinkLikeProps {
|
|
12
|
+
href: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
"aria-current"?: "page";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const PlainLink = ({ href, className, children, ...rest }: LinkLikeProps) => (
|
|
19
|
+
<a href={href} className={className} {...rest}>
|
|
20
|
+
{children}
|
|
21
|
+
</a>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export interface PostCardProps {
|
|
25
|
+
post: PostSummary;
|
|
26
|
+
postHref?: (slug: string) => string;
|
|
27
|
+
LinkComponent?: ComponentType<LinkLikeProps>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** "By <author> · 1.2K views · 3 comments" — only the parts the post carries. */
|
|
31
|
+
export function PostByline({ post }: { post: PostSummary }) {
|
|
32
|
+
const parts = [
|
|
33
|
+
post.authorName,
|
|
34
|
+
post.viewCount !== undefined ? `${formatCount(post.viewCount)} views` : "",
|
|
35
|
+
post.commentCount !== undefined ? `${formatCount(post.commentCount)} comments` : "",
|
|
36
|
+
post.likeCount !== undefined ? `${formatCount(post.likeCount)} likes` : "",
|
|
37
|
+
].filter(Boolean);
|
|
38
|
+
if (!parts.length) return null;
|
|
39
|
+
return (
|
|
40
|
+
<p className="mt-2 flex items-center gap-2 text-xs text-muted-foreground">
|
|
41
|
+
{post.authorAvatarUrl && <img src={post.authorAvatarUrl} alt="" width={20} height={20} loading="lazy" className="h-5 w-5 rounded-full object-cover" />}
|
|
42
|
+
<span>{parts.join(" · ")}</span>
|
|
43
|
+
</p>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function PostCard({ post, postHref = postPath, LinkComponent = PlainLink }: PostCardProps) {
|
|
48
|
+
return (
|
|
49
|
+
<LinkComponent href={postHref(post.slug)} className="group block no-underline">
|
|
50
|
+
{post.coverUrl && (
|
|
51
|
+
<div className="aspect-[16/9] overflow-hidden rounded-lg bg-secondary">
|
|
52
|
+
<img
|
|
53
|
+
src={post.coverUrl}
|
|
54
|
+
alt={post.coverAlt}
|
|
55
|
+
loading="lazy"
|
|
56
|
+
className="h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.03]"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
<h3 className="mt-3 text-base font-semibold leading-snug text-foreground">{post.title}</h3>
|
|
61
|
+
{post.excerpt && <p className="mt-1 line-clamp-2 text-sm text-muted-foreground">{post.excerpt}</p>}
|
|
62
|
+
<p className="mt-2 text-xs text-muted-foreground">
|
|
63
|
+
<time dateTime={post.dateISO}>{postMetaLine(post)}</time>
|
|
64
|
+
</p>
|
|
65
|
+
<PostByline post={post} />
|
|
66
|
+
</LinkComponent>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface BlogFeedViewProps {
|
|
71
|
+
initialPage?: PostPage;
|
|
72
|
+
/** The filter `initialPage` was fetched with (a category/tag page). */
|
|
73
|
+
initialCategoryId?: string | null;
|
|
74
|
+
initialTagId?: string | null;
|
|
75
|
+
initialCategories?: BlogCategory[];
|
|
76
|
+
initialTags?: BlogTag[];
|
|
77
|
+
emptyMessage?: string;
|
|
78
|
+
postHref?: PostCardProps["postHref"];
|
|
79
|
+
/**
|
|
80
|
+
* When given, category pills are LINKS to category pages (and "All" to `allHref`) instead of
|
|
81
|
+
* client-side filters — the choice for a site with category pages, so every filter has a URL.
|
|
82
|
+
*/
|
|
83
|
+
categoryHref?: (slug: string) => string;
|
|
84
|
+
allHref?: string;
|
|
85
|
+
LinkComponent?: ComponentType<LinkLikeProps>;
|
|
86
|
+
CardComponent?: ComponentType<PostCardProps>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const pill = (active: boolean) =>
|
|
90
|
+
`rounded-control border px-4 py-1.5 text-sm font-medium no-underline transition-colors ${
|
|
91
|
+
active
|
|
92
|
+
? "border-primary bg-primary text-primary-foreground"
|
|
93
|
+
: "border-border text-foreground hover:bg-secondary"
|
|
94
|
+
}`;
|
|
95
|
+
|
|
96
|
+
export default function BlogFeedView({
|
|
97
|
+
initialPage,
|
|
98
|
+
initialCategoryId,
|
|
99
|
+
initialTagId,
|
|
100
|
+
initialCategories,
|
|
101
|
+
initialTags,
|
|
102
|
+
emptyMessage = "No posts yet — check back soon.",
|
|
103
|
+
postHref,
|
|
104
|
+
categoryHref,
|
|
105
|
+
allHref = "/blog",
|
|
106
|
+
LinkComponent = PlainLink,
|
|
107
|
+
CardComponent = PostCard,
|
|
108
|
+
}: BlogFeedViewProps) {
|
|
109
|
+
const {
|
|
110
|
+
posts,
|
|
111
|
+
categories,
|
|
112
|
+
activeCategoryId,
|
|
113
|
+
setActiveCategoryId,
|
|
114
|
+
hasMore,
|
|
115
|
+
loadMore,
|
|
116
|
+
loadingMore,
|
|
117
|
+
error,
|
|
118
|
+
} = useBlogFeed({ initialPage, initialCategoryId, initialTagId, initialCategories, initialTags });
|
|
119
|
+
|
|
120
|
+
const visibleCategories = categories.filter((c) => c.postCount > 0);
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<div>
|
|
124
|
+
{visibleCategories.length > 1 && (
|
|
125
|
+
<div className="mb-8 flex flex-wrap gap-2" role="group" aria-label="Categories">
|
|
126
|
+
{categoryHref ? (
|
|
127
|
+
<>
|
|
128
|
+
<LinkComponent href={allHref} className={pill(activeCategoryId === null)} aria-current={activeCategoryId === null ? "page" : undefined}>
|
|
129
|
+
All
|
|
130
|
+
</LinkComponent>
|
|
131
|
+
{visibleCategories.map((c) => (
|
|
132
|
+
<LinkComponent key={c.id} href={categoryHref(c.slug)} className={pill(activeCategoryId === c.id)} aria-current={activeCategoryId === c.id ? "page" : undefined}>
|
|
133
|
+
{c.label}
|
|
134
|
+
</LinkComponent>
|
|
135
|
+
))}
|
|
136
|
+
</>
|
|
137
|
+
) : (
|
|
138
|
+
<>
|
|
139
|
+
<button type="button" className={pill(activeCategoryId === null)} onClick={() => setActiveCategoryId(null)}>
|
|
140
|
+
All
|
|
141
|
+
</button>
|
|
142
|
+
{visibleCategories.map((c) => (
|
|
143
|
+
<button key={c.id} type="button" className={pill(activeCategoryId === c.id)} onClick={() => setActiveCategoryId(c.id)}>
|
|
144
|
+
{c.label}
|
|
145
|
+
</button>
|
|
146
|
+
))}
|
|
147
|
+
</>
|
|
148
|
+
)}
|
|
149
|
+
</div>
|
|
150
|
+
)}
|
|
151
|
+
{error && (
|
|
152
|
+
<p className="py-16 text-center text-sm text-destructive" role="alert">
|
|
153
|
+
The posts could not be loaded. {error}
|
|
154
|
+
</p>
|
|
155
|
+
)}
|
|
156
|
+
{posts === null ? (
|
|
157
|
+
<div className="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3" aria-busy="true">
|
|
158
|
+
{Array.from({ length: 6 }, (_, i) => (
|
|
159
|
+
<div key={i}>
|
|
160
|
+
<div className="aspect-[16/9] animate-pulse rounded-lg bg-secondary" />
|
|
161
|
+
<div className="mt-3 h-3.5 w-2/3 animate-pulse rounded bg-secondary" />
|
|
162
|
+
</div>
|
|
163
|
+
))}
|
|
164
|
+
</div>
|
|
165
|
+
) : posts.length === 0 ? (
|
|
166
|
+
// An empty list over a failed read is not an empty blog — the error above is the state then.
|
|
167
|
+
!error && <p className="py-16 text-center text-muted-foreground">{emptyMessage}</p>
|
|
168
|
+
) : (
|
|
169
|
+
<>
|
|
170
|
+
<div className="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">
|
|
171
|
+
{posts.map((p) => (
|
|
172
|
+
<CardComponent key={p.id} post={p} postHref={postHref} LinkComponent={LinkComponent} />
|
|
173
|
+
))}
|
|
174
|
+
</div>
|
|
175
|
+
{hasMore && (
|
|
176
|
+
<div className="mt-10 text-center">
|
|
177
|
+
<button
|
|
178
|
+
type="button"
|
|
179
|
+
onClick={loadMore}
|
|
180
|
+
disabled={loadingMore}
|
|
181
|
+
className="rounded-lg border border-border px-6 py-2.5 text-sm font-medium text-foreground transition-colors hover:bg-secondary disabled:opacity-50"
|
|
182
|
+
>
|
|
183
|
+
{loadingMore ? "Loading…" : "Load more"}
|
|
184
|
+
</button>
|
|
185
|
+
</div>
|
|
186
|
+
)}
|
|
187
|
+
</>
|
|
188
|
+
)}
|
|
189
|
+
</div>
|
|
190
|
+
);
|
|
191
|
+
}
|