@wix/agent-skills 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +7 -5
- package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +14 -2
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +4 -5
- package/skills/wix-headless-kit/SKILL.md +31 -14
- package/skills/wix-headless-kit/guides/existing-site.md +12 -5
- package/skills/wix-headless-kit/install/attach.mjs +55 -10
- package/skills/wix-headless-kit/install/check.mjs +5 -5
- package/skills/wix-headless-kit/install/deploy.mjs +7 -3
- package/skills/wix-headless-kit/install/templates.mjs +21 -17
- package/skills/wix-headless-templates/SKILL.md +43 -0
- package/skills/wix-headless-templates/blank/project/README.md +15 -0
- package/skills/wix-headless-templates/blank/project/astro.config.mjs +20 -0
- package/skills/wix-headless-templates/blank/project/package.json +34 -0
- package/skills/wix-headless-templates/blank/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blank/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blank/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blank/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blank/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blank/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blank/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/INSTRUCTIONS.md +418 -0
- package/skills/wix-headless-templates/blog/app/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/app/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/app-astro/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/README.md +15 -0
- package/skills/wix-headless-templates/blog/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/blog/project/package-lock.json +14699 -0
- package/skills/wix-headless-templates/blog/project/package.json +39 -0
- package/skills/wix-headless-templates/blog/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blog/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blog/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blog/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blog/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/blog/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/blog/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/blog/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/blog/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/rest/authors.ts +39 -0
- package/skills/wix-headless-templates/blog/rest/comments.ts +64 -0
- package/skills/wix-headless-templates/blog/rest/post-likes.ts +37 -0
- package/skills/wix-headless-templates/blog/rest/posts.ts +123 -0
- package/skills/wix-headless-templates/blog/rest/taxonomy.ts +79 -0
- package/skills/wix-headless-templates/blog/seed/SEED.md +81 -0
- package/skills/wix-headless-templates/blog/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +337 -0
- package/skills/wix-headless-templates/bookings/INSTRUCTIONS.md +356 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/README.md +15 -0
- package/skills/wix-headless-templates/bookings/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/bookings/project/package-lock.json +10546 -0
- package/skills/wix-headless-templates/bookings/project/package.json +41 -0
- package/skills/wix-headless-templates/bookings/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/bookings/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/bookings/rest/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/rest/services.ts +94 -0
- package/skills/wix-headless-templates/bookings/seed/SEED.md +109 -0
- package/skills/wix-headless-templates/bookings/seed/read-site.mjs +28 -0
- package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +407 -0
- package/skills/wix-headless-templates/cms/INSTRUCTIONS.md +399 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/README.md +15 -0
- package/skills/wix-headless-templates/cms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/cms/project/package-lock.json +9798 -0
- package/skills/wix-headless-templates/cms/project/package.json +37 -0
- package/skills/wix-headless-templates/cms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/cms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/cms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/cms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/cms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/cms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/cms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/cms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/cms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/cms/rest/collections.ts +25 -0
- package/skills/wix-headless-templates/cms/rest/items.ts +189 -0
- package/skills/wix-headless-templates/cms/seed/SEED.md +116 -0
- package/skills/wix-headless-templates/cms/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +321 -0
- package/skills/wix-headless-templates/compose.mjs +83 -0
- package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +349 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +95 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +466 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/app-astro/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/app-astro/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/README.md +15 -0
- package/skills/wix-headless-templates/donations/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/donations/project/package-lock.json +10266 -0
- package/skills/wix-headless-templates/donations/project/package.json +39 -0
- package/skills/wix-headless-templates/donations/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/donations/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/donations/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/donations/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/donations/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/donations/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +95 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +466 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/donations/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/donations/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/donations/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +76 -0
- package/skills/wix-headless-templates/donations/rest/donate.ts +90 -0
- package/skills/wix-headless-templates/donations/seed/SEED.md +90 -0
- package/skills/wix-headless-templates/donations/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +250 -0
- package/skills/wix-headless-templates/events/INSTRUCTIONS.md +387 -0
- package/skills/wix-headless-templates/events/app/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/app/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/app/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/app/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/app/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/app/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/app-astro/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/README.md +15 -0
- package/skills/wix-headless-templates/events/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/events/project/package-lock.json +10497 -0
- package/skills/wix-headless-templates/events/project/package.json +39 -0
- package/skills/wix-headless-templates/events/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/events/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/events/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/events/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/events/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/project/src/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/project/src/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/project/src/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/events/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/events/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/events/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/events/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/events/rest/events.ts +112 -0
- package/skills/wix-headless-templates/events/rest/orders.ts +28 -0
- package/skills/wix-headless-templates/events/rest/registration.ts +96 -0
- package/skills/wix-headless-templates/events/seed/SEED.md +115 -0
- package/skills/wix-headless-templates/events/seed/read-site.mjs +26 -0
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +322 -0
- package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +317 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/app/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/app-astro/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/README.md +15 -0
- package/skills/wix-headless-templates/faq/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/faq/project/package-lock.json +8837 -0
- package/skills/wix-headless-templates/faq/project/package.json +37 -0
- package/skills/wix-headless-templates/faq/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/faq/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/faq/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/faq/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/project/src/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/project/src/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/faq/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/faq/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/faq/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/faq/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/faq/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/faq/rest/faq.ts +71 -0
- package/skills/wix-headless-templates/faq/seed/SEED.md +104 -0
- package/skills/wix-headless-templates/faq/seed/read-site.mjs +23 -0
- package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +302 -0
- package/skills/wix-headless-templates/forms/INSTRUCTIONS.md +417 -0
- package/skills/wix-headless-templates/forms/app/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/README.md +15 -0
- package/skills/wix-headless-templates/forms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/forms/project/package-lock.json +9102 -0
- package/skills/wix-headless-templates/forms/project/package.json +37 -0
- package/skills/wix-headless-templates/forms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/forms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/forms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/forms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/forms/project/src/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/forms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/forms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/forms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/forms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/forms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/forms/rest/forms.ts +37 -0
- package/skills/wix-headless-templates/forms/rest/submissions.ts +83 -0
- package/skills/wix-headless-templates/forms/seed/SEED.md +225 -0
- package/skills/wix-headless-templates/forms/seed/read-site.mjs +53 -0
- package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +574 -0
- package/skills/wix-headless-templates/forms/tooling/address-templates.mjs +96 -0
- package/skills/wix-headless-templates/members/INSTRUCTIONS.md +345 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/app/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/app/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/app/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/app/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/app/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/app/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/app/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/app/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/app/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/app-astro/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/app-astro/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/app-astro/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/README.md +15 -0
- package/skills/wix-headless-templates/members/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/members/project/package-lock.json +8892 -0
- package/skills/wix-headless-templates/members/project/package.json +37 -0
- package/skills/wix-headless-templates/members/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/members/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/members/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/members/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/project/src/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/project/src/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/project/src/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/project/src/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/members/project/src/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/project/src/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/members/project/src/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/members/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/members/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/members/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/members/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/members/rest/auth.ts +224 -0
- package/skills/wix-headless-templates/members/rest/members.ts +26 -0
- package/skills/wix-headless-templates/members/seed/SEED.md +39 -0
- package/skills/wix-headless-templates/members/seed/read-site.mjs +15 -0
- package/skills/wix-headless-templates/members/seed/seed-members.mjs +91 -0
- package/skills/wix-headless-templates/portfolio/INSTRUCTIONS.md +315 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/README.md +15 -0
- package/skills/wix-headless-templates/portfolio/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/portfolio/project/package-lock.json +8760 -0
- package/skills/wix-headless-templates/portfolio/project/package.json +37 -0
- package/skills/wix-headless-templates/portfolio/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/portfolio/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +75 -0
- package/skills/wix-headless-templates/portfolio/seed/SEED.md +86 -0
- package/skills/wix-headless-templates/portfolio/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +253 -0
- package/skills/wix-headless-templates/pricing-plans/INSTRUCTIONS.md +376 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/README.md +15 -0
- package/skills/wix-headless-templates/pricing-plans/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/package-lock.json +9799 -0
- package/skills/wix-headless-templates/pricing-plans/project/package.json +38 -0
- package/skills/wix-headless-templates/pricing-plans/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/pricing-plans/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +58 -0
- package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +20 -0
- package/skills/wix-headless-templates/pricing-plans/seed/SEED.md +93 -0
- package/skills/wix-headless-templates/pricing-plans/seed/read-site.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +301 -0
- package/skills/wix-headless-templates/rentals/INSTRUCTIONS.md +309 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/README.md +15 -0
- package/skills/wix-headless-templates/rentals/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/rentals/project/package-lock.json +10545 -0
- package/skills/wix-headless-templates/rentals/project/package.json +40 -0
- package/skills/wix-headless-templates/rentals/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/rentals/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/rentals/rest/rentals.ts +153 -0
- package/skills/wix-headless-templates/rentals/seed/SEED.md +95 -0
- package/skills/wix-headless-templates/rentals/seed/read-site.mjs +34 -0
- package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +321 -0
- package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +468 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/README.md +15 -0
- package/skills/wix-headless-templates/restaurants/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/restaurants/project/package-lock.json +11038 -0
- package/skills/wix-headless-templates/restaurants/project/package.json +40 -0
- package/skills/wix-headless-templates/restaurants/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/restaurants/rest/menu.ts +96 -0
- package/skills/wix-headless-templates/restaurants/rest/ordering.ts +222 -0
- package/skills/wix-headless-templates/restaurants/rest/reservations.ts +102 -0
- package/skills/wix-headless-templates/restaurants/seed/SEED.md +118 -0
- package/skills/wix-headless-templates/restaurants/seed/read-site.mjs +25 -0
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +577 -0
- package/skills/wix-headless-templates/shared/CONTENT.md +22 -0
- package/skills/wix-headless-templates/shared/CUSTOM_OPERATIONS.md +100 -0
- package/skills/wix-headless-templates/shared/DESIGN.md +37 -0
- package/skills/wix-headless-templates/shared/SUPPLIED-CONTENT.md +27 -0
- package/skills/wix-headless-templates/shared/app/styles/global.css +57 -0
- package/skills/wix-headless-templates/shared/app/wix/config.ts +16 -0
- package/skills/wix-headless-templates/shared/app/wix/media.ts +106 -0
- package/skills/wix-headless-templates/shared/app/wix/money.ts +24 -0
- package/skills/wix-headless-templates/shared/app/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +69 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/INSTRUCTIONS.md +194 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchBox.tsx +136 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchHit.tsx +50 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchResults.tsx +300 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSearch.ts +31 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSuggest.ts +26 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-core.ts +520 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-store.ts +235 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts +80 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/suggest-store.ts +178 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts +158 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro +33 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +82 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +43 -0
- package/skills/wix-headless-templates/shared/rest/client.ts +155 -0
- package/skills/wix-headless-templates/shared/rest/config.ts +4 -0
- package/skills/wix-headless-templates/shared/rest/media.ts +92 -0
- package/skills/wix-headless-templates/shared/seed/images.mjs +183 -0
- package/skills/wix-headless-templates/shared/seed/read-site.mjs +97 -0
- package/skills/wix-headless-templates/shared/seed/site-context.mjs +70 -0
- package/skills/wix-headless-templates/shared/seed/site.mjs +48 -0
- package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +44 -0
- package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +685 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart.ts +187 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/app-astro/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/README.md +15 -0
- package/skills/wix-headless-templates/storefront/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/storefront/project/package-lock.json +10786 -0
- package/skills/wix-headless-templates/storefront/project/package.json +41 -0
- package/skills/wix-headless-templates/storefront/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/storefront/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart.ts +187 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/storefront/rest/cart.ts +183 -0
- package/skills/wix-headless-templates/storefront/rest/catalog.ts +267 -0
- package/skills/wix-headless-templates/storefront/seed/SEED.md +169 -0
- package/skills/wix-headless-templates/storefront/seed/read-site.mjs +38 -0
- package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +839 -0
- package/skills/wix-manage/SKILL.md +11 -7
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +1 -1
- package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +206 -0
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +17 -24
- package/skills/wix-manage/references/sites/create-headless-site.md +2 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +262 -171
- package/skills/wix-manage/references/stores/update-product-with-options.md +1 -1
- package/skills/wix-headless/entry/bootstrap.mjs +0 -156
- package/skills/wix-headless/entry/skill.md +0 -78
- package/skills/wix-headless-kit/cold-start/bootstrap.mjs +0 -156
- package/skills/wix-headless-kit/cold-start/cold-start.md +0 -111
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +0 -423
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// The results page as a framework-free store — the logic behind useSearch, usable from React
|
|
2
|
+
// (useSearch 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 the vertical stores: state, actions,
|
|
4
|
+
// subscribe/getState, emit after every change.
|
|
5
|
+
//
|
|
6
|
+
// Two views of one query: GROUPED (type null — federatedSearch, a few hits per type, no paging) and
|
|
7
|
+
// SINGLE-TYPE (type set — search with documentType, sort, filter, facets, offset paging). The query
|
|
8
|
+
// (q, type, sort, filter, limits) is identified BY VALUE; a change refetches from the first page, a
|
|
9
|
+
// late response from a superseded query is dropped. Paging appends (offset = hits shown so far).
|
|
10
|
+
//
|
|
11
|
+
// SSR-friendly: seed with `initialGroups`/`initialIndexed` or `initialPage` from the SAME q/type and
|
|
12
|
+
// no client fetch happens for the first render. URL state (`?q=&type=`) is the surface's job, not
|
|
13
|
+
// the store's. One store per mounted results surface: createSearchStore(), not a singleton.
|
|
14
|
+
import { searchAll, searchType } from "./search";
|
|
15
|
+
import { GROUP_LIMIT, PAGE_LIMIT, clampQuery, sortsFor } from "./search-core";
|
|
16
|
+
import type { SearchDocType, SearchFilter, SearchGroup, SearchPage, SearchSort } from "./types";
|
|
17
|
+
|
|
18
|
+
export interface SearchStoreOptions {
|
|
19
|
+
q?: string;
|
|
20
|
+
/** null = the grouped view. */
|
|
21
|
+
type?: SearchDocType | null;
|
|
22
|
+
sort?: SearchSort;
|
|
23
|
+
filter?: SearchFilter;
|
|
24
|
+
/** Hits per type in the grouped view (default 4). */
|
|
25
|
+
groupLimit?: number;
|
|
26
|
+
/** Page size of the single-type view (default 12). */
|
|
27
|
+
pageLimit?: number;
|
|
28
|
+
/** Server-fetched grouped result — must come from the SAME q with type null. */
|
|
29
|
+
initialGroups?: SearchGroup[] | null;
|
|
30
|
+
initialIndexed?: boolean | null;
|
|
31
|
+
/** Server-fetched first page — must come from the SAME q/type/sort/filter. */
|
|
32
|
+
initialPage?: SearchPage | null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Everything a results surface renders from. Read it with getState() or through a subscription. */
|
|
36
|
+
export interface SearchState {
|
|
37
|
+
q: string;
|
|
38
|
+
type: SearchDocType | null;
|
|
39
|
+
sort: SearchSort;
|
|
40
|
+
filter: SearchFilter;
|
|
41
|
+
/** Grouped view: null while the first load is in flight — render skeletons, not an empty state. [] = no results. */
|
|
42
|
+
groups: SearchGroup[] | null;
|
|
43
|
+
/** Grouped view: see SearchAllResult.indexed. */
|
|
44
|
+
indexed: boolean | null;
|
|
45
|
+
/** Single-type view: null while the first load is in flight. */
|
|
46
|
+
page: SearchPage | null;
|
|
47
|
+
/** The sorts the current type offers (relevance always). */
|
|
48
|
+
sorts: SearchSort[];
|
|
49
|
+
loading: boolean;
|
|
50
|
+
loadingMore: boolean;
|
|
51
|
+
hasMore: boolean;
|
|
52
|
+
error: string | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SearchStore {
|
|
56
|
+
getState(): SearchState;
|
|
57
|
+
subscribe(listener: () => void): () => void;
|
|
58
|
+
/** Run the first query unless the seed already answered it. Call once when mounted (a browser). */
|
|
59
|
+
start(): void;
|
|
60
|
+
/** Stop reacting; drop late responses. */
|
|
61
|
+
stop(): void;
|
|
62
|
+
/** A new phrase (trimmed, cut at 100 chars) — refetches from the first page in the current view. */
|
|
63
|
+
setQuery(q: string): void;
|
|
64
|
+
/** Switch views: a type for its single-type page, null for the grouped view. Resets sort and filter. */
|
|
65
|
+
setType(type: SearchDocType | null): void;
|
|
66
|
+
setSort(sort: SearchSort): void;
|
|
67
|
+
setFilter(filter: SearchFilter): void;
|
|
68
|
+
/** Single-type view: append the next page. No-op while loading or when there is none. */
|
|
69
|
+
loadMore(): Promise<void>;
|
|
70
|
+
/** Re-run the current query after an error. */
|
|
71
|
+
retry(): void;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function createSearchStore(options: SearchStoreOptions = {}): SearchStore {
|
|
75
|
+
let q = clampQuery(options.q);
|
|
76
|
+
let type: SearchDocType | null = options.type ?? null;
|
|
77
|
+
let sort: SearchSort = options.sort ?? "relevance";
|
|
78
|
+
let filter: SearchFilter = options.filter ?? {};
|
|
79
|
+
const groupLimit = options.groupLimit ?? GROUP_LIMIT;
|
|
80
|
+
const pageLimit = options.pageLimit ?? PAGE_LIMIT;
|
|
81
|
+
let attempt = 0;
|
|
82
|
+
const key = () => JSON.stringify([q, type, sort, filter, groupLimit, pageLimit, attempt]);
|
|
83
|
+
|
|
84
|
+
let groups: SearchGroup[] | null = type === null ? (options.initialGroups ?? null) : null;
|
|
85
|
+
let indexed: boolean | null = options.initialIndexed ?? null;
|
|
86
|
+
let page: SearchPage | null = type !== null ? (options.initialPage ?? null) : null;
|
|
87
|
+
let error: string | null = null;
|
|
88
|
+
let loadingMore = false;
|
|
89
|
+
// The query the current data answers (null = nothing answered yet).
|
|
90
|
+
let pageKey: string | null = groups !== null || page !== null ? key() : null;
|
|
91
|
+
let inflight = false;
|
|
92
|
+
let started = false;
|
|
93
|
+
let generation = 0;
|
|
94
|
+
const listeners = new Set<() => void>();
|
|
95
|
+
let snapshot: SearchState | null = null;
|
|
96
|
+
const emit = () => {
|
|
97
|
+
snapshot = null;
|
|
98
|
+
for (const fn of listeners) fn();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
function getState(): SearchState {
|
|
102
|
+
if (snapshot) return snapshot;
|
|
103
|
+
const answered = pageKey === key();
|
|
104
|
+
snapshot = {
|
|
105
|
+
q,
|
|
106
|
+
type,
|
|
107
|
+
sort,
|
|
108
|
+
filter,
|
|
109
|
+
groups: type === null && answered ? groups : null,
|
|
110
|
+
indexed: type === null && answered ? indexed : null,
|
|
111
|
+
page: type !== null && answered ? page : null,
|
|
112
|
+
sorts: type ? sortsFor(type) : ["relevance"],
|
|
113
|
+
loading: !!q && (!answered || (type === null ? groups === null : page === null)),
|
|
114
|
+
loadingMore: answered && loadingMore,
|
|
115
|
+
hasMore: answered && !!page?.hasNext,
|
|
116
|
+
error: answered ? error : null,
|
|
117
|
+
};
|
|
118
|
+
return snapshot;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function run(): void {
|
|
122
|
+
if (!started) return;
|
|
123
|
+
const k = key();
|
|
124
|
+
const id = ++generation;
|
|
125
|
+
pageKey = k;
|
|
126
|
+
groups = null;
|
|
127
|
+
page = null;
|
|
128
|
+
indexed = null;
|
|
129
|
+
error = null;
|
|
130
|
+
loadingMore = false;
|
|
131
|
+
if (!q) {
|
|
132
|
+
// Nothing to search — an empty, answered state (no request).
|
|
133
|
+
groups = type === null ? [] : null;
|
|
134
|
+
inflight = false;
|
|
135
|
+
emit();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
inflight = true;
|
|
139
|
+
emit();
|
|
140
|
+
const request = type === null ? searchAll(q, { limit: groupLimit }) : searchType({ q, type, sort, filter, limit: pageLimit, offset: 0 });
|
|
141
|
+
request
|
|
142
|
+
.then((res) => {
|
|
143
|
+
if (generation !== id) return; // superseded — drop it
|
|
144
|
+
if ("groups" in res) {
|
|
145
|
+
groups = res.groups;
|
|
146
|
+
indexed = res.indexed;
|
|
147
|
+
} else {
|
|
148
|
+
page = res;
|
|
149
|
+
}
|
|
150
|
+
inflight = false;
|
|
151
|
+
emit();
|
|
152
|
+
})
|
|
153
|
+
.catch((e) => {
|
|
154
|
+
if (generation !== id) return;
|
|
155
|
+
groups = type === null ? [] : null;
|
|
156
|
+
page = null;
|
|
157
|
+
inflight = false;
|
|
158
|
+
error = e instanceof Error ? e.message : String(e);
|
|
159
|
+
emit();
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function changed(): void {
|
|
164
|
+
if (key() === pageKey) return; // same values — same data
|
|
165
|
+
if (started) run();
|
|
166
|
+
else emit();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
getState,
|
|
171
|
+
subscribe(fn) {
|
|
172
|
+
listeners.add(fn);
|
|
173
|
+
return () => listeners.delete(fn);
|
|
174
|
+
},
|
|
175
|
+
start() {
|
|
176
|
+
if (started) return;
|
|
177
|
+
started = true;
|
|
178
|
+
// The SSR seed answered this exact query — no fetch; a dropped first load reruns.
|
|
179
|
+
if (pageKey !== key() || (!inflight && (type === null ? groups === null : page === null))) run();
|
|
180
|
+
},
|
|
181
|
+
stop() {
|
|
182
|
+
started = false;
|
|
183
|
+
generation++;
|
|
184
|
+
inflight = false;
|
|
185
|
+
},
|
|
186
|
+
setQuery(next) {
|
|
187
|
+
const value = clampQuery(next);
|
|
188
|
+
if (value === q) return;
|
|
189
|
+
q = value;
|
|
190
|
+
changed();
|
|
191
|
+
},
|
|
192
|
+
setType(next) {
|
|
193
|
+
if (next === type) return;
|
|
194
|
+
type = next;
|
|
195
|
+
sort = "relevance";
|
|
196
|
+
filter = {};
|
|
197
|
+
changed();
|
|
198
|
+
},
|
|
199
|
+
setSort(next) {
|
|
200
|
+
if (next === sort || (type && !sortsFor(type).includes(next))) return;
|
|
201
|
+
sort = next;
|
|
202
|
+
changed();
|
|
203
|
+
},
|
|
204
|
+
setFilter(next) {
|
|
205
|
+
filter = next;
|
|
206
|
+
changed();
|
|
207
|
+
},
|
|
208
|
+
async loadMore() {
|
|
209
|
+
const current = page;
|
|
210
|
+
if (!type || !current?.hasNext || loadingMore || pageKey !== key()) return;
|
|
211
|
+
const id = generation;
|
|
212
|
+
loadingMore = true;
|
|
213
|
+
error = null;
|
|
214
|
+
emit();
|
|
215
|
+
try {
|
|
216
|
+
const more = await searchType({ q, type, sort, filter, limit: pageLimit, offset: current.hits.length });
|
|
217
|
+
if (generation !== id) return;
|
|
218
|
+
const seen = new Set(current.hits.map((h) => h.id));
|
|
219
|
+
page = { ...more, offset: 0, hits: [...current.hits, ...more.hits.filter((h) => (seen.has(h.id) ? false : (seen.add(h.id), true)))] };
|
|
220
|
+
} catch (e) {
|
|
221
|
+
if (generation !== id) return;
|
|
222
|
+
error = e instanceof Error ? e.message : String(e);
|
|
223
|
+
} finally {
|
|
224
|
+
if (generation === id) {
|
|
225
|
+
loadingMore = false;
|
|
226
|
+
emit();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
retry() {
|
|
231
|
+
attempt++;
|
|
232
|
+
run();
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
}
|
package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Site Search reads (@wix/search `siteSearch`, the federated service) over the SDK — the only file on
|
|
2
|
+
// this transport that sees raw search documents. The rules, bodies and mappers live in ./search-core
|
|
3
|
+
// (shared with the REST twin in rest/search.ts); this file is the transport only. Every call runs as
|
|
4
|
+
// the visitor: both search surfaces answer an anonymous visitor token (observed live; the typings say
|
|
5
|
+
// APP and the docs show an admin client — a closed door here means an Astro API route with
|
|
6
|
+
// auth.elevate(wixSiteSearch.search), per CUSTOM_OPERATIONS.md). Copy as-is; extend by adding
|
|
7
|
+
// functions (`related`, `trending`, `federatedAutocomplete` exist on the same module).
|
|
8
|
+
// docs: https://dev.wix.com/docs/api-reference/business-management/site-search/wix-site-search/search.md
|
|
9
|
+
import { siteSearch } from "@wix/search";
|
|
10
|
+
import { wixModule } from "../sdk";
|
|
11
|
+
import { imgSrc } from "../media";
|
|
12
|
+
import { siteSearchPlan } from "./config.generated";
|
|
13
|
+
import {
|
|
14
|
+
GROUP_LIMIT,
|
|
15
|
+
MIN_SUGGEST_CHARS,
|
|
16
|
+
MAX_SUGGEST_QUERY,
|
|
17
|
+
SUGGEST_LIMIT,
|
|
18
|
+
clampQuery,
|
|
19
|
+
federatedBody,
|
|
20
|
+
productsOf,
|
|
21
|
+
resolveConfig,
|
|
22
|
+
searchBody,
|
|
23
|
+
storeFrontById,
|
|
24
|
+
suggestBody,
|
|
25
|
+
toPage,
|
|
26
|
+
toSearchAll,
|
|
27
|
+
toSuggestGroups,
|
|
28
|
+
type Raw,
|
|
29
|
+
} from "./search-core";
|
|
30
|
+
import type { SearchAllResult, SearchOptions, SearchPage, SiteSearchConfig, SuggestGroup } from "./types";
|
|
31
|
+
|
|
32
|
+
const search = wixModule(siteSearch);
|
|
33
|
+
|
|
34
|
+
/** The plan's siteSearch entry resolved — types in order, routes, labels. */
|
|
35
|
+
export const config: SiteSearchConfig = resolveConfig(siteSearchPlan);
|
|
36
|
+
|
|
37
|
+
// The store-front pass is a second request that only adds product slugs and media; when it fails the
|
|
38
|
+
// products render unlinked instead of failing the search.
|
|
39
|
+
async function storeFrontPass(run: () => Promise<Raw>): Promise<Raw | null> {
|
|
40
|
+
try {
|
|
41
|
+
return await run();
|
|
42
|
+
} catch {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Every configured type at once, `limit` hits per type — the grouped results page.
|
|
49
|
+
* Products are fetched twice (default format for title and highlights, store-front for the slug,
|
|
50
|
+
* see search-core) and joined on id. Empty `q` → no request, `indexed: null`.
|
|
51
|
+
*/
|
|
52
|
+
export async function searchAll(q: string, { limit = GROUP_LIMIT }: { limit?: number } = {}): Promise<SearchAllResult> {
|
|
53
|
+
const query = clampQuery(q);
|
|
54
|
+
if (!query) return { groups: [], indexed: null };
|
|
55
|
+
const wantsProducts = config.types.includes("products");
|
|
56
|
+
const [res, sf] = await Promise.all([
|
|
57
|
+
search.federatedSearch(federatedBody(query, config, { limit }) as siteSearch.FederatedSearchOptions),
|
|
58
|
+
wantsProducts ? storeFrontPass(() => search.federatedSearch(federatedBody(query, config, { limit, types: ["products"], storeFront: true }) as siteSearch.FederatedSearchOptions)) : null,
|
|
59
|
+
]);
|
|
60
|
+
return toSearchAll(res.results as Raw[], config, imgSrc, storeFrontById(productsOf(sf?.results as Raw[] | undefined)));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** One type with paging, ordering, filter and facets — the "show all" view and its pages. */
|
|
64
|
+
export async function searchType(o: SearchOptions): Promise<SearchPage> {
|
|
65
|
+
const query = clampQuery(o.q);
|
|
66
|
+
if (!query) return toPage(null, o, config, imgSrc);
|
|
67
|
+
const [res, sf] = await Promise.all([
|
|
68
|
+
search.search(searchBody({ ...o, q: query }, config) as siteSearch.SearchOptions),
|
|
69
|
+
o.type === "products" ? storeFrontPass(() => search.search(searchBody({ ...o, q: query }, config, { storeFront: true }) as siteSearch.SearchOptions)) : null,
|
|
70
|
+
]);
|
|
71
|
+
return toPage(res as Raw, { ...o, q: query }, config, imgSrc, storeFrontById(sf?.documents as Raw[] | undefined));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Suggestions for a partial phrase (3 to 50 chars; fewer → [] without a request), `limit` per type. */
|
|
75
|
+
export async function suggest(q: string, { limit = SUGGEST_LIMIT }: { limit?: number } = {}): Promise<SuggestGroup[]> {
|
|
76
|
+
const query = clampQuery(q, MAX_SUGGEST_QUERY);
|
|
77
|
+
if (query.length < MIN_SUGGEST_CHARS) return [];
|
|
78
|
+
const res = await search.federatedSuggest(suggestBody(query, config, limit) as siteSearch.FederatedSuggestOptions);
|
|
79
|
+
return toSuggestGroups(res.results as Raw[], config, imgSrc);
|
|
80
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// The header search box as a framework-free store — the logic behind useSuggest. Same shape as the
|
|
2
|
+
// other stores: state, actions, subscribe/getState, emit after every change.
|
|
3
|
+
//
|
|
4
|
+
// THE debounce boundary of the capability lives here (the only timer): setInput() waits
|
|
5
|
+
// `debounceMs` after the last keystroke, then asks for suggestions when the phrase has at least
|
|
6
|
+
// `minChars` (the service's minimum is 3); a shorter phrase clears the list and cancels whatever is
|
|
7
|
+
// in flight. A late response from a superseded phrase is dropped. Keyboard state (open, the active
|
|
8
|
+
// row) is here too, so the component only renders and routes.
|
|
9
|
+
//
|
|
10
|
+
// submit() is the widget rule: an active row navigates to the row (a row without an href — a
|
|
11
|
+
// product suggestion, whose slug the suggest service cannot return — becomes a search for its title
|
|
12
|
+
// in its type); no active row → the results page for the typed phrase. The caller routes.
|
|
13
|
+
import { suggest } from "./search";
|
|
14
|
+
import { MAX_SUGGEST_QUERY, MIN_SUGGEST_CHARS, SUGGEST_DEBOUNCE_MS, SUGGEST_LIMIT, clampQuery } from "./search-core";
|
|
15
|
+
import type { SearchDocType, SuggestGroup, SuggestHit } from "./types";
|
|
16
|
+
|
|
17
|
+
export interface SuggestStoreOptions {
|
|
18
|
+
minChars?: number;
|
|
19
|
+
debounceMs?: number;
|
|
20
|
+
/** Suggestions per type (default 4). */
|
|
21
|
+
limit?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SuggestState {
|
|
25
|
+
/** What the input shows (untrimmed). */
|
|
26
|
+
input: string;
|
|
27
|
+
groups: SuggestGroup[];
|
|
28
|
+
/** The groups' hits flattened — the keyboard walks this. */
|
|
29
|
+
rows: SuggestHit[];
|
|
30
|
+
/** Whether the listbox is shown (rows exist and the box was not closed). */
|
|
31
|
+
open: boolean;
|
|
32
|
+
/** Index into rows; -1 = none. */
|
|
33
|
+
activeIndex: number;
|
|
34
|
+
loading: boolean;
|
|
35
|
+
error: string | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type SuggestSubmit =
|
|
39
|
+
| { kind: "hit"; hit: SuggestHit; href: string }
|
|
40
|
+
| { kind: "query"; q: string; type: SearchDocType | null }
|
|
41
|
+
| null;
|
|
42
|
+
|
|
43
|
+
export interface SuggestStore {
|
|
44
|
+
getState(): SuggestState;
|
|
45
|
+
subscribe(listener: () => void): () => void;
|
|
46
|
+
/** Every keystroke. Schedules the request; clears when under minChars. */
|
|
47
|
+
setInput(value: string): void;
|
|
48
|
+
/** Show the list again after a hide (focus). */
|
|
49
|
+
show(): void;
|
|
50
|
+
/** Hide the list and drop the active row (blur, Escape, a navigation). */
|
|
51
|
+
hide(): void;
|
|
52
|
+
/** Move the active row by ±1, wrapping; opens the list. */
|
|
53
|
+
moveActive(delta: number): void;
|
|
54
|
+
setActive(index: number): void;
|
|
55
|
+
/** What Enter (or the form submit) means right now; null when there is nothing to search. */
|
|
56
|
+
submit(): SuggestSubmit;
|
|
57
|
+
/** Cancel the timer and any in-flight request (unmount). */
|
|
58
|
+
stop(): void;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function createSuggestStore({ minChars = MIN_SUGGEST_CHARS, debounceMs = SUGGEST_DEBOUNCE_MS, limit = SUGGEST_LIMIT }: SuggestStoreOptions = {}): SuggestStore {
|
|
62
|
+
let input = "";
|
|
63
|
+
let groups: SuggestGroup[] = [];
|
|
64
|
+
let rows: SuggestHit[] = [];
|
|
65
|
+
let closed = false;
|
|
66
|
+
let activeIndex = -1;
|
|
67
|
+
let loading = false;
|
|
68
|
+
let error: string | null = null;
|
|
69
|
+
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
70
|
+
let generation = 0;
|
|
71
|
+
const listeners = new Set<() => void>();
|
|
72
|
+
let snapshot: SuggestState | null = null;
|
|
73
|
+
const emit = () => {
|
|
74
|
+
snapshot = null;
|
|
75
|
+
for (const fn of listeners) fn();
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function getState(): SuggestState {
|
|
79
|
+
if (snapshot) return snapshot;
|
|
80
|
+
snapshot = { input, groups, rows, open: !closed && rows.length > 0, activeIndex, loading, error };
|
|
81
|
+
return snapshot;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const clearTimer = () => {
|
|
85
|
+
if (timer) clearTimeout(timer);
|
|
86
|
+
timer = null;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
function setResults(next: SuggestGroup[]): void {
|
|
90
|
+
groups = next;
|
|
91
|
+
rows = next.flatMap((g) => g.hits);
|
|
92
|
+
if (activeIndex >= rows.length) activeIndex = -1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function fetchNow(phrase: string): void {
|
|
96
|
+
const id = ++generation;
|
|
97
|
+
loading = true;
|
|
98
|
+
error = null;
|
|
99
|
+
emit();
|
|
100
|
+
suggest(phrase, { limit })
|
|
101
|
+
.then((res) => {
|
|
102
|
+
if (generation !== id) return; // superseded — drop it
|
|
103
|
+
setResults(res);
|
|
104
|
+
loading = false;
|
|
105
|
+
emit();
|
|
106
|
+
})
|
|
107
|
+
.catch((e) => {
|
|
108
|
+
if (generation !== id) return;
|
|
109
|
+
setResults([]);
|
|
110
|
+
loading = false;
|
|
111
|
+
error = e instanceof Error ? e.message : String(e);
|
|
112
|
+
emit();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
getState,
|
|
118
|
+
subscribe(fn) {
|
|
119
|
+
listeners.add(fn);
|
|
120
|
+
return () => listeners.delete(fn);
|
|
121
|
+
},
|
|
122
|
+
setInput(value) {
|
|
123
|
+
input = value;
|
|
124
|
+
closed = false;
|
|
125
|
+
activeIndex = -1;
|
|
126
|
+
clearTimer();
|
|
127
|
+
const phrase = clampQuery(value, MAX_SUGGEST_QUERY);
|
|
128
|
+
if (phrase.length < Math.max(minChars, MIN_SUGGEST_CHARS)) {
|
|
129
|
+
generation++; // drop anything in flight
|
|
130
|
+
setResults([]);
|
|
131
|
+
loading = false;
|
|
132
|
+
error = null;
|
|
133
|
+
emit();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
emit();
|
|
137
|
+
timer = setTimeout(() => {
|
|
138
|
+
timer = null;
|
|
139
|
+
fetchNow(phrase);
|
|
140
|
+
}, debounceMs);
|
|
141
|
+
},
|
|
142
|
+
show() {
|
|
143
|
+
if (!closed) return;
|
|
144
|
+
closed = false;
|
|
145
|
+
emit();
|
|
146
|
+
},
|
|
147
|
+
hide() {
|
|
148
|
+
if (closed && activeIndex === -1) return;
|
|
149
|
+
closed = true;
|
|
150
|
+
activeIndex = -1;
|
|
151
|
+
emit();
|
|
152
|
+
},
|
|
153
|
+
moveActive(delta) {
|
|
154
|
+
if (!rows.length) return;
|
|
155
|
+
closed = false;
|
|
156
|
+
const n = rows.length;
|
|
157
|
+
activeIndex = activeIndex === -1 ? (delta > 0 ? 0 : n - 1) : (((activeIndex + delta) % n) + n) % n;
|
|
158
|
+
emit();
|
|
159
|
+
},
|
|
160
|
+
setActive(index) {
|
|
161
|
+
const next = index >= 0 && index < rows.length ? index : -1;
|
|
162
|
+
if (next === activeIndex) return;
|
|
163
|
+
activeIndex = next;
|
|
164
|
+
emit();
|
|
165
|
+
},
|
|
166
|
+
submit() {
|
|
167
|
+
const hit = !closed && activeIndex >= 0 ? rows[activeIndex] : undefined;
|
|
168
|
+
if (hit) return hit.href ? { kind: "hit", hit, href: hit.href } : { kind: "query", q: hit.title, type: hit.type };
|
|
169
|
+
const q = clampQuery(input);
|
|
170
|
+
return q ? { kind: "query", q, type: null } : null;
|
|
171
|
+
},
|
|
172
|
+
stop() {
|
|
173
|
+
clearTimer();
|
|
174
|
+
generation++;
|
|
175
|
+
loading = false;
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// Site Search DTOs — the serializable shapes every hook, component and page consumes. Plain JSON:
|
|
2
|
+
// safe as Astro island props and across a server/client boundary. `titleHtml` and `excerptHtml`
|
|
3
|
+
// carry text and <mark> only (sanitised once, in search-core); `href` is a route of THIS site — the
|
|
4
|
+
// `url` the index carries points at Wix pages a headless site does not have, and never leaves the
|
|
5
|
+
// data layer.
|
|
6
|
+
|
|
7
|
+
/** Our group keys. The Wix spelling of each ("public/stores/products", …) lives in search-core. */
|
|
8
|
+
export type SearchDocType = "products" | "services" | "posts" | "events" | "pages";
|
|
9
|
+
|
|
10
|
+
interface HitBase {
|
|
11
|
+
id: string;
|
|
12
|
+
type: SearchDocType;
|
|
13
|
+
/** Plain text — aria-labels, <title>, the fallback when there is no highlight. */
|
|
14
|
+
title: string;
|
|
15
|
+
/** The title with the matched words wrapped in <mark>; text and <mark> only. */
|
|
16
|
+
titleHtml: string;
|
|
17
|
+
/** The best highlighted passage of the description, else its start; text and <mark> only. "" when none. */
|
|
18
|
+
excerptHtml: string;
|
|
19
|
+
/** Resolved https URL ("" when the document has no image). */
|
|
20
|
+
imageUrl: string;
|
|
21
|
+
/** This site's route for the hit ("" when no slug could be derived — render the row unlinked). */
|
|
22
|
+
href: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ProductHit extends HitBase {
|
|
26
|
+
type: "products";
|
|
27
|
+
slug: string;
|
|
28
|
+
/** Formatted, as the index carries it ("€54.99"); "" when absent. */
|
|
29
|
+
price: string;
|
|
30
|
+
inStock: boolean;
|
|
31
|
+
collections: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface ServiceHit extends HitBase {
|
|
34
|
+
type: "services";
|
|
35
|
+
slug: string;
|
|
36
|
+
category: string;
|
|
37
|
+
tagLine: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PostHit extends HitBase {
|
|
40
|
+
type: "posts";
|
|
41
|
+
slug: string;
|
|
42
|
+
/** ISO date; "" when absent. */
|
|
43
|
+
publishDate: string;
|
|
44
|
+
author: string;
|
|
45
|
+
tags: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface EventHit extends HitBase {
|
|
48
|
+
type: "events";
|
|
49
|
+
slug: string;
|
|
50
|
+
/** ISO date; "" when absent. */
|
|
51
|
+
startDate: string;
|
|
52
|
+
location: string;
|
|
53
|
+
/** Formatted lowest ticket price ("From €20"), "Free", or "" when unknown. */
|
|
54
|
+
price: string;
|
|
55
|
+
}
|
|
56
|
+
/** Wix-page content — a headless site has none; off by default (the plan may turn it on). */
|
|
57
|
+
export interface PageHit extends HitBase {
|
|
58
|
+
type: "pages";
|
|
59
|
+
}
|
|
60
|
+
export type SearchHit = ProductHit | ServiceHit | PostHit | EventHit | PageHit;
|
|
61
|
+
|
|
62
|
+
/** One document type's slice of a federated search. */
|
|
63
|
+
export interface SearchGroup {
|
|
64
|
+
type: SearchDocType;
|
|
65
|
+
label: string;
|
|
66
|
+
/** Matching documents of this type across the whole index — usually more than `hits` holds. */
|
|
67
|
+
total: number;
|
|
68
|
+
hits: SearchHit[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface FacetValue {
|
|
72
|
+
value: string;
|
|
73
|
+
count: number;
|
|
74
|
+
}
|
|
75
|
+
export interface SearchFacets {
|
|
76
|
+
/** Term facets by field name (products: `collections`, `inStock`). */
|
|
77
|
+
terms: Record<string, FacetValue[]>;
|
|
78
|
+
/** Numeric bounds by field name (products: `discountedPriceNumeric`). */
|
|
79
|
+
ranges: Record<string, { min: number | null; max: number | null }>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type SearchSort = "relevance" | "price-asc" | "price-desc" | "date-desc";
|
|
83
|
+
|
|
84
|
+
export interface SearchFilter {
|
|
85
|
+
/** Products: any of these collection names. */
|
|
86
|
+
collections?: string[];
|
|
87
|
+
/** Products: in stock only. */
|
|
88
|
+
inStockOnly?: boolean;
|
|
89
|
+
/** Products: discounted price bounds. */
|
|
90
|
+
minPrice?: number;
|
|
91
|
+
maxPrice?: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** A single-type query — the results page's "show all" view and its pages. */
|
|
95
|
+
export interface SearchOptions {
|
|
96
|
+
q: string;
|
|
97
|
+
type: SearchDocType;
|
|
98
|
+
/** 1–100, default 12. */
|
|
99
|
+
limit?: number;
|
|
100
|
+
offset?: number;
|
|
101
|
+
sort?: SearchSort;
|
|
102
|
+
filter?: SearchFilter;
|
|
103
|
+
/** Typo tolerance (default from the config). */
|
|
104
|
+
fuzzy?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface SearchPage {
|
|
108
|
+
type: SearchDocType;
|
|
109
|
+
hits: SearchHit[];
|
|
110
|
+
total: number;
|
|
111
|
+
offset: number;
|
|
112
|
+
limit: number;
|
|
113
|
+
hasNext: boolean;
|
|
114
|
+
facets: SearchFacets;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface SearchAllResult {
|
|
118
|
+
/** Non-empty groups in the configured type order. */
|
|
119
|
+
groups: SearchGroup[];
|
|
120
|
+
/**
|
|
121
|
+
* Whether the site has an index at all. true: documents came back. false: the response listed no
|
|
122
|
+
* document type — nothing is indexed (the Wix Site Search app is not installed on this site).
|
|
123
|
+
* null: unknown — zero documents is ambiguous (no match, an empty catalog, or an index still
|
|
124
|
+
* back-filling after the install); do not read it as "not installed".
|
|
125
|
+
*/
|
|
126
|
+
indexed: boolean | null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type SuggestHit = Pick<SearchHit, "id" | "type" | "title" | "titleHtml" | "imageUrl" | "href">;
|
|
130
|
+
|
|
131
|
+
export interface SuggestGroup {
|
|
132
|
+
type: SearchDocType;
|
|
133
|
+
label: string;
|
|
134
|
+
hits: SuggestHit[];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** The resolved configuration every call reads (search-core's resolveConfig, from the plan). */
|
|
138
|
+
export interface SiteSearchConfig {
|
|
139
|
+
/** Document types searched and shown, in this order. */
|
|
140
|
+
types: SearchDocType[];
|
|
141
|
+
/** Route templates per type, `[slug]` replaced by the URL-encoded slug. "" = never linked. */
|
|
142
|
+
routes: Record<SearchDocType, string>;
|
|
143
|
+
labels: Record<SearchDocType, string>;
|
|
144
|
+
/** BCP-47 language the index is queried in; null lets the service pick. */
|
|
145
|
+
language: string | null;
|
|
146
|
+
fuzzy: boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** What `plan.capabilities.siteSearch` may say — deploy writes it to config.generated.ts as data. */
|
|
150
|
+
export interface SiteSearchPlan {
|
|
151
|
+
/** Install the Wix Site Search app during the seed (the capability's seed/install.mjs). */
|
|
152
|
+
install?: boolean;
|
|
153
|
+
types?: string[];
|
|
154
|
+
routes?: Record<string, string>;
|
|
155
|
+
labels?: Record<string, string>;
|
|
156
|
+
language?: string;
|
|
157
|
+
fuzzy?: boolean;
|
|
158
|
+
}
|
package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The results page: /search?q=<phrase>[&type=<products|services|posts|events>].
|
|
3
|
+
//
|
|
4
|
+
// SSR renders the first result set from the query string — the grouped view (every configured type
|
|
5
|
+
// at once) or, with `type`, the first page of that type — and hands it to the SearchResults island,
|
|
6
|
+
// which takes over: "show all", sort, facets, paging, all client-side against the same data layer.
|
|
7
|
+
// Keep the frontmatter (the clamp to 100 chars, the type check against the config, the noindex
|
|
8
|
+
// header); restyle the template. SiteLayout is the deployed vertical's — brand it there; the header
|
|
9
|
+
// SearchBox (components/site-search/SearchBox.tsx, client:only="react") is what leads visitors here.
|
|
10
|
+
import SiteLayout from "../layouts/SiteLayout.astro";
|
|
11
|
+
import SearchResults from "../components/site-search/SearchResults";
|
|
12
|
+
import { config, searchAll, searchType } from "../wix/site-search/search";
|
|
13
|
+
import { MAX_QUERY, clampQuery, isDocType } from "../wix/site-search/search-core";
|
|
14
|
+
import type { SearchAllResult, SearchPage } from "../wix/site-search/types";
|
|
15
|
+
|
|
16
|
+
const q = clampQuery(Astro.url.searchParams.get("q"), MAX_QUERY);
|
|
17
|
+
const typeParam = Astro.url.searchParams.get("type");
|
|
18
|
+
const type = isDocType(typeParam) && config.types.includes(typeParam) ? typeParam : null;
|
|
19
|
+
|
|
20
|
+
// A search page is never a landing page: keep it out of the index (the header form works with every
|
|
21
|
+
// layout, where a <meta> in the seo-tags slot would fight the layout's own <title>).
|
|
22
|
+
Astro.response.headers.set("X-Robots-Tag", "noindex");
|
|
23
|
+
|
|
24
|
+
// Fail loudly on a real error (the layout's error page), but an empty q renders the prompt state.
|
|
25
|
+
let initial: SearchAllResult | null = null;
|
|
26
|
+
let initialPage: SearchPage | null = null;
|
|
27
|
+
if (q && !type) initial = await searchAll(q);
|
|
28
|
+
if (q && type) initialPage = await searchType({ q, type });
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
<SiteLayout title={q ? `Search: ${q}` : "Search"} description={q ? `Search results for “${q}”` : "Search this site"}>
|
|
32
|
+
<SearchResults client:load q={q} type={type} initialGroups={initial?.groups ?? null} initialIndexed={initial?.indexed ?? null} initialPage={initialPage} />
|
|
33
|
+
</SiteLayout>
|