@wix/agent-skills 1.26.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +8 -6
- package/skills/wix-app/references/APP_VALIDATION.md +5 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +1 -1
- package/skills/wix-app/references/SDK_MODULE_MAP.md +1 -1
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +14 -2
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +4 -5
- package/skills/wix-app/references/stores/GET_PRODUCT.md +9 -1
- package/skills/wix-app/references/stores/INVENTORY.md +2 -0
- package/skills/wix-app/references/stores/QUERY.md +2 -2
- package/skills/wix-app/references/stores/WRITE.md +1 -1
- package/skills/wix-headless-kit/SKILL.md +35 -14
- package/skills/wix-headless-kit/guides/existing-site.md +12 -5
- package/skills/wix-headless-kit/guides/no-machine.md +115 -0
- package/skills/wix-headless-kit/install/attach.mjs +60 -13
- package/skills/wix-headless-kit/install/bootstrap.mjs +3 -1
- package/skills/wix-headless-kit/install/check.mjs +5 -5
- package/skills/wix-headless-kit/install/context.mjs +4 -2
- package/skills/wix-headless-kit/install/deploy.mjs +11 -5
- package/skills/wix-headless-kit/install/pins.json +8 -0
- package/skills/wix-headless-kit/install/setup.mjs +10 -8
- package/skills/wix-headless-kit/install/templates.mjs +39 -25
- package/skills/wix-headless-templates/SKILL.md +43 -0
- package/skills/wix-headless-templates/blank/project/README.md +15 -0
- package/skills/wix-headless-templates/blank/project/astro.config.mjs +20 -0
- package/skills/wix-headless-templates/blank/project/package.json +34 -0
- package/skills/wix-headless-templates/blank/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blank/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blank/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blank/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blank/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blank/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blank/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/INSTRUCTIONS.md +418 -0
- package/skills/wix-headless-templates/blog/app/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/app/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/app-astro/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/README.md +15 -0
- package/skills/wix-headless-templates/blog/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/blog/project/package-lock.json +14699 -0
- package/skills/wix-headless-templates/blog/project/package.json +39 -0
- package/skills/wix-headless-templates/blog/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blog/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blog/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blog/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blog/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/blog/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/blog/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/blog/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/blog/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/rest/authors.ts +39 -0
- package/skills/wix-headless-templates/blog/rest/comments.ts +64 -0
- package/skills/wix-headless-templates/blog/rest/post-likes.ts +37 -0
- package/skills/wix-headless-templates/blog/rest/posts.ts +123 -0
- package/skills/wix-headless-templates/blog/rest/taxonomy.ts +79 -0
- package/skills/wix-headless-templates/blog/seed/SEED.md +81 -0
- package/skills/wix-headless-templates/blog/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +337 -0
- package/skills/wix-headless-templates/bookings/INSTRUCTIONS.md +356 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/README.md +15 -0
- package/skills/wix-headless-templates/bookings/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/bookings/project/package-lock.json +10546 -0
- package/skills/wix-headless-templates/bookings/project/package.json +41 -0
- package/skills/wix-headless-templates/bookings/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/bookings/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/bookings/rest/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/rest/services.ts +94 -0
- package/skills/wix-headless-templates/bookings/seed/SEED.md +109 -0
- package/skills/wix-headless-templates/bookings/seed/read-site.mjs +28 -0
- package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +407 -0
- package/skills/wix-headless-templates/cms/INSTRUCTIONS.md +399 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/README.md +15 -0
- package/skills/wix-headless-templates/cms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/cms/project/package-lock.json +9798 -0
- package/skills/wix-headless-templates/cms/project/package.json +37 -0
- package/skills/wix-headless-templates/cms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/cms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/cms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/cms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/cms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/cms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/cms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/cms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/cms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/cms/rest/collections.ts +25 -0
- package/skills/wix-headless-templates/cms/rest/items.ts +189 -0
- package/skills/wix-headless-templates/cms/seed/SEED.md +116 -0
- package/skills/wix-headless-templates/cms/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +321 -0
- package/skills/wix-headless-templates/compose.mjs +83 -0
- package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +348 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +68 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +465 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/app-astro/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/app-astro/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/README.md +15 -0
- package/skills/wix-headless-templates/donations/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/donations/project/package-lock.json +10266 -0
- package/skills/wix-headless-templates/donations/project/package.json +39 -0
- package/skills/wix-headless-templates/donations/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/donations/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/donations/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/donations/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/donations/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/donations/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +68 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +465 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/donations/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/donations/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/donations/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +76 -0
- package/skills/wix-headless-templates/donations/rest/donate.ts +64 -0
- package/skills/wix-headless-templates/donations/seed/SEED.md +90 -0
- package/skills/wix-headless-templates/donations/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +250 -0
- package/skills/wix-headless-templates/events/INSTRUCTIONS.md +387 -0
- package/skills/wix-headless-templates/events/app/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/app/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/app/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/app/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/app/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/app/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/app-astro/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/README.md +15 -0
- package/skills/wix-headless-templates/events/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/events/project/package-lock.json +10497 -0
- package/skills/wix-headless-templates/events/project/package.json +39 -0
- package/skills/wix-headless-templates/events/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/events/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/events/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/events/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/events/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/project/src/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/project/src/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/project/src/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/events/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/events/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/events/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/events/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/events/rest/events.ts +112 -0
- package/skills/wix-headless-templates/events/rest/orders.ts +28 -0
- package/skills/wix-headless-templates/events/rest/registration.ts +96 -0
- package/skills/wix-headless-templates/events/seed/SEED.md +115 -0
- package/skills/wix-headless-templates/events/seed/read-site.mjs +26 -0
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +322 -0
- package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +317 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/app/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/app-astro/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/README.md +15 -0
- package/skills/wix-headless-templates/faq/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/faq/project/package-lock.json +8837 -0
- package/skills/wix-headless-templates/faq/project/package.json +37 -0
- package/skills/wix-headless-templates/faq/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/faq/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/faq/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/faq/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/project/src/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/project/src/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/faq/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/faq/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/faq/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/faq/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/faq/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/faq/rest/faq.ts +71 -0
- package/skills/wix-headless-templates/faq/seed/SEED.md +104 -0
- package/skills/wix-headless-templates/faq/seed/read-site.mjs +23 -0
- package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +302 -0
- package/skills/wix-headless-templates/forms/INSTRUCTIONS.md +417 -0
- package/skills/wix-headless-templates/forms/app/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/README.md +15 -0
- package/skills/wix-headless-templates/forms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/forms/project/package-lock.json +9102 -0
- package/skills/wix-headless-templates/forms/project/package.json +37 -0
- package/skills/wix-headless-templates/forms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/forms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/forms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/forms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/forms/project/src/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/forms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/forms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/forms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/forms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/forms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/forms/rest/forms.ts +37 -0
- package/skills/wix-headless-templates/forms/rest/submissions.ts +83 -0
- package/skills/wix-headless-templates/forms/seed/SEED.md +225 -0
- package/skills/wix-headless-templates/forms/seed/read-site.mjs +53 -0
- package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +574 -0
- package/skills/wix-headless-templates/forms/tooling/address-templates.mjs +96 -0
- package/skills/wix-headless-templates/members/INSTRUCTIONS.md +345 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/app/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/app/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/app/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/app/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/app/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/app/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/app/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/app/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/app/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/app-astro/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/app-astro/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/app-astro/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/README.md +15 -0
- package/skills/wix-headless-templates/members/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/members/project/package-lock.json +8892 -0
- package/skills/wix-headless-templates/members/project/package.json +37 -0
- package/skills/wix-headless-templates/members/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/members/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/members/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/members/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/project/src/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/project/src/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/project/src/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/project/src/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/members/project/src/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/project/src/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/members/project/src/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/members/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/members/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/members/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/members/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/members/rest/auth.ts +224 -0
- package/skills/wix-headless-templates/members/rest/members.ts +26 -0
- package/skills/wix-headless-templates/members/seed/SEED.md +39 -0
- package/skills/wix-headless-templates/members/seed/read-site.mjs +15 -0
- package/skills/wix-headless-templates/members/seed/seed-members.mjs +91 -0
- package/skills/wix-headless-templates/portfolio/INSTRUCTIONS.md +315 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/README.md +15 -0
- package/skills/wix-headless-templates/portfolio/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/portfolio/project/package-lock.json +8760 -0
- package/skills/wix-headless-templates/portfolio/project/package.json +37 -0
- package/skills/wix-headless-templates/portfolio/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/portfolio/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +75 -0
- package/skills/wix-headless-templates/portfolio/seed/SEED.md +86 -0
- package/skills/wix-headless-templates/portfolio/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +253 -0
- package/skills/wix-headless-templates/pricing-plans/INSTRUCTIONS.md +378 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/README.md +15 -0
- package/skills/wix-headless-templates/pricing-plans/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/package-lock.json +9799 -0
- package/skills/wix-headless-templates/pricing-plans/project/package.json +38 -0
- package/skills/wix-headless-templates/pricing-plans/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/pricing-plans/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +58 -0
- package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +20 -0
- package/skills/wix-headless-templates/pricing-plans/seed/SEED.md +93 -0
- package/skills/wix-headless-templates/pricing-plans/seed/read-site.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +301 -0
- package/skills/wix-headless-templates/rentals/INSTRUCTIONS.md +309 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/README.md +15 -0
- package/skills/wix-headless-templates/rentals/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/rentals/project/package-lock.json +10545 -0
- package/skills/wix-headless-templates/rentals/project/package.json +40 -0
- package/skills/wix-headless-templates/rentals/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/rentals/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/rentals/rest/rentals.ts +153 -0
- package/skills/wix-headless-templates/rentals/seed/SEED.md +95 -0
- package/skills/wix-headless-templates/rentals/seed/read-site.mjs +34 -0
- package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +321 -0
- package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +468 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/README.md +15 -0
- package/skills/wix-headless-templates/restaurants/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/restaurants/project/package-lock.json +11038 -0
- package/skills/wix-headless-templates/restaurants/project/package.json +40 -0
- package/skills/wix-headless-templates/restaurants/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/restaurants/rest/menu.ts +96 -0
- package/skills/wix-headless-templates/restaurants/rest/ordering.ts +222 -0
- package/skills/wix-headless-templates/restaurants/rest/reservations.ts +102 -0
- package/skills/wix-headless-templates/restaurants/seed/SEED.md +118 -0
- package/skills/wix-headless-templates/restaurants/seed/read-site.mjs +25 -0
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +577 -0
- package/skills/wix-headless-templates/shared/CONTENT.md +22 -0
- package/skills/wix-headless-templates/shared/CUSTOM_OPERATIONS.md +100 -0
- package/skills/wix-headless-templates/shared/DESIGN.md +37 -0
- package/skills/wix-headless-templates/shared/SUPPLIED-CONTENT.md +27 -0
- package/skills/wix-headless-templates/shared/app/styles/global.css +57 -0
- package/skills/wix-headless-templates/shared/app/wix/config.ts +16 -0
- package/skills/wix-headless-templates/shared/app/wix/media.ts +106 -0
- package/skills/wix-headless-templates/shared/app/wix/money.ts +24 -0
- package/skills/wix-headless-templates/shared/app/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +69 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/INSTRUCTIONS.md +194 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchBox.tsx +136 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchHit.tsx +50 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchResults.tsx +300 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSearch.ts +31 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSuggest.ts +26 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-core.ts +520 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-store.ts +235 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts +80 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/suggest-store.ts +178 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts +158 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro +33 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +82 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +43 -0
- package/skills/wix-headless-templates/shared/rest/client.ts +155 -0
- package/skills/wix-headless-templates/shared/rest/config.ts +4 -0
- package/skills/wix-headless-templates/shared/rest/media.ts +92 -0
- package/skills/wix-headless-templates/shared/seed/images.mjs +183 -0
- package/skills/wix-headless-templates/shared/seed/read-site.mjs +97 -0
- package/skills/wix-headless-templates/shared/seed/site-context.mjs +70 -0
- package/skills/wix-headless-templates/shared/seed/site.mjs +48 -0
- package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +47 -0
- package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +685 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart.ts +186 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/app-astro/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/README.md +15 -0
- package/skills/wix-headless-templates/storefront/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/storefront/project/package-lock.json +10786 -0
- package/skills/wix-headless-templates/storefront/project/package.json +41 -0
- package/skills/wix-headless-templates/storefront/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/storefront/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart.ts +186 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/storefront/rest/cart.ts +183 -0
- package/skills/wix-headless-templates/storefront/rest/catalog.ts +267 -0
- package/skills/wix-headless-templates/storefront/seed/SEED.md +169 -0
- package/skills/wix-headless-templates/storefront/seed/read-site.mjs +38 -0
- package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +839 -0
- package/skills/wix-manage/SKILL.md +11 -7
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +1 -1
- package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +206 -0
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +17 -24
- package/skills/wix-manage/references/sites/create-headless-site.md +2 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +281 -171
- package/skills/wix-manage/references/stores/update-product-with-options.md +1 -1
- package/skills/wix-headless/entry/bootstrap.mjs +0 -156
- package/skills/wix-headless/entry/skill.md +0 -78
- package/skills/wix-headless-kit/cold-start/bootstrap.mjs +0 -156
- package/skills/wix-headless-kit/cold-start/cold-start.md +0 -111
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +0 -423
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// Portfolio rules and DTO mapping — transport-agnostic, imported by BOTH transports: ./portfolio.ts
|
|
2
|
+
// (the SDK, managed Astro and React) and the REST twin in templates/portfolio/rest/portfolio.ts
|
|
3
|
+
// (fetch, a static site or a port to another language). Every rule about hidden entities, order,
|
|
4
|
+
// covers, media kinds lives HERE, once. A raw entity may come from the SDK (`_id`) or from REST
|
|
5
|
+
// (`id`); the mappers accept both. Imports are type-only so a strip to JS emits no imports.
|
|
6
|
+
import type { CollectionSummary, GalleryItem, ProjectDetail, ProjectDetailRow, ProjectSummary } from "./types";
|
|
7
|
+
|
|
8
|
+
/** A raw Portfolio v1 entity as either transport returns it. */
|
|
9
|
+
export type Raw = Record<string, any>;
|
|
10
|
+
/** Media value + size → https URL. Injected: the SDK transport scales through @wix/sdk, REST through the URL form. */
|
|
11
|
+
export type ImgSrc = (value: any, width: number, height: number) => string;
|
|
12
|
+
/**
|
|
13
|
+
* A `wix:video://` reference → its mp4 rendition and poster, or null when it can't be resolved.
|
|
14
|
+
* Injected: only the SDK can resolve the string form (media.getVideoUrl); REST never receives it
|
|
15
|
+
* (its videoInfo is already an object with resolutions + posters, handled here).
|
|
16
|
+
*/
|
|
17
|
+
export type VideoSrc = (wixVideoRef: string) => { url: string; thumbnail: string } | null;
|
|
18
|
+
|
|
19
|
+
const id = (raw: Raw | undefined | null): string => raw?._id ?? raw?.id ?? "";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* An image reference as either transport carries it — the SDK's bare `wix:image://` string, or
|
|
23
|
+
* REST's `imageInfo` object `{ id, url, filename }` — normalized to the `wix:image://` form so
|
|
24
|
+
* imgSrc scales both to the SAME URL (REST's `url` is a fixed 1024×1024 rendition; the id is the
|
|
25
|
+
* media file). "" when there is no image.
|
|
26
|
+
*/
|
|
27
|
+
export function imageRef(value: unknown): string {
|
|
28
|
+
if (!value) return "";
|
|
29
|
+
if (typeof value === "string") return value;
|
|
30
|
+
const o = value as Raw;
|
|
31
|
+
if (typeof o.id === "string" && o.id) return `wix:image://v1/${o.id}/${o.filename ?? o.id}`;
|
|
32
|
+
return typeof o.url === "string" ? o.url : "";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A video as either transport carries it: the SDK's bare `wix:video://` string (resolved by the
|
|
37
|
+
* injected videoSrc — 720p is the standard transcode), or REST's videoInfo object
|
|
38
|
+
* `{ resolutions: [{ url }], posters: [{ id, url }] }` (optimal resolution first).
|
|
39
|
+
*/
|
|
40
|
+
export function toVideo(value: unknown, imgSrc: ImgSrc, videoSrc: VideoSrc): { videoUrl: string | null; posterUrl: string } {
|
|
41
|
+
if (typeof value === "string") {
|
|
42
|
+
const v = value.startsWith("wix:video://") ? videoSrc(value) : null;
|
|
43
|
+
return v ? { videoUrl: v.url, posterUrl: imgSrc(imageRef(v.thumbnail), 1200, 675) } : { videoUrl: null, posterUrl: "" };
|
|
44
|
+
}
|
|
45
|
+
const raw = value as Raw | null | undefined;
|
|
46
|
+
const url = raw?.resolutions?.[0]?.url;
|
|
47
|
+
return {
|
|
48
|
+
videoUrl: typeof url === "string" ? url : null,
|
|
49
|
+
posterUrl: imgSrc(imageRef(raw?.posters?.[0]), 1200, 675),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ---- DTO mappers -----------------------------------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
export function toCollection(raw: Raw, imgSrc: ImgSrc): CollectionSummary {
|
|
56
|
+
return {
|
|
57
|
+
id: id(raw),
|
|
58
|
+
slug: raw.slug ?? "",
|
|
59
|
+
title: raw.title ?? "",
|
|
60
|
+
description: raw.description ?? "",
|
|
61
|
+
imageUrl: imgSrc(imageRef(raw.coverImage?.imageInfo), 1200, 900),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** coverImage is ONE-OF with coverVideo — a video-covered project falls back to its poster. */
|
|
66
|
+
export function projectCover(raw: Raw, imgSrc: ImgSrc, videoSrc: VideoSrc): string {
|
|
67
|
+
return imgSrc(imageRef(raw.coverImage?.imageInfo), 1200, 900) || toVideo(raw.coverVideo?.videoInfo, imgSrc, videoSrc).posterUrl;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function toProject(raw: Raw, imgSrc: ImgSrc, videoSrc: VideoSrc): ProjectSummary {
|
|
71
|
+
return {
|
|
72
|
+
id: id(raw),
|
|
73
|
+
slug: raw.slug ?? "",
|
|
74
|
+
title: raw.title ?? "",
|
|
75
|
+
description: raw.description ?? "",
|
|
76
|
+
imageUrl: projectCover(raw, imgSrc, videoSrc),
|
|
77
|
+
collectionIds: raw.collectionIds ?? [],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** A details row is a one-of: { label, text } or { label, link: { text, url, target } }. */
|
|
82
|
+
export function toDetailRow(raw: Raw): ProjectDetailRow {
|
|
83
|
+
return {
|
|
84
|
+
label: raw.label ?? "",
|
|
85
|
+
text: raw.link?.text ?? raw.text ?? "",
|
|
86
|
+
url: raw.link?.url ?? null,
|
|
87
|
+
target: raw.link?.target ?? null,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function toDetail(raw: Raw, imgSrc: ImgSrc, videoSrc: VideoSrc): ProjectDetail {
|
|
92
|
+
return { ...toProject(raw, imgSrc, videoSrc), details: ((raw.details ?? []) as Raw[]).map(toDetailRow) };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** IMAGE → image item, VIDEO → video item; UNDEFINED or unresolvable media → null (nothing renderable). */
|
|
96
|
+
export function toGalleryItem(raw: Raw, imgSrc: ImgSrc, videoSrc: VideoSrc): GalleryItem | null {
|
|
97
|
+
const base = {
|
|
98
|
+
id: id(raw),
|
|
99
|
+
title: raw.title ?? "",
|
|
100
|
+
description: raw.description ?? "",
|
|
101
|
+
linkUrl: raw.link?.url ?? null,
|
|
102
|
+
linkTarget: raw.link?.target ?? null,
|
|
103
|
+
};
|
|
104
|
+
if (raw.type === "IMAGE") {
|
|
105
|
+
const imageUrl = imgSrc(imageRef(raw.image?.imageInfo), 1600, 1200);
|
|
106
|
+
return imageUrl ? { ...base, kind: "image", imageUrl, videoUrl: null } : null;
|
|
107
|
+
}
|
|
108
|
+
if (raw.type === "VIDEO") {
|
|
109
|
+
const { videoUrl, posterUrl } = toVideo(raw.video?.videoInfo, imgSrc, videoSrc);
|
|
110
|
+
return videoUrl ? { ...base, kind: "video", imageUrl: posterUrl, videoUrl } : null;
|
|
111
|
+
}
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ---- list rules -----------------------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Visible collections in the owner's dashboard order (sortOrder — collections have one, projects
|
|
119
|
+
* don't). An omitted `hidden` comes back ABSENT (proto3): test falsy, never === false.
|
|
120
|
+
*/
|
|
121
|
+
export function visibleCollections(raws: Raw[], imgSrc: ImgSrc): CollectionSummary[] {
|
|
122
|
+
return raws
|
|
123
|
+
.filter((c) => !c.hidden)
|
|
124
|
+
.sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0))
|
|
125
|
+
.map((c) => toCollection(c, imgSrc));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** One visible collection, or null when missing or hidden (a real 404, never a fallback). */
|
|
129
|
+
export function visibleCollection(raw: Raw | undefined | null, imgSrc: ImgSrc): CollectionSummary | null {
|
|
130
|
+
return raw && !raw.hidden ? toCollection(raw, imgSrc) : null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Visible projects in list order (Project exposes no sortOrder), optionally only one collection's.
|
|
135
|
+
* The collection filter is client-side over the one list (portfolios are small; a project links
|
|
136
|
+
* to collections via collectionIds).
|
|
137
|
+
*/
|
|
138
|
+
export function visibleProjects(raws: Raw[], collectionId: string | undefined, imgSrc: ImgSrc, videoSrc: VideoSrc): ProjectSummary[] {
|
|
139
|
+
return raws
|
|
140
|
+
.filter((p) => !p.hidden)
|
|
141
|
+
.filter((p) => !collectionId || ((p.collectionIds ?? []) as string[]).includes(collectionId))
|
|
142
|
+
.map((p) => toProject(p, imgSrc, videoSrc));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** One visible project with its details rows, or null when missing or hidden. */
|
|
146
|
+
export function visibleProject(raw: Raw | undefined | null, imgSrc: ImgSrc, videoSrc: VideoSrc): ProjectDetail | null {
|
|
147
|
+
return raw && !raw.hidden ? toDetail(raw, imgSrc, videoSrc) : null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** A project's gallery in dashboard order (item sortOrder); UNDEFINED and unresolvable items dropped. */
|
|
151
|
+
export function galleryItems(raws: Raw[], imgSrc: ImgSrc, videoSrc: VideoSrc): GalleryItem[] {
|
|
152
|
+
return raws
|
|
153
|
+
.slice()
|
|
154
|
+
.sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0))
|
|
155
|
+
.map((it) => toGalleryItem(it, imgSrc, videoSrc))
|
|
156
|
+
.filter((g): g is GalleryItem => g !== null);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ---- render rule ----------------------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
/** The one element a gallery item renders as, attribute names as HTML spells them. */
|
|
162
|
+
export type MediaElement =
|
|
163
|
+
| { tag: "img"; attrs: { src: string; alt: string; loading: "lazy"; decoding: "async" } }
|
|
164
|
+
| { tag: "video"; attrs: { src: string; poster?: string; controls: ""; playsinline: "" } };
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Branch on `kind` once, here: a video item is a <video> with its poster, an image item an <img>,
|
|
168
|
+
* anything else null — never a broken tag, never an <img> for a video. The shipped GalleryMedia.tsx
|
|
169
|
+
* renders this; a static page or a port creates the element from it.
|
|
170
|
+
*/
|
|
171
|
+
export function mediaElement(item: GalleryItem): MediaElement | null {
|
|
172
|
+
if (item.kind === "video" && item.videoUrl) {
|
|
173
|
+
return { tag: "video", attrs: { src: item.videoUrl, ...(item.imageUrl ? { poster: item.imageUrl } : {}), controls: "", playsinline: "" } };
|
|
174
|
+
}
|
|
175
|
+
if (item.imageUrl) return { tag: "img", attrs: { src: item.imageUrl, alt: item.title, loading: "lazy", decoding: "async" } };
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Portfolio reads (Wix Portfolio v1) over the SDK — the only file that touches raw portfolio
|
|
2
|
+
// entities on this transport. Read-only vertical: no cart, no checkout, no @wix/ecom. Everything
|
|
3
|
+
// it returns is a plain DTO from ./types. The rules and mappers live in ./portfolio-core (shared
|
|
4
|
+
// with the REST twin in templates/portfolio/rest/); this file is the transport only. Copy as-is;
|
|
5
|
+
// extend by adding functions, not by editing these.
|
|
6
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/collections/list-collections.md
|
|
7
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/projects/list-projects.md
|
|
8
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/project-items/list-project-items.md
|
|
9
|
+
// docs: https://dev.wix.com/docs/sdk/core-modules/sdk/media.md
|
|
10
|
+
import {
|
|
11
|
+
collections as collectionsModule,
|
|
12
|
+
projects as projectsModule,
|
|
13
|
+
projectItems as projectItemsModule,
|
|
14
|
+
} from "@wix/portfolio";
|
|
15
|
+
import { media, VideoResolution } from "@wix/sdk";
|
|
16
|
+
import { wixModule } from "../sdk";
|
|
17
|
+
import { imgSrc } from "../media";
|
|
18
|
+
import {
|
|
19
|
+
galleryItems,
|
|
20
|
+
visibleCollection,
|
|
21
|
+
visibleCollections,
|
|
22
|
+
visibleProject,
|
|
23
|
+
visibleProjects,
|
|
24
|
+
type Raw,
|
|
25
|
+
type VideoSrc,
|
|
26
|
+
} from "./portfolio-core";
|
|
27
|
+
import type { CollectionSummary, GalleryItem, ProjectDetail, ProjectSummary } from "./types";
|
|
28
|
+
|
|
29
|
+
const collections = wixModule(collectionsModule);
|
|
30
|
+
const projects = wixModule(projectsModule);
|
|
31
|
+
const projectItems = wixModule(projectItemsModule);
|
|
32
|
+
|
|
33
|
+
// The SDK types coverImage.imageInfo / item.image.imageInfo as a bare wix:image:// STRING and
|
|
34
|
+
// videoInfo as a bare wix:video:// string; getVideoUrl derives the mp4 rendition + poster.
|
|
35
|
+
const videoSrc: VideoSrc = (ref) => {
|
|
36
|
+
try {
|
|
37
|
+
const v = media.getVideoUrl(ref, VideoResolution.MID);
|
|
38
|
+
return { url: v.url, thumbnail: v.thumbnail };
|
|
39
|
+
} catch {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** List visible collections in the owner's dashboard order (sortOrder). */
|
|
45
|
+
export async function fetchCollections({ limit = 100 } = {}): Promise<CollectionSummary[]> {
|
|
46
|
+
const res = await collections.listCollections({ paging: { limit } });
|
|
47
|
+
return visibleCollections((res.collections ?? []) as Raw[], imgSrc);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Fetch one visible collection by its URL slug. Null when not found or hidden. */
|
|
51
|
+
export async function fetchCollectionBySlug(slug: string): Promise<CollectionSummary | null> {
|
|
52
|
+
const res = await collections.queryCollections().eq("slug", slug).limit(1).find();
|
|
53
|
+
return visibleCollection(res.items?.[0] as Raw | undefined, imgSrc);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** List visible projects (list order), optionally only one collection's. */
|
|
57
|
+
export async function fetchProjects({
|
|
58
|
+
collectionId,
|
|
59
|
+
limit = 100,
|
|
60
|
+
}: { collectionId?: string; limit?: number } = {}): Promise<ProjectSummary[]> {
|
|
61
|
+
const res = await projects.listProjects({ paging: { limit } });
|
|
62
|
+
return visibleProjects((res.projects ?? []) as Raw[], collectionId, imgSrc, videoSrc);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Fetch one visible project by its URL slug. Null when not found or hidden. */
|
|
66
|
+
export async function fetchProjectBySlug(slug: string): Promise<ProjectDetail | null> {
|
|
67
|
+
const res = await projects.queryProjects().eq("slug", slug).limit(1).find();
|
|
68
|
+
return visibleProject(res.items?.[0] as Raw | undefined, imgSrc, videoSrc);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A project's media gallery in dashboard order (item sortOrder). IMAGE and VIDEO items only —
|
|
73
|
+
* UNDEFINED and unresolvable media are dropped. First arg is the project _id (positional).
|
|
74
|
+
*/
|
|
75
|
+
export async function fetchProjectGallery(projectId: string): Promise<GalleryItem[]> {
|
|
76
|
+
const res = await projectItems.listProjectItems(projectId, { paging: { limit: 100 } });
|
|
77
|
+
return galleryItems((res.items ?? []) as Raw[], imgSrc, videoSrc);
|
|
78
|
+
}
|
package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Project detail + media gallery, by slug, as a framework-free store — the logic behind
|
|
2
|
+
// useProjectDetail, usable from React (the hook wraps it), from a static page's project view,
|
|
3
|
+
// from Vue/Svelte, or as the specification for a port.
|
|
4
|
+
//
|
|
5
|
+
// SSR-friendly: pass BOTH `initialProject` and `initialItems` and nothing is fetched. With only
|
|
6
|
+
// the project seeded, `start()` fetches its gallery; with nothing seeded it resolves the slug
|
|
7
|
+
// first. `notFound` is the real not-found signal (project stays null while loading). One store
|
|
8
|
+
// per (slug, mount): createProjectDetailStore(slug, options), not a singleton.
|
|
9
|
+
import { fetchProjectBySlug, fetchProjectGallery } from "./portfolio";
|
|
10
|
+
import type { GalleryItem, ProjectDetail } from "./types";
|
|
11
|
+
|
|
12
|
+
export interface ProjectDetailStoreOptions {
|
|
13
|
+
initialProject?: ProjectDetail;
|
|
14
|
+
initialItems?: GalleryItem[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ProjectDetailState {
|
|
18
|
+
/** null while loading AND when not found — check `notFound` to tell them apart. */
|
|
19
|
+
project: ProjectDetail | null;
|
|
20
|
+
notFound: boolean;
|
|
21
|
+
/** null while the gallery load is in flight — render skeletons, not an empty state. */
|
|
22
|
+
items: GalleryItem[] | null;
|
|
23
|
+
error: string | null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ProjectDetailStore {
|
|
27
|
+
getState(): ProjectDetailState;
|
|
28
|
+
subscribe(listener: () => void): () => void;
|
|
29
|
+
/** Resolve the slug and load its gallery unless both were seeded. Call once when mounted. */
|
|
30
|
+
start(): void;
|
|
31
|
+
/** Stop reacting; drop late responses. */
|
|
32
|
+
stop(): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function createProjectDetailStore(
|
|
36
|
+
slug: string,
|
|
37
|
+
{ initialProject, initialItems }: ProjectDetailStoreOptions = {},
|
|
38
|
+
): ProjectDetailStore {
|
|
39
|
+
let project: ProjectDetail | null = initialProject ?? null;
|
|
40
|
+
let notFound = false;
|
|
41
|
+
let items: GalleryItem[] | null = initialItems ?? null;
|
|
42
|
+
let error: string | null = null;
|
|
43
|
+
let started = false;
|
|
44
|
+
const listeners = new Set<() => void>();
|
|
45
|
+
let snapshot: ProjectDetailState | null = null;
|
|
46
|
+
const emit = () => { snapshot = null; for (const fn of listeners) fn(); };
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
getState() {
|
|
50
|
+
return (snapshot ??= { project, notFound, items, error });
|
|
51
|
+
},
|
|
52
|
+
subscribe(fn) { listeners.add(fn); return () => listeners.delete(fn); },
|
|
53
|
+
start() {
|
|
54
|
+
if (started) return;
|
|
55
|
+
started = true;
|
|
56
|
+
if (initialProject && initialItems) return;
|
|
57
|
+
(async () => {
|
|
58
|
+
try {
|
|
59
|
+
const proj = initialProject ?? (await fetchProjectBySlug(slug));
|
|
60
|
+
if (!started) return;
|
|
61
|
+
if (!proj) {
|
|
62
|
+
notFound = true;
|
|
63
|
+
items = [];
|
|
64
|
+
emit();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
project = proj;
|
|
68
|
+
emit();
|
|
69
|
+
const gallery = await fetchProjectGallery(proj.id);
|
|
70
|
+
if (started) { items = gallery; emit(); }
|
|
71
|
+
} catch (e) {
|
|
72
|
+
if (!started) return;
|
|
73
|
+
items = [];
|
|
74
|
+
error = e instanceof Error ? e.message : String(e);
|
|
75
|
+
emit();
|
|
76
|
+
}
|
|
77
|
+
})();
|
|
78
|
+
},
|
|
79
|
+
stop() { started = false; },
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Portfolio DTOs — the serializable shapes every hook, component, and page consumes.
|
|
2
|
+
// Plain JSON: safe as Astro island props or across server/client boundaries. Images are
|
|
3
|
+
// resolved https URLs; videos are playable mp4 URLs with a poster frame.
|
|
4
|
+
|
|
5
|
+
/** A collection as the gallery grid needs it. */
|
|
6
|
+
export interface CollectionSummary {
|
|
7
|
+
id: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
/** Resolved https URL ("" when the collection has no cover). */
|
|
12
|
+
imageUrl: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** A project as a grid tile needs it. */
|
|
16
|
+
export interface ProjectSummary {
|
|
17
|
+
id: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
/** Cover image; a video-covered project falls back to its poster frame ("" when neither). */
|
|
22
|
+
imageUrl: string;
|
|
23
|
+
/** The collections this project belongs to (a project can be in several). */
|
|
24
|
+
collectionIds: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** One row of a project's metadata (Role, Year, Client…): plain text or an outbound link. */
|
|
28
|
+
export interface ProjectDetailRow {
|
|
29
|
+
label: string;
|
|
30
|
+
text: string;
|
|
31
|
+
/** Non-null → render the row's text as a link. */
|
|
32
|
+
url: string | null;
|
|
33
|
+
/** Link rows only: "_blank" | "_self". */
|
|
34
|
+
target: string | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** A project as the detail page needs it. */
|
|
38
|
+
export interface ProjectDetail extends ProjectSummary {
|
|
39
|
+
details: ProjectDetailRow[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** One media item of a project's gallery (dashboard order). */
|
|
43
|
+
export interface GalleryItem {
|
|
44
|
+
id: string;
|
|
45
|
+
kind: "image" | "video";
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
/** image: the resolved image. video: the poster frame ("" when the video has none). */
|
|
49
|
+
imageUrl: string;
|
|
50
|
+
/** video only: playable mp4 URL. */
|
|
51
|
+
videoUrl: string | null;
|
|
52
|
+
/** Optional owner-attached outbound link for this item. */
|
|
53
|
+
linkUrl: string | null;
|
|
54
|
+
linkTarget: string | null;
|
|
55
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// The one auth seam for every Wix SDK call in this app. Copy as-is; do not rewrite.
|
|
2
|
+
//
|
|
3
|
+
// Two modes, switched by WIX_CLIENT_ID in ./config:
|
|
4
|
+
// null (ambient) — a Wix-managed Astro project: `@wix/astro` authenticates raw SDK module
|
|
5
|
+
// calls automatically, server-side AND in client islands. `wixModule()`
|
|
6
|
+
// returns the module untouched.
|
|
7
|
+
// string (manual) — any other React setup (Vite SPA, non-Astro): one shared client is built
|
|
8
|
+
// with OAuthStrategy, and `wixModule()` returns the module bound to it.
|
|
9
|
+
// The strategy self-manages visitor tokens on every call (mints on first
|
|
10
|
+
// use, renews on expiry) and persists them through the storage below.
|
|
11
|
+
//
|
|
12
|
+
// The visitor token IS the identity of the current cart / member session, so in manual mode
|
|
13
|
+
// tokens persist to localStorage — never re-minted per load (a fresh anonymous mint is a NEW
|
|
14
|
+
// visitor and silently empties the cart).
|
|
15
|
+
// docs: https://dev.wix.com/docs/sdk/core-modules/sdk/oauth-strategy.md
|
|
16
|
+
// docs: https://dev.wix.com/docs/go-headless/wix-managed-headless/authentication/about-the-astro-integration.md
|
|
17
|
+
import { createClient, OAuthStrategy, EMPTY_TOKENS } from "@wix/sdk";
|
|
18
|
+
import { fetchWithAuth as ambientFetch } from "@wix/sdk/context";
|
|
19
|
+
import type { IOAuthStrategy, TokenStorage, Tokens } from "@wix/sdk";
|
|
20
|
+
import { WIX_CLIENT_ID } from "./config";
|
|
21
|
+
|
|
22
|
+
const STORAGE_KEY = `wix-session-${WIX_CLIENT_ID ?? "ambient"}`;
|
|
23
|
+
|
|
24
|
+
function browserTokenStorage(): TokenStorage {
|
|
25
|
+
return {
|
|
26
|
+
getTokens(): Tokens {
|
|
27
|
+
if (typeof window !== "undefined") {
|
|
28
|
+
try {
|
|
29
|
+
const raw = window.localStorage.getItem(STORAGE_KEY);
|
|
30
|
+
if (raw) return JSON.parse(raw) as Tokens;
|
|
31
|
+
} catch {
|
|
32
|
+
/* disabled/corrupt storage — fall through to empty */
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return EMPTY_TOKENS;
|
|
36
|
+
},
|
|
37
|
+
setTokens(tokens: Tokens): void {
|
|
38
|
+
if (typeof window === "undefined") return;
|
|
39
|
+
try {
|
|
40
|
+
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(tokens));
|
|
41
|
+
} catch {
|
|
42
|
+
/* storage full/disabled — the session just won't survive a reload */
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const client = WIX_CLIENT_ID
|
|
49
|
+
? createClient({
|
|
50
|
+
auth: OAuthStrategy({
|
|
51
|
+
clientId: WIX_CLIENT_ID,
|
|
52
|
+
tokenStorage: browserTokenStorage(),
|
|
53
|
+
}),
|
|
54
|
+
})
|
|
55
|
+
: null;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Bind an SDK module to this app's auth. Usage (identical in both modes):
|
|
59
|
+
* import { productsV3 } from "@wix/stores";
|
|
60
|
+
* const products = wixModule(productsV3);
|
|
61
|
+
* await products.queryProducts(...)
|
|
62
|
+
*/
|
|
63
|
+
export function wixModule<T>(module: T): T {
|
|
64
|
+
// The cast bridges the SDK's internal Descriptors constraint; the in/out type is identical.
|
|
65
|
+
return client
|
|
66
|
+
? (client.use(module as unknown as Record<string, unknown>) as unknown as T)
|
|
67
|
+
: module;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* An authenticated fetch of a Wix REST endpoint under the SAME auth as the SDK modules (ambient
|
|
72
|
+
* on managed Astro, the shared client elsewhere) — for the few APIs whose generated SDK module is
|
|
73
|
+
* too heavy to bundle (the Forms schema module alone is 15 MB: server-side it pushes a Wix
|
|
74
|
+
* deploy past its size limit, client-side every visitor downloads it). Same visitor identity,
|
|
75
|
+
* same token, no second mint. `path` is the wixapis.com path; returns the raw Response.
|
|
76
|
+
*/
|
|
77
|
+
export function wixFetch(path: string, init?: RequestInit): Promise<Response> {
|
|
78
|
+
const url = path.startsWith("http") ? path : `https://www.wixapis.com${path}`;
|
|
79
|
+
return client ? client.fetchWithAuth(url, init) : ambientFetch(url, init);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The shared data client's manual-mode auth strategy, or null under ambient auth. The
|
|
84
|
+
* Members vertical deliberately owns a separate explicit client for its custom in-app login;
|
|
85
|
+
* app code reads that session through the members hooks instead.
|
|
86
|
+
*/
|
|
87
|
+
export function wixAuth(): IOAuthStrategy | null {
|
|
88
|
+
return client ? client.auth : null;
|
|
89
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Portfolio reads over REST — the twin of app/wix/portfolio/portfolio.ts. Same exports, same DTOs;
|
|
2
|
+
// the rules and mappers come from portfolio-core (the SAME file the SDK transport uses, deployed
|
|
3
|
+
// flat next to this one by deploy.mjs --stack static), so this file is only the transport: one
|
|
4
|
+
// fetch with a literal URL and body per function. Every call here is a public read, safe from a
|
|
5
|
+
// browser with a visitor token. Porting: keep the paths, keep the bodies, port the core once.
|
|
6
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/collections/list-collections.md
|
|
7
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/collections/query-collections.md
|
|
8
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/projects/list-projects.md
|
|
9
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/projects/query-projects.md
|
|
10
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/project-items/list-project-items.md
|
|
11
|
+
import { wixRequest } from "./client.js";
|
|
12
|
+
import { imgSrc } from "./media.js";
|
|
13
|
+
import {
|
|
14
|
+
galleryItems,
|
|
15
|
+
visibleCollection,
|
|
16
|
+
visibleCollections,
|
|
17
|
+
visibleProject,
|
|
18
|
+
visibleProjects,
|
|
19
|
+
type Raw,
|
|
20
|
+
type VideoSrc,
|
|
21
|
+
} from "./portfolio-core.js";
|
|
22
|
+
import type { CollectionSummary, GalleryItem, ProjectDetail, ProjectSummary } from "./types.js";
|
|
23
|
+
|
|
24
|
+
// REST never returns the bare wix:video:// string — videoInfo arrives as { resolutions, posters },
|
|
25
|
+
// which the core reads directly. A string here has no resolver on this transport → dropped.
|
|
26
|
+
const videoSrc: VideoSrc = () => null;
|
|
27
|
+
|
|
28
|
+
/** Visible collections in dashboard order. GET /portfolio/v1/collections?paging.limit=N → { collections } */
|
|
29
|
+
export async function fetchCollections({ limit = 100 } = {}): Promise<CollectionSummary[]> {
|
|
30
|
+
const res = await wixRequest<Raw>("/portfolio/v1/collections", { method: "GET", query: { "paging.limit": String(limit) } });
|
|
31
|
+
return visibleCollections((res?.collections ?? []) as Raw[], imgSrc);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* One visible collection by URL slug; null when missing or hidden → a real 404.
|
|
36
|
+
* POST /portfolio/v1/collections/query { query: { filter: { slug }, cursorPaging: { limit: 1 } } } → { collections }
|
|
37
|
+
*/
|
|
38
|
+
export async function fetchCollectionBySlug(slug: string): Promise<CollectionSummary | null> {
|
|
39
|
+
const res = await wixRequest<Raw>("/portfolio/v1/collections/query", {
|
|
40
|
+
body: { query: { filter: { slug }, cursorPaging: { limit: 1 } } },
|
|
41
|
+
});
|
|
42
|
+
return visibleCollection(res?.collections?.[0] as Raw | undefined, imgSrc);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Visible projects in list order, optionally one collection's. GET /portfolio/v1/projects?paging.limit=N → { projects } */
|
|
46
|
+
export async function fetchProjects({
|
|
47
|
+
collectionId,
|
|
48
|
+
limit = 100,
|
|
49
|
+
}: { collectionId?: string; limit?: number } = {}): Promise<ProjectSummary[]> {
|
|
50
|
+
const res = await wixRequest<Raw>("/portfolio/v1/projects", { method: "GET", query: { "paging.limit": String(limit) } });
|
|
51
|
+
return visibleProjects((res?.projects ?? []) as Raw[], collectionId, imgSrc, videoSrc);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* One visible project with its details rows by URL slug; null when missing or hidden.
|
|
56
|
+
* POST /portfolio/v1/projects/query { query: { filter: { slug }, cursorPaging: { limit: 1 } } } → { projects }
|
|
57
|
+
*/
|
|
58
|
+
export async function fetchProjectBySlug(slug: string): Promise<ProjectDetail | null> {
|
|
59
|
+
const res = await wixRequest<Raw>("/portfolio/v1/projects/query", {
|
|
60
|
+
body: { query: { filter: { slug }, cursorPaging: { limit: 1 } } },
|
|
61
|
+
});
|
|
62
|
+
return visibleProject(res?.projects?.[0] as Raw | undefined, imgSrc, videoSrc);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* A project's gallery in dashboard order; IMAGE and VIDEO items only.
|
|
67
|
+
* GET /portfolio/v1/projectItems/{projectId}/items?paging.limit=100 → { items }
|
|
68
|
+
*/
|
|
69
|
+
export async function fetchProjectGallery(projectId: string): Promise<GalleryItem[]> {
|
|
70
|
+
const res = await wixRequest<Raw>(`/portfolio/v1/projectItems/${encodeURIComponent(projectId)}/items`, {
|
|
71
|
+
method: "GET",
|
|
72
|
+
query: { "paging.limit": "100" },
|
|
73
|
+
});
|
|
74
|
+
return galleryItems((res?.items ?? []) as Raw[], imgSrc, videoSrc);
|
|
75
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Portfolio — seeding
|
|
2
|
+
|
|
3
|
+
Seed by **running `seed-portfolio.mjs` with a plan file** — don't hand-write the REST calls.
|
|
4
|
+
The script mints its own site token via the Wix CLI (logged-in session + `wix.config.json`
|
|
5
|
+
required), installs the Portfolio app if needed, and creates everything in the right order:
|
|
6
|
+
collections first (a project's `collectionIds` are NOT validated — a wrong id silently
|
|
7
|
+
orphans the project), then projects, gallery items, and covers.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# from the project root (where wix.config.json lives):
|
|
11
|
+
node <SKILL_ROOT>/templates/portfolio/seed/seed-portfolio.mjs plan.json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`plan.json` is plain data — write it from the brief. **Default to 2 collections × 2 projects
|
|
15
|
+
each** (the seed shows the shape; the owner adds the rest in the dashboard) and make them
|
|
16
|
+
exercise the UI: every collection and project gets a cover, every project gets 2–3 gallery
|
|
17
|
+
`items` (a portfolio without images looks broken), and a couple of projects get `details`
|
|
18
|
+
rows (Role, Year, Client…).
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"collections": [
|
|
23
|
+
{ "title": "Brand Identity", "description": "Logo systems and visual identities.",
|
|
24
|
+
"coverImageUrl": "https://…" },
|
|
25
|
+
{ "title": "Editorial", "description": "Print and digital editorial design.",
|
|
26
|
+
"coverImageUrl": "https://…" }
|
|
27
|
+
],
|
|
28
|
+
"projects": [
|
|
29
|
+
{ "title": "Northwind Rebrand", "description": "Full identity refresh for a logistics firm.",
|
|
30
|
+
"collection": "Brand Identity",
|
|
31
|
+
"details": [ { "label": "Role", "text": "Brand & Art Direction" }, { "label": "Year", "text": "2025" } ],
|
|
32
|
+
"coverImageUrl": "https://…",
|
|
33
|
+
"items": [
|
|
34
|
+
{ "sortOrder": 1, "title": "Logo system", "imageUrl": "https://…" },
|
|
35
|
+
{ "sortOrder": 2, "title": "Stationery", "imageUrl": "https://…" }
|
|
36
|
+
] },
|
|
37
|
+
{ "title": "Harbor Coffee", "description": "Packaging and label suite.",
|
|
38
|
+
"collection": "Brand Identity", "coverImageUrl": "https://…",
|
|
39
|
+
"items": [ { "sortOrder": 1, "title": "Label set", "imageUrl": "https://…" } ] },
|
|
40
|
+
{ "title": "Field Notes Quarterly", "description": "Magazine layout and typography.",
|
|
41
|
+
"collection": "Editorial", "coverImageUrl": "https://…",
|
|
42
|
+
"items": [ { "sortOrder": 1, "title": "Spread", "imageUrl": "https://…" } ] },
|
|
43
|
+
{ "title": "City Guides", "description": "Travel series covers.",
|
|
44
|
+
"collection": "Editorial", "coverImageUrl": "https://…",
|
|
45
|
+
"items": [ { "sortOrder": 1, "title": "Covers", "imageUrl": "https://…" } ] }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- `collection` — a collection **title from this plan**; resolved to its created id. A project
|
|
51
|
+
without one belongs to no collection (reachable only from an all-projects list).
|
|
52
|
+
- `details` — optional `[{ label, text }]` rows; render on the project page. Omit for none.
|
|
53
|
+
- Every image field's default is a prompt (`coverImagePrompt` / `items[].imagePrompt` —
|
|
54
|
+
AI-generated, ~1 Wix AI credit per image, account-billed): brand-contextual — subject,
|
|
55
|
+
aesthetic/mood, palette, lighting — always ending "no text, no watermarks". At least one image in the set shows the real subject of the business — the actual product/space/service, not abstract decoration. For an asset the user actually supplied
|
|
56
|
+
use a path (`coverImagePath` / `items[].imagePath` — a file on this machine, uploaded to
|
|
57
|
+
Wix Media) or a url (`coverImageUrl` / `items[].imageUrl` — their own hosted URL; verify it
|
|
58
|
+
with `curl -sI` → 200) — never a stock-photo or guessed URL. All images —
|
|
59
|
+
covers and gallery items alike — resolve in one parallel wave and never block the seed; a
|
|
60
|
+
failed image skips just that item/cover. The **cover** is the
|
|
61
|
+
listing thumbnail; **items** are the detail-page gallery — separate entities, both wanted.
|
|
62
|
+
If a project has only a cover, reuse its url as item 1 so the gallery isn't empty.
|
|
63
|
+
- `sortOrder` (1, 2, 3…) sets the gallery render order.
|
|
64
|
+
- `hidden` defaults to shown — omit it; send `hidden: true` only to hide an entity.
|
|
65
|
+
- Gallery items seed as images only; the owner adds videos in the dashboard.
|
|
66
|
+
- A fresh Portfolio install ships sample content ("My Portfolio" + sample projects). **Seeding
|
|
67
|
+
is additive — never delete or overwrite existing content**; if removing the samples seems
|
|
68
|
+
wanted, ask the owner first.
|
|
69
|
+
|
|
70
|
+
## Supplied content
|
|
71
|
+
|
|
72
|
+
The general rules are in `templates/shared/SUPPLIED-CONTENT.md`. For a portfolio, each project the
|
|
73
|
+
user lists is one entry. Its title becomes `title`; its category or series becomes `collection`
|
|
74
|
+
(and joins the `collections` list); client, role, year and similar facts become `details`; their
|
|
75
|
+
cover image becomes `coverImageUrl`; their project images become `items` in the order given. A
|
|
76
|
+
photo with no caption gets its file name as `title`.
|
|
77
|
+
|
|
78
|
+
## Escape hatch — individual functions
|
|
79
|
+
`setupPortfolio` composes exported steps — `installPortfolioApp`, `createCollections`,
|
|
80
|
+
`createProjects`, `importImage`, `attachProjectCovers`, `attachCollectionCovers`,
|
|
81
|
+
`createProjectItems`, `listCollections`, `listProjects`, plus `makeCtx()` — import them only
|
|
82
|
+
for a partial re-seed.
|
|
83
|
+
|
|
84
|
+
## Reference
|
|
85
|
+
Unexpected shape or an uncovered operation → read the live Wix API reference; every call the script
|
|
86
|
+
makes carries a `docs:` line with its reference page.
|