@wix/agent-skills 1.26.0 → 1.28.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 +8 -6
- package/skills/wix-app/references/APP_VALIDATION.md +5 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
- package/skills/wix-app/references/SDK_MODULE_MAP.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-app/references/stores/GET_PRODUCT.md +9 -1
- package/skills/wix-app/references/stores/INVENTORY.md +2 -0
- package/skills/wix-app/references/stores/QUERY.md +2 -2
- package/skills/wix-app/references/stores/WRITE.md +1 -1
- package/skills/wix-headless-kit/SKILL.md +35 -14
- package/skills/wix-headless-kit/guides/existing-site.md +12 -5
- package/skills/wix-headless-kit/guides/no-machine.md +115 -0
- package/skills/wix-headless-kit/install/attach.mjs +60 -13
- package/skills/wix-headless-kit/install/bootstrap.mjs +3 -1
- package/skills/wix-headless-kit/install/check.mjs +5 -5
- package/skills/wix-headless-kit/install/context.mjs +4 -2
- package/skills/wix-headless-kit/install/deploy.mjs +11 -5
- package/skills/wix-headless-kit/install/pins.json +8 -0
- package/skills/wix-headless-kit/install/setup.mjs +10 -8
- package/skills/wix-headless-kit/install/templates.mjs +39 -25
- 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 +348 -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 +68 -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 +465 -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 +68 -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 +465 -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 +64 -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 +378 -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 +47 -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 +186 -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 +186 -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 +281 -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,417 @@
|
|
|
1
|
+
# Forms — playbook
|
|
2
|
+
|
|
3
|
+
The machinery ships as files — the schema read flattened into render-ready fields, the owner's
|
|
4
|
+
rules and steps applied, upload + submit, schema-driven validation in Wix's own wording, server
|
|
5
|
+
violations mapped onto controls, and the owner's submit settings resolved into an outcome,
|
|
6
|
+
correct end-to-end. A form is **schema-driven**: the owner picks the fields in their dashboard, so
|
|
7
|
+
every form has a different field set and no "contact form" component could ship for it.
|
|
8
|
+
**You render the fields; you never write the reading, validating or submitting.**
|
|
9
|
+
|
|
10
|
+
## The file map (deployed into `src/`)
|
|
11
|
+
|
|
12
|
+
**On Astro and React the shipped files are tested and work as they are** — this table and the
|
|
13
|
+
contracts below are everything you need to use them, so don't spend the run reading their source;
|
|
14
|
+
wire them and build your surfaces. Reading them is the right move when something is off (a runtime
|
|
15
|
+
error, a field kind this playbook doesn't cover) or when the brief wants a behaviour they don't
|
|
16
|
+
offer — then read the file that owns it and change or extend it. On `lib`, `static`, and a port
|
|
17
|
+
the hook doesn't deploy; the store behind it does, and the wiring sections below say what to
|
|
18
|
+
read first. Files you edit: `SiteLayout.astro` and `styles/global.css`. Files you **create**
|
|
19
|
+
(skeletons below): the form page and its island, plus your home page.
|
|
20
|
+
|
|
21
|
+
| file | what it is |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `wix/config.ts` · `wix/sdk.ts` · `wix/media.ts` · `wix/money.ts` | shared auth seam + helpers (deploy configures; nothing to set) |
|
|
24
|
+
| `wix/forms/types.ts` | the DTOs (`FormDto`, `FormFieldDto`, `FormStep`, `FormRule`, `FormSuccess`, `FormValues`, `FormErrors`, `SubmissionDto`, `SubmitOutcome`) — contracts below |
|
|
25
|
+
| `wix/forms/forms.ts` | `getForm`, `listForms` — the transport; the flattening of the raw schema into `FormFieldDto[]`, the rule evaluation (`applyRules`) and `isClosed` are in `forms-core.ts` beside it (shared with the REST layer) |
|
|
26
|
+
| `wix/forms/submissions.ts` | `uploadFiles`, `createSubmission`, `checkoutUrl` — the transport; `toSubmissionValues`, `submissionErrors`, `formLevelError`, `normalizePhone`, `normalizeUrl`, `SUBMITTED_OK` and the upload PUT are in `submissions-core.ts` beside it (shared with the REST layer) |
|
|
27
|
+
| `wix/forms/form-store.ts` | the form state machine, framework-free (`createFormStore({ formId, initialForm? })` — `getState`/`subscribe` + `setValue`/`setValues`/`validate`/`next`/`previous`/`submit`/`reset`/`setCaptchaToken`, one instance per form on the page); `validateValue`, `FORM_ERROR`, `otherValue`/`otherText`; the hook below binds it to React, every other stack uses it directly |
|
|
28
|
+
| `hooks/forms/useWixForm.ts` | React binding of `form-store.ts` — the whole form as state plus `bind` — contract below |
|
|
29
|
+
| `rest/forms.ts` · `rest/submissions.ts` (skill-side) | the REST twin of the two data files: same exports, same DTOs, over `fetch` with the visitor token — what `--stack static` deploys, and the spec a port reads |
|
|
30
|
+
| `styles/global.css` | the design system: Tailwind v4 + the `@theme` token block (shared across verticals) |
|
|
31
|
+
|
|
32
|
+
There are **no shipped components and no shipped pages** — every control is yours.
|
|
33
|
+
|
|
34
|
+
## What you build — the design job
|
|
35
|
+
|
|
36
|
+
Read the seed plan first: its forms and their fields are what the page renders.
|
|
37
|
+
|
|
38
|
+
1. **A form surface per seeded form** — your layout, your labels' typography, your error
|
|
39
|
+
styling, mapping `form.fields` to controls. **Never name a field in code**: the owner can
|
|
40
|
+
rename, reorder, add or require one from their dashboard, and the page must follow with no
|
|
41
|
+
code change. That is the entire point of this vertical.
|
|
42
|
+
2. **A success state** — the resolved `submit()` IS the confirmation (a visitor cannot read
|
|
43
|
+
submissions back). It carries the owner's submit settings: their thank-you text, a redirect,
|
|
44
|
+
or the checkout of a paid form. Render what it says; never a "check your submissions" link.
|
|
45
|
+
3. **The home page and wherever the form lives** — hero, copy, the form section.
|
|
46
|
+
|
|
47
|
+
Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass).
|
|
48
|
+
|
|
49
|
+
### What a complete form page shows (recommended defaults)
|
|
50
|
+
|
|
51
|
+
Defaults for a brief that says nothing about them; the prompt wins when it asks otherwise.
|
|
52
|
+
|
|
53
|
+
- Every field's `label` visible above or beside its control (`showLabel: false` → `aria-label`
|
|
54
|
+
only); `required` marked the way `form.requiredIndicator` says — `ASTERISK` (an `*`), `TEXT`
|
|
55
|
+
("Required"), `NONE` — before or after the label per `requiredIndicatorBefore`;
|
|
56
|
+
`description` as help text under the control; `placeholder` only where the owner wrote one;
|
|
57
|
+
`readOnly` fields disabled.
|
|
58
|
+
- An error under its own control (`errors[target]`, `id="err-<target>"` so `aria-describedby`
|
|
59
|
+
resolves), the form-level `errors[FORM_ERROR]` above the button; nothing turns red before the
|
|
60
|
+
visitor touched the field or pressed submit.
|
|
61
|
+
- A multi-step form (`form.steps.length > 1`) shows one step at a time — the step's name, a
|
|
62
|
+
progress cue, the fields whose `stepId` is the current step's, a back button (`previousText`)
|
|
63
|
+
from the second step on, and `nextText` instead of the submit button until the last step.
|
|
64
|
+
- The submit button reads `submitText` when set, your wording else; disabled while `loading`.
|
|
65
|
+
- `form === null` renders a skeleton of the section, not an empty `<form>`; `errors[FORM_ERROR]`
|
|
66
|
+
with no form renders the message and nothing else; `closed` renders `form.disabledMessage`
|
|
67
|
+
(or your own "no longer accepting responses" line) instead of the fields.
|
|
68
|
+
- The thank-you replaces the form in place (same section, same width) — the visitor stays where
|
|
69
|
+
they were. When `outcome.message` is set it is the owner's text (render its `\n` as
|
|
70
|
+
paragraphs); when `outcome.durationSeconds` is set the store hides it again by itself.
|
|
71
|
+
- Copy is the owner's: labels, choices, thank-you and closed messages from the schema; no
|
|
72
|
+
invented privacy promises or response-time claims.
|
|
73
|
+
|
|
74
|
+
### The contracts your components consume (tested and work as they are; read the source when something is off or the brief wants more)
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// FormDto — one form, ready to render. In the store's state the owner's rules are ALREADY
|
|
78
|
+
// applied to the current values: `fields` holds only what to render now.
|
|
79
|
+
// { id, name,
|
|
80
|
+
// fields: FormFieldDto[],
|
|
81
|
+
// steps: [{ id, name, targets }], // one entry on a plain form; targets = visible fields on that step
|
|
82
|
+
// rules, // the owner's rules — the store evaluates them; a page never does
|
|
83
|
+
// submitText, nextText, previousText, // "" ⇒ write your own
|
|
84
|
+
// enabled, disabledMessage, // enabled: false ⇒ show disabledMessage instead of the form
|
|
85
|
+
// limits: { deadline?, maxSubmissions?, perVisitor? }, // deadline closes the form client-side too
|
|
86
|
+
// requiredIndicator: "ASTERISK" | "TEXT" | "NONE", requiredIndicatorBefore,
|
|
87
|
+
// success: { action, message?, durationSeconds?, redirectUrl?, newTab? } } // the owner's submit settings
|
|
88
|
+
|
|
89
|
+
// FormFieldDto — one input, flattened (settings nest 2 levels deep upstream)
|
|
90
|
+
// { target, // the input's name, the key in values, the root of error keys
|
|
91
|
+
// label, showLabel, // never empty; rich-content labels already flattened to text
|
|
92
|
+
// control, // text|textarea|password|number|rating|email|phone|url|date|time|datetime
|
|
93
|
+
// // |select|radio|checkbox|checkboxGroup|tags|address|file|signature
|
|
94
|
+
// // |payment|appointment|unknown
|
|
95
|
+
// required, readOnly, hidden, stepId,
|
|
96
|
+
// placeholder?, description?,
|
|
97
|
+
// defaultValue, // "" | [] | {} | false | the owner's prefill — already the right SHAPE
|
|
98
|
+
// choices: [{ value, label, imageUrl? }], // select/radio/checkboxGroup/tags — else []; after a rule: the allowed subset
|
|
99
|
+
// otherOption?: { label, placeholder? }, // a free-text "Other" entry — see below
|
|
100
|
+
// addressParts: [{ sub, label, required, choices? }], // address — `country` first; the rest per chosen country
|
|
101
|
+
// validation: { format?, minLength?, maxLength?, pattern?, patternMessage?, minimum?, maximum?,
|
|
102
|
+
// multipleOf?, minDate?, maxDate?, fileLimit?, fileFormats?, accept?, minItems?,
|
|
103
|
+
// maxItems?, mustBeTrue?, allowedCountryCodes? }, // resolved: minDate is a real date
|
|
104
|
+
// phoneCountry?, buttonText?, explanationText?,
|
|
105
|
+
// identifier, // TEXT_AREA, IMAGE_CHOICE, CONTACTS_EMAIL, CONTACTS_BIRTHDATE, CONTACTS_SUBSCRIBE …
|
|
106
|
+
// inputType, componentType }
|
|
107
|
+
|
|
108
|
+
// SubmitOutcome — what a successful submit() resolves to (and `outcome` in state)
|
|
109
|
+
// { submission: { id, status, checkoutId? },
|
|
110
|
+
// action: "CHECKOUT" | "THANK_YOU_MESSAGE" | "REDIRECT" | "POPUP" | "NO_ACTION",
|
|
111
|
+
// message?, durationSeconds?, // THANK_YOU_MESSAGE: the owner's text
|
|
112
|
+
// url?, newTab? } // CHECKOUT / REDIRECT: navigate there
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
// useWixForm(formId, { initialForm? })
|
|
117
|
+
// → { form, // FormDto | null — null while loading; render a skeleton, not an empty form
|
|
118
|
+
// values, // target → value; arrays for multi-choice/files, objects for an address
|
|
119
|
+
// setValues, // setValues(v => ({ ...v, [target]: next }))
|
|
120
|
+
// bind, // spread onto a text-ish control: <input {...bind(f.target)} />
|
|
121
|
+
// submit, // onSubmit handler; resolves the SubmitOutcome when the submission was created, false else
|
|
122
|
+
// validate, // validate(target) | validate("addr/city") | validate() for the whole form
|
|
123
|
+
// errors, // target (or target/sub) → visitor-facing message; errors[FORM_ERROR] is form-level
|
|
124
|
+
// loading, // loading the schema, or submitting
|
|
125
|
+
// step, next, previous, goToStep, // multi-step; next(event) validates the current step first
|
|
126
|
+
// closed, // the form is off or past its deadline — show form.disabledMessage
|
|
127
|
+
// outcome, reset, // the last success (thank-you / url), and how to dismiss it
|
|
128
|
+
// setCaptchaToken } // hand a captcha widget's token to the next submit
|
|
129
|
+
|
|
130
|
+
// createFormStore({ formId, initialForm? }) — the same machine without React (lib, static, a port):
|
|
131
|
+
// getState() → { form, values, errors, loading, step, closed, outcome }; subscribe(fn); start() once
|
|
132
|
+
// mounted (loads the schema unless initialForm was given); stop() on unmount; setValue(target, value);
|
|
133
|
+
// setValues(next | fn); validate(target?) → boolean; next(event?) → boolean; previous(); goToStep(i);
|
|
134
|
+
// setCaptchaToken(token); reset(); submit(event?) → Promise<SubmitOutcome | false>.
|
|
135
|
+
// submit(event) reads event.currentTarget to focus the first invalid control (switching step
|
|
136
|
+
// when it sits on another page) — hand it the native submit event. FORM_ERROR, validateValue,
|
|
137
|
+
// otherValue and otherText are exported next to it.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`bind` covers input / textarea / select. A **checkbox or radio group** carries `checked`
|
|
141
|
+
instead of `value`, and a **file input cannot be controlled at all** — wire those by hand,
|
|
142
|
+
keeping the same `name`, `onBlur: () => validate(target)` and `aria-describedby` contract.
|
|
143
|
+
|
|
144
|
+
### Which control each field kind wants
|
|
145
|
+
|
|
146
|
+
| `control` | render |
|
|
147
|
+
|---|---|
|
|
148
|
+
| `text` `email` `url` `phone` `password` | `<input>` with the matching `type` — spread `bind`. A `url` gets `https://` prefixed on blur when typed as a bare domain; a `phone` shows `phoneCountry` as the example and, with `validation.allowedCountryCodes`, only those countries in a selector |
|
|
149
|
+
| `textarea` | `<textarea>` — spread `bind` |
|
|
150
|
+
| `number` `rating` | `<input type="number" min max step={validation.multipleOf}>`, or your own star control writing 1–5 |
|
|
151
|
+
| `date` `time` `datetime` | `<input type="date" / "time" / "datetime-local" min={validation.minDate} max={validation.maxDate}>` — the store adds the seconds Wix expects |
|
|
152
|
+
| `select` | `<select>` over `choices` — spread `bind` |
|
|
153
|
+
| `radio` | one `<input type="radio">` per choice, all sharing `name={f.target}` |
|
|
154
|
+
| `checkbox` | a single `<input type="checkbox">`; its value is a **boolean**. `identifier === "CONTACTS_SUBSCRIBE"` is the marketing opt-in — unchecked by default, never pre-ticked |
|
|
155
|
+
| `checkboxGroup` `tags` | one checkbox per choice; the value is an **array** of chosen values. `identifier === "IMAGE_CHOICE"` ⇒ each choice has `imageUrl` — render a picture tile per choice |
|
|
156
|
+
| `address` | one control per `addressParts` entry — `country` is a `<select>` over its `choices` (ISO-2 codes, labelled) and comes first; the value is an **object** keyed by `sub`, and its error keys are `target/sub`. The parts follow the chosen country (Wix's per-country templates: Israel has a street name and number and no state; the US one address line and a state), so render from `f.form.fields` on every pass, never from a copy taken at mount. A `subdivision` part with `choices` is a `<select>` (its label is the country's own word: State, Province, Region); without `choices` it is a text input |
|
|
157
|
+
| `file` `signature` | `<input type="file" accept={validation.accept} multiple={validation.fileLimit > 1}>` (uncontrolled) — put the `File` objects in `values[target]`; the store uploads them on submit. Button wording from `buttonText`; a signature is an image the visitor draws or uploads |
|
|
158
|
+
| `payment` `appointment` `unknown` | out of scope for a plain form — a payment field needs the payment flow, an appointment field needs the `bookings` vertical. Render a disabled note rather than an input that submits the wrong thing |
|
|
159
|
+
|
|
160
|
+
**An "Other" choice.** When `otherOption` is set, render one extra radio / checkbox labelled
|
|
161
|
+
`otherOption.label` with a text input beside it; write `otherValue(field, text)` into the value
|
|
162
|
+
(for a group: into the array) — that is the `"Other: <text>"` string Wix stores — and read it
|
|
163
|
+
back with `otherText(field, value)`.
|
|
164
|
+
|
|
165
|
+
**Hidden fields and rules.** A field the owner hid, or a rule hides for the current values, is
|
|
166
|
+
not in `form.fields` — the store re-derives the list on every `setValue`, clears the value of a
|
|
167
|
+
field a rule just hid, and never validates or submits it. A rule can also make a field required
|
|
168
|
+
or narrow its `choices`; render from the current `form.fields` on every render and it all
|
|
169
|
+
follows.
|
|
170
|
+
|
|
171
|
+
### The page and island you create — skeletons
|
|
172
|
+
|
|
173
|
+
The class names here are the Astro/React spelling of rules that hold on every stack; on a
|
|
174
|
+
stack where the hook doesn't deploy, keep the rule and write it in your own CSS. Hooks first,
|
|
175
|
+
branches after (an early return above a hook changes hook order between renders and React
|
|
176
|
+
throws). The island renders on the server too (`client:load` SSRs) — render every state
|
|
177
|
+
totally; nothing in a render path may throw.
|
|
178
|
+
|
|
179
|
+
```astro
|
|
180
|
+
---
|
|
181
|
+
// src/pages/contact.astro — YOU create it. The schema is fetched SERVER-SIDE so the first paint
|
|
182
|
+
// has the fields, and handed to the island as a serialized DTO prop.
|
|
183
|
+
import SiteLayout from "../layouts/SiteLayout.astro";
|
|
184
|
+
import ContactForm from "../components/forms/ContactForm";
|
|
185
|
+
import { getForm } from "../wix/forms/forms";
|
|
186
|
+
import type { FormDto } from "../wix/forms/types";
|
|
187
|
+
|
|
188
|
+
const FORM_ID = "…"; // from the seed result (seed-result.json → forms[].formId)
|
|
189
|
+
let form: FormDto | null = null;
|
|
190
|
+
try {
|
|
191
|
+
form = await getForm(FORM_ID);
|
|
192
|
+
} catch {
|
|
193
|
+
// Guarded: an unhandled SSR throw truncates the response mid-stream; the island loads the
|
|
194
|
+
// schema itself and shows the real error if it fails again.
|
|
195
|
+
}
|
|
196
|
+
---
|
|
197
|
+
<SiteLayout title="Contact">
|
|
198
|
+
<!-- your heading / intro, then: -->
|
|
199
|
+
<ContactForm client:load formId={FORM_ID} initialForm={form ?? undefined} />
|
|
200
|
+
</SiteLayout>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
```tsx
|
|
204
|
+
// src/components/forms/ContactForm.tsx — YOU build it; contact.astro mounts it.
|
|
205
|
+
import { useWixForm, FORM_ERROR } from "../../hooks/forms/useWixForm";
|
|
206
|
+
import type { FormDto } from "../../wix/forms/types";
|
|
207
|
+
|
|
208
|
+
export default function ContactForm({ formId, initialForm }: { formId: string; initialForm?: FormDto }) {
|
|
209
|
+
const f = useWixForm(formId, { initialForm }); // no second fetch when initialForm is passed
|
|
210
|
+
// …you implement the render:
|
|
211
|
+
// • f.outcome → the success state, in place of the form: f.outcome.message (the owner's
|
|
212
|
+
// thank-you, "\n" = paragraph) or your own wording; when f.outcome.url is set navigate there —
|
|
213
|
+
// window.location.assign(url) for CHECKOUT and a same-tab REDIRECT, window.open(url) when newTab.
|
|
214
|
+
// A paid form (action CHECKOUT) MUST be sent on: the order is waiting for payment.
|
|
215
|
+
// • f.errors[FORM_ERROR] && !f.form → the message alone (a form that can't load is a setup problem)
|
|
216
|
+
// • !f.form → a skeleton of the section
|
|
217
|
+
// • f.closed → f.form.disabledMessage || your "no longer accepting responses" line, no fields
|
|
218
|
+
// • else <form noValidate onSubmit={async (e) => { await f.submit(e); }}>
|
|
219
|
+
// (the outcome lands in f.outcome; a false return means errors are set)
|
|
220
|
+
// const step = f.form.steps[f.step]; const last = f.step === f.form.steps.length - 1;
|
|
221
|
+
// const fields = f.form.fields.filter((x) => x.stepId === step.id); // one step at a time
|
|
222
|
+
// mapping fields to controls per the table above — text-ish: <input type=… {...f.bind(field.target)} />;
|
|
223
|
+
// groups/checkbox/file by hand with the same name / onBlur / aria contract; the error for a
|
|
224
|
+
// control in <p id={`err-${field.target}`}>{f.errors[field.target]}</p>; address subfield
|
|
225
|
+
// errors under f.errors[`${field.target}/${sub}`]; f.errors[FORM_ERROR] above the buttons;
|
|
226
|
+
// f.step > 0 && <button type="button" onClick={f.previous}>{f.form.previousText || "Back"}</button>
|
|
227
|
+
// last ? <button type="submit" disabled={f.loading}>{f.form.submitText || your wording}</button>
|
|
228
|
+
// : <button type="button" onClick={(e) => f.next(e)}>{f.form.nextText || "Continue"}</button>
|
|
229
|
+
// (hand next() the event of the <form>, or call f.next() with none — it focuses the first
|
|
230
|
+
// invalid control of the current step; a single-step form has no next button at all.)
|
|
231
|
+
// noValidate: the store validates in Wix's wording and focuses the first invalid control —
|
|
232
|
+
// the browser's bubbles would race it.
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### The reference files for stacks where the components don't deploy
|
|
237
|
+
|
|
238
|
+
On `lib`, `static`, and a port, nothing under `hooks/` arrives — and this vertical ships nothing
|
|
239
|
+
under `components/` on any stack. The state machine behind the hook does arrive —
|
|
240
|
+
`wix/forms/form-store.ts` — so you never rewrite it: `createFormStore` per form, `subscribe`,
|
|
241
|
+
render from `getState()`, call its actions. Its `FormState` interface is the render contract;
|
|
242
|
+
read that. What you write is the rendering, and one shipped file is worth reading first:
|
|
243
|
+
|
|
244
|
+
1. `hooks/forms/useWixForm.ts` — `bind`: the exact props a text-ish control gets (`name`,
|
|
245
|
+
`value`, change → `setValue`, blur → `validate(target)`, `aria-describedby="err-<target>"`,
|
|
246
|
+
`aria-invalid`), and how a change of `formId` gets a fresh store. Your framework's controls
|
|
247
|
+
follow the same contract.
|
|
248
|
+
|
|
249
|
+
The control table above is the spec for everything else. Under `templates/forms/app/`.
|
|
250
|
+
|
|
251
|
+
### Wiring — Astro (default)
|
|
252
|
+
|
|
253
|
+
1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass).
|
|
254
|
+
2. Create the form page and its island per the skeletons above — frontmatter machinery exact,
|
|
255
|
+
presentation yours. Fetch in frontmatter so the first paint has the schema; the island calls
|
|
256
|
+
`useWixForm(formId, { initialForm })` — no second fetch, no loading flash.
|
|
257
|
+
3. Write `pages/index.astro` (home) on `SiteLayout`.
|
|
258
|
+
|
|
259
|
+
### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
|
|
260
|
+
|
|
261
|
+
Read the reference file listed above before writing the surface.
|
|
262
|
+
|
|
263
|
+
`deploy.mjs forms --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts` (the
|
|
264
|
+
visitor client, configured with the public client id), `media.ts`, `money.ts`, and `wix/forms/` —
|
|
265
|
+
`forms.ts`, `submissions.ts`, `types.ts`, the two `*-core.ts` rule files, and `form-store.ts`.
|
|
266
|
+
None of it is React. The hook doesn't ship on this stack; the store replaces it, and you write
|
|
267
|
+
the controls in your framework to the contracts on this page:
|
|
268
|
+
|
|
269
|
+
- bind the store with your framework's external-store primitive (Vue: `shallowRef` updated in
|
|
270
|
+
`subscribe`; Svelte: `readable(store.getState(), (set) => store.subscribe(() => set(store.getState())))`;
|
|
271
|
+
Solid: a signal set in `subscribe`). `createFormStore({ formId })` per form (`start()` when
|
|
272
|
+
mounted, `stop()` when unmounted). State in, actions out — exactly the hook's contract above;
|
|
273
|
+
- a control's change handler calls `setValue(target, value)` (a checkbox group: the array of
|
|
274
|
+
checked values; a file input: `[...input.files]`), blur calls `validate(target)`, the
|
|
275
|
+
`<form>`'s submit handler calls `submit(event)` and renders `getState().outcome` (navigating
|
|
276
|
+
to its `url` when set); a multi-step form calls `next(event)` / `previous()` and renders the
|
|
277
|
+
fields of `form.steps[step]`.
|
|
278
|
+
|
|
279
|
+
Route `/contact` (or wherever the form lives); dev server on 4321; a static build goes through
|
|
280
|
+
`npx @wix/cli@latest release` with `site.outputDirectory` pointing at the build folder, an SSR
|
|
281
|
+
build is hosted by you.
|
|
282
|
+
|
|
283
|
+
### Wiring — static site (`--stack static`, no bundler)
|
|
284
|
+
|
|
285
|
+
Read the reference file listed above before writing the surface.
|
|
286
|
+
|
|
287
|
+
`deploy.mjs forms --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM,
|
|
288
|
+
the `.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` —
|
|
289
|
+
pages, styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project
|
|
290
|
+
root (config, plan, seed output) is never the upload. Same function names and DTOs as the table
|
|
291
|
+
above, so the contracts on this page hold unchanged: `getForm`, `listForms` from
|
|
292
|
+
`./js/wix/forms.js`; `uploadFiles`, `createSubmission`, `checkoutUrl`, `toSubmissionValues`,
|
|
293
|
+
`submissionErrors` from `./js/wix/submissions.js`. The state machine ships too: `createFormStore`
|
|
294
|
+
from `./js/wix/form-store.js` (`start()` once the page is up; `setValue`, `validate`, `next`,
|
|
295
|
+
`previous`, `submit`; `FORM_ERROR` beside it). No hook, no components — you write the rendering
|
|
296
|
+
in plain JS: build the controls when `getState().form` arrives (one element per `form.fields`
|
|
297
|
+
entry, `name` = `target`, `input` → `setValue`, `blur` → `validate(target)`), and on later
|
|
298
|
+
notifications update only the error text, `aria-invalid`, the button's disabled state, and
|
|
299
|
+
which fields are present (a rule can add or remove one; compare targets and add/remove only
|
|
300
|
+
those) — rebuilding every input on each keystroke drops focus. `<form novalidate>` with
|
|
301
|
+
`onsubmit = (e) => store.submit(e).then(out => out && showOutcome(out))`; `submit` reads the
|
|
302
|
+
native event's `currentTarget` to focus the first invalid control. Wix static hosting serves
|
|
303
|
+
files, not directories: the page is `contact.html`, linked as such. The visitor token persists
|
|
304
|
+
in `localStorage` on its own; never mint per page. The page's title and meta description are
|
|
305
|
+
yours (a form is not an entity page; there is no `seoData`). `npx @wix/cli@latest release`
|
|
306
|
+
uploads `site/`.
|
|
307
|
+
|
|
308
|
+
### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
|
|
309
|
+
|
|
310
|
+
Read the reference file listed above before writing the surface.
|
|
311
|
+
|
|
312
|
+
Run `deploy.mjs forms --stack static` in the project folder anyway: `js/wix/` is both the
|
|
313
|
+
browser-side code and the readable spec. Then split by where the call runs. **The schema on the
|
|
314
|
+
server:** port `js/wix/forms.ts` and `forms-core.ts` to your language — `getForm` is one GET with
|
|
315
|
+
the visitor token, `toForm` is the flattening — and render the fields in your template (labels,
|
|
316
|
+
required marks, choices, the same `name` = `target`), so the form is in the HTML; one anonymous
|
|
317
|
+
visitor token per process for this public read (mint and refresh per `client.ts`). **Values,
|
|
318
|
+
rules, validation and the submit in the browser:** load `./js/wix/form-store.js` in the template
|
|
319
|
+
and drive the rendered controls through `createFormStore({ formId })` exactly as the static wiring
|
|
320
|
+
above — the browser owns the visitor's token, so the server never handles per-visitor tokens or
|
|
321
|
+
submissions. If the submit must run server-side anyway (no JS), port `submissions.ts` +
|
|
322
|
+
`submissions-core.ts` and `client.ts`'s header applies: one token set per visitor in the visitor's
|
|
323
|
+
session, never one process-wide token. Add your public https origin to the OAuth app's allowed
|
|
324
|
+
domains.
|
|
325
|
+
|
|
326
|
+
**Pre-rendered (Frozen-Flask, Pelican, any static-site generator) → Wix-hosted.** Same port for
|
|
327
|
+
the schema read, run at build time with one anonymous token; the generator emits the form page
|
|
328
|
+
with the fields in the HTML. Run `deploy.mjs forms --stack static --out <build dir>` so `js/wix/`
|
|
329
|
+
is inside the output the page imports from, point `site.outputDirectory` at that folder, `wix
|
|
330
|
+
release`. Pages sit at different depths: give the templates one base path to `js/wix/` (a
|
|
331
|
+
template variable, or root-relative `/js/wix/…`), never a relative `./js/wix/` — it breaks one
|
|
332
|
+
level down. The rendered fields are the first paint; values, validation and the submit still run
|
|
333
|
+
client-side through `createFormStore()` from `./js/wix/form-store.js`, exactly as on a static
|
|
334
|
+
site. Close with the rebuild + release command and one line for the owner: a field renamed or
|
|
335
|
+
added in the dashboard reaches the rendered HTML when that command runs; the submit is live
|
|
336
|
+
regardless.
|
|
337
|
+
|
|
338
|
+
### Wiring — React SPA (Vite etc.)
|
|
339
|
+
|
|
340
|
+
Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite config
|
|
341
|
+
plugins — deploy already added the dep). `useWixForm(FORM_ID)` with no `initialForm`; render a
|
|
342
|
+
skeleton while `form` is null. Deploy wrote the public client id into `wix/config.ts`; nothing
|
|
343
|
+
else to configure.
|
|
344
|
+
|
|
345
|
+
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).
|
|
346
|
+
|
|
347
|
+
## Hard rules
|
|
348
|
+
|
|
349
|
+
- **Never name a field in code.** Map `form.fields`. A page with `values.email` hardcoded
|
|
350
|
+
breaks the moment the owner renames or removes that field — and the owner editing fields
|
|
351
|
+
without a code change is what this vertical is for.
|
|
352
|
+
- **Never build a form without reading the schema.** A hand-built `<form>` posting to Wix Data
|
|
353
|
+
or an email service silently drops real enquiries and loses the dashboard form builder,
|
|
354
|
+
spam protection, notifications and CRM contact mapping.
|
|
355
|
+
- **Values, rules, validation and the submit go through `useWixForm` / the store** — never call
|
|
356
|
+
the submission API by hand, never re-derive a request shape, never evaluate a rule or validate
|
|
357
|
+
by a field's name. Extend by adding a function in `wix/forms/` for what they don't cover (API
|
|
358
|
+
contracts: the `wix-docs` skill).
|
|
359
|
+
- **The visitor token is enough.** Both the schema read and the submission return 200 on an
|
|
360
|
+
anonymous visitor, even though the spec lists them under owner scopes. Never add a backend,
|
|
361
|
+
a connector token, or `auth.elevate` to make a form work.
|
|
362
|
+
- **Submissions are write-only from a visitor.** Reading them back genuinely 403s. If the app
|
|
363
|
+
must LIST what visitors submitted, that is the `cms` vertical.
|
|
364
|
+
- **All three success statuses are a success** — `CONFIRMED`, `PENDING`, `PAYMENT_WAITING`
|
|
365
|
+
all mean the submission exists. Showing an error instead invites a second submit, and the
|
|
366
|
+
owner gets duplicates for an entry they already have. `PAYMENT_WAITING` additionally means an
|
|
367
|
+
order is waiting: the outcome is `CHECKOUT` with the Wix checkout `url` — navigate the whole
|
|
368
|
+
document there (never an iframe); the visitor comes back to `/` afterwards.
|
|
369
|
+
- **The owner's submit settings win.** `outcome.message` is their thank-you, `outcome.url` their
|
|
370
|
+
redirect — render or follow them; your own wording is the fallback for `NO_ACTION` / `POPUP`.
|
|
371
|
+
- **Attachments are uploaded, never inlined.** The store uploads each `File` and submits
|
|
372
|
+
`[{ fileId, displayName, fileType, url }]` per file field, as Wix's own runtime does. If a
|
|
373
|
+
live submit with a file ever answers a violation on that field, that is the one place to
|
|
374
|
+
look: the value shape in `submissions-core.ts`, checked against `about-submission-values.md`.
|
|
375
|
+
- **Spam protection is a dashboard setting**, not code. When the server wants a captcha it
|
|
376
|
+
rejects with `INVALID_CAPTCHA` (the store shows it form-level); a site that needs one mounts
|
|
377
|
+
a captcha widget and passes its token through `setCaptchaToken` — nothing ships for it.
|
|
378
|
+
- **Never mock, fail loudly.** A form that cannot load is a setup problem — surface it; never
|
|
379
|
+
fall back to a hand-built form. A closed form (`closed`) is not an error: it renders the
|
|
380
|
+
owner's message.
|
|
381
|
+
- Don't wrap shipped calls in your own API routes — they run client-side by design.
|
|
382
|
+
- Where the shipped code deploys (Astro, React): theme via the `@theme` tokens, and your markup
|
|
383
|
+
uses Tailwind utilities on the same tokens — one design system. Where it doesn't (`lib`,
|
|
384
|
+
`static`, a port): style with whatever your stack does well, on one token set of your own.
|
|
385
|
+
- **Call every hook before any conditional return.** An island that returns early for the
|
|
386
|
+
skeleton or the thank-you above `useWixForm`/`useState` changes hook order between renders and
|
|
387
|
+
React throws. Hooks first, branches after.
|
|
388
|
+
|
|
389
|
+
## Point the user to their dashboard
|
|
390
|
+
|
|
391
|
+
Hand the owner these links — `{siteId}` is `siteId` in `wix.config.json` (the deploy JSON prints it as
|
|
392
|
+
`dashboardUrl`); `{formId}` is the id the seed result returned.
|
|
393
|
+
|
|
394
|
+
| page | `https://manage.wix.com/dashboard/{siteId}/` + |
|
|
395
|
+
|---|---|
|
|
396
|
+
| Forms list | `wix-forms` |
|
|
397
|
+
| Edit the form (fields, steps, rules, submit settings, limits, notifications) | `wix-forms/form/{formId}` |
|
|
398
|
+
| Its submissions | `wix-forms/form/{formId}/submissions` |
|
|
399
|
+
|
|
400
|
+
Say so when you hand the site over — the whole value of this vertical is that their edits land on the
|
|
401
|
+
site with no code change: a renamed field, a new step, a "show when" rule, a changed thank-you, a
|
|
402
|
+
closing date. Submissions are per form; there is no site-wide submissions page.
|
|
403
|
+
|
|
404
|
+
## Seeding
|
|
405
|
+
|
|
406
|
+
`seed/SEED.md` is the contract: a plain-data plan in, created forms out. Read it when drafting
|
|
407
|
+
the plan; the seed writes the form ids your pages import.
|
|
408
|
+
|
|
409
|
+
**Build the UI only after the seed has run** — the form id comes from it, and the field set
|
|
410
|
+
you are rendering is the one it created.
|
|
411
|
+
|
|
412
|
+
**File uploads are plan-gated.** A `file` field is created only on a paid site plan; on a free site
|
|
413
|
+
the seed stops with `FILE_UPLOAD_RESTRICTIONS_ERROR` and names the field. Two ways out, the owner's
|
|
414
|
+
choice unless the brief already decided: they upgrade the site and the same plan re-runs, or the field
|
|
415
|
+
becomes a `url` kind plus a `capabilities.mediaUpload` policy (Astro only) — the site uploads the file
|
|
416
|
+
through the shared endpoint (`wix/media-upload/client.ts`) and submits the file's URL as that field's
|
|
417
|
+
value. The closing message says which one shipped.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// React binding of the form store (wix/forms/form-store.ts) — schema in, validated submission
|
|
2
|
+
// out, minus the markup; the state machine lives there, framework-free. This hook subscribes to
|
|
3
|
+
// one store per mounted form and exposes its state and actions under one name, plus `bind` (the
|
|
4
|
+
// props a text-ish control spreads). Astro islands and React SPAs use this; a static page, Vue,
|
|
5
|
+
// or Svelte uses the store directly.
|
|
6
|
+
//
|
|
7
|
+
// This vertical ships no components: a form is schema-driven (the owner picks the fields), so
|
|
8
|
+
// every form has a different field set and no "contact form" component could ship for it. You
|
|
9
|
+
// render `form.fields`; see templates/forms/INSTRUCTIONS.md.
|
|
10
|
+
//
|
|
11
|
+
// SSR-friendly: pass a server-fetched FormDto as `initialForm` (Astro frontmatter) and no
|
|
12
|
+
// client fetch happens; a SPA passes nothing and the hook loads it.
|
|
13
|
+
import { useCallback, useEffect, useRef, useSyncExternalStore } from "react";
|
|
14
|
+
import { createFormStore, type FormStore, type FormSubmitEvent } from "../../wix/forms/form-store";
|
|
15
|
+
import type { FormDto, FormErrors, FormValues, SubmitOutcome } from "../../wix/forms/types";
|
|
16
|
+
|
|
17
|
+
export { FORM_ERROR, otherText, otherValue, validateValue } from "../../wix/forms/form-store";
|
|
18
|
+
|
|
19
|
+
export interface UseWixFormOptions {
|
|
20
|
+
/** Server-fetched form (Astro frontmatter) — skips the client fetch entirely. */
|
|
21
|
+
initialForm?: FormDto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface UseWixForm {
|
|
25
|
+
/**
|
|
26
|
+
* null while the schema is loading — render a skeleton, not an empty form. Loaded: the owner's
|
|
27
|
+
* rules are applied to the current values, so `form.fields` is exactly what to render now.
|
|
28
|
+
*/
|
|
29
|
+
form: FormDto | null;
|
|
30
|
+
/** `target` → current value. Arrays for multi-choice and files, objects for an address. */
|
|
31
|
+
values: FormValues;
|
|
32
|
+
setValues: (next: FormValues | ((prev: FormValues) => FormValues)) => void;
|
|
33
|
+
/** Props for a text-ish control, ready to spread: `<input {...bind("email_a1")} />`. */
|
|
34
|
+
bind: (target: string) => {
|
|
35
|
+
name: string;
|
|
36
|
+
value: string;
|
|
37
|
+
onChange: (e: { target: { value: string } }) => void;
|
|
38
|
+
onBlur: () => void;
|
|
39
|
+
"aria-describedby": string;
|
|
40
|
+
"aria-invalid": true | undefined;
|
|
41
|
+
};
|
|
42
|
+
/** `onSubmit`. Resolves the outcome when the submission was created — that IS the success signal; false when it did not send. */
|
|
43
|
+
submit: (event?: FormSubmitEvent) => Promise<SubmitOutcome | false>;
|
|
44
|
+
/** One field, one address subfield, or the whole form when called with nothing. */
|
|
45
|
+
validate: (target?: string) => boolean;
|
|
46
|
+
errors: FormErrors;
|
|
47
|
+
/** Loading the schema, or submitting. */
|
|
48
|
+
loading: boolean;
|
|
49
|
+
/** Multi-step: the index into `form.steps` being shown, and the moves. `next` validates the current step first. */
|
|
50
|
+
step: number;
|
|
51
|
+
next: (event?: FormSubmitEvent) => boolean;
|
|
52
|
+
previous: () => void;
|
|
53
|
+
goToStep: (index: number) => void;
|
|
54
|
+
/** The form is switched off or past its deadline: render `form.disabledMessage` instead of the fields. */
|
|
55
|
+
closed: boolean;
|
|
56
|
+
/** The last successful submit (render the thank-you / navigate to `url`), until `reset()` or the owner's auto-hide. */
|
|
57
|
+
outcome: SubmitOutcome | null;
|
|
58
|
+
reset: () => void;
|
|
59
|
+
/** Hand a captcha widget's token to the next submit. */
|
|
60
|
+
setCaptchaToken: (token: string | null) => void;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function useWixForm(formId: string, options: UseWixFormOptions = {}): UseWixForm {
|
|
64
|
+
const { initialForm } = options;
|
|
65
|
+
const ref = useRef<{ formId: string; store: FormStore } | null>(null);
|
|
66
|
+
if (!ref.current || ref.current.formId !== formId) ref.current = { formId, store: createFormStore({ formId, initialForm }) };
|
|
67
|
+
const store = ref.current.store;
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
store.start();
|
|
70
|
+
return () => store.stop();
|
|
71
|
+
}, [store]);
|
|
72
|
+
const state = useSyncExternalStore(store.subscribe, store.getState, store.getState);
|
|
73
|
+
const { values, errors } = state;
|
|
74
|
+
|
|
75
|
+
// Covers input / textarea / select. A checkbox or radio group carries `checked` instead of
|
|
76
|
+
// `value`, and a file input cannot be controlled at all — wire those by hand, keeping the
|
|
77
|
+
// same `name`, `onBlur` and aria contract.
|
|
78
|
+
const bind = useCallback(
|
|
79
|
+
(target: string) => ({
|
|
80
|
+
name: target,
|
|
81
|
+
value: String(values[target] ?? ""),
|
|
82
|
+
onChange: (e: { target: { value: string } }) => store.setValue(target, e.target.value),
|
|
83
|
+
onBlur: () => store.validate(target),
|
|
84
|
+
"aria-describedby": `err-${target}`,
|
|
85
|
+
"aria-invalid": errors[target] ? (true as const) : undefined,
|
|
86
|
+
}),
|
|
87
|
+
[values, errors, store],
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
form: state.form,
|
|
92
|
+
values,
|
|
93
|
+
setValues: store.setValues,
|
|
94
|
+
bind,
|
|
95
|
+
submit: store.submit,
|
|
96
|
+
validate: store.validate,
|
|
97
|
+
errors,
|
|
98
|
+
loading: state.loading,
|
|
99
|
+
step: state.step,
|
|
100
|
+
next: store.next,
|
|
101
|
+
previous: store.previous,
|
|
102
|
+
goToStep: store.goToStep,
|
|
103
|
+
closed: state.closed,
|
|
104
|
+
outcome: state.outcome,
|
|
105
|
+
reset: store.reset,
|
|
106
|
+
setCaptchaToken: store.setCaptchaToken,
|
|
107
|
+
};
|
|
108
|
+
}
|