@wix/agent-skills 1.21.0 → 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 +60 -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/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/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/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-headless-fast/SKILL.md +61 -223
- package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
- package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +11 -12
- 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 +6 -3
- package/skills/wix-headless-fast/install/attach.mjs +15 -47
- 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 +32 -12
- package/skills/wix-headless-fast/install/templates.mjs +168 -0
- 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/references/blog/INSTRUCTIONS.md +0 -303
- 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/read-site.mjs +0 -22
- package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -277
- 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/read-site.mjs +0 -28
- package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -355
- 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/read-site.mjs +0 -20
- package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -307
- 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/read-site.mjs +0 -26
- package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -340
- 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/read-site.mjs +0 -20
- package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -316
- 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/read-site.mjs +0 -15
- package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -315
- 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/read-site.mjs +0 -20
- package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -256
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -296
- 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/read-site.mjs +0 -21
- 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 -360
- 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/read-site.mjs +0 -25
- package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -499
- 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/shared/seed/read-site.mjs +0 -99
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -612
- 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 -314
- 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 -169
- 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 -130
- package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +0 -38
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -561
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
# Events — playbook
|
|
2
|
-
|
|
3
|
-
The events machinery ships as files — event reads (list, by slug, by id), the visitor-public
|
|
4
|
-
ticket-tier read, the exact `reserve → hosted-checkout redirect` sequence, RSVP, the registration
|
|
5
|
-
controls, and the SEO plumbing, typed end-to-end. **The presentation doesn't ship — you build it**
|
|
6
|
-
on the shipped hooks/DTOs: the event card and the events index, the event page's layout, the home
|
|
7
|
-
page, and the brand. You never write registration logic; you never skip designing.
|
|
8
|
-
|
|
9
|
-
## The file map (deployed into `src/`)
|
|
10
|
-
|
|
11
|
-
**On Astro and React the shipped files are tested and work as they are** — this table and the
|
|
12
|
-
contracts below are everything you need to use them, so don't spend the run reading their source;
|
|
13
|
-
wire them and build your surfaces. Reading them is the right move when something is off (a runtime
|
|
14
|
-
error, a field this playbook doesn't cover) or when the brief wants a behaviour they don't offer —
|
|
15
|
-
then read the file that owns it and change or extend it. On `lib`, `static`, and a port the
|
|
16
|
-
components don't deploy at all, and each wiring section below opens with the files to read before
|
|
17
|
-
writing their equivalents. Files you edit: `SiteLayout.astro`, `styles/global.css`, and the two
|
|
18
|
-
island imports in the shipped pages. Files you **create**: your listing component (skeleton below)
|
|
19
|
-
and your home page.
|
|
20
|
-
|
|
21
|
-
| file | what it is |
|
|
22
|
-
|---|---|
|
|
23
|
-
| `wix/config.ts` · `wix/sdk.ts` | shared auth seam (deploy configures it — nothing to set by hand) |
|
|
24
|
-
| `wix/media.ts` · `wix/money.ts` | `imgAttrs(url, sizes, ratio)` — every `<img>` attribute for a DTO image (`src`, `srcSet`, `sizes`, lazy): `<img {...imgAttrs(e.imageUrl, "33vw", 2 / 3)} alt={e.title} />`; `imgSrc()` / `imgSrcSet()` / `formatMoney()` underneath |
|
|
25
|
-
| `wix/events/types.ts` | the DTOs (`EventSummary`, `EventDetail`, `TicketTier`, `RegistrationResult`) — contracts inlined below |
|
|
26
|
-
| `wix/events/events.ts` | `fetchEvents` (live events, soonest first), `fetchEventBySlug`, `fetchEventById` (the post-checkout confirmation read) — the transport; the rules and DTO mappers are in `events-core.ts` beside it (shared with the REST layer) |
|
|
27
|
-
| `wix/events/registration.ts` | `fetchTicketTiers`, `startTicketCheckout`, `submitRsvp` — the exact reserve→redirect sequence and the RSVP body; rules in `registration-core.ts` beside it |
|
|
28
|
-
| `wix/events/events-store.ts` · `registration-store.ts` | the listing and registration state machines, framework-free (`createEventsStore()`, `createRegistrationStore(event)` — `getState`/`subscribe` + actions, one instance per surface); the hooks below bind them to React, every other stack uses them directly |
|
|
29
|
-
| `hooks/events/useEvents.ts` | React binding of `events-store.ts`: listing + category filter — contract below |
|
|
30
|
-
| `hooks/events/useEventRegistration.ts` | React binding of `registration-store.ts`: tiers, quantities, checkout, the RSVP form — contract below |
|
|
31
|
-
| `components/events/EventRegistrationView.tsx` | the registration controls for one event — branches on `registrationType` (tier picker with clamped steppers and the gated CTA; the three-field RSVP form with its confirmed / waitlisted / declined states; the external link; the honest closed state) — **wire as-is** in your event page's registration column (`<EventRegistrationView client:only="react" event={event} />`); build your own on `useEventRegistration` only when the brief wants more |
|
|
32
|
-
| `components/events/EventConfirmationView.tsx` | the hosted checkout's thank-you island — reads `?orderNumber=&eventId=`, echoes the order number, fetches the event for context, an honest "no order" state on a direct visit — **wire as-is** |
|
|
33
|
-
| `components/events/EventsView.tsx` (+ `EventCard`) | **reference** listing — correct and plain; the shipped `events.astro` mounts it so the site works before you design; you build your own on `useEvents` and swap the import |
|
|
34
|
-
| `styles/global.css` | **the design system**: Tailwind v4 + the `@theme` token block (colors, radii, fonts — shared across verticals). Everything, shipped and yours, styles from these tokens |
|
|
35
|
-
|
|
36
|
-
Astro stack additionally gets:
|
|
37
|
-
|
|
38
|
-
| file | what it is |
|
|
39
|
-
|---|---|
|
|
40
|
-
| `layouts/SiteLayout.astro` | the site chrome — **yours to brand** (keep the `seo-tags` slot + the global.css import). If another vertical is also deployed, its layout won — add an Events nav link there |
|
|
41
|
-
| `pages/events.astro` | SSR listing — **keep the frontmatter**, swap the island import to YOUR listing component |
|
|
42
|
-
| `pages/events/[slug].astro` | SSR event page with owner-editable SEO — **keep the frontmatter and the SEO pieces** (`wixMetadata`, `loadSEOTagsServiceConfig`, `<SEO.Tags>`) exactly; the markup between them is yours to redesign around the shipped registration island (`client:only="react"`) |
|
|
43
|
-
| `pages/event-confirmation.astro` | the hosted checkout's thank-you landing (`?orderNumber=&eventId=`) — **keep the route**; the shipped checkout callbacks point at it |
|
|
44
|
-
|
|
45
|
-
## What you build — the design job
|
|
46
|
-
|
|
47
|
-
1. **The event card + events index** — your tile (image, date eyebrow, title, venue/online,
|
|
48
|
-
price-from, sold-out badge) and rhythm, the category filter (only when >1 category),
|
|
49
|
-
skeletons while loading, an honest empty state — on `useEvents`.
|
|
50
|
-
2. **The event page's layout** — hero image, date, venue, about, with the shipped
|
|
51
|
-
`EventRegistrationView` as the registration column; design the page for the brand (an
|
|
52
|
-
editorial split, a sticky registration column, a full-bleed hero). Registration logic never
|
|
53
|
-
leaves the shipped component and hook.
|
|
54
|
-
3. **The home page** — hero, next/featured events (fetch in frontmatter → your components),
|
|
55
|
-
brand story.
|
|
56
|
-
|
|
57
|
-
Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass). Style
|
|
58
|
-
everything with Tailwind utilities on the tokens.
|
|
59
|
-
|
|
60
|
-
### What a complete events site shows (recommended defaults)
|
|
61
|
-
|
|
62
|
-
Defaults for a brief that says nothing about them; the prompt wins when it asks for something
|
|
63
|
-
else. Look at the seeded events before designing (how many, ticketed or RSVP, images, categories).
|
|
64
|
-
|
|
65
|
-
- **Home:** what the events are and the next one in the first screen; real events under truthful
|
|
66
|
-
headings; a link to the index.
|
|
67
|
-
- **Index:** a real card — image, date, title, venue, price-from, link — in the first screen; the
|
|
68
|
-
category filter only when the events carry more than one category; `events === null` →
|
|
69
|
-
skeletons, `[]` → an honest empty state; `error` → a short inline message.
|
|
70
|
-
- **Event page:** image, date, title, venue and the registration control in the first screen at
|
|
71
|
-
390px wide too — a bounded image band on a phone (`max-h-[45vh]`), the registration column
|
|
72
|
-
under it, the two-column split from `md`; `aboutParagraphs` after the registration control,
|
|
73
|
-
never between the date and the action; `addToCalendar.google` as a link when present.
|
|
74
|
-
- **Registration:** the shipped `EventRegistrationView` — `TICKETING` shows the tier picker,
|
|
75
|
-
`RSVP` the three-field form, `EXTERNAL` the link out, closed or `NONE` the closed state;
|
|
76
|
-
confirmed and waitlisted read differently.
|
|
77
|
-
- **Confirmation:** `/event-confirmation` — the shipped island; the only success surface for a
|
|
78
|
-
ticket order.
|
|
79
|
-
- **Copy:** nothing the organizer didn't supply — no invented "X spots left", no fake urgency, no
|
|
80
|
-
Wix IDs in visible text.
|
|
81
|
-
|
|
82
|
-
### The contracts your components consume (everything you need — read the source when something is off)
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
// EventSummary (tiles) — display-ready:
|
|
86
|
-
// { id, slug, title, shortDescription /* plain text */, dateLabel /* "6 November 2026, 19:30–23:00 GMT-8" */,
|
|
87
|
-
// startDateIso, locationName, locationType: "VENUE"|"ONLINE"|"TBD", imageUrl,
|
|
88
|
-
// registrationType: "RSVP"|"TICKETING"|"EXTERNAL"|"NONE",
|
|
89
|
-
// priceLabel /* "From €45" | "Free" | "" */, soldOut, categories: [{ id, name }] }
|
|
90
|
-
// EventDetail adds: aboutParagraphs: string[], registrationOpen, rsvpResponseType: "YES_ONLY"|"YES_AND_NO",
|
|
91
|
-
// externalUrl, addToCalendar: { google, ics }.
|
|
92
|
-
// TicketTier: { id, name, description, price /* "€45.00" | "Free" */, free,
|
|
93
|
-
// limitPerCheckout, saleStatus /* only "SALE_STARTED" is buyable */ }
|
|
94
|
-
|
|
95
|
-
// useEvents({ initialEvents? }) →
|
|
96
|
-
// { events: EventSummary[]|null /* null = loading → skeletons */,
|
|
97
|
-
// categories: [{ id, name }] /* derived from the loaded events */,
|
|
98
|
-
// activeCategoryId, setActiveCategoryId(id|null), error }
|
|
99
|
-
// Only UPCOMING/STARTED events arrive, soonest first — a past event is never listed or linked.
|
|
100
|
-
|
|
101
|
-
// useEventRegistration(event: EventDetail) →
|
|
102
|
-
// { tiers: TicketTier[]|null, // TICKETING only; null = loading
|
|
103
|
-
// quantities, setQuantity(tierId, qty), // clamped 0..limitPerCheckout; ignored for tiers not on sale
|
|
104
|
-
// ticketCount, canCheckout, // gate the tickets CTA on canCheckout
|
|
105
|
-
// checkout(): Promise<RegistrationResult>, // reserve → the browser redirects to Wix checkout
|
|
106
|
-
// rsvpValues, setRsvpValue(field, value), // built-in fields: firstName/lastName/email
|
|
107
|
-
// canRsvp, // gate the RSVP CTA on this
|
|
108
|
-
// rsvp(attending?): Promise<RegistrationResult>, // attending=false only for YES_AND_NO
|
|
109
|
-
// submitting, confirmed, error } // confirmed: { kind: "rsvpConfirmed", status: "YES"|"NO"|"WAITLIST" }
|
|
110
|
-
// checkout() and rsvp() reject on refusal (sold out, sale ended, closed registration, payment
|
|
111
|
-
// method not configured) AND record .error — render it where the control is.
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### The listing component you create — skeleton
|
|
115
|
-
|
|
116
|
-
Hooks first, branches after (an early return above a hook changes hook order between renders and
|
|
117
|
-
React throws). The island renders on the server too (`client:load` SSRs), so nothing in a render
|
|
118
|
-
path may throw — render every state totally.
|
|
119
|
-
|
|
120
|
-
```tsx
|
|
121
|
-
// src/components/events/<YourListing>.tsx — YOU build it; events.astro mounts it (swap the import).
|
|
122
|
-
import { useEvents } from "../../hooks/events/useEvents";
|
|
123
|
-
import { imgAttrs } from "../../wix/media";
|
|
124
|
-
import type { EventSummary } from "../../wix/events/types";
|
|
125
|
-
|
|
126
|
-
export default function EventsIndex(props: { initialEvents?: EventSummary[] }) {
|
|
127
|
-
const { events, categories, activeCategoryId, setActiveCategoryId, error } = useEvents(props);
|
|
128
|
-
// …you implement the render:
|
|
129
|
-
// • a filter row only when categories.length > 1 ("All" + one pill per category, the active
|
|
130
|
-
// one marked by activeCategoryId; setActiveCategoryId(null) clears)
|
|
131
|
-
// • error → a short inline message
|
|
132
|
-
// • events === null → skeleton tiles; [] → your honest empty state
|
|
133
|
-
// • else YOUR grid of YOUR tiles: image via <img {...imgAttrs(e.imageUrl, "(min-width: 1024px) 33vw, 50vw", 2 / 3)} alt={e.title} />
|
|
134
|
-
// (an empty imageUrl gives {} — render your placeholder then), dateLabel as the eyebrow,
|
|
135
|
-
// title WRAPPING (no truncate), locationType === "ONLINE" ? "Online" : locationName,
|
|
136
|
-
// priceLabel when non-empty, a sold-out badge from e.soldOut; the tile links to `/events/${e.slug}`
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
The event page is the shipped `pages/events/[slug].astro`: keep its frontmatter and SEO pieces
|
|
141
|
-
and redesign the markup between them; the registration column stays
|
|
142
|
-
`<EventRegistrationView client:only="react" event={event} />`. Home: `fetchEvents({ limit: 3 })`
|
|
143
|
-
in frontmatter → your cards.
|
|
144
|
-
|
|
145
|
-
### The reference files for stacks where the components don't deploy
|
|
146
|
-
|
|
147
|
-
On `lib`, `static`, and a port, nothing under `components/` or `hooks/` arrives. The state
|
|
148
|
-
machines behind the hooks do arrive — `wix/events/events-store.ts`, `registration-store.ts` — so
|
|
149
|
-
you never rewrite them: create a store per surface, `subscribe`, render from `getState()`, call
|
|
150
|
-
its actions. Their `*State` interfaces are the render contract; read those. What you write is the
|
|
151
|
-
rendering — index, event page, tier picker, RSVP form, confirmation — and for that read these
|
|
152
|
-
first; they are tested code for exactly that behaviour:
|
|
153
|
-
|
|
154
|
-
1. `components/events/EventRegistrationView.tsx` — the branch on `registrationType`; the stepper
|
|
155
|
-
pair per tier (disabled at 0 and at `limitPerCheckout`, both disabled when the tier isn't on
|
|
156
|
-
sale, with the "Sale hasn't started" / "Sale ended" line); the CTA gated by `canCheckout` /
|
|
157
|
-
`canRsvp` and `submitting`; `error` rendered beside the control; the confirmed vs waitlisted vs
|
|
158
|
-
declined copy; the closed state distinguishing sold out from closed.
|
|
159
|
-
2. `components/events/EventConfirmationView.tsx` — the honest "no order" state on a direct visit;
|
|
160
|
-
the order number echoed, never invented order details; the event fetched by `eventId` for
|
|
161
|
-
context; the calendar link.
|
|
162
|
-
3. `components/events/EventsView.tsx` — the filter pills, the skeleton grid, the empty state, the
|
|
163
|
-
card's fields in order.
|
|
164
|
-
|
|
165
|
-
All under `references/events/app/`.
|
|
166
|
-
|
|
167
|
-
### Wiring — Astro (default)
|
|
168
|
-
|
|
169
|
-
1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass — merge into the
|
|
170
|
-
existing layout instead if another vertical is deployed).
|
|
171
|
-
2. Write your listing component under `src/components/events/` (a new name — don't overwrite the
|
|
172
|
-
references) and swap the import in `pages/events.astro` (`client:load` with the SSR props).
|
|
173
|
-
Redesign the markup of `pages/events/[slug].astro` around the shipped registration island
|
|
174
|
-
(`client:only="react"`). Keep `pages/event-confirmation.astro`'s route.
|
|
175
|
-
3. Write `pages/index.astro` (home) — it exists from the scaffold; Read it before overwriting.
|
|
176
|
-
|
|
177
|
-
### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
|
|
178
|
-
|
|
179
|
-
Read the reference files listed above before writing any surface.
|
|
180
|
-
|
|
181
|
-
`deploy.mjs events --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts` (the
|
|
182
|
-
visitor client, configured with the public client id), `media.ts`, `money.ts`, and `wix/events/`
|
|
183
|
-
— `events.ts`, `registration.ts`, `types.ts`, the `*-core.ts` rules, and the two stores
|
|
184
|
-
`events-store.ts`, `registration-store.ts`. None of it is React. The hooks and components don't
|
|
185
|
-
ship on this stack; the stores replace the hooks, and you write the components in your framework
|
|
186
|
-
to the contracts on this page:
|
|
187
|
-
|
|
188
|
-
- bind the stores with your framework's external-store primitive (Vue: `shallowRef` updated in
|
|
189
|
-
`subscribe`; Svelte: `readable(store.getState(), (set) => store.subscribe(() => set(store.getState())))`;
|
|
190
|
-
Solid: a signal set in `subscribe`). `createEventsStore({ initialEvents? })` per listing
|
|
191
|
-
(`start()` when mounted, `stop()` when unmounted), `createRegistrationStore(event)` per event
|
|
192
|
-
page. State in, actions out — exactly the hooks' contracts above;
|
|
193
|
-
- your tier picker, RSVP form, and confirmation to the reference files above.
|
|
194
|
-
|
|
195
|
-
Routes `/events`, `/events/:slug` (via `fetchEventBySlug`, null → your 404), `/event-confirmation`
|
|
196
|
-
(the checkout callbacks point at it); dev server on 4321; a static build goes through
|
|
197
|
-
`npx @wix/cli@latest release` with `site.outputDirectory` pointing at the build folder, an SSR
|
|
198
|
-
build is hosted by you. Page title and description from the event's `title` / `shortDescription`.
|
|
199
|
-
|
|
200
|
-
### Wiring — static site (`--stack static`, no bundler)
|
|
201
|
-
|
|
202
|
-
Read the reference files listed above before writing any surface.
|
|
203
|
-
|
|
204
|
-
`deploy.mjs events --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM,
|
|
205
|
-
the `.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` —
|
|
206
|
-
pages, styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project
|
|
207
|
-
root (config, plan, seed output) is never the upload. Same function names and DTOs as the table
|
|
208
|
-
above, so the contracts on this page hold unchanged: `fetchEvents`, `fetchEventBySlug`,
|
|
209
|
-
`fetchEventById` from `./js/wix/events.js`; `fetchTicketTiers`, `startTicketCheckout`, `submitRsvp`
|
|
210
|
-
from `./js/wix/registration.js`. The state machines ship too: `createEventsStore` from
|
|
211
|
-
`./js/wix/events-store.js` (`start()` once the page is up; `setActiveCategoryId`) and
|
|
212
|
-
`createRegistrationStore` from `./js/wix/registration-store.js`. No components ship — you write the
|
|
213
|
-
rendering in plain JS: one render function per surface that reads `getState()`, called from
|
|
214
|
-
`subscribe`, with the surface's controls calling the store's actions. Pages are `events.html`,
|
|
215
|
-
`event.html?slug=…`, `event-confirmation.html` — Wix static hosting serves files, not
|
|
216
|
-
directories, so the hosted checkout must return to those files: create the registration store
|
|
217
|
-
with its paths, `createRegistrationStore(event, { paths: { confirmation: "/event-confirmation.html",
|
|
218
|
-
event: "/event.html?slug=" + event.slug } })` (Wix appends `?orderNumber=&eventId=` to the
|
|
219
|
-
confirmation URL; read them there and `fetchEventById`). Set `document.title` and the meta
|
|
220
|
-
description from `title` / `shortDescription` once the event loads. The visitor token persists in
|
|
221
|
-
`localStorage` on its own; never mint per page. `npx @wix/cli@latest release` uploads `site/`.
|
|
222
|
-
|
|
223
|
-
### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
|
|
224
|
-
|
|
225
|
-
Read the reference files listed above before writing any surface.
|
|
226
|
-
|
|
227
|
-
Run `deploy.mjs events --stack static` in the project folder anyway: `js/wix/` is both the
|
|
228
|
-
browser-side code and the readable spec. Then split by where the call runs. **Reads on the
|
|
229
|
-
server:** port `js/wix/events.ts` and `events-core.ts` to your language — the same three functions
|
|
230
|
-
returning the same DTO shapes as dicts, one anonymous visitor token per process for these public
|
|
231
|
-
reads (mint and refresh per `client.ts`); the query body is literal (`filter.status $in
|
|
232
|
-
UPCOMING/STARTED`, `sort dateAndTimeSettings.startDate ASC`, a positive `paging.limit`, the
|
|
233
|
-
`fields` array — a body without the limit answers `total: N, events: []` with no error) — and
|
|
234
|
-
render the index and the event page in your templates to the contracts above, so titles and
|
|
235
|
-
dates are in the HTML. **Registering in the browser:** the tier picker and the RSVP form on
|
|
236
|
-
`./js/wix/registration-store.js` (pass the rendered `EventDetail` as JSON in a script tag, plus
|
|
237
|
-
the `paths` your routes use), the confirmation page on `./js/wix/events.js`'s `fetchEventById` —
|
|
238
|
-
exactly as the static wiring above; the browser owns the visitor's token, so the server never
|
|
239
|
-
handles per-visitor tokens. Routes stay `/events`, `/events/<slug>`, `/event-confirmation`. Add
|
|
240
|
-
your public https origin to the OAuth app's allowed domains before checkout can return.
|
|
241
|
-
|
|
242
|
-
**Pre-rendered (Frozen-Flask, Pelican, any static-site generator) → Wix-hosted.** Same port for
|
|
243
|
-
the reads, run at build time with one anonymous token; the generator emits every event page
|
|
244
|
-
(a URL generator over `fetchEvents()` — the live list is small, but raise `limit` if it isn't).
|
|
245
|
-
Run `deploy.mjs events --stack static --out <build dir>` so `js/wix/` is inside the output the
|
|
246
|
-
pages import from, point `site.outputDirectory` at that folder, `wix release`. Pages sit at
|
|
247
|
-
different depths (`/`, `/events/…`): give the templates one base path to `js/wix/` (a template
|
|
248
|
-
variable, or root-relative `/js/wix/…`), never a relative `./js/wix/` — it breaks one level down.
|
|
249
|
-
The frozen index is the first paint; the category filter still runs client-side on it through
|
|
250
|
-
`createEventsStore({ initialEvents })`. Registration runs in the browser as above. Close with the
|
|
251
|
-
live URL, the rebuild + release command, and one line for the owner: dashboard edits to events
|
|
252
|
-
reach the site when that command runs; registration is live regardless.
|
|
253
|
-
|
|
254
|
-
### Wiring — React SPA (Vite etc.)
|
|
255
|
-
|
|
256
|
-
Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite config
|
|
257
|
-
plugins — deploy already added the dep). Routes: `/events` → your listing; `/events/:slug` →
|
|
258
|
-
`fetchEventBySlug(slug)` client-side (null → your 404 view), then your event page with the shipped
|
|
259
|
-
`EventRegistrationView`; `/event-confirmation` → the shipped `EventConfirmationView` (the checkout
|
|
260
|
-
callbacks point at that path). Deploy wrote the public client id into `wix/config.ts`; nothing
|
|
261
|
-
else to configure.
|
|
262
|
-
|
|
263
|
-
Routes on Wix hosting: the host serves files only, so a clean route answers 404 when loaded directly — hash routes, or one HTML file per route, decided before the first route is written; any URL handed to Wix as a return target must be one the host serves (SKILL.md step 1).
|
|
264
|
-
|
|
265
|
-
## Hard rules
|
|
266
|
-
|
|
267
|
-
- **Registration logic only through the shipped exports** — `useEventRegistration` /
|
|
268
|
-
`createRegistrationStore` / `startTicketCheckout` / `submitRsvp` own the sequence
|
|
269
|
-
(visitor-public tier read, reserve, `createRedirectSession({ eventsCheckout })`, rsvpV2). Never
|
|
270
|
-
re-derive any of it, never hand-build a checkout/ticket-form URL, never route it through an API
|
|
271
|
-
route or elevate — the whole flow runs client-side as the visitor.
|
|
272
|
-
- **Branch on `registrationType`** — never render an RSVP event with a ticket picker or a
|
|
273
|
-
ticketed event with an RSVP form; respect `registrationOpen`. Where the shipped components
|
|
274
|
-
deploy that is `EventRegistrationView`.
|
|
275
|
-
- **The RSVP form is built-in** — exactly first name, last name, email; never fetch a form schema
|
|
276
|
-
or add fields.
|
|
277
|
-
- **Gate CTAs on `canCheckout` / `canRsvp`** and surface `error` — `checkout()`/`rsvp()` can
|
|
278
|
-
reject (sold out, sale ended, closed, payment method not configured); the message is for the
|
|
279
|
-
visitor.
|
|
280
|
-
- **Confirmed states reflect REAL success**: RSVP → render only from `confirmed` (and say
|
|
281
|
-
"waitlisted", not "confirmed", for status `WAITLIST`). Tickets → the only success surface is
|
|
282
|
-
`/event-confirmation` with Wix's `?orderNumber=` params; a visitor merely returning to the event
|
|
283
|
-
page is NOT a success signal.
|
|
284
|
-
- **Prices and labels come from the DTOs as-is** — `priceLabel`, `TicketTier.price`; no computed
|
|
285
|
-
totals, no currency symbols of your own.
|
|
286
|
-
- Where the shipped components deploy (Astro, React): theme via the `@theme` tokens, and your
|
|
287
|
-
markup uses Tailwind utilities on the same tokens — one design system across shipped and written
|
|
288
|
-
code. Where they don't (`lib`, `static`, a port): style with whatever your stack does well, on
|
|
289
|
-
one token set of your own.
|
|
290
|
-
- Live data or an honest empty state — never mock events, tiers, or "X spots left".
|
|
291
|
-
- Keep the event page's SEO pieces exactly as shipped (Astro).
|
|
292
|
-
- **Call every hook before any conditional return.** Hooks first, branches after.
|
|
293
|
-
- **Browsing and registering need no login.** They run on the visitor session the shipped client
|
|
294
|
-
already holds; don't gate events behind sign-in unless the brief asks for accounts.
|
|
295
|
-
|
|
296
|
-
## Point the user to their dashboard
|
|
297
|
-
|
|
298
|
-
Give the owner the dashboard link plus the Events page — the deploy step's JSON printed
|
|
299
|
-
`dashboardUrl`; append `/events` for event management. **Selling paid tickets needs a premium plan
|
|
300
|
-
+ a connected payment method** (free/RSVP events work without) — until then `checkout()` surfaces
|
|
301
|
-
"Ticket sales aren't switched on yet"; mention it, don't treat it as a code failure.
|
|
302
|
-
|
|
303
|
-
## Seeding
|
|
304
|
-
|
|
305
|
-
Per `seed/SEED.md` — plain-data `plan.json` into `seed-events.mjs` from the project root. Seed
|
|
306
|
-
events that exercise the UI (a ticketed event with 2 tiers, another ticketed one, a free RSVP
|
|
307
|
-
event; future dates; an image per event) unless the brief says otherwise.
|
package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// REFERENCE post-checkout confirmation: the Wix-hosted checkout redirects to
|
|
2
|
-
// /event-confirmation?orderNumber=&eventId= on success — this island reads those params and
|
|
3
|
-
// fetches the event for context. Mount client:only (it reads the browser URL). Landing here
|
|
4
|
-
// IS the success signal for a ticket order (Wix redirects only after checkout completes);
|
|
5
|
-
// the ticket PDF/QR arrives by email — echo the order number, don't invent order details.
|
|
6
|
-
import { useEffect, useState } from "react";
|
|
7
|
-
import { fetchEventById } from "../../wix/events/events";
|
|
8
|
-
import type { EventDetail } from "../../wix/events/types";
|
|
9
|
-
|
|
10
|
-
export default function EventConfirmationView({ eventsHref = "/events" }: { eventsHref?: string }) {
|
|
11
|
-
const [params] = useState(() => {
|
|
12
|
-
if (typeof window === "undefined") return { orderNumber: "", eventId: "" };
|
|
13
|
-
const q = new URLSearchParams(window.location.search);
|
|
14
|
-
return { orderNumber: q.get("orderNumber") ?? "", eventId: q.get("eventId") ?? "" };
|
|
15
|
-
});
|
|
16
|
-
const [event, setEvent] = useState<EventDetail | null>(null);
|
|
17
|
-
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
let alive = true;
|
|
20
|
-
if (params.eventId) {
|
|
21
|
-
fetchEventById(params.eventId).then((e) => alive && setEvent(e));
|
|
22
|
-
}
|
|
23
|
-
return () => {
|
|
24
|
-
alive = false;
|
|
25
|
-
};
|
|
26
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
|
-
}, [params.eventId]);
|
|
28
|
-
|
|
29
|
-
if (!params.orderNumber) {
|
|
30
|
-
// Direct visit with no order in the URL — an honest state, not a fake confirmation.
|
|
31
|
-
return (
|
|
32
|
-
<div className="mx-auto max-w-lg py-16 text-center">
|
|
33
|
-
<p className="text-lg font-semibold">No order to show</p>
|
|
34
|
-
<a href={eventsHref} className="mt-4 inline-block text-sm text-foreground underline">
|
|
35
|
-
Browse events
|
|
36
|
-
</a>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div className="mx-auto max-w-lg py-16 text-center">
|
|
43
|
-
<p className="eyebrow">Order {params.orderNumber}</p>
|
|
44
|
-
<h1 className="mt-2 text-2xl font-semibold tracking-tight">You're going!</h1>
|
|
45
|
-
<p className="mt-3 text-sm text-muted-foreground">
|
|
46
|
-
{event ? `${event.title}${event.dateLabel ? ` — ${event.dateLabel}` : ""}. ` : ""}
|
|
47
|
-
Your tickets are on their way to your email.
|
|
48
|
-
</p>
|
|
49
|
-
{event?.addToCalendar.google && (
|
|
50
|
-
<a
|
|
51
|
-
href={event.addToCalendar.google}
|
|
52
|
-
target="_blank"
|
|
53
|
-
rel="noreferrer"
|
|
54
|
-
className="mt-6 inline-block rounded-full border border-border px-6 py-2.5 text-sm font-medium text-foreground no-underline transition-colors hover:bg-secondary"
|
|
55
|
-
>
|
|
56
|
-
Add to Google Calendar
|
|
57
|
-
</a>
|
|
58
|
-
)}
|
|
59
|
-
<div className="mt-4">
|
|
60
|
-
<a href={eventsHref} className="text-sm text-muted-foreground underline">
|
|
61
|
-
Back to events
|
|
62
|
-
</a>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// The registration controls for one event — wire as-is (the events counterpart of storefront's
|
|
2
|
-
// OptionPicker): branches on event.registrationType — TICKETING renders the tier picker (quantity
|
|
3
|
-
// steppers clamped by limitPerCheckout, tiers not on sale unbuyable, the CTA gated by canCheckout),
|
|
4
|
-
// RSVP the built-in name+email form with its confirmed / waitlisted / declined states, EXTERNAL a
|
|
5
|
-
// link out, NONE/closed an honest closed state — on the @theme tokens. The event page's layout
|
|
6
|
-
// around it is yours; build your own on useEventRegistration only when the brief wants more.
|
|
7
|
-
// Mount client:only — it runs visitor-session SDK calls and redirects.
|
|
8
|
-
import { useEventRegistration } from "../../hooks/events/useEventRegistration";
|
|
9
|
-
import type { EventDetail } from "../../wix/events/types";
|
|
10
|
-
|
|
11
|
-
const input =
|
|
12
|
-
"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none transition-shadow focus:ring-2 focus:ring-primary";
|
|
13
|
-
const cta =
|
|
14
|
-
"mt-5 rounded-full bg-primary px-8 py-3 text-sm font-semibold text-primary-foreground transition-opacity hover:opacity-90 disabled:opacity-50";
|
|
15
|
-
|
|
16
|
-
export default function EventRegistrationView({ event }: { event: EventDetail }) {
|
|
17
|
-
const {
|
|
18
|
-
tiers,
|
|
19
|
-
quantities,
|
|
20
|
-
setQuantity,
|
|
21
|
-
ticketCount,
|
|
22
|
-
canCheckout,
|
|
23
|
-
checkout,
|
|
24
|
-
rsvpValues,
|
|
25
|
-
setRsvpValue,
|
|
26
|
-
canRsvp,
|
|
27
|
-
rsvp,
|
|
28
|
-
submitting,
|
|
29
|
-
confirmed,
|
|
30
|
-
error,
|
|
31
|
-
} = useEventRegistration(event);
|
|
32
|
-
|
|
33
|
-
if (confirmed && confirmed.kind === "rsvpConfirmed") {
|
|
34
|
-
return (
|
|
35
|
-
<div className="rounded-lg border border-border bg-secondary p-8 text-center">
|
|
36
|
-
<p className="text-lg font-semibold">
|
|
37
|
-
{confirmed.status === "WAITLIST"
|
|
38
|
-
? "You're on the waitlist"
|
|
39
|
-
: confirmed.status === "NO"
|
|
40
|
-
? "Thanks for letting us know"
|
|
41
|
-
: "You're in!"}
|
|
42
|
-
</p>
|
|
43
|
-
<p className="mt-2 text-sm text-muted-foreground">
|
|
44
|
-
{confirmed.status === "WAITLIST"
|
|
45
|
-
? `${event.title} is full — we'll email you if a spot opens up.`
|
|
46
|
-
: confirmed.status === "NO"
|
|
47
|
-
? "We've recorded that you can't make it."
|
|
48
|
-
: `See you at ${event.title}${event.dateLabel ? ` — ${event.dateLabel}` : ""}. A confirmation email is on its way.`}
|
|
49
|
-
</p>
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (!event.registrationOpen) {
|
|
55
|
-
return (
|
|
56
|
-
<div className="rounded-lg border border-border p-6 text-sm text-muted-foreground">
|
|
57
|
-
{event.soldOut ? "This event is sold out." : "Registration for this event is closed."}
|
|
58
|
-
</div>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (event.registrationType === "EXTERNAL") {
|
|
63
|
-
return (
|
|
64
|
-
<a href={event.externalUrl} className={`${cta} inline-block no-underline`} target="_blank" rel="noreferrer">
|
|
65
|
-
Register ↗
|
|
66
|
-
</a>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (event.registrationType === "TICKETING") {
|
|
71
|
-
return (
|
|
72
|
-
<div>
|
|
73
|
-
<p className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Tickets</p>
|
|
74
|
-
{tiers === null ? (
|
|
75
|
-
<div className="space-y-3" aria-busy="true">
|
|
76
|
-
{Array.from({ length: 2 }, (_, i) => (
|
|
77
|
-
<div key={i} className="h-16 animate-pulse rounded-lg bg-secondary" />
|
|
78
|
-
))}
|
|
79
|
-
</div>
|
|
80
|
-
) : tiers.length === 0 ? (
|
|
81
|
-
<p className="rounded-md border border-border p-4 text-sm text-muted-foreground">
|
|
82
|
-
Tickets aren't available right now.
|
|
83
|
-
</p>
|
|
84
|
-
) : (
|
|
85
|
-
<div className="space-y-3">
|
|
86
|
-
{tiers.map((t) => {
|
|
87
|
-
const onSale = t.saleStatus === "SALE_STARTED";
|
|
88
|
-
const qty = quantities[t.id] ?? 0;
|
|
89
|
-
return (
|
|
90
|
-
<div key={t.id} className="flex items-center justify-between gap-4 rounded-lg border border-border p-4">
|
|
91
|
-
<div>
|
|
92
|
-
<p className="text-sm font-medium text-foreground">{t.name}</p>
|
|
93
|
-
{t.description && <p className="mt-0.5 text-xs text-muted-foreground">{t.description}</p>}
|
|
94
|
-
<p className="mt-1 text-sm text-foreground">{t.price}</p>
|
|
95
|
-
{!onSale && (
|
|
96
|
-
<p className="mt-1 text-xs text-muted-foreground">
|
|
97
|
-
{t.saleStatus === "SALE_SCHEDULED" ? "Sale hasn't started yet" : "Sale ended"}
|
|
98
|
-
</p>
|
|
99
|
-
)}
|
|
100
|
-
</div>
|
|
101
|
-
<div className="flex items-center gap-2">
|
|
102
|
-
<button
|
|
103
|
-
type="button"
|
|
104
|
-
aria-label={`Fewer ${t.name}`}
|
|
105
|
-
disabled={!onSale || qty === 0}
|
|
106
|
-
onClick={() => setQuantity(t.id, qty - 1)}
|
|
107
|
-
className="h-8 w-8 rounded-full border border-border text-foreground transition-colors hover:bg-secondary disabled:opacity-40"
|
|
108
|
-
>
|
|
109
|
-
−
|
|
110
|
-
</button>
|
|
111
|
-
<span className="w-6 text-center text-sm tabular-nums">{qty}</span>
|
|
112
|
-
<button
|
|
113
|
-
type="button"
|
|
114
|
-
aria-label={`More ${t.name}`}
|
|
115
|
-
disabled={!onSale || qty >= t.limitPerCheckout}
|
|
116
|
-
onClick={() => setQuantity(t.id, qty + 1)}
|
|
117
|
-
className="h-8 w-8 rounded-full border border-border text-foreground transition-colors hover:bg-secondary disabled:opacity-40"
|
|
118
|
-
>
|
|
119
|
-
+
|
|
120
|
-
</button>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
);
|
|
124
|
-
})}
|
|
125
|
-
</div>
|
|
126
|
-
)}
|
|
127
|
-
{error && <p className="mt-3 text-sm text-red-600">{error}</p>}
|
|
128
|
-
<button type="button" disabled={!canCheckout || submitting} onClick={() => checkout().catch(() => {})} className={cta}>
|
|
129
|
-
{submitting ? "Reserving…" : ticketCount > 0 ? `Get ${ticketCount} ticket${ticketCount > 1 ? "s" : ""}` : "Get tickets"}
|
|
130
|
-
</button>
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (event.registrationType === "RSVP") {
|
|
136
|
-
return (
|
|
137
|
-
<div>
|
|
138
|
-
<p className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">RSVP</p>
|
|
139
|
-
<div className="grid max-w-md gap-3">
|
|
140
|
-
<label className="block">
|
|
141
|
-
<span className="mb-1 block text-xs font-semibold uppercase tracking-wider text-muted-foreground">First name</span>
|
|
142
|
-
<input type="text" value={rsvpValues.firstName} onChange={(e) => setRsvpValue("firstName", e.target.value)} className={input} />
|
|
143
|
-
</label>
|
|
144
|
-
<label className="block">
|
|
145
|
-
<span className="mb-1 block text-xs font-semibold uppercase tracking-wider text-muted-foreground">Last name</span>
|
|
146
|
-
<input type="text" value={rsvpValues.lastName} onChange={(e) => setRsvpValue("lastName", e.target.value)} className={input} />
|
|
147
|
-
</label>
|
|
148
|
-
<label className="block">
|
|
149
|
-
<span className="mb-1 block text-xs font-semibold uppercase tracking-wider text-muted-foreground">Email</span>
|
|
150
|
-
<input type="email" value={rsvpValues.email} onChange={(e) => setRsvpValue("email", e.target.value)} className={input} />
|
|
151
|
-
</label>
|
|
152
|
-
</div>
|
|
153
|
-
{error && <p className="mt-3 text-sm text-red-600">{error}</p>}
|
|
154
|
-
<div className="flex items-center gap-3">
|
|
155
|
-
<button type="button" disabled={!canRsvp || submitting} onClick={() => rsvp(true).catch(() => {})} className={cta}>
|
|
156
|
-
{submitting ? "Sending…" : "Count me in"}
|
|
157
|
-
</button>
|
|
158
|
-
{event.rsvpResponseType === "YES_AND_NO" && (
|
|
159
|
-
<button
|
|
160
|
-
type="button"
|
|
161
|
-
disabled={!canRsvp || submitting}
|
|
162
|
-
onClick={() => rsvp(false).catch(() => {})}
|
|
163
|
-
className="mt-5 rounded-full border border-border px-6 py-3 text-sm font-medium text-foreground transition-colors hover:bg-secondary disabled:opacity-50"
|
|
164
|
-
>
|
|
165
|
-
Can't make it
|
|
166
|
-
</button>
|
|
167
|
-
)}
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return (
|
|
174
|
-
<div className="rounded-lg border border-border p-6 text-sm text-muted-foreground">
|
|
175
|
-
Registration isn't open for this event.
|
|
176
|
-
</div>
|
|
177
|
-
);
|
|
178
|
-
}
|