@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,250 @@
|
|
|
1
|
+
// Donations seed — a BUILD-TIME script, never shipped in the app. Run from the project root
|
|
2
|
+
// (where wix.config.json lives) with a plan file:
|
|
3
|
+
//
|
|
4
|
+
// node <SKILL_ROOT>/templates/donations/seed/seed-donations.mjs plan.json
|
|
5
|
+
//
|
|
6
|
+
// It mints its own site token via the Wix CLI, sets the site currency when the plan names one,
|
|
7
|
+
// installs the eCom platform and the Wix Donations app if needed, creates the campaigns (one create
|
|
8
|
+
// call per campaign), verifies each is readable, then imports and attaches cover images in a second
|
|
9
|
+
// pass. Prints a JSON result to stdout.
|
|
10
|
+
//
|
|
11
|
+
// Plan shape (see SEED.md):
|
|
12
|
+
// { "currency"?: "USD",
|
|
13
|
+
// "campaigns": [{ "name" (1-65 chars),
|
|
14
|
+
// "frequencies"?: ["ONE_TIME"|"WEEK"|"MONTH"|"YEAR"] (1-4, default ["ONE_TIME"]),
|
|
15
|
+
// "presets"?: [{ "amount" (decimal string), "impact"? (≤200 chars) }] (≤20),
|
|
16
|
+
// "customAmount"?: { "enabled", "min"?, "max"? },
|
|
17
|
+
// "goal"?: { "target", "endDate"?, "acceptAfterGoal"?, "acceptAfterEndDate"? },
|
|
18
|
+
// "comments"?: false, "askCoverFee"?: false,
|
|
19
|
+
// "imageUrl"? | "imagePath"? | "imagePrompt"? }] }
|
|
20
|
+
//
|
|
21
|
+
// Seeding is ADDITIVE and idempotent — a non-archived campaign with the same name is reused, never
|
|
22
|
+
// duplicated; nothing is deleted or overwritten. Unexpected shapes → read the live API reference;
|
|
23
|
+
// every call below carries a docs: line with its reference page.
|
|
24
|
+
import { setSiteCurrency } from "../../shared/seed/site.mjs";
|
|
25
|
+
import { resolveItemImages } from "../../shared/seed/images.mjs";
|
|
26
|
+
import { seedSiteId } from "../../shared/seed/site-context.mjs";
|
|
27
|
+
import { wixToken } from "../../shared/seed/wix-cli.mjs";
|
|
28
|
+
import { readFileSync } from "node:fs";
|
|
29
|
+
import { randomUUID } from "node:crypto";
|
|
30
|
+
|
|
31
|
+
const API = "https://www.wixapis.com";
|
|
32
|
+
export const DONATIONS_APP_ID = "333b456e-dd48-4d6b-b32b-9fd48d74e163";
|
|
33
|
+
export const ECOM_PLATFORM_APP_ID = "1380b703-ce81-ff05-f115-39571d94dfcd"; // Checkout & Orders — a donation is an eCom checkout
|
|
34
|
+
const CAMPAIGNS = "/donation-campaigns/v2/donation-campaigns";
|
|
35
|
+
const D = "https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns";
|
|
36
|
+
const FREQUENCIES = ["ONE_TIME", "WEEK", "MONTH", "YEAR"];
|
|
37
|
+
|
|
38
|
+
export function makeCtx({ cwd = process.cwd() } = {}) {
|
|
39
|
+
// The content site: the config's site, or the parent on a migration preview (site-context.mjs stops
|
|
40
|
+
// a seed there unless --allow-parent is passed after the user confirmed).
|
|
41
|
+
const siteId = seedSiteId({ cwd, argv: process.argv });
|
|
42
|
+
const token = wixToken(siteId, cwd);
|
|
43
|
+
return { token, siteId };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function req(ctx, path, { method = "POST", body } = {}) {
|
|
47
|
+
const res = await fetch(API + path, {
|
|
48
|
+
method,
|
|
49
|
+
headers: {
|
|
50
|
+
Authorization: `Bearer ${ctx.token}`,
|
|
51
|
+
"wix-site-id": ctx.siteId,
|
|
52
|
+
"Content-Type": "application/json",
|
|
53
|
+
},
|
|
54
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
55
|
+
});
|
|
56
|
+
const json = await res.json().catch(() => ({}));
|
|
57
|
+
if (!res.ok) {
|
|
58
|
+
const e = new Error(`${method} ${path} -> ${res.status}: ${JSON.stringify(json).slice(0, 400)}`);
|
|
59
|
+
e.status = res.status;
|
|
60
|
+
throw e;
|
|
61
|
+
}
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
66
|
+
const money = (v) => ({ amount: String(v) }); // amounts are decimal STRINGS in the site currency
|
|
67
|
+
|
|
68
|
+
// ---- plan → create body ----------------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
// The rules the API enforces (the create call rejects otherwise): name 1-65 chars; 1-4 frequencies;
|
|
71
|
+
// ≤20 presets, each with a REQUIRED client-supplied GUID id and a ≤200-char description; when the
|
|
72
|
+
// custom amount is off at least one preset. Defaults when the plan says nothing: one-time only, no
|
|
73
|
+
// note, no fee prompt; a campaign with no presets gets the custom amount enabled with no limits.
|
|
74
|
+
export function buildCampaign(c) {
|
|
75
|
+
if (!c.name || c.name.length > 65) throw new Error(`campaign name must be 1-65 chars: "${c.name ?? ""}"`);
|
|
76
|
+
const frequencies = (c.frequencies?.length ? c.frequencies : ["ONE_TIME"]).map((f) => String(f).toUpperCase());
|
|
77
|
+
for (const f of frequencies) if (!FREQUENCIES.includes(f)) throw new Error(`"${c.name}": unknown frequency "${f}" — one of ${FREQUENCIES.join(", ")}`);
|
|
78
|
+
if (frequencies.length > 4) throw new Error(`"${c.name}": at most 4 frequencies`);
|
|
79
|
+
const presets = (c.presets ?? []).map((p) => {
|
|
80
|
+
const amount = typeof p === "object" ? p.amount : p;
|
|
81
|
+
const impact = typeof p === "object" ? p.impact ?? p.description : undefined;
|
|
82
|
+
if (impact && impact.length > 200) throw new Error(`"${c.name}": impact text over 200 chars`);
|
|
83
|
+
return { id: randomUUID(), price: money(amount), ...(impact ? { description: impact } : {}) };
|
|
84
|
+
});
|
|
85
|
+
if (presets.length > 20) throw new Error(`"${c.name}": at most 20 preset amounts`);
|
|
86
|
+
const custom = c.customAmount ?? (presets.length ? { enabled: false } : { enabled: true });
|
|
87
|
+
const customEnabled = custom.enabled !== false;
|
|
88
|
+
if (!customEnabled && !presets.length) throw new Error(`"${c.name}": needs a preset amount or customAmount.enabled`);
|
|
89
|
+
const body = {
|
|
90
|
+
name: c.name,
|
|
91
|
+
donationFrequencies: frequencies,
|
|
92
|
+
predefinedDonationAmounts: presets,
|
|
93
|
+
customAmountEnabled: customEnabled,
|
|
94
|
+
commentsEnabled: c.comments === true,
|
|
95
|
+
askDonorCoverFee: c.askCoverFee === true,
|
|
96
|
+
};
|
|
97
|
+
if (customEnabled && (custom.min != null || custom.max != null)) {
|
|
98
|
+
body.customAmountOptions = {
|
|
99
|
+
...(custom.min != null ? { minimum: money(custom.min) } : {}),
|
|
100
|
+
...(custom.max != null ? { maximum: money(custom.max) } : {}),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (c.goal?.target != null) {
|
|
104
|
+
body.campaignGoal = {
|
|
105
|
+
targetAmount: money(c.goal.target),
|
|
106
|
+
...(c.goal.endDate ? { endDate: c.goal.endDate } : {}),
|
|
107
|
+
...(c.goal.acceptAfterGoal != null ? { acceptDonationsAfterGoal: c.goal.acceptAfterGoal } : {}),
|
|
108
|
+
...(c.goal.acceptAfterEndDate != null ? { acceptDonationsAfterEndDate: c.goal.acceptAfterEndDate } : {}),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return body;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ---- operations ------------------------------------------------------------------------------------
|
|
115
|
+
|
|
116
|
+
// Idempotent: re-installing an already-installed app returns 200. eCom first — a donation is an eCom
|
|
117
|
+
// checkout; whether installing Donations provisions eCom by itself is not verified, so both go in.
|
|
118
|
+
// docs: https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix.md
|
|
119
|
+
export async function installApp(ctx, appDefId) {
|
|
120
|
+
try {
|
|
121
|
+
await req(ctx, "/apps-installer-service/v1/app-instance/install", { body: {
|
|
122
|
+
tenant: { tenantType: "SITE", id: ctx.siteId },
|
|
123
|
+
appInstance: { appDefId, enabled: true },
|
|
124
|
+
} });
|
|
125
|
+
return true;
|
|
126
|
+
} catch (e) {
|
|
127
|
+
return `not installed here (${String(e.message).slice(0, 160)}) — the owner can add Wix Donations from the dashboard's App Market`;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export async function installDonationsApps(ctx) {
|
|
132
|
+
return { ecom: await installApp(ctx, ECOM_PLATFORM_APP_ID), donations: await installApp(ctx, DONATIONS_APP_ID) };
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// A non-archived campaign with this exact name, when one exists (`name` is filterable).
|
|
136
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/query-donation-campaigns.md
|
|
137
|
+
export async function findCampaignByName(ctx, name) {
|
|
138
|
+
const r = await req(ctx, `${CAMPAIGNS}/query`, { body: { query: { filter: { name, archived: false }, cursorPaging: { limit: 1 } } } });
|
|
139
|
+
return r.donationCampaigns?.[0] ?? null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/get-donation-campaign.md
|
|
143
|
+
export async function getCampaign(ctx, id) {
|
|
144
|
+
return (await req(ctx, `${CAMPAIGNS}/${id}`, { method: "GET" })).donationCampaign;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Create, then verify the campaign reads back (the read side can lag the write by a moment — retry
|
|
148
|
+
// the GET a few times, never the POST). Reuses an existing campaign of the same name.
|
|
149
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/create-donation-campaign.md
|
|
150
|
+
export async function createCampaign(ctx, plan) {
|
|
151
|
+
const existing = await findCampaignByName(ctx, plan.name).catch(() => null);
|
|
152
|
+
if (existing?.id) return { id: existing.id, name: existing.name, status: existing.status, created: false };
|
|
153
|
+
const r = await req(ctx, CAMPAIGNS, { body: { donationCampaign: buildCampaign(plan) } });
|
|
154
|
+
const id = r.donationCampaign?.id;
|
|
155
|
+
if (!id) throw new Error(`Campaign "${plan.name}" was not created — no id returned.`);
|
|
156
|
+
let verified = null;
|
|
157
|
+
for (let attempt = 0; attempt < 4 && !verified; attempt++) {
|
|
158
|
+
verified = await getCampaign(ctx, id).catch(() => null);
|
|
159
|
+
if (!verified) await sleep(1000 * (attempt + 1));
|
|
160
|
+
}
|
|
161
|
+
return { id, name: plan.name, status: verified?.status ?? r.donationCampaign?.status ?? null, created: true, verified: !!verified };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export async function createCampaigns(ctx, campaigns) {
|
|
165
|
+
const out = [];
|
|
166
|
+
for (const c of campaigns) out.push({ ...(await createCampaign(ctx, c)), plan: c });
|
|
167
|
+
return out;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Attach a Wix Media file as the cover image. The Image object's shape follows the SDK's transforms
|
|
171
|
+
// ({ id, url, height, width, altText }); whether the update needs a field mask is not verified live,
|
|
172
|
+
// so a plain PATCH is tried first and one with an explicit mask second. Revision comes from a fresh
|
|
173
|
+
// GET (an optimistic-locking field).
|
|
174
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/update-donation-campaign.md
|
|
175
|
+
export async function setCampaignCoverImage(ctx, { campaignId, id, url, height = 1024, width = 1024, altText }) {
|
|
176
|
+
const current = await getCampaign(ctx, campaignId);
|
|
177
|
+
const donationCampaign = { id: campaignId, revision: current.revision, coverImage: { id, url, height, width, ...(altText ? { altText } : {}) } };
|
|
178
|
+
try {
|
|
179
|
+
return await req(ctx, `${CAMPAIGNS}/${campaignId}`, { method: "PATCH", body: { donationCampaign } });
|
|
180
|
+
} catch (first) {
|
|
181
|
+
if (first.status !== 400) throw first;
|
|
182
|
+
return req(ctx, `${CAMPAIGNS}/${campaignId}`, { method: "PATCH", body: { donationCampaign, fieldMask: { paths: ["coverImage"] } } });
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* ONE-CALL seed: site currency (if named) → install eCom + Donations → one create per campaign
|
|
188
|
+
* (verified) → images in a second pass. The default path.
|
|
189
|
+
*/
|
|
190
|
+
export async function setupDonations(ctx, { campaigns = [], currency } = {}) {
|
|
191
|
+
if (!campaigns.length) throw new Error("plan.campaigns is empty — nothing to seed");
|
|
192
|
+
// Before any campaign exists: every amount is stored in the site currency.
|
|
193
|
+
if (currency) await setSiteCurrency(ctx, currency);
|
|
194
|
+
const installed = await installDonationsApps(ctx);
|
|
195
|
+
const created = await createCampaigns(ctx, campaigns);
|
|
196
|
+
|
|
197
|
+
// Pass 2 — images: resolve (upload a local file / import by url / generate by prompt) in one
|
|
198
|
+
// parallel wave, then attach. Failures leave the campaign text-only; the exit never depends on them.
|
|
199
|
+
const wanted = created.filter((c) => c.created && (c.plan.imageUrl || c.plan.imagePath || c.plan.imagePrompt));
|
|
200
|
+
const files = await resolveItemImages(ctx, wanted.map((c) => ({
|
|
201
|
+
url: c.plan.imageUrl,
|
|
202
|
+
path: c.plan.imagePath,
|
|
203
|
+
prompt: c.plan.imagePrompt,
|
|
204
|
+
displayName: `${c.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "campaign"}.png`,
|
|
205
|
+
})));
|
|
206
|
+
let imagesAttached = 0;
|
|
207
|
+
const imageErrors = [];
|
|
208
|
+
for (let i = 0; i < wanted.length; i++) {
|
|
209
|
+
if (!files[i]) continue;
|
|
210
|
+
try {
|
|
211
|
+
await setCampaignCoverImage(ctx, { campaignId: wanted[i].id, id: files[i].id, url: files[i].url, altText: wanted[i].name });
|
|
212
|
+
imagesAttached++;
|
|
213
|
+
} catch (e) {
|
|
214
|
+
imageErrors.push(`${wanted[i].name}: ${String(e.message).slice(0, 200)}`); // never block on an image
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const recurring = created.some((c) => (c.plan.frequencies ?? []).some((f) => String(f).toUpperCase() !== "ONE_TIME"));
|
|
219
|
+
return {
|
|
220
|
+
installed,
|
|
221
|
+
campaigns: created.map(({ id, name, status, created: isNew, verified }) => ({ id, name, status, created: isNew, ...(isNew ? { verified } : {}) })),
|
|
222
|
+
imagesAttached,
|
|
223
|
+
...(imageErrors.length ? { imageErrors } : {}),
|
|
224
|
+
// Completing a donation needs a premium plan + a connected payment method in the dashboard —
|
|
225
|
+
// not a seeding failure; surface it to the owner.
|
|
226
|
+
notes: [
|
|
227
|
+
"Taking real donations requires a premium plan and a connected payment method in the dashboard; until then the hosted checkout refuses the payment.",
|
|
228
|
+
...(recurring ? ["Recurring frequencies (WEEK/MONTH/YEAR) also need a payment provider that supports recurring payments."] : []),
|
|
229
|
+
],
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// ---- CLI entry ----------------------------------------------------------------------------------
|
|
234
|
+
|
|
235
|
+
const invokedDirectly = process.argv[1] && import.meta.url.endsWith(process.argv[1].split("/").pop());
|
|
236
|
+
if (invokedDirectly) {
|
|
237
|
+
const planPath = process.argv[2];
|
|
238
|
+
if (!planPath) {
|
|
239
|
+
console.error("usage: node seed-donations.mjs <plan.json> (run from the project root)");
|
|
240
|
+
process.exit(1);
|
|
241
|
+
}
|
|
242
|
+
const plan = JSON.parse(readFileSync(planPath, "utf8"));
|
|
243
|
+
const ctx = makeCtx();
|
|
244
|
+
setupDonations(ctx, plan)
|
|
245
|
+
.then((result) => console.log(JSON.stringify(result, null, 2)))
|
|
246
|
+
.catch((e) => {
|
|
247
|
+
console.error(e.message);
|
|
248
|
+
process.exit(1);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Events — playbook
|
|
2
|
+
|
|
3
|
+
The events machinery ships as files — event reads (paged list, by slug, by id, a recurring
|
|
4
|
+
series' dates, the category pills), the visitor-public ticket-tier read (every pricing method,
|
|
5
|
+
availability, sale period, the tax and fee lines checkout adds), the exact `reserve →
|
|
6
|
+
hosted-checkout redirect` sequence, RSVP on the organizer's own form, the post-checkout order read,
|
|
7
|
+
the registration controls, and the SEO plumbing, typed end-to-end. **The presentation doesn't ship
|
|
8
|
+
— you build it** on the shipped hooks/DTOs: the event card and the events index, the event page's
|
|
9
|
+
layout, the home page, and the brand. You never write registration logic; you never skip designing.
|
|
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 two
|
|
20
|
+
island imports in the shipped pages. Files you **create**: your listing component (skeleton below)
|
|
21
|
+
and 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(e.imageUrl, "33vw", 2 / 3)} alt={e.title} />`; `imgSrc()` / `imgSrcSet()` / `formatMoney()` underneath |
|
|
27
|
+
| `wix/events/types.ts` | the DTOs (`EventSummary`, `EventDetail`, `TicketTier`, `TicketSelection`, `SelectionTotals`, `RsvpForm`, `OrderSummary`, `RegistrationResult`) — contracts inlined below |
|
|
28
|
+
| `wix/events/events.ts` | `fetchEventsPage` / `fetchEvents` (live events, soonest first, paged), `fetchEventBySlug`, `fetchEventById` (the post-checkout confirmation read), `fetchOccurrences` (a recurring series' dates), `fetchCategories` (the pills) — the transport; the rules and DTO mappers are in `events-core.ts` beside it (shared with the REST layer) |
|
|
29
|
+
| `wix/events/registration.ts` | `fetchTicketTiers`, `startTicketCheckout`, `submitRsvp` — the exact reserve→redirect sequence and the RSVP body built from the organizer's form; rules in `registration-core.ts` beside it |
|
|
30
|
+
| `wix/events/orders.ts` | `fetchOrder(eventId, orderNumber)` — the confirmation page's order (invoice, status, ticket PDF); mapper in `orders-core.ts` |
|
|
31
|
+
| `wix/events/events-store.ts` · `registration-store.ts` · `order-store.ts` | the listing, registration and confirmation state machines, framework-free (`createEventsStore()`, `createRegistrationStore(event)`, `createOrderStore({ orderNumber, eventId })` — `getState`/`subscribe` + actions, one instance per surface); the hooks below bind them to React, every other stack uses them directly |
|
|
32
|
+
| `hooks/events/useEvents.ts` | React binding of `events-store.ts`: listing, category filter, load more — contract below |
|
|
33
|
+
| `hooks/events/useEventRegistration.ts` | React binding of `registration-store.ts`: tiers, quantities, donation amounts, totals, checkout, the RSVP form — contract below |
|
|
34
|
+
| `hooks/events/useEventConfirmation.ts` | React binding of `order-store.ts`: the event, the order, the tickets-ready poll — contract below |
|
|
35
|
+
| `components/events/EventRegistrationView.tsx` | the registration controls for one event — branches on the registration state and type (closed / scheduled / paused; the tier picker with fixed, free, donation and pricing-option tiers, sold-out and sale-period badges, tax and fee lines, running totals and the gated CTA; the organizer's RSVP form with the guest picker and its confirmed / waitlisted / declined states; the external link) — **wire as-is** in your event page's registration column (`<EventRegistrationView client:only="react" event={event} />`); build your own on `useEventRegistration` only when the brief wants more |
|
|
36
|
+
| `components/events/EventConfirmationView.tsx` | the hosted checkout's thank-you island — reads `?orderNumber=&eventId=`, the order's status, invoice and ticket download once Wix has generated the tickets, the event for context, an honest "no order" state on a direct visit, and a confirmation without details when the order can't be read — **wire as-is** |
|
|
37
|
+
| `components/events/EventsView.tsx` (+ `EventCard`) | **reference** listing — correct and plain; the shipped `events.astro` mounts it so the site works before you design; you build your own on `useEvents` and swap the import |
|
|
38
|
+
| `styles/global.css` | **the design system**: Tailwind v4 + the `@theme` token block (colors, radii, fonts — shared across verticals). Everything, shipped and yours, styles from these tokens |
|
|
39
|
+
|
|
40
|
+
Astro stack additionally gets:
|
|
41
|
+
|
|
42
|
+
| file | what it is |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `layouts/SiteLayout.astro` | the site chrome — **yours to brand** (keep the `seo-tags` slot + the global.css import). If another vertical is also deployed, its layout won — add an Events nav link there |
|
|
45
|
+
| `pages/events.astro` | SSR listing (the first page via `fetchEventsPage`) — **keep the frontmatter**, swap the island import to YOUR listing component |
|
|
46
|
+
| `pages/events/[slug].astro` | SSR event page with owner-editable SEO — **keep the frontmatter and the SEO pieces** (`wixMetadata`, `loadSEOTagsServiceConfig`, `<SEO.Tags>`) exactly; the markup between them (including the "other dates" list of a recurring series) is yours to redesign around the shipped registration island (`client:only="react"`) |
|
|
47
|
+
| `pages/event-confirmation.astro` | the hosted checkout's thank-you landing (`?orderNumber=&eventId=`) — **keep the route**; the shipped checkout callbacks point at it |
|
|
48
|
+
|
|
49
|
+
## What you build — the design job
|
|
50
|
+
|
|
51
|
+
1. **The event card + events index** — your tile (image, date eyebrow, title, venue/online,
|
|
52
|
+
price-from, sold-out badge) and rhythm, the category filter (only when >1 category), a
|
|
53
|
+
"load more" control when `hasMore`, skeletons while loading, an honest empty state — on `useEvents`.
|
|
54
|
+
2. **The event page's layout** — hero image, date, venue and address, about, other dates of a
|
|
55
|
+
recurring series, with the shipped `EventRegistrationView` as the registration column; design
|
|
56
|
+
the page for the brand (an editorial split, a sticky registration column, a full-bleed hero).
|
|
57
|
+
Registration logic never leaves the shipped component and hook.
|
|
58
|
+
3. **The home page** — hero, next/featured events (fetch in frontmatter → your components),
|
|
59
|
+
brand story.
|
|
60
|
+
|
|
61
|
+
Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass). Style
|
|
62
|
+
everything with Tailwind utilities on the tokens.
|
|
63
|
+
|
|
64
|
+
### What a complete events site shows (recommended defaults)
|
|
65
|
+
|
|
66
|
+
Defaults for a brief that says nothing about them; the prompt wins when it asks for something
|
|
67
|
+
else. Look at the seeded events before designing (how many, ticketed or RSVP, images, categories).
|
|
68
|
+
|
|
69
|
+
- **Home:** what the events are and the next one in the first screen; real events under truthful
|
|
70
|
+
headings; a link to the index.
|
|
71
|
+
- **Index:** a real card — image, date, title, venue, price-from, link — in the first screen; the
|
|
72
|
+
category filter only when the pills number more than one; `events === null` → skeletons, `[]` →
|
|
73
|
+
an honest empty state; `error` → a short inline message; `hasMore` → a load-more control.
|
|
74
|
+
- **Event page:** image, date, title, venue and the registration control in the first screen at
|
|
75
|
+
390px wide too — a bounded image band on a phone (`max-h-[45vh]`), the registration column
|
|
76
|
+
under it, the two-column split from `md`; `aboutParagraphs` after the registration control,
|
|
77
|
+
never between the date and the action; `address` under the venue name; `addToCalendar.google`
|
|
78
|
+
as a link when present; a map only from `coordinates` (an `<iframe>` of
|
|
79
|
+
`https://www.google.com/maps?q=${lat},${lng}&output=embed`, or your provider) — never a
|
|
80
|
+
geocode of your own.
|
|
81
|
+
- **Registration:** the shipped `EventRegistrationView` — `TICKETING` shows the tier picker,
|
|
82
|
+
`RSVP` the organizer's form, `EXTERNAL` the link out, closed / scheduled / paused their states;
|
|
83
|
+
confirmed and waitlisted read differently.
|
|
84
|
+
- **Confirmation:** `/event-confirmation` — the shipped island; the only success surface for a
|
|
85
|
+
ticket order.
|
|
86
|
+
- **Copy:** nothing the organizer didn't supply — no invented "X spots left", no fake urgency, no
|
|
87
|
+
Wix IDs in visible text. `TicketTier.limitPerCheckout` is a per-order cap, not a remaining count.
|
|
88
|
+
|
|
89
|
+
### The contracts your components consume (everything you need — read the source when something is off)
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
// EventSummary (tiles) — display-ready:
|
|
93
|
+
// { id, slug, title, shortDescription /* plain text */, status: "UPCOMING"|"STARTED"|"ENDED"|"CANCELED"|"DRAFT",
|
|
94
|
+
// dateLabel /* Wix's formatted schedule in the event's zone, or the organizer's TBD message */,
|
|
95
|
+
// startDateIso, endDateIso /* "" when TBD */, timeZoneId /* IANA — the `timeZone` for any Intl formatting you do */,
|
|
96
|
+
// dateTbd, dateTbdMessage, hideEndDate, showTimeZone,
|
|
97
|
+
// locationName, locationType: "VENUE"|"ONLINE"|"TBD", imageUrl,
|
|
98
|
+
// registrationType: "RSVP"|"TICKETING"|"EXTERNAL"|"NONE",
|
|
99
|
+
// priceLabel /* "From €45" | "Free" | "" */, soldOut, categories: [{ id, name }] /* manual categories only */,
|
|
100
|
+
// recurrenceStatus /* "ONE_TIME" | "RECURRING" | … */, recurringCategoryId /* "" unless part of a series */ }
|
|
101
|
+
// EventDetail adds: aboutParagraphs: string[], formatted: { startDate, startTime, endDate, endTime },
|
|
102
|
+
// address /* "" for ONLINE/TBD */, coordinates: { lat, lng } | null,
|
|
103
|
+
// registrationStatus /* raw Wix status */, registrationOpen /* accepting now */, registrationClosed /* CLOSED_* */,
|
|
104
|
+
// registrationOpensAtIso, registrationOpensAtLabel /* SCHEDULED_RSVP */, registrationPaused, waitlistOnly, membersOnly,
|
|
105
|
+
// rsvpResponseType: "YES_ONLY"|"YES_AND_NO", rsvpForm: RsvpForm | null, externalUrl, eventPageUrl,
|
|
106
|
+
// addToCalendar: { google, ics }, taxSettings: { name, ratePercent, includedInPrice, appliedToDonations } | null,
|
|
107
|
+
// ticketLimitPerOrder.
|
|
108
|
+
// RsvpForm: { controls: [{ id, type: "INPUT"|"TEXTAREA"|"DROPDOWN"|"RADIO"|"CHECKBOX"|"NAME"|"ADDRESS_SHORT"|"ADDRESS_FULL"|"DATE",
|
|
109
|
+
// system, inputs: [{ name /* the key you answer under */, label, mandatory, type, options, maxLength }] }],
|
|
110
|
+
// guestControl: { label, maxGuests, namesLabel } | null }
|
|
111
|
+
// TicketTier: { id, name, description, pricingType: "FIXED"|"FREE"|"GUEST"|"OPTIONS",
|
|
112
|
+
// price /* "€45.00" | "Free" | "€10.00 – €25.00" | "" */, free, minPrice /* GUEST */, currency,
|
|
113
|
+
// options: [{ id, name, price, notes }] /* OPTIONS */, notes: string[] /* "+€9.45 VAT", "+€1.36 ticket service fee", "VAT included" */,
|
|
114
|
+
// limitPerCheckout /* 0 = sold out */, soldOut, saleStatus, available /* on sale and not sold out */,
|
|
115
|
+
// saleStartsLabel /* "Goes on sale …" while scheduled */, saleEndsLabel, feeType }
|
|
116
|
+
// OrderSummary: { number, status, statusLabel, settled /* FREE|PAID */, email, createdLabel,
|
|
117
|
+
// items: [{ name, price, quantity, total }], subtotal, couponDiscount, paidPlanDiscount: { amount, ratePercent } | null,
|
|
118
|
+
// tax: { name, ratePercent, amount } | null, fee: { amount, ratePercent } | null, total,
|
|
119
|
+
// ticketsPdfUrl, ticketCount, ticketsReady }
|
|
120
|
+
|
|
121
|
+
// fetchEventsPage({ limit = 20, offset, categoryId?, status: "upcoming"|"past"|"all" = "upcoming" }) → { events, total, hasMore }
|
|
122
|
+
// fetchEvents(sameOptions) → EventSummary[]; fetchOccurrences(recurringCategoryId) → EventSummary[]
|
|
123
|
+
|
|
124
|
+
// useEvents({ initialEvents?, initialTotal?, pageSize?, status? }) →
|
|
125
|
+
// { events: EventSummary[]|null /* null = loading → skeletons */,
|
|
126
|
+
// categories: [{ id, name }] /* the site's manual categories; falls back to the loaded events' when the read is refused */,
|
|
127
|
+
// activeCategoryId, setActiveCategoryId(id|null),
|
|
128
|
+
// hasMore, loadingMore, loadMore(), error }
|
|
129
|
+
// Only UPCOMING/STARTED events arrive by default, soonest first — a past event is never linked as
|
|
130
|
+
// registerable; `status: "past"` lists ENDED events for an archive section.
|
|
131
|
+
|
|
132
|
+
// useEventRegistration(event: EventDetail) →
|
|
133
|
+
// { tiers: TicketTier[]|null, // TICKETING only; null = loading
|
|
134
|
+
// quantities, setQuantity(tierId, qty, optionId?), // clamped 0..limitPerCheckout and to ticketLimitPerOrder; ignored when !available
|
|
135
|
+
// guestPrices, setGuestPrice(tierId, "25.00"), // GUEST tiers: the amount the visitor pays
|
|
136
|
+
// selections, ticketCount, ticketLimitPerOrder,
|
|
137
|
+
// totals: { subtotal, tax, fee, total } | null, // Wix's running totals, formatted; the hosted checkout is authoritative
|
|
138
|
+
// canCheckout, // gate the tickets CTA on canCheckout
|
|
139
|
+
// checkout(): Promise<RegistrationResult>, // reserve → the browser redirects to Wix checkout
|
|
140
|
+
// rsvpForm, rsvpValues, setRsvpValue(inputName, value | string[]), // the organizer's form; CHECKBOX answers are arrays
|
|
141
|
+
// guestCount, guestNames, setGuestCount(n), setGuestName(i, name), // when rsvpForm.guestControl
|
|
142
|
+
// canRsvp, // gate the RSVP CTA on this
|
|
143
|
+
// rsvp(attending?): Promise<RegistrationResult>, // attending=false only for YES_AND_NO
|
|
144
|
+
// submitting, confirmed, error } // confirmed: { kind: "rsvpConfirmed", status: "YES"|"NO"|"WAITLIST" }
|
|
145
|
+
// checkout() and rsvp() reject on refusal (sold out, sale ended, closed registration, payment
|
|
146
|
+
// method not configured, a missing mandatory answer) AND record .error as visitor copy — render
|
|
147
|
+
// it where the control is. Changing the selection clears a stale error.
|
|
148
|
+
|
|
149
|
+
// useEventConfirmation({ orderNumber, eventId }) →
|
|
150
|
+
// { event: EventDetail|null, order: OrderSummary|null, orderUnavailable, polling, loading }
|
|
151
|
+
// The order is polled every 2 s for up to 15 s until order.ticketsReady (Wix generates tickets
|
|
152
|
+
// after payment); show the PDF link only then.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### The listing component you create — skeleton
|
|
156
|
+
|
|
157
|
+
Hooks first, branches after (an early return above a hook changes hook order between renders and
|
|
158
|
+
React throws). The island renders on the server too (`client:load` SSRs), so nothing in a render
|
|
159
|
+
path may throw — render every state totally.
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
// src/components/events/<YourListing>.tsx — YOU build it; events.astro mounts it (swap the import).
|
|
163
|
+
import { useEvents } from "../../hooks/events/useEvents";
|
|
164
|
+
import { imgAttrs } from "../../wix/media";
|
|
165
|
+
import type { EventSummary } from "../../wix/events/types";
|
|
166
|
+
|
|
167
|
+
export default function EventsIndex(props: { initialEvents?: EventSummary[]; initialTotal?: number }) {
|
|
168
|
+
const { events, categories, activeCategoryId, setActiveCategoryId, hasMore, loadingMore, loadMore, error } = useEvents(props);
|
|
169
|
+
// …you implement the render:
|
|
170
|
+
// • a filter row only when categories.length > 1 ("All" + one pill per category, the active
|
|
171
|
+
// one marked by activeCategoryId; setActiveCategoryId(null) clears)
|
|
172
|
+
// • error → a short inline message
|
|
173
|
+
// • events === null → skeleton tiles; [] → your honest empty state
|
|
174
|
+
// • else YOUR grid of YOUR tiles: image via <img {...imgAttrs(e.imageUrl, "(min-width: 1024px) 33vw, 50vw", 2 / 3)} alt={e.title} />
|
|
175
|
+
// (an empty imageUrl gives {} — render your placeholder then), dateLabel as the eyebrow,
|
|
176
|
+
// title WRAPPING (no truncate), locationType === "ONLINE" ? "Online" : locationName,
|
|
177
|
+
// priceLabel when non-empty, a sold-out badge from e.soldOut; the tile links to `/events/${encodeURIComponent(e.slug)}`
|
|
178
|
+
// • hasMore → a "Load more" button calling loadMore(), disabled while loadingMore
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The event page is the shipped `pages/events/[slug].astro`: keep its frontmatter and SEO pieces
|
|
183
|
+
and redesign the markup between them; the registration column stays
|
|
184
|
+
`<EventRegistrationView client:only="react" event={event} />`; the "other dates" list comes from
|
|
185
|
+
`fetchOccurrences(event.recurringCategoryId)` in the frontmatter (already there). Home:
|
|
186
|
+
`fetchEvents({ limit: 3 })` in frontmatter → your cards.
|
|
187
|
+
|
|
188
|
+
### The reference files for stacks where the components don't deploy
|
|
189
|
+
|
|
190
|
+
On `lib`, `static`, and a port, nothing under `components/` or `hooks/` arrives. The state
|
|
191
|
+
machines behind the hooks do arrive — `wix/events/events-store.ts`, `registration-store.ts`,
|
|
192
|
+
`order-store.ts` — so you never rewrite them: create a store per surface, `subscribe`, render from
|
|
193
|
+
`getState()`, call its actions. Their `*State` interfaces are the render contract; read those. What
|
|
194
|
+
you write is the rendering — index, event page, tier picker, RSVP form, confirmation — and for that
|
|
195
|
+
read these first; they are tested code for exactly that behaviour:
|
|
196
|
+
|
|
197
|
+
1. `components/events/EventRegistrationView.tsx` — the branch on the registration state
|
|
198
|
+
(`registrationClosed` → sold out vs closed; `SCHEDULED_RSVP` → "opens <label>";
|
|
199
|
+
`registrationPaused`) then on `registrationType`; the stepper per tier or per pricing option
|
|
200
|
+
(disabled at 0, at `limitPerCheckout`, and when `!available`), the amount input on a GUEST
|
|
201
|
+
tier, the "Sold out" / "Sale ended" badges and the "Goes on sale" / "Sale ends" lines, the
|
|
202
|
+
`notes` under each price, the `totals` block; the CTA gated by `canCheckout` / `canRsvp` and
|
|
203
|
+
`submitting`; `error` rendered beside the control; the organizer's form rendered control by
|
|
204
|
+
control (text, textarea, select, radio, checkbox, date; the guest count select and one name
|
|
205
|
+
input per guest); the waitlist-only and members-only copy; the confirmed vs waitlisted vs
|
|
206
|
+
declined copy.
|
|
207
|
+
2. `components/events/EventConfirmationView.tsx` — the honest "no order" state on a direct visit;
|
|
208
|
+
the order's status, invoice lines and ticket download once `ticketsReady`; the event fetched by
|
|
209
|
+
`eventId` for context; the calendar links; the confirmation without details when
|
|
210
|
+
`orderUnavailable`.
|
|
211
|
+
3. `components/events/EventsView.tsx` — the filter pills, the skeleton grid, the empty state, the
|
|
212
|
+
card's fields in order, the load-more control.
|
|
213
|
+
|
|
214
|
+
All under `templates/events/app/`.
|
|
215
|
+
|
|
216
|
+
### Wiring — Astro (default)
|
|
217
|
+
|
|
218
|
+
1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass — merge into the
|
|
219
|
+
existing layout instead if another vertical is deployed).
|
|
220
|
+
2. Write your listing component under `src/components/events/` (a new name — don't overwrite the
|
|
221
|
+
references) and swap the import in `pages/events.astro` (`client:load` with the SSR props
|
|
222
|
+
`initialEvents` + `initialTotal`). Redesign the markup of `pages/events/[slug].astro` around
|
|
223
|
+
the shipped registration island (`client:only="react"`). Keep `pages/event-confirmation.astro`'s
|
|
224
|
+
route.
|
|
225
|
+
3. Write `pages/index.astro` (home) — it exists from the scaffold; Read it before overwriting.
|
|
226
|
+
|
|
227
|
+
### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
|
|
228
|
+
|
|
229
|
+
Read the reference files listed above before writing any surface.
|
|
230
|
+
|
|
231
|
+
`deploy.mjs events --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts` (the
|
|
232
|
+
visitor client, configured with the public client id), `media.ts`, `money.ts`, and `wix/events/`
|
|
233
|
+
— `events.ts`, `registration.ts`, `orders.ts`, `types.ts`, the `*-core.ts` rules, and the three
|
|
234
|
+
stores `events-store.ts`, `registration-store.ts`, `order-store.ts`. None of it is React. The hooks
|
|
235
|
+
and components don't ship on this stack; the stores replace the hooks, and you write the components
|
|
236
|
+
in your framework to the contracts on this page:
|
|
237
|
+
|
|
238
|
+
- bind the stores with your framework's external-store primitive (Vue: `shallowRef` updated in
|
|
239
|
+
`subscribe`; Svelte: `readable(store.getState(), (set) => store.subscribe(() => set(store.getState())))`;
|
|
240
|
+
Solid: a signal set in `subscribe`). `createEventsStore({ initialEvents?, initialTotal? })` per
|
|
241
|
+
listing (`start()` when mounted, `stop()` when unmounted), `createRegistrationStore(event)` per
|
|
242
|
+
event page, `createOrderStore({ orderNumber, eventId })` on the confirmation page. State in,
|
|
243
|
+
actions out — exactly the hooks' contracts above;
|
|
244
|
+
- your tier picker, RSVP form, and confirmation to the reference files above.
|
|
245
|
+
|
|
246
|
+
Routes `/events`, `/events/:slug` (via `fetchEventBySlug`, null → your 404), `/event-confirmation`
|
|
247
|
+
(the checkout callbacks point at it); dev server on 4321; a static build goes through
|
|
248
|
+
`npx @wix/cli@latest release` with `site.outputDirectory` pointing at the build folder, an SSR
|
|
249
|
+
build is hosted by you. Page title and description from the event's `title` / `shortDescription`.
|
|
250
|
+
|
|
251
|
+
### Wiring — static site (`--stack static`, no bundler)
|
|
252
|
+
|
|
253
|
+
Read the reference files listed above before writing any surface.
|
|
254
|
+
|
|
255
|
+
`deploy.mjs events --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM,
|
|
256
|
+
the `.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` —
|
|
257
|
+
pages, styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project
|
|
258
|
+
root (config, plan, seed output) is never the upload. Same function names and DTOs as the table
|
|
259
|
+
above, so the contracts on this page hold unchanged: `fetchEventsPage`, `fetchEvents`,
|
|
260
|
+
`fetchEventBySlug`, `fetchEventById`, `fetchOccurrences`, `fetchCategories` from
|
|
261
|
+
`./js/wix/events.js`; `fetchTicketTiers`, `startTicketCheckout`, `submitRsvp` from
|
|
262
|
+
`./js/wix/registration.js`; `fetchOrder` from `./js/wix/orders.js`. The state machines ship too:
|
|
263
|
+
`createEventsStore` from `./js/wix/events-store.js` (`start()` once the page is up;
|
|
264
|
+
`setActiveCategoryId`, `loadMore`), `createRegistrationStore` from
|
|
265
|
+
`./js/wix/registration-store.js`, and `createOrderStore` from `./js/wix/order-store.js`. No
|
|
266
|
+
components ship — you write the rendering in plain JS: one render function per surface that reads
|
|
267
|
+
`getState()`, called from `subscribe`, with the surface's controls calling the store's actions.
|
|
268
|
+
Pages are `events.html`, `event.html?slug=…`, `event-confirmation.html` — Wix static hosting
|
|
269
|
+
serves files, not directories, so the hosted checkout must return to those files: create the
|
|
270
|
+
registration store with its paths, `createRegistrationStore(event, { paths: { confirmation:
|
|
271
|
+
"/event-confirmation.html", event: "/event.html?slug=" + encodeURIComponent(event.slug) } })` (Wix
|
|
272
|
+
appends `?orderNumber=&eventId=` to the confirmation URL; read them there into
|
|
273
|
+
`createOrderStore`). Set `document.title` and the meta description from `title` /
|
|
274
|
+
`shortDescription` once the event loads. The visitor token persists in `localStorage` on its own;
|
|
275
|
+
never mint per page. `npx @wix/cli@latest release` uploads `site/`.
|
|
276
|
+
|
|
277
|
+
### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
|
|
278
|
+
|
|
279
|
+
Read the reference files listed above before writing any surface.
|
|
280
|
+
|
|
281
|
+
Run `deploy.mjs events --stack static` in the project folder anyway: `js/wix/` is both the
|
|
282
|
+
browser-side code and the readable spec. Then split by where the call runs. **Reads on the
|
|
283
|
+
server:** port `js/wix/events.ts` and `events-core.ts` to your language — the same functions
|
|
284
|
+
returning the same DTO shapes as dicts, one anonymous visitor token per process for these public
|
|
285
|
+
reads (mint and refresh per `client.ts`); the query body is literal (`filter.status $in
|
|
286
|
+
UPCOMING/STARTED`, `sort dateAndTimeSettings.startDate ASC, createdDate DESC`, a positive
|
|
287
|
+
`paging.limit` and `paging.offset`, the `fields` array — a body without the limit answers
|
|
288
|
+
`total: N, events: []` with no error) — and render the index and the event page in your templates
|
|
289
|
+
to the contracts above, so titles and dates are in the HTML. **Registering in the browser:** the
|
|
290
|
+
tier picker and the RSVP form on `./js/wix/registration-store.js` (pass the rendered `EventDetail`
|
|
291
|
+
as JSON in a script tag, plus the `paths` your routes use), the confirmation page on
|
|
292
|
+
`./js/wix/order-store.js` — exactly as the static wiring above; the browser owns the visitor's
|
|
293
|
+
token, so the server never handles per-visitor tokens. Routes stay `/events`, `/events/<slug>`,
|
|
294
|
+
`/event-confirmation`. Add your public https origin to the OAuth app's allowed domains before
|
|
295
|
+
checkout can return.
|
|
296
|
+
|
|
297
|
+
**Pre-rendered (Frozen-Flask, Pelican, any static-site generator) → Wix-hosted.** Same port for
|
|
298
|
+
the reads, run at build time with one anonymous token; the generator emits every event page
|
|
299
|
+
(a URL generator over `fetchEvents({ limit })` — raise `limit` or page with `offset` past 20).
|
|
300
|
+
Run `deploy.mjs events --stack static --out <build dir>` so `js/wix/` is inside the output the
|
|
301
|
+
pages import from, point `site.outputDirectory` at that folder, `wix release`. Pages sit at
|
|
302
|
+
different depths (`/`, `/events/…`): give the templates one base path to `js/wix/` (a template
|
|
303
|
+
variable, or root-relative `/js/wix/…`), never a relative `./js/wix/` — it breaks one level down.
|
|
304
|
+
The frozen index is the first paint; the category filter still runs client-side on it through
|
|
305
|
+
`createEventsStore({ initialEvents })`. Registration runs in the browser as above. Close with the
|
|
306
|
+
live URL, the rebuild + release command, and one line for the owner: dashboard edits to events
|
|
307
|
+
reach the site when that command runs; registration is live regardless.
|
|
308
|
+
|
|
309
|
+
### Wiring — React SPA (Vite etc.)
|
|
310
|
+
|
|
311
|
+
Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite config
|
|
312
|
+
plugins — deploy already added the dep). Routes: `/events` → your listing; `/events/:slug` →
|
|
313
|
+
`fetchEventBySlug(slug)` client-side (null → your 404 view), then your event page with the shipped
|
|
314
|
+
`EventRegistrationView`; `/event-confirmation` → the shipped `EventConfirmationView` (the checkout
|
|
315
|
+
callbacks point at that path). Deploy wrote the public client id into `wix/config.ts`; nothing
|
|
316
|
+
else to configure.
|
|
317
|
+
|
|
318
|
+
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).
|
|
319
|
+
|
|
320
|
+
## Hard rules
|
|
321
|
+
|
|
322
|
+
- **Registration logic only through the shipped exports** — `useEventRegistration` /
|
|
323
|
+
`createRegistrationStore` / `startTicketCheckout` / `submitRsvp` own the sequence
|
|
324
|
+
(visitor-public tier read, reserve with the line items' `ticketInfo`,
|
|
325
|
+
`createRedirectSession({ eventsCheckout })`, rsvpV2 with the organizer's form). Never re-derive
|
|
326
|
+
any of it, never hand-build a checkout/ticket-form URL, never route it through an API route or
|
|
327
|
+
elevate — the whole flow runs client-side as the visitor.
|
|
328
|
+
- **Branch on the registration state, then the type** — `registrationClosed` (sold out vs
|
|
329
|
+
closed), `registrationStatus === "SCHEDULED_RSVP"` (opens at `registrationOpensAtLabel`),
|
|
330
|
+
`registrationPaused`; then `registrationType`: never render an RSVP event with a ticket picker
|
|
331
|
+
or a ticketed event with an RSVP form. Where the shipped components deploy that is
|
|
332
|
+
`EventRegistrationView`.
|
|
333
|
+
- **The RSVP form is the organizer's** — render `rsvpForm.controls` (every control, its inputs
|
|
334
|
+
by `name`, `mandatory` marked, `options` as the only choices) and `guestControl`; never
|
|
335
|
+
hardcode the fields or drop a control: Create RSVP rejects a missing mandatory answer or an
|
|
336
|
+
unknown input (`INVALID_FORM_RESPONSE`). The built-in name and email inputs are part of the form.
|
|
337
|
+
- **Gate CTAs on `canCheckout` / `canRsvp`** and surface `error` — `checkout()`/`rsvp()` can
|
|
338
|
+
reject (sold out, sale ended, closed, payment method not configured, a missing answer); the
|
|
339
|
+
message is for the visitor.
|
|
340
|
+
- **Confirmed states reflect REAL success**: RSVP → render only from `confirmed` (and say
|
|
341
|
+
"waitlisted", not "confirmed", for status `WAITLIST`; a `waitlistOnly` event's CTA says "join
|
|
342
|
+
the waitlist"). Tickets → the only success surface is `/event-confirmation` with Wix's
|
|
343
|
+
`?orderNumber=` params; a visitor merely returning to the event page is NOT a success signal.
|
|
344
|
+
Order details render only from the fetched `order`; when it is unavailable the page still
|
|
345
|
+
confirms and says the tickets arrive by email.
|
|
346
|
+
- **Prices and labels come from the DTOs as-is** — `priceLabel`, `TicketTier.price`, `notes`,
|
|
347
|
+
`totals`, `OrderSummary` amounts; no arithmetic of your own, no currency symbols of your own.
|
|
348
|
+
`totals` mirrors Wix's own picker; the hosted checkout is what actually charges.
|
|
349
|
+
- **Dates in the event's zone** — `dateLabel`, `saleStartsLabel`, `registrationOpensAtLabel` are
|
|
350
|
+
already; anything you format from `startDateIso` passes `timeZone: event.timeZoneId`.
|
|
351
|
+
- Where the shipped components deploy (Astro, React): theme via the `@theme` tokens, and your
|
|
352
|
+
markup uses Tailwind utilities on the same tokens — one design system across shipped and written
|
|
353
|
+
code. Where they don't (`lib`, `static`, a port): style with whatever your stack does well, on
|
|
354
|
+
one token set of your own.
|
|
355
|
+
- Live data or an honest empty state — never mock events, tiers, or "X spots left".
|
|
356
|
+
- Keep the event page's SEO pieces exactly as shipped (Astro).
|
|
357
|
+
- **Call every hook before any conditional return.** Hooks first, branches after.
|
|
358
|
+
- **Browsing and registering need no login.** They run on the visitor session the shipped client
|
|
359
|
+
already holds; don't gate events behind sign-in unless the brief asks for accounts. A
|
|
360
|
+
`membersOnly` event is the exception Wix itself imposes — the shipped form says so; a login
|
|
361
|
+
flow is the members vertical's job, not yours to improvise here.
|
|
362
|
+
|
|
363
|
+
### Visitor-scope reads that can be refused
|
|
364
|
+
|
|
365
|
+
Two reads run in the browser on the visitor token exactly as Wix's own headless demo does, but Wix
|
|
366
|
+
doesn't guarantee them for every site's visitor scope, so the shipped code degrades instead of
|
|
367
|
+
failing: `fetchCategories` (Query Categories) — when refused, the pills come from the categories on
|
|
368
|
+
the loaded events; `fetchOrder` (Get Order on the confirmation page) — when refused,
|
|
369
|
+
`orderUnavailable` is set and the page confirms without invoice lines or the PDF link (the
|
|
370
|
+
confirmation email carries them). Never elevate or proxy either through a server route to "fix" it.
|
|
371
|
+
|
|
372
|
+
## Point the user to their dashboard
|
|
373
|
+
|
|
374
|
+
Give the owner the dashboard link plus the Events page — the deploy step's JSON printed
|
|
375
|
+
`dashboardUrl`; append `/events` for event management. **Selling paid tickets needs a connected
|
|
376
|
+
payment method and a premium plan** (free/RSVP events work without) — until then `checkout()` surfaces
|
|
377
|
+
"Ticket sales aren't switched on yet" and hosted checkout says "We can't accept online payments."
|
|
378
|
+
Hand both links in the close: Accept payments `{dashboardUrl}/wix-cashier/payments` and Upgrade the
|
|
379
|
+
plan `https://www.wix.com/upgrade/website?metaSiteId={siteId}`; don't treat it as a code failure. The
|
|
380
|
+
organizer's tax settings, fee type, ticket limits, RSVP form fields and guest control are all
|
|
381
|
+
dashboard settings the site renders as-is.
|
|
382
|
+
|
|
383
|
+
## Seeding
|
|
384
|
+
|
|
385
|
+
Per `seed/SEED.md` — plain-data `plan.json` into `seed-events.mjs` from the project root. Seed
|
|
386
|
+
events that exercise the UI (a ticketed event with 2 tiers, another ticketed one, a free RSVP
|
|
387
|
+
event; future dates; an image per event) unless the brief says otherwise.
|