@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,96 @@
|
|
|
1
|
+
// Generates app/wix/forms/address-templates.generated.ts: which subfields a multi-line address has
|
|
2
|
+
// in each country, in Wix's own order, and each country's subdivisions (states, provinces, regions)
|
|
3
|
+
// with their names. Wix's address field renders a different layout per country (Israel: street name
|
|
4
|
+
// + number, no subdivision; the United States: one address line and a state) and the submission API
|
|
5
|
+
// rejects any other subfield as "additional properties", so the storefront must follow the same
|
|
6
|
+
// templates. Three sources, all Wix's own:
|
|
7
|
+
// - @wix/headless-forms (npm, public): the country → template map its form service uses
|
|
8
|
+
// (dist/services/utils/address-forms.js; the same map as Wix's internal form-multiline-address)
|
|
9
|
+
// - the template forms themselves, from the public form-template endpoint Wix's own form
|
|
10
|
+
// components call at runtime (no authentication; namespace wix.form_platform.form)
|
|
11
|
+
// - @wix/locale-dataset-data (Wix's npm registry, the default inside Wix; no token): subdivisions
|
|
12
|
+
// per country and their English names
|
|
13
|
+
// Run by hand when Wix changes any of them; the output is committed. Needs npm and the network,
|
|
14
|
+
// no Wix login:
|
|
15
|
+
// node templates/forms/tooling/address-templates.mjs
|
|
16
|
+
import { execFileSync } from "node:child_process";
|
|
17
|
+
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
|
|
18
|
+
import { tmpdir } from "node:os";
|
|
19
|
+
import { dirname, join, resolve } from "node:path";
|
|
20
|
+
import { fileURLToPath } from "node:url";
|
|
21
|
+
|
|
22
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const OUT = resolve(HERE, "..", "app", "wix", "forms", "address-templates.generated.ts");
|
|
24
|
+
|
|
25
|
+
const tmp = mkdtempSync(join(tmpdir(), "wix-address-"));
|
|
26
|
+
const pack = (name) => {
|
|
27
|
+
const file = execFileSync("npm", ["pack", name, "--silent"], { cwd: tmp, encoding: "utf8" }).trim().split("\n").pop();
|
|
28
|
+
const dir = join(tmp, file.replace(/\.tgz$/, ""));
|
|
29
|
+
execFileSync("mkdir", ["-p", dir]);
|
|
30
|
+
execFileSync("tar", ["xzf", join(tmp, file), "-C", dir]);
|
|
31
|
+
return join(dir, "package");
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// 1 · country → template, from Wix's own headless form components. The module imports the SDK at
|
|
35
|
+
// the top, so its two constants are read from the source text rather than by importing it.
|
|
36
|
+
const hf = pack("@wix/headless-forms");
|
|
37
|
+
const hfVersion = JSON.parse(readFileSync(join(hf, "package.json"), "utf8")).version;
|
|
38
|
+
const addressForms = readFileSync(join(hf, "dist", "services", "utils", "address-forms.js"), "utf8");
|
|
39
|
+
const mapSource = addressForms.match(/ADDRESS_FORM_ID_BY_COUNTRY\s*=\s*(\{[^}]*\})/)?.[1];
|
|
40
|
+
const DEFAULT_COUNTRY = addressForms.match(/DEFAULT_COUNTRY\s*=\s*'([A-Z_]+)'/)?.[1];
|
|
41
|
+
if (!mapSource || !DEFAULT_COUNTRY) throw new Error("@wix/headless-forms: ADDRESS_FORM_ID_BY_COUNTRY or DEFAULT_COUNTRY not found in address-forms.js");
|
|
42
|
+
const ADDRESS_FORM_ID_BY_COUNTRY = Object.fromEntries([...mapSource.matchAll(/([A-Z_]+):\s*'([0-9a-f-]{36})'/g)].map((m) => [m[1], m[2]]));
|
|
43
|
+
|
|
44
|
+
// 2 · the template forms, from the same public endpoint Wix's form components fetch at runtime
|
|
45
|
+
// (@wix/headless-forms services/utils/address-forms.js): all twelve in one call, no token.
|
|
46
|
+
const formIds = [...new Set(Object.values(ADDRESS_FORM_ID_BY_COUNTRY))];
|
|
47
|
+
const url = `https://www.wixapis.com/form-template-service/v1/templates?${formIds.map((id) => `templateIds=${id}`).join("&")}&namespace=wix.form_platform.form`;
|
|
48
|
+
const res = await fetch(url);
|
|
49
|
+
const json = await res.json().catch(() => ({}));
|
|
50
|
+
if (!res.ok || !Array.isArray(json.templates)) throw new Error(`form templates: ${res.status} ${JSON.stringify(json).slice(0, 200)}`);
|
|
51
|
+
const templates = {};
|
|
52
|
+
const nameByFormId = {};
|
|
53
|
+
for (const id of formIds) {
|
|
54
|
+
const form = json.templates.find((t) => t.id === id);
|
|
55
|
+
if (!form) throw new Error(`template form ${id} missing from the response`);
|
|
56
|
+
const name = String(form.name ?? id).replace(/^MLA_/, "");
|
|
57
|
+
nameByFormId[id] = name;
|
|
58
|
+
templates[name] = (form.fields ?? []).map((f) => ({ sub: f.target, required: Boolean(f.validation?.required), hidden: Boolean(f.hidden) }));
|
|
59
|
+
}
|
|
60
|
+
const byCountry = Object.fromEntries(Object.entries(ADDRESS_FORM_ID_BY_COUNTRY).filter(([c]) => c !== DEFAULT_COUNTRY).map(([c, id]) => [c, nameByFormId[id]]));
|
|
61
|
+
|
|
62
|
+
// 3 · country names and subdivisions, in English, from Wix's locale dataset. The names are shipped as
|
|
63
|
+
// data because Intl.DisplayNames spells a few of them differently in Node and in the browser (Hong
|
|
64
|
+
// Kong, Macao, Palestine, the Falklands), and a server-rendered list that the browser re-renders
|
|
65
|
+
// differently is a React hydration mismatch that throws the whole form's server render away.
|
|
66
|
+
const ld = pack("@wix/locale-dataset-data");
|
|
67
|
+
const ldVersion = JSON.parse(readFileSync(join(ld, "package.json"), "utf8")).version;
|
|
68
|
+
const data = JSON.parse(readFileSync(join(ld, "resources", "data.json"), "utf8"));
|
|
69
|
+
const en = JSON.parse(readFileSync(join(ld, "resources", "translations", "messages_en.json"), "utf8"));
|
|
70
|
+
const countryNames = {};
|
|
71
|
+
const subdivisions = {};
|
|
72
|
+
for (const c of data.countries) {
|
|
73
|
+
if (en[c.displayName]) countryNames[c.shortKey] = en[c.displayName].trim();
|
|
74
|
+
if (!c.subdivisions?.list?.length) continue;
|
|
75
|
+
subdivisions[c.shortKey] = {
|
|
76
|
+
label: en[c.subdivisions.displayName] ?? "Region",
|
|
77
|
+
list: c.subdivisions.list.map((s) => [s.key, en[s.displayName] ?? s.key]),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const body = `// Generated by templates/forms/tooling/address-templates.mjs on ${new Date().toISOString().slice(0, 10)}
|
|
82
|
+
// from @wix/headless-forms ${hfVersion} (country → template), the ${formIds.length} template forms
|
|
83
|
+
// (wix.form_platform.form, from the public form-template endpoint) and @wix/locale-dataset-data ${ldVersion}
|
|
84
|
+
// (country names, subdivisions). Do not edit; re-run the generator.
|
|
85
|
+
export interface AddressTemplatePart { sub: string; required: boolean; hidden: boolean }
|
|
86
|
+
export interface AddressSubdivisions { label: string; list: [code: string, name: string][] }
|
|
87
|
+
export const ADDRESS_TEMPLATES: {
|
|
88
|
+
defaultTemplate: string;
|
|
89
|
+
byCountry: Record<string, string>;
|
|
90
|
+
templates: Record<string, AddressTemplatePart[]>;
|
|
91
|
+
countryNames: Record<string, string>;
|
|
92
|
+
subdivisions: Record<string, AddressSubdivisions>;
|
|
93
|
+
} = ${JSON.stringify({ defaultTemplate: nameByFormId[ADDRESS_FORM_ID_BY_COUNTRY[DEFAULT_COUNTRY]], byCountry, templates, countryNames, subdivisions })};
|
|
94
|
+
`;
|
|
95
|
+
writeFileSync(OUT, body);
|
|
96
|
+
console.log(JSON.stringify({ wrote: OUT, templates: Object.keys(templates), countriesMapped: Object.keys(byCountry).length, countriesNamed: Object.keys(countryNames).length, countriesWithSubdivisions: Object.keys(subdivisions).length, bytes: body.length }));
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# Members — playbook
|
|
2
|
+
|
|
3
|
+
The account machinery ships as files — the custom credential login (sign in, sign up, email
|
|
4
|
+
verification, owner approval, logout), the session store, the current-member read, typed
|
|
5
|
+
end-to-end. Members sign up and sign in **on your site's own form**, never on a Wix-hosted login
|
|
6
|
+
page. On managed Astro the form posts to the integration's built-in auth routes (`/api/auth/login`,
|
|
7
|
+
`/signup`, `/verify-email`, `/logout`), which finish through `/api/auth/callback` and write the member
|
|
8
|
+
session cookie server-side, so the next server render and every island run as that member; on every
|
|
9
|
+
other stack the shipped code exchanges the credentials into member tokens in the browser.
|
|
10
|
+
**The presentation doesn't ship — you build it** on the shipped hook/DTOs: the login page around
|
|
11
|
+
the shipped form, the account page, the header control, and whatever the brief gates behind a
|
|
12
|
+
login. You never write auth code; you never skip designing the surfaces.
|
|
13
|
+
|
|
14
|
+
## The file map (deployed into `src/`)
|
|
15
|
+
|
|
16
|
+
**On Astro and React the shipped files are tested and work as they are** — this table and the
|
|
17
|
+
contracts below are everything you need to use them, so don't spend the run reading their source;
|
|
18
|
+
wire them and build your surfaces. Reading them is the right move when something is off (a runtime
|
|
19
|
+
error, a field this playbook doesn't cover) or when the brief wants a behaviour they don't offer —
|
|
20
|
+
then read the file that owns it and change or extend it. On `lib`, `static`, and a port the
|
|
21
|
+
components don't deploy at all, and each wiring section below opens with the files to read before
|
|
22
|
+
writing their equivalents. Files you edit: `SiteLayout.astro` and `styles/global.css`.
|
|
23
|
+
Files you **create**: your home page, any gated page the brief asks for, and your own account
|
|
24
|
+
surface if the reference one doesn't fit the brand.
|
|
25
|
+
|
|
26
|
+
| file | what it is |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `wix/config.ts` · `wix/sdk.ts` | shared auth seam (deploy configures it — nothing to set by hand); members run on the same seam |
|
|
29
|
+
| `wix/media.ts` | `imgAttrs(url, sizes)` / `imgSrc()` — the member photo is already an https URL in the DTO |
|
|
30
|
+
| `wix/members/types.ts` | the DTO (`CurrentMember`) — contract inlined below |
|
|
31
|
+
| `wix/members/client.ts` | the members seam over `wix/sdk.ts`: `membersApi` (the module under the app's auth), `membersAuth` (the shared client's strategy in manual mode, `null` on managed Astro), `AMBIENT_AUTH` |
|
|
32
|
+
| `wix/members/auth.ts` | `loginMember`, `registerMember`, `verifyMemberEmail`, `logoutMember`, `loggedInHint`, `PROFILE_ON_SIGNUP` — the transport, two behind one export list: the built-in `/api/auth` routes on managed Astro, the SDK strategy elsewhere; what a response means (the four states, the error-code names, the route answers) is in `auth-core.ts` beside it (shared with the REST layer) |
|
|
33
|
+
| `wix/members/members.ts` | `fetchCurrentMember` — the transport; the DTO mapper is in `members-core.ts` beside it (shared with the REST layer) |
|
|
34
|
+
| `wix/members/member-store.ts` | the session state machine, framework-free: one per visitor (a module singleton — it spans Astro islands, which a React context can't); `getMemberState`/`subscribeMember`, `login`, `register`, `verifyEmail`, `logout`, `refreshMember`, `hydrateMember`; the hook below binds it to React, every other stack uses it directly |
|
|
35
|
+
| `hooks/members/useMember.ts` | React binding of `member-store.ts`: session state + the credential actions — contract below |
|
|
36
|
+
| `components/members/LoginForm.tsx` | the credential form — sign in / sign up toggle, the verification-code step, the pending-approval notice, the inline error, `returnTo` — **wire as-is** on your login page |
|
|
37
|
+
| `components/members/MemberMenu.tsx` | header control reference on the tokens: skeleton while loading, "Log in" for a visitor, name/avatar + "Log out" for a member — wire as-is or design your own on `useMember` |
|
|
38
|
+
| `components/members/RequireAuth.tsx` | the gate for member-only surfaces: waits for the first session read, then children for a member, a login prompt with `returnTo` for a visitor — **wire as-is** around gated content |
|
|
39
|
+
| `components/members/AccountView.tsx` | account surface reference: profile card + log out; design your own on `useMember` when the brand asks |
|
|
40
|
+
| `styles/global.css` | **the design system**: Tailwind v4 + the `@theme` token block (colors, radii, fonts — same token family as the official Wix templates). Everything, shipped and yours, styles from these tokens |
|
|
41
|
+
|
|
42
|
+
Astro stack additionally gets:
|
|
43
|
+
|
|
44
|
+
| file | what it is |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `layouts/SiteLayout.astro` | the site chrome — **yours to brand**: header, footer, nav. Keep the `<slot name="seo-tags" />`, the global.css import, and one `<MemberMenu client:only="react" />` in the header (if another vertical's layout won, mount `MemberMenu` in that header instead) |
|
|
47
|
+
| `pages/login.astro` · `pages/account.astro` | the login and account routes — thin shells mounting `LoginForm` and `AccountPage` `client:only="react"`; brand the chrome around them, keep the mounts |
|
|
48
|
+
|
|
49
|
+
## What you build — this is the design job, not optional polish
|
|
50
|
+
|
|
51
|
+
You implement the surfaces yourself, styled with Tailwind utilities on the `@theme` tokens,
|
|
52
|
+
designed to fit the brief (a members-only club and a course platform should not get the same
|
|
53
|
+
account area):
|
|
54
|
+
|
|
55
|
+
1. **The login page** — the chrome around the shipped `LoginForm` (`pages/login.astro`): heading,
|
|
56
|
+
what membership gives, the brand. The form's four states already render; you own the page.
|
|
57
|
+
2. **The account page** — `pages/account.astro` mounts `RequireAuth` around `AccountView`; keep the
|
|
58
|
+
gate, and replace `AccountView` with your own surface on `useMember` when the brief wants more
|
|
59
|
+
than the profile card (orders, bookings, saved items — each from its own vertical's data layer).
|
|
60
|
+
3. **The header control** — the shipped `MemberMenu` or your own on `useMember`: it is the one
|
|
61
|
+
surface every page shows, so it carries the brand.
|
|
62
|
+
4. **Gated content** the brief asks for — a page inside `RequireAuth`, or a member-only section on a
|
|
63
|
+
public page rendered from `loggedIn`.
|
|
64
|
+
5. **The home page** — on `SiteLayout`, with the way in (log in / join) visible.
|
|
65
|
+
|
|
66
|
+
Plus the **theme** (edit the `@theme` block in `styles/global.css` — one edit) and the **chrome**
|
|
67
|
+
(header/footer in `SiteLayout.astro`, one edit pass).
|
|
68
|
+
|
|
69
|
+
### What a complete members site shows (recommended defaults)
|
|
70
|
+
|
|
71
|
+
Defaults for a brief that says nothing about them; the prompt wins when it asks for something
|
|
72
|
+
else. Then, by default:
|
|
73
|
+
|
|
74
|
+
- **Header:** a skeleton while the session read settles, "Log in" for a visitor, the member's
|
|
75
|
+
name or avatar plus "Log out" for a member — never a flash of "Log in" for someone who is in.
|
|
76
|
+
- **Login page:** sign in and sign up on one page; email verification and owner approval rendered
|
|
77
|
+
as states (a code field, a "pending approval" notice), a failed login as an inline message next
|
|
78
|
+
to the form; `?returnTo=` honoured after success (the shipped form does all of this).
|
|
79
|
+
- **Account page:** gated — a visitor sees the login prompt in place, a member their real profile
|
|
80
|
+
(`displayName`, `loginEmail`, `memberSince`, photo when there is one); a logged-in member with
|
|
81
|
+
`member === null` gets the one honest line ("profile details unavailable") — the Members Area app
|
|
82
|
+
isn't installed, which the seed does.
|
|
83
|
+
- **Logout:** returns to the page that offered it, or the home page.
|
|
84
|
+
- **Copy:** nothing the owner didn't supply — no invented perks, member counts, or testimonials;
|
|
85
|
+
no Wix IDs or technical words in visible text.
|
|
86
|
+
|
|
87
|
+
### The contracts your components consume (everything you need — don't read the source)
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
// CurrentMember — display-ready:
|
|
91
|
+
// { id, loginEmail /* "" when hidden */, displayName /* nickname → "first last" → email local part → "Member" */,
|
|
92
|
+
// firstName, lastName, nickname, photoUrl /* https or "" */, contactId /* the key for member-owned content */,
|
|
93
|
+
// memberSince /* "YYYY-MM-DD" or "" */ }
|
|
94
|
+
|
|
95
|
+
// useMember({ initialMember? /* SSR-resolved member or null; omit to resolve client-side */ }) →
|
|
96
|
+
// { member: CurrentMember|null, loggedIn, loading /* true until the first session read settles — skeletons, not the logged-out state */,
|
|
97
|
+
// error /* last failed operation's message; a new operation clears it */,
|
|
98
|
+
// login(email, password, { returnTo? }?), register(email, password, { firstName?, lastName? }?, { returnTo? }?),
|
|
99
|
+
// verifyEmail(code), logout(returnTo?) /* navigates away */, refresh() }
|
|
100
|
+
// loggedIn can be true with member === null: the caller is a member but the site has no Members Area app (profile layer).
|
|
101
|
+
// Several islands on one page share one session — the store is a module singleton.
|
|
102
|
+
|
|
103
|
+
// login / register / verifyEmail resolve to LoginResult:
|
|
104
|
+
// { state: "SUCCESS" | "EMAIL_VERIFICATION_REQUIRED" | "OWNER_APPROVAL_REQUIRED" | "FAILURE",
|
|
105
|
+
// errorCode? /* invalidPassword | invalidEmail | emailAlreadyExists | resetPassword | missingCaptchaToken | invalidCaptchaToken */,
|
|
106
|
+
// error? /* Wix's message — render it */,
|
|
107
|
+
// redirectUrl? /* managed Astro only: the store has already sent the browser there */ }
|
|
108
|
+
// SUCCESS on managed Astro: the page is navigating — through Wix's authorization step and back to
|
|
109
|
+
// `returnTo` via /api/auth/callback, which writes the session; render nothing more. SUCCESS elsewhere
|
|
110
|
+
// has already refreshed the session: member and loggedIn are set when the promise resolves.
|
|
111
|
+
// `PROFILE_ON_SIGNUP` (from wix/members/auth) is false on managed Astro: the built-in signup takes
|
|
112
|
+
// credentials only, so the shipped form hides the name fields there (names live on the account page).
|
|
113
|
+
// EMAIL_VERIFICATION_REQUIRED → show a code field and call verifyEmail(code); the state token is kept for you.
|
|
114
|
+
// OWNER_APPROVAL_REQUIRED → a pending notice; the member logs in once the owner approves (dashboard).
|
|
115
|
+
// Which of the three a sign-up ends in is the site's signup policy (dashboard), not your code.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### The pages — the shipped shells and a gated page
|
|
119
|
+
|
|
120
|
+
Hooks first, branches after (an early return above a hook changes hook order between renders and
|
|
121
|
+
React throws). Session-reading islands mount `client:only="react"` — they read browser state and
|
|
122
|
+
must not server-render; a `client:load` gate would flash the logged-out state. **One island per
|
|
123
|
+
gated surface:** nest `RequireAuth` around the view inside a React component and mount that
|
|
124
|
+
component from the `.astro` page. Children written in the `.astro` file
|
|
125
|
+
(`<RequireAuth client:only="react"><AccountView /></RequireAuth>`) are rendered once on the server
|
|
126
|
+
as static HTML and never hydrate — the view stays on its loading placeholder forever.
|
|
127
|
+
|
|
128
|
+
```astro
|
|
129
|
+
---
|
|
130
|
+
// src/pages/login.astro — ships; brand the chrome, keep the mount.
|
|
131
|
+
import SiteLayout from "../layouts/SiteLayout.astro";
|
|
132
|
+
import LoginForm from "../components/members/LoginForm";
|
|
133
|
+
---
|
|
134
|
+
<SiteLayout title="Log in">
|
|
135
|
+
<section class="mx-auto max-w-md"> {/* one narrow column: the form is the page */}
|
|
136
|
+
<h1 class="mb-6 text-2xl font-semibold">Welcome</h1>
|
|
137
|
+
<LoginForm client:only="react" />
|
|
138
|
+
</section>
|
|
139
|
+
</SiteLayout>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```astro
|
|
143
|
+
---
|
|
144
|
+
// src/pages/account.astro — ships; the gate stays, the surface inside is yours to replace.
|
|
145
|
+
import SiteLayout from "../layouts/SiteLayout.astro";
|
|
146
|
+
import AccountPage from "../components/members/AccountPage";
|
|
147
|
+
---
|
|
148
|
+
<SiteLayout title="My account">
|
|
149
|
+
<h1 class="mb-8 text-2xl font-semibold tracking-tight">My account</h1>
|
|
150
|
+
<AccountPage client:only="react" />
|
|
151
|
+
</SiteLayout>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
// src/components/members/AccountPage.tsx — ships: the gate and the view in ONE React tree.
|
|
156
|
+
export default function AccountPage() {
|
|
157
|
+
return (
|
|
158
|
+
<RequireAuth>
|
|
159
|
+
<AccountView />
|
|
160
|
+
</RequireAuth>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
// src/components/members/MembersOnly.tsx — YOU create it when the brief gates content: a view over
|
|
167
|
+
// useMember inside RequireAuth. The gate decides; the view renders the member's things.
|
|
168
|
+
import RequireAuth from "./RequireAuth";
|
|
169
|
+
import { useMember } from "../../hooks/members/useMember";
|
|
170
|
+
|
|
171
|
+
function Inner() {
|
|
172
|
+
const { member } = useMember();
|
|
173
|
+
return <section>{/* your gated content; member?.displayName, member?.contactId for member-owned lookups */}</section>;
|
|
174
|
+
}
|
|
175
|
+
export default function MembersOnly() {
|
|
176
|
+
return <RequireAuth><Inner /></RequireAuth>;
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### The reference files for stacks where the components don't deploy
|
|
181
|
+
|
|
182
|
+
On `lib`, `static`, and a port, nothing under `components/` or `hooks/` arrives. The state machine
|
|
183
|
+
behind the hook does arrive — `wix/members/member-store.ts` — so you never rewrite it: `subscribe`,
|
|
184
|
+
render from `getMemberState()`, call its actions; `MemberState` is the render contract. What you
|
|
185
|
+
write is the rendering — the form, the gate, the header control — and for that read these first;
|
|
186
|
+
they are tested code for exactly that behaviour, and rewriting them from the prose above is where
|
|
187
|
+
the bugs come from:
|
|
188
|
+
|
|
189
|
+
1. `components/members/LoginForm.tsx` — the four states as working code: the sign-in/sign-up
|
|
190
|
+
toggle, the name fields only on sign-up, the verification-code step, the pending notice, the
|
|
191
|
+
inline error, the button disabled while busy, `returnTo` after success (only a same-site path).
|
|
192
|
+
2. `components/members/RequireAuth.tsx` — wait for `loading` to settle before deciding (deciding
|
|
193
|
+
early bounces a member on first paint); the visitor's prompt links to the login page with the
|
|
194
|
+
current path as `returnTo`.
|
|
195
|
+
3. `components/members/MemberMenu.tsx` — the three renders (skeleton, "Log in", name/avatar +
|
|
196
|
+
"Log out") and the avatar fallback (first letter of `displayName`).
|
|
197
|
+
|
|
198
|
+
All under `templates/members/app/`.
|
|
199
|
+
|
|
200
|
+
### Wiring — Astro (default)
|
|
201
|
+
|
|
202
|
+
1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass), keeping one
|
|
203
|
+
`<MemberMenu client:only="react" />` in the header.
|
|
204
|
+
2. Keep `/login` and `/account` as shipped — the only login surface is `/login`, and the shipped
|
|
205
|
+
form already posts to the integration's built-in routes. Never build a callback page, a login
|
|
206
|
+
API route, or a redirect to a Wix login page: `@wix/astro` (2.75 or later) ships them
|
|
207
|
+
(`/api/auth/login`, `/signup`, `/verify-email`, `/reset-password`, `/logout`, `/callback`), on by
|
|
208
|
+
default. Brand the chrome around the mounts; replace `AccountView` with your own surface on
|
|
209
|
+
`useMember` when the brief wants more.
|
|
210
|
+
- Social login when the brief asks: a plain link `<a href="/api/auth/login?idp=google&returnToUrl=/account">`
|
|
211
|
+
(also `facebook`) — the provider must be enabled in the dashboard's login settings.
|
|
212
|
+
- Forgot password when the brief asks: a plain `<form method="post" action="/api/auth/reset-password">`
|
|
213
|
+
with `email` and `failureUrl`; Wix hosts the reset itself and the member signs in again after.
|
|
214
|
+
3. Gated content: `RequireAuth` around it, `client:only="react"`.
|
|
215
|
+
4. Write `pages/index.astro` (home) on `SiteLayout`.
|
|
216
|
+
|
|
217
|
+
### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
|
|
218
|
+
|
|
219
|
+
Read the reference files listed above before writing any surface.
|
|
220
|
+
|
|
221
|
+
`deploy.mjs members --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts`,
|
|
222
|
+
`config.ts` (deploy wrote the public client id into `WIX_CLIENT_ID`), `media.ts`, and
|
|
223
|
+
`wix/members/` — `client.ts`, `auth.ts`, `members.ts`,
|
|
224
|
+
`types.ts`, the `*-core.ts` rules, and `member-store.ts`. None of it is React. The hook and the
|
|
225
|
+
components don't ship on this stack; the store replaces the hook, and you write the components in
|
|
226
|
+
your framework to the contracts on this page:
|
|
227
|
+
|
|
228
|
+
- bind the store with your framework's external-store primitive (Vue: `shallowRef` updated in
|
|
229
|
+
`subscribeMember`; Svelte: `readable(getMemberState(), (set) => subscribeMember(() => set(getMemberState())))`;
|
|
230
|
+
Solid: a signal set in `subscribeMember`). One store for the whole app (module-level); the first
|
|
231
|
+
subscriber triggers the session read. State in, actions out — exactly `useMember`'s contract;
|
|
232
|
+
- your login form, gate, and header control to the defaults above — `LoginForm.tsx`,
|
|
233
|
+
`RequireAuth.tsx`, `MemberMenu.tsx` are readable as behaviour specs.
|
|
234
|
+
|
|
235
|
+
Routes `/login`, `/account` (gated in the component, not the router — the session is browser
|
|
236
|
+
state); dev server on 4321; a static build goes through `npx @wix/cli@latest release` with
|
|
237
|
+
`site.outputDirectory` pointing at the build folder, an SSR build is hosted by you.
|
|
238
|
+
|
|
239
|
+
### Wiring — static site (`--stack static`, no bundler)
|
|
240
|
+
|
|
241
|
+
Read the reference files listed above before writing any surface.
|
|
242
|
+
|
|
243
|
+
`deploy.mjs members --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM,
|
|
244
|
+
the `.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` — pages,
|
|
245
|
+
styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project root
|
|
246
|
+
(config, seed output) is never the upload. Same function names and DTOs as the table above, so the
|
|
247
|
+
contracts on this page hold unchanged: `loginMember`, `registerMember`, `verifyMemberEmail`,
|
|
248
|
+
`logoutMember`, `loggedInHint` from `./js/wix/auth.js`; `fetchCurrentMember` from
|
|
249
|
+
`./js/wix/members.js`. The state machine ships too: `./js/wix/member-store.js`
|
|
250
|
+
(`subscribeMember` — the first subscriber triggers the session read — `getMemberState`, `login`,
|
|
251
|
+
`register`, `verifyEmail`, `logout`, `refreshMember`). No components ship — you write the rendering
|
|
252
|
+
in plain JS: one render function per surface that reads `getMemberState()`, called from
|
|
253
|
+
`subscribeMember`, with the form's submit calling the store's actions and rendering the
|
|
254
|
+
`LoginResult` state it resolves to. Pages are `login.html` (`?returnTo=` a same-site path) and
|
|
255
|
+
`account.html`, gated in the page: `loading` → a skeleton, anonymous → a link to
|
|
256
|
+
`login.html?returnTo=account.html`, a member → the profile. The header control is the same store
|
|
257
|
+
on every page.
|
|
258
|
+
|
|
259
|
+
How the session works here: the login runs over the IAM authentication API with the visitor token
|
|
260
|
+
and exchanges the result into member tokens, which replace the visitor token in `localStorage`
|
|
261
|
+
(`role: "member"`) — every later call runs as the member and the refresh keeps the member; never
|
|
262
|
+
mint per page. The exchange completes in a hidden iframe on the page's own origin, so **the page's
|
|
263
|
+
origin must be one of the OAuth app's allowed domains** (`localhost:4321` and the Wix-hosted origin
|
|
264
|
+
already are; a custom domain is added in the dashboard's Headless Settings) — otherwise the login
|
|
265
|
+
resolves nothing and times out with "Login timed out". Logout navigates to Wix and returns to the
|
|
266
|
+
URL you pass (`logout("account.html")` resolves against the page). Gated pages carry no SEO — there
|
|
267
|
+
is nothing to index. `npx @wix/cli@latest release` uploads `site/`.
|
|
268
|
+
|
|
269
|
+
### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
|
|
270
|
+
|
|
271
|
+
Read the reference files listed above before writing any surface.
|
|
272
|
+
|
|
273
|
+
Run `deploy.mjs members --stack static` in the project folder anyway: `js/wix/` is both the
|
|
274
|
+
browser-side code and the readable spec. This vertical has no public reads — everything is the
|
|
275
|
+
visitor's own state — so the whole flow runs **in the browser** from `./js/wix/` exactly as the
|
|
276
|
+
static wiring above: the login form, the gate, the header control on `member-store.js`; the
|
|
277
|
+
browser owns the member token, so the server handles no per-visitor tokens, and a member-only page
|
|
278
|
+
is a page whose content renders once `getMemberState().loggedIn` is true. Add your public https
|
|
279
|
+
origin to the OAuth app's allowed domains before the login can complete (the iframe exchange) and
|
|
280
|
+
before logout can return.
|
|
281
|
+
|
|
282
|
+
If the server itself must know the member (server-rendered member-only pages, member-owned data
|
|
283
|
+
joined server-side), port `js/wix/auth.ts` and `auth-core.ts`: the same three calls — login with a
|
|
284
|
+
visitor token, the redirect session, `POST /oauth2/token` with `grantType: "authorization_code"` —
|
|
285
|
+
and the no-DOM branch of the exchange (fetch the authorize page, read `code` and `state` from it) is
|
|
286
|
+
the server's path; or use the docs' full-page variant (`responseMode: "query"` plus a `redirectUri`
|
|
287
|
+
on the allowed list). Then `client.ts`'s header applies: one token set per visitor in the visitor's
|
|
288
|
+
session, never one process-wide token, and `GET /members/v1/members/my?fieldsets=FULL` with that
|
|
289
|
+
token on each request (`members.ts` + `members-core.ts` as the port).
|
|
290
|
+
|
|
291
|
+
### Wiring — React SPA (Vite etc.)
|
|
292
|
+
|
|
293
|
+
Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite config
|
|
294
|
+
plugins — deploy already added the dep). Write route wrappers in the project's router: `/login` →
|
|
295
|
+
a page mounting `LoginForm` (pass `onSuccess` to navigate with your router, or let it use
|
|
296
|
+
`?returnTo=`); `/account` → `RequireAuth` around your account surface; gated routes → the same.
|
|
297
|
+
Mount `MemberMenu` in the header (pass `LinkComponent` for router links). Deploy wrote the public
|
|
298
|
+
client id into `wix/config.ts` (`WIX_CLIENT_ID`); nothing else to configure. Here the login runs in
|
|
299
|
+
the browser on the shared client, and a SUCCESS is a session at once (no round trip).
|
|
300
|
+
|
|
301
|
+
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).
|
|
302
|
+
|
|
303
|
+
## Hard rules
|
|
304
|
+
|
|
305
|
+
- **No Wix-hosted login page, and no auth code of your own.** The member types credentials into
|
|
306
|
+
your form on your site. On managed Astro the shipped transport posts them to the built-in
|
|
307
|
+
`/api/auth` routes and the round trip through `/api/auth/callback` is the integration's, never a
|
|
308
|
+
page you write; elsewhere the shipped SDK exchange runs. Password reset and logout return to a
|
|
309
|
+
URL you pass.
|
|
310
|
+
- **Auth only through the shipped exports** — `useMember` / the store's actions; never call the
|
|
311
|
+
IAM API or the OAuth client yourself, never rewrite the exchange. Extend by adding a function in
|
|
312
|
+
`wix/members/` for what they don't cover (API contracts: the `wix-docs` skill).
|
|
313
|
+
- **One auth seam** (`wix/sdk.ts`, reused by `wix/members/client.ts`) — never instantiate another
|
|
314
|
+
client, never one per component, never read or write the session cookie yourself.
|
|
315
|
+
- **Session state only through the store** — no React context, no copy of `loggedIn` in component
|
|
316
|
+
state, no identity inferred from local UI state.
|
|
317
|
+
- **Every state is rendered**: a failed login shows `error` next to the form; verification and
|
|
318
|
+
owner approval are states, not errors; `loading` is a skeleton, never the logged-out UI.
|
|
319
|
+
- **Identity vs profile**: `loggedIn` needs no app install; `member` (profile data) needs the Wix
|
|
320
|
+
Members Area app — the seed installs it. A member with `member === null` gets the honest line,
|
|
321
|
+
not a fake profile.
|
|
322
|
+
- **Gate only what the brief gates.** Public pages stay public; browsing never needs a login.
|
|
323
|
+
- Don't use `auth.elevate()` for a member reading their own records — the member token is the
|
|
324
|
+
right identity.
|
|
325
|
+
- **Live data or an honest empty state** — never mock a member, a name, or a member count.
|
|
326
|
+
- **The session persists on its own** (an HttpOnly cookie the integration writes on Astro, the
|
|
327
|
+
shared client's `localStorage` tokens elsewhere); never mint per page, never store credentials.
|
|
328
|
+
- Where the shipped components deploy (Astro, React): theme via the `@theme` tokens, and your
|
|
329
|
+
markup uses Tailwind utilities on the same tokens — one design system across shipped and written
|
|
330
|
+
code. Where they don't (`lib`, `static`, a port): style with whatever your stack does well, on one
|
|
331
|
+
token set of your own; the rule that survives is the token set, not Tailwind.
|
|
332
|
+
- **Call every hook before any conditional return.** Hooks first, branches after.
|
|
333
|
+
|
|
334
|
+
## Point the user to their dashboard
|
|
335
|
+
|
|
336
|
+
Give the owner the dashboard link — **the deploy step's JSON output already printed it**
|
|
337
|
+
(`dashboardUrl`); copy, don't re-derive. Members are managed under Contacts → Site Members there,
|
|
338
|
+
and the signup policy — email verification, owner approval, reCAPTCHA — is set under Settings →
|
|
339
|
+
Member signup; it decides which state a sign-up ends in.
|
|
340
|
+
|
|
341
|
+
## Seeding
|
|
342
|
+
|
|
343
|
+
Per `seed/SEED.md` — `seed-members.mjs`, run from the project root. It installs the Wix Members
|
|
344
|
+
Area app (the profile layer) and nothing else: members self-register at runtime, never at build
|
|
345
|
+
time. Independent of the frontend work.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The account page's one island: the gate and the view in a single React tree. Mount it from the
|
|
2
|
+
// Astro page as <AccountPage client:only="react" />. Do NOT write
|
|
3
|
+
// <RequireAuth client:only="react"><AccountView /></RequireAuth> in an .astro file: a framework
|
|
4
|
+
// component's children written in Astro are rendered once on the server as static HTML, so the
|
|
5
|
+
// view never hydrates and stays on its loading placeholder. Any gated surface you build follows
|
|
6
|
+
// the same shape — one React component that nests RequireAuth around the view.
|
|
7
|
+
import RequireAuth from "./RequireAuth";
|
|
8
|
+
import AccountView from "./AccountView";
|
|
9
|
+
|
|
10
|
+
export default function AccountPage() {
|
|
11
|
+
return (
|
|
12
|
+
<RequireAuth>
|
|
13
|
+
<AccountView />
|
|
14
|
+
</RequireAuth>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// REFERENCE account surface: profile card + log-out on the @theme tokens. Correct and
|
|
2
|
+
// complete; per the skill's model you design your own on useMember. On Astro the page
|
|
3
|
+
// passes the SSR-resolved member as initialMember; a SPA mounts it inside <RequireAuth>.
|
|
4
|
+
import { useMember } from "../../hooks/members/useMember";
|
|
5
|
+
import type { CurrentMember } from "../../wix/members/types";
|
|
6
|
+
|
|
7
|
+
export interface AccountViewProps {
|
|
8
|
+
initialMember?: CurrentMember | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function AccountView({ initialMember }: AccountViewProps) {
|
|
12
|
+
const { member, loggedIn, loading, error, logout } = useMember({ initialMember });
|
|
13
|
+
|
|
14
|
+
if (loading) {
|
|
15
|
+
return (
|
|
16
|
+
<div className="mx-auto max-w-md" aria-busy="true">
|
|
17
|
+
<div className="h-40 animate-pulse rounded-lg bg-secondary" />
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (!loggedIn) {
|
|
23
|
+
return <p className="py-16 text-center text-muted-foreground">You're logged out.</p>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className="mx-auto max-w-md rounded-lg border border-border p-8">
|
|
28
|
+
<div className="flex items-center gap-4">
|
|
29
|
+
{member?.photoUrl ? (
|
|
30
|
+
<img src={member.photoUrl} alt="" className="h-16 w-16 rounded-full object-cover" />
|
|
31
|
+
) : (
|
|
32
|
+
<span className="flex h-16 w-16 items-center justify-center rounded-full bg-secondary text-xl font-semibold">
|
|
33
|
+
{(member?.displayName ?? "M").slice(0, 1).toUpperCase()}
|
|
34
|
+
</span>
|
|
35
|
+
)}
|
|
36
|
+
<div>
|
|
37
|
+
<p className="text-lg font-semibold text-foreground">{member?.displayName ?? "Member"}</p>
|
|
38
|
+
{member?.loginEmail && <p className="text-sm text-muted-foreground">{member.loginEmail}</p>}
|
|
39
|
+
{member?.memberSince && (
|
|
40
|
+
<p className="mt-0.5 text-xs text-muted-foreground">Member since {member.memberSince}</p>
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
{!member && (
|
|
45
|
+
<p className="mt-4 text-sm text-muted-foreground">
|
|
46
|
+
Logged in, but profile details are unavailable — the Wix Members Area app isn't installed
|
|
47
|
+
on this site.
|
|
48
|
+
</p>
|
|
49
|
+
)}
|
|
50
|
+
{error && <p className="mt-4 text-sm text-destructive">{error}</p>}
|
|
51
|
+
<button
|
|
52
|
+
type="button"
|
|
53
|
+
onClick={() => void logout()}
|
|
54
|
+
className="mt-6 rounded-control border border-border px-5 py-2 text-sm font-medium text-foreground transition-colors hover:bg-secondary"
|
|
55
|
+
>
|
|
56
|
+
Log out
|
|
57
|
+
</button>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|