@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,341 @@
|
|
|
1
|
+
// The shop listing as a framework-free store — the logic behind useShop, usable from React
|
|
2
|
+
// (useShop wraps it with useSyncExternalStore), from a static page or Vue/Svelte (subscribe and
|
|
3
|
+
// render), or as the specification for a port. Same shape as cart-store.ts: state, actions,
|
|
4
|
+
// subscribe/getState, emit after every change.
|
|
5
|
+
//
|
|
6
|
+
// Category, sort, price/stock/search filters, option facets, and cursor paging are all applied
|
|
7
|
+
// by Wix across the whole catalog (searchCatalog), never to a page already in hand. A changed
|
|
8
|
+
// selection starts a fresh cursor chain; a late response from a superseded query is dropped. The
|
|
9
|
+
// previous page stays on screen (with `loading: true`) while the new one loads — skeletons only
|
|
10
|
+
// when there is nothing to show yet.
|
|
11
|
+
//
|
|
12
|
+
// Facet picks are kept PER FACET: choices inside one facet OR together, facets AND together
|
|
13
|
+
// ("Red or Blue, and Large"), exactly as Wix's own storefront filters; a linked choice's children
|
|
14
|
+
// ride along with it.
|
|
15
|
+
//
|
|
16
|
+
// SSR-friendly: seed with `initialProducts`/`initialCategories` and they render at once; `start()`
|
|
17
|
+
// then revalidates the first page to open the cursor chain, replacing the seed without a
|
|
18
|
+
// skeleton flash. `initialCategoryId` scopes the first query (a /category/[slug] page).
|
|
19
|
+
//
|
|
20
|
+
// URL state: sort, filters, facet choices (and a live category switch on /shop) are read from the
|
|
21
|
+
// query string by `start()` and written back with replaceState after every change — a filtered
|
|
22
|
+
// gallery is a link a shopper can share, reload, and step back to. Paging stays out of the URL.
|
|
23
|
+
//
|
|
24
|
+
// One store per mounted listing (a page can hold a shop and a featured rail): createShopStore(),
|
|
25
|
+
// not a singleton. The cart store is a singleton because the cart is one per visitor.
|
|
26
|
+
import { CATALOG_SORTS, fetchCategories, fetchFacetData, searchCatalog, type CatalogSort, type FacetSelection } from "./catalog";
|
|
27
|
+
import { expandFacetChoiceIds } from "./catalog-core";
|
|
28
|
+
import type { Category, Facet, PriceRange, ProductSummary } from "./types";
|
|
29
|
+
|
|
30
|
+
export const SORTS = CATALOG_SORTS;
|
|
31
|
+
|
|
32
|
+
export interface ShopFilters {
|
|
33
|
+
minPrice?: number | string;
|
|
34
|
+
maxPrice?: number | string;
|
|
35
|
+
inStockOnly?: boolean;
|
|
36
|
+
/** Name search, max 100 chars. */
|
|
37
|
+
search?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ShopStoreOptions {
|
|
41
|
+
initialProducts?: ProductSummary[];
|
|
42
|
+
initialCategories?: Category[];
|
|
43
|
+
/** Scope the listing to one category from the first render (a /category/[slug] page). */
|
|
44
|
+
initialCategoryId?: string | null;
|
|
45
|
+
pageSize?: number;
|
|
46
|
+
/** Mirror the selection into the query string (default true; off for a rail that isn't the page's subject). */
|
|
47
|
+
syncUrl?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Everything a listing surface renders from. Read it with getState() or through a subscription. */
|
|
51
|
+
export interface ShopState {
|
|
52
|
+
/**
|
|
53
|
+
* null while the FIRST load is in flight — render skeletons. During a later selection change the
|
|
54
|
+
* previous page stays here with `loading: true` (dim it, don't blank it).
|
|
55
|
+
*/
|
|
56
|
+
products: ProductSummary[] | null;
|
|
57
|
+
/** Matching products across the whole catalog for the current selection; null until known. */
|
|
58
|
+
total: number | null;
|
|
59
|
+
categories: Category[];
|
|
60
|
+
/** null = "all products". */
|
|
61
|
+
activeCategoryId: string | null;
|
|
62
|
+
sort: CatalogSort;
|
|
63
|
+
filters: ShopFilters;
|
|
64
|
+
/** The filterable customizations of the current scope (Color, Size, a choice modifier…), from the catalog itself. */
|
|
65
|
+
facets: Facet[];
|
|
66
|
+
/** Lowest and highest product price in the scope — the price slider's bounds; null until known or when equal. */
|
|
67
|
+
priceRange: PriceRange | null;
|
|
68
|
+
/** Selected facet choice ids (every facet together) — what the chips and the panel's pressed state read. */
|
|
69
|
+
selectedChoiceIds: string[];
|
|
70
|
+
/** True when any filter or facet is active. */
|
|
71
|
+
hasActiveFilters: boolean;
|
|
72
|
+
/** A query is in flight for the current selection (the products shown may be the previous page's). */
|
|
73
|
+
loading: boolean;
|
|
74
|
+
error: string | null;
|
|
75
|
+
hasMore: boolean;
|
|
76
|
+
loadingMore: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ShopStore {
|
|
80
|
+
getState(): ShopState;
|
|
81
|
+
subscribe(listener: () => void): () => void;
|
|
82
|
+
/** Adopt the URL, fetch categories/facets, open the cursor chain. Call once when mounted (a browser). */
|
|
83
|
+
start(): void;
|
|
84
|
+
/** Stop reacting; drop late responses. */
|
|
85
|
+
stop(): void;
|
|
86
|
+
setActiveCategoryId(id: string | null): void;
|
|
87
|
+
setSort(sort: CatalogSort): void;
|
|
88
|
+
setFilters(filters: ShopFilters): void;
|
|
89
|
+
/** Select / deselect a facet choice (the facet is found from the loaded facets). */
|
|
90
|
+
toggleChoice(choiceId: string): void;
|
|
91
|
+
/** Clears price/stock/search filters and facet selections (keeps category and sort). */
|
|
92
|
+
clearFilters(): void;
|
|
93
|
+
retry(): void;
|
|
94
|
+
loadMore(): Promise<void>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** A pick remembers its facet so the query can group it before the facets are loaded (a shared link). */
|
|
98
|
+
interface SelectedChoice {
|
|
99
|
+
kind: Facet["kind"];
|
|
100
|
+
facetId: string;
|
|
101
|
+
choiceId: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const URL_KEYS = { sort: "sort", min: "min", max: "max", stock: "stock", q: "q", choice: "choice", category: "category" } as const;
|
|
105
|
+
|
|
106
|
+
// choice=<kind>:<facetId>:<choiceId>; a bare choice id (an older link) counts as an option pick.
|
|
107
|
+
const encodeChoice = (s: SelectedChoice): string => `${s.kind}:${s.facetId}:${s.choiceId}`;
|
|
108
|
+
function decodeChoice(token: string): SelectedChoice | null {
|
|
109
|
+
const parts = token.split(":");
|
|
110
|
+
if (parts.length === 3 && (parts[0] === "option" || parts[0] === "modifier") && parts[2]) return { kind: parts[0], facetId: parts[1], choiceId: parts[2] };
|
|
111
|
+
if (parts.length === 1 && parts[0]) return { kind: "option", facetId: "", choiceId: parts[0] };
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function readUrlState(): { sort?: CatalogSort; filters: ShopFilters; selected: SelectedChoice[]; categoryId?: string | null } | null {
|
|
116
|
+
if (typeof window === "undefined") return null;
|
|
117
|
+
const p = new URLSearchParams(window.location.search);
|
|
118
|
+
const sort = p.get(URL_KEYS.sort);
|
|
119
|
+
const filters: ShopFilters = {};
|
|
120
|
+
if (p.get(URL_KEYS.min)) filters.minPrice = p.get(URL_KEYS.min)!;
|
|
121
|
+
if (p.get(URL_KEYS.max)) filters.maxPrice = p.get(URL_KEYS.max)!;
|
|
122
|
+
if (p.get(URL_KEYS.stock) === "1") filters.inStockOnly = true;
|
|
123
|
+
if (p.get(URL_KEYS.q)) filters.search = p.get(URL_KEYS.q)!;
|
|
124
|
+
return {
|
|
125
|
+
sort: sort && sort in CATALOG_SORTS ? (sort as CatalogSort) : undefined,
|
|
126
|
+
filters,
|
|
127
|
+
selected: p.getAll(URL_KEYS.choice).map(decodeChoice).filter((s): s is SelectedChoice => s !== null),
|
|
128
|
+
categoryId: p.has(URL_KEYS.category) ? p.get(URL_KEYS.category) : undefined,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function writeUrlState(s: { sort: CatalogSort; filters: ShopFilters; selected: SelectedChoice[]; activeCategoryId: string | null }, initialCategoryId: string | null): void {
|
|
133
|
+
if (typeof window === "undefined") return;
|
|
134
|
+
const p = new URLSearchParams(window.location.search);
|
|
135
|
+
for (const k of Object.values(URL_KEYS)) p.delete(k);
|
|
136
|
+
if (s.sort !== "featured") p.set(URL_KEYS.sort, s.sort);
|
|
137
|
+
if (s.filters.minPrice != null && s.filters.minPrice !== "") p.set(URL_KEYS.min, String(s.filters.minPrice));
|
|
138
|
+
if (s.filters.maxPrice != null && s.filters.maxPrice !== "") p.set(URL_KEYS.max, String(s.filters.maxPrice));
|
|
139
|
+
if (s.filters.inStockOnly) p.set(URL_KEYS.stock, "1");
|
|
140
|
+
if (s.filters.search?.trim()) p.set(URL_KEYS.q, s.filters.search.trim());
|
|
141
|
+
for (const c of s.selected) p.append(URL_KEYS.choice, encodeChoice(c));
|
|
142
|
+
if (s.activeCategoryId !== initialCategoryId) p.set(URL_KEYS.category, s.activeCategoryId ?? "");
|
|
143
|
+
const qs = p.toString();
|
|
144
|
+
const next = `${window.location.pathname}${qs ? `?${qs}` : ""}${window.location.hash}`;
|
|
145
|
+
if (next !== `${window.location.pathname}${window.location.search}${window.location.hash}`) window.history.replaceState(window.history.state, "", next);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function createShopStore({ initialProducts, initialCategories, initialCategoryId = null, pageSize = 24, syncUrl = true }: ShopStoreOptions = {}): ShopStore {
|
|
149
|
+
// selection
|
|
150
|
+
let activeCategoryId: string | null = initialCategoryId;
|
|
151
|
+
let sort: CatalogSort = "featured";
|
|
152
|
+
let filters: ShopFilters = {};
|
|
153
|
+
let selected: SelectedChoice[] = [];
|
|
154
|
+
let attempt = 0;
|
|
155
|
+
// data
|
|
156
|
+
let categories: Category[] = initialCategories ?? [];
|
|
157
|
+
let facets: Facet[] = [];
|
|
158
|
+
let priceRange: PriceRange | null = null;
|
|
159
|
+
// the current page; `key` is the selection it answers to (null = the SSR seed, no query yet)
|
|
160
|
+
let pageKey: string | null = null;
|
|
161
|
+
let products: ProductSummary[] | null = initialProducts ?? null;
|
|
162
|
+
let total: number | null = null;
|
|
163
|
+
let cursor: string | null = null;
|
|
164
|
+
let hasMore = false;
|
|
165
|
+
let error: string | null = null;
|
|
166
|
+
let loadingMore = false;
|
|
167
|
+
// control
|
|
168
|
+
let started = false;
|
|
169
|
+
let generation = 0;
|
|
170
|
+
let pendingMore: object | null = null;
|
|
171
|
+
const listeners = new Set<() => void>();
|
|
172
|
+
|
|
173
|
+
// The picks grouped per facet, each with its linked children (known once the facets loaded),
|
|
174
|
+
// in a stable order — the query and its key are built from this.
|
|
175
|
+
function facetSelections(): FacetSelection[] {
|
|
176
|
+
const groups = new Map<string, FacetSelection>();
|
|
177
|
+
for (const s of selected) {
|
|
178
|
+
const key = `${s.kind}:${s.facetId}`;
|
|
179
|
+
const g = groups.get(key) ?? { id: s.facetId, kind: s.kind, choiceIds: [] };
|
|
180
|
+
for (const cid of expandFacetChoiceIds(facets.find((f) => f.id === s.facetId), [s.choiceId])) if (!g.choiceIds.includes(cid)) g.choiceIds.push(cid);
|
|
181
|
+
groups.set(key, g);
|
|
182
|
+
}
|
|
183
|
+
return [...groups.values()]
|
|
184
|
+
.map((g) => ({ ...g, choiceIds: [...g.choiceIds].sort() }))
|
|
185
|
+
.sort((a, b) => `${a.kind}:${a.id}`.localeCompare(`${b.kind}:${b.id}`));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const selectionKey = () =>
|
|
189
|
+
JSON.stringify([pageSize, activeCategoryId, sort, filters.minPrice ?? null, filters.maxPrice ?? null, !!filters.inStockOnly, filters.search ?? "", facetSelections(), attempt]);
|
|
190
|
+
|
|
191
|
+
let snapshot: ShopState | null = null;
|
|
192
|
+
const emit = () => {
|
|
193
|
+
snapshot = null;
|
|
194
|
+
for (const fn of listeners) fn();
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
function getState(): ShopState {
|
|
198
|
+
if (snapshot) return snapshot;
|
|
199
|
+
const key = selectionKey();
|
|
200
|
+
const current = pageKey === key;
|
|
201
|
+
const hasActiveFilters =
|
|
202
|
+
selected.length > 0 ||
|
|
203
|
+
!!filters.inStockOnly ||
|
|
204
|
+
(filters.minPrice != null && filters.minPrice !== "") ||
|
|
205
|
+
(filters.maxPrice != null && filters.maxPrice !== "") ||
|
|
206
|
+
!!(filters.search && filters.search.trim());
|
|
207
|
+
snapshot = {
|
|
208
|
+
// the seed or the previous page stays visible while a query runs; null only before anything loaded
|
|
209
|
+
products,
|
|
210
|
+
total: current ? total : null,
|
|
211
|
+
categories,
|
|
212
|
+
activeCategoryId,
|
|
213
|
+
sort,
|
|
214
|
+
filters,
|
|
215
|
+
facets,
|
|
216
|
+
priceRange,
|
|
217
|
+
selectedChoiceIds: selected.map((s) => s.choiceId),
|
|
218
|
+
hasActiveFilters,
|
|
219
|
+
// Content on screen is not "loading" in the skeleton sense — the flag says a query is in flight.
|
|
220
|
+
loading: !current || products === null,
|
|
221
|
+
error: current ? error : null,
|
|
222
|
+
hasMore: current && hasMore && !!cursor,
|
|
223
|
+
loadingMore: current && loadingMore,
|
|
224
|
+
};
|
|
225
|
+
return snapshot;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Facets follow the category scope (a Size facet in "Donuts" is meaningless).
|
|
229
|
+
let facetScope: string | null | undefined;
|
|
230
|
+
function loadFacets(): void {
|
|
231
|
+
if (facetScope === activeCategoryId) return;
|
|
232
|
+
facetScope = activeCategoryId;
|
|
233
|
+
const scope = activeCategoryId;
|
|
234
|
+
fetchFacetData({ categoryId: scope }).then((d) => {
|
|
235
|
+
if (!started || scope !== activeCategoryId) return;
|
|
236
|
+
facets = d.facets;
|
|
237
|
+
priceRange = d.priceRange;
|
|
238
|
+
// A pick from the URL may have gained linked children now that its facet is known.
|
|
239
|
+
if (selectionKey() !== pageKey) query();
|
|
240
|
+
else emit();
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Run the query for the current selection. Keeps the seed (or the previous page) on screen while
|
|
245
|
+
// it runs; skeletons only when there is nothing yet.
|
|
246
|
+
function query(): void {
|
|
247
|
+
if (!started) return;
|
|
248
|
+
const key = selectionKey();
|
|
249
|
+
const id = ++generation;
|
|
250
|
+
pendingMore = null;
|
|
251
|
+
pageKey = key; total = null; cursor = null; hasMore = false; error = null; loadingMore = false;
|
|
252
|
+
emit();
|
|
253
|
+
const [limit, categoryId, selectedSort, minPrice, maxPrice, inStockOnly, search, selections] = JSON.parse(key);
|
|
254
|
+
searchCatalog({ limit, categoryId, sort: selectedSort, minPrice, maxPrice, inStockOnly, search, facetSelections: selections })
|
|
255
|
+
.then((res) => {
|
|
256
|
+
if (generation !== id || selectionKey() !== key) return; // superseded — drop it
|
|
257
|
+
products = res.products; total = res.total; cursor = res.nextCursor; hasMore = res.hasMore; error = null;
|
|
258
|
+
emit();
|
|
259
|
+
})
|
|
260
|
+
.catch((e) => {
|
|
261
|
+
if (generation !== id || selectionKey() !== key) return;
|
|
262
|
+
products = []; total = null; cursor = null; hasMore = false;
|
|
263
|
+
error = e instanceof Error ? e.message : "Couldn't load products.";
|
|
264
|
+
emit();
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function changed(): void {
|
|
269
|
+
if (syncUrl) writeUrlState({ sort, filters, selected, activeCategoryId }, initialCategoryId);
|
|
270
|
+
loadFacets();
|
|
271
|
+
// A new filters object with the same values keeps the page (same selection, same query).
|
|
272
|
+
if (selectionKey() === pageKey) emit();
|
|
273
|
+
else query();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return {
|
|
277
|
+
getState,
|
|
278
|
+
subscribe(fn) {
|
|
279
|
+
listeners.add(fn);
|
|
280
|
+
return () => listeners.delete(fn);
|
|
281
|
+
},
|
|
282
|
+
start() {
|
|
283
|
+
if (started) return;
|
|
284
|
+
started = true;
|
|
285
|
+
// Adopt the URL's selection once (the server rendered the defaults).
|
|
286
|
+
const u = syncUrl ? readUrlState() : null;
|
|
287
|
+
if (u) {
|
|
288
|
+
if (u.sort) sort = u.sort;
|
|
289
|
+
if (Object.keys(u.filters).length) filters = u.filters;
|
|
290
|
+
if (u.selected.length) selected = u.selected;
|
|
291
|
+
if (u.categoryId !== undefined && u.categoryId !== initialCategoryId) activeCategoryId = u.categoryId || null;
|
|
292
|
+
}
|
|
293
|
+
if (!initialCategories) {
|
|
294
|
+
fetchCategories().then((list) => { if (started) { categories = list; emit(); } }).catch(() => { if (started) { categories = []; emit(); } });
|
|
295
|
+
}
|
|
296
|
+
loadFacets();
|
|
297
|
+
query();
|
|
298
|
+
},
|
|
299
|
+
stop() {
|
|
300
|
+
started = false;
|
|
301
|
+
generation++;
|
|
302
|
+
},
|
|
303
|
+
setActiveCategoryId(id) { if (id === activeCategoryId) return; activeCategoryId = id; changed(); },
|
|
304
|
+
setSort(next) { if (next === sort) return; sort = next; changed(); },
|
|
305
|
+
setFilters(next) { filters = next; changed(); },
|
|
306
|
+
toggleChoice(choiceId) {
|
|
307
|
+
const existing = selected.find((s) => s.choiceId === choiceId);
|
|
308
|
+
if (existing) selected = selected.filter((s) => s !== existing);
|
|
309
|
+
else {
|
|
310
|
+
const facet = facets.find((f) => f.choices.some((c) => c.id === choiceId));
|
|
311
|
+
if (!facet) return; // not a choice of this scope's facets
|
|
312
|
+
selected = [...selected, { kind: facet.kind, facetId: facet.id, choiceId }];
|
|
313
|
+
}
|
|
314
|
+
changed();
|
|
315
|
+
},
|
|
316
|
+
clearFilters() { filters = {}; selected = []; changed(); },
|
|
317
|
+
retry() { attempt++; changed(); },
|
|
318
|
+
async loadMore() {
|
|
319
|
+
const key = selectionKey();
|
|
320
|
+
if (pageKey !== key || !cursor || !hasMore || pendingMore) return;
|
|
321
|
+
const request = { generation, key };
|
|
322
|
+
pendingMore = request; // blocks repeated clicks before a re-render
|
|
323
|
+
const isCurrent = () => generation === request.generation && selectionKey() === key;
|
|
324
|
+
loadingMore = true; error = null; emit();
|
|
325
|
+
try {
|
|
326
|
+
const res = await searchCatalog({ limit: pageSize, cursor });
|
|
327
|
+
if (isCurrent()) {
|
|
328
|
+
const seen = new Set((products ?? []).map((p) => p.id));
|
|
329
|
+
products = [...(products ?? []), ...res.products.filter((p) => (seen.has(p.id) ? false : (seen.add(p.id), true)))];
|
|
330
|
+
cursor = res.nextCursor;
|
|
331
|
+
hasMore = res.hasMore;
|
|
332
|
+
}
|
|
333
|
+
} catch (e) {
|
|
334
|
+
if (isCurrent()) error = e instanceof Error ? e.message : "Couldn't load more products.";
|
|
335
|
+
} finally {
|
|
336
|
+
if (pendingMore === request) pendingMore = null;
|
|
337
|
+
if (isCurrent()) { loadingMore = false; emit(); }
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
// Storefront DTOs — the serializable shapes every hook, component, and page consumes.
|
|
2
|
+
// These are plain JSON: safe to pass as Astro island props or across a server/client
|
|
3
|
+
// boundary. Image values are already-resolved https URLs (never wix:image://), and every
|
|
4
|
+
// displayable price is a ready formatted string.
|
|
5
|
+
|
|
6
|
+
export type Availability = "IN_STOCK" | "OUT_OF_STOCK" | "PARTIALLY_OUT_OF_STOCK";
|
|
7
|
+
|
|
8
|
+
/** A product as a listing/grid tile needs it. */
|
|
9
|
+
export interface ProductSummary {
|
|
10
|
+
id: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* The price the buyer pays for the cheapest variant, formatted (an automatic discount already
|
|
15
|
+
* applied). When `price !== maxPrice` the product is a RANGE — render "price – maxPrice".
|
|
16
|
+
*/
|
|
17
|
+
price: string;
|
|
18
|
+
/** Highest variant price, formatted — differs from `price` when variants are priced differently. */
|
|
19
|
+
maxPrice: string;
|
|
20
|
+
/**
|
|
21
|
+
* The cheapest variant is discounted AND variants are priced differently: the discounted
|
|
22
|
+
* maximum is unknown until the PDP loads the variants, so render "From {price}" (no maxPrice,
|
|
23
|
+
* no struck price). `maxPrice` equals `price` then.
|
|
24
|
+
*/
|
|
25
|
+
fromPrice: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Struck "was" price, formatted; null when not on sale — and ALWAYS null for a range (a lone
|
|
28
|
+
* struck minimum beside a range claims a saving that may not apply to the variant picked).
|
|
29
|
+
*/
|
|
30
|
+
compareAtPrice: string | null;
|
|
31
|
+
/** Names of the automatic discount rules applying to this product ("Summer sale") — render under the price; [] when none. */
|
|
32
|
+
discountNames: string[];
|
|
33
|
+
/** Price per unit of the cheapest variant as Wix formats it ("€2.50 / 100 g"); null when the product isn't sold by unit. */
|
|
34
|
+
pricePerUnit: string | null;
|
|
35
|
+
/** The primary merchant ribbon ("New", "Best Seller"); null when none. Same as ribbons[0]. */
|
|
36
|
+
ribbon: string | null;
|
|
37
|
+
/** EVERY merchant ribbon, primary first ("New", "Sale") — render all of them, one shared style. */
|
|
38
|
+
ribbons: string[];
|
|
39
|
+
/** The cheapest variant's id — what a direct add sends for a product with no options; null when unknown. */
|
|
40
|
+
minPriceVariantId: string | null;
|
|
41
|
+
availability: Availability;
|
|
42
|
+
/** OUT_OF_STOCK but pre-orderable — label "Pre-order", not "Sold out". */
|
|
43
|
+
preorder: boolean;
|
|
44
|
+
/** The product sells as a subscription (recurring plans) — the tile routes to the PDP, where the plan is picked. */
|
|
45
|
+
hasSubscriptions: boolean;
|
|
46
|
+
/** Resolved https URL of the main image ("" when the product has none). */
|
|
47
|
+
imageUrl: string;
|
|
48
|
+
/** Resolved https URL of the second gallery image ("" when there is only one). */
|
|
49
|
+
hoverImageUrl: string;
|
|
50
|
+
/** e.g. "2 colors · 3 sizes"; "" for a single-variant product. */
|
|
51
|
+
optionsSummary: string;
|
|
52
|
+
/**
|
|
53
|
+
* Hex colors of a color option's visible choices, catalog order — render as small dots on the
|
|
54
|
+
* tile (a preview, not a picker: selection happens in QuickAdd or on the PDP). [] when none.
|
|
55
|
+
*/
|
|
56
|
+
swatches: string[];
|
|
57
|
+
/** True when the product can be added to the cart with no choices (single variant, in stock, no subscription plans). */
|
|
58
|
+
quickAddable: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface OptionChoice {
|
|
62
|
+
choiceId: string;
|
|
63
|
+
/** Read-only identifier Wix derives from the name — what `catalogReference.options[option.key]` carries. */
|
|
64
|
+
key: string;
|
|
65
|
+
name: string;
|
|
66
|
+
/** Hex color for swatch rendering; null for text choices. */
|
|
67
|
+
colorCode: string | null;
|
|
68
|
+
/** At least one variant with this choice is in stock (catalog-level; the PDP store refines it against the current selection). */
|
|
69
|
+
inStock: boolean;
|
|
70
|
+
/** The gallery image the merchant linked to this choice (shown when it is picked), resolved to https; null when none. */
|
|
71
|
+
imageUrl: string | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ProductOption {
|
|
75
|
+
/** The option's customization id — what `selectOption(optionId, choiceId)` and `ProductVariant.choiceIds` use. */
|
|
76
|
+
id: string;
|
|
77
|
+
/** Read-only identifier Wix derives from the name — the key inside `catalogReference.options`. */
|
|
78
|
+
key: string;
|
|
79
|
+
name: string;
|
|
80
|
+
/** Render choices as color swatches (true) or text pills (false). */
|
|
81
|
+
isColor: boolean;
|
|
82
|
+
choices: OptionChoice[];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface ProductModifier {
|
|
86
|
+
/** The modifier's customization id. */
|
|
87
|
+
id: string;
|
|
88
|
+
/**
|
|
89
|
+
* The key the cart takes: `catalogReference.options[key] = choice.key` for a choice modifier,
|
|
90
|
+
* `customTextFields[key] = text` for a free-text one (its `freeTextSettings.key`).
|
|
91
|
+
*/
|
|
92
|
+
key: string;
|
|
93
|
+
name: string;
|
|
94
|
+
/** Input required before adding — Wix treats a modifier as mandatory unless it says otherwise. */
|
|
95
|
+
mandatory: boolean;
|
|
96
|
+
/** "choices" renders pills; "text" renders a free-text input. */
|
|
97
|
+
type: "choices" | "text";
|
|
98
|
+
/** The label of a free-text input (Wix's `freeTextSettings.title`); the modifier name for choices. */
|
|
99
|
+
title: string;
|
|
100
|
+
/** Free text only: character limits from the merchant; null when unlimited / none. */
|
|
101
|
+
maxChars: number | null;
|
|
102
|
+
minChars: number | null;
|
|
103
|
+
choices: { choiceId: string; key: string; name: string }[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** A recurring plan the product can be bought on. */
|
|
107
|
+
export interface SubscriptionPlan {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
description: string;
|
|
111
|
+
/** Payment frequency unit; null when Wix didn't say. */
|
|
112
|
+
frequency: "DAY" | "WEEK" | "MONTH" | "YEAR" | null;
|
|
113
|
+
/** Every N frequency units (1 = every month). */
|
|
114
|
+
interval: number;
|
|
115
|
+
/** Number of payments; null = until cancelled (auto-renewing). */
|
|
116
|
+
billingCycles: number | null;
|
|
117
|
+
/** "every 2 months · 6 payments" — the terms in words, ready to render. */
|
|
118
|
+
terms: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface ProductVariant {
|
|
122
|
+
variantId: string;
|
|
123
|
+
/** The option selections this variant answers to, by id: optionId -> choiceId (what resolveVariant matches on). */
|
|
124
|
+
choiceIds: Record<string, string>;
|
|
125
|
+
/** The same selections by name: optionName -> choiceName (display only). */
|
|
126
|
+
choices: Record<string, string>;
|
|
127
|
+
/** The price the buyer pays, formatted — an automatic discount beats the regular price. */
|
|
128
|
+
price: string;
|
|
129
|
+
/** The same selling price as a number in site currency — for ranges, never for display. */
|
|
130
|
+
priceAmount: number;
|
|
131
|
+
/** Struck "was" price, formatted; null unless it is real and higher than `price`. */
|
|
132
|
+
compareAtPrice: string | null;
|
|
133
|
+
/** Price per unit as Wix formats it ("€2.50 / 100 g"); null when not sold by unit. */
|
|
134
|
+
pricePerUnit: string | null;
|
|
135
|
+
/** Merchant SKU; null when none. */
|
|
136
|
+
sku: string | null;
|
|
137
|
+
/** planId -> the formatted price of this variant on that plan (Wix applies the plan's discount to the variant's price). */
|
|
138
|
+
subscriptionPrices: Record<string, string>;
|
|
139
|
+
inStock: boolean;
|
|
140
|
+
/** Out of stock but pre-orderable — still buyable (the add carries preOrderRequested). */
|
|
141
|
+
preorderEnabled: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Units left to buy: the tracked stock, or the remaining pre-order allowance when pre-ordering.
|
|
144
|
+
* null when stock isn't counted (made to order) or the inventory hasn't loaded yet.
|
|
145
|
+
*/
|
|
146
|
+
quantity: number | null;
|
|
147
|
+
/** The merchant's pre-order note ("Ships in 3 weeks"); null when none or not pre-orderable. */
|
|
148
|
+
preorderMessage: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* The image Wix derived for this variant from its choice's linked media, resolved to https; null when none.
|
|
151
|
+
* Wix derives it at product creation only (and only for single-option products), so a choice image the
|
|
152
|
+
* merchant added later never lands here: read the choice's own `imageUrl` (the detail store's `imageUrl` does).
|
|
153
|
+
*/
|
|
154
|
+
imageUrl: string | null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** One inventory record per variant at the store's default location (fetchInventory). */
|
|
158
|
+
export interface VariantInventory {
|
|
159
|
+
status: "IN_STOCK" | "OUT_OF_STOCK" | "PREORDER";
|
|
160
|
+
/** Units in stock when counted; null when stock is a yes/no flag. */
|
|
161
|
+
quantity: number | null;
|
|
162
|
+
/** Units still pre-orderable when `status` is PREORDER; null otherwise or when uncounted. */
|
|
163
|
+
preorderQuantity: number | null;
|
|
164
|
+
preorderMessage: string | null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** A category breadcrumb: an ancestor (or, on a product, the path to its main category). */
|
|
168
|
+
export interface Breadcrumb {
|
|
169
|
+
id: string;
|
|
170
|
+
name: string;
|
|
171
|
+
slug: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** A product as the detail page needs it. */
|
|
175
|
+
export interface ProductDetail extends ProductSummary {
|
|
176
|
+
/** Product description as an HTML string — render with innerHTML, not as text. */
|
|
177
|
+
descriptionHtml: string;
|
|
178
|
+
/** Merchant info sections (materials, shipping, care…) — title + HTML; render as sections or accordions. */
|
|
179
|
+
infoSections: { title: string; html: string }[];
|
|
180
|
+
/** Every gallery image as a resolved https URL, main image first, de-duplicated. */
|
|
181
|
+
gallery: string[];
|
|
182
|
+
/** Path to the product's main category, top-level first ("Clothing" > "T-Shirts"); [] when it has no main category. */
|
|
183
|
+
breadcrumbs: Breadcrumb[];
|
|
184
|
+
/** Ids of the categories the product is directly assigned to. */
|
|
185
|
+
categoryIds: string[];
|
|
186
|
+
options: ProductOption[];
|
|
187
|
+
modifiers: ProductModifier[];
|
|
188
|
+
variants: ProductVariant[];
|
|
189
|
+
/** The recurring plans the product is sold on; [] for a one-time-only product. */
|
|
190
|
+
subscriptions: SubscriptionPlan[];
|
|
191
|
+
/** With plans present: whether a plain one-time purchase is also offered. */
|
|
192
|
+
allowOneTimePurchase: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface Category {
|
|
196
|
+
id: string;
|
|
197
|
+
slug: string;
|
|
198
|
+
name: string;
|
|
199
|
+
/** Plain-text description when the merchant wrote one; "" otherwise. */
|
|
200
|
+
description: string;
|
|
201
|
+
/** The category's own image, resolved to an https URL; "" when none. */
|
|
202
|
+
imageUrl: string;
|
|
203
|
+
/** The parent category's id; null for a top-level category. */
|
|
204
|
+
parentId: string | null;
|
|
205
|
+
/** Position among its siblings (the merchant's order). */
|
|
206
|
+
index: number;
|
|
207
|
+
/** Products directly in this category (not in its subcategories); null when unknown. */
|
|
208
|
+
productCount: number | null;
|
|
209
|
+
/** Ancestors, top-level first — only filled by fetchCategoryBySlug; [] elsewhere. */
|
|
210
|
+
breadcrumbs: Breadcrumb[];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface FacetChoice {
|
|
214
|
+
/** The choice id — what toggleChoice / searchCatalog filter on. */
|
|
215
|
+
id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
/** Hex color for a swatch facet; null for a text facet. */
|
|
218
|
+
colorCode: string | null;
|
|
219
|
+
/** Products in the scope carrying this choice (linked choices counted into their primary). */
|
|
220
|
+
count: number;
|
|
221
|
+
/** Ids of linked choices shown under this one ("Light red" under "Red") — the filter sends them along; [] when none. */
|
|
222
|
+
childIds: string[];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** One filterable customization across the catalog (or a category): "Color" with its choices. */
|
|
226
|
+
export interface Facet {
|
|
227
|
+
/** The customization id (an option's or a modifier's). */
|
|
228
|
+
id: string;
|
|
229
|
+
name: string;
|
|
230
|
+
/** Options and modifiers filter on different fields — the store keeps them apart. */
|
|
231
|
+
kind: "option" | "modifier";
|
|
232
|
+
isColor: boolean;
|
|
233
|
+
choices: FacetChoice[];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** The catalog's (or category's) lowest and highest product price, as numbers in site currency — the slider's bounds. */
|
|
237
|
+
export interface PriceRange {
|
|
238
|
+
min: number;
|
|
239
|
+
max: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** What the filter panel needs beyond the product page: the facets and the price bounds of the scope. */
|
|
243
|
+
export interface FacetData {
|
|
244
|
+
facets: Facet[];
|
|
245
|
+
priceRange: PriceRange | null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface CartLine {
|
|
249
|
+
/** The cart line id — what update/remove take (NOT the product id). */
|
|
250
|
+
lineItemId: string;
|
|
251
|
+
productName: string;
|
|
252
|
+
quantity: number;
|
|
253
|
+
/** Per-unit price, formatted. */
|
|
254
|
+
unitPrice: string;
|
|
255
|
+
/** Line total, formatted. */
|
|
256
|
+
linePrice: string;
|
|
257
|
+
/** Struck line total (the catalog price × quantity) when the line is discounted; null otherwise. */
|
|
258
|
+
compareAtLinePrice: string | null;
|
|
259
|
+
/** Units the store can still sell of this line; null when uncounted. The stepper's ceiling. */
|
|
260
|
+
availableQuantity: number | null;
|
|
261
|
+
/** Resolved https URL ("" when none). */
|
|
262
|
+
imageUrl: string;
|
|
263
|
+
/** The item's page URL when Wix returned one; "" otherwise (a headless site links by slug). */
|
|
264
|
+
productUrl: string;
|
|
265
|
+
/** Human-readable option/modifier labels, e.g. ["Color: Ink", "Size: M"]. */
|
|
266
|
+
descriptionLines: string[];
|
|
267
|
+
/** IN_STOCK | PARTIALLY_IN_STOCK | OUT_OF_STOCK | REMOVED_FROM_CATALOG — not IN_STOCK → the line can't be checked out as-is. */
|
|
268
|
+
status: string;
|
|
269
|
+
/**
|
|
270
|
+
* The recurring plan's terms for a subscription line — "Monthly plan · every month · 12 payments";
|
|
271
|
+
* "" for a one-time purchase. A subscription line must read as one in the cart.
|
|
272
|
+
*/
|
|
273
|
+
subscription: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** A named amount from the cart estimate (a discount, a fee, a tax), formatted. */
|
|
277
|
+
export interface CartAmount {
|
|
278
|
+
name: string;
|
|
279
|
+
amount: string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface Cart {
|
|
283
|
+
lines: CartLine[];
|
|
284
|
+
/** Sum of line quantities. */
|
|
285
|
+
itemCount: number;
|
|
286
|
+
/** Formatted subtotal (after item discounts) — from the cart estimate, not hand-summed. */
|
|
287
|
+
subtotal: string;
|
|
288
|
+
/** Formatted CART-level discount total (a coupon or cart rule) — "" when none; item discounts are already in subtotal. */
|
|
289
|
+
discount: string;
|
|
290
|
+
/** Every applied discount by name (coupon, automatic rule) with its amount; [] when none. */
|
|
291
|
+
discounts: CartAmount[];
|
|
292
|
+
/** Additional fees (handling, platform) with their amounts; [] when none. */
|
|
293
|
+
fees: CartAmount[];
|
|
294
|
+
/** Taxes by name; [] when none or not yet calculable (no address). */
|
|
295
|
+
taxes: CartAmount[];
|
|
296
|
+
/** Line prices already include tax — don't render a tax row then. */
|
|
297
|
+
pricesIncludeTax: boolean;
|
|
298
|
+
/** Formatted total to pay before delivery (shipping resolves at checkout); "" when unknown. */
|
|
299
|
+
total: string;
|
|
300
|
+
/** The applied coupon; null when none. */
|
|
301
|
+
coupon: { id: string; code: string } | null;
|
|
302
|
+
/** The buyer's note to the merchant; "" when none. */
|
|
303
|
+
note: string;
|
|
304
|
+
currency: string;
|
|
305
|
+
}
|