@wix/agent-skills 1.20.1 → 1.22.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/package.json +1 -1
- package/skills/wix-app/SKILL.md +71 -113
- package/skills/wix-app/references/APP_TOOLS.md +2 -1
- package/skills/wix-app/references/BACKEND_EVENT.md +3 -3
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +41 -152
- package/skills/wix-app/references/DASHBOARD_MODAL.md +4 -4
- package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
- package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
- package/skills/wix-app/references/SDK_MODULE_MAP.md +44 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +36 -190
- package/skills/wix-app/references/app-tools/TOOLS.md +3 -1
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +21 -0
- package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
- package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +17 -0
- package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
- package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +4 -18
- package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
- package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
- package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
- package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
- package/skills/wix-app/references/site-plugin/EXAMPLES.md +1 -1
- package/skills/wix-headless-fast/SKILL.md +144 -221
- package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
- package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +15 -15
- package/skills/wix-headless-fast/guides/existing-site.md +76 -0
- package/skills/wix-headless-fast/guides/reference-mode.md +97 -0
- package/skills/wix-headless-fast/install/AGENTS.md +35 -0
- package/skills/wix-headless-fast/install/agents-md.mjs +39 -0
- package/skills/wix-headless-fast/install/attach.mjs +161 -86
- package/skills/wix-headless-fast/install/deploy.mjs +21 -60
- package/skills/wix-headless-fast/install/lock.mjs +55 -0
- package/skills/wix-headless-fast/install/setup.mjs +259 -0
- package/skills/wix-headless-fast/install/templates.mjs +168 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md +10 -19
- package/skills/wix-manage/references/events/create-wix-event.md +5 -1
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
- package/skills/wix-headless-fast/install/fast-path.mjs +0 -181
- package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -301
- package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
- package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
- package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
- package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
- package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
- package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
- package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
- package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
- package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
- package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
- package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
- package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -275
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
- package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
- package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
- package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
- package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
- package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
- package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -353
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
- package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
- package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
- package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
- package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
- package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
- package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
- package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
- package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -305
- package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
- package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
- package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
- package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
- package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
- package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
- package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
- package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
- package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
- package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
- package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
- package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
- package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
- package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
- package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
- package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
- package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
- package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -338
- package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
- package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
- package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
- package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
- package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
- package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
- package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
- package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -314
- package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
- package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
- package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
- package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
- package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
- package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
- package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
- package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
- package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
- package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
- package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
- package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
- package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
- package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
- package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
- package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
- package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
- package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
- package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
- package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -313
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
- package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
- package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
- package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
- package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
- package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -258
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -294
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
- package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
- package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
- package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
- package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
- package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
- package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -358
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
- package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
- package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
- package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
- package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
- package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
- package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
- package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -479
- package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
- package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
- package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
- package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
- package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
- package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
- package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
- package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
- package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
- package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
- package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
- package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -608
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -309
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -167
- package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
- package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
- package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
- package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -124
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -525
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// The services listing as a framework-free store — the logic behind useServices, usable from React
|
|
2
|
-
// (useServices wraps it with useSyncExternalStore), from a static page or Vue/Svelte (subscribe and
|
|
3
|
-
// render), or as the specification for a port. State, actions, subscribe/getState, emit after every
|
|
4
|
-
// change. SSR-friendly: seed with `initialServices`/`initialCategories` and nothing is fetched;
|
|
5
|
-
// without them `start()` loads both. Category filtering is client-side — bookings catalogs are
|
|
6
|
-
// small and fully fetched. One store per mounted listing: createServicesStore(), not a singleton.
|
|
7
|
-
import { fetchBookingCategories, fetchServices } from "./services";
|
|
8
|
-
import type { BookingCategory, ServiceSummary } from "./types";
|
|
9
|
-
|
|
10
|
-
export interface ServicesStoreOptions {
|
|
11
|
-
initialServices?: ServiceSummary[];
|
|
12
|
-
initialCategories?: BookingCategory[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** Everything a listing surface renders from. Read it with getState() or through a subscription. */
|
|
16
|
-
export interface ServicesState {
|
|
17
|
-
/** null while the first load is in flight — render skeletons, not an empty state. */
|
|
18
|
-
services: ServiceSummary[] | null;
|
|
19
|
-
categories: BookingCategory[];
|
|
20
|
-
activeCategoryId: string | null;
|
|
21
|
-
error: string | null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ServicesStore {
|
|
25
|
-
getState(): ServicesState;
|
|
26
|
-
subscribe(listener: () => void): () => void;
|
|
27
|
-
/** Fetch whatever wasn't seeded. Call once when mounted (a browser). */
|
|
28
|
-
start(): void;
|
|
29
|
-
/** Stop reacting; drop late responses. */
|
|
30
|
-
stop(): void;
|
|
31
|
-
setActiveCategoryId(id: string | null): void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export function createServicesStore({ initialServices, initialCategories }: ServicesStoreOptions = {}): ServicesStore {
|
|
35
|
-
let all: ServiceSummary[] | null = initialServices ?? null;
|
|
36
|
-
let categories: BookingCategory[] = initialCategories ?? [];
|
|
37
|
-
let activeCategoryId: string | null = null;
|
|
38
|
-
let error: string | null = null;
|
|
39
|
-
let started = false;
|
|
40
|
-
const listeners = new Set<() => void>();
|
|
41
|
-
let snapshot: ServicesState | null = null;
|
|
42
|
-
const emit = () => {
|
|
43
|
-
snapshot = null;
|
|
44
|
-
for (const fn of listeners) fn();
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
function getState(): ServicesState {
|
|
48
|
-
if (snapshot) return snapshot;
|
|
49
|
-
snapshot = {
|
|
50
|
-
services: all === null ? null : activeCategoryId ? all.filter((s) => s.categoryId === activeCategoryId) : all,
|
|
51
|
-
categories,
|
|
52
|
-
activeCategoryId,
|
|
53
|
-
error,
|
|
54
|
-
};
|
|
55
|
-
return snapshot;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
getState,
|
|
60
|
-
subscribe(fn) {
|
|
61
|
-
listeners.add(fn);
|
|
62
|
-
return () => listeners.delete(fn);
|
|
63
|
-
},
|
|
64
|
-
start() {
|
|
65
|
-
if (started) return;
|
|
66
|
-
started = true;
|
|
67
|
-
if (!initialServices) {
|
|
68
|
-
fetchServices()
|
|
69
|
-
.then((s) => { if (started) { all = s; emit(); } })
|
|
70
|
-
.catch((e) => {
|
|
71
|
-
if (!started) return;
|
|
72
|
-
all = [];
|
|
73
|
-
error = e instanceof Error ? e.message : String(e);
|
|
74
|
-
emit();
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (!initialCategories) {
|
|
78
|
-
fetchBookingCategories().then((c) => { if (started) { categories = c; emit(); } });
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
stop() {
|
|
82
|
-
started = false;
|
|
83
|
-
},
|
|
84
|
-
setActiveCategoryId(id) {
|
|
85
|
-
if (id === activeCategoryId) return;
|
|
86
|
-
activeCategoryId = id;
|
|
87
|
-
emit();
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// Service reads (Wix Bookings Services V2) over the SDK — the only file that touches raw service
|
|
2
|
-
// entities on this transport. Everything it returns is a plain DTO from ./types. The rules and
|
|
3
|
-
// mappers live in ./services-core (shared with the REST twin in references/bookings/rest/); this
|
|
4
|
-
// file is the transport only. Copy as-is; extend by adding functions, not by editing these.
|
|
5
|
-
// docs: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/query-services.md
|
|
6
|
-
// docs: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/categories-v2/query-categories.md
|
|
7
|
-
import { services as servicesModule, categoriesV2 } from "@wix/bookings";
|
|
8
|
-
import { wixModule } from "../sdk";
|
|
9
|
-
import { imgSrc } from "../media";
|
|
10
|
-
import {
|
|
11
|
-
BOOKINGS_APP_ID,
|
|
12
|
-
SERVICES_CONDITIONAL_FIELDS,
|
|
13
|
-
STAFF_RESOURCE_TYPE_ID,
|
|
14
|
-
isVisible,
|
|
15
|
-
toCategory,
|
|
16
|
-
toDetail,
|
|
17
|
-
toSummary,
|
|
18
|
-
type Raw,
|
|
19
|
-
} from "./services-core";
|
|
20
|
-
import type { BookingCategory, ServiceDetail, ServiceSummary } from "./types";
|
|
21
|
-
|
|
22
|
-
export { BOOKINGS_APP_ID, STAFF_RESOURCE_TYPE_ID };
|
|
23
|
-
|
|
24
|
-
const services = wixModule(servicesModule);
|
|
25
|
-
const categories = wixModule(categoriesV2);
|
|
26
|
-
|
|
27
|
-
/** List bookable services (hidden ones filtered), mapped to grid-ready DTOs. */
|
|
28
|
-
export async function fetchServices({ limit = 100 } = {}): Promise<ServiceSummary[]> {
|
|
29
|
-
const res = await services
|
|
30
|
-
.queryServices({ conditionalFields: SERVICES_CONDITIONAL_FIELDS as any })
|
|
31
|
-
.eq("appId", BOOKINGS_APP_ID)
|
|
32
|
-
.limit(limit)
|
|
33
|
-
.find();
|
|
34
|
-
return ((res.items ?? []) as Raw[]).filter(isVisible).map((s) => toSummary(s, imgSrc));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** Fetch one service by its URL slug (mainSlug.name). Null when not found. */
|
|
38
|
-
export async function fetchServiceBySlug(slug: string): Promise<ServiceDetail | null> {
|
|
39
|
-
const res = await services
|
|
40
|
-
.queryServices({ conditionalFields: SERVICES_CONDITIONAL_FIELDS as any })
|
|
41
|
-
.eq("mainSlug.name", slug)
|
|
42
|
-
.eq("appId", BOOKINGS_APP_ID)
|
|
43
|
-
.limit(1)
|
|
44
|
-
.find();
|
|
45
|
-
const raw = res.items?.[0];
|
|
46
|
-
return raw ? toDetail(raw as Raw, imgSrc) : null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** Service categories for a filter bar — non-fatal (empty array on failure). */
|
|
50
|
-
export async function fetchBookingCategories(): Promise<BookingCategory[]> {
|
|
51
|
-
try {
|
|
52
|
-
const res = await categories.queryCategories().find();
|
|
53
|
-
return ((res.items ?? []) as Raw[]).map(toCategory).filter((c) => c.id);
|
|
54
|
-
} catch {
|
|
55
|
-
return [];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// Bookings 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; every displayable price is a ready formatted string.
|
|
4
|
-
|
|
5
|
-
export type ServiceType = "APPOINTMENT" | "CLASS";
|
|
6
|
-
|
|
7
|
-
/** A service as a listing/grid tile needs it. */
|
|
8
|
-
export interface ServiceSummary {
|
|
9
|
-
id: string;
|
|
10
|
-
slug: string;
|
|
11
|
-
name: string;
|
|
12
|
-
tagLine: string;
|
|
13
|
-
type: ServiceType;
|
|
14
|
-
/** Formatted price (e.g. "€75.00"); "Free" when the service has no fee. */
|
|
15
|
-
price: string;
|
|
16
|
-
free: boolean;
|
|
17
|
-
/** Session length in minutes (appointments; classes may have none). */
|
|
18
|
-
durationMinutes: number | null;
|
|
19
|
-
/** Resolved https URL ("" when the service has no image). */
|
|
20
|
-
imageUrl: string;
|
|
21
|
-
categoryId: string | null;
|
|
22
|
-
/** Bookable staff: id is the resource GUID used for filtering and booking. */
|
|
23
|
-
staff: { id: string; name: string }[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** A service as the booking page needs it. */
|
|
27
|
-
export interface ServiceDetail extends ServiceSummary {
|
|
28
|
-
/** Description HTML/text as stored. */
|
|
29
|
-
description: string;
|
|
30
|
-
/** The @wix/forms booking-form id (null → the contact-basics fallback form). */
|
|
31
|
-
formId: string | null;
|
|
32
|
-
/** Derived payment option the booking must send ("ONLINE" | "OFFLINE"). */
|
|
33
|
-
paymentOption: "ONLINE" | "OFFLINE";
|
|
34
|
-
/** True → checkout is always required regardless of price (cancellation-fee policy). */
|
|
35
|
-
cancellationFeeEnabled: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface BookingCategory {
|
|
39
|
-
id: string;
|
|
40
|
-
name: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** One bookable time slot, appointment or class. */
|
|
44
|
-
export interface Slot {
|
|
45
|
-
/** Local wall-clock strings "YYYY-MM-DDThh:mm:ss" (no Z). */
|
|
46
|
-
startLocal: string;
|
|
47
|
-
endLocal: string;
|
|
48
|
-
/** "YYYY-MM-DD" — for grouping slots by day. */
|
|
49
|
-
dayKey: string;
|
|
50
|
-
/** Display label, e.g. "9:00 AM". */
|
|
51
|
-
label: string;
|
|
52
|
-
/** APPOINTMENT slots carry their own scheduleId; CLASS slots carry an eventId instead. */
|
|
53
|
-
scheduleId: string | null;
|
|
54
|
-
eventId: string | null;
|
|
55
|
-
/** Staff able to take this slot (may be empty — ANY_RESOURCE still books). */
|
|
56
|
-
staff: { id: string; name: string }[];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** A booking-form field (flat, from the form summary + schema; values are keyed by `target`). */
|
|
60
|
-
export interface BookingFormField {
|
|
61
|
-
target: string;
|
|
62
|
-
label: string;
|
|
63
|
-
type: "STRING" | "EMAIL" | "PHONE" | "NUMBER" | "URL";
|
|
64
|
-
options?: string[];
|
|
65
|
-
/** The form marks it required — the only fields that gate `canBook`; the rest may stay empty. */
|
|
66
|
-
required: boolean;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/** The outcome of book(): either the browser is being redirected, or it's done. */
|
|
70
|
-
export type BookingResult =
|
|
71
|
-
| { kind: "redirect"; url: string }
|
|
72
|
-
| { kind: "confirmed"; bookingId: string; orderId: string | null };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
// The site chrome for every bookings page — THIS file (header/footer/nav) plus the @theme
|
|
3
|
-
// token block in src/styles/global.css are what you brand. Keep the <slot name="seo-tags" />
|
|
4
|
-
// in <head> and the global.css import. (If the storefront vertical is also deployed, its
|
|
5
|
-
// SiteLayout won; merge nav links there instead.)
|
|
6
|
-
import "../styles/global.css";
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
title: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
}
|
|
12
|
-
const { title, description } = Astro.props;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<!doctype html>
|
|
16
|
-
<html lang="en">
|
|
17
|
-
<head>
|
|
18
|
-
<meta charset="UTF-8" />
|
|
19
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
20
|
-
<title>{title}</title>
|
|
21
|
-
{description && <meta name="description" content={description} />}
|
|
22
|
-
<slot name="seo-tags" />
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
<header class="sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur">
|
|
26
|
-
<div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
|
|
27
|
-
<a href="/" class="text-base font-bold tracking-tight text-foreground no-underline">Brand Name</a>
|
|
28
|
-
<nav class="flex items-center gap-6 text-sm">
|
|
29
|
-
<a href="/services" class="text-foreground no-underline transition-colors hover:text-muted-foreground">Services</a>
|
|
30
|
-
</nav>
|
|
31
|
-
</div>
|
|
32
|
-
</header>
|
|
33
|
-
<main class="mx-auto max-w-6xl px-6 pb-24 pt-10">
|
|
34
|
-
<slot />
|
|
35
|
-
</main>
|
|
36
|
-
<footer class="border-t border-border px-6 py-10 text-center text-sm text-muted-foreground">
|
|
37
|
-
© Brand Name
|
|
38
|
-
</footer>
|
|
39
|
-
</body>
|
|
40
|
-
</html>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
// Service detail + booking page.
|
|
3
|
-
//
|
|
4
|
-
// This is a Wix ITEM PAGE: the wixMetadata export + <SEO.Tags> below let the site owner edit
|
|
5
|
-
// this page's title/description/OG in the dashboard and register the route in the sitemap.
|
|
6
|
-
// Keep all three SEO pieces and this frontmatter; swap the island import to YOUR booking
|
|
7
|
-
// component. The booking island is client:only — availability is timezone/session-specific.
|
|
8
|
-
import SiteLayout from "../../layouts/SiteLayout.astro";
|
|
9
|
-
import ServiceBookingView from "../../components/bookings/ServiceBookingView";
|
|
10
|
-
import { fetchServiceBySlug } from "../../wix/bookings/services";
|
|
11
|
-
import { WIX_APPS } from "@wix/essentials";
|
|
12
|
-
import { SEO } from "@wix/seo/components";
|
|
13
|
-
import { loadSEOTagsServiceConfig } from "@wix/seo/services";
|
|
14
|
-
import { seoTags } from "@wix/seo";
|
|
15
|
-
|
|
16
|
-
export const wixMetadata = {
|
|
17
|
-
appDefId: WIX_APPS.bookings.id,
|
|
18
|
-
pageIdentifier: WIX_APPS.bookings.servicePageMetadata.pageIdentifier,
|
|
19
|
-
identifiers: {
|
|
20
|
-
slug: WIX_APPS.bookings.servicePageMetadata.identifiers.slug,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const slug = Astro.params.slug!;
|
|
25
|
-
|
|
26
|
-
// Behind Wix's proxy the request URL is internal — the real public page URL arrives on
|
|
27
|
-
// x-wix-forwarded-url; the SEO service needs the public one.
|
|
28
|
-
const forwardedUrl = Astro.request.headers.get("x-wix-forwarded-url");
|
|
29
|
-
const pageUrl =
|
|
30
|
-
forwardedUrl && URL.canParse(forwardedUrl) && /^https?:$/.test(new URL(forwardedUrl).protocol)
|
|
31
|
-
? forwardedUrl
|
|
32
|
-
: Astro.url.href;
|
|
33
|
-
|
|
34
|
-
let service = null;
|
|
35
|
-
let seoTagsServiceConfig = null;
|
|
36
|
-
try {
|
|
37
|
-
[service, seoTagsServiceConfig] = await Promise.all([
|
|
38
|
-
fetchServiceBySlug(slug),
|
|
39
|
-
loadSEOTagsServiceConfig({
|
|
40
|
-
pageUrl,
|
|
41
|
-
itemType: seoTags.ItemType.BOOKINGS_SERVICE,
|
|
42
|
-
itemData: { slug },
|
|
43
|
-
}).catch(() => null),
|
|
44
|
-
]);
|
|
45
|
-
} catch {
|
|
46
|
-
// Guarded: an unhandled SSR throw truncates the response mid-stream.
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (!service) {
|
|
50
|
-
return new Response(null, { status: 404 });
|
|
51
|
-
}
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
<SiteLayout title={service.name}>
|
|
55
|
-
<SEO.Tags seoTagsServiceConfig={seoTagsServiceConfig} slot="seo-tags" />
|
|
56
|
-
|
|
57
|
-
<div class="grid gap-10 md:grid-cols-2">
|
|
58
|
-
<div>
|
|
59
|
-
{service.imageUrl && (
|
|
60
|
-
<div class="aspect-[4/3] overflow-hidden rounded-xl bg-secondary">
|
|
61
|
-
<img src={service.imageUrl} alt={service.name} class="h-full w-full object-cover" />
|
|
62
|
-
</div>
|
|
63
|
-
)}
|
|
64
|
-
<h1 class="mt-5 text-2xl font-semibold tracking-tight">{service.name}</h1>
|
|
65
|
-
{service.tagLine && <p class="mt-1 text-muted-foreground">{service.tagLine}</p>}
|
|
66
|
-
<p class="mt-2 text-sm text-muted-foreground">
|
|
67
|
-
{service.durationMinutes ? `${service.durationMinutes} min · ` : ""}
|
|
68
|
-
<span class="text-foreground">{service.price}</span>
|
|
69
|
-
</p>
|
|
70
|
-
{service.description && <p class="mt-4 text-sm leading-relaxed text-muted-foreground">{service.description}</p>}
|
|
71
|
-
</div>
|
|
72
|
-
<div>
|
|
73
|
-
<ServiceBookingView client:only="react" service={service} />
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</SiteLayout>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
// Services listing — data fetched SERVER-SIDE (SEO) and handed to the island as DTO props.
|
|
3
|
-
// Keep this frontmatter; swap the island import to YOUR listing component.
|
|
4
|
-
import SiteLayout from "../layouts/SiteLayout.astro";
|
|
5
|
-
import ServicesView from "../components/bookings/ServicesView";
|
|
6
|
-
import { fetchServices, fetchBookingCategories } from "../wix/bookings/services";
|
|
7
|
-
import type { BookingCategory, ServiceSummary } from "../wix/bookings/types";
|
|
8
|
-
|
|
9
|
-
let services: ServiceSummary[] = [];
|
|
10
|
-
let categories: BookingCategory[] = [];
|
|
11
|
-
try {
|
|
12
|
-
[services, categories] = await Promise.all([fetchServices(), fetchBookingCategories()]);
|
|
13
|
-
} catch {
|
|
14
|
-
// An unguarded SSR throw truncates the response mid-stream; the island renders the
|
|
15
|
-
// empty state instead.
|
|
16
|
-
}
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
<SiteLayout title="Services">
|
|
20
|
-
<h1 class="mb-8 text-2xl font-semibold tracking-tight">Services</h1>
|
|
21
|
-
<ServicesView client:load initialServices={services} initialCategories={categories} />
|
|
22
|
-
</SiteLayout>
|